@ranger-testing/ranger-cli 3.1.2-alpha.059c7a3-40 → 3.1.2-alpha.b450a14-41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8a16dc,_0x27ce63){const _0x3f1970=_0x393d,_0x2f00f2=_0x8a16dc();while(!![]){try{const _0x151aa4=parseInt(_0x3f1970(0x16a))/0x1*(-parseInt(_0x3f1970(0x16e))/0x2)+-parseInt(_0x3f1970(0x152))/0x3+-parseInt(_0x3f1970(0x169))/0x4*(parseInt(_0x3f1970(0x148))/0x5)+-parseInt(_0x3f1970(0x15e))/0x6+parseInt(_0x3f1970(0x168))/0x7*(-parseInt(_0x3f1970(0x156))/0x8)+-parseInt(_0x3f1970(0x15c))/0x9+parseInt(_0x3f1970(0x14d))/0xa*(parseInt(_0x3f1970(0x161))/0xb);if(_0x151aa4===_0x27ce63)break;else _0x2f00f2['push'](_0x2f00f2['shift']());}catch(_0x4c10b6){_0x2f00f2['push'](_0x2f00f2['shift']());}}}(_0x2070,0x407eb));function _0x2070(){const _0x35d5af=['cloud','RANGER_TEST_USERNAME','7349485SbZART','Cloud\x20profile\x20(recommended)','dQfiO','cdpEndpoint','log','WHCtL','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','16555WOkjfp','128qTQtic','187721MqdtTt','profile','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','aXFCM','2aOMltN','YALfy','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','cuuOC','RPsUJ','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','environmentKey','name','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','eJTbJ','local','envBaseUrl','baseUrl','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','prompt','uHPXN','56445aoNShU','envStartPath','hzWBf','cwd','string','30crmiQa','status','Local\x20profile','startPath','YxKex','1021164VoWros','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','qqQlN','824bTXknF','url','FsyaO','domains','\x20does\x20not\x20exist.','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','3660885glSMej','env','1203102Oejfil'];_0x2070=function(){return _0x35d5af;};return _0x2070();}import{existsSync}from'fs';import _0x26ccc7 from'inquirer';function _0x393d(_0x353111,_0x277a66){_0x353111=_0x353111-0x147;const _0x207053=_0x2070();let _0x393d46=_0x207053[_0x353111];return _0x393d46;}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(_0x1db529){const _0x5db3af=_0x393d,_0x504db1={'aXFCM':function(_0xc05b1a,_0x30eb4a){return _0xc05b1a+_0x30eb4a;},'FsyaO':_0x5db3af(0x170),'WHCtL':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','qqQlN':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','LsZjk':function(_0x52f68c,_0x569ea1){return _0x52f68c(_0x569ea1);},'SyIHk':function(_0x520f63,_0x1af063){return _0x520f63&&_0x1af063;},'eJTbJ':_0x5db3af(0x162),'RPsUJ':'cloud','HpoPn':function(_0x3c5996,_0x2e7b9a,_0x3dafc5){return _0x3c5996(_0x2e7b9a,_0x3dafc5);},'YxKex':function(_0x33fda0,_0x48ffe8,_0xd8f9ca){return _0x33fda0(_0x48ffe8,_0xd8f9ca);},'dQfiO':function(_0x45b840,_0xc92bf2){return _0x45b840??_0xc92bf2;},'qjPbT':function(_0x27d5cd,_0xed0582){return _0x27d5cd(_0xed0582);},'BiDhR':function(_0x2f9bef,_0x270565){return _0x2f9bef(_0x270565);},'hzWBf':function(_0x14fe03,_0x3ec4fe,_0x29d58d){return _0x14fe03(_0x3ec4fe,_0x29d58d);},'uHPXN':function(_0x3a3e4f,_0x16cc82){return _0x3a3e4f(_0x16cc82);},'xXLBm':function(_0x1c8afd,_0x1f068b){return _0x1c8afd(_0x1f068b);}},_0xc543e5=_0x1db529[_0x5db3af(0x16b)];let _0x3edbea=_0x1db529['profile']??await readActiveProfileName(),_0x444099=null;if(!_0x3edbea&&process[_0x5db3af(0x15d)][_0x5db3af(0x160)]){const _0x3481fc=await resolveAdHocProfile();_0x3481fc&&(_0x3edbea=_0x3481fc['name'],_0x444099=_0x3481fc[_0x5db3af(0x16b)]);}if(!_0x3edbea)try{const _0x252c0c=await listCloudProfiles();if(_0x252c0c['length']===0x1){const _0x150255=_0x252c0c[0x0];_0x3edbea=_0x150255[_0x5db3af(0x175)],console[_0x5db3af(0x165)](_0x5db3af(0x17b)+_0x150255['name']),console[_0x5db3af(0x165)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x3edbea)throw new Error(_0x504db1[_0x5db3af(0x16d)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x504db1[_0x5db3af(0x158)])+_0x504db1[_0x5db3af(0x166)]+_0x5db3af(0x154)+_0x504db1[_0x5db3af(0x155)]);const _0x9be71f=_0x504db1['LsZjk'](getEnvDir,_0x3edbea),_0x4e4c78=existsSync(_0x9be71f);let _0x32b3cb=_0x444099,_0x243c52=![];if(!_0x32b3cb)try{_0x32b3cb=await _0x504db1['LsZjk'](fetchCloudProfile,_0x3edbea);if(!_0x32b3cb)_0x243c52=!![];}catch(_0x4dd292){_0x4dd292 instanceof ApiError&&_0x4dd292[_0x5db3af(0x14e)]===0x194&&(_0x243c52=!![]);}if(_0x504db1['SyIHk'](_0xc543e5,_0x243c52)&&!_0x4e4c78&&!_0x32b3cb)throw new Error(_0x504db1['aXFCM']('Profile\x20\x22'+_0xc543e5+_0x5db3af(0x173),_0x5db3af(0x16c))+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x32b3cb&&_0x4e4c78){let _0x11b596=!![];if(isInteractive()){const {source:_0x5b69b0}=await _0x26ccc7[_0x5db3af(0x17c)]([{'type':'list','name':'source','message':'Profile\x20\x22'+_0x3edbea+_0x5db3af(0x15b),'choices':[{'name':_0x504db1[_0x5db3af(0x177)],'value':_0x5db3af(0x15f)},{'name':_0x5db3af(0x14f),'value':_0x5db3af(0x178)}],'default':_0x504db1[_0x5db3af(0x172)]}]);_0x11b596=_0x5b69b0===_0x5db3af(0x15f);}if(!_0x11b596)_0x32b3cb=null;}const _0x45ec02=_0x504db1['HpoPn'](readProfileOverrides,process[_0x5db3af(0x14b)](),_0x3edbea);let _0x179f2b=null,_0x40938b,_0x864ab9,_0xe53263,_0x1e9536,_0x1a37a7=null,_0x3971f6;const _0x4dfec1=expandOverrides(_0x45ec02),_0xabc32=readUrlEnvVars();if(_0x32b3cb){_0x179f2b=_0x32b3cb;const _0x250660=_0x32b3cb['settings']??{},_0x20bbdc=_0x504db1[_0x5db3af(0x151)](mergeCloudProfileSettings,_0x250660,_0x504db1[_0x5db3af(0x163)](_0x45ec02,undefined)),_0x2a1158={..._0x32b3cb,'settings':_0x20bbdc};_0x1a37a7={'baseUrl':expandString(_0x250660['baseUrl']),'startPath':_0x504db1['LsZjk'](expandString,_0x250660[_0x5db3af(0x150)])};const _0x5cf3a3=await fetchAuthConfig(),_0x42c4af=_0x5cf3a3?_0x504db1[_0x5db3af(0x151)](resolveAuthEnvironmentLocally,_0x5cf3a3,_0x32b3cb[_0x5db3af(0x174)]):null;_0x3971f6=_0x42c4af?.[_0x5db3af(0x159)]?.[0x0];const _0x27ceba=_0x504db1['qjPbT'](resolveProfileUrl,{'flagBaseUrl':_0x1db529[_0x5db3af(0x17a)],'flagStartPath':_0x1db529[_0x5db3af(0x150)],'envBaseUrl':_0xabc32[_0x5db3af(0x179)],'envStartPath':_0xabc32['envStartPath'],'projectOverrides':_0x4dfec1,'cloudSettings':_0x1a37a7,'authEnvironmentDomain':_0x3971f6}),_0x37640d=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x37640d){if(!existsSync(_0x37640d))throw new Error('RANGER_SESSION_STATE_PATH='+_0x37640d+_0x5db3af(0x15a));_0x40938b=_0x37640d,_0x864ab9=resolveEnvVars(_0x20bbdc),_0xe53263=_0x504db1['BiDhR'](Boolean,_0x864ab9['cdpEndpoint']);}else{const _0x23590d=await _0x504db1[_0x5db3af(0x14a)](resolveCloudProfileSession,_0x2a1158,{'effectiveBaseUrl':_0x27ceba['baseUrl'],'telemetry':_0x1db529['telemetry']});_0x40938b=_0x23590d['authPath'],_0x864ab9=resolveEnvVars(_0x23590d['settings']),_0xe53263=_0x504db1[_0x5db3af(0x147)](Boolean,_0x864ab9[_0x5db3af(0x164)]),_0x3971f6=_0x23590d['resolvedEnv']?.[_0x5db3af(0x159)]?.[0x0];}}else{if(!_0x4e4c78)throw new Error('Profile\x20\x22'+_0x3edbea+_0x5db3af(0x153)+_0x3edbea);const _0x7c0360=await loadSettings(_0x3edbea);_0x864ab9=resolveEnvVars(_0x7c0360),_0xe53263=Boolean(_0x864ab9['cdpEndpoint']),_0x1e9536=_0x864ab9[_0x5db3af(0x17a)];}const _0x3119d0=_0x504db1['xXLBm'](resolveProfileUrl,{'flagBaseUrl':_0x1db529[_0x5db3af(0x17a)],'flagStartPath':_0x1db529['startPath'],'envBaseUrl':_0xabc32[_0x5db3af(0x179)],'envStartPath':_0xabc32[_0x5db3af(0x149)],'localSettingsBaseUrl':_0x1e9536,'projectOverrides':_0x4dfec1,'cloudSettings':_0x1a37a7,'authEnvironmentDomain':_0x3971f6}),_0x4410d3=_0x3119d0[_0x5db3af(0x157)]??_0x3119d0['baseUrl'];if(!_0x4410d3&&!_0xe53263)throw new Error(_0x5db3af(0x176)+_0x3edbea+_0x5db3af(0x167)+_0x3edbea+'\x20baseUrl\x20<url>');return{'activeProfile':_0x3edbea,'resolvedCloudProfile':_0x179f2b,'cloudAuthPath':_0x40938b,'resolvedSettings':_0x864ab9,'isCdpMode':_0xe53263,'url':_0x4410d3,'startPath':_0x3119d0['startPath']};}function expandString(_0x233a5d){const _0x1500c5=_0x393d,_0x18afff={'cuuOC':_0x1500c5(0x14c),'lhcNg':function(_0x5bffe5,_0x34ef2){return _0x5bffe5(_0x34ef2);}};if(typeof _0x233a5d!==_0x18afff[_0x1500c5(0x171)])return _0x233a5d;return _0x18afff['lhcNg'](resolveEnvVars,_0x233a5d);}function expandOverrides(_0x3545b9){const _0x3b2e60=_0x393d,_0x3d421f={'jJEmv':_0x3b2e60(0x14c),'BCOdA':function(_0x2ca053,_0x50a8d0){return _0x2ca053(_0x50a8d0);},'YALfy':function(_0x2eeb90,_0x6267ab){return _0x2eeb90===_0x6267ab;}};if(!_0x3545b9)return _0x3545b9;const _0x11476c={..._0x3545b9};return typeof _0x11476c[_0x3b2e60(0x17a)]===_0x3d421f['jJEmv']&&(_0x11476c['baseUrl']=_0x3d421f['BCOdA'](resolveEnvVars,_0x11476c[_0x3b2e60(0x17a)])),_0x3d421f[_0x3b2e60(0x16f)](typeof _0x11476c[_0x3b2e60(0x150)],_0x3d421f['jJEmv'])&&(_0x11476c['startPath']=_0x3d421f['BCOdA'](resolveEnvVars,_0x11476c[_0x3b2e60(0x150)])),_0x11476c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7f953,_0x4a3718){const _0x28d0d8=_0xfb0e,_0x2a3f8d=_0x7f953();while(!![]){try{const _0x42fb0d=-parseInt(_0x28d0d8(0xe1))/0x1*(-parseInt(_0x28d0d8(0xdf))/0x2)+parseInt(_0x28d0d8(0xd4))/0x3+parseInt(_0x28d0d8(0xdc))/0x4+parseInt(_0x28d0d8(0xd1))/0x5+parseInt(_0x28d0d8(0xd2))/0x6+-parseInt(_0x28d0d8(0xe2))/0x7*(parseInt(_0x28d0d8(0xd5))/0x8)+-parseInt(_0x28d0d8(0xd9))/0x9;if(_0x42fb0d===_0x4a3718)break;else _0x2a3f8d['push'](_0x2a3f8d['shift']());}catch(_0xce12d2){_0x2a3f8d['push'](_0x2a3f8d['shift']());}}}(_0x1ee1,0x98cba));function firstDefined(..._0x1de74d){const _0x5cbad8={'qmERM':function(_0x438fd8,_0x174192){return _0x438fd8!==_0x174192;}};for(const _0x45b505 of _0x1de74d){if(_0x5cbad8['qmERM'](_0x45b505,undefined)&&_0x5cbad8['qmERM'](_0x45b505,null)&&_0x5cbad8['qmERM'](_0x45b505,''))return _0x45b505;}return undefined;}function normalizeAuthEnvironmentDomain(_0x34e1d1){if(!_0x34e1d1)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x34e1d1))return _0x34e1d1;return'https://'+_0x34e1d1;}export function resolveBaseUrl(_0x55fe62){const _0x5e3ef9=_0xfb0e,_0x2d99d2={'WkkbV':'baseUrl'},_0x41b7ab=_0x55fe62['projectOverrides'],_0x4729ca=!!_0x41b7ab&&_0x2d99d2['WkkbV']in _0x41b7ab,_0x477f6f=_0x41b7ab?.[_0x5e3ef9(0xd7)],_0x46d7f9=!(_0x4729ca&&_0x477f6f===null);return firstDefined(_0x55fe62[_0x5e3ef9(0xde)],_0x55fe62[_0x5e3ef9(0xd6)],_0x55fe62[_0x5e3ef9(0xd3)],typeof _0x477f6f==='string'?_0x477f6f:undefined,_0x46d7f9?_0x55fe62[_0x5e3ef9(0xdd)]?.[_0x5e3ef9(0xd7)]:undefined,_0x46d7f9?normalizeAuthEnvironmentDomain(_0x55fe62[_0x5e3ef9(0xda)]):undefined);}function _0xfb0e(_0x39173b,_0x2c52b2){_0x39173b=_0x39173b-0xcf;const _0x1ee111=_0x1ee1();let _0xfb0efa=_0x1ee111[_0x39173b];return _0xfb0efa;}export function resolveStartPath(_0x7e4f68){const _0x16eaaf=_0xfb0e,_0x1eb824={'VjTwR':function(_0x51e37f,_0x224935){return _0x51e37f in _0x224935;},'ewIJI':_0x16eaaf(0xd0),'QypnC':function(_0x16582f,_0x181bff){return _0x16582f===_0x181bff;},'IecDB':function(_0x1c729d,_0x79f01b,_0x5a41e0,_0x4ab0c6,_0x50d2b8){return _0x1c729d(_0x79f01b,_0x5a41e0,_0x4ab0c6,_0x50d2b8);}},_0x269b8b=_0x7e4f68['projectOverrides'],_0x2c6dc4=!!_0x269b8b&&_0x1eb824['VjTwR'](_0x1eb824['ewIJI'],_0x269b8b),_0x1075dc=_0x269b8b?.[_0x16eaaf(0xd0)],_0x584bca=!(_0x2c6dc4&&_0x1eb824['QypnC'](_0x1075dc,null));return _0x1eb824['IecDB'](firstDefined,_0x7e4f68[_0x16eaaf(0xd8)],_0x7e4f68['envStartPath'],_0x1eb824['QypnC'](typeof _0x1075dc,_0x16eaaf(0xdb))?_0x1075dc:undefined,_0x584bca?_0x7e4f68['cloudSettings']?.['startPath']:undefined);}export function joinBaseAndPath(_0x469e04,_0x568610){const _0x14e5a5=_0xfb0e,_0x599642={'yiNJB':function(_0x5503a1,_0x5c606b){return _0x5503a1+_0x5c606b;}};if(!_0x469e04)return undefined;if(!_0x568610)return _0x469e04;const _0x68d76d=_0x469e04['endsWith']('/')?_0x469e04[_0x14e5a5(0xcf)](0x0,-0x1):_0x469e04,_0x59b05b=_0x568610['startsWith']('/')?_0x568610:_0x599642['yiNJB']('/',_0x568610);return _0x68d76d+_0x59b05b;}export function resolveProfileUrl(_0x3fc089){const _0x2b554c=_0xfb0e,_0x3d3ef5={'ovUjc':function(_0x56af53,_0xa2e1f8){return _0x56af53(_0xa2e1f8);}},_0x11ff7a=_0x3d3ef5[_0x2b554c(0xe3)](resolveBaseUrl,_0x3fc089),_0x227b63=resolveStartPath(_0x3fc089);return{'baseUrl':_0x11ff7a,'startPath':_0x227b63,'url':joinBaseAndPath(_0x11ff7a,_0x227b63)};}export function readUrlEnvVars(_0x44dcee=process['env']){const _0x25beff=_0xfb0e;return{'envBaseUrl':_0x44dcee['RANGER_BASE_URL'],'envStartPath':_0x44dcee[_0x25beff(0xe0)]};}function _0x1ee1(){const _0x127f29=['string','51712ApVPBk','cloudSettings','flagBaseUrl','4TyNwtw','RANGER_START_PATH','348236wiCnRa','7805FCCwCw','ovUjc','slice','startPath','1808690gMDeYY','6588282YYXQfU','localSettingsBaseUrl','2791407wbwIYw','1424XLKsQx','envBaseUrl','baseUrl','flagStartPath','20478006oIscNG','authEnvironmentDomain'];_0x1ee1=function(){return _0x127f29;};return _0x1ee1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x22f6(_0x570ab9,_0x571a67){_0x570ab9=_0x570ab9-0x1eb;const _0x3a0978=_0x3a09();let _0x22f6d5=_0x3a0978[_0x570ab9];return _0x22f6d5;}(function(_0x3ab6d9,_0x43278e){const _0x4607d6=_0x22f6,_0x4b04af=_0x3ab6d9();while(!![]){try{const _0x573cb6=parseInt(_0x4607d6(0x1f2))/0x1*(-parseInt(_0x4607d6(0x1ee))/0x2)+-parseInt(_0x4607d6(0x1ef))/0x3+parseInt(_0x4607d6(0x1f3))/0x4+parseInt(_0x4607d6(0x1f5))/0x5+-parseInt(_0x4607d6(0x1f9))/0x6*(-parseInt(_0x4607d6(0x1ed))/0x7)+-parseInt(_0x4607d6(0x1f1))/0x8*(-parseInt(_0x4607d6(0x1f0))/0x9)+parseInt(_0x4607d6(0x1ec))/0xa*(-parseInt(_0x4607d6(0x1f6))/0xb);if(_0x573cb6===_0x43278e)break;else _0x4b04af['push'](_0x4b04af['shift']());}catch(_0x2bb1a6){_0x4b04af['push'](_0x4b04af['shift']());}}}(_0x3a09,0xc9aaf));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x3a09(){const _0xea84d4=['8079020IWzxiT','33LLtxAl','baseDelayMs','),\x20retrying\x20in\x20','18kpHOcb','label','7530010GBFyjN','1751743KHxSuX','268318bqlZNf','3256296kGerzz','3725361miFitI','24pOgiHw','1HNdeWJ','2785148trFlPK','maxRetries'];_0x3a09=function(){return _0xea84d4;};return _0x3a09();}export async function withRetry(_0x2904e3,_0x32056f){const _0x21a3f3=_0x22f6,_0x2a93b9={'FiGFR':function(_0x4245b4,_0xbfd917){return _0x4245b4<=_0xbfd917;},'TYQlU':function(_0x4adb48,_0x1a8386){return _0x4adb48(_0x1a8386);},'TCWsf':function(_0x573f1,_0x53c0b9){return _0x573f1<_0x53c0b9;},'Zjpsn':function(_0x572127,_0x587e56){return _0x572127*_0x587e56;}},_0x3ac08f=_0x32056f?.[_0x21a3f3(0x1f4)]??DEFAULT_MAX_RETRIES,_0x4f0f67=_0x32056f?.[_0x21a3f3(0x1f7)]??DEFAULT_BASE_DELAY_MS;let _0x34cbb8;for(let _0x395d66=0x0;_0x2a93b9['FiGFR'](_0x395d66,_0x3ac08f);_0x395d66++){try{return await _0x2904e3();}catch(_0x21d73e){_0x34cbb8=_0x21d73e instanceof Error?_0x21d73e:new Error(_0x2a93b9['TYQlU'](String,_0x21d73e));if(_0x2a93b9['TCWsf'](_0x395d66,_0x3ac08f)){const _0x5b2007=_0x2a93b9['Zjpsn'](_0x4f0f67,Math['pow'](0x2,_0x395d66));_0x32056f?.['label']&&console['error'](_0x32056f[_0x21a3f3(0x1eb)]+'\x20failed\x20(attempt\x20'+(_0x395d66+0x1)+'/'+(_0x3ac08f+0x1)+_0x21a3f3(0x1f8)+_0x5b2007+'ms...'),await new Promise(_0x539afe=>setTimeout(_0x539afe,_0x5b2007));}}}throw _0x34cbb8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1847b2=_0x4723;(function(_0x18e435,_0x4d4c64){const _0x1fb6b6=_0x4723,_0x4a20bd=_0x18e435();while(!![]){try{const _0x16687b=parseInt(_0x1fb6b6(0xda))/0x1+-parseInt(_0x1fb6b6(0xb2))/0x2+parseInt(_0x1fb6b6(0xad))/0x3*(parseInt(_0x1fb6b6(0xb3))/0x4)+-parseInt(_0x1fb6b6(0xb4))/0x5*(-parseInt(_0x1fb6b6(0xbe))/0x6)+-parseInt(_0x1fb6b6(0xcb))/0x7+parseInt(_0x1fb6b6(0xdc))/0x8+-parseInt(_0x1fb6b6(0xd7))/0x9;if(_0x16687b===_0x4d4c64)break;else _0x4a20bd['push'](_0x4a20bd['shift']());}catch(_0x2d8002){_0x4a20bd['push'](_0x4a20bd['shift']());}}}(_0x487a,0x436c6));import*as _0x1a8a80 from'fs';import*as _0x281bda from'path';import*as _0x28838d from'os';import{execSync}from'child_process';function _0x4723(_0x401d77,_0x2a3b0b){_0x401d77=_0x401d77-0xad;const _0x487acc=_0x487a();let _0x47239f=_0x487acc[_0x401d77];return _0x47239f;}const CACHE_FILE=_0x281bda['join'](_0x28838d[_0x1847b2(0xbc)](),'.claude',_0x1847b2(0xb0));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x31b541=_0x1847b2;try{if(_0x1a8a80['existsSync'](CACHE_FILE)){const _0x1f2b6f=JSON[_0x31b541(0xc4)](_0x1a8a80['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x1f2b6f['sessions']||{},'branches':_0x1f2b6f[_0x31b541(0xc6)]||{},'lastEnabledSessionClearedAt':_0x1f2b6f['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x3b1fbf){const _0x5cc8b3=_0x1847b2;try{const _0x56707f=_0x281bda[_0x5cc8b3(0xb6)](CACHE_FILE);!_0x1a8a80[_0x5cc8b3(0xc7)](_0x56707f)&&_0x1a8a80['mkdirSync'](_0x56707f,{'recursive':!![]}),_0x1a8a80[_0x5cc8b3(0xcc)](CACHE_FILE,JSON['stringify'](_0x3b1fbf,null,0x2));}catch{}}export function getCurrentBranch(){const _0x42398b=_0x1847b2,_0x4faafb={'BaBQd':function(_0x2fb1eb,_0x1081d6,_0x3ab773){return _0x2fb1eb(_0x1081d6,_0x3ab773);},'wUDYO':_0x42398b(0xc2),'buokn':_0x42398b(0xd8)};try{const _0xe4bc59=_0x4faafb[_0x42398b(0xb5)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x42398b(0xd1),'stdio':[_0x4faafb[_0x42398b(0xaf)],'pipe','pipe']})[_0x42398b(0xd3)]();if(!_0xe4bc59||_0xe4bc59===_0x4faafb[_0x42398b(0xae)])return null;return _0xe4bc59;}catch{return null;}}export function enableBranch(_0x2c7981){const _0x4b22e1=loadCache();_0x4b22e1['branches'][_0x2c7981]=!![],saveCache(_0x4b22e1);}function _0x487a(){const _0x1e322a=['6841053DNtGXL','HEAD','pHVRV','90620LdSEFM','lastStopReminderAt','482872FCpQoY','now','GOflp','5550Ursldp','buokn','wUDYO','.ranger_cache.json','odsUU','1066WNJhVA','988qOOVLL','1510sugoMU','BaBQd','dirname','registeredAt','prompted','xKcBu','GheuP','qkkPb','homedir','enabled','9690urFVCp','lastEnabledSessionClearedAt','CyRuM','QANnh','pipe','featureId','parse','toISOString','branches','existsSync','DLKtK','qnWqg','Viinr','411901FwQcnO','writeFileSync','RlPqy','kVVAZ','sessions','currentBranch','utf-8','SRzXr','trim','master','gWAKm','main'];_0x487a=function(){return _0x1e322a;};return _0x487a();}export function disableBranch(_0x1b0c53){const _0x50bf30=_0x1847b2,_0x5323a8={'nsAnQ':function(_0x1536fd){return _0x1536fd();}},_0x2ee9e0=_0x5323a8['nsAnQ'](loadCache);delete _0x2ee9e0[_0x50bf30(0xc6)][_0x1b0c53],saveCache(_0x2ee9e0);}export function isBranchEnabled(_0x4afe98){const _0x54a895=_0x1847b2,_0x12bc30={'kVVAZ':function(_0x2d4573){return _0x2d4573();},'qnWqg':function(_0x176692,_0x1a96e5){return _0x176692===_0x1a96e5;}},_0x908241=_0x12bc30[_0x54a895(0xce)](loadCache);return _0x12bc30[_0x54a895(0xc9)](_0x908241['branches'][_0x4afe98],!![]);}function getOrCreateSession(_0x300b74,_0xcc92fe){const _0x1b9d25=_0x1847b2;return!_0x300b74['sessions'][_0xcc92fe]&&(_0x300b74[_0x1b9d25(0xcf)][_0xcc92fe]={}),_0x300b74['sessions'][_0xcc92fe];}export function enableSession(_0x54c810){const _0x4ff6c4=_0x1847b2,_0x936cc3={'XtDas':function(_0x48817d){return _0x48817d();},'iJWAX':function(_0x277d3f,_0xe67644,_0x92c25f){return _0x277d3f(_0xe67644,_0x92c25f);},'ayrlb':function(_0x57355f,_0x23be5a){return _0x57355f!==_0x23be5a;},'SwIeZ':'main'},_0x42a3a0=_0x936cc3['XtDas'](loadCache),_0x2a45d8=_0x936cc3['iJWAX'](getOrCreateSession,_0x42a3a0,_0x54c810);_0x2a45d8[_0x4ff6c4(0xbd)]=!![];const _0x35586a=getCurrentBranch();_0x35586a&&_0x936cc3['ayrlb'](_0x35586a,_0x936cc3['SwIeZ'])&&_0x35586a!=='master'&&(_0x42a3a0[_0x4ff6c4(0xc6)][_0x35586a]=!![],_0x2a45d8[_0x4ff6c4(0xd0)]=_0x35586a),saveCache(_0x42a3a0);}export function isSessionEnabled(_0xf86ce0){const _0x547795=_0x1847b2,_0x3776e1={'Viinr':function(_0x5f4b45,_0x35c9bb){return _0x5f4b45===_0x35c9bb;},'lKlGb':function(_0x16236c,_0x3d3fba){return _0x16236c||_0x3d3fba;}},_0x46f546=loadCache(),_0x29ebc9=getCurrentBranch();if(!_0x29ebc9||_0x3776e1['Viinr'](_0x29ebc9,'main')||_0x29ebc9==='master')return _0x3776e1['Viinr'](_0x46f546['sessions'][_0xf86ce0]?.[_0x547795(0xbd)],!![]);const _0x45623a=_0x3776e1[_0x547795(0xca)](_0x46f546['branches'][_0x29ebc9],!![]),_0x14de21=_0x46f546[_0x547795(0xcf)][_0xf86ce0]?.[_0x547795(0xbd)]===!![];return _0x3776e1['lKlGb'](_0x45623a,_0x14de21);}export function disableSession(_0x52dfb9){const _0x352f7b=_0x1847b2,_0x33d828={'RlPqy':function(_0x17066a){return _0x17066a();}},_0xf72eb0=_0x33d828[_0x352f7b(0xcd)](loadCache),_0x1448f5=getOrCreateSession(_0xf72eb0,_0x52dfb9);_0x1448f5[_0x352f7b(0xbd)]=![],saveCache(_0xf72eb0);}export function updateBranchTracking(_0x4decb6){const _0x2680f6=_0x1847b2,_0x18b564={'hkCfT':function(_0x4b5867){return _0x4b5867();},'pXQiM':function(_0x1b8770,_0x1af38d){return _0x1b8770===_0x1af38d;},'ccwir':function(_0x3d5746,_0x1e5a09){return _0x3d5746!==_0x1e5a09;}},_0x13189d=_0x18b564['hkCfT'](loadCache),_0x5d36d8=_0x13189d[_0x2680f6(0xcf)][_0x4decb6];if(!_0x5d36d8?.['enabled'])return;const _0x3faccf=getCurrentBranch();if(!_0x3faccf||_0x18b564['pXQiM'](_0x3faccf,'main')||_0x3faccf==='master')return;_0x18b564['ccwir'](_0x5d36d8['currentBranch'],_0x3faccf)&&(_0x13189d['branches'][_0x3faccf]=!![],_0x5d36d8['currentBranch']=_0x3faccf,saveCache(_0x13189d));}export function initBranchTracking(_0x48024f){const _0x354e9f=_0x1847b2,_0xfc81f7={'pHVRV':function(_0x2d11f5){return _0x2d11f5();},'GOflp':function(_0x547f2c,_0x13cf7c){return _0x547f2c===_0x13cf7c;},'GheuP':_0x354e9f(0xd4)},_0x14c902=loadCache(),_0x5946f2=_0xfc81f7[_0x354e9f(0xd9)](getCurrentBranch);if(!_0x5946f2||_0x5946f2===_0x354e9f(0xd6)||_0xfc81f7[_0x354e9f(0xde)](_0x5946f2,_0xfc81f7[_0x354e9f(0xba)]))return;if(_0x14c902['branches'][_0x5946f2]===!![]){const _0x16b004=getOrCreateSession(_0x14c902,_0x48024f);_0x16b004['enabled']=!![],_0x16b004['currentBranch']=_0x5946f2,saveCache(_0x14c902);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x267e8b){const _0x3d0811=_0x1847b2,_0x20bdf3={'odsUU':function(_0x4cd673){return _0x4cd673();}},_0x410490=_0x20bdf3[_0x3d0811(0xb1)](loadCache),_0x189617=_0x410490['sessions'][_0x267e8b];_0x189617?.['enabled']&&(_0x410490['lastEnabledSessionClearedAt']=Date[_0x3d0811(0xdd)](),saveCache(_0x410490));}export function shouldAutoEnableAfterClear(_0x1a0f8d){const _0x45538b=_0x1847b2,_0x2549be={'DLKtK':'clear','gGuoQ':function(_0x1c0e4b,_0x3b9072){return _0x1c0e4b<=_0x3b9072;}};if(_0x1a0f8d!==_0x2549be[_0x45538b(0xc8)])return![];const _0x2db194=loadCache(),_0x37a468=_0x2db194['lastEnabledSessionClearedAt'];if(!_0x37a468)return![];const _0x364852=Date[_0x45538b(0xdd)]()-_0x37a468;return _0x2549be['gGuoQ'](_0x364852,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0xccda33){const _0x58a0ae=_0x1847b2,_0x4de94d={'QANnh':function(_0x4e092c){return _0x4e092c();},'CyRuM':_0x58a0ae(0xd6),'CBuXt':function(_0x19bc07,_0xf7796f){return _0x19bc07!==_0xf7796f;}},_0x11ce5c=_0x4de94d[_0x58a0ae(0xc1)](loadCache),_0x1dcb38=getOrCreateSession(_0x11ce5c,_0xccda33);_0x1dcb38['enabled']=!![];const _0x9b564d=getCurrentBranch();_0x9b564d&&_0x9b564d!==_0x4de94d[_0x58a0ae(0xc0)]&&_0x4de94d['CBuXt'](_0x9b564d,_0x58a0ae(0xd4))&&(_0x1dcb38['currentBranch']=_0x9b564d),delete _0x11ce5c[_0x58a0ae(0xbf)],saveCache(_0x11ce5c);}export function registerSession(_0x5a90d5,_0xb9358f){const _0x150ebc=_0x1847b2,_0x118d36={'ISvMf':function(_0x4f6960,_0x59dda2,_0x4a8102){return _0x4f6960(_0x59dda2,_0x4a8102);},'tvVFW':function(_0xfd15c4,_0xc617be){return _0xfd15c4(_0xc617be);}},_0x668934=loadCache(),_0x2567cb=_0x118d36['ISvMf'](getOrCreateSession,_0x668934,_0x5a90d5);_0x2567cb['featureId']=_0xb9358f,_0x2567cb[_0x150ebc(0xb7)]=new Date()[_0x150ebc(0xc5)](),_0x118d36['tvVFW'](saveCache,_0x668934);}export function getSessionEntry(_0x1c7b89){const _0x59aa77=_0x1847b2,_0x545464=loadCache(),_0x3d9269=_0x545464['sessions'][_0x1c7b89];if(_0x3d9269?.[_0x59aa77(0xc3)]&&_0x3d9269?.['registeredAt'])return{'featureId':_0x3d9269['featureId'],'registeredAt':_0x3d9269['registeredAt']};return null;}export function unregisterSession(_0x8dd1ae){const _0x54cde6=_0x1847b2,_0x14145e={'qkkPb':function(_0x124375){return _0x124375();}},_0x136887=_0x14145e[_0x54cde6(0xbb)](loadCache),_0x27b5ad=_0x136887['sessions'][_0x8dd1ae];_0x27b5ad&&(delete _0x27b5ad['featureId'],delete _0x27b5ad['registeredAt'],saveCache(_0x136887));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1d7c03){const _0x158ca4=_0x1847b2,_0x426fbe={'HEKVc':function(_0x22036a){return _0x22036a();},'KljsW':function(_0x51f719,_0x573b59,_0x25172d){return _0x51f719(_0x573b59,_0x25172d);},'SRzXr':function(_0x2d0a5d,_0x8746ae){return _0x2d0a5d>=_0x8746ae;},'xKcBu':function(_0x8a78aa,_0x11c136){return _0x8a78aa-_0x11c136;},'TtxCr':function(_0x218cb6,_0xb3c968){return _0x218cb6(_0xb3c968);}},_0x52d096=_0x426fbe['HEKVc'](loadCache),_0x48f731=_0x426fbe['KljsW'](getOrCreateSession,_0x52d096,_0x1d7c03),_0x277896=_0x48f731['lastPlanReminderAt']||0x0,_0x446c47=Date[_0x158ca4(0xdd)]();if(_0x426fbe[_0x158ca4(0xd2)](_0x426fbe[_0x158ca4(0xb9)](_0x446c47,_0x277896),PLAN_REMINDER_INTERVAL_MS))return _0x48f731['lastPlanReminderAt']=_0x446c47,_0x426fbe['TtxCr'](saveCache,_0x52d096),!![];return![];}export function shouldShowStopReminder(_0x580f98){const _0x5c16cf=_0x1847b2,_0x30cd6c={'LHzQt':function(_0x10104e){return _0x10104e();},'YBdsI':function(_0x3a0231,_0x9e05e){return _0x3a0231-_0x9e05e;},'wwREv':function(_0x278092,_0x33d2a0){return _0x278092(_0x33d2a0);}},_0x560c06=_0x30cd6c['LHzQt'](loadCache),_0x9ea201=getOrCreateSession(_0x560c06,_0x580f98),_0x491360=_0x9ea201[_0x5c16cf(0xdb)]||0x0,_0x635b9f=Date[_0x5c16cf(0xdd)]();if(_0x30cd6c['YBdsI'](_0x635b9f,_0x491360)>=STOP_REMINDER_INTERVAL_MS)return _0x9ea201[_0x5c16cf(0xdb)]=_0x635b9f,_0x30cd6c['wwREv'](saveCache,_0x560c06),!![];return![];}export function hasSessionBeenPrompted(_0x14b484){const _0x422904=_0x1847b2,_0x455e75={'sTiTS':function(_0x49f33e,_0x4b2627){return _0x49f33e===_0x4b2627;}},_0x6062fc=loadCache();return _0x455e75['sTiTS'](_0x6062fc['sessions'][_0x14b484]?.[_0x422904(0xb8)],!![]);}export function markSessionPrompted(_0x263c58){const _0x20acc8=_0x1847b2,_0x3ce4ef={'Nijlv':function(_0x370697){return _0x370697();},'gWAKm':function(_0x5bf789,_0x11e529,_0x4a20ac){return _0x5bf789(_0x11e529,_0x4a20ac);}},_0x5798ca=_0x3ce4ef['Nijlv'](loadCache),_0x3a52da=_0x3ce4ef[_0x20acc8(0xd5)](getOrCreateSession,_0x5798ca,_0x263c58);_0x3a52da[_0x20acc8(0xb8)]=!![],saveCache(_0x5798ca);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x20d83c=_0x2cff;(function(_0xff7de4,_0x2b10d3){const _0x4fa31e=_0x2cff,_0x460611=_0xff7de4();while(!![]){try{const _0x568b72=parseInt(_0x4fa31e(0x183))/0x1+-parseInt(_0x4fa31e(0x17d))/0x2*(parseInt(_0x4fa31e(0x193))/0x3)+parseInt(_0x4fa31e(0x19d))/0x4+parseInt(_0x4fa31e(0x185))/0x5+parseInt(_0x4fa31e(0x1a0))/0x6*(-parseInt(_0x4fa31e(0x18f))/0x7)+-parseInt(_0x4fa31e(0x18b))/0x8*(parseInt(_0x4fa31e(0x18c))/0x9)+parseInt(_0x4fa31e(0x187))/0xa;if(_0x568b72===_0x2b10d3)break;else _0x460611['push'](_0x460611['shift']());}catch(_0x483d6f){_0x460611['push'](_0x460611['shift']());}}}(_0x346e,0xa7dc3));import*as _0x1b0457 from'fs';import*as _0x3e2176 from'path';import*as _0x4a676 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x3e2176[_0x20d83c(0x177)](_0x4a676[_0x20d83c(0x199)](),_0x20d83c(0x1a3),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x54c9d7=_0x20d83c,_0x21b66c={'NVhgP':function(_0x229aed){return _0x229aed();}};try{if(_0x1b0457['existsSync'](CACHE_FILE)){const _0x465ca7=JSON['parse'](_0x1b0457[_0x54c9d7(0x186)](CACHE_FILE,_0x54c9d7(0x196)));return{'version':0x3,'sessions':_0x465ca7[_0x54c9d7(0x181)]||{},'branches':_0x465ca7['branches']||{},'lastEnabledSessionClearedAt':_0x465ca7[_0x54c9d7(0x1a4)]};}}catch{}return _0x21b66c[_0x54c9d7(0x184)](createEmptyCache);}function saveCache(_0x58d744){const _0x29e373=_0x20d83c;try{const _0x4a5da4=_0x3e2176[_0x29e373(0x176)](CACHE_FILE);!_0x1b0457[_0x29e373(0x1a2)](_0x4a5da4)&&_0x1b0457['mkdirSync'](_0x4a5da4,{'recursive':!![]}),_0x1b0457[_0x29e373(0x17c)](CACHE_FILE,JSON[_0x29e373(0x19b)](_0x58d744,null,0x2));}catch{}}export function getCurrentBranch(){const _0x50e4f5=_0x20d83c,_0x47e730={'yhgch':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','LFNLS':_0x50e4f5(0x192),'yfphT':function(_0x3b3de9,_0x40a0b7){return _0x3b3de9===_0x40a0b7;},'NOxzd':'HEAD'};try{const _0x4b1c2c=execSync(_0x47e730[_0x50e4f5(0x18d)],{'encoding':'utf-8','stdio':['pipe',_0x47e730['LFNLS'],'pipe']})['trim']();if(!_0x4b1c2c||_0x47e730['yfphT'](_0x4b1c2c,_0x47e730['NOxzd']))return null;return _0x4b1c2c;}catch{return null;}}export function enableBranch(_0x4512cd){const _0x67dce4={'ZrCzs':function(_0x28fc17,_0x33f226){return _0x28fc17(_0x33f226);}},_0x3f3f79=loadCache();_0x3f3f79['branches'][_0x4512cd]=!![],_0x67dce4['ZrCzs'](saveCache,_0x3f3f79);}export function disableBranch(_0x39452a){const _0x102121=_0x20d83c,_0x382acd={'jwOvo':function(_0x440e7b){return _0x440e7b();},'SduVO':function(_0x781b72,_0x54b2d1){return _0x781b72(_0x54b2d1);}},_0x3a102=_0x382acd['jwOvo'](loadCache);delete _0x3a102[_0x102121(0x191)][_0x39452a],_0x382acd[_0x102121(0x18e)](saveCache,_0x3a102);}function _0x346e(){const _0x2f84f1=['registeredAt','now','EFZjY','dirname','join','CXUxC','UVBZy','wSYdK','currentBranch','writeFileSync','41394QtyyoP','fxWci','prompted','main','sessions','EEBKZ','749493UPMgpE','NVhgP','5830335qbMqqQ','readFileSync','1302770myvJzi','enabled','xcxaQ','GonrS','32AbKokZ','2669697txSzjX','yhgch','SduVO','3206CZjyqp','xjtkj','branches','pipe','135GzGQRg','Lmzpp','CwRYN','utf-8','jASpV','gnIHZ','homedir','master','stringify','LwGhK','3520276cFozJA','iiJPv','lastStopReminderAt','1578aYRSNV','yuKFf','existsSync','.claude','lastEnabledSessionClearedAt','featureId'];_0x346e=function(){return _0x2f84f1;};return _0x346e();}export function isBranchEnabled(_0x45558b){const _0x153a95={'Qxqun':function(_0x5a980a){return _0x5a980a();}},_0x2205d5=_0x153a95['Qxqun'](loadCache);return _0x2205d5['branches'][_0x45558b]===!![];}function getOrCreateSession(_0x463824,_0x5aec08){const _0x1d678e=_0x20d83c;return!_0x463824[_0x1d678e(0x181)][_0x5aec08]&&(_0x463824[_0x1d678e(0x181)][_0x5aec08]={}),_0x463824[_0x1d678e(0x181)][_0x5aec08];}export function enableSession(_0x298f8c){const _0x399f99=_0x20d83c,_0x1cca98={'UVBZy':function(_0x210055){return _0x210055();},'pyCqd':function(_0x2e6718){return _0x2e6718();},'wSYdK':'master','qBkWa':function(_0x5a5740,_0x19afee){return _0x5a5740(_0x19afee);}},_0x4d61f3=_0x1cca98[_0x399f99(0x179)](loadCache),_0x1dafee=getOrCreateSession(_0x4d61f3,_0x298f8c);_0x1dafee['enabled']=!![];const _0x1ab61b=_0x1cca98['pyCqd'](getCurrentBranch);_0x1ab61b&&_0x1ab61b!=='main'&&_0x1ab61b!==_0x1cca98[_0x399f99(0x17a)]&&(_0x4d61f3['branches'][_0x1ab61b]=!![],_0x1dafee[_0x399f99(0x17b)]=_0x1ab61b),_0x1cca98['qBkWa'](saveCache,_0x4d61f3);}export function isSessionEnabled(_0x47b91f){const _0x43a6ac=_0x20d83c,_0x286a9c={'CwRYN':function(_0x4e66f3){return _0x4e66f3();},'LPJBv':function(_0x2b0365){return _0x2b0365();},'gnIHZ':function(_0xf01bfb,_0x4c9e77){return _0xf01bfb===_0x4c9e77;},'FODXU':'main','Lmzpp':function(_0x2ae48d,_0x5f2a92){return _0x2ae48d===_0x5f2a92;},'xjtkj':function(_0x330bc7,_0x128acb){return _0x330bc7||_0x128acb;}},_0x258297=_0x286a9c[_0x43a6ac(0x195)](loadCache),_0x4fc685=_0x286a9c['LPJBv'](getCurrentBranch);if(!_0x4fc685||_0x286a9c['gnIHZ'](_0x4fc685,_0x286a9c['FODXU'])||_0x286a9c[_0x43a6ac(0x198)](_0x4fc685,'master'))return _0x258297[_0x43a6ac(0x181)][_0x47b91f]?.[_0x43a6ac(0x188)]===!![];const _0x1ec14f=_0x286a9c[_0x43a6ac(0x194)](_0x258297[_0x43a6ac(0x191)][_0x4fc685],!![]),_0x24a883=_0x286a9c['gnIHZ'](_0x258297[_0x43a6ac(0x181)][_0x47b91f]?.[_0x43a6ac(0x188)],!![]);return _0x286a9c[_0x43a6ac(0x190)](_0x1ec14f,_0x24a883);}export function disableSession(_0x59a8d5){const _0x1fd619=_0x20d83c,_0x2bf1b3=loadCache(),_0x35fb8d=getOrCreateSession(_0x2bf1b3,_0x59a8d5);_0x35fb8d[_0x1fd619(0x188)]=![],saveCache(_0x2bf1b3);}export function updateBranchTracking(_0x31843a){const _0x57de0d=_0x20d83c,_0x4b2039={'KdhWS':function(_0x1e09cf,_0x30efbc){return _0x1e09cf===_0x30efbc;},'XFhQS':function(_0x24feaf,_0x5aa528){return _0x24feaf(_0x5aa528);}},_0x4c41ff=loadCache(),_0x38a8cc=_0x4c41ff[_0x57de0d(0x181)][_0x31843a];if(!_0x38a8cc?.['enabled'])return;const _0xc7af7f=getCurrentBranch();if(!_0xc7af7f||_0x4b2039['KdhWS'](_0xc7af7f,_0x57de0d(0x180))||_0xc7af7f==='master')return;_0x38a8cc['currentBranch']!==_0xc7af7f&&(_0x4c41ff[_0x57de0d(0x191)][_0xc7af7f]=!![],_0x38a8cc['currentBranch']=_0xc7af7f,_0x4b2039['XFhQS'](saveCache,_0x4c41ff));}export function initBranchTracking(_0x5e16fc){const _0x134b73=_0x20d83c,_0x5408b8={'EEBKZ':function(_0x25b5d1){return _0x25b5d1();},'dMCFo':function(_0x34fc9f,_0x21213d){return _0x34fc9f===_0x21213d;},'LwGhK':_0x134b73(0x180),'fxWci':_0x134b73(0x19a),'EFZjY':function(_0xfd4bd,_0x17f46c,_0x49262d){return _0xfd4bd(_0x17f46c,_0x49262d);},'vPaRH':function(_0x11d136,_0x37fea9){return _0x11d136(_0x37fea9);}},_0x20936e=_0x5408b8[_0x134b73(0x182)](loadCache),_0x192292=getCurrentBranch();if(!_0x192292||_0x5408b8['dMCFo'](_0x192292,_0x5408b8[_0x134b73(0x19c)])||_0x5408b8['dMCFo'](_0x192292,_0x5408b8[_0x134b73(0x17e)]))return;if(_0x20936e['branches'][_0x192292]===!![]){const _0x1efceb=_0x5408b8[_0x134b73(0x175)](getOrCreateSession,_0x20936e,_0x5e16fc);_0x1efceb['enabled']=!![],_0x1efceb['currentBranch']=_0x192292,_0x5408b8['vPaRH'](saveCache,_0x20936e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x9bb61c){const _0x41243c=_0x20d83c,_0x26325b={'iiJPv':function(_0x31ca37){return _0x31ca37();},'GbUsu':function(_0x1da9c1,_0x56c999){return _0x1da9c1(_0x56c999);}},_0x2b7ee6=_0x26325b[_0x41243c(0x19e)](loadCache),_0x4b8e64=_0x2b7ee6['sessions'][_0x9bb61c];_0x4b8e64?.['enabled']&&(_0x2b7ee6['lastEnabledSessionClearedAt']=Date[_0x41243c(0x174)](),_0x26325b['GbUsu'](saveCache,_0x2b7ee6));}function _0x2cff(_0x413fb1,_0x31336c){_0x413fb1=_0x413fb1-0x173;const _0x346e4b=_0x346e();let _0x2cff00=_0x346e4b[_0x413fb1];return _0x2cff00;}export function shouldAutoEnableAfterClear(_0x2d9f7e){const _0x43c04f=_0x20d83c,_0x570da={'azVKk':function(_0x24205b,_0x1c22d7){return _0x24205b!==_0x1c22d7;},'SPEzG':'clear'};if(_0x570da['azVKk'](_0x2d9f7e,_0x570da['SPEzG']))return![];const _0x550cd8=loadCache(),_0x33bd1c=_0x550cd8[_0x43c04f(0x1a4)];if(!_0x33bd1c)return![];const _0x40846e=Date[_0x43c04f(0x174)]()-_0x33bd1c;return _0x40846e<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x29a4d7){const _0x2c1667=_0x20d83c,_0x2c677b={'CqfEk':function(_0x2001cb,_0x161428,_0xf4e2ab){return _0x2001cb(_0x161428,_0xf4e2ab);},'CXUxC':_0x2c1667(0x180)},_0x1a8c23=loadCache(),_0x16044c=_0x2c677b['CqfEk'](getOrCreateSession,_0x1a8c23,_0x29a4d7);_0x16044c['enabled']=!![];const _0x48df68=getCurrentBranch();_0x48df68&&_0x48df68!==_0x2c677b[_0x2c1667(0x178)]&&_0x48df68!==_0x2c1667(0x19a)&&(_0x16044c['currentBranch']=_0x48df68),delete _0x1a8c23['lastEnabledSessionClearedAt'],saveCache(_0x1a8c23);}export function registerSession(_0x5121e0,_0x5e7e9e){const _0x478955=_0x20d83c,_0x1fc68a={'dfuGB':function(_0x270bb4,_0x3b1320,_0x111d96){return _0x270bb4(_0x3b1320,_0x111d96);}},_0x3d4c96=loadCache(),_0x3631e8=_0x1fc68a['dfuGB'](getOrCreateSession,_0x3d4c96,_0x5121e0);_0x3631e8[_0x478955(0x1a5)]=_0x5e7e9e,_0x3631e8[_0x478955(0x173)]=new Date()['toISOString'](),saveCache(_0x3d4c96);}export function getSessionEntry(_0x343192){const _0x1cfa93=_0x20d83c,_0x4b36b5={'oodKJ':function(_0x3079aa){return _0x3079aa();}},_0x333382=_0x4b36b5['oodKJ'](loadCache),_0x53883c=_0x333382[_0x1cfa93(0x181)][_0x343192];if(_0x53883c?.[_0x1cfa93(0x1a5)]&&_0x53883c?.[_0x1cfa93(0x173)])return{'featureId':_0x53883c[_0x1cfa93(0x1a5)],'registeredAt':_0x53883c[_0x1cfa93(0x173)]};return null;}export function unregisterSession(_0x2e65d9){const _0x5b2314=_0x20d83c,_0x1bf13b={'rpABO':function(_0x51287b){return _0x51287b();},'yuKFf':function(_0x61ac03,_0x401685){return _0x61ac03(_0x401685);}},_0x616850=_0x1bf13b['rpABO'](loadCache),_0xb1ae42=_0x616850[_0x5b2314(0x181)][_0x2e65d9];_0xb1ae42&&(delete _0xb1ae42['featureId'],delete _0xb1ae42['registeredAt'],_0x1bf13b[_0x5b2314(0x1a1)](saveCache,_0x616850));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x51acfd){const _0x3f94f4={'bijOs':function(_0x5bc781,_0x1780fe){return _0x5bc781(_0x1780fe);}},_0x26b6a6=loadCache(),_0x571c9b=getOrCreateSession(_0x26b6a6,_0x51acfd),_0xc548cb=_0x571c9b['lastPlanReminderAt']||0x0,_0x1c2979=Date['now']();if(_0x1c2979-_0xc548cb>=PLAN_REMINDER_INTERVAL_MS)return _0x571c9b['lastPlanReminderAt']=_0x1c2979,_0x3f94f4['bijOs'](saveCache,_0x26b6a6),!![];return![];}export function shouldShowStopReminder(_0x334cb6){const _0x4e0bb0=_0x20d83c,_0xa9b0c3={'xcxaQ':function(_0xa886f8,_0x519a73){return _0xa886f8>=_0x519a73;},'Fekyh':function(_0xfd5da,_0x5d03a4){return _0xfd5da-_0x5d03a4;}},_0x159d73=loadCache(),_0x23cdf1=getOrCreateSession(_0x159d73,_0x334cb6),_0x15c9af=_0x23cdf1[_0x4e0bb0(0x19f)]||0x0,_0x7483ac=Date['now']();if(_0xa9b0c3[_0x4e0bb0(0x189)](_0xa9b0c3['Fekyh'](_0x7483ac,_0x15c9af),STOP_REMINDER_INTERVAL_MS))return _0x23cdf1['lastStopReminderAt']=_0x7483ac,saveCache(_0x159d73),!![];return![];}export function hasSessionBeenPrompted(_0x5a6adb){const _0x280d5c=_0x20d83c,_0x4c717b=loadCache();return _0x4c717b['sessions'][_0x5a6adb]?.[_0x280d5c(0x17f)]===!![];}export function markSessionPrompted(_0xc866d0){const _0x31bfd7=_0x20d83c,_0xc4e6b3={'jASpV':function(_0x53f3e9,_0x310574,_0x35a690){return _0x53f3e9(_0x310574,_0x35a690);},'GonrS':function(_0x45e399,_0x15699c){return _0x45e399(_0x15699c);}},_0x3db329=loadCache(),_0x421190=_0xc4e6b3[_0x31bfd7(0x197)](getOrCreateSession,_0x3db329,_0xc866d0);_0x421190[_0x31bfd7(0x17f)]=!![],_0xc4e6b3[_0x31bfd7(0x18a)](saveCache,_0x3db329);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x245011=_0x2870;(function(_0x1ac588,_0x4ee0b1){const _0x3e8a54=_0x2870,_0x993b03=_0x1ac588();while(!![]){try{const _0x38b995=parseInt(_0x3e8a54(0x1f6))/0x1+parseInt(_0x3e8a54(0x1b2))/0x2*(parseInt(_0x3e8a54(0x1a8))/0x3)+-parseInt(_0x3e8a54(0x209))/0x4+parseInt(_0x3e8a54(0x1dd))/0x5*(-parseInt(_0x3e8a54(0x1b8))/0x6)+parseInt(_0x3e8a54(0x19d))/0x7*(parseInt(_0x3e8a54(0x1b4))/0x8)+-parseInt(_0x3e8a54(0x185))/0x9+-parseInt(_0x3e8a54(0x1da))/0xa;if(_0x38b995===_0x4ee0b1)break;else _0x993b03['push'](_0x993b03['shift']());}catch(_0x5f0ccf){_0x993b03['push'](_0x993b03['shift']());}}}(_0x1faf,0x43dff));function _0x2870(_0x37d75d,_0x581386){_0x37d75d=_0x37d75d-0x185;const _0x1faf30=_0x1faf();let _0x287071=_0x1faf30[_0x37d75d];return _0x287071;}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(_0x12605c,_0x3ed754){const _0x5edf47=_0x2870,_0x2bc208={'AigSE':function(_0x4c4f80,_0x179d99,_0x58b8b0,_0x46f359){return _0x4c4f80(_0x179d99,_0x58b8b0,_0x46f359);},'jFGrg':function(_0x466fb1,_0x28b651,_0x52a2b4){return _0x466fb1(_0x28b651,_0x52a2b4);},'vYXIA':function(_0xe85846,_0x229bff){return _0xe85846(_0x229bff);},'zqnsL':function(_0x358376,_0x1a8c5f){return _0x358376(_0x1a8c5f);},'HmsuO':function(_0x3b55a4,_0x7a5e62){return _0x3b55a4!==_0x7a5e62;},'gbhqo':function(_0x437097,_0x1a2d57){return _0x437097!==_0x1a2d57;}},_0x317d77=_0x2bc208[_0x5edf47(0x1cc)](join,_0x3ed754,'ci',_0x12605c),_0x2bdf61=join(_0x3ed754,'local',_0x12605c),_0x12a6a6=_0x2bc208[_0x5edf47(0x1c4)](join,_0x3ed754,_0x12605c),_0x1b904d=_0x2bc208['jFGrg'](join,_0x3ed754,_0x5edf47(0x1a5)),_0x29e3ae=_0x2bc208[_0x5edf47(0x1c4)](join,_0x3ed754,'ci');if(_0x2bc208['vYXIA'](existsSync,_0x317d77))return _0x317d77;if(_0x2bc208['zqnsL'](existsSync,_0x2bdf61))return _0x2bdf61;if(existsSync(_0x12a6a6)&&(_0x2bc208[_0x5edf47(0x1e6)](_0x12a6a6,_0x1b904d)&&_0x2bc208[_0x5edf47(0x1f7)](_0x12a6a6,_0x29e3ae)?!![]:_0x2bc208['zqnsL'](hasLegacyProfileFiles,_0x12a6a6)))return _0x12a6a6;return null;}export function getEnvDir(_0x313347,_0x14ec30={}){const _0x3d77de=_0x2870,_0x2eaaab={'RwFIW':function(_0x1d1c67){return _0x1d1c67();},'CLjAC':function(_0x5550ad,_0x2a074b,_0x19eab6){return _0x5550ad(_0x2a074b,_0x19eab6);},'neFDI':function(_0x60b5ba,_0x5223b2){return _0x60b5ba(_0x5223b2);},'OXsJU':function(_0x4bdf77,_0x1e2c24,_0x20c8a0){return _0x4bdf77(_0x1e2c24,_0x20c8a0);},'RcArc':function(_0x2a180c,_0x3d9de8,_0x4520e2,_0x586ad7){return _0x2a180c(_0x3d9de8,_0x4520e2,_0x586ad7);},'LSwRw':'local','NczgF':function(_0x46b230,_0x571fe4,_0x3ebac7){return _0x46b230(_0x571fe4,_0x3ebac7);}},_0x16a7bd=_0x2eaaab['RwFIW'](getRangerDir),_0x553a83=_0x2eaaab[_0x3d77de(0x1f4)](findEnvInRoot,_0x313347,_0x16a7bd);if(_0x553a83){if(_0x14ec30[_0x3d77de(0x1c2)]&&_0x2eaaab['neFDI'](isLegacyEnvPath,_0x553a83))throw legacyWriteError(_0x313347,_0x553a83);return _0x553a83;}const _0x2a381b=getRangerHomeDir();if(_0x2a381b!==_0x16a7bd){const _0x1119c6=_0x2eaaab[_0x3d77de(0x1f4)](findEnvInRoot,_0x313347,_0x2a381b);if(_0x1119c6){if(_0x14ec30['forWrite']&&isLegacyEnvPath(_0x1119c6))throw _0x2eaaab[_0x3d77de(0x1ce)](legacyWriteError,_0x313347,_0x1119c6);return _0x1119c6;}}const _0x14d68b=_0x2eaaab['RcArc'](join,_0x2a381b,_0x2eaaab['LSwRw'],_0x313347);if(_0x14ec30['forWrite'])throw _0x2eaaab['NczgF'](legacyWriteError,_0x313347,_0x14d68b);return _0x14d68b;}function isLegacyEnvPath(_0x21f39c){const _0x8c70e6=_0x2870,_0x251f3a={'Fvygz':function(_0x55b490){return _0x55b490();},'vsQNn':function(_0x442259,_0x35245c){return _0x442259===_0x35245c;}},_0x4166f3=_0x251f3a[_0x8c70e6(0x18d)](getRangerDir),_0x513153=getRangerHomeDir();for(const _0x18372a of new Set([_0x4166f3,_0x513153])){const _0x479017=_0x18372a[_0x8c70e6(0x203)]('/')?_0x18372a:_0x18372a+'/';if(_0x251f3a[_0x8c70e6(0x1b9)](_0x21f39c,_0x18372a)||_0x21f39c[_0x8c70e6(0x204)](_0x479017))return!![];}return![];}function legacyWriteError(_0x484d1b,_0x537903){const _0x424511=_0x2870,_0x36d5b6={'skhxd':function(_0x3cd95b,_0x1b6216){return _0x3cd95b+_0x1b6216;}};return new Error(_0x36d5b6['skhxd']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x484d1b+'\x22\x20to\x20legacy\x20path\x20'+_0x537903+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x424511(0x19e)+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x5d4a60,_0x40c3c1){const _0x594295=_0x2870,_0xc1f0b0={'sFNRz':function(_0x4bb975){return _0x4bb975();},'MffLf':function(_0x434c73){return _0x434c73();},'NZnIa':function(_0x5bd782,_0x228889,_0xeb6493){return _0x5bd782(_0x228889,_0xeb6493);},'JLJPE':_0x594295(0x1a5),'rcLwM':function(_0x2a8769,_0x54f559){return _0x2a8769===_0x54f559;},'kRcFB':function(_0x3b068f,_0x44d2db){return _0x3b068f(_0x44d2db);}},_0x64b94e=_0x40c3c1?.[_0x594295(0x1e7)],_0x14bda5=_0x64b94e?[_0x64b94e]:[_0xc1f0b0['sFNRz'](getRangerDir),_0xc1f0b0[_0x594295(0x18a)](getRangerHomeDir)][_0x594295(0x1c6)]((_0xb65ffe,_0x13950d,_0x4a35bc)=>_0x4a35bc['indexOf'](_0xb65ffe)===_0x13950d),_0x5a3855=_0x40c3c1?.[_0x594295(0x1cf)]??['ci','local','legacy'];for(const _0x370d34 of _0x14bda5){const _0x4133fe=_0xc1f0b0[_0x594295(0x1df)](join,_0x370d34,_0xc1f0b0[_0x594295(0x20f)]),_0x2c3c4c=join(_0x370d34,'ci'),_0x3caef2=[{'location':'ci','path':join(_0x370d34,'ci',_0x5d4a60)},{'location':_0xc1f0b0[_0x594295(0x20f)],'path':join(_0x370d34,_0xc1f0b0[_0x594295(0x20f)],_0x5d4a60)},{'location':'legacy','path':join(_0x370d34,_0x5d4a60)}];for(const _0x1f7efb of _0x3caef2){if(_0x5a3855[_0x594295(0x1a3)](_0x1f7efb['location'])&&existsSync(_0x1f7efb[_0x594295(0x199)])){if(_0xc1f0b0['rcLwM'](_0x1f7efb[_0x594295(0x1ec)],_0x594295(0x1cb))&&(_0x1f7efb[_0x594295(0x199)]===_0x4133fe||_0xc1f0b0['rcLwM'](_0x1f7efb['path'],_0x2c3c4c))&&!_0xc1f0b0[_0x594295(0x1c7)](hasLegacyProfileFiles,_0x1f7efb['path']))continue;return{'path':_0x1f7efb[_0x594295(0x199)],'location':_0x1f7efb['location']};}}}return null;}function hasLegacyProfileFiles(_0x303132){const _0x2b76b4=_0x2870,_0x1c0c80={'bWMFT':function(_0x497558,_0x173bc2,_0x270ded){return _0x497558(_0x173bc2,_0x270ded);},'XMBlV':function(_0x27da21,_0x535de9){return _0x27da21(_0x535de9);},'hSnUG':'auth.json','NNbGD':function(_0x13c3b9,_0x54fe1b,_0x3708a0){return _0x13c3b9(_0x54fe1b,_0x3708a0);}};return existsSync(_0x1c0c80[_0x2b76b4(0x1fe)](join,_0x303132,_0x2b76b4(0x1a6)))||_0x1c0c80['XMBlV'](existsSync,_0x1c0c80['bWMFT'](join,_0x303132,_0x1c0c80[_0x2b76b4(0x187)]))||existsSync(_0x1c0c80[_0x2b76b4(0x1f2)](join,_0x303132,'auth.json.enc'));}export function isEnvCi(_0x5e5b32){const _0xb1a315=_0x2870,_0x4ca43e={'NwyWJ':function(_0x2cf9f1,_0x224d6d){return _0x2cf9f1(_0x224d6d);},'feJaF':function(_0x413655){return _0x413655();},'AXESz':function(_0x49e186){return _0x49e186();},'HBpEY':function(_0x1455f2,_0x44471c){return _0x1455f2(_0x44471c);},'oSeIR':function(_0x10f3e3,_0x29cc39,_0x59eec7,_0x37a2a0){return _0x10f3e3(_0x29cc39,_0x59eec7,_0x37a2a0);}};if(_0x4ca43e[_0xb1a315(0x1f5)](existsSync,join(_0x4ca43e[_0xb1a315(0x186)](getRangerDir),'ci',_0x5e5b32)))return!![];const _0x1ae2e1=_0x4ca43e[_0xb1a315(0x1bc)](getRangerHomeDir);if(_0x1ae2e1!==getRangerDir()&&_0x4ca43e[_0xb1a315(0x1ad)](existsSync,_0x4ca43e[_0xb1a315(0x195)](join,_0x1ae2e1,'ci',_0x5e5b32)))return!![];return![];}export async function cleanupTempFiles(_0x249131){const _0x521e43=_0x2870,_0x2d77ad={'QBCbA':_0x521e43(0x189)},_0x20570a=[_0x249131['tempAuthPath'],_0x249131[_0x521e43(0x1bf)]][_0x521e43(0x1c6)](Boolean);await Promise[_0x521e43(0x1f9)](_0x20570a[_0x521e43(0x1ef)](_0x449657=>unlink(_0x449657)[_0x521e43(0x194)](_0x90415d=>{_0x90415d['code']!==_0x2d77ad['QBCbA']&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x449657+':',_0x90415d['message']);})));}export function getSettingsPath(_0x52e049){return join(getEnvDir(_0x52e049),'settings.json');}export async function loadSettings(_0x4042d5){const _0x38f22a=_0x2870,_0x1ba57b={'mbWbt':function(_0x40766e,_0x5e8d7c){return _0x40766e(_0x5e8d7c);},'NrVgD':function(_0x427967,_0x3b4353){return _0x427967(_0x3b4353);}},_0x245660=_0x1ba57b[_0x38f22a(0x1a4)](getSettingsPath,_0x4042d5);if(!_0x1ba57b[_0x38f22a(0x1d4)](existsSync,_0x245660))return{};try{const _0x4af592=await readFile(_0x245660,'utf-8');return JSON['parse'](_0x4af592);}catch{return{};}}function _0x1faf(){const _0xcb0a1=['697359dNDggY','ukQxz','wyOSE','cxCjn','env','HBpEY','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','sessions','ubGBj','4LkuMee','allowInsecureLocalhost','11920QNahSD','nsyav','ivvKQ','Lnlfa','6xtCykN','vsQNn','baseUrl','UequY','AXESz','storageStatePath','string','configPath','zzwXo','jGpRp','forWrite','length','jFGrg','.json','filter','kRcFB','nJeBz','BOUdU','GpBMt','legacy','AigSE','ujKCd','OXsJU','locations','DFYMk','stagehand','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','--allow-running-insecure-content','NrVgD','headers','Nbcut','KqkKm','--no-sandbox','hYlEf','1126190HZIdTe','getuid','stringify','40345OnpfMS','entries','NZnIa','auth.json','xWydL','--disable-setuid-sandbox','QhWoK','TmRNF','awkdQ','HmsuO','rangerDir','ZpDuc','setupHeaders','chromium','FoPcg','location','LgvKV','clipboard-read','map','uAKlT','OQohJ','NNbGD','UvLeI','CLjAC','NwyWJ','363414hpsJAF','gbhqo','VlWHB','all','cdpEndpoint','executablePath','-rangerwright.json','abVvB','bWMFT','AvvtT','setupHeader','push','QWljt','endsWith','startsWith','isArray','safeMode','SogKM','bGxJo','1318940OvJxTA','repeat','-cli','extraHTTPHeaders','--allow-insecure-localhost','KxeRT','JLJPE','object','Environment\x20variable\x20','now','userAgent','sWtFm','3098178UFwtzn','feJaF','hSnUG','vision','ENOENT','MffLf','IkxZP','allow','Fvygz','install','GSdMz','sGAUl','none','ZedCK','tkkJO','catch','oSeIR','headless','ranger-auth-','iOjyF','path','IJgBN','tabs','BIYMc','1148PsicjH','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','browser','playwright-cli','args','contextOptions','includes','mbWbt','local','settings.json','OeIfu'];_0x1faf=function(){return _0xcb0a1;};return _0x1faf();}export async function saveSettings(_0x1d7c91,_0x1c5052){const _0x42a7d1=_0x2870,_0x278029={'tkkJO':function(_0xd5a8f9,_0x4c1137){return _0xd5a8f9(_0x4c1137);},'xqZtT':function(_0x2ea1ea,_0x34e6db){return _0x2ea1ea(_0x34e6db);},'zzwXo':function(_0x22f193,_0x47a237,_0x423040){return _0x22f193(_0x47a237,_0x423040);}},_0x713a2f=_0x278029[_0x42a7d1(0x193)](getSettingsPath,_0x1d7c91),_0x5bf5c6=_0x278029['tkkJO'](dirname,_0x713a2f);!_0x278029['xqZtT'](existsSync,_0x5bf5c6)&&await mkdir(_0x5bf5c6,{'recursive':!![]}),await _0x278029[_0x42a7d1(0x1c0)](writeFile,_0x713a2f,JSON['stringify'](_0x1c5052,null,0x2));}export function resolveEnvVars(_0x38969e){const _0x669bd8=_0x2870,_0x3f08d4={'iOjyF':function(_0x3d4779,_0x1e1975){return _0x3d4779===_0x1e1975;}};if(_0x3f08d4['iOjyF'](typeof _0x38969e,'string'))return _0x38969e['replace'](/\$\{(\w+)\}/g,(_0x2afdf5,_0x1ff54b)=>{const _0x5daab8=_0x2870,_0x1cb0d1=process[_0x5daab8(0x1ac)][_0x1ff54b];if(_0x1cb0d1===undefined)throw new Error(_0x5daab8(0x211)+_0x1ff54b+'\x20is\x20not\x20set');return _0x1cb0d1;});if(Array['isArray'](_0x38969e))return _0x38969e['map'](resolveEnvVars);if(_0x38969e&&_0x3f08d4[_0x669bd8(0x198)](typeof _0x38969e,_0x669bd8(0x210)))return Object['fromEntries'](Object['entries'](_0x38969e)[_0x669bd8(0x1ef)](([_0x1e338f,_0x1b8715])=>[_0x1e338f,resolveEnvVars(_0x1b8715)]));return _0x38969e;}const isRecord=_0x5ea167=>typeof _0x5ea167==='object'&&_0x5ea167!==null&&!Array[_0x245011(0x205)](_0x5ea167),asRecord=_0x8a90f4=>isRecord(_0x8a90f4)?_0x8a90f4:undefined,mergeHeaders=(_0x725aec,_0x2b9e70)=>{const _0x2e507e=_0x245011,_0x3f7178={..._0x725aec??{},..._0x2b9e70??{}};return Object['keys'](_0x3f7178)[_0x2e507e(0x1c3)]?_0x3f7178:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x245011(0x1d3),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x245011(0x20d)];export function buildBrowserOptionsFromSettings(_0x3489d8,_0xbfa70b={}){const _0xb7ec9f=_0x245011,_0x42322b={'ubGBj':function(_0x52e639,_0xfd4e57){return _0x52e639(_0xfd4e57);},'uAKlT':function(_0x330f9a,_0x1db025){return _0x330f9a(_0x1db025);},'vTzfe':function(_0x4703c0,_0x50d11c){return _0x4703c0===_0x50d11c;},'XeVKF':function(_0x25469f,_0x11def6){return _0x25469f===_0x11def6;},'kSCJS':function(_0x351496,_0x5afe2e){return _0x351496(_0x5afe2e);}},_0x5b3506=_0x42322b[_0xb7ec9f(0x1b1)](asRecord,_0x3489d8['browser']),_0x4b601b={..._0x42322b[_0xb7ec9f(0x1f0)](asRecord,_0x5b3506?.['launchOptions'])??{}};_0x42322b['vTzfe'](typeof _0xbfa70b['headless'],'boolean')&&(_0x4b601b[_0xb7ec9f(0x196)]=_0xbfa70b['headless']);if(_0x3489d8[_0xb7ec9f(0x206)]){const _0xa52093=_0x4b601b['args']??[],_0x5f073f=SAFE_MODE_ARGS[_0xb7ec9f(0x1c6)](_0x2e0f65=>!_0xa52093['includes'](_0x2e0f65));_0x4b601b['args']=[..._0xa52093,..._0x5f073f];}if(_0x3489d8[_0xb7ec9f(0x1b3)]){const _0x1eedf7=_0x4b601b['args']??[],_0x5af466=ALLOW_LOCALHOST_ARGS['filter'](_0x598e97=>!_0x1eedf7['includes'](_0x598e97));_0x4b601b[_0xb7ec9f(0x1a1)]=[..._0x1eedf7,..._0x5af466];}const _0x1e6511={...asRecord(_0x5b3506?.['contextOptions'])??{}};_0x1e6511['ignoreHTTPSErrors']=!![];_0x42322b['XeVKF'](typeof _0x3489d8[_0xb7ec9f(0x213)],_0xb7ec9f(0x1be))&&(_0x1e6511[_0xb7ec9f(0x213)]=_0x3489d8[_0xb7ec9f(0x213)]);const _0x2c021f=mergeHeaders(_0x42322b['kSCJS'](asRecord,_0x1e6511[_0xb7ec9f(0x20c)]),asRecord(_0x3489d8['headers']));return _0x2c021f?_0x1e6511[_0xb7ec9f(0x20c)]=_0x2c021f:delete _0x1e6511[_0xb7ec9f(0x20c)],_0xbfa70b[_0xb7ec9f(0x1bd)]&&(_0x1e6511['storageState']=_0xbfa70b[_0xb7ec9f(0x1bd)]),{'launchOptions':_0x4b601b,'contextOptions':_0x1e6511};}export async function resolveProfileStorageState(_0x590b24){const _0x20f26d=_0x245011,_0x3e493a={'QhWoK':function(_0x1fc690,_0x1d05a8){return _0x1fc690(_0x1d05a8);}};return resolveLocalAuthPath(_0x3e493a[_0x20f26d(0x1e3)](getEnvDir,_0x590b24));}async function resolveLocalAuthPath(_0x23b542){const _0x434ea3=_0x245011,_0x40415a={'JyJPb':function(_0x5c3eca,_0x259ae3,_0x2e185b){return _0x5c3eca(_0x259ae3,_0x2e185b);},'ujKCd':_0x434ea3(0x1e0),'VlWHB':function(_0x41d6ec,_0x30782b){return _0x41d6ec(_0x30782b);},'hYlEf':function(_0x29e7ec){return _0x29e7ec();},'gcNmO':_0x434ea3(0x1d2),'LTtid':function(_0x7e139b,_0x39cf78){return _0x7e139b(_0x39cf78);},'Lnlfa':function(_0x54ef1e,_0x3193f5,_0x59e32f){return _0x54ef1e(_0x3193f5,_0x59e32f);},'LgvKV':function(_0x186a73){return _0x186a73();},'ukQxz':function(_0x5ed2f8,_0x4ef47d){return _0x5ed2f8(_0x4ef47d);}},_0xb51773=_0x40415a['JyJPb'](join,_0x23b542,'auth.json.enc'),_0x47efdd=join(_0x23b542,_0x40415a[_0x434ea3(0x1cd)]);if(_0x40415a[_0x434ea3(0x1f8)](existsSync,_0xb51773))try{const _0x54fbb9=await _0x40415a[_0x434ea3(0x1d9)](getToken);if(!_0x54fbb9)throw new Error(_0x40415a['gcNmO']);const _0x1b8bde=await _0x40415a['LTtid'](readFile,_0xb51773),_0x4d6664=decrypt(_0x1b8bde,_0x54fbb9),_0x2bc63f=_0x40415a[_0x434ea3(0x1b7)](join,_0x40415a[_0x434ea3(0x1ed)](tmpdir),_0x434ea3(0x197)+Date[_0x434ea3(0x212)]()+_0x434ea3(0x1c5));return await writeFile(_0x2bc63f,_0x4d6664),{'storageStatePath':_0x2bc63f,'tempAuthPath':_0x2bc63f};}catch(_0x5bf784){const _0x36f846=_0x5bf784 instanceof Error?_0x5bf784['message']:_0x40415a[_0x434ea3(0x1a9)](String,_0x5bf784);throw new Error(_0x434ea3(0x1ae)+_0x36f846);}if(existsSync(_0x47efdd))return{'storageStatePath':_0x47efdd};return{};}export async function buildPlaywrightConfig(_0x4cbe19,_0x3c880d,_0xdbf531,_0x14c480,_0x10fa18){const _0xbe6e59=_0x245011,_0x1ba448={'KqkKm':'stagehand','ZedCK':function(_0xc54b65,_0x4af536){return _0xc54b65(_0x4af536);}};if(_0x10fa18)return buildPlaywrightConfigCore(_0x4cbe19,_0x10fa18,_0x3c880d,_0xdbf531,_0x14c480,_0x1ba448[_0xbe6e59(0x1d7)]);const {storageStatePath:_0x317888,tempAuthPath:_0x1c7975}=await resolveLocalAuthPath(getEnvDir(_0x3c880d));try{const _0x2fda45=await buildPlaywrightConfigCore(_0x4cbe19,_0x317888,_0x3c880d,_0xdbf531,_0x14c480,_0x1ba448[_0xbe6e59(0x1d7)]);return{..._0x2fda45,'tempAuthPath':_0x1c7975};}catch(_0x5085ff){_0x1c7975&&await _0x1ba448[_0xbe6e59(0x192)](unlink,_0x1c7975)[_0xbe6e59(0x194)](()=>{});throw _0x5085ff;}}export async function buildPlaywrightConfigCore(_0x2aa8a9,_0x65095c,_0x437a89,_0xc7acb3,_0xe08db6,_0x177b24=_0x245011(0x1d1)){const _0x54a4c5=_0x245011,_0x37daa5={'QWljt':function(_0x404d7b,_0x3348c8,_0x2c35d8){return _0x404d7b(_0x3348c8,_0x2c35d8);},'XLuQi':'--no-sandbox','cvQLu':'clipboard-read','PhcRG':function(_0xbd53c){return _0xbd53c();},'usHkJ':function(_0xe5ee,_0xa6e8bf,_0xed84ef,_0x1841e8){return _0xe5ee(_0xa6e8bf,_0xed84ef,_0x1841e8);},'GbtSz':_0x54a4c5(0x1b0),'TmRNF':'chromium','Nbcut':_0x54a4c5(0x191),'GgRyw':'core','aHZTk':_0x54a4c5(0x19b),'IJgBN':_0x54a4c5(0x18e),'nsyav':'pdf','UUiqz':_0x54a4c5(0x188),'SogKM':_0x54a4c5(0x18c),'KAiQu':function(_0x3f42e7,_0x5de651,_0x50203f){return _0x3f42e7(_0x5de651,_0x50203f);},'Qcrgq':'ranger-config','GpBMt':_0x54a4c5(0x20b)},_0x5db899=_0xc7acb3||_0x37daa5['PhcRG'](randomUUID),_0x19ef48=_0x37daa5['usHkJ'](join,_0x37daa5['PhcRG'](getRangerDir),_0x37daa5['GbtSz'],_0x5db899),_0x2eb7c9=Boolean(_0x2aa8a9['cdpEndpoint']),_0x199f7c=_0x2eb7c9?{'browserName':_0x37daa5[_0x54a4c5(0x1e4)],'cdpEndpoint':_0x2aa8a9[_0x54a4c5(0x1fa)]}:((()=>{const _0x36fa7b=_0x54a4c5,{launchOptions:_0x196a30,contextOptions:_0x34823d}=_0x37daa5[_0x36fa7b(0x202)](buildBrowserOptionsFromSettings,_0x2aa8a9,{'headless':_0xe08db6?![]:_0x2aa8a9['headless']??!![],'storageStatePath':_0x65095c});if(process[_0x36fa7b(0x1db)]?.()===0x0){const _0x44a95f=[_0x37daa5['XLuQi'],_0x36fa7b(0x1e2)],_0x25a8d9=_0x196a30['args']??[],_0x539200=_0x44a95f[_0x36fa7b(0x1c6)](_0x2970a3=>!_0x25a8d9[_0x36fa7b(0x1a3)](_0x2970a3));_0x196a30['args']=[..._0x25a8d9,..._0x539200];}return{'isolated':!![],'browserName':_0x36fa7b(0x1ea),'launchOptions':_0x196a30,'contextOptions':{..._0x34823d,'permissions':[_0x37daa5['cvQLu'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x46bfd0=_0x177b24==='playwright-cli'?{'browser':_0x199f7c,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x19ef48,'outputMode':'file','codegen':_0x37daa5[_0x54a4c5(0x1d6)]}:{'name':_0x437a89,'browser':_0x199f7c,'capabilities':[_0x37daa5['GgRyw'],_0x37daa5['aHZTk'],_0x37daa5[_0x54a4c5(0x19a)],_0x37daa5[_0x54a4c5(0x1b5)],_0x37daa5['UUiqz']],'imageResponses':_0x37daa5[_0x54a4c5(0x207)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x19ef48};if(!_0x2eb7c9){const _0x30516c=_0x46bfd0[_0x54a4c5(0x19f)],_0x528640=_0x30516c['contextOptions'];if(_0x528640['userAgent']===undefined)delete _0x528640[_0x54a4c5(0x213)];if(_0x528640['storageState']===undefined)delete _0x528640[_0x54a4c5(0x1af)];}const _0x5502bb=_0x37daa5['KAiQu'](join,tmpdir(),_0x37daa5['Qcrgq']);!existsSync(_0x5502bb)&&await mkdir(_0x5502bb,{'recursive':!![]});const _0x5badff=_0x177b24===_0x54a4c5(0x1a0)?_0x37daa5[_0x54a4c5(0x1ca)]:'',_0x38c3f4=join(_0x5502bb,_0x437a89+'-'+Date[_0x54a4c5(0x212)]()+_0x5badff+_0x54a4c5(0x1c5));return await _0x37daa5[_0x54a4c5(0x202)](writeFile,_0x38c3f4,JSON['stringify'](_0x46bfd0,null,0x2)),{'configPath':_0x38c3f4,'storageStatePath':_0x65095c};}export async function buildPlaywrightCliConfig(_0x498957,_0x2832c5,_0x54d81f,_0x340e4b,_0x5c61be){const _0x25dd1e=_0x245011,_0x2637c4={'BIYMc':'playwright-cli','AvvtT':function(_0x568544,_0x409c20,_0x2c3207,_0x3ef11a,_0x3cb98c,_0x1582b5,_0x7ef7b){return _0x568544(_0x409c20,_0x2c3207,_0x3ef11a,_0x3cb98c,_0x1582b5,_0x7ef7b);},'BOUdU':function(_0x2e0e7d,_0x1e2b09){return _0x2e0e7d(_0x1e2b09);}};if(_0x5c61be)return buildPlaywrightConfigCore(_0x498957,_0x5c61be,_0x2832c5,_0x54d81f,_0x340e4b,_0x2637c4['BIYMc']);const {storageStatePath:_0x4bfafd,tempAuthPath:_0x143b96}=await resolveLocalAuthPath(getEnvDir(_0x2832c5));try{const _0x30e0e2=await _0x2637c4[_0x25dd1e(0x1ff)](buildPlaywrightConfigCore,_0x498957,_0x4bfafd,_0x2832c5,_0x54d81f,_0x340e4b,_0x2637c4[_0x25dd1e(0x19c)]);return{..._0x30e0e2,'tempAuthPath':_0x143b96};}catch(_0x5e4c8d){_0x143b96&&await _0x2637c4[_0x25dd1e(0x1c9)](unlink,_0x143b96)[_0x25dd1e(0x194)](()=>{});throw _0x5e4c8d;}}export async function buildRangerwrightCliConfig(_0x218278,_0x5195f9,_0x4385b6,_0x18bc7f,_0x485c1d){const _0x13854b=_0x245011,_0x1a7e46={'JgIqS':'--no-sandbox','sGAUl':_0x13854b(0x1ee),'UequY':function(_0x2af4c5){return _0x2af4c5();},'wyOSE':function(_0x2b2bd6,_0x3077ad){return _0x2b2bd6(_0x3077ad);},'OeIfu':function(_0x1821eb,_0x20b840){return _0x1821eb===_0x20b840;},'nJeBz':function(_0x2a2de6,_0x5b72e3,_0x6e7810){return _0x2a2de6(_0x5b72e3,_0x6e7810);},'zulrJ':'ranger-config','RbdhW':function(_0x434de3,_0x3e1d25,_0x5d3823){return _0x434de3(_0x3e1d25,_0x5d3823);}},{storageStatePath:_0x5a2c99,tempAuthPath:_0x330971}=_0x485c1d?{'storageStatePath':_0x485c1d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x5195f9)),_0x3cdb66=_0x4385b6||_0x1a7e46['UequY'](randomUUID),_0x422fb0=join(_0x1a7e46[_0x13854b(0x1bb)](getRangerDir),_0x13854b(0x1b0),_0x3cdb66),_0x8ae689=_0x1a7e46['wyOSE'](Boolean,_0x218278[_0x13854b(0x1fa)]),_0x1df5e4=_0x8ae689?{'browserName':'chromium','cdpEndpoint':_0x218278['cdpEndpoint']}:((()=>{const _0x3ec180=_0x13854b,{launchOptions:_0x340fac,contextOptions:_0x22a6d1}=buildBrowserOptionsFromSettings(_0x218278,{'headless':_0x18bc7f?![]:_0x218278[_0x3ec180(0x196)]??!![],'storageStatePath':_0x5a2c99});if(process[_0x3ec180(0x1db)]?.()===0x0){const _0x2ecf91=[_0x1a7e46['JgIqS'],'--disable-setuid-sandbox'],_0x35b0fe=_0x340fac[_0x3ec180(0x1a1)]??[],_0x2938fd=_0x2ecf91['filter'](_0x25606f=>!_0x35b0fe['includes'](_0x25606f));_0x340fac['args']=[..._0x35b0fe,..._0x2938fd];}return{'browserName':'chromium','launchOptions':_0x340fac,'contextOptions':{..._0x22a6d1,'permissions':[_0x1a7e46[_0x3ec180(0x190)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x8ae689){const _0x3f95ac=_0x1df5e4[_0x13854b(0x1a2)];if(_0x3f95ac){if(_0x1a7e46['OeIfu'](_0x3f95ac[_0x13854b(0x213)],undefined))delete _0x3f95ac[_0x13854b(0x213)];if(_0x1a7e46[_0x13854b(0x1a7)](_0x3f95ac['storageState'],undefined))delete _0x3f95ac[_0x13854b(0x1af)];}}const _0x51233d={'browser':_0x1df5e4,'outputDir':_0x422fb0,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5d0cda;try{const _0x5c9701=_0x1a7e46[_0x13854b(0x1c8)](join,_0x1a7e46['UequY'](tmpdir),_0x1a7e46['zulrJ']);!_0x1a7e46['wyOSE'](existsSync,_0x5c9701)&&await _0x1a7e46['RbdhW'](mkdir,_0x5c9701,{'recursive':!![]}),_0x5d0cda=_0x1a7e46['nJeBz'](join,_0x5c9701,_0x5195f9+'-'+Date[_0x13854b(0x212)]()+_0x13854b(0x1fc)),await writeFile(_0x5d0cda,JSON[_0x13854b(0x1dc)](_0x51233d,null,0x2));}catch(_0x5a31be){_0x330971&&await _0x1a7e46[_0x13854b(0x1aa)](unlink,_0x330971)[_0x13854b(0x194)](()=>{});throw _0x5a31be;}return{'configPath':_0x5d0cda,'storageStatePath':_0x5a2c99,'tempAuthPath':_0x330971,'outputDir':_0x422fb0};}export async function buildNovaActCliConfig(_0x3eda15,_0x3fd44f,_0x3a1de4,_0x40542c,_0x1d6807){const _0x4d7a5d=_0x245011,_0x1958d2={'bGxJo':function(_0x2a0778,_0x1ae3fb){return _0x2a0778(_0x1ae3fb);},'GSdMz':function(_0x2392c5,_0x1a750c){return _0x2392c5(_0x1a750c);},'abVvB':function(_0x3b59d4,_0x421538,_0x3ba59f){return _0x3b59d4(_0x421538,_0x3ba59f);},'KSHoW':'nova-user-data','DFYMk':'Default','yDSnH':function(_0x433263,_0x58b9af){return _0x433263===_0x58b9af;},'ivvKQ':_0x4d7a5d(0x1d8),'UvLeI':_0x4d7a5d(0x1e2),'FoPcg':_0x4d7a5d(0x1be),'awkdQ':function(_0x1348c8,_0xb147f){return _0x1348c8(_0xb147f);}},{storageStatePath:_0x33190b,tempAuthPath:_0x40f812}=_0x1d6807?{'storageStatePath':_0x1d6807,'tempAuthPath':undefined}:await _0x1958d2[_0x4d7a5d(0x208)](resolveLocalAuthPath,_0x1958d2[_0x4d7a5d(0x18f)](getEnvDir,_0x3fd44f)),_0x520971=_0x3a1de4||randomUUID(),_0x555eb9=join(getRangerDir(),_0x4d7a5d(0x1b0),_0x520971),_0x3f5b33=_0x1958d2[_0x4d7a5d(0x1fd)](join,_0x555eb9,_0x1958d2['KSHoW']),_0x2516c6=_0x33190b?join(_0x3f5b33,_0x1958d2[_0x4d7a5d(0x1d0)]):undefined,{launchOptions:_0x41fc58,contextOptions:_0x4f49c2}=_0x1958d2[_0x4d7a5d(0x1fd)](buildBrowserOptionsFromSettings,_0x3eda15,{'headless':_0x40542c?![]:_0x3eda15['headless']??!![],'storageStatePath':_0x33190b});if(_0x1958d2['yDSnH'](process[_0x4d7a5d(0x1db)]?.(),0x0)){const _0x3c5a18=[_0x1958d2[_0x4d7a5d(0x1b6)],_0x1958d2[_0x4d7a5d(0x1f3)]],_0x2b9cbf=_0x41fc58[_0x4d7a5d(0x1a1)]??[],_0x237bce=_0x3c5a18['filter'](_0x11adb0=>!_0x2b9cbf[_0x4d7a5d(0x1a3)](_0x11adb0));_0x41fc58['args']=[..._0x2b9cbf,..._0x237bce];}const _0x2921b2=typeof _0x41fc58[_0x4d7a5d(0x1fb)]===_0x1958d2['FoPcg']?_0x41fc58[_0x4d7a5d(0x1fb)]:_0x33190b?chromium['executablePath']():undefined;return{'storageStatePath':_0x33190b,'tempAuthPath':_0x40f812,'baseUrl':_0x3eda15[_0x4d7a5d(0x1ba)],'headless':_0x1958d2['awkdQ'](Boolean,_0x41fc58[_0x4d7a5d(0x196)]),'userDataDir':_0x3f5b33,'browserProfilePath':_0x2516c6,'executablePath':_0x2921b2,'launchArgs':Array['isArray'](_0x41fc58[_0x4d7a5d(0x1a1)])?_0x41fc58['args'][_0x4d7a5d(0x1c6)](_0x8b6544=>typeof _0x8b6544===_0x4d7a5d(0x1be)):[],'userAgent':typeof _0x4f49c2['userAgent']===_0x1958d2[_0x4d7a5d(0x1eb)]?_0x4f49c2[_0x4d7a5d(0x213)]:undefined,'extraHTTPHeaders':_0x4f49c2[_0x4d7a5d(0x20c)],'allowInsecureLocalhost':_0x1958d2[_0x4d7a5d(0x1e5)](Boolean,_0x3eda15[_0x4d7a5d(0x1b3)]),'safeMode':_0x1958d2[_0x4d7a5d(0x1e5)](Boolean,_0x3eda15['safeMode']),'cdpEndpoint':_0x3eda15[_0x4d7a5d(0x1fa)],'isCdpMode':Boolean(_0x3eda15['cdpEndpoint'])};}export function getNestedValue(_0x2c4c33,_0x23c41d){const _0x5cb340=_0x245011,_0x13b7ff={'IkxZP':function(_0x38ff27,_0x2f8b27){return _0x38ff27!==_0x2f8b27;},'wuOFZ':_0x5cb340(0x210)},_0x2c5aab=parseKeyPath(_0x23c41d);let _0x462f2e=_0x2c4c33;for(const _0x17cba0 of _0x2c5aab){if(_0x462f2e===null||_0x462f2e===undefined||_0x13b7ff[_0x5cb340(0x18b)](typeof _0x462f2e,_0x13b7ff['wuOFZ']))return undefined;_0x462f2e=_0x462f2e[_0x17cba0];}return _0x462f2e;}export function setNestedValue(_0x2a7593,_0x209444,_0x412994){const _0x35b915=_0x245011,_0x345143={'xWydL':function(_0x3b383c,_0x3b2ef8){return _0x3b383c!==_0x3b2ef8;},'KxeRT':_0x35b915(0x210)},_0x1e2f46=parseKeyPath(_0x209444);let _0x25e9f5=_0x2a7593;for(let _0x12ba25=0x0;_0x12ba25<_0x1e2f46[_0x35b915(0x1c3)]-0x1;_0x12ba25++){const _0x486e98=_0x1e2f46[_0x12ba25];(!(_0x486e98 in _0x25e9f5)||_0x345143[_0x35b915(0x1e1)](typeof _0x25e9f5[_0x486e98],_0x345143[_0x35b915(0x20e)]))&&(_0x25e9f5[_0x486e98]={}),_0x25e9f5=_0x25e9f5[_0x486e98];}_0x25e9f5[_0x1e2f46[_0x1e2f46[_0x35b915(0x1c3)]-0x1]]=_0x412994;}export function deleteNestedValue(_0x61fa19,_0x12209a){const _0x137986=_0x245011,_0x1de019={'antuo':function(_0x26af7f,_0x280eae){return _0x26af7f(_0x280eae);},'dfPhf':function(_0x1f7d7c,_0x241be3){return _0x1f7d7c-_0x241be3;},'sWtFm':function(_0x58e2d8,_0x107fcf){return _0x58e2d8===_0x107fcf;},'cxCjn':_0x137986(0x210),'jGpRp':function(_0x560085,_0x82ed15){return _0x560085-_0x82ed15;}},_0x2c7924=_0x1de019['antuo'](parseKeyPath,_0x12209a);let _0x3a6725=_0x61fa19;for(let _0x653919=0x0;_0x653919<_0x1de019['dfPhf'](_0x2c7924[_0x137986(0x1c3)],0x1);_0x653919++){if(_0x3a6725===null||_0x3a6725===undefined||typeof _0x3a6725!==_0x137986(0x210))return![];_0x3a6725=_0x3a6725[_0x2c7924[_0x653919]];}if(_0x1de019[_0x137986(0x214)](_0x3a6725,null)||_0x3a6725===undefined||typeof _0x3a6725!==_0x1de019[_0x137986(0x1ab)])return![];const _0x30cd95=_0x2c7924[_0x1de019[_0x137986(0x1c1)](_0x2c7924[_0x137986(0x1c3)],0x1)];if(_0x30cd95 in _0x3a6725)return delete _0x3a6725[_0x30cd95],!![];return![];}function parseKeyPath(_0x4b3d33){const _0x147fbb=_0x245011,_0x26fc1f={'ZpDuc':function(_0x2160c2,_0x48b11a){return _0x2160c2===_0x48b11a;},'OQohJ':_0x147fbb(0x200)},_0x314c23=_0x4b3d33['split']('.');return _0x26fc1f['ZpDuc'](_0x314c23[0x0],'header')&&(_0x314c23[0x0]=_0x147fbb(0x1d5)),_0x26fc1f[_0x147fbb(0x1e8)](_0x314c23[0x0],_0x26fc1f[_0x147fbb(0x1f1)])&&(_0x314c23[0x0]=_0x147fbb(0x1e9)),_0x314c23;}export function formatSettings(_0x68df3b,_0x490ec6=0x0){const _0x209688=_0x245011,_0x3aee1e={'NNKbl':function(_0x2ea62a,_0x34ca43){return _0x2ea62a===_0x34ca43;}},_0x264a85=[],_0x1ad45a='\x20\x20'[_0x209688(0x20a)](_0x490ec6);for(const [_0x236fb7,_0x3d7236]of Object['entries'](_0x68df3b)){if(_0x3d7236===undefined)continue;if(_0x3aee1e['NNKbl'](typeof _0x3d7236,'object')&&_0x3d7236!==null){_0x264a85[_0x209688(0x201)](''+_0x1ad45a+_0x236fb7+':');for(const [_0x5bb9ac,_0x48e0c9]of Object[_0x209688(0x1de)](_0x3d7236)){_0x264a85['push'](_0x1ad45a+'\x20\x20'+_0x5bb9ac+':\x20'+_0x48e0c9);}}else _0x264a85['push'](''+_0x1ad45a+_0x236fb7+':\x20'+_0x3d7236);}return _0x264a85['join']('\x0a');}
|
|
1
|
+
const _0x4e41dc=_0xf36b;(function(_0x4aa686,_0x12b14c){const _0x580098=_0xf36b,_0x40a9ce=_0x4aa686();while(!![]){try{const _0xf5f462=-parseInt(_0x580098(0x14d))/0x1+parseInt(_0x580098(0x13e))/0x2+parseInt(_0x580098(0x138))/0x3+-parseInt(_0x580098(0x1a3))/0x4*(parseInt(_0x580098(0x1a0))/0x5)+parseInt(_0x580098(0x17d))/0x6+parseInt(_0x580098(0x186))/0x7+parseInt(_0x580098(0x17c))/0x8*(-parseInt(_0x580098(0x1a4))/0x9);if(_0xf5f462===_0x12b14c)break;else _0x40a9ce['push'](_0x40a9ce['shift']());}catch(_0x54f7c9){_0x40a9ce['push'](_0x40a9ce['shift']());}}}(_0x1e73,0xc95f5));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x2eb22b,_0x555f01){const _0x2b5f0e=_0xf36b,_0x4d2789={'nMACA':function(_0x343df9,_0xc1dfca,_0x434ceb,_0xea9e35){return _0x343df9(_0xc1dfca,_0x434ceb,_0xea9e35);},'FnFuD':function(_0x553e82,_0x15cf23,_0x2197ea){return _0x553e82(_0x15cf23,_0x2197ea);},'UMDIG':_0x2b5f0e(0x176),'ZTapj':function(_0x89f498,_0x4d3452){return _0x89f498(_0x4d3452);},'OhcfK':function(_0x530f35,_0x5b1ae1){return _0x530f35!==_0x5b1ae1;},'CokmB':function(_0x5cd741,_0x3f52b0){return _0x5cd741(_0x3f52b0);}},_0x1bbf5a=_0x4d2789[_0x2b5f0e(0x130)](join,_0x555f01,'ci',_0x2eb22b),_0x524482=join(_0x555f01,'local',_0x2eb22b),_0x24ad24=_0x4d2789[_0x2b5f0e(0x139)](join,_0x555f01,_0x2eb22b),_0x3b2545=join(_0x555f01,_0x4d2789['UMDIG']),_0xe5db3=_0x4d2789['FnFuD'](join,_0x555f01,'ci');if(_0x4d2789[_0x2b5f0e(0x152)](existsSync,_0x1bbf5a))return _0x1bbf5a;if(existsSync(_0x524482))return _0x524482;if(existsSync(_0x24ad24)&&(_0x4d2789[_0x2b5f0e(0x162)](_0x24ad24,_0x3b2545)&&_0x24ad24!==_0xe5db3?!![]:_0x4d2789[_0x2b5f0e(0x164)](hasLegacyProfileFiles,_0x24ad24)))return _0x24ad24;return null;}export function getEnvDir(_0x3e592b,_0x57cb6a={}){const _0x3ea31c=_0xf36b,_0x258493={'eOPWo':function(_0x4f1c78){return _0x4f1c78();},'gQRGt':function(_0x21c93a,_0x4fce0d,_0x93fb0a){return _0x21c93a(_0x4fce0d,_0x93fb0a);},'rqfYL':function(_0x3f407c,_0x49b6f1){return _0x3f407c(_0x49b6f1);},'PSuar':function(_0x1b91d3,_0xa4900e,_0x1b3af6,_0x54632c){return _0x1b91d3(_0xa4900e,_0x1b3af6,_0x54632c);}},_0x14cd2a=_0x258493[_0x3ea31c(0x183)](getRangerDir),_0x569878=_0x258493[_0x3ea31c(0x14f)](findEnvInRoot,_0x3e592b,_0x14cd2a);if(_0x569878){if(_0x57cb6a['forWrite']&&_0x258493['rqfYL'](isLegacyEnvPath,_0x569878))throw _0x258493['gQRGt'](legacyWriteError,_0x3e592b,_0x569878);return _0x569878;}const _0x4c6587=getRangerHomeDir();if(_0x4c6587!==_0x14cd2a){const _0x4d86f8=_0x258493[_0x3ea31c(0x14f)](findEnvInRoot,_0x3e592b,_0x4c6587);if(_0x4d86f8){if(_0x57cb6a[_0x3ea31c(0x13b)]&&isLegacyEnvPath(_0x4d86f8))throw legacyWriteError(_0x3e592b,_0x4d86f8);return _0x4d86f8;}}const _0x2905bb=_0x258493['PSuar'](join,_0x4c6587,_0x3ea31c(0x176),_0x3e592b);if(_0x57cb6a['forWrite'])throw legacyWriteError(_0x3e592b,_0x2905bb);return _0x2905bb;}function isLegacyEnvPath(_0x5e5ae0){const _0x518d10={'fZLwk':function(_0x34ca56){return _0x34ca56();}},_0x3619d1=getRangerDir(),_0x56f026=_0x518d10['fZLwk'](getRangerHomeDir);for(const _0x14f80f of new Set([_0x3619d1,_0x56f026])){const _0x20fb6f=_0x14f80f['endsWith']('/')?_0x14f80f:_0x14f80f+'/';if(_0x5e5ae0===_0x14f80f||_0x5e5ae0['startsWith'](_0x20fb6f))return!![];}return![];}function legacyWriteError(_0x5af9bd,_0xd805a9){const _0x33e678=_0xf36b,_0x5268a4={'wSkIK':function(_0x28791a,_0x16315d){return _0x28791a+_0x16315d;}};return new Error(_0x5268a4[_0x33e678(0x146)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x5af9bd+'\x22\x20to\x20legacy\x20path\x20'+_0xd805a9+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x33e678(0x15d),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x2a0f48,_0x1be7e2){const _0x3b6678=_0xf36b,_0x3288cd={'IgHaf':function(_0x5378c5){return _0x5378c5();},'QZxPp':'local','PmttR':function(_0x3b0469,_0x4a88df,_0x5d233d){return _0x3b0469(_0x4a88df,_0x5d233d);},'MdwdD':'legacy','RNBgO':function(_0x1ea360,_0x3d6fab){return _0x1ea360===_0x3d6fab;},'dGGHK':function(_0x5c1de8,_0x3444af){return _0x5c1de8(_0x3444af);}},_0x3e3f46=_0x1be7e2?.[_0x3b6678(0x193)],_0x4be4d2=_0x3e3f46?[_0x3e3f46]:[_0x3288cd['IgHaf'](getRangerDir),getRangerHomeDir()]['filter']((_0x7b51f9,_0x5116cb,_0x221a2a)=>_0x221a2a[_0x3b6678(0x1a9)](_0x7b51f9)===_0x5116cb),_0x589900=_0x1be7e2?.[_0x3b6678(0x188)]??['ci',_0x3288cd['QZxPp'],_0x3b6678(0x15b)];for(const _0x2bfbb5 of _0x4be4d2){const _0x470715=_0x3288cd['PmttR'](join,_0x2bfbb5,_0x3288cd[_0x3b6678(0x174)]),_0x2833d6=join(_0x2bfbb5,'ci'),_0x58075a=[{'location':'ci','path':join(_0x2bfbb5,'ci',_0x2a0f48)},{'location':_0x3288cd['QZxPp'],'path':join(_0x2bfbb5,_0x3288cd[_0x3b6678(0x174)],_0x2a0f48)},{'location':_0x3288cd['MdwdD'],'path':join(_0x2bfbb5,_0x2a0f48)}];for(const _0xf9ea98 of _0x58075a){if(_0x589900['includes'](_0xf9ea98[_0x3b6678(0x15c)])&&existsSync(_0xf9ea98[_0x3b6678(0x150)])){if(_0x3288cd['RNBgO'](_0xf9ea98['location'],'legacy')&&(_0xf9ea98[_0x3b6678(0x150)]===_0x470715||_0xf9ea98[_0x3b6678(0x150)]===_0x2833d6)&&!_0x3288cd['dGGHK'](hasLegacyProfileFiles,_0xf9ea98[_0x3b6678(0x150)]))continue;return{'path':_0xf9ea98[_0x3b6678(0x150)],'location':_0xf9ea98['location']};}}}return null;}function hasLegacyProfileFiles(_0x2b12fc){const _0x1da45c=_0xf36b,_0x40d6b1={'llkoe':'settings.json','KVGtc':function(_0x17cf38,_0x158f79){return _0x17cf38(_0x158f79);},'tlmac':function(_0x214cc0,_0x4d36d7,_0x23c639){return _0x214cc0(_0x4d36d7,_0x23c639);},'WKTDs':_0x1da45c(0x171),'ovatz':function(_0x5dea1c,_0x370b5a){return _0x5dea1c(_0x370b5a);}};return existsSync(join(_0x2b12fc,_0x40d6b1['llkoe']))||_0x40d6b1['KVGtc'](existsSync,_0x40d6b1['tlmac'](join,_0x2b12fc,_0x40d6b1['WKTDs']))||_0x40d6b1['ovatz'](existsSync,join(_0x2b12fc,_0x1da45c(0x19d)));}export function isEnvCi(_0x25b0ee){const _0xa838f9=_0xf36b,_0x431cfa={'CPXaF':function(_0x5e65d8,_0x2aefaa){return _0x5e65d8(_0x2aefaa);},'CRHpv':function(_0x4ea39f,_0x4c29a1,_0x1e8d34,_0x37b461){return _0x4ea39f(_0x4c29a1,_0x1e8d34,_0x37b461);},'kYcka':function(_0x4f9b8e){return _0x4f9b8e();},'REiWa':function(_0x64b60c){return _0x64b60c();},'JNYpu':function(_0x1fa1c8,_0x2b7a28){return _0x1fa1c8!==_0x2b7a28;}};if(_0x431cfa[_0xa838f9(0x195)](existsSync,_0x431cfa['CRHpv'](join,_0x431cfa['kYcka'](getRangerDir),'ci',_0x25b0ee)))return!![];const _0x3b5617=_0x431cfa[_0xa838f9(0x169)](getRangerHomeDir);if(_0x431cfa[_0xa838f9(0x18c)](_0x3b5617,_0x431cfa[_0xa838f9(0x169)](getRangerDir))&&existsSync(join(_0x3b5617,'ci',_0x25b0ee)))return!![];return![];}export async function cleanupTempFiles(_0x297376){const _0x2b03d9=_0xf36b,_0x5715a6={'sfuxt':'ENOENT'},_0x39e564=[_0x297376['tempAuthPath'],_0x297376['configPath']]['filter'](Boolean);await Promise[_0x2b03d9(0x1a2)](_0x39e564['map'](_0x69e220=>unlink(_0x69e220)['catch'](_0x18fc09=>{const _0x3d9c37=_0x2b03d9;_0x18fc09[_0x3d9c37(0x13d)]!==_0x5715a6['sfuxt']&&console['warn'](_0x3d9c37(0x187)+_0x69e220+':',_0x18fc09['message']);})));}export function getSettingsPath(_0xe00564){const _0x451942=_0xf36b,_0x5ef301={'jplSN':function(_0x3d5a56,_0x1c9206,_0x49fba9){return _0x3d5a56(_0x1c9206,_0x49fba9);},'ajsAU':function(_0x5e9869,_0x149ada){return _0x5e9869(_0x149ada);}};return _0x5ef301[_0x451942(0x18d)](join,_0x5ef301['ajsAU'](getEnvDir,_0xe00564),'settings.json');}export async function loadSettings(_0x323375){const _0x5d5195=_0xf36b,_0x3077a6={'GoVfq':function(_0x4210f9,_0x5244c3){return _0x4210f9(_0x5244c3);}},_0x27f0a9=getSettingsPath(_0x323375);if(!_0x3077a6[_0x5d5195(0x14a)](existsSync,_0x27f0a9))return{};try{const _0x190588=await readFile(_0x27f0a9,'utf-8');return JSON['parse'](_0x190588);}catch{return{};}}export async function saveSettings(_0x2e779d,_0x30b32f){const _0xe9cb06=_0xf36b,_0x4d99fe={'LVwXO':function(_0x3ef38a,_0x315db6){return _0x3ef38a(_0x315db6);},'GohAC':function(_0xa81e17,_0x25ddb4,_0x13067f){return _0xa81e17(_0x25ddb4,_0x13067f);}},_0x170a96=getSettingsPath(_0x2e779d),_0x14c95e=dirname(_0x170a96);!_0x4d99fe[_0xe9cb06(0x182)](existsSync,_0x14c95e)&&await mkdir(_0x14c95e,{'recursive':!![]}),await _0x4d99fe['GohAC'](writeFile,_0x170a96,JSON[_0xe9cb06(0x15a)](_0x30b32f,null,0x2));}export function resolveEnvVars(_0x227bcb){const _0x3c999e=_0xf36b,_0x5314e6={'UPFrb':'string','huqkV':_0x3c999e(0x154)};if(typeof _0x227bcb===_0x5314e6[_0x3c999e(0x145)])return _0x227bcb[_0x3c999e(0x156)](/\$\{(\w+)\}/g,(_0x565399,_0x4d5e34)=>{const _0x2b0a6f=_0x3c999e,_0x5962d8=process[_0x2b0a6f(0x18e)][_0x4d5e34];if(_0x5962d8===undefined)throw new Error(_0x2b0a6f(0x19e)+_0x4d5e34+_0x2b0a6f(0x1a5));return _0x5962d8;});if(Array['isArray'](_0x227bcb))return _0x227bcb['map'](resolveEnvVars);if(_0x227bcb&&typeof _0x227bcb===_0x5314e6[_0x3c999e(0x143)])return Object[_0x3c999e(0x135)](Object['entries'](_0x227bcb)[_0x3c999e(0x19b)](([_0x199f1b,_0x4f52cc])=>[_0x199f1b,resolveEnvVars(_0x4f52cc)]));return _0x227bcb;}function _0xf36b(_0x48e90f,_0x2f98f1){_0x48e90f=_0x48e90f-0x12f;const _0x1e73e7=_0x1e73();let _0xf36b06=_0x1e73e7[_0x48e90f];return _0xf36b06;}const isRecord=_0x37c53e=>typeof _0x37c53e==='object'&&_0x37c53e!==null&&!Array[_0x4e41dc(0x192)](_0x37c53e),asRecord=_0x5db2c0=>isRecord(_0x5db2c0)?_0x5db2c0:undefined,mergeHeaders=(_0x3faaea,_0x5900a0)=>{const _0x55b995=_0x4e41dc,_0x2d7404={'kGuVW':function(_0x3b2058,_0x214996){return _0x3b2058??_0x214996;}},_0x1dcd14={..._0x3faaea??{},..._0x2d7404['kGuVW'](_0x5900a0,{})};return Object['keys'](_0x1dcd14)[_0x55b995(0x140)]?_0x1dcd14:undefined;},SAFE_MODE_ARGS=[_0x4e41dc(0x15e)],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x4e41dc(0x19a),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x4e41dc(0x131)];export function buildBrowserOptionsFromSettings(_0xed0c19,_0x3970a4={}){const _0x49e896=_0x4e41dc,_0x273aad={'VVWTp':function(_0x52b7cb,_0x32b457){return _0x52b7cb===_0x32b457;},'NRPMb':'boolean','bazZT':function(_0x542b92,_0x4a9373){return _0x542b92===_0x4a9373;},'cxMrc':'string'},_0x5e023f=asRecord(_0xed0c19['browser']),_0x2c0b32={...asRecord(_0x5e023f?.['launchOptions'])??{}};_0x273aad['VVWTp'](typeof _0x3970a4['headless'],_0x273aad[_0x49e896(0x19c)])&&(_0x2c0b32[_0x49e896(0x13c)]=_0x3970a4['headless']);if(_0xed0c19[_0x49e896(0x136)]){const _0x231ea8=_0x2c0b32[_0x49e896(0x1a1)]??[],_0x316bf9=SAFE_MODE_ARGS[_0x49e896(0x191)](_0x358bc6=>!_0x231ea8[_0x49e896(0x151)](_0x358bc6));_0x2c0b32[_0x49e896(0x1a1)]=[..._0x231ea8,..._0x316bf9];}if(_0xed0c19[_0x49e896(0x134)]){const _0x38e1c8=_0x2c0b32['args']??[],_0x451bd6=ALLOW_LOCALHOST_ARGS[_0x49e896(0x191)](_0x2e60c8=>!_0x38e1c8['includes'](_0x2e60c8));_0x2c0b32[_0x49e896(0x1a1)]=[..._0x38e1c8,..._0x451bd6];}const _0x5469e2={...asRecord(_0x5e023f?.[_0x49e896(0x1a7)])??{}};_0x5469e2[_0x49e896(0x1aa)]=!![];_0x273aad[_0x49e896(0x159)](typeof _0xed0c19['userAgent'],_0x273aad['cxMrc'])&&(_0x5469e2[_0x49e896(0x19f)]=_0xed0c19['userAgent']);const _0x32bddb=mergeHeaders(asRecord(_0x5469e2[_0x49e896(0x199)]),asRecord(_0xed0c19['headers']));return _0x32bddb?_0x5469e2['extraHTTPHeaders']=_0x32bddb:delete _0x5469e2['extraHTTPHeaders'],_0x3970a4['storageStatePath']&&(_0x5469e2[_0x49e896(0x173)]=_0x3970a4['storageStatePath']),{'launchOptions':_0x2c0b32,'contextOptions':_0x5469e2};}export async function resolveProfileStorageState(_0x39d140){const _0x3b21d7={'fihPz':function(_0x34562e,_0x5e4fcf){return _0x34562e(_0x5e4fcf);}};return resolveLocalAuthPath(_0x3b21d7['fihPz'](getEnvDir,_0x39d140));}async function resolveLocalAuthPath(_0x114043){const _0x13bee4=_0x4e41dc,_0x32f0da={'EKjQc':_0x13bee4(0x19d),'DsXXT':function(_0xc92548,_0x2b4b82,_0x23a704){return _0xc92548(_0x2b4b82,_0x23a704);},'kuTSU':function(_0xf08aca,_0x38ba52){return _0xf08aca(_0x38ba52);},'PmIsv':_0x13bee4(0x13a),'bMvcB':function(_0x19a8d9,_0xaaea7,_0x56d687){return _0x19a8d9(_0xaaea7,_0x56d687);}},_0x1a0fc8=join(_0x114043,_0x32f0da[_0x13bee4(0x132)]),_0x21a3db=_0x32f0da[_0x13bee4(0x15f)](join,_0x114043,'auth.json');if(_0x32f0da[_0x13bee4(0x17e)](existsSync,_0x1a0fc8))try{const _0x167778=await getToken();if(!_0x167778)throw new Error(_0x32f0da[_0x13bee4(0x181)]);const _0x258e5c=await readFile(_0x1a0fc8),_0x42dbb2=_0x32f0da['bMvcB'](decrypt,_0x258e5c,_0x167778),_0x59193b=_0x32f0da[_0x13bee4(0x15f)](join,tmpdir(),'ranger-auth-'+Date[_0x13bee4(0x144)]()+_0x13bee4(0x184));return await writeFile(_0x59193b,_0x42dbb2),{'storageStatePath':_0x59193b,'tempAuthPath':_0x59193b};}catch(_0x43b4b7){const _0x10002a=_0x43b4b7 instanceof Error?_0x43b4b7[_0x13bee4(0x16b)]:String(_0x43b4b7);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x10002a);}if(_0x32f0da[_0x13bee4(0x17e)](existsSync,_0x21a3db))return{'storageStatePath':_0x21a3db};return{};}export async function buildPlaywrightConfig(_0x52162c,_0x215428,_0x239e57,_0x9639b0,_0x14781d){const _0x1115ff=_0x4e41dc,_0x304d7f={'nPORt':_0x1115ff(0x141)};if(_0x14781d)return buildPlaywrightConfigCore(_0x52162c,_0x14781d,_0x215428,_0x239e57,_0x9639b0,_0x304d7f[_0x1115ff(0x18b)]);const {storageStatePath:_0x237fd3,tempAuthPath:_0x5927f6}=await resolveLocalAuthPath(getEnvDir(_0x215428));try{const _0x45a8fc=await buildPlaywrightConfigCore(_0x52162c,_0x237fd3,_0x215428,_0x239e57,_0x9639b0,_0x304d7f['nPORt']);return{..._0x45a8fc,'tempAuthPath':_0x5927f6};}catch(_0x21acc9){_0x5927f6&&await unlink(_0x5927f6)[_0x1115ff(0x14e)](()=>{});throw _0x21acc9;}}export async function buildPlaywrightConfigCore(_0x8f9cc3,_0x32a749,_0xea7395,_0x3264c5,_0x4939b5,_0x352676='stagehand'){const _0x1cf5ae=_0x4e41dc,_0x2bbe1a={'qGtou':function(_0xaa7b75,_0x4284ab){return _0xaa7b75===_0x4284ab;},'bkTxW':'chromium','osaNM':'clipboard-read','Gshan':_0x1cf5ae(0x165),'MYHSo':function(_0x4b1054){return _0x4b1054();},'FuskP':function(_0x13b45f,_0x9ec54c,_0x5cd000,_0x4358e1){return _0x13b45f(_0x9ec54c,_0x5cd000,_0x4358e1);},'IYypm':function(_0x4dd4a3){return _0x4dd4a3();},'FvyZK':_0x1cf5ae(0x16a),'uRTSM':_0x1cf5ae(0x14b),'fvdKM':_0x1cf5ae(0x198),'wXFZK':'install','UdLMC':'pdf','NnGWQ':function(_0x802d2d){return _0x802d2d();},'iyhVr':'ranger-config','bvcyU':function(_0x3397d0,_0x525e3b){return _0x3397d0(_0x525e3b);},'khmqU':function(_0x2e6f4b,_0xdbf4fe,_0x541c26){return _0x2e6f4b(_0xdbf4fe,_0x541c26);},'SUrTg':'playwright-cli','VQoVI':'-cli','SBhXX':function(_0xa818c8,_0x4b4073,_0x3066ff){return _0xa818c8(_0x4b4073,_0x3066ff);}},_0x939180=_0x3264c5||_0x2bbe1a['MYHSo'](randomUUID),_0x7137a9=_0x2bbe1a[_0x1cf5ae(0x161)](join,_0x2bbe1a[_0x1cf5ae(0x185)](getRangerDir),'sessions',_0x939180),_0x11fe45=Boolean(_0x8f9cc3[_0x1cf5ae(0x177)]),_0x21b153=_0x11fe45?{'browserName':'chromium','cdpEndpoint':_0x8f9cc3[_0x1cf5ae(0x177)]}:((()=>{const _0x832a2c=_0x1cf5ae,{launchOptions:_0x21d55b,contextOptions:_0x2c0b15}=buildBrowserOptionsFromSettings(_0x8f9cc3,{'headless':_0x4939b5?![]:_0x8f9cc3[_0x832a2c(0x13c)]??!![],'storageStatePath':_0x32a749});if(_0x2bbe1a['qGtou'](process[_0x832a2c(0x147)]?.(),0x0)){const _0x131218=[_0x832a2c(0x157),'--disable-setuid-sandbox'],_0x2c5102=_0x21d55b['args']??[],_0x133949=_0x131218[_0x832a2c(0x191)](_0x4fae46=>!_0x2c5102[_0x832a2c(0x151)](_0x4fae46));_0x21d55b[_0x832a2c(0x1a1)]=[..._0x2c5102,..._0x133949];}return{'isolated':!![],'browserName':_0x2bbe1a[_0x832a2c(0x160)],'launchOptions':_0x21d55b,'contextOptions':{..._0x2c0b15,'permissions':[_0x2bbe1a['osaNM'],_0x2bbe1a['Gshan']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x5a37a6=_0x2bbe1a[_0x1cf5ae(0x148)](_0x352676,_0x1cf5ae(0x16e))?{'browser':_0x21b153,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x7137a9,'outputMode':_0x2bbe1a['FvyZK'],'codegen':'none'}:{'name':_0xea7395,'browser':_0x21b153,'capabilities':[_0x2bbe1a[_0x1cf5ae(0x149)],_0x2bbe1a[_0x1cf5ae(0x137)],_0x2bbe1a['wXFZK'],_0x2bbe1a['UdLMC'],'vision'],'imageResponses':_0x1cf5ae(0x158),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x7137a9};if(!_0x11fe45){const _0x5a553f=_0x5a37a6[_0x1cf5ae(0x142)],_0x3d323f=_0x5a553f[_0x1cf5ae(0x1a7)];if(_0x2bbe1a['qGtou'](_0x3d323f[_0x1cf5ae(0x19f)],undefined))delete _0x3d323f[_0x1cf5ae(0x19f)];if(_0x3d323f[_0x1cf5ae(0x173)]===undefined)delete _0x3d323f['storageState'];}const _0x2668c3=join(_0x2bbe1a['NnGWQ'](tmpdir),_0x2bbe1a['iyhVr']);!_0x2bbe1a['bvcyU'](existsSync,_0x2668c3)&&await _0x2bbe1a[_0x1cf5ae(0x197)](mkdir,_0x2668c3,{'recursive':!![]});const _0x5f2068=_0x2bbe1a['qGtou'](_0x352676,_0x2bbe1a['SUrTg'])?_0x2bbe1a[_0x1cf5ae(0x170)]:'',_0x48f2eb=_0x2bbe1a['SBhXX'](join,_0x2668c3,_0xea7395+'-'+Date[_0x1cf5ae(0x144)]()+_0x5f2068+_0x1cf5ae(0x184));return await _0x2bbe1a['khmqU'](writeFile,_0x48f2eb,JSON['stringify'](_0x5a37a6,null,0x2)),{'configPath':_0x48f2eb,'storageStatePath':_0x32a749};}export async function buildPlaywrightCliConfig(_0x2e11db,_0x4027ca,_0xf22f4e,_0xd5bbc2,_0x3d0f6e){const _0x5a9f93=_0x4e41dc,_0x5b27e5={'vONfo':function(_0x590c51,_0x5e106e,_0x4ff954,_0x3c1d4e,_0x138332,_0x38b80c,_0x44f031){return _0x590c51(_0x5e106e,_0x4ff954,_0x3c1d4e,_0x138332,_0x38b80c,_0x44f031);},'REnba':function(_0x1660df,_0x1d45d3,_0x5a27d6,_0x51b540,_0x1cb802,_0x32a651,_0x55e3cf){return _0x1660df(_0x1d45d3,_0x5a27d6,_0x51b540,_0x1cb802,_0x32a651,_0x55e3cf);},'HAxUY':_0x5a9f93(0x16e),'grnUa':function(_0x2592ea,_0x5d920d){return _0x2592ea(_0x5d920d);}};if(_0x3d0f6e)return _0x5b27e5['vONfo'](buildPlaywrightConfigCore,_0x2e11db,_0x3d0f6e,_0x4027ca,_0xf22f4e,_0xd5bbc2,'playwright-cli');const {storageStatePath:_0x4106fb,tempAuthPath:_0xb0528d}=await resolveLocalAuthPath(getEnvDir(_0x4027ca));try{const _0x5a91c9=await _0x5b27e5['REnba'](buildPlaywrightConfigCore,_0x2e11db,_0x4106fb,_0x4027ca,_0xf22f4e,_0xd5bbc2,_0x5b27e5[_0x5a9f93(0x18f)]);return{..._0x5a91c9,'tempAuthPath':_0xb0528d};}catch(_0x233fdb){_0xb0528d&&await _0x5b27e5['grnUa'](unlink,_0xb0528d)['catch'](()=>{});throw _0x233fdb;}}export async function buildRangerwrightCliConfig(_0x5c65d5,_0x10746a,_0x3aa163,_0x175a1d,_0x7a7da1){const _0x178b2b=_0x4e41dc,_0x56d234={'HvKDP':function(_0x2b5b84,_0x3312e4){return _0x2b5b84===_0x3312e4;},'dftxb':'chromium','FHiGK':_0x178b2b(0x133),'uAoeT':'clipboard-write','rICWH':function(_0x1209d5,_0x50a94c){return _0x1209d5(_0x50a94c);},'JAdlL':function(_0x4ad44d){return _0x4ad44d();},'igOtp':function(_0x3ff21f,_0x34f934,_0x20257c,_0x44aaa8){return _0x3ff21f(_0x34f934,_0x20257c,_0x44aaa8);},'ZiRjk':function(_0x352907){return _0x352907();},'VDZzc':'sessions','BIywy':function(_0x1991a8,_0x5dc6b3){return _0x1991a8(_0x5dc6b3);},'Jfnde':function(_0x594c0c,_0x7a93b8){return _0x594c0c===_0x7a93b8;},'KLWkA':function(_0x485391,_0x56036c,_0x2517a2){return _0x485391(_0x56036c,_0x2517a2);},'Dklbv':_0x178b2b(0x166),'cAHLX':function(_0x26acd9,_0x1969c4,_0x508b29){return _0x26acd9(_0x1969c4,_0x508b29);},'AkHdg':function(_0x3967ca,_0x34a1e9,_0x3c8d71){return _0x3967ca(_0x34a1e9,_0x3c8d71);}},{storageStatePath:_0x45f003,tempAuthPath:_0x4f2e29}=_0x7a7da1?{'storageStatePath':_0x7a7da1,'tempAuthPath':undefined}:await _0x56d234[_0x178b2b(0x1a6)](resolveLocalAuthPath,_0x56d234['rICWH'](getEnvDir,_0x10746a)),_0x1dd8cb=_0x3aa163||_0x56d234['JAdlL'](randomUUID),_0x55f19c=_0x56d234['igOtp'](join,_0x56d234['ZiRjk'](getRangerDir),_0x56d234['VDZzc'],_0x1dd8cb),_0x24af6f=_0x56d234[_0x178b2b(0x17f)](Boolean,_0x5c65d5['cdpEndpoint']),_0x4d9b82=_0x24af6f?{'browserName':_0x56d234[_0x178b2b(0x13f)],'cdpEndpoint':_0x5c65d5[_0x178b2b(0x177)]}:((()=>{const _0x9c56af=_0x178b2b,{launchOptions:_0x4a3d1c,contextOptions:_0x27f5ca}=buildBrowserOptionsFromSettings(_0x5c65d5,{'headless':_0x175a1d?![]:_0x5c65d5[_0x9c56af(0x13c)]??!![],'storageStatePath':_0x45f003});if(_0x56d234['HvKDP'](process[_0x9c56af(0x147)]?.(),0x0)){const _0x53067b=[_0x9c56af(0x157),_0x9c56af(0x190)],_0x1623a3=_0x4a3d1c['args']??[],_0x1135e3=_0x53067b[_0x9c56af(0x191)](_0xf24bd6=>!_0x1623a3['includes'](_0xf24bd6));_0x4a3d1c[_0x9c56af(0x1a1)]=[..._0x1623a3,..._0x1135e3];}return{'browserName':_0x56d234[_0x9c56af(0x13f)],'launchOptions':_0x4a3d1c,'contextOptions':{..._0x27f5ca,'permissions':[_0x56d234[_0x9c56af(0x18a)],_0x56d234[_0x9c56af(0x16c)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x24af6f){const _0x5ea24f=_0x4d9b82[_0x178b2b(0x1a7)];if(_0x5ea24f){if(_0x5ea24f['userAgent']===undefined)delete _0x5ea24f['userAgent'];if(_0x56d234['Jfnde'](_0x5ea24f['storageState'],undefined))delete _0x5ea24f[_0x178b2b(0x173)];}}const _0x1cb292={'browser':_0x4d9b82,'outputDir':_0x55f19c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x13d815;try{const _0x17e6c3=_0x56d234['KLWkA'](join,tmpdir(),_0x56d234['Dklbv']);!existsSync(_0x17e6c3)&&await _0x56d234[_0x178b2b(0x14c)](mkdir,_0x17e6c3,{'recursive':!![]}),_0x13d815=_0x56d234['AkHdg'](join,_0x17e6c3,_0x10746a+'-'+Date[_0x178b2b(0x144)]()+_0x178b2b(0x189)),await writeFile(_0x13d815,JSON['stringify'](_0x1cb292,null,0x2));}catch(_0x1f14d0){_0x4f2e29&&await unlink(_0x4f2e29)['catch'](()=>{});throw _0x1f14d0;}return{'configPath':_0x13d815,'storageStatePath':_0x45f003,'tempAuthPath':_0x4f2e29,'outputDir':_0x55f19c};}export async function buildNovaActCliConfig(_0x4a3fdc,_0x329ad,_0x3c637a,_0x16017a,_0x4c0951){const _0x2da33b=_0x4e41dc,_0x33f036={'OITAQ':function(_0x4d8e6b,_0x3ddb54){return _0x4d8e6b(_0x3ddb54);},'Vrtvj':function(_0x2ffbb0,_0x48384a,_0x41eedf,_0x3a1d2a){return _0x2ffbb0(_0x48384a,_0x41eedf,_0x3a1d2a);},'xJmAs':function(_0x483468){return _0x483468();},'HongP':_0x2da33b(0x180),'tzqtQ':'nova-user-data','YhOXo':function(_0x97b15d,_0xa919f8,_0x2dbb42){return _0x97b15d(_0xa919f8,_0x2dbb42);},'BBVWT':function(_0x2a731f,_0x36e7f5){return _0x2a731f===_0x36e7f5;},'brSGQ':'--disable-setuid-sandbox'},{storageStatePath:_0x2a2de8,tempAuthPath:_0xf75c58}=_0x4c0951?{'storageStatePath':_0x4c0951,'tempAuthPath':undefined}:await _0x33f036['OITAQ'](resolveLocalAuthPath,getEnvDir(_0x329ad)),_0x43ddb5=_0x3c637a||randomUUID(),_0x5ea133=_0x33f036['Vrtvj'](join,_0x33f036['xJmAs'](getRangerDir),_0x33f036[_0x2da33b(0x153)],_0x43ddb5),_0x233dd4=join(_0x5ea133,_0x33f036[_0x2da33b(0x196)]),_0x5abdd2=_0x2a2de8?_0x33f036['YhOXo'](join,_0x233dd4,_0x2da33b(0x17a)):undefined,{launchOptions:_0x4184e3,contextOptions:_0x540ee7}=_0x33f036['YhOXo'](buildBrowserOptionsFromSettings,_0x4a3fdc,{'headless':_0x16017a?![]:_0x4a3fdc['headless']??!![],'storageStatePath':_0x2a2de8});if(_0x33f036[_0x2da33b(0x1a8)](process[_0x2da33b(0x147)]?.(),0x0)){const _0x53e68e=[_0x2da33b(0x157),_0x33f036[_0x2da33b(0x178)]],_0x4b7b72=_0x4184e3['args']??[],_0x53d424=_0x53e68e['filter'](_0x4859eb=>!_0x4b7b72['includes'](_0x4859eb));_0x4184e3[_0x2da33b(0x1a1)]=[..._0x4b7b72,..._0x53d424];}const _0x110a3d=_0x33f036['BBVWT'](typeof _0x4184e3[_0x2da33b(0x16d)],'string')?_0x4184e3[_0x2da33b(0x16d)]:_0x2a2de8?chromium['executablePath']():undefined;return{'storageStatePath':_0x2a2de8,'tempAuthPath':_0xf75c58,'baseUrl':_0x4a3fdc[_0x2da33b(0x16f)],'headless':Boolean(_0x4184e3[_0x2da33b(0x13c)]),'userDataDir':_0x233dd4,'browserProfilePath':_0x5abdd2,'executablePath':_0x110a3d,'launchArgs':Array['isArray'](_0x4184e3[_0x2da33b(0x1a1)])?_0x4184e3[_0x2da33b(0x1a1)]['filter'](_0x9228be=>typeof _0x9228be==='string'):[],'userAgent':_0x33f036['BBVWT'](typeof _0x540ee7[_0x2da33b(0x19f)],'string')?_0x540ee7['userAgent']:undefined,'extraHTTPHeaders':_0x540ee7[_0x2da33b(0x199)],'allowInsecureLocalhost':Boolean(_0x4a3fdc['allowInsecureLocalhost']),'safeMode':Boolean(_0x4a3fdc[_0x2da33b(0x136)]),'cdpEndpoint':_0x4a3fdc['cdpEndpoint'],'isCdpMode':Boolean(_0x4a3fdc[_0x2da33b(0x177)])};}function _0x1e73(){const _0x3c870=['-rangerwright.json','FHiGK','nPORt','JNYpu','jplSN','env','HAxUY','--disable-setuid-sandbox','filter','isArray','rangerDir','headers','CPXaF','tzqtQ','khmqU','tabs','extraHTTPHeaders','--allow-running-insecure-content','map','NRPMb','auth.json.enc','Environment\x20variable\x20','userAgent','688610LnZOjM','args','all','4OaYgOG','9TJGfzv','\x20is\x20not\x20set','rICWH','contextOptions','BBVWT','indexOf','ignoreHTTPSErrors','OpfaP','nMACA','--allow-insecure-localhost','EKjQc','clipboard-read','allowInsecureLocalhost','fromEntries','safeMode','fvdKM','4848804XCHKaO','FnFuD','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','forWrite','headless','code','1785260PBrqzJ','dftxb','length','stagehand','browser','huqkV','now','UPFrb','wSkIK','getuid','qGtou','uRTSM','GoVfq','core','cAHLX','1066737jwfQAO','catch','gQRGt','path','includes','ZTapj','HongP','object','entries','replace','--no-sandbox','allow','bazZT','stringify','legacy','location','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','--disable-features=WebBluetooth','DsXXT','bkTxW','FuskP','OhcfK','qhrQi','CokmB','clipboard-write','ranger-config','header','umomb','REiWa','file','message','uAoeT','executablePath','playwright-cli','baseUrl','VQoVI','auth.json','push','storageState','QZxPp','split','local','cdpEndpoint','brSGQ','IAqzX','Default','repeat','6824264YzweBX','1398792HqyOoF','kuTSU','BIywy','sessions','PmIsv','LVwXO','eOPWo','.json','IYypm','981981GujmDn','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','locations'];_0x1e73=function(){return _0x3c870;};return _0x1e73();}export function getNestedValue(_0x164fbf,_0x369a33){const _0xbe1b7d=_0x4e41dc,_0x45eef4={'umomb':function(_0x5c37eb,_0x582a16){return _0x5c37eb(_0x582a16);},'IbIvx':function(_0x372097,_0x16df04){return _0x372097===_0x16df04;}},_0x6d9e1b=_0x45eef4[_0xbe1b7d(0x168)](parseKeyPath,_0x369a33);let _0x34a50b=_0x164fbf;for(const _0x553ce6 of _0x6d9e1b){if(_0x34a50b===null||_0x45eef4['IbIvx'](_0x34a50b,undefined)||typeof _0x34a50b!=='object')return undefined;_0x34a50b=_0x34a50b[_0x553ce6];}return _0x34a50b;}export function setNestedValue(_0x3d010e,_0x400c80,_0x17fd85){const _0x190fb7=_0x4e41dc,_0x3818f0={'qHbSr':function(_0x30d6ca,_0x3968b9){return _0x30d6ca<_0x3968b9;},'FYXea':function(_0x16be01,_0x155463){return _0x16be01-_0x155463;},'qfIUH':_0x190fb7(0x154),'acJTM':function(_0x5c2e26,_0x354022){return _0x5c2e26-_0x354022;}},_0x52d063=parseKeyPath(_0x400c80);let _0x4cfc9d=_0x3d010e;for(let _0x3e1118=0x0;_0x3818f0['qHbSr'](_0x3e1118,_0x3818f0['FYXea'](_0x52d063[_0x190fb7(0x140)],0x1));_0x3e1118++){const _0x4e84e7=_0x52d063[_0x3e1118];(!(_0x4e84e7 in _0x4cfc9d)||typeof _0x4cfc9d[_0x4e84e7]!==_0x3818f0['qfIUH'])&&(_0x4cfc9d[_0x4e84e7]={}),_0x4cfc9d=_0x4cfc9d[_0x4e84e7];}_0x4cfc9d[_0x52d063[_0x3818f0['acJTM'](_0x52d063['length'],0x1)]]=_0x17fd85;}export function deleteNestedValue(_0x173b9b,_0x37b1c1){const _0x24048e=_0x4e41dc,_0x4b3fb5={'CRdge':function(_0x1ccb52,_0x15ca15){return _0x1ccb52(_0x15ca15);},'IAqzX':function(_0x2a9788,_0x22343d){return _0x2a9788-_0x22343d;},'qhrQi':_0x24048e(0x154),'OpfaP':function(_0x149817,_0x23f7b6){return _0x149817===_0x23f7b6;}},_0x1f1333=_0x4b3fb5['CRdge'](parseKeyPath,_0x37b1c1);let _0x19387a=_0x173b9b;for(let _0x21cc55=0x0;_0x21cc55<_0x4b3fb5[_0x24048e(0x179)](_0x1f1333['length'],0x1);_0x21cc55++){if(_0x19387a===null||_0x19387a===undefined||typeof _0x19387a!==_0x4b3fb5[_0x24048e(0x163)])return![];_0x19387a=_0x19387a[_0x1f1333[_0x21cc55]];}if(_0x4b3fb5[_0x24048e(0x12f)](_0x19387a,null)||_0x4b3fb5[_0x24048e(0x12f)](_0x19387a,undefined)||typeof _0x19387a!==_0x4b3fb5[_0x24048e(0x163)])return![];const _0x5dd336=_0x1f1333[_0x1f1333[_0x24048e(0x140)]-0x1];if(_0x5dd336 in _0x19387a)return delete _0x19387a[_0x5dd336],!![];return![];}function parseKeyPath(_0x50415f){const _0x37c571=_0x4e41dc,_0x4c1e71={'sVzGu':function(_0x1c8e1a,_0x3af144){return _0x1c8e1a===_0x3af144;},'uNFnK':_0x37c571(0x167),'dBXwN':'setupHeaders'},_0x2dc904=_0x50415f[_0x37c571(0x175)]('.');return _0x4c1e71['sVzGu'](_0x2dc904[0x0],_0x4c1e71['uNFnK'])&&(_0x2dc904[0x0]=_0x37c571(0x194)),_0x2dc904[0x0]==='setupHeader'&&(_0x2dc904[0x0]=_0x4c1e71['dBXwN']),_0x2dc904;}export function formatSettings(_0x3422b0,_0x380b9d=0x0){const _0x309a48=_0x4e41dc,_0x53f7f5=[],_0x4eda9f='\x20\x20'[_0x309a48(0x17b)](_0x380b9d);for(const [_0x7d11c6,_0x266d20]of Object[_0x309a48(0x155)](_0x3422b0)){if(_0x266d20===undefined)continue;if(typeof _0x266d20===_0x309a48(0x154)&&_0x266d20!==null){_0x53f7f5['push'](''+_0x4eda9f+_0x7d11c6+':');for(const [_0x2e8069,_0x11a431]of Object['entries'](_0x266d20)){_0x53f7f5[_0x309a48(0x172)](_0x4eda9f+'\x20\x20'+_0x2e8069+':\x20'+_0x11a431);}}else _0x53f7f5[_0x309a48(0x172)](''+_0x4eda9f+_0x7d11c6+':\x20'+_0x266d20);}return _0x53f7f5['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x115ec5,_0x391042){const _0x3b5c45=_0x81d1,_0xb9f655=_0x115ec5();while(!![]){try{const _0x202b01=-parseInt(_0x3b5c45(0x12d))/0x1+-parseInt(_0x3b5c45(0x12a))/0x2+-parseInt(_0x3b5c45(0x131))/0x3+parseInt(_0x3b5c45(0x130))/0x4+-parseInt(_0x3b5c45(0x12e))/0x5*(-parseInt(_0x3b5c45(0x12f))/0x6)+-parseInt(_0x3b5c45(0x132))/0x7*(-parseInt(_0x3b5c45(0x133))/0x8)+parseInt(_0x3b5c45(0x12b))/0x9*(parseInt(_0x3b5c45(0x129))/0xa);if(_0x202b01===_0x391042)break;else _0xb9f655['push'](_0xb9f655['shift']());}catch(_0x3be467){_0xb9f655['push'](_0xb9f655['shift']());}}}(_0x2256,0x7d4c2));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x81d1(_0x564e5f,_0x522b23){_0x564e5f=_0x564e5f-0x129;const _0x225638=_0x2256();let _0x81d163=_0x225638[_0x564e5f];return _0x81d163;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x2256(){const _0x4777ac=['15138ebmctV','kEwVn','176379xAUdRP','1157075HjRHPX','12gVwTor','2730764rBSuAx','1656870xTZNZu','42651CGcfrG','152ttHMGe','5020MNSDlH','1727530McSbek'];_0x2256=function(){return _0x4777ac;};return _0x2256();}export function readSkillContent(_0x36ddde){const _0x5e5f4f=_0x81d1,_0x186d75={'VUTmv':function(_0x26ca87,_0x2f08f5,_0x117f34){return _0x26ca87(_0x2f08f5,_0x117f34);},'kEwVn':'utf-8'},_0xb59723=join(__dirname,'..','..','skills'),_0x545151=_0x186d75['VUTmv'](join,_0xb59723,_0x36ddde);try{return readFileSync(_0x545151,_0x186d75[_0x5e5f4f(0x12c)]);}catch{return'';}}export function getRangerSkillContent(){const _0x1da2d3={'EieEg':function(_0x1991b0,_0x147ca1){return _0x1991b0(_0x147ca1);}};return _0x1da2d3['EieEg'](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xd5a2=_0x5153;(function(_0x5a3157,_0x1dbc1d){const _0x2999cf=_0x5153,_0x34e7f0=_0x5a3157();while(!![]){try{const _0x373f66=-parseInt(_0x2999cf(0x124))/0x1*(parseInt(_0x2999cf(0x137))/0x2)+-parseInt(_0x2999cf(0x121))/0x3*(parseInt(_0x2999cf(0x138))/0x4)+parseInt(_0x2999cf(0x129))/0x5*(parseInt(_0x2999cf(0x11e))/0x6)+parseInt(_0x2999cf(0x118))/0x7*(-parseInt(_0x2999cf(0x123))/0x8)+parseInt(_0x2999cf(0x127))/0x9+parseInt(_0x2999cf(0x140))/0xa*(parseInt(_0x2999cf(0x130))/0xb)+parseInt(_0x2999cf(0x135))/0xc*(parseInt(_0x2999cf(0x131))/0xd);if(_0x373f66===_0x1dbc1d)break;else _0x34e7f0['push'](_0x34e7f0['shift']());}catch(_0x477552){_0x34e7f0['push'](_0x34e7f0['shift']());}}}(_0x38fd,0x908cd));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x5153(_0xe284fc,_0x4eb673){_0xe284fc=_0xe284fc-0x115;const _0x38fd8a=_0x38fd();let _0x515372=_0x38fd8a[_0xe284fc];return _0x515372;}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0xd5a2(0x126),'bug-bash','feature-tracker'];export async function installSkill(_0x4657d1,_0x4da011={}){const _0xc5d0a4=_0xd5a2,_0x572123={'ZxlRc':_0xc5d0a4(0x125),'mdrNB':'claude','zbYaT':function(_0x3d05cb,_0x2b92c4,_0x5bab54){return _0x3d05cb(_0x2b92c4,_0x5bab54);},'oLaYa':function(_0x1d5f35,_0x5a68f9){return _0x1d5f35(_0x5a68f9);},'cdRuM':function(_0x27608f,_0x22d374){return _0x27608f(_0x22d374);},'mCGPe':function(_0x4e4e45,_0x220e26){return _0x4e4e45&&_0x220e26;},'oTrxh':function(_0xb0ac96,_0x51689b){return _0xb0ac96===_0x51689b;},'UKBwV':'opencode','cplAN':function(_0x3af0ba,_0x3e254b,_0x14e8f1){return _0x3af0ba(_0x3e254b,_0x14e8f1);},'KktPq':function(_0x4438ca,_0x83a6eb){return _0x4438ca(_0x83a6eb);},'mlVVB':function(_0x2c81d8,_0x416463,_0x58e148){return _0x2c81d8(_0x416463,_0x58e148);},'TFcpC':function(_0x3c32ee,_0x1a5e7a,_0x2aafe3){return _0x3c32ee(_0x1a5e7a,_0x2aafe3);},'vJufH':_0xc5d0a4(0x11d),'YeFKa':function(_0x504da8,_0xe2f1b6,_0x1762aa){return _0x504da8(_0xe2f1b6,_0x1762aa);}},{level:level=_0x572123[_0xc5d0a4(0x120)],cliVersion:_0xab0838,platform:platform=_0x572123[_0xc5d0a4(0x13c)]}=_0x4da011,_0x304c75=getSourceSkillsDir(),_0x3e04b6=join(_0x304c75,_0x4657d1),_0x72fb15=_0x572123[_0xc5d0a4(0x13a)](join,_0x304c75,_0x4657d1+'.md'),_0x38e726=existsSync(_0x3e04b6)&&_0x572123[_0xc5d0a4(0x11c)](statSync,_0x3e04b6)['isDirectory']()&&existsSync(join(_0x3e04b6,_0xc5d0a4(0x116))),_0x10fcac=_0x572123[_0xc5d0a4(0x134)](existsSync,_0x72fb15);if(_0x572123[_0xc5d0a4(0x13e)](!_0x38e726,!_0x10fcac))return console[_0xc5d0a4(0x11b)]('\x20\x20Skill\x20not\x20found:\x20'+_0x4657d1),![];const _0x469dc1=_0x572123['oTrxh'](platform,_0x572123['UKBwV'])?getOpencodeSkillsDir(level):getSkillsDir(level),_0x88d5cf=join(_0x469dc1,_0x4657d1);await _0x572123[_0xc5d0a4(0x139)](mkdir,_0x88d5cf,{'recursive':!![]});let _0x625bfa,_0x249871=[];if(_0x38e726){const _0x1e9f05=await _0x572123[_0xc5d0a4(0x12f)](readdir,_0x3e04b6),_0x4b1659=_0x1e9f05['filter'](_0x4a9ed2=>_0x4a9ed2[_0xc5d0a4(0x122)](_0xc5d0a4(0x136)));for(const _0x351c93 of _0x4b1659){const _0x344147=_0x572123[_0xc5d0a4(0x12c)](join,_0x3e04b6,_0x351c93),_0x3fc165=_0x572123[_0xc5d0a4(0x115)](join,_0x88d5cf,_0x351c93);await copyFile(_0x344147,_0x3fc165),_0x249871['push'](_0x351c93);}_0x625bfa=await readFile(_0x572123[_0xc5d0a4(0x12c)](join,_0x3e04b6,'SKILL.md'),_0x572123['vJufH']);}else{_0x625bfa=await readFile(_0x72fb15,_0x572123[_0xc5d0a4(0x133)]);const _0x4fc42b=_0x572123[_0xc5d0a4(0x13f)](join,_0x88d5cf,_0xc5d0a4(0x116));await writeFile(_0x4fc42b,_0x625bfa,'utf-8'),_0x249871[_0xc5d0a4(0x12b)](_0xc5d0a4(0x116));}const {name:_0xd7a21a}=parseFrontmatter(_0x625bfa);return console[_0xc5d0a4(0x119)]('\x20\x20Installed\x20skill:\x20'+_0xd7a21a),console['log'](_0xc5d0a4(0x11f)+_0x88d5cf),_0x249871[_0xc5d0a4(0x117)]>0x1&&console[_0xc5d0a4(0x119)]('\x20\x20Files:\x20'+_0x249871['join'](',\x20')),logLocalAgentInstallation(_0x4657d1,{'skillDisplayName':_0xd7a21a,'installLevel':level},_0xab0838)[_0xc5d0a4(0x12a)](()=>{}),!![];}function getSourceSkillsDir(){const _0x2bad78=_0xd5a2,_0x34683f={'RjubL':function(_0x3da3e5,_0x9152aa,_0xb09f3d,_0x2da8c6,_0x4dd8ee){return _0x3da3e5(_0x9152aa,_0xb09f3d,_0x2da8c6,_0x4dd8ee);},'XdYNx':function(_0x45fa22,_0x86ca26,_0x4b9a53,_0x218065,_0x390862,_0x2abe72){return _0x45fa22(_0x86ca26,_0x4b9a53,_0x218065,_0x390862,_0x2abe72);},'wnxwa':'skills','EAApA':function(_0x4326d4,_0x3724dc){return _0x4326d4(_0x3724dc);}},_0x29a852=[_0x34683f[_0x2bad78(0x11a)](join,__dirname,'..','..','skills'),_0x34683f[_0x2bad78(0x128)](join,__dirname,'..','..','..',_0x34683f['wnxwa'])];for(const _0x25129d of _0x29a852){if(_0x34683f[_0x2bad78(0x132)](existsSync,_0x25129d))return _0x25129d;}return _0x29a852[0x0];}function parseFrontmatter(_0x2df200){const _0x414d6c=_0xd5a2,_0x349d71=_0x2df200['match'](/^---\n([\s\S]+?)\n---/);if(!_0x349d71)throw new Error('Invalid\x20skill\x20frontmatter');const _0x11f95e=_0x349d71[0x1],_0xa8bd07=_0x11f95e[_0x414d6c(0x13b)](/name:\s*(.+)/),_0x373714=_0x11f95e[_0x414d6c(0x13b)](/description:\s*"?(.+?)"?\n/);return{'name':_0xa8bd07?.[0x1][_0x414d6c(0x12d)]()||'','description':_0x373714?.[0x1]['trim']()||''};}export async function removeSkill(_0x52a292,_0x403139){const _0x1026a8=_0xd5a2,_0x583195={'YXwBA':function(_0x31eaa4,_0x35395d){return _0x31eaa4(_0x35395d);},'cgYNB':function(_0x1b9cbf,_0x38ab52,_0x5c03cc){return _0x1b9cbf(_0x38ab52,_0x5c03cc);}},_0x3f7f6c=_0x583195['YXwBA'](getSkillsDir,_0x403139),_0x125b66=_0x583195[_0x1026a8(0x13d)](join,_0x3f7f6c,_0x52a292);if(!existsSync(_0x125b66))return![];try{return await _0x583195['cgYNB'](rm,_0x125b66,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x52a292),!![];}catch{return console['warn'](_0x1026a8(0x12e)+_0x52a292),![];}}function _0x38fd(){const _0xa5727=['.md','138ThfLfU','8DgnRbe','cplAN','zbYaT','match','mdrNB','cgYNB','mCGPe','YeFKa','1762370ZMlLxI','TFcpC','SKILL.md','length','7qWVEsB','log','RjubL','warn','oLaYa','utf-8','48nVjpgo','\x20\x20Location:\x20','ZxlRc','1729803DOFTFe','endsWith','2449256jtGxcZ','14063UvEHit','project','e2e-test-recommender','7213644UXXuSI','XdYNx','414415MjOBbu','catch','push','mlVVB','trim','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','KktPq','22bcxiCm','13BhFcHY','EAApA','vJufH','cdRuM','14456748MpwkBu'];_0x38fd=function(){return _0xa5727;};return _0x38fd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x562a20=_0x277d;(function(_0x1db26b,_0x5f417d){const _0x4bcd81=_0x277d,_0x5a2822=_0x1db26b();while(!![]){try{const _0x367676=-parseInt(_0x4bcd81(0xbe))/0x1*(-parseInt(_0x4bcd81(0x8c))/0x2)+-parseInt(_0x4bcd81(0xcd))/0x3+parseInt(_0x4bcd81(0x9e))/0x4+parseInt(_0x4bcd81(0x9a))/0x5+-parseInt(_0x4bcd81(0xc3))/0x6+parseInt(_0x4bcd81(0xc1))/0x7+-parseInt(_0x4bcd81(0xb5))/0x8;if(_0x367676===_0x5f417d)break;else _0x5a2822['push'](_0x5a2822['shift']());}catch(_0x4e830d){_0x5a2822['push'](_0x5a2822['shift']());}}}(_0x54cf,0x41ea8));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(_0x337ab6,_0x4c8752){const _0xa1524a=_0x277d,_0x3170a0={'hbuXe':function(_0x3b31e5,_0x47af53){return _0x3b31e5&_0x47af53;},'bMRUl':function(_0xd3d303,_0x3f9628){return _0xd3d303+_0x3f9628;}};if(_0x4c8752>=_0x337ab6[_0xa1524a(0xc9)])return[0x0,0x0];const _0x4a2683=_0x337ab6[_0x4c8752];let _0x371bc1=0x1,_0x1fb5bc=0x80;while(_0x371bc1<=0x8&&!_0x3170a0[_0xa1524a(0xd4)](_0x4a2683,_0x1fb5bc)){_0x371bc1++,_0x1fb5bc>>=0x1;}if(_0x4c8752+_0x371bc1>_0x337ab6[_0xa1524a(0xc9)])return[0x0,0x0];let _0x4f2ef9=_0x3170a0[_0xa1524a(0xd4)](_0x4a2683,_0x1fb5bc-0x1);for(let _0x738d33=0x1;_0x738d33<_0x371bc1;_0x738d33++){_0x4f2ef9=_0x3170a0[_0xa1524a(0xd6)](_0x4f2ef9*0x100,_0x337ab6[_0x4c8752+_0x738d33]);}return[_0x4f2ef9,_0x371bc1];}function readId(_0x528f8c,_0x2cbce3){const _0x3fb49c=_0x277d,_0x2cb2e3={'DWMTX':function(_0x42f8b1,_0x4f5497){return _0x42f8b1>=_0x4f5497;},'SmKVM':function(_0x5a8ea4,_0x3b1c91){return _0x5a8ea4>=_0x3b1c91;},'wKIvs':function(_0x337451,_0x3e0ae2){return _0x337451+_0x3e0ae2;},'qBFKi':function(_0x25d064,_0x1cef58){return _0x25d064*_0x1cef58;}};if(_0x2cb2e3[_0x3fb49c(0xb3)](_0x2cbce3,_0x528f8c[_0x3fb49c(0xc9)]))return[0x0,0x0];const _0x29c5e1=_0x528f8c[_0x2cbce3];let _0x18face;if(_0x2cb2e3[_0x3fb49c(0x9d)](_0x29c5e1,0x80))_0x18face=0x1;else{if(_0x29c5e1>=0x40)_0x18face=0x2;else{if(_0x2cb2e3['DWMTX'](_0x29c5e1,0x20))_0x18face=0x3;else{if(_0x29c5e1>=0x10)_0x18face=0x4;else return[_0x29c5e1,0x1];}}}if(_0x2cb2e3['wKIvs'](_0x2cbce3,_0x18face)>_0x528f8c[_0x3fb49c(0xc9)])return[0x0,0x0];let _0x118e03=0x0;for(let _0x23ce1d=0x0;_0x23ce1d<_0x18face;_0x23ce1d++){_0x118e03=_0x2cb2e3[_0x3fb49c(0xc0)](_0x118e03,0x100)+_0x528f8c[_0x2cbce3+_0x23ce1d];}return[_0x118e03,_0x18face];}function _0x277d(_0x28afc6,_0x3b139b){_0x28afc6=_0x28afc6-0x8c;const _0x54cf5b=_0x54cf();let _0x277dda=_0x54cf5b[_0x28afc6];return _0x277dda;}function readUint(_0x5c9c85,_0x21c9d1,_0x3bab7a){const _0x45ba12=_0x277d,_0xdb458e={'mTXqv':function(_0x363871,_0x324d61){return _0x363871<_0x324d61;},'Fctlw':function(_0x1af21e,_0x38cad4){return _0x1af21e*_0x38cad4;},'jpazD':function(_0x597c4a,_0x4223a4){return _0x597c4a+_0x4223a4;}};let _0x596075=0x0;for(let _0x4f0b61=0x0;_0xdb458e['mTXqv'](_0x4f0b61,_0x3bab7a);_0x4f0b61++){_0x596075=_0xdb458e[_0x45ba12(0xbb)](_0x596075,0x100)+_0x5c9c85[_0xdb458e[_0x45ba12(0x9c)](_0x21c9d1,_0x4f0b61)];}return _0x596075;}function isUnknownSize(_0x25b8fa,_0x1b9633){const _0x169e05=_0x277d,_0x964dd8={'TZSDm':function(_0x22e4b7,_0x10f52f){return _0x22e4b7===_0x10f52f;},'LZYkQ':function(_0x51d5ce,_0xaf0816){return _0x51d5ce-_0xaf0816;}};return _0x964dd8[_0x169e05(0xcf)](_0x25b8fa,_0x964dd8[_0x169e05(0xa0)](Math[_0x169e05(0x99)](0x2,0x7*_0x1b9633),0x1));}function writeVint(_0x44fc96,_0x9b48f4){const _0x35e693=_0x277d,_0x1b207c={'yaArG':function(_0x5a44b1,_0x151df4){return _0x5a44b1||_0x151df4;},'VCEiJ':function(_0x5d18c3,_0x45e1cd){return _0x5d18c3<_0x45e1cd;},'jCrfI':function(_0x2b2a36,_0xa1dd25){return _0x2b2a36>=_0xa1dd25;},'icJdX':function(_0x16ec40,_0x3c2cdc){return _0x16ec40&_0x3c2cdc;},'GMLDm':function(_0x4d4b13,_0x1a430e){return _0x4d4b13/_0x1a430e;},'pBYVw':function(_0x18019c,_0x1e39b8){return _0x18019c<<_0x1e39b8;},'RvdIE':function(_0x2894b1,_0x254eee){return _0x2894b1-_0x254eee;}};let _0x520817=_0x1b207c['yaArG'](_0x9b48f4,0x1);while(_0x1b207c[_0x35e693(0x8e)](Math['pow'](0x2,0x7*_0x520817)-0x2,_0x44fc96))_0x520817++;const _0x59628c=Buffer['alloc'](_0x520817);for(let _0x5d618b=_0x520817-0x1;_0x1b207c['jCrfI'](_0x5d618b,0x0);_0x5d618b--){_0x59628c[_0x5d618b]=_0x1b207c['icJdX'](_0x44fc96,0xff),_0x44fc96=Math[_0x35e693(0xd3)](_0x1b207c['GMLDm'](_0x44fc96,0x100));}return _0x59628c[0x0]|=_0x1b207c['pBYVw'](0x1,_0x1b207c['RvdIE'](0x8,_0x520817)),_0x59628c;}function writeUint(_0x5b3d95,_0x192b09){const _0x30225e=_0x277d,_0xbaba58={'UloLI':function(_0x276eb,_0x3e8741){return _0x276eb/_0x3e8741;}},_0x3604ff=Buffer[_0x30225e(0xc2)](_0x192b09);for(let _0x49699e=_0x192b09-0x1;_0x49699e>=0x0;_0x49699e--){_0x3604ff[_0x49699e]=_0x5b3d95&0xff,_0x5b3d95=Math['floor'](_0xbaba58['UloLI'](_0x5b3d95,0x100));}return _0x3604ff;}function writeUnknownSizeVint(_0x5c5999){const _0x3e77f3=_0x277d,_0x3c3c25={'WlsdL':function(_0x1f9905,_0x1c1f2b){return _0x1f9905>>_0x1c1f2b;},'oCPiH':function(_0x3fd6bc,_0x1b956d){return _0x3fd6bc-_0x1b956d;}},_0x413f32=Buffer[_0x3e77f3(0xc2)](_0x5c5999,0xff);return _0x413f32[0x0]=_0x3c3c25[_0x3e77f3(0x8f)](0xff,_0x3c3c25['oCPiH'](_0x5c5999,0x1)),_0x413f32;}function uintSize(_0x45c435){const _0x589c2d={'rZphr':function(_0xfdf3d,_0x252bc6){return _0xfdf3d>_0x252bc6;}};if(_0x45c435===0x0)return 0x1;let _0xa2d928=0x0,_0x1a7a9f=_0x45c435;while(_0x589c2d['rZphr'](_0x1a7a9f,0x0)){_0xa2d928++,_0x1a7a9f=Math['floor'](_0x1a7a9f/0x100);}return _0xa2d928;}function findTimestampScale(_0x4f73bc,_0x35f26a){const _0x199df6=_0x277d,_0x4b3e43={'bafFr':function(_0x2334b0,_0x430fbd){return _0x2334b0+_0x430fbd;},'MEFCA':function(_0x4e6904,_0x40aac8){return _0x4e6904<_0x40aac8;},'AdTsE':function(_0xb2481e,_0x55e25b,_0x1cec45){return _0xb2481e(_0x55e25b,_0x1cec45);},'HVsYe':function(_0x56d272,_0x5e9610){return _0x56d272===_0x5e9610;},'cVRay':function(_0x5b81de,_0x1759bd){return _0x5b81de+_0x1759bd;},'dwdCn':function(_0x34fcaf,_0x14c23f,_0x59cb39){return _0x34fcaf(_0x14c23f,_0x59cb39);},'bqqVK':function(_0x573b4c,_0x14a663,_0xb32256,_0x12f919){return _0x573b4c(_0x14a663,_0xb32256,_0x12f919);},'aaKaz':function(_0x30ccdc,_0x4dd64e){return _0x30ccdc+_0x4dd64e;},'JHQTJ':function(_0x440a55,_0x55f0b2){return _0x440a55+_0x55f0b2;},'DuEAY':function(_0x7babd,_0x2113ea,_0x4ce5ae){return _0x7babd(_0x2113ea,_0x4ce5ae);},'gpzmf':function(_0x447b1d,_0x49ec1a){return _0x447b1d+_0x49ec1a;}};let _0x268fcd=_0x35f26a;const _0x32e575=Math[_0x199df6(0xaa)](_0x4f73bc[_0x199df6(0xc9)],_0x4b3e43['bafFr'](_0x35f26a,0x2710));while(_0x4b3e43['MEFCA'](_0x268fcd,_0x32e575)){const [_0x1b2db4,_0x264993]=_0x4b3e43[_0x199df6(0xcc)](readId,_0x4f73bc,_0x268fcd),[_0x1575ef,_0x4d4f91]=readVint(_0x4f73bc,_0x268fcd+_0x264993);if(_0x4b3e43['HVsYe'](_0x1b2db4,ID_INFO)){let _0x16d413=_0x268fcd+_0x264993+_0x4d4f91;const _0x350cbd=_0x4b3e43['cVRay'](_0x16d413,_0x1575ef);while(_0x16d413<_0x350cbd){const [_0x224672,_0x1784aa]=_0x4b3e43['AdTsE'](readId,_0x4f73bc,_0x16d413),[_0x544008,_0x418fd7]=_0x4b3e43[_0x199df6(0xc8)](readVint,_0x4f73bc,_0x16d413+_0x1784aa);if(_0x224672===ID_TIMESTAMP_SCALE)return _0x4b3e43[_0x199df6(0xdb)](readUint,_0x4f73bc,_0x4b3e43[_0x199df6(0xc4)](_0x16d413+_0x1784aa,_0x418fd7),_0x544008);_0x16d413+=_0x4b3e43[_0x199df6(0x92)](_0x4b3e43['cVRay'](_0x1784aa,_0x418fd7),_0x544008);}break;}if(_0x1b2db4===ID_CLUSTER)break;if(_0x4b3e43[_0x199df6(0xa6)](isUnknownSize,_0x1575ef,_0x4d4f91))break;_0x268fcd+=_0x4b3e43[_0x199df6(0xd1)](_0x264993+_0x4d4f91,_0x1575ef);}return 0xf4240;}function findFirstClusterOffset(_0x41b213,_0x4650f2){const _0x4c934f=_0x277d,_0x167db0={'umNlD':function(_0x14bd11,_0x541e71){return _0x14bd11<_0x541e71;},'XVbJW':function(_0x44b3cd,_0x14110c,_0x5a2f48){return _0x44b3cd(_0x14110c,_0x5a2f48);},'fvZZe':function(_0x138dbb,_0xe96a0f){return _0x138dbb+_0xe96a0f;},'cbQpu':function(_0x22d7d1,_0x4c2a81){return _0x22d7d1+_0x4c2a81;},'vCrmO':function(_0x525eec,_0x1c2ef1){return _0x525eec+_0x1c2ef1;}};let _0x364666=_0x4650f2;while(_0x167db0['umNlD'](_0x364666,_0x41b213['length'])){const [_0x289948,_0x2b3195]=_0x167db0[_0x4c934f(0xbd)](readId,_0x41b213,_0x364666);if(_0x289948===ID_CLUSTER)return _0x364666;const [_0x477d53,_0x2fc509]=_0x167db0['XVbJW'](readVint,_0x41b213,_0x167db0['fvZZe'](_0x364666,_0x2b3195));if(isUnknownSize(_0x477d53,_0x2fc509))return _0x364666;_0x364666+=_0x167db0['cbQpu'](_0x167db0['vCrmO'](_0x2b3195,_0x2fc509),_0x477d53);}return _0x41b213[_0x4c934f(0xc9)];}function findClusterEnd(_0x2f429c,_0x5f5b57,_0x92fff0,_0x164681){const _0x4ba965=_0x277d,_0x44ca6e={'gDLgk':function(_0x1d601b,_0x3b96e5,_0x58c272){return _0x1d601b(_0x3b96e5,_0x58c272);},'bDdVU':function(_0x3e3616,_0xc86c2b){return _0x3e3616-_0xc86c2b;}};if(!_0x44ca6e['gDLgk'](isUnknownSize,_0x92fff0,_0x164681))return _0x5f5b57+_0x92fff0;const _0x4be83c=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4c660c=_0x5f5b57;while(_0x4c660c<_0x44ca6e[_0x4ba965(0xc5)](_0x2f429c[_0x4ba965(0xc9)],0x4)){const [_0xd9ff7e,_0x5bf5ca]=_0x44ca6e[_0x4ba965(0xa9)](readId,_0x2f429c,_0x4c660c);if(_0x4be83c['has'](_0xd9ff7e))return _0x4c660c;const [_0x105ede,_0x317e3c]=readVint(_0x2f429c,_0x4c660c+_0x5bf5ca);if(_0x44ca6e[_0x4ba965(0xa9)](isUnknownSize,_0x105ede,_0x317e3c))return _0x2f429c['length'];_0x4c660c+=_0x5bf5ca+_0x317e3c+_0x105ede;}return _0x2f429c[_0x4ba965(0xc9)];}function _0x54cf(){const _0x4a1066=['RbtSJ','aUanh','DkZKb','header','Fctlw','stitchWebmFiles.ts','XVbJW','2QgMjba','grlCk','qBFKi','840133ZxpRXk','alloc','2599194uzVjbY','aaKaz','bDdVU','copy','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','dwdCn','length','faQpv','PpSPq','AdTsE','163830woYoVR','bodyAfterTimestamp','TZSDm','kcNgZ','gpzmf','exit','floor','hbuXe','JCcar','bMRUl','argv','max','GZSTt','kgYvO','bqqVK','388186YFsjyt','indexOf','VCEiJ','WlsdL','from','bWAaG','JHQTJ','SSiJG','wzcCN','endsWith','aFvoJ','PkXjv','uSuMS','pow','1980860LJZDky','slice','jpazD','SmKVM','1870128QyFsJP','yddCM','LZYkQ','azGtY','maxTicks','concat','yEsTR','push','DuEAY','MeMYy','IMrjE','gDLgk','min','wUUkA','BylGk','log','iBsIa','pgRrK','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','APNmE','zffWS','DWMTX','timestamp','4912864TJakwQ','nrWWT'];_0x54cf=function(){return _0x4a1066;};return _0x54cf();}function extractClusters(_0x5727b6,_0x480039){const _0xee7877=_0x277d,_0x29a6fc={'wzcCN':function(_0x207704,_0x1ce505){return _0x207704<_0x1ce505;},'RbtSJ':function(_0x409e74,_0xc206b7,_0x3f4078){return _0x409e74(_0xc206b7,_0x3f4078);},'IMrjE':function(_0x33c64c,_0x2fd738){return _0x33c64c!==_0x2fd738;},'OjBYI':function(_0x227765,_0x3ebfb6){return _0x227765+_0x3ebfb6;},'MeMYy':function(_0x2c400d,_0x3eb6d0,_0x4d2216){return _0x2c400d(_0x3eb6d0,_0x4d2216);},'emgcG':function(_0x2793e9,_0x5bee7c,_0x3fbd6c,_0x2e8377,_0x568dd6){return _0x2793e9(_0x5bee7c,_0x3fbd6c,_0x2e8377,_0x568dd6);},'yEsTR':function(_0x39a669,_0x444ad2){return _0x39a669+_0x444ad2;},'aUanh':function(_0x363576,_0x406d0b){return _0x363576===_0x406d0b;},'kcNgZ':function(_0x2500b5,_0x4bbca2){return _0x2500b5===_0x4bbca2;},'pgRrK':function(_0x3db2fc,_0x11e4cc){return _0x3db2fc+_0x11e4cc;},'wUUkA':function(_0x5b3a27,_0xbfdd47){return _0x5b3a27<_0xbfdd47;},'FtNVj':function(_0x2eba46,_0x17f0b5){return _0x2eba46+_0x17f0b5;}},_0x411950=[],_0x452363=Buffer[_0xee7877(0x90)]([0x1f,0x43,0xb6,0x75]);let _0x24dd47=0x0;while(_0x29a6fc[_0xee7877(0x94)](_0x24dd47,_0x5727b6['length'])){const _0x215f43=_0x5727b6[_0xee7877(0x8d)](_0x452363,_0x24dd47);if(_0x215f43===-0x1)break;const [_0x52460e,_0x177797]=_0x29a6fc['RbtSJ'](readId,_0x5727b6,_0x215f43);if(_0x29a6fc[_0xee7877(0xa8)](_0x52460e,ID_CLUSTER)){_0x24dd47=_0x29a6fc['OjBYI'](_0x215f43,0x1);continue;}const [_0xb531df,_0x1ba281]=_0x29a6fc[_0xee7877(0xa7)](readVint,_0x5727b6,_0x215f43+_0x177797),_0x1f2d83=_0x215f43+_0x177797+_0x1ba281,_0x518664=_0x29a6fc['emgcG'](findClusterEnd,_0x5727b6,_0x1f2d83,_0xb531df,_0x1ba281);let _0x239f84=_0x1f2d83,_0x1a007f=0x0,_0x154ec1=0x2,_0x39d36f=![],_0xbe7b6b=Buffer['alloc'](0x0),_0x2e9146=Buffer[_0xee7877(0xc2)](0x0);while(_0x239f84<_0x518664){const [_0x290c3d,_0x33ec70]=_0x29a6fc['RbtSJ'](readId,_0x5727b6,_0x239f84),[_0x3bec86,_0x1296ac]=readVint(_0x5727b6,_0x29a6fc[_0xee7877(0xa4)](_0x239f84,_0x33ec70));if(_0x29a6fc[_0xee7877(0xb8)](_0x290c3d,ID_TIMESTAMP)){_0x1a007f=readUint(_0x5727b6,_0x239f84+_0x33ec70+_0x1296ac,_0x3bec86),_0x154ec1=_0x3bec86,_0x39d36f=!![],_0xbe7b6b=_0x5727b6['slice'](_0x1f2d83,_0x239f84);const _0x389b85=_0x29a6fc[_0xee7877(0xa4)](_0x29a6fc[_0xee7877(0xa4)](_0x239f84,_0x33ec70),_0x1296ac)+_0x3bec86;_0x2e9146=_0x5727b6['slice'](_0x389b85,_0x518664);break;}if(_0x29a6fc[_0xee7877(0xd0)](_0x290c3d,ID_CLUSTER))break;if(isUnknownSize(_0x3bec86,_0x1296ac))break;_0x239f84+=_0x29a6fc[_0xee7877(0xaf)](_0x33ec70,_0x1296ac)+_0x3bec86;}!_0x39d36f&&(_0x2e9146=_0x5727b6[_0xee7877(0x9b)](_0x1f2d83,_0x518664));let _0x273694=_0x1a007f;_0x239f84=_0x1f2d83;while(_0x29a6fc[_0xee7877(0xab)](_0x239f84,_0x518664)){const [_0x23c1c7,_0x39470a]=readId(_0x5727b6,_0x239f84),[_0x1d7e24,_0x39bb72]=_0x29a6fc[_0xee7877(0xb7)](readVint,_0x5727b6,_0x29a6fc['yEsTR'](_0x239f84,_0x39470a));if(_0x29a6fc[_0xee7877(0xb8)](_0x23c1c7,ID_SIMPLE_BLOCK)&&_0x1d7e24>=0x4){const _0x201d3d=_0x29a6fc['pgRrK'](_0x239f84,_0x39470a)+_0x39bb72,[,_0x122016]=readVint(_0x5727b6,_0x201d3d),_0x2e70fa=_0x5727b6['readInt16BE'](_0x201d3d+_0x122016),_0x1d9ca7=_0x1a007f+_0x2e70fa;if(_0x1d9ca7>_0x273694)_0x273694=_0x1d9ca7;}if(_0x23c1c7===ID_CLUSTER)break;if(isUnknownSize(_0x1d7e24,_0x39bb72))break;_0x239f84+=_0x29a6fc['FtNVj'](_0x39470a+_0x39bb72,_0x1d7e24);}_0x411950['push']({'timestamp':_0x1a007f,'maxTicks':_0x273694,'bodyBeforeTimestamp':_0xbe7b6b,'bodyAfterTimestamp':_0x2e9146,'timestampElementSize':_0x154ec1}),_0x24dd47=_0x518664;}return _0x411950;}function parseWebm(_0x243e76){const _0x36b012=_0x277d,_0xbd01b1={'faQpv':function(_0x1895d4,_0x39ce7f,_0x4069ec){return _0x1895d4(_0x39ce7f,_0x4069ec);},'PpSPq':function(_0x14732b,_0x7ee762){return _0x14732b+_0x7ee762;},'yddCM':function(_0x5cb7ef,_0x500631){return _0x5cb7ef+_0x500631;},'lkKVe':function(_0x2c86c4,_0x4f5a5a){return _0x2c86c4+_0x4f5a5a;},'aFvoJ':function(_0x458d57,_0xed4ee7,_0x3be62d){return _0x458d57(_0xed4ee7,_0x3be62d);}};let _0x45ca3c=0x0;const [,_0x3b351e]=readId(_0x243e76,_0x45ca3c),[_0x4fe250,_0x45d5d4]=_0xbd01b1[_0x36b012(0xca)](readVint,_0x243e76,_0xbd01b1['PpSPq'](_0x45ca3c,_0x3b351e));_0x45ca3c+=_0xbd01b1['yddCM'](_0xbd01b1[_0x36b012(0x9f)](_0x3b351e,_0x45d5d4),_0x4fe250);const [_0x3ec1e6,_0x2482cc]=_0xbd01b1['faQpv'](readId,_0x243e76,_0x45ca3c);if(_0x3ec1e6!==ID_SEGMENT)return null;const [,_0x59a4b8]=readVint(_0x243e76,_0x45ca3c+_0x2482cc),_0x1a1de9=_0xbd01b1['lkKVe'](_0xbd01b1[_0x36b012(0xcb)](_0x45ca3c,_0x2482cc),_0x59a4b8),_0x97e548=_0xbd01b1[_0x36b012(0x96)](findTimestampScale,_0x243e76,_0x1a1de9),_0xf9cbde=findFirstClusterOffset(_0x243e76,_0x1a1de9),_0x272a5d=_0x243e76[_0x36b012(0x9b)](0x0,_0xf9cbde),_0x5d5e11=_0xbd01b1['faQpv'](extractClusters,_0x243e76,_0x97e548);let _0x999edf=0x0;for(const _0x384d4b of _0x5d5e11){if(_0x384d4b['maxTicks']>_0x999edf)_0x999edf=_0x384d4b[_0x36b012(0xa2)];}return{'header':_0x272a5d,'clusters':_0x5d5e11,'timestampScale':_0x97e548,'maxTimestampTicks':_0x999edf};}function buildCluster(_0x22b58b,_0x5881a9,_0xbe161b){const _0x236deb=_0x277d,_0x50c926={'zffWS':function(_0x717f63,_0x33e273){return _0x717f63(_0x33e273);},'grlCk':function(_0x14cb3e,_0x993a74){return _0x14cb3e(_0x993a74);},'PkXjv':function(_0x45126e,_0xd66ef1,_0x18e552){return _0x45126e(_0xd66ef1,_0x18e552);}},_0x36b486=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5a5aa3=Math[_0x236deb(0xd8)](0x4,_0x50c926[_0x236deb(0xb2)](uintSize,_0x22b58b)),_0x516f0a=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x50c926[_0x236deb(0xbf)](writeVint,_0x5a5aa3),_0x50c926[_0x236deb(0x97)](writeUint,_0x22b58b,_0x5a5aa3)]),_0xa46748=Buffer['concat']([_0x5881a9,_0x516f0a,_0xbe161b]),_0x5a8f1e=_0x50c926[_0x236deb(0xb2)](writeVint,_0xa46748[_0x236deb(0xc9)]);return Buffer['concat']([_0x36b486,_0x5a8f1e,_0xa46748]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4e4f8c){const _0x21a0b5=_0x277d,_0x5d7541={'BylGk':function(_0x367093,_0x3aa309,_0x2f0b6b){return _0x367093(_0x3aa309,_0x2f0b6b);},'GZSTt':function(_0x58a5e2,_0x1f5587){return _0x58a5e2+_0x1f5587;},'uSuMS':function(_0x579669,_0x161a0b){return _0x579669+_0x161a0b;},'APNmE':function(_0x8b1735,_0x4f7450){return _0x8b1735+_0x4f7450;},'kgYvO':function(_0x49e65b,_0x434f04){return _0x49e65b(_0x434f04);},'iBsIa':function(_0x4b3449,_0x7c53ea){return _0x4b3449<_0x7c53ea;},'FTGrB':function(_0x27f0be,_0x3763f8){return _0x27f0be+_0x3763f8;},'azGtY':function(_0x54782e,_0x3c5a6f){return _0x54782e===_0x3c5a6f;},'bWAaG':function(_0x36eba7,_0x1184cc){return _0x36eba7+_0x1184cc;},'yoGNy':function(_0x26b9e6,_0x1514de,_0x2ef042){return _0x26b9e6(_0x1514de,_0x2ef042);}},_0x28def5=Buffer['from'](_0x4e4f8c);let _0x3a689f=0x0;const [,_0x4a7fdd]=_0x5d7541['BylGk'](readId,_0x28def5,_0x3a689f),[_0x36f10a,_0x7beaa7]=readVint(_0x28def5,_0x5d7541[_0x21a0b5(0xd9)](_0x3a689f,_0x4a7fdd)),_0x4513a4=_0x5d7541[_0x21a0b5(0x98)](_0x3a689f+_0x4a7fdd,_0x7beaa7)+_0x36f10a,[,_0x3991f6]=readId(_0x28def5,_0x4513a4),[,_0x576ef5]=readVint(_0x28def5,_0x4513a4+_0x3991f6),_0x5614e2=_0x5d7541[_0x21a0b5(0x98)](_0x5d7541[_0x21a0b5(0xb1)](_0x4513a4,_0x3991f6),_0x576ef5),_0x34d5a7=_0x5d7541[_0x21a0b5(0xda)](writeUnknownSizeVint,_0x576ef5);_0x34d5a7[_0x21a0b5(0xc6)](_0x28def5,_0x4513a4+_0x3991f6);let _0xc57f14=_0x5614e2;const _0x18da4f=Math[_0x21a0b5(0xaa)](_0x28def5[_0x21a0b5(0xc9)],_0x5d7541[_0x21a0b5(0xd9)](_0x5614e2,0x2710));while(_0x5d7541[_0x21a0b5(0xae)](_0xc57f14,_0x18da4f)){const [_0x57fd7a,_0x398d9e]=_0x5d7541['BylGk'](readId,_0x28def5,_0xc57f14),[_0x3a82b7,_0x147db4]=readVint(_0x28def5,_0x5d7541['FTGrB'](_0xc57f14,_0x398d9e));if(_0x57fd7a===ID_CLUSTER)break;if(_0x5d7541[_0x21a0b5(0xac)](isUnknownSize,_0x3a82b7,_0x147db4))break;if(_0x5d7541[_0x21a0b5(0xa1)](_0x57fd7a,ID_INFO)){const _0x490da7=_0x5d7541['APNmE'](_0xc57f14+_0x398d9e,_0x147db4),_0x27ca14=_0x5d7541['FTGrB'](_0x490da7,_0x3a82b7),_0x258454=[];let _0xb3814a=_0x490da7;while(_0xb3814a<_0x27ca14){const [_0x46decf,_0x11f4af]=_0x5d7541['BylGk'](readId,_0x28def5,_0xb3814a),[_0x52d1c7,_0x19e321]=readVint(_0x28def5,_0xb3814a+_0x11f4af),_0x1f2a36=_0x11f4af+_0x19e321+_0x52d1c7;_0x46decf!==ID_DURATION&&_0x258454[_0x21a0b5(0xa5)](_0x28def5[_0x21a0b5(0x9b)](_0xb3814a,_0xb3814a+_0x1f2a36)),_0xb3814a+=_0x1f2a36;}const _0x3186a3=Buffer['concat'](_0x258454),_0x240a3b=Buffer['concat']([_0x28def5[_0x21a0b5(0x9b)](_0xc57f14,_0x5d7541[_0x21a0b5(0x91)](_0xc57f14,_0x398d9e)),_0x5d7541['yoGNy'](writeVint,_0x3186a3[_0x21a0b5(0xc9)],_0x147db4)]);return Buffer[_0x21a0b5(0xa3)]([_0x28def5['slice'](0x0,_0xc57f14),_0x240a3b,_0x3186a3,_0x28def5[_0x21a0b5(0x9b)](_0x27ca14)]);}_0xc57f14+=_0x5d7541['bWAaG'](_0x398d9e,_0x147db4)+_0x3a82b7;}return _0x28def5;}export function stitchWebmFiles(_0x323954,_0x435301){const _0x4ce66b=_0x277d,_0x504364={'JCcar':function(_0x1b9f96,_0x82a78e){return _0x1b9f96<=_0x82a78e;},'BEmZI':function(_0x20c9e0,_0x51ce34){return _0x20c9e0(_0x51ce34);},'SSiJG':function(_0xfded46,_0x257f7e){return _0xfded46===_0x257f7e;},'nrWWT':function(_0x378a8e,_0x43e8b7){return _0x378a8e+_0x43e8b7;},'DkZKb':function(_0x2f1baf,_0x4c27dc,_0x5838a5){return _0x2f1baf(_0x4c27dc,_0x5838a5);}};if(_0x504364[_0x4ce66b(0xd5)](_0x323954[_0x4ce66b(0xc9)],0x1))return![];const _0x5991e9=[];for(const _0x4ee52b of _0x323954){const _0x12d605=_0x504364['BEmZI'](readFileSync,_0x4ee52b),_0x5514f4=parseWebm(_0x12d605);if(!_0x5514f4||_0x504364[_0x4ce66b(0x93)](_0x5514f4['clusters']['length'],0x0))return![];_0x5991e9[_0x4ce66b(0xa5)](_0x5514f4);}const _0x4f69c1=_0x5991e9[0x0],_0x4a41ec=rebuildHeaderWithoutDuration(_0x4f69c1[_0x4ce66b(0xba)]),_0x4067bf=[_0x4a41ec];let _0x170a7d=0x0;for(let _0x1710bd=0x0;_0x1710bd<_0x5991e9['length'];_0x1710bd++){const _0x53cab6=_0x5991e9[_0x1710bd];for(const _0x3cf8b5 of _0x53cab6['clusters']){const _0xfa1a8=_0x504364['nrWWT'](_0x3cf8b5[_0x4ce66b(0xb4)],_0x170a7d);_0x4067bf['push'](buildCluster(_0xfa1a8,_0x3cf8b5['bodyBeforeTimestamp'],_0x3cf8b5[_0x4ce66b(0xce)]));}const _0x51f1c1=0x1e;_0x170a7d+=_0x504364[_0x4ce66b(0xb6)](_0x53cab6['maxTimestampTicks'],_0x51f1c1);}return _0x504364[_0x4ce66b(0xb9)](writeFileSync,_0x435301,Buffer[_0x4ce66b(0xa3)](_0x4067bf)),!![];}if(process[_0x562a20(0xd7)][0x1]?.[_0x562a20(0x95)](_0x562a20(0xbc))||process[_0x562a20(0xd7)][0x1]?.[_0x562a20(0x95)]('stitchWebmFiles.js')){const args=process['argv'][_0x562a20(0x9b)](0x2);args[_0x562a20(0xc9)]<0x3&&(console['error'](_0x562a20(0xc7)),process[_0x562a20(0xd2)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x562a20(0xad)]('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console['log'](_0x562a20(0xb0));}
|
|
1
|
+
const _0x170adf=_0x4341;(function(_0x9e81d9,_0x323c29){const _0x1e3c1f=_0x4341,_0x283422=_0x9e81d9();while(!![]){try{const _0x11689a=parseInt(_0x1e3c1f(0x125))/0x1*(parseInt(_0x1e3c1f(0x131))/0x2)+parseInt(_0x1e3c1f(0x121))/0x3+parseInt(_0x1e3c1f(0x165))/0x4+parseInt(_0x1e3c1f(0x150))/0x5*(-parseInt(_0x1e3c1f(0x15a))/0x6)+-parseInt(_0x1e3c1f(0x130))/0x7*(-parseInt(_0x1e3c1f(0x141))/0x8)+parseInt(_0x1e3c1f(0x120))/0x9*(-parseInt(_0x1e3c1f(0x153))/0xa)+-parseInt(_0x1e3c1f(0x138))/0xb;if(_0x11689a===_0x323c29)break;else _0x283422['push'](_0x283422['shift']());}catch(_0x5e4ba2){_0x283422['push'](_0x283422['shift']());}}}(_0x2b42,0xac485));function _0x4341(_0x259cbb,_0x322135){_0x259cbb=_0x259cbb-0x11f;const _0x2b4245=_0x2b42();let _0x434119=_0x2b4245[_0x259cbb];return _0x434119;}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x2886f8,_0x3773e2){const _0x5763c6=_0x4341,_0x5d6f92={'kWywU':function(_0x3bf275,_0x1d38a6){return _0x3bf275&_0x1d38a6;},'wUDcX':function(_0x4a494a,_0x592186){return _0x4a494a+_0x592186;}};if(_0x3773e2>=_0x2886f8['length'])return[0x0,0x0];const _0x5d2e7c=_0x2886f8[_0x3773e2];let _0x4d310a=0x1,_0x40d4e9=0x80;while(_0x4d310a<=0x8&&!_0x5d6f92['kWywU'](_0x5d2e7c,_0x40d4e9)){_0x4d310a++,_0x40d4e9>>=0x1;}if(_0x3773e2+_0x4d310a>_0x2886f8[_0x5763c6(0x14f)])return[0x0,0x0];let _0x275542=_0x5d6f92['kWywU'](_0x5d2e7c,_0x40d4e9-0x1);for(let _0x4fb822=0x1;_0x4fb822<_0x4d310a;_0x4fb822++){_0x275542=_0x5d6f92[_0x5763c6(0x13b)](_0x275542*0x100,_0x2886f8[_0x3773e2+_0x4fb822]);}return[_0x275542,_0x4d310a];}function readId(_0x237cd2,_0x50b173){const _0x14ee18=_0x4341,_0x4a9ce8={'vGYwR':function(_0x3abbe2,_0x2f054a){return _0x3abbe2>=_0x2f054a;},'NNDTc':function(_0x2c594b,_0x3cc088){return _0x2c594b>=_0x3cc088;},'SdFxr':function(_0x359cb9,_0x408060){return _0x359cb9>=_0x408060;},'pvTwk':function(_0x293b11,_0x1c5d62){return _0x293b11>=_0x1c5d62;},'LDHcO':function(_0x11cf0c,_0x2321e9){return _0x11cf0c>_0x2321e9;},'TQwmK':function(_0x33de6c,_0x63284d){return _0x33de6c+_0x63284d;},'jBTuI':function(_0x1d8077,_0x42f41b){return _0x1d8077<_0x42f41b;}};if(_0x50b173>=_0x237cd2[_0x14ee18(0x14f)])return[0x0,0x0];const _0x1fe342=_0x237cd2[_0x50b173];let _0x2c886e;if(_0x4a9ce8[_0x14ee18(0x12b)](_0x1fe342,0x80))_0x2c886e=0x1;else{if(_0x4a9ce8['NNDTc'](_0x1fe342,0x40))_0x2c886e=0x2;else{if(_0x4a9ce8['SdFxr'](_0x1fe342,0x20))_0x2c886e=0x3;else{if(_0x4a9ce8['pvTwk'](_0x1fe342,0x10))_0x2c886e=0x4;else return[_0x1fe342,0x1];}}}if(_0x4a9ce8['LDHcO'](_0x4a9ce8['TQwmK'](_0x50b173,_0x2c886e),_0x237cd2['length']))return[0x0,0x0];let _0x153360=0x0;for(let _0x4b9477=0x0;_0x4a9ce8['jBTuI'](_0x4b9477,_0x2c886e);_0x4b9477++){_0x153360=_0x4a9ce8['TQwmK'](_0x153360*0x100,_0x237cd2[_0x4a9ce8['TQwmK'](_0x50b173,_0x4b9477)]);}return[_0x153360,_0x2c886e];}function readUint(_0x153abf,_0x4782e0,_0x597c56){const _0x69a06f={'JhSaM':function(_0x2cff61,_0x373b97){return _0x2cff61*_0x373b97;},'qdcrs':function(_0x49efdf,_0x11aae8){return _0x49efdf+_0x11aae8;}};let _0x1b6f00=0x0;for(let _0x3c49e4=0x0;_0x3c49e4<_0x597c56;_0x3c49e4++){_0x1b6f00=_0x69a06f['JhSaM'](_0x1b6f00,0x100)+_0x153abf[_0x69a06f['qdcrs'](_0x4782e0,_0x3c49e4)];}return _0x1b6f00;}function _0x2b42(){const _0x16e999=['FLAFn','has','EAuRY','4843244cMjACm','rGZWE','tatPm','Stitched\x20','LVacZ','AKJsR','51318MfECvv','2334771qQpAGo','Dmhpc','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','readInt16BE','53374MASifR','exit','iJFRY','OXwwI','RFveg','KRrLC','vGYwR','KAdVF','qyceh','\x20files\x20->\x20','xvuYq','98TyKSIz','4OmnTcc','AAcIE','copy','isNvI','gaAhr','oJIhY','KbGux','14679940DVjedB','argv','JiqLK','wUDcX','pow','alloc','tTtug','floor','TnzkX','650648jnveZq','concat','RhHJY','korZg','kisoc','ijsSU','WfEjv','maxTimestampTicks','IGHec','stitchWebmFiles.ts','gbwaM','stitchWebmFiles.js','pQvov','EJmXL','length','5hQzxPm','slice','log','1180jkDvDD','wuMPB','pKrLx','from','FxGUc','Lrrxo','uPqUL','3128430uKXcWw','Khffd','gpEYz','min','bodyAfterTimestamp','xTZYX','indexOf','drkdx'];_0x2b42=function(){return _0x16e999;};return _0x2b42();}function isUnknownSize(_0x5b1e5,_0x32aa30){const _0x138d55=_0x4341,_0x5e0b17={'xTZYX':function(_0x16d551,_0x10bbea){return _0x16d551===_0x10bbea;},'ijsSU':function(_0x5256bb,_0x12b100){return _0x5256bb-_0x12b100;}};return _0x5e0b17[_0x138d55(0x15f)](_0x5b1e5,_0x5e0b17[_0x138d55(0x146)](Math[_0x138d55(0x13c)](0x2,0x7*_0x32aa30),0x1));}function writeVint(_0x58d625,_0x22182a){const _0x58851f=_0x4341,_0x2021a0={'qImok':function(_0xa3b34c,_0x3487f6){return _0xa3b34c<_0x3487f6;},'WfEjv':function(_0x2e56a8,_0x3f2f39){return _0x2e56a8-_0x3f2f39;},'RehnG':function(_0x2be694,_0x1d8310){return _0x2be694*_0x1d8310;},'KbGux':function(_0x23ce12,_0x128ec7){return _0x23ce12>=_0x128ec7;},'nqJRk':function(_0x4bea47,_0x5a5482){return _0x4bea47&_0x5a5482;},'wuMPB':function(_0x368751,_0x17ef21){return _0x368751/_0x17ef21;},'Lrrxo':function(_0x1a22c1,_0x15c62c){return _0x1a22c1<<_0x15c62c;}};let _0x4786b2=_0x22182a||0x1;while(_0x2021a0['qImok'](_0x2021a0[_0x58851f(0x147)](Math['pow'](0x2,_0x2021a0['RehnG'](0x7,_0x4786b2)),0x2),_0x58d625))_0x4786b2++;const _0x42afab=Buffer['alloc'](_0x4786b2);for(let _0x5a58d4=_0x4786b2-0x1;_0x2021a0[_0x58851f(0x137)](_0x5a58d4,0x0);_0x5a58d4--){_0x42afab[_0x5a58d4]=_0x2021a0['nqJRk'](_0x58d625,0xff),_0x58d625=Math['floor'](_0x2021a0[_0x58851f(0x154)](_0x58d625,0x100));}return _0x42afab[0x0]|=_0x2021a0[_0x58851f(0x158)](0x1,0x8-_0x4786b2),_0x42afab;}function writeUint(_0x20782a,_0x2a8a4e){const _0xcb5b22=_0x4341,_0x486da9=Buffer[_0xcb5b22(0x13d)](_0x2a8a4e);for(let _0x392ea9=_0x2a8a4e-0x1;_0x392ea9>=0x0;_0x392ea9--){_0x486da9[_0x392ea9]=_0x20782a&0xff,_0x20782a=Math[_0xcb5b22(0x13f)](_0x20782a/0x100);}return _0x486da9;}function writeUnknownSizeVint(_0x24d848){const _0x121639=_0x4341,_0x4617ca={'tgrgd':function(_0x5a678f,_0x3be48f){return _0x5a678f>>_0x3be48f;}},_0x22a2f1=Buffer[_0x121639(0x13d)](_0x24d848,0xff);return _0x22a2f1[0x0]=_0x4617ca['tgrgd'](0xff,_0x24d848-0x1),_0x22a2f1;}function uintSize(_0x546b80){const _0x36a8b5=_0x4341,_0x3fa587={'dupML':function(_0x5ab6d3,_0x353814){return _0x5ab6d3===_0x353814;},'RFveg':function(_0x269817,_0x4bf4e4){return _0x269817>_0x4bf4e4;},'EJmXL':function(_0x243481,_0x800721){return _0x243481/_0x800721;}};if(_0x3fa587['dupML'](_0x546b80,0x0))return 0x1;let _0x1fdf00=0x0,_0x55a561=_0x546b80;while(_0x3fa587[_0x36a8b5(0x129)](_0x55a561,0x0)){_0x1fdf00++,_0x55a561=Math[_0x36a8b5(0x13f)](_0x3fa587[_0x36a8b5(0x14e)](_0x55a561,0x100));}return _0x1fdf00;}function findTimestampScale(_0x505c99,_0x258afe){const _0x531d61=_0x4341,_0x33c69d={'KAdVF':function(_0x599bf9,_0x299054){return _0x599bf9+_0x299054;},'pJHsv':function(_0x491159,_0x40f375){return _0x491159<_0x40f375;},'AziOX':function(_0x42b208,_0x544ac1,_0x4e026d){return _0x42b208(_0x544ac1,_0x4e026d);},'kisoc':function(_0xbc1c72,_0x3b602f){return _0xbc1c72===_0x3b602f;},'FxGUc':function(_0x5bdbda,_0x512f32,_0x2a654b){return _0x5bdbda(_0x512f32,_0x2a654b);},'oJIhY':function(_0x51b802,_0x467f73){return _0x51b802===_0x467f73;},'uPqUL':function(_0x452019,_0x46fee2,_0x477c89,_0x104e37){return _0x452019(_0x46fee2,_0x477c89,_0x104e37);},'KRrLC':function(_0x21c74c,_0x514da4){return _0x21c74c+_0x514da4;}};let _0x4e7edc=_0x258afe;const _0x3dbf91=Math['min'](_0x505c99['length'],_0x33c69d[_0x531d61(0x12c)](_0x258afe,0x2710));while(_0x33c69d['pJHsv'](_0x4e7edc,_0x3dbf91)){const [_0x27afc9,_0x27f6fb]=readId(_0x505c99,_0x4e7edc),[_0x3b18ad,_0x3f4b8f]=_0x33c69d['AziOX'](readVint,_0x505c99,_0x4e7edc+_0x27f6fb);if(_0x33c69d[_0x531d61(0x145)](_0x27afc9,ID_INFO)){let _0x33a28a=_0x4e7edc+_0x27f6fb+_0x3f4b8f;const _0x3b1588=_0x33c69d[_0x531d61(0x12c)](_0x33a28a,_0x3b18ad);while(_0x33a28a<_0x3b1588){const [_0x5160ce,_0x34ca16]=_0x33c69d[_0x531d61(0x157)](readId,_0x505c99,_0x33a28a),[_0x5382f6,_0x31dbf8]=readVint(_0x505c99,_0x33c69d[_0x531d61(0x12c)](_0x33a28a,_0x34ca16));if(_0x33c69d[_0x531d61(0x136)](_0x5160ce,ID_TIMESTAMP_SCALE))return _0x33c69d[_0x531d61(0x159)](readUint,_0x505c99,_0x33c69d['KAdVF'](_0x33a28a,_0x34ca16)+_0x31dbf8,_0x5382f6);_0x33a28a+=_0x33c69d[_0x531d61(0x12a)](_0x34ca16+_0x31dbf8,_0x5382f6);}break;}if(_0x27afc9===ID_CLUSTER)break;if(isUnknownSize(_0x3b18ad,_0x3f4b8f))break;_0x4e7edc+=_0x33c69d[_0x531d61(0x12c)](_0x27f6fb,_0x3f4b8f)+_0x3b18ad;}return 0xf4240;}function findFirstClusterOffset(_0x414a1f,_0x313d53){const _0x4eed38=_0x4341,_0x262a0e={'jOAGC':function(_0x398b7f,_0x50536f){return _0x398b7f<_0x50536f;},'tTtug':function(_0x104ded,_0x51c640,_0x43e4ba){return _0x104ded(_0x51c640,_0x43e4ba);},'pKrLx':function(_0x30cc40,_0x4dcaa9,_0x5e297d){return _0x30cc40(_0x4dcaa9,_0x5e297d);},'gpEYz':function(_0x1203af,_0x11bb18){return _0x1203af+_0x11bb18;}};let _0x135ebe=_0x313d53;while(_0x262a0e['jOAGC'](_0x135ebe,_0x414a1f['length'])){const [_0x470dab,_0x1f87c0]=_0x262a0e[_0x4eed38(0x13e)](readId,_0x414a1f,_0x135ebe);if(_0x470dab===ID_CLUSTER)return _0x135ebe;const [_0x37ada5,_0x2b3795]=_0x262a0e[_0x4eed38(0x155)](readVint,_0x414a1f,_0x135ebe+_0x1f87c0);if(isUnknownSize(_0x37ada5,_0x2b3795))return _0x135ebe;_0x135ebe+=_0x262a0e[_0x4eed38(0x15c)](_0x262a0e['gpEYz'](_0x1f87c0,_0x2b3795),_0x37ada5);}return _0x414a1f[_0x4eed38(0x14f)];}function findClusterEnd(_0x3acbb7,_0x4ba52f,_0x1dc3c9,_0x5cd310){const _0x3a20b7=_0x4341,_0x1f3668={'JRmRm':function(_0x3184e3,_0x3264ad,_0x46de70){return _0x3184e3(_0x3264ad,_0x46de70);},'kHInS':function(_0x71ae34,_0x51e316){return _0x71ae34<_0x51e316;},'ETonV':function(_0x3504be,_0x3e2fae,_0x15c6b7){return _0x3504be(_0x3e2fae,_0x15c6b7);},'TnzkX':function(_0x5a82aa,_0x39bb21,_0x21eb20){return _0x5a82aa(_0x39bb21,_0x21eb20);},'gjTBv':function(_0x23b71a,_0x159d24,_0x387162){return _0x23b71a(_0x159d24,_0x387162);},'yKUDr':function(_0x5ebda0,_0xf8f39){return _0x5ebda0+_0xf8f39;}};if(!_0x1f3668['JRmRm'](isUnknownSize,_0x1dc3c9,_0x5cd310))return _0x4ba52f+_0x1dc3c9;const _0x28af03=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x5c1871=_0x4ba52f;while(_0x1f3668['kHInS'](_0x5c1871,_0x3acbb7[_0x3a20b7(0x14f)]-0x4)){const [_0x410b7d,_0x43f80d]=_0x1f3668['ETonV'](readId,_0x3acbb7,_0x5c1871);if(_0x28af03[_0x3a20b7(0x163)](_0x410b7d))return _0x5c1871;const [_0xc95e48,_0x52964d]=_0x1f3668[_0x3a20b7(0x140)](readVint,_0x3acbb7,_0x5c1871+_0x43f80d);if(_0x1f3668['gjTBv'](isUnknownSize,_0xc95e48,_0x52964d))return _0x3acbb7['length'];_0x5c1871+=_0x1f3668['yKUDr'](_0x43f80d+_0x52964d,_0xc95e48);}return _0x3acbb7['length'];}function extractClusters(_0x3b5ded,_0x28f1c0){const _0x26acf4=_0x4341,_0x462de8={'GvwaW':function(_0x5d87e9,_0x2a18c7){return _0x5d87e9===_0x2a18c7;},'RhHJY':function(_0x127d98,_0x317e34,_0x20ed66){return _0x127d98(_0x317e34,_0x20ed66);},'hWXpK':function(_0x51049c,_0x6bcfcf){return _0x51049c+_0x6bcfcf;},'JXZMm':function(_0x584634,_0xd1e2bf,_0x36d4e4){return _0x584634(_0xd1e2bf,_0x36d4e4);},'drkdx':function(_0x29a058,_0x3c67a8){return _0x29a058+_0x3c67a8;},'OXwwI':function(_0x1d59f1,_0x202b31){return _0x1d59f1+_0x202b31;},'Avifn':function(_0x3ec3bb,_0x1b0e3c){return _0x3ec3bb+_0x1b0e3c;},'FsYjB':function(_0x5a4f4c,_0x4c2199){return _0x5a4f4c===_0x4c2199;},'mkUBn':function(_0x28bb1d,_0x2858e0,_0xe80cf1,_0x4eb0f8){return _0x28bb1d(_0x2858e0,_0xe80cf1,_0x4eb0f8);},'FLAFn':function(_0x4edc84,_0x5c4f58){return _0x4edc84+_0x5c4f58;},'qqiRI':function(_0x5e6073,_0x2e5f81){return _0x5e6073+_0x2e5f81;},'aOPCP':function(_0x4cc0fa,_0xce5b64,_0x31810b){return _0x4cc0fa(_0xce5b64,_0x31810b);},'IGHec':function(_0x44db10,_0x4242c0,_0x1cef23){return _0x44db10(_0x4242c0,_0x1cef23);},'BpNYn':function(_0x12466f,_0x51b185){return _0x12466f+_0x51b185;},'AAcIE':function(_0x165d07,_0xa42c0e){return _0x165d07+_0xa42c0e;},'korZg':function(_0x82402d,_0x2e7ae4){return _0x82402d>_0x2e7ae4;},'abhcu':function(_0x2f48a1,_0x3ba705,_0x5c59c4){return _0x2f48a1(_0x3ba705,_0x5c59c4);}},_0x153cca=[],_0x85564c=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x2d8f9d=0x0;while(_0x2d8f9d<_0x3b5ded[_0x26acf4(0x14f)]){const _0x54eac6=_0x3b5ded[_0x26acf4(0x160)](_0x85564c,_0x2d8f9d);if(_0x462de8['GvwaW'](_0x54eac6,-0x1))break;const [_0x1509ad,_0x199ae4]=_0x462de8['RhHJY'](readId,_0x3b5ded,_0x54eac6);if(_0x1509ad!==ID_CLUSTER){_0x2d8f9d=_0x462de8['hWXpK'](_0x54eac6,0x1);continue;}const [_0x2f8a26,_0x4590b7]=_0x462de8['JXZMm'](readVint,_0x3b5ded,_0x462de8[_0x26acf4(0x161)](_0x54eac6,_0x199ae4)),_0x308a76=_0x462de8[_0x26acf4(0x128)](_0x54eac6+_0x199ae4,_0x4590b7),_0x436adb=findClusterEnd(_0x3b5ded,_0x308a76,_0x2f8a26,_0x4590b7);let _0x5e4598=_0x308a76,_0x2463a6=0x0,_0x57ce44=0x2,_0x56e580=![],_0x48ac4b=Buffer[_0x26acf4(0x13d)](0x0),_0x1586e0=Buffer['alloc'](0x0);while(_0x5e4598<_0x436adb){const [_0x4e09fd,_0xbb783]=readId(_0x3b5ded,_0x5e4598),[_0x509cac,_0x17dd02]=readVint(_0x3b5ded,_0x462de8['Avifn'](_0x5e4598,_0xbb783));if(_0x462de8['FsYjB'](_0x4e09fd,ID_TIMESTAMP)){_0x2463a6=_0x462de8['mkUBn'](readUint,_0x3b5ded,_0x462de8[_0x26acf4(0x162)](_0x5e4598,_0xbb783)+_0x17dd02,_0x509cac),_0x57ce44=_0x509cac,_0x56e580=!![],_0x48ac4b=_0x3b5ded['slice'](_0x308a76,_0x5e4598);const _0x238045=_0x462de8['qqiRI'](_0x5e4598+_0xbb783+_0x17dd02,_0x509cac);_0x1586e0=_0x3b5ded['slice'](_0x238045,_0x436adb);break;}if(_0x4e09fd===ID_CLUSTER)break;if(_0x462de8['aOPCP'](isUnknownSize,_0x509cac,_0x17dd02))break;_0x5e4598+=_0xbb783+_0x17dd02+_0x509cac;}!_0x56e580&&(_0x1586e0=_0x3b5ded[_0x26acf4(0x151)](_0x308a76,_0x436adb));let _0x2bfcca=_0x2463a6;_0x5e4598=_0x308a76;while(_0x5e4598<_0x436adb){const [_0x31229d,_0x43196d]=_0x462de8[_0x26acf4(0x149)](readId,_0x3b5ded,_0x5e4598),[_0x36b0ea,_0x4eff5c]=_0x462de8[_0x26acf4(0x143)](readVint,_0x3b5ded,_0x5e4598+_0x43196d);if(_0x31229d===ID_SIMPLE_BLOCK&&_0x36b0ea>=0x4){const _0x6cc528=_0x462de8['BpNYn'](_0x462de8[_0x26acf4(0x132)](_0x5e4598,_0x43196d),_0x4eff5c),[,_0x2bb384]=readVint(_0x3b5ded,_0x6cc528),_0x55b4b7=_0x3b5ded[_0x26acf4(0x124)](_0x6cc528+_0x2bb384),_0x207f41=_0x462de8['qqiRI'](_0x2463a6,_0x55b4b7);if(_0x462de8[_0x26acf4(0x144)](_0x207f41,_0x2bfcca))_0x2bfcca=_0x207f41;}if(_0x31229d===ID_CLUSTER)break;if(_0x462de8['abhcu'](isUnknownSize,_0x36b0ea,_0x4eff5c))break;_0x5e4598+=_0x462de8['FLAFn'](_0x43196d,_0x4eff5c)+_0x36b0ea;}_0x153cca['push']({'timestamp':_0x2463a6,'maxTicks':_0x2bfcca,'bodyBeforeTimestamp':_0x48ac4b,'bodyAfterTimestamp':_0x1586e0,'timestampElementSize':_0x57ce44}),_0x2d8f9d=_0x436adb;}return _0x153cca;}function parseWebm(_0x525b34){const _0xcca355=_0x4341,_0x41a7da={'iJFRY':function(_0x2fec67,_0x438ac0,_0x379e4e){return _0x2fec67(_0x438ac0,_0x379e4e);},'AKJsR':function(_0x19aba3,_0x470cae,_0x249363){return _0x19aba3(_0x470cae,_0x249363);},'JiqLK':function(_0x5916f6,_0x20ee05){return _0x5916f6+_0x20ee05;},'JxnJo':function(_0x12294f,_0x598b77){return _0x12294f+_0x598b77;},'EAuRY':function(_0x4095e9,_0x21659f){return _0x4095e9!==_0x21659f;},'Khffd':function(_0xda0ec5,_0x27d5c7,_0x2efda9){return _0xda0ec5(_0x27d5c7,_0x2efda9);},'pQvov':function(_0x557872,_0x1c40dc,_0x3f80b0){return _0x557872(_0x1c40dc,_0x3f80b0);}};let _0x5c00f2=0x0;const [,_0x399edf]=_0x41a7da[_0xcca355(0x127)](readId,_0x525b34,_0x5c00f2),[_0x362a30,_0x27bac2]=_0x41a7da[_0xcca355(0x11f)](readVint,_0x525b34,_0x41a7da[_0xcca355(0x13a)](_0x5c00f2,_0x399edf));_0x5c00f2+=_0x41a7da['JiqLK'](_0x41a7da['JxnJo'](_0x399edf,_0x27bac2),_0x362a30);const [_0x1b3631,_0x36f131]=readId(_0x525b34,_0x5c00f2);if(_0x41a7da[_0xcca355(0x164)](_0x1b3631,ID_SEGMENT))return null;const [,_0x114847]=_0x41a7da[_0xcca355(0x11f)](readVint,_0x525b34,_0x5c00f2+_0x36f131),_0x95c41d=_0x5c00f2+_0x36f131+_0x114847,_0x1ae25c=_0x41a7da[_0xcca355(0x15b)](findTimestampScale,_0x525b34,_0x95c41d),_0x993dd3=_0x41a7da[_0xcca355(0x14d)](findFirstClusterOffset,_0x525b34,_0x95c41d),_0x58d821=_0x525b34['slice'](0x0,_0x993dd3),_0x16a7d8=extractClusters(_0x525b34,_0x1ae25c);let _0x237939=0x0;for(const _0x5cb32a of _0x16a7d8){if(_0x5cb32a['maxTicks']>_0x237939)_0x237939=_0x5cb32a['maxTicks'];}return{'header':_0x58d821,'clusters':_0x16a7d8,'timestampScale':_0x1ae25c,'maxTimestampTicks':_0x237939};}function buildCluster(_0x75e37f,_0x37a5a7,_0x521b7d){const _0x3ae0d4=_0x4341,_0x484459={'isNvI':function(_0x517878,_0x38d0d1,_0x5ea9ba){return _0x517878(_0x38d0d1,_0x5ea9ba);}},_0x298518=Buffer[_0x3ae0d4(0x156)]([0x1f,0x43,0xb6,0x75]),_0x267a46=Math['max'](0x4,uintSize(_0x75e37f)),_0x472966=Buffer[_0x3ae0d4(0x142)]([Buffer[_0x3ae0d4(0x156)]([ID_TIMESTAMP]),writeVint(_0x267a46),_0x484459[_0x3ae0d4(0x134)](writeUint,_0x75e37f,_0x267a46)]),_0x205fbf=Buffer['concat']([_0x37a5a7,_0x472966,_0x521b7d]),_0x5cc880=writeVint(_0x205fbf['length']);return Buffer[_0x3ae0d4(0x142)]([_0x298518,_0x5cc880,_0x205fbf]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2b1e67){const _0x2b7842=_0x4341,_0x31d326={'Dmhpc':function(_0x5a56e2,_0x487631,_0x38f375){return _0x5a56e2(_0x487631,_0x38f375);},'BHiHP':function(_0xc8cf0d,_0x54b1e1){return _0xc8cf0d(_0x54b1e1);},'rGZWE':function(_0x46f5fc,_0x16b17a){return _0x46f5fc+_0x16b17a;},'MWGeM':function(_0x144828,_0x11a2e1){return _0x144828<_0x11a2e1;},'xvuYq':function(_0x2fe845,_0x3be2fa){return _0x2fe845===_0x3be2fa;},'gaAhr':function(_0x12115a,_0x519191){return _0x12115a+_0x519191;},'cgFYZ':function(_0x11ee90,_0x4c2ea1){return _0x11ee90!==_0x4c2ea1;},'qyceh':function(_0x44f3cb,_0x4768a7){return _0x44f3cb+_0x4768a7;},'tatPm':function(_0x105407,_0x5f4bb2){return _0x105407+_0x5f4bb2;},'fzzvf':function(_0x24fc9d,_0x132e59,_0x4812a0){return _0x24fc9d(_0x132e59,_0x4812a0);},'LVacZ':function(_0xefbf2f,_0x484fe3){return _0xefbf2f+_0x484fe3;}},_0xc4ab5b=Buffer['from'](_0x2b1e67);let _0x4a185e=0x0;const [,_0x27f115]=readId(_0xc4ab5b,_0x4a185e),[_0x16e041,_0x131d52]=_0x31d326['Dmhpc'](readVint,_0xc4ab5b,_0x4a185e+_0x27f115),_0x5083a4=_0x4a185e+_0x27f115+_0x131d52+_0x16e041,[,_0x5cbf37]=_0x31d326[_0x2b7842(0x122)](readId,_0xc4ab5b,_0x5083a4),[,_0x23c2ae]=readVint(_0xc4ab5b,_0x5083a4+_0x5cbf37),_0x59e005=_0x5083a4+_0x5cbf37+_0x23c2ae,_0x575874=_0x31d326['BHiHP'](writeUnknownSizeVint,_0x23c2ae);_0x575874[_0x2b7842(0x133)](_0xc4ab5b,_0x31d326[_0x2b7842(0x166)](_0x5083a4,_0x5cbf37));let _0x19c7da=_0x59e005;const _0x4ecbd8=Math[_0x2b7842(0x15d)](_0xc4ab5b[_0x2b7842(0x14f)],_0x59e005+0x2710);while(_0x31d326['MWGeM'](_0x19c7da,_0x4ecbd8)){const [_0x12731d,_0x11d63d]=_0x31d326['Dmhpc'](readId,_0xc4ab5b,_0x19c7da),[_0x3914af,_0x1d32bc]=readVint(_0xc4ab5b,_0x31d326['rGZWE'](_0x19c7da,_0x11d63d));if(_0x31d326[_0x2b7842(0x12f)](_0x12731d,ID_CLUSTER))break;if(isUnknownSize(_0x3914af,_0x1d32bc))break;if(_0x31d326['xvuYq'](_0x12731d,ID_INFO)){const _0x409bb8=_0x31d326['rGZWE'](_0x31d326[_0x2b7842(0x135)](_0x19c7da,_0x11d63d),_0x1d32bc),_0x2f2074=_0x31d326[_0x2b7842(0x135)](_0x409bb8,_0x3914af),_0x55b999=[];let _0x458b9c=_0x409bb8;while(_0x458b9c<_0x2f2074){const [_0x5ca2b2,_0x2341ec]=readId(_0xc4ab5b,_0x458b9c),[_0x268237,_0x145658]=_0x31d326[_0x2b7842(0x122)](readVint,_0xc4ab5b,_0x458b9c+_0x2341ec),_0x4e071b=_0x31d326[_0x2b7842(0x135)](_0x2341ec+_0x145658,_0x268237);_0x31d326['cgFYZ'](_0x5ca2b2,ID_DURATION)&&_0x55b999['push'](_0xc4ab5b['slice'](_0x458b9c,_0x31d326[_0x2b7842(0x12d)](_0x458b9c,_0x4e071b))),_0x458b9c+=_0x4e071b;}const _0xb76fb3=Buffer[_0x2b7842(0x142)](_0x55b999),_0x4d3d25=Buffer[_0x2b7842(0x142)]([_0xc4ab5b[_0x2b7842(0x151)](_0x19c7da,_0x31d326[_0x2b7842(0x167)](_0x19c7da,_0x11d63d)),_0x31d326['fzzvf'](writeVint,_0xb76fb3[_0x2b7842(0x14f)],_0x1d32bc)]);return Buffer[_0x2b7842(0x142)]([_0xc4ab5b['slice'](0x0,_0x19c7da),_0x4d3d25,_0xb76fb3,_0xc4ab5b['slice'](_0x2f2074)]);}_0x19c7da+=_0x31d326[_0x2b7842(0x169)](_0x11d63d+_0x1d32bc,_0x3914af);}return _0xc4ab5b;}export function stitchWebmFiles(_0x13316f,_0x48ab5d){const _0x1fc6d4=_0x4341,_0x33df0f={'cLNTP':function(_0x14efb2,_0x3b2232){return _0x14efb2<=_0x3b2232;},'gbwaM':function(_0x537eb1,_0x123eb8){return _0x537eb1+_0x123eb8;},'RdEYT':function(_0x4a5d99,_0x3cfd31){return _0x4a5d99+_0x3cfd31;},'qdJxU':function(_0x5c3a0f,_0x4c5305,_0x498b19){return _0x5c3a0f(_0x4c5305,_0x498b19);}};if(_0x33df0f['cLNTP'](_0x13316f[_0x1fc6d4(0x14f)],0x1))return![];const _0x231f08=[];for(const _0x188b32 of _0x13316f){const _0x28bff7=readFileSync(_0x188b32),_0x165f15=parseWebm(_0x28bff7);if(!_0x165f15||_0x165f15['clusters']['length']===0x0)return![];_0x231f08['push'](_0x165f15);}const _0x56149d=_0x231f08[0x0],_0x5b9c73=rebuildHeaderWithoutDuration(_0x56149d['header']),_0x1cd927=[_0x5b9c73];let _0x1a99eb=0x0;for(let _0x38a18c=0x0;_0x38a18c<_0x231f08[_0x1fc6d4(0x14f)];_0x38a18c++){const _0x2b7829=_0x231f08[_0x38a18c];for(const _0x41628c of _0x2b7829['clusters']){const _0x542995=_0x33df0f[_0x1fc6d4(0x14b)](_0x41628c['timestamp'],_0x1a99eb);_0x1cd927['push'](buildCluster(_0x542995,_0x41628c['bodyBeforeTimestamp'],_0x41628c[_0x1fc6d4(0x15e)]));}const _0x2c2c75=0x1e;_0x1a99eb+=_0x33df0f['RdEYT'](_0x2b7829[_0x1fc6d4(0x148)],_0x2c2c75);}return _0x33df0f['qdJxU'](writeFileSync,_0x48ab5d,Buffer['concat'](_0x1cd927)),!![];}if(process[_0x170adf(0x139)][0x1]?.['endsWith'](_0x170adf(0x14a))||process['argv'][0x1]?.['endsWith'](_0x170adf(0x14c))){const args=process[_0x170adf(0x139)]['slice'](0x2);args[_0x170adf(0x14f)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x170adf(0x126)](0x1));const output=args[args[_0x170adf(0x14f)]-0x1],inputs=args[_0x170adf(0x151)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x170adf(0x152)](_0x170adf(0x168)+inputs[_0x170adf(0x14f)]+_0x170adf(0x12e)+output):console[_0x170adf(0x152)](_0x170adf(0x123));}
|