@ranger-testing/ranger-cli 3.1.6 → 3.1.7-alpha.62f152a-54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xb8cb0e,_0x182f1b){const _0x5e4576=_0x3eda,_0x595137=_0xb8cb0e();while(!![]){try{const _0x540599=-parseInt(_0x5e4576(0x1d7))/0x1+-parseInt(_0x5e4576(0x1c1))/0x2*(parseInt(_0x5e4576(0x1cd))/0x3)+parseInt(_0x5e4576(0x1b1))/0x4*(parseInt(_0x5e4576(0x1bb))/0x5)+parseInt(_0x5e4576(0x1c3))/0x6+-parseInt(_0x5e4576(0x1bc))/0x7*(parseInt(_0x5e4576(0x1be))/0x8)+-parseInt(_0x5e4576(0x1bd))/0x9+parseInt(_0x5e4576(0x1ef))/0xa;if(_0x540599===_0x182f1b)break;else _0x595137['push'](_0x595137['shift']());}catch(_0x8ec472){_0x595137['push'](_0x595137['shift']());}}}(_0x255d,0x37de1));import{existsSync}from'fs';import _0x1d3c38 from'inquirer';function _0x255d(){const _0x2a7167=['39633NwEQMG','HdaAv','qCkOJ','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','source','settings','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','telemetry','NjZWl','cwd','351352jCeVsV','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','iQZeD','length','DbnbJ','GwlJY','env','url','pLxPh','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','list','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','MYqKa','authEnv','name','Active\x20profile\x20\x22','envBaseUrl','Vnxlb','key','baseUrl','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','\x20to\x20override.','\x20does\x20not\x20exist.','`ranger\x20profile\x20add`\x20to\x20create\x20one.','3647410ZEDxzB','local','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','startPath','Profile\x20\x22','environmentKey','80dBVtJZ','XSCyk','domains','prompt','string','cdpEndpoint','EeDcV','\x22.\x20Pass\x20--profile\x20','hOgWK','status','57825fOngZv','1169VRqdzi','446913eDFnxk','2032zxatUN','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','50BCkgnY','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','2438964EsCaXw','envStartPath','ZkCtp','profile','UrrnV','aTPSj','aFSfJ','RANGER_TEST_USERNAME','NVLXD','log'];_0x255d=function(){return _0x2a7167;};return _0x255d();}import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x312ff8){const _0x5aa24e=_0x3eda,_0x32f00a={'zskuk':function(_0x3152c3){return _0x3152c3();},'bkFzf':function(_0x2642c8,_0x5e9a70){return _0x2642c8!==_0x5e9a70;},'DbnbJ':function(_0x254f35,_0x2f6204){return _0x254f35 instanceof _0x2f6204;},'GwlJY':function(_0x10f03f,_0x2e385a){return _0x10f03f(_0x2e385a);},'eAsjY':function(_0x5839de){return _0x5839de();},'halGu':function(_0x4e28ae,_0x18ca3b){return _0x4e28ae+_0x18ca3b;},'UrrnV':function(_0xf14ba0,_0x226863){return _0xf14ba0+_0x226863;},'sPMot':function(_0x4122ad,_0x45fb2f){return _0x4122ad+_0x45fb2f;},'MYqKa':function(_0x165a22,_0x374f9a){return _0x165a22+_0x374f9a;},'ZkCtp':_0x5aa24e(0x1c2),'XLLUd':_0x5aa24e(0x1e0),'qCkOJ':function(_0x225291,_0x1f8770){return _0x225291(_0x1f8770);},'EpkFm':function(_0x173f2d,_0x3450f0){return _0x173f2d instanceof _0x3450f0;},'hOgWK':function(_0x4d5101,_0x63a9a8){return _0x4d5101===_0x63a9a8;},'aTPSj':function(_0xfdd74a,_0x5a938){return _0xfdd74a&&_0x5a938;},'qeJBy':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','NVLXD':_0x5aa24e(0x1e1),'NjZWl':_0x5aa24e(0x1d1),'Vnxlb':'Cloud\x20profile\x20(recommended)','XSCyk':'cloud','iQZeD':function(_0xa3837,_0x31597e,_0x4700cf){return _0xa3837(_0x31597e,_0x4700cf);},'pLxPh':function(_0x181898,_0x35f611){return _0x181898+_0x35f611;},'EeDcV':_0x5aa24e(0x1d8),'nQVIi':_0x5aa24e(0x1bf)},_0x343074=_0x312ff8[_0x5aa24e(0x1c6)];let _0x4ef03d=_0x343074,_0x12edd1=null;const _0x12ceea=_0x343074?null:await _0x32f00a['zskuk'](readActiveProfileName);if(_0x312ff8['authEnv']&&_0x343074)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x312ff8['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x343074+_0x5aa24e(0x1f1));else _0x312ff8['authEnv']&&!process['env'][_0x5aa24e(0x1ca)]&&console[_0x5aa24e(0x1cc)]('\x20\x20Note:\x20--env\x20\x22'+_0x312ff8[_0x5aa24e(0x1e4)]+_0x5aa24e(0x1d3));if(!_0x343074&&process[_0x5aa24e(0x1dd)]['RANGER_TEST_USERNAME'])try{const _0x54bc63=await resolveAdHocProfile({'targetUrl':_0x312ff8[_0x5aa24e(0x1ea)]??readUrlEnvVars()[_0x5aa24e(0x1e7)],'envKey':_0x312ff8[_0x5aa24e(0x1e4)]});_0x54bc63&&(_0x12ceea&&_0x32f00a['bkFzf'](_0x12ceea,_0x54bc63[_0x5aa24e(0x1e5)])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x54bc63[_0x5aa24e(0x1e5)]+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x12ceea+_0x5aa24e(0x1b8)+_0x12ceea+_0x5aa24e(0x1ec)),_0x4ef03d=_0x54bc63[_0x5aa24e(0x1e5)],_0x12edd1=_0x54bc63['profile']);}catch(_0x230e97){if(!_0x12ceea||_0x312ff8['authEnv'])throw _0x230e97;console[_0x5aa24e(0x1cc)]('\x20\x20Warning:\x20'+(_0x32f00a[_0x5aa24e(0x1db)](_0x230e97,Error)?_0x230e97['message']:_0x32f00a[_0x5aa24e(0x1dc)](String,_0x230e97))),console[_0x5aa24e(0x1cc)](_0x5aa24e(0x1d0)+_0x12ceea+'\x22.');}if(!_0x4ef03d)_0x4ef03d=_0x12ceea??undefined;if(!_0x4ef03d)try{const _0x2eedbd=await _0x32f00a['eAsjY'](listCloudProfiles);if(_0x2eedbd[_0x5aa24e(0x1da)]===0x1){const _0x43a28f=_0x2eedbd[0x0];_0x4ef03d=_0x43a28f[_0x5aa24e(0x1e5)],console[_0x5aa24e(0x1cc)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x43a28f[_0x5aa24e(0x1e5)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x4ef03d)throw new Error(_0x32f00a['halGu'](_0x32f00a[_0x5aa24e(0x1c7)](_0x32f00a['sPMot'](_0x32f00a[_0x5aa24e(0x1e3)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x32f00a[_0x5aa24e(0x1c5)]),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x32f00a['XLLUd']));const _0x3d8be0=_0x32f00a['qCkOJ'](getEnvDir,_0x4ef03d),_0x14c9e5=existsSync(_0x3d8be0);let _0x594e4c=_0x12edd1,_0x3c9b31=![];if(!_0x594e4c)try{_0x594e4c=await _0x32f00a['GwlJY'](fetchCloudProfile,_0x4ef03d);if(!_0x594e4c)_0x3c9b31=!![];}catch(_0x32af3c){_0x32f00a['EpkFm'](_0x32af3c,ApiError)&&_0x32f00a[_0x5aa24e(0x1b9)](_0x32af3c[_0x5aa24e(0x1ba)],0x194)&&(_0x3c9b31=!![]);}if(_0x32f00a[_0x5aa24e(0x1c8)](_0x343074,_0x3c9b31)&&!_0x14c9e5&&!_0x594e4c)throw new Error(_0x5aa24e(0x1af)+_0x343074+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x32f00a['qeJBy']+_0x5aa24e(0x1ee));if(_0x594e4c&&_0x14c9e5){let _0x465122=!![];if(isInteractive()){const {source:_0x2149c0}=await _0x1d3c38[_0x5aa24e(0x1b4)]([{'type':_0x32f00a[_0x5aa24e(0x1cb)],'name':_0x32f00a[_0x5aa24e(0x1d5)],'message':_0x5aa24e(0x1af)+_0x4ef03d+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x32f00a[_0x5aa24e(0x1e8)],'value':_0x32f00a[_0x5aa24e(0x1b2)]},{'name':'Local\x20profile','value':_0x5aa24e(0x1f0)}],'default':'cloud'}]);_0x465122=_0x2149c0===_0x32f00a['XSCyk'];}if(!_0x465122)_0x594e4c=null;}const _0x54b787=readProfileOverrides(process[_0x5aa24e(0x1d6)](),_0x4ef03d);let _0x2051aa=null,_0x57f251,_0x528a39,_0x2e92ea,_0x24d7e8,_0x528cf6=null,_0x5bd2fb,_0x202348;const _0x1b3b23=_0x32f00a[_0x5aa24e(0x1cf)](expandOverrides,_0x54b787),_0x33d575=readUrlEnvVars();if(_0x594e4c){_0x2051aa=_0x594e4c;const _0x23beb5=_0x594e4c['settings']??{},_0xcd639f=mergeCloudProfileSettings(_0x23beb5,_0x54b787??undefined),_0x46f07d={..._0x594e4c,'settings':_0xcd639f};_0x528cf6={'baseUrl':expandString(_0x23beb5[_0x5aa24e(0x1ea)]),'startPath':_0x32f00a[_0x5aa24e(0x1cf)](expandString,_0x23beb5[_0x5aa24e(0x1ae)])};const _0x8a64a9=await fetchAuthConfig(),_0x1d594c=_0x8a64a9?resolveAuthEnvironmentLocally(_0x8a64a9,_0x594e4c[_0x5aa24e(0x1b0)]):null;_0x5bd2fb=_0x1d594c?.[_0x5aa24e(0x1b3)]?.[0x0],_0x202348=_0x1d594c?.[_0x5aa24e(0x1e9)];const _0x22506e=_0x32f00a[_0x5aa24e(0x1dc)](resolveProfileUrl,{'flagBaseUrl':_0x312ff8[_0x5aa24e(0x1ea)],'flagStartPath':_0x312ff8[_0x5aa24e(0x1ae)],'envBaseUrl':_0x33d575['envBaseUrl'],'envStartPath':_0x33d575['envStartPath'],'projectOverrides':_0x1b3b23,'cloudSettings':_0x528cf6,'authEnvironmentDomain':_0x5bd2fb}),_0x20e9f4=process[_0x5aa24e(0x1dd)]['RANGER_SESSION_STATE_PATH'];if(_0x20e9f4){if(!existsSync(_0x20e9f4))throw new Error('RANGER_SESSION_STATE_PATH='+_0x20e9f4+_0x5aa24e(0x1ed));_0x57f251=_0x20e9f4,_0x528a39=resolveEnvVars(_0xcd639f),_0x2e92ea=Boolean(_0x528a39['cdpEndpoint']);}else{const _0x34fa8d=await _0x32f00a[_0x5aa24e(0x1d9)](resolveCloudProfileSession,_0x46f07d,{'effectiveBaseUrl':_0x22506e[_0x5aa24e(0x1ea)],'telemetry':_0x312ff8[_0x5aa24e(0x1d4)],'assertedEnv':_0x312ff8[_0x5aa24e(0x1e4)]});_0x57f251=_0x34fa8d['authPath'],_0x528a39=_0x32f00a[_0x5aa24e(0x1dc)](resolveEnvVars,_0x34fa8d[_0x5aa24e(0x1d2)]),_0x2e92ea=Boolean(_0x528a39[_0x5aa24e(0x1b6)]),_0x5bd2fb=_0x34fa8d['resolvedEnv']?.['domains']?.[0x0],_0x202348=_0x34fa8d['resolvedEnv']?.[_0x5aa24e(0x1e9)];}}else{if(!_0x14c9e5){const _0x4a804c=!_0x343074;throw new Error(_0x4a804c?_0x32f00a[_0x5aa24e(0x1df)](_0x32f00a['sPMot'](_0x5aa24e(0x1e6)+_0x4ef03d+_0x5aa24e(0x1e2),_0x32f00a[_0x5aa24e(0x1b7)])+_0x32f00a['nQVIi'],_0x5aa24e(0x1c0)+_0x4ef03d+'`\x20to\x20recreate\x20it.'):_0x5aa24e(0x1af)+_0x4ef03d+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4ef03d);}const _0x1250d9=await _0x32f00a[_0x5aa24e(0x1cf)](loadSettings,_0x4ef03d);_0x528a39=resolveEnvVars(_0x1250d9),_0x2e92ea=Boolean(_0x528a39['cdpEndpoint']),_0x24d7e8=_0x528a39[_0x5aa24e(0x1ea)];}const _0x328ce1=resolveProfileUrl({'flagBaseUrl':_0x312ff8[_0x5aa24e(0x1ea)],'flagStartPath':_0x312ff8['startPath'],'envBaseUrl':_0x33d575[_0x5aa24e(0x1e7)],'envStartPath':_0x33d575[_0x5aa24e(0x1c4)],'localSettingsBaseUrl':_0x24d7e8,'projectOverrides':_0x1b3b23,'cloudSettings':_0x528cf6,'authEnvironmentDomain':_0x5bd2fb}),_0xfcc7f6=_0x328ce1[_0x5aa24e(0x1de)]??_0x328ce1[_0x5aa24e(0x1ea)];if(!_0xfcc7f6&&!_0x2e92ea)throw new Error(_0x5aa24e(0x1eb)+_0x4ef03d+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x4ef03d+'\x20baseUrl\x20<url>');return{'activeProfile':_0x4ef03d,'resolvedCloudProfile':_0x2051aa,'cloudAuthPath':_0x57f251,'resolvedSettings':_0x528a39,'isCdpMode':_0x2e92ea,'url':_0xfcc7f6,'baseUrlSource':_0x328ce1['baseUrlSource'],'authEnvKey':_0x202348,'startPath':_0x328ce1[_0x5aa24e(0x1ae)]};}function expandString(_0x3be827){const _0x42ab20=_0x3eda,_0x3ab1a={'LIRTx':function(_0x51378c,_0x1a1829){return _0x51378c!==_0x1a1829;},'UeGMh':function(_0x5a1ea7,_0x17a70b){return _0x5a1ea7(_0x17a70b);}};if(_0x3ab1a['LIRTx'](typeof _0x3be827,_0x42ab20(0x1b5)))return _0x3be827;return _0x3ab1a['UeGMh'](resolveEnvVars,_0x3be827);}function _0x3eda(_0x4fd58d,_0xd81712){_0x4fd58d=_0x4fd58d-0x1ae;const _0x255d9e=_0x255d();let _0x3edacb=_0x255d9e[_0x4fd58d];return _0x3edacb;}function expandOverrides(_0x300e49){const _0x597f90=_0x3eda,_0x223e52={'HdaAv':function(_0x1dab9c,_0x47fb8a){return _0x1dab9c===_0x47fb8a;},'aFSfJ':_0x597f90(0x1b5),'XlxhM':function(_0x1f792f,_0xde45d3){return _0x1f792f(_0xde45d3);}};if(!_0x300e49)return _0x300e49;const _0x3219b4={..._0x300e49};return _0x223e52[_0x597f90(0x1ce)](typeof _0x3219b4['baseUrl'],_0x223e52[_0x597f90(0x1c9)])&&(_0x3219b4['baseUrl']=_0x223e52['XlxhM'](resolveEnvVars,_0x3219b4[_0x597f90(0x1ea)])),typeof _0x3219b4[_0x597f90(0x1ae)]===_0x597f90(0x1b5)&&(_0x3219b4['startPath']=resolveEnvVars(_0x3219b4['startPath'])),_0x3219b4;}
|
|
1
|
+
function _0x2899(_0x312ee3,_0x1e2dd3){_0x312ee3=_0x312ee3-0x176;const _0x3116b5=_0x3116();let _0x2899f8=_0x3116b5[_0x312ee3];return _0x2899f8;}(function(_0x5f3aab,_0x25ef69){const _0x3686a6=_0x2899,_0x5b22d2=_0x5f3aab();while(!![]){try{const _0x29bce9=-parseInt(_0x3686a6(0x19a))/0x1+-parseInt(_0x3686a6(0x190))/0x2+parseInt(_0x3686a6(0x17e))/0x3*(parseInt(_0x3686a6(0x187))/0x4)+-parseInt(_0x3686a6(0x179))/0x5+parseInt(_0x3686a6(0x1af))/0x6+-parseInt(_0x3686a6(0x1ab))/0x7*(-parseInt(_0x3686a6(0x19e))/0x8)+parseInt(_0x3686a6(0x181))/0x9;if(_0x29bce9===_0x25ef69)break;else _0x5b22d2['push'](_0x5b22d2['shift']());}catch(_0x39e399){_0x5b22d2['push'](_0x5b22d2['shift']());}}}(_0x3116,0x97516));import{existsSync}from'fs';import _0x3e62cb from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x17ddec){const _0x28a274=_0x2899,_0x471ed4={'nYoQb':function(_0x422204,_0x2e6f3b){return _0x422204(_0x2e6f3b);},'oJbxk':function(_0x35426d,_0x1ff75d){return _0x35426d!==_0x1ff75d;},'GHAPn':function(_0x48ef24){return _0x48ef24();},'NqeAg':function(_0x3674b2,_0x12744a){return _0x3674b2===_0x12744a;},'bZobn':function(_0x51c339,_0x5cb8a0){return _0x51c339+_0x5cb8a0;},'whQBl':function(_0x231bbe,_0x37c067){return _0x231bbe+_0x37c067;},'NFlYl':function(_0x49d340,_0x36a093){return _0x49d340+_0x36a093;},'ltoyF':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','wEORJ':_0x28a274(0x18e),'iCWfP':_0x28a274(0x176),'ICGEZ':function(_0x1e0512,_0x48813e){return _0x1e0512 instanceof _0x48813e;},'cTnrG':_0x28a274(0x177),'alRTh':function(_0x1909bd){return _0x1909bd();},'NlbqP':_0x28a274(0x17f),'SsFqv':'source','amGgg':'Cloud\x20profile\x20(recommended)','sLcxS':'cloud','xWwRy':'local','IQABX':function(_0xbff4f3,_0x55a24f){return _0xbff4f3===_0x55a24f;},'snUFH':function(_0x5802d0,_0x2cb353,_0x246ce){return _0x5802d0(_0x2cb353,_0x246ce);},'VMiDu':function(_0x1d3b34,_0x31904c){return _0x1d3b34(_0x31904c);},'HRHDz':function(_0x2236b4,_0x4ef048){return _0x2236b4(_0x4ef048);},'dNbug':function(_0x302e05,_0x36ffbc){return _0x302e05+_0x36ffbc;},'SkyHi':function(_0x32fbec,_0x2a7203){return _0x32fbec+_0x2a7203;},'XsWgh':_0x28a274(0x1a2),'zzNsg':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','RwhnM':function(_0x59760c,_0x39e1a5){return _0x59760c(_0x39e1a5);}},_0x22466f=_0x17ddec['profile'];let _0x37a984=_0x22466f,_0x2d8ea3=null;const _0x1dd825=_0x22466f?null:await readActiveProfileName();if(_0x17ddec[_0x28a274(0x18b)]&&_0x22466f)console['log'](_0x28a274(0x1ad)+_0x17ddec['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x22466f+_0x28a274(0x192));else _0x17ddec['authEnv']&&!process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x17ddec[_0x28a274(0x18b)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x22466f&&process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME'])try{const _0x359a7b=await _0x471ed4['nYoQb'](resolveAdHocProfile,{'targetUrl':_0x17ddec['baseUrl']??readUrlEnvVars()[_0x28a274(0x178)],'envKey':_0x17ddec[_0x28a274(0x18b)]});_0x359a7b&&(_0x1dd825&&_0x471ed4[_0x28a274(0x189)](_0x1dd825,_0x359a7b['name'])&&console[_0x28a274(0x17a)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x359a7b['name']+_0x28a274(0x17b)+_0x1dd825+'\x22.\x20Pass\x20--profile\x20'+_0x1dd825+'\x20to\x20override.'),_0x37a984=_0x359a7b[_0x28a274(0x182)],_0x2d8ea3=_0x359a7b[_0x28a274(0x193)]);}catch(_0x4b5afd){if(!_0x1dd825||_0x17ddec['authEnv'])throw _0x4b5afd;console['log']('\x20\x20Warning:\x20'+(_0x4b5afd instanceof Error?_0x4b5afd['message']:String(_0x4b5afd))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x1dd825+'\x22.');}if(!_0x37a984)_0x37a984=_0x1dd825??undefined;if(!_0x37a984)try{const _0xf6fcdf=await _0x471ed4['GHAPn'](listCloudProfiles);if(_0x471ed4['NqeAg'](_0xf6fcdf[_0x28a274(0x1ac)],0x1)){const _0x17dc45=_0xf6fcdf[0x0];_0x37a984=_0x17dc45[_0x28a274(0x182)],console['log'](_0x28a274(0x198)+_0x17dc45[_0x28a274(0x182)]),console['log'](_0x28a274(0x183));}}catch{}if(!_0x37a984)throw new Error(_0x471ed4['bZobn'](_0x471ed4[_0x28a274(0x19c)](_0x471ed4[_0x28a274(0x196)](_0x471ed4['NFlYl'](_0x28a274(0x197),_0x471ed4['ltoyF']),_0x471ed4['wEORJ']),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x471ed4[_0x28a274(0x1a5)]));const _0x2bdd83=getEnvDir(_0x37a984),_0x27b626=existsSync(_0x2bdd83);let _0x4d4dd3=_0x2d8ea3,_0x1fa8fc=![];if(!_0x4d4dd3)try{_0x4d4dd3=await fetchCloudProfile(_0x37a984);if(!_0x4d4dd3)_0x1fa8fc=!![];}catch(_0x3df2b1){_0x471ed4['ICGEZ'](_0x3df2b1,ApiError)&&_0x3df2b1[_0x28a274(0x17d)]===0x194&&(_0x1fa8fc=!![]);}if(_0x22466f&&_0x1fa8fc&&!_0x27b626&&!_0x4d4dd3)throw new Error(_0x28a274(0x1ae)+_0x22466f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x471ed4[_0x28a274(0x1a9)]+_0x28a274(0x194));if(_0x4d4dd3&&_0x27b626){let _0x357cb6=!![];if(_0x471ed4['alRTh'](isInteractive)){const {source:_0x15e822}=await _0x3e62cb['prompt']([{'type':_0x471ed4['NlbqP'],'name':_0x471ed4['SsFqv'],'message':'Profile\x20\x22'+_0x37a984+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x471ed4[_0x28a274(0x1a6)],'value':_0x471ed4[_0x28a274(0x1a3)]},{'name':'Local\x20profile','value':_0x471ed4[_0x28a274(0x1a0)]}],'default':'cloud'}]);_0x357cb6=_0x471ed4['IQABX'](_0x15e822,'cloud');}if(!_0x357cb6)_0x4d4dd3=null;}const _0x5c0112=readProfileOverrides(process['cwd'](),_0x37a984);let _0x5ad791=null,_0x182f93,_0x437f53,_0x362b26,_0x2811db,_0xb0e0c=null,_0x59c32a,_0x2ceca9;const _0x38f2a9=_0x471ed4[_0x28a274(0x19d)](expandOverrides,_0x5c0112),_0x476ada=readUrlEnvVars();if(_0x4d4dd3){_0x5ad791=_0x4d4dd3;const _0x1584be=_0x4d4dd3[_0x28a274(0x1b0)]??{},_0x2c1199=_0x471ed4[_0x28a274(0x18c)](mergeCloudProfileSettings,_0x1584be,_0x5c0112??undefined),_0x4b6bcc={..._0x4d4dd3,'settings':_0x2c1199};_0xb0e0c={'baseUrl':_0x471ed4['nYoQb'](expandString,_0x1584be['baseUrl']),'startPath':expandString(_0x1584be[_0x28a274(0x19f)])};const _0x16c6fd=await fetchAuthConfig(),_0x27f617=_0x16c6fd?_0x471ed4[_0x28a274(0x18c)](resolveAuthEnvironmentLocally,_0x16c6fd,_0x4d4dd3[_0x28a274(0x199)]):null;_0x59c32a=_0x27f617?.['domains']?.[0x0],_0x2ceca9=_0x27f617?.['key'];const _0x5eddd7=_0x471ed4[_0x28a274(0x19d)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec['baseUrl'],'flagStartPath':_0x17ddec[_0x28a274(0x19f)],'envBaseUrl':_0x476ada['envBaseUrl'],'envStartPath':_0x476ada['envStartPath'],'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x39a3df=process[_0x28a274(0x1b1)]['RANGER_SESSION_STATE_PATH'];if(_0x39a3df){if(!existsSync(_0x39a3df))throw new Error('RANGER_SESSION_STATE_PATH='+_0x39a3df+'\x20does\x20not\x20exist.');_0x182f93=_0x39a3df,_0x437f53=_0x471ed4[_0x28a274(0x180)](resolveEnvVars,_0x2c1199),_0x362b26=Boolean(_0x437f53[_0x28a274(0x17c)]);}else{const _0x4f5ebd=await _0x471ed4['snUFH'](resolveCloudProfileSession,_0x4b6bcc,{'effectiveBaseUrl':_0x5eddd7['baseUrl'],'telemetry':_0x17ddec[_0x28a274(0x1aa)],'assertedEnv':_0x17ddec['authEnv']});_0x182f93=_0x4f5ebd['authPath'],_0x437f53=resolveEnvVars(_0x4f5ebd['settings']),_0x362b26=_0x471ed4['HRHDz'](Boolean,_0x437f53[_0x28a274(0x17c)]),_0x59c32a=_0x4f5ebd[_0x28a274(0x18d)]?.['domains']?.[0x0],_0x2ceca9=_0x4f5ebd['resolvedEnv']?.[_0x28a274(0x1a8)];}}else{if(!_0x27b626){const _0x59ca8c=!_0x22466f;throw new Error(_0x59ca8c?_0x471ed4['dNbug'](_0x471ed4[_0x28a274(0x1b2)]('Active\x20profile\x20\x22'+_0x37a984+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x471ed4[_0x28a274(0x18a)]),_0x471ed4[_0x28a274(0x191)])+(_0x28a274(0x186)+_0x37a984+_0x28a274(0x18f)):_0x28a274(0x1ae)+_0x37a984+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x37a984);}const _0x1adf6b=await loadSettings(_0x37a984);_0x437f53=_0x471ed4[_0x28a274(0x195)](resolveEnvVars,_0x1adf6b),_0x362b26=_0x471ed4['RwhnM'](Boolean,_0x437f53['cdpEndpoint']),_0x2811db=_0x437f53[_0x28a274(0x1a7)];}const _0x2fd455=_0x471ed4[_0x28a274(0x195)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec[_0x28a274(0x1a7)],'flagStartPath':_0x17ddec['startPath'],'envBaseUrl':_0x476ada[_0x28a274(0x178)],'envStartPath':_0x476ada['envStartPath'],'localSettingsBaseUrl':_0x2811db,'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x2c6824=_0x2fd455[_0x28a274(0x1a1)]??_0x2fd455[_0x28a274(0x1a7)];if(!_0x2c6824&&!_0x362b26)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x37a984+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x37a984+_0x28a274(0x19b));return{'activeProfile':_0x37a984,'resolvedCloudProfile':_0x5ad791,'cloudAuthPath':_0x182f93,'resolvedSettings':_0x437f53,'isCdpMode':_0x362b26,'url':_0x2c6824,'baseUrlSource':_0x2fd455['baseUrlSource'],'authEnvKey':_0x2ceca9,'startPath':_0x2fd455['startPath']};}function expandString(_0x1d2f1a){if(typeof _0x1d2f1a!=='string')return _0x1d2f1a;return resolveEnvVars(_0x1d2f1a);}function expandOverrides(_0x40788f){const _0x5e5125=_0x2899,_0x4f9927={'enqTk':_0x5e5125(0x184),'zEGJF':function(_0x4b8796,_0x4b44b1){return _0x4b8796(_0x4b44b1);},'rkERv':function(_0x500c4c,_0x39356a){return _0x500c4c===_0x39356a;}};if(!_0x40788f)return _0x40788f;const _0x30fc08={..._0x40788f};return typeof _0x30fc08[_0x5e5125(0x1a7)]===_0x4f9927[_0x5e5125(0x188)]&&(_0x30fc08[_0x5e5125(0x1a7)]=_0x4f9927['zEGJF'](resolveEnvVars,_0x30fc08[_0x5e5125(0x1a7)])),_0x4f9927[_0x5e5125(0x1a4)](typeof _0x30fc08['startPath'],_0x5e5125(0x184))&&(_0x30fc08['startPath']=_0x4f9927[_0x5e5125(0x185)](resolveEnvVars,_0x30fc08['startPath'])),_0x30fc08;}function _0x3116(){const _0x489ae0=['iCWfP','amGgg','baseUrl','key','cTnrG','telemetry','7DOtzQJ','length','\x20\x20Note:\x20--env\x20\x22','Profile\x20\x22','7259094dJuiXk','settings','env','SkyHi','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','envBaseUrl','3690475ZLsBXS','log','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','cdpEndpoint','status','3501AYlhbP','list','VMiDu','330921nvDNiw','name','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','string','zEGJF','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','3808gqVmAw','enqTk','oJbxk','XsWgh','authEnv','snUFH','resolvedEnv','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','`\x20to\x20recreate\x20it.','559004VmzFap','zzNsg','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','profile','`ranger\x20profile\x20add`\x20to\x20create\x20one.','RwhnM','whQBl','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','environmentKey','1030946edhQju','\x20baseUrl\x20<url>','bZobn','nYoQb','2485912OFhYKW','startPath','xWwRy','url','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','sLcxS','rkERv'];_0x3116=function(){return _0x489ae0;};return _0x3116();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39f8d3,_0x4b6d60){const _0x22347e=_0x3c21,_0xb7f3f2=_0x39f8d3();while(!![]){try{const _0x36359f=parseInt(_0x22347e(0xef))/0x1*(-parseInt(_0x22347e(0xdf))/0x2)+parseInt(_0x22347e(0xe7))/0x3+parseInt(_0x22347e(0xe0))/0x4*(parseInt(_0x22347e(0xf1))/0x5)+parseInt(_0x22347e(0xdd))/0x6+-parseInt(_0x22347e(0xd8))/0x7+parseInt(_0x22347e(0xda))/0x8+parseInt(_0x22347e(0xe4))/0x9*(-parseInt(_0x22347e(0xed))/0xa);if(_0x36359f===_0x4b6d60)break;else _0xb7f3f2['push'](_0xb7f3f2['shift']());}catch(_0x4e1368){_0xb7f3f2['push'](_0xb7f3f2['shift']());}}}(_0x525f,0x4c6a4));function firstDefined(..._0x1bb62a){const _0x3448eb=_0x3c21,_0x3efd7c={'vFieC':function(_0x315736,_0x2e9791){return _0x315736!==_0x2e9791;}};for(const _0xb690c7 of _0x1bb62a){if(_0xb690c7!==undefined&&_0x3efd7c[_0x3448eb(0xec)](_0xb690c7,null)&&_0x3efd7c['vFieC'](_0xb690c7,''))return _0xb690c7;}return undefined;}function normalizeAuthEnvironmentDomain(_0xb55a1b){const _0x2c7bba=_0x3c21;if(!_0xb55a1b)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0xb55a1b))return _0xb55a1b;return _0x2c7bba(0xd9)+_0xb55a1b;}export function resolveBaseUrlWithSource(_0x12c6aa){const _0x9cea57=_0x3c21,_0x4d5756={'hrJwn':function(_0x2c5a8d,_0x488bb5){return _0x2c5a8d===_0x488bb5;},'lJoDV':_0x9cea57(0xeb),'iVRpI':'RANGER_BASE_URL','XmiXQ':'local\x20profile\x20settings','DziMq':'projects.json\x20override','ooaPp':_0x9cea57(0xf0),'crOlZ':function(_0x5d5765,_0x39ea36){return _0x5d5765(_0x39ea36);},'RZJxl':function(_0x6e14d6,_0xafa6f9){return _0x6e14d6!==_0xafa6f9;},'QjMsJ':function(_0x2b552c,_0x21e392){return _0x2b552c!==_0x21e392;}},_0xaad9a=_0x12c6aa[_0x9cea57(0xf3)],_0x54d3b1=!!_0xaad9a&&'baseUrl'in _0xaad9a,_0x1e966f=_0xaad9a?.['baseUrl'],_0x56ea05=!(_0x54d3b1&&_0x4d5756[_0x9cea57(0xe2)](_0x1e966f,null)),_0x462231=[[_0x12c6aa['flagBaseUrl'],_0x4d5756[_0x9cea57(0xde)]],[_0x12c6aa[_0x9cea57(0xe5)],_0x4d5756[_0x9cea57(0xf2)]],[_0x12c6aa['localSettingsBaseUrl'],_0x4d5756['XmiXQ']],[typeof _0x1e966f===_0x9cea57(0xe3)?_0x1e966f:undefined,_0x4d5756['DziMq']],[_0x56ea05?_0x12c6aa[_0x9cea57(0xee)]?.[_0x9cea57(0xdb)]:undefined,_0x4d5756['ooaPp']],[_0x56ea05?_0x4d5756[_0x9cea57(0xe6)](normalizeAuthEnvironmentDomain,_0x12c6aa['authEnvironmentDomain']):undefined,'auth\x20environment\x20domain']];for(const [_0x3b7112,_0x12d958]of _0x462231){if(_0x4d5756['RZJxl'](_0x3b7112,undefined)&&_0x3b7112!==null&&_0x4d5756['QjMsJ'](_0x3b7112,''))return{'baseUrl':_0x3b7112,'source':_0x12d958};}return{};}export function resolveBaseUrl(_0x2a5c14){return resolveBaseUrlWithSource(_0x2a5c14)['baseUrl'];}export function resolveStartPath(_0x2c046b){const _0x154780=_0x3c21,_0x25e73a={'nXSDK':function(_0x3fc5e9,_0xdd9727){return _0x3fc5e9 in _0xdd9727;},'FZttb':function(_0x2ba3db,_0x5490d6){return _0x2ba3db===_0x5490d6;},'gaaFW':function(_0x4423ac,_0x2951da,_0x290110,_0x194fd4,_0xdb75ee){return _0x4423ac(_0x2951da,_0x290110,_0x194fd4,_0xdb75ee);},'RRDDr':function(_0x242327,_0x41285a){return _0x242327===_0x41285a;}},_0x4c4859=_0x2c046b[_0x154780(0xf3)],_0x470a0d=!!_0x4c4859&&_0x25e73a['nXSDK']('startPath',_0x4c4859),_0x327ee5=_0x4c4859?.[_0x154780(0xe9)],_0x5d1854=!(_0x470a0d&&_0x25e73a['FZttb'](_0x327ee5,null));return _0x25e73a['gaaFW'](firstDefined,_0x2c046b['flagStartPath'],_0x2c046b['envStartPath'],_0x25e73a[_0x154780(0xe1)](typeof _0x327ee5,'string')?_0x327ee5:undefined,_0x5d1854?_0x2c046b[_0x154780(0xee)]?.['startPath']:undefined);}function _0x525f(){const _0x1772d1=['lJoDV','24218dDwCzG','216pnQwmb','RRDDr','hrJwn','string','7582473LpwPMl','envBaseUrl','crOlZ','771657zvXkPn','startsWith','startPath','endsWith','--base-url','vFieC','10VPEUVy','cloudSettings','9ccvdZb','cloud\x20profile\x20settings','47765dPRDrY','iVRpI','projectOverrides','3484908tnOmGB','https://','4096096pvMRyw','baseUrl','RANGER_BASE_URL','2863350BmYAow'];_0x525f=function(){return _0x1772d1;};return _0x525f();}function _0x3c21(_0x4b37a2,_0x5cf7f0){_0x4b37a2=_0x4b37a2-0xd8;const _0x525fa6=_0x525f();let _0x3c2144=_0x525fa6[_0x4b37a2];return _0x3c2144;}export function joinBaseAndPath(_0xdffef0,_0x266587){const _0x48d26f=_0x3c21;if(!_0xdffef0)return undefined;if(!_0x266587)return _0xdffef0;const _0x1c61cc=_0xdffef0[_0x48d26f(0xea)]('/')?_0xdffef0['slice'](0x0,-0x1):_0xdffef0,_0x206489=_0x266587[_0x48d26f(0xe8)]('/')?_0x266587:'/'+_0x266587;return _0x1c61cc+_0x206489;}export function resolveProfileUrl(_0x5eb6ef){const {baseUrl:_0x262574,source:_0xde33c7}=resolveBaseUrlWithSource(_0x5eb6ef),_0x33826=resolveStartPath(_0x5eb6ef);return{'baseUrl':_0x262574,'baseUrlSource':_0xde33c7,'startPath':_0x33826,'url':joinBaseAndPath(_0x262574,_0x33826)};}export function readUrlEnvVars(_0xa02716=process['env']){const _0x49a756=_0x3c21;return{'envBaseUrl':_0xa02716[_0x49a756(0xdc)],'envStartPath':_0xa02716['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4b77(_0x307042,_0x4c8f80){_0x307042=_0x307042-0x120;const _0xb2e8f8=_0xb2e8();let _0x4b77d3=_0xb2e8f8[_0x307042];return _0x4b77d3;}(function(_0x2c2f5d,_0x2494e6){const _0x3dd941=_0x4b77,_0x2a7bab=_0x2c2f5d();while(!![]){try{const _0x2cdd6b=parseInt(_0x3dd941(0x123))/0x1*(parseInt(_0x3dd941(0x12b))/0x2)+-parseInt(_0x3dd941(0x128))/0x3+-parseInt(_0x3dd941(0x129))/0x4+parseInt(_0x3dd941(0x124))/0x5+parseInt(_0x3dd941(0x127))/0x6+parseInt(_0x3dd941(0x12a))/0x7+-parseInt(_0x3dd941(0x122))/0x8;if(_0x2cdd6b===_0x2494e6)break;else _0x2a7bab['push'](_0x2a7bab['shift']());}catch(_0x5daa6d){_0x2a7bab['push'](_0x2a7bab['shift']());}}}(_0xb2e8,0xa4617));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x423683,_0x24ffd7){const _0x2cc374=_0x4b77,_0x55a3d9={'WjGrN':function(_0x4947c8,_0x5c32f8){return _0x4947c8<=_0x5c32f8;},'DTvFf':function(_0x5578e4,_0x276d89){return _0x5578e4 instanceof _0x276d89;},'UzRYC':function(_0x3a2718,_0x5e8670){return _0x3a2718<_0x5e8670;},'kRndb':function(_0x74befc,_0x349f3a){return _0x74befc*_0x349f3a;}},_0x7ceb47=_0x24ffd7?.[_0x2cc374(0x126)]??DEFAULT_MAX_RETRIES,_0x4b65a4=_0x24ffd7?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x193b84;for(let _0x4d5ec2=0x0;_0x55a3d9['WjGrN'](_0x4d5ec2,_0x7ceb47);_0x4d5ec2++){try{return await _0x423683();}catch(_0x3fdd9a){_0x193b84=_0x55a3d9['DTvFf'](_0x3fdd9a,Error)?_0x3fdd9a:new Error(String(_0x3fdd9a));if(_0x55a3d9['UzRYC'](_0x4d5ec2,_0x7ceb47)){const _0x4f1b97=_0x55a3d9[_0x2cc374(0x12c)](_0x4b65a4,Math[_0x2cc374(0x125)](0x2,_0x4d5ec2));_0x24ffd7?.[_0x2cc374(0x120)]&&console[_0x2cc374(0x12d)](_0x24ffd7['label']+'\x20failed\x20(attempt\x20'+(_0x4d5ec2+0x1)+'/'+(_0x7ceb47+0x1)+'),\x20retrying\x20in\x20'+_0x4f1b97+_0x2cc374(0x121)),await new Promise(_0x209d58=>setTimeout(_0x209d58,_0x4f1b97));}}}throw _0x193b84;}function _0xb2e8(){const _0x1076df=['2519348bHbOIT','kRndb','error','label','ms...','18568088qCVedj','1OJqUnm','5707120wgiepB','pow','maxRetries','4580232vSQuDg','62772hVQhGr','1641692iAdUun','1828337sCQDXX'];_0xb2e8=function(){return _0x1076df;};return _0xb2e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4772(_0xec9108,_0x2b5739){_0xec9108=_0xec9108-0x1a5;const _0x16e877=_0x16e8();let _0x47724a=_0x16e877[_0xec9108];return _0x47724a;}(function(_0x5c88b4,_0x30e78a){const _0x5e4c13=_0x4772,_0x411e45=_0x5c88b4();while(!![]){try{const _0x3093fc=parseInt(_0x5e4c13(0x1ad))/0x1+parseInt(_0x5e4c13(0x1a5))/0x2*(-parseInt(_0x5e4c13(0x1a9))/0x3)+parseInt(_0x5e4c13(0x1aa))/0x4*(parseInt(_0x5e4c13(0x1b1))/0x5)+parseInt(_0x5e4c13(0x1a7))/0x6*(parseInt(_0x5e4c13(0x1ab))/0x7)+-parseInt(_0x5e4c13(0x1a8))/0x8+parseInt(_0x5e4c13(0x1b3))/0x9*(parseInt(_0x5e4c13(0x1ae))/0xa)+-parseInt(_0x5e4c13(0x1b0))/0xb*(parseInt(_0x5e4c13(0x1a6))/0xc);if(_0x3093fc===_0x30e78a)break;else _0x411e45['push'](_0x411e45['shift']());}catch(_0x169534){_0x411e45['push'](_0x411e45['shift']());}}}(_0x16e8,0xa9d16));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x1f5372){const _0x584854=_0x4772,_0x779317=new Set();for(const _0x17fd54 of _0x1f5372[_0x584854(0x1b2)](ABSOLUTE_URL_PATTERN)){const _0xb990a2=_0x17fd54[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x779317[_0x584854(0x1af)](new URL(_0xb990a2)[_0x584854(0x1ac)]);}catch{}}return[..._0x779317];}function _0x16e8(){const _0x3a4602=['3100MOmvjy','add','24783fysrWN','395UnmwUP','matchAll','33093wJmBXu','64sXAcpm','2268dFOIen','12zfIPRL','8145048FOnfNw','52341hRTnHf','5716gJhRKV','2115127vEbNxZ','origin','840743RcTfxt'];_0x16e8=function(){return _0x3a4602;};return _0x16e8();}export function findScenarioOriginMismatches(_0x34695a,_0x1aa794){const _0x5942be=_0x4772;let _0x485bad;try{_0x485bad=new URL(_0x1aa794)[_0x5942be(0x1ac)];}catch{return[];}return extractUrlOrigins(_0x34695a)['filter'](_0xc9f3ca=>_0xc9f3ca!==_0x485bad);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3b30(){const _0x2526e6=['MtAeF','36WVfnHd','2otAOCk','JFXiu','JCzqe','utf-8','enabled','existsSync','ZhfRx','tjgrq','1356UXcPMC','knZxI','SXoRH','mszHs','7nuTuGm','tnWaO','branches','qMgZl','AhnmF','currentBranch','git\x20rev-parse\x20--abbrev-ref\x20HEAD','lastEnabledSessionClearedAt','1524mhdPuZ','qWKtw','2180712YLFral','izPUz','746559cMlQNp','featureId','trim','lBWap','IOJbj','prompted','47911dWQNwi','toISOString','422160QyWpEa','registeredAt','Pcbbm','homedir','iqqcs','pipe','mkdirSync','iviSB','311670fthCGQ','MrODP','sFMmc','rqpeE','IiuOn','main','readFileSync','sessions','6EXStwE','1232913ALklYF','teUmr','YtKTz','nquFU','uGGHb','.ranger_cache.json','lastPlanReminderAt','now','lastStopReminderAt'];_0x3b30=function(){return _0x2526e6;};return _0x3b30();}const _0x53a591=_0x4be0;(function(_0x113d46,_0x393532){const _0x47a54c=_0x4be0,_0x4af3c2=_0x113d46();while(!![]){try{const _0x49a947=-parseInt(_0x47a54c(0x1d2))/0x1*(-parseInt(_0x47a54c(0x1b4))/0x2)+-parseInt(_0x47a54c(0x1bc))/0x3*(parseInt(_0x47a54c(0x1c8))/0x4)+-parseInt(_0x47a54c(0x1d4))/0x5*(-parseInt(_0x47a54c(0x1e4))/0x6)+-parseInt(_0x47a54c(0x1c0))/0x7*(parseInt(_0x47a54c(0x1ca))/0x8)+parseInt(_0x47a54c(0x1cc))/0x9+parseInt(_0x47a54c(0x1dc))/0xa+parseInt(_0x47a54c(0x1e5))/0xb*(parseInt(_0x47a54c(0x1ef))/0xc);if(_0x49a947===_0x393532)break;else _0x4af3c2['push'](_0x4af3c2['shift']());}catch(_0x2724c5){_0x4af3c2['push'](_0x4af3c2['shift']());}}}(_0x3b30,0x21ab5));import*as _0x6b9ccb from'fs';import*as _0x3c94c7 from'path';import*as _0x4f9733 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x3c94c7['join'](_0x4f9733[_0x53a591(0x1d7)](),'.claude',_0x53a591(0x1ea));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x556466=_0x53a591,_0x30ed74={'YtKTz':'utf-8','JVouP':function(_0x1c4d28){return _0x1c4d28();}};try{if(_0x6b9ccb['existsSync'](CACHE_FILE)){const _0x1ce740=JSON['parse'](_0x6b9ccb[_0x556466(0x1e2)](CACHE_FILE,_0x30ed74[_0x556466(0x1e7)]));return{'version':0x3,'sessions':_0x1ce740[_0x556466(0x1e3)]||{},'branches':_0x1ce740['branches']||{},'lastEnabledSessionClearedAt':_0x1ce740[_0x556466(0x1c7)]};}}catch{}return _0x30ed74['JVouP'](createEmptyCache);}function saveCache(_0x148872){const _0x3f1805=_0x53a591;try{const _0x47e7ca=_0x3c94c7['dirname'](CACHE_FILE);!_0x6b9ccb[_0x3f1805(0x1b9)](_0x47e7ca)&&_0x6b9ccb[_0x3f1805(0x1da)](_0x47e7ca,{'recursive':!![]}),_0x6b9ccb['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x148872,null,0x2));}catch{}}export function getCurrentBranch(){const _0x19c18c=_0x53a591,_0xdbafe0={'epQvW':_0x19c18c(0x1c6),'AhnmF':'pipe','Pcbbm':function(_0x4cc596,_0x308b30){return _0x4cc596===_0x308b30;}};try{const _0x2b7722=execSync(_0xdbafe0['epQvW'],{'encoding':_0x19c18c(0x1b7),'stdio':[_0x19c18c(0x1d9),_0xdbafe0[_0x19c18c(0x1c4)],_0xdbafe0[_0x19c18c(0x1c4)]]})[_0x19c18c(0x1ce)]();if(!_0x2b7722||_0xdbafe0[_0x19c18c(0x1d6)](_0x2b7722,'HEAD'))return null;return _0x2b7722;}catch{return null;}}export function enableBranch(_0x2e2b00){const _0x5ca090=_0x53a591,_0x192c39={'qWKtw':function(_0x2bd248){return _0x2bd248();},'qHyrg':function(_0x129045,_0x7bedfa){return _0x129045(_0x7bedfa);}},_0x17959e=_0x192c39[_0x5ca090(0x1c9)](loadCache);_0x17959e['branches'][_0x2e2b00]=!![],_0x192c39['qHyrg'](saveCache,_0x17959e);}export function disableBranch(_0x10b5b5){const _0xb238b8=_0x53a591,_0x4dbb33=loadCache();delete _0x4dbb33[_0xb238b8(0x1c2)][_0x10b5b5],saveCache(_0x4dbb33);}export function isBranchEnabled(_0x2b0ea9){const _0xfd011f=_0x53a591,_0x1fcdf5={'uGGHb':function(_0x341685){return _0x341685();},'JFXiu':function(_0x6d5822,_0x12ec2b){return _0x6d5822===_0x12ec2b;}},_0x2e9c93=_0x1fcdf5[_0xfd011f(0x1e9)](loadCache);return _0x1fcdf5[_0xfd011f(0x1b5)](_0x2e9c93['branches'][_0x2b0ea9],!![]);}function getOrCreateSession(_0x5c6108,_0x425e14){const _0x4849de=_0x53a591;return!_0x5c6108[_0x4849de(0x1e3)][_0x425e14]&&(_0x5c6108[_0x4849de(0x1e3)][_0x425e14]={}),_0x5c6108['sessions'][_0x425e14];}export function enableSession(_0x2dfbf0){const _0xa4d94d=_0x53a591,_0x2a8537={'qWObk':function(_0x572fa4){return _0x572fa4();},'PckTk':function(_0x33ddc8,_0x32cd04,_0x4f2308){return _0x33ddc8(_0x32cd04,_0x4f2308);}},_0x13955e=_0x2a8537['qWObk'](loadCache),_0x35c066=_0x2a8537['PckTk'](getOrCreateSession,_0x13955e,_0x2dfbf0);_0x35c066['enabled']=!![];const _0x27b33d=getCurrentBranch();_0x27b33d&&_0x27b33d!==_0xa4d94d(0x1e1)&&_0x27b33d!=='master'&&(_0x13955e['branches'][_0x27b33d]=!![],_0x35c066['currentBranch']=_0x27b33d),saveCache(_0x13955e);}export function isSessionEnabled(_0x4330f1){const _0x91c3ee=_0x53a591,_0x8c9010={'ZhfRx':function(_0x53806e){return _0x53806e();},'tnWaO':'main','rqpeE':'master','XZfPm':function(_0x3e85bc,_0x5b4f08){return _0x3e85bc===_0x5b4f08;},'tjgrq':function(_0x7f8058,_0x350a3a){return _0x7f8058||_0x350a3a;}},_0x5188f4=_0x8c9010[_0x91c3ee(0x1ba)](loadCache),_0x13105a=_0x8c9010[_0x91c3ee(0x1ba)](getCurrentBranch);if(!_0x13105a||_0x13105a===_0x8c9010[_0x91c3ee(0x1c1)]||_0x13105a===_0x8c9010[_0x91c3ee(0x1df)])return _0x8c9010['XZfPm'](_0x5188f4['sessions'][_0x4330f1]?.[_0x91c3ee(0x1b8)],!![]);const _0x2657eb=_0x5188f4[_0x91c3ee(0x1c2)][_0x13105a]===!![],_0x84e375=_0x5188f4['sessions'][_0x4330f1]?.['enabled']===!![];return _0x8c9010[_0x91c3ee(0x1bb)](_0x2657eb,_0x84e375);}function _0x4be0(_0x127400,_0x109ba4){_0x127400=_0x127400-0x1b4;const _0x3b30de=_0x3b30();let _0x4be053=_0x3b30de[_0x127400];return _0x4be053;}export function disableSession(_0x53227f){const _0xcf6045=_0x53a591,_0x3af768={'FpoXE':function(_0x5de32a,_0x573e01,_0x3a519e){return _0x5de32a(_0x573e01,_0x3a519e);}},_0x14a0f1=loadCache(),_0x593609=_0x3af768['FpoXE'](getOrCreateSession,_0x14a0f1,_0x53227f);_0x593609[_0xcf6045(0x1b8)]=![],saveCache(_0x14a0f1);}export function updateBranchTracking(_0x39b8e3){const _0x25c030=_0x53a591,_0x1aba44={'gAeFw':function(_0x5212ac){return _0x5212ac();},'ZjUDl':'main','Uwkwa':function(_0x50810f,_0x410028){return _0x50810f===_0x410028;},'gDkFd':function(_0x2b6d6d,_0x5779d7){return _0x2b6d6d(_0x5779d7);}},_0x4cbb65=_0x1aba44['gAeFw'](loadCache),_0x470be3=_0x4cbb65['sessions'][_0x39b8e3];if(!_0x470be3?.[_0x25c030(0x1b8)])return;const _0x106aaa=_0x1aba44['gAeFw'](getCurrentBranch);if(!_0x106aaa||_0x106aaa===_0x1aba44['ZjUDl']||_0x1aba44['Uwkwa'](_0x106aaa,'master'))return;_0x470be3[_0x25c030(0x1c5)]!==_0x106aaa&&(_0x4cbb65['branches'][_0x106aaa]=!![],_0x470be3[_0x25c030(0x1c5)]=_0x106aaa,_0x1aba44['gDkFd'](saveCache,_0x4cbb65));}export function initBranchTracking(_0x38ab81){const _0xf07e9e=_0x53a591,_0x55d638={'VBxBm':function(_0x14dae2){return _0x14dae2();},'iviSB':function(_0x198ed2,_0x3fe67c){return _0x198ed2===_0x3fe67c;},'knZxI':_0xf07e9e(0x1e1),'YvBul':'master','izPUz':function(_0x5424c5,_0x1580b2){return _0x5424c5===_0x1580b2;},'sFMmc':function(_0x5ef881,_0x511210,_0x24b1f5){return _0x5ef881(_0x511210,_0x24b1f5);}},_0x1d6e69=loadCache(),_0x4bf197=_0x55d638['VBxBm'](getCurrentBranch);if(!_0x4bf197||_0x55d638[_0xf07e9e(0x1db)](_0x4bf197,_0x55d638[_0xf07e9e(0x1bd)])||_0x55d638['iviSB'](_0x4bf197,_0x55d638['YvBul']))return;if(_0x55d638[_0xf07e9e(0x1cb)](_0x1d6e69['branches'][_0x4bf197],!![])){const _0x2beefc=_0x55d638[_0xf07e9e(0x1de)](getOrCreateSession,_0x1d6e69,_0x38ab81);_0x2beefc[_0xf07e9e(0x1b8)]=!![],_0x2beefc[_0xf07e9e(0x1c5)]=_0x4bf197,saveCache(_0x1d6e69);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x184af2){const _0x96d2de=_0x53a591,_0x143ba6={'gmSkt':function(_0x531e29){return _0x531e29();},'iqqcs':function(_0x2fb7fc,_0x2da55d){return _0x2fb7fc(_0x2da55d);}},_0x821ab8=_0x143ba6['gmSkt'](loadCache),_0x2a2c31=_0x821ab8['sessions'][_0x184af2];_0x2a2c31?.['enabled']&&(_0x821ab8['lastEnabledSessionClearedAt']=Date['now'](),_0x143ba6[_0x96d2de(0x1d8)](saveCache,_0x821ab8));}export function shouldAutoEnableAfterClear(_0x37f925){const _0x1dfacc=_0x53a591,_0x44a38c={'mszHs':function(_0x72bf89,_0x35e5b9){return _0x72bf89!==_0x35e5b9;},'lBWap':'clear'};if(_0x44a38c[_0x1dfacc(0x1bf)](_0x37f925,_0x44a38c[_0x1dfacc(0x1cf)]))return![];const _0x1d4f7c=loadCache(),_0x19e42f=_0x1d4f7c['lastEnabledSessionClearedAt'];if(!_0x19e42f)return![];const _0x4f8343=Date[_0x1dfacc(0x1ec)]()-_0x19e42f;return _0x4f8343<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x166f30){const _0x2384f1=_0x53a591,_0x34dc62={'AwIRc':function(_0x462ab6){return _0x462ab6();},'JCzqe':function(_0x2178ba){return _0x2178ba();},'kNgCo':function(_0x4c23ec,_0x4ff618){return _0x4c23ec!==_0x4ff618;},'teUmr':'master'},_0x455bb4=_0x34dc62['AwIRc'](loadCache),_0xebd78d=getOrCreateSession(_0x455bb4,_0x166f30);_0xebd78d['enabled']=!![];const _0x1dbc76=_0x34dc62[_0x2384f1(0x1b6)](getCurrentBranch);_0x1dbc76&&_0x34dc62['kNgCo'](_0x1dbc76,'main')&&_0x1dbc76!==_0x34dc62[_0x2384f1(0x1e6)]&&(_0xebd78d[_0x2384f1(0x1c5)]=_0x1dbc76),delete _0x455bb4['lastEnabledSessionClearedAt'],saveCache(_0x455bb4);}export function registerSession(_0x1a86ea,_0x418f62){const _0x293b58=_0x53a591,_0x3e88a9={'CxHMC':function(_0x43b73c){return _0x43b73c();},'kUUKW':function(_0x170db8,_0xb617f3){return _0x170db8(_0xb617f3);}},_0x33596b=_0x3e88a9['CxHMC'](loadCache),_0x18c202=getOrCreateSession(_0x33596b,_0x1a86ea);_0x18c202['featureId']=_0x418f62,_0x18c202['registeredAt']=new Date()[_0x293b58(0x1d3)](),_0x3e88a9['kUUKW'](saveCache,_0x33596b);}export function getSessionEntry(_0x17cc35){const _0x2ff935=_0x53a591,_0x2a5c35=loadCache(),_0x1cb5b9=_0x2a5c35[_0x2ff935(0x1e3)][_0x17cc35];if(_0x1cb5b9?.[_0x2ff935(0x1cd)]&&_0x1cb5b9?.[_0x2ff935(0x1d5)])return{'featureId':_0x1cb5b9[_0x2ff935(0x1cd)],'registeredAt':_0x1cb5b9[_0x2ff935(0x1d5)]};return null;}export function unregisterSession(_0x4eb86d){const _0x1dd83c=_0x53a591,_0x464038={'IiuOn':function(_0x29b1d4,_0x1992f3){return _0x29b1d4(_0x1992f3);}},_0x471662=loadCache(),_0x2bbd8e=_0x471662[_0x1dd83c(0x1e3)][_0x4eb86d];_0x2bbd8e&&(delete _0x2bbd8e[_0x1dd83c(0x1cd)],delete _0x2bbd8e[_0x1dd83c(0x1d5)],_0x464038[_0x1dd83c(0x1e0)](saveCache,_0x471662));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x4fbf1c){const _0x3d7ffd=_0x53a591,_0x36b335={'SXoRH':function(_0x44cc53,_0x37489b,_0x6d778c){return _0x44cc53(_0x37489b,_0x6d778c);},'MrODP':function(_0x4359dd,_0x21616d){return _0x4359dd-_0x21616d;},'qMgZl':function(_0x17e046,_0x3ad50b){return _0x17e046(_0x3ad50b);}},_0x9957fe=loadCache(),_0x374e95=_0x36b335[_0x3d7ffd(0x1be)](getOrCreateSession,_0x9957fe,_0x4fbf1c),_0x110a8e=_0x374e95['lastPlanReminderAt']||0x0,_0x338029=Date['now']();if(_0x36b335[_0x3d7ffd(0x1dd)](_0x338029,_0x110a8e)>=PLAN_REMINDER_INTERVAL_MS)return _0x374e95[_0x3d7ffd(0x1eb)]=_0x338029,_0x36b335[_0x3d7ffd(0x1c3)](saveCache,_0x9957fe),!![];return![];}export function shouldShowStopReminder(_0x1ed93e){const _0x2a7ab3=_0x53a591,_0x56932c={'IOJbj':function(_0x311f02,_0x3513fc,_0x279734){return _0x311f02(_0x3513fc,_0x279734);},'Tlxhp':function(_0x82fedc,_0x3d2859){return _0x82fedc>=_0x3d2859;},'MtAeF':function(_0x39c9ec,_0x23b581){return _0x39c9ec-_0x23b581;},'VmRLd':function(_0x32fad1,_0x5d09d7){return _0x32fad1(_0x5d09d7);}},_0x11e1da=loadCache(),_0xcf4cf8=_0x56932c[_0x2a7ab3(0x1d0)](getOrCreateSession,_0x11e1da,_0x1ed93e),_0x8ef11d=_0xcf4cf8[_0x2a7ab3(0x1ed)]||0x0,_0x2aae6a=Date['now']();if(_0x56932c['Tlxhp'](_0x56932c[_0x2a7ab3(0x1ee)](_0x2aae6a,_0x8ef11d),STOP_REMINDER_INTERVAL_MS))return _0xcf4cf8[_0x2a7ab3(0x1ed)]=_0x2aae6a,_0x56932c['VmRLd'](saveCache,_0x11e1da),!![];return![];}export function hasSessionBeenPrompted(_0x489569){const _0x2af40a=_0x53a591,_0x43aef2={'bpBzl':function(_0x50c35a,_0x3729ef){return _0x50c35a===_0x3729ef;}},_0x39a008=loadCache();return _0x43aef2['bpBzl'](_0x39a008[_0x2af40a(0x1e3)][_0x489569]?.[_0x2af40a(0x1d1)],!![]);}export function markSessionPrompted(_0xe5a503){const _0x3a8b15=_0x53a591,_0x137d6b={'nquFU':function(_0x3e6d36){return _0x3e6d36();}},_0x2605d8=_0x137d6b[_0x3a8b15(0x1e8)](loadCache),_0x40072f=getOrCreateSession(_0x2605d8,_0xe5a503);_0x40072f[_0x3a8b15(0x1d1)]=!![],saveCache(_0x2605d8);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x11e65d=_0x395e;(function(_0x2d7493,_0xf86de9){const _0x4c34bd=_0x395e,_0x114ef8=_0x2d7493();while(!![]){try{const _0x4a3d68=-parseInt(_0x4c34bd(0x11c))/0x1+-parseInt(_0x4c34bd(0x12e))/0x2*(parseInt(_0x4c34bd(0x118))/0x3)+parseInt(_0x4c34bd(0x134))/0x4*(-parseInt(_0x4c34bd(0x127))/0x5)+parseInt(_0x4c34bd(0x123))/0x6*(-parseInt(_0x4c34bd(0x11a))/0x7)+parseInt(_0x4c34bd(0x11d))/0x8*(-parseInt(_0x4c34bd(0x110))/0x9)+-parseInt(_0x4c34bd(0x128))/0xa+parseInt(_0x4c34bd(0x117))/0xb;if(_0x4a3d68===_0xf86de9)break;else _0x114ef8['push'](_0x114ef8['shift']());}catch(_0x3ecb53){_0x114ef8['push'](_0x114ef8['shift']());}}}(_0x2e1c,0x56bcb));import*as _0x110111 from'fs';import*as _0x4b41a8 from'path';import*as _0x105108 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4b41a8['join'](_0x105108[_0x11e65d(0x135)](),_0x11e65d(0x10e),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x24fd0a=_0x11e65d,_0x255ae2={'dPVtL':'utf-8','Drquy':function(_0x311288){return _0x311288();}};try{if(_0x110111['existsSync'](CACHE_FILE)){const _0x25b7d1=JSON[_0x24fd0a(0x115)](_0x110111[_0x24fd0a(0x12f)](CACHE_FILE,_0x255ae2['dPVtL']));return{'version':0x3,'sessions':_0x25b7d1['sessions']||{},'branches':_0x25b7d1['branches']||{},'lastEnabledSessionClearedAt':_0x25b7d1[_0x24fd0a(0x131)]};}}catch{}return _0x255ae2['Drquy'](createEmptyCache);}function saveCache(_0x1271bb){const _0x1de0fa=_0x11e65d;try{const _0x16038b=_0x4b41a8['dirname'](CACHE_FILE);!_0x110111['existsSync'](_0x16038b)&&_0x110111[_0x1de0fa(0x10f)](_0x16038b,{'recursive':!![]}),_0x110111[_0x1de0fa(0x132)](CACHE_FILE,JSON['stringify'](_0x1271bb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3908b1=_0x11e65d,_0x393e3b={'UHxeN':_0x3908b1(0x137),'gEQeC':function(_0x61c4a0,_0x2b7fa7){return _0x61c4a0===_0x2b7fa7;},'WeaTK':'HEAD'};try{const _0xdbaef2=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x3908b1(0x119),'stdio':[_0x393e3b['UHxeN'],_0x393e3b['UHxeN'],'pipe']})[_0x3908b1(0x11b)]();if(!_0xdbaef2||_0x393e3b[_0x3908b1(0x12c)](_0xdbaef2,_0x393e3b['WeaTK']))return null;return _0xdbaef2;}catch{return null;}}export function enableBranch(_0x215f80){const _0x564688=_0x11e65d,_0x54a3b0={'FowNH':function(_0x19fbe5){return _0x19fbe5();},'thxFl':function(_0x23a3af,_0x35d356){return _0x23a3af(_0x35d356);}},_0x4b79a4=_0x54a3b0['FowNH'](loadCache);_0x4b79a4['branches'][_0x215f80]=!![],_0x54a3b0[_0x564688(0x133)](saveCache,_0x4b79a4);}export function disableBranch(_0x4d601e){const _0x3808e6=_0x11e65d,_0x5c620b={'OwEWm':function(_0x4a47d3,_0x5bc8ff){return _0x4a47d3(_0x5bc8ff);}},_0x390919=loadCache();delete _0x390919[_0x3808e6(0x12d)][_0x4d601e],_0x5c620b[_0x3808e6(0x122)](saveCache,_0x390919);}export function isBranchEnabled(_0x323e48){const _0x9e08fb=_0x11e65d,_0x52b395={'LGCtn':function(_0x194fd2,_0x29ea8b){return _0x194fd2===_0x29ea8b;}},_0x47e1ff=loadCache();return _0x52b395[_0x9e08fb(0x113)](_0x47e1ff[_0x9e08fb(0x12d)][_0x323e48],!![]);}function getOrCreateSession(_0x2bb235,_0x255929){const _0x471663=_0x11e65d;return!_0x2bb235[_0x471663(0x125)][_0x255929]&&(_0x2bb235['sessions'][_0x255929]={}),_0x2bb235[_0x471663(0x125)][_0x255929];}export function enableSession(_0x3f2155){const _0x30a179=_0x11e65d,_0x440476={'uGOBU':function(_0x58f741,_0x54622c,_0x5960ce){return _0x58f741(_0x54622c,_0x5960ce);},'ZGgyW':function(_0x5778c9,_0x48ae7c){return _0x5778c9!==_0x48ae7c;}},_0x54e007=loadCache(),_0x53cf12=_0x440476['uGOBU'](getOrCreateSession,_0x54e007,_0x3f2155);_0x53cf12['enabled']=!![];const _0x444b7c=getCurrentBranch();_0x444b7c&&_0x440476[_0x30a179(0x120)](_0x444b7c,'main')&&_0x440476['ZGgyW'](_0x444b7c,_0x30a179(0x10d))&&(_0x54e007['branches'][_0x444b7c]=!![],_0x53cf12[_0x30a179(0x10a)]=_0x444b7c),saveCache(_0x54e007);}export function isSessionEnabled(_0x2ca52b){const _0x16d9b9=_0x11e65d,_0x40a0f4={'sskWz':function(_0x454b1e){return _0x454b1e();},'rEVYN':function(_0x196980,_0x865900){return _0x196980===_0x865900;},'iouBj':function(_0x3b273f,_0x18d913){return _0x3b273f||_0x18d913;}},_0x251dea=loadCache(),_0x24349c=_0x40a0f4['sskWz'](getCurrentBranch);if(!_0x24349c||_0x40a0f4[_0x16d9b9(0x10c)](_0x24349c,'main')||_0x24349c==='master')return _0x251dea['sessions'][_0x2ca52b]?.[_0x16d9b9(0x116)]===!![];const _0x2c1172=_0x251dea[_0x16d9b9(0x12d)][_0x24349c]===!![],_0xffa7c1=_0x251dea[_0x16d9b9(0x125)][_0x2ca52b]?.['enabled']===!![];return _0x40a0f4[_0x16d9b9(0x124)](_0x2c1172,_0xffa7c1);}export function disableSession(_0xf9aff9){const _0x3bfaa4=_0x11e65d,_0x4c181a={'rpXVY':function(_0x3b1de2){return _0x3b1de2();}},_0x238376=_0x4c181a[_0x3bfaa4(0x126)](loadCache),_0x16e528=getOrCreateSession(_0x238376,_0xf9aff9);_0x16e528[_0x3bfaa4(0x116)]=![],saveCache(_0x238376);}export function updateBranchTracking(_0xad482){const _0xfebe08=_0x11e65d,_0x3d3922={'YuPsB':function(_0x5cbe3b){return _0x5cbe3b();},'JmTos':function(_0x585bf9,_0x1ddfdd){return _0x585bf9!==_0x1ddfdd;}},_0x377e23=_0x3d3922['YuPsB'](loadCache),_0x447b28=_0x377e23['sessions'][_0xad482];if(!_0x447b28?.[_0xfebe08(0x116)])return;const _0x15a2a4=getCurrentBranch();if(!_0x15a2a4||_0x15a2a4===_0xfebe08(0x111)||_0x15a2a4===_0xfebe08(0x10d))return;_0x3d3922[_0xfebe08(0x109)](_0x447b28[_0xfebe08(0x10a)],_0x15a2a4)&&(_0x377e23[_0xfebe08(0x12d)][_0x15a2a4]=!![],_0x447b28['currentBranch']=_0x15a2a4,saveCache(_0x377e23));}export function initBranchTracking(_0x14926d){const _0x2b7f9f=_0x11e65d,_0x20ec86={'uULfv':_0x2b7f9f(0x111),'XmQia':function(_0xb404a0,_0xc4e80e){return _0xb404a0===_0xc4e80e;},'riQiY':'master','sQQIz':function(_0x7fe0c0,_0x32c261){return _0x7fe0c0(_0x32c261);}},_0x1bb103=loadCache(),_0xdc9ad6=getCurrentBranch();if(!_0xdc9ad6||_0xdc9ad6===_0x20ec86[_0x2b7f9f(0x136)]||_0x20ec86[_0x2b7f9f(0x12a)](_0xdc9ad6,_0x20ec86['riQiY']))return;if(_0x1bb103['branches'][_0xdc9ad6]===!![]){const _0x5a8272=getOrCreateSession(_0x1bb103,_0x14926d);_0x5a8272['enabled']=!![],_0x5a8272['currentBranch']=_0xdc9ad6,_0x20ec86[_0x2b7f9f(0x130)](saveCache,_0x1bb103);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2cb2fe){const _0x107cb2=_0x11e65d,_0x391e86=loadCache(),_0x5d9555=_0x391e86['sessions'][_0x2cb2fe];_0x5d9555?.[_0x107cb2(0x116)]&&(_0x391e86[_0x107cb2(0x131)]=Date[_0x107cb2(0x10b)](),saveCache(_0x391e86));}export function shouldAutoEnableAfterClear(_0x1e92c9){const _0x13b56=_0x11e65d,_0x134bb5={'eEUls':'clear','fRRBV':function(_0x4ec6b3){return _0x4ec6b3();},'YiZTj':function(_0x384d62,_0x51c17e){return _0x384d62<=_0x51c17e;}};if(_0x1e92c9!==_0x134bb5[_0x13b56(0x11e)])return![];const _0x599bf5=_0x134bb5['fRRBV'](loadCache),_0x353dc4=_0x599bf5['lastEnabledSessionClearedAt'];if(!_0x353dc4)return![];const _0x463b46=Date[_0x13b56(0x10b)]()-_0x353dc4;return _0x134bb5['YiZTj'](_0x463b46,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x59d8ec){const _0x4420c4=_0x11e65d,_0x9ada27={'CdCUK':function(_0x5daa2b){return _0x5daa2b();},'fdNKf':function(_0x355013,_0xe9f45b,_0x157f32){return _0x355013(_0xe9f45b,_0x157f32);},'dUjBO':function(_0x48ea96){return _0x48ea96();},'hWhnW':function(_0x49da8b,_0x351806){return _0x49da8b!==_0x351806;},'KMbYz':function(_0x56e332,_0x4619d5){return _0x56e332(_0x4619d5);}},_0x17f321=_0x9ada27['CdCUK'](loadCache),_0x48c05f=_0x9ada27['fdNKf'](getOrCreateSession,_0x17f321,_0x59d8ec);_0x48c05f[_0x4420c4(0x116)]=!![];const _0x54c0c1=_0x9ada27['dUjBO'](getCurrentBranch);_0x54c0c1&&_0x54c0c1!=='main'&&_0x9ada27['hWhnW'](_0x54c0c1,'master')&&(_0x48c05f[_0x4420c4(0x10a)]=_0x54c0c1),delete _0x17f321[_0x4420c4(0x131)],_0x9ada27['KMbYz'](saveCache,_0x17f321);}export function registerSession(_0x4d5061,_0x545029){const _0x381bec=_0x11e65d,_0x2a4a6c={'LtcwG':function(_0x3b83dd,_0x4ff6f3,_0x8ef33d){return _0x3b83dd(_0x4ff6f3,_0x8ef33d);},'XecfF':function(_0x1b2d84,_0x35f314){return _0x1b2d84(_0x35f314);}},_0x3516fc=loadCache(),_0x1e1332=_0x2a4a6c[_0x381bec(0x114)](getOrCreateSession,_0x3516fc,_0x4d5061);_0x1e1332[_0x381bec(0x129)]=_0x545029,_0x1e1332[_0x381bec(0x12b)]=new Date()['toISOString'](),_0x2a4a6c['XecfF'](saveCache,_0x3516fc);}export function getSessionEntry(_0xf4e34){const _0x1ddf09=_0x11e65d,_0x1d46a4={'qKitK':function(_0x49d633){return _0x49d633();}},_0x2c23bf=_0x1d46a4['qKitK'](loadCache),_0x32ae92=_0x2c23bf[_0x1ddf09(0x125)][_0xf4e34];if(_0x32ae92?.[_0x1ddf09(0x129)]&&_0x32ae92?.[_0x1ddf09(0x12b)])return{'featureId':_0x32ae92[_0x1ddf09(0x129)],'registeredAt':_0x32ae92[_0x1ddf09(0x12b)]};return null;}function _0x395e(_0x305d2b,_0x5722bb){_0x305d2b=_0x305d2b-0x109;const _0x2e1cfe=_0x2e1c();let _0x395e13=_0x2e1cfe[_0x305d2b];return _0x395e13;}export function unregisterSession(_0x2673bf){const _0x467c13=_0x11e65d,_0x44e683=loadCache(),_0x2021cd=_0x44e683['sessions'][_0x2673bf];_0x2021cd&&(delete _0x2021cd[_0x467c13(0x129)],delete _0x2021cd['registeredAt'],saveCache(_0x44e683));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1cde54){const _0x263818=_0x11e65d,_0x56d61d={'zxRtB':function(_0x37027e){return _0x37027e();},'NAQpk':function(_0x3b0984,_0x40d228){return _0x3b0984>=_0x40d228;},'iTflX':function(_0x5b0727,_0x3b52b8){return _0x5b0727(_0x3b52b8);}},_0x100969=_0x56d61d['zxRtB'](loadCache),_0x316124=getOrCreateSession(_0x100969,_0x1cde54),_0x2c14ba=_0x316124['lastPlanReminderAt']||0x0,_0x217078=Date['now']();if(_0x56d61d['NAQpk'](_0x217078-_0x2c14ba,PLAN_REMINDER_INTERVAL_MS))return _0x316124[_0x263818(0x11f)]=_0x217078,_0x56d61d['iTflX'](saveCache,_0x100969),!![];return![];}export function shouldShowStopReminder(_0x146f64){const _0x37b18a=_0x11e65d,_0xd2b2b7={'pUWLX':function(_0x2416c9,_0x1e0225){return _0x2416c9>=_0x1e0225;},'VdRVO':function(_0xa3957b,_0x38c83c){return _0xa3957b-_0x38c83c;}},_0x5e4950=loadCache(),_0x35e39b=getOrCreateSession(_0x5e4950,_0x146f64),_0x16e37a=_0x35e39b[_0x37b18a(0x121)]||0x0,_0x44fa5e=Date['now']();if(_0xd2b2b7['pUWLX'](_0xd2b2b7['VdRVO'](_0x44fa5e,_0x16e37a),STOP_REMINDER_INTERVAL_MS))return _0x35e39b[_0x37b18a(0x121)]=_0x44fa5e,saveCache(_0x5e4950),!![];return![];}export function hasSessionBeenPrompted(_0x2bb3c3){const _0x31cbb6=_0x11e65d,_0x1a0475={'NGJoA':function(_0x4282d4,_0x13036b){return _0x4282d4===_0x13036b;}},_0x233cd8=loadCache();return _0x1a0475['NGJoA'](_0x233cd8[_0x31cbb6(0x125)][_0x2bb3c3]?.['prompted'],!![]);}function _0x2e1c(){const _0x198019=['iouBj','sessions','rpXVY','5Zqtgww','4736230eHYPTc','featureId','XmQia','registeredAt','gEQeC','branches','452RSWiDt','readFileSync','sQQIz','lastEnabledSessionClearedAt','writeFileSync','thxFl','265416YWfYyS','homedir','uULfv','pipe','JmTos','currentBranch','now','rEVYN','master','.claude','mkdirSync','9XOkGEA','main','prompted','LGCtn','LtcwG','parse','enabled','24527888ZVLeXX','2772YFxBIu','utf-8','347641mQZmnb','trim','184980eIdPcB','4744888aIheMH','eEUls','lastPlanReminderAt','ZGgyW','lastStopReminderAt','OwEWm','42mPDOGF'];_0x2e1c=function(){return _0x198019;};return _0x2e1c();}export function markSessionPrompted(_0x481a7c){const _0x1f6206=_0x11e65d,_0x90e29a={'shVdO':function(_0x6f76){return _0x6f76();}},_0x4355eb=_0x90e29a['shVdO'](loadCache),_0x5872b7=getOrCreateSession(_0x4355eb,_0x481a7c);_0x5872b7[_0x1f6206(0x112)]=!![],saveCache(_0x4355eb);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x352746=_0x47e0;(function(_0x296239,_0x1d6b21){const _0x254cab=_0x47e0,_0x38c259=_0x296239();while(!![]){try{const _0x79fbed=parseInt(_0x254cab(0x205))/0x1*(-parseInt(_0x254cab(0x1ce))/0x2)+parseInt(_0x254cab(0x1ee))/0x3+-parseInt(_0x254cab(0x1f0))/0x4+parseInt(_0x254cab(0x218))/0x5*(parseInt(_0x254cab(0x1cc))/0x6)+parseInt(_0x254cab(0x1a9))/0x7*(-parseInt(_0x254cab(0x1b1))/0x8)+-parseInt(_0x254cab(0x1d7))/0x9*(-parseInt(_0x254cab(0x227))/0xa)+-parseInt(_0x254cab(0x20f))/0xb;if(_0x79fbed===_0x1d6b21)break;else _0x38c259['push'](_0x38c259['shift']());}catch(_0x19ee43){_0x38c259['push'](_0x38c259['shift']());}}}(_0x10ef,0xd95ae));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(_0x95553,_0x204981){const _0x22a4ca=_0x47e0,_0x1442d0={'avNXy':function(_0x407fe0,_0x48b092,_0x515a5a,_0x3495b9){return _0x407fe0(_0x48b092,_0x515a5a,_0x3495b9);},'hVyBm':_0x22a4ca(0x1d8),'GgXBW':function(_0x41d01a,_0x236236,_0x5cce5c){return _0x41d01a(_0x236236,_0x5cce5c);},'zpfnT':function(_0x54db65,_0x46c2d8){return _0x54db65(_0x46c2d8);}},_0x3374c5=_0x1442d0[_0x22a4ca(0x1a1)](join,_0x204981,'ci',_0x95553),_0x5d8876=join(_0x204981,_0x1442d0[_0x22a4ca(0x1a2)],_0x95553),_0x44a19e=join(_0x204981,_0x95553),_0x135cbb=_0x1442d0['GgXBW'](join,_0x204981,'local'),_0x47582d=join(_0x204981,'ci');if(_0x1442d0[_0x22a4ca(0x1fa)](existsSync,_0x3374c5))return _0x3374c5;if(existsSync(_0x5d8876))return _0x5d8876;if(existsSync(_0x44a19e)&&(_0x44a19e!==_0x135cbb&&_0x44a19e!==_0x47582d?!![]:hasLegacyProfileFiles(_0x44a19e)))return _0x44a19e;return null;}function _0x47e0(_0x4e02ee,_0x43d109){_0x4e02ee=_0x4e02ee-0x19e;const _0x10efc5=_0x10ef();let _0x47e033=_0x10efc5[_0x4e02ee];return _0x47e033;}export function getEnvDir(_0xb5d464,_0x3a0818={}){const _0x58100d=_0x47e0,_0x283821={'olucC':function(_0x6c51d7){return _0x6c51d7();},'mYEJS':function(_0x101e21,_0x184429,_0x554ce0){return _0x101e21(_0x184429,_0x554ce0);},'XgOxU':function(_0x3b10c9,_0x41e14e){return _0x3b10c9!==_0x41e14e;},'FpFPp':function(_0x6686,_0x2d5bc0){return _0x6686(_0x2d5bc0);},'IpUzN':_0x58100d(0x1d8)},_0x171a53=_0x283821[_0x58100d(0x1eb)](getRangerDir),_0x7a3d6f=_0x283821[_0x58100d(0x1d9)](findEnvInRoot,_0xb5d464,_0x171a53);if(_0x7a3d6f){if(_0x3a0818[_0x58100d(0x20d)]&&isLegacyEnvPath(_0x7a3d6f))throw legacyWriteError(_0xb5d464,_0x7a3d6f);return _0x7a3d6f;}const _0x1c39f1=getRangerHomeDir();if(_0x283821['XgOxU'](_0x1c39f1,_0x171a53)){const _0xd3d0f9=_0x283821['mYEJS'](findEnvInRoot,_0xb5d464,_0x1c39f1);if(_0xd3d0f9){if(_0x3a0818[_0x58100d(0x20d)]&&_0x283821[_0x58100d(0x1fc)](isLegacyEnvPath,_0xd3d0f9))throw legacyWriteError(_0xb5d464,_0xd3d0f9);return _0xd3d0f9;}}const _0x233231=join(_0x1c39f1,_0x283821['IpUzN'],_0xb5d464);if(_0x3a0818['forWrite'])throw legacyWriteError(_0xb5d464,_0x233231);return _0x233231;}function isLegacyEnvPath(_0x5a95c0){const _0x380bb0=_0x47e0,_0x289896={'fysdd':function(_0x24d97e){return _0x24d97e();},'ouCdL':function(_0x3db529,_0x26e6ae){return _0x3db529+_0x26e6ae;}},_0x1fa4e1=_0x289896['fysdd'](getRangerDir),_0x1c1a73=getRangerHomeDir();for(const _0x50c39b of new Set([_0x1fa4e1,_0x1c1a73])){const _0x4654fb=_0x50c39b[_0x380bb0(0x1f6)]('/')?_0x50c39b:_0x289896[_0x380bb0(0x19f)](_0x50c39b,'/');if(_0x5a95c0===_0x50c39b||_0x5a95c0[_0x380bb0(0x1e3)](_0x4654fb))return!![];}return![];}function legacyWriteError(_0xc9539f,_0x46f0e8){const _0x5090a3=_0x47e0,_0x47b5b5={'sNWJO':function(_0x365d94,_0x5e2eb2){return _0x365d94+_0x5e2eb2;},'NJRxq':function(_0x22e6b0,_0x5db6bc){return _0x22e6b0+_0x5db6bc;}};return new Error(_0x47b5b5['sNWJO'](_0x47b5b5[_0x5090a3(0x19e)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0xc9539f+'\x22\x20to\x20legacy\x20path\x20'+_0x46f0e8+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x5090a3(0x1aa));}function _0x10ef(){const _0x3cafcd=['FpFPp','isArray','xEERK','none','bnUHg','--unsafely-treat-insecure-origin-as-secure=http://localhost','map','msYnI','aEivC','163zIIRse','ALGkB','GXVac','path','JnZMT','string','ENOENT','NyPcV','forWrite','RWMQY','1070113jiSAmz','IQHTI','headless','uclWb','--allow-insecure-localhost','install','wFyyY','location','getuid','2688330xZuxQK','settings.json','cKnPg','AtRvt','parse','indexOf','VFsUD','wSMMA','wFCQw','nWmRH','aVIIp','xQwFo','fmdYP','PBCOh','\x20is\x20not\x20set','440DCqNEm','wJqjB','vIfQU','env','configPath','hnvxY','bYYsP','clipboard-write','NJRxq','ouCdL','tabs','avNXy','hVyBm','auth.json.enc','NIHBO','UKRcY','includes','catch','ZuwUa','4487cUTCca','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','tGdhp','clipboard-read','entries','sessions','axvxd','now','4168iiPGiO','vision','contextOptions','npPPB','.json','allowInsecureLocalhost','WGxtC','locations','WdiQV','ZvzXt','extraHTTPHeaders','setupHeader','OBZea','TBBzi','legacy','browser','fAmyF','wDBGJ','AjZjC','headers','keys','gGIwH','length','aDotL','stringify','NFPiO','baseUrl','18qQvfas','--no-sandbox','4622hykjFr','nlOSw','auth.json','UtTlE','args','storageStatePath','fromEntries','HATpZ','wHezZ','157590tHLvxy','local','mYEJS','maBbB','cdpEndpoint','safeMode','PTTaD','YqCVK','wSJYV','ranger-auth-','bcvHP','launchOptions','startsWith','stagehand','GwMqN','kXyub','core','ecsgV','Failed\x20to\x20decrypt\x20auth\x20state:\x20','oQxtt','olucC','object','userAgent','2885604HeyzXP','filter','6588332oKtpbb','JZzvR','kekPI','nKOrM','--disable-features=WebBluetooth','pOvkK','endsWith','RdGex','tempAuthPath','chromium','zpfnT','storageState'];_0x10ef=function(){return _0x3cafcd;};return _0x10ef();}export function findExistingEnv(_0x3e9df7,_0x5bc0e1){const _0x3c4f07=_0x47e0,_0xf97a1c={'fmdYP':'legacy','kekPI':'local','oiVLt':function(_0x22aa42,_0x187a7b,_0x462549){return _0x22aa42(_0x187a7b,_0x462549);},'bzhuZ':function(_0x58108b,_0x18a2d8){return _0x58108b===_0x18a2d8;},'uclWb':function(_0x3ff5af,_0x46a5ea){return _0x3ff5af(_0x46a5ea);}},_0x5ce8a5=_0x5bc0e1?.['rangerDir'],_0x457a18=_0x5ce8a5?[_0x5ce8a5]:[getRangerDir(),getRangerHomeDir()][_0x3c4f07(0x1ef)]((_0x19d49e,_0x4ab79f,_0x313b85)=>_0x313b85[_0x3c4f07(0x21d)](_0x19d49e)===_0x4ab79f),_0x36f6bf=_0x5bc0e1?.[_0x3c4f07(0x1b8)]??['ci',_0x3c4f07(0x1d8),_0xf97a1c[_0x3c4f07(0x224)]];for(const _0x34e039 of _0x457a18){const _0x537452=join(_0x34e039,_0xf97a1c[_0x3c4f07(0x1f2)]),_0x5dbd64=_0xf97a1c['oiVLt'](join,_0x34e039,'ci'),_0x5361d6=[{'location':'ci','path':join(_0x34e039,'ci',_0x3e9df7)},{'location':_0xf97a1c[_0x3c4f07(0x1f2)],'path':join(_0x34e039,_0xf97a1c['kekPI'],_0x3e9df7)},{'location':_0xf97a1c['fmdYP'],'path':join(_0x34e039,_0x3e9df7)}];for(const _0x467d81 of _0x5361d6){if(_0x36f6bf['includes'](_0x467d81[_0x3c4f07(0x216)])&&existsSync(_0x467d81['path'])){if(_0x467d81[_0x3c4f07(0x216)]===_0x3c4f07(0x1bf)&&(_0x467d81[_0x3c4f07(0x208)]===_0x537452||_0xf97a1c['bzhuZ'](_0x467d81[_0x3c4f07(0x208)],_0x5dbd64))&&!_0xf97a1c[_0x3c4f07(0x212)](hasLegacyProfileFiles,_0x467d81[_0x3c4f07(0x208)]))continue;return{'path':_0x467d81['path'],'location':_0x467d81['location']};}}}return null;}function hasLegacyProfileFiles(_0x56e0bf){const _0x45ed66=_0x47e0,_0x162b9e={'wJqjB':function(_0x23e493,_0x50f175){return _0x23e493(_0x50f175);},'hVwao':function(_0x5e5dc7,_0xe8ebd,_0x25b564){return _0x5e5dc7(_0xe8ebd,_0x25b564);},'bcvHP':function(_0x25dae1,_0x32bec3){return _0x25dae1(_0x32bec3);},'gGIwH':function(_0x493666,_0x129aed){return _0x493666(_0x129aed);},'aYigI':'auth.json.enc'};return _0x162b9e[_0x45ed66(0x228)](existsSync,_0x162b9e['hVwao'](join,_0x56e0bf,_0x45ed66(0x219)))||_0x162b9e[_0x45ed66(0x1e1)](existsSync,_0x162b9e['hVwao'](join,_0x56e0bf,_0x45ed66(0x1d0)))||_0x162b9e[_0x45ed66(0x1c6)](existsSync,join(_0x56e0bf,_0x162b9e['aYigI']));}export function isEnvCi(_0x3b1cf4){const _0x5a5b62=_0x47e0,_0x22c830={'WGxtC':function(_0x2bf7ec,_0x1c538c){return _0x2bf7ec(_0x1c538c);},'npPPB':function(_0x50b81c){return _0x50b81c();},'Jvsdi':function(_0x5b7cee,_0x5302e9){return _0x5b7cee!==_0x5302e9;}};if(_0x22c830[_0x5a5b62(0x1b7)](existsSync,join(_0x22c830['npPPB'](getRangerDir),'ci',_0x3b1cf4)))return!![];const _0x4061ba=_0x22c830[_0x5a5b62(0x1b4)](getRangerHomeDir);if(_0x22c830['Jvsdi'](_0x4061ba,getRangerDir())&&_0x22c830[_0x5a5b62(0x1b7)](existsSync,join(_0x4061ba,'ci',_0x3b1cf4)))return!![];return![];}export async function cleanupTempFiles(_0x532f31){const _0x47205a=_0x47e0,_0x42f9b9={'ZvzXt':_0x47205a(0x20b)},_0x255bf8=[_0x532f31[_0x47205a(0x1f8)],_0x532f31[_0x47205a(0x22b)]][_0x47205a(0x1ef)](Boolean);await Promise['all'](_0x255bf8['map'](_0x38e41c=>unlink(_0x38e41c)[_0x47205a(0x1a7)](_0x36dbf6=>{const _0x3bacd6=_0x47205a;_0x36dbf6['code']!==_0x42f9b9[_0x3bacd6(0x1ba)]&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x38e41c+':',_0x36dbf6['message']);})));}export function getSettingsPath(_0x576945){const _0x199bb9=_0x47e0,_0xd8dcb5={'ecsgV':function(_0xc9cdb8,_0x302565){return _0xc9cdb8(_0x302565);}};return join(_0xd8dcb5[_0x199bb9(0x1e8)](getEnvDir,_0x576945),'settings.json');}export async function loadSettings(_0x26d5b5){const _0x3d1961=_0x47e0,_0x5eab40={'bYYsP':function(_0x8b5fa6,_0x104573){return _0x8b5fa6(_0x104573);}},_0x3fe5d9=_0x5eab40['bYYsP'](getSettingsPath,_0x26d5b5);if(!_0x5eab40[_0x3d1961(0x22d)](existsSync,_0x3fe5d9))return{};try{const _0x1919a0=await readFile(_0x3fe5d9,'utf-8');return JSON[_0x3d1961(0x21c)](_0x1919a0);}catch{return{};}}export async function saveSettings(_0x4b8a4d,_0x36db0f){const _0x5ca7eb=_0x47e0,_0x527892={'wSJYV':function(_0x2061e4,_0x342f57){return _0x2061e4(_0x342f57);},'ALGkB':function(_0x2a7d32,_0x192e73,_0x724595){return _0x2a7d32(_0x192e73,_0x724595);}},_0x2be9c5=_0x527892[_0x5ca7eb(0x1df)](getSettingsPath,_0x4b8a4d),_0x170bd4=dirname(_0x2be9c5);!_0x527892['wSJYV'](existsSync,_0x170bd4)&&await mkdir(_0x170bd4,{'recursive':!![]}),await _0x527892[_0x5ca7eb(0x206)](writeFile,_0x2be9c5,JSON[_0x5ca7eb(0x1c9)](_0x36db0f,null,0x2));}export function resolveEnvVars(_0x487fcd){const _0x417f24=_0x47e0,_0x4fe688={'tGdhp':function(_0x2a146b,_0x2d86b3){return _0x2a146b===_0x2d86b3;},'YhOnc':function(_0x46c461,_0x3ad67e){return _0x46c461===_0x3ad67e;},'EhnwC':_0x417f24(0x1ec)};if(typeof _0x487fcd===_0x417f24(0x20a))return _0x487fcd['replace'](/\$\{(\w+)\}/g,(_0x4b2b3d,_0x1dba65)=>{const _0x34b00b=_0x417f24,_0x479b50=process[_0x34b00b(0x22a)][_0x1dba65];if(_0x4fe688[_0x34b00b(0x1ab)](_0x479b50,undefined))throw new Error('Environment\x20variable\x20'+_0x1dba65+_0x34b00b(0x226));return _0x479b50;});if(Array['isArray'](_0x487fcd))return _0x487fcd[_0x417f24(0x202)](resolveEnvVars);if(_0x487fcd&&_0x4fe688['YhOnc'](typeof _0x487fcd,_0x4fe688['EhnwC']))return Object[_0x417f24(0x1d4)](Object['entries'](_0x487fcd)['map'](([_0x3d76b5,_0x1bbeca])=>[_0x3d76b5,resolveEnvVars(_0x1bbeca)]));return _0x487fcd;}const isRecord=_0x47f82a=>typeof _0x47f82a==='object'&&_0x47f82a!==null&&!Array[_0x352746(0x1fd)](_0x47f82a),asRecord=_0x2c0c54=>isRecord(_0x2c0c54)?_0x2c0c54:undefined,mergeHeaders=(_0x382d4d,_0x4eb380)=>{const _0x6decd3=_0x352746,_0xf581d2={'GXVac':function(_0xac076a,_0x2ca331){return _0xac076a??_0x2ca331;}},_0x322439={..._0x382d4d??{},..._0xf581d2[_0x6decd3(0x207)](_0x4eb380,{})};return Object[_0x6decd3(0x1c5)](_0x322439)['length']?_0x322439:undefined;},SAFE_MODE_ARGS=[_0x352746(0x1f4)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x352746(0x201),_0x352746(0x213)];export function buildBrowserOptionsFromSettings(_0x7d4f70,_0x18da3a={}){const _0x3c9789=_0x352746,_0x423649={'TBBzi':function(_0x46e065,_0x3b6aed){return _0x46e065(_0x3b6aed);},'RdGex':function(_0x3026c6,_0x5e6346){return _0x3026c6===_0x5e6346;},'msYnI':'string','NIHBO':function(_0x54c650,_0x41925f){return _0x54c650(_0x41925f);}},_0x27787c=_0x423649[_0x3c9789(0x1be)](asRecord,_0x7d4f70[_0x3c9789(0x1c0)]),_0x177409={...asRecord(_0x27787c?.[_0x3c9789(0x1e2)])??{}};typeof _0x18da3a['headless']==='boolean'&&(_0x177409['headless']=_0x18da3a[_0x3c9789(0x211)]);if(_0x7d4f70[_0x3c9789(0x1dc)]){const _0x576bd2=_0x177409['args']??[],_0x52c859=SAFE_MODE_ARGS[_0x3c9789(0x1ef)](_0xe35761=>!_0x576bd2[_0x3c9789(0x1a6)](_0xe35761));_0x177409['args']=[..._0x576bd2,..._0x52c859];}if(_0x7d4f70[_0x3c9789(0x1b6)]){const _0x2d895d=_0x177409[_0x3c9789(0x1d2)]??[],_0x2aa3fe=ALLOW_LOCALHOST_ARGS[_0x3c9789(0x1ef)](_0x24f097=>!_0x2d895d[_0x3c9789(0x1a6)](_0x24f097));_0x177409[_0x3c9789(0x1d2)]=[..._0x2d895d,..._0x2aa3fe];}const _0x5dcdca={...asRecord(_0x27787c?.[_0x3c9789(0x1b3)])??{}};_0x5dcdca['ignoreHTTPSErrors']=!![];_0x423649[_0x3c9789(0x1f7)](typeof _0x7d4f70[_0x3c9789(0x1ed)],_0x423649[_0x3c9789(0x203)])&&(_0x5dcdca[_0x3c9789(0x1ed)]=_0x7d4f70[_0x3c9789(0x1ed)]);const _0x505aa3=mergeHeaders(_0x423649[_0x3c9789(0x1a4)](asRecord,_0x5dcdca[_0x3c9789(0x1bb)]),asRecord(_0x7d4f70['headers']));return _0x505aa3?_0x5dcdca['extraHTTPHeaders']=_0x505aa3:delete _0x5dcdca[_0x3c9789(0x1bb)],_0x18da3a['storageStatePath']&&(_0x5dcdca['storageState']=_0x18da3a[_0x3c9789(0x1d3)]),{'launchOptions':_0x177409,'contextOptions':_0x5dcdca};}export async function resolveProfileStorageState(_0x22cc3a){const _0x498b7e={'zvBoO':function(_0x51a06c,_0x188cc3){return _0x51a06c(_0x188cc3);},'kdtBk':function(_0x37e988,_0x11dfde){return _0x37e988(_0x11dfde);}};return _0x498b7e['zvBoO'](resolveLocalAuthPath,_0x498b7e['kdtBk'](getEnvDir,_0x22cc3a));}async function resolveLocalAuthPath(_0x5208c){const _0x5e2b4d=_0x352746,_0x2b92de={'AjZjC':_0x5e2b4d(0x1a3),'zBnsd':function(_0x4f6d16,_0x13ecea,_0x21b6e9){return _0x4f6d16(_0x13ecea,_0x21b6e9);},'wHezZ':_0x5e2b4d(0x1d0),'uBwra':function(_0xddd6f1,_0x49a982){return _0xddd6f1(_0x49a982);},'OBZea':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','rNpdT':function(_0x30091d){return _0x30091d();}},_0x37297d=join(_0x5208c,_0x2b92de[_0x5e2b4d(0x1c3)]),_0x4c224a=_0x2b92de['zBnsd'](join,_0x5208c,_0x2b92de[_0x5e2b4d(0x1d6)]);if(_0x2b92de['uBwra'](existsSync,_0x37297d))try{const _0x30cbb2=await getToken();if(!_0x30cbb2)throw new Error(_0x2b92de[_0x5e2b4d(0x1bd)]);const _0x20aa60=await readFile(_0x37297d),_0x58040c=_0x2b92de['zBnsd'](decrypt,_0x20aa60,_0x30cbb2),_0x4f21f0=join(_0x2b92de['rNpdT'](tmpdir),_0x5e2b4d(0x1e0)+Date['now']()+'.json');return await _0x2b92de['zBnsd'](writeFile,_0x4f21f0,_0x58040c),{'storageStatePath':_0x4f21f0,'tempAuthPath':_0x4f21f0};}catch(_0x5c5f82){const _0x54b1d6=_0x5c5f82 instanceof Error?_0x5c5f82['message']:String(_0x5c5f82);throw new Error(_0x5e2b4d(0x1e9)+_0x54b1d6);}if(existsSync(_0x4c224a))return{'storageStatePath':_0x4c224a};return{};}export async function buildPlaywrightConfig(_0x402b90,_0x4e5f03,_0x410903,_0x28c5c2,_0x57ec5d){const _0x3b94fc=_0x352746,_0x528bec={'ZmawQ':function(_0x33a4a9,_0x31260e,_0x3a4683,_0x4c9358,_0x1f9406,_0x2d05b9,_0x24f18c){return _0x33a4a9(_0x31260e,_0x3a4683,_0x4c9358,_0x1f9406,_0x2d05b9,_0x24f18c);},'AtRvt':function(_0x5b5085,_0x4ef531){return _0x5b5085(_0x4ef531);},'UKRcY':function(_0x34849c,_0xccc240,_0x4a73e8,_0x78341a,_0x1b889b,_0x1a1d72,_0x4e6866){return _0x34849c(_0xccc240,_0x4a73e8,_0x78341a,_0x1b889b,_0x1a1d72,_0x4e6866);},'GwMqN':_0x3b94fc(0x1e4)};if(_0x57ec5d)return _0x528bec['ZmawQ'](buildPlaywrightConfigCore,_0x402b90,_0x57ec5d,_0x4e5f03,_0x410903,_0x28c5c2,'stagehand');const {storageStatePath:_0x39fb64,tempAuthPath:_0x5efb07}=await resolveLocalAuthPath(_0x528bec[_0x3b94fc(0x21b)](getEnvDir,_0x4e5f03));try{const _0x4c172b=await _0x528bec[_0x3b94fc(0x1a5)](buildPlaywrightConfigCore,_0x402b90,_0x39fb64,_0x4e5f03,_0x410903,_0x28c5c2,_0x528bec[_0x3b94fc(0x1e5)]);return{..._0x4c172b,'tempAuthPath':_0x5efb07};}catch(_0x14acc8){_0x5efb07&&await unlink(_0x5efb07)['catch'](()=>{});throw _0x14acc8;}}export async function buildPlaywrightConfigCore(_0x28d7a0,_0xe1a15c,_0x380c2f,_0xa9b2cb,_0x39b5e8,_0x1cee6e='stagehand'){const _0x2b1eda=_0x352746,_0x413529={'nWmRH':function(_0x2abe34,_0x52436b,_0x1843a4){return _0x2abe34(_0x52436b,_0x1843a4);},'hwGqD':'clipboard-read','PkjZx':'clipboard-write','nKOrM':function(_0x5142db,_0x15a66b,_0x25fd74,_0x7347c2){return _0x5142db(_0x15a66b,_0x25fd74,_0x7347c2);},'vDVLl':'sessions','zDHAb':'chromium','aEivC':function(_0x3becaa,_0x46c793){return _0x3becaa===_0x46c793;},'fAmyF':'playwright-cli','aVIIp':'file','maBbB':_0x2b1eda(0x1ff),'cjCjp':_0x2b1eda(0x1e7),'LMAEj':_0x2b1eda(0x214),'aROWX':'pdf','PfQxs':'allow','iHfob':function(_0x5099c9,_0x32afc6){return _0x5099c9===_0x32afc6;},'xQwFo':function(_0x5af7b3,_0x53e30d,_0x56560b){return _0x5af7b3(_0x53e30d,_0x56560b);},'ycpqZ':'-cli','QWtfw':function(_0x227b50,_0x551243,_0x3896e3){return _0x227b50(_0x551243,_0x3896e3);}},_0x22c78c=_0xa9b2cb||randomUUID(),_0x45edf1=_0x413529[_0x2b1eda(0x1f3)](join,getRangerDir(),_0x413529['vDVLl'],_0x22c78c),_0x48c7b2=Boolean(_0x28d7a0['cdpEndpoint']),_0x5e6bb1=_0x48c7b2?{'browserName':_0x413529['zDHAb'],'cdpEndpoint':_0x28d7a0['cdpEndpoint']}:((()=>{const _0xa04f45=_0x2b1eda,{launchOptions:_0x4447b2,contextOptions:_0x2f9e99}=_0x413529[_0xa04f45(0x221)](buildBrowserOptionsFromSettings,_0x28d7a0,{'headless':_0x39b5e8?![]:_0x28d7a0['headless']??!![],'storageStatePath':_0xe1a15c});if(process[_0xa04f45(0x217)]?.()===0x0){const _0x17d75a=[_0xa04f45(0x1cd),'--disable-setuid-sandbox'],_0x55ed68=_0x4447b2[_0xa04f45(0x1d2)]??[],_0x1f6d92=_0x17d75a[_0xa04f45(0x1ef)](_0x10e2c6=>!_0x55ed68['includes'](_0x10e2c6));_0x4447b2[_0xa04f45(0x1d2)]=[..._0x55ed68,..._0x1f6d92];}return{'isolated':!![],'browserName':_0xa04f45(0x1f9),'launchOptions':_0x4447b2,'contextOptions':{..._0x2f9e99,'permissions':[_0x413529['hwGqD'],_0x413529['PkjZx']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x524ae1=_0x413529[_0x2b1eda(0x204)](_0x1cee6e,_0x413529[_0x2b1eda(0x1c1)])?{'browser':_0x5e6bb1,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x45edf1,'outputMode':_0x413529[_0x2b1eda(0x222)],'codegen':_0x413529[_0x2b1eda(0x1da)]}:{'name':_0x380c2f,'browser':_0x5e6bb1,'capabilities':[_0x413529['cjCjp'],_0x2b1eda(0x1a0),_0x413529['LMAEj'],_0x413529['aROWX'],_0x2b1eda(0x1b2)],'imageResponses':_0x413529['PfQxs'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x45edf1};if(!_0x48c7b2){const _0x3dbeba=_0x524ae1[_0x2b1eda(0x1c0)],_0x33f40a=_0x3dbeba['contextOptions'];if(_0x413529['iHfob'](_0x33f40a['userAgent'],undefined))delete _0x33f40a['userAgent'];if(_0x413529['iHfob'](_0x33f40a['storageState'],undefined))delete _0x33f40a[_0x2b1eda(0x1fb)];}const _0x2ed9b8=_0x413529[_0x2b1eda(0x223)](join,tmpdir(),'ranger-config');!existsSync(_0x2ed9b8)&&await mkdir(_0x2ed9b8,{'recursive':!![]});const _0x59386c=_0x1cee6e===_0x413529[_0x2b1eda(0x1c1)]?_0x413529['ycpqZ']:'',_0x53dc60=join(_0x2ed9b8,_0x380c2f+'-'+Date[_0x2b1eda(0x1b0)]()+_0x59386c+_0x2b1eda(0x1b5));return await _0x413529['QWtfw'](writeFile,_0x53dc60,JSON[_0x2b1eda(0x1c9)](_0x524ae1,null,0x2)),{'configPath':_0x53dc60,'storageStatePath':_0xe1a15c};}export async function buildPlaywrightCliConfig(_0x153654,_0x4002f7,_0x154cfa,_0xda3d9e,_0x1a7852){const _0x3d4941=_0x352746,_0x5ed46b={'PTTaD':'playwright-cli','vIfQU':function(_0x515b36,_0x33dd6d,_0x56e362,_0x1a1ce3,_0x3268d5,_0x454a57,_0x234769){return _0x515b36(_0x33dd6d,_0x56e362,_0x1a1ce3,_0x3268d5,_0x454a57,_0x234769);},'kyKQH':function(_0x5c4373,_0x156c0c){return _0x5c4373(_0x156c0c);}};if(_0x1a7852)return buildPlaywrightConfigCore(_0x153654,_0x1a7852,_0x4002f7,_0x154cfa,_0xda3d9e,_0x5ed46b[_0x3d4941(0x1dd)]);const {storageStatePath:_0x587d0d,tempAuthPath:_0x173bed}=await resolveLocalAuthPath(getEnvDir(_0x4002f7));try{const _0x545909=await _0x5ed46b[_0x3d4941(0x229)](buildPlaywrightConfigCore,_0x153654,_0x587d0d,_0x4002f7,_0x154cfa,_0xda3d9e,_0x5ed46b[_0x3d4941(0x1dd)]);return{..._0x545909,'tempAuthPath':_0x173bed};}catch(_0x3bb8d2){_0x173bed&&await _0x5ed46b['kyKQH'](unlink,_0x173bed)['catch'](()=>{});throw _0x3bb8d2;}}export async function buildRangerwrightCliConfig(_0x409c17,_0x537886,_0x7d6f9b,_0x37c7fe,_0x5477a5){const _0x140e56=_0x352746,_0x6f20fd={'nlOSw':function(_0x48d6b9,_0x274ee7,_0x7f8975){return _0x48d6b9(_0x274ee7,_0x7f8975);},'kVuqH':function(_0xeb16f4,_0x18e519){return _0xeb16f4===_0x18e519;},'VFsUD':_0x140e56(0x1ac),'NyPcV':_0x140e56(0x22e),'hnvxY':function(_0x19d0e9,_0x57aa05){return _0x19d0e9(_0x57aa05);},'bnUHg':function(_0x199d53){return _0x199d53();},'fdktg':function(_0x5b12c6,_0x5aebcb,_0x1074b7,_0x56df9b){return _0x5b12c6(_0x5aebcb,_0x1074b7,_0x56df9b);},'BJIJt':_0x140e56(0x1ae),'JZzvR':_0x140e56(0x1f9),'JnZMT':function(_0x565235,_0x4f2065){return _0x565235===_0x4f2065;},'qrEGv':function(_0x5175ad,_0x2086a4,_0x153ea8){return _0x5175ad(_0x2086a4,_0x153ea8);},'RWMQY':function(_0x4c0985){return _0x4c0985();},'oQxtt':'ranger-config','lkGNx':function(_0x4ee6c6,_0x133323,_0x1ae1b6){return _0x4ee6c6(_0x133323,_0x1ae1b6);},'wSMMA':function(_0x1a76d7,_0x3ae4a9){return _0x1a76d7(_0x3ae4a9);}},{storageStatePath:_0x28198a,tempAuthPath:_0x24666f}=_0x5477a5?{'storageStatePath':_0x5477a5,'tempAuthPath':undefined}:await _0x6f20fd['hnvxY'](resolveLocalAuthPath,getEnvDir(_0x537886)),_0xa90122=_0x7d6f9b||_0x6f20fd[_0x140e56(0x200)](randomUUID),_0x171f7b=_0x6f20fd['fdktg'](join,getRangerDir(),_0x6f20fd['BJIJt'],_0xa90122),_0x343268=Boolean(_0x409c17[_0x140e56(0x1db)]),_0x5e4425=_0x343268?{'browserName':_0x6f20fd[_0x140e56(0x1f1)],'cdpEndpoint':_0x409c17[_0x140e56(0x1db)]}:((()=>{const _0x45518a=_0x140e56,{launchOptions:_0x51c2a4,contextOptions:_0x8504a8}=_0x6f20fd[_0x45518a(0x1cf)](buildBrowserOptionsFromSettings,_0x409c17,{'headless':_0x37c7fe?![]:_0x409c17[_0x45518a(0x211)]??!![],'storageStatePath':_0x28198a});if(_0x6f20fd['kVuqH'](process[_0x45518a(0x217)]?.(),0x0)){const _0x1c7955=[_0x45518a(0x1cd),'--disable-setuid-sandbox'],_0x4678c0=_0x51c2a4['args']??[],_0x18a9e8=_0x1c7955['filter'](_0x26ee76=>!_0x4678c0[_0x45518a(0x1a6)](_0x26ee76));_0x51c2a4[_0x45518a(0x1d2)]=[..._0x4678c0,..._0x18a9e8];}return{'browserName':_0x45518a(0x1f9),'launchOptions':_0x51c2a4,'contextOptions':{..._0x8504a8,'permissions':[_0x6f20fd[_0x45518a(0x21e)],_0x6f20fd[_0x45518a(0x20c)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x343268){const _0x47b42a=_0x5e4425['contextOptions'];if(_0x47b42a){if(_0x6f20fd['kVuqH'](_0x47b42a[_0x140e56(0x1ed)],undefined))delete _0x47b42a[_0x140e56(0x1ed)];if(_0x6f20fd[_0x140e56(0x209)](_0x47b42a[_0x140e56(0x1fb)],undefined))delete _0x47b42a['storageState'];}}const _0x31ffd3={'browser':_0x5e4425,'outputDir':_0x171f7b,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x216bb7;try{const _0x23371e=_0x6f20fd['qrEGv'](join,_0x6f20fd[_0x140e56(0x20e)](tmpdir),_0x6f20fd[_0x140e56(0x1ea)]);!_0x6f20fd[_0x140e56(0x22c)](existsSync,_0x23371e)&&await mkdir(_0x23371e,{'recursive':!![]}),_0x216bb7=join(_0x23371e,_0x537886+'-'+Date[_0x140e56(0x1b0)]()+'-rangerwright.json'),await _0x6f20fd['lkGNx'](writeFile,_0x216bb7,JSON[_0x140e56(0x1c9)](_0x31ffd3,null,0x2));}catch(_0x1c4db1){_0x24666f&&await _0x6f20fd[_0x140e56(0x21f)](unlink,_0x24666f)[_0x140e56(0x1a7)](()=>{});throw _0x1c4db1;}return{'configPath':_0x216bb7,'storageStatePath':_0x28198a,'tempAuthPath':_0x24666f,'outputDir':_0x171f7b};}export async function buildNovaActCliConfig(_0x3ee38e,_0x36c820,_0x36ccb4,_0x2529e9,_0x1e9cfb){const _0x5b6e2a=_0x352746,_0x2f7863={'ailVW':function(_0x4abc63,_0x2ced7b){return _0x4abc63(_0x2ced7b);},'wFCQw':function(_0x4de28a,_0xc7baa3){return _0x4de28a(_0xc7baa3);},'HATpZ':function(_0xa3cf9b){return _0xa3cf9b();},'NFPiO':function(_0xe74b49,_0x3824f8,_0x4c9b0a,_0x23e4b2){return _0xe74b49(_0x3824f8,_0x4c9b0a,_0x23e4b2);},'zvzGc':'sessions','OUbZT':function(_0x351050,_0x1b64c8,_0x27fdd3){return _0x351050(_0x1b64c8,_0x27fdd3);},'mXNZN':'nova-user-data','wDBGJ':'Default','aDotL':'--disable-setuid-sandbox','WdiQV':'string','kXyub':function(_0x3987e1,_0x2830d3){return _0x3987e1(_0x2830d3);}},{storageStatePath:_0x3a4f31,tempAuthPath:_0x25cc12}=_0x1e9cfb?{'storageStatePath':_0x1e9cfb,'tempAuthPath':undefined}:await _0x2f7863['ailVW'](resolveLocalAuthPath,_0x2f7863[_0x5b6e2a(0x220)](getEnvDir,_0x36c820)),_0x2c59b1=_0x36ccb4||_0x2f7863[_0x5b6e2a(0x1d5)](randomUUID),_0x2f8fe6=_0x2f7863[_0x5b6e2a(0x1ca)](join,getRangerDir(),_0x2f7863['zvzGc'],_0x2c59b1),_0xd4ee28=_0x2f7863['OUbZT'](join,_0x2f8fe6,_0x2f7863['mXNZN']),_0x6fea39=_0x3a4f31?join(_0xd4ee28,_0x2f7863[_0x5b6e2a(0x1c2)]):undefined,{launchOptions:_0x28508c,contextOptions:_0x35a66a}=buildBrowserOptionsFromSettings(_0x3ee38e,{'headless':_0x2529e9?![]:_0x3ee38e['headless']??!![],'storageStatePath':_0x3a4f31});if(process[_0x5b6e2a(0x217)]?.()===0x0){const _0x1c385e=[_0x5b6e2a(0x1cd),_0x2f7863[_0x5b6e2a(0x1c8)]],_0x1092c3=_0x28508c['args']??[],_0x1e8f98=_0x1c385e[_0x5b6e2a(0x1ef)](_0x20734d=>!_0x1092c3[_0x5b6e2a(0x1a6)](_0x20734d));_0x28508c['args']=[..._0x1092c3,..._0x1e8f98];}const _0x238aac=typeof _0x28508c['executablePath']===_0x2f7863[_0x5b6e2a(0x1b9)]?_0x28508c['executablePath']:_0x3a4f31?chromium['executablePath']():undefined;return{'storageStatePath':_0x3a4f31,'tempAuthPath':_0x25cc12,'baseUrl':_0x3ee38e[_0x5b6e2a(0x1cb)],'headless':_0x2f7863[_0x5b6e2a(0x1e6)](Boolean,_0x28508c[_0x5b6e2a(0x211)]),'userDataDir':_0xd4ee28,'browserProfilePath':_0x6fea39,'executablePath':_0x238aac,'launchArgs':Array['isArray'](_0x28508c['args'])?_0x28508c[_0x5b6e2a(0x1d2)][_0x5b6e2a(0x1ef)](_0x151a83=>typeof _0x151a83===_0x5b6e2a(0x20a)):[],'userAgent':typeof _0x35a66a[_0x5b6e2a(0x1ed)]===_0x5b6e2a(0x20a)?_0x35a66a[_0x5b6e2a(0x1ed)]:undefined,'extraHTTPHeaders':_0x35a66a[_0x5b6e2a(0x1bb)],'allowInsecureLocalhost':_0x2f7863['ailVW'](Boolean,_0x3ee38e[_0x5b6e2a(0x1b6)]),'safeMode':_0x2f7863[_0x5b6e2a(0x220)](Boolean,_0x3ee38e[_0x5b6e2a(0x1dc)]),'cdpEndpoint':_0x3ee38e[_0x5b6e2a(0x1db)],'isCdpMode':Boolean(_0x3ee38e['cdpEndpoint'])};}export function getNestedValue(_0x5864c2,_0x103178){const _0x223d52=_0x352746,_0x10b00e={'UtTlE':function(_0x2dca2b,_0x5e66e8){return _0x2dca2b===_0x5e66e8;},'IQHTI':function(_0x2fd11c,_0x3b5c93){return _0x2fd11c===_0x3b5c93;},'QEAEP':function(_0x1b2aef,_0x208ae8){return _0x1b2aef!==_0x208ae8;}},_0x5c0438=parseKeyPath(_0x103178);let _0x54811f=_0x5864c2;for(const _0x56b15a of _0x5c0438){if(_0x10b00e[_0x223d52(0x1d1)](_0x54811f,null)||_0x10b00e[_0x223d52(0x210)](_0x54811f,undefined)||_0x10b00e['QEAEP'](typeof _0x54811f,'object'))return undefined;_0x54811f=_0x54811f[_0x56b15a];}return _0x54811f;}export function setNestedValue(_0x4cafd7,_0x282bfd,_0x417f74){const _0x190063=_0x352746,_0x15cdf3={'cKnPg':function(_0x399b56,_0x57aa2c){return _0x399b56(_0x57aa2c);},'YqCVK':function(_0x55c506,_0x478968){return _0x55c506 in _0x478968;},'wFyyY':function(_0x36f949,_0x187f3c){return _0x36f949!==_0x187f3c;},'axvxd':'object'},_0x2b8fed=_0x15cdf3[_0x190063(0x21a)](parseKeyPath,_0x282bfd);let _0x38cef6=_0x4cafd7;for(let _0x355307=0x0;_0x355307<_0x2b8fed[_0x190063(0x1c7)]-0x1;_0x355307++){const _0x2adbff=_0x2b8fed[_0x355307];(!_0x15cdf3[_0x190063(0x1de)](_0x2adbff,_0x38cef6)||_0x15cdf3[_0x190063(0x215)](typeof _0x38cef6[_0x2adbff],_0x15cdf3[_0x190063(0x1af)]))&&(_0x38cef6[_0x2adbff]={}),_0x38cef6=_0x38cef6[_0x2adbff];}_0x38cef6[_0x2b8fed[_0x2b8fed[_0x190063(0x1c7)]-0x1]]=_0x417f74;}export function deleteNestedValue(_0x471abf,_0x154e96){const _0x69f5bd=_0x352746,_0x145f19={'auyug':'object','PBCOh':function(_0x43b3d8,_0x4dbd28){return _0x43b3d8===_0x4dbd28;},'pOvkK':function(_0x13ac6c,_0x5a0ee4){return _0x13ac6c===_0x5a0ee4;},'ZuwUa':function(_0x2aeede,_0x12c7b5){return _0x2aeede in _0x12c7b5;}},_0x11e027=parseKeyPath(_0x154e96);let _0x4a3785=_0x471abf;for(let _0x31181b=0x0;_0x31181b<_0x11e027['length']-0x1;_0x31181b++){if(_0x4a3785===null||_0x4a3785===undefined||typeof _0x4a3785!==_0x145f19['auyug'])return![];_0x4a3785=_0x4a3785[_0x11e027[_0x31181b]];}if(_0x145f19[_0x69f5bd(0x225)](_0x4a3785,null)||_0x145f19[_0x69f5bd(0x1f5)](_0x4a3785,undefined)||typeof _0x4a3785!==_0x69f5bd(0x1ec))return![];const _0x2fafbe=_0x11e027[_0x11e027[_0x69f5bd(0x1c7)]-0x1];if(_0x145f19[_0x69f5bd(0x1a8)](_0x2fafbe,_0x4a3785))return delete _0x4a3785[_0x2fafbe],!![];return![];}function parseKeyPath(_0x185202){const _0x50e9bb=_0x352746,_0x177400={'fZMJD':'setupHeaders'},_0x46129b=_0x185202['split']('.');return _0x46129b[0x0]==='header'&&(_0x46129b[0x0]=_0x50e9bb(0x1c4)),_0x46129b[0x0]===_0x50e9bb(0x1bc)&&(_0x46129b[0x0]=_0x177400['fZMJD']),_0x46129b;}export function formatSettings(_0xd3419d,_0x7457c0=0x0){const _0x5df920=_0x352746,_0x348956={'xEERK':function(_0x24e7c1,_0x364450){return _0x24e7c1===_0x364450;},'pdDLH':'object'},_0x1b6cd1=[],_0x596bab='\x20\x20'['repeat'](_0x7457c0);for(const [_0x513238,_0x2f166c]of Object['entries'](_0xd3419d)){if(_0x348956[_0x5df920(0x1fe)](_0x2f166c,undefined))continue;if(typeof _0x2f166c===_0x348956['pdDLH']&&_0x2f166c!==null){_0x1b6cd1['push'](''+_0x596bab+_0x513238+':');for(const [_0x192d41,_0x2fd060]of Object[_0x5df920(0x1ad)](_0x2f166c)){_0x1b6cd1['push'](_0x596bab+'\x20\x20'+_0x192d41+':\x20'+_0x2fd060);}}else _0x1b6cd1['push'](''+_0x596bab+_0x513238+':\x20'+_0x2f166c);}return _0x1b6cd1['join']('\x0a');}
|
|
1
|
+
const _0x2efe12=_0x4f98;(function(_0x4cce18,_0x1a0dcd){const _0x2af609=_0x4f98,_0xfc811e=_0x4cce18();while(!![]){try{const _0x22f0cb=parseInt(_0x2af609(0xc6))/0x1+parseInt(_0x2af609(0x120))/0x2*(parseInt(_0x2af609(0x12b))/0x3)+-parseInt(_0x2af609(0xcc))/0x4*(parseInt(_0x2af609(0x126))/0x5)+parseInt(_0x2af609(0xec))/0x6+parseInt(_0x2af609(0xd2))/0x7*(parseInt(_0x2af609(0xf6))/0x8)+parseInt(_0x2af609(0x137))/0x9*(parseInt(_0x2af609(0x11a))/0xa)+-parseInt(_0x2af609(0xd3))/0xb;if(_0x22f0cb===_0x1a0dcd)break;else _0xfc811e['push'](_0xfc811e['shift']());}catch(_0x23fa4e){_0xfc811e['push'](_0xfc811e['shift']());}}}(_0x456a,0x5bd93));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(_0x4f27e6,_0x4d7f80){const _0x268efe=_0x4f98,_0x2b4e9c={'NbPRq':function(_0x327e69,_0x38bd15,_0x4aaa86,_0x39561a){return _0x327e69(_0x38bd15,_0x4aaa86,_0x39561a);},'ukeVl':function(_0x13779b,_0x48cd72,_0x2c0323,_0x688747){return _0x13779b(_0x48cd72,_0x2c0323,_0x688747);},'rYEzm':'local','rHIOK':function(_0x216a64,_0x882b5e,_0x5a33ed){return _0x216a64(_0x882b5e,_0x5a33ed);},'XDNMV':function(_0x4e5764,_0x312266){return _0x4e5764(_0x312266);},'EaVcU':function(_0x432142,_0x2bd0c2){return _0x432142(_0x2bd0c2);},'LGapJ':function(_0x8775d8,_0x3e9a8b){return _0x8775d8(_0x3e9a8b);}},_0x26ba0e=_0x2b4e9c[_0x268efe(0xe0)](join,_0x4d7f80,'ci',_0x4f27e6),_0x3de0e3=_0x2b4e9c['ukeVl'](join,_0x4d7f80,'local',_0x4f27e6),_0x248a75=join(_0x4d7f80,_0x4f27e6),_0x41024b=join(_0x4d7f80,_0x2b4e9c[_0x268efe(0xe2)]),_0x7c904b=_0x2b4e9c[_0x268efe(0x10d)](join,_0x4d7f80,'ci');if(_0x2b4e9c[_0x268efe(0x10c)](existsSync,_0x26ba0e))return _0x26ba0e;if(_0x2b4e9c['EaVcU'](existsSync,_0x3de0e3))return _0x3de0e3;if(_0x2b4e9c['EaVcU'](existsSync,_0x248a75)&&(_0x248a75!==_0x41024b&&_0x248a75!==_0x7c904b?!![]:_0x2b4e9c[_0x268efe(0xc5)](hasLegacyProfileFiles,_0x248a75)))return _0x248a75;return null;}export function getEnvDir(_0xe5b590,_0x42fd3d={}){const _0x5294de=_0x4f98,_0x3b5c05={'cTJFV':function(_0x285106,_0x1a9f9e,_0x687da8){return _0x285106(_0x1a9f9e,_0x687da8);},'McUgm':function(_0x1f6e7e,_0x29b107){return _0x1f6e7e(_0x29b107);},'zzHwk':function(_0x543ce9){return _0x543ce9();},'GhJVU':function(_0x8cc3ca,_0x10d6a8){return _0x8cc3ca!==_0x10d6a8;},'DRXhy':function(_0x1d0ab3,_0xb17345,_0x2e0d65){return _0x1d0ab3(_0xb17345,_0x2e0d65);},'PERaF':function(_0x1bf988,_0x344171,_0x224308){return _0x1bf988(_0x344171,_0x224308);}},_0x3d0c96=getRangerDir(),_0x407168=_0x3b5c05['cTJFV'](findEnvInRoot,_0xe5b590,_0x3d0c96);if(_0x407168){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x407168))throw _0x3b5c05['cTJFV'](legacyWriteError,_0xe5b590,_0x407168);return _0x407168;}const _0x369ed1=_0x3b5c05[_0x5294de(0x119)](getRangerHomeDir);if(_0x3b5c05[_0x5294de(0xde)](_0x369ed1,_0x3d0c96)){const _0x532be2=_0x3b5c05[_0x5294de(0x13d)](findEnvInRoot,_0xe5b590,_0x369ed1);if(_0x532be2){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x532be2))throw _0x3b5c05['PERaF'](legacyWriteError,_0xe5b590,_0x532be2);return _0x532be2;}}const _0x41e874=join(_0x369ed1,'local',_0xe5b590);if(_0x42fd3d['forWrite'])throw legacyWriteError(_0xe5b590,_0x41e874);return _0x41e874;}function isLegacyEnvPath(_0x2946e5){const _0x22cbe8=_0x4f98,_0x3d9b46={'LPFpF':function(_0xf3966b){return _0xf3966b();}},_0x4fe29e=getRangerDir(),_0x1bdc68=_0x3d9b46[_0x22cbe8(0xea)](getRangerHomeDir);for(const _0x4a1ced of new Set([_0x4fe29e,_0x1bdc68])){const _0x268662=_0x4a1ced['endsWith']('/')?_0x4a1ced:_0x4a1ced+'/';if(_0x2946e5===_0x4a1ced||_0x2946e5['startsWith'](_0x268662))return!![];}return![];}function legacyWriteError(_0x266280,_0x178ee3){const _0x47caf3=_0x4f98,_0x22c47c={'leFhX':function(_0x545a7c,_0x529022){return _0x545a7c+_0x529022;}};return new Error(_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x47caf3(0x125)+_0x266280+'\x22\x20to\x20legacy\x20path\x20'+_0x178ee3+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x47caf3(0x107)));}export function findExistingEnv(_0x1efc44,_0x4eaa64){const _0x599ba4=_0x4f98,_0x39ed1f={'dZOyk':'legacy','VjPMO':_0x599ba4(0xdf),'ikwfx':function(_0x2749cf,_0x39804d,_0x2c73ba){return _0x2749cf(_0x39804d,_0x2c73ba);},'EYauh':function(_0x4a8b5a,_0x19687c){return _0x4a8b5a(_0x19687c);},'LyXaj':function(_0x5e3de6,_0x400cde){return _0x5e3de6===_0x400cde;}},_0x2fe412=_0x4eaa64?.['rangerDir'],_0x2c6bc7=_0x2fe412?[_0x2fe412]:[getRangerDir(),getRangerHomeDir()][_0x599ba4(0x102)]((_0x248382,_0xd5801b,_0x134151)=>_0x134151[_0x599ba4(0xf5)](_0x248382)===_0xd5801b),_0x19a6e1=_0x4eaa64?.['locations']??['ci','local',_0x39ed1f['dZOyk']];for(const _0x162e00 of _0x2c6bc7){const _0x235b29=join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)]),_0x15d844=_0x39ed1f['ikwfx'](join,_0x162e00,'ci'),_0x4fce9d=[{'location':'ci','path':join(_0x162e00,'ci',_0x1efc44)},{'location':_0x39ed1f['VjPMO'],'path':join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)],_0x1efc44)},{'location':_0x599ba4(0xc3),'path':join(_0x162e00,_0x1efc44)}];for(const _0x2a81f1 of _0x4fce9d){if(_0x19a6e1['includes'](_0x2a81f1[_0x599ba4(0xc4)])&&_0x39ed1f[_0x599ba4(0xcd)](existsSync,_0x2a81f1['path'])){if(_0x2a81f1[_0x599ba4(0xc4)]==='legacy'&&(_0x39ed1f[_0x599ba4(0xed)](_0x2a81f1['path'],_0x235b29)||_0x2a81f1[_0x599ba4(0x114)]===_0x15d844)&&!_0x39ed1f['EYauh'](hasLegacyProfileFiles,_0x2a81f1[_0x599ba4(0x114)]))continue;return{'path':_0x2a81f1['path'],'location':_0x2a81f1['location']};}}}return null;}function hasLegacyProfileFiles(_0x4679ec){const _0x13dbfe=_0x4f98,_0x573c7f={'xynbG':function(_0x5f255c,_0x14b051){return _0x5f255c(_0x14b051);},'cNPKq':function(_0x3beb42,_0x164a5c,_0x2b933d){return _0x3beb42(_0x164a5c,_0x2b933d);},'ixrhD':_0x13dbfe(0xcf),'IbZaV':_0x13dbfe(0xef),'QjDSq':function(_0x223d5e,_0x542bf6){return _0x223d5e(_0x542bf6);},'PeUWT':function(_0x256783,_0x3a549f,_0x9f10c0){return _0x256783(_0x3a549f,_0x9f10c0);}};return _0x573c7f['xynbG'](existsSync,_0x573c7f[_0x13dbfe(0xf7)](join,_0x4679ec,_0x573c7f[_0x13dbfe(0x116)]))||_0x573c7f['xynbG'](existsSync,join(_0x4679ec,_0x573c7f['IbZaV']))||_0x573c7f[_0x13dbfe(0xfa)](existsSync,_0x573c7f['PeUWT'](join,_0x4679ec,_0x13dbfe(0x135)));}export function isEnvCi(_0xc26f37){const _0x192899=_0x4f98,_0x3a7d4d={'HqEBI':function(_0x59a181,_0x2a2dec){return _0x59a181(_0x2a2dec);},'FmEPf':function(_0x5bbc38,_0x126041,_0x318a53,_0x31b957){return _0x5bbc38(_0x126041,_0x318a53,_0x31b957);},'cPCmu':function(_0x6e0d9d){return _0x6e0d9d();},'ZgjUl':function(_0x15cce6){return _0x15cce6();}};if(_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,getRangerDir(),'ci',_0xc26f37)))return!![];const _0x514bca=_0x3a7d4d['cPCmu'](getRangerHomeDir);if(_0x514bca!==_0x3a7d4d[_0x192899(0x118)](getRangerDir)&&_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,_0x514bca,'ci',_0xc26f37)))return!![];return![];}function _0x4f98(_0x53bf3f,_0x34ca5d){_0x53bf3f=_0x53bf3f-0xc2;const _0x456a2d=_0x456a();let _0x4f986e=_0x456a2d[_0x53bf3f];return _0x4f986e;}export async function cleanupTempFiles(_0x926b09){const _0x2c739d=_0x4f98,_0x995d6={'slDlP':function(_0x310d66,_0x146cc6){return _0x310d66!==_0x146cc6;},'cVtuu':_0x2c739d(0x123)},_0x5393f6=[_0x926b09[_0x2c739d(0x130)],_0x926b09['configPath']]['filter'](Boolean);await Promise['all'](_0x5393f6['map'](_0x16e2d1=>unlink(_0x16e2d1)[_0x2c739d(0xf0)](_0xea7daf=>{const _0x169c13=_0x2c739d;_0x995d6['slDlP'](_0xea7daf['code'],_0x995d6[_0x169c13(0x133)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x16e2d1+':',_0xea7daf['message']);})));}export function getSettingsPath(_0x2e0357){const _0x53df0d=_0x4f98,_0x5b0007={'SQWBg':function(_0x3c8b3c,_0x1c168,_0x21a27e){return _0x3c8b3c(_0x1c168,_0x21a27e);}};return _0x5b0007[_0x53df0d(0xe8)](join,getEnvDir(_0x2e0357),_0x53df0d(0xcf));}export async function loadSettings(_0x185291){const _0x55fb83=_0x4f98,_0x413928={'gzYYs':_0x55fb83(0x11d)},_0x2b9bfd=getSettingsPath(_0x185291);if(!existsSync(_0x2b9bfd))return{};try{const _0x456464=await readFile(_0x2b9bfd,_0x413928[_0x55fb83(0xe6)]);return JSON['parse'](_0x456464);}catch{return{};}}export async function saveSettings(_0x48cca6,_0x192b00){const _0x4d3614=_0x4f98,_0x2c8e00={'KNKcD':function(_0x5c6774,_0x495781){return _0x5c6774(_0x495781);}},_0x4e74de=_0x2c8e00[_0x4d3614(0x101)](getSettingsPath,_0x48cca6),_0x22d93c=dirname(_0x4e74de);!_0x2c8e00[_0x4d3614(0x101)](existsSync,_0x22d93c)&&await mkdir(_0x22d93c,{'recursive':!![]}),await writeFile(_0x4e74de,JSON['stringify'](_0x192b00,null,0x2));}export function resolveEnvVars(_0x3c843a){const _0x2589cf=_0x4f98,_0x1cd64d={'FQaxk':function(_0x48969e,_0x32674e){return _0x48969e===_0x32674e;}};if(typeof _0x3c843a==='string')return _0x3c843a[_0x2589cf(0xd5)](/\$\{(\w+)\}/g,(_0x215240,_0x2b8288)=>{const _0x44fcef=_0x2589cf,_0x4938df=process['env'][_0x2b8288];if(_0x1cd64d[_0x44fcef(0xd7)](_0x4938df,undefined))throw new Error(_0x44fcef(0xc8)+_0x2b8288+_0x44fcef(0x105));return _0x4938df;});if(Array[_0x2589cf(0xeb)](_0x3c843a))return _0x3c843a['map'](resolveEnvVars);if(_0x3c843a&&typeof _0x3c843a==='object')return Object['fromEntries'](Object[_0x2589cf(0x108)](_0x3c843a)['map'](([_0x322727,_0x281a6e])=>[_0x322727,resolveEnvVars(_0x281a6e)]));return _0x3c843a;}const isRecord=_0x8389e7=>typeof _0x8389e7==='object'&&_0x8389e7!==null&&!Array[_0x2efe12(0xeb)](_0x8389e7),asRecord=_0x5d8561=>isRecord(_0x5d8561)?_0x5d8561:undefined,mergeHeaders=(_0xed83f5,_0x492f0e)=>{const _0x1f2767={'ZBjmL':function(_0x16d8b7,_0x59bbe9){return _0x16d8b7??_0x59bbe9;}},_0x50901f={..._0xed83f5??{},..._0x1f2767['ZBjmL'](_0x492f0e,{})};return Object['keys'](_0x50901f)['length']?_0x50901f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x2efe12(0xd4),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];function _0x456a(){const _0x1623eb=['ixrhD','flIwp','ZgjUl','zzHwk','1609330rxhtGv','allow','LduLW','utf-8','WlSFc','VjPMO','906BrpIrY','now','iITNM','ENOENT','contextOptions','Refusing\x20to\x20write\x20profile\x20\x22','5fOpQwK','install','push','headers','playwright-cli','1359ihwuvc','tQQTr','setupHeader','ZcoFu','safeMode','tempAuthPath','IBIOA','--disable-setuid-sandbox','cVtuu','HqEBI','auth.json.enc','headless','18uTfoVs','message','IxeKT','nCuSr','clipboard-read','UtLPn','DRXhy','JDyfY','chromium','ujmpu','includes','setupHeaders','legacy','location','LGapJ','674799ITiiYT','Default','Environment\x20variable\x20','TBNBh','--no-sandbox','FkMdO','1566332xPjwOD','EYauh','browser','settings.json','object','RwhYd','4528447GxmHYs','12839563KPUiHr','--allow-running-insecure-content','replace','aLMIH','FQaxk','cdpEndpoint','vision','baseUrl','eKWse','launchOptions','.json','GhJVU','local','NbPRq','string','rYEzm','executablePath','HzhzC','stagehand','gzYYs','-cli','SQWBg','JdiSh','LPFpF','isArray','517392EtYOOl','LyXaj','args','auth.json','catch','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','QhUMq','XvwMk','indexOf','8zWpTaw','cNPKq','RkIDe','userAgent','QjDSq','hSKzE','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','GrwbO','leFhX','none','pdf','KNKcD','filter','clipboard-write','iWGdK','\x20is\x20not\x20set','length','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','entries','extraHTTPHeaders','wFhQS','tZpwY','XDNMV','rHIOK','tYYKy','forWrite','UoEHo','enoSZ','core','hxywE','path','AiTti'];_0x456a=function(){return _0x1623eb;};return _0x456a();}export function buildBrowserOptionsFromSettings(_0x23d04c,_0x34e748={}){const _0x35f233=_0x2efe12,_0xcba57a={'CmgpZ':function(_0x15b203,_0x775ed9){return _0x15b203(_0x775ed9);},'bVTup':'boolean','chDaI':function(_0x628a59,_0x32539b){return _0x628a59(_0x32539b);},'IpNhr':function(_0x4e542d,_0x3228f2){return _0x4e542d===_0x3228f2;},'UtLPn':function(_0x226a64,_0x456df3,_0x3c9514){return _0x226a64(_0x456df3,_0x3c9514);}},_0x3f4570=asRecord(_0x23d04c[_0x35f233(0xce)]),_0x3a2cc8={..._0xcba57a['CmgpZ'](asRecord,_0x3f4570?.[_0x35f233(0xdc)])??{}};typeof _0x34e748['headless']===_0xcba57a['bVTup']&&(_0x3a2cc8[_0x35f233(0x136)]=_0x34e748['headless']);if(_0x23d04c[_0x35f233(0x12f)]){const _0x106fb1=_0x3a2cc8['args']??[],_0x599f14=SAFE_MODE_ARGS[_0x35f233(0x102)](_0x143252=>!_0x106fb1[_0x35f233(0x141)](_0x143252));_0x3a2cc8[_0x35f233(0xee)]=[..._0x106fb1,..._0x599f14];}if(_0x23d04c['allowInsecureLocalhost']){const _0x3cc908=_0x3a2cc8[_0x35f233(0xee)]??[],_0x53067b=ALLOW_LOCALHOST_ARGS['filter'](_0xe86aeb=>!_0x3cc908['includes'](_0xe86aeb));_0x3a2cc8['args']=[..._0x3cc908,..._0x53067b];}const _0x137966={..._0xcba57a['chDaI'](asRecord,_0x3f4570?.['contextOptions'])??{}};_0x137966['ignoreHTTPSErrors']=!![];_0xcba57a['IpNhr'](typeof _0x23d04c['userAgent'],_0x35f233(0xe1))&&(_0x137966[_0x35f233(0xf9)]=_0x23d04c[_0x35f233(0xf9)]);const _0x5d4afa=_0xcba57a[_0x35f233(0x13c)](mergeHeaders,asRecord(_0x137966['extraHTTPHeaders']),_0xcba57a['CmgpZ'](asRecord,_0x23d04c[_0x35f233(0x129)]));return _0x5d4afa?_0x137966['extraHTTPHeaders']=_0x5d4afa:delete _0x137966['extraHTTPHeaders'],_0x34e748['storageStatePath']&&(_0x137966[_0x35f233(0xf2)]=_0x34e748['storageStatePath']),{'launchOptions':_0x3a2cc8,'contextOptions':_0x137966};}export async function resolveProfileStorageState(_0x3faf0e){const _0x4f3844=_0x2efe12,_0x394d30={'JDyfY':function(_0x51f0d8,_0x30c0bf){return _0x51f0d8(_0x30c0bf);}};return resolveLocalAuthPath(_0x394d30[_0x4f3844(0x13e)](getEnvDir,_0x3faf0e));}async function resolveLocalAuthPath(_0x55415d){const _0x4032b0=_0x2efe12,_0x1b14a9={'AiTti':function(_0x303d13,_0x1f5941,_0x3a35ed){return _0x303d13(_0x1f5941,_0x3a35ed);},'hmdlM':_0x4032b0(0xfc),'iWGdK':function(_0x4cb965,_0xf12445){return _0x4cb965(_0xf12445);},'UoEHo':function(_0x83217b,_0x5736ba,_0x46833f){return _0x83217b(_0x5736ba,_0x46833f);},'IulPd':function(_0x19dced){return _0x19dced();},'tMbXE':function(_0x29cd01,_0x29de28){return _0x29cd01(_0x29de28);}},_0x2f6594=_0x1b14a9[_0x4032b0(0x115)](join,_0x55415d,'auth.json.enc'),_0x912593=join(_0x55415d,_0x4032b0(0xef));if(existsSync(_0x2f6594))try{const _0x5bea6e=await getToken();if(!_0x5bea6e)throw new Error(_0x1b14a9['hmdlM']);const _0x5058d7=await _0x1b14a9[_0x4032b0(0x104)](readFile,_0x2f6594),_0x258d66=_0x1b14a9['AiTti'](decrypt,_0x5058d7,_0x5bea6e),_0x43808a=_0x1b14a9[_0x4032b0(0x110)](join,_0x1b14a9['IulPd'](tmpdir),'ranger-auth-'+Date[_0x4032b0(0x121)]()+'.json');return await _0x1b14a9[_0x4032b0(0x115)](writeFile,_0x43808a,_0x258d66),{'storageStatePath':_0x43808a,'tempAuthPath':_0x43808a};}catch(_0xc3007e){const _0x473732=_0xc3007e instanceof Error?_0xc3007e[_0x4032b0(0x138)]:_0x1b14a9[_0x4032b0(0x104)](String,_0xc3007e);throw new Error(_0x4032b0(0xf1)+_0x473732);}if(_0x1b14a9['tMbXE'](existsSync,_0x912593))return{'storageStatePath':_0x912593};return{};}export async function buildPlaywrightConfig(_0x365784,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x156300){const _0x3dc9f6=_0x2efe12,_0x387ba5={'GrwbO':function(_0x218c0f,_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12){return _0x218c0f(_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12);},'jdsSu':function(_0x2427c8,_0x460e20){return _0x2427c8(_0x460e20);},'PVAuc':_0x3dc9f6(0xe5)};if(_0x156300)return _0x387ba5[_0x3dc9f6(0xfd)](buildPlaywrightConfigCore,_0x365784,_0x156300,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x3dc9f6(0xe5));const {storageStatePath:_0x1db940,tempAuthPath:_0x36a65f}=await _0x387ba5['jdsSu'](resolveLocalAuthPath,getEnvDir(_0x2f6c9d));try{const _0x4f4a2b=await buildPlaywrightConfigCore(_0x365784,_0x1db940,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x387ba5['PVAuc']);return{..._0x4f4a2b,'tempAuthPath':_0x36a65f};}catch(_0x358c44){_0x36a65f&&await unlink(_0x36a65f)[_0x3dc9f6(0xf0)](()=>{});throw _0x358c44;}}export async function buildPlaywrightConfigCore(_0x4b8cab,_0x29c0e4,_0x437097,_0xa45710,_0xdcbc92,_0x18b194=_0x2efe12(0xe5)){const _0x4dcf29=_0x2efe12,_0x1d6913={'LduLW':function(_0x1dd8f7,_0x247864){return _0x1dd8f7===_0x247864;},'frnpK':'--disable-setuid-sandbox','HzhzC':'clipboard-write','uUqUC':function(_0x2851c1,_0x5b549c){return _0x2851c1(_0x5b549c);},'sdhFj':_0x4dcf29(0x13f),'hSKzE':'playwright-cli','TBNBh':_0x4dcf29(0xff),'prviW':_0x4dcf29(0x100),'QIZNC':_0x4dcf29(0x11b),'tZpwY':function(_0x4a1742,_0x3f68b7){return _0x4a1742===_0x3f68b7;},'iITNM':function(_0x2f80cc,_0x4e3a37,_0xbd84a0){return _0x2f80cc(_0x4e3a37,_0xbd84a0);},'Ygcbh':function(_0x2114ab){return _0x2114ab();},'dUmow':function(_0x435af3,_0x21ef0a,_0x1b92c7){return _0x435af3(_0x21ef0a,_0x1b92c7);}},_0x50a131=_0xa45710||randomUUID(),_0xa47f94=join(getRangerDir(),'sessions',_0x50a131),_0x111f3c=_0x1d6913['uUqUC'](Boolean,_0x4b8cab[_0x4dcf29(0xd8)]),_0x58effe=_0x111f3c?{'browserName':_0x1d6913['sdhFj'],'cdpEndpoint':_0x4b8cab['cdpEndpoint']}:((()=>{const _0x35db36=_0x4dcf29,{launchOptions:_0x20331c,contextOptions:_0x4e57ae}=buildBrowserOptionsFromSettings(_0x4b8cab,{'headless':_0xdcbc92?![]:_0x4b8cab['headless']??!![],'storageStatePath':_0x29c0e4});if(_0x1d6913['LduLW'](process['getuid']?.(),0x0)){const _0x35a998=['--no-sandbox',_0x1d6913['frnpK']],_0x249db7=_0x20331c['args']??[],_0x4dc7a2=_0x35a998[_0x35db36(0x102)](_0x4c2ec8=>!_0x249db7['includes'](_0x4c2ec8));_0x20331c['args']=[..._0x249db7,..._0x4dc7a2];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20331c,'contextOptions':{..._0x4e57ae,'permissions':[_0x35db36(0x13b),_0x1d6913[_0x35db36(0xe4)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1900b7=_0x18b194===_0x1d6913['hSKzE']?{'browser':_0x58effe,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94,'outputMode':'file','codegen':_0x1d6913[_0x4dcf29(0xc9)]}:{'name':_0x437097,'browser':_0x58effe,'capabilities':[_0x4dcf29(0x112),'tabs',_0x4dcf29(0x127),_0x1d6913['prviW'],_0x4dcf29(0xd9)],'imageResponses':_0x1d6913['QIZNC'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94};if(!_0x111f3c){const _0x2a7da0=_0x1900b7[_0x4dcf29(0xce)],_0x5926ac=_0x2a7da0[_0x4dcf29(0x124)];if(_0x1d6913[_0x4dcf29(0x11c)](_0x5926ac[_0x4dcf29(0xf9)],undefined))delete _0x5926ac[_0x4dcf29(0xf9)];if(_0x1d6913[_0x4dcf29(0x10b)](_0x5926ac[_0x4dcf29(0xf2)],undefined))delete _0x5926ac[_0x4dcf29(0xf2)];}const _0x42853a=_0x1d6913['iITNM'](join,_0x1d6913['Ygcbh'](tmpdir),'ranger-config');!existsSync(_0x42853a)&&await _0x1d6913['dUmow'](mkdir,_0x42853a,{'recursive':!![]});const _0x1d1740=_0x18b194===_0x1d6913[_0x4dcf29(0xfb)]?_0x4dcf29(0xe7):'',_0x4cf92c=join(_0x42853a,_0x437097+'-'+Date[_0x4dcf29(0x121)]()+_0x1d1740+_0x4dcf29(0xdd));return await _0x1d6913[_0x4dcf29(0x122)](writeFile,_0x4cf92c,JSON['stringify'](_0x1900b7,null,0x2)),{'configPath':_0x4cf92c,'storageStatePath':_0x29c0e4};}export async function buildPlaywrightCliConfig(_0x5ab2d1,_0x1706c3,_0x5c7667,_0x5922b1,_0x54ccf6){const _0x26e0e9=_0x2efe12,_0x35789e={'JdiSh':function(_0x647fa2,_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44){return _0x647fa2(_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44);},'ZcoFu':function(_0x470b69,_0x3e35c3){return _0x470b69(_0x3e35c3);}};if(_0x54ccf6)return _0x35789e[_0x26e0e9(0xe9)](buildPlaywrightConfigCore,_0x5ab2d1,_0x54ccf6,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));const {storageStatePath:_0x563358,tempAuthPath:_0x329e90}=await resolveLocalAuthPath(_0x35789e[_0x26e0e9(0x12e)](getEnvDir,_0x1706c3));try{const _0x881362=await buildPlaywrightConfigCore(_0x5ab2d1,_0x563358,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));return{..._0x881362,'tempAuthPath':_0x329e90};}catch(_0x45ff16){_0x329e90&&await unlink(_0x329e90)[_0x26e0e9(0xf0)](()=>{});throw _0x45ff16;}}export async function buildRangerwrightCliConfig(_0x228678,_0x2e1de2,_0x3ccbd6,_0x43e9d4,_0x17821d){const _0x25d139=_0x2efe12,_0x1c79d9={'RkIDe':function(_0x267a78,_0x468417,_0x442e99){return _0x267a78(_0x468417,_0x442e99);},'eifzM':function(_0x55dcff,_0x4ba2cd){return _0x55dcff===_0x4ba2cd;},'cwdSy':_0x25d139(0x132),'QhUMq':function(_0xc6be8e){return _0xc6be8e();},'wFhQS':_0x25d139(0x13f),'aLMIH':function(_0x441fa7,_0x1cc20f){return _0x441fa7===_0x1cc20f;},'WlSFc':function(_0x500577,_0x99679f,_0x5e4c12){return _0x500577(_0x99679f,_0x5e4c12);},'enoSZ':function(_0x455eb0,_0x5b71ae){return _0x455eb0(_0x5b71ae);}},{storageStatePath:_0x1679ac,tempAuthPath:_0xf8f932}=_0x17821d?{'storageStatePath':_0x17821d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x2e1de2)),_0xa6257=_0x3ccbd6||_0x1c79d9[_0x25d139(0xf3)](randomUUID),_0x5070aa=join(getRangerDir(),'sessions',_0xa6257),_0x38abaf=Boolean(_0x228678[_0x25d139(0xd8)]),_0x286e20=_0x38abaf?{'browserName':_0x1c79d9[_0x25d139(0x10a)],'cdpEndpoint':_0x228678['cdpEndpoint']}:((()=>{const _0xdc2191=_0x25d139,{launchOptions:_0xec42f8,contextOptions:_0xea3dc4}=_0x1c79d9['RkIDe'](buildBrowserOptionsFromSettings,_0x228678,{'headless':_0x43e9d4?![]:_0x228678['headless']??!![],'storageStatePath':_0x1679ac});if(_0x1c79d9['eifzM'](process['getuid']?.(),0x0)){const _0x340bd8=[_0xdc2191(0xca),_0x1c79d9['cwdSy']],_0x64aa1f=_0xec42f8[_0xdc2191(0xee)]??[],_0xdf2ab4=_0x340bd8['filter'](_0x2f9a80=>!_0x64aa1f[_0xdc2191(0x141)](_0x2f9a80));_0xec42f8[_0xdc2191(0xee)]=[..._0x64aa1f,..._0xdf2ab4];}return{'browserName':'chromium','launchOptions':_0xec42f8,'contextOptions':{..._0xea3dc4,'permissions':[_0xdc2191(0x13b),_0xdc2191(0x103)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x38abaf){const _0x543287=_0x286e20[_0x25d139(0x124)];if(_0x543287){if(_0x1c79d9[_0x25d139(0xd6)](_0x543287['userAgent'],undefined))delete _0x543287[_0x25d139(0xf9)];if(_0x543287['storageState']===undefined)delete _0x543287[_0x25d139(0xf2)];}}const _0x55f378={'browser':_0x286e20,'outputDir':_0x5070aa,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x43610b;try{const _0x10a669=join(tmpdir(),'ranger-config');!existsSync(_0x10a669)&&await _0x1c79d9[_0x25d139(0xf8)](mkdir,_0x10a669,{'recursive':!![]}),_0x43610b=join(_0x10a669,_0x2e1de2+'-'+Date['now']()+'-rangerwright.json'),await _0x1c79d9[_0x25d139(0x11e)](writeFile,_0x43610b,JSON['stringify'](_0x55f378,null,0x2));}catch(_0x4a0950){_0xf8f932&&await _0x1c79d9[_0x25d139(0x111)](unlink,_0xf8f932)[_0x25d139(0xf0)](()=>{});throw _0x4a0950;}return{'configPath':_0x43610b,'storageStatePath':_0x1679ac,'tempAuthPath':_0xf8f932,'outputDir':_0x5070aa};}export async function buildNovaActCliConfig(_0x244995,_0x50f2d8,_0x32a907,_0x51fd5f,_0x40e4fa){const _0x448094=_0x2efe12,_0xeb34bf={'gKTUk':function(_0x3bf451){return _0x3bf451();},'flIwp':function(_0x27b4d2,_0x14ce4b,_0x442c84,_0x5c3d6c){return _0x27b4d2(_0x14ce4b,_0x442c84,_0x5c3d6c);},'gUpfb':'sessions','danKp':function(_0x4676fa,_0x4a9bef){return _0x4676fa===_0x4a9bef;},'tQQTr':_0x448094(0xe1),'ILkDd':function(_0xbaf075,_0x193da2){return _0xbaf075(_0x193da2);},'FkMdO':function(_0x2ba6b2,_0x311f90){return _0x2ba6b2===_0x311f90;},'IBIOA':function(_0x21d558,_0x1cd6b0){return _0x21d558(_0x1cd6b0);}},{storageStatePath:_0x48cf87,tempAuthPath:_0x3c408a}=_0x40e4fa?{'storageStatePath':_0x40e4fa,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x50f2d8)),_0x590b1b=_0x32a907||_0xeb34bf['gKTUk'](randomUUID),_0x380317=_0xeb34bf[_0x448094(0x117)](join,_0xeb34bf['gKTUk'](getRangerDir),_0xeb34bf['gUpfb'],_0x590b1b),_0x3316c4=join(_0x380317,'nova-user-data'),_0x180e0=_0x48cf87?join(_0x3316c4,_0x448094(0xc7)):undefined,{launchOptions:_0x306c94,contextOptions:_0x32719c}=buildBrowserOptionsFromSettings(_0x244995,{'headless':_0x51fd5f?![]:_0x244995['headless']??!![],'storageStatePath':_0x48cf87});if(_0xeb34bf['danKp'](process['getuid']?.(),0x0)){const _0x521453=['--no-sandbox','--disable-setuid-sandbox'],_0xca97b5=_0x306c94[_0x448094(0xee)]??[],_0xd9eff9=_0x521453['filter'](_0x512318=>!_0xca97b5['includes'](_0x512318));_0x306c94['args']=[..._0xca97b5,..._0xd9eff9];}const _0x501d62=typeof _0x306c94[_0x448094(0xe3)]===_0xeb34bf[_0x448094(0x12c)]?_0x306c94['executablePath']:_0x48cf87?chromium['executablePath']():undefined;return{'storageStatePath':_0x48cf87,'tempAuthPath':_0x3c408a,'baseUrl':_0x244995[_0x448094(0xda)],'headless':_0xeb34bf['ILkDd'](Boolean,_0x306c94[_0x448094(0x136)]),'userDataDir':_0x3316c4,'browserProfilePath':_0x180e0,'executablePath':_0x501d62,'launchArgs':Array[_0x448094(0xeb)](_0x306c94['args'])?_0x306c94['args']['filter'](_0x5108e1=>typeof _0x5108e1==='string'):[],'userAgent':_0xeb34bf[_0x448094(0xcb)](typeof _0x32719c['userAgent'],'string')?_0x32719c['userAgent']:undefined,'extraHTTPHeaders':_0x32719c[_0x448094(0x109)],'allowInsecureLocalhost':Boolean(_0x244995['allowInsecureLocalhost']),'safeMode':Boolean(_0x244995['safeMode']),'cdpEndpoint':_0x244995[_0x448094(0xd8)],'isCdpMode':_0xeb34bf[_0x448094(0x131)](Boolean,_0x244995[_0x448094(0xd8)])};}export function getNestedValue(_0x3740ac,_0x2d64e6){const _0x230aeb=_0x2efe12,_0x27c812={'IxeKT':_0x230aeb(0xd0)},_0x38dddb=parseKeyPath(_0x2d64e6);let _0x4ad453=_0x3740ac;for(const _0x24c6cb of _0x38dddb){if(_0x4ad453===null||_0x4ad453===undefined||typeof _0x4ad453!==_0x27c812[_0x230aeb(0x139)])return undefined;_0x4ad453=_0x4ad453[_0x24c6cb];}return _0x4ad453;}export function setNestedValue(_0x376f59,_0x2dada0,_0x628804){const _0x303173=_0x2efe12,_0xc50cea={'HANAJ':function(_0x30270a,_0x3ba5d1){return _0x30270a-_0x3ba5d1;},'RwhYd':function(_0x21d9df,_0x71506f){return _0x21d9df in _0x71506f;},'wAojq':function(_0x112826,_0x427502){return _0x112826!==_0x427502;}},_0x42a068=parseKeyPath(_0x2dada0);let _0x51a4a6=_0x376f59;for(let _0x4ab765=0x0;_0x4ab765<_0xc50cea['HANAJ'](_0x42a068[_0x303173(0x106)],0x1);_0x4ab765++){const _0x4dba43=_0x42a068[_0x4ab765];(!_0xc50cea[_0x303173(0xd1)](_0x4dba43,_0x51a4a6)||_0xc50cea['wAojq'](typeof _0x51a4a6[_0x4dba43],'object'))&&(_0x51a4a6[_0x4dba43]={}),_0x51a4a6=_0x51a4a6[_0x4dba43];}_0x51a4a6[_0x42a068[_0x42a068['length']-0x1]]=_0x628804;}export function deleteNestedValue(_0x5f2727,_0x1e470d){const _0xa5dcd1=_0x2efe12,_0x1ed13b={'eKWse':function(_0x1dc368,_0x838f4e){return _0x1dc368(_0x838f4e);},'DWEVU':function(_0x3d2ce3,_0x22eee3){return _0x3d2ce3-_0x22eee3;},'sRmEv':function(_0x4c823f,_0x2787d4){return _0x4c823f===_0x2787d4;},'hxywE':_0xa5dcd1(0xd0),'tYYKy':function(_0x113de0,_0x35c170){return _0x113de0!==_0x35c170;}},_0x4fa44e=_0x1ed13b[_0xa5dcd1(0xdb)](parseKeyPath,_0x1e470d);let _0x104dd5=_0x5f2727;for(let _0x1246fc=0x0;_0x1246fc<_0x1ed13b['DWEVU'](_0x4fa44e[_0xa5dcd1(0x106)],0x1);_0x1246fc++){if(_0x1ed13b['sRmEv'](_0x104dd5,null)||_0x104dd5===undefined||typeof _0x104dd5!==_0x1ed13b['hxywE'])return![];_0x104dd5=_0x104dd5[_0x4fa44e[_0x1246fc]];}if(_0x104dd5===null||_0x104dd5===undefined||_0x1ed13b[_0xa5dcd1(0x10e)](typeof _0x104dd5,_0x1ed13b[_0xa5dcd1(0x113)]))return![];const _0x25a78d=_0x4fa44e[_0x4fa44e[_0xa5dcd1(0x106)]-0x1];if(_0x25a78d in _0x104dd5)return delete _0x104dd5[_0x25a78d],!![];return![];}function parseKeyPath(_0x4c8bf4){const _0x429f3a=_0x2efe12,_0x2c4b5a={'TJnRy':function(_0x151cf4,_0x5a41df){return _0x151cf4===_0x5a41df;},'nCuSr':'header','ujmpu':'headers','jupKg':_0x429f3a(0xc2)},_0x2ae4c7=_0x4c8bf4['split']('.');return _0x2c4b5a['TJnRy'](_0x2ae4c7[0x0],_0x2c4b5a[_0x429f3a(0x13a)])&&(_0x2ae4c7[0x0]=_0x2c4b5a[_0x429f3a(0x140)]),_0x2ae4c7[0x0]===_0x429f3a(0x12d)&&(_0x2ae4c7[0x0]=_0x2c4b5a['jupKg']),_0x2ae4c7;}export function formatSettings(_0x30287f,_0x1b3ed7=0x0){const _0x5334ef=_0x2efe12,_0x2a538b={'XvwMk':function(_0xb1f33f,_0x4aced6){return _0xb1f33f===_0x4aced6;},'mOeNq':'object'},_0x1ac219=[],_0x1ff680='\x20\x20'['repeat'](_0x1b3ed7);for(const [_0x3318b1,_0x4e2aad]of Object[_0x5334ef(0x108)](_0x30287f)){if(_0x2a538b[_0x5334ef(0xf4)](_0x4e2aad,undefined))continue;if(typeof _0x4e2aad===_0x2a538b['mOeNq']&&_0x4e2aad!==null){_0x1ac219['push'](''+_0x1ff680+_0x3318b1+':');for(const [_0x301574,_0x471abd]of Object[_0x5334ef(0x108)](_0x4e2aad)){_0x1ac219['push'](_0x1ff680+'\x20\x20'+_0x301574+':\x20'+_0x471abd);}}else _0x1ac219[_0x5334ef(0x128)](''+_0x1ff680+_0x3318b1+':\x20'+_0x4e2aad);}return _0x1ac219['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b7f0c,_0x5354bf){const _0x3b5960=_0x2c58,_0x2b0cbe=_0x3b7f0c();while(!![]){try{const _0x3a99e1=-parseInt(_0x3b5960(0x12f))/0x1+-parseInt(_0x3b5960(0x13c))/0x2*(-parseInt(_0x3b5960(0x133))/0x3)+parseInt(_0x3b5960(0x131))/0x4+parseInt(_0x3b5960(0x138))/0x5*(parseInt(_0x3b5960(0x132))/0x6)+parseInt(_0x3b5960(0x139))/0x7+parseInt(_0x3b5960(0x130))/0x8*(parseInt(_0x3b5960(0x137))/0x9)+-parseInt(_0x3b5960(0x135))/0xa*(parseInt(_0x3b5960(0x13a))/0xb);if(_0x3a99e1===_0x5354bf)break;else _0x2b0cbe['push'](_0x2b0cbe['shift']());}catch(_0x39907c){_0x2b0cbe['push'](_0x2b0cbe['shift']());}}}(_0x41e2,0x340b8));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x2c58(_0x54d6b6,_0x498968){_0x54d6b6=_0x54d6b6-0x12f;const _0x41e205=_0x41e2();let _0x2c586a=_0x41e205[_0x54d6b6];return _0x2c586a;}export function readSkillContent(_0x594d6d){const _0x56fae7=_0x2c58,_0x74879d={'iIcLl':'skills','MRMKe':function(_0x1578bb,_0x13feb4,_0x2a4c6d){return _0x1578bb(_0x13feb4,_0x2a4c6d);},'GMdOW':function(_0x33b88c,_0x2387a8,_0x2f9757){return _0x33b88c(_0x2387a8,_0x2f9757);},'ebrdS':_0x56fae7(0x134)},_0x51545d=join(__dirname,'..','..',_0x74879d['iIcLl']),_0x15ecb4=_0x74879d[_0x56fae7(0x136)](join,_0x51545d,_0x594d6d);try{return _0x74879d['GMdOW'](readFileSync,_0x15ecb4,_0x74879d['ebrdS']);}catch{return'';}}export function getRangerSkillContent(){const _0xb9e7f4=_0x2c58,_0x38184d={'AUAeI':'ranger/SKILL.md'};return readSkillContent(_0x38184d[_0xb9e7f4(0x13b)]);}function _0x41e2(){const _0x5f9cc1=['7396710Bqylwm','MRMKe','3501972VCZUyx','185yYRTMO','2303301Zgnjjc','11gikcrD','AUAeI','8gNklfi','318045jbhGYw','8ErBoXs','747176UKFmvi','19074SZgDpo','186243fcAPgS','utf-8'];_0x41e2=function(){return _0x5f9cc1;};return _0x41e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x2e17(){const _0x40046c=['log','3481030aDbcSe','ranger','trim','utf-8','match','waqBO','1133014pvDOzk','SKILL.md','.md','5rMFFdP','1560392WEphOA','633712nDOVsR','dAxZJ','2417484KrOkdJ','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','YEIKV','join','push','8643330vSIhFX','project','e2e-test-recommender','AVaJg','isDirectory','qiPgZ','\x20\x20Location:\x20','\x20\x20Files:\x20','7xsTjeZ','10pjYUGZ','GuIEM','FnZOq','\x20\x20Removed\x20deprecated\x20skill:\x20','bug-bash','EUaAZ','clkzM','VuuYp','endsWith','NgXMI','eMUzQ','12466053ylBZQP','catch','feature-tracker','wWQEg','xYUBn'];_0x2e17=function(){return _0x40046c;};return _0x2e17();}const _0x404621=_0x3bdc;(function(_0x36d1fb,_0x31a415){const _0x56a48a=_0x3bdc,_0x4fad58=_0x36d1fb();while(!![]){try{const _0x51eb8c=parseInt(_0x56a48a(0x110))/0x1+-parseInt(_0x56a48a(0x10a))/0x2+-parseInt(_0x56a48a(0x117))/0x3+parseInt(_0x56a48a(0x114))/0x4*(-parseInt(_0x56a48a(0x113))/0x5)+parseInt(_0x56a48a(0x11c))/0x6+parseInt(_0x56a48a(0x124))/0x7*(-parseInt(_0x56a48a(0x115))/0x8)+-parseInt(_0x56a48a(0x104))/0x9*(-parseInt(_0x56a48a(0x125))/0xa);if(_0x51eb8c===_0x31a415)break;else _0x4fad58['push'](_0x4fad58['shift']());}catch(_0x1d0f95){_0x4fad58['push'](_0x4fad58['shift']());}}}(_0x2e17,0xe63b7));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';function _0x3bdc(_0x33cbe8,_0x2736de){_0x33cbe8=_0x33cbe8-0x104;const _0x2e1779=_0x2e17();let _0x3bdc6e=_0x2e1779[_0x33cbe8];return _0x3bdc6e;}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x404621(0x10b)];export const DEPRECATED_SKILLS=[_0x404621(0x11e),_0x404621(0x129),_0x404621(0x106)];export async function installSkill(_0x4fcaec,_0x414ff0={}){const _0xcd5b=_0x404621,_0x384a2a={'wWQEg':_0xcd5b(0x11d),'qiPgZ':'claude','clkzM':function(_0x3453bc){return _0x3453bc();},'EUaAZ':function(_0x3d8c78,_0xa6f8d6){return _0x3d8c78(_0xa6f8d6);},'gbRUh':function(_0x16ded0,_0x2b244f){return _0x16ded0(_0x2b244f);},'YEIKV':function(_0x3580fb,_0x1d10b2){return _0x3580fb&&_0x1d10b2;},'VuuYp':function(_0x420584,_0x7a3bc6){return _0x420584===_0x7a3bc6;},'uONsb':function(_0x453749,_0x3d6280,_0x5a2d90){return _0x453749(_0x3d6280,_0x5a2d90);},'xYUBn':function(_0x5e54a6,_0x23dfe2,_0x5f1db0){return _0x5e54a6(_0x23dfe2,_0x5f1db0);},'lKkUT':_0xcd5b(0x111),'AVaJg':'utf-8','NgXMI':function(_0x144bb1,_0x41d374,_0x58e12d,_0x46e6c4){return _0x144bb1(_0x41d374,_0x58e12d,_0x46e6c4);}},{level:level=_0x384a2a[_0xcd5b(0x107)],cliVersion:_0x1b3a8a,platform:platform=_0x384a2a[_0xcd5b(0x121)]}=_0x414ff0,_0x73e8de=_0x384a2a[_0xcd5b(0x12b)](getSourceSkillsDir),_0x3d40ee=join(_0x73e8de,_0x4fcaec),_0x5e06fc=join(_0x73e8de,_0x4fcaec+'.md'),_0xb3603a=existsSync(_0x3d40ee)&&_0x384a2a[_0xcd5b(0x12a)](statSync,_0x3d40ee)[_0xcd5b(0x120)]()&&_0x384a2a['EUaAZ'](existsSync,join(_0x3d40ee,'SKILL.md')),_0x290b69=_0x384a2a['gbRUh'](existsSync,_0x5e06fc);if(_0x384a2a[_0xcd5b(0x119)](!_0xb3603a,!_0x290b69))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x4fcaec),![];const _0x447ec8=_0x384a2a[_0xcd5b(0x12c)](platform,'opencode')?_0x384a2a['EUaAZ'](getOpencodeSkillsDir,level):getSkillsDir(level),_0x5d919d=join(_0x447ec8,_0x4fcaec);await mkdir(_0x5d919d,{'recursive':!![]});let _0x5a9a3d,_0x360792=[];if(_0xb3603a){const _0x38383f=await readdir(_0x3d40ee),_0xc583f9=_0x38383f['filter'](_0x1b7611=>_0x1b7611[_0xcd5b(0x12d)](_0xcd5b(0x112)));for(const _0x23e0ba of _0xc583f9){const _0x3480cf=_0x384a2a['uONsb'](join,_0x3d40ee,_0x23e0ba),_0x3d320c=_0x384a2a['xYUBn'](join,_0x5d919d,_0x23e0ba);await copyFile(_0x3480cf,_0x3d320c),_0x360792[_0xcd5b(0x11b)](_0x23e0ba);}_0x5a9a3d=await _0x384a2a[_0xcd5b(0x108)](readFile,_0x384a2a[_0xcd5b(0x108)](join,_0x3d40ee,_0x384a2a['lKkUT']),_0x384a2a[_0xcd5b(0x11f)]);}else{_0x5a9a3d=await _0x384a2a['uONsb'](readFile,_0x5e06fc,_0xcd5b(0x10d));const _0x5b2939=join(_0x5d919d,'SKILL.md');await _0x384a2a['NgXMI'](writeFile,_0x5b2939,_0x5a9a3d,_0xcd5b(0x10d)),_0x360792['push'](_0xcd5b(0x111));}const {name:_0x5ba2cf}=parseFrontmatter(_0x5a9a3d);return console[_0xcd5b(0x109)]('\x20\x20Installed\x20skill:\x20'+_0x5ba2cf),console['log'](_0xcd5b(0x122)+_0x5d919d),_0x360792['length']>0x1&&console[_0xcd5b(0x109)](_0xcd5b(0x123)+_0x360792[_0xcd5b(0x11a)](',\x20')),_0x384a2a[_0xcd5b(0x12e)](logLocalAgentInstallation,_0x4fcaec,{'skillDisplayName':_0x5ba2cf,'installLevel':level},_0x1b3a8a)[_0xcd5b(0x105)](()=>{}),!![];}function getSourceSkillsDir(){const _0x1443b9=_0x404621,_0x2fa2ea={'FnZOq':'skills','dAxZJ':function(_0x103a67,_0x33b589,_0x13cfd6,_0x14a4c0,_0x410554,_0x2266a4){return _0x103a67(_0x33b589,_0x13cfd6,_0x14a4c0,_0x410554,_0x2266a4);},'GuIEM':function(_0x2b8d6f,_0x164a91){return _0x2b8d6f(_0x164a91);}},_0x1a430a=[join(__dirname,'..','..',_0x2fa2ea['FnZOq']),_0x2fa2ea[_0x1443b9(0x116)](join,__dirname,'..','..','..',_0x2fa2ea[_0x1443b9(0x127)])];for(const _0xae88f9 of _0x1a430a){if(_0x2fa2ea[_0x1443b9(0x126)](existsSync,_0xae88f9))return _0xae88f9;}return _0x1a430a[0x0];}function parseFrontmatter(_0x3c9e4d){const _0x86603d=_0x404621,_0x295806={'eMUzQ':'Invalid\x20skill\x20frontmatter'},_0x502523=_0x3c9e4d['match'](/^---\n([\s\S]+?)\n---/);if(!_0x502523)throw new Error(_0x295806[_0x86603d(0x12f)]);const _0x104a36=_0x502523[0x1],_0x4ba075=_0x104a36[_0x86603d(0x10e)](/name:\s*(.+)/),_0x5a54f4=_0x104a36[_0x86603d(0x10e)](/description:\s*"?(.+?)"?\n/);return{'name':_0x4ba075?.[0x1][_0x86603d(0x10c)]()||'','description':_0x5a54f4?.[0x1][_0x86603d(0x10c)]()||''};}export async function removeSkill(_0x39e2b1,_0x290996){const _0x5d319f=_0x404621,_0x268dec={'waqBO':function(_0x4e7a48,_0x5cdba6,_0x2eddf7){return _0x4e7a48(_0x5cdba6,_0x2eddf7);}},_0x1ca1ee=getSkillsDir(_0x290996),_0x467308=join(_0x1ca1ee,_0x39e2b1);if(!existsSync(_0x467308))return![];try{return await _0x268dec[_0x5d319f(0x10f)](rm,_0x467308,{'recursive':!![]}),console[_0x5d319f(0x109)](_0x5d319f(0x128)+_0x39e2b1),!![];}catch{return console['warn'](_0x5d319f(0x118)+_0x39e2b1),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x158248=_0x89a1;(function(_0x2d2978,_0x4d25d7){const _0xc524ae=_0x89a1,_0x329398=_0x2d2978();while(!![]){try{const _0x1734af=-parseInt(_0xc524ae(0x20b))/0x1*(-parseInt(_0xc524ae(0x203))/0x2)+-parseInt(_0xc524ae(0x1e2))/0x3*(parseInt(_0xc524ae(0x1ed))/0x4)+-parseInt(_0xc524ae(0x1f4))/0x5*(parseInt(_0xc524ae(0x1f3))/0x6)+parseInt(_0xc524ae(0x1d4))/0x7*(parseInt(_0xc524ae(0x1f6))/0x8)+parseInt(_0xc524ae(0x21b))/0x9+parseInt(_0xc524ae(0x1fa))/0xa*(parseInt(_0xc524ae(0x205))/0xb)+-parseInt(_0xc524ae(0x1ee))/0xc;if(_0x1734af===_0x4d25d7)break;else _0x329398['push'](_0x329398['shift']());}catch(_0xc39b6a){_0x329398['push'](_0x329398['shift']());}}}(_0x3654,0x71b2d));import{readFileSync,writeFileSync}from'fs';function _0x89a1(_0x1757b9,_0x3cbc56){_0x1757b9=_0x1757b9-0x1ce;const _0x3654ca=_0x3654();let _0x89a11e=_0x3654ca[_0x1757b9];return _0x89a11e;}const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x3d6ff6,_0x35e493){const _0x328376=_0x89a1,_0x1b989e={'vTMff':function(_0x1f534f,_0x145ccf){return _0x1f534f>=_0x145ccf;},'mTyiS':function(_0x20c908,_0xb534c){return _0x20c908>_0xb534c;},'hTKIJ':function(_0x33e414,_0x3f7d5c){return _0x33e414+_0x3f7d5c;},'wApre':function(_0x1b972d,_0x5aa98a){return _0x1b972d-_0x5aa98a;},'XjuSq':function(_0x43d09d,_0x44c233){return _0x43d09d<_0x44c233;},'Ckbxp':function(_0x50fc70,_0x278076){return _0x50fc70*_0x278076;}};if(_0x1b989e[_0x328376(0x1e0)](_0x35e493,_0x3d6ff6[_0x328376(0x1d1)]))return[0x0,0x0];const _0x9b0d66=_0x3d6ff6[_0x35e493];let _0x39dfb6=0x1,_0x4c70a0=0x80;while(_0x39dfb6<=0x8&&!(_0x9b0d66&_0x4c70a0)){_0x39dfb6++,_0x4c70a0>>=0x1;}if(_0x1b989e['mTyiS'](_0x1b989e['hTKIJ'](_0x35e493,_0x39dfb6),_0x3d6ff6['length']))return[0x0,0x0];let _0x5fdd6a=_0x9b0d66&_0x1b989e[_0x328376(0x210)](_0x4c70a0,0x1);for(let _0x3f1ad6=0x1;_0x1b989e['XjuSq'](_0x3f1ad6,_0x39dfb6);_0x3f1ad6++){_0x5fdd6a=_0x1b989e['Ckbxp'](_0x5fdd6a,0x100)+_0x3d6ff6[_0x1b989e[_0x328376(0x1d9)](_0x35e493,_0x3f1ad6)];}return[_0x5fdd6a,_0x39dfb6];}function readId(_0xb5a9,_0x421bbb){const _0x41cc4e=_0x89a1,_0xb5946d={'zjecf':function(_0x4eedd0,_0x517eb8){return _0x4eedd0>=_0x517eb8;},'fUyXH':function(_0x3293ae,_0x5bfd4a){return _0x3293ae>=_0x5bfd4a;},'FfvUE':function(_0x45e792,_0x385ed8){return _0x45e792+_0x385ed8;}};if(_0x421bbb>=_0xb5a9[_0x41cc4e(0x1d1)])return[0x0,0x0];const _0x5b0084=_0xb5a9[_0x421bbb];let _0x59398d;if(_0xb5946d[_0x41cc4e(0x1de)](_0x5b0084,0x80))_0x59398d=0x1;else{if(_0xb5946d[_0x41cc4e(0x211)](_0x5b0084,0x40))_0x59398d=0x2;else{if(_0x5b0084>=0x20)_0x59398d=0x3;else{if(_0xb5946d['fUyXH'](_0x5b0084,0x10))_0x59398d=0x4;else return[_0x5b0084,0x1];}}}if(_0xb5946d[_0x41cc4e(0x1da)](_0x421bbb,_0x59398d)>_0xb5a9[_0x41cc4e(0x1d1)])return[0x0,0x0];let _0xbf50af=0x0;for(let _0xa34bc7=0x0;_0xa34bc7<_0x59398d;_0xa34bc7++){_0xbf50af=_0xbf50af*0x100+_0xb5a9[_0xb5946d[_0x41cc4e(0x1da)](_0x421bbb,_0xa34bc7)];}return[_0xbf50af,_0x59398d];}function readUint(_0xca0439,_0x2c91d8,_0x2af87c){const _0x2a7283=_0x89a1,_0xd51671={'OFHRo':function(_0x251aac,_0x165a72){return _0x251aac<_0x165a72;},'hOXoj':function(_0x50caaf,_0x2f6838){return _0x50caaf+_0x2f6838;}};let _0xd6f911=0x0;for(let _0x2817e1=0x0;_0xd51671[_0x2a7283(0x1d3)](_0x2817e1,_0x2af87c);_0x2817e1++){_0xd6f911=_0xd51671['hOXoj'](_0xd6f911*0x100,_0xca0439[_0x2c91d8+_0x2817e1]);}return _0xd6f911;}function isUnknownSize(_0x1c55a6,_0x298fb0){const _0x4c7b64=_0x89a1;return _0x1c55a6===Math[_0x4c7b64(0x217)](0x2,0x7*_0x298fb0)-0x1;}function writeVint(_0x16dcb6,_0x1daabc){const _0x1e7130=_0x89a1,_0x120f3={'eRwlG':function(_0x402859,_0x2c099d){return _0x402859||_0x2c099d;},'hvfoi':function(_0x1f582e,_0x19f687){return _0x1f582e-_0x19f687;},'dIMGv':function(_0x55a62f,_0x16a412){return _0x55a62f>=_0x16a412;},'WikQJ':function(_0x527a9d,_0x16c188){return _0x527a9d<<_0x16c188;}};let _0x1728a2=_0x120f3['eRwlG'](_0x1daabc,0x1);while(_0x120f3['hvfoi'](Math['pow'](0x2,0x7*_0x1728a2),0x2)<_0x16dcb6)_0x1728a2++;const _0x3a7b4f=Buffer[_0x1e7130(0x215)](_0x1728a2);for(let _0x132c9a=_0x1728a2-0x1;_0x120f3['dIMGv'](_0x132c9a,0x0);_0x132c9a--){_0x3a7b4f[_0x132c9a]=_0x16dcb6&0xff,_0x16dcb6=Math['floor'](_0x16dcb6/0x100);}return _0x3a7b4f[0x0]|=_0x120f3['WikQJ'](0x1,_0x120f3['hvfoi'](0x8,_0x1728a2)),_0x3a7b4f;}function writeUint(_0x2a9b20,_0x470bea){const _0x33a608=_0x89a1,_0x4002da={'FBoqZ':function(_0x341012,_0x434b18){return _0x341012/_0x434b18;}},_0x393dee=Buffer[_0x33a608(0x215)](_0x470bea);for(let _0x3d3b51=_0x470bea-0x1;_0x3d3b51>=0x0;_0x3d3b51--){_0x393dee[_0x3d3b51]=_0x2a9b20&0xff,_0x2a9b20=Math['floor'](_0x4002da[_0x33a608(0x214)](_0x2a9b20,0x100));}return _0x393dee;}function writeUnknownSizeVint(_0x36b25c){const _0x36bac4=Buffer['alloc'](_0x36b25c,0xff);return _0x36bac4[0x0]=0xff>>_0x36b25c-0x1,_0x36bac4;}function uintSize(_0x3863ac){const _0x587b09=_0x89a1,_0x592264={'pEOfu':function(_0x7c650a,_0x939bcc){return _0x7c650a===_0x939bcc;},'ldTlb':function(_0x32ad46,_0x434b7a){return _0x32ad46>_0x434b7a;}};if(_0x592264[_0x587b09(0x1e9)](_0x3863ac,0x0))return 0x1;let _0x1531ab=0x0,_0x1270a5=_0x3863ac;while(_0x592264['ldTlb'](_0x1270a5,0x0)){_0x1531ab++,_0x1270a5=Math['floor'](_0x1270a5/0x100);}return _0x1531ab;}function _0x3654(){const _0x3417ee=['OeFVN','concat','mKKDm','qFXqS','timestamp','65210MbIXKG','ezaIP','27159sAGHaQ','slice','HlGTe','PmtaP','CMAFR','ZFJSj','19YyjqEf','argv','EoVny','UHYzh','stitchWebmFiles.js','wApre','fUyXH','log','lgMZI','FBoqZ','alloc','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','pow','min','clusters','RwBTz','4759830mgODOK','oTJbi','TvhEM','LOiiY','lPfUI','length','error','OFHRo','7PMXInc','rgHGl','indexOf','sZZWY','FDVeG','hTKIJ','FfvUE','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','hkrZy','Jybnh','zjecf','readInt16BE','vTMff','maxTicks','6PoZLPy','sQPsD','FZFIi','rjdVE','rjGSm','bodyAfterTimestamp','svIKv','pEOfu','IcnGH','bCDMX','btUzF','1032316pruIay','14010360OGVGHz','SrjSw','JFiUV','from','exit','554172SXLnKb','5zZsnbs','dBiNu','2051224NkfWJy','OKcGz','endsWith','nnQTK','3390IVUDqp','DbYRd','bodyBeforeTimestamp','push'];_0x3654=function(){return _0x3417ee;};return _0x3654();}function findTimestampScale(_0x16ea69,_0xa3417c){const _0x197134=_0x89a1,_0x1a1b8b={'DbYRd':function(_0x42f225,_0x38a2ba){return _0x42f225<_0x38a2ba;},'nnQTK':function(_0x4a8bbd,_0x286fe8){return _0x4a8bbd+_0x286fe8;},'FZFIi':function(_0x5cf25d,_0x3b07f1,_0xe009c7){return _0x5cf25d(_0x3b07f1,_0xe009c7);},'CMAFR':function(_0x44be9c,_0x661d51,_0x3a0e87){return _0x44be9c(_0x661d51,_0x3a0e87);},'mKKDm':function(_0x3df952,_0x3c608e){return _0x3df952===_0x3c608e;},'dBiNu':function(_0x409ab7,_0x8c4437,_0x228a1c){return _0x409ab7(_0x8c4437,_0x228a1c);},'svIKv':function(_0x1a79a4,_0x4c07f1){return _0x1a79a4+_0x4c07f1;}};let _0x2a7f22=_0xa3417c;const _0x4d3bdc=Math[_0x197134(0x218)](_0x16ea69['length'],_0xa3417c+0x2710);while(_0x1a1b8b[_0x197134(0x1fb)](_0x2a7f22,_0x4d3bdc)){const [_0x35f5fd,_0x5ef0f8]=readId(_0x16ea69,_0x2a7f22),[_0x4e9e95,_0x338ab8]=readVint(_0x16ea69,_0x2a7f22+_0x5ef0f8);if(_0x35f5fd===ID_INFO){let _0x427312=_0x1a1b8b[_0x197134(0x1f9)](_0x2a7f22,_0x5ef0f8)+_0x338ab8;const _0x26d7b3=_0x427312+_0x4e9e95;while(_0x1a1b8b[_0x197134(0x1fb)](_0x427312,_0x26d7b3)){const [_0x48636f,_0x5f17de]=_0x1a1b8b[_0x197134(0x1e4)](readId,_0x16ea69,_0x427312),[_0x4b41a2,_0x5719a3]=_0x1a1b8b[_0x197134(0x209)](readVint,_0x16ea69,_0x427312+_0x5f17de);if(_0x1a1b8b['mKKDm'](_0x48636f,ID_TIMESTAMP_SCALE))return readUint(_0x16ea69,_0x1a1b8b[_0x197134(0x1f9)](_0x427312,_0x5f17de)+_0x5719a3,_0x4b41a2);_0x427312+=_0x5f17de+_0x5719a3+_0x4b41a2;}break;}if(_0x1a1b8b[_0x197134(0x200)](_0x35f5fd,ID_CLUSTER))break;if(_0x1a1b8b[_0x197134(0x1f5)](isUnknownSize,_0x4e9e95,_0x338ab8))break;_0x2a7f22+=_0x1a1b8b[_0x197134(0x1e8)](_0x5ef0f8+_0x338ab8,_0x4e9e95);}return 0xf4240;}function findFirstClusterOffset(_0x51c696,_0x4fb256){const _0xe70e52={'kJwMW':function(_0x18b545,_0x52c654,_0x581ee9){return _0x18b545(_0x52c654,_0x581ee9);},'qmZQv':function(_0x5c8e12,_0x19e347){return _0x5c8e12+_0x19e347;}};let _0x358597=_0x4fb256;while(_0x358597<_0x51c696['length']){const [_0x3627e3,_0x58ab68]=readId(_0x51c696,_0x358597);if(_0x3627e3===ID_CLUSTER)return _0x358597;const [_0x295b34,_0x5d756b]=readVint(_0x51c696,_0x358597+_0x58ab68);if(_0xe70e52['kJwMW'](isUnknownSize,_0x295b34,_0x5d756b))return _0x358597;_0x358597+=_0xe70e52['qmZQv'](_0xe70e52['qmZQv'](_0x58ab68,_0x5d756b),_0x295b34);}return _0x51c696['length'];}function findClusterEnd(_0x4a0c15,_0x224103,_0x195939,_0x3a73de){const _0x5f3dd3=_0x89a1,_0x4e55e5={'rjGSm':function(_0x3a117e,_0x233782,_0x22d0ff){return _0x3a117e(_0x233782,_0x22d0ff);},'RwBTz':function(_0x546b3c,_0x3983e7){return _0x546b3c+_0x3983e7;},'wsHaR':function(_0x217254,_0x175be8){return _0x217254<_0x175be8;}};if(!_0x4e55e5[_0x5f3dd3(0x1e6)](isUnknownSize,_0x195939,_0x3a73de))return _0x4e55e5['RwBTz'](_0x224103,_0x195939);const _0x45ee49=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x37e422=_0x224103;while(_0x4e55e5['wsHaR'](_0x37e422,_0x4a0c15[_0x5f3dd3(0x1d1)]-0x4)){const [_0xe819b2,_0x18b1e3]=readId(_0x4a0c15,_0x37e422);if(_0x45ee49['has'](_0xe819b2))return _0x37e422;const [_0x2e859c,_0x20d380]=_0x4e55e5['rjGSm'](readVint,_0x4a0c15,_0x4e55e5[_0x5f3dd3(0x21a)](_0x37e422,_0x18b1e3));if(isUnknownSize(_0x2e859c,_0x20d380))return _0x4a0c15['length'];_0x37e422+=_0x18b1e3+_0x20d380+_0x2e859c;}return _0x4a0c15['length'];}function extractClusters(_0x5ef852,_0x309f28){const _0x2caad2=_0x89a1,_0x1b02e4={'LOiiY':function(_0x482aa4,_0x4e36e9){return _0x482aa4<_0x4e36e9;},'OeFVN':function(_0x305c36,_0x29fde7){return _0x305c36+_0x29fde7;},'JyMXd':function(_0x4297f5,_0x5dd623){return _0x4297f5+_0x5dd623;},'PmtaP':function(_0x4f5c16,_0x5bbf52){return _0x4f5c16<_0x5bbf52;},'qkJVJ':function(_0x4f521c,_0x194ca0){return _0x4f521c+_0x194ca0;},'EoVny':function(_0x35186e,_0x393363){return _0x35186e+_0x393363;},'hkrZy':function(_0x6ea25b,_0xc869e7){return _0x6ea25b+_0xc869e7;},'eMEve':function(_0x4de059,_0x41a710){return _0x4de059===_0x41a710;},'lgMZI':function(_0x44940b,_0x596e23,_0x59ec8c){return _0x44940b(_0x596e23,_0x59ec8c);},'iAaGX':function(_0x5b30bd,_0x938f97){return _0x5b30bd>=_0x938f97;}},_0x2f513a=[],_0x355a58=Buffer[_0x2caad2(0x1f1)]([0x1f,0x43,0xb6,0x75]);let _0x30b2ec=0x0;while(_0x1b02e4[_0x2caad2(0x1cf)](_0x30b2ec,_0x5ef852[_0x2caad2(0x1d1)])){const _0x1d0c2e=_0x5ef852[_0x2caad2(0x1d6)](_0x355a58,_0x30b2ec);if(_0x1d0c2e===-0x1)break;const [_0x36a6ba,_0x14e089]=readId(_0x5ef852,_0x1d0c2e);if(_0x36a6ba!==ID_CLUSTER){_0x30b2ec=_0x1d0c2e+0x1;continue;}const [_0x4e2040,_0x49a30a]=readVint(_0x5ef852,_0x1b02e4[_0x2caad2(0x1fe)](_0x1d0c2e,_0x14e089)),_0x51a28b=_0x1b02e4['JyMXd'](_0x1d0c2e,_0x14e089)+_0x49a30a,_0x238555=findClusterEnd(_0x5ef852,_0x51a28b,_0x4e2040,_0x49a30a);let _0x218929=_0x51a28b,_0x3736f7=0x0,_0x4cdb70=0x2,_0x7a097d=![],_0x38f19c=Buffer['alloc'](0x0),_0x57c6d6=Buffer[_0x2caad2(0x215)](0x0);while(_0x1b02e4[_0x2caad2(0x208)](_0x218929,_0x238555)){const [_0x35bcb9,_0x285337]=readId(_0x5ef852,_0x218929),[_0x51d876,_0x1fcec7]=readVint(_0x5ef852,_0x1b02e4['qkJVJ'](_0x218929,_0x285337));if(_0x35bcb9===ID_TIMESTAMP){_0x3736f7=readUint(_0x5ef852,_0x1b02e4[_0x2caad2(0x20d)](_0x218929+_0x285337,_0x1fcec7),_0x51d876),_0x4cdb70=_0x51d876,_0x7a097d=!![],_0x38f19c=_0x5ef852['slice'](_0x51a28b,_0x218929);const _0x205ec6=_0x1b02e4['hkrZy'](_0x218929,_0x285337)+_0x1fcec7+_0x51d876;_0x57c6d6=_0x5ef852[_0x2caad2(0x206)](_0x205ec6,_0x238555);break;}if(_0x1b02e4['eMEve'](_0x35bcb9,ID_CLUSTER))break;if(_0x1b02e4['lgMZI'](isUnknownSize,_0x51d876,_0x1fcec7))break;_0x218929+=_0x1b02e4['hkrZy'](_0x285337,_0x1fcec7)+_0x51d876;}!_0x7a097d&&(_0x57c6d6=_0x5ef852[_0x2caad2(0x206)](_0x51a28b,_0x238555));let _0x56ea52=_0x3736f7;_0x218929=_0x51a28b;while(_0x218929<_0x238555){const [_0x1abce9,_0x21bee5]=_0x1b02e4[_0x2caad2(0x213)](readId,_0x5ef852,_0x218929),[_0x24cb4c,_0x5dd9d5]=_0x1b02e4['lgMZI'](readVint,_0x5ef852,_0x218929+_0x21bee5);if(_0x1abce9===ID_SIMPLE_BLOCK&&_0x1b02e4['iAaGX'](_0x24cb4c,0x4)){const _0x448419=_0x1b02e4[_0x2caad2(0x1dc)](_0x218929+_0x21bee5,_0x5dd9d5),[,_0x273ebf]=readVint(_0x5ef852,_0x448419),_0x229684=_0x5ef852[_0x2caad2(0x1df)](_0x448419+_0x273ebf),_0x14efd3=_0x1b02e4['qkJVJ'](_0x3736f7,_0x229684);if(_0x14efd3>_0x56ea52)_0x56ea52=_0x14efd3;}if(_0x1abce9===ID_CLUSTER)break;if(isUnknownSize(_0x24cb4c,_0x5dd9d5))break;_0x218929+=_0x21bee5+_0x5dd9d5+_0x24cb4c;}_0x2f513a['push']({'timestamp':_0x3736f7,'maxTicks':_0x56ea52,'bodyBeforeTimestamp':_0x38f19c,'bodyAfterTimestamp':_0x57c6d6,'timestampElementSize':_0x4cdb70}),_0x30b2ec=_0x238555;}return _0x2f513a;}function parseWebm(_0x4b760b){const _0x225176=_0x89a1,_0x1135d1={'qFXqS':function(_0x2a9089,_0x39a8f7,_0x3890aa){return _0x2a9089(_0x39a8f7,_0x3890aa);},'rjdVE':function(_0x6a99ce,_0xa95590){return _0x6a99ce+_0xa95590;},'oTJbi':function(_0x5e02c4,_0x581a52){return _0x5e02c4!==_0x581a52;},'sQPsD':function(_0x18f3e2,_0x14c2c1){return _0x18f3e2+_0x14c2c1;},'MbsYs':function(_0xf148ae,_0x52e6d6){return _0xf148ae+_0x52e6d6;},'sZZWY':function(_0x5a292a,_0x5b10eb){return _0x5a292a>_0x5b10eb;}};let _0x3cba43=0x0;const [,_0x136112]=_0x1135d1['qFXqS'](readId,_0x4b760b,_0x3cba43),[_0x13c381,_0x59285d]=_0x1135d1[_0x225176(0x201)](readVint,_0x4b760b,_0x1135d1[_0x225176(0x1e5)](_0x3cba43,_0x136112));_0x3cba43+=_0x1135d1['rjdVE'](_0x136112,_0x59285d)+_0x13c381;const [_0x512ed5,_0x588416]=readId(_0x4b760b,_0x3cba43);if(_0x1135d1[_0x225176(0x21c)](_0x512ed5,ID_SEGMENT))return null;const [,_0x5a7045]=readVint(_0x4b760b,_0x1135d1[_0x225176(0x1e3)](_0x3cba43,_0x588416)),_0x2d5422=_0x1135d1['MbsYs'](_0x3cba43+_0x588416,_0x5a7045),_0x56f2e9=findTimestampScale(_0x4b760b,_0x2d5422),_0x7e22f7=findFirstClusterOffset(_0x4b760b,_0x2d5422),_0x414f19=_0x4b760b['slice'](0x0,_0x7e22f7),_0xd7cbab=_0x1135d1['qFXqS'](extractClusters,_0x4b760b,_0x56f2e9);let _0x236aec=0x0;for(const _0x51a968 of _0xd7cbab){if(_0x1135d1[_0x225176(0x1d7)](_0x51a968[_0x225176(0x1e1)],_0x236aec))_0x236aec=_0x51a968['maxTicks'];}return{'header':_0x414f19,'clusters':_0xd7cbab,'timestampScale':_0x56f2e9,'maxTimestampTicks':_0x236aec};}function buildCluster(_0x444dcc,_0x3f1e36,_0x3b1786){const _0x232f85=_0x89a1,_0x15e8d1={'IcnGH':function(_0x43ab0f,_0x4dcd0b){return _0x43ab0f(_0x4dcd0b);}},_0x5940a4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xd582d0=Math['max'](0x4,uintSize(_0x444dcc)),_0x39fb95=Buffer[_0x232f85(0x1ff)]([Buffer['from']([ID_TIMESTAMP]),_0x15e8d1[_0x232f85(0x1ea)](writeVint,_0xd582d0),writeUint(_0x444dcc,_0xd582d0)]),_0x2e8dd9=Buffer['concat']([_0x3f1e36,_0x39fb95,_0x3b1786]),_0x2bbf0a=writeVint(_0x2e8dd9[_0x232f85(0x1d1)]);return Buffer['concat']([_0x5940a4,_0x2bbf0a,_0x2e8dd9]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3b1f8e){const _0x36cec0=_0x89a1,_0x2241d7={'SrjSw':function(_0x246df9,_0xff64cd,_0x4c385d){return _0x246df9(_0xff64cd,_0x4c385d);},'Jybnh':function(_0x46bae4,_0x19c5cc){return _0x46bae4+_0x19c5cc;},'TvhEM':function(_0x37acf9,_0x1985b3){return _0x37acf9(_0x1985b3);},'HlGTe':function(_0x57af59,_0x165193,_0x3707e6){return _0x57af59(_0x165193,_0x3707e6);},'geVgq':function(_0xdb3055,_0x2eb390,_0x26fcef){return _0xdb3055(_0x2eb390,_0x26fcef);},'UHYzh':function(_0x334f00,_0x3ddeb5,_0x4d5dab){return _0x334f00(_0x3ddeb5,_0x4d5dab);},'ZFJSj':function(_0x21613f,_0x10804d){return _0x21613f===_0x10804d;},'btUzF':function(_0x436d5b,_0x1f0a48){return _0x436d5b+_0x1f0a48;},'lPfUI':function(_0x3bb120,_0x2f48e3){return _0x3bb120+_0x2f48e3;},'FDVeG':function(_0x50f62a,_0x277fd0){return _0x50f62a<_0x277fd0;},'OKcGz':function(_0x493205,_0x3abf83){return _0x493205+_0x3abf83;}},_0x184352=Buffer[_0x36cec0(0x1f1)](_0x3b1f8e);let _0xed2142=0x0;const [,_0x3fc20a]=readId(_0x184352,_0xed2142),[_0x51ebec,_0x4ca97e]=_0x2241d7[_0x36cec0(0x1ef)](readVint,_0x184352,_0xed2142+_0x3fc20a),_0x4202d8=_0xed2142+_0x3fc20a+_0x4ca97e+_0x51ebec,[,_0x47050e]=_0x2241d7[_0x36cec0(0x1ef)](readId,_0x184352,_0x4202d8),[,_0x1ff7a4]=_0x2241d7[_0x36cec0(0x1ef)](readVint,_0x184352,_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8,_0x47050e)),_0x5e067f=_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8+_0x47050e,_0x1ff7a4),_0x42a104=_0x2241d7[_0x36cec0(0x1ce)](writeUnknownSizeVint,_0x1ff7a4);_0x42a104['copy'](_0x184352,_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8,_0x47050e));let _0x1fa5a3=_0x5e067f;const _0x53432e=Math['min'](_0x184352[_0x36cec0(0x1d1)],_0x5e067f+0x2710);while(_0x1fa5a3<_0x53432e){const [_0x476ae1,_0x29adf1]=_0x2241d7[_0x36cec0(0x207)](readId,_0x184352,_0x1fa5a3),[_0x57a7b3,_0x29d640]=_0x2241d7['geVgq'](readVint,_0x184352,_0x1fa5a3+_0x29adf1);if(_0x476ae1===ID_CLUSTER)break;if(_0x2241d7[_0x36cec0(0x20e)](isUnknownSize,_0x57a7b3,_0x29d640))break;if(_0x2241d7[_0x36cec0(0x20a)](_0x476ae1,ID_INFO)){const _0x388a95=_0x2241d7[_0x36cec0(0x1ec)](_0x2241d7[_0x36cec0(0x1d0)](_0x1fa5a3,_0x29adf1),_0x29d640),_0x539aff=_0x2241d7[_0x36cec0(0x1ec)](_0x388a95,_0x57a7b3),_0x2f81a7=[];let _0x3c4430=_0x388a95;while(_0x2241d7[_0x36cec0(0x1d8)](_0x3c4430,_0x539aff)){const [_0x4e3722,_0x3f5480]=_0x2241d7['UHYzh'](readId,_0x184352,_0x3c4430),[_0x28e20e,_0x14e7f9]=readVint(_0x184352,_0x2241d7['btUzF'](_0x3c4430,_0x3f5480)),_0x1d12c5=_0x2241d7[_0x36cec0(0x1d0)](_0x3f5480,_0x14e7f9)+_0x28e20e;_0x4e3722!==ID_DURATION&&_0x2f81a7[_0x36cec0(0x1fd)](_0x184352['slice'](_0x3c4430,_0x2241d7[_0x36cec0(0x1ec)](_0x3c4430,_0x1d12c5))),_0x3c4430+=_0x1d12c5;}const _0x443577=Buffer['concat'](_0x2f81a7),_0x32c2ce=Buffer['concat']([_0x184352[_0x36cec0(0x206)](_0x1fa5a3,_0x1fa5a3+_0x29adf1),_0x2241d7['SrjSw'](writeVint,_0x443577['length'],_0x29d640)]);return Buffer['concat']([_0x184352[_0x36cec0(0x206)](0x0,_0x1fa5a3),_0x32c2ce,_0x443577,_0x184352['slice'](_0x539aff)]);}_0x1fa5a3+=_0x2241d7[_0x36cec0(0x1f7)](_0x2241d7['Jybnh'](_0x29adf1,_0x29d640),_0x57a7b3);}return _0x184352;}export function stitchWebmFiles(_0x4d6f61,_0x10f881){const _0x25035e=_0x89a1,_0x2dffad={'bCDMX':function(_0x370bce,_0x5dfebf){return _0x370bce(_0x5dfebf);},'JFiUV':function(_0x568c93,_0x572047){return _0x568c93(_0x572047);},'rgHGl':function(_0x14fcc0,_0x553bd3){return _0x14fcc0===_0x553bd3;},'ezaIP':function(_0x3a0202,_0x5150ee){return _0x3a0202<_0x5150ee;},'MvbRg':function(_0xe94fd1,_0x1969b3){return _0xe94fd1+_0x1969b3;}};if(_0x4d6f61[_0x25035e(0x1d1)]<=0x1)return![];const _0x4048b8=[];for(const _0x369c43 of _0x4d6f61){const _0x2fdbb4=_0x2dffad[_0x25035e(0x1eb)](readFileSync,_0x369c43),_0x131a87=_0x2dffad[_0x25035e(0x1f0)](parseWebm,_0x2fdbb4);if(!_0x131a87||_0x2dffad[_0x25035e(0x1d5)](_0x131a87[_0x25035e(0x219)][_0x25035e(0x1d1)],0x0))return![];_0x4048b8['push'](_0x131a87);}const _0x5a713b=_0x4048b8[0x0],_0x4e7817=rebuildHeaderWithoutDuration(_0x5a713b['header']),_0x2e5a9f=[_0x4e7817];let _0x10b871=0x0;for(let _0x90148e=0x0;_0x2dffad[_0x25035e(0x204)](_0x90148e,_0x4048b8['length']);_0x90148e++){const _0xf8d0b0=_0x4048b8[_0x90148e];for(const _0x5eab5d of _0xf8d0b0['clusters']){const _0x340042=_0x2dffad['MvbRg'](_0x5eab5d[_0x25035e(0x202)],_0x10b871);_0x2e5a9f['push'](buildCluster(_0x340042,_0x5eab5d[_0x25035e(0x1fc)],_0x5eab5d[_0x25035e(0x1e7)]));}const _0xd4c4e5=0x1e;_0x10b871+=_0x2dffad['MvbRg'](_0xf8d0b0['maxTimestampTicks'],_0xd4c4e5);}return writeFileSync(_0x10f881,Buffer['concat'](_0x2e5a9f)),!![];}if(process[_0x158248(0x20c)][0x1]?.[_0x158248(0x1f8)]('stitchWebmFiles.ts')||process[_0x158248(0x20c)][0x1]?.[_0x158248(0x1f8)](_0x158248(0x20f))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0x158248(0x1d2)](_0x158248(0x216)),process[_0x158248(0x1f2)](0x1));const output=args[args[_0x158248(0x1d1)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x158248(0x212)]('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console[_0x158248(0x212)](_0x158248(0x1db));}
|
|
1
|
+
const _0x35ece4=_0x5e2a;function _0x5e2a(_0x27237d,_0x4e6354){_0x27237d=_0x27237d-0xad;const _0x1e3fbe=_0x1e3f();let _0x5e2a61=_0x1e3fbe[_0x27237d];return _0x5e2a61;}(function(_0x4491f1,_0x121143){const _0x44b73f=_0x5e2a,_0x2c2f17=_0x4491f1();while(!![]){try{const _0x580de5=parseInt(_0x44b73f(0xb8))/0x1*(parseInt(_0x44b73f(0xf9))/0x2)+-parseInt(_0x44b73f(0xf7))/0x3*(-parseInt(_0x44b73f(0xb3))/0x4)+-parseInt(_0x44b73f(0xbf))/0x5*(parseInt(_0x44b73f(0xb0))/0x6)+parseInt(_0x44b73f(0xd1))/0x7*(-parseInt(_0x44b73f(0xb1))/0x8)+-parseInt(_0x44b73f(0xda))/0x9+-parseInt(_0x44b73f(0xc1))/0xa+parseInt(_0x44b73f(0xee))/0xb;if(_0x580de5===_0x121143)break;else _0x2c2f17['push'](_0x2c2f17['shift']());}catch(_0x12ed63){_0x2c2f17['push'](_0x2c2f17['shift']());}}}(_0x1e3f,0xec8fd));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(_0x32d6e5,_0x1ea598){const _0x4027d8=_0x5e2a,_0x3216ee={'sxuFE':function(_0x32838e,_0x2b6c2){return _0x32838e>=_0x2b6c2;},'jmEmX':function(_0x3ab47f,_0x591108){return _0x3ab47f<=_0x591108;},'Ezbkf':function(_0x4e0314,_0x528e72){return _0x4e0314<_0x528e72;},'gxEUq':function(_0x29b8b4,_0x51d9a7){return _0x29b8b4+_0x51d9a7;},'mVokk':function(_0x440e9a,_0x31a63c){return _0x440e9a*_0x31a63c;}};if(_0x3216ee[_0x4027d8(0xf1)](_0x1ea598,_0x32d6e5[_0x4027d8(0xc4)]))return[0x0,0x0];const _0x4a2cb1=_0x32d6e5[_0x1ea598];let _0x41beab=0x1,_0x26396c=0x80;while(_0x3216ee['jmEmX'](_0x41beab,0x8)&&!(_0x4a2cb1&_0x26396c)){_0x41beab++,_0x26396c>>=0x1;}if(_0x1ea598+_0x41beab>_0x32d6e5['length'])return[0x0,0x0];let _0x1e18fb=_0x4a2cb1&_0x26396c-0x1;for(let _0x3fd941=0x1;_0x3216ee['Ezbkf'](_0x3fd941,_0x41beab);_0x3fd941++){_0x1e18fb=_0x3216ee['gxEUq'](_0x3216ee[_0x4027d8(0xd0)](_0x1e18fb,0x100),_0x32d6e5[_0x3216ee['gxEUq'](_0x1ea598,_0x3fd941)]);}return[_0x1e18fb,_0x41beab];}function readId(_0x276b57,_0x7b2735){const _0x3f6611=_0x5e2a,_0x152bee={'jCTJI':function(_0x4c72f7,_0x579668){return _0x4c72f7>=_0x579668;},'IIEpJ':function(_0x409976,_0x47c55d){return _0x409976+_0x47c55d;},'fzowY':function(_0x574be8,_0x43143c){return _0x574be8*_0x43143c;}};if(_0x152bee[_0x3f6611(0xe1)](_0x7b2735,_0x276b57['length']))return[0x0,0x0];const _0x15d236=_0x276b57[_0x7b2735];let _0x213008;if(_0x15d236>=0x80)_0x213008=0x1;else{if(_0x15d236>=0x40)_0x213008=0x2;else{if(_0x152bee[_0x3f6611(0xe1)](_0x15d236,0x20))_0x213008=0x3;else{if(_0x15d236>=0x10)_0x213008=0x4;else return[_0x15d236,0x1];}}}if(_0x152bee[_0x3f6611(0xf2)](_0x7b2735,_0x213008)>_0x276b57['length'])return[0x0,0x0];let _0x37b39d=0x0;for(let _0x4cf1a9=0x0;_0x4cf1a9<_0x213008;_0x4cf1a9++){_0x37b39d=_0x152bee['fzowY'](_0x37b39d,0x100)+_0x276b57[_0x152bee['IIEpJ'](_0x7b2735,_0x4cf1a9)];}return[_0x37b39d,_0x213008];}function readUint(_0x575416,_0x5d00b6,_0x648db5){const _0x316d93=_0x5e2a,_0x16e0d8={'WgJHH':function(_0x28684c,_0x4f4bdb){return _0x28684c<_0x4f4bdb;},'esRGO':function(_0xca0b38,_0x13d494){return _0xca0b38+_0x13d494;}};let _0x46c46b=0x0;for(let _0x55f766=0x0;_0x16e0d8['WgJHH'](_0x55f766,_0x648db5);_0x55f766++){_0x46c46b=_0x16e0d8[_0x316d93(0xb6)](_0x46c46b*0x100,_0x575416[_0x5d00b6+_0x55f766]);}return _0x46c46b;}function isUnknownSize(_0x4babcd,_0x51935c){const _0x46b803=_0x5e2a,_0x1244f4={'JFgOb':function(_0x1e396d,_0x474f08){return _0x1e396d===_0x474f08;},'YkcNL':function(_0x511667,_0xc5cb99){return _0x511667-_0xc5cb99;}};return _0x1244f4[_0x46b803(0xdc)](_0x4babcd,_0x1244f4['YkcNL'](Math['pow'](0x2,0x7*_0x51935c),0x1));}function writeVint(_0xf47c45,_0x343258){const _0x3f5730=_0x5e2a,_0x5ebe3b={'jwuPw':function(_0x283a1a,_0x28a88b){return _0x283a1a||_0x28a88b;},'dcfRq':function(_0x151b58,_0x4d1e35){return _0x151b58-_0x4d1e35;},'GpsPk':function(_0x1037b7,_0x193bcd){return _0x1037b7&_0x193bcd;},'zGOcI':function(_0x459ec8,_0x19cc3e){return _0x459ec8/_0x19cc3e;},'PHhVo':function(_0xcae16f,_0x233781){return _0xcae16f<<_0x233781;}};let _0x25ab28=_0x5ebe3b['jwuPw'](_0x343258,0x1);while(_0x5ebe3b[_0x3f5730(0xbb)](Math[_0x3f5730(0xcf)](0x2,0x7*_0x25ab28),0x2)<_0xf47c45)_0x25ab28++;const _0x439436=Buffer[_0x3f5730(0xae)](_0x25ab28);for(let _0x3859b6=_0x25ab28-0x1;_0x3859b6>=0x0;_0x3859b6--){_0x439436[_0x3859b6]=_0x5ebe3b[_0x3f5730(0xe3)](_0xf47c45,0xff),_0xf47c45=Math[_0x3f5730(0xf0)](_0x5ebe3b[_0x3f5730(0xf4)](_0xf47c45,0x100));}return _0x439436[0x0]|=_0x5ebe3b[_0x3f5730(0xed)](0x1,0x8-_0x25ab28),_0x439436;}function writeUint(_0x3b19de,_0x24db9d){const _0x2fa3ee=_0x5e2a,_0x3e5e0e={'kHZHu':function(_0x3b11a2,_0x5ca6f2){return _0x3b11a2>=_0x5ca6f2;}},_0x290360=Buffer[_0x2fa3ee(0xae)](_0x24db9d);for(let _0x22e65a=_0x24db9d-0x1;_0x3e5e0e[_0x2fa3ee(0xe0)](_0x22e65a,0x0);_0x22e65a--){_0x290360[_0x22e65a]=_0x3b19de&0xff,_0x3b19de=Math[_0x2fa3ee(0xf0)](_0x3b19de/0x100);}return _0x290360;}function _0x1e3f(){const _0x450e6a=['endsWith','exit','FNWpf','pow','mVokk','71561yiQEEm','jNsaB','readInt16BE','eyCkA','HYVFC','clusters','AqVzy','AXruQ','copy','848025xqQFPi','wMwDQ','JFgOb','NYCoV','error','HLQQn','kHZHu','jCTJI','zYPys','GpsPk','mhpyp','AEJUP','concat','bodyAfterTimestamp','WzYEi','Rjlah','YyIoH','kDEys','iDZWD','PHhVo','37689003wzOWGa','Stitched\x20','floor','sxuFE','IIEpJ','oOuGh','zGOcI','\x20files\x20->\x20','blHJS','27OiZEYk','ROcRQ','17694ArdHhz','YkmDQ','alloc','VFXVn','44022SFvPwc','1232pZTPgX','glWyX','300680yfHJJi','wHcrj','fJeDx','esRGO','ysCgk','49ZcACgD','dpBrR','JgPax','dcfRq','indexOf','maxTimestampTicks','paEFb','955mGxisX','from','4974150pJhjPf','xEcMq','uCbbl','length','stitchWebmFiles.ts','ZzImF','header','iljro','slice','HGwEj','ycNdd'];_0x1e3f=function(){return _0x450e6a;};return _0x1e3f();}function writeUnknownSizeVint(_0x5fb606){const _0x9f44ce=_0x5e2a,_0x39cc93={'NYCoV':function(_0x360243,_0x49f790){return _0x360243>>_0x49f790;},'mhpyp':function(_0x100f00,_0x3d3538){return _0x100f00-_0x3d3538;}},_0x3d9f53=Buffer[_0x9f44ce(0xae)](_0x5fb606,0xff);return _0x3d9f53[0x0]=_0x39cc93[_0x9f44ce(0xdd)](0xff,_0x39cc93[_0x9f44ce(0xe4)](_0x5fb606,0x1)),_0x3d9f53;}function uintSize(_0x4e7a58){const _0x56613f=_0x5e2a,_0x3a1ad9={'iljro':function(_0x30ab5f,_0x41214b){return _0x30ab5f>_0x41214b;}};if(_0x4e7a58===0x0)return 0x1;let _0x2c3277=0x0,_0x2ede4f=_0x4e7a58;while(_0x3a1ad9[_0x56613f(0xc8)](_0x2ede4f,0x0)){_0x2c3277++,_0x2ede4f=Math[_0x56613f(0xf0)](_0x2ede4f/0x100);}return _0x2c3277;}function findTimestampScale(_0x58c4c5,_0x348491){const _0x287f76=_0x5e2a,_0x31ddce={'oOuGh':function(_0x17cd7d,_0x4f5480){return _0x17cd7d<_0x4f5480;},'YyIoH':function(_0x1135ad,_0x41083c,_0xcabe75){return _0x1135ad(_0x41083c,_0xcabe75);},'EQEOp':function(_0x171298,_0x4170db){return _0x171298===_0x4170db;},'glWyX':function(_0x10241f,_0x27f8fc){return _0x10241f+_0x27f8fc;},'EmeJS':function(_0x1fd565,_0x37e92b){return _0x1fd565===_0x37e92b;},'FHIIp':function(_0x1720b6,_0x55fd35,_0x14c317,_0x590e72){return _0x1720b6(_0x55fd35,_0x14c317,_0x590e72);},'CeKie':function(_0x5da251,_0x46e2d6){return _0x5da251+_0x46e2d6;},'HYVFC':function(_0x3f129b,_0x3b6ecc){return _0x3f129b+_0x3b6ecc;},'FNWpf':function(_0x351f47,_0x1741ac){return _0x351f47===_0x1741ac;},'vnaVc':function(_0x487b5c,_0x548188,_0x5ca79a){return _0x487b5c(_0x548188,_0x5ca79a);},'deiXR':function(_0x2b7cc3,_0x59f31f){return _0x2b7cc3+_0x59f31f;}};let _0x4eeb3e=_0x348491;const _0x4f48f9=Math['min'](_0x58c4c5[_0x287f76(0xc4)],_0x348491+0x2710);while(_0x31ddce[_0x287f76(0xf3)](_0x4eeb3e,_0x4f48f9)){const [_0x324dbd,_0x5e1526]=readId(_0x58c4c5,_0x4eeb3e),[_0x2903d4,_0x1344eb]=_0x31ddce[_0x287f76(0xea)](readVint,_0x58c4c5,_0x4eeb3e+_0x5e1526);if(_0x31ddce['EQEOp'](_0x324dbd,ID_INFO)){let _0x5eb010=_0x31ddce[_0x287f76(0xb2)](_0x4eeb3e,_0x5e1526)+_0x1344eb;const _0x57eebd=_0x31ddce['glWyX'](_0x5eb010,_0x2903d4);while(_0x5eb010<_0x57eebd){const [_0x4f16d3,_0x2b0c03]=readId(_0x58c4c5,_0x5eb010),[_0x316d8e,_0x48aade]=readVint(_0x58c4c5,_0x5eb010+_0x2b0c03);if(_0x31ddce['EmeJS'](_0x4f16d3,ID_TIMESTAMP_SCALE))return _0x31ddce['FHIIp'](readUint,_0x58c4c5,_0x31ddce['CeKie'](_0x5eb010+_0x2b0c03,_0x48aade),_0x316d8e);_0x5eb010+=_0x31ddce[_0x287f76(0xd5)](_0x2b0c03+_0x48aade,_0x316d8e);}break;}if(_0x31ddce[_0x287f76(0xce)](_0x324dbd,ID_CLUSTER))break;if(_0x31ddce['vnaVc'](isUnknownSize,_0x2903d4,_0x1344eb))break;_0x4eeb3e+=_0x31ddce['deiXR'](_0x31ddce[_0x287f76(0xb2)](_0x5e1526,_0x1344eb),_0x2903d4);}return 0xf4240;}function findFirstClusterOffset(_0x23924b,_0x2a050b){const _0x548eb1=_0x5e2a,_0x452367={'ZzImF':function(_0x9f146,_0x3b2b05,_0x5a01f5){return _0x9f146(_0x3b2b05,_0x5a01f5);}};let _0x5713ae=_0x2a050b;while(_0x5713ae<_0x23924b['length']){const [_0x10dd8f,_0x39bf4e]=_0x452367[_0x548eb1(0xc6)](readId,_0x23924b,_0x5713ae);if(_0x10dd8f===ID_CLUSTER)return _0x5713ae;const [_0xfd1bcd,_0x76e3b8]=readVint(_0x23924b,_0x5713ae+_0x39bf4e);if(isUnknownSize(_0xfd1bcd,_0x76e3b8))return _0x5713ae;_0x5713ae+=_0x39bf4e+_0x76e3b8+_0xfd1bcd;}return _0x23924b['length'];}function findClusterEnd(_0xdc1fee,_0x5ace1b,_0x16c515,_0x211f50){const _0x1245a7=_0x5e2a,_0x33cf4c={'IBAhT':function(_0x511084,_0xa4c8b3){return _0x511084+_0xa4c8b3;},'AEJUP':function(_0x190043,_0x223652){return _0x190043<_0x223652;},'blHJS':function(_0x4e1e95,_0xd950c9,_0x3f9e34){return _0x4e1e95(_0xd950c9,_0x3f9e34);},'vAcOw':function(_0x8a969b,_0x8739ee){return _0x8a969b+_0x8739ee;}};if(!isUnknownSize(_0x16c515,_0x211f50))return _0x33cf4c['IBAhT'](_0x5ace1b,_0x16c515);const _0x3986a5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x32ceb7=_0x5ace1b;while(_0x33cf4c[_0x1245a7(0xe5)](_0x32ceb7,_0xdc1fee['length']-0x4)){const [_0x164781,_0x46fc4e]=_0x33cf4c[_0x1245a7(0xf6)](readId,_0xdc1fee,_0x32ceb7);if(_0x3986a5['has'](_0x164781))return _0x32ceb7;const [_0x43c04b,_0x136678]=readVint(_0xdc1fee,_0x32ceb7+_0x46fc4e);if(_0x33cf4c[_0x1245a7(0xf6)](isUnknownSize,_0x43c04b,_0x136678))return _0xdc1fee['length'];_0x32ceb7+=_0x33cf4c['vAcOw'](_0x46fc4e,_0x136678)+_0x43c04b;}return _0xdc1fee[_0x1245a7(0xc4)];}function extractClusters(_0x213e49,_0x5ea1d0){const _0x248823=_0x5e2a,_0x5b3fd4={'KewLe':function(_0x583373,_0x4cc547,_0x377a02){return _0x583373(_0x4cc547,_0x377a02);},'bANbU':function(_0x570fd9,_0x3a722f){return _0x570fd9!==_0x3a722f;},'snbex':function(_0x2831c3,_0x146ebe){return _0x2831c3+_0x146ebe;},'ycNdd':function(_0x442885,_0x52121f,_0x5dcae2){return _0x442885(_0x52121f,_0x5dcae2);},'sTmiI':function(_0x28540a,_0xa079ec){return _0x28540a+_0xa079ec;},'iDZWD':function(_0x3d1575,_0x237899,_0x962fd2){return _0x3d1575(_0x237899,_0x962fd2);},'YkmDQ':function(_0x3f6830,_0x3c69aa,_0x221067){return _0x3f6830(_0x3c69aa,_0x221067);},'zYPys':function(_0x4e9f63,_0xe11624){return _0x4e9f63===_0xe11624;},'wxffs':function(_0x201f67,_0x1da981,_0x2f3fed,_0x49b153){return _0x201f67(_0x1da981,_0x2f3fed,_0x49b153);},'uCbbl':function(_0x1e0c06,_0xd68da3){return _0x1e0c06+_0xd68da3;},'saowK':function(_0x4b58a6,_0x4dce61){return _0x4b58a6+_0x4dce61;},'kDEys':function(_0xbbea99,_0x3f640f){return _0xbbea99+_0x3f640f;},'hLxcc':function(_0x5e04a9,_0x2ccf2a){return _0x5e04a9===_0x2ccf2a;},'xUwEx':function(_0x12ba2f,_0x34bca0){return _0x12ba2f+_0x34bca0;},'hhMja':function(_0x4bafbf,_0x49f338){return _0x4bafbf<_0x49f338;},'HGwEj':function(_0x5b263a,_0x3ffffe){return _0x5b263a+_0x3ffffe;},'yHWtV':function(_0x581544,_0x27dc76){return _0x581544+_0x27dc76;}},_0x4efbcc=[],_0x2b3e85=Buffer[_0x248823(0xc0)]([0x1f,0x43,0xb6,0x75]);let _0x4f97fb=0x0;while(_0x4f97fb<_0x213e49['length']){const _0x2c50f0=_0x213e49[_0x248823(0xbc)](_0x2b3e85,_0x4f97fb);if(_0x2c50f0===-0x1)break;const [_0x34ef7d,_0x4e1925]=_0x5b3fd4['KewLe'](readId,_0x213e49,_0x2c50f0);if(_0x5b3fd4['bANbU'](_0x34ef7d,ID_CLUSTER)){_0x4f97fb=_0x5b3fd4['snbex'](_0x2c50f0,0x1);continue;}const [_0x32e0f1,_0x2be729]=_0x5b3fd4['ycNdd'](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2c50f0,_0x4e1925)),_0x2a8f8d=_0x2c50f0+_0x4e1925+_0x2be729,_0x5b6353=findClusterEnd(_0x213e49,_0x2a8f8d,_0x32e0f1,_0x2be729);let _0x2d09eb=_0x2a8f8d,_0x4f919f=0x0,_0x20b600=0x2,_0x13e97c=![],_0x1c3f30=Buffer[_0x248823(0xae)](0x0),_0x561a39=Buffer[_0x248823(0xae)](0x0);while(_0x2d09eb<_0x5b6353){const [_0x3c06c1,_0x231538]=_0x5b3fd4[_0x248823(0xec)](readId,_0x213e49,_0x2d09eb),[_0x2beb94,_0x38f741]=_0x5b3fd4[_0x248823(0xad)](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538));if(_0x5b3fd4[_0x248823(0xe2)](_0x3c06c1,ID_TIMESTAMP)){_0x4f919f=_0x5b3fd4['wxffs'](readUint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538)+_0x38f741,_0x2beb94),_0x20b600=_0x2beb94,_0x13e97c=!![],_0x1c3f30=_0x213e49[_0x248823(0xc9)](_0x2a8f8d,_0x2d09eb);const _0x46a249=_0x5b3fd4[_0x248823(0xc3)](_0x5b3fd4['saowK'](_0x5b3fd4[_0x248823(0xeb)](_0x2d09eb,_0x231538),_0x38f741),_0x2beb94);_0x561a39=_0x213e49['slice'](_0x46a249,_0x5b6353);break;}if(_0x5b3fd4['hLxcc'](_0x3c06c1,ID_CLUSTER))break;if(_0x5b3fd4['ycNdd'](isUnknownSize,_0x2beb94,_0x38f741))break;_0x2d09eb+=_0x5b3fd4['xUwEx'](_0x231538+_0x38f741,_0x2beb94);}!_0x13e97c&&(_0x561a39=_0x213e49['slice'](_0x2a8f8d,_0x5b6353));let _0x3ca7d9=_0x4f919f;_0x2d09eb=_0x2a8f8d;while(_0x5b3fd4['hhMja'](_0x2d09eb,_0x5b6353)){const [_0x56f335,_0x334b6e]=_0x5b3fd4[_0x248823(0xcb)](readId,_0x213e49,_0x2d09eb),[_0x58f867,_0x38fd7a]=readVint(_0x213e49,_0x2d09eb+_0x334b6e);if(_0x56f335===ID_SIMPLE_BLOCK&&_0x58f867>=0x4){const _0x38f9fd=_0x2d09eb+_0x334b6e+_0x38fd7a,[,_0x299396]=_0x5b3fd4[_0x248823(0xec)](readVint,_0x213e49,_0x38f9fd),_0x2cffbf=_0x213e49[_0x248823(0xd3)](_0x5b3fd4[_0x248823(0xca)](_0x38f9fd,_0x299396)),_0xab3518=_0x4f919f+_0x2cffbf;if(_0xab3518>_0x3ca7d9)_0x3ca7d9=_0xab3518;}if(_0x56f335===ID_CLUSTER)break;if(_0x5b3fd4['KewLe'](isUnknownSize,_0x58f867,_0x38fd7a))break;_0x2d09eb+=_0x5b3fd4['snbex'](_0x5b3fd4['yHWtV'](_0x334b6e,_0x38fd7a),_0x58f867);}_0x4efbcc['push']({'timestamp':_0x4f919f,'maxTicks':_0x3ca7d9,'bodyBeforeTimestamp':_0x1c3f30,'bodyAfterTimestamp':_0x561a39,'timestampElementSize':_0x20b600}),_0x4f97fb=_0x5b6353;}return _0x4efbcc;}function parseWebm(_0x3398be){const _0x443d11=_0x5e2a,_0x34d99a={'ROcRQ':function(_0x14ea3c,_0x14b32b){return _0x14ea3c+_0x14b32b;},'VALTa':function(_0x124877,_0xba12fe){return _0x124877+_0xba12fe;},'fJeDx':function(_0x6fde2b,_0x4aabd1){return _0x6fde2b+_0x4aabd1;},'exQgA':function(_0x802375,_0x2a331c){return _0x802375+_0x2a331c;},'zBBPt':function(_0x5260c6,_0x5c8554,_0x3551b2){return _0x5260c6(_0x5c8554,_0x3551b2);}};let _0xd71750=0x0;const [,_0x1d5ea8]=readId(_0x3398be,_0xd71750),[_0x2eb264,_0x49921d]=readVint(_0x3398be,_0x34d99a[_0x443d11(0xf8)](_0xd71750,_0x1d5ea8));_0xd71750+=_0x34d99a[_0x443d11(0xf8)](_0x34d99a['VALTa'](_0x1d5ea8,_0x49921d),_0x2eb264);const [_0x585753,_0x6b598e]=readId(_0x3398be,_0xd71750);if(_0x585753!==ID_SEGMENT)return null;const [,_0x53b85c]=readVint(_0x3398be,_0x34d99a['VALTa'](_0xd71750,_0x6b598e)),_0x2bf746=_0x34d99a[_0x443d11(0xb5)](_0x34d99a['exQgA'](_0xd71750,_0x6b598e),_0x53b85c),_0x3aab75=findTimestampScale(_0x3398be,_0x2bf746),_0x5bde37=findFirstClusterOffset(_0x3398be,_0x2bf746),_0x1e332a=_0x3398be['slice'](0x0,_0x5bde37),_0x133bac=_0x34d99a['zBBPt'](extractClusters,_0x3398be,_0x3aab75);let _0x50e40b=0x0;for(const _0x57161a of _0x133bac){if(_0x57161a['maxTicks']>_0x50e40b)_0x50e40b=_0x57161a['maxTicks'];}return{'header':_0x1e332a,'clusters':_0x133bac,'timestampScale':_0x3aab75,'maxTimestampTicks':_0x50e40b};}function buildCluster(_0x629e05,_0x25707b,_0x4aa074){const _0x2e1680=_0x5e2a,_0x71e163={'HLQQn':function(_0x4d7045,_0x2bde4f){return _0x4d7045(_0x2bde4f);},'wMwDQ':function(_0x15e95,_0x2730aa,_0x2bf1c5){return _0x15e95(_0x2730aa,_0x2bf1c5);}},_0x421a77=Buffer[_0x2e1680(0xc0)]([0x1f,0x43,0xb6,0x75]),_0x1b5451=Math['max'](0x4,uintSize(_0x629e05)),_0x590259=Buffer[_0x2e1680(0xe6)]([Buffer['from']([ID_TIMESTAMP]),_0x71e163[_0x2e1680(0xdf)](writeVint,_0x1b5451),_0x71e163[_0x2e1680(0xdb)](writeUint,_0x629e05,_0x1b5451)]),_0x3277e5=Buffer['concat']([_0x25707b,_0x590259,_0x4aa074]),_0xf8f7ff=writeVint(_0x3277e5[_0x2e1680(0xc4)]);return Buffer[_0x2e1680(0xe6)]([_0x421a77,_0xf8f7ff,_0x3277e5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4ec526){const _0x5c14d8=_0x5e2a,_0x35a9fb={'AXruQ':function(_0x1b290f,_0x1da736,_0x586c3c){return _0x1b290f(_0x1da736,_0x586c3c);},'wHcrj':function(_0x2dc03a,_0x1c2b87){return _0x2dc03a+_0x1c2b87;},'paEFb':function(_0x3a26a7,_0x1252e9,_0x4e0281){return _0x3a26a7(_0x1252e9,_0x4e0281);},'WzYEi':function(_0x18b8b6,_0x41e610,_0x45359f){return _0x18b8b6(_0x41e610,_0x45359f);},'eyCkA':function(_0x3c4426,_0x5e80d9){return _0x3c4426===_0x5e80d9;},'dpBrR':function(_0x3091f7,_0x1cadfb){return _0x3091f7+_0x1cadfb;},'JgPax':function(_0x1b65e1,_0x48abc6,_0xae566b){return _0x1b65e1(_0x48abc6,_0xae566b);},'ysCgk':function(_0x5731fa,_0x3a9c8a){return _0x5731fa+_0x3a9c8a;}},_0x1f18ce=Buffer[_0x5c14d8(0xc0)](_0x4ec526);let _0x331884=0x0;const [,_0x2d7ee3]=readId(_0x1f18ce,_0x331884),[_0x2d7983,_0x7a90e3]=_0x35a9fb[_0x5c14d8(0xd8)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0x331884,_0x2d7ee3)),_0xf583a=_0x331884+_0x2d7ee3+_0x7a90e3+_0x2d7983,[,_0x340644]=_0x35a9fb[_0x5c14d8(0xd8)](readId,_0x1f18ce,_0xf583a),[,_0x1d74d0]=_0x35a9fb[_0x5c14d8(0xbe)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0xf583a,_0x340644)),_0x264a95=_0xf583a+_0x340644+_0x1d74d0,_0xeeeebe=writeUnknownSizeVint(_0x1d74d0);_0xeeeebe[_0x5c14d8(0xd9)](_0x1f18ce,_0xf583a+_0x340644);let _0x3d0365=_0x264a95;const _0x5e6c05=Math['min'](_0x1f18ce[_0x5c14d8(0xc4)],_0x35a9fb['wHcrj'](_0x264a95,0x2710));while(_0x3d0365<_0x5e6c05){const [_0x180fe5,_0x4830d1]=readId(_0x1f18ce,_0x3d0365),[_0x12001f,_0x91713e]=_0x35a9fb[_0x5c14d8(0xe8)](readVint,_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb4)](_0x3d0365,_0x4830d1));if(_0x180fe5===ID_CLUSTER)break;if(_0x35a9fb['WzYEi'](isUnknownSize,_0x12001f,_0x91713e))break;if(_0x35a9fb[_0x5c14d8(0xd4)](_0x180fe5,ID_INFO)){const _0x111877=_0x35a9fb['dpBrR'](_0x3d0365+_0x4830d1,_0x91713e),_0x936158=_0x35a9fb[_0x5c14d8(0xb4)](_0x111877,_0x12001f),_0x4c3f4f=[];let _0x22eb4b=_0x111877;while(_0x22eb4b<_0x936158){const [_0x5bc2d2,_0x4b5ee9]=_0x35a9fb[_0x5c14d8(0xba)](readId,_0x1f18ce,_0x22eb4b),[_0x34caaa,_0xd42ded]=readVint(_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb9)](_0x22eb4b,_0x4b5ee9)),_0x31413d=_0x35a9fb[_0x5c14d8(0xb7)](_0x4b5ee9+_0xd42ded,_0x34caaa);_0x5bc2d2!==ID_DURATION&&_0x4c3f4f['push'](_0x1f18ce['slice'](_0x22eb4b,_0x35a9fb['wHcrj'](_0x22eb4b,_0x31413d))),_0x22eb4b+=_0x31413d;}const _0x1e0b1a=Buffer['concat'](_0x4c3f4f),_0x4932a0=Buffer[_0x5c14d8(0xe6)]([_0x1f18ce[_0x5c14d8(0xc9)](_0x3d0365,_0x3d0365+_0x4830d1),_0x35a9fb[_0x5c14d8(0xd8)](writeVint,_0x1e0b1a[_0x5c14d8(0xc4)],_0x91713e)]);return Buffer[_0x5c14d8(0xe6)]([_0x1f18ce['slice'](0x0,_0x3d0365),_0x4932a0,_0x1e0b1a,_0x1f18ce['slice'](_0x936158)]);}_0x3d0365+=_0x35a9fb[_0x5c14d8(0xb9)](_0x35a9fb[_0x5c14d8(0xb7)](_0x4830d1,_0x91713e),_0x12001f);}return _0x1f18ce;}export function stitchWebmFiles(_0x325650,_0x32b4c0){const _0x154e40=_0x5e2a,_0x37f1b8={'AqVzy':function(_0xa729df,_0x1233db){return _0xa729df(_0x1233db);},'hxdOc':function(_0x3101f4,_0x3665ed){return _0x3101f4===_0x3665ed;},'Rjlah':function(_0x4171e7,_0x3e2988){return _0x4171e7(_0x3e2988);},'xEcMq':function(_0x4f8a30,_0x3cd8d0){return _0x4f8a30<_0x3cd8d0;},'jNsaB':function(_0x3d88e6,_0xeaf4fd){return _0x3d88e6+_0xeaf4fd;},'VFXVn':function(_0x3fe0cb,_0x482ea2,_0x1a7287,_0x4d2930){return _0x3fe0cb(_0x482ea2,_0x1a7287,_0x4d2930);},'rvhTq':function(_0x12638a,_0x5145c1){return _0x12638a+_0x5145c1;},'QxDwB':function(_0x1bd6e3,_0x3f508d,_0x478220){return _0x1bd6e3(_0x3f508d,_0x478220);}};if(_0x325650['length']<=0x1)return![];const _0x1b1d22=[];for(const _0x1294a5 of _0x325650){const _0x3defff=_0x37f1b8[_0x154e40(0xd7)](readFileSync,_0x1294a5),_0x361b15=_0x37f1b8[_0x154e40(0xd7)](parseWebm,_0x3defff);if(!_0x361b15||_0x37f1b8['hxdOc'](_0x361b15['clusters'][_0x154e40(0xc4)],0x0))return![];_0x1b1d22['push'](_0x361b15);}const _0x5d00ee=_0x1b1d22[0x0],_0x187660=_0x37f1b8[_0x154e40(0xe9)](rebuildHeaderWithoutDuration,_0x5d00ee[_0x154e40(0xc7)]),_0xe10358=[_0x187660];let _0x44e42d=0x0;for(let _0xd9fa6b=0x0;_0x37f1b8[_0x154e40(0xc2)](_0xd9fa6b,_0x1b1d22['length']);_0xd9fa6b++){const _0x440aae=_0x1b1d22[_0xd9fa6b];for(const _0x28d411 of _0x440aae[_0x154e40(0xd6)]){const _0x143563=_0x37f1b8[_0x154e40(0xd2)](_0x28d411['timestamp'],_0x44e42d);_0xe10358['push'](_0x37f1b8[_0x154e40(0xaf)](buildCluster,_0x143563,_0x28d411['bodyBeforeTimestamp'],_0x28d411[_0x154e40(0xe7)]));}const _0x1f875a=0x1e;_0x44e42d+=_0x37f1b8['rvhTq'](_0x440aae[_0x154e40(0xbd)],_0x1f875a);}return _0x37f1b8['QxDwB'](writeFileSync,_0x32b4c0,Buffer['concat'](_0xe10358)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x35ece4(0xc5))||process['argv'][0x1]?.[_0x35ece4(0xcc)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x35ece4(0xc4)]<0x3&&(console[_0x35ece4(0xde)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x35ece4(0xcd)](0x1));const output=args[args['length']-0x1],inputs=args[_0x35ece4(0xc9)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x35ece4(0xef)+inputs['length']+_0x35ece4(0xf5)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|