@ranger-testing/ranger-cli 3.1.5-alpha.aebd071-49 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x9914d4,_0x59f887){const _0x2ea050=_0x1bd3,_0x12519c=_0x9914d4();while(!![]){try{const _0x24854f=-parseInt(_0x2ea050(0x184))/0x1+-parseInt(_0x2ea050(0x173))/0x2*(-parseInt(_0x2ea050(0x15b))/0x3)+-parseInt(_0x2ea050(0x14a))/0x4+-parseInt(_0x2ea050(0x154))/0x5*(parseInt(_0x2ea050(0x178))/0x6)+parseInt(_0x2ea050(0x161))/0x7*(parseInt(_0x2ea050(0x179))/0x8)+parseInt(_0x2ea050(0x14d))/0x9+-parseInt(_0x2ea050(0x180))/0xa;if(_0x24854f===_0x59f887)break;else _0x12519c['push'](_0x12519c['shift']());}catch(_0x5508a4){_0x12519c['push'](_0x12519c['shift']());}}}(_0x3860,0xe486d));function _0x1bd3(_0x61349c,_0x24ce6c){_0x61349c=_0x61349c-0x148;const _0x386040=_0x3860();let _0x1bd3ed=_0x386040[_0x61349c];return _0x1bd3ed;}import{existsSync}from'fs';import _0x3a472f from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x3159af){const _0x59ce15=_0x1bd3,_0x4be6f9={'mmWlq':function(_0x402668,_0x3fce59){return _0x402668(_0x3fce59);},'TMREU':function(_0xea0ff7){return _0xea0ff7();},'royxk':function(_0x1bb8ab,_0x3fd22f){return _0x1bb8ab!==_0x3fd22f;},'oaKTT':function(_0x2509f3,_0x314aa3){return _0x2509f3(_0x314aa3);},'fqbOA':function(_0x54b79d,_0x868e9a){return _0x54b79d??_0x868e9a;},'TxspL':function(_0x5ec26f,_0x450bba){return _0x5ec26f===_0x450bba;},'YKXgN':function(_0x21d3b3,_0x3de09c){return _0x21d3b3+_0x3de09c;},'fdkIB':function(_0x34478f,_0x8a6d14){return _0x34478f+_0x8a6d14;},'msinZ':_0x59ce15(0x152),'VaUhM':_0x59ce15(0x176),'RdXMK':function(_0x4a0dbb,_0x211051){return _0x4a0dbb instanceof _0x211051;},'vsHDp':function(_0x466ff2,_0x19c1fd){return _0x466ff2&&_0x19c1fd;},'fCRYA':function(_0x271dc9,_0x37c74f){return _0x271dc9+_0x37c74f;},'dpYxv':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','JVrIW':function(_0x4cfa82,_0x3d993f){return _0x4cfa82&&_0x3d993f;},'ntFEE':'source','rqJQo':'Cloud\x20profile\x20(recommended)','gMjVz':'Local\x20profile','cwbZq':function(_0x490d67,_0x342849,_0x1634ee){return _0x490d67(_0x342849,_0x1634ee);},'gycTp':function(_0x4b63c6,_0x2c3726){return _0x4b63c6(_0x2c3726);},'nxcTJ':function(_0x436f78,_0x56d1e2,_0x41098a){return _0x436f78(_0x56d1e2,_0x41098a);},'YBvzD':function(_0x2f7641,_0xd0941d){return _0x2f7641(_0xd0941d);},'ybwGj':function(_0x1dec86,_0x4d70b9){return _0x1dec86(_0x4d70b9);},'ZQEwl':function(_0x55f484,_0x2c0efe){return _0x55f484+_0x2c0efe;},'EacTz':_0x59ce15(0x16c),'asbNQ':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','sFzPC':function(_0x310467,_0x178484){return _0x310467&&_0x178484;}},_0x124aa5=_0x3159af['profile'];let _0x390a49=_0x124aa5,_0x22c5ec=null;const _0xab1744=_0x124aa5?null:await readActiveProfileName();if(_0x3159af['authEnv']&&_0x124aa5)console[_0x59ce15(0x148)]('\x20\x20Note:\x20--env\x20\x22'+_0x3159af['authEnv']+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x3159af[_0x59ce15(0x162)]&&!process[_0x59ce15(0x15e)][_0x59ce15(0x16a)]&&console['log'](_0x59ce15(0x160)+_0x3159af['authEnv']+_0x59ce15(0x169));if(!_0x124aa5&&process[_0x59ce15(0x15e)][_0x59ce15(0x16a)])try{const _0x3a594e=await _0x4be6f9['mmWlq'](resolveAdHocProfile,{'targetUrl':_0x3159af['baseUrl']??_0x4be6f9['TMREU'](readUrlEnvVars)['envBaseUrl'],'envKey':_0x3159af['authEnv']});_0x3a594e&&(_0xab1744&&_0x4be6f9[_0x59ce15(0x14e)](_0xab1744,_0x3a594e['name'])&&console[_0x59ce15(0x148)](_0x59ce15(0x185)+_0x3a594e[_0x59ce15(0x15c)]+_0x59ce15(0x171)+_0xab1744+'\x22.\x20Pass\x20--profile\x20'+_0xab1744+_0x59ce15(0x186)),_0x390a49=_0x3a594e[_0x59ce15(0x15c)],_0x22c5ec=_0x3a594e[_0x59ce15(0x18a)]);}catch(_0x3e4c98){if(!_0xab1744||_0x3159af['authEnv'])throw _0x3e4c98;console['log']('\x20\x20Warning:\x20'+(_0x3e4c98 instanceof Error?_0x3e4c98['message']:_0x4be6f9['oaKTT'](String,_0x3e4c98))),console[_0x59ce15(0x148)](_0x59ce15(0x158)+_0xab1744+'\x22.');}if(!_0x390a49)_0x390a49=_0x4be6f9[_0x59ce15(0x17e)](_0xab1744,undefined);if(!_0x390a49)try{const _0x5e748d=await listCloudProfiles();if(_0x4be6f9['TxspL'](_0x5e748d['length'],0x1)){const _0x1695c4=_0x5e748d[0x0];_0x390a49=_0x1695c4['name'],console[_0x59ce15(0x148)](_0x59ce15(0x159)+_0x1695c4['name']),console[_0x59ce15(0x148)](_0x59ce15(0x164));}}catch{}if(!_0x390a49)throw new Error(_0x4be6f9[_0x59ce15(0x150)](_0x4be6f9[_0x59ce15(0x182)](_0x4be6f9['msinZ'],_0x59ce15(0x16f))+_0x59ce15(0x157)+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a',_0x4be6f9['VaUhM']));const _0x809ad9=getEnvDir(_0x390a49),_0x381d74=_0x4be6f9[_0x59ce15(0x17c)](existsSync,_0x809ad9);let _0x197c83=_0x22c5ec,_0x277aa7=![];if(!_0x197c83)try{_0x197c83=await _0x4be6f9['mmWlq'](fetchCloudProfile,_0x390a49);if(!_0x197c83)_0x277aa7=!![];}catch(_0x7e8f0c){_0x4be6f9['RdXMK'](_0x7e8f0c,ApiError)&&_0x7e8f0c[_0x59ce15(0x189)]===0x194&&(_0x277aa7=!![]);}if(_0x4be6f9[_0x59ce15(0x14f)](_0x124aa5,_0x277aa7)&&!_0x381d74&&!_0x197c83)throw new Error(_0x4be6f9[_0x59ce15(0x182)](_0x4be6f9[_0x59ce15(0x17b)]('Profile\x20\x22'+_0x124aa5+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x59ce15(0x15f)),_0x4be6f9[_0x59ce15(0x155)]));if(_0x4be6f9[_0x59ce15(0x163)](_0x197c83,_0x381d74)){let _0x1cac70=!![];if(isInteractive()){const {source:_0x263236}=await _0x3a472f[_0x59ce15(0x165)]([{'type':_0x59ce15(0x17a),'name':_0x4be6f9['ntFEE'],'message':_0x59ce15(0x15d)+_0x390a49+_0x59ce15(0x16e),'choices':[{'name':_0x4be6f9['rqJQo'],'value':_0x59ce15(0x170)},{'name':_0x4be6f9['gMjVz'],'value':'local'}],'default':_0x59ce15(0x170)}]);_0x1cac70=_0x263236==='cloud';}if(!_0x1cac70)_0x197c83=null;}const _0x356c38=_0x4be6f9['cwbZq'](readProfileOverrides,process['cwd'](),_0x390a49);let _0x2ff84c=null,_0x11775a,_0x27d64e,_0x873606,_0x5e9439,_0x4bf740=null,_0x37f4ee,_0x5a8615;const _0x131b2e=_0x4be6f9['gycTp'](expandOverrides,_0x356c38),_0x3f5308=readUrlEnvVars();if(_0x197c83){_0x2ff84c=_0x197c83;const _0x108e8e=_0x197c83['settings']??{},_0x1d140f=_0x4be6f9['nxcTJ'](mergeCloudProfileSettings,_0x108e8e,_0x4be6f9[_0x59ce15(0x17e)](_0x356c38,undefined)),_0x10fa2b={..._0x197c83,'settings':_0x1d140f};_0x4bf740={'baseUrl':_0x4be6f9['gycTp'](expandString,_0x108e8e['baseUrl']),'startPath':_0x4be6f9['YBvzD'](expandString,_0x108e8e['startPath'])};const _0x1d1416=await fetchAuthConfig(),_0x1391c7=_0x1d1416?_0x4be6f9['cwbZq'](resolveAuthEnvironmentLocally,_0x1d1416,_0x197c83['environmentKey']):null;_0x37f4ee=_0x1391c7?.['domains']?.[0x0],_0x5a8615=_0x1391c7?.[_0x59ce15(0x14c)];const _0x3621d7=_0x4be6f9['oaKTT'](resolveProfileUrl,{'flagBaseUrl':_0x3159af[_0x59ce15(0x177)],'flagStartPath':_0x3159af[_0x59ce15(0x16b)],'envBaseUrl':_0x3f5308[_0x59ce15(0x166)],'envStartPath':_0x3f5308['envStartPath'],'projectOverrides':_0x131b2e,'cloudSettings':_0x4bf740,'authEnvironmentDomain':_0x37f4ee}),_0x5a7319=process[_0x59ce15(0x15e)]['RANGER_SESSION_STATE_PATH'];if(_0x5a7319){if(!_0x4be6f9[_0x59ce15(0x149)](existsSync,_0x5a7319))throw new Error(_0x59ce15(0x181)+_0x5a7319+_0x59ce15(0x14b));_0x11775a=_0x5a7319,_0x27d64e=resolveEnvVars(_0x1d140f),_0x873606=Boolean(_0x27d64e[_0x59ce15(0x17d)]);}else{const _0x339085=await resolveCloudProfileSession(_0x10fa2b,{'effectiveBaseUrl':_0x3621d7[_0x59ce15(0x177)],'telemetry':_0x3159af[_0x59ce15(0x15a)]});_0x11775a=_0x339085['authPath'],_0x27d64e=resolveEnvVars(_0x339085['settings']),_0x873606=Boolean(_0x27d64e[_0x59ce15(0x17d)]),_0x37f4ee=_0x339085['resolvedEnv']?.[_0x59ce15(0x16d)]?.[0x0],_0x5a8615=_0x339085[_0x59ce15(0x187)]?.['key'];}}else{if(!_0x381d74){const _0x6c28d1=!_0x124aa5;throw new Error(_0x6c28d1?_0x4be6f9[_0x59ce15(0x167)]('Active\x20profile\x20\x22'+_0x390a49+_0x59ce15(0x156),_0x4be6f9['EacTz'])+_0x4be6f9['asbNQ']+(_0x59ce15(0x175)+_0x390a49+'`\x20to\x20recreate\x20it.'):_0x59ce15(0x15d)+_0x390a49+_0x59ce15(0x153)+_0x390a49);}const _0x2d3a53=await loadSettings(_0x390a49);_0x27d64e=resolveEnvVars(_0x2d3a53),_0x873606=_0x4be6f9[_0x59ce15(0x151)](Boolean,_0x27d64e['cdpEndpoint']),_0x5e9439=_0x27d64e[_0x59ce15(0x177)];}const _0xc60699=resolveProfileUrl({'flagBaseUrl':_0x3159af['baseUrl'],'flagStartPath':_0x3159af[_0x59ce15(0x16b)],'envBaseUrl':_0x3f5308[_0x59ce15(0x166)],'envStartPath':_0x3f5308[_0x59ce15(0x17f)],'localSettingsBaseUrl':_0x5e9439,'projectOverrides':_0x131b2e,'cloudSettings':_0x4bf740,'authEnvironmentDomain':_0x37f4ee}),_0x2d535a=_0xc60699[_0x59ce15(0x174)]??_0xc60699[_0x59ce15(0x177)];if(_0x4be6f9[_0x59ce15(0x168)](!_0x2d535a,!_0x873606))throw new Error(_0x59ce15(0x172)+_0x390a49+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x390a49+'\x20baseUrl\x20<url>');return{'activeProfile':_0x390a49,'resolvedCloudProfile':_0x2ff84c,'cloudAuthPath':_0x11775a,'resolvedSettings':_0x27d64e,'isCdpMode':_0x873606,'url':_0x2d535a,'baseUrlSource':_0xc60699['baseUrlSource'],'authEnvKey':_0x5a8615,'startPath':_0xc60699[_0x59ce15(0x16b)]};}function _0x3860(){const _0x35cfd7=['ybwGj','4315340BVwNwp','\x20does\x20not\x20exist.','key','11712195GwhOQR','royxk','vsHDp','YKXgN','YBvzD','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','8205GDvwQK','dpYxv','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','telemetry','29217qzDkBM','name','Profile\x20\x22','env','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20Note:\x20--env\x20\x22','858053epENOs','authEnv','JVrIW','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','prompt','envBaseUrl','ZQEwl','sFzPC','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','RANGER_TEST_USERNAME','startPath','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','domains','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','cloud','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','334TBFymi','url','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','baseUrl','1284FMolJm','88vYFJJh','list','fCRYA','oaKTT','cdpEndpoint','fqbOA','envStartPath','18588120bDXMpm','RANGER_SESSION_STATE_PATH=','fdkIB','npuwK','51271vlHqaf','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','\x20to\x20override.','resolvedEnv','CNJzG','status','profile','log'];_0x3860=function(){return _0x35cfd7;};return _0x3860();}function expandString(_0x161fe2){const _0x1ad454={'yELXg':function(_0x37328b,_0x4b145e){return _0x37328b(_0x4b145e);}};if(typeof _0x161fe2!=='string')return _0x161fe2;return _0x1ad454['yELXg'](resolveEnvVars,_0x161fe2);}function expandOverrides(_0x37bca8){const _0x13de88=_0x1bd3,_0x1205ef={'popoS':function(_0x4e264e,_0x5578b0){return _0x4e264e===_0x5578b0;},'CNJzG':'string','npuwK':function(_0x36ec51,_0x10c3ae){return _0x36ec51(_0x10c3ae);},'eZiMH':function(_0xc275fe,_0x2e14cf){return _0xc275fe(_0x2e14cf);}};if(!_0x37bca8)return _0x37bca8;const _0x351249={..._0x37bca8};return _0x1205ef['popoS'](typeof _0x351249['baseUrl'],_0x1205ef[_0x13de88(0x188)])&&(_0x351249['baseUrl']=_0x1205ef[_0x13de88(0x183)](resolveEnvVars,_0x351249['baseUrl'])),_0x1205ef['popoS'](typeof _0x351249['startPath'],'string')&&(_0x351249[_0x13de88(0x16b)]=_0x1205ef['eZiMH'](resolveEnvVars,_0x351249['startPath'])),_0x351249;}
|
|
1
|
+
(function(_0x1e5a54,_0x2056f8){const _0x5e17ec=_0x49b4,_0x102813=_0x1e5a54();while(!![]){try{const _0x1d733=parseInt(_0x5e17ec(0x8d))/0x1+-parseInt(_0x5e17ec(0xb6))/0x2*(-parseInt(_0x5e17ec(0xab))/0x3)+-parseInt(_0x5e17ec(0xad))/0x4+parseInt(_0x5e17ec(0xb5))/0x5*(parseInt(_0x5e17ec(0x7c))/0x6)+parseInt(_0x5e17ec(0xb4))/0x7+parseInt(_0x5e17ec(0x73))/0x8+-parseInt(_0x5e17ec(0x97))/0x9;if(_0x1d733===_0x2056f8)break;else _0x102813['push'](_0x102813['shift']());}catch(_0xfa443){_0x102813['push'](_0x102813['shift']());}}}(_0x19e4,0x88876));function _0x19e4(){const _0xf0c03f=['resolvedEnv','figbT','uiQlV','RANGER_SESSION_STATE_PATH=','2124138hbzlBy','iCofa','2668436ZSabBq','message','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','key','Profile\x20\x22','lunKt','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','2963478OlAInW','2214755VPzLZM','2flEkwI','skDSY','VDUwf','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','7867392JOekYS','`\x20to\x20recreate\x20it.','FEcat','\x22.\x20Pass\x20--profile\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','name','\x20\x20Note:\x20--env\x20\x22','local','UcbQd','6UkYIQU','startPath','env','BNYRy','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','source','telemetry','aWqDf','ZmzYG','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','log','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','prompt','authEnv','\x20does\x20not\x20exist.','gehWY','baseUrl','1084124HuheUM','list','kYhSY','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','`ranger\x20profile\x20add`\x20to\x20create\x20one.','envBaseUrl','settings','envStartPath','domains','21740112RSbhdq','KZnRu','laEcA','UGQpP','ySFwh','\x20to\x20override.','KNHuo','kYpOf','profile','RANGER_SESSION_STATE_PATH','cdpEndpoint','GWisu','environmentKey','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','cwd','taIpE'];_0x19e4=function(){return _0xf0c03f;};return _0x19e4();}import{existsSync}from'fs';import _0x342380 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(_0x4a9cc4){const _0x4af5e0=_0x49b4,_0xfba835={'kYpOf':function(_0x5982c2){return _0x5982c2();},'UcbQd':function(_0x4b4c41){return _0x4b4c41();},'dBwum':function(_0x4b1d09,_0x38967c){return _0x4b1d09!==_0x38967c;},'BNYRy':function(_0x34c729,_0x3ade94){return _0x34c729(_0x3ade94);},'FEcat':function(_0xf1d115,_0x481ece){return _0xf1d115??_0x481ece;},'ZmzYG':function(_0x173554,_0x3828c6){return _0x173554+_0x3828c6;},'figbT':function(_0x5bf103,_0x1a156c){return _0x5bf103+_0x1a156c;},'vzxrX':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','uiQlV':_0x4af5e0(0x85),'GWisu':function(_0x3549c5,_0x4fea1f){return _0x3549c5(_0x4fea1f);},'UGQpP':function(_0x824fe8,_0xcc4866){return _0x824fe8 instanceof _0xcc4866;},'akaQH':function(_0x1dd704,_0x38f4bc){return _0x1dd704===_0x38f4bc;},'laEcA':function(_0x4a6528,_0xf5caf){return _0x4a6528+_0xf5caf;},'BRKRe':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','pgvXB':_0x4af5e0(0x92),'vprfx':function(_0x78d812,_0xef3ad5){return _0x78d812&&_0xef3ad5;},'KZnRu':'Local\x20profile','ySFwh':'cloud','zqiMW':function(_0x310386,_0x182559){return _0x310386===_0x182559;},'VDUwf':function(_0x300e42,_0x24491e,_0x4713ab){return _0x300e42(_0x24491e,_0x4713ab);},'lunKt':function(_0x54b837){return _0x54b837();},'NRZaI':function(_0x570bc3,_0x10e68e){return _0x570bc3(_0x10e68e);},'skDSY':function(_0x2f6b47,_0xf575b8){return _0x2f6b47(_0xf575b8);},'gehWY':function(_0x24d1b5,_0x295d8c){return _0x24d1b5+_0x295d8c;},'KNHuo':function(_0x564e60,_0x18fc61){return _0x564e60+_0x18fc61;},'taIpE':_0x4af5e0(0xb3),'EmjyP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'},_0x3d477b=_0x4a9cc4['profile'];let _0x299215=_0x3d477b,_0x1fa216=null;const _0xa87349=_0x3d477b?null:await _0xfba835[_0x4af5e0(0x9e)](readActiveProfileName);if(_0x4a9cc4['authEnv']&&_0x3d477b)console['log'](_0x4af5e0(0x79)+_0x4a9cc4[_0x4af5e0(0x89)]+_0x4af5e0(0x80));else _0x4a9cc4['authEnv']&&!process['env']['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x4a9cc4['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x3d477b&&process[_0x4af5e0(0x7e)]['RANGER_TEST_USERNAME'])try{const _0x531a27=await resolveAdHocProfile({'targetUrl':_0x4a9cc4[_0x4af5e0(0x8c)]??_0xfba835[_0x4af5e0(0x7b)](readUrlEnvVars)[_0x4af5e0(0x93)],'envKey':_0x4a9cc4['authEnv']});_0x531a27&&(_0xa87349&&_0xfba835['dBwum'](_0xa87349,_0x531a27[_0x4af5e0(0x78)])&&console[_0x4af5e0(0x86)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x531a27[_0x4af5e0(0x78)]+_0x4af5e0(0x72)+_0xa87349+_0x4af5e0(0x76)+_0xa87349+_0x4af5e0(0x9c)),_0x299215=_0x531a27[_0x4af5e0(0x78)],_0x1fa216=_0x531a27[_0x4af5e0(0x9f)]);}catch(_0xc83beb){if(!_0xa87349||_0x4a9cc4['authEnv'])throw _0xc83beb;console[_0x4af5e0(0x86)]('\x20\x20Warning:\x20'+(_0xc83beb instanceof Error?_0xc83beb[_0x4af5e0(0xae)]:_0xfba835[_0x4af5e0(0x7f)](String,_0xc83beb))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0xa87349+'\x22.');}if(!_0x299215)_0x299215=_0xfba835[_0x4af5e0(0x75)](_0xa87349,undefined);if(!_0x299215)try{const _0x30d411=await _0xfba835['UcbQd'](listCloudProfiles);if(_0x30d411['length']===0x1){const _0x5ef5ad=_0x30d411[0x0];_0x299215=_0x5ef5ad[_0x4af5e0(0x78)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x5ef5ad['name']),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x299215)throw new Error(_0xfba835[_0x4af5e0(0x84)](_0xfba835['ZmzYG'](_0xfba835[_0x4af5e0(0xa8)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x4af5e0(0x87))+_0xfba835['vzxrX'],_0xfba835[_0x4af5e0(0xa9)]),_0x4af5e0(0x77)));const _0x40b66e=_0xfba835[_0x4af5e0(0x7f)](getEnvDir,_0x299215),_0x5616ff=existsSync(_0x40b66e);let _0x4c31f2=_0x1fa216,_0x4dbb11=![];if(!_0x4c31f2)try{_0x4c31f2=await _0xfba835[_0x4af5e0(0xa2)](fetchCloudProfile,_0x299215);if(!_0x4c31f2)_0x4dbb11=!![];}catch(_0x4dc75b){_0xfba835[_0x4af5e0(0x9a)](_0x4dc75b,ApiError)&&_0xfba835['akaQH'](_0x4dc75b['status'],0x194)&&(_0x4dbb11=!![]);}if(_0x3d477b&&_0x4dbb11&&!_0x5616ff&&!_0x4c31f2)throw new Error(_0xfba835[_0x4af5e0(0x99)](_0x4af5e0(0xb1)+_0x3d477b+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0xfba835['BRKRe'])+_0xfba835['pgvXB']);if(_0xfba835['vprfx'](_0x4c31f2,_0x5616ff)){let _0x34777b=!![];if(isInteractive()){const {source:_0x298139}=await _0x342380[_0x4af5e0(0x88)]([{'type':_0x4af5e0(0x8e),'name':_0x4af5e0(0x81),'message':_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xa4),'choices':[{'name':'Cloud\x20profile\x20(recommended)','value':'cloud'},{'name':_0xfba835[_0x4af5e0(0x98)],'value':_0x4af5e0(0x7a)}],'default':_0xfba835[_0x4af5e0(0x9b)]}]);_0x34777b=_0xfba835['zqiMW'](_0x298139,_0xfba835[_0x4af5e0(0x9b)]);}if(!_0x34777b)_0x4c31f2=null;}const _0x27ee23=_0xfba835['VDUwf'](readProfileOverrides,process[_0x4af5e0(0xa5)](),_0x299215);let _0x35c1db=null,_0x177fd8,_0x2a8aa6,_0x32c6ba,_0x50c664,_0xe5dd3d=null,_0x289428,_0x5dafb3;const _0x4c4e89=_0xfba835[_0x4af5e0(0x7f)](expandOverrides,_0x27ee23),_0x145af6=_0xfba835[_0x4af5e0(0xb2)](readUrlEnvVars);if(_0x4c31f2){_0x35c1db=_0x4c31f2;const _0x447037=_0x4c31f2[_0x4af5e0(0x94)]??{},_0x511d5d=_0xfba835['VDUwf'](mergeCloudProfileSettings,_0x447037,_0x27ee23??undefined),_0x3df357={..._0x4c31f2,'settings':_0x511d5d};_0xe5dd3d={'baseUrl':_0xfba835[_0x4af5e0(0x7f)](expandString,_0x447037[_0x4af5e0(0x8c)]),'startPath':_0xfba835[_0x4af5e0(0xa2)](expandString,_0x447037[_0x4af5e0(0x7d)])};const _0x547697=await _0xfba835['UcbQd'](fetchAuthConfig),_0x551f80=_0x547697?resolveAuthEnvironmentLocally(_0x547697,_0x4c31f2[_0x4af5e0(0xa3)]):null;_0x289428=_0x551f80?.['domains']?.[0x0],_0x5dafb3=_0x551f80?.[_0x4af5e0(0xb0)];const _0x5551bf=_0xfba835[_0x4af5e0(0x7f)](resolveProfileUrl,{'flagBaseUrl':_0x4a9cc4[_0x4af5e0(0x8c)],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6[_0x4af5e0(0x95)],'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x50c640=process[_0x4af5e0(0x7e)][_0x4af5e0(0xa0)];if(_0x50c640){if(!_0xfba835[_0x4af5e0(0x7f)](existsSync,_0x50c640))throw new Error(_0x4af5e0(0xaa)+_0x50c640+_0x4af5e0(0x8a));_0x177fd8=_0x50c640,_0x2a8aa6=_0xfba835['NRZaI'](resolveEnvVars,_0x511d5d),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']);}else{const _0x2f0b44=await _0xfba835[_0x4af5e0(0xb8)](resolveCloudProfileSession,_0x3df357,{'effectiveBaseUrl':_0x5551bf[_0x4af5e0(0x8c)],'telemetry':_0x4a9cc4[_0x4af5e0(0x82)]});_0x177fd8=_0x2f0b44['authPath'],_0x2a8aa6=_0xfba835[_0x4af5e0(0xb7)](resolveEnvVars,_0x2f0b44[_0x4af5e0(0x94)]),_0x32c6ba=Boolean(_0x2a8aa6[_0x4af5e0(0xa1)]),_0x289428=_0x2f0b44['resolvedEnv']?.[_0x4af5e0(0x96)]?.[0x0],_0x5dafb3=_0x2f0b44[_0x4af5e0(0xa7)]?.['key'];}}else{if(!_0x5616ff){const _0x1a5eb7=!_0x3d477b;throw new Error(_0x1a5eb7?_0xfba835['gehWY'](_0xfba835[_0x4af5e0(0x8b)](_0xfba835[_0x4af5e0(0x9d)]('Active\x20profile\x20\x22'+_0x299215+_0x4af5e0(0x91),_0xfba835[_0x4af5e0(0xa6)]),_0xfba835['EmjyP']),_0x4af5e0(0x90)+_0x299215+_0x4af5e0(0x74)):_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xaf)+_0x299215);}const _0x2c0a93=await loadSettings(_0x299215);_0x2a8aa6=_0xfba835['BNYRy'](resolveEnvVars,_0x2c0a93),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']),_0x50c664=_0x2a8aa6['baseUrl'];}const _0x55f3fa=resolveProfileUrl({'flagBaseUrl':_0x4a9cc4['baseUrl'],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6['envStartPath'],'localSettingsBaseUrl':_0x50c664,'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x19c06c=_0x55f3fa['url']??_0x55f3fa['baseUrl'];if(!_0x19c06c&&!_0x32c6ba)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x299215+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x299215+'\x20baseUrl\x20<url>');return{'activeProfile':_0x299215,'resolvedCloudProfile':_0x35c1db,'cloudAuthPath':_0x177fd8,'resolvedSettings':_0x2a8aa6,'isCdpMode':_0x32c6ba,'url':_0x19c06c,'baseUrlSource':_0x55f3fa['baseUrlSource'],'authEnvKey':_0x5dafb3,'startPath':_0x55f3fa['startPath']};}function expandString(_0x1642f1){if(typeof _0x1642f1!=='string')return _0x1642f1;return resolveEnvVars(_0x1642f1);}function _0x49b4(_0x4632d4,_0x4a89a7){_0x4632d4=_0x4632d4-0x72;const _0x19e465=_0x19e4();let _0x49b467=_0x19e465[_0x4632d4];return _0x49b467;}function expandOverrides(_0xf9f49b){const _0x46efd8=_0x49b4,_0x2aaed5={'kYhSY':function(_0x2a999d,_0x2c9a58){return _0x2a999d===_0x2c9a58;},'iCofa':'string','aWqDf':function(_0x247c78,_0x3f8209){return _0x247c78(_0x3f8209);}};if(!_0xf9f49b)return _0xf9f49b;const _0xcc1765={..._0xf9f49b};return _0x2aaed5[_0x46efd8(0x8f)](typeof _0xcc1765[_0x46efd8(0x8c)],_0x2aaed5[_0x46efd8(0xac)])&&(_0xcc1765['baseUrl']=resolveEnvVars(_0xcc1765[_0x46efd8(0x8c)])),typeof _0xcc1765[_0x46efd8(0x7d)]==='string'&&(_0xcc1765[_0x46efd8(0x7d)]=_0x2aaed5[_0x46efd8(0x83)](resolveEnvVars,_0xcc1765['startPath'])),_0xcc1765;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x4dd675=_0x574a;function _0x574a(_0x5638a8,_0x52fdf4){_0x5638a8=_0x5638a8-0xd2;const _0x16d28b=_0x16d2();let _0x574a07=_0x16d28b[_0x5638a8];return _0x574a07;}(function(_0x54dd2b,_0x5d1fc8){const _0x403598=_0x574a,_0x287691=_0x54dd2b();while(!![]){try{const _0x4e902d=parseInt(_0x403598(0xe6))/0x1*(parseInt(_0x403598(0xea))/0x2)+parseInt(_0x403598(0xf3))/0x3*(parseInt(_0x403598(0xe3))/0x4)+-parseInt(_0x403598(0xeb))/0x5*(parseInt(_0x403598(0xd8))/0x6)+parseInt(_0x403598(0xda))/0x7+parseInt(_0x403598(0xed))/0x8*(-parseInt(_0x403598(0xe5))/0x9)+-parseInt(_0x403598(0xf1))/0xa*(parseInt(_0x403598(0xdf))/0xb)+-parseInt(_0x403598(0xef))/0xc;if(_0x4e902d===_0x5d1fc8)break;else _0x287691['push'](_0x287691['shift']());}catch(_0x150611){_0x287691['push'](_0x287691['shift']());}}}(_0x16d2,0x9e622));function firstDefined(..._0x49d6cf){const _0x1533e7=_0x574a,_0x5df547={'zMRvO':function(_0x479163,_0xd3cd7c){return _0x479163!==_0xd3cd7c;}};for(const _0x1b7a54 of _0x49d6cf){if(_0x5df547[_0x1533e7(0xd3)](_0x1b7a54,undefined)&&_0x1b7a54!==null&&_0x1b7a54!=='')return _0x1b7a54;}return undefined;}function normalizeAuthEnvironmentDomain(_0x1ea877){const _0x164f33=_0x574a;if(!_0x1ea877)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x164f33(0xe2)](_0x1ea877))return _0x1ea877;return'https://'+_0x1ea877;}export function resolveBaseUrlWithSource(_0x200de7){const _0x142a90=_0x574a,_0xc6883e={'xqDjM':'RANGER_BASE_URL','obEPE':function(_0x3f9e36,_0x427ef7){return _0x3f9e36!==_0x427ef7;}},_0x5d5a79=_0x200de7[_0x142a90(0xd9)],_0xaceab6=!!_0x5d5a79&&_0x142a90(0xee)in _0x5d5a79,_0x456a6e=_0x5d5a79?.['baseUrl'],_0x5c70fe=!(_0xaceab6&&_0x456a6e===null),_0x200367=[[_0x200de7[_0x142a90(0xde)],_0x142a90(0xd7)],[_0x200de7['envBaseUrl'],_0xc6883e[_0x142a90(0xf5)]],[_0x200de7['localSettingsBaseUrl'],_0x142a90(0xe0)],[typeof _0x456a6e===_0x142a90(0xec)?_0x456a6e:undefined,_0x142a90(0xdc)],[_0x5c70fe?_0x200de7[_0x142a90(0xe7)]?.[_0x142a90(0xee)]:undefined,'cloud\x20profile\x20settings'],[_0x5c70fe?normalizeAuthEnvironmentDomain(_0x200de7[_0x142a90(0xd4)]):undefined,'auth\x20environment\x20domain']];for(const [_0x4b1814,_0x17ac65]of _0x200367){if(_0xc6883e[_0x142a90(0xd2)](_0x4b1814,undefined)&&_0x4b1814!==null&&_0x4b1814!=='')return{'baseUrl':_0x4b1814,'source':_0x17ac65};}return{};}export function resolveBaseUrl(_0x487f86){const _0x442f7f=_0x574a,_0x683520={'MwThK':function(_0xa520f0,_0x5b185c){return _0xa520f0(_0x5b185c);}};return _0x683520['MwThK'](resolveBaseUrlWithSource,_0x487f86)[_0x442f7f(0xee)];}export function resolveStartPath(_0x1a438d){const _0x573a62=_0x574a,_0x45603a={'GEfim':function(_0x3b8bf5,_0x3b0728){return _0x3b8bf5 in _0x3b0728;},'vIIAk':'startPath','bWlHn':function(_0x299a28,_0x44d521){return _0x299a28===_0x44d521;},'tqrqS':function(_0x5ebed0,_0x1f0e76,_0x2a077b,_0x3efce8,_0x2ad991){return _0x5ebed0(_0x1f0e76,_0x2a077b,_0x3efce8,_0x2ad991);},'JYczF':'string'},_0x1b40f2=_0x1a438d[_0x573a62(0xd9)],_0x3926c0=!!_0x1b40f2&&_0x45603a[_0x573a62(0xe4)](_0x45603a[_0x573a62(0xdd)],_0x1b40f2),_0x11ceab=_0x1b40f2?.[_0x573a62(0xd6)],_0x54e16e=!(_0x3926c0&&_0x45603a[_0x573a62(0xdb)](_0x11ceab,null));return _0x45603a[_0x573a62(0xf4)](firstDefined,_0x1a438d[_0x573a62(0xd5)],_0x1a438d['envStartPath'],_0x45603a[_0x573a62(0xdb)](typeof _0x11ceab,_0x45603a['JYczF'])?_0x11ceab:undefined,_0x54e16e?_0x1a438d[_0x573a62(0xe7)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x5a2a7f,_0x2c2d12){const _0xb288bc=_0x574a,_0x5b8272={'pAoPw':function(_0x18c7ea,_0x593287){return _0x18c7ea+_0x593287;}};if(!_0x5a2a7f)return undefined;if(!_0x2c2d12)return _0x5a2a7f;const _0x4a7e93=_0x5a2a7f['endsWith']('/')?_0x5a2a7f[_0xb288bc(0xe8)](0x0,-0x1):_0x5a2a7f,_0x4affb7=_0x2c2d12[_0xb288bc(0xe1)]('/')?_0x2c2d12:_0x5b8272['pAoPw']('/',_0x2c2d12);return _0x4a7e93+_0x4affb7;}export function resolveProfileUrl(_0x2bfad9){const _0x559298=_0x574a,_0x51dda4={'RalUZ':function(_0x2a149a,_0x23c29d){return _0x2a149a(_0x23c29d);},'HIrzz':function(_0x1fa4d1,_0x4efe22,_0x1b7545){return _0x1fa4d1(_0x4efe22,_0x1b7545);}},{baseUrl:_0x47496f,source:_0x3945b3}=_0x51dda4[_0x559298(0xf0)](resolveBaseUrlWithSource,_0x2bfad9),_0x4a37fe=_0x51dda4['RalUZ'](resolveStartPath,_0x2bfad9);return{'baseUrl':_0x47496f,'baseUrlSource':_0x3945b3,'startPath':_0x4a37fe,'url':_0x51dda4['HIrzz'](joinBaseAndPath,_0x47496f,_0x4a37fe)};}export function readUrlEnvVars(_0x3ad2dc=process[_0x4dd675(0xe9)]){const _0x4e99b8=_0x4dd675;return{'envBaseUrl':_0x3ad2dc[_0x4e99b8(0xf2)],'envStartPath':_0x3ad2dc['RANGER_START_PATH']};}function _0x16d2(){const _0x358f38=['xqDjM','obEPE','zMRvO','authEnvironmentDomain','flagStartPath','startPath','--base-url','1982814gRJHWg','projectOverrides','2732562tFvpnZ','bWlHn','projects.json\x20override','vIIAk','flagBaseUrl','294723PbTpSi','local\x20profile\x20settings','startsWith','test','4OTEEtJ','GEfim','1617867krpgea','34UyOgdf','cloudSettings','slice','env','72674jQamVQ','5zEwlLA','string','32HdPbiU','baseUrl','1148400QcEriH','RalUZ','180dwTonQ','RANGER_BASE_URL','1951227dNqvko','tqrqS'];_0x16d2=function(){return _0x358f38;};return _0x16d2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x2a76(){const _0x2b39ea=['ms...','20vXLUTw','798658GNIepC','2939015gBEvwF','13173561rFzoLa','8930496DcTHww','pow','20871dzdkZl','240TLMUcg','173376OMzZlr','baseDelayMs','1066525DqAiYN','maxRetries','error','18GrfSvf','label'];_0x2a76=function(){return _0x2b39ea;};return _0x2a76();}(function(_0x2a8213,_0x191b69){const _0x56a18f=_0x13e8,_0x54fa52=_0x2a8213();while(!![]){try{const _0x56a697=parseInt(_0x56a18f(0x91))/0x1+parseInt(_0x56a18f(0x8f))/0x2+-parseInt(_0x56a18f(0x8d))/0x3*(-parseInt(_0x56a18f(0x8e))/0x4)+parseInt(_0x56a18f(0x99))/0x5+parseInt(_0x56a18f(0x94))/0x6*(parseInt(_0x56a18f(0x98))/0x7)+parseInt(_0x56a18f(0x9b))/0x8+-parseInt(_0x56a18f(0x9a))/0x9*(parseInt(_0x56a18f(0x97))/0xa);if(_0x56a697===_0x191b69)break;else _0x54fa52['push'](_0x54fa52['shift']());}catch(_0x6ab054){_0x54fa52['push'](_0x54fa52['shift']());}}}(_0x2a76,0xa85a4));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x13e8(_0x5712df,_0x34542d){_0x5712df=_0x5712df-0x8d;const _0x2a76b8=_0x2a76();let _0x13e808=_0x2a76b8[_0x5712df];return _0x13e808;}export async function withRetry(_0x1b0a50,_0x52be9f){const _0xfe3c33=_0x13e8,_0x46ef23={'AiELO':function(_0x5ae9e8,_0x2aabe6){return _0x5ae9e8*_0x2aabe6;},'VAMiO':function(_0x45aa90,_0x590cce){return _0x45aa90+_0x590cce;}},_0x45f2d1=_0x52be9f?.[_0xfe3c33(0x92)]??DEFAULT_MAX_RETRIES,_0x15f96f=_0x52be9f?.[_0xfe3c33(0x90)]??DEFAULT_BASE_DELAY_MS;let _0x17d4a0;for(let _0x46b880=0x0;_0x46b880<=_0x45f2d1;_0x46b880++){try{return await _0x1b0a50();}catch(_0x4e1d95){_0x17d4a0=_0x4e1d95 instanceof Error?_0x4e1d95:new Error(String(_0x4e1d95));if(_0x46b880<_0x45f2d1){const _0x524273=_0x46ef23['AiELO'](_0x15f96f,Math[_0xfe3c33(0x9c)](0x2,_0x46b880));_0x52be9f?.[_0xfe3c33(0x95)]&&console[_0xfe3c33(0x93)](_0x52be9f[_0xfe3c33(0x95)]+'\x20failed\x20(attempt\x20'+_0x46ef23['VAMiO'](_0x46b880,0x1)+'/'+_0x46ef23['VAMiO'](_0x45f2d1,0x1)+'),\x20retrying\x20in\x20'+_0x524273+_0xfe3c33(0x96)),await new Promise(_0x440289=>setTimeout(_0x440289,_0x524273));}}}throw _0x17d4a0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9d8a81,_0xa28f1e){const _0x20d843=_0x17dc,_0x36803e=_0x9d8a81();while(!![]){try{const _0x1b78e1=-parseInt(_0x20d843(0x185))/0x1+-parseInt(_0x20d843(0x181))/0x2*(parseInt(_0x20d843(0x17c))/0x3)+parseInt(_0x20d843(0x17f))/0x4+parseInt(_0x20d843(0x17d))/0x5+-parseInt(_0x20d843(0x183))/0x6*(parseInt(_0x20d843(0x17b))/0x7)+parseInt(_0x20d843(0x182))/0x8+-parseInt(_0x20d843(0x184))/0x9*(-parseInt(_0x20d843(0x17e))/0xa);if(_0x1b78e1===_0xa28f1e)break;else _0x36803e['push'](_0x36803e['shift']());}catch(_0x2ef16b){_0x36803e['push'](_0x36803e['shift']());}}}(_0x1415,0x8d333));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x21c2c5){const _0x4841ec=new Set();for(const _0x31b6ff of _0x21c2c5['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x21ee75=_0x31b6ff[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x4841ec['add'](new URL(_0x21ee75)['origin']);}catch{}}return[..._0x4841ec];}function _0x17dc(_0x505090,_0x25d2e7){_0x505090=_0x505090-0x17b;const _0x1415db=_0x1415();let _0x17dc99=_0x1415db[_0x505090];return _0x17dc99;}function _0x1415(){const _0x569e05=['678304bOBTPU','origin','1876594QKauhA','8379272cwvGqV','78nfjeGV','33921FnwaFW','327193iDmVPe','filter','620137EIkmff','3RDLUOd','3936480kkmQfZ','2630HxUwCc'];_0x1415=function(){return _0x569e05;};return _0x1415();}export function findScenarioOriginMismatches(_0x4b4ae4,_0x33e8bd){const _0x476b23=_0x17dc;let _0x16120b;try{_0x16120b=new URL(_0x33e8bd)[_0x476b23(0x180)];}catch{return[];}return extractUrlOrigins(_0x4b4ae4)[_0x476b23(0x186)](_0x2c8673=>_0x2c8673!==_0x16120b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x397bde=_0x5b0d;(function(_0x5c822b,_0x49b42f){const _0x42ca1c=_0x5b0d,_0x4a2825=_0x5c822b();while(!![]){try{const _0x2f94a2=-parseInt(_0x42ca1c(0x14c))/0x1+parseInt(_0x42ca1c(0x171))/0x2+parseInt(_0x42ca1c(0x15b))/0x3*(-parseInt(_0x42ca1c(0x163))/0x4)+parseInt(_0x42ca1c(0x160))/0x5+parseInt(_0x42ca1c(0x142))/0x6+parseInt(_0x42ca1c(0x162))/0x7+parseInt(_0x42ca1c(0x147))/0x8*(-parseInt(_0x42ca1c(0x15f))/0x9);if(_0x2f94a2===_0x49b42f)break;else _0x4a2825['push'](_0x4a2825['shift']());}catch(_0x593d08){_0x4a2825['push'](_0x4a2825['shift']());}}}(_0x4d73,0x55872));import*as _0x1d78c2 from'fs';import*as _0x411c09 from'path';import*as _0x3660d3 from'os';import{execSync}from'child_process';function _0x5b0d(_0x258d8f,_0xddd432){_0x258d8f=_0x258d8f-0x13e;const _0x4d737f=_0x4d73();let _0x5b0dc1=_0x4d737f[_0x258d8f];return _0x5b0dc1;}const CACHE_FILE=_0x411c09[_0x397bde(0x15e)](_0x3660d3['homedir'](),_0x397bde(0x156),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x99eb83=_0x397bde,_0x260200={'MXRza':_0x99eb83(0x158)};try{if(_0x1d78c2[_0x99eb83(0x168)](CACHE_FILE)){const _0x4e6408=JSON['parse'](_0x1d78c2['readFileSync'](CACHE_FILE,_0x260200[_0x99eb83(0x13f)]));return{'version':0x3,'sessions':_0x4e6408[_0x99eb83(0x16c)]||{},'branches':_0x4e6408[_0x99eb83(0x16e)]||{},'lastEnabledSessionClearedAt':_0x4e6408['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x15ccfb){const _0x200c85=_0x397bde;try{const _0xd55b52=_0x411c09['dirname'](CACHE_FILE);!_0x1d78c2['existsSync'](_0xd55b52)&&_0x1d78c2[_0x200c85(0x167)](_0xd55b52,{'recursive':!![]}),_0x1d78c2['writeFileSync'](CACHE_FILE,JSON[_0x200c85(0x14f)](_0x15ccfb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x419822=_0x397bde,_0x4b81a5={'TXRGv':function(_0x2304a4,_0x513f08,_0x2a7a38){return _0x2304a4(_0x513f08,_0x2a7a38);},'HjwRb':'pipe','WLWGw':_0x419822(0x14d)};try{const _0x3ff1d6=_0x4b81a5['TXRGv'](execSync,_0x419822(0x143),{'encoding':'utf-8','stdio':[_0x4b81a5['HjwRb'],_0x4b81a5['HjwRb'],'pipe']})[_0x419822(0x13e)]();if(!_0x3ff1d6||_0x3ff1d6===_0x4b81a5[_0x419822(0x16d)])return null;return _0x3ff1d6;}catch{return null;}}export function enableBranch(_0x1ae1b9){const _0x56aa05={'zRPDP':function(_0x5d2dd0,_0x4b8202){return _0x5d2dd0(_0x4b8202);}},_0x39034c=loadCache();_0x39034c['branches'][_0x1ae1b9]=!![],_0x56aa05['zRPDP'](saveCache,_0x39034c);}export function disableBranch(_0x1d1e56){const _0x6f2cb5=_0x397bde,_0x4d0c39={'JboEJ':function(_0x45d503,_0x1e92f0){return _0x45d503(_0x1e92f0);}},_0x2f4235=loadCache();delete _0x2f4235['branches'][_0x1d1e56],_0x4d0c39[_0x6f2cb5(0x15c)](saveCache,_0x2f4235);}export function isBranchEnabled(_0x3c7f06){const _0x3b4f4b=_0x397bde,_0x4a2136={'Szfap':function(_0x2f6466){return _0x2f6466();},'HTjIA':function(_0x499b6d,_0x262216){return _0x499b6d===_0x262216;}},_0x2f67ac=_0x4a2136['Szfap'](loadCache);return _0x4a2136['HTjIA'](_0x2f67ac[_0x3b4f4b(0x16e)][_0x3c7f06],!![]);}function _0x4d73(){const _0x194105=['77596wjYlUk','LPDrm','now','fdLnB','mkdirSync','existsSync','RcEMH','oaMgr','currentBranch','sessions','WLWGw','branches','registeredAt','SIhSJ','1067552knoSkj','trim','MXRza','yAxtf','nASjB','2345418wcrXxD','git\x20rev-parse\x20--abbrev-ref\x20HEAD','featureId','enabled','jEhOJ','480JPsuDg','main','gJJUD','lastPlanReminderAt','lastStopReminderAt','582206WXetXZ','HEAD','cnFbi','stringify','FXrRF','bXqmU','toISOString','icfBZ','prompted','master','.claude','lastEnabledSessionClearedAt','utf-8','WHzTS','QYdsG','42kLFLhM','JboEJ','kxjYG','join','30411ZrLGln','1824370VVsdUq','iFXDy','821107bpmFXE'];_0x4d73=function(){return _0x194105;};return _0x4d73();}function getOrCreateSession(_0x8c22d4,_0x4b70c6){return!_0x8c22d4['sessions'][_0x4b70c6]&&(_0x8c22d4['sessions'][_0x4b70c6]={}),_0x8c22d4['sessions'][_0x4b70c6];}export function enableSession(_0x45aa7a){const _0x34bbd1=_0x397bde,_0x12dc31={'fdLnB':function(_0x29a42c,_0x12c5ca,_0x596568){return _0x29a42c(_0x12c5ca,_0x596568);},'RcEMH':function(_0x1be75e){return _0x1be75e();},'cnFbi':function(_0x387d1e,_0xf2ae84){return _0x387d1e(_0xf2ae84);}},_0x3a1d84=loadCache(),_0x2e7682=_0x12dc31[_0x34bbd1(0x166)](getOrCreateSession,_0x3a1d84,_0x45aa7a);_0x2e7682['enabled']=!![];const _0x1bcdd3=_0x12dc31[_0x34bbd1(0x169)](getCurrentBranch);_0x1bcdd3&&_0x1bcdd3!==_0x34bbd1(0x148)&&_0x1bcdd3!=='master'&&(_0x3a1d84[_0x34bbd1(0x16e)][_0x1bcdd3]=!![],_0x2e7682['currentBranch']=_0x1bcdd3),_0x12dc31[_0x34bbd1(0x14e)](saveCache,_0x3a1d84);}export function isSessionEnabled(_0x3606c4){const _0x19dde9=_0x397bde,_0x3caf05={'FXrRF':function(_0x138c75){return _0x138c75();},'SIhSJ':function(_0x4c6bea){return _0x4c6bea();},'bkCTL':function(_0x2ce076,_0x5d6dd9){return _0x2ce076===_0x5d6dd9;},'uBbQN':'master','yWAhk':function(_0x1fa3d4,_0xcba275){return _0x1fa3d4===_0xcba275;}},_0x553a2f=_0x3caf05[_0x19dde9(0x150)](loadCache),_0x2913c6=_0x3caf05[_0x19dde9(0x170)](getCurrentBranch);if(!_0x2913c6||_0x2913c6===_0x19dde9(0x148)||_0x3caf05['bkCTL'](_0x2913c6,_0x3caf05['uBbQN']))return _0x553a2f['sessions'][_0x3606c4]?.[_0x19dde9(0x145)]===!![];const _0x29b393=_0x553a2f[_0x19dde9(0x16e)][_0x2913c6]===!![],_0x244e47=_0x3caf05['yWAhk'](_0x553a2f[_0x19dde9(0x16c)][_0x3606c4]?.['enabled'],!![]);return _0x29b393||_0x244e47;}export function disableSession(_0x3cf630){const _0x326883={'xKWYP':function(_0x5f4914,_0x5d92e6,_0x260de0){return _0x5f4914(_0x5d92e6,_0x260de0);},'wwPQX':function(_0x31763e,_0x4d0cbb){return _0x31763e(_0x4d0cbb);}},_0x531d62=loadCache(),_0x5bc2cc=_0x326883['xKWYP'](getOrCreateSession,_0x531d62,_0x3cf630);_0x5bc2cc['enabled']=![],_0x326883['wwPQX'](saveCache,_0x531d62);}export function updateBranchTracking(_0x3f52ab){const _0x72fca0=_0x397bde,_0x22faf9={'jEhOJ':function(_0x57279c){return _0x57279c();},'yAxtf':function(_0x688cb0){return _0x688cb0();},'uIoLQ':function(_0x1cf610,_0x4b59dc){return _0x1cf610===_0x4b59dc;},'kxjYG':function(_0x75a95a,_0x18bad4){return _0x75a95a===_0x18bad4;},'ubFmN':'master'},_0x3f0738=_0x22faf9[_0x72fca0(0x146)](loadCache),_0x1c6549=_0x3f0738[_0x72fca0(0x16c)][_0x3f52ab];if(!_0x1c6549?.['enabled'])return;const _0x2d7029=_0x22faf9[_0x72fca0(0x140)](getCurrentBranch);if(!_0x2d7029||_0x22faf9['uIoLQ'](_0x2d7029,'main')||_0x22faf9[_0x72fca0(0x15d)](_0x2d7029,_0x22faf9['ubFmN']))return;_0x1c6549[_0x72fca0(0x16b)]!==_0x2d7029&&(_0x3f0738['branches'][_0x2d7029]=!![],_0x1c6549[_0x72fca0(0x16b)]=_0x2d7029,saveCache(_0x3f0738));}export function initBranchTracking(_0x3eacf4){const _0x67b1ee=_0x397bde,_0x5c212f={'bXqmU':function(_0x2751f4){return _0x2751f4();},'LPDrm':function(_0x2f27a1,_0x1b82a3){return _0x2f27a1===_0x1b82a3;},'gJJUD':function(_0x5d4b63,_0x3e80b1,_0x27fd26){return _0x5d4b63(_0x3e80b1,_0x27fd26);}},_0x48fdd3=loadCache(),_0x276875=_0x5c212f[_0x67b1ee(0x151)](getCurrentBranch);if(!_0x276875||_0x5c212f[_0x67b1ee(0x164)](_0x276875,'main')||_0x276875==='master')return;if(_0x48fdd3[_0x67b1ee(0x16e)][_0x276875]===!![]){const _0x3c32b7=_0x5c212f[_0x67b1ee(0x149)](getOrCreateSession,_0x48fdd3,_0x3eacf4);_0x3c32b7[_0x67b1ee(0x145)]=!![],_0x3c32b7['currentBranch']=_0x276875,saveCache(_0x48fdd3);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5a166a){const _0x199039=_0x397bde,_0x447320=loadCache(),_0xfff95b=_0x447320['sessions'][_0x5a166a];_0xfff95b?.['enabled']&&(_0x447320['lastEnabledSessionClearedAt']=Date[_0x199039(0x165)](),saveCache(_0x447320));}export function shouldAutoEnableAfterClear(_0x2efb26){const _0x5a2433=_0x397bde,_0xb8f754={'icfBZ':function(_0x4eb4c0,_0x24869e){return _0x4eb4c0!==_0x24869e;},'glvrN':'clear','oaMgr':function(_0x2550c7,_0x4cf108){return _0x2550c7-_0x4cf108;},'nASjB':function(_0x548761,_0x4c326b){return _0x548761<=_0x4c326b;}};if(_0xb8f754[_0x5a2433(0x153)](_0x2efb26,_0xb8f754['glvrN']))return![];const _0x37dd07=loadCache(),_0xafa036=_0x37dd07[_0x5a2433(0x157)];if(!_0xafa036)return![];const _0xd5dd5d=_0xb8f754[_0x5a2433(0x16a)](Date[_0x5a2433(0x165)](),_0xafa036);return _0xb8f754[_0x5a2433(0x141)](_0xd5dd5d,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0xdc7851){const _0x3bda77=_0x397bde,_0x245b0f={'qkDNZ':function(_0x555c07){return _0x555c07();},'WHzTS':'main','NGYMQ':function(_0xf2e957,_0x534537){return _0xf2e957!==_0x534537;}},_0xde6f78=_0x245b0f['qkDNZ'](loadCache),_0x1e27b0=getOrCreateSession(_0xde6f78,_0xdc7851);_0x1e27b0['enabled']=!![];const _0x6b5ee2=getCurrentBranch();_0x6b5ee2&&_0x6b5ee2!==_0x245b0f[_0x3bda77(0x159)]&&_0x245b0f['NGYMQ'](_0x6b5ee2,_0x3bda77(0x155))&&(_0x1e27b0['currentBranch']=_0x6b5ee2),delete _0xde6f78['lastEnabledSessionClearedAt'],saveCache(_0xde6f78);}export function registerSession(_0xb00542,_0x33fdc6){const _0x4fc86f=_0x397bde,_0x26b3a3={'eFhWb':function(_0x570d65,_0x3d44c8){return _0x570d65(_0x3d44c8);}},_0x1b0690=loadCache(),_0x3afd46=getOrCreateSession(_0x1b0690,_0xb00542);_0x3afd46[_0x4fc86f(0x144)]=_0x33fdc6,_0x3afd46['registeredAt']=new Date()[_0x4fc86f(0x152)](),_0x26b3a3['eFhWb'](saveCache,_0x1b0690);}export function getSessionEntry(_0x510526){const _0x2b09f1=_0x397bde,_0x484bec=loadCache(),_0x48fe9c=_0x484bec['sessions'][_0x510526];if(_0x48fe9c?.['featureId']&&_0x48fe9c?.[_0x2b09f1(0x16f)])return{'featureId':_0x48fe9c[_0x2b09f1(0x144)],'registeredAt':_0x48fe9c[_0x2b09f1(0x16f)]};return null;}export function unregisterSession(_0x37abce){const _0x308eca=_0x397bde,_0x4cecfc=loadCache(),_0xd15943=_0x4cecfc[_0x308eca(0x16c)][_0x37abce];_0xd15943&&(delete _0xd15943['featureId'],delete _0xd15943['registeredAt'],saveCache(_0x4cecfc));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xce4c63){const _0x110784=_0x397bde,_0x21d46e={'yzywo':function(_0x20b613){return _0x20b613();},'xjOmd':function(_0x27b455,_0x307e60){return _0x27b455-_0x307e60;},'QYdsG':function(_0xdeb7d6,_0x2a6d39){return _0xdeb7d6(_0x2a6d39);}},_0x2bd13c=_0x21d46e['yzywo'](loadCache),_0x576b46=getOrCreateSession(_0x2bd13c,_0xce4c63),_0x26a5de=_0x576b46['lastPlanReminderAt']||0x0,_0x469930=Date['now']();if(_0x21d46e['xjOmd'](_0x469930,_0x26a5de)>=PLAN_REMINDER_INTERVAL_MS)return _0x576b46[_0x110784(0x14a)]=_0x469930,_0x21d46e[_0x110784(0x15a)](saveCache,_0x2bd13c),!![];return![];}export function shouldShowStopReminder(_0x4e23af){const _0x5a4fae=_0x397bde,_0x168aff={'jbEgm':function(_0x55ba79,_0x3e3e6c,_0x2a0baf){return _0x55ba79(_0x3e3e6c,_0x2a0baf);},'ZieJE':function(_0x1fe827,_0x3a6f7b){return _0x1fe827-_0x3a6f7b;}},_0x5c893b=loadCache(),_0x4f1ec6=_0x168aff['jbEgm'](getOrCreateSession,_0x5c893b,_0x4e23af),_0x5b4abe=_0x4f1ec6[_0x5a4fae(0x14b)]||0x0,_0x5ec2d6=Date['now']();if(_0x168aff['ZieJE'](_0x5ec2d6,_0x5b4abe)>=STOP_REMINDER_INTERVAL_MS)return _0x4f1ec6[_0x5a4fae(0x14b)]=_0x5ec2d6,saveCache(_0x5c893b),!![];return![];}export function hasSessionBeenPrompted(_0x29c3e8){const _0x5f3c36=_0x397bde,_0x5587ef={'iFXDy':function(_0x1368b8){return _0x1368b8();}},_0x380d2b=_0x5587ef[_0x5f3c36(0x161)](loadCache);return _0x380d2b[_0x5f3c36(0x16c)][_0x29c3e8]?.[_0x5f3c36(0x154)]===!![];}export function markSessionPrompted(_0x5f225e){const _0x1d27d0=_0x397bde,_0x3670ec=loadCache(),_0x577994=getOrCreateSession(_0x3670ec,_0x5f225e);_0x577994[_0x1d27d0(0x154)]=!![],saveCache(_0x3670ec);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x337bee=_0x2ff3;(function(_0x588893,_0x197fdc){const _0x241ad1=_0x2ff3,_0x596e9d=_0x588893();while(!![]){try{const _0x57cc91=parseInt(_0x241ad1(0x16a))/0x1*(parseInt(_0x241ad1(0x153))/0x2)+parseInt(_0x241ad1(0x16e))/0x3*(-parseInt(_0x241ad1(0x162))/0x4)+-parseInt(_0x241ad1(0x157))/0x5+parseInt(_0x241ad1(0x15c))/0x6+parseInt(_0x241ad1(0x167))/0x7+-parseInt(_0x241ad1(0x17b))/0x8*(-parseInt(_0x241ad1(0x15a))/0x9)+parseInt(_0x241ad1(0x166))/0xa;if(_0x57cc91===_0x197fdc)break;else _0x596e9d['push'](_0x596e9d['shift']());}catch(_0x41202a){_0x596e9d['push'](_0x596e9d['shift']());}}}(_0x2324,0x935f3));import*as _0x4d3a0f from'fs';import*as _0x2932e1 from'path';import*as _0x34da45 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x2932e1['join'](_0x34da45[_0x337bee(0x152)](),'.claude',_0x337bee(0x177));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x14c7b6=_0x337bee,_0x1179e1={'bEUpE':'utf-8'};try{if(_0x4d3a0f['existsSync'](CACHE_FILE)){const _0x3d0680=JSON[_0x14c7b6(0x170)](_0x4d3a0f['readFileSync'](CACHE_FILE,_0x1179e1[_0x14c7b6(0x172)]));return{'version':0x3,'sessions':_0x3d0680['sessions']||{},'branches':_0x3d0680[_0x14c7b6(0x174)]||{},'lastEnabledSessionClearedAt':_0x3d0680['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x55e880){const _0x28accc=_0x337bee;try{const _0x56b86c=_0x2932e1[_0x28accc(0x16d)](CACHE_FILE);!_0x4d3a0f[_0x28accc(0x175)](_0x56b86c)&&_0x4d3a0f[_0x28accc(0x171)](_0x56b86c,{'recursive':!![]}),_0x4d3a0f[_0x28accc(0x161)](CACHE_FILE,JSON[_0x28accc(0x14b)](_0x55e880,null,0x2));}catch{}}export function getCurrentBranch(){const _0xb13b63=_0x337bee,_0x2f8f1e={'ShKrB':_0xb13b63(0x14a),'qSPXh':_0xb13b63(0x148),'aqkyO':'pipe','MXlpn':'HEAD'};try{const _0x2e5001=execSync(_0x2f8f1e[_0xb13b63(0x17a)],{'encoding':_0x2f8f1e[_0xb13b63(0x164)],'stdio':[_0xb13b63(0x149),'pipe',_0x2f8f1e['aqkyO']]})[_0xb13b63(0x15b)]();if(!_0x2e5001||_0x2e5001===_0x2f8f1e[_0xb13b63(0x17f)])return null;return _0x2e5001;}catch{return null;}}function _0x2ff3(_0x5c638f,_0x3e7aa6){_0x5c638f=_0x5c638f-0x148;const _0x2324f7=_0x2324();let _0x2ff32a=_0x2324f7[_0x5c638f];return _0x2ff32a;}export function enableBranch(_0x17f8d3){const _0x317667=_0x337bee,_0x407e58=loadCache();_0x407e58[_0x317667(0x174)][_0x17f8d3]=!![],saveCache(_0x407e58);}export function disableBranch(_0x166f28){const _0x178b1f=loadCache();delete _0x178b1f['branches'][_0x166f28],saveCache(_0x178b1f);}export function isBranchEnabled(_0x297c90){const _0x20585b=_0x337bee,_0x323f0c={'WnFCL':function(_0x5179ca){return _0x5179ca();}},_0x31a465=_0x323f0c['WnFCL'](loadCache);return _0x31a465[_0x20585b(0x174)][_0x297c90]===!![];}function getOrCreateSession(_0x285057,_0x24020b){return!_0x285057['sessions'][_0x24020b]&&(_0x285057['sessions'][_0x24020b]={}),_0x285057['sessions'][_0x24020b];}export function enableSession(_0x35613c){const _0x4d6025=_0x337bee,_0x1167c3={'zkola':'main'},_0x362d4a=loadCache(),_0x2570e7=getOrCreateSession(_0x362d4a,_0x35613c);_0x2570e7[_0x4d6025(0x15d)]=!![];const _0x41db83=getCurrentBranch();_0x41db83&&_0x41db83!==_0x1167c3[_0x4d6025(0x16c)]&&_0x41db83!=='master'&&(_0x362d4a['branches'][_0x41db83]=!![],_0x2570e7[_0x4d6025(0x158)]=_0x41db83),saveCache(_0x362d4a);}export function isSessionEnabled(_0x397032){const _0x129e02=_0x337bee,_0x2d4bed={'psxYN':function(_0x34cf88){return _0x34cf88();},'cyGmS':function(_0xf942e3,_0xe3e98d){return _0xf942e3===_0xe3e98d;},'rcora':function(_0x211aa7,_0x355f46){return _0x211aa7===_0x355f46;}},_0x179325=loadCache(),_0x3aaaff=_0x2d4bed[_0x129e02(0x160)](getCurrentBranch);if(!_0x3aaaff||_0x2d4bed['cyGmS'](_0x3aaaff,'main')||_0x2d4bed[_0x129e02(0x17d)](_0x3aaaff,_0x129e02(0x16f)))return _0x179325['sessions'][_0x397032]?.['enabled']===!![];const _0x178111=_0x2d4bed['cyGmS'](_0x179325[_0x129e02(0x174)][_0x3aaaff],!![]),_0x31d3dc=_0x179325[_0x129e02(0x14e)][_0x397032]?.[_0x129e02(0x15d)]===!![];return _0x178111||_0x31d3dc;}export function disableSession(_0x1bb4e7){const _0x4cbb74=loadCache(),_0x463e3f=getOrCreateSession(_0x4cbb74,_0x1bb4e7);_0x463e3f['enabled']=![],saveCache(_0x4cbb74);}export function updateBranchTracking(_0x4534c4){const _0x3354d1=_0x337bee,_0x41cb36={'SUDpO':_0x3354d1(0x16f)},_0x337143=loadCache(),_0x13939a=_0x337143[_0x3354d1(0x14e)][_0x4534c4];if(!_0x13939a?.[_0x3354d1(0x15d)])return;const _0x1088c7=getCurrentBranch();if(!_0x1088c7||_0x1088c7==='main'||_0x1088c7===_0x41cb36[_0x3354d1(0x178)])return;_0x13939a['currentBranch']!==_0x1088c7&&(_0x337143['branches'][_0x1088c7]=!![],_0x13939a[_0x3354d1(0x158)]=_0x1088c7,saveCache(_0x337143));}export function initBranchTracking(_0x47090c){const _0x2df4c6=_0x337bee,_0x76c435={'fWdHN':function(_0x28b07d){return _0x28b07d();},'WRmaN':function(_0x3be3be,_0x14667d){return _0x3be3be===_0x14667d;},'ptrbD':_0x2df4c6(0x165),'HAhcs':'master','nhVgd':function(_0x367ef0,_0x3921b0){return _0x367ef0(_0x3921b0);}},_0xd7d99c=_0x76c435['fWdHN'](loadCache),_0x291bf4=_0x76c435['fWdHN'](getCurrentBranch);if(!_0x291bf4||_0x76c435[_0x2df4c6(0x168)](_0x291bf4,_0x76c435[_0x2df4c6(0x163)])||_0x291bf4===_0x76c435['HAhcs'])return;if(_0xd7d99c[_0x2df4c6(0x174)][_0x291bf4]===!![]){const _0x4eb647=getOrCreateSession(_0xd7d99c,_0x47090c);_0x4eb647[_0x2df4c6(0x15d)]=!![],_0x4eb647[_0x2df4c6(0x158)]=_0x291bf4,_0x76c435['nhVgd'](saveCache,_0xd7d99c);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x2324(){const _0x1f728c=['bvtoF','sessions','lastPlanReminderAt','registeredAt','Cindk','homedir','2476KjmoSb','oywyn','dTHhZ','leqCj','4691040sJiatl','currentBranch','tCwWi','3696885TkDCKz','trim','3697512chLrNA','enabled','ebZha','zZiAE','psxYN','writeFileSync','4PxlFDt','ptrbD','qSPXh','main','159840ZlIBue','3531003AahCfU','WRmaN','toISOString','5UCnYWK','featureId','zkola','dirname','35331GsvMRj','master','parse','mkdirSync','bEUpE','lastStopReminderAt','branches','existsSync','uAcVm','.ranger_cache.json','SUDpO','SBKZS','ShKrB','8JquWWV','now','rcora','jBKcS','MXlpn','utf-8','pipe','git\x20rev-parse\x20--abbrev-ref\x20HEAD','stringify','lastEnabledSessionClearedAt'];_0x2324=function(){return _0x1f728c;};return _0x2324();}export function recordEnabledSessionCleared(_0x1f9ee0){const _0x1bbad9=_0x337bee,_0x21a1b3=loadCache(),_0xf37bc4=_0x21a1b3[_0x1bbad9(0x14e)][_0x1f9ee0];_0xf37bc4?.['enabled']&&(_0x21a1b3['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x21a1b3));}export function shouldAutoEnableAfterClear(_0x38332f){const _0x479e01=_0x337bee,_0x49db1f={'dkvTX':function(_0x4c36a6,_0x39f8cc){return _0x4c36a6!==_0x39f8cc;},'dTHhZ':'clear','leqCj':function(_0x31d151){return _0x31d151();},'oywyn':function(_0x50933d,_0x115266){return _0x50933d-_0x115266;}};if(_0x49db1f['dkvTX'](_0x38332f,_0x49db1f[_0x479e01(0x155)]))return![];const _0x26f9c3=_0x49db1f[_0x479e01(0x156)](loadCache),_0x291efe=_0x26f9c3[_0x479e01(0x14c)];if(!_0x291efe)return![];const _0x20882f=_0x49db1f[_0x479e01(0x154)](Date['now'](),_0x291efe);return _0x20882f<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x224611){const _0x465ae3=_0x337bee,_0x4b54dc={'uAcVm':function(_0x2a1fe1){return _0x2a1fe1();},'zZiAE':function(_0x1c8d06,_0x16601e){return _0x1c8d06!==_0x16601e;},'ebZha':'master'},_0x2fea11=_0x4b54dc[_0x465ae3(0x176)](loadCache),_0x1b8922=getOrCreateSession(_0x2fea11,_0x224611);_0x1b8922[_0x465ae3(0x15d)]=!![];const _0x28e884=getCurrentBranch();_0x28e884&&_0x4b54dc['zZiAE'](_0x28e884,_0x465ae3(0x165))&&_0x4b54dc[_0x465ae3(0x15f)](_0x28e884,_0x4b54dc[_0x465ae3(0x15e)])&&(_0x1b8922[_0x465ae3(0x158)]=_0x28e884),delete _0x2fea11[_0x465ae3(0x14c)],saveCache(_0x2fea11);}export function registerSession(_0x4cb0a4,_0x58bac2){const _0x4f20fb=_0x337bee,_0x109464={'oSlrT':function(_0x175001,_0x2f7703){return _0x175001(_0x2f7703);}},_0xe73d39=loadCache(),_0x5d39a6=getOrCreateSession(_0xe73d39,_0x4cb0a4);_0x5d39a6[_0x4f20fb(0x16b)]=_0x58bac2,_0x5d39a6['registeredAt']=new Date()[_0x4f20fb(0x169)](),_0x109464['oSlrT'](saveCache,_0xe73d39);}export function getSessionEntry(_0x56c902){const _0x30594d=_0x337bee,_0x2c68b7=loadCache(),_0xf50004=_0x2c68b7['sessions'][_0x56c902];if(_0xf50004?.[_0x30594d(0x16b)]&&_0xf50004?.[_0x30594d(0x150)])return{'featureId':_0xf50004[_0x30594d(0x16b)],'registeredAt':_0xf50004[_0x30594d(0x150)]};return null;}export function unregisterSession(_0x37a628){const _0x4ad663=_0x337bee,_0x80fb2b={'Pnaod':function(_0x1bee0e,_0x537691){return _0x1bee0e(_0x537691);}},_0x44857c=loadCache(),_0x49e57b=_0x44857c['sessions'][_0x37a628];_0x49e57b&&(delete _0x49e57b[_0x4ad663(0x16b)],delete _0x49e57b[_0x4ad663(0x150)],_0x80fb2b['Pnaod'](saveCache,_0x44857c));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3e67d0){const _0x215b12=_0x337bee,_0x1a8ca8={'wDqVp':function(_0xc6b656){return _0xc6b656();},'mZNGS':function(_0x4c6ac9,_0x5a9dc1,_0x2b8032){return _0x4c6ac9(_0x5a9dc1,_0x2b8032);},'tCwWi':function(_0x4a466e,_0x5e0900){return _0x4a466e-_0x5e0900;},'jBKcS':function(_0x2dfafb,_0x460590){return _0x2dfafb(_0x460590);}},_0x36f475=_0x1a8ca8['wDqVp'](loadCache),_0x210650=_0x1a8ca8['mZNGS'](getOrCreateSession,_0x36f475,_0x3e67d0),_0xd647f7=_0x210650[_0x215b12(0x14f)]||0x0,_0x1c7218=Date[_0x215b12(0x17c)]();if(_0x1a8ca8[_0x215b12(0x159)](_0x1c7218,_0xd647f7)>=PLAN_REMINDER_INTERVAL_MS)return _0x210650['lastPlanReminderAt']=_0x1c7218,_0x1a8ca8[_0x215b12(0x17e)](saveCache,_0x36f475),!![];return![];}export function shouldShowStopReminder(_0x465146){const _0x229a47=_0x337bee,_0x38a58f={'SBKZS':function(_0x3055d5,_0x3df9c2){return _0x3055d5>=_0x3df9c2;},'Cindk':function(_0x3ecdf3,_0x2a7d42){return _0x3ecdf3-_0x2a7d42;},'CWQIT':function(_0x46dcca,_0x1e25f1){return _0x46dcca(_0x1e25f1);}},_0x3a322c=loadCache(),_0x422008=getOrCreateSession(_0x3a322c,_0x465146),_0x33c8c3=_0x422008[_0x229a47(0x173)]||0x0,_0x49372c=Date[_0x229a47(0x17c)]();if(_0x38a58f[_0x229a47(0x179)](_0x38a58f[_0x229a47(0x151)](_0x49372c,_0x33c8c3),STOP_REMINDER_INTERVAL_MS))return _0x422008['lastStopReminderAt']=_0x49372c,_0x38a58f['CWQIT'](saveCache,_0x3a322c),!![];return![];}export function hasSessionBeenPrompted(_0x3d89c8){const _0x187120=_0x337bee,_0x6adb5e={'bvtoF':function(_0x2fdcd9,_0x4f9ced){return _0x2fdcd9===_0x4f9ced;}},_0x839955=loadCache();return _0x6adb5e[_0x187120(0x14d)](_0x839955[_0x187120(0x14e)][_0x3d89c8]?.['prompted'],!![]);}export function markSessionPrompted(_0x5599e6){const _0x565476={'iaRmj':function(_0x1b81f8,_0x33d5ba,_0x35f22c){return _0x1b81f8(_0x33d5ba,_0x35f22c);}},_0x2addb2=loadCache(),_0x3c8d80=_0x565476['iaRmj'](getOrCreateSession,_0x2addb2,_0x5599e6);_0x3c8d80['prompted']=!![],saveCache(_0x2addb2);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x50ffde=_0x16ef;function _0x16ef(_0x46bc75,_0x14b911){_0x46bc75=_0x46bc75-0x168;const _0x227b94=_0x227b();let _0x16efde=_0x227b94[_0x46bc75];return _0x16efde;}(function(_0x24e58e,_0x531f97){const _0x4387d9=_0x16ef,_0x201b9f=_0x24e58e();while(!![]){try{const _0x1c0f3c=parseInt(_0x4387d9(0x1bb))/0x1+parseInt(_0x4387d9(0x198))/0x2*(parseInt(_0x4387d9(0x1c2))/0x3)+-parseInt(_0x4387d9(0x1e5))/0x4*(-parseInt(_0x4387d9(0x1c6))/0x5)+-parseInt(_0x4387d9(0x177))/0x6+-parseInt(_0x4387d9(0x169))/0x7*(parseInt(_0x4387d9(0x1c9))/0x8)+-parseInt(_0x4387d9(0x1b0))/0x9*(parseInt(_0x4387d9(0x19d))/0xa)+parseInt(_0x4387d9(0x1d8))/0xb;if(_0x1c0f3c===_0x531f97)break;else _0x201b9f['push'](_0x201b9f['shift']());}catch(_0x16b50c){_0x201b9f['push'](_0x201b9f['shift']());}}}(_0x227b,0x45a77));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x26a593,_0x59f881){const _0x963bbd=_0x16ef,_0x577822={'nKdFy':function(_0x120c9d,_0x21b5fe,_0x4c81b7,_0x504274){return _0x120c9d(_0x21b5fe,_0x4c81b7,_0x504274);},'iApHf':'local','xcORf':function(_0x2e36c0,_0x307a28,_0x20ded3){return _0x2e36c0(_0x307a28,_0x20ded3);},'PELSs':function(_0x2042c6,_0x1b47b3,_0x553f87){return _0x2042c6(_0x1b47b3,_0x553f87);},'AvvBi':function(_0x22b726,_0x468ba9,_0x126fc3){return _0x22b726(_0x468ba9,_0x126fc3);},'bQpJd':function(_0x5504e6,_0x44722c){return _0x5504e6(_0x44722c);}},_0x5c4835=join(_0x59f881,'ci',_0x26a593),_0x2cd59f=_0x577822['nKdFy'](join,_0x59f881,_0x577822['iApHf'],_0x26a593),_0x131b4b=_0x577822['xcORf'](join,_0x59f881,_0x26a593),_0x3c75de=_0x577822[_0x963bbd(0x1b2)](join,_0x59f881,_0x577822['iApHf']),_0x46c201=_0x577822['AvvBi'](join,_0x59f881,'ci');if(existsSync(_0x5c4835))return _0x5c4835;if(_0x577822['bQpJd'](existsSync,_0x2cd59f))return _0x2cd59f;if(_0x577822['bQpJd'](existsSync,_0x131b4b)&&(_0x131b4b!==_0x3c75de&&_0x131b4b!==_0x46c201?!![]:hasLegacyProfileFiles(_0x131b4b)))return _0x131b4b;return null;}export function getEnvDir(_0x20e20a,_0x560d90={}){const _0x3299b6=_0x16ef,_0x53fbdb={'jxuqa':function(_0x3ddfaf){return _0x3ddfaf();},'cIjLg':function(_0x55dbf0,_0x4eb8be){return _0x55dbf0(_0x4eb8be);},'JDtPm':function(_0x1cc7a0,_0x2b1d13){return _0x1cc7a0!==_0x2b1d13;},'yWkjZ':function(_0x598466,_0x33ffa9,_0x2b6c27){return _0x598466(_0x33ffa9,_0x2b6c27);}},_0x51a809=_0x53fbdb['jxuqa'](getRangerDir),_0x5e4f9b=findEnvInRoot(_0x20e20a,_0x51a809);if(_0x5e4f9b){if(_0x560d90[_0x3299b6(0x1e0)]&&_0x53fbdb[_0x3299b6(0x1a6)](isLegacyEnvPath,_0x5e4f9b))throw legacyWriteError(_0x20e20a,_0x5e4f9b);return _0x5e4f9b;}const _0x1b8378=_0x53fbdb[_0x3299b6(0x1cf)](getRangerHomeDir);if(_0x53fbdb['JDtPm'](_0x1b8378,_0x51a809)){const _0x5d4ee0=findEnvInRoot(_0x20e20a,_0x1b8378);if(_0x5d4ee0){if(_0x560d90['forWrite']&&_0x53fbdb['cIjLg'](isLegacyEnvPath,_0x5d4ee0))throw _0x53fbdb[_0x3299b6(0x1cd)](legacyWriteError,_0x20e20a,_0x5d4ee0);return _0x5d4ee0;}}const _0x26efed=join(_0x1b8378,'local',_0x20e20a);if(_0x560d90[_0x3299b6(0x1e0)])throw _0x53fbdb[_0x3299b6(0x1cd)](legacyWriteError,_0x20e20a,_0x26efed);return _0x26efed;}function _0x227b(){const _0x14197c=['qbAcS','entries','HCuXc','rangerDir','cIjLg','executablePath','YUNnu','message','filter','string','vTRTj','includes','fromEntries','VdKlq','45wiaSlW','clipboard-read','PELSs','qJdVM','playwright-cli','gWifA','--allow-insecure-localhost','catch','headless','ZSqis','lVzIj','126395KNBFLE','kwrbx','ranger-auth-','JZYGd','ZrZZO','AFSsa','KLUhH','99unSQlo','.json','now','location','275jRXgyz','LqmTM','--allow-running-insecure-content','552HUpCVc','wqszQ','ENOENT','cdpEndpoint','yWkjZ','VcWqV','jxuqa','args','WQONc','WHoNP','storageState','extraHTTPHeaders','vGNxm','zixvx','tempAuthPath','2616812pnoRwW','Spxlz','WWyLf','ignoreHTTPSErrors','-cli','dXLNA','TGhYI','--no-sandbox','forWrite','isArray','lMKOr','zkdYI','legacy','33836JmCZfN','HpCQG','setupHeaders','vtDKp','install','storageStatePath','map','safeMode','CzZAV','vision','browser','userAgent','48062AUPwgy','parse','EPAyu','MhjMR','launchOptions','pSMjV','rDhCE','--disable-web-security','olAZA','LsENF','path','allow','stagehand','getuid','449280iqNAOS','headers','WUJCQ','dMJmG','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','contextOptions','riWLi','\x20is\x20not\x20set','locations','auedo','setupHeader','smNgG','tNnjZ','MwKsE','-rangerwright.json','JZnKq','WJpJb','HAdCe','chromium','length','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','repeat','CbJyC','--disable-setuid-sandbox','pESoR','EBMxi','env','boolean','hhIXF','startsWith','stringify','nova-user-data','file','3930biwQNG','UsuLj','Caqym','auth.json.enc','settings.json','120880Ccaevu','--disable-features=WebBluetooth','local','UKuSH','fqOPw'];_0x227b=function(){return _0x14197c;};return _0x227b();}function isLegacyEnvPath(_0x5017e8){const _0x134ea6=_0x16ef,_0x5e395d={'TGhYI':function(_0x55778b){return _0x55778b();},'riWLi':function(_0x149fcf,_0x3b44de){return _0x149fcf+_0x3b44de;},'YUNnu':function(_0x4d39f7,_0x3d84a7){return _0x4d39f7===_0x3d84a7;}},_0x3d690f=_0x5e395d[_0x134ea6(0x1de)](getRangerDir),_0x35a4bd=getRangerHomeDir();for(const _0x1776ce of new Set([_0x3d690f,_0x35a4bd])){const _0x2d935f=_0x1776ce['endsWith']('/')?_0x1776ce:_0x5e395d[_0x134ea6(0x17d)](_0x1776ce,'/');if(_0x5e395d[_0x134ea6(0x1a8)](_0x5017e8,_0x1776ce)||_0x5017e8[_0x134ea6(0x194)](_0x2d935f))return!![];}return![];}function legacyWriteError(_0x4a038c,_0x3fa76b){const _0x37ccfa=_0x16ef,_0x1e4f4d={'yBmIk':function(_0x2150f3,_0x243b6f){return _0x2150f3+_0x243b6f;}};return new Error(_0x1e4f4d['yBmIk']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x4a038c+'\x22\x20to\x20legacy\x20path\x20'+_0x3fa76b+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x37ccfa(0x18b),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x13155b,_0x12e42e){const _0x377a7c=_0x16ef,_0x2d555c={'jdjdZ':function(_0xf71908){return _0xf71908();},'olAZA':'legacy','fqOPw':function(_0x34f546,_0xb3c52e,_0xb16e2c){return _0x34f546(_0xb3c52e,_0xb16e2c);},'UKuSH':function(_0x236110,_0x281513,_0x1c3740,_0x51653f){return _0x236110(_0x281513,_0x1c3740,_0x51653f);},'dMJmG':_0x377a7c(0x19f),'jSXLz':function(_0x1ce4ca,_0xf41b92){return _0x1ce4ca(_0xf41b92);},'lTWtd':function(_0x5bd337,_0x3c2a2e){return _0x5bd337===_0x3c2a2e;},'Ioxay':function(_0xbd9c9b,_0xddf775){return _0xbd9c9b===_0xddf775;}},_0x11c449=_0x12e42e?.[_0x377a7c(0x1a5)],_0x14b3f6=_0x11c449?[_0x11c449]:[_0x2d555c['jdjdZ'](getRangerDir),getRangerHomeDir()]['filter']((_0x4eed16,_0x27b0fa,_0x2ac4af)=>_0x2ac4af['indexOf'](_0x4eed16)===_0x27b0fa),_0x32742b=_0x12e42e?.[_0x377a7c(0x17f)]??['ci','local',_0x2d555c['olAZA']];for(const _0x1d21f7 of _0x14b3f6){const _0x1658df=join(_0x1d21f7,_0x377a7c(0x19f)),_0x11ef4e=_0x2d555c[_0x377a7c(0x1a1)](join,_0x1d21f7,'ci'),_0x1003d8=[{'location':'ci','path':_0x2d555c[_0x377a7c(0x1a0)](join,_0x1d21f7,'ci',_0x13155b)},{'location':_0x377a7c(0x19f),'path':join(_0x1d21f7,_0x2d555c[_0x377a7c(0x17a)],_0x13155b)},{'location':_0x377a7c(0x1e4),'path':join(_0x1d21f7,_0x13155b)}];for(const _0x190ed4 of _0x1003d8){if(_0x32742b[_0x377a7c(0x1ad)](_0x190ed4[_0x377a7c(0x1c5)])&&_0x2d555c['jSXLz'](existsSync,_0x190ed4['path'])){if(_0x190ed4['location']===_0x2d555c[_0x377a7c(0x171)]&&(_0x2d555c['lTWtd'](_0x190ed4['path'],_0x1658df)||_0x2d555c['Ioxay'](_0x190ed4['path'],_0x11ef4e))&&!_0x2d555c['jSXLz'](hasLegacyProfileFiles,_0x190ed4[_0x377a7c(0x173)]))continue;return{'path':_0x190ed4[_0x377a7c(0x173)],'location':_0x190ed4[_0x377a7c(0x1c5)]};}}}return null;}function hasLegacyProfileFiles(_0x241324){const _0x8f2e3b=_0x16ef,_0x2de6ad={'HvJgR':function(_0x2a3709,_0x4ed8b4){return _0x2a3709(_0x4ed8b4);},'yfuNT':_0x8f2e3b(0x19c),'CbJyC':function(_0x26201d,_0x38349f){return _0x26201d(_0x38349f);},'LsENF':function(_0x48d52b,_0x11abc4,_0x70aac2){return _0x48d52b(_0x11abc4,_0x70aac2);}};return _0x2de6ad['HvJgR'](existsSync,join(_0x241324,_0x2de6ad['yfuNT']))||existsSync(join(_0x241324,'auth.json'))||_0x2de6ad[_0x8f2e3b(0x18d)](existsSync,_0x2de6ad[_0x8f2e3b(0x172)](join,_0x241324,_0x8f2e3b(0x19b)));}export function isEnvCi(_0x521845){const _0x57d58d=_0x16ef,_0x23dddb={'WWevn':function(_0x544489,_0x551768){return _0x544489(_0x551768);},'XEDdu':function(_0x4b5e5e){return _0x4b5e5e();},'VcWqV':function(_0x42c1ea){return _0x42c1ea();},'XWijo':function(_0x19bcde,_0x25a8e5){return _0x19bcde!==_0x25a8e5;},'TtrgV':function(_0x4e9c5,_0x1596b6,_0x3e1e4f,_0x4001fc){return _0x4e9c5(_0x1596b6,_0x3e1e4f,_0x4001fc);}};if(_0x23dddb['WWevn'](existsSync,join(_0x23dddb['XEDdu'](getRangerDir),'ci',_0x521845)))return!![];const _0x349e0a=_0x23dddb[_0x57d58d(0x1ce)](getRangerHomeDir);if(_0x23dddb['XWijo'](_0x349e0a,_0x23dddb['VcWqV'](getRangerDir))&&existsSync(_0x23dddb['TtrgV'](join,_0x349e0a,'ci',_0x521845)))return!![];return![];}export async function cleanupTempFiles(_0x4b06b9){const _0x53f4ff=_0x16ef,_0x2e38b9=[_0x4b06b9[_0x53f4ff(0x1d7)],_0x4b06b9['configPath']]['filter'](Boolean);await Promise['all'](_0x2e38b9[_0x53f4ff(0x1eb)](_0xd20c88=>unlink(_0xd20c88)[_0x53f4ff(0x1b7)](_0x44d62d=>{const _0x5e1b88=_0x53f4ff;_0x44d62d['code']!==_0x5e1b88(0x1cb)&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0xd20c88+':',_0x44d62d[_0x5e1b88(0x1a9)]);})));}export function getSettingsPath(_0x269d2f){const _0x423342=_0x16ef,_0x11bea1={'WUJCQ':function(_0x2a1355,_0x3ec048,_0x1f34c0){return _0x2a1355(_0x3ec048,_0x1f34c0);},'UsuLj':function(_0x5d2b0b,_0x2ee71b){return _0x5d2b0b(_0x2ee71b);}};return _0x11bea1[_0x423342(0x179)](join,_0x11bea1[_0x423342(0x199)](getEnvDir,_0x269d2f),_0x423342(0x19c));}export async function loadSettings(_0x400afd){const _0xfd5d07=_0x16ef,_0x7dca12={'MhjMR':function(_0x2f2e28,_0x15bade){return _0x2f2e28(_0x15bade);},'xHizU':function(_0x171b3f,_0x3b2166,_0x52fe77){return _0x171b3f(_0x3b2166,_0x52fe77);}},_0x2de308=getSettingsPath(_0x400afd);if(!_0x7dca12[_0xfd5d07(0x16c)](existsSync,_0x2de308))return{};try{const _0xa2d52=await _0x7dca12['xHizU'](readFile,_0x2de308,'utf-8');return JSON[_0xfd5d07(0x16a)](_0xa2d52);}catch{return{};}}export async function saveSettings(_0x4d2a58,_0x18cff2){const _0x168b03=_0x16ef,_0x5cca47={'ygtAC':function(_0x193e35,_0xb32ea0){return _0x193e35(_0xb32ea0);}},_0x4a9171=_0x5cca47['ygtAC'](getSettingsPath,_0x4d2a58),_0x34e13d=dirname(_0x4a9171);!existsSync(_0x34e13d)&&await mkdir(_0x34e13d,{'recursive':!![]}),await writeFile(_0x4a9171,JSON[_0x168b03(0x195)](_0x18cff2,null,0x2));}export function resolveEnvVars(_0x506e92){const _0x4ab64f=_0x16ef,_0x40149d={'smNgG':function(_0x1b34a9,_0x848ea2){return _0x1b34a9===_0x848ea2;},'ytznA':'object'};if(typeof _0x506e92==='string')return _0x506e92['replace'](/\$\{(\w+)\}/g,(_0xfcaa66,_0x488c36)=>{const _0x568dc8=_0x16ef,_0x52f8bc=process[_0x568dc8(0x191)][_0x488c36];if(_0x52f8bc===undefined)throw new Error('Environment\x20variable\x20'+_0x488c36+_0x568dc8(0x17e));return _0x52f8bc;});if(Array[_0x4ab64f(0x1e1)](_0x506e92))return _0x506e92[_0x4ab64f(0x1eb)](resolveEnvVars);if(_0x506e92&&_0x40149d[_0x4ab64f(0x182)](typeof _0x506e92,_0x40149d['ytznA']))return Object[_0x4ab64f(0x1ae)](Object[_0x4ab64f(0x1a3)](_0x506e92)[_0x4ab64f(0x1eb)](([_0x5a1edd,_0x27aeb7])=>[_0x5a1edd,resolveEnvVars(_0x27aeb7)]));return _0x506e92;}const isRecord=_0x446b25=>typeof _0x446b25==='object'&&_0x446b25!==null&&!Array[_0x50ffde(0x1e1)](_0x446b25),asRecord=_0x1da1eb=>isRecord(_0x1da1eb)?_0x1da1eb:undefined,mergeHeaders=(_0x1aa128,_0x18af06)=>{const _0x4aba0d=_0x50ffde,_0x273883={'lMKOr':function(_0xc7b833,_0x197172){return _0xc7b833??_0x197172;}},_0x495971={..._0x273883[_0x4aba0d(0x1e2)](_0x1aa128,{}),..._0x18af06??{}};return Object['keys'](_0x495971)['length']?_0x495971:undefined;},SAFE_MODE_ARGS=[_0x50ffde(0x19e)],ALLOW_LOCALHOST_ARGS=[_0x50ffde(0x170),_0x50ffde(0x1c8),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x50ffde(0x1b6)];export function buildBrowserOptionsFromSettings(_0x28cae3,_0x2d947d={}){const _0x5d8b5c=_0x50ffde,_0x1dca26={'zkdYI':function(_0x2a01ca,_0x43380b){return _0x2a01ca(_0x43380b);},'lVzIj':function(_0x58755e,_0x3fac7e){return _0x58755e(_0x3fac7e);},'RrgYi':function(_0x2d4fc9,_0x12b83a){return _0x2d4fc9===_0x12b83a;},'CQuJE':function(_0x138c0d,_0x8f65f9){return _0x138c0d(_0x8f65f9);},'AFSsa':'string','EBMxi':function(_0x5f5cf6,_0x141bc5){return _0x5f5cf6(_0x141bc5);}},_0x5bab2a=_0x1dca26[_0x5d8b5c(0x1e3)](asRecord,_0x28cae3['browser']),_0x20d462={..._0x1dca26['lVzIj'](asRecord,_0x5bab2a?.[_0x5d8b5c(0x16d)])??{}};_0x1dca26['RrgYi'](typeof _0x2d947d['headless'],_0x5d8b5c(0x192))&&(_0x20d462[_0x5d8b5c(0x1b8)]=_0x2d947d[_0x5d8b5c(0x1b8)]);if(_0x28cae3[_0x5d8b5c(0x1ec)]){const _0x26be17=_0x20d462['args']??[],_0x2a5437=SAFE_MODE_ARGS[_0x5d8b5c(0x1aa)](_0x59c6c4=>!_0x26be17[_0x5d8b5c(0x1ad)](_0x59c6c4));_0x20d462['args']=[..._0x26be17,..._0x2a5437];}if(_0x28cae3['allowInsecureLocalhost']){const _0x1cf3a1=_0x20d462['args']??[],_0x3c3b0e=ALLOW_LOCALHOST_ARGS['filter'](_0x21f4be=>!_0x1cf3a1['includes'](_0x21f4be));_0x20d462['args']=[..._0x1cf3a1,..._0x3c3b0e];}const _0x6a3867={..._0x1dca26['CQuJE'](asRecord,_0x5bab2a?.[_0x5d8b5c(0x17c)])??{}};_0x6a3867[_0x5d8b5c(0x1db)]=!![];typeof _0x28cae3[_0x5d8b5c(0x168)]===_0x1dca26[_0x5d8b5c(0x1c0)]&&(_0x6a3867['userAgent']=_0x28cae3['userAgent']);const _0x504836=mergeHeaders(_0x1dca26[_0x5d8b5c(0x1ba)](asRecord,_0x6a3867[_0x5d8b5c(0x1d4)]),_0x1dca26[_0x5d8b5c(0x190)](asRecord,_0x28cae3['headers']));return _0x504836?_0x6a3867[_0x5d8b5c(0x1d4)]=_0x504836:delete _0x6a3867['extraHTTPHeaders'],_0x2d947d['storageStatePath']&&(_0x6a3867[_0x5d8b5c(0x1d3)]=_0x2d947d[_0x5d8b5c(0x1ea)]),{'launchOptions':_0x20d462,'contextOptions':_0x6a3867};}export async function resolveProfileStorageState(_0x2f3f74){return resolveLocalAuthPath(getEnvDir(_0x2f3f74));}async function resolveLocalAuthPath(_0x134702){const _0x4d42c2=_0x50ffde,_0x2d5791={'kfgRF':'auth.json.enc','EPAyu':function(_0x1cb200,_0x10b768){return _0x1cb200(_0x10b768);},'BaoBV':function(_0x43daa7){return _0x43daa7();},'czURL':_0x4d42c2(0x17b),'qbAcS':function(_0x1c539b,_0x7d6473,_0x3d2f3d){return _0x1c539b(_0x7d6473,_0x3d2f3d);},'CzZAV':function(_0x23cce6,_0x1384a7){return _0x23cce6 instanceof _0x1384a7;}},_0x53ad2f=join(_0x134702,_0x2d5791['kfgRF']),_0x1d5f9d=join(_0x134702,'auth.json');if(_0x2d5791[_0x4d42c2(0x16b)](existsSync,_0x53ad2f))try{const _0x412e0d=await _0x2d5791['BaoBV'](getToken);if(!_0x412e0d)throw new Error(_0x2d5791['czURL']);const _0x53b0fe=await readFile(_0x53ad2f),_0x3baa00=_0x2d5791[_0x4d42c2(0x1a2)](decrypt,_0x53b0fe,_0x412e0d),_0x23f117=_0x2d5791[_0x4d42c2(0x1a2)](join,_0x2d5791['BaoBV'](tmpdir),_0x4d42c2(0x1bd)+Date['now']()+'.json');return await _0x2d5791[_0x4d42c2(0x1a2)](writeFile,_0x23f117,_0x3baa00),{'storageStatePath':_0x23f117,'tempAuthPath':_0x23f117};}catch(_0x4ff639){const _0x1f259a=_0x2d5791[_0x4d42c2(0x1ed)](_0x4ff639,Error)?_0x4ff639['message']:_0x2d5791['EPAyu'](String,_0x4ff639);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x1f259a);}if(existsSync(_0x1d5f9d))return{'storageStatePath':_0x1d5f9d};return{};}export async function buildPlaywrightConfig(_0x1084ce,_0x157628,_0x465397,_0x2a18f7,_0x5ebbea){const _0xb227e7=_0x50ffde,_0x4fc346={'Spxlz':function(_0x5129a3,_0x76b0b9){return _0x5129a3(_0x76b0b9);},'pKcAZ':_0xb227e7(0x175),'TMPsL':function(_0x23deeb,_0x1ddee2){return _0x23deeb(_0x1ddee2);}};if(_0x5ebbea)return buildPlaywrightConfigCore(_0x1084ce,_0x5ebbea,_0x157628,_0x465397,_0x2a18f7,'stagehand');const {storageStatePath:_0x22833a,tempAuthPath:_0x3d3884}=await _0x4fc346[_0xb227e7(0x1d9)](resolveLocalAuthPath,getEnvDir(_0x157628));try{const _0x58725b=await buildPlaywrightConfigCore(_0x1084ce,_0x22833a,_0x157628,_0x465397,_0x2a18f7,_0x4fc346['pKcAZ']);return{..._0x58725b,'tempAuthPath':_0x3d3884};}catch(_0x2c27ed){_0x3d3884&&await _0x4fc346['TMPsL'](unlink,_0x3d3884)[_0xb227e7(0x1b7)](()=>{});throw _0x2c27ed;}}export async function buildPlaywrightConfigCore(_0x566c02,_0x219ca7,_0x2e2f56,_0x19a4fb,_0x5d06f1,_0x57cd73='stagehand'){const _0x3ef6e5=_0x50ffde,_0x2caeb3={'VdKlq':function(_0x4ca357,_0x547520){return _0x4ca357===_0x547520;},'MwKsE':'--disable-setuid-sandbox','sFOAM':'chromium','HsRzu':function(_0x50dd9a){return _0x50dd9a();},'pESoR':function(_0x34f20a,_0x38e8f5,_0x106b6d,_0x3903d0){return _0x34f20a(_0x38e8f5,_0x106b6d,_0x3903d0);},'MLxGr':function(_0x49602e){return _0x49602e();},'LoQLJ':_0x3ef6e5(0x197),'OjDUO':'core','gWifA':_0x3ef6e5(0x1e9),'Caqym':'pdf','LVpKX':function(_0x2129cc,_0x390ddb,_0x4c7e9d){return _0x2129cc(_0x390ddb,_0x4c7e9d);},'GzDBa':'ranger-config','glYNQ':_0x3ef6e5(0x1b4),'FqaPK':_0x3ef6e5(0x1dc)},_0x21dce3=_0x19a4fb||_0x2caeb3['HsRzu'](randomUUID),_0x4991e7=_0x2caeb3[_0x3ef6e5(0x18f)](join,_0x2caeb3['MLxGr'](getRangerDir),'sessions',_0x21dce3),_0x368604=Boolean(_0x566c02['cdpEndpoint']),_0x57fae7=_0x368604?{'browserName':_0x2caeb3['sFOAM'],'cdpEndpoint':_0x566c02[_0x3ef6e5(0x1cc)]}:((()=>{const _0x39c8c0=_0x3ef6e5,{launchOptions:_0x2a74a8,contextOptions:_0x191e26}=buildBrowserOptionsFromSettings(_0x566c02,{'headless':_0x5d06f1?![]:_0x566c02[_0x39c8c0(0x1b8)]??!![],'storageStatePath':_0x219ca7});if(_0x2caeb3['VdKlq'](process[_0x39c8c0(0x176)]?.(),0x0)){const _0x85c941=['--no-sandbox',_0x2caeb3[_0x39c8c0(0x184)]],_0x50f61f=_0x2a74a8[_0x39c8c0(0x1d0)]??[],_0x329cea=_0x85c941['filter'](_0x251c68=>!_0x50f61f[_0x39c8c0(0x1ad)](_0x251c68));_0x2a74a8['args']=[..._0x50f61f,..._0x329cea];}return{'isolated':!![],'browserName':_0x2caeb3['sFOAM'],'launchOptions':_0x2a74a8,'contextOptions':{..._0x191e26,'permissions':[_0x39c8c0(0x1b1),'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x302051=_0x57cd73==='playwright-cli'?{'browser':_0x57fae7,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4991e7,'outputMode':_0x2caeb3['LoQLJ'],'codegen':'none'}:{'name':_0x2e2f56,'browser':_0x57fae7,'capabilities':[_0x2caeb3['OjDUO'],'tabs',_0x2caeb3[_0x3ef6e5(0x1b5)],_0x2caeb3[_0x3ef6e5(0x19a)],_0x3ef6e5(0x1ee)],'imageResponses':_0x3ef6e5(0x174),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4991e7};if(!_0x368604){const _0x13af5c=_0x302051[_0x3ef6e5(0x1ef)],_0x1de859=_0x13af5c[_0x3ef6e5(0x17c)];if(_0x2caeb3[_0x3ef6e5(0x1af)](_0x1de859[_0x3ef6e5(0x168)],undefined))delete _0x1de859[_0x3ef6e5(0x168)];if(_0x1de859['storageState']===undefined)delete _0x1de859['storageState'];}const _0xbb688a=_0x2caeb3['LVpKX'](join,_0x2caeb3['HsRzu'](tmpdir),_0x2caeb3['GzDBa']);!existsSync(_0xbb688a)&&await mkdir(_0xbb688a,{'recursive':!![]});const _0xfd8873=_0x57cd73===_0x2caeb3['glYNQ']?_0x2caeb3['FqaPK']:'',_0x580351=join(_0xbb688a,_0x2e2f56+'-'+Date[_0x3ef6e5(0x1c4)]()+_0xfd8873+_0x3ef6e5(0x1c3));return await writeFile(_0x580351,JSON['stringify'](_0x302051,null,0x2)),{'configPath':_0x580351,'storageStatePath':_0x219ca7};}export async function buildPlaywrightCliConfig(_0x2b2f40,_0x3d4e4d,_0x1bbbe5,_0x73122c,_0x587161){const _0x2f45ae=_0x50ffde,_0x4d18ee={'dXLNA':_0x2f45ae(0x1b4),'JZYGd':function(_0x42efd7,_0x123407,_0x2170b1,_0x4c6240,_0x2e916b,_0x4dfc7c,_0xc47e24){return _0x42efd7(_0x123407,_0x2170b1,_0x4c6240,_0x2e916b,_0x4dfc7c,_0xc47e24);}};if(_0x587161)return buildPlaywrightConfigCore(_0x2b2f40,_0x587161,_0x3d4e4d,_0x1bbbe5,_0x73122c,_0x4d18ee[_0x2f45ae(0x1dd)]);const {storageStatePath:_0x3a9421,tempAuthPath:_0x584e41}=await resolveLocalAuthPath(getEnvDir(_0x3d4e4d));try{const _0x16794c=await _0x4d18ee[_0x2f45ae(0x1be)](buildPlaywrightConfigCore,_0x2b2f40,_0x3a9421,_0x3d4e4d,_0x1bbbe5,_0x73122c,'playwright-cli');return{..._0x16794c,'tempAuthPath':_0x584e41};}catch(_0xe6d329){_0x584e41&&await unlink(_0x584e41)['catch'](()=>{});throw _0xe6d329;}}export async function buildRangerwrightCliConfig(_0x40a5b1,_0x3dea8c,_0x52d1dc,_0x5a161d,_0x5dd129){const _0x5f1d7d=_0x50ffde,_0x12bc3d={'wqszQ':function(_0x1d2e1c,_0x2fb427){return _0x1d2e1c===_0x2fb427;},'LqmTM':'--no-sandbox','xMzIe':'--disable-setuid-sandbox','WHoNP':'chromium','qJdVM':_0x5f1d7d(0x1b1),'mxuUq':function(_0x42ce3f,_0x3e57c9){return _0x42ce3f(_0x3e57c9);},'auedo':function(_0x968d39,_0x54e143){return _0x968d39(_0x54e143);},'JZnKq':function(_0x411682){return _0x411682();},'ZrZZO':function(_0x19ab40,_0x5d7de4,_0x592bb8,_0x155a37){return _0x19ab40(_0x5d7de4,_0x592bb8,_0x155a37);},'HAdCe':'sessions','UcJyC':function(_0x12f4d4,_0x1dbef2){return _0x12f4d4(_0x1dbef2);},'hhIXF':function(_0x3dd08b,_0x2d1247){return _0x3dd08b===_0x2d1247;},'tNEhH':function(_0x58b277,_0x9c47d7,_0xa33c59){return _0x58b277(_0x9c47d7,_0xa33c59);},'WQONc':function(_0x5dc043,_0x5374a0,_0x274a82){return _0x5dc043(_0x5374a0,_0x274a82);},'EJNtL':function(_0x467847,_0x559f38){return _0x467847(_0x559f38);}},{storageStatePath:_0x4991c4,tempAuthPath:_0x5a3c0f}=_0x5dd129?{'storageStatePath':_0x5dd129,'tempAuthPath':undefined}:await _0x12bc3d['mxuUq'](resolveLocalAuthPath,_0x12bc3d[_0x5f1d7d(0x180)](getEnvDir,_0x3dea8c)),_0x5b61bc=_0x52d1dc||_0x12bc3d[_0x5f1d7d(0x186)](randomUUID),_0x4abfe9=_0x12bc3d[_0x5f1d7d(0x1bf)](join,_0x12bc3d[_0x5f1d7d(0x186)](getRangerDir),_0x12bc3d[_0x5f1d7d(0x188)],_0x5b61bc),_0x4a47d1=_0x12bc3d['UcJyC'](Boolean,_0x40a5b1['cdpEndpoint']),_0x29769f=_0x4a47d1?{'browserName':_0x5f1d7d(0x189),'cdpEndpoint':_0x40a5b1['cdpEndpoint']}:((()=>{const _0x51fd17=_0x5f1d7d,{launchOptions:_0x5a5aad,contextOptions:_0x4c8cc4}=buildBrowserOptionsFromSettings(_0x40a5b1,{'headless':_0x5a161d?![]:_0x40a5b1['headless']??!![],'storageStatePath':_0x4991c4});if(_0x12bc3d[_0x51fd17(0x1ca)](process[_0x51fd17(0x176)]?.(),0x0)){const _0x3039d5=[_0x12bc3d[_0x51fd17(0x1c7)],_0x12bc3d['xMzIe']],_0xc5898b=_0x5a5aad['args']??[],_0x240460=_0x3039d5[_0x51fd17(0x1aa)](_0x3a213c=>!_0xc5898b[_0x51fd17(0x1ad)](_0x3a213c));_0x5a5aad['args']=[..._0xc5898b,..._0x240460];}return{'browserName':_0x12bc3d[_0x51fd17(0x1d2)],'launchOptions':_0x5a5aad,'contextOptions':{..._0x4c8cc4,'permissions':[_0x12bc3d[_0x51fd17(0x1b3)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4a47d1){const _0x27df4d=_0x29769f['contextOptions'];if(_0x27df4d){if(_0x12bc3d[_0x5f1d7d(0x193)](_0x27df4d['userAgent'],undefined))delete _0x27df4d[_0x5f1d7d(0x168)];if(_0x12bc3d[_0x5f1d7d(0x193)](_0x27df4d['storageState'],undefined))delete _0x27df4d['storageState'];}}const _0x318bc3={'browser':_0x29769f,'outputDir':_0x4abfe9,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4314bc;try{const _0x2719e7=_0x12bc3d['tNEhH'](join,tmpdir(),'ranger-config');!existsSync(_0x2719e7)&&await mkdir(_0x2719e7,{'recursive':!![]}),_0x4314bc=join(_0x2719e7,_0x3dea8c+'-'+Date[_0x5f1d7d(0x1c4)]()+_0x5f1d7d(0x185)),await _0x12bc3d[_0x5f1d7d(0x1d1)](writeFile,_0x4314bc,JSON['stringify'](_0x318bc3,null,0x2));}catch(_0x5d02c8){_0x5a3c0f&&await _0x12bc3d['EJNtL'](unlink,_0x5a3c0f)[_0x5f1d7d(0x1b7)](()=>{});throw _0x5d02c8;}return{'configPath':_0x4314bc,'storageStatePath':_0x4991c4,'tempAuthPath':_0x5a3c0f,'outputDir':_0x4abfe9};}export async function buildNovaActCliConfig(_0xe2c980,_0x56b796,_0x380af4,_0x2ae99b,_0x300faf){const _0x4a0963=_0x50ffde,_0x421ab5={'ZSqis':function(_0x128cf8,_0x4c908a){return _0x128cf8(_0x4c908a);},'scQDx':function(_0x5cf191){return _0x5cf191();},'WJpJb':_0x4a0963(0x196),'pSMjV':'Default','HCuXc':function(_0x1d4148,_0x169c89,_0x1e4da5){return _0x1d4148(_0x169c89,_0x1e4da5);},'ywuwG':function(_0x4880b6,_0x290ce2){return _0x4880b6===_0x290ce2;},'cXyqi':_0x4a0963(0x1df),'mKoJS':_0x4a0963(0x18e),'vGNxm':function(_0x179abd,_0x21df35){return _0x179abd(_0x21df35);}},{storageStatePath:_0x250bce,tempAuthPath:_0x223aca}=_0x300faf?{'storageStatePath':_0x300faf,'tempAuthPath':undefined}:await _0x421ab5['ZSqis'](resolveLocalAuthPath,getEnvDir(_0x56b796)),_0x4c46de=_0x380af4||randomUUID(),_0x357030=join(_0x421ab5['scQDx'](getRangerDir),'sessions',_0x4c46de),_0x233c64=join(_0x357030,_0x421ab5[_0x4a0963(0x187)]),_0x5bcb49=_0x250bce?join(_0x233c64,_0x421ab5[_0x4a0963(0x16e)]):undefined,{launchOptions:_0x5dcd13,contextOptions:_0x482a35}=_0x421ab5[_0x4a0963(0x1a4)](buildBrowserOptionsFromSettings,_0xe2c980,{'headless':_0x2ae99b?![]:_0xe2c980['headless']??!![],'storageStatePath':_0x250bce});if(_0x421ab5['ywuwG'](process[_0x4a0963(0x176)]?.(),0x0)){const _0x564edb=[_0x421ab5['cXyqi'],_0x421ab5['mKoJS']],_0x5ec1d5=_0x5dcd13['args']??[],_0x1feb45=_0x564edb[_0x4a0963(0x1aa)](_0xf0adf3=>!_0x5ec1d5[_0x4a0963(0x1ad)](_0xf0adf3));_0x5dcd13['args']=[..._0x5ec1d5,..._0x1feb45];}const _0x24e7c8=typeof _0x5dcd13[_0x4a0963(0x1a7)]===_0x4a0963(0x1ab)?_0x5dcd13[_0x4a0963(0x1a7)]:_0x250bce?chromium['executablePath']():undefined;return{'storageStatePath':_0x250bce,'tempAuthPath':_0x223aca,'baseUrl':_0xe2c980['baseUrl'],'headless':_0x421ab5['ZSqis'](Boolean,_0x5dcd13['headless']),'userDataDir':_0x233c64,'browserProfilePath':_0x5bcb49,'executablePath':_0x24e7c8,'launchArgs':Array[_0x4a0963(0x1e1)](_0x5dcd13[_0x4a0963(0x1d0)])?_0x5dcd13[_0x4a0963(0x1d0)]['filter'](_0x2e64ae=>typeof _0x2e64ae==='string'):[],'userAgent':_0x421ab5['ywuwG'](typeof _0x482a35['userAgent'],_0x4a0963(0x1ab))?_0x482a35[_0x4a0963(0x168)]:undefined,'extraHTTPHeaders':_0x482a35['extraHTTPHeaders'],'allowInsecureLocalhost':_0x421ab5[_0x4a0963(0x1b9)](Boolean,_0xe2c980['allowInsecureLocalhost']),'safeMode':_0x421ab5['ZSqis'](Boolean,_0xe2c980['safeMode']),'cdpEndpoint':_0xe2c980['cdpEndpoint'],'isCdpMode':_0x421ab5[_0x4a0963(0x1d5)](Boolean,_0xe2c980['cdpEndpoint'])};}export function getNestedValue(_0x34f029,_0x4791a6){const _0x17899d=_0x50ffde,_0x1366ce={'tNnjZ':function(_0x4e6b64,_0x3d4254){return _0x4e6b64===_0x3d4254;},'vTRTj':function(_0x5e67d9,_0x111304){return _0x5e67d9===_0x111304;}},_0x3b4cb7=parseKeyPath(_0x4791a6);let _0x1aea51=_0x34f029;for(const _0x323f6e of _0x3b4cb7){if(_0x1366ce[_0x17899d(0x183)](_0x1aea51,null)||_0x1366ce[_0x17899d(0x1ac)](_0x1aea51,undefined)||typeof _0x1aea51!=='object')return undefined;_0x1aea51=_0x1aea51[_0x323f6e];}return _0x1aea51;}export function setNestedValue(_0x29b932,_0x360692,_0x50485d){const _0x1bd387=_0x50ffde,_0x4f66dc={'zGGYY':function(_0x23c9fc,_0x4d4321){return _0x23c9fc<_0x4d4321;},'Bqtuu':function(_0xdb7b6,_0x13de10){return _0xdb7b6!==_0x13de10;}},_0x503281=parseKeyPath(_0x360692);let _0x2837d7=_0x29b932;for(let _0x1456bd=0x0;_0x4f66dc['zGGYY'](_0x1456bd,_0x503281['length']-0x1);_0x1456bd++){const _0x34a9ab=_0x503281[_0x1456bd];(!(_0x34a9ab in _0x2837d7)||_0x4f66dc['Bqtuu'](typeof _0x2837d7[_0x34a9ab],'object'))&&(_0x2837d7[_0x34a9ab]={}),_0x2837d7=_0x2837d7[_0x34a9ab];}_0x2837d7[_0x503281[_0x503281[_0x1bd387(0x18a)]-0x1]]=_0x50485d;}export function deleteNestedValue(_0x1fc248,_0xfb0eb3){const _0x350705=_0x50ffde,_0x1b635f={'kwrbx':function(_0x4c8f2b,_0x4ed1f3){return _0x4c8f2b(_0x4ed1f3);},'EZDKt':function(_0x1b24f9,_0x11e175){return _0x1b24f9<_0x11e175;},'vtDKp':function(_0x48dee3,_0x3dd5b1){return _0x48dee3===_0x3dd5b1;},'jOuEg':'object','OBrko':function(_0x400a99,_0x16cd1b){return _0x400a99===_0x16cd1b;},'JTlDv':function(_0x268a44,_0x24e0a5){return _0x268a44===_0x24e0a5;}},_0x3c73f7=_0x1b635f[_0x350705(0x1bc)](parseKeyPath,_0xfb0eb3);let _0x43ed59=_0x1fc248;for(let _0x45e7fe=0x0;_0x1b635f['EZDKt'](_0x45e7fe,_0x3c73f7[_0x350705(0x18a)]-0x1);_0x45e7fe++){if(_0x43ed59===null||_0x1b635f[_0x350705(0x1e8)](_0x43ed59,undefined)||typeof _0x43ed59!==_0x1b635f['jOuEg'])return![];_0x43ed59=_0x43ed59[_0x3c73f7[_0x45e7fe]];}if(_0x1b635f['OBrko'](_0x43ed59,null)||_0x1b635f['JTlDv'](_0x43ed59,undefined)||typeof _0x43ed59!==_0x1b635f['jOuEg'])return![];const _0x26a24e=_0x3c73f7[_0x3c73f7[_0x350705(0x18a)]-0x1];if(_0x26a24e in _0x43ed59)return delete _0x43ed59[_0x26a24e],!![];return![];}function parseKeyPath(_0x1f26d5){const _0x47c561=_0x50ffde,_0x2daf4c={'zixvx':function(_0x8bf690,_0x297197){return _0x8bf690===_0x297197;},'nkTMq':'header','HpCQG':_0x47c561(0x178),'WWyLf':_0x47c561(0x181)},_0x13c702=_0x1f26d5['split']('.');return _0x2daf4c['zixvx'](_0x13c702[0x0],_0x2daf4c['nkTMq'])&&(_0x13c702[0x0]=_0x2daf4c[_0x47c561(0x1e6)]),_0x2daf4c[_0x47c561(0x1d6)](_0x13c702[0x0],_0x2daf4c[_0x47c561(0x1da)])&&(_0x13c702[0x0]=_0x47c561(0x1e7)),_0x13c702;}export function formatSettings(_0x509ad6,_0xec41e6=0x0){const _0x1a6038=_0x50ffde,_0x1487a9={'rDhCE':function(_0x2b858f,_0x1b0697){return _0x2b858f===_0x1b0697;},'KLUhH':function(_0x3f6a69,_0x291d73){return _0x3f6a69!==_0x291d73;}},_0x41c0fc=[],_0x5333b9='\x20\x20'[_0x1a6038(0x18c)](_0xec41e6);for(const [_0x516a1f,_0x28304d]of Object['entries'](_0x509ad6)){if(_0x1487a9['rDhCE'](_0x28304d,undefined))continue;if(_0x1487a9[_0x1a6038(0x16f)](typeof _0x28304d,'object')&&_0x1487a9[_0x1a6038(0x1c1)](_0x28304d,null)){_0x41c0fc['push'](''+_0x5333b9+_0x516a1f+':');for(const [_0x5c7f5a,_0x19b94f]of Object['entries'](_0x28304d)){_0x41c0fc['push'](_0x5333b9+'\x20\x20'+_0x5c7f5a+':\x20'+_0x19b94f);}}else _0x41c0fc['push'](''+_0x5333b9+_0x516a1f+':\x20'+_0x28304d);}return _0x41c0fc['join']('\x0a');}
|
|
1
|
+
const _0xceb2ee=_0x11ed;(function(_0x522127,_0x5597c2){const _0x335726=_0x11ed,_0x579ee2=_0x522127();while(!![]){try{const _0x5d5b52=-parseInt(_0x335726(0x18f))/0x1+-parseInt(_0x335726(0x1d0))/0x2*(-parseInt(_0x335726(0x188))/0x3)+parseInt(_0x335726(0x16f))/0x4*(parseInt(_0x335726(0x1c7))/0x5)+-parseInt(_0x335726(0x18c))/0x6*(parseInt(_0x335726(0x1b6))/0x7)+-parseInt(_0x335726(0x19b))/0x8*(parseInt(_0x335726(0x1cc))/0x9)+parseInt(_0x335726(0x1d3))/0xa*(parseInt(_0x335726(0x1ac))/0xb)+parseInt(_0x335726(0x1a0))/0xc*(parseInt(_0x335726(0x169))/0xd);if(_0x5d5b52===_0x5597c2)break;else _0x579ee2['push'](_0x579ee2['shift']());}catch(_0x4b1f49){_0x579ee2['push'](_0x579ee2['shift']());}}}(_0x5640,0xc09b7));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(_0x557286,_0x142eb0){const _0xb13a22=_0x11ed,_0x4beb98={'ZFkar':function(_0x50634f,_0x4af72c,_0xbca0b4){return _0x50634f(_0x4af72c,_0xbca0b4);},'ETfVD':function(_0x4edf9d,_0x4b8b64,_0x4e0b6e){return _0x4edf9d(_0x4b8b64,_0x4e0b6e);},'syTRz':_0xb13a22(0x1a4),'vhYHD':function(_0x101dc6,_0x36c8f1){return _0x101dc6(_0x36c8f1);},'vUZAx':function(_0x478d7d,_0x2a5cb4){return _0x478d7d(_0x2a5cb4);},'prWMR':function(_0x51f16c,_0x265f2c){return _0x51f16c!==_0x265f2c;},'GpJlV':function(_0x3c4211,_0xb76da8){return _0x3c4211!==_0xb76da8;}},_0x5d0518=join(_0x142eb0,'ci',_0x557286),_0x42837c=join(_0x142eb0,'local',_0x557286),_0x257f47=_0x4beb98['ZFkar'](join,_0x142eb0,_0x557286),_0x1b3ff2=_0x4beb98[_0xb13a22(0x17c)](join,_0x142eb0,_0x4beb98[_0xb13a22(0x1df)]),_0x3d731a=join(_0x142eb0,'ci');if(_0x4beb98['vhYHD'](existsSync,_0x5d0518))return _0x5d0518;if(existsSync(_0x42837c))return _0x42837c;if(_0x4beb98[_0xb13a22(0x16e)](existsSync,_0x257f47)&&(_0x4beb98[_0xb13a22(0x190)](_0x257f47,_0x1b3ff2)&&_0x4beb98[_0xb13a22(0x1b9)](_0x257f47,_0x3d731a)?!![]:hasLegacyProfileFiles(_0x257f47)))return _0x257f47;return null;}export function getEnvDir(_0x260bf4,_0x361820={}){const _0x1ea085=_0x11ed,_0xa3502f={'cBedV':function(_0x7e8c4d,_0x4e74a6){return _0x7e8c4d!==_0x4e74a6;},'xxgwc':function(_0x264ada,_0xe29c50,_0x18a822){return _0x264ada(_0xe29c50,_0x18a822);},'AIzJr':'local'},_0x146383=getRangerDir(),_0x1299f1=findEnvInRoot(_0x260bf4,_0x146383);if(_0x1299f1){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x1299f1))throw legacyWriteError(_0x260bf4,_0x1299f1);return _0x1299f1;}const _0x3ae15f=getRangerHomeDir();if(_0xa3502f['cBedV'](_0x3ae15f,_0x146383)){const _0x181045=findEnvInRoot(_0x260bf4,_0x3ae15f);if(_0x181045){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x181045))throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x181045);return _0x181045;}}const _0x29531f=join(_0x3ae15f,_0xa3502f[_0x1ea085(0x186)],_0x260bf4);if(_0x361820['forWrite'])throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x29531f);return _0x29531f;}function _0x5640(){const _0x44e421=['replace','path','--no-sandbox','getuid','vdTFz','bminV','stagehand','cfZPe','IjZGZ','24GSNeyO','DmLwh','legacy','ocNFG','sessions','127416zGIlrz','ranger-auth-','ZsBAu','settings.json','local','bFbjd','llMPp','wuzjV','stringify','setupHeaders','JYskQ','PcOfq','70917bKzrAE','tgbSo','isArray','push','auth.json.enc','header','utf-8','ENOENT','uhnyr','clipboard-write','700UpJfIl','--disable-features=WebBluetooth','XcxdT','GpJlV','warn','Qrkfg','args','headless','browser','uAHyZ','cdpEndpoint','ngWWl','executablePath','--disable-web-security','AQraL','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','gZZvc','15WfvanO','clipboard-read','TqiBZ','vision','auth.json','286281boWHsj','djbKG','lLiVN','playwright-cli','14coZDXC','SuMrB','kHWEJ','1010EQGDnN','rangerDir','string','CPrFF','--allow-running-insecure-content','location','filter','tBDpY','JTDeh','catch','--disable-setuid-sandbox','hNtmW','syTRz','vbiyd','YpLyE','includes','message','ZPfHr','wGvdD','szvGq','SGqXB','BiuKV','headers','XXHQl','uWEQa','ignoreHTTPSErrors','locations','XINOU','chromium','13vVcEkT','storageState','nHNQq','core','contextOptions','vUZAx','445828LHHHOB','XCFKh','now','code','extraHTTPHeaders','Hflpe','lXVei','iCfvD','mJzDZ','tabs','userAgent','phTRn','lLxfh','ETfVD','oHXTN','file','length','Refusing\x20to\x20write\x20profile\x20\x22','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','Environment\x20variable\x20','object','IDZxT','safeMode','AIzJr','endsWith','359964wqKBEn','VnZhH','entries','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6606bERyDA','indexOf','storageStatePath','841606WllYhr','prWMR','startsWith'];_0x5640=function(){return _0x44e421;};return _0x5640();}function isLegacyEnvPath(_0x563f61){const _0x47dc81=_0x11ed,_0x56de2f={'KhxCw':function(_0x54e3f1){return _0x54e3f1();},'XCFKh':function(_0x357c07,_0x19c3ed){return _0x357c07+_0x19c3ed;},'wtscR':function(_0x54021f,_0xe7b2f9){return _0x54021f===_0xe7b2f9;}},_0xbea2f2=_0x56de2f['KhxCw'](getRangerDir),_0x44e978=getRangerHomeDir();for(const _0x38559e of new Set([_0xbea2f2,_0x44e978])){const _0x41d64f=_0x38559e[_0x47dc81(0x187)]('/')?_0x38559e:_0x56de2f[_0x47dc81(0x170)](_0x38559e,'/');if(_0x56de2f['wtscR'](_0x563f61,_0x38559e)||_0x563f61[_0x47dc81(0x191)](_0x41d64f))return!![];}return![];}function legacyWriteError(_0x3e108e,_0x2d3540){const _0x39c078=_0x11ed;return new Error(_0x39c078(0x180)+_0x3e108e+'\x22\x20to\x20legacy\x20path\x20'+_0x2d3540+'.\x0a'+_0x39c078(0x18b)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+_0x39c078(0x1c5));}export function findExistingEnv(_0x346cb0,_0x410cde){const _0x8d014d=_0x11ed,_0x115f77={'tgbSo':function(_0x1bab5c){return _0x1bab5c();},'moqdj':_0x8d014d(0x19d),'ZPfHr':function(_0x1a3700,_0xa18fb,_0x151656){return _0x1a3700(_0xa18fb,_0x151656);},'wuzjV':function(_0x3dba78,_0x5a6957,_0x4f9ebd,_0x51437d){return _0x3dba78(_0x5a6957,_0x4f9ebd,_0x51437d);},'vbiyd':_0x8d014d(0x1a4),'iFHtq':function(_0xb9eac,_0x429e4e){return _0xb9eac(_0x429e4e);},'XcxdT':function(_0x4f26ac,_0x269c20){return _0x4f26ac===_0x269c20;},'WbohQ':function(_0x31408e,_0x507b8d){return _0x31408e(_0x507b8d);}},_0x3d9fc0=_0x410cde?.[_0x8d014d(0x1d4)],_0x10d528=_0x3d9fc0?[_0x3d9fc0]:[_0x115f77[_0x8d014d(0x1ad)](getRangerDir),getRangerHomeDir()][_0x8d014d(0x1d9)]((_0x24dab9,_0xa44013,_0x5cad86)=>_0x5cad86[_0x8d014d(0x18d)](_0x24dab9)===_0xa44013),_0x14e14b=_0x410cde?.[_0x8d014d(0x166)]??['ci',_0x8d014d(0x1a4),_0x115f77['moqdj']];for(const _0x1c6af9 of _0x10d528){const _0xdce38a=join(_0x1c6af9,_0x8d014d(0x1a4)),_0x255d37=_0x115f77[_0x8d014d(0x1e4)](join,_0x1c6af9,'ci'),_0x3abbf2=[{'location':'ci','path':_0x115f77[_0x8d014d(0x1a7)](join,_0x1c6af9,'ci',_0x346cb0)},{'location':_0x115f77[_0x8d014d(0x1e0)],'path':join(_0x1c6af9,_0x115f77[_0x8d014d(0x1e0)],_0x346cb0)},{'location':'legacy','path':_0x115f77['ZPfHr'](join,_0x1c6af9,_0x346cb0)}];for(const _0xdacc5f of _0x3abbf2){if(_0x14e14b['includes'](_0xdacc5f[_0x8d014d(0x1d8)])&&_0x115f77['iFHtq'](existsSync,_0xdacc5f[_0x8d014d(0x193)])){if(_0x115f77[_0x8d014d(0x1b8)](_0xdacc5f['location'],_0x8d014d(0x19d))&&(_0xdacc5f['path']===_0xdce38a||_0xdacc5f['path']===_0x255d37)&&!_0x115f77['WbohQ'](hasLegacyProfileFiles,_0xdacc5f['path']))continue;return{'path':_0xdacc5f[_0x8d014d(0x193)],'location':_0xdacc5f['location']};}}}return null;}function hasLegacyProfileFiles(_0x40316d){const _0x169429=_0x11ed,_0x435717={'BiuKV':function(_0xd958cb,_0x394ef2){return _0xd958cb(_0x394ef2);},'njHoM':function(_0x15cb7a,_0x2c8f7e,_0x4e0f87){return _0x15cb7a(_0x2c8f7e,_0x4e0f87);},'ngWWl':_0x169429(0x1a3),'OpiFe':function(_0x4aca93,_0x1710cc){return _0x4aca93(_0x1710cc);},'myVer':function(_0x291442,_0x5db911,_0x68f388){return _0x291442(_0x5db911,_0x68f388);}};return _0x435717['BiuKV'](existsSync,_0x435717['njHoM'](join,_0x40316d,_0x435717[_0x169429(0x1c1)]))||_0x435717['OpiFe'](existsSync,_0x435717['myVer'](join,_0x40316d,_0x169429(0x1cb)))||_0x435717[_0x169429(0x1e8)](existsSync,join(_0x40316d,_0x169429(0x1b0)));}export function isEnvCi(_0x111bc2){const _0x4330d1=_0x11ed,_0x36f7e5={'djbKG':function(_0x24596e,_0x287fa5,_0x45353e,_0x25c1c1){return _0x24596e(_0x287fa5,_0x45353e,_0x25c1c1);},'EaueC':function(_0x446336){return _0x446336();}};if(existsSync(_0x36f7e5[_0x4330d1(0x1cd)](join,getRangerDir(),'ci',_0x111bc2)))return!![];const _0x39f6c0=_0x36f7e5['EaueC'](getRangerHomeDir);if(_0x39f6c0!==getRangerDir()&&existsSync(join(_0x39f6c0,'ci',_0x111bc2)))return!![];return![];}export async function cleanupTempFiles(_0x3680ae){const _0x18b043=[_0x3680ae['tempAuthPath'],_0x3680ae['configPath']]['filter'](Boolean);await Promise['all'](_0x18b043['map'](_0x5b7be2=>unlink(_0x5b7be2)['catch'](_0x2bd105=>{const _0x35d60e=_0x11ed;_0x2bd105[_0x35d60e(0x172)]!==_0x35d60e(0x1b3)&&console[_0x35d60e(0x1ba)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5b7be2+':',_0x2bd105['message']);})));}export function getSettingsPath(_0x429885){const _0x1554a5={'NYEnO':function(_0x1bfbb8,_0x41bee6){return _0x1bfbb8(_0x41bee6);},'tSCcI':'settings.json'};return join(_0x1554a5['NYEnO'](getEnvDir,_0x429885),_0x1554a5['tSCcI']);}export async function loadSettings(_0x4eb0ec){const _0x3dfb8e=_0x11ed,_0x3ed114=getSettingsPath(_0x4eb0ec);if(!existsSync(_0x3ed114))return{};try{const _0x4c776b=await readFile(_0x3ed114,_0x3dfb8e(0x1b2));return JSON['parse'](_0x4c776b);}catch{return{};}}export async function saveSettings(_0x58c37b,_0x356f6c){const _0x167603=_0x11ed,_0x26cacc={'uWEQa':function(_0x197655,_0x3867a6){return _0x197655(_0x3867a6);},'uhnyr':function(_0x4794b5,_0x3d27f3){return _0x4794b5(_0x3d27f3);},'DmLwh':function(_0x513ddf,_0x3a174d,_0xd0cf6c){return _0x513ddf(_0x3a174d,_0xd0cf6c);},'pnPon':function(_0x2d259d,_0x409cb3,_0x37ed7a){return _0x2d259d(_0x409cb3,_0x37ed7a);}},_0x2f0ff6=_0x26cacc['uWEQa'](getSettingsPath,_0x58c37b),_0x213a30=_0x26cacc[_0x167603(0x164)](dirname,_0x2f0ff6);!_0x26cacc[_0x167603(0x1b4)](existsSync,_0x213a30)&&await _0x26cacc[_0x167603(0x19c)](mkdir,_0x213a30,{'recursive':!![]}),await _0x26cacc['pnPon'](writeFile,_0x2f0ff6,JSON[_0x167603(0x1a8)](_0x356f6c,null,0x2));}export function resolveEnvVars(_0x2c864e){const _0x2543a8=_0x11ed,_0x16742e={'etyoA':function(_0x3f88ba,_0x21cf5d){return _0x3f88ba===_0x21cf5d;},'nHNQq':function(_0x35da9d,_0x16194c){return _0x35da9d===_0x16194c;},'lLiVN':_0x2543a8(0x1d5),'DfxDx':function(_0x25a320,_0x28e2b6){return _0x25a320===_0x28e2b6;},'bsKan':_0x2543a8(0x183)};if(_0x16742e[_0x2543a8(0x16b)](typeof _0x2c864e,_0x16742e[_0x2543a8(0x1ce)]))return _0x2c864e[_0x2543a8(0x192)](/\$\{(\w+)\}/g,(_0x98257,_0x466a0e)=>{const _0x2bf75c=_0x2543a8,_0x3d50ae=process['env'][_0x466a0e];if(_0x16742e['etyoA'](_0x3d50ae,undefined))throw new Error(_0x2bf75c(0x182)+_0x466a0e+'\x20is\x20not\x20set');return _0x3d50ae;});if(Array['isArray'](_0x2c864e))return _0x2c864e['map'](resolveEnvVars);if(_0x2c864e&&_0x16742e['DfxDx'](typeof _0x2c864e,_0x16742e['bsKan']))return Object['fromEntries'](Object['entries'](_0x2c864e)['map'](([_0x58c701,_0x258795])=>[_0x58c701,resolveEnvVars(_0x258795)]));return _0x2c864e;}const isRecord=_0x5a6571=>typeof _0x5a6571===_0xceb2ee(0x183)&&_0x5a6571!==null&&!Array[_0xceb2ee(0x1ae)](_0x5a6571),asRecord=_0x194cc5=>isRecord(_0x194cc5)?_0x194cc5:undefined,mergeHeaders=(_0x54f97b,_0x3a7368)=>{const _0x2a4593=_0xceb2ee,_0x970295={'IDZxT':function(_0x5f4c7d,_0x112d7b){return _0x5f4c7d??_0x112d7b;},'glOxs':function(_0x1c211f,_0x4b75e3){return _0x1c211f??_0x4b75e3;}},_0x4df458={..._0x970295[_0x2a4593(0x184)](_0x54f97b,{}),..._0x970295['glOxs'](_0x3a7368,{})};return Object['keys'](_0x4df458)['length']?_0x4df458:undefined;},SAFE_MODE_ARGS=[_0xceb2ee(0x1b7)],ALLOW_LOCALHOST_ARGS=[_0xceb2ee(0x1c3),_0xceb2ee(0x1d7),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x121422,_0x5ed849={}){const _0x724e58=_0xceb2ee,_0x5ddeef={'SYZSD':function(_0x3d2324,_0x1f1477){return _0x3d2324(_0x1f1477);},'IjZGZ':function(_0x59a55a,_0x4747ab){return _0x59a55a===_0x4747ab;}},_0x5a5362=_0x5ddeef['SYZSD'](asRecord,_0x121422[_0x724e58(0x1be)]),_0x2844bc={...asRecord(_0x5a5362?.['launchOptions'])??{}};_0x5ddeef[_0x724e58(0x19a)](typeof _0x5ed849[_0x724e58(0x1bd)],'boolean')&&(_0x2844bc['headless']=_0x5ed849[_0x724e58(0x1bd)]);if(_0x121422[_0x724e58(0x185)]){const _0x15b314=_0x2844bc[_0x724e58(0x1bc)]??[],_0x27577e=SAFE_MODE_ARGS['filter'](_0x15e976=>!_0x15b314['includes'](_0x15e976));_0x2844bc[_0x724e58(0x1bc)]=[..._0x15b314,..._0x27577e];}if(_0x121422['allowInsecureLocalhost']){const _0x5a4318=_0x2844bc[_0x724e58(0x1bc)]??[],_0x12fbe6=ALLOW_LOCALHOST_ARGS['filter'](_0x38fc32=>!_0x5a4318['includes'](_0x38fc32));_0x2844bc['args']=[..._0x5a4318,..._0x12fbe6];}const _0x176350={...asRecord(_0x5a5362?.['contextOptions'])??{}};_0x176350[_0x724e58(0x165)]=!![];typeof _0x121422[_0x724e58(0x179)]==='string'&&(_0x176350[_0x724e58(0x179)]=_0x121422[_0x724e58(0x179)]);const _0x4b4820=mergeHeaders(asRecord(_0x176350['extraHTTPHeaders']),asRecord(_0x121422['headers']));return _0x4b4820?_0x176350[_0x724e58(0x173)]=_0x4b4820:delete _0x176350[_0x724e58(0x173)],_0x5ed849[_0x724e58(0x18e)]&&(_0x176350['storageState']=_0x5ed849['storageStatePath']),{'launchOptions':_0x2844bc,'contextOptions':_0x176350};}export async function resolveProfileStorageState(_0x5adeea){const _0x15eaf6=_0xceb2ee,_0x51f8b6={'VnZhH':function(_0x54c64f,_0x5a8b9f){return _0x54c64f(_0x5a8b9f);}};return _0x51f8b6[_0x15eaf6(0x189)](resolveLocalAuthPath,getEnvDir(_0x5adeea));}async function resolveLocalAuthPath(_0x54b5a5){const _0x506fc8=_0xceb2ee,_0x3e6520={'ZsBAu':function(_0x4e4f59,_0x62743,_0x126f6f){return _0x4e4f59(_0x62743,_0x126f6f);},'lLxfh':'auth.json.enc','ocNFG':'auth.json','kHWEJ':function(_0xfe2fa7,_0x5e79e2){return _0xfe2fa7(_0x5e79e2);},'sqidX':function(_0x590b7a,_0x42f632,_0x4c1984){return _0x590b7a(_0x42f632,_0x4c1984);},'BEjpb':function(_0x34b63d,_0x55638f){return _0x34b63d(_0x55638f);}},_0x306d0b=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x17b)]),_0x19c2de=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x19e)]);if(_0x3e6520['kHWEJ'](existsSync,_0x306d0b))try{const _0x4db9d7=await getToken();if(!_0x4db9d7)throw new Error(_0x506fc8(0x181));const _0xc3e384=await readFile(_0x306d0b),_0x54af09=_0x3e6520['sqidX'](decrypt,_0xc3e384,_0x4db9d7),_0x3de961=join(tmpdir(),_0x506fc8(0x1a1)+Date[_0x506fc8(0x171)]()+'.json');return await _0x3e6520['ZsBAu'](writeFile,_0x3de961,_0x54af09),{'storageStatePath':_0x3de961,'tempAuthPath':_0x3de961};}catch(_0x461efc){const _0x5ccea1=_0x461efc instanceof Error?_0x461efc[_0x506fc8(0x1e3)]:_0x3e6520[_0x506fc8(0x1d2)](String,_0x461efc);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x5ccea1);}if(_0x3e6520['BEjpb'](existsSync,_0x19c2de))return{'storageStatePath':_0x19c2de};return{};}export async function buildPlaywrightConfig(_0x3dc78d,_0x214cef,_0x2c1ff2,_0x21818f,_0x5517d1){const _0xae2c20={'CcHvK':function(_0x2673b8,_0x114818){return _0x2673b8(_0x114818);},'jNUMs':function(_0x24ead4,_0x220f1f){return _0x24ead4(_0x220f1f);}};if(_0x5517d1)return buildPlaywrightConfigCore(_0x3dc78d,_0x5517d1,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');const {storageStatePath:_0xef1a31,tempAuthPath:_0x4048b7}=await _0xae2c20['CcHvK'](resolveLocalAuthPath,_0xae2c20['jNUMs'](getEnvDir,_0x214cef));try{const _0x2ff2fa=await buildPlaywrightConfigCore(_0x3dc78d,_0xef1a31,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');return{..._0x2ff2fa,'tempAuthPath':_0x4048b7};}catch(_0x4cbc14){_0x4048b7&&await unlink(_0x4048b7)['catch'](()=>{});throw _0x4cbc14;}}export async function buildPlaywrightConfigCore(_0x2042f5,_0x270a75,_0x4dc58b,_0x502362,_0x4a654d,_0x4bace0=_0xceb2ee(0x198)){const _0x4a1891=_0xceb2ee,_0x2c86ad={'UtGFe':'--disable-setuid-sandbox','Zqkfk':_0x4a1891(0x1c8),'GNoZv':function(_0x3c7ce3){return _0x3c7ce3();},'wHNEa':function(_0x43665d,_0x2b307b,_0x36f48a,_0x4e9a74){return _0x43665d(_0x2b307b,_0x36f48a,_0x4e9a74);},'efeJj':function(_0x34adfd){return _0x34adfd();},'PcOfq':'chromium','SuMrB':'playwright-cli','SGqXB':_0x4a1891(0x17e),'YuiRq':_0x4a1891(0x178),'CoYwR':'pdf','BADGG':_0x4a1891(0x1ca),'VvnmA':'allow','szpHN':function(_0x93ffd5,_0x309622){return _0x93ffd5===_0x309622;},'gZZvc':'ranger-config','tbWyx':function(_0x520661,_0x38fd56){return _0x520661(_0x38fd56);},'JYskQ':function(_0x268320,_0x4dd02a,_0x248af4){return _0x268320(_0x4dd02a,_0x248af4);},'hNtmW':'-cli','oHXTN':function(_0x3712e3,_0x44c61b,_0x54bcfb){return _0x3712e3(_0x44c61b,_0x54bcfb);}},_0x1789e0=_0x502362||_0x2c86ad['GNoZv'](randomUUID),_0x5b2174=_0x2c86ad['wHNEa'](join,_0x2c86ad['efeJj'](getRangerDir),'sessions',_0x1789e0),_0x42fa00=Boolean(_0x2042f5[_0x4a1891(0x1c0)]),_0x2e1f71=_0x42fa00?{'browserName':_0x2c86ad[_0x4a1891(0x1ab)],'cdpEndpoint':_0x2042f5[_0x4a1891(0x1c0)]}:((()=>{const _0x3a1601=_0x4a1891,{launchOptions:_0x2d78c8,contextOptions:_0x33a8c5}=buildBrowserOptionsFromSettings(_0x2042f5,{'headless':_0x4a654d?![]:_0x2042f5[_0x3a1601(0x1bd)]??!![],'storageStatePath':_0x270a75});if(process[_0x3a1601(0x195)]?.()===0x0){const _0x55ec36=['--no-sandbox',_0x2c86ad['UtGFe']],_0x65958=_0x2d78c8[_0x3a1601(0x1bc)]??[],_0x541f8d=_0x55ec36[_0x3a1601(0x1d9)](_0x50adf5=>!_0x65958[_0x3a1601(0x1e2)](_0x50adf5));_0x2d78c8['args']=[..._0x65958,..._0x541f8d];}return{'isolated':!![],'browserName':_0x3a1601(0x168),'launchOptions':_0x2d78c8,'contextOptions':{..._0x33a8c5,'permissions':[_0x2c86ad['Zqkfk'],_0x3a1601(0x1b5)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3c700b=_0x4bace0===_0x2c86ad['SuMrB']?{'browser':_0x2e1f71,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174,'outputMode':_0x2c86ad[_0x4a1891(0x1e7)],'codegen':'none'}:{'name':_0x4dc58b,'browser':_0x2e1f71,'capabilities':[_0x4a1891(0x16c),_0x2c86ad['YuiRq'],'install',_0x2c86ad['CoYwR'],_0x2c86ad['BADGG']],'imageResponses':_0x2c86ad['VvnmA'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174};if(!_0x42fa00){const _0x45d773=_0x3c700b[_0x4a1891(0x1be)],_0x638f18=_0x45d773[_0x4a1891(0x16d)];if(_0x2c86ad['szpHN'](_0x638f18[_0x4a1891(0x179)],undefined))delete _0x638f18['userAgent'];if(_0x638f18[_0x4a1891(0x16a)]===undefined)delete _0x638f18[_0x4a1891(0x16a)];}const _0x31ce55=join(tmpdir(),_0x2c86ad[_0x4a1891(0x1c6)]);!_0x2c86ad['tbWyx'](existsSync,_0x31ce55)&&await _0x2c86ad[_0x4a1891(0x1aa)](mkdir,_0x31ce55,{'recursive':!![]});const _0x2462b3=_0x4bace0===_0x2c86ad[_0x4a1891(0x1d1)]?_0x2c86ad[_0x4a1891(0x1de)]:'',_0x451df5=_0x2c86ad[_0x4a1891(0x1aa)](join,_0x31ce55,_0x4dc58b+'-'+Date['now']()+_0x2462b3+'.json');return await _0x2c86ad[_0x4a1891(0x17d)](writeFile,_0x451df5,JSON['stringify'](_0x3c700b,null,0x2)),{'configPath':_0x451df5,'storageStatePath':_0x270a75};}function _0x11ed(_0x3a8173,_0x22ed3d){_0x3a8173=_0x3a8173-0x162;const _0x564054=_0x5640();let _0x11ed50=_0x564054[_0x3a8173];return _0x11ed50;}export async function buildPlaywrightCliConfig(_0x16c1be,_0x3c450c,_0x298912,_0x1910c5,_0x26eff7){const _0x3ff5da=_0xceb2ee,_0x4f1160={'FvDnu':function(_0x3fb664,_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526){return _0x3fb664(_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526);},'uRvVS':function(_0x575091,_0x5dd9ad){return _0x575091(_0x5dd9ad);}};if(_0x26eff7)return _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x26eff7,_0x3c450c,_0x298912,_0x1910c5,'playwright-cli');const {storageStatePath:_0x536e30,tempAuthPath:_0x3eedef}=await _0x4f1160['uRvVS'](resolveLocalAuthPath,getEnvDir(_0x3c450c));try{const _0x3e0370=await _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x536e30,_0x3c450c,_0x298912,_0x1910c5,_0x3ff5da(0x1cf));return{..._0x3e0370,'tempAuthPath':_0x3eedef};}catch(_0x35dede){_0x3eedef&&await unlink(_0x3eedef)[_0x3ff5da(0x1dc)](()=>{});throw _0x35dede;}}export async function buildRangerwrightCliConfig(_0x59330e,_0x277230,_0x31a696,_0x50f8ae,_0x364986){const _0x13e416=_0xceb2ee,_0x2be3d9={'XXHQl':function(_0x4e0ccc,_0x4a9302){return _0x4e0ccc===_0x4a9302;},'xvbsV':'--no-sandbox','llMPp':'chromium','bYIZs':_0x13e416(0x1c8),'iCfvD':_0x13e416(0x1b5),'AQraL':function(_0x422bbb,_0x22efcb){return _0x422bbb(_0x22efcb);},'Qrkfg':function(_0x2a4585){return _0x2a4585();},'ONrhc':function(_0x32d433,_0x2d766d,_0x182019,_0x492d8c){return _0x32d433(_0x2d766d,_0x182019,_0x492d8c);},'phTRn':function(_0x12758d,_0x426ba3){return _0x12758d===_0x426ba3;},'vdTFz':function(_0x1d8797,_0x8d357d,_0x3a380a){return _0x1d8797(_0x8d357d,_0x3a380a);},'bminV':function(_0xc9e49b){return _0xc9e49b();},'TqiBZ':'ranger-config','wGkQz':function(_0x1dca51,_0x19313b,_0x5ce97f){return _0x1dca51(_0x19313b,_0x5ce97f);}},{storageStatePath:_0x59f547,tempAuthPath:_0x2abc42}=_0x364986?{'storageStatePath':_0x364986,'tempAuthPath':undefined}:await _0x2be3d9['AQraL'](resolveLocalAuthPath,getEnvDir(_0x277230)),_0x539574=_0x31a696||_0x2be3d9[_0x13e416(0x1bb)](randomUUID),_0x482cec=_0x2be3d9['ONrhc'](join,_0x2be3d9['Qrkfg'](getRangerDir),'sessions',_0x539574),_0x3e56f9=Boolean(_0x59330e['cdpEndpoint']),_0x226f4e=_0x3e56f9?{'browserName':_0x2be3d9['llMPp'],'cdpEndpoint':_0x59330e[_0x13e416(0x1c0)]}:((()=>{const _0x3b7a37=_0x13e416,{launchOptions:_0x2ee50e,contextOptions:_0x1ffef5}=buildBrowserOptionsFromSettings(_0x59330e,{'headless':_0x50f8ae?![]:_0x59330e['headless']??!![],'storageStatePath':_0x59f547});if(_0x2be3d9[_0x3b7a37(0x163)](process[_0x3b7a37(0x195)]?.(),0x0)){const _0x2f0250=[_0x2be3d9['xvbsV'],'--disable-setuid-sandbox'],_0x4dbf42=_0x2ee50e[_0x3b7a37(0x1bc)]??[],_0x2709a5=_0x2f0250[_0x3b7a37(0x1d9)](_0x5da699=>!_0x4dbf42[_0x3b7a37(0x1e2)](_0x5da699));_0x2ee50e[_0x3b7a37(0x1bc)]=[..._0x4dbf42,..._0x2709a5];}return{'browserName':_0x2be3d9[_0x3b7a37(0x1a6)],'launchOptions':_0x2ee50e,'contextOptions':{..._0x1ffef5,'permissions':[_0x2be3d9['bYIZs'],_0x2be3d9[_0x3b7a37(0x176)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3e56f9){const _0x3bd090=_0x226f4e[_0x13e416(0x16d)];if(_0x3bd090){if(_0x2be3d9[_0x13e416(0x17a)](_0x3bd090[_0x13e416(0x179)],undefined))delete _0x3bd090['userAgent'];if(_0x3bd090[_0x13e416(0x16a)]===undefined)delete _0x3bd090['storageState'];}}const _0x342cf7={'browser':_0x226f4e,'outputDir':_0x482cec,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3f37fd;try{const _0x4290f3=_0x2be3d9[_0x13e416(0x196)](join,_0x2be3d9[_0x13e416(0x197)](tmpdir),_0x2be3d9[_0x13e416(0x1c9)]);!_0x2be3d9['AQraL'](existsSync,_0x4290f3)&&await mkdir(_0x4290f3,{'recursive':!![]}),_0x3f37fd=_0x2be3d9['vdTFz'](join,_0x4290f3,_0x277230+'-'+Date[_0x13e416(0x171)]()+'-rangerwright.json'),await _0x2be3d9['wGkQz'](writeFile,_0x3f37fd,JSON[_0x13e416(0x1a8)](_0x342cf7,null,0x2));}catch(_0x3bd1cd){_0x2abc42&&await _0x2be3d9[_0x13e416(0x1c4)](unlink,_0x2abc42)['catch'](()=>{});throw _0x3bd1cd;}return{'configPath':_0x3f37fd,'storageStatePath':_0x59f547,'tempAuthPath':_0x2abc42,'outputDir':_0x482cec};}export async function buildNovaActCliConfig(_0x14d24c,_0x3f1619,_0x4589bd,_0xd7d706,_0x496d65){const _0x5b1642=_0xceb2ee,_0xec1d13={'xArhN':function(_0x1266a1,_0x540a85){return _0x1266a1(_0x540a85);},'cfZPe':function(_0x2c21de,_0x5ed889){return _0x2c21de(_0x5ed889);},'JTDeh':function(_0x219ce0,_0x3c5b1c,_0x34eb8a,_0x293131){return _0x219ce0(_0x3c5b1c,_0x34eb8a,_0x293131);},'SjtfG':'nova-user-data','szvGq':function(_0x16ce7b,_0x2f40d6,_0x3f4231){return _0x16ce7b(_0x2f40d6,_0x3f4231);},'bFbjd':function(_0x57477e,_0x35506b){return _0x57477e===_0x35506b;},'wGvdD':_0x5b1642(0x194),'gEBqi':_0x5b1642(0x1dd),'mJzDZ':function(_0x3696ed,_0x4618ee){return _0x3696ed===_0x4618ee;},'CPrFF':'string','uAHyZ':function(_0x41bbff,_0x4126e7){return _0x41bbff(_0x4126e7);}},{storageStatePath:_0x406b40,tempAuthPath:_0x4f6a78}=_0x496d65?{'storageStatePath':_0x496d65,'tempAuthPath':undefined}:await _0xec1d13['xArhN'](resolveLocalAuthPath,_0xec1d13[_0x5b1642(0x199)](getEnvDir,_0x3f1619)),_0x2665e9=_0x4589bd||randomUUID(),_0x57d8da=_0xec1d13[_0x5b1642(0x1db)](join,getRangerDir(),_0x5b1642(0x19f),_0x2665e9),_0x10baa9=join(_0x57d8da,_0xec1d13['SjtfG']),_0x242774=_0x406b40?_0xec1d13[_0x5b1642(0x1e6)](join,_0x10baa9,'Default'):undefined,{launchOptions:_0x1649c6,contextOptions:_0x249abd}=buildBrowserOptionsFromSettings(_0x14d24c,{'headless':_0xd7d706?![]:_0x14d24c['headless']??!![],'storageStatePath':_0x406b40});if(_0xec1d13[_0x5b1642(0x1a5)](process['getuid']?.(),0x0)){const _0x21531c=[_0xec1d13[_0x5b1642(0x1e5)],_0xec1d13['gEBqi']],_0xbb3ea=_0x1649c6[_0x5b1642(0x1bc)]??[],_0x86895=_0x21531c[_0x5b1642(0x1d9)](_0x12b743=>!_0xbb3ea[_0x5b1642(0x1e2)](_0x12b743));_0x1649c6['args']=[..._0xbb3ea,..._0x86895];}const _0x1ef183=_0xec1d13[_0x5b1642(0x177)](typeof _0x1649c6['executablePath'],'string')?_0x1649c6[_0x5b1642(0x1c2)]:_0x406b40?chromium['executablePath']():undefined;return{'storageStatePath':_0x406b40,'tempAuthPath':_0x4f6a78,'baseUrl':_0x14d24c['baseUrl'],'headless':_0xec1d13[_0x5b1642(0x199)](Boolean,_0x1649c6['headless']),'userDataDir':_0x10baa9,'browserProfilePath':_0x242774,'executablePath':_0x1ef183,'launchArgs':Array['isArray'](_0x1649c6['args'])?_0x1649c6[_0x5b1642(0x1bc)][_0x5b1642(0x1d9)](_0x3527fa=>typeof _0x3527fa==='string'):[],'userAgent':_0xec1d13['mJzDZ'](typeof _0x249abd['userAgent'],_0xec1d13[_0x5b1642(0x1d6)])?_0x249abd['userAgent']:undefined,'extraHTTPHeaders':_0x249abd['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x14d24c['allowInsecureLocalhost']),'safeMode':Boolean(_0x14d24c[_0x5b1642(0x185)]),'cdpEndpoint':_0x14d24c['cdpEndpoint'],'isCdpMode':_0xec1d13[_0x5b1642(0x1bf)](Boolean,_0x14d24c[_0x5b1642(0x1c0)])};}export function getNestedValue(_0x50805a,_0x128f8a){const _0x1792aa={'Pugsa':function(_0x3b899c,_0x39f6b3){return _0x3b899c(_0x39f6b3);},'VYsss':function(_0x36cc28,_0x2e3d5a){return _0x36cc28===_0x2e3d5a;}},_0x17ff7d=_0x1792aa['Pugsa'](parseKeyPath,_0x128f8a);let _0x43489c=_0x50805a;for(const _0x123dcb of _0x17ff7d){if(_0x1792aa['VYsss'](_0x43489c,null)||_0x43489c===undefined||typeof _0x43489c!=='object')return undefined;_0x43489c=_0x43489c[_0x123dcb];}return _0x43489c;}export function setNestedValue(_0x34ef53,_0x2cf163,_0x46f5e3){const _0x1da8b3=_0xceb2ee,_0x18defe={'Hflpe':function(_0x6974f9,_0x8738c6){return _0x6974f9<_0x8738c6;},'sOThA':function(_0x4e4e09,_0x4dc2a2){return _0x4e4e09!==_0x4dc2a2;},'RbZIC':function(_0x3916cd,_0x2c4e8d){return _0x3916cd-_0x2c4e8d;}},_0x54ecb1=parseKeyPath(_0x2cf163);let _0x16b366=_0x34ef53;for(let _0xb34c87=0x0;_0x18defe[_0x1da8b3(0x174)](_0xb34c87,_0x54ecb1[_0x1da8b3(0x17f)]-0x1);_0xb34c87++){const _0x3abf2e=_0x54ecb1[_0xb34c87];(!(_0x3abf2e in _0x16b366)||_0x18defe['sOThA'](typeof _0x16b366[_0x3abf2e],'object'))&&(_0x16b366[_0x3abf2e]={}),_0x16b366=_0x16b366[_0x3abf2e];}_0x16b366[_0x54ecb1[_0x18defe['RbZIC'](_0x54ecb1[_0x1da8b3(0x17f)],0x1)]]=_0x46f5e3;}export function deleteNestedValue(_0x387942,_0x410e98){const _0x3b709e=_0xceb2ee,_0x22f517={'lXVei':function(_0x13232d,_0x3faf2b){return _0x13232d<_0x3faf2b;},'fpJSG':function(_0x43b362,_0x5f1944){return _0x43b362-_0x5f1944;},'YpLyE':function(_0x47ab90,_0x84cc70){return _0x47ab90===_0x84cc70;},'hriMc':function(_0x4c7607,_0x23246a){return _0x4c7607===_0x23246a;}},_0x229f1c=parseKeyPath(_0x410e98);let _0x5a4195=_0x387942;for(let _0x2cd11c=0x0;_0x22f517[_0x3b709e(0x175)](_0x2cd11c,_0x22f517['fpJSG'](_0x229f1c[_0x3b709e(0x17f)],0x1));_0x2cd11c++){if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x5a4195===undefined||typeof _0x5a4195!=='object')return![];_0x5a4195=_0x5a4195[_0x229f1c[_0x2cd11c]];}if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x22f517['hriMc'](_0x5a4195,undefined)||typeof _0x5a4195!==_0x3b709e(0x183))return![];const _0x1a96d8=_0x229f1c[_0x229f1c['length']-0x1];if(_0x1a96d8 in _0x5a4195)return delete _0x5a4195[_0x1a96d8],!![];return![];}function parseKeyPath(_0x53b8a5){const _0x1160ff=_0xceb2ee,_0x5109aa={'tBDpY':function(_0x562eba,_0x1c54e7){return _0x562eba===_0x1c54e7;}},_0x3758c0=_0x53b8a5['split']('.');return _0x5109aa[_0x1160ff(0x1da)](_0x3758c0[0x0],_0x1160ff(0x1b1))&&(_0x3758c0[0x0]=_0x1160ff(0x162)),_0x3758c0[0x0]==='setupHeader'&&(_0x3758c0[0x0]=_0x1160ff(0x1a9)),_0x3758c0;}export function formatSettings(_0x4f1366,_0x40d554=0x0){const _0x5848ee=_0xceb2ee,_0x55ec40={'ZZhHu':function(_0x19a623,_0xeddbea){return _0x19a623===_0xeddbea;},'XINOU':_0x5848ee(0x183)},_0x147889=[],_0x31c187='\x20\x20'['repeat'](_0x40d554);for(const [_0x38f8c0,_0x8c536c]of Object[_0x5848ee(0x18a)](_0x4f1366)){if(_0x8c536c===undefined)continue;if(_0x55ec40['ZZhHu'](typeof _0x8c536c,_0x55ec40[_0x5848ee(0x167)])&&_0x8c536c!==null){_0x147889[_0x5848ee(0x1af)](''+_0x31c187+_0x38f8c0+':');for(const [_0x262b91,_0x278d6a]of Object['entries'](_0x8c536c)){_0x147889[_0x5848ee(0x1af)](_0x31c187+'\x20\x20'+_0x262b91+':\x20'+_0x278d6a);}}else _0x147889['push'](''+_0x31c187+_0x38f8c0+':\x20'+_0x8c536c);}return _0x147889['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x498cf4,_0x1c4867){const _0x2b1226=_0x908e,_0x1153fd=_0x498cf4();while(!![]){try{const _0x2ef3d0=parseInt(_0x2b1226(0x7d))/0x1+-parseInt(_0x2b1226(0x76))/0x2+-parseInt(_0x2b1226(0x79))/0x3+parseInt(_0x2b1226(0x77))/0x4+-parseInt(_0x2b1226(0x7a))/0x5+-parseInt(_0x2b1226(0x7c))/0x6*(-parseInt(_0x2b1226(0x78))/0x7)+parseInt(_0x2b1226(0x7e))/0x8;if(_0x2ef3d0===_0x1c4867)break;else _0x1153fd['push'](_0x1153fd['shift']());}catch(_0x12a58d){_0x1153fd['push'](_0x1153fd['shift']());}}}(_0x2ba0,0xca595));import{readFileSync}from'fs';import{dirname,join}from'path';function _0x908e(_0x2fe078,_0x557bbb){_0x2fe078=_0x2fe078-0x74;const _0x2ba05c=_0x2ba0();let _0x908e83=_0x2ba05c[_0x2fe078];return _0x908e83;}function _0x2ba0(){const _0x36c6f3=['1783581UbvRqq','6182265IQLvoN','ynGSs','6hLXnbw','868530IlHbdj','4124712YRqnNd','mcUNJ','DxIDe','56106dyazdG','3644484pplwhf','2748298VUIPem'];_0x2ba0=function(){return _0x36c6f3;};return _0x2ba0();}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x20f546){const _0x4d55c3=_0x908e,_0x383fed={'mcUNJ':'skills','ynGSs':function(_0x2b7097,_0x97001b,_0xd77674){return _0x2b7097(_0x97001b,_0xd77674);}},_0x3d83ac=join(__dirname,'..','..',_0x383fed[_0x4d55c3(0x74)]),_0x31c951=join(_0x3d83ac,_0x20f546);try{return _0x383fed[_0x4d55c3(0x7b)](readFileSync,_0x31c951,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x307a8f=_0x908e,_0x2e98b8={'CbgQK':function(_0x489626,_0x457e02){return _0x489626(_0x457e02);},'DxIDe':'ranger/SKILL.md'};return _0x2e98b8['CbgQK'](readSkillContent,_0x2e98b8[_0x307a8f(0x75)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x52f941=_0x3b52;(function(_0x4a92a7,_0x57e0db){const _0x34a195=_0x3b52,_0x283eea=_0x4a92a7();while(!![]){try{const _0x568f36=parseInt(_0x34a195(0x1cb))/0x1+-parseInt(_0x34a195(0x1d9))/0x2+parseInt(_0x34a195(0x1dd))/0x3*(parseInt(_0x34a195(0x1ce))/0x4)+-parseInt(_0x34a195(0x1e2))/0x5+-parseInt(_0x34a195(0x1d2))/0x6+-parseInt(_0x34a195(0x1c9))/0x7+parseInt(_0x34a195(0x1d6))/0x8;if(_0x568f36===_0x57e0db)break;else _0x283eea['push'](_0x283eea['shift']());}catch(_0x6b4f74){_0x283eea['push'](_0x283eea['shift']());}}}(_0xbd8d,0x6c786));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';function _0x3b52(_0x561242,_0x2f6780){_0x561242=_0x561242-0x1c9;const _0xbd8d98=_0xbd8d();let _0x3b52c7=_0xbd8d98[_0x561242];return _0x3b52c7;}import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0xbd8d(){const _0x164193=['opencode','4xVaold','warn','skills','VLHPw','301386tLpQti','project','trim','catch','2990888xzktAl','gcMiN','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','113572LUNcak','DJwYv','\x20\x20Installed\x20skill:\x20','NhISq','1550712KYMUPj','\x20\x20Files:\x20','log','Qiefo','JwtrW','676280bInHpH','NcRAY','push','.md','endsWith','match','pLImE','join','3043719ogvwYc','bug-bash','230619zHYoBS','utf-8'];_0xbd8d=function(){return _0x164193;};return _0xbd8d();}export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x52f941(0x1ca),'feature-tracker'];export async function installSkill(_0x5176bd,_0x19d5c6={}){const _0x1ae454=_0x52f941,_0x1ea058={'VLHPw':function(_0x54eff2,_0x38a822,_0x21cef4){return _0x54eff2(_0x38a822,_0x21cef4);},'NhISq':function(_0x62e305,_0x102561){return _0x62e305(_0x102561);},'JwtrW':function(_0x7dd88c,_0x429e6d){return _0x7dd88c(_0x429e6d);},'Qiefo':'SKILL.md','UrgZN':_0x1ae454(0x1cd),'FOGJG':function(_0x97d6e9,_0x4148fa,_0x3dd02f){return _0x97d6e9(_0x4148fa,_0x3dd02f);},'wUqmS':_0x1ae454(0x1cc),'gcMiN':function(_0x2ac3d3,_0x2f3575,_0x2ec555){return _0x2ac3d3(_0x2f3575,_0x2ec555);},'pLImE':function(_0x25e054,_0x2b96d3,_0x1a4fcc,_0x4ad07f){return _0x25e054(_0x2b96d3,_0x1a4fcc,_0x4ad07f);},'VSThM':function(_0xa2387a,_0x44404a){return _0xa2387a(_0x44404a);},'NcRAY':function(_0x547b71,_0x51a391){return _0x547b71>_0x51a391;}},{level:level=_0x1ae454(0x1d3),cliVersion:_0x3cab85,platform:platform='claude'}=_0x19d5c6,_0x534f63=getSourceSkillsDir(),_0x12601=join(_0x534f63,_0x5176bd),_0x567d7e=_0x1ea058['VLHPw'](join,_0x534f63,_0x5176bd+_0x1ae454(0x1e5)),_0x355033=existsSync(_0x12601)&&_0x1ea058['NhISq'](statSync,_0x12601)['isDirectory']()&&_0x1ea058['JwtrW'](existsSync,join(_0x12601,_0x1ea058['Qiefo'])),_0x55a6f6=_0x1ea058[_0x1ae454(0x1dc)](existsSync,_0x567d7e);if(!_0x355033&&!_0x55a6f6)return console[_0x1ae454(0x1cf)]('\x20\x20Skill\x20not\x20found:\x20'+_0x5176bd),![];const _0x25266f=platform===_0x1ea058['UrgZN']?_0x1ea058['NhISq'](getOpencodeSkillsDir,level):_0x1ea058[_0x1ae454(0x1e1)](getSkillsDir,level),_0x465043=join(_0x25266f,_0x5176bd);await _0x1ea058[_0x1ae454(0x1d1)](mkdir,_0x465043,{'recursive':!![]});let _0x2777cb,_0x69c511=[];if(_0x355033){const _0x162f5a=await _0x1ea058['NhISq'](readdir,_0x12601),_0x5d1cb3=_0x162f5a['filter'](_0x38c586=>_0x38c586[_0x1ae454(0x1e6)]('.md'));for(const _0x1da07d of _0x5d1cb3){const _0x339c48=join(_0x12601,_0x1da07d),_0x3c9770=_0x1ea058[_0x1ae454(0x1d1)](join,_0x465043,_0x1da07d);await _0x1ea058['VLHPw'](copyFile,_0x339c48,_0x3c9770),_0x69c511[_0x1ae454(0x1e4)](_0x1da07d);}_0x2777cb=await readFile(_0x1ea058['FOGJG'](join,_0x12601,_0x1ea058[_0x1ae454(0x1e0)]),_0x1ea058['wUqmS']);}else{_0x2777cb=await readFile(_0x567d7e,'utf-8');const _0x50752e=_0x1ea058[_0x1ae454(0x1d7)](join,_0x465043,'SKILL.md');await _0x1ea058[_0x1ae454(0x1e8)](writeFile,_0x50752e,_0x2777cb,'utf-8'),_0x69c511['push']('SKILL.md');}const {name:_0x4f97a2}=_0x1ea058['VSThM'](parseFrontmatter,_0x2777cb);return console['log'](_0x1ae454(0x1db)+_0x4f97a2),console[_0x1ae454(0x1df)]('\x20\x20Location:\x20'+_0x465043),_0x1ea058[_0x1ae454(0x1e3)](_0x69c511['length'],0x1)&&console['log'](_0x1ae454(0x1de)+_0x69c511[_0x1ae454(0x1e9)](',\x20')),logLocalAgentInstallation(_0x5176bd,{'skillDisplayName':_0x4f97a2,'installLevel':level},_0x3cab85)[_0x1ae454(0x1d5)](()=>{}),!![];}function getSourceSkillsDir(){const _0x1ab9a0=_0x52f941,_0x17fc91={'RrZKS':function(_0x1d6708,_0x27bda6,_0x1b80b1,_0x3ad8e7,_0x436678){return _0x1d6708(_0x27bda6,_0x1b80b1,_0x3ad8e7,_0x436678);},'Aejnq':function(_0x260642,_0x57e536,_0x5efae2,_0x5593ec,_0x35e0ba,_0x1e22b3){return _0x260642(_0x57e536,_0x5efae2,_0x5593ec,_0x35e0ba,_0x1e22b3);},'DJwYv':_0x1ab9a0(0x1d0),'LXYBQ':function(_0x4a5a35,_0x4233c7){return _0x4a5a35(_0x4233c7);}},_0x13fda4=[_0x17fc91['RrZKS'](join,__dirname,'..','..','skills'),_0x17fc91['Aejnq'](join,__dirname,'..','..','..',_0x17fc91[_0x1ab9a0(0x1da)])];for(const _0x5f40bc of _0x13fda4){if(_0x17fc91['LXYBQ'](existsSync,_0x5f40bc))return _0x5f40bc;}return _0x13fda4[0x0];}function parseFrontmatter(_0x4ac15d){const _0x6d1cfb=_0x52f941,_0x5b0017=_0x4ac15d[_0x6d1cfb(0x1e7)](/^---\n([\s\S]+?)\n---/);if(!_0x5b0017)throw new Error('Invalid\x20skill\x20frontmatter');const _0x141c01=_0x5b0017[0x1],_0x56f44b=_0x141c01['match'](/name:\s*(.+)/),_0x469b86=_0x141c01['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x56f44b?.[0x1][_0x6d1cfb(0x1d4)]()||'','description':_0x469b86?.[0x1]['trim']()||''};}export async function removeSkill(_0x226380,_0x6748fa){const _0x54d02a=_0x52f941,_0x2f1e48={'SVPkv':function(_0x3ab8ed,_0x19d283){return _0x3ab8ed(_0x19d283);},'giKPe':function(_0x517121,_0x5dd54e,_0x2bb688){return _0x517121(_0x5dd54e,_0x2bb688);}},_0x4b69af=_0x2f1e48['SVPkv'](getSkillsDir,_0x6748fa),_0x2adf97=_0x2f1e48['giKPe'](join,_0x4b69af,_0x226380);if(!existsSync(_0x2adf97))return![];try{return await rm(_0x2adf97,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x226380),!![];}catch{return console['warn'](_0x54d02a(0x1d8)+_0x226380),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5cb106=_0x4155;(function(_0x199956,_0x56b0f6){const _0x29bae0=_0x4155,_0x506dc4=_0x199956();while(!![]){try{const _0x8cbe1c=parseInt(_0x29bae0(0x1a6))/0x1+-parseInt(_0x29bae0(0x18f))/0x2+parseInt(_0x29bae0(0x1a2))/0x3+parseInt(_0x29bae0(0x18e))/0x4+parseInt(_0x29bae0(0x187))/0x5*(parseInt(_0x29bae0(0x1a9))/0x6)+parseInt(_0x29bae0(0x1b3))/0x7+-parseInt(_0x29bae0(0x1b4))/0x8;if(_0x8cbe1c===_0x56b0f6)break;else _0x506dc4['push'](_0x506dc4['shift']());}catch(_0x3ede6d){_0x506dc4['push'](_0x506dc4['shift']());}}}(_0x1ed3,0x74d37));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(_0xc034f6,_0x32d3de){const _0xc7a3ab=_0x4155,_0x2843e0={'qVjSf':function(_0x46e67f,_0x24f945){return _0x46e67f<=_0x24f945;},'xtovn':function(_0x24376b,_0x42262b){return _0x24376b-_0x42262b;}};if(_0x32d3de>=_0xc034f6['length'])return[0x0,0x0];const _0x3f9ff5=_0xc034f6[_0x32d3de];let _0x99991f=0x1,_0x11a0ac=0x80;while(_0x2843e0[_0xc7a3ab(0x185)](_0x99991f,0x8)&&!(_0x3f9ff5&_0x11a0ac)){_0x99991f++,_0x11a0ac>>=0x1;}if(_0x32d3de+_0x99991f>_0xc034f6[_0xc7a3ab(0x1ba)])return[0x0,0x0];let _0x38c8ae=_0x3f9ff5&_0x2843e0[_0xc7a3ab(0x1b5)](_0x11a0ac,0x1);for(let _0x271ee9=0x1;_0x271ee9<_0x99991f;_0x271ee9++){_0x38c8ae=_0x38c8ae*0x100+_0xc034f6[_0x32d3de+_0x271ee9];}return[_0x38c8ae,_0x99991f];}function readId(_0x3cdf24,_0x41ddc7){const _0x4ddaf1=_0x4155,_0xdba2ee={'DAsGa':function(_0x3e592a,_0x479455){return _0x3e592a>=_0x479455;},'jdgiS':function(_0x3644e1,_0x1ae226){return _0x3644e1>_0x1ae226;},'koTOO':function(_0x32ce33,_0xac8174){return _0x32ce33<_0xac8174;},'qhuUl':function(_0x4e612a,_0x319238){return _0x4e612a+_0x319238;}};if(_0x41ddc7>=_0x3cdf24['length'])return[0x0,0x0];const _0x1de6de=_0x3cdf24[_0x41ddc7];let _0x595c74;if(_0xdba2ee['DAsGa'](_0x1de6de,0x80))_0x595c74=0x1;else{if(_0x1de6de>=0x40)_0x595c74=0x2;else{if(_0xdba2ee[_0x4ddaf1(0x1bd)](_0x1de6de,0x20))_0x595c74=0x3;else{if(_0x1de6de>=0x10)_0x595c74=0x4;else return[_0x1de6de,0x1];}}}if(_0xdba2ee[_0x4ddaf1(0x1c1)](_0x41ddc7+_0x595c74,_0x3cdf24[_0x4ddaf1(0x1ba)]))return[0x0,0x0];let _0x3ccd37=0x0;for(let _0x1e0163=0x0;_0xdba2ee[_0x4ddaf1(0x184)](_0x1e0163,_0x595c74);_0x1e0163++){_0x3ccd37=_0xdba2ee['qhuUl'](_0x3ccd37*0x100,_0x3cdf24[_0x41ddc7+_0x1e0163]);}return[_0x3ccd37,_0x595c74];}function readUint(_0x3b06cd,_0x59ca5a,_0x58674a){const _0x49d82d=_0x4155,_0x5087f4={'VxjBc':function(_0x3375c0,_0x1c7a79){return _0x3375c0<_0x1c7a79;},'Rvyjq':function(_0x4a063b,_0x2aa718){return _0x4a063b+_0x2aa718;}};let _0x5834b3=0x0;for(let _0x53d795=0x0;_0x5087f4[_0x49d82d(0x195)](_0x53d795,_0x58674a);_0x53d795++){_0x5834b3=_0x5087f4['Rvyjq'](_0x5834b3*0x100,_0x3b06cd[_0x5087f4['Rvyjq'](_0x59ca5a,_0x53d795)]);}return _0x5834b3;}function isUnknownSize(_0x455463,_0x2d788f){const _0x238030=_0x4155,_0x41dfe4={'rQEpP':function(_0xba35ca,_0x311d90){return _0xba35ca===_0x311d90;},'WwdjC':function(_0x2f296d,_0x33dca2){return _0x2f296d-_0x33dca2;}};return _0x41dfe4[_0x238030(0x1b8)](_0x455463,_0x41dfe4[_0x238030(0x199)](Math['pow'](0x2,0x7*_0x2d788f),0x1));}function _0x1ed3(){const _0x5e70c7=['wBxJb','maxTimestampTicks','XPMkE','bodyAfterTimestamp','ISzXw','vBdZO','argv','bGJpJ','concat','koTOO','qVjSf','jZeMD','10850NpCRLw','BumTt','TWIHC','kWmIr','iBXwi','tLZCS','bodyBeforeTimestamp','869956TBVyQY','1892020NSFxTY','wWgmd','RfzNQ','stitchWebmFiles.js','SLFfI','indexOf','VxjBc','NSQNd','ScEDV','slice','WwdjC','endsWith','eQCmi','Boggn','FhDSz','YWiOv','UQTgM','push','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','1669593AgpwlW','YCoSf','timestamp','from','227580pYQKqj','lzOAG','QoenZ','732FnAAyr','WhBYP','MxmxB','min','maxTicks','wZgcP','eBWaV','ONCwQ','AbPHV','Stitched\x20','4495351EZSQlz','3872032yZuudL','xtovn','olyoD','log','rQEpP','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','length','yLYMG','tPbjX','DAsGa','OSWde','Pwxtr','alloc','jdgiS','MABDr','qzLfJ','uGQOY','FCFLo'];_0x1ed3=function(){return _0x5e70c7;};return _0x1ed3();}function writeVint(_0x230e99,_0x200253){const _0x4ec4fe=_0x4155,_0x158306={'AYsri':function(_0x32f5e6,_0x294d7b){return _0x32f5e6||_0x294d7b;},'Jlmvr':function(_0x5c6a52,_0x5e0d2a){return _0x5c6a52*_0x5e0d2a;},'YWiOv':function(_0x5dfccd,_0x18edd6){return _0x5dfccd-_0x18edd6;},'wWgmd':function(_0x475705,_0x47a2f3){return _0x475705&_0x47a2f3;},'AbPHV':function(_0xaef425,_0x1ffc66){return _0xaef425<<_0x1ffc66;}};let _0x4f4c76=_0x158306['AYsri'](_0x200253,0x1);while(Math['pow'](0x2,_0x158306['Jlmvr'](0x7,_0x4f4c76))-0x2<_0x230e99)_0x4f4c76++;const _0x5ef492=Buffer[_0x4ec4fe(0x1c0)](_0x4f4c76);for(let _0x45bb5e=_0x158306[_0x4ec4fe(0x19e)](_0x4f4c76,0x1);_0x45bb5e>=0x0;_0x45bb5e--){_0x5ef492[_0x45bb5e]=_0x158306[_0x4ec4fe(0x190)](_0x230e99,0xff),_0x230e99=Math['floor'](_0x230e99/0x100);}return _0x5ef492[0x0]|=_0x158306[_0x4ec4fe(0x1b1)](0x1,0x8-_0x4f4c76),_0x5ef492;}function writeUint(_0x8ae1c9,_0x143087){const _0x3b047b=_0x4155,_0x20d100={'tPbjX':function(_0x186dc4,_0x2b9e4e){return _0x186dc4-_0x2b9e4e;},'qdmOl':function(_0x5f4e40,_0x5c5f86){return _0x5f4e40/_0x5c5f86;}},_0x209d64=Buffer[_0x3b047b(0x1c0)](_0x143087);for(let _0x213a7f=_0x20d100[_0x3b047b(0x1bc)](_0x143087,0x1);_0x213a7f>=0x0;_0x213a7f--){_0x209d64[_0x213a7f]=_0x8ae1c9&0xff,_0x8ae1c9=Math['floor'](_0x20d100['qdmOl'](_0x8ae1c9,0x100));}return _0x209d64;}function writeUnknownSizeVint(_0x15fca4){const _0x100e66=_0x4155,_0x21d0d1={'uGQOY':function(_0x5e835b,_0x199fd3){return _0x5e835b>>_0x199fd3;},'Pwxtr':function(_0x35c096,_0x26455d){return _0x35c096-_0x26455d;}},_0x2a4d19=Buffer['alloc'](_0x15fca4,0xff);return _0x2a4d19[0x0]=_0x21d0d1[_0x100e66(0x179)](0xff,_0x21d0d1[_0x100e66(0x1bf)](_0x15fca4,0x1)),_0x2a4d19;}function uintSize(_0x5eed75){const _0x5c9dc1={'zPTOY':function(_0x1c87c1,_0x292037){return _0x1c87c1>_0x292037;}};if(_0x5eed75===0x0)return 0x1;let _0x149f92=0x0,_0x51bd0a=_0x5eed75;while(_0x5c9dc1['zPTOY'](_0x51bd0a,0x0)){_0x149f92++,_0x51bd0a=Math['floor'](_0x51bd0a/0x100);}return _0x149f92;}function findTimestampScale(_0x46ba2d,_0x538e07){const _0x1b0f55=_0x4155,_0x143a76={'Cfnkv':function(_0x40bfda,_0x5bf6b6){return _0x40bfda+_0x5bf6b6;},'olyoD':function(_0x4b8b4e,_0x605948){return _0x4b8b4e<_0x605948;},'jZeMD':function(_0x585f49,_0x564cc1,_0x18b983){return _0x585f49(_0x564cc1,_0x18b983);},'MABDr':function(_0x12cdec,_0x14b088){return _0x12cdec===_0x14b088;},'BumTt':function(_0x4850cb,_0x278b35,_0x4663a7){return _0x4850cb(_0x278b35,_0x4663a7);},'WhBYP':function(_0x526836,_0x56f43c){return _0x526836+_0x56f43c;},'NLxBP':function(_0x334e38,_0x2e13f7){return _0x334e38===_0x2e13f7;},'Amcps':function(_0xe3d833,_0x384657,_0x19e000,_0x5cfee6){return _0xe3d833(_0x384657,_0x19e000,_0x5cfee6);},'RfzNQ':function(_0xbfb7f1,_0xc9201a){return _0xbfb7f1+_0xc9201a;},'eBWaV':function(_0xf9e649,_0x2e7b54){return _0xf9e649+_0x2e7b54;},'fjYSf':function(_0x60a880,_0x30f7de){return _0x60a880===_0x30f7de;},'XPMkE':function(_0x1caaa3,_0x37826f){return _0x1caaa3+_0x37826f;}};let _0x22cbed=_0x538e07;const _0x3a4387=Math[_0x1b0f55(0x1ac)](_0x46ba2d[_0x1b0f55(0x1ba)],_0x143a76['Cfnkv'](_0x538e07,0x2710));while(_0x143a76[_0x1b0f55(0x1b6)](_0x22cbed,_0x3a4387)){const [_0x5e7365,_0x996059]=readId(_0x46ba2d,_0x22cbed),[_0x435236,_0x4f5720]=_0x143a76[_0x1b0f55(0x186)](readVint,_0x46ba2d,_0x22cbed+_0x996059);if(_0x143a76[_0x1b0f55(0x1c2)](_0x5e7365,ID_INFO)){let _0x5a2317=_0x22cbed+_0x996059+_0x4f5720;const _0x2a181d=_0x5a2317+_0x435236;while(_0x5a2317<_0x2a181d){const [_0x2dcf57,_0x2da046]=readId(_0x46ba2d,_0x5a2317),[_0x48b460,_0x4906cc]=_0x143a76[_0x1b0f55(0x188)](readVint,_0x46ba2d,_0x143a76[_0x1b0f55(0x1aa)](_0x5a2317,_0x2da046));if(_0x143a76['NLxBP'](_0x2dcf57,ID_TIMESTAMP_SCALE))return _0x143a76['Amcps'](readUint,_0x46ba2d,_0x143a76[_0x1b0f55(0x191)](_0x143a76[_0x1b0f55(0x1af)](_0x5a2317,_0x2da046),_0x4906cc),_0x48b460);_0x5a2317+=_0x2da046+_0x4906cc+_0x48b460;}break;}if(_0x143a76['fjYSf'](_0x5e7365,ID_CLUSTER))break;if(isUnknownSize(_0x435236,_0x4f5720))break;_0x22cbed+=_0x143a76[_0x1b0f55(0x17d)](_0x996059+_0x4f5720,_0x435236);}return 0xf4240;}function findFirstClusterOffset(_0x3f156c,_0x410d6c){const _0x383014=_0x4155,_0x5931cb={'OSWde':function(_0x485fdf,_0x4c7eba,_0x2d6dc9){return _0x485fdf(_0x4c7eba,_0x2d6dc9);},'wBxJb':function(_0x5f4e97,_0x13ba42){return _0x5f4e97===_0x13ba42;},'vBdZO':function(_0x9cd228,_0x2cbf8e){return _0x9cd228+_0x2cbf8e;}};let _0x29481e=_0x410d6c;while(_0x29481e<_0x3f156c['length']){const [_0x29acb,_0x58c2ea]=_0x5931cb[_0x383014(0x1be)](readId,_0x3f156c,_0x29481e);if(_0x5931cb[_0x383014(0x17b)](_0x29acb,ID_CLUSTER))return _0x29481e;const [_0x503c3c,_0x204324]=_0x5931cb['OSWde'](readVint,_0x3f156c,_0x29481e+_0x58c2ea);if(_0x5931cb['OSWde'](isUnknownSize,_0x503c3c,_0x204324))return _0x29481e;_0x29481e+=_0x5931cb[_0x383014(0x180)](_0x58c2ea,_0x204324)+_0x503c3c;}return _0x3f156c['length'];}function findClusterEnd(_0x309e84,_0x1a60f5,_0x45f295,_0x1c213c){const _0x1b3327=_0x4155,_0x25da97={'eQCmi':function(_0x175e87,_0x7eef62,_0xd471cb){return _0x175e87(_0x7eef62,_0xd471cb);},'XWLEq':function(_0x945a96,_0xf33d8b){return _0x945a96+_0xf33d8b;},'yLYMG':function(_0x4cc946,_0x5e2a0e){return _0x4cc946<_0x5e2a0e;},'YCGrL':function(_0x42a831,_0x5184aa){return _0x42a831+_0x5184aa;},'JrryI':function(_0x32f8cf,_0x1831b0){return _0x32f8cf+_0x1831b0;}};if(!_0x25da97[_0x1b3327(0x19b)](isUnknownSize,_0x45f295,_0x1c213c))return _0x25da97['XWLEq'](_0x1a60f5,_0x45f295);const _0x1b1c7d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x54e28c=_0x1a60f5;while(_0x25da97[_0x1b3327(0x1bb)](_0x54e28c,_0x309e84['length']-0x4)){const [_0x4b01d,_0x2487c4]=readId(_0x309e84,_0x54e28c);if(_0x1b1c7d['has'](_0x4b01d))return _0x54e28c;const [_0x6e135,_0x2a0372]=readVint(_0x309e84,_0x25da97['YCGrL'](_0x54e28c,_0x2487c4));if(isUnknownSize(_0x6e135,_0x2a0372))return _0x309e84['length'];_0x54e28c+=_0x25da97['JrryI'](_0x2487c4,_0x2a0372)+_0x6e135;}return _0x309e84[_0x1b3327(0x1ba)];}function extractClusters(_0x274d30,_0xc73d81){const _0x2f625f=_0x4155,_0x70f5d9={'MxmxB':function(_0x2943c4,_0x56b9a8){return _0x2943c4===_0x56b9a8;},'YfrLC':function(_0xa565a4,_0x307683,_0x32cc91){return _0xa565a4(_0x307683,_0x32cc91);},'yMOLb':function(_0x55007b,_0x2d6f9a){return _0x55007b!==_0x2d6f9a;},'ISzXw':function(_0x2b9921,_0x73db30,_0x1326dc){return _0x2b9921(_0x73db30,_0x1326dc);},'TWIHC':function(_0x5585bd,_0x3ebb68){return _0x5585bd+_0x3ebb68;},'QoenZ':function(_0x27dc22,_0x5cb278){return _0x27dc22+_0x5cb278;},'Boggn':function(_0x49beae,_0x3aa350){return _0x49beae+_0x3aa350;},'JvztF':function(_0x587f75,_0x4f9f77){return _0x587f75===_0x4f9f77;},'ONCwQ':function(_0x3093bb,_0x26014a,_0x23dd6b){return _0x3093bb(_0x26014a,_0x23dd6b);},'fIrjr':function(_0x11a302,_0x395539){return _0x11a302<_0x395539;},'YTlYK':function(_0xf5bd3,_0x4cb3ab){return _0xf5bd3===_0x4cb3ab;},'SLFfI':function(_0x1d9a6d,_0x63ad69){return _0x1d9a6d+_0x63ad69;},'KCUdO':function(_0x1f79f1,_0x13b07c){return _0x1f79f1+_0x13b07c;}},_0x230ad3=[],_0x1cadf7=Buffer[_0x2f625f(0x1a5)]([0x1f,0x43,0xb6,0x75]);let _0x123cf7=0x0;while(_0x123cf7<_0x274d30['length']){const _0x1fe91d=_0x274d30[_0x2f625f(0x194)](_0x1cadf7,_0x123cf7);if(_0x70f5d9['MxmxB'](_0x1fe91d,-0x1))break;const [_0xc8c81f,_0x4a2da8]=_0x70f5d9['YfrLC'](readId,_0x274d30,_0x1fe91d);if(_0x70f5d9['yMOLb'](_0xc8c81f,ID_CLUSTER)){_0x123cf7=_0x1fe91d+0x1;continue;}const [_0x581c8a,_0x290f49]=_0x70f5d9[_0x2f625f(0x17f)](readVint,_0x274d30,_0x70f5d9[_0x2f625f(0x189)](_0x1fe91d,_0x4a2da8)),_0x1f4d28=_0x70f5d9['TWIHC'](_0x1fe91d,_0x4a2da8)+_0x290f49,_0x6540f9=findClusterEnd(_0x274d30,_0x1f4d28,_0x581c8a,_0x290f49);let _0x448900=_0x1f4d28,_0x5b0c95=0x0,_0x4aac74=0x2,_0x1bbbd0=![],_0x312347=Buffer['alloc'](0x0),_0x2f54f2=Buffer[_0x2f625f(0x1c0)](0x0);while(_0x448900<_0x6540f9){const [_0x4ee605,_0x21295a]=readId(_0x274d30,_0x448900),[_0x2ffe7c,_0xbf32fe]=readVint(_0x274d30,_0x70f5d9[_0x2f625f(0x1a8)](_0x448900,_0x21295a));if(_0x70f5d9[_0x2f625f(0x1ab)](_0x4ee605,ID_TIMESTAMP)){_0x5b0c95=readUint(_0x274d30,_0x70f5d9[_0x2f625f(0x19c)](_0x70f5d9['Boggn'](_0x448900,_0x21295a),_0xbf32fe),_0x2ffe7c),_0x4aac74=_0x2ffe7c,_0x1bbbd0=!![],_0x312347=_0x274d30['slice'](_0x1f4d28,_0x448900);const _0x4f14b7=_0x70f5d9[_0x2f625f(0x189)](_0x448900+_0x21295a,_0xbf32fe)+_0x2ffe7c;_0x2f54f2=_0x274d30['slice'](_0x4f14b7,_0x6540f9);break;}if(_0x70f5d9['JvztF'](_0x4ee605,ID_CLUSTER))break;if(_0x70f5d9[_0x2f625f(0x1b0)](isUnknownSize,_0x2ffe7c,_0xbf32fe))break;_0x448900+=_0x21295a+_0xbf32fe+_0x2ffe7c;}!_0x1bbbd0&&(_0x2f54f2=_0x274d30['slice'](_0x1f4d28,_0x6540f9));let _0x477304=_0x5b0c95;_0x448900=_0x1f4d28;while(_0x70f5d9['fIrjr'](_0x448900,_0x6540f9)){const [_0x45a530,_0x2bddf8]=readId(_0x274d30,_0x448900),[_0xd19ffc,_0x278d1a]=readVint(_0x274d30,_0x70f5d9['TWIHC'](_0x448900,_0x2bddf8));if(_0x45a530===ID_SIMPLE_BLOCK&&_0xd19ffc>=0x4){const _0x5bebe1=_0x448900+_0x2bddf8+_0x278d1a,[,_0x1d52ae]=_0x70f5d9['YfrLC'](readVint,_0x274d30,_0x5bebe1),_0x581213=_0x274d30['readInt16BE'](_0x5bebe1+_0x1d52ae),_0x4d4465=_0x5b0c95+_0x581213;if(_0x4d4465>_0x477304)_0x477304=_0x4d4465;}if(_0x70f5d9['YTlYK'](_0x45a530,ID_CLUSTER))break;if(isUnknownSize(_0xd19ffc,_0x278d1a))break;_0x448900+=_0x70f5d9[_0x2f625f(0x193)](_0x70f5d9['KCUdO'](_0x2bddf8,_0x278d1a),_0xd19ffc);}_0x230ad3[_0x2f625f(0x1a0)]({'timestamp':_0x5b0c95,'maxTicks':_0x477304,'bodyBeforeTimestamp':_0x312347,'bodyAfterTimestamp':_0x2f54f2,'timestampElementSize':_0x4aac74}),_0x123cf7=_0x6540f9;}return _0x230ad3;}function _0x4155(_0x1de761,_0x3e8286){_0x1de761=_0x1de761-0x179;const _0x1ed381=_0x1ed3();let _0x41552e=_0x1ed381[_0x1de761];return _0x41552e;}function parseWebm(_0xa6e019){const _0x21169b=_0x4155,_0x48c64f={'UQTgM':function(_0x4dfc41,_0x573447,_0x396510){return _0x4dfc41(_0x573447,_0x396510);},'tLZCS':function(_0x4b101,_0x6206ce){return _0x4b101+_0x6206ce;},'lzOAG':function(_0x3c9d16,_0x4cbbd7){return _0x3c9d16!==_0x4cbbd7;},'wZgcP':function(_0x2af86f,_0x2b0625,_0x26d8df){return _0x2af86f(_0x2b0625,_0x26d8df);},'YCoSf':function(_0x505348,_0x2c73ca){return _0x505348+_0x2c73ca;},'jNRCX':function(_0x533cb8,_0x10978,_0x378a29){return _0x533cb8(_0x10978,_0x378a29);}};let _0x1f1b64=0x0;const [,_0x362df1]=_0x48c64f['UQTgM'](readId,_0xa6e019,_0x1f1b64),[_0x2e845b,_0x5553ff]=_0x48c64f['UQTgM'](readVint,_0xa6e019,_0x48c64f[_0x21169b(0x18c)](_0x1f1b64,_0x362df1));_0x1f1b64+=_0x362df1+_0x5553ff+_0x2e845b;const [_0x41c6ac,_0x273ec2]=readId(_0xa6e019,_0x1f1b64);if(_0x48c64f[_0x21169b(0x1a7)](_0x41c6ac,ID_SEGMENT))return null;const [,_0x154507]=_0x48c64f[_0x21169b(0x1ae)](readVint,_0xa6e019,_0x48c64f[_0x21169b(0x1a3)](_0x1f1b64,_0x273ec2)),_0x493acc=_0x48c64f['YCoSf'](_0x1f1b64,_0x273ec2)+_0x154507,_0xafdb65=findTimestampScale(_0xa6e019,_0x493acc),_0x4219ff=_0x48c64f[_0x21169b(0x19f)](findFirstClusterOffset,_0xa6e019,_0x493acc),_0x31c533=_0xa6e019[_0x21169b(0x198)](0x0,_0x4219ff),_0x1b7a97=_0x48c64f['jNRCX'](extractClusters,_0xa6e019,_0xafdb65);let _0x4ba5ef=0x0;for(const _0x1ce6fa of _0x1b7a97){if(_0x1ce6fa['maxTicks']>_0x4ba5ef)_0x4ba5ef=_0x1ce6fa[_0x21169b(0x1ad)];}return{'header':_0x31c533,'clusters':_0x1b7a97,'timestampScale':_0xafdb65,'maxTimestampTicks':_0x4ba5ef};}function buildCluster(_0x75ad75,_0x16b058,_0x73e307){const _0x4163e0=_0x4155,_0xb9750f={'bGJpJ':function(_0x4a3293,_0x16e146,_0x56bae7){return _0x4a3293(_0x16e146,_0x56bae7);},'FCFLo':function(_0xdbf420,_0x41169a){return _0xdbf420(_0x41169a);}},_0x24be1d=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x326476=Math['max'](0x4,uintSize(_0x75ad75)),_0x307383=Buffer[_0x4163e0(0x183)]([Buffer[_0x4163e0(0x1a5)]([ID_TIMESTAMP]),writeVint(_0x326476),_0xb9750f[_0x4163e0(0x182)](writeUint,_0x75ad75,_0x326476)]),_0x2b5a01=Buffer['concat']([_0x16b058,_0x307383,_0x73e307]),_0x3f3df3=_0xb9750f[_0x4163e0(0x17a)](writeVint,_0x2b5a01['length']);return Buffer[_0x4163e0(0x183)]([_0x24be1d,_0x3f3df3,_0x2b5a01]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x486c53){const _0xa5cb87=_0x4155,_0xb3a1e7={'UPiqZ':function(_0xd09441,_0x399203,_0x470cb6){return _0xd09441(_0x399203,_0x470cb6);},'iBXwi':function(_0x4c4055,_0x5d21a6){return _0x4c4055+_0x5d21a6;},'kWmIr':function(_0x34e253,_0x63fb78){return _0x34e253+_0x63fb78;},'qzLfJ':function(_0x5b24c6,_0xe9cd1a,_0x3ad741){return _0x5b24c6(_0xe9cd1a,_0x3ad741);},'xFyKt':function(_0x194b1e,_0x320925){return _0x194b1e===_0x320925;},'AwctF':function(_0x41e9fc,_0xf295bf){return _0x41e9fc===_0xf295bf;},'FhDSz':function(_0x189662,_0x2db295){return _0x189662+_0x2db295;},'NSQNd':function(_0x51029b,_0x597625){return _0x51029b!==_0x597625;},'xJFVx':function(_0x3a667d,_0xa83048){return _0x3a667d+_0xa83048;},'IEvcB':function(_0x7685cf,_0x364999){return _0x7685cf+_0x364999;}},_0x3555e0=Buffer[_0xa5cb87(0x1a5)](_0x486c53);let _0x13f7ab=0x0;const [,_0x2edee8]=readId(_0x3555e0,_0x13f7ab),[_0x209e4e,_0x1bef0f]=_0xb3a1e7['UPiqZ'](readVint,_0x3555e0,_0xb3a1e7[_0xa5cb87(0x18b)](_0x13f7ab,_0x2edee8)),_0x40fb3a=_0xb3a1e7['kWmIr'](_0x13f7ab,_0x2edee8)+_0x1bef0f+_0x209e4e,[,_0x413bb7]=readId(_0x3555e0,_0x40fb3a),[,_0x5d2e02]=readVint(_0x3555e0,_0x40fb3a+_0x413bb7),_0x5990c9=_0xb3a1e7['iBXwi'](_0x40fb3a,_0x413bb7)+_0x5d2e02,_0x1a3ad1=writeUnknownSizeVint(_0x5d2e02);_0x1a3ad1['copy'](_0x3555e0,_0x40fb3a+_0x413bb7);let _0x50bf39=_0x5990c9;const _0x3f329d=Math['min'](_0x3555e0['length'],_0xb3a1e7['kWmIr'](_0x5990c9,0x2710));while(_0x50bf39<_0x3f329d){const [_0x58fc48,_0x29a3b1]=readId(_0x3555e0,_0x50bf39),[_0xd001d8,_0x1e899d]=_0xb3a1e7['qzLfJ'](readVint,_0x3555e0,_0x50bf39+_0x29a3b1);if(_0xb3a1e7['xFyKt'](_0x58fc48,ID_CLUSTER))break;if(_0xb3a1e7[_0xa5cb87(0x1c3)](isUnknownSize,_0xd001d8,_0x1e899d))break;if(_0xb3a1e7['AwctF'](_0x58fc48,ID_INFO)){const _0x47b432=_0xb3a1e7[_0xa5cb87(0x18a)](_0x50bf39,_0x29a3b1)+_0x1e899d,_0x46a885=_0x47b432+_0xd001d8,_0x5b4ecc=[];let _0x1f6a65=_0x47b432;while(_0x1f6a65<_0x46a885){const [_0x529851,_0x27c121]=readId(_0x3555e0,_0x1f6a65),[_0x172715,_0x15acc6]=readVint(_0x3555e0,_0xb3a1e7['FhDSz'](_0x1f6a65,_0x27c121)),_0x283ecd=_0x27c121+_0x15acc6+_0x172715;_0xb3a1e7[_0xa5cb87(0x196)](_0x529851,ID_DURATION)&&_0x5b4ecc['push'](_0x3555e0[_0xa5cb87(0x198)](_0x1f6a65,_0xb3a1e7[_0xa5cb87(0x19d)](_0x1f6a65,_0x283ecd))),_0x1f6a65+=_0x283ecd;}const _0x53610e=Buffer[_0xa5cb87(0x183)](_0x5b4ecc),_0x17f458=Buffer['concat']([_0x3555e0[_0xa5cb87(0x198)](_0x50bf39,_0xb3a1e7[_0xa5cb87(0x19d)](_0x50bf39,_0x29a3b1)),writeVint(_0x53610e['length'],_0x1e899d)]);return Buffer['concat']([_0x3555e0['slice'](0x0,_0x50bf39),_0x17f458,_0x53610e,_0x3555e0['slice'](_0x46a885)]);}_0x50bf39+=_0xb3a1e7['xJFVx'](_0xb3a1e7['IEvcB'](_0x29a3b1,_0x1e899d),_0xd001d8);}return _0x3555e0;}export function stitchWebmFiles(_0x464ef5,_0x3bce47){const _0x3e733a=_0x4155,_0x2934e7={'mxPGe':function(_0x4203f1,_0x2dc63d){return _0x4203f1(_0x2dc63d);},'ScEDV':function(_0x57e6cf,_0x21d730){return _0x57e6cf(_0x21d730);},'CmiSQ':function(_0x4fea4c,_0x41bff3){return _0x4fea4c<_0x41bff3;},'ScuCn':function(_0x5b4ab2,_0x57a8ee){return _0x5b4ab2+_0x57a8ee;}};if(_0x464ef5[_0x3e733a(0x1ba)]<=0x1)return![];const _0x286e6e=[];for(const _0x41e3e9 of _0x464ef5){const _0x17538d=_0x2934e7['mxPGe'](readFileSync,_0x41e3e9),_0x590346=_0x2934e7['mxPGe'](parseWebm,_0x17538d);if(!_0x590346||_0x590346['clusters'][_0x3e733a(0x1ba)]===0x0)return![];_0x286e6e['push'](_0x590346);}const _0x1cb123=_0x286e6e[0x0],_0x12860b=_0x2934e7[_0x3e733a(0x197)](rebuildHeaderWithoutDuration,_0x1cb123['header']),_0x4f42a0=[_0x12860b];let _0x1910fc=0x0;for(let _0x4e3747=0x0;_0x2934e7['CmiSQ'](_0x4e3747,_0x286e6e[_0x3e733a(0x1ba)]);_0x4e3747++){const _0x268fde=_0x286e6e[_0x4e3747];for(const _0x2b2ec8 of _0x268fde['clusters']){const _0xc86a68=_0x2b2ec8[_0x3e733a(0x1a4)]+_0x1910fc;_0x4f42a0[_0x3e733a(0x1a0)](buildCluster(_0xc86a68,_0x2b2ec8[_0x3e733a(0x18d)],_0x2b2ec8[_0x3e733a(0x17e)]));}const _0x41421e=0x1e;_0x1910fc+=_0x2934e7['ScuCn'](_0x268fde[_0x3e733a(0x17c)],_0x41421e);}return writeFileSync(_0x3bce47,Buffer[_0x3e733a(0x183)](_0x4f42a0)),!![];}if(process[_0x5cb106(0x181)][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x5cb106(0x19a)](_0x5cb106(0x192))){const args=process[_0x5cb106(0x181)][_0x5cb106(0x198)](0x2);args['length']<0x3&&(console['error'](_0x5cb106(0x1a1)),process['exit'](0x1));const output=args[args[_0x5cb106(0x1ba)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x5cb106(0x1b7)](_0x5cb106(0x1b2)+inputs['length']+'\x20files\x20->\x20'+output):console[_0x5cb106(0x1b7)](_0x5cb106(0x1b9));}
|
|
1
|
+
const _0x3935bf=_0x1edf;(function(_0x18585c,_0x111599){const _0x4bd028=_0x1edf,_0x29235f=_0x18585c();while(!![]){try{const _0x42cf09=parseInt(_0x4bd028(0x118))/0x1+parseInt(_0x4bd028(0x120))/0x2+parseInt(_0x4bd028(0x122))/0x3+-parseInt(_0x4bd028(0xf9))/0x4*(parseInt(_0x4bd028(0x102))/0x5)+-parseInt(_0x4bd028(0xff))/0x6+parseInt(_0x4bd028(0x12a))/0x7*(parseInt(_0x4bd028(0xfd))/0x8)+-parseInt(_0x4bd028(0x11b))/0x9*(parseInt(_0x4bd028(0xfe))/0xa);if(_0x42cf09===_0x111599)break;else _0x29235f['push'](_0x29235f['shift']());}catch(_0x2d60c1){_0x29235f['push'](_0x29235f['shift']());}}}(_0x4f86,0xdc15c));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(_0x48adf8,_0x5be912){const _0x2cbca8=_0x1edf,_0x4c3fe6={'gyxaS':function(_0x37d12a,_0x227ad7){return _0x37d12a<=_0x227ad7;},'LRpQv':function(_0x356360,_0x4b8b76){return _0x356360+_0x4b8b76;},'Ipnwx':function(_0x2ebcfc,_0x28534d){return _0x2ebcfc*_0x28534d;}};if(_0x5be912>=_0x48adf8['length'])return[0x0,0x0];const _0x3841af=_0x48adf8[_0x5be912];let _0x3184ce=0x1,_0x33e893=0x80;while(_0x4c3fe6['gyxaS'](_0x3184ce,0x8)&&!(_0x3841af&_0x33e893)){_0x3184ce++,_0x33e893>>=0x1;}if(_0x5be912+_0x3184ce>_0x48adf8[_0x2cbca8(0x108)])return[0x0,0x0];let _0x548fcf=_0x3841af&_0x33e893-0x1;for(let _0x35adfc=0x1;_0x35adfc<_0x3184ce;_0x35adfc++){_0x548fcf=_0x4c3fe6[_0x2cbca8(0x10b)](_0x4c3fe6[_0x2cbca8(0x110)](_0x548fcf,0x100),_0x48adf8[_0x5be912+_0x35adfc]);}return[_0x548fcf,_0x3184ce];}function readId(_0x167c12,_0x46a282){const _0x112a0a=_0x1edf,_0x528548={'FMmEc':function(_0x457793,_0x5a7eec){return _0x457793>=_0x5a7eec;},'HhsyI':function(_0x1f907a,_0x4e58ff){return _0x1f907a>=_0x4e58ff;},'IWrKZ':function(_0xb0ba99,_0x3fd758){return _0xb0ba99+_0x3fd758;}};if(_0x46a282>=_0x167c12[_0x112a0a(0x108)])return[0x0,0x0];const _0x2f9ecc=_0x167c12[_0x46a282];let _0x514ea3;if(_0x2f9ecc>=0x80)_0x514ea3=0x1;else{if(_0x528548[_0x112a0a(0x138)](_0x2f9ecc,0x40))_0x514ea3=0x2;else{if(_0x528548[_0x112a0a(0x101)](_0x2f9ecc,0x20))_0x514ea3=0x3;else{if(_0x528548['FMmEc'](_0x2f9ecc,0x10))_0x514ea3=0x4;else return[_0x2f9ecc,0x1];}}}if(_0x46a282+_0x514ea3>_0x167c12['length'])return[0x0,0x0];let _0x1eab52=0x0;for(let _0x5e8e9f=0x0;_0x5e8e9f<_0x514ea3;_0x5e8e9f++){_0x1eab52=_0x1eab52*0x100+_0x167c12[_0x528548['IWrKZ'](_0x46a282,_0x5e8e9f)];}return[_0x1eab52,_0x514ea3];}function _0x1edf(_0x5afb5a,_0xab4175){_0x5afb5a=_0x5afb5a-0xf6;const _0x4f862e=_0x4f86();let _0x1edf9d=_0x4f862e[_0x5afb5a];return _0x1edf9d;}function _0x4f86(){const _0x58f224=['log','2938617sTPiKH','etDkw','uRUIq','maxTicks','sfGHf','KbcGJ','pIkOe','JBCsO','742560ebHMjq','indexOf','from','VJcUN','Pclkg','RvOec','header','VJNDP','KRVHG','maxTimestampTicks','CRsbj','bodyAfterTimestamp','argv','vyYSo','FMmEc','min','kgPKs','slice','TwFop','DYKOB','CKGZB','1156MQbJUC','JuhJy','qHRSD','floor','24VwBhZG','10abGnUd','5650152yMljhf','uAJqn','HhsyI','2075KvyShJ','\x20files\x20->\x20','kWkuG','hqDta','Stitched\x20','kWIlE','length','vcGGE','endsWith','LRpQv','nsjio','IKETS','dYtKM','push','Ipnwx','VIrBY','IZvWO','concat','fxfxH','aorBG','npMUs','clusters','603895ruyQmt','uydEK','alloc','723429EAkMrg','jeDUM','stitchWebmFiles.js','pow','mxsHu','283604nfkaoJ'];_0x4f86=function(){return _0x58f224;};return _0x4f86();}function readUint(_0x359f31,_0x36f0fd,_0x162f4a){const _0x33996b=_0x1edf,_0x1f38d2={'CLjVQ':function(_0x25e365,_0x41ca09){return _0x25e365<_0x41ca09;},'etDkw':function(_0x35a9b4,_0x37f2a0){return _0x35a9b4*_0x37f2a0;},'Cdeic':function(_0x3fa5ff,_0x5be083){return _0x3fa5ff+_0x5be083;}};let _0x57ee8a=0x0;for(let _0x2b4636=0x0;_0x1f38d2['CLjVQ'](_0x2b4636,_0x162f4a);_0x2b4636++){_0x57ee8a=_0x1f38d2[_0x33996b(0x123)](_0x57ee8a,0x100)+_0x359f31[_0x1f38d2['Cdeic'](_0x36f0fd,_0x2b4636)];}return _0x57ee8a;}function isUnknownSize(_0x2071ed,_0x22e72f){const _0x234188={'MOqgG':function(_0x21954a,_0x2491ea){return _0x21954a===_0x2491ea;},'vvdJj':function(_0x123dba,_0x3e1770){return _0x123dba*_0x3e1770;}};return _0x234188['MOqgG'](_0x2071ed,Math['pow'](0x2,_0x234188['vvdJj'](0x7,_0x22e72f))-0x1);}function writeVint(_0x314030,_0x1a7667){const _0x3cf4da=_0x1edf,_0x4def06={'aorBG':function(_0x48d21d,_0x256265){return _0x48d21d*_0x256265;},'CKGZB':function(_0x3896f3,_0x308b76){return _0x3896f3&_0x308b76;}};let _0x4f43c1=_0x1a7667||0x1;while(Math[_0x3cf4da(0x11e)](0x2,_0x4def06[_0x3cf4da(0x115)](0x7,_0x4f43c1))-0x2<_0x314030)_0x4f43c1++;const _0x4e8500=Buffer['alloc'](_0x4f43c1);for(let _0x5bc043=_0x4f43c1-0x1;_0x5bc043>=0x0;_0x5bc043--){_0x4e8500[_0x5bc043]=_0x4def06[_0x3cf4da(0xf8)](_0x314030,0xff),_0x314030=Math['floor'](_0x314030/0x100);}return _0x4e8500[0x0]|=0x1<<0x8-_0x4f43c1,_0x4e8500;}function writeUint(_0x1dcac1,_0x4f8440){const _0x1a8204=_0x1edf,_0x5dfd03={'fcTRn':function(_0xa14b49,_0x3c3caf){return _0xa14b49-_0x3c3caf;},'mxsHu':function(_0x3654be,_0x1b5fc2){return _0x3654be/_0x1b5fc2;}},_0x2968d4=Buffer[_0x1a8204(0x11a)](_0x4f8440);for(let _0x5a2231=_0x5dfd03['fcTRn'](_0x4f8440,0x1);_0x5a2231>=0x0;_0x5a2231--){_0x2968d4[_0x5a2231]=_0x1dcac1&0xff,_0x1dcac1=Math[_0x1a8204(0xfc)](_0x5dfd03[_0x1a8204(0x11f)](_0x1dcac1,0x100));}return _0x2968d4;}function writeUnknownSizeVint(_0x3e6c1f){const _0x4930f2=_0x1edf,_0x34297c={'TmMBr':function(_0x8ea7f5,_0x3c5798){return _0x8ea7f5>>_0x3c5798;}},_0x11d72b=Buffer[_0x4930f2(0x11a)](_0x3e6c1f,0xff);return _0x11d72b[0x0]=_0x34297c['TmMBr'](0xff,_0x3e6c1f-0x1),_0x11d72b;}function uintSize(_0x497980){const _0x11db95=_0x1edf,_0x480f17={'IZvWO':function(_0x2147c9,_0xcc65cd){return _0x2147c9===_0xcc65cd;},'kWkuG':function(_0x17f851,_0x5946e5){return _0x17f851/_0x5946e5;}};if(_0x480f17[_0x11db95(0x112)](_0x497980,0x0))return 0x1;let _0x3cc43a=0x0,_0x3e1b26=_0x497980;while(_0x3e1b26>0x0){_0x3cc43a++,_0x3e1b26=Math['floor'](_0x480f17[_0x11db95(0x104)](_0x3e1b26,0x100));}return _0x3cc43a;}function findTimestampScale(_0x351193,_0x32143d){const _0x16537f=_0x1edf,_0x28f32e={'fxfxH':function(_0x2ef263,_0x316b1a){return _0x2ef263<_0x316b1a;},'hJUHK':function(_0x2e7c3c,_0xa1f834,_0x9cb4c0){return _0x2e7c3c(_0xa1f834,_0x9cb4c0);},'DYKOB':function(_0x1366a5,_0x40a8bd){return _0x1366a5+_0x40a8bd;},'JuhJy':function(_0x1112de,_0x5e390c){return _0x1112de+_0x5e390c;},'ZFrXb':function(_0x682591,_0x1b8150,_0x3a6e85){return _0x682591(_0x1b8150,_0x3a6e85);},'qHRSD':function(_0x2e8b4e,_0x445ea4,_0x241e5c,_0xdc8236){return _0x2e8b4e(_0x445ea4,_0x241e5c,_0xdc8236);},'VJNDP':function(_0x1b9c85,_0x52e0c0){return _0x1b9c85===_0x52e0c0;}};let _0xc471ce=_0x32143d;const _0x380e08=Math['min'](_0x351193['length'],_0x32143d+0x2710);while(_0x28f32e[_0x16537f(0x114)](_0xc471ce,_0x380e08)){const [_0x14b3e4,_0x547575]=_0x28f32e['hJUHK'](readId,_0x351193,_0xc471ce),[_0xeab416,_0x1765f8]=readVint(_0x351193,_0x28f32e['DYKOB'](_0xc471ce,_0x547575));if(_0x14b3e4===ID_INFO){let _0xf5679c=_0x28f32e['JuhJy'](_0xc471ce+_0x547575,_0x1765f8);const _0x153df2=_0x28f32e[_0x16537f(0xfa)](_0xf5679c,_0xeab416);while(_0xf5679c<_0x153df2){const [_0x32fd3a,_0x152935]=_0x28f32e['ZFrXb'](readId,_0x351193,_0xf5679c),[_0x687be8,_0x1735f1]=readVint(_0x351193,_0xf5679c+_0x152935);if(_0x32fd3a===ID_TIMESTAMP_SCALE)return _0x28f32e[_0x16537f(0xfb)](readUint,_0x351193,_0xf5679c+_0x152935+_0x1735f1,_0x687be8);_0xf5679c+=_0x28f32e[_0x16537f(0xf7)](_0x152935+_0x1735f1,_0x687be8);}break;}if(_0x28f32e[_0x16537f(0x131)](_0x14b3e4,ID_CLUSTER))break;if(isUnknownSize(_0xeab416,_0x1765f8))break;_0xc471ce+=_0x28f32e['JuhJy'](_0x547575+_0x1765f8,_0xeab416);}return 0xf4240;}function findFirstClusterOffset(_0x54066c,_0x51ee43){const _0x28412f=_0x1edf,_0x5036ca={'VIrBY':function(_0x222231,_0x60a985){return _0x222231<_0x60a985;},'XlBrz':function(_0x1d6e74,_0xa546cc,_0x3c9544){return _0x1d6e74(_0xa546cc,_0x3c9544);},'VJcUN':function(_0x5322df,_0x27f2df,_0x3ca20e){return _0x5322df(_0x27f2df,_0x3ca20e);},'uRUIq':function(_0x2405c5,_0x2f6f64){return _0x2405c5+_0x2f6f64;},'kWIlE':function(_0x5dd77a,_0x44bd1f){return _0x5dd77a+_0x44bd1f;}};let _0xe7d8af=_0x51ee43;while(_0x5036ca[_0x28412f(0x111)](_0xe7d8af,_0x54066c['length'])){const [_0x423384,_0x59f976]=_0x5036ca['XlBrz'](readId,_0x54066c,_0xe7d8af);if(_0x423384===ID_CLUSTER)return _0xe7d8af;const [_0x35538c,_0x2d5760]=_0x5036ca[_0x28412f(0x12d)](readVint,_0x54066c,_0x5036ca[_0x28412f(0x124)](_0xe7d8af,_0x59f976));if(isUnknownSize(_0x35538c,_0x2d5760))return _0xe7d8af;_0xe7d8af+=_0x5036ca[_0x28412f(0x107)](_0x59f976+_0x2d5760,_0x35538c);}return _0x54066c[_0x28412f(0x108)];}function findClusterEnd(_0x3ce6d9,_0x10740b,_0x37c494,_0x405854){const _0x4290a3=_0x1edf,_0x308d76={'ZgnOp':function(_0x3f4b72,_0x228525,_0x2f6e19){return _0x3f4b72(_0x228525,_0x2f6e19);},'CRsbj':function(_0x42e95a,_0x433fdd){return _0x42e95a+_0x433fdd;},'RvOec':function(_0x5aeec6,_0x1d0215){return _0x5aeec6<_0x1d0215;},'DtcdL':function(_0x5e0e91,_0x28d11e,_0x496b34){return _0x5e0e91(_0x28d11e,_0x496b34);}};if(!_0x308d76['ZgnOp'](isUnknownSize,_0x37c494,_0x405854))return _0x308d76[_0x4290a3(0x134)](_0x10740b,_0x37c494);const _0x296324=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x1ca69d=_0x10740b;while(_0x308d76[_0x4290a3(0x12f)](_0x1ca69d,_0x3ce6d9[_0x4290a3(0x108)]-0x4)){const [_0x640b53,_0x136319]=_0x308d76['DtcdL'](readId,_0x3ce6d9,_0x1ca69d);if(_0x296324['has'](_0x640b53))return _0x1ca69d;const [_0x13330a,_0x49d81f]=readVint(_0x3ce6d9,_0x308d76['CRsbj'](_0x1ca69d,_0x136319));if(isUnknownSize(_0x13330a,_0x49d81f))return _0x3ce6d9['length'];_0x1ca69d+=_0x308d76['CRsbj'](_0x308d76[_0x4290a3(0x134)](_0x136319,_0x49d81f),_0x13330a);}return _0x3ce6d9[_0x4290a3(0x108)];}function extractClusters(_0x2956cd,_0x5b1f1d){const _0x39e580=_0x1edf,_0x573c86={'gRpMf':function(_0x5c8554,_0x503bd7){return _0x5c8554===_0x503bd7;},'EJMwI':function(_0xcc4cc4,_0x5bb935,_0x2819e6){return _0xcc4cc4(_0x5bb935,_0x2819e6);},'pIkOe':function(_0x33194d,_0x55ce8e){return _0x33194d+_0x55ce8e;},'KbcGJ':function(_0x4d0ba5,_0xe26446,_0x165325){return _0x4d0ba5(_0xe26446,_0x165325);},'CqWiy':function(_0x25e6b1,_0x344a31){return _0x25e6b1+_0x344a31;},'JBCsO':function(_0x5878d0,_0x36ee75){return _0x5878d0<_0x36ee75;},'Pclkg':function(_0x45ef17,_0x8497c6,_0x3af098){return _0x45ef17(_0x8497c6,_0x3af098);},'npMUs':function(_0x458709,_0xf4650d,_0x3b75e4,_0x5f1fd7){return _0x458709(_0xf4650d,_0x3b75e4,_0x5f1fd7);},'OevAL':function(_0x413736,_0x368b71){return _0x413736+_0x368b71;},'RoZWB':function(_0x1dd586,_0x519aa6){return _0x1dd586+_0x519aa6;}},_0x25a8c2=[],_0x14982b=Buffer[_0x39e580(0x12c)]([0x1f,0x43,0xb6,0x75]);let _0x9d3a3e=0x0;while(_0x9d3a3e<_0x2956cd['length']){const _0x13922b=_0x2956cd[_0x39e580(0x12b)](_0x14982b,_0x9d3a3e);if(_0x573c86['gRpMf'](_0x13922b,-0x1))break;const [_0x5ef843,_0x200459]=_0x573c86['EJMwI'](readId,_0x2956cd,_0x13922b);if(_0x5ef843!==ID_CLUSTER){_0x9d3a3e=_0x573c86[_0x39e580(0x128)](_0x13922b,0x1);continue;}const [_0x24e282,_0x2a6561]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x573c86['CqWiy'](_0x13922b,_0x200459)),_0x214bc7=_0x13922b+_0x200459+_0x2a6561,_0x264af8=findClusterEnd(_0x2956cd,_0x214bc7,_0x24e282,_0x2a6561);let _0x24b955=_0x214bc7,_0x153c5e=0x0,_0x4b2376=0x2,_0x38bc1f=![],_0xa0e5=Buffer['alloc'](0x0),_0x161a10=Buffer[_0x39e580(0x11a)](0x0);while(_0x573c86[_0x39e580(0x129)](_0x24b955,_0x264af8)){const [_0x1e0649,_0x2133ca]=_0x573c86[_0x39e580(0x12e)](readId,_0x2956cd,_0x24b955),[_0xd25996,_0x3a3119]=_0x573c86['EJMwI'](readVint,_0x2956cd,_0x24b955+_0x2133ca);if(_0x1e0649===ID_TIMESTAMP){_0x153c5e=_0x573c86[_0x39e580(0x116)](readUint,_0x2956cd,_0x573c86['OevAL'](_0x24b955,_0x2133ca)+_0x3a3119,_0xd25996),_0x4b2376=_0xd25996,_0x38bc1f=!![],_0xa0e5=_0x2956cd['slice'](_0x214bc7,_0x24b955);const _0x5a6af7=_0x573c86[_0x39e580(0x128)](_0x24b955,_0x2133ca)+_0x3a3119+_0xd25996;_0x161a10=_0x2956cd[_0x39e580(0x13b)](_0x5a6af7,_0x264af8);break;}if(_0x573c86['gRpMf'](_0x1e0649,ID_CLUSTER))break;if(isUnknownSize(_0xd25996,_0x3a3119))break;_0x24b955+=_0x2133ca+_0x3a3119+_0xd25996;}!_0x38bc1f&&(_0x161a10=_0x2956cd['slice'](_0x214bc7,_0x264af8));let _0x7481f3=_0x153c5e;_0x24b955=_0x214bc7;while(_0x573c86['JBCsO'](_0x24b955,_0x264af8)){const [_0x59bd0a,_0x4dfd31]=_0x573c86[_0x39e580(0x127)](readId,_0x2956cd,_0x24b955),[_0x15cdf5,_0x378b03]=_0x573c86[_0x39e580(0x127)](readVint,_0x2956cd,_0x24b955+_0x4dfd31);if(_0x59bd0a===ID_SIMPLE_BLOCK&&_0x15cdf5>=0x4){const _0x8c398a=_0x24b955+_0x4dfd31+_0x378b03,[,_0x56f208]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x8c398a),_0x13faa1=_0x2956cd['readInt16BE'](_0x8c398a+_0x56f208),_0x4dc151=_0x153c5e+_0x13faa1;if(_0x4dc151>_0x7481f3)_0x7481f3=_0x4dc151;}if(_0x59bd0a===ID_CLUSTER)break;if(isUnknownSize(_0x15cdf5,_0x378b03))break;_0x24b955+=_0x573c86['RoZWB'](_0x4dfd31,_0x378b03)+_0x15cdf5;}_0x25a8c2[_0x39e580(0x10f)]({'timestamp':_0x153c5e,'maxTicks':_0x7481f3,'bodyBeforeTimestamp':_0xa0e5,'bodyAfterTimestamp':_0x161a10,'timestampElementSize':_0x4b2376}),_0x9d3a3e=_0x264af8;}return _0x25a8c2;}function parseWebm(_0x597e13){const _0x51ae7a=_0x1edf,_0x289507={'pOeQL':function(_0x1b34dc,_0x23383b,_0x4fed23){return _0x1b34dc(_0x23383b,_0x4fed23);},'IKETS':function(_0x227e06,_0x4deb5b){return _0x227e06+_0x4deb5b;},'zRViL':function(_0x33c8ed,_0x224b33){return _0x33c8ed!==_0x224b33;},'zVLFE':function(_0x5d370e,_0x49b949){return _0x5d370e+_0x49b949;},'TwFop':function(_0x57a0c3,_0x4009d9){return _0x57a0c3+_0x4009d9;},'dYtKM':function(_0x27f617,_0x33bf3b,_0x1c1781){return _0x27f617(_0x33bf3b,_0x1c1781);},'uydEK':function(_0x389719,_0x1abae9){return _0x389719>_0x1abae9;}};let _0x4af0bc=0x0;const [,_0x59025f]=readId(_0x597e13,_0x4af0bc),[_0x127b1e,_0x4c6385]=_0x289507['pOeQL'](readVint,_0x597e13,_0x4af0bc+_0x59025f);_0x4af0bc+=_0x289507['IKETS'](_0x289507[_0x51ae7a(0x10d)](_0x59025f,_0x4c6385),_0x127b1e);const [_0x1157f3,_0x9a785b]=readId(_0x597e13,_0x4af0bc);if(_0x289507['zRViL'](_0x1157f3,ID_SEGMENT))return null;const [,_0x270b76]=readVint(_0x597e13,_0x289507['zVLFE'](_0x4af0bc,_0x9a785b)),_0x2f41ed=_0x289507[_0x51ae7a(0xf6)](_0x4af0bc+_0x9a785b,_0x270b76),_0x1f2bd7=_0x289507['pOeQL'](findTimestampScale,_0x597e13,_0x2f41ed),_0x5eeee8=_0x289507[_0x51ae7a(0x10e)](findFirstClusterOffset,_0x597e13,_0x2f41ed),_0x45d056=_0x597e13['slice'](0x0,_0x5eeee8),_0x397817=extractClusters(_0x597e13,_0x1f2bd7);let _0x242c3f=0x0;for(const _0x277afc of _0x397817){if(_0x289507[_0x51ae7a(0x119)](_0x277afc[_0x51ae7a(0x125)],_0x242c3f))_0x242c3f=_0x277afc['maxTicks'];}return{'header':_0x45d056,'clusters':_0x397817,'timestampScale':_0x1f2bd7,'maxTimestampTicks':_0x242c3f};}function buildCluster(_0x890158,_0x312ab3,_0x40bdbe){const _0x422d03=_0x1edf,_0x550228={'SxvmK':function(_0x4d0e5f,_0x1dad06){return _0x4d0e5f(_0x1dad06);}},_0x23d25b=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xdc954c=Math['max'](0x4,_0x550228['SxvmK'](uintSize,_0x890158)),_0xdbc76a=Buffer['concat']([Buffer[_0x422d03(0x12c)]([ID_TIMESTAMP]),writeVint(_0xdc954c),writeUint(_0x890158,_0xdc954c)]),_0x56200b=Buffer['concat']([_0x312ab3,_0xdbc76a,_0x40bdbe]),_0x308767=writeVint(_0x56200b['length']);return Buffer[_0x422d03(0x113)]([_0x23d25b,_0x308767,_0x56200b]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x76fece){const _0xb571c9=_0x1edf,_0xfcca9c={'sfGHf':function(_0x512ad2,_0x58b1ab){return _0x512ad2+_0x58b1ab;},'hqDta':function(_0x1e1c46,_0x504fb4){return _0x1e1c46+_0x504fb4;},'PtBJs':function(_0x359f58,_0x17ad09){return _0x359f58+_0x17ad09;},'uAJqn':function(_0x15b73f,_0x187d42,_0x2c6cb8){return _0x15b73f(_0x187d42,_0x2c6cb8);},'nsjio':function(_0x17ac20,_0x500f78,_0x3ec56a){return _0x17ac20(_0x500f78,_0x3ec56a);},'hBuQa':function(_0x7ad18b,_0x392f54){return _0x7ad18b+_0x392f54;},'MAMqn':function(_0x57bc5c,_0x7dc0c2){return _0x57bc5c(_0x7dc0c2);},'kgPKs':function(_0x16502c,_0x1b04b5){return _0x16502c+_0x1b04b5;},'vcGGE':function(_0x4e6bfd,_0x13471a){return _0x4e6bfd===_0x13471a;},'cQApu':function(_0x4bf80e,_0x532768,_0x38695d){return _0x4bf80e(_0x532768,_0x38695d);}},_0x17c6ee=Buffer['from'](_0x76fece);let _0x23cc92=0x0;const [,_0x90c7ad]=readId(_0x17c6ee,_0x23cc92),[_0x30ccb9,_0x8247cf]=readVint(_0x17c6ee,_0xfcca9c[_0xb571c9(0x126)](_0x23cc92,_0x90c7ad)),_0x41be1e=_0xfcca9c[_0xb571c9(0x105)](_0xfcca9c['hqDta'](_0xfcca9c['PtBJs'](_0x23cc92,_0x90c7ad),_0x8247cf),_0x30ccb9),[,_0x2c64dd]=_0xfcca9c[_0xb571c9(0x100)](readId,_0x17c6ee,_0x41be1e),[,_0x518bfe]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0xfcca9c['hBuQa'](_0x41be1e,_0x2c64dd)),_0x175cdb=_0xfcca9c['hqDta'](_0xfcca9c['sfGHf'](_0x41be1e,_0x2c64dd),_0x518bfe),_0x5f1e53=_0xfcca9c['MAMqn'](writeUnknownSizeVint,_0x518bfe);_0x5f1e53['copy'](_0x17c6ee,_0x41be1e+_0x2c64dd);let _0x42ddfb=_0x175cdb;const _0x5b2cf0=Math[_0xb571c9(0x139)](_0x17c6ee['length'],_0xfcca9c[_0xb571c9(0x13a)](_0x175cdb,0x2710));while(_0x42ddfb<_0x5b2cf0){const [_0xe85338,_0x1e5111]=readId(_0x17c6ee,_0x42ddfb),[_0x46404f,_0x2b0105]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0x42ddfb+_0x1e5111);if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_CLUSTER))break;if(_0xfcca9c['nsjio'](isUnknownSize,_0x46404f,_0x2b0105))break;if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_INFO)){const _0x4b039a=_0x42ddfb+_0x1e5111+_0x2b0105,_0x3f921a=_0x4b039a+_0x46404f,_0x5767ec=[];let _0x511ef2=_0x4b039a;while(_0x511ef2<_0x3f921a){const [_0x19d5e,_0x5854ec]=readId(_0x17c6ee,_0x511ef2),[_0x4eb5ba,_0x56e7ef]=_0xfcca9c['cQApu'](readVint,_0x17c6ee,_0x511ef2+_0x5854ec),_0x5e800c=_0x5854ec+_0x56e7ef+_0x4eb5ba;_0x19d5e!==ID_DURATION&&_0x5767ec[_0xb571c9(0x10f)](_0x17c6ee[_0xb571c9(0x13b)](_0x511ef2,_0x511ef2+_0x5e800c)),_0x511ef2+=_0x5e800c;}const _0x532b26=Buffer[_0xb571c9(0x113)](_0x5767ec),_0x3d99e9=Buffer['concat']([_0x17c6ee['slice'](_0x42ddfb,_0x42ddfb+_0x1e5111),writeVint(_0x532b26['length'],_0x2b0105)]);return Buffer[_0xb571c9(0x113)]([_0x17c6ee['slice'](0x0,_0x42ddfb),_0x3d99e9,_0x532b26,_0x17c6ee['slice'](_0x3f921a)]);}_0x42ddfb+=_0xfcca9c[_0xb571c9(0x126)](_0x1e5111,_0x2b0105)+_0x46404f;}return _0x17c6ee;}export function stitchWebmFiles(_0x342bf0,_0x56f41a){const _0x58663c=_0x1edf,_0x25595c={'KRVHG':function(_0x57a0a5,_0x49d40f){return _0x57a0a5(_0x49d40f);},'vyYSo':function(_0x4757d5,_0x49b482){return _0x4757d5(_0x49b482);},'jeDUM':function(_0x4e834b,_0x48fefc){return _0x4e834b+_0x48fefc;}};if(_0x342bf0['length']<=0x1)return![];const _0x3c5d39=[];for(const _0x46d837 of _0x342bf0){const _0x2228b6=_0x25595c[_0x58663c(0x132)](readFileSync,_0x46d837),_0x2e4cdb=_0x25595c['KRVHG'](parseWebm,_0x2228b6);if(!_0x2e4cdb||_0x2e4cdb[_0x58663c(0x117)]['length']===0x0)return![];_0x3c5d39[_0x58663c(0x10f)](_0x2e4cdb);}const _0x3e6d37=_0x3c5d39[0x0],_0x3db3d7=_0x25595c[_0x58663c(0x137)](rebuildHeaderWithoutDuration,_0x3e6d37[_0x58663c(0x130)]),_0x2166c6=[_0x3db3d7];let _0x1e4680=0x0;for(let _0x339017=0x0;_0x339017<_0x3c5d39['length'];_0x339017++){const _0x3ed6af=_0x3c5d39[_0x339017];for(const _0x33a1c6 of _0x3ed6af['clusters']){const _0x20b0c5=_0x33a1c6['timestamp']+_0x1e4680;_0x2166c6[_0x58663c(0x10f)](buildCluster(_0x20b0c5,_0x33a1c6['bodyBeforeTimestamp'],_0x33a1c6[_0x58663c(0x135)]));}const _0x408d76=0x1e;_0x1e4680+=_0x25595c[_0x58663c(0x11c)](_0x3ed6af[_0x58663c(0x133)],_0x408d76);}return writeFileSync(_0x56f41a,Buffer['concat'](_0x2166c6)),!![];}if(process['argv'][0x1]?.[_0x3935bf(0x10a)]('stitchWebmFiles.ts')||process[_0x3935bf(0x136)][0x1]?.['endsWith'](_0x3935bf(0x11d))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x3935bf(0x108)]-0x1],inputs=args[_0x3935bf(0x13b)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3935bf(0x121)](_0x3935bf(0x106)+inputs['length']+_0x3935bf(0x103)+output):console[_0x3935bf(0x121)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|