@ranger-testing/ranger-cli 3.1.2-alpha.b450a14-41 → 3.1.2
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/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x318e8d,_0x131c45){const _0x410103=_0x46b0,_0x5b4716=_0x318e8d();while(!![]){try{const _0x3cb1c3=parseInt(_0x410103(0x1f2))/0x1+parseInt(_0x410103(0x21b))/0x2*(parseInt(_0x410103(0x1fc))/0x3)+parseInt(_0x410103(0x20b))/0x4+parseInt(_0x410103(0x1f4))/0x5+-parseInt(_0x410103(0x209))/0x6*(-parseInt(_0x410103(0x206))/0x7)+parseInt(_0x410103(0x21e))/0x8*(-parseInt(_0x410103(0x204))/0x9)+parseInt(_0x410103(0x1f0))/0xa*(-parseInt(_0x410103(0x20e))/0xb);if(_0x3cb1c3===_0x131c45)break;else _0x5b4716['push'](_0x5b4716['shift']());}catch(_0x12e0c8){_0x5b4716['push'](_0x5b4716['shift']());}}}(_0x2e63,0xb2b51));import{existsSync}from'fs';import _0x5a4358 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';function _0x2e63(){const _0x5152a3=['yMKvm','profile','oVFZw','RiVMK','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','eexJM','14xLTmfL','startPath','envStartPath','56mTKlfp','gmdBV','\x20does\x20not\x20exist.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','Profile\x20\x22','3530XaZRfE','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','760708rzAcKp','source','5076575YHDhby','prompt','log','uYzDp','cdpEndpoint','UmweH','bwsHb','zRXCS','237609VyCHIi','EbLie','vHUJK','Cloud\x20profile\x20(recommended)','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','status','zFDEz','115146nIWxhg','gHJxL','1665517RzCkih','PUgKT','envBaseUrl','6jGtETk','cloud','1322292rFudlC','pEPNc','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','64735taQuPr','baseUrl','JhJsf','authPath','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','name','string'];_0x2e63=function(){return _0x5152a3;};return _0x2e63();}function _0x46b0(_0x50cb6a,_0x4e6948){_0x50cb6a=_0x50cb6a-0x1ec;const _0x2e6344=_0x2e63();let _0x46b004=_0x2e6344[_0x50cb6a];return _0x46b004;}import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x3e53f3){const _0x3dee86=_0x46b0,_0x562fad={'uYzDp':function(_0x5e6199,_0x7a8cee){return _0x5e6199+_0x7a8cee;},'Dlxrg':function(_0x2983a2,_0x2741c8){return _0x2983a2+_0x2741c8;},'LtrmM':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','gHJxL':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','bwsHb':function(_0x29e034,_0x1a28e6){return _0x29e034(_0x1a28e6);},'EanBL':function(_0x5d1fce,_0x2a2579){return _0x5d1fce===_0x2a2579;},'zFDEz':function(_0x21ff52,_0x815812){return _0x21ff52&&_0x815812;},'EbLie':function(_0xcb89fc,_0x5dbf39){return _0xcb89fc+_0x5dbf39;},'PUgKT':_0x3dee86(0x1ee),'gEiAm':function(_0x339219){return _0x339219();},'LIfHh':'list','eexJM':_0x3dee86(0x1f3),'UmweH':_0x3dee86(0x20a),'omLwL':'Local\x20profile','lfQCe':function(_0x5830b3,_0xbdaec7){return _0x5830b3===_0xbdaec7;},'vHUJK':function(_0x6434a1,_0x19db03,_0x5d572f){return _0x6434a1(_0x19db03,_0x5d572f);},'oVFZw':function(_0xc40cc5,_0x18a601){return _0xc40cc5(_0x18a601);},'JhJsf':function(_0x5de122){return _0x5de122();},'yMKvm':function(_0x30ebd6,_0x43897f,_0x348221){return _0x30ebd6(_0x43897f,_0x348221);},'gmdBV':function(_0x5f5404,_0x3aa327){return _0x5f5404(_0x3aa327);},'wZapc':function(_0x19ba7d,_0x523b02){return _0x19ba7d(_0x523b02);},'ufDpa':function(_0x5cf536,_0x5756b){return _0x5cf536(_0x5756b);},'RiVMK':function(_0x471c76,_0x23b617){return _0x471c76(_0x23b617);}},_0x36998c=_0x3e53f3[_0x3dee86(0x216)];let _0x58f60f=_0x3e53f3[_0x3dee86(0x216)]??await readActiveProfileName(),_0x2e91ab=null;if(!_0x58f60f&&process['env']['RANGER_TEST_USERNAME']){const _0x10dd62=await resolveAdHocProfile();_0x10dd62&&(_0x58f60f=_0x10dd62['name'],_0x2e91ab=_0x10dd62['profile']);}if(!_0x58f60f)try{const _0x5b1c17=await listCloudProfiles();if(_0x5b1c17['length']===0x1){const _0x2111dc=_0x5b1c17[0x0];_0x58f60f=_0x2111dc[_0x3dee86(0x213)],console[_0x3dee86(0x1f6)](_0x3dee86(0x219)+_0x2111dc[_0x3dee86(0x213)]),console[_0x3dee86(0x1f6)](_0x3dee86(0x212));}}catch{}if(!_0x58f60f)throw new Error(_0x562fad[_0x3dee86(0x1f7)](_0x562fad['uYzDp'](_0x562fad['Dlxrg'](_0x3dee86(0x1f1),_0x3dee86(0x201))+_0x562fad['LtrmM'],_0x3dee86(0x20d)),_0x562fad[_0x3dee86(0x205)]));const _0x270ddd=_0x562fad['bwsHb'](getEnvDir,_0x58f60f),_0x40c0b9=_0x562fad[_0x3dee86(0x1fa)](existsSync,_0x270ddd);let _0x340421=_0x2e91ab,_0x58383a=![];if(!_0x340421)try{_0x340421=await fetchCloudProfile(_0x58f60f);if(!_0x340421)_0x58383a=!![];}catch(_0x47c991){_0x47c991 instanceof ApiError&&_0x562fad['EanBL'](_0x47c991[_0x3dee86(0x202)],0x194)&&(_0x58383a=!![]);}if(_0x562fad['zFDEz'](_0x36998c,_0x58383a)&&!_0x40c0b9&&!_0x340421)throw new Error(_0x562fad[_0x3dee86(0x1fd)]('Profile\x20\x22'+_0x36998c+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x562fad[_0x3dee86(0x207)])+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x562fad[_0x3dee86(0x203)](_0x340421,_0x40c0b9)){let _0x252592=!![];if(_0x562fad['gEiAm'](isInteractive)){const {source:_0x58429f}=await _0x5a4358[_0x3dee86(0x1f5)]([{'type':_0x562fad['LIfHh'],'name':_0x562fad[_0x3dee86(0x21a)],'message':'Profile\x20\x22'+_0x58f60f+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x3dee86(0x1ff),'value':_0x562fad[_0x3dee86(0x1f9)]},{'name':_0x562fad['omLwL'],'value':'local'}],'default':_0x562fad[_0x3dee86(0x1f9)]}]);_0x252592=_0x562fad['lfQCe'](_0x58429f,'cloud');}if(!_0x252592)_0x340421=null;}const _0xccb284=_0x562fad[_0x3dee86(0x1fe)](readProfileOverrides,process['cwd'](),_0x58f60f);let _0x4c0704=null,_0x5c78db,_0x5da292,_0x23c2ff,_0x47ff25,_0x229821=null,_0x16b702;const _0x5c2e6b=_0x562fad[_0x3dee86(0x217)](expandOverrides,_0xccb284),_0x225423=_0x562fad[_0x3dee86(0x210)](readUrlEnvVars);if(_0x340421){_0x4c0704=_0x340421;const _0x556c2a=_0x340421['settings']??{},_0x276363=mergeCloudProfileSettings(_0x556c2a,_0xccb284??undefined),_0x3d411d={..._0x340421,'settings':_0x276363};_0x229821={'baseUrl':_0x562fad[_0x3dee86(0x217)](expandString,_0x556c2a['baseUrl']),'startPath':_0x562fad[_0x3dee86(0x217)](expandString,_0x556c2a['startPath'])};const _0x3de370=await fetchAuthConfig(),_0x230971=_0x3de370?_0x562fad[_0x3dee86(0x215)](resolveAuthEnvironmentLocally,_0x3de370,_0x340421['environmentKey']):null;_0x16b702=_0x230971?.['domains']?.[0x0];const _0x5c2053=_0x562fad[_0x3dee86(0x1ec)](resolveProfileUrl,{'flagBaseUrl':_0x3e53f3['baseUrl'],'flagStartPath':_0x3e53f3['startPath'],'envBaseUrl':_0x225423[_0x3dee86(0x208)],'envStartPath':_0x225423[_0x3dee86(0x21d)],'projectOverrides':_0x5c2e6b,'cloudSettings':_0x229821,'authEnvironmentDomain':_0x16b702}),_0x1f70f1=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x1f70f1){if(!_0x562fad['wZapc'](existsSync,_0x1f70f1))throw new Error('RANGER_SESSION_STATE_PATH='+_0x1f70f1+_0x3dee86(0x1ed));_0x5c78db=_0x1f70f1,_0x5da292=_0x562fad['ufDpa'](resolveEnvVars,_0x276363),_0x23c2ff=Boolean(_0x5da292[_0x3dee86(0x1f8)]);}else{const _0x5bde9b=await _0x562fad['yMKvm'](resolveCloudProfileSession,_0x3d411d,{'effectiveBaseUrl':_0x5c2053['baseUrl'],'telemetry':_0x3e53f3['telemetry']});_0x5c78db=_0x5bde9b[_0x3dee86(0x211)],_0x5da292=_0x562fad['ufDpa'](resolveEnvVars,_0x5bde9b['settings']),_0x23c2ff=Boolean(_0x5da292['cdpEndpoint']),_0x16b702=_0x5bde9b['resolvedEnv']?.['domains']?.[0x0];}}else{if(!_0x40c0b9)throw new Error(_0x3dee86(0x1ef)+_0x58f60f+_0x3dee86(0x200)+_0x58f60f);const _0x22f2c7=await _0x562fad[_0x3dee86(0x218)](loadSettings,_0x58f60f);_0x5da292=resolveEnvVars(_0x22f2c7),_0x23c2ff=Boolean(_0x5da292['cdpEndpoint']),_0x47ff25=_0x5da292['baseUrl'];}const _0x32aa82=resolveProfileUrl({'flagBaseUrl':_0x3e53f3[_0x3dee86(0x20f)],'flagStartPath':_0x3e53f3[_0x3dee86(0x21c)],'envBaseUrl':_0x225423['envBaseUrl'],'envStartPath':_0x225423['envStartPath'],'localSettingsBaseUrl':_0x47ff25,'projectOverrides':_0x5c2e6b,'cloudSettings':_0x229821,'authEnvironmentDomain':_0x16b702}),_0x3bce74=_0x32aa82['url']??_0x32aa82[_0x3dee86(0x20f)];if(!_0x3bce74&&!_0x23c2ff)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x58f60f+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x58f60f+'\x20baseUrl\x20<url>');return{'activeProfile':_0x58f60f,'resolvedCloudProfile':_0x4c0704,'cloudAuthPath':_0x5c78db,'resolvedSettings':_0x5da292,'isCdpMode':_0x23c2ff,'url':_0x3bce74,'startPath':_0x32aa82['startPath']};}function expandString(_0x31432a){const _0x55e842=_0x46b0,_0x483782={'zRXCS':function(_0x4d0c96,_0x583cf2){return _0x4d0c96!==_0x583cf2;}};if(_0x483782[_0x55e842(0x1fb)](typeof _0x31432a,_0x55e842(0x214)))return _0x31432a;return resolveEnvVars(_0x31432a);}function expandOverrides(_0x2206d2){const _0x505607=_0x46b0,_0x4c052a={'oeMjt':function(_0x32ed8b,_0x3beeb2){return _0x32ed8b===_0x3beeb2;},'pEPNc':'string','bUrEH':function(_0x583145,_0x4578c0){return _0x583145(_0x4578c0);}};if(!_0x2206d2)return _0x2206d2;const _0x5c3da5={..._0x2206d2};return _0x4c052a['oeMjt'](typeof _0x5c3da5[_0x505607(0x20f)],_0x4c052a[_0x505607(0x20c)])&&(_0x5c3da5[_0x505607(0x20f)]=_0x4c052a['bUrEH'](resolveEnvVars,_0x5c3da5['baseUrl'])),typeof _0x5c3da5[_0x505607(0x21c)]==='string'&&(_0x5c3da5[_0x505607(0x21c)]=resolveEnvVars(_0x5c3da5[_0x505607(0x21c)])),_0x5c3da5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x389093,_0x203d1a){const _0x42c8e6=_0x5e11,_0x5509f3=_0x389093();while(!![]){try{const _0x351d62=-parseInt(_0x42c8e6(0x91))/0x1*(parseInt(_0x42c8e6(0x9c))/0x2)+parseInt(_0x42c8e6(0x88))/0x3*(parseInt(_0x42c8e6(0x8a))/0x4)+-parseInt(_0x42c8e6(0x92))/0x5+-parseInt(_0x42c8e6(0x94))/0x6+parseInt(_0x42c8e6(0x98))/0x7*(-parseInt(_0x42c8e6(0x8f))/0x8)+parseInt(_0x42c8e6(0x8b))/0x9+-parseInt(_0x42c8e6(0x99))/0xa*(-parseInt(_0x42c8e6(0x9d))/0xb);if(_0x351d62===_0x203d1a)break;else _0x5509f3['push'](_0x5509f3['shift']());}catch(_0x1547f8){_0x5509f3['push'](_0x5509f3['shift']());}}}(_0x1479,0x5e7df));function firstDefined(..._0x34a921){const _0x281d5d={'Hlyzg':function(_0x305578,_0x4b739a){return _0x305578!==_0x4b739a;}};for(const _0x2f4e37 of _0x34a921){if(_0x281d5d['Hlyzg'](_0x2f4e37,undefined)&&_0x2f4e37!==null&&_0x281d5d['Hlyzg'](_0x2f4e37,''))return _0x2f4e37;}return undefined;}function normalizeAuthEnvironmentDomain(_0x295a99){if(!_0x295a99)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x295a99))return _0x295a99;return'https://'+_0x295a99;}export function resolveBaseUrl(_0x3021a3){const _0xfbe065=_0x5e11,_0x46702e={'pmsZB':_0xfbe065(0x97),'kzTxB':function(_0x104297,_0x32a1e0){return _0x104297(_0x32a1e0);}},_0x1e7b8d=_0x3021a3[_0xfbe065(0x9a)],_0x3ad03f=!!_0x1e7b8d&&_0xfbe065(0x87)in _0x1e7b8d,_0x7dc26a=_0x1e7b8d?.['baseUrl'],_0x549bce=!(_0x3ad03f&&_0x7dc26a===null);return firstDefined(_0x3021a3[_0xfbe065(0x9b)],_0x3021a3[_0xfbe065(0x9f)],_0x3021a3[_0xfbe065(0x93)],typeof _0x7dc26a===_0x46702e[_0xfbe065(0x8c)]?_0x7dc26a:undefined,_0x549bce?_0x3021a3['cloudSettings']?.['baseUrl']:undefined,_0x549bce?_0x46702e['kzTxB'](normalizeAuthEnvironmentDomain,_0x3021a3[_0xfbe065(0x96)]):undefined);}export function resolveStartPath(_0xd979a8){const _0x25ddcc=_0x5e11,_0x1e4ce1={'cmOqS':'startPath','WKJhb':function(_0x1366be,_0x373ca4){return _0x1366be===_0x373ca4;},'MWrFj':_0x25ddcc(0x97)},_0x5bf126=_0xd979a8[_0x25ddcc(0x9a)],_0x486116=!!_0x5bf126&&_0x1e4ce1['cmOqS']in _0x5bf126,_0x653c29=_0x5bf126?.[_0x25ddcc(0x89)],_0x386243=!(_0x486116&&_0x1e4ce1['WKJhb'](_0x653c29,null));return firstDefined(_0xd979a8[_0x25ddcc(0x8d)],_0xd979a8['envStartPath'],_0x1e4ce1['WKJhb'](typeof _0x653c29,_0x1e4ce1[_0x25ddcc(0x9e)])?_0x653c29:undefined,_0x386243?_0xd979a8['cloudSettings']?.[_0x25ddcc(0x89)]:undefined);}function _0x1479(){const _0x52fcbf=['2507640oRSiJW','localSettingsBaseUrl','3105822ZVMzOU','RANGER_BASE_URL','authEnvironmentDomain','string','1029cVFWoI','110lfPRtJ','projectOverrides','flagBaseUrl','93334tqqrea','1419484oJaXSH','MWrFj','envBaseUrl','baseUrl','3qHdJBX','startPath','2891024twxnRB','2796678TIcRbd','pmsZB','flagStartPath','RANGER_START_PATH','18872eJEvqt','Jrgee','15zAczdb'];_0x1479=function(){return _0x52fcbf;};return _0x1479();}function _0x5e11(_0x1de3d3,_0x140f8a){_0x1de3d3=_0x1de3d3-0x87;const _0x1479a=_0x1479();let _0x5e118d=_0x1479a[_0x1de3d3];return _0x5e118d;}export function joinBaseAndPath(_0x31ce9f,_0x2759d3){const _0x332606={'kDRgV':function(_0x1c824b,_0x134609){return _0x1c824b+_0x134609;}};if(!_0x31ce9f)return undefined;if(!_0x2759d3)return _0x31ce9f;const _0x2e826b=_0x31ce9f['endsWith']('/')?_0x31ce9f['slice'](0x0,-0x1):_0x31ce9f,_0xf2c977=_0x2759d3['startsWith']('/')?_0x2759d3:'/'+_0x2759d3;return _0x332606['kDRgV'](_0x2e826b,_0xf2c977);}export function resolveProfileUrl(_0x102d33){const _0x3e575d=_0x5e11,_0x2f6fa0={'Jrgee':function(_0xbf518a,_0x3a3676,_0x3edb1b){return _0xbf518a(_0x3a3676,_0x3edb1b);}},_0xb7214e=resolveBaseUrl(_0x102d33),_0x4f1b36=resolveStartPath(_0x102d33);return{'baseUrl':_0xb7214e,'startPath':_0x4f1b36,'url':_0x2f6fa0[_0x3e575d(0x90)](joinBaseAndPath,_0xb7214e,_0x4f1b36)};}export function readUrlEnvVars(_0x5478ba=process['env']){const _0xb34a9c=_0x5e11;return{'envBaseUrl':_0x5478ba[_0xb34a9c(0x95)],'envStartPath':_0x5478ba[_0xb34a9c(0x8e)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x43dd(_0x3d0b42,_0x3bd266){_0x3d0b42=_0x3d0b42-0xd2;const _0xf7d59e=_0xf7d5();let _0x43dd0b=_0xf7d59e[_0x3d0b42];return _0x43dd0b;}(function(_0x3dcbdb,_0xc93fdb){const _0x3a8b9a=_0x43dd,_0x7b1f55=_0x3dcbdb();while(!![]){try{const _0x15220f=parseInt(_0x3a8b9a(0xdf))/0x1+parseInt(_0x3a8b9a(0xd8))/0x2*(-parseInt(_0x3a8b9a(0xd9))/0x3)+parseInt(_0x3a8b9a(0xde))/0x4+parseInt(_0x3a8b9a(0xdc))/0x5*(parseInt(_0x3a8b9a(0xe0))/0x6)+-parseInt(_0x3a8b9a(0xe1))/0x7*(-parseInt(_0x3a8b9a(0xd7))/0x8)+-parseInt(_0x3a8b9a(0xdd))/0x9+-parseInt(_0x3a8b9a(0xda))/0xa*(parseInt(_0x3a8b9a(0xdb))/0xb);if(_0x15220f===_0xc93fdb)break;else _0x7b1f55['push'](_0x7b1f55['shift']());}catch(_0x47a954){_0x7b1f55['push'](_0x7b1f55['shift']());}}}(_0xf7d5,0x9c31a));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0xf7d5(){const _0x16d6dc=['10QtWSSw','14772989lqYkcs','230765uReULt','7990452tkawSk','2315928iXvktq','1082378DzCrNl','156IaCUyY','7QGckRi','),\x20retrying\x20in\x20','\x20failed\x20(attempt\x20','pow','maxRetries','label','Bqjhi','7427576oFEbso','17022eaCbzg','324JCElvB'];_0xf7d5=function(){return _0x16d6dc;};return _0xf7d5();}export async function withRetry(_0x26b83b,_0xcb6ed7){const _0x48ae00=_0x43dd,_0x343536={'aSVZf':function(_0x4f190c,_0x3c5005){return _0x4f190c<_0x3c5005;},'Bqjhi':function(_0x4b7612,_0x44842d){return _0x4b7612*_0x44842d;}},_0x214279=_0xcb6ed7?.[_0x48ae00(0xd4)]??DEFAULT_MAX_RETRIES,_0x2b3492=_0xcb6ed7?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x1cc2b7;for(let _0x2e8705=0x0;_0x2e8705<=_0x214279;_0x2e8705++){try{return await _0x26b83b();}catch(_0x5b9143){_0x1cc2b7=_0x5b9143 instanceof Error?_0x5b9143:new Error(String(_0x5b9143));if(_0x343536['aSVZf'](_0x2e8705,_0x214279)){const _0xc076e0=_0x343536[_0x48ae00(0xd6)](_0x2b3492,Math[_0x48ae00(0xd3)](0x2,_0x2e8705));_0xcb6ed7?.[_0x48ae00(0xd5)]&&console['error'](_0xcb6ed7[_0x48ae00(0xd5)]+_0x48ae00(0xd2)+(_0x2e8705+0x1)+'/'+(_0x214279+0x1)+_0x48ae00(0xe2)+_0xc076e0+'ms...'),await new Promise(_0x21f9a3=>setTimeout(_0x21f9a3,_0xc076e0));}}}throw _0x1cc2b7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x20d83c=_0x2cff;(function(_0xff7de4,_0x2b10d3){const _0x4fa31e=_0x2cff,_0x460611=_0xff7de4();while(!![]){try{const _0x568b72=parseInt(_0x4fa31e(0x183))/0x1+-parseInt(_0x4fa31e(0x17d))/0x2*(parseInt(_0x4fa31e(0x193))/0x3)+parseInt(_0x4fa31e(0x19d))/0x4+parseInt(_0x4fa31e(0x185))/0x5+parseInt(_0x4fa31e(0x1a0))/0x6*(-parseInt(_0x4fa31e(0x18f))/0x7)+-parseInt(_0x4fa31e(0x18b))/0x8*(parseInt(_0x4fa31e(0x18c))/0x9)+parseInt(_0x4fa31e(0x187))/0xa;if(_0x568b72===_0x2b10d3)break;else _0x460611['push'](_0x460611['shift']());}catch(_0x483d6f){_0x460611['push'](_0x460611['shift']());}}}(_0x346e,0xa7dc3));import*as _0x1b0457 from'fs';import*as _0x3e2176 from'path';import*as _0x4a676 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x3e2176[_0x20d83c(0x177)](_0x4a676[_0x20d83c(0x199)](),_0x20d83c(0x1a3),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x54c9d7=_0x20d83c,_0x21b66c={'NVhgP':function(_0x229aed){return _0x229aed();}};try{if(_0x1b0457['existsSync'](CACHE_FILE)){const _0x465ca7=JSON['parse'](_0x1b0457[_0x54c9d7(0x186)](CACHE_FILE,_0x54c9d7(0x196)));return{'version':0x3,'sessions':_0x465ca7[_0x54c9d7(0x181)]||{},'branches':_0x465ca7['branches']||{},'lastEnabledSessionClearedAt':_0x465ca7[_0x54c9d7(0x1a4)]};}}catch{}return _0x21b66c[_0x54c9d7(0x184)](createEmptyCache);}function saveCache(_0x58d744){const _0x29e373=_0x20d83c;try{const _0x4a5da4=_0x3e2176[_0x29e373(0x176)](CACHE_FILE);!_0x1b0457[_0x29e373(0x1a2)](_0x4a5da4)&&_0x1b0457['mkdirSync'](_0x4a5da4,{'recursive':!![]}),_0x1b0457[_0x29e373(0x17c)](CACHE_FILE,JSON[_0x29e373(0x19b)](_0x58d744,null,0x2));}catch{}}export function getCurrentBranch(){const _0x50e4f5=_0x20d83c,_0x47e730={'yhgch':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','LFNLS':_0x50e4f5(0x192),'yfphT':function(_0x3b3de9,_0x40a0b7){return _0x3b3de9===_0x40a0b7;},'NOxzd':'HEAD'};try{const _0x4b1c2c=execSync(_0x47e730[_0x50e4f5(0x18d)],{'encoding':'utf-8','stdio':['pipe',_0x47e730['LFNLS'],'pipe']})['trim']();if(!_0x4b1c2c||_0x47e730['yfphT'](_0x4b1c2c,_0x47e730['NOxzd']))return null;return _0x4b1c2c;}catch{return null;}}export function enableBranch(_0x4512cd){const _0x67dce4={'ZrCzs':function(_0x28fc17,_0x33f226){return _0x28fc17(_0x33f226);}},_0x3f3f79=loadCache();_0x3f3f79['branches'][_0x4512cd]=!![],_0x67dce4['ZrCzs'](saveCache,_0x3f3f79);}export function disableBranch(_0x39452a){const _0x102121=_0x20d83c,_0x382acd={'jwOvo':function(_0x440e7b){return _0x440e7b();},'SduVO':function(_0x781b72,_0x54b2d1){return _0x781b72(_0x54b2d1);}},_0x3a102=_0x382acd['jwOvo'](loadCache);delete _0x3a102[_0x102121(0x191)][_0x39452a],_0x382acd[_0x102121(0x18e)](saveCache,_0x3a102);}function _0x346e(){const _0x2f84f1=['registeredAt','now','EFZjY','dirname','join','CXUxC','UVBZy','wSYdK','currentBranch','writeFileSync','41394QtyyoP','fxWci','prompted','main','sessions','EEBKZ','749493UPMgpE','NVhgP','5830335qbMqqQ','readFileSync','1302770myvJzi','enabled','xcxaQ','GonrS','32AbKokZ','2669697txSzjX','yhgch','SduVO','3206CZjyqp','xjtkj','branches','pipe','135GzGQRg','Lmzpp','CwRYN','utf-8','jASpV','gnIHZ','homedir','master','stringify','LwGhK','3520276cFozJA','iiJPv','lastStopReminderAt','1578aYRSNV','yuKFf','existsSync','.claude','lastEnabledSessionClearedAt','featureId'];_0x346e=function(){return _0x2f84f1;};return _0x346e();}export function isBranchEnabled(_0x45558b){const _0x153a95={'Qxqun':function(_0x5a980a){return _0x5a980a();}},_0x2205d5=_0x153a95['Qxqun'](loadCache);return _0x2205d5['branches'][_0x45558b]===!![];}function getOrCreateSession(_0x463824,_0x5aec08){const _0x1d678e=_0x20d83c;return!_0x463824[_0x1d678e(0x181)][_0x5aec08]&&(_0x463824[_0x1d678e(0x181)][_0x5aec08]={}),_0x463824[_0x1d678e(0x181)][_0x5aec08];}export function enableSession(_0x298f8c){const _0x399f99=_0x20d83c,_0x1cca98={'UVBZy':function(_0x210055){return _0x210055();},'pyCqd':function(_0x2e6718){return _0x2e6718();},'wSYdK':'master','qBkWa':function(_0x5a5740,_0x19afee){return _0x5a5740(_0x19afee);}},_0x4d61f3=_0x1cca98[_0x399f99(0x179)](loadCache),_0x1dafee=getOrCreateSession(_0x4d61f3,_0x298f8c);_0x1dafee['enabled']=!![];const _0x1ab61b=_0x1cca98['pyCqd'](getCurrentBranch);_0x1ab61b&&_0x1ab61b!=='main'&&_0x1ab61b!==_0x1cca98[_0x399f99(0x17a)]&&(_0x4d61f3['branches'][_0x1ab61b]=!![],_0x1dafee[_0x399f99(0x17b)]=_0x1ab61b),_0x1cca98['qBkWa'](saveCache,_0x4d61f3);}export function isSessionEnabled(_0x47b91f){const _0x43a6ac=_0x20d83c,_0x286a9c={'CwRYN':function(_0x4e66f3){return _0x4e66f3();},'LPJBv':function(_0x2b0365){return _0x2b0365();},'gnIHZ':function(_0xf01bfb,_0x4c9e77){return _0xf01bfb===_0x4c9e77;},'FODXU':'main','Lmzpp':function(_0x2ae48d,_0x5f2a92){return _0x2ae48d===_0x5f2a92;},'xjtkj':function(_0x330bc7,_0x128acb){return _0x330bc7||_0x128acb;}},_0x258297=_0x286a9c[_0x43a6ac(0x195)](loadCache),_0x4fc685=_0x286a9c['LPJBv'](getCurrentBranch);if(!_0x4fc685||_0x286a9c['gnIHZ'](_0x4fc685,_0x286a9c['FODXU'])||_0x286a9c[_0x43a6ac(0x198)](_0x4fc685,'master'))return _0x258297[_0x43a6ac(0x181)][_0x47b91f]?.[_0x43a6ac(0x188)]===!![];const _0x1ec14f=_0x286a9c[_0x43a6ac(0x194)](_0x258297[_0x43a6ac(0x191)][_0x4fc685],!![]),_0x24a883=_0x286a9c['gnIHZ'](_0x258297[_0x43a6ac(0x181)][_0x47b91f]?.[_0x43a6ac(0x188)],!![]);return _0x286a9c[_0x43a6ac(0x190)](_0x1ec14f,_0x24a883);}export function disableSession(_0x59a8d5){const _0x1fd619=_0x20d83c,_0x2bf1b3=loadCache(),_0x35fb8d=getOrCreateSession(_0x2bf1b3,_0x59a8d5);_0x35fb8d[_0x1fd619(0x188)]=![],saveCache(_0x2bf1b3);}export function updateBranchTracking(_0x31843a){const _0x57de0d=_0x20d83c,_0x4b2039={'KdhWS':function(_0x1e09cf,_0x30efbc){return _0x1e09cf===_0x30efbc;},'XFhQS':function(_0x24feaf,_0x5aa528){return _0x24feaf(_0x5aa528);}},_0x4c41ff=loadCache(),_0x38a8cc=_0x4c41ff[_0x57de0d(0x181)][_0x31843a];if(!_0x38a8cc?.['enabled'])return;const _0xc7af7f=getCurrentBranch();if(!_0xc7af7f||_0x4b2039['KdhWS'](_0xc7af7f,_0x57de0d(0x180))||_0xc7af7f==='master')return;_0x38a8cc['currentBranch']!==_0xc7af7f&&(_0x4c41ff[_0x57de0d(0x191)][_0xc7af7f]=!![],_0x38a8cc['currentBranch']=_0xc7af7f,_0x4b2039['XFhQS'](saveCache,_0x4c41ff));}export function initBranchTracking(_0x5e16fc){const _0x134b73=_0x20d83c,_0x5408b8={'EEBKZ':function(_0x25b5d1){return _0x25b5d1();},'dMCFo':function(_0x34fc9f,_0x21213d){return _0x34fc9f===_0x21213d;},'LwGhK':_0x134b73(0x180),'fxWci':_0x134b73(0x19a),'EFZjY':function(_0xfd4bd,_0x17f46c,_0x49262d){return _0xfd4bd(_0x17f46c,_0x49262d);},'vPaRH':function(_0x11d136,_0x37fea9){return _0x11d136(_0x37fea9);}},_0x20936e=_0x5408b8[_0x134b73(0x182)](loadCache),_0x192292=getCurrentBranch();if(!_0x192292||_0x5408b8['dMCFo'](_0x192292,_0x5408b8[_0x134b73(0x19c)])||_0x5408b8['dMCFo'](_0x192292,_0x5408b8[_0x134b73(0x17e)]))return;if(_0x20936e['branches'][_0x192292]===!![]){const _0x1efceb=_0x5408b8[_0x134b73(0x175)](getOrCreateSession,_0x20936e,_0x5e16fc);_0x1efceb['enabled']=!![],_0x1efceb['currentBranch']=_0x192292,_0x5408b8['vPaRH'](saveCache,_0x20936e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x9bb61c){const _0x41243c=_0x20d83c,_0x26325b={'iiJPv':function(_0x31ca37){return _0x31ca37();},'GbUsu':function(_0x1da9c1,_0x56c999){return _0x1da9c1(_0x56c999);}},_0x2b7ee6=_0x26325b[_0x41243c(0x19e)](loadCache),_0x4b8e64=_0x2b7ee6['sessions'][_0x9bb61c];_0x4b8e64?.['enabled']&&(_0x2b7ee6['lastEnabledSessionClearedAt']=Date[_0x41243c(0x174)](),_0x26325b['GbUsu'](saveCache,_0x2b7ee6));}function _0x2cff(_0x413fb1,_0x31336c){_0x413fb1=_0x413fb1-0x173;const _0x346e4b=_0x346e();let _0x2cff00=_0x346e4b[_0x413fb1];return _0x2cff00;}export function shouldAutoEnableAfterClear(_0x2d9f7e){const _0x43c04f=_0x20d83c,_0x570da={'azVKk':function(_0x24205b,_0x1c22d7){return _0x24205b!==_0x1c22d7;},'SPEzG':'clear'};if(_0x570da['azVKk'](_0x2d9f7e,_0x570da['SPEzG']))return![];const _0x550cd8=loadCache(),_0x33bd1c=_0x550cd8[_0x43c04f(0x1a4)];if(!_0x33bd1c)return![];const _0x40846e=Date[_0x43c04f(0x174)]()-_0x33bd1c;return _0x40846e<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x29a4d7){const _0x2c1667=_0x20d83c,_0x2c677b={'CqfEk':function(_0x2001cb,_0x161428,_0xf4e2ab){return _0x2001cb(_0x161428,_0xf4e2ab);},'CXUxC':_0x2c1667(0x180)},_0x1a8c23=loadCache(),_0x16044c=_0x2c677b['CqfEk'](getOrCreateSession,_0x1a8c23,_0x29a4d7);_0x16044c['enabled']=!![];const _0x48df68=getCurrentBranch();_0x48df68&&_0x48df68!==_0x2c677b[_0x2c1667(0x178)]&&_0x48df68!==_0x2c1667(0x19a)&&(_0x16044c['currentBranch']=_0x48df68),delete _0x1a8c23['lastEnabledSessionClearedAt'],saveCache(_0x1a8c23);}export function registerSession(_0x5121e0,_0x5e7e9e){const _0x478955=_0x20d83c,_0x1fc68a={'dfuGB':function(_0x270bb4,_0x3b1320,_0x111d96){return _0x270bb4(_0x3b1320,_0x111d96);}},_0x3d4c96=loadCache(),_0x3631e8=_0x1fc68a['dfuGB'](getOrCreateSession,_0x3d4c96,_0x5121e0);_0x3631e8[_0x478955(0x1a5)]=_0x5e7e9e,_0x3631e8[_0x478955(0x173)]=new Date()['toISOString'](),saveCache(_0x3d4c96);}export function getSessionEntry(_0x343192){const _0x1cfa93=_0x20d83c,_0x4b36b5={'oodKJ':function(_0x3079aa){return _0x3079aa();}},_0x333382=_0x4b36b5['oodKJ'](loadCache),_0x53883c=_0x333382[_0x1cfa93(0x181)][_0x343192];if(_0x53883c?.[_0x1cfa93(0x1a5)]&&_0x53883c?.[_0x1cfa93(0x173)])return{'featureId':_0x53883c[_0x1cfa93(0x1a5)],'registeredAt':_0x53883c[_0x1cfa93(0x173)]};return null;}export function unregisterSession(_0x2e65d9){const _0x5b2314=_0x20d83c,_0x1bf13b={'rpABO':function(_0x51287b){return _0x51287b();},'yuKFf':function(_0x61ac03,_0x401685){return _0x61ac03(_0x401685);}},_0x616850=_0x1bf13b['rpABO'](loadCache),_0xb1ae42=_0x616850[_0x5b2314(0x181)][_0x2e65d9];_0xb1ae42&&(delete _0xb1ae42['featureId'],delete _0xb1ae42['registeredAt'],_0x1bf13b[_0x5b2314(0x1a1)](saveCache,_0x616850));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x51acfd){const _0x3f94f4={'bijOs':function(_0x5bc781,_0x1780fe){return _0x5bc781(_0x1780fe);}},_0x26b6a6=loadCache(),_0x571c9b=getOrCreateSession(_0x26b6a6,_0x51acfd),_0xc548cb=_0x571c9b['lastPlanReminderAt']||0x0,_0x1c2979=Date['now']();if(_0x1c2979-_0xc548cb>=PLAN_REMINDER_INTERVAL_MS)return _0x571c9b['lastPlanReminderAt']=_0x1c2979,_0x3f94f4['bijOs'](saveCache,_0x26b6a6),!![];return![];}export function shouldShowStopReminder(_0x334cb6){const _0x4e0bb0=_0x20d83c,_0xa9b0c3={'xcxaQ':function(_0xa886f8,_0x519a73){return _0xa886f8>=_0x519a73;},'Fekyh':function(_0xfd5da,_0x5d03a4){return _0xfd5da-_0x5d03a4;}},_0x159d73=loadCache(),_0x23cdf1=getOrCreateSession(_0x159d73,_0x334cb6),_0x15c9af=_0x23cdf1[_0x4e0bb0(0x19f)]||0x0,_0x7483ac=Date['now']();if(_0xa9b0c3[_0x4e0bb0(0x189)](_0xa9b0c3['Fekyh'](_0x7483ac,_0x15c9af),STOP_REMINDER_INTERVAL_MS))return _0x23cdf1['lastStopReminderAt']=_0x7483ac,saveCache(_0x159d73),!![];return![];}export function hasSessionBeenPrompted(_0x5a6adb){const _0x280d5c=_0x20d83c,_0x4c717b=loadCache();return _0x4c717b['sessions'][_0x5a6adb]?.[_0x280d5c(0x17f)]===!![];}export function markSessionPrompted(_0xc866d0){const _0x31bfd7=_0x20d83c,_0xc4e6b3={'jASpV':function(_0x53f3e9,_0x310574,_0x35a690){return _0x53f3e9(_0x310574,_0x35a690);},'GonrS':function(_0x45e399,_0x15699c){return _0x45e399(_0x15699c);}},_0x3db329=loadCache(),_0x421190=_0xc4e6b3[_0x31bfd7(0x197)](getOrCreateSession,_0x3db329,_0xc866d0);_0x421190[_0x31bfd7(0x17f)]=!![],_0xc4e6b3[_0x31bfd7(0x18a)](saveCache,_0x3db329);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x157323=_0x2d46;(function(_0x49eab4,_0x43eb3f){const _0x1d918c=_0x2d46,_0x209490=_0x49eab4();while(!![]){try{const _0x1f5b2a=-parseInt(_0x1d918c(0x18d))/0x1*(-parseInt(_0x1d918c(0x182))/0x2)+-parseInt(_0x1d918c(0x162))/0x3+-parseInt(_0x1d918c(0x170))/0x4*(-parseInt(_0x1d918c(0x160))/0x5)+-parseInt(_0x1d918c(0x16b))/0x6*(parseInt(_0x1d918c(0x179))/0x7)+parseInt(_0x1d918c(0x18b))/0x8*(-parseInt(_0x1d918c(0x178))/0x9)+parseInt(_0x1d918c(0x189))/0xa+-parseInt(_0x1d918c(0x17e))/0xb*(-parseInt(_0x1d918c(0x169))/0xc);if(_0x1f5b2a===_0x43eb3f)break;else _0x209490['push'](_0x209490['shift']());}catch(_0x1c6089){_0x209490['push'](_0x209490['shift']());}}}(_0x5b79,0xea10a));import*as _0xb1b4c5 from'fs';import*as _0x11ae9c from'path';import*as _0x51cb73 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x11ae9c[_0x157323(0x188)](_0x51cb73[_0x157323(0x176)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function _0x5b79(){const _0x3aadf2=['12dmTLWS','DhNlY','AaUDz','CZaBV','umPRN','XUZAk','homedir','xDVlM','36ahvsrd','26215OdpEcd','readFileSync','lastEnabledSessionClearedAt','mtFvx','WhMJs','422972ZjjCpY','lpUDi','pipe','now','4zdQLES','VxvDk','zheWG','sessions','existsSync','ldcyi','join','6874750hMekHu','featureId','2652576hZyTeZ','lastPlanReminderAt','852203eALwym','branches','lastStopReminderAt','main','master','936555AZLLOB','Kbhec','1906062lCFuRF','MFQPP','registeredAt','JOQMx','currentBranch','RLwLG','fjxsH','48mEGtYz','enabled','300YXafqP','utf-8','zSpID','TCxPr','writeFileSync'];_0x5b79=function(){return _0x3aadf2;};return _0x5b79();}function loadCache(){const _0x3db2e0=_0x157323,_0x35eaa0={'Kbhec':'utf-8','JOQMx':function(_0x22bb44){return _0x22bb44();}};try{if(_0xb1b4c5[_0x3db2e0(0x186)](CACHE_FILE)){const _0x285f0b=JSON['parse'](_0xb1b4c5[_0x3db2e0(0x17a)](CACHE_FILE,_0x35eaa0[_0x3db2e0(0x161)]));return{'version':0x3,'sessions':_0x285f0b[_0x3db2e0(0x185)]||{},'branches':_0x285f0b[_0x3db2e0(0x18e)]||{},'lastEnabledSessionClearedAt':_0x285f0b[_0x3db2e0(0x17b)]};}}catch{}return _0x35eaa0[_0x3db2e0(0x165)](createEmptyCache);}function saveCache(_0x53275e){const _0x2bea19=_0x157323;try{const _0x1e6ea4=_0x11ae9c['dirname'](CACHE_FILE);!_0xb1b4c5['existsSync'](_0x1e6ea4)&&_0xb1b4c5['mkdirSync'](_0x1e6ea4,{'recursive':!![]}),_0xb1b4c5[_0x2bea19(0x16f)](CACHE_FILE,JSON['stringify'](_0x53275e,null,0x2));}catch{}}export function getCurrentBranch(){const _0x37a5a6=_0x157323,_0x93db83={'fjxsH':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','kUxEn':_0x37a5a6(0x16c),'TCxPr':_0x37a5a6(0x180),'PUMNX':'HEAD'};try{const _0x4e655b=execSync(_0x93db83[_0x37a5a6(0x168)],{'encoding':_0x93db83['kUxEn'],'stdio':[_0x93db83[_0x37a5a6(0x16e)],'pipe',_0x93db83['TCxPr']]})['trim']();if(!_0x4e655b||_0x4e655b===_0x93db83['PUMNX'])return null;return _0x4e655b;}catch{return null;}}export function enableBranch(_0xc39ca4){const _0x3ef32b={'kCdIC':function(_0x1d95bc){return _0x1d95bc();}},_0x526a66=_0x3ef32b['kCdIC'](loadCache);_0x526a66['branches'][_0xc39ca4]=!![],saveCache(_0x526a66);}export function disableBranch(_0x551775){const _0x25d5c4=loadCache();delete _0x25d5c4['branches'][_0x551775],saveCache(_0x25d5c4);}export function isBranchEnabled(_0x459f97){const _0x5bdaf3=_0x157323,_0x282917={'pRQFE':function(_0x34e325){return _0x34e325();},'lpUDi':function(_0x3f250c,_0x64e0e1){return _0x3f250c===_0x64e0e1;}},_0x386be4=_0x282917['pRQFE'](loadCache);return _0x282917[_0x5bdaf3(0x17f)](_0x386be4['branches'][_0x459f97],!![]);}function getOrCreateSession(_0x3be73b,_0x1a5e37){const _0x364217=_0x157323;return!_0x3be73b[_0x364217(0x185)][_0x1a5e37]&&(_0x3be73b['sessions'][_0x1a5e37]={}),_0x3be73b[_0x364217(0x185)][_0x1a5e37];}export function enableSession(_0x3938fd){const _0xce1087=_0x157323,_0x2fed7b={'XUZAk':function(_0x8d7eb3){return _0x8d7eb3();},'VZveT':function(_0x2d9fc5,_0x15002b,_0x159d8c){return _0x2d9fc5(_0x15002b,_0x159d8c);}},_0x33fdc7=_0x2fed7b[_0xce1087(0x175)](loadCache),_0xa5b297=_0x2fed7b['VZveT'](getOrCreateSession,_0x33fdc7,_0x3938fd);_0xa5b297[_0xce1087(0x16a)]=!![];const _0x261284=_0x2fed7b['XUZAk'](getCurrentBranch);_0x261284&&_0x261284!=='main'&&_0x261284!=='master'&&(_0x33fdc7[_0xce1087(0x18e)][_0x261284]=!![],_0xa5b297['currentBranch']=_0x261284),saveCache(_0x33fdc7);}export function isSessionEnabled(_0x262023){const _0x3aff57=_0x157323,_0x34b33f={'WhMJs':function(_0x1c4908){return _0x1c4908();},'CZaBV':function(_0x18e4fb,_0x7ff141){return _0x18e4fb===_0x7ff141;},'VxvDk':_0x3aff57(0x191)},_0x485b97=loadCache(),_0x54836d=_0x34b33f[_0x3aff57(0x17d)](getCurrentBranch);if(!_0x54836d||_0x34b33f[_0x3aff57(0x173)](_0x54836d,'main')||_0x34b33f['CZaBV'](_0x54836d,_0x34b33f[_0x3aff57(0x183)]))return _0x34b33f[_0x3aff57(0x173)](_0x485b97[_0x3aff57(0x185)][_0x262023]?.['enabled'],!![]);const _0x45c7ab=_0x485b97['branches'][_0x54836d]===!![],_0x4e4852=_0x485b97[_0x3aff57(0x185)][_0x262023]?.['enabled']===!![];return _0x45c7ab||_0x4e4852;}export function disableSession(_0x400430){const _0x4d24ec=_0x157323,_0x1b0041={'umPRN':function(_0x52fe2c){return _0x52fe2c();},'jaPwC':function(_0x14528f,_0xc7b1bc,_0x40947e){return _0x14528f(_0xc7b1bc,_0x40947e);}},_0x34f0af=_0x1b0041[_0x4d24ec(0x174)](loadCache),_0x3f8f89=_0x1b0041['jaPwC'](getOrCreateSession,_0x34f0af,_0x400430);_0x3f8f89['enabled']=![],saveCache(_0x34f0af);}export function updateBranchTracking(_0x4f777c){const _0x5b6615=_0x157323,_0x45896f={'ldcyi':function(_0x3a8448){return _0x3a8448();},'DhNlY':function(_0x102ebf,_0x48e161){return _0x102ebf===_0x48e161;}},_0x60b90f=loadCache(),_0x3fd000=_0x60b90f['sessions'][_0x4f777c];if(!_0x3fd000?.[_0x5b6615(0x16a)])return;const _0x244267=_0x45896f[_0x5b6615(0x187)](getCurrentBranch);if(!_0x244267||_0x45896f[_0x5b6615(0x171)](_0x244267,_0x5b6615(0x190))||_0x244267==='master')return;_0x3fd000[_0x5b6615(0x166)]!==_0x244267&&(_0x60b90f[_0x5b6615(0x18e)][_0x244267]=!![],_0x3fd000['currentBranch']=_0x244267,saveCache(_0x60b90f));}function _0x2d46(_0xd9990a,_0x170575){_0xd9990a=_0xd9990a-0x160;const _0x5b799a=_0x5b79();let _0x2d46bb=_0x5b799a[_0xd9990a];return _0x2d46bb;}export function initBranchTracking(_0x1e2f3e){const _0x3de50a=_0x157323,_0x4be22f={'ZttnY':function(_0x4da2a8){return _0x4da2a8();},'mtFvx':function(_0x1609b8){return _0x1609b8();},'RLwLG':function(_0x20351a,_0x3e2eb4){return _0x20351a===_0x3e2eb4;},'zheWG':'master','zSpID':function(_0x183812,_0x3e1e71,_0x1ccdc3){return _0x183812(_0x3e1e71,_0x1ccdc3);}},_0x44b517=_0x4be22f['ZttnY'](loadCache),_0x26d711=_0x4be22f[_0x3de50a(0x17c)](getCurrentBranch);if(!_0x26d711||_0x4be22f[_0x3de50a(0x167)](_0x26d711,_0x3de50a(0x190))||_0x26d711===_0x4be22f[_0x3de50a(0x184)])return;if(_0x44b517['branches'][_0x26d711]===!![]){const _0x272b92=_0x4be22f[_0x3de50a(0x16d)](getOrCreateSession,_0x44b517,_0x1e2f3e);_0x272b92['enabled']=!![],_0x272b92['currentBranch']=_0x26d711,saveCache(_0x44b517);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x3fc3a5){const _0x184e44=_0x157323,_0x5a16dd=loadCache(),_0x2e32c9=_0x5a16dd['sessions'][_0x3fc3a5];_0x2e32c9?.[_0x184e44(0x16a)]&&(_0x5a16dd[_0x184e44(0x17b)]=Date['now'](),saveCache(_0x5a16dd));}export function shouldAutoEnableAfterClear(_0x5a76f4){const _0x21400c={'zgLZc':function(_0x1bf072,_0x377578){return _0x1bf072!==_0x377578;},'pxFcs':function(_0x17e681){return _0x17e681();},'RsCPH':function(_0x8818e9,_0x4e23f6){return _0x8818e9-_0x4e23f6;},'AkHOg':function(_0x57ba88,_0x2e8ec5){return _0x57ba88<=_0x2e8ec5;}};if(_0x21400c['zgLZc'](_0x5a76f4,'clear'))return![];const _0x26583a=_0x21400c['pxFcs'](loadCache),_0x6c8bff=_0x26583a['lastEnabledSessionClearedAt'];if(!_0x6c8bff)return![];const _0x37326e=_0x21400c['RsCPH'](Date['now'](),_0x6c8bff);return _0x21400c['AkHOg'](_0x37326e,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x4757de){const _0x174f3c=_0x157323,_0x218015={'lXJod':function(_0x18f72a){return _0x18f72a();},'AlSEh':function(_0x3afeac,_0x4a0bea){return _0x3afeac(_0x4a0bea);}},_0x569eac=loadCache(),_0x1bf6ef=getOrCreateSession(_0x569eac,_0x4757de);_0x1bf6ef[_0x174f3c(0x16a)]=!![];const _0xd9116c=_0x218015['lXJod'](getCurrentBranch);_0xd9116c&&_0xd9116c!==_0x174f3c(0x190)&&_0xd9116c!==_0x174f3c(0x191)&&(_0x1bf6ef[_0x174f3c(0x166)]=_0xd9116c),delete _0x569eac['lastEnabledSessionClearedAt'],_0x218015['AlSEh'](saveCache,_0x569eac);}export function registerSession(_0xc39a1e,_0x37430c){const _0x2e011e=_0x157323,_0x5b1462=loadCache(),_0x1894f7=getOrCreateSession(_0x5b1462,_0xc39a1e);_0x1894f7[_0x2e011e(0x18a)]=_0x37430c,_0x1894f7['registeredAt']=new Date()['toISOString'](),saveCache(_0x5b1462);}export function getSessionEntry(_0x2d254c){const _0x500184=_0x157323,_0x52d32f=loadCache(),_0x48c7e9=_0x52d32f['sessions'][_0x2d254c];if(_0x48c7e9?.[_0x500184(0x18a)]&&_0x48c7e9?.['registeredAt'])return{'featureId':_0x48c7e9['featureId'],'registeredAt':_0x48c7e9[_0x500184(0x164)]};return null;}export function unregisterSession(_0x22a35){const _0x31c87d=_0x157323,_0x9b7100={'AaUDz':function(_0x50c379){return _0x50c379();},'MFQPP':function(_0xc27c16,_0xd97420){return _0xc27c16(_0xd97420);}},_0x4ad644=_0x9b7100[_0x31c87d(0x172)](loadCache),_0x259f47=_0x4ad644[_0x31c87d(0x185)][_0x22a35];_0x259f47&&(delete _0x259f47[_0x31c87d(0x18a)],delete _0x259f47[_0x31c87d(0x164)],_0x9b7100[_0x31c87d(0x163)](saveCache,_0x4ad644));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x5cf045){const _0x150f6c=_0x157323,_0x33476b=loadCache(),_0x26daf2=getOrCreateSession(_0x33476b,_0x5cf045),_0x418821=_0x26daf2[_0x150f6c(0x18c)]||0x0,_0x28efbc=Date['now']();if(_0x28efbc-_0x418821>=PLAN_REMINDER_INTERVAL_MS)return _0x26daf2['lastPlanReminderAt']=_0x28efbc,saveCache(_0x33476b),!![];return![];}export function shouldShowStopReminder(_0x5ee7fd){const _0x4fb446=_0x157323,_0x48004d={'usnTa':function(_0xc1e4ac,_0x46cce3){return _0xc1e4ac>=_0x46cce3;},'EQLOb':function(_0x35b65a,_0x2bc5bf){return _0x35b65a-_0x2bc5bf;}},_0x18b127=loadCache(),_0x526e3b=getOrCreateSession(_0x18b127,_0x5ee7fd),_0x4ce3b1=_0x526e3b[_0x4fb446(0x18f)]||0x0,_0x176c58=Date[_0x4fb446(0x181)]();if(_0x48004d['usnTa'](_0x48004d['EQLOb'](_0x176c58,_0x4ce3b1),STOP_REMINDER_INTERVAL_MS))return _0x526e3b[_0x4fb446(0x18f)]=_0x176c58,saveCache(_0x18b127),!![];return![];}export function hasSessionBeenPrompted(_0x4efe1a){const _0x2b375d=_0x157323,_0x328377={'OiVOz':function(_0xe70c23,_0x3659de){return _0xe70c23===_0x3659de;}},_0x1740f1=loadCache();return _0x328377['OiVOz'](_0x1740f1[_0x2b375d(0x185)][_0x4efe1a]?.['prompted'],!![]);}export function markSessionPrompted(_0x3f8b1f){const _0x23eb8d=_0x157323,_0x2e99b2={'dzbXF':function(_0x2cb800){return _0x2cb800();},'xDVlM':function(_0x25e4fd,_0x3bf2fc,_0x3a96d8){return _0x25e4fd(_0x3bf2fc,_0x3a96d8);}},_0x54d7a3=_0x2e99b2['dzbXF'](loadCache),_0x23be21=_0x2e99b2[_0x23eb8d(0x177)](getOrCreateSession,_0x54d7a3,_0x3f8b1f);_0x23be21['prompted']=!![],saveCache(_0x54d7a3);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e41dc=_0xf36b;(function(_0x4aa686,_0x12b14c){const _0x580098=_0xf36b,_0x40a9ce=_0x4aa686();while(!![]){try{const _0xf5f462=-parseInt(_0x580098(0x14d))/0x1+parseInt(_0x580098(0x13e))/0x2+parseInt(_0x580098(0x138))/0x3+-parseInt(_0x580098(0x1a3))/0x4*(parseInt(_0x580098(0x1a0))/0x5)+parseInt(_0x580098(0x17d))/0x6+parseInt(_0x580098(0x186))/0x7+parseInt(_0x580098(0x17c))/0x8*(-parseInt(_0x580098(0x1a4))/0x9);if(_0xf5f462===_0x12b14c)break;else _0x40a9ce['push'](_0x40a9ce['shift']());}catch(_0x54f7c9){_0x40a9ce['push'](_0x40a9ce['shift']());}}}(_0x1e73,0xc95f5));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(_0x2eb22b,_0x555f01){const _0x2b5f0e=_0xf36b,_0x4d2789={'nMACA':function(_0x343df9,_0xc1dfca,_0x434ceb,_0xea9e35){return _0x343df9(_0xc1dfca,_0x434ceb,_0xea9e35);},'FnFuD':function(_0x553e82,_0x15cf23,_0x2197ea){return _0x553e82(_0x15cf23,_0x2197ea);},'UMDIG':_0x2b5f0e(0x176),'ZTapj':function(_0x89f498,_0x4d3452){return _0x89f498(_0x4d3452);},'OhcfK':function(_0x530f35,_0x5b1ae1){return _0x530f35!==_0x5b1ae1;},'CokmB':function(_0x5cd741,_0x3f52b0){return _0x5cd741(_0x3f52b0);}},_0x1bbf5a=_0x4d2789[_0x2b5f0e(0x130)](join,_0x555f01,'ci',_0x2eb22b),_0x524482=join(_0x555f01,'local',_0x2eb22b),_0x24ad24=_0x4d2789[_0x2b5f0e(0x139)](join,_0x555f01,_0x2eb22b),_0x3b2545=join(_0x555f01,_0x4d2789['UMDIG']),_0xe5db3=_0x4d2789['FnFuD'](join,_0x555f01,'ci');if(_0x4d2789[_0x2b5f0e(0x152)](existsSync,_0x1bbf5a))return _0x1bbf5a;if(existsSync(_0x524482))return _0x524482;if(existsSync(_0x24ad24)&&(_0x4d2789[_0x2b5f0e(0x162)](_0x24ad24,_0x3b2545)&&_0x24ad24!==_0xe5db3?!![]:_0x4d2789[_0x2b5f0e(0x164)](hasLegacyProfileFiles,_0x24ad24)))return _0x24ad24;return null;}export function getEnvDir(_0x3e592b,_0x57cb6a={}){const _0x3ea31c=_0xf36b,_0x258493={'eOPWo':function(_0x4f1c78){return _0x4f1c78();},'gQRGt':function(_0x21c93a,_0x4fce0d,_0x93fb0a){return _0x21c93a(_0x4fce0d,_0x93fb0a);},'rqfYL':function(_0x3f407c,_0x49b6f1){return _0x3f407c(_0x49b6f1);},'PSuar':function(_0x1b91d3,_0xa4900e,_0x1b3af6,_0x54632c){return _0x1b91d3(_0xa4900e,_0x1b3af6,_0x54632c);}},_0x14cd2a=_0x258493[_0x3ea31c(0x183)](getRangerDir),_0x569878=_0x258493[_0x3ea31c(0x14f)](findEnvInRoot,_0x3e592b,_0x14cd2a);if(_0x569878){if(_0x57cb6a['forWrite']&&_0x258493['rqfYL'](isLegacyEnvPath,_0x569878))throw _0x258493['gQRGt'](legacyWriteError,_0x3e592b,_0x569878);return _0x569878;}const _0x4c6587=getRangerHomeDir();if(_0x4c6587!==_0x14cd2a){const _0x4d86f8=_0x258493[_0x3ea31c(0x14f)](findEnvInRoot,_0x3e592b,_0x4c6587);if(_0x4d86f8){if(_0x57cb6a[_0x3ea31c(0x13b)]&&isLegacyEnvPath(_0x4d86f8))throw legacyWriteError(_0x3e592b,_0x4d86f8);return _0x4d86f8;}}const _0x2905bb=_0x258493['PSuar'](join,_0x4c6587,_0x3ea31c(0x176),_0x3e592b);if(_0x57cb6a['forWrite'])throw legacyWriteError(_0x3e592b,_0x2905bb);return _0x2905bb;}function isLegacyEnvPath(_0x5e5ae0){const _0x518d10={'fZLwk':function(_0x34ca56){return _0x34ca56();}},_0x3619d1=getRangerDir(),_0x56f026=_0x518d10['fZLwk'](getRangerHomeDir);for(const _0x14f80f of new Set([_0x3619d1,_0x56f026])){const _0x20fb6f=_0x14f80f['endsWith']('/')?_0x14f80f:_0x14f80f+'/';if(_0x5e5ae0===_0x14f80f||_0x5e5ae0['startsWith'](_0x20fb6f))return!![];}return![];}function legacyWriteError(_0x5af9bd,_0xd805a9){const _0x33e678=_0xf36b,_0x5268a4={'wSkIK':function(_0x28791a,_0x16315d){return _0x28791a+_0x16315d;}};return new Error(_0x5268a4[_0x33e678(0x146)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x5af9bd+'\x22\x20to\x20legacy\x20path\x20'+_0xd805a9+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x33e678(0x15d),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x2a0f48,_0x1be7e2){const _0x3b6678=_0xf36b,_0x3288cd={'IgHaf':function(_0x5378c5){return _0x5378c5();},'QZxPp':'local','PmttR':function(_0x3b0469,_0x4a88df,_0x5d233d){return _0x3b0469(_0x4a88df,_0x5d233d);},'MdwdD':'legacy','RNBgO':function(_0x1ea360,_0x3d6fab){return _0x1ea360===_0x3d6fab;},'dGGHK':function(_0x5c1de8,_0x3444af){return _0x5c1de8(_0x3444af);}},_0x3e3f46=_0x1be7e2?.[_0x3b6678(0x193)],_0x4be4d2=_0x3e3f46?[_0x3e3f46]:[_0x3288cd['IgHaf'](getRangerDir),getRangerHomeDir()]['filter']((_0x7b51f9,_0x5116cb,_0x221a2a)=>_0x221a2a[_0x3b6678(0x1a9)](_0x7b51f9)===_0x5116cb),_0x589900=_0x1be7e2?.[_0x3b6678(0x188)]??['ci',_0x3288cd['QZxPp'],_0x3b6678(0x15b)];for(const _0x2bfbb5 of _0x4be4d2){const _0x470715=_0x3288cd['PmttR'](join,_0x2bfbb5,_0x3288cd[_0x3b6678(0x174)]),_0x2833d6=join(_0x2bfbb5,'ci'),_0x58075a=[{'location':'ci','path':join(_0x2bfbb5,'ci',_0x2a0f48)},{'location':_0x3288cd['QZxPp'],'path':join(_0x2bfbb5,_0x3288cd[_0x3b6678(0x174)],_0x2a0f48)},{'location':_0x3288cd['MdwdD'],'path':join(_0x2bfbb5,_0x2a0f48)}];for(const _0xf9ea98 of _0x58075a){if(_0x589900['includes'](_0xf9ea98[_0x3b6678(0x15c)])&&existsSync(_0xf9ea98[_0x3b6678(0x150)])){if(_0x3288cd['RNBgO'](_0xf9ea98['location'],'legacy')&&(_0xf9ea98[_0x3b6678(0x150)]===_0x470715||_0xf9ea98[_0x3b6678(0x150)]===_0x2833d6)&&!_0x3288cd['dGGHK'](hasLegacyProfileFiles,_0xf9ea98[_0x3b6678(0x150)]))continue;return{'path':_0xf9ea98[_0x3b6678(0x150)],'location':_0xf9ea98['location']};}}}return null;}function hasLegacyProfileFiles(_0x2b12fc){const _0x1da45c=_0xf36b,_0x40d6b1={'llkoe':'settings.json','KVGtc':function(_0x17cf38,_0x158f79){return _0x17cf38(_0x158f79);},'tlmac':function(_0x214cc0,_0x4d36d7,_0x23c639){return _0x214cc0(_0x4d36d7,_0x23c639);},'WKTDs':_0x1da45c(0x171),'ovatz':function(_0x5dea1c,_0x370b5a){return _0x5dea1c(_0x370b5a);}};return existsSync(join(_0x2b12fc,_0x40d6b1['llkoe']))||_0x40d6b1['KVGtc'](existsSync,_0x40d6b1['tlmac'](join,_0x2b12fc,_0x40d6b1['WKTDs']))||_0x40d6b1['ovatz'](existsSync,join(_0x2b12fc,_0x1da45c(0x19d)));}export function isEnvCi(_0x25b0ee){const _0xa838f9=_0xf36b,_0x431cfa={'CPXaF':function(_0x5e65d8,_0x2aefaa){return _0x5e65d8(_0x2aefaa);},'CRHpv':function(_0x4ea39f,_0x4c29a1,_0x1e8d34,_0x37b461){return _0x4ea39f(_0x4c29a1,_0x1e8d34,_0x37b461);},'kYcka':function(_0x4f9b8e){return _0x4f9b8e();},'REiWa':function(_0x64b60c){return _0x64b60c();},'JNYpu':function(_0x1fa1c8,_0x2b7a28){return _0x1fa1c8!==_0x2b7a28;}};if(_0x431cfa[_0xa838f9(0x195)](existsSync,_0x431cfa['CRHpv'](join,_0x431cfa['kYcka'](getRangerDir),'ci',_0x25b0ee)))return!![];const _0x3b5617=_0x431cfa[_0xa838f9(0x169)](getRangerHomeDir);if(_0x431cfa[_0xa838f9(0x18c)](_0x3b5617,_0x431cfa[_0xa838f9(0x169)](getRangerDir))&&existsSync(join(_0x3b5617,'ci',_0x25b0ee)))return!![];return![];}export async function cleanupTempFiles(_0x297376){const _0x2b03d9=_0xf36b,_0x5715a6={'sfuxt':'ENOENT'},_0x39e564=[_0x297376['tempAuthPath'],_0x297376['configPath']]['filter'](Boolean);await Promise[_0x2b03d9(0x1a2)](_0x39e564['map'](_0x69e220=>unlink(_0x69e220)['catch'](_0x18fc09=>{const _0x3d9c37=_0x2b03d9;_0x18fc09[_0x3d9c37(0x13d)]!==_0x5715a6['sfuxt']&&console['warn'](_0x3d9c37(0x187)+_0x69e220+':',_0x18fc09['message']);})));}export function getSettingsPath(_0xe00564){const _0x451942=_0xf36b,_0x5ef301={'jplSN':function(_0x3d5a56,_0x1c9206,_0x49fba9){return _0x3d5a56(_0x1c9206,_0x49fba9);},'ajsAU':function(_0x5e9869,_0x149ada){return _0x5e9869(_0x149ada);}};return _0x5ef301[_0x451942(0x18d)](join,_0x5ef301['ajsAU'](getEnvDir,_0xe00564),'settings.json');}export async function loadSettings(_0x323375){const _0x5d5195=_0xf36b,_0x3077a6={'GoVfq':function(_0x4210f9,_0x5244c3){return _0x4210f9(_0x5244c3);}},_0x27f0a9=getSettingsPath(_0x323375);if(!_0x3077a6[_0x5d5195(0x14a)](existsSync,_0x27f0a9))return{};try{const _0x190588=await readFile(_0x27f0a9,'utf-8');return JSON['parse'](_0x190588);}catch{return{};}}export async function saveSettings(_0x2e779d,_0x30b32f){const _0xe9cb06=_0xf36b,_0x4d99fe={'LVwXO':function(_0x3ef38a,_0x315db6){return _0x3ef38a(_0x315db6);},'GohAC':function(_0xa81e17,_0x25ddb4,_0x13067f){return _0xa81e17(_0x25ddb4,_0x13067f);}},_0x170a96=getSettingsPath(_0x2e779d),_0x14c95e=dirname(_0x170a96);!_0x4d99fe[_0xe9cb06(0x182)](existsSync,_0x14c95e)&&await mkdir(_0x14c95e,{'recursive':!![]}),await _0x4d99fe['GohAC'](writeFile,_0x170a96,JSON[_0xe9cb06(0x15a)](_0x30b32f,null,0x2));}export function resolveEnvVars(_0x227bcb){const _0x3c999e=_0xf36b,_0x5314e6={'UPFrb':'string','huqkV':_0x3c999e(0x154)};if(typeof _0x227bcb===_0x5314e6[_0x3c999e(0x145)])return _0x227bcb[_0x3c999e(0x156)](/\$\{(\w+)\}/g,(_0x565399,_0x4d5e34)=>{const _0x2b0a6f=_0x3c999e,_0x5962d8=process[_0x2b0a6f(0x18e)][_0x4d5e34];if(_0x5962d8===undefined)throw new Error(_0x2b0a6f(0x19e)+_0x4d5e34+_0x2b0a6f(0x1a5));return _0x5962d8;});if(Array['isArray'](_0x227bcb))return _0x227bcb['map'](resolveEnvVars);if(_0x227bcb&&typeof _0x227bcb===_0x5314e6[_0x3c999e(0x143)])return Object[_0x3c999e(0x135)](Object['entries'](_0x227bcb)[_0x3c999e(0x19b)](([_0x199f1b,_0x4f52cc])=>[_0x199f1b,resolveEnvVars(_0x4f52cc)]));return _0x227bcb;}function _0xf36b(_0x48e90f,_0x2f98f1){_0x48e90f=_0x48e90f-0x12f;const _0x1e73e7=_0x1e73();let _0xf36b06=_0x1e73e7[_0x48e90f];return _0xf36b06;}const isRecord=_0x37c53e=>typeof _0x37c53e==='object'&&_0x37c53e!==null&&!Array[_0x4e41dc(0x192)](_0x37c53e),asRecord=_0x5db2c0=>isRecord(_0x5db2c0)?_0x5db2c0:undefined,mergeHeaders=(_0x3faaea,_0x5900a0)=>{const _0x55b995=_0x4e41dc,_0x2d7404={'kGuVW':function(_0x3b2058,_0x214996){return _0x3b2058??_0x214996;}},_0x1dcd14={..._0x3faaea??{},..._0x2d7404['kGuVW'](_0x5900a0,{})};return Object['keys'](_0x1dcd14)[_0x55b995(0x140)]?_0x1dcd14:undefined;},SAFE_MODE_ARGS=[_0x4e41dc(0x15e)],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x4e41dc(0x19a),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x4e41dc(0x131)];export function buildBrowserOptionsFromSettings(_0xed0c19,_0x3970a4={}){const _0x49e896=_0x4e41dc,_0x273aad={'VVWTp':function(_0x52b7cb,_0x32b457){return _0x52b7cb===_0x32b457;},'NRPMb':'boolean','bazZT':function(_0x542b92,_0x4a9373){return _0x542b92===_0x4a9373;},'cxMrc':'string'},_0x5e023f=asRecord(_0xed0c19['browser']),_0x2c0b32={...asRecord(_0x5e023f?.['launchOptions'])??{}};_0x273aad['VVWTp'](typeof _0x3970a4['headless'],_0x273aad[_0x49e896(0x19c)])&&(_0x2c0b32[_0x49e896(0x13c)]=_0x3970a4['headless']);if(_0xed0c19[_0x49e896(0x136)]){const _0x231ea8=_0x2c0b32[_0x49e896(0x1a1)]??[],_0x316bf9=SAFE_MODE_ARGS[_0x49e896(0x191)](_0x358bc6=>!_0x231ea8[_0x49e896(0x151)](_0x358bc6));_0x2c0b32[_0x49e896(0x1a1)]=[..._0x231ea8,..._0x316bf9];}if(_0xed0c19[_0x49e896(0x134)]){const _0x38e1c8=_0x2c0b32['args']??[],_0x451bd6=ALLOW_LOCALHOST_ARGS[_0x49e896(0x191)](_0x2e60c8=>!_0x38e1c8['includes'](_0x2e60c8));_0x2c0b32[_0x49e896(0x1a1)]=[..._0x38e1c8,..._0x451bd6];}const _0x5469e2={...asRecord(_0x5e023f?.[_0x49e896(0x1a7)])??{}};_0x5469e2[_0x49e896(0x1aa)]=!![];_0x273aad[_0x49e896(0x159)](typeof _0xed0c19['userAgent'],_0x273aad['cxMrc'])&&(_0x5469e2[_0x49e896(0x19f)]=_0xed0c19['userAgent']);const _0x32bddb=mergeHeaders(asRecord(_0x5469e2[_0x49e896(0x199)]),asRecord(_0xed0c19['headers']));return _0x32bddb?_0x5469e2['extraHTTPHeaders']=_0x32bddb:delete _0x5469e2['extraHTTPHeaders'],_0x3970a4['storageStatePath']&&(_0x5469e2[_0x49e896(0x173)]=_0x3970a4['storageStatePath']),{'launchOptions':_0x2c0b32,'contextOptions':_0x5469e2};}export async function resolveProfileStorageState(_0x39d140){const _0x3b21d7={'fihPz':function(_0x34562e,_0x5e4fcf){return _0x34562e(_0x5e4fcf);}};return resolveLocalAuthPath(_0x3b21d7['fihPz'](getEnvDir,_0x39d140));}async function resolveLocalAuthPath(_0x114043){const _0x13bee4=_0x4e41dc,_0x32f0da={'EKjQc':_0x13bee4(0x19d),'DsXXT':function(_0xc92548,_0x2b4b82,_0x23a704){return _0xc92548(_0x2b4b82,_0x23a704);},'kuTSU':function(_0xf08aca,_0x38ba52){return _0xf08aca(_0x38ba52);},'PmIsv':_0x13bee4(0x13a),'bMvcB':function(_0x19a8d9,_0xaaea7,_0x56d687){return _0x19a8d9(_0xaaea7,_0x56d687);}},_0x1a0fc8=join(_0x114043,_0x32f0da[_0x13bee4(0x132)]),_0x21a3db=_0x32f0da[_0x13bee4(0x15f)](join,_0x114043,'auth.json');if(_0x32f0da[_0x13bee4(0x17e)](existsSync,_0x1a0fc8))try{const _0x167778=await getToken();if(!_0x167778)throw new Error(_0x32f0da[_0x13bee4(0x181)]);const _0x258e5c=await readFile(_0x1a0fc8),_0x42dbb2=_0x32f0da['bMvcB'](decrypt,_0x258e5c,_0x167778),_0x59193b=_0x32f0da[_0x13bee4(0x15f)](join,tmpdir(),'ranger-auth-'+Date[_0x13bee4(0x144)]()+_0x13bee4(0x184));return await writeFile(_0x59193b,_0x42dbb2),{'storageStatePath':_0x59193b,'tempAuthPath':_0x59193b};}catch(_0x43b4b7){const _0x10002a=_0x43b4b7 instanceof Error?_0x43b4b7[_0x13bee4(0x16b)]:String(_0x43b4b7);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x10002a);}if(_0x32f0da[_0x13bee4(0x17e)](existsSync,_0x21a3db))return{'storageStatePath':_0x21a3db};return{};}export async function buildPlaywrightConfig(_0x52162c,_0x215428,_0x239e57,_0x9639b0,_0x14781d){const _0x1115ff=_0x4e41dc,_0x304d7f={'nPORt':_0x1115ff(0x141)};if(_0x14781d)return buildPlaywrightConfigCore(_0x52162c,_0x14781d,_0x215428,_0x239e57,_0x9639b0,_0x304d7f[_0x1115ff(0x18b)]);const {storageStatePath:_0x237fd3,tempAuthPath:_0x5927f6}=await resolveLocalAuthPath(getEnvDir(_0x215428));try{const _0x45a8fc=await buildPlaywrightConfigCore(_0x52162c,_0x237fd3,_0x215428,_0x239e57,_0x9639b0,_0x304d7f['nPORt']);return{..._0x45a8fc,'tempAuthPath':_0x5927f6};}catch(_0x21acc9){_0x5927f6&&await unlink(_0x5927f6)[_0x1115ff(0x14e)](()=>{});throw _0x21acc9;}}export async function buildPlaywrightConfigCore(_0x8f9cc3,_0x32a749,_0xea7395,_0x3264c5,_0x4939b5,_0x352676='stagehand'){const _0x1cf5ae=_0x4e41dc,_0x2bbe1a={'qGtou':function(_0xaa7b75,_0x4284ab){return _0xaa7b75===_0x4284ab;},'bkTxW':'chromium','osaNM':'clipboard-read','Gshan':_0x1cf5ae(0x165),'MYHSo':function(_0x4b1054){return _0x4b1054();},'FuskP':function(_0x13b45f,_0x9ec54c,_0x5cd000,_0x4358e1){return _0x13b45f(_0x9ec54c,_0x5cd000,_0x4358e1);},'IYypm':function(_0x4dd4a3){return _0x4dd4a3();},'FvyZK':_0x1cf5ae(0x16a),'uRTSM':_0x1cf5ae(0x14b),'fvdKM':_0x1cf5ae(0x198),'wXFZK':'install','UdLMC':'pdf','NnGWQ':function(_0x802d2d){return _0x802d2d();},'iyhVr':'ranger-config','bvcyU':function(_0x3397d0,_0x525e3b){return _0x3397d0(_0x525e3b);},'khmqU':function(_0x2e6f4b,_0xdbf4fe,_0x541c26){return _0x2e6f4b(_0xdbf4fe,_0x541c26);},'SUrTg':'playwright-cli','VQoVI':'-cli','SBhXX':function(_0xa818c8,_0x4b4073,_0x3066ff){return _0xa818c8(_0x4b4073,_0x3066ff);}},_0x939180=_0x3264c5||_0x2bbe1a['MYHSo'](randomUUID),_0x7137a9=_0x2bbe1a[_0x1cf5ae(0x161)](join,_0x2bbe1a[_0x1cf5ae(0x185)](getRangerDir),'sessions',_0x939180),_0x11fe45=Boolean(_0x8f9cc3[_0x1cf5ae(0x177)]),_0x21b153=_0x11fe45?{'browserName':'chromium','cdpEndpoint':_0x8f9cc3[_0x1cf5ae(0x177)]}:((()=>{const _0x832a2c=_0x1cf5ae,{launchOptions:_0x21d55b,contextOptions:_0x2c0b15}=buildBrowserOptionsFromSettings(_0x8f9cc3,{'headless':_0x4939b5?![]:_0x8f9cc3[_0x832a2c(0x13c)]??!![],'storageStatePath':_0x32a749});if(_0x2bbe1a['qGtou'](process[_0x832a2c(0x147)]?.(),0x0)){const _0x131218=[_0x832a2c(0x157),'--disable-setuid-sandbox'],_0x2c5102=_0x21d55b['args']??[],_0x133949=_0x131218[_0x832a2c(0x191)](_0x4fae46=>!_0x2c5102[_0x832a2c(0x151)](_0x4fae46));_0x21d55b[_0x832a2c(0x1a1)]=[..._0x2c5102,..._0x133949];}return{'isolated':!![],'browserName':_0x2bbe1a[_0x832a2c(0x160)],'launchOptions':_0x21d55b,'contextOptions':{..._0x2c0b15,'permissions':[_0x2bbe1a['osaNM'],_0x2bbe1a['Gshan']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x5a37a6=_0x2bbe1a[_0x1cf5ae(0x148)](_0x352676,_0x1cf5ae(0x16e))?{'browser':_0x21b153,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x7137a9,'outputMode':_0x2bbe1a['FvyZK'],'codegen':'none'}:{'name':_0xea7395,'browser':_0x21b153,'capabilities':[_0x2bbe1a[_0x1cf5ae(0x149)],_0x2bbe1a[_0x1cf5ae(0x137)],_0x2bbe1a['wXFZK'],_0x2bbe1a['UdLMC'],'vision'],'imageResponses':_0x1cf5ae(0x158),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x7137a9};if(!_0x11fe45){const _0x5a553f=_0x5a37a6[_0x1cf5ae(0x142)],_0x3d323f=_0x5a553f[_0x1cf5ae(0x1a7)];if(_0x2bbe1a['qGtou'](_0x3d323f[_0x1cf5ae(0x19f)],undefined))delete _0x3d323f[_0x1cf5ae(0x19f)];if(_0x3d323f[_0x1cf5ae(0x173)]===undefined)delete _0x3d323f['storageState'];}const _0x2668c3=join(_0x2bbe1a['NnGWQ'](tmpdir),_0x2bbe1a['iyhVr']);!_0x2bbe1a['bvcyU'](existsSync,_0x2668c3)&&await _0x2bbe1a[_0x1cf5ae(0x197)](mkdir,_0x2668c3,{'recursive':!![]});const _0x5f2068=_0x2bbe1a['qGtou'](_0x352676,_0x2bbe1a['SUrTg'])?_0x2bbe1a[_0x1cf5ae(0x170)]:'',_0x48f2eb=_0x2bbe1a['SBhXX'](join,_0x2668c3,_0xea7395+'-'+Date[_0x1cf5ae(0x144)]()+_0x5f2068+_0x1cf5ae(0x184));return await _0x2bbe1a['khmqU'](writeFile,_0x48f2eb,JSON['stringify'](_0x5a37a6,null,0x2)),{'configPath':_0x48f2eb,'storageStatePath':_0x32a749};}export async function buildPlaywrightCliConfig(_0x2e11db,_0x4027ca,_0xf22f4e,_0xd5bbc2,_0x3d0f6e){const _0x5a9f93=_0x4e41dc,_0x5b27e5={'vONfo':function(_0x590c51,_0x5e106e,_0x4ff954,_0x3c1d4e,_0x138332,_0x38b80c,_0x44f031){return _0x590c51(_0x5e106e,_0x4ff954,_0x3c1d4e,_0x138332,_0x38b80c,_0x44f031);},'REnba':function(_0x1660df,_0x1d45d3,_0x5a27d6,_0x51b540,_0x1cb802,_0x32a651,_0x55e3cf){return _0x1660df(_0x1d45d3,_0x5a27d6,_0x51b540,_0x1cb802,_0x32a651,_0x55e3cf);},'HAxUY':_0x5a9f93(0x16e),'grnUa':function(_0x2592ea,_0x5d920d){return _0x2592ea(_0x5d920d);}};if(_0x3d0f6e)return _0x5b27e5['vONfo'](buildPlaywrightConfigCore,_0x2e11db,_0x3d0f6e,_0x4027ca,_0xf22f4e,_0xd5bbc2,'playwright-cli');const {storageStatePath:_0x4106fb,tempAuthPath:_0xb0528d}=await resolveLocalAuthPath(getEnvDir(_0x4027ca));try{const _0x5a91c9=await _0x5b27e5['REnba'](buildPlaywrightConfigCore,_0x2e11db,_0x4106fb,_0x4027ca,_0xf22f4e,_0xd5bbc2,_0x5b27e5[_0x5a9f93(0x18f)]);return{..._0x5a91c9,'tempAuthPath':_0xb0528d};}catch(_0x233fdb){_0xb0528d&&await _0x5b27e5['grnUa'](unlink,_0xb0528d)['catch'](()=>{});throw _0x233fdb;}}export async function buildRangerwrightCliConfig(_0x5c65d5,_0x10746a,_0x3aa163,_0x175a1d,_0x7a7da1){const _0x178b2b=_0x4e41dc,_0x56d234={'HvKDP':function(_0x2b5b84,_0x3312e4){return _0x2b5b84===_0x3312e4;},'dftxb':'chromium','FHiGK':_0x178b2b(0x133),'uAoeT':'clipboard-write','rICWH':function(_0x1209d5,_0x50a94c){return _0x1209d5(_0x50a94c);},'JAdlL':function(_0x4ad44d){return _0x4ad44d();},'igOtp':function(_0x3ff21f,_0x34f934,_0x20257c,_0x44aaa8){return _0x3ff21f(_0x34f934,_0x20257c,_0x44aaa8);},'ZiRjk':function(_0x352907){return _0x352907();},'VDZzc':'sessions','BIywy':function(_0x1991a8,_0x5dc6b3){return _0x1991a8(_0x5dc6b3);},'Jfnde':function(_0x594c0c,_0x7a93b8){return _0x594c0c===_0x7a93b8;},'KLWkA':function(_0x485391,_0x56036c,_0x2517a2){return _0x485391(_0x56036c,_0x2517a2);},'Dklbv':_0x178b2b(0x166),'cAHLX':function(_0x26acd9,_0x1969c4,_0x508b29){return _0x26acd9(_0x1969c4,_0x508b29);},'AkHdg':function(_0x3967ca,_0x34a1e9,_0x3c8d71){return _0x3967ca(_0x34a1e9,_0x3c8d71);}},{storageStatePath:_0x45f003,tempAuthPath:_0x4f2e29}=_0x7a7da1?{'storageStatePath':_0x7a7da1,'tempAuthPath':undefined}:await _0x56d234[_0x178b2b(0x1a6)](resolveLocalAuthPath,_0x56d234['rICWH'](getEnvDir,_0x10746a)),_0x1dd8cb=_0x3aa163||_0x56d234['JAdlL'](randomUUID),_0x55f19c=_0x56d234['igOtp'](join,_0x56d234['ZiRjk'](getRangerDir),_0x56d234['VDZzc'],_0x1dd8cb),_0x24af6f=_0x56d234[_0x178b2b(0x17f)](Boolean,_0x5c65d5['cdpEndpoint']),_0x4d9b82=_0x24af6f?{'browserName':_0x56d234[_0x178b2b(0x13f)],'cdpEndpoint':_0x5c65d5[_0x178b2b(0x177)]}:((()=>{const _0x9c56af=_0x178b2b,{launchOptions:_0x4a3d1c,contextOptions:_0x27f5ca}=buildBrowserOptionsFromSettings(_0x5c65d5,{'headless':_0x175a1d?![]:_0x5c65d5[_0x9c56af(0x13c)]??!![],'storageStatePath':_0x45f003});if(_0x56d234['HvKDP'](process[_0x9c56af(0x147)]?.(),0x0)){const _0x53067b=[_0x9c56af(0x157),_0x9c56af(0x190)],_0x1623a3=_0x4a3d1c['args']??[],_0x1135e3=_0x53067b[_0x9c56af(0x191)](_0xf24bd6=>!_0x1623a3['includes'](_0xf24bd6));_0x4a3d1c[_0x9c56af(0x1a1)]=[..._0x1623a3,..._0x1135e3];}return{'browserName':_0x56d234[_0x9c56af(0x13f)],'launchOptions':_0x4a3d1c,'contextOptions':{..._0x27f5ca,'permissions':[_0x56d234[_0x9c56af(0x18a)],_0x56d234[_0x9c56af(0x16c)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x24af6f){const _0x5ea24f=_0x4d9b82[_0x178b2b(0x1a7)];if(_0x5ea24f){if(_0x5ea24f['userAgent']===undefined)delete _0x5ea24f['userAgent'];if(_0x56d234['Jfnde'](_0x5ea24f['storageState'],undefined))delete _0x5ea24f[_0x178b2b(0x173)];}}const _0x1cb292={'browser':_0x4d9b82,'outputDir':_0x55f19c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x13d815;try{const _0x17e6c3=_0x56d234['KLWkA'](join,tmpdir(),_0x56d234['Dklbv']);!existsSync(_0x17e6c3)&&await _0x56d234[_0x178b2b(0x14c)](mkdir,_0x17e6c3,{'recursive':!![]}),_0x13d815=_0x56d234['AkHdg'](join,_0x17e6c3,_0x10746a+'-'+Date[_0x178b2b(0x144)]()+_0x178b2b(0x189)),await writeFile(_0x13d815,JSON['stringify'](_0x1cb292,null,0x2));}catch(_0x1f14d0){_0x4f2e29&&await unlink(_0x4f2e29)['catch'](()=>{});throw _0x1f14d0;}return{'configPath':_0x13d815,'storageStatePath':_0x45f003,'tempAuthPath':_0x4f2e29,'outputDir':_0x55f19c};}export async function buildNovaActCliConfig(_0x4a3fdc,_0x329ad,_0x3c637a,_0x16017a,_0x4c0951){const _0x2da33b=_0x4e41dc,_0x33f036={'OITAQ':function(_0x4d8e6b,_0x3ddb54){return _0x4d8e6b(_0x3ddb54);},'Vrtvj':function(_0x2ffbb0,_0x48384a,_0x41eedf,_0x3a1d2a){return _0x2ffbb0(_0x48384a,_0x41eedf,_0x3a1d2a);},'xJmAs':function(_0x483468){return _0x483468();},'HongP':_0x2da33b(0x180),'tzqtQ':'nova-user-data','YhOXo':function(_0x97b15d,_0xa919f8,_0x2dbb42){return _0x97b15d(_0xa919f8,_0x2dbb42);},'BBVWT':function(_0x2a731f,_0x36e7f5){return _0x2a731f===_0x36e7f5;},'brSGQ':'--disable-setuid-sandbox'},{storageStatePath:_0x2a2de8,tempAuthPath:_0xf75c58}=_0x4c0951?{'storageStatePath':_0x4c0951,'tempAuthPath':undefined}:await _0x33f036['OITAQ'](resolveLocalAuthPath,getEnvDir(_0x329ad)),_0x43ddb5=_0x3c637a||randomUUID(),_0x5ea133=_0x33f036['Vrtvj'](join,_0x33f036['xJmAs'](getRangerDir),_0x33f036[_0x2da33b(0x153)],_0x43ddb5),_0x233dd4=join(_0x5ea133,_0x33f036[_0x2da33b(0x196)]),_0x5abdd2=_0x2a2de8?_0x33f036['YhOXo'](join,_0x233dd4,_0x2da33b(0x17a)):undefined,{launchOptions:_0x4184e3,contextOptions:_0x540ee7}=_0x33f036['YhOXo'](buildBrowserOptionsFromSettings,_0x4a3fdc,{'headless':_0x16017a?![]:_0x4a3fdc['headless']??!![],'storageStatePath':_0x2a2de8});if(_0x33f036[_0x2da33b(0x1a8)](process[_0x2da33b(0x147)]?.(),0x0)){const _0x53e68e=[_0x2da33b(0x157),_0x33f036[_0x2da33b(0x178)]],_0x4b7b72=_0x4184e3['args']??[],_0x53d424=_0x53e68e['filter'](_0x4859eb=>!_0x4b7b72['includes'](_0x4859eb));_0x4184e3[_0x2da33b(0x1a1)]=[..._0x4b7b72,..._0x53d424];}const _0x110a3d=_0x33f036['BBVWT'](typeof _0x4184e3[_0x2da33b(0x16d)],'string')?_0x4184e3[_0x2da33b(0x16d)]:_0x2a2de8?chromium['executablePath']():undefined;return{'storageStatePath':_0x2a2de8,'tempAuthPath':_0xf75c58,'baseUrl':_0x4a3fdc[_0x2da33b(0x16f)],'headless':Boolean(_0x4184e3[_0x2da33b(0x13c)]),'userDataDir':_0x233dd4,'browserProfilePath':_0x5abdd2,'executablePath':_0x110a3d,'launchArgs':Array['isArray'](_0x4184e3[_0x2da33b(0x1a1)])?_0x4184e3[_0x2da33b(0x1a1)]['filter'](_0x9228be=>typeof _0x9228be==='string'):[],'userAgent':_0x33f036['BBVWT'](typeof _0x540ee7[_0x2da33b(0x19f)],'string')?_0x540ee7['userAgent']:undefined,'extraHTTPHeaders':_0x540ee7[_0x2da33b(0x199)],'allowInsecureLocalhost':Boolean(_0x4a3fdc['allowInsecureLocalhost']),'safeMode':Boolean(_0x4a3fdc[_0x2da33b(0x136)]),'cdpEndpoint':_0x4a3fdc['cdpEndpoint'],'isCdpMode':Boolean(_0x4a3fdc[_0x2da33b(0x177)])};}function _0x1e73(){const _0x3c870=['-rangerwright.json','FHiGK','nPORt','JNYpu','jplSN','env','HAxUY','--disable-setuid-sandbox','filter','isArray','rangerDir','headers','CPXaF','tzqtQ','khmqU','tabs','extraHTTPHeaders','--allow-running-insecure-content','map','NRPMb','auth.json.enc','Environment\x20variable\x20','userAgent','688610LnZOjM','args','all','4OaYgOG','9TJGfzv','\x20is\x20not\x20set','rICWH','contextOptions','BBVWT','indexOf','ignoreHTTPSErrors','OpfaP','nMACA','--allow-insecure-localhost','EKjQc','clipboard-read','allowInsecureLocalhost','fromEntries','safeMode','fvdKM','4848804XCHKaO','FnFuD','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','forWrite','headless','code','1785260PBrqzJ','dftxb','length','stagehand','browser','huqkV','now','UPFrb','wSkIK','getuid','qGtou','uRTSM','GoVfq','core','cAHLX','1066737jwfQAO','catch','gQRGt','path','includes','ZTapj','HongP','object','entries','replace','--no-sandbox','allow','bazZT','stringify','legacy','location','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','--disable-features=WebBluetooth','DsXXT','bkTxW','FuskP','OhcfK','qhrQi','CokmB','clipboard-write','ranger-config','header','umomb','REiWa','file','message','uAoeT','executablePath','playwright-cli','baseUrl','VQoVI','auth.json','push','storageState','QZxPp','split','local','cdpEndpoint','brSGQ','IAqzX','Default','repeat','6824264YzweBX','1398792HqyOoF','kuTSU','BIywy','sessions','PmIsv','LVwXO','eOPWo','.json','IYypm','981981GujmDn','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','locations'];_0x1e73=function(){return _0x3c870;};return _0x1e73();}export function getNestedValue(_0x164fbf,_0x369a33){const _0xbe1b7d=_0x4e41dc,_0x45eef4={'umomb':function(_0x5c37eb,_0x582a16){return _0x5c37eb(_0x582a16);},'IbIvx':function(_0x372097,_0x16df04){return _0x372097===_0x16df04;}},_0x6d9e1b=_0x45eef4[_0xbe1b7d(0x168)](parseKeyPath,_0x369a33);let _0x34a50b=_0x164fbf;for(const _0x553ce6 of _0x6d9e1b){if(_0x34a50b===null||_0x45eef4['IbIvx'](_0x34a50b,undefined)||typeof _0x34a50b!=='object')return undefined;_0x34a50b=_0x34a50b[_0x553ce6];}return _0x34a50b;}export function setNestedValue(_0x3d010e,_0x400c80,_0x17fd85){const _0x190fb7=_0x4e41dc,_0x3818f0={'qHbSr':function(_0x30d6ca,_0x3968b9){return _0x30d6ca<_0x3968b9;},'FYXea':function(_0x16be01,_0x155463){return _0x16be01-_0x155463;},'qfIUH':_0x190fb7(0x154),'acJTM':function(_0x5c2e26,_0x354022){return _0x5c2e26-_0x354022;}},_0x52d063=parseKeyPath(_0x400c80);let _0x4cfc9d=_0x3d010e;for(let _0x3e1118=0x0;_0x3818f0['qHbSr'](_0x3e1118,_0x3818f0['FYXea'](_0x52d063[_0x190fb7(0x140)],0x1));_0x3e1118++){const _0x4e84e7=_0x52d063[_0x3e1118];(!(_0x4e84e7 in _0x4cfc9d)||typeof _0x4cfc9d[_0x4e84e7]!==_0x3818f0['qfIUH'])&&(_0x4cfc9d[_0x4e84e7]={}),_0x4cfc9d=_0x4cfc9d[_0x4e84e7];}_0x4cfc9d[_0x52d063[_0x3818f0['acJTM'](_0x52d063['length'],0x1)]]=_0x17fd85;}export function deleteNestedValue(_0x173b9b,_0x37b1c1){const _0x24048e=_0x4e41dc,_0x4b3fb5={'CRdge':function(_0x1ccb52,_0x15ca15){return _0x1ccb52(_0x15ca15);},'IAqzX':function(_0x2a9788,_0x22343d){return _0x2a9788-_0x22343d;},'qhrQi':_0x24048e(0x154),'OpfaP':function(_0x149817,_0x23f7b6){return _0x149817===_0x23f7b6;}},_0x1f1333=_0x4b3fb5['CRdge'](parseKeyPath,_0x37b1c1);let _0x19387a=_0x173b9b;for(let _0x21cc55=0x0;_0x21cc55<_0x4b3fb5[_0x24048e(0x179)](_0x1f1333['length'],0x1);_0x21cc55++){if(_0x19387a===null||_0x19387a===undefined||typeof _0x19387a!==_0x4b3fb5[_0x24048e(0x163)])return![];_0x19387a=_0x19387a[_0x1f1333[_0x21cc55]];}if(_0x4b3fb5[_0x24048e(0x12f)](_0x19387a,null)||_0x4b3fb5[_0x24048e(0x12f)](_0x19387a,undefined)||typeof _0x19387a!==_0x4b3fb5[_0x24048e(0x163)])return![];const _0x5dd336=_0x1f1333[_0x1f1333[_0x24048e(0x140)]-0x1];if(_0x5dd336 in _0x19387a)return delete _0x19387a[_0x5dd336],!![];return![];}function parseKeyPath(_0x50415f){const _0x37c571=_0x4e41dc,_0x4c1e71={'sVzGu':function(_0x1c8e1a,_0x3af144){return _0x1c8e1a===_0x3af144;},'uNFnK':_0x37c571(0x167),'dBXwN':'setupHeaders'},_0x2dc904=_0x50415f[_0x37c571(0x175)]('.');return _0x4c1e71['sVzGu'](_0x2dc904[0x0],_0x4c1e71['uNFnK'])&&(_0x2dc904[0x0]=_0x37c571(0x194)),_0x2dc904[0x0]==='setupHeader'&&(_0x2dc904[0x0]=_0x4c1e71['dBXwN']),_0x2dc904;}export function formatSettings(_0x3422b0,_0x380b9d=0x0){const _0x309a48=_0x4e41dc,_0x53f7f5=[],_0x4eda9f='\x20\x20'[_0x309a48(0x17b)](_0x380b9d);for(const [_0x7d11c6,_0x266d20]of Object[_0x309a48(0x155)](_0x3422b0)){if(_0x266d20===undefined)continue;if(typeof _0x266d20===_0x309a48(0x154)&&_0x266d20!==null){_0x53f7f5['push'](''+_0x4eda9f+_0x7d11c6+':');for(const [_0x2e8069,_0x11a431]of Object['entries'](_0x266d20)){_0x53f7f5[_0x309a48(0x172)](_0x4eda9f+'\x20\x20'+_0x2e8069+':\x20'+_0x11a431);}}else _0x53f7f5[_0x309a48(0x172)](''+_0x4eda9f+_0x7d11c6+':\x20'+_0x266d20);}return _0x53f7f5['join']('\x0a');}
|
|
1
|
+
const _0x272792=_0x5860;(function(_0x3330c5,_0x3b3568){const _0x3e814c=_0x5860,_0x65fc51=_0x3330c5();while(!![]){try{const _0x276161=parseInt(_0x3e814c(0x1fe))/0x1*(-parseInt(_0x3e814c(0x208))/0x2)+parseInt(_0x3e814c(0x212))/0x3*(parseInt(_0x3e814c(0x1ee))/0x4)+parseInt(_0x3e814c(0x247))/0x5*(-parseInt(_0x3e814c(0x23c))/0x6)+-parseInt(_0x3e814c(0x22c))/0x7+-parseInt(_0x3e814c(0x215))/0x8*(parseInt(_0x3e814c(0x1f4))/0x9)+-parseInt(_0x3e814c(0x23a))/0xa+parseInt(_0x3e814c(0x238))/0xb*(parseInt(_0x3e814c(0x205))/0xc);if(_0x276161===_0x3b3568)break;else _0x65fc51['push'](_0x65fc51['shift']());}catch(_0x45b094){_0x65fc51['push'](_0x65fc51['shift']());}}}(_0x1290,0x5b4d0));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(_0x97c3e3,_0x135e4b){const _0x51504e=_0x5860,_0x49f6d4={'dihRQ':function(_0x52bc8d,_0x10f54f,_0x43e3ac,_0x26c950){return _0x52bc8d(_0x10f54f,_0x43e3ac,_0x26c950);},'RTPCF':function(_0x24c1fa,_0x321847,_0x4498a3,_0xe16e0){return _0x24c1fa(_0x321847,_0x4498a3,_0xe16e0);},'ruOOR':function(_0x5b07b6,_0x41c3aa,_0x55ccdd){return _0x5b07b6(_0x41c3aa,_0x55ccdd);},'beZaH':function(_0x5af2ac,_0x3b3ef5){return _0x5af2ac(_0x3b3ef5);}},_0x3c21e9=_0x49f6d4[_0x51504e(0x1f0)](join,_0x135e4b,'ci',_0x97c3e3),_0x5d6159=_0x49f6d4['RTPCF'](join,_0x135e4b,'local',_0x97c3e3),_0x4b2d51=join(_0x135e4b,_0x97c3e3),_0x2d8c3e=join(_0x135e4b,'local'),_0x578583=_0x49f6d4['ruOOR'](join,_0x135e4b,'ci');if(_0x49f6d4['beZaH'](existsSync,_0x3c21e9))return _0x3c21e9;if(existsSync(_0x5d6159))return _0x5d6159;if(_0x49f6d4[_0x51504e(0x25b)](existsSync,_0x4b2d51)&&(_0x4b2d51!==_0x2d8c3e&&_0x4b2d51!==_0x578583?!![]:_0x49f6d4['beZaH'](hasLegacyProfileFiles,_0x4b2d51)))return _0x4b2d51;return null;}export function getEnvDir(_0x23e6f5,_0x4b4b18={}){const _0x674c71=_0x5860,_0x35af8e={'oYpNZ':function(_0x338dc6){return _0x338dc6();},'IFmpZ':function(_0x3e0ada,_0x4bd2b0){return _0x3e0ada(_0x4bd2b0);},'GOUJT':function(_0x578ff7,_0x2056a0,_0x2ea763){return _0x578ff7(_0x2056a0,_0x2ea763);},'WhbAT':function(_0x23d2c6,_0x28dc12,_0x5ea010,_0x14e756){return _0x23d2c6(_0x28dc12,_0x5ea010,_0x14e756);}},_0x529e6e=_0x35af8e['oYpNZ'](getRangerDir),_0x5d4346=findEnvInRoot(_0x23e6f5,_0x529e6e);if(_0x5d4346){if(_0x4b4b18['forWrite']&&isLegacyEnvPath(_0x5d4346))throw legacyWriteError(_0x23e6f5,_0x5d4346);return _0x5d4346;}const _0x28c09f=getRangerHomeDir();if(_0x28c09f!==_0x529e6e){const _0xd0a48d=findEnvInRoot(_0x23e6f5,_0x28c09f);if(_0xd0a48d){if(_0x4b4b18[_0x674c71(0x1f5)]&&_0x35af8e['IFmpZ'](isLegacyEnvPath,_0xd0a48d))throw _0x35af8e[_0x674c71(0x242)](legacyWriteError,_0x23e6f5,_0xd0a48d);return _0xd0a48d;}}const _0x2a4771=_0x35af8e[_0x674c71(0x234)](join,_0x28c09f,_0x674c71(0x26c),_0x23e6f5);if(_0x4b4b18[_0x674c71(0x1f5)])throw legacyWriteError(_0x23e6f5,_0x2a4771);return _0x2a4771;}function isLegacyEnvPath(_0xdf81a7){const _0x4bee9a=_0x5860,_0x238af9={'czTTu':function(_0xa1f8cf){return _0xa1f8cf();},'Oxigo':function(_0x12489b,_0x1ca0a7){return _0x12489b+_0x1ca0a7;},'hmTql':function(_0x213b9e,_0x25510c){return _0x213b9e===_0x25510c;}},_0x4da2f8=getRangerDir(),_0x3c852c=_0x238af9['czTTu'](getRangerHomeDir);for(const _0x3b3638 of new Set([_0x4da2f8,_0x3c852c])){const _0x1e2f14=_0x3b3638['endsWith']('/')?_0x3b3638:_0x238af9[_0x4bee9a(0x237)](_0x3b3638,'/');if(_0x238af9[_0x4bee9a(0x1f1)](_0xdf81a7,_0x3b3638)||_0xdf81a7['startsWith'](_0x1e2f14))return!![];}return![];}function legacyWriteError(_0x17550a,_0x2132e0){const _0x2f3045=_0x5860,_0x45881f={'FhyKQ':function(_0x47ae82,_0x1612dc){return _0x47ae82+_0x1612dc;}};return new Error(_0x45881f[_0x2f3045(0x224)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x17550a+_0x2f3045(0x276)+_0x2132e0+'.\x0a'+_0x2f3045(0x25d)+_0x2f3045(0x271),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0xb97ab1,_0x5590c3){const _0x3cd264=_0x5860,_0x2c7321={'wmXQP':_0x3cd264(0x26c),'vxHbw':function(_0x204c0f,_0x31f80b,_0xefd1cb,_0x501cdb){return _0x204c0f(_0x31f80b,_0xefd1cb,_0x501cdb);},'kRvff':function(_0x5c47d0,_0x4ab952,_0x58824e){return _0x5c47d0(_0x4ab952,_0x58824e);},'OSHmp':function(_0x6ac519,_0x1e014b){return _0x6ac519===_0x1e014b;},'SkLat':function(_0x392be6,_0x299559){return _0x392be6===_0x299559;}},_0x13920c=_0x5590c3?.[_0x3cd264(0x22b)],_0x5ef49a=_0x13920c?[_0x13920c]:[getRangerDir(),getRangerHomeDir()][_0x3cd264(0x256)]((_0x47c031,_0x4f4f38,_0x4d82b9)=>_0x4d82b9[_0x3cd264(0x1fa)](_0x47c031)===_0x4f4f38),_0x34d916=_0x5590c3?.[_0x3cd264(0x25e)]??['ci',_0x2c7321['wmXQP'],'legacy'];for(const _0x4ebd92 of _0x5ef49a){const _0x2766e3=join(_0x4ebd92,_0x2c7321['wmXQP']),_0x293b31=join(_0x4ebd92,'ci'),_0x1aadf9=[{'location':'ci','path':join(_0x4ebd92,'ci',_0xb97ab1)},{'location':'local','path':_0x2c7321['vxHbw'](join,_0x4ebd92,_0x2c7321[_0x3cd264(0x201)],_0xb97ab1)},{'location':'legacy','path':_0x2c7321['kRvff'](join,_0x4ebd92,_0xb97ab1)}];for(const _0x45484d of _0x1aadf9){if(_0x34d916[_0x3cd264(0x244)](_0x45484d[_0x3cd264(0x21f)])&&existsSync(_0x45484d[_0x3cd264(0x22f)])){if(_0x45484d[_0x3cd264(0x21f)]===_0x3cd264(0x246)&&(_0x2c7321[_0x3cd264(0x209)](_0x45484d['path'],_0x2766e3)||_0x2c7321['SkLat'](_0x45484d['path'],_0x293b31))&&!hasLegacyProfileFiles(_0x45484d['path']))continue;return{'path':_0x45484d[_0x3cd264(0x22f)],'location':_0x45484d[_0x3cd264(0x21f)]};}}}return null;}function hasLegacyProfileFiles(_0x2e956b){const _0x4a92d1=_0x5860,_0x26bdd4={'NMQbZ':function(_0x16c1a4,_0x2d1470,_0x58c913){return _0x16c1a4(_0x2d1470,_0x58c913);},'whaKv':function(_0x528a83,_0x1c46b8,_0x2a1d19){return _0x528a83(_0x1c46b8,_0x2a1d19);},'ZCgCq':_0x4a92d1(0x1f8)};return existsSync(_0x26bdd4['NMQbZ'](join,_0x2e956b,_0x4a92d1(0x26e)))||existsSync(_0x26bdd4['whaKv'](join,_0x2e956b,_0x26bdd4[_0x4a92d1(0x24b)]))||existsSync(_0x26bdd4['NMQbZ'](join,_0x2e956b,'auth.json.enc'));}export function isEnvCi(_0x4bc77d){const _0x2591d3=_0x5860,_0x558998={'lBmsT':function(_0x593e27,_0x2104be){return _0x593e27!==_0x2104be;},'pALTc':function(_0x1961bb){return _0x1961bb();}};if(existsSync(join(getRangerDir(),'ci',_0x4bc77d)))return!![];const _0x21a0e8=getRangerHomeDir();if(_0x558998[_0x2591d3(0x269)](_0x21a0e8,_0x558998[_0x2591d3(0x20a)](getRangerDir))&&existsSync(join(_0x21a0e8,'ci',_0x4bc77d)))return!![];return![];}export async function cleanupTempFiles(_0x28c22b){const _0x1d4e44=_0x5860,_0x52f147={'lqFHS':function(_0x32e28c,_0x5382c1){return _0x32e28c!==_0x5382c1;},'VvAxG':_0x1d4e44(0x261)},_0xcef653=[_0x28c22b['tempAuthPath'],_0x28c22b['configPath']][_0x1d4e44(0x256)](Boolean);await Promise['all'](_0xcef653[_0x1d4e44(0x1ef)](_0xb11f38=>unlink(_0xb11f38)['catch'](_0xce77a9=>{const _0x12dfba=_0x1d4e44;_0x52f147['lqFHS'](_0xce77a9[_0x12dfba(0x257)],_0x52f147['VvAxG'])&&console['warn'](_0x12dfba(0x279)+_0xb11f38+':',_0xce77a9['message']);})));}export function getSettingsPath(_0x4587fc){const _0x234ab1=_0x5860;return join(getEnvDir(_0x4587fc),_0x234ab1(0x26e));}export async function loadSettings(_0x5e0377){const _0x401673=_0x5860,_0x36c670={'zUdoq':function(_0x299f0e,_0x1ad83b){return _0x299f0e(_0x1ad83b);},'BTvET':function(_0x576e49,_0x4285e8,_0x378c83){return _0x576e49(_0x4285e8,_0x378c83);}},_0x1b59dc=_0x36c670[_0x401673(0x230)](getSettingsPath,_0x5e0377);if(!_0x36c670['zUdoq'](existsSync,_0x1b59dc))return{};try{const _0x1e4dc3=await _0x36c670['BTvET'](readFile,_0x1b59dc,'utf-8');return JSON[_0x401673(0x22e)](_0x1e4dc3);}catch{return{};}}export async function saveSettings(_0x2ec0bd,_0xfeee77){const _0x2ed1be=_0x5860,_0x235e34={'toKLD':function(_0x34df16,_0x5b0920){return _0x34df16(_0x5b0920);}},_0x5add83=_0x235e34['toKLD'](getSettingsPath,_0x2ec0bd),_0xa35fa4=_0x235e34['toKLD'](dirname,_0x5add83);!_0x235e34[_0x2ed1be(0x210)](existsSync,_0xa35fa4)&&await mkdir(_0xa35fa4,{'recursive':!![]}),await writeFile(_0x5add83,JSON['stringify'](_0xfeee77,null,0x2));}export function resolveEnvVars(_0x155903){const _0x299636=_0x5860,_0x1e0f0f={'KKseB':function(_0x280f47,_0x5d6685){return _0x280f47===_0x5d6685;},'rssTH':'string'};if(_0x1e0f0f[_0x299636(0x260)](typeof _0x155903,_0x1e0f0f[_0x299636(0x1f7)]))return _0x155903[_0x299636(0x248)](/\$\{(\w+)\}/g,(_0x3bd57e,_0x10c78a)=>{const _0xb4a8b3=_0x299636,_0x1231e8=process[_0xb4a8b3(0x21b)][_0x10c78a];if(_0x1231e8===undefined)throw new Error(_0xb4a8b3(0x26a)+_0x10c78a+_0xb4a8b3(0x1ff));return _0x1231e8;});if(Array[_0x299636(0x273)](_0x155903))return _0x155903[_0x299636(0x1ef)](resolveEnvVars);if(_0x155903&&_0x1e0f0f['KKseB'](typeof _0x155903,_0x299636(0x26f)))return Object['fromEntries'](Object[_0x299636(0x20b)](_0x155903)['map'](([_0x81902a,_0x26acdf])=>[_0x81902a,resolveEnvVars(_0x26acdf)]));return _0x155903;}const isRecord=_0x14029f=>typeof _0x14029f===_0x272792(0x26f)&&_0x14029f!==null&&!Array[_0x272792(0x273)](_0x14029f),asRecord=_0x248506=>isRecord(_0x248506)?_0x248506:undefined,mergeHeaders=(_0x1b1d9e,_0xa62139)=>{const _0x4bc8ba=_0x272792,_0x6a5ef4={'fRZlI':function(_0x16514a,_0x430fa2){return _0x16514a??_0x430fa2;}},_0x453a0f={..._0x6a5ef4[_0x4bc8ba(0x20e)](_0x1b1d9e,{}),..._0xa62139??{}};return Object[_0x4bc8ba(0x1fb)](_0x453a0f)[_0x4bc8ba(0x23f)]?_0x453a0f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x272792(0x270),'--allow-running-insecure-content',_0x272792(0x231),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x1b6c95,_0x350ecf={}){const _0x28068d=_0x272792,_0xcc4c6b={'XwFHt':function(_0x2d9828,_0x4f0b3b){return _0x2d9828(_0x4f0b3b);},'rBKZG':function(_0x5d513b,_0x5d6ca6){return _0x5d513b===_0x5d6ca6;},'GYxlf':'string','mDZRX':function(_0x556b35,_0x1d91fd,_0x23fef6){return _0x556b35(_0x1d91fd,_0x23fef6);},'JgGla':function(_0x188d66,_0x3918d3){return _0x188d66(_0x3918d3);}},_0xb3a2be=asRecord(_0x1b6c95[_0x28068d(0x24a)]),_0x5c0d83={..._0xcc4c6b[_0x28068d(0x227)](asRecord,_0xb3a2be?.['launchOptions'])??{}};_0xcc4c6b['rBKZG'](typeof _0x350ecf[_0x28068d(0x235)],'boolean')&&(_0x5c0d83[_0x28068d(0x235)]=_0x350ecf['headless']);if(_0x1b6c95['safeMode']){const _0x7e12a6=_0x5c0d83['args']??[],_0x2c9eab=SAFE_MODE_ARGS[_0x28068d(0x256)](_0x25d05d=>!_0x7e12a6['includes'](_0x25d05d));_0x5c0d83[_0x28068d(0x221)]=[..._0x7e12a6,..._0x2c9eab];}if(_0x1b6c95[_0x28068d(0x268)]){const _0x1a1168=_0x5c0d83[_0x28068d(0x221)]??[],_0x11ac81=ALLOW_LOCALHOST_ARGS[_0x28068d(0x256)](_0x2758e6=>!_0x1a1168[_0x28068d(0x244)](_0x2758e6));_0x5c0d83[_0x28068d(0x221)]=[..._0x1a1168,..._0x11ac81];}const _0x3051ad={...asRecord(_0xb3a2be?.[_0x28068d(0x1f2)])??{}};_0x3051ad[_0x28068d(0x200)]=!![];_0xcc4c6b['rBKZG'](typeof _0x1b6c95['userAgent'],_0xcc4c6b[_0x28068d(0x265)])&&(_0x3051ad['userAgent']=_0x1b6c95['userAgent']);const _0xe3e745=_0xcc4c6b['mDZRX'](mergeHeaders,_0xcc4c6b['XwFHt'](asRecord,_0x3051ad['extraHTTPHeaders']),_0xcc4c6b[_0x28068d(0x251)](asRecord,_0x1b6c95[_0x28068d(0x219)]));return _0xe3e745?_0x3051ad['extraHTTPHeaders']=_0xe3e745:delete _0x3051ad[_0x28068d(0x274)],_0x350ecf['storageStatePath']&&(_0x3051ad['storageState']=_0x350ecf['storageStatePath']),{'launchOptions':_0x5c0d83,'contextOptions':_0x3051ad};}export async function resolveProfileStorageState(_0x94cfec){const _0x57155c={'qdGFG':function(_0x361ee8,_0xa2b565){return _0x361ee8(_0xa2b565);}};return _0x57155c['qdGFG'](resolveLocalAuthPath,getEnvDir(_0x94cfec));}function _0x5860(_0x17d1a3,_0x44f739){_0x17d1a3=_0x17d1a3-0x1ee;const _0x1290d9=_0x1290();let _0x5860a6=_0x1290d9[_0x17d1a3];return _0x5860a6;}async function resolveLocalAuthPath(_0xff4249){const _0x16284d=_0x272792,_0x313cae={'FvrVB':_0x16284d(0x277),'rknBr':function(_0x45f47b,_0x4ea013,_0x570151){return _0x45f47b(_0x4ea013,_0x570151);},'FQGlD':function(_0x53ae8d,_0x22560e){return _0x53ae8d(_0x22560e);}},_0x51293c=join(_0xff4249,_0x313cae[_0x16284d(0x20c)]),_0x14c6f6=join(_0xff4249,'auth.json');if(existsSync(_0x51293c))try{const _0x3b8141=await getToken();if(!_0x3b8141)throw new Error(_0x16284d(0x254));const _0x3f2ce2=await readFile(_0x51293c),_0x57b845=_0x313cae[_0x16284d(0x1f9)](decrypt,_0x3f2ce2,_0x3b8141),_0x59811e=join(tmpdir(),_0x16284d(0x236)+Date[_0x16284d(0x24f)]()+_0x16284d(0x216));return await _0x313cae['rknBr'](writeFile,_0x59811e,_0x57b845),{'storageStatePath':_0x59811e,'tempAuthPath':_0x59811e};}catch(_0xce4ab3){const _0x280243=_0xce4ab3 instanceof Error?_0xce4ab3[_0x16284d(0x253)]:String(_0xce4ab3);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x280243);}if(_0x313cae['FQGlD'](existsSync,_0x14c6f6))return{'storageStatePath':_0x14c6f6};return{};}export async function buildPlaywrightConfig(_0x3538e3,_0xb74cbd,_0x4b0d13,_0x52d09c,_0xdb331d){const _0x326b9c=_0x272792,_0x2faa9a={'oQVtP':function(_0x64e565,_0xcf14d8,_0x3c5d62,_0x2cb621,_0x2f7edd,_0x5e01f6,_0x1c395b){return _0x64e565(_0xcf14d8,_0x3c5d62,_0x2cb621,_0x2f7edd,_0x5e01f6,_0x1c395b);},'qWVaf':'stagehand','iZjSw':function(_0x246b5b,_0xc18c3e){return _0x246b5b(_0xc18c3e);},'RdHJK':function(_0xc6e3eb,_0x304137,_0x482354,_0x551172,_0x25fbe5,_0x5ec898,_0x2f22aa){return _0xc6e3eb(_0x304137,_0x482354,_0x551172,_0x25fbe5,_0x5ec898,_0x2f22aa);}};if(_0xdb331d)return _0x2faa9a[_0x326b9c(0x267)](buildPlaywrightConfigCore,_0x3538e3,_0xdb331d,_0xb74cbd,_0x4b0d13,_0x52d09c,_0x2faa9a[_0x326b9c(0x220)]);const {storageStatePath:_0x4d0bb1,tempAuthPath:_0x36dc27}=await _0x2faa9a['iZjSw'](resolveLocalAuthPath,getEnvDir(_0xb74cbd));try{const _0x4768b9=await _0x2faa9a[_0x326b9c(0x263)](buildPlaywrightConfigCore,_0x3538e3,_0x4d0bb1,_0xb74cbd,_0x4b0d13,_0x52d09c,_0x2faa9a[_0x326b9c(0x220)]);return{..._0x4768b9,'tempAuthPath':_0x36dc27};}catch(_0x11cf91){_0x36dc27&&await unlink(_0x36dc27)[_0x326b9c(0x202)](()=>{});throw _0x11cf91;}}function _0x1290(){const _0x29e3f3=['keys','VCaOI','OBHkc','115786HisNvN','\x20is\x20not\x20set','ignoreHTTPSErrors','wmXQP','catch','avuuC','EBkaD','12bIAqBm','stringify','BPTzj','4IiBzJe','OSHmp','pALTc','entries','FvrVB','adwpk','fRZlI','ihPkT','toKLD','userAgent','48terpSb','TTMhX','lochm','464456TgLshA','.json','NparI','KZPvr','headers','xexry','env','core','mYiUl','AqKXC','location','qWVaf','args','chromium','iZHMs','FhyKQ','xkuPP','clipboard-read','XwFHt','mlMnj','myvyI','fojZY','rangerDir','558670psjjKh','lfJTr','parse','path','zUdoq','--unsafely-treat-insecure-origin-as-secure=http://localhost','string','playwright-cli','WhbAT','headless','ranger-auth-','Oxigo','14620617tHyYFd','DODhM','3929210vwqnXh','gKiIK','918vmUGlK','RZdXc','setupHeaders','length','--no-sandbox','file','GOUJT','yOLRg','includes','none','legacy','10275mjBtXp','replace','cdpEndpoint','browser','ZCgCq','IwldF','zJzKq','ESOJH','now','--disable-setuid-sandbox','JgGla','WOfSQ','message','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','tIrIs','filter','code','hvBCT','vision','baseUrl','beZaH','mAAbO','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','locations','join','KKseB','ENOENT','jdkRH','RdHJK','nova-user-data','GYxlf','ranger-config','oQVtP','allowInsecureLocalhost','lBmsT','Environment\x20variable\x20','getuid','local','storageState','settings.json','object','--disable-web-security','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','FwGEA','isArray','extraHTTPHeaders','push','\x22\x20to\x20legacy\x20path\x20','auth.json.enc','KYzMX','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','88456byyHKW','map','dihRQ','hmTql','contextOptions','SntKF','45ZiHJnn','forWrite','-cli','rssTH','auth.json','rknBr','indexOf'];_0x1290=function(){return _0x29e3f3;};return _0x1290();}export async function buildPlaywrightConfigCore(_0x4786ee,_0x2d03ce,_0x292e3b,_0x5277c7,_0x236e71,_0x1611ae='stagehand'){const _0x1ccf6e=_0x272792,_0x177a2b={'fojZY':function(_0x1e231e,_0x187b95){return _0x1e231e===_0x187b95;},'BPTzj':_0x1ccf6e(0x250),'AqKXC':'chromium','JZANC':'clipboard-read','Iygdb':'clipboard-write','DODhM':function(_0x546b1e){return _0x546b1e();},'ihPkT':function(_0x44505d,_0x44d848,_0x17e937,_0x379170){return _0x44505d(_0x44d848,_0x17e937,_0x379170);},'mzTXq':function(_0x51a5a1){return _0x51a5a1();},'RWdSq':'sessions','avuuC':_0x1ccf6e(0x241),'rlwdC':'tabs','xexry':'install','YshfW':_0x1ccf6e(0x259),'lfJTr':function(_0x9e73eb,_0x5f1974,_0x2085a0){return _0x9e73eb(_0x5f1974,_0x2085a0);},'MmyWU':_0x1ccf6e(0x266),'RZdXc':function(_0xf46573,_0x490044,_0x28b545){return _0xf46573(_0x490044,_0x28b545);}},_0x1a82f6=_0x5277c7||_0x177a2b[_0x1ccf6e(0x239)](randomUUID),_0x5abb39=_0x177a2b[_0x1ccf6e(0x20f)](join,_0x177a2b['mzTXq'](getRangerDir),_0x177a2b['RWdSq'],_0x1a82f6),_0x4521a7=Boolean(_0x4786ee['cdpEndpoint']),_0x3c4b27=_0x4521a7?{'browserName':'chromium','cdpEndpoint':_0x4786ee[_0x1ccf6e(0x249)]}:((()=>{const _0x1609ed=_0x1ccf6e,{launchOptions:_0x5e2de3,contextOptions:_0x2838a5}=buildBrowserOptionsFromSettings(_0x4786ee,{'headless':_0x236e71?![]:_0x4786ee[_0x1609ed(0x235)]??!![],'storageStatePath':_0x2d03ce});if(_0x177a2b[_0x1609ed(0x22a)](process['getuid']?.(),0x0)){const _0x5a7205=['--no-sandbox',_0x177a2b[_0x1609ed(0x207)]],_0x13fd84=_0x5e2de3['args']??[],_0x581866=_0x5a7205[_0x1609ed(0x256)](_0x1908a3=>!_0x13fd84[_0x1609ed(0x244)](_0x1908a3));_0x5e2de3[_0x1609ed(0x221)]=[..._0x13fd84,..._0x581866];}return{'isolated':!![],'browserName':_0x177a2b[_0x1609ed(0x21e)],'launchOptions':_0x5e2de3,'contextOptions':{..._0x2838a5,'permissions':[_0x177a2b['JZANC'],_0x177a2b['Iygdb']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x867dfc=_0x177a2b[_0x1ccf6e(0x22a)](_0x1611ae,'playwright-cli')?{'browser':_0x3c4b27,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5abb39,'outputMode':_0x177a2b[_0x1ccf6e(0x203)],'codegen':_0x1ccf6e(0x245)}:{'name':_0x292e3b,'browser':_0x3c4b27,'capabilities':[_0x1ccf6e(0x21c),_0x177a2b['rlwdC'],_0x177a2b[_0x1ccf6e(0x21a)],'pdf',_0x177a2b['YshfW']],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5abb39};if(!_0x4521a7){const _0x399a1a=_0x867dfc['browser'],_0x2f1da8=_0x399a1a[_0x1ccf6e(0x1f2)];if(_0x2f1da8[_0x1ccf6e(0x211)]===undefined)delete _0x2f1da8['userAgent'];if(_0x2f1da8['storageState']===undefined)delete _0x2f1da8[_0x1ccf6e(0x26d)];}const _0x286a48=_0x177a2b[_0x1ccf6e(0x22d)](join,tmpdir(),_0x177a2b['MmyWU']);!existsSync(_0x286a48)&&await _0x177a2b[_0x1ccf6e(0x23d)](mkdir,_0x286a48,{'recursive':!![]});const _0x109b9f=_0x1611ae===_0x1ccf6e(0x233)?_0x1ccf6e(0x1f6):'',_0x2bc7a0=_0x177a2b[_0x1ccf6e(0x22d)](join,_0x286a48,_0x292e3b+'-'+Date['now']()+_0x109b9f+_0x1ccf6e(0x216));return await writeFile(_0x2bc7a0,JSON[_0x1ccf6e(0x206)](_0x867dfc,null,0x2)),{'configPath':_0x2bc7a0,'storageStatePath':_0x2d03ce};}export async function buildPlaywrightCliConfig(_0x4161be,_0x216943,_0x55d5b5,_0x493397,_0x3716d7){const _0x303b38=_0x272792,_0x6362a8={'RzgNR':function(_0x5d0d71,_0x22971d,_0x47261b,_0x11ef53,_0x3ee94c,_0x5ef258,_0x5cbe67){return _0x5d0d71(_0x22971d,_0x47261b,_0x11ef53,_0x3ee94c,_0x5ef258,_0x5cbe67);},'hvBCT':function(_0x2c4bdb,_0x6ac8b){return _0x2c4bdb(_0x6ac8b);},'WOfSQ':function(_0x5e2ecf,_0x241a38,_0x480d52,_0x1225ec,_0x343173,_0x1bc17f,_0x5e0a64){return _0x5e2ecf(_0x241a38,_0x480d52,_0x1225ec,_0x343173,_0x1bc17f,_0x5e0a64);},'FwGEA':'playwright-cli'};if(_0x3716d7)return _0x6362a8['RzgNR'](buildPlaywrightConfigCore,_0x4161be,_0x3716d7,_0x216943,_0x55d5b5,_0x493397,'playwright-cli');const {storageStatePath:_0x4b1387,tempAuthPath:_0x552978}=await resolveLocalAuthPath(_0x6362a8[_0x303b38(0x258)](getEnvDir,_0x216943));try{const _0x14fd21=await _0x6362a8[_0x303b38(0x252)](buildPlaywrightConfigCore,_0x4161be,_0x4b1387,_0x216943,_0x55d5b5,_0x493397,_0x6362a8[_0x303b38(0x272)]);return{..._0x14fd21,'tempAuthPath':_0x552978};}catch(_0x135c24){_0x552978&&await unlink(_0x552978)['catch'](()=>{});throw _0x135c24;}}export async function buildRangerwrightCliConfig(_0x39fb91,_0x51c0a3,_0x33d8ed,_0x5c55fb,_0x5515f7){const _0xff16dc=_0x272792,_0x471696={'NparI':function(_0x21a5e3,_0x55994c,_0x27babb){return _0x21a5e3(_0x55994c,_0x27babb);},'EBkaD':function(_0x16ceca,_0x57e7c6){return _0x16ceca===_0x57e7c6;},'ESOJH':_0xff16dc(0x222),'GpQWh':_0xff16dc(0x226),'KZPvr':function(_0x124bc7,_0x387c83,_0x1eb209,_0x251ed3){return _0x124bc7(_0x387c83,_0x1eb209,_0x251ed3);},'fKwfY':function(_0x323c53){return _0x323c53();},'myvyI':'sessions','xkuPP':function(_0x3c271b,_0x974120){return _0x3c271b(_0x974120);},'VCaOI':function(_0x3273a9,_0xb88775,_0xfabb38){return _0x3273a9(_0xb88775,_0xfabb38);}},{storageStatePath:_0x240877,tempAuthPath:_0xefb631}=_0x5515f7?{'storageStatePath':_0x5515f7,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x51c0a3)),_0x49de7b=_0x33d8ed||randomUUID(),_0x19773c=_0x471696[_0xff16dc(0x218)](join,_0x471696['fKwfY'](getRangerDir),_0x471696[_0xff16dc(0x229)],_0x49de7b),_0x341973=_0x471696[_0xff16dc(0x225)](Boolean,_0x39fb91['cdpEndpoint']),_0x2f6ea9=_0x341973?{'browserName':_0x471696[_0xff16dc(0x24e)],'cdpEndpoint':_0x39fb91['cdpEndpoint']}:((()=>{const _0x50e374=_0xff16dc,{launchOptions:_0x2d0a1a,contextOptions:_0x2fb441}=_0x471696[_0x50e374(0x217)](buildBrowserOptionsFromSettings,_0x39fb91,{'headless':_0x5c55fb?![]:_0x39fb91[_0x50e374(0x235)]??!![],'storageStatePath':_0x240877});if(_0x471696[_0x50e374(0x204)](process['getuid']?.(),0x0)){const _0x406fa7=['--no-sandbox',_0x50e374(0x250)],_0x1900de=_0x2d0a1a['args']??[],_0x4f7648=_0x406fa7['filter'](_0x4865af=>!_0x1900de[_0x50e374(0x244)](_0x4865af));_0x2d0a1a['args']=[..._0x1900de,..._0x4f7648];}return{'browserName':_0x471696['ESOJH'],'launchOptions':_0x2d0a1a,'contextOptions':{..._0x2fb441,'permissions':[_0x471696['GpQWh'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x341973){const _0xcb1baa=_0x2f6ea9['contextOptions'];if(_0xcb1baa){if(_0xcb1baa[_0xff16dc(0x211)]===undefined)delete _0xcb1baa[_0xff16dc(0x211)];if(_0xcb1baa['storageState']===undefined)delete _0xcb1baa['storageState'];}}const _0x193dd8={'browser':_0x2f6ea9,'outputDir':_0x19773c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5b37c8;try{const _0x4e3b52=_0x471696['VCaOI'](join,tmpdir(),_0xff16dc(0x266));!_0x471696['xkuPP'](existsSync,_0x4e3b52)&&await _0x471696[_0xff16dc(0x1fc)](mkdir,_0x4e3b52,{'recursive':!![]}),_0x5b37c8=_0x471696[_0xff16dc(0x1fc)](join,_0x4e3b52,_0x51c0a3+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x5b37c8,JSON[_0xff16dc(0x206)](_0x193dd8,null,0x2));}catch(_0x5a791c){_0xefb631&&await unlink(_0xefb631)['catch'](()=>{});throw _0x5a791c;}return{'configPath':_0x5b37c8,'storageStatePath':_0x240877,'tempAuthPath':_0xefb631,'outputDir':_0x19773c};}export async function buildNovaActCliConfig(_0x287f3c,_0x243824,_0x166625,_0x233ce9,_0x31172a){const _0x2431ea=_0x272792,_0x4cdb3e={'adwpk':function(_0x983a48,_0x52bb88){return _0x983a48(_0x52bb88);},'OBHkc':function(_0x110240,_0x5d5c7c){return _0x110240(_0x5d5c7c);},'mlMnj':function(_0x1fbdfd){return _0x1fbdfd();},'OpwyD':_0x2431ea(0x264),'zJzKq':function(_0x2b3529,_0x4c000f,_0x173dac){return _0x2b3529(_0x4c000f,_0x173dac);},'yOLRg':function(_0x4ac347,_0x4ea143){return _0x4ac347===_0x4ea143;},'WsfcS':_0x2431ea(0x240),'TTMhX':'--disable-setuid-sandbox','ThqcP':function(_0x4fafa2,_0x48b138){return _0x4fafa2===_0x48b138;},'mAAbO':'string','MEmOz':function(_0xf5f4c1,_0x29f4cf){return _0xf5f4c1(_0x29f4cf);}},{storageStatePath:_0x5ad0a6,tempAuthPath:_0x396dbf}=_0x31172a?{'storageStatePath':_0x31172a,'tempAuthPath':undefined}:await _0x4cdb3e[_0x2431ea(0x20d)](resolveLocalAuthPath,_0x4cdb3e[_0x2431ea(0x1fd)](getEnvDir,_0x243824)),_0xa11f3=_0x166625||randomUUID(),_0x57038d=join(_0x4cdb3e[_0x2431ea(0x228)](getRangerDir),'sessions',_0xa11f3),_0x2ad8f1=join(_0x57038d,_0x4cdb3e['OpwyD']),_0x2a0663=_0x5ad0a6?join(_0x2ad8f1,'Default'):undefined,{launchOptions:_0x579d78,contextOptions:_0xf3d426}=_0x4cdb3e[_0x2431ea(0x24d)](buildBrowserOptionsFromSettings,_0x287f3c,{'headless':_0x233ce9?![]:_0x287f3c['headless']??!![],'storageStatePath':_0x5ad0a6});if(_0x4cdb3e[_0x2431ea(0x243)](process[_0x2431ea(0x26b)]?.(),0x0)){const _0x3da234=[_0x4cdb3e['WsfcS'],_0x4cdb3e[_0x2431ea(0x213)]],_0x2a9c1e=_0x579d78[_0x2431ea(0x221)]??[],_0x7639f=_0x3da234['filter'](_0xdfc6f4=>!_0x2a9c1e[_0x2431ea(0x244)](_0xdfc6f4));_0x579d78['args']=[..._0x2a9c1e,..._0x7639f];}const _0x402fe3=_0x4cdb3e['ThqcP'](typeof _0x579d78['executablePath'],_0x4cdb3e['mAAbO'])?_0x579d78['executablePath']:_0x5ad0a6?chromium['executablePath']():undefined;return{'storageStatePath':_0x5ad0a6,'tempAuthPath':_0x396dbf,'baseUrl':_0x287f3c[_0x2431ea(0x25a)],'headless':Boolean(_0x579d78['headless']),'userDataDir':_0x2ad8f1,'browserProfilePath':_0x2a0663,'executablePath':_0x402fe3,'launchArgs':Array[_0x2431ea(0x273)](_0x579d78['args'])?_0x579d78[_0x2431ea(0x221)][_0x2431ea(0x256)](_0x1de683=>typeof _0x1de683===_0x2431ea(0x232)):[],'userAgent':typeof _0xf3d426[_0x2431ea(0x211)]===_0x4cdb3e[_0x2431ea(0x25c)]?_0xf3d426[_0x2431ea(0x211)]:undefined,'extraHTTPHeaders':_0xf3d426[_0x2431ea(0x274)],'allowInsecureLocalhost':_0x4cdb3e['MEmOz'](Boolean,_0x287f3c['allowInsecureLocalhost']),'safeMode':_0x4cdb3e['OBHkc'](Boolean,_0x287f3c['safeMode']),'cdpEndpoint':_0x287f3c[_0x2431ea(0x249)],'isCdpMode':Boolean(_0x287f3c['cdpEndpoint'])};}export function getNestedValue(_0x5957b5,_0x14ac00){const _0x4cb5c9=_0x272792,_0x6fbeda={'wAZJW':function(_0x34c23d,_0x4b81d3){return _0x34c23d!==_0x4b81d3;},'aTITX':_0x4cb5c9(0x26f)},_0x3b35eb=parseKeyPath(_0x14ac00);let _0x42c53e=_0x5957b5;for(const _0x26c9c5 of _0x3b35eb){if(_0x42c53e===null||_0x42c53e===undefined||_0x6fbeda['wAZJW'](typeof _0x42c53e,_0x6fbeda['aTITX']))return undefined;_0x42c53e=_0x42c53e[_0x26c9c5];}return _0x42c53e;}export function setNestedValue(_0x22a264,_0x31168d,_0x52cfa5){const _0x650f2d=_0x272792,_0x1a1412={'SNNUC':function(_0x128b46,_0x2e3ee6){return _0x128b46(_0x2e3ee6);},'iZHMs':function(_0x24a6c2,_0x4cab05){return _0x24a6c2 in _0x4cab05;},'jdkRH':function(_0x3679ca,_0x242330){return _0x3679ca!==_0x242330;}},_0x494d88=_0x1a1412['SNNUC'](parseKeyPath,_0x31168d);let _0x393b62=_0x22a264;for(let _0xa0eefb=0x0;_0xa0eefb<_0x494d88[_0x650f2d(0x23f)]-0x1;_0xa0eefb++){const _0x11f2d0=_0x494d88[_0xa0eefb];(!_0x1a1412[_0x650f2d(0x223)](_0x11f2d0,_0x393b62)||_0x1a1412[_0x650f2d(0x262)](typeof _0x393b62[_0x11f2d0],'object'))&&(_0x393b62[_0x11f2d0]={}),_0x393b62=_0x393b62[_0x11f2d0];}_0x393b62[_0x494d88[_0x494d88['length']-0x1]]=_0x52cfa5;}export function deleteNestedValue(_0x54ebd6,_0x4a8bab){const _0x5d7e19=_0x272792,_0x3bc2eb={'mYiUl':function(_0x125156,_0x26a6cd){return _0x125156<_0x26a6cd;},'KYzMX':function(_0x578acb,_0x4a3513){return _0x578acb-_0x4a3513;},'pedfk':function(_0x46911d,_0x42a09d){return _0x46911d!==_0x42a09d;},'SntKF':function(_0x11dea2,_0x6a3172){return _0x11dea2===_0x6a3172;},'gKiIK':function(_0x5d63ca,_0x15619f){return _0x5d63ca-_0x15619f;},'IwldF':function(_0x254359,_0x397cca){return _0x254359 in _0x397cca;}},_0xc175e9=parseKeyPath(_0x4a8bab);let _0x440b73=_0x54ebd6;for(let _0x1384bd=0x0;_0x3bc2eb[_0x5d7e19(0x21d)](_0x1384bd,_0x3bc2eb[_0x5d7e19(0x278)](_0xc175e9[_0x5d7e19(0x23f)],0x1));_0x1384bd++){if(_0x440b73===null||_0x440b73===undefined||_0x3bc2eb['pedfk'](typeof _0x440b73,'object'))return![];_0x440b73=_0x440b73[_0xc175e9[_0x1384bd]];}if(_0x3bc2eb[_0x5d7e19(0x1f3)](_0x440b73,null)||_0x440b73===undefined||typeof _0x440b73!=='object')return![];const _0x3e89bd=_0xc175e9[_0x3bc2eb[_0x5d7e19(0x23b)](_0xc175e9['length'],0x1)];if(_0x3bc2eb[_0x5d7e19(0x24c)](_0x3e89bd,_0x440b73))return delete _0x440b73[_0x3e89bd],!![];return![];}function parseKeyPath(_0x5ccd45){const _0x44b16f=_0x272792,_0xfb9ccd={'tIrIs':'header','ARkYC':'setupHeader'},_0x316af1=_0x5ccd45['split']('.');return _0x316af1[0x0]===_0xfb9ccd[_0x44b16f(0x255)]&&(_0x316af1[0x0]='headers'),_0x316af1[0x0]===_0xfb9ccd['ARkYC']&&(_0x316af1[0x0]=_0x44b16f(0x23e)),_0x316af1;}export function formatSettings(_0x127e26,_0x44fc6b=0x0){const _0x27490e=_0x272792,_0xcce30c={'zShBi':function(_0x326999,_0x3d3fd2){return _0x326999===_0x3d3fd2;},'lochm':_0x27490e(0x26f),'fynQh':function(_0x4c9946,_0x591a97){return _0x4c9946!==_0x591a97;}},_0xcc84ed=[],_0x88e55d='\x20\x20'['repeat'](_0x44fc6b);for(const [_0x2c80fe,_0x3c6ab7]of Object[_0x27490e(0x20b)](_0x127e26)){if(_0xcce30c['zShBi'](_0x3c6ab7,undefined))continue;if(_0xcce30c['zShBi'](typeof _0x3c6ab7,_0xcce30c[_0x27490e(0x214)])&&_0xcce30c['fynQh'](_0x3c6ab7,null)){_0xcc84ed[_0x27490e(0x275)](''+_0x88e55d+_0x2c80fe+':');for(const [_0x341e36,_0x301b6b]of Object[_0x27490e(0x20b)](_0x3c6ab7)){_0xcc84ed[_0x27490e(0x275)](_0x88e55d+'\x20\x20'+_0x341e36+':\x20'+_0x301b6b);}}else _0xcc84ed['push'](''+_0x88e55d+_0x2c80fe+':\x20'+_0x3c6ab7);}return _0xcc84ed[_0x27490e(0x25f)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dfde9,_0x126270){const _0x25a313=_0x204b,_0x1d6eb8=_0x3dfde9();while(!![]){try{const _0x3a9fd1=parseInt(_0x25a313(0x6d))/0x1*(-parseInt(_0x25a313(0x6f))/0x2)+-parseInt(_0x25a313(0x73))/0x3+parseInt(_0x25a313(0x6a))/0x4+-parseInt(_0x25a313(0x74))/0x5*(-parseInt(_0x25a313(0x6e))/0x6)+parseInt(_0x25a313(0x72))/0x7+-parseInt(_0x25a313(0x71))/0x8*(-parseInt(_0x25a313(0x75))/0x9)+parseInt(_0x25a313(0x6c))/0xa*(-parseInt(_0x25a313(0x6b))/0xb);if(_0x3a9fd1===_0x126270)break;else _0x1d6eb8['push'](_0x1d6eb8['shift']());}catch(_0x42c47f){_0x1d6eb8['push'](_0x1d6eb8['shift']());}}}(_0x2efd,0x56aee));import{readFileSync}from'fs';function _0x204b(_0x51108b,_0x573651){_0x51108b=_0x51108b-0x68;const _0x2efdcb=_0x2efd();let _0x204b57=_0x2efdcb[_0x51108b];return _0x204b57;}import{dirname,join}from'path';function _0x2efd(){const _0x5a3abd=['40337OGpvlw','2440tYrEPT','1920mfRBrP','349626LLNfQX','194TzlemA','HIBNn','8hFgAvW','2106636xUOhDq','512046axXyNZ','20rKlDun','3665052yUbGFK','FmQJa','ranger/SKILL.md','2661856tJrGur'];_0x2efd=function(){return _0x5a3abd;};return _0x2efd();}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x33d741){const _0x1082b6=_0x204b,_0x2b55e4={'FmQJa':function(_0x4ecf1e,_0x32b6a0,_0x531567,_0x5b0975,_0x23417b){return _0x4ecf1e(_0x32b6a0,_0x531567,_0x5b0975,_0x23417b);},'HIBNn':function(_0x1db64b,_0x3dd86f,_0x51ea74){return _0x1db64b(_0x3dd86f,_0x51ea74);}},_0x32455f=_0x2b55e4[_0x1082b6(0x68)](join,__dirname,'..','..','skills'),_0x314240=_0x2b55e4[_0x1082b6(0x70)](join,_0x32455f,_0x33d741);try{return readFileSync(_0x314240,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x21e024=_0x204b;return readSkillContent(_0x21e024(0x69));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1682c5=_0x28cb;(function(_0x368989,_0x257445){const _0x2b027f=_0x28cb,_0x90113f=_0x368989();while(!![]){try{const _0x2cc88f=-parseInt(_0x2b027f(0x1de))/0x1*(-parseInt(_0x2b027f(0x1e6))/0x2)+-parseInt(_0x2b027f(0x1f1))/0x3+parseInt(_0x2b027f(0x1ed))/0x4*(-parseInt(_0x2b027f(0x1d9))/0x5)+parseInt(_0x2b027f(0x1e0))/0x6+parseInt(_0x2b027f(0x1d0))/0x7+parseInt(_0x2b027f(0x1e3))/0x8+-parseInt(_0x2b027f(0x1ea))/0x9;if(_0x2cc88f===_0x257445)break;else _0x90113f['push'](_0x90113f['shift']());}catch(_0x4ccee3){_0x90113f['push'](_0x90113f['shift']());}}}(_0x4a3e,0x52c28));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';function _0x4a3e(){const _0x3eb11e=['SKILL.md','uvSVl','dbzqO','join','602195mrrnuX','aejTv','QHpKW','log','skills','6FqFzXX','trim','934512FKAxdw','e2e-test-recommender','fXxAJ','2603120beWBpi','ranger','isDirectory','218780AGBcVn','HUfwk','catch','push','3114342DFrjpD','claude','vpMcT','16zUkxGK','opencode','match','project','1183986wDHcAb','2967706VEBNnh','feature-tracker','utf-8','\x20\x20Location:\x20','endsWith'];_0x4a3e=function(){return _0x3eb11e;};return _0x4a3e();}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=[_0x1682c5(0x1e4)];export const DEPRECATED_SKILLS=[_0x1682c5(0x1e1),'bug-bash',_0x1682c5(0x1d1)];export async function installSkill(_0x454302,_0x36e3fb={}){const _0x2ad494=_0x1682c5,_0x5176e0={'dbzqO':function(_0x1351ce,_0x5192a5,_0xb8b531){return _0x1351ce(_0x5192a5,_0xb8b531);},'fXxAJ':function(_0x3a92bd,_0x378165){return _0x3a92bd(_0x378165);},'aejTv':function(_0x3bc98b,_0x15868c){return _0x3bc98b(_0x15868c);},'IJLKM':function(_0x11419b,_0x23e74e,_0x4ad384){return _0x11419b(_0x23e74e,_0x4ad384);},'ptybK':function(_0x543a22,_0x1c8674,_0x2f1278){return _0x543a22(_0x1c8674,_0x2f1278);},'vpMcT':'SKILL.md','uvSVl':_0x2ad494(0x1d2),'zOEzW':function(_0x45cf4f,_0x31b0ef){return _0x45cf4f>_0x31b0ef;}},{level:level=_0x2ad494(0x1f0),cliVersion:_0x5f524b,platform:platform=_0x2ad494(0x1eb)}=_0x36e3fb,_0x42ff02=getSourceSkillsDir(),_0x375519=_0x5176e0[_0x2ad494(0x1d7)](join,_0x42ff02,_0x454302),_0x5317fc=join(_0x42ff02,_0x454302+'.md'),_0x5b6dfa=existsSync(_0x375519)&&statSync(_0x375519)[_0x2ad494(0x1e5)]()&&_0x5176e0['fXxAJ'](existsSync,join(_0x375519,'SKILL.md')),_0x4b1579=_0x5176e0[_0x2ad494(0x1da)](existsSync,_0x5317fc);if(!_0x5b6dfa&&!_0x4b1579)return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x454302),![];const _0xba1b1c=platform===_0x2ad494(0x1ee)?getOpencodeSkillsDir(level):_0x5176e0['fXxAJ'](getSkillsDir,level),_0x344485=_0x5176e0['IJLKM'](join,_0xba1b1c,_0x454302);await mkdir(_0x344485,{'recursive':!![]});let _0x33a083,_0x31aa3d=[];if(_0x5b6dfa){const _0xb87847=await _0x5176e0[_0x2ad494(0x1e2)](readdir,_0x375519),_0x35addc=_0xb87847['filter'](_0x13891b=>_0x13891b[_0x2ad494(0x1d4)]('.md'));for(const _0x249724 of _0x35addc){const _0x41e9b0=join(_0x375519,_0x249724),_0x3de9c2=_0x5176e0['IJLKM'](join,_0x344485,_0x249724);await copyFile(_0x41e9b0,_0x3de9c2),_0x31aa3d['push'](_0x249724);}_0x33a083=await _0x5176e0['ptybK'](readFile,_0x5176e0['ptybK'](join,_0x375519,_0x5176e0['vpMcT']),_0x5176e0['uvSVl']);}else{_0x33a083=await readFile(_0x5317fc,'utf-8');const _0xbb61ef=_0x5176e0['IJLKM'](join,_0x344485,_0x5176e0[_0x2ad494(0x1ec)]);await writeFile(_0xbb61ef,_0x33a083,_0x5176e0[_0x2ad494(0x1d6)]),_0x31aa3d[_0x2ad494(0x1e9)](_0x2ad494(0x1d5));}const {name:_0x2d8721}=parseFrontmatter(_0x33a083);return console[_0x2ad494(0x1dc)]('\x20\x20Installed\x20skill:\x20'+_0x2d8721),console['log'](_0x2ad494(0x1d3)+_0x344485),_0x5176e0['zOEzW'](_0x31aa3d['length'],0x1)&&console[_0x2ad494(0x1dc)]('\x20\x20Files:\x20'+_0x31aa3d[_0x2ad494(0x1d8)](',\x20')),logLocalAgentInstallation(_0x454302,{'skillDisplayName':_0x2d8721,'installLevel':level},_0x5f524b)[_0x2ad494(0x1e8)](()=>{}),!![];}function _0x28cb(_0x1e7c41,_0x2bb663){_0x1e7c41=_0x1e7c41-0x1d0;const _0x4a3e9c=_0x4a3e();let _0x28cb68=_0x4a3e9c[_0x1e7c41];return _0x28cb68;}function getSourceSkillsDir(){const _0x52d1bc=_0x1682c5,_0x23f228={'tgnDL':function(_0x531d03,_0x53979e,_0x254e5c,_0x222f68,_0x119a48){return _0x531d03(_0x53979e,_0x254e5c,_0x222f68,_0x119a48);},'QHpKW':function(_0xedc473,_0x32c6d0,_0x108f2f,_0x5363a8,_0x5327e5,_0x3bf223){return _0xedc473(_0x32c6d0,_0x108f2f,_0x5363a8,_0x5327e5,_0x3bf223);}},_0x59ea01=[_0x23f228['tgnDL'](join,__dirname,'..','..',_0x52d1bc(0x1dd)),_0x23f228[_0x52d1bc(0x1db)](join,__dirname,'..','..','..','skills')];for(const _0x17f634 of _0x59ea01){if(existsSync(_0x17f634))return _0x17f634;}return _0x59ea01[0x0];}function parseFrontmatter(_0x25397e){const _0x29bc9e=_0x1682c5,_0x52b8d4=_0x25397e['match'](/^---\n([\s\S]+?)\n---/);if(!_0x52b8d4)throw new Error('Invalid\x20skill\x20frontmatter');const _0x30b4fb=_0x52b8d4[0x1],_0x2f1fbe=_0x30b4fb[_0x29bc9e(0x1ef)](/name:\s*(.+)/),_0x4c38fa=_0x30b4fb['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x2f1fbe?.[0x1][_0x29bc9e(0x1df)]()||'','description':_0x4c38fa?.[0x1][_0x29bc9e(0x1df)]()||''};}export async function removeSkill(_0xaf4635,_0x578964){const _0xe9d264=_0x1682c5,_0x1aa4b4={'HUfwk':function(_0x20e432,_0x21bd36,_0x44b684){return _0x20e432(_0x21bd36,_0x44b684);},'rEcRN':function(_0x55967d,_0x387d12){return _0x55967d(_0x387d12);}},_0x283421=getSkillsDir(_0x578964),_0x74beec=_0x1aa4b4['HUfwk'](join,_0x283421,_0xaf4635);if(!_0x1aa4b4['rEcRN'](existsSync,_0x74beec))return![];try{return await _0x1aa4b4[_0xe9d264(0x1e7)](rm,_0x74beec,{'recursive':!![]}),console[_0xe9d264(0x1dc)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0xaf4635),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0xaf4635),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x170adf=_0x4341;(function(_0x9e81d9,_0x323c29){const _0x1e3c1f=_0x4341,_0x283422=_0x9e81d9();while(!![]){try{const _0x11689a=parseInt(_0x1e3c1f(0x125))/0x1*(parseInt(_0x1e3c1f(0x131))/0x2)+parseInt(_0x1e3c1f(0x121))/0x3+parseInt(_0x1e3c1f(0x165))/0x4+parseInt(_0x1e3c1f(0x150))/0x5*(-parseInt(_0x1e3c1f(0x15a))/0x6)+-parseInt(_0x1e3c1f(0x130))/0x7*(-parseInt(_0x1e3c1f(0x141))/0x8)+parseInt(_0x1e3c1f(0x120))/0x9*(-parseInt(_0x1e3c1f(0x153))/0xa)+-parseInt(_0x1e3c1f(0x138))/0xb;if(_0x11689a===_0x323c29)break;else _0x283422['push'](_0x283422['shift']());}catch(_0x5e4ba2){_0x283422['push'](_0x283422['shift']());}}}(_0x2b42,0xac485));function _0x4341(_0x259cbb,_0x322135){_0x259cbb=_0x259cbb-0x11f;const _0x2b4245=_0x2b42();let _0x434119=_0x2b4245[_0x259cbb];return _0x434119;}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(_0x2886f8,_0x3773e2){const _0x5763c6=_0x4341,_0x5d6f92={'kWywU':function(_0x3bf275,_0x1d38a6){return _0x3bf275&_0x1d38a6;},'wUDcX':function(_0x4a494a,_0x592186){return _0x4a494a+_0x592186;}};if(_0x3773e2>=_0x2886f8['length'])return[0x0,0x0];const _0x5d2e7c=_0x2886f8[_0x3773e2];let _0x4d310a=0x1,_0x40d4e9=0x80;while(_0x4d310a<=0x8&&!_0x5d6f92['kWywU'](_0x5d2e7c,_0x40d4e9)){_0x4d310a++,_0x40d4e9>>=0x1;}if(_0x3773e2+_0x4d310a>_0x2886f8[_0x5763c6(0x14f)])return[0x0,0x0];let _0x275542=_0x5d6f92['kWywU'](_0x5d2e7c,_0x40d4e9-0x1);for(let _0x4fb822=0x1;_0x4fb822<_0x4d310a;_0x4fb822++){_0x275542=_0x5d6f92[_0x5763c6(0x13b)](_0x275542*0x100,_0x2886f8[_0x3773e2+_0x4fb822]);}return[_0x275542,_0x4d310a];}function readId(_0x237cd2,_0x50b173){const _0x14ee18=_0x4341,_0x4a9ce8={'vGYwR':function(_0x3abbe2,_0x2f054a){return _0x3abbe2>=_0x2f054a;},'NNDTc':function(_0x2c594b,_0x3cc088){return _0x2c594b>=_0x3cc088;},'SdFxr':function(_0x359cb9,_0x408060){return _0x359cb9>=_0x408060;},'pvTwk':function(_0x293b11,_0x1c5d62){return _0x293b11>=_0x1c5d62;},'LDHcO':function(_0x11cf0c,_0x2321e9){return _0x11cf0c>_0x2321e9;},'TQwmK':function(_0x33de6c,_0x63284d){return _0x33de6c+_0x63284d;},'jBTuI':function(_0x1d8077,_0x42f41b){return _0x1d8077<_0x42f41b;}};if(_0x50b173>=_0x237cd2[_0x14ee18(0x14f)])return[0x0,0x0];const _0x1fe342=_0x237cd2[_0x50b173];let _0x2c886e;if(_0x4a9ce8[_0x14ee18(0x12b)](_0x1fe342,0x80))_0x2c886e=0x1;else{if(_0x4a9ce8['NNDTc'](_0x1fe342,0x40))_0x2c886e=0x2;else{if(_0x4a9ce8['SdFxr'](_0x1fe342,0x20))_0x2c886e=0x3;else{if(_0x4a9ce8['pvTwk'](_0x1fe342,0x10))_0x2c886e=0x4;else return[_0x1fe342,0x1];}}}if(_0x4a9ce8['LDHcO'](_0x4a9ce8['TQwmK'](_0x50b173,_0x2c886e),_0x237cd2['length']))return[0x0,0x0];let _0x153360=0x0;for(let _0x4b9477=0x0;_0x4a9ce8['jBTuI'](_0x4b9477,_0x2c886e);_0x4b9477++){_0x153360=_0x4a9ce8['TQwmK'](_0x153360*0x100,_0x237cd2[_0x4a9ce8['TQwmK'](_0x50b173,_0x4b9477)]);}return[_0x153360,_0x2c886e];}function readUint(_0x153abf,_0x4782e0,_0x597c56){const _0x69a06f={'JhSaM':function(_0x2cff61,_0x373b97){return _0x2cff61*_0x373b97;},'qdcrs':function(_0x49efdf,_0x11aae8){return _0x49efdf+_0x11aae8;}};let _0x1b6f00=0x0;for(let _0x3c49e4=0x0;_0x3c49e4<_0x597c56;_0x3c49e4++){_0x1b6f00=_0x69a06f['JhSaM'](_0x1b6f00,0x100)+_0x153abf[_0x69a06f['qdcrs'](_0x4782e0,_0x3c49e4)];}return _0x1b6f00;}function _0x2b42(){const _0x16e999=['FLAFn','has','EAuRY','4843244cMjACm','rGZWE','tatPm','Stitched\x20','LVacZ','AKJsR','51318MfECvv','2334771qQpAGo','Dmhpc','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','readInt16BE','53374MASifR','exit','iJFRY','OXwwI','RFveg','KRrLC','vGYwR','KAdVF','qyceh','\x20files\x20->\x20','xvuYq','98TyKSIz','4OmnTcc','AAcIE','copy','isNvI','gaAhr','oJIhY','KbGux','14679940DVjedB','argv','JiqLK','wUDcX','pow','alloc','tTtug','floor','TnzkX','650648jnveZq','concat','RhHJY','korZg','kisoc','ijsSU','WfEjv','maxTimestampTicks','IGHec','stitchWebmFiles.ts','gbwaM','stitchWebmFiles.js','pQvov','EJmXL','length','5hQzxPm','slice','log','1180jkDvDD','wuMPB','pKrLx','from','FxGUc','Lrrxo','uPqUL','3128430uKXcWw','Khffd','gpEYz','min','bodyAfterTimestamp','xTZYX','indexOf','drkdx'];_0x2b42=function(){return _0x16e999;};return _0x2b42();}function isUnknownSize(_0x5b1e5,_0x32aa30){const _0x138d55=_0x4341,_0x5e0b17={'xTZYX':function(_0x16d551,_0x10bbea){return _0x16d551===_0x10bbea;},'ijsSU':function(_0x5256bb,_0x12b100){return _0x5256bb-_0x12b100;}};return _0x5e0b17[_0x138d55(0x15f)](_0x5b1e5,_0x5e0b17[_0x138d55(0x146)](Math[_0x138d55(0x13c)](0x2,0x7*_0x32aa30),0x1));}function writeVint(_0x58d625,_0x22182a){const _0x58851f=_0x4341,_0x2021a0={'qImok':function(_0xa3b34c,_0x3487f6){return _0xa3b34c<_0x3487f6;},'WfEjv':function(_0x2e56a8,_0x3f2f39){return _0x2e56a8-_0x3f2f39;},'RehnG':function(_0x2be694,_0x1d8310){return _0x2be694*_0x1d8310;},'KbGux':function(_0x23ce12,_0x128ec7){return _0x23ce12>=_0x128ec7;},'nqJRk':function(_0x4bea47,_0x5a5482){return _0x4bea47&_0x5a5482;},'wuMPB':function(_0x368751,_0x17ef21){return _0x368751/_0x17ef21;},'Lrrxo':function(_0x1a22c1,_0x15c62c){return _0x1a22c1<<_0x15c62c;}};let _0x4786b2=_0x22182a||0x1;while(_0x2021a0['qImok'](_0x2021a0[_0x58851f(0x147)](Math['pow'](0x2,_0x2021a0['RehnG'](0x7,_0x4786b2)),0x2),_0x58d625))_0x4786b2++;const _0x42afab=Buffer['alloc'](_0x4786b2);for(let _0x5a58d4=_0x4786b2-0x1;_0x2021a0[_0x58851f(0x137)](_0x5a58d4,0x0);_0x5a58d4--){_0x42afab[_0x5a58d4]=_0x2021a0['nqJRk'](_0x58d625,0xff),_0x58d625=Math['floor'](_0x2021a0[_0x58851f(0x154)](_0x58d625,0x100));}return _0x42afab[0x0]|=_0x2021a0[_0x58851f(0x158)](0x1,0x8-_0x4786b2),_0x42afab;}function writeUint(_0x20782a,_0x2a8a4e){const _0xcb5b22=_0x4341,_0x486da9=Buffer[_0xcb5b22(0x13d)](_0x2a8a4e);for(let _0x392ea9=_0x2a8a4e-0x1;_0x392ea9>=0x0;_0x392ea9--){_0x486da9[_0x392ea9]=_0x20782a&0xff,_0x20782a=Math[_0xcb5b22(0x13f)](_0x20782a/0x100);}return _0x486da9;}function writeUnknownSizeVint(_0x24d848){const _0x121639=_0x4341,_0x4617ca={'tgrgd':function(_0x5a678f,_0x3be48f){return _0x5a678f>>_0x3be48f;}},_0x22a2f1=Buffer[_0x121639(0x13d)](_0x24d848,0xff);return _0x22a2f1[0x0]=_0x4617ca['tgrgd'](0xff,_0x24d848-0x1),_0x22a2f1;}function uintSize(_0x546b80){const _0x36a8b5=_0x4341,_0x3fa587={'dupML':function(_0x5ab6d3,_0x353814){return _0x5ab6d3===_0x353814;},'RFveg':function(_0x269817,_0x4bf4e4){return _0x269817>_0x4bf4e4;},'EJmXL':function(_0x243481,_0x800721){return _0x243481/_0x800721;}};if(_0x3fa587['dupML'](_0x546b80,0x0))return 0x1;let _0x1fdf00=0x0,_0x55a561=_0x546b80;while(_0x3fa587[_0x36a8b5(0x129)](_0x55a561,0x0)){_0x1fdf00++,_0x55a561=Math[_0x36a8b5(0x13f)](_0x3fa587[_0x36a8b5(0x14e)](_0x55a561,0x100));}return _0x1fdf00;}function findTimestampScale(_0x505c99,_0x258afe){const _0x531d61=_0x4341,_0x33c69d={'KAdVF':function(_0x599bf9,_0x299054){return _0x599bf9+_0x299054;},'pJHsv':function(_0x491159,_0x40f375){return _0x491159<_0x40f375;},'AziOX':function(_0x42b208,_0x544ac1,_0x4e026d){return _0x42b208(_0x544ac1,_0x4e026d);},'kisoc':function(_0xbc1c72,_0x3b602f){return _0xbc1c72===_0x3b602f;},'FxGUc':function(_0x5bdbda,_0x512f32,_0x2a654b){return _0x5bdbda(_0x512f32,_0x2a654b);},'oJIhY':function(_0x51b802,_0x467f73){return _0x51b802===_0x467f73;},'uPqUL':function(_0x452019,_0x46fee2,_0x477c89,_0x104e37){return _0x452019(_0x46fee2,_0x477c89,_0x104e37);},'KRrLC':function(_0x21c74c,_0x514da4){return _0x21c74c+_0x514da4;}};let _0x4e7edc=_0x258afe;const _0x3dbf91=Math['min'](_0x505c99['length'],_0x33c69d[_0x531d61(0x12c)](_0x258afe,0x2710));while(_0x33c69d['pJHsv'](_0x4e7edc,_0x3dbf91)){const [_0x27afc9,_0x27f6fb]=readId(_0x505c99,_0x4e7edc),[_0x3b18ad,_0x3f4b8f]=_0x33c69d['AziOX'](readVint,_0x505c99,_0x4e7edc+_0x27f6fb);if(_0x33c69d[_0x531d61(0x145)](_0x27afc9,ID_INFO)){let _0x33a28a=_0x4e7edc+_0x27f6fb+_0x3f4b8f;const _0x3b1588=_0x33c69d[_0x531d61(0x12c)](_0x33a28a,_0x3b18ad);while(_0x33a28a<_0x3b1588){const [_0x5160ce,_0x34ca16]=_0x33c69d[_0x531d61(0x157)](readId,_0x505c99,_0x33a28a),[_0x5382f6,_0x31dbf8]=readVint(_0x505c99,_0x33c69d[_0x531d61(0x12c)](_0x33a28a,_0x34ca16));if(_0x33c69d[_0x531d61(0x136)](_0x5160ce,ID_TIMESTAMP_SCALE))return _0x33c69d[_0x531d61(0x159)](readUint,_0x505c99,_0x33c69d['KAdVF'](_0x33a28a,_0x34ca16)+_0x31dbf8,_0x5382f6);_0x33a28a+=_0x33c69d[_0x531d61(0x12a)](_0x34ca16+_0x31dbf8,_0x5382f6);}break;}if(_0x27afc9===ID_CLUSTER)break;if(isUnknownSize(_0x3b18ad,_0x3f4b8f))break;_0x4e7edc+=_0x33c69d[_0x531d61(0x12c)](_0x27f6fb,_0x3f4b8f)+_0x3b18ad;}return 0xf4240;}function findFirstClusterOffset(_0x414a1f,_0x313d53){const _0x4eed38=_0x4341,_0x262a0e={'jOAGC':function(_0x398b7f,_0x50536f){return _0x398b7f<_0x50536f;},'tTtug':function(_0x104ded,_0x51c640,_0x43e4ba){return _0x104ded(_0x51c640,_0x43e4ba);},'pKrLx':function(_0x30cc40,_0x4dcaa9,_0x5e297d){return _0x30cc40(_0x4dcaa9,_0x5e297d);},'gpEYz':function(_0x1203af,_0x11bb18){return _0x1203af+_0x11bb18;}};let _0x135ebe=_0x313d53;while(_0x262a0e['jOAGC'](_0x135ebe,_0x414a1f['length'])){const [_0x470dab,_0x1f87c0]=_0x262a0e[_0x4eed38(0x13e)](readId,_0x414a1f,_0x135ebe);if(_0x470dab===ID_CLUSTER)return _0x135ebe;const [_0x37ada5,_0x2b3795]=_0x262a0e[_0x4eed38(0x155)](readVint,_0x414a1f,_0x135ebe+_0x1f87c0);if(isUnknownSize(_0x37ada5,_0x2b3795))return _0x135ebe;_0x135ebe+=_0x262a0e[_0x4eed38(0x15c)](_0x262a0e['gpEYz'](_0x1f87c0,_0x2b3795),_0x37ada5);}return _0x414a1f[_0x4eed38(0x14f)];}function findClusterEnd(_0x3acbb7,_0x4ba52f,_0x1dc3c9,_0x5cd310){const _0x3a20b7=_0x4341,_0x1f3668={'JRmRm':function(_0x3184e3,_0x3264ad,_0x46de70){return _0x3184e3(_0x3264ad,_0x46de70);},'kHInS':function(_0x71ae34,_0x51e316){return _0x71ae34<_0x51e316;},'ETonV':function(_0x3504be,_0x3e2fae,_0x15c6b7){return _0x3504be(_0x3e2fae,_0x15c6b7);},'TnzkX':function(_0x5a82aa,_0x39bb21,_0x21eb20){return _0x5a82aa(_0x39bb21,_0x21eb20);},'gjTBv':function(_0x23b71a,_0x159d24,_0x387162){return _0x23b71a(_0x159d24,_0x387162);},'yKUDr':function(_0x5ebda0,_0xf8f39){return _0x5ebda0+_0xf8f39;}};if(!_0x1f3668['JRmRm'](isUnknownSize,_0x1dc3c9,_0x5cd310))return _0x4ba52f+_0x1dc3c9;const _0x28af03=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x5c1871=_0x4ba52f;while(_0x1f3668['kHInS'](_0x5c1871,_0x3acbb7[_0x3a20b7(0x14f)]-0x4)){const [_0x410b7d,_0x43f80d]=_0x1f3668['ETonV'](readId,_0x3acbb7,_0x5c1871);if(_0x28af03[_0x3a20b7(0x163)](_0x410b7d))return _0x5c1871;const [_0xc95e48,_0x52964d]=_0x1f3668[_0x3a20b7(0x140)](readVint,_0x3acbb7,_0x5c1871+_0x43f80d);if(_0x1f3668['gjTBv'](isUnknownSize,_0xc95e48,_0x52964d))return _0x3acbb7['length'];_0x5c1871+=_0x1f3668['yKUDr'](_0x43f80d+_0x52964d,_0xc95e48);}return _0x3acbb7['length'];}function extractClusters(_0x3b5ded,_0x28f1c0){const _0x26acf4=_0x4341,_0x462de8={'GvwaW':function(_0x5d87e9,_0x2a18c7){return _0x5d87e9===_0x2a18c7;},'RhHJY':function(_0x127d98,_0x317e34,_0x20ed66){return _0x127d98(_0x317e34,_0x20ed66);},'hWXpK':function(_0x51049c,_0x6bcfcf){return _0x51049c+_0x6bcfcf;},'JXZMm':function(_0x584634,_0xd1e2bf,_0x36d4e4){return _0x584634(_0xd1e2bf,_0x36d4e4);},'drkdx':function(_0x29a058,_0x3c67a8){return _0x29a058+_0x3c67a8;},'OXwwI':function(_0x1d59f1,_0x202b31){return _0x1d59f1+_0x202b31;},'Avifn':function(_0x3ec3bb,_0x1b0e3c){return _0x3ec3bb+_0x1b0e3c;},'FsYjB':function(_0x5a4f4c,_0x4c2199){return _0x5a4f4c===_0x4c2199;},'mkUBn':function(_0x28bb1d,_0x2858e0,_0xe80cf1,_0x4eb0f8){return _0x28bb1d(_0x2858e0,_0xe80cf1,_0x4eb0f8);},'FLAFn':function(_0x4edc84,_0x5c4f58){return _0x4edc84+_0x5c4f58;},'qqiRI':function(_0x5e6073,_0x2e5f81){return _0x5e6073+_0x2e5f81;},'aOPCP':function(_0x4cc0fa,_0xce5b64,_0x31810b){return _0x4cc0fa(_0xce5b64,_0x31810b);},'IGHec':function(_0x44db10,_0x4242c0,_0x1cef23){return _0x44db10(_0x4242c0,_0x1cef23);},'BpNYn':function(_0x12466f,_0x51b185){return _0x12466f+_0x51b185;},'AAcIE':function(_0x165d07,_0xa42c0e){return _0x165d07+_0xa42c0e;},'korZg':function(_0x82402d,_0x2e7ae4){return _0x82402d>_0x2e7ae4;},'abhcu':function(_0x2f48a1,_0x3ba705,_0x5c59c4){return _0x2f48a1(_0x3ba705,_0x5c59c4);}},_0x153cca=[],_0x85564c=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x2d8f9d=0x0;while(_0x2d8f9d<_0x3b5ded[_0x26acf4(0x14f)]){const _0x54eac6=_0x3b5ded[_0x26acf4(0x160)](_0x85564c,_0x2d8f9d);if(_0x462de8['GvwaW'](_0x54eac6,-0x1))break;const [_0x1509ad,_0x199ae4]=_0x462de8['RhHJY'](readId,_0x3b5ded,_0x54eac6);if(_0x1509ad!==ID_CLUSTER){_0x2d8f9d=_0x462de8['hWXpK'](_0x54eac6,0x1);continue;}const [_0x2f8a26,_0x4590b7]=_0x462de8['JXZMm'](readVint,_0x3b5ded,_0x462de8[_0x26acf4(0x161)](_0x54eac6,_0x199ae4)),_0x308a76=_0x462de8[_0x26acf4(0x128)](_0x54eac6+_0x199ae4,_0x4590b7),_0x436adb=findClusterEnd(_0x3b5ded,_0x308a76,_0x2f8a26,_0x4590b7);let _0x5e4598=_0x308a76,_0x2463a6=0x0,_0x57ce44=0x2,_0x56e580=![],_0x48ac4b=Buffer[_0x26acf4(0x13d)](0x0),_0x1586e0=Buffer['alloc'](0x0);while(_0x5e4598<_0x436adb){const [_0x4e09fd,_0xbb783]=readId(_0x3b5ded,_0x5e4598),[_0x509cac,_0x17dd02]=readVint(_0x3b5ded,_0x462de8['Avifn'](_0x5e4598,_0xbb783));if(_0x462de8['FsYjB'](_0x4e09fd,ID_TIMESTAMP)){_0x2463a6=_0x462de8['mkUBn'](readUint,_0x3b5ded,_0x462de8[_0x26acf4(0x162)](_0x5e4598,_0xbb783)+_0x17dd02,_0x509cac),_0x57ce44=_0x509cac,_0x56e580=!![],_0x48ac4b=_0x3b5ded['slice'](_0x308a76,_0x5e4598);const _0x238045=_0x462de8['qqiRI'](_0x5e4598+_0xbb783+_0x17dd02,_0x509cac);_0x1586e0=_0x3b5ded['slice'](_0x238045,_0x436adb);break;}if(_0x4e09fd===ID_CLUSTER)break;if(_0x462de8['aOPCP'](isUnknownSize,_0x509cac,_0x17dd02))break;_0x5e4598+=_0xbb783+_0x17dd02+_0x509cac;}!_0x56e580&&(_0x1586e0=_0x3b5ded[_0x26acf4(0x151)](_0x308a76,_0x436adb));let _0x2bfcca=_0x2463a6;_0x5e4598=_0x308a76;while(_0x5e4598<_0x436adb){const [_0x31229d,_0x43196d]=_0x462de8[_0x26acf4(0x149)](readId,_0x3b5ded,_0x5e4598),[_0x36b0ea,_0x4eff5c]=_0x462de8[_0x26acf4(0x143)](readVint,_0x3b5ded,_0x5e4598+_0x43196d);if(_0x31229d===ID_SIMPLE_BLOCK&&_0x36b0ea>=0x4){const _0x6cc528=_0x462de8['BpNYn'](_0x462de8[_0x26acf4(0x132)](_0x5e4598,_0x43196d),_0x4eff5c),[,_0x2bb384]=readVint(_0x3b5ded,_0x6cc528),_0x55b4b7=_0x3b5ded[_0x26acf4(0x124)](_0x6cc528+_0x2bb384),_0x207f41=_0x462de8['qqiRI'](_0x2463a6,_0x55b4b7);if(_0x462de8[_0x26acf4(0x144)](_0x207f41,_0x2bfcca))_0x2bfcca=_0x207f41;}if(_0x31229d===ID_CLUSTER)break;if(_0x462de8['abhcu'](isUnknownSize,_0x36b0ea,_0x4eff5c))break;_0x5e4598+=_0x462de8['FLAFn'](_0x43196d,_0x4eff5c)+_0x36b0ea;}_0x153cca['push']({'timestamp':_0x2463a6,'maxTicks':_0x2bfcca,'bodyBeforeTimestamp':_0x48ac4b,'bodyAfterTimestamp':_0x1586e0,'timestampElementSize':_0x57ce44}),_0x2d8f9d=_0x436adb;}return _0x153cca;}function parseWebm(_0x525b34){const _0xcca355=_0x4341,_0x41a7da={'iJFRY':function(_0x2fec67,_0x438ac0,_0x379e4e){return _0x2fec67(_0x438ac0,_0x379e4e);},'AKJsR':function(_0x19aba3,_0x470cae,_0x249363){return _0x19aba3(_0x470cae,_0x249363);},'JiqLK':function(_0x5916f6,_0x20ee05){return _0x5916f6+_0x20ee05;},'JxnJo':function(_0x12294f,_0x598b77){return _0x12294f+_0x598b77;},'EAuRY':function(_0x4095e9,_0x21659f){return _0x4095e9!==_0x21659f;},'Khffd':function(_0xda0ec5,_0x27d5c7,_0x2efda9){return _0xda0ec5(_0x27d5c7,_0x2efda9);},'pQvov':function(_0x557872,_0x1c40dc,_0x3f80b0){return _0x557872(_0x1c40dc,_0x3f80b0);}};let _0x5c00f2=0x0;const [,_0x399edf]=_0x41a7da[_0xcca355(0x127)](readId,_0x525b34,_0x5c00f2),[_0x362a30,_0x27bac2]=_0x41a7da[_0xcca355(0x11f)](readVint,_0x525b34,_0x41a7da[_0xcca355(0x13a)](_0x5c00f2,_0x399edf));_0x5c00f2+=_0x41a7da['JiqLK'](_0x41a7da['JxnJo'](_0x399edf,_0x27bac2),_0x362a30);const [_0x1b3631,_0x36f131]=readId(_0x525b34,_0x5c00f2);if(_0x41a7da[_0xcca355(0x164)](_0x1b3631,ID_SEGMENT))return null;const [,_0x114847]=_0x41a7da[_0xcca355(0x11f)](readVint,_0x525b34,_0x5c00f2+_0x36f131),_0x95c41d=_0x5c00f2+_0x36f131+_0x114847,_0x1ae25c=_0x41a7da[_0xcca355(0x15b)](findTimestampScale,_0x525b34,_0x95c41d),_0x993dd3=_0x41a7da[_0xcca355(0x14d)](findFirstClusterOffset,_0x525b34,_0x95c41d),_0x58d821=_0x525b34['slice'](0x0,_0x993dd3),_0x16a7d8=extractClusters(_0x525b34,_0x1ae25c);let _0x237939=0x0;for(const _0x5cb32a of _0x16a7d8){if(_0x5cb32a['maxTicks']>_0x237939)_0x237939=_0x5cb32a['maxTicks'];}return{'header':_0x58d821,'clusters':_0x16a7d8,'timestampScale':_0x1ae25c,'maxTimestampTicks':_0x237939};}function buildCluster(_0x75e37f,_0x37a5a7,_0x521b7d){const _0x3ae0d4=_0x4341,_0x484459={'isNvI':function(_0x517878,_0x38d0d1,_0x5ea9ba){return _0x517878(_0x38d0d1,_0x5ea9ba);}},_0x298518=Buffer[_0x3ae0d4(0x156)]([0x1f,0x43,0xb6,0x75]),_0x267a46=Math['max'](0x4,uintSize(_0x75e37f)),_0x472966=Buffer[_0x3ae0d4(0x142)]([Buffer[_0x3ae0d4(0x156)]([ID_TIMESTAMP]),writeVint(_0x267a46),_0x484459[_0x3ae0d4(0x134)](writeUint,_0x75e37f,_0x267a46)]),_0x205fbf=Buffer['concat']([_0x37a5a7,_0x472966,_0x521b7d]),_0x5cc880=writeVint(_0x205fbf['length']);return Buffer[_0x3ae0d4(0x142)]([_0x298518,_0x5cc880,_0x205fbf]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2b1e67){const _0x2b7842=_0x4341,_0x31d326={'Dmhpc':function(_0x5a56e2,_0x487631,_0x38f375){return _0x5a56e2(_0x487631,_0x38f375);},'BHiHP':function(_0xc8cf0d,_0x54b1e1){return _0xc8cf0d(_0x54b1e1);},'rGZWE':function(_0x46f5fc,_0x16b17a){return _0x46f5fc+_0x16b17a;},'MWGeM':function(_0x144828,_0x11a2e1){return _0x144828<_0x11a2e1;},'xvuYq':function(_0x2fe845,_0x3be2fa){return _0x2fe845===_0x3be2fa;},'gaAhr':function(_0x12115a,_0x519191){return _0x12115a+_0x519191;},'cgFYZ':function(_0x11ee90,_0x4c2ea1){return _0x11ee90!==_0x4c2ea1;},'qyceh':function(_0x44f3cb,_0x4768a7){return _0x44f3cb+_0x4768a7;},'tatPm':function(_0x105407,_0x5f4bb2){return _0x105407+_0x5f4bb2;},'fzzvf':function(_0x24fc9d,_0x132e59,_0x4812a0){return _0x24fc9d(_0x132e59,_0x4812a0);},'LVacZ':function(_0xefbf2f,_0x484fe3){return _0xefbf2f+_0x484fe3;}},_0xc4ab5b=Buffer['from'](_0x2b1e67);let _0x4a185e=0x0;const [,_0x27f115]=readId(_0xc4ab5b,_0x4a185e),[_0x16e041,_0x131d52]=_0x31d326['Dmhpc'](readVint,_0xc4ab5b,_0x4a185e+_0x27f115),_0x5083a4=_0x4a185e+_0x27f115+_0x131d52+_0x16e041,[,_0x5cbf37]=_0x31d326[_0x2b7842(0x122)](readId,_0xc4ab5b,_0x5083a4),[,_0x23c2ae]=readVint(_0xc4ab5b,_0x5083a4+_0x5cbf37),_0x59e005=_0x5083a4+_0x5cbf37+_0x23c2ae,_0x575874=_0x31d326['BHiHP'](writeUnknownSizeVint,_0x23c2ae);_0x575874[_0x2b7842(0x133)](_0xc4ab5b,_0x31d326[_0x2b7842(0x166)](_0x5083a4,_0x5cbf37));let _0x19c7da=_0x59e005;const _0x4ecbd8=Math[_0x2b7842(0x15d)](_0xc4ab5b[_0x2b7842(0x14f)],_0x59e005+0x2710);while(_0x31d326['MWGeM'](_0x19c7da,_0x4ecbd8)){const [_0x12731d,_0x11d63d]=_0x31d326['Dmhpc'](readId,_0xc4ab5b,_0x19c7da),[_0x3914af,_0x1d32bc]=readVint(_0xc4ab5b,_0x31d326['rGZWE'](_0x19c7da,_0x11d63d));if(_0x31d326[_0x2b7842(0x12f)](_0x12731d,ID_CLUSTER))break;if(isUnknownSize(_0x3914af,_0x1d32bc))break;if(_0x31d326['xvuYq'](_0x12731d,ID_INFO)){const _0x409bb8=_0x31d326['rGZWE'](_0x31d326[_0x2b7842(0x135)](_0x19c7da,_0x11d63d),_0x1d32bc),_0x2f2074=_0x31d326[_0x2b7842(0x135)](_0x409bb8,_0x3914af),_0x55b999=[];let _0x458b9c=_0x409bb8;while(_0x458b9c<_0x2f2074){const [_0x5ca2b2,_0x2341ec]=readId(_0xc4ab5b,_0x458b9c),[_0x268237,_0x145658]=_0x31d326[_0x2b7842(0x122)](readVint,_0xc4ab5b,_0x458b9c+_0x2341ec),_0x4e071b=_0x31d326[_0x2b7842(0x135)](_0x2341ec+_0x145658,_0x268237);_0x31d326['cgFYZ'](_0x5ca2b2,ID_DURATION)&&_0x55b999['push'](_0xc4ab5b['slice'](_0x458b9c,_0x31d326[_0x2b7842(0x12d)](_0x458b9c,_0x4e071b))),_0x458b9c+=_0x4e071b;}const _0xb76fb3=Buffer[_0x2b7842(0x142)](_0x55b999),_0x4d3d25=Buffer[_0x2b7842(0x142)]([_0xc4ab5b[_0x2b7842(0x151)](_0x19c7da,_0x31d326[_0x2b7842(0x167)](_0x19c7da,_0x11d63d)),_0x31d326['fzzvf'](writeVint,_0xb76fb3[_0x2b7842(0x14f)],_0x1d32bc)]);return Buffer[_0x2b7842(0x142)]([_0xc4ab5b['slice'](0x0,_0x19c7da),_0x4d3d25,_0xb76fb3,_0xc4ab5b['slice'](_0x2f2074)]);}_0x19c7da+=_0x31d326[_0x2b7842(0x169)](_0x11d63d+_0x1d32bc,_0x3914af);}return _0xc4ab5b;}export function stitchWebmFiles(_0x13316f,_0x48ab5d){const _0x1fc6d4=_0x4341,_0x33df0f={'cLNTP':function(_0x14efb2,_0x3b2232){return _0x14efb2<=_0x3b2232;},'gbwaM':function(_0x537eb1,_0x123eb8){return _0x537eb1+_0x123eb8;},'RdEYT':function(_0x4a5d99,_0x3cfd31){return _0x4a5d99+_0x3cfd31;},'qdJxU':function(_0x5c3a0f,_0x4c5305,_0x498b19){return _0x5c3a0f(_0x4c5305,_0x498b19);}};if(_0x33df0f['cLNTP'](_0x13316f[_0x1fc6d4(0x14f)],0x1))return![];const _0x231f08=[];for(const _0x188b32 of _0x13316f){const _0x28bff7=readFileSync(_0x188b32),_0x165f15=parseWebm(_0x28bff7);if(!_0x165f15||_0x165f15['clusters']['length']===0x0)return![];_0x231f08['push'](_0x165f15);}const _0x56149d=_0x231f08[0x0],_0x5b9c73=rebuildHeaderWithoutDuration(_0x56149d['header']),_0x1cd927=[_0x5b9c73];let _0x1a99eb=0x0;for(let _0x38a18c=0x0;_0x38a18c<_0x231f08[_0x1fc6d4(0x14f)];_0x38a18c++){const _0x2b7829=_0x231f08[_0x38a18c];for(const _0x41628c of _0x2b7829['clusters']){const _0x542995=_0x33df0f[_0x1fc6d4(0x14b)](_0x41628c['timestamp'],_0x1a99eb);_0x1cd927['push'](buildCluster(_0x542995,_0x41628c['bodyBeforeTimestamp'],_0x41628c[_0x1fc6d4(0x15e)]));}const _0x2c2c75=0x1e;_0x1a99eb+=_0x33df0f['RdEYT'](_0x2b7829[_0x1fc6d4(0x148)],_0x2c2c75);}return _0x33df0f['qdJxU'](writeFileSync,_0x48ab5d,Buffer['concat'](_0x1cd927)),!![];}if(process[_0x170adf(0x139)][0x1]?.['endsWith'](_0x170adf(0x14a))||process['argv'][0x1]?.['endsWith'](_0x170adf(0x14c))){const args=process[_0x170adf(0x139)]['slice'](0x2);args[_0x170adf(0x14f)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x170adf(0x126)](0x1));const output=args[args[_0x170adf(0x14f)]-0x1],inputs=args[_0x170adf(0x151)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x170adf(0x152)](_0x170adf(0x168)+inputs[_0x170adf(0x14f)]+_0x170adf(0x12e)+output):console[_0x170adf(0x152)](_0x170adf(0x123));}
|
|
1
|
+
const _0xda9280=_0x3ff6;(function(_0x19893d,_0x4f53ce){const _0xb20585=_0x3ff6,_0x7fdd17=_0x19893d();while(!![]){try{const _0x498cc9=parseInt(_0xb20585(0xd9))/0x1*(-parseInt(_0xb20585(0xa6))/0x2)+parseInt(_0xb20585(0xc9))/0x3*(-parseInt(_0xb20585(0xda))/0x4)+parseInt(_0xb20585(0x99))/0x5+-parseInt(_0xb20585(0xb4))/0x6*(parseInt(_0xb20585(0x9d))/0x7)+-parseInt(_0xb20585(0xc6))/0x8*(parseInt(_0xb20585(0xd1))/0x9)+parseInt(_0xb20585(0xc0))/0xa+parseInt(_0xb20585(0xb0))/0xb;if(_0x498cc9===_0x4f53ce)break;else _0x7fdd17['push'](_0x7fdd17['shift']());}catch(_0x791704){_0x7fdd17['push'](_0x7fdd17['shift']());}}}(_0x3f58,0x32871));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 _0x3ff6(_0x209eab,_0x5dae74){_0x209eab=_0x209eab-0x91;const _0x3f580c=_0x3f58();let _0x3ff6f6=_0x3f580c[_0x209eab];return _0x3ff6f6;}function readVint(_0xe796af,_0x4ab385){const _0x474f8c=_0x3ff6,_0x39c640={'WgTvi':function(_0x4309cf,_0x50ef54){return _0x4309cf>=_0x50ef54;},'VYEKR':function(_0x157d99,_0x21f67f){return _0x157d99-_0x21f67f;}};if(_0x39c640['WgTvi'](_0x4ab385,_0xe796af[_0x474f8c(0xc5)]))return[0x0,0x0];const _0x4728df=_0xe796af[_0x4ab385];let _0x442994=0x1,_0x1d49f1=0x80;while(_0x442994<=0x8&&!(_0x4728df&_0x1d49f1)){_0x442994++,_0x1d49f1>>=0x1;}if(_0x4ab385+_0x442994>_0xe796af[_0x474f8c(0xc5)])return[0x0,0x0];let _0x150d34=_0x4728df&_0x39c640[_0x474f8c(0xaa)](_0x1d49f1,0x1);for(let _0x588056=0x1;_0x588056<_0x442994;_0x588056++){_0x150d34=_0x150d34*0x100+_0xe796af[_0x4ab385+_0x588056];}return[_0x150d34,_0x442994];}function readId(_0x557fcc,_0x408855){const _0x20f5e6=_0x3ff6,_0x192699={'rUMus':function(_0x2911e3,_0x410a1d){return _0x2911e3>=_0x410a1d;},'ZvhoO':function(_0x1f257a,_0x16f3ee){return _0x1f257a+_0x16f3ee;},'JquTE':function(_0x41df9a,_0xd5e87c){return _0x41df9a<_0xd5e87c;},'SCwab':function(_0x3e1cef,_0x5d5dd5){return _0x3e1cef+_0x5d5dd5;},'YxKaG':function(_0x3d75a3,_0x5245a4){return _0x3d75a3*_0x5245a4;}};if(_0x192699['rUMus'](_0x408855,_0x557fcc[_0x20f5e6(0xc5)]))return[0x0,0x0];const _0x409c5a=_0x557fcc[_0x408855];let _0x5e6a94;if(_0x409c5a>=0x80)_0x5e6a94=0x1;else{if(_0x192699[_0x20f5e6(0xd5)](_0x409c5a,0x40))_0x5e6a94=0x2;else{if(_0x192699['rUMus'](_0x409c5a,0x20))_0x5e6a94=0x3;else{if(_0x409c5a>=0x10)_0x5e6a94=0x4;else return[_0x409c5a,0x1];}}}if(_0x192699[_0x20f5e6(0xde)](_0x408855,_0x5e6a94)>_0x557fcc['length'])return[0x0,0x0];let _0x12ccb2=0x0;for(let _0x1f385d=0x0;_0x192699[_0x20f5e6(0xae)](_0x1f385d,_0x5e6a94);_0x1f385d++){_0x12ccb2=_0x192699[_0x20f5e6(0xb5)](_0x192699[_0x20f5e6(0xbf)](_0x12ccb2,0x100),_0x557fcc[_0x408855+_0x1f385d]);}return[_0x12ccb2,_0x5e6a94];}function readUint(_0xe3b6a,_0x3253dc,_0x389624){const _0x137841=_0x3ff6,_0x4f5b67={'ZVrut':function(_0x2e868f,_0x1d5f71){return _0x2e868f<_0x1d5f71;},'JfxBW':function(_0x5a7de5,_0x4302ca){return _0x5a7de5+_0x4302ca;}};let _0x45450a=0x0;for(let _0x57a90b=0x0;_0x4f5b67['ZVrut'](_0x57a90b,_0x389624);_0x57a90b++){_0x45450a=_0x4f5b67[_0x137841(0xd3)](_0x45450a*0x100,_0xe3b6a[_0x3253dc+_0x57a90b]);}return _0x45450a;}function isUnknownSize(_0xcc6655,_0x7bd7d9){const _0x195cab=_0x3ff6,_0xd5f371={'rTDRe':function(_0x5e86a4,_0x236c5b){return _0x5e86a4===_0x236c5b;}};return _0xd5f371['rTDRe'](_0xcc6655,Math[_0x195cab(0x97)](0x2,0x7*_0x7bd7d9)-0x1);}function writeVint(_0x47efe1,_0x32349f){const _0x517595=_0x3ff6,_0x10ea37={'ZwGyu':function(_0x463be7,_0x348100){return _0x463be7||_0x348100;},'wiSXe':function(_0x1634b8,_0x519384){return _0x1634b8<_0x519384;},'eECXe':function(_0x4b5bfe,_0x4091b6){return _0x4b5bfe-_0x4091b6;},'YqRDm':function(_0x4760c5,_0xf8fa9){return _0x4760c5>=_0xf8fa9;},'yYHlc':function(_0x1d4d87,_0x37d1c1){return _0x1d4d87<<_0x37d1c1;}};let _0x14e07f=_0x10ea37['ZwGyu'](_0x32349f,0x1);while(_0x10ea37[_0x517595(0xcf)](Math['pow'](0x2,0x7*_0x14e07f)-0x2,_0x47efe1))_0x14e07f++;const _0x290d9f=Buffer['alloc'](_0x14e07f);for(let _0x156972=_0x10ea37['eECXe'](_0x14e07f,0x1);_0x10ea37[_0x517595(0xd7)](_0x156972,0x0);_0x156972--){_0x290d9f[_0x156972]=_0x47efe1&0xff,_0x47efe1=Math[_0x517595(0xcd)](_0x47efe1/0x100);}return _0x290d9f[0x0]|=_0x10ea37['yYHlc'](0x1,_0x10ea37[_0x517595(0xba)](0x8,_0x14e07f)),_0x290d9f;}function writeUint(_0x22b129,_0x3e41d5){const _0x1157a8=_0x3ff6,_0x2640e3={'DGQEc':function(_0x28fe4d,_0x12173c){return _0x28fe4d>=_0x12173c;}},_0x273845=Buffer[_0x1157a8(0xb9)](_0x3e41d5);for(let _0x231f4d=_0x3e41d5-0x1;_0x2640e3['DGQEc'](_0x231f4d,0x0);_0x231f4d--){_0x273845[_0x231f4d]=_0x22b129&0xff,_0x22b129=Math[_0x1157a8(0xcd)](_0x22b129/0x100);}return _0x273845;}function writeUnknownSizeVint(_0x1c6046){const _0x12559d=_0x3ff6,_0x23a4be={'FBdqk':function(_0x3f9894,_0x3e81c1){return _0x3f9894>>_0x3e81c1;}},_0x202279=Buffer['alloc'](_0x1c6046,0xff);return _0x202279[0x0]=_0x23a4be[_0x12559d(0x9c)](0xff,_0x1c6046-0x1),_0x202279;}function uintSize(_0x449503){if(_0x449503===0x0)return 0x1;let _0x1eb76d=0x0,_0x123f02=_0x449503;while(_0x123f02>0x0){_0x1eb76d++,_0x123f02=Math['floor'](_0x123f02/0x100);}return _0x1eb76d;}function findTimestampScale(_0x584475,_0x5ebb74){const _0x3fac1c=_0x3ff6,_0x4fd7f9={'OGnzu':function(_0x49da5e,_0x4fedbb){return _0x49da5e<_0x4fedbb;},'fthnE':function(_0x4603cc,_0x299b60,_0x5b2b19){return _0x4603cc(_0x299b60,_0x5b2b19);},'MlIAS':function(_0x1b1a9e,_0x58c504){return _0x1b1a9e+_0x58c504;},'kSZcT':function(_0x3f45ab,_0x182f8b){return _0x3f45ab===_0x182f8b;},'wmaFh':function(_0x69e2fe,_0xd1217a){return _0x69e2fe+_0xd1217a;},'GptdM':function(_0x1a7725,_0x2738ce,_0x51d3a8){return _0x1a7725(_0x2738ce,_0x51d3a8);},'ZUhvq':function(_0x1a860c,_0x3659e4){return _0x1a860c===_0x3659e4;},'MlUeA':function(_0x326618,_0x231043){return _0x326618+_0x231043;}};let _0x15daa9=_0x5ebb74;const _0x39bd18=Math['min'](_0x584475[_0x3fac1c(0xc5)],_0x5ebb74+0x2710);while(_0x4fd7f9[_0x3fac1c(0xab)](_0x15daa9,_0x39bd18)){const [_0x4906e4,_0x294446]=readId(_0x584475,_0x15daa9),[_0x3277e7,_0x325c42]=_0x4fd7f9['fthnE'](readVint,_0x584475,_0x4fd7f9['MlIAS'](_0x15daa9,_0x294446));if(_0x4fd7f9['kSZcT'](_0x4906e4,ID_INFO)){let _0x540cf2=_0x4fd7f9['wmaFh'](_0x15daa9+_0x294446,_0x325c42);const _0x473db0=_0x540cf2+_0x3277e7;while(_0x540cf2<_0x473db0){const [_0x34d794,_0x5b7e17]=_0x4fd7f9[_0x3fac1c(0xa2)](readId,_0x584475,_0x540cf2),[_0x154200,_0x366bbf]=_0x4fd7f9['fthnE'](readVint,_0x584475,_0x4fd7f9[_0x3fac1c(0xd8)](_0x540cf2,_0x5b7e17));if(_0x4fd7f9['ZUhvq'](_0x34d794,ID_TIMESTAMP_SCALE))return readUint(_0x584475,_0x540cf2+_0x5b7e17+_0x366bbf,_0x154200);_0x540cf2+=_0x4fd7f9[_0x3fac1c(0xc7)](_0x5b7e17+_0x366bbf,_0x154200);}break;}if(_0x4906e4===ID_CLUSTER)break;if(isUnknownSize(_0x3277e7,_0x325c42))break;_0x15daa9+=_0x4fd7f9[_0x3fac1c(0xc7)](_0x294446+_0x325c42,_0x3277e7);}return 0xf4240;}function findFirstClusterOffset(_0x285765,_0x17a58d){const _0x44348d=_0x3ff6,_0x404190={'awpnk':function(_0x2830b9,_0x2744d1){return _0x2830b9<_0x2744d1;},'JhODP':function(_0x2d7a94,_0x354eb8,_0x2ae9fa){return _0x2d7a94(_0x354eb8,_0x2ae9fa);},'rQUce':function(_0x410222,_0x69990a){return _0x410222+_0x69990a;}};let _0x4547c0=_0x17a58d;while(_0x404190['awpnk'](_0x4547c0,_0x285765['length'])){const [_0xdb2d02,_0x4ff282]=_0x404190['JhODP'](readId,_0x285765,_0x4547c0);if(_0xdb2d02===ID_CLUSTER)return _0x4547c0;const [_0x2d90f9,_0x14d925]=_0x404190['JhODP'](readVint,_0x285765,_0x4547c0+_0x4ff282);if(isUnknownSize(_0x2d90f9,_0x14d925))return _0x4547c0;_0x4547c0+=_0x404190[_0x44348d(0x98)](_0x4ff282,_0x14d925)+_0x2d90f9;}return _0x285765['length'];}function findClusterEnd(_0x10c996,_0x3f7fc0,_0x3b05fd,_0x2aeab4){const _0x1dd883=_0x3ff6,_0x10d543={'Wrfym':function(_0x27add8,_0x35d96a){return _0x27add8+_0x35d96a;},'ZTHjd':function(_0x55e4da,_0x484dff){return _0x55e4da-_0x484dff;},'kZRSv':function(_0x2d0010,_0x28691d,_0x1035ee){return _0x2d0010(_0x28691d,_0x1035ee);},'iSVaP':function(_0x3c0482,_0x596973,_0x361bd0){return _0x3c0482(_0x596973,_0x361bd0);},'bUCGT':function(_0x54b1a9,_0x3030cc){return _0x54b1a9+_0x3030cc;},'sJuNd':function(_0xfdd247,_0x5a825a){return _0xfdd247+_0x5a825a;}};if(!isUnknownSize(_0x3b05fd,_0x2aeab4))return _0x10d543['Wrfym'](_0x3f7fc0,_0x3b05fd);const _0x26e5e0=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x89ea34=_0x3f7fc0;while(_0x89ea34<_0x10d543[_0x1dd883(0xa0)](_0x10c996[_0x1dd883(0xc5)],0x4)){const [_0x56c9d8,_0x1ffaa1]=_0x10d543[_0x1dd883(0xad)](readId,_0x10c996,_0x89ea34);if(_0x26e5e0[_0x1dd883(0xa3)](_0x56c9d8))return _0x89ea34;const [_0x3567a0,_0x351a26]=_0x10d543[_0x1dd883(0xdb)](readVint,_0x10c996,_0x10d543['bUCGT'](_0x89ea34,_0x1ffaa1));if(isUnknownSize(_0x3567a0,_0x351a26))return _0x10c996['length'];_0x89ea34+=_0x10d543['sJuNd'](_0x1ffaa1,_0x351a26)+_0x3567a0;}return _0x10c996[_0x1dd883(0xc5)];}function extractClusters(_0x46350d,_0x353d99){const _0x127bfa=_0x3ff6,_0x36a6c5={'BZgLG':function(_0x4d0526,_0x280a45){return _0x4d0526<_0x280a45;},'PFHMy':function(_0xac41f9,_0x4f6741){return _0xac41f9===_0x4f6741;},'kiOKe':function(_0x93fc90,_0x52fbf7,_0xa14f88){return _0x93fc90(_0x52fbf7,_0xa14f88);},'UFMLU':function(_0x333665,_0x3d66c6){return _0x333665!==_0x3d66c6;},'ZhXhY':function(_0x2c3301,_0x4dc9be){return _0x2c3301+_0x4dc9be;},'EdZgO':function(_0x4d5360,_0x265d88){return _0x4d5360+_0x265d88;},'biVqX':function(_0x39b2f8,_0x4c2ea1){return _0x39b2f8+_0x4c2ea1;},'Jerij':function(_0x362427,_0x557091){return _0x362427+_0x557091;},'iEHxa':function(_0x174c37,_0xf0c07d){return _0x174c37+_0xf0c07d;},'wzMzA':function(_0x27167b,_0x82980a){return _0x27167b===_0x82980a;},'MPkjB':function(_0x5e4b13,_0x4f650d,_0x47bc96){return _0x5e4b13(_0x4f650d,_0x47bc96);},'MEunf':function(_0x26256d,_0x4d0c79){return _0x26256d+_0x4d0c79;}},_0x2acaa7=[],_0x1180f9=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0xaab0ac=0x0;while(_0x36a6c5[_0x127bfa(0x93)](_0xaab0ac,_0x46350d[_0x127bfa(0xc5)])){const _0x439269=_0x46350d[_0x127bfa(0xc3)](_0x1180f9,_0xaab0ac);if(_0x36a6c5[_0x127bfa(0xce)](_0x439269,-0x1))break;const [_0xe20b17,_0x3a4022]=_0x36a6c5[_0x127bfa(0xb6)](readId,_0x46350d,_0x439269);if(_0x36a6c5['UFMLU'](_0xe20b17,ID_CLUSTER)){_0xaab0ac=_0x36a6c5['ZhXhY'](_0x439269,0x1);continue;}const [_0x4ac80b,_0x123fe2]=readVint(_0x46350d,_0x36a6c5[_0x127bfa(0x9b)](_0x439269,_0x3a4022)),_0xcaaa8d=_0x36a6c5['biVqX'](_0x439269+_0x3a4022,_0x123fe2),_0x114150=findClusterEnd(_0x46350d,_0xcaaa8d,_0x4ac80b,_0x123fe2);let _0x36c632=_0xcaaa8d,_0x173c21=0x0,_0x4d73c8=0x2,_0x2fd1cf=![],_0x1bc798=Buffer['alloc'](0x0),_0x48cd99=Buffer['alloc'](0x0);while(_0x36a6c5['BZgLG'](_0x36c632,_0x114150)){const [_0x41c8cc,_0x18686]=readId(_0x46350d,_0x36c632),[_0x300549,_0x4d5cce]=_0x36a6c5['kiOKe'](readVint,_0x46350d,_0x36c632+_0x18686);if(_0x41c8cc===ID_TIMESTAMP){_0x173c21=readUint(_0x46350d,_0x36a6c5[_0x127bfa(0x9b)](_0x36a6c5['Jerij'](_0x36c632,_0x18686),_0x4d5cce),_0x300549),_0x4d73c8=_0x300549,_0x2fd1cf=!![],_0x1bc798=_0x46350d['slice'](_0xcaaa8d,_0x36c632);const _0x29c8df=_0x36a6c5[_0x127bfa(0x96)](_0x36c632+_0x18686+_0x4d5cce,_0x300549);_0x48cd99=_0x46350d[_0x127bfa(0xa8)](_0x29c8df,_0x114150);break;}if(_0x41c8cc===ID_CLUSTER)break;if(_0x36a6c5[_0x127bfa(0xb6)](isUnknownSize,_0x300549,_0x4d5cce))break;_0x36c632+=_0x18686+_0x4d5cce+_0x300549;}!_0x2fd1cf&&(_0x48cd99=_0x46350d[_0x127bfa(0xa8)](_0xcaaa8d,_0x114150));let _0x361ff9=_0x173c21;_0x36c632=_0xcaaa8d;while(_0x36c632<_0x114150){const [_0xc4f76d,_0x54725e]=_0x36a6c5[_0x127bfa(0xb6)](readId,_0x46350d,_0x36c632),[_0x2bb74b,_0x3af0a5]=readVint(_0x46350d,_0x36a6c5['iEHxa'](_0x36c632,_0x54725e));if(_0x36a6c5['PFHMy'](_0xc4f76d,ID_SIMPLE_BLOCK)&&_0x2bb74b>=0x4){const _0x3ebe60=_0x36a6c5[_0x127bfa(0x9a)](_0x36c632+_0x54725e,_0x3af0a5),[,_0x4386fe]=readVint(_0x46350d,_0x3ebe60),_0x924b0=_0x46350d[_0x127bfa(0xdd)](_0x36a6c5[_0x127bfa(0x96)](_0x3ebe60,_0x4386fe)),_0x44154f=_0x173c21+_0x924b0;if(_0x44154f>_0x361ff9)_0x361ff9=_0x44154f;}if(_0x36a6c5[_0x127bfa(0xb8)](_0xc4f76d,ID_CLUSTER))break;if(_0x36a6c5['MPkjB'](isUnknownSize,_0x2bb74b,_0x3af0a5))break;_0x36c632+=_0x36a6c5[_0x127bfa(0xd6)](_0x36a6c5['MEunf'](_0x54725e,_0x3af0a5),_0x2bb74b);}_0x2acaa7['push']({'timestamp':_0x173c21,'maxTicks':_0x361ff9,'bodyBeforeTimestamp':_0x1bc798,'bodyAfterTimestamp':_0x48cd99,'timestampElementSize':_0x4d73c8}),_0xaab0ac=_0x114150;}return _0x2acaa7;}function parseWebm(_0x183ee8){const _0x56e468=_0x3ff6,_0x4d460c={'Wsvxr':function(_0xcdfef3,_0x458d8e,_0x4f177f){return _0xcdfef3(_0x458d8e,_0x4f177f);},'WVQIZ':function(_0x2d7e15,_0x596508){return _0x2d7e15+_0x596508;},'gstXw':function(_0x559767,_0x141f52){return _0x559767+_0x141f52;},'UfEWi':function(_0x53e96d,_0x17c61c,_0x4c73bf){return _0x53e96d(_0x17c61c,_0x4c73bf);}};let _0x23e834=0x0;const [,_0x5d2764]=readId(_0x183ee8,_0x23e834),[_0x4a6aed,_0x133684]=_0x4d460c[_0x56e468(0x95)](readVint,_0x183ee8,_0x23e834+_0x5d2764);_0x23e834+=_0x4d460c['WVQIZ'](_0x4d460c[_0x56e468(0xb7)](_0x5d2764,_0x133684),_0x4a6aed);const [_0x2aa5b4,_0x3ee0bc]=readId(_0x183ee8,_0x23e834);if(_0x2aa5b4!==ID_SEGMENT)return null;const [,_0x353cc8]=readVint(_0x183ee8,_0x4d460c['WVQIZ'](_0x23e834,_0x3ee0bc)),_0x588999=_0x23e834+_0x3ee0bc+_0x353cc8,_0x27322d=findTimestampScale(_0x183ee8,_0x588999),_0x127aed=_0x4d460c[_0x56e468(0xa9)](findFirstClusterOffset,_0x183ee8,_0x588999),_0x5b3511=_0x183ee8['slice'](0x0,_0x127aed),_0x12dc51=_0x4d460c[_0x56e468(0x95)](extractClusters,_0x183ee8,_0x27322d);let _0x42df70=0x0;for(const _0x27956f of _0x12dc51){if(_0x27956f[_0x56e468(0x92)]>_0x42df70)_0x42df70=_0x27956f['maxTicks'];}return{'header':_0x5b3511,'clusters':_0x12dc51,'timestampScale':_0x27322d,'maxTimestampTicks':_0x42df70};}function buildCluster(_0x1f0bc3,_0x466ccf,_0x126d36){const _0x44658b=_0x3ff6,_0xbdbac5={'JBRME':function(_0x61c5b4,_0x245788){return _0x61c5b4(_0x245788);}},_0x308cbc=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1ba4c1=Math[_0x44658b(0xb1)](0x4,_0xbdbac5['JBRME'](uintSize,_0x1f0bc3)),_0x2dd488=Buffer[_0x44658b(0xbc)]([Buffer[_0x44658b(0xa5)]([ID_TIMESTAMP]),_0xbdbac5['JBRME'](writeVint,_0x1ba4c1),writeUint(_0x1f0bc3,_0x1ba4c1)]),_0x3e931c=Buffer[_0x44658b(0xbc)]([_0x466ccf,_0x2dd488,_0x126d36]),_0xfd666c=writeVint(_0x3e931c['length']);return Buffer[_0x44658b(0xbc)]([_0x308cbc,_0xfd666c,_0x3e931c]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x378fa3){const _0x4c5c91=_0x3ff6,_0x22dbde={'JnUUg':function(_0x1216d0,_0x1a0b0d,_0x395f1b){return _0x1216d0(_0x1a0b0d,_0x395f1b);},'DPZhu':function(_0x189bfc,_0x2e4b76,_0x43d319){return _0x189bfc(_0x2e4b76,_0x43d319);},'TuufJ':function(_0x1d769a,_0x372667){return _0x1d769a+_0x372667;},'nBEVJ':function(_0x5323ae,_0x1a80a6,_0x24bee3){return _0x5323ae(_0x1a80a6,_0x24bee3);},'XKQlW':function(_0x2da9f4,_0x70204d){return _0x2da9f4+_0x70204d;},'cqnXT':function(_0x1dac3b,_0x954a3d){return _0x1dac3b+_0x954a3d;},'echQf':function(_0x172f65,_0x5efe02){return _0x172f65(_0x5efe02);},'gmRDW':function(_0x4ab790,_0x5431fa){return _0x4ab790<_0x5431fa;},'cDQws':function(_0x12c7e8,_0x3bd3b6){return _0x12c7e8===_0x3bd3b6;},'pWJyq':function(_0x45d5ea,_0x3fcfce){return _0x45d5ea+_0x3fcfce;},'VGvWg':function(_0x124c30,_0x398c4c){return _0x124c30+_0x398c4c;},'xmnKR':function(_0x2c9905,_0x505d94){return _0x2c9905+_0x505d94;},'UOPfj':function(_0x3376da,_0x254f3b){return _0x3376da+_0x254f3b;}},_0x29a3a2=Buffer[_0x4c5c91(0xa5)](_0x378fa3);let _0x40d2e8=0x0;const [,_0x42a1d0]=_0x22dbde[_0x4c5c91(0xc1)](readId,_0x29a3a2,_0x40d2e8),[_0x125094,_0x1e9cb6]=_0x22dbde['DPZhu'](readVint,_0x29a3a2,_0x40d2e8+_0x42a1d0),_0x21db5e=_0x22dbde[_0x4c5c91(0xc8)](_0x22dbde[_0x4c5c91(0xc8)](_0x40d2e8+_0x42a1d0,_0x1e9cb6),_0x125094),[,_0x5cfe96]=_0x22dbde[_0x4c5c91(0x9f)](readId,_0x29a3a2,_0x21db5e),[,_0x4363ff]=readVint(_0x29a3a2,_0x21db5e+_0x5cfe96),_0xc36ad0=_0x22dbde['XKQlW'](_0x22dbde['cqnXT'](_0x21db5e,_0x5cfe96),_0x4363ff),_0x1c0928=_0x22dbde[_0x4c5c91(0xac)](writeUnknownSizeVint,_0x4363ff);_0x1c0928[_0x4c5c91(0xa4)](_0x29a3a2,_0x21db5e+_0x5cfe96);let _0x3830b9=_0xc36ad0;const _0x5a3074=Math[_0x4c5c91(0xcc)](_0x29a3a2[_0x4c5c91(0xc5)],_0x22dbde['cqnXT'](_0xc36ad0,0x2710));while(_0x22dbde[_0x4c5c91(0xbe)](_0x3830b9,_0x5a3074)){const [_0x5b9ff7,_0x156e9c]=_0x22dbde[_0x4c5c91(0xc1)](readId,_0x29a3a2,_0x3830b9),[_0x257ded,_0x3ed538]=readVint(_0x29a3a2,_0x3830b9+_0x156e9c);if(_0x5b9ff7===ID_CLUSTER)break;if(_0x22dbde[_0x4c5c91(0xc1)](isUnknownSize,_0x257ded,_0x3ed538))break;if(_0x22dbde[_0x4c5c91(0xdc)](_0x5b9ff7,ID_INFO)){const _0x2e7e73=_0x22dbde['XKQlW'](_0x3830b9+_0x156e9c,_0x3ed538),_0x334bfa=_0x22dbde[_0x4c5c91(0xaf)](_0x2e7e73,_0x257ded),_0x3d4ee3=[];let _0x31836a=_0x2e7e73;while(_0x31836a<_0x334bfa){const [_0x6fc21a,_0x1636a9]=readId(_0x29a3a2,_0x31836a),[_0x2d69a4,_0x807c35]=_0x22dbde['nBEVJ'](readVint,_0x29a3a2,_0x22dbde[_0x4c5c91(0x9e)](_0x31836a,_0x1636a9)),_0x34d1ac=_0x22dbde[_0x4c5c91(0x91)](_0x1636a9+_0x807c35,_0x2d69a4);_0x6fc21a!==ID_DURATION&&_0x3d4ee3[_0x4c5c91(0xa1)](_0x29a3a2['slice'](_0x31836a,_0x22dbde[_0x4c5c91(0xd0)](_0x31836a,_0x34d1ac))),_0x31836a+=_0x34d1ac;}const _0x55fd33=Buffer['concat'](_0x3d4ee3),_0x520686=Buffer[_0x4c5c91(0xbc)]([_0x29a3a2[_0x4c5c91(0xa8)](_0x3830b9,_0x22dbde[_0x4c5c91(0xc2)](_0x3830b9,_0x156e9c)),writeVint(_0x55fd33[_0x4c5c91(0xc5)],_0x3ed538)]);return Buffer[_0x4c5c91(0xbc)]([_0x29a3a2[_0x4c5c91(0xa8)](0x0,_0x3830b9),_0x520686,_0x55fd33,_0x29a3a2['slice'](_0x334bfa)]);}_0x3830b9+=_0x22dbde[_0x4c5c91(0xc8)](_0x156e9c,_0x3ed538)+_0x257ded;}return _0x29a3a2;}function _0x3f58(){const _0x18462b=['max','exit','LxUZL','6SfHZyp','SCwab','kiOKe','gstXw','wzMzA','alloc','eECXe','clusters','concat','Stitched\x20','gmRDW','YxKaG','3896010vMOHJZ','JnUUg','UOPfj','indexOf','Yzerj','length','16DmNqhf','MlUeA','TuufJ','3uZCvcC','stitchWebmFiles.js','log','min','floor','PFHMy','wiSXe','xmnKR','1452321FpSNbk','stitchWebmFiles.ts','JfxBW','ctdjl','rUMus','biVqX','YqRDm','MlIAS','460iJOjfQ','1555080OoUmru','iSVaP','cDQws','readInt16BE','ZvhoO','VGvWg','maxTicks','BZgLG','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','Wsvxr','Jerij','pow','rQUce','994345icJWny','iEHxa','EdZgO','FBdqk','2834503AQItgj','XKQlW','nBEVJ','ZTHjd','push','GptdM','has','copy','from','1174PVIHWo','endsWith','slice','UfEWi','VYEKR','OGnzu','echQf','kZRSv','JquTE','pWJyq','11054428EFSzzd'];_0x3f58=function(){return _0x18462b;};return _0x3f58();}export function stitchWebmFiles(_0x4a1151,_0x4e5c49){const _0x4d7462=_0x3ff6,_0x181c90={'AAdxu':function(_0x4e0942,_0x1e1fb2){return _0x4e0942<=_0x1e1fb2;},'ctdjl':function(_0x552991,_0x231523){return _0x552991(_0x231523);},'Yzerj':function(_0x542a93,_0x20905f){return _0x542a93===_0x20905f;},'LxUZL':function(_0x3d5d0d,_0xdc65ed){return _0x3d5d0d+_0xdc65ed;},'oVwrQ':function(_0x5190a4,_0xe8c57c,_0x10c0b2){return _0x5190a4(_0xe8c57c,_0x10c0b2);}};if(_0x181c90['AAdxu'](_0x4a1151['length'],0x1))return![];const _0x592e3c=[];for(const _0xb3de55 of _0x4a1151){const _0x4191b9=readFileSync(_0xb3de55),_0x43a463=_0x181c90[_0x4d7462(0xd4)](parseWebm,_0x4191b9);if(!_0x43a463||_0x181c90[_0x4d7462(0xc4)](_0x43a463[_0x4d7462(0xbb)]['length'],0x0))return![];_0x592e3c['push'](_0x43a463);}const _0x339c73=_0x592e3c[0x0],_0x2a0788=_0x181c90[_0x4d7462(0xd4)](rebuildHeaderWithoutDuration,_0x339c73['header']),_0x48e312=[_0x2a0788];let _0x2e7925=0x0;for(let _0x464a70=0x0;_0x464a70<_0x592e3c[_0x4d7462(0xc5)];_0x464a70++){const _0x2578ce=_0x592e3c[_0x464a70];for(const _0x26fcce of _0x2578ce[_0x4d7462(0xbb)]){const _0x2e8ec7=_0x181c90[_0x4d7462(0xb3)](_0x26fcce['timestamp'],_0x2e7925);_0x48e312['push'](buildCluster(_0x2e8ec7,_0x26fcce['bodyBeforeTimestamp'],_0x26fcce['bodyAfterTimestamp']));}const _0x1405f6=0x1e;_0x2e7925+=_0x2578ce['maxTimestampTicks']+_0x1405f6;}return _0x181c90['oVwrQ'](writeFileSync,_0x4e5c49,Buffer['concat'](_0x48e312)),!![];}if(process['argv'][0x1]?.[_0xda9280(0xa7)](_0xda9280(0xd2))||process['argv'][0x1]?.['endsWith'](_0xda9280(0xca))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0xda9280(0xb2)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xda9280(0xcb)](_0xda9280(0xbd)+inputs[_0xda9280(0xc5)]+'\x20files\x20->\x20'+output):console['log'](_0xda9280(0x94));}
|