@ranger-testing/ranger-cli 3.1.1 → 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 _0xaa40b8=_0x4b62;(function(_0x4c58fb,_0x3197fd){const _0x5d2521=_0x4b62,_0x48fb1a=_0x4c58fb();while(!![]){try{const _0x5deb2e=-parseInt(_0x5d2521(0xcf))/0x1*(parseInt(_0x5d2521(0xae))/0x2)+parseInt(_0x5d2521(0xa3))/0x3*(parseInt(_0x5d2521(0xaf))/0x4)+parseInt(_0x5d2521(0xab))/0x5+-parseInt(_0x5d2521(0xa0))/0x6*(parseInt(_0x5d2521(0xaa))/0x7)+-parseInt(_0x5d2521(0xb8))/0x8+-parseInt(_0x5d2521(0xc2))/0x9+parseInt(_0x5d2521(0xa1))/0xa;if(_0x5deb2e===_0x3197fd)break;else _0x48fb1a['push'](_0x48fb1a['shift']());}catch(_0x15ec65){_0x48fb1a['push'](_0x48fb1a['shift']());}}}(_0x2817,0x409f8));import*as _0x1bfd68 from'fs';import*as _0x44539b from'path';function _0x2817(){const _0x4f50a5=['HxhOG','prompted','16yIuknb','4vKNRNZ','poURA','branches','oadOb','master','QVBXi','upPUE','.ranger_cache.json','enabled','226184OIiOjJ','sessions','lastStopReminderAt','HEAD','existsSync','hOhPy','bvzQS','now','stringify','dRgUx','712341cNveqf','lastEnabledSessionClearedAt','TNdAw','mouIL','hrrKE','YuNFW','featureId','git\x20rev-parse\x20--abbrev-ref\x20HEAD','lJybJ','uFXiw','ipvFC','utf-8','toISOString','12326RMXzZt','CXJcC','McBky','1368OGGmfn','760770kIhoBJ','lastPlanReminderAt','668238WxeCnO','homedir','clear','rsQDT','currentBranch','main','xrkCw','4011bQEZMM','1512735ObAhfS'];_0x2817=function(){return _0x4f50a5;};return _0x2817();}import*as _0x4d0592 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x44539b['join'](_0x4d0592[_0xaa40b8(0xa4)](),'.claude',_0xaa40b8(0xb6));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x3ba595=_0xaa40b8,_0x552495={'McBky':_0x3ba595(0xcd),'mouIL':function(_0x2cec4f){return _0x2cec4f();}};try{if(_0x1bfd68['existsSync'](CACHE_FILE)){const _0x417690=JSON['parse'](_0x1bfd68['readFileSync'](CACHE_FILE,_0x552495[_0x3ba595(0x9f)]));return{'version':0x3,'sessions':_0x417690['sessions']||{},'branches':_0x417690['branches']||{},'lastEnabledSessionClearedAt':_0x417690[_0x3ba595(0xc3)]};}}catch{}return _0x552495[_0x3ba595(0xc5)](createEmptyCache);}function saveCache(_0x10d9ad){const _0x1a8671=_0xaa40b8;try{const _0x5adb03=_0x44539b['dirname'](CACHE_FILE);!_0x1bfd68[_0x1a8671(0xbc)](_0x5adb03)&&_0x1bfd68['mkdirSync'](_0x5adb03,{'recursive':!![]}),_0x1bfd68['writeFileSync'](CACHE_FILE,JSON[_0x1a8671(0xc0)](_0x10d9ad,null,0x2));}catch{}}export function getCurrentBranch(){const _0x58f467=_0xaa40b8,_0x323747={'pfvVy':function(_0x4b1f3c,_0x3cb0e4,_0x3a9c5d){return _0x4b1f3c(_0x3cb0e4,_0x3a9c5d);},'lJybJ':_0x58f467(0xc9),'poURA':_0x58f467(0xcd),'HVBJe':'pipe','ipvFC':function(_0x1f614e,_0x563304){return _0x1f614e===_0x563304;},'yuLTH':_0x58f467(0xbb)};try{const _0x473495=_0x323747['pfvVy'](execSync,_0x323747[_0x58f467(0xca)],{'encoding':_0x323747[_0x58f467(0xb0)],'stdio':[_0x323747['HVBJe'],_0x323747['HVBJe'],'pipe']})['trim']();if(!_0x473495||_0x323747[_0x58f467(0xcc)](_0x473495,_0x323747['yuLTH']))return null;return _0x473495;}catch{return null;}}export function enableBranch(_0x53c84a){const _0x2007f7=loadCache();_0x2007f7['branches'][_0x53c84a]=!![],saveCache(_0x2007f7);}export function disableBranch(_0x2c9958){const _0x4bbc94=_0xaa40b8,_0x288be1=loadCache();delete _0x288be1[_0x4bbc94(0xb1)][_0x2c9958],saveCache(_0x288be1);}export function isBranchEnabled(_0xa706c9){const _0x142bbe={'BCVgH':function(_0x4e4743,_0x55a0e0){return _0x4e4743===_0x55a0e0;}},_0x423bd6=loadCache();return _0x142bbe['BCVgH'](_0x423bd6['branches'][_0xa706c9],!![]);}function getOrCreateSession(_0x585051,_0x3a246f){const _0xbbd101=_0xaa40b8;return!_0x585051[_0xbbd101(0xb9)][_0x3a246f]&&(_0x585051[_0xbbd101(0xb9)][_0x3a246f]={}),_0x585051['sessions'][_0x3a246f];}export function enableSession(_0x236600){const _0x34f5b4=_0xaa40b8,_0x137144={'etqGa':function(_0x471d74){return _0x471d74();},'MscOh':function(_0x49d9d0,_0xf344fa){return _0x49d9d0!==_0xf344fa;}},_0x3ee0dc=_0x137144['etqGa'](loadCache),_0x7053f8=getOrCreateSession(_0x3ee0dc,_0x236600);_0x7053f8[_0x34f5b4(0xb7)]=!![];const _0x27d116=getCurrentBranch();_0x27d116&&_0x27d116!=='main'&&_0x137144['MscOh'](_0x27d116,'master')&&(_0x3ee0dc['branches'][_0x27d116]=!![],_0x7053f8['currentBranch']=_0x27d116),saveCache(_0x3ee0dc);}export function isSessionEnabled(_0x54e94c){const _0x17c4e6=_0xaa40b8,_0x16b28f={'XXJku':function(_0x1b7756){return _0x1b7756();},'sKORc':_0x17c4e6(0xa8),'rxzSe':'master','uFXiw':function(_0x42beb6,_0xec8228){return _0x42beb6===_0xec8228;},'YuNFW':function(_0x5bc41f,_0x3c5923){return _0x5bc41f||_0x3c5923;}},_0x5905b=_0x16b28f['XXJku'](loadCache),_0xca6cc9=getCurrentBranch();if(!_0xca6cc9||_0xca6cc9===_0x16b28f['sKORc']||_0xca6cc9===_0x16b28f['rxzSe'])return _0x5905b[_0x17c4e6(0xb9)][_0x54e94c]?.[_0x17c4e6(0xb7)]===!![];const _0x5bd32f=_0x16b28f[_0x17c4e6(0xcb)](_0x5905b[_0x17c4e6(0xb1)][_0xca6cc9],!![]),_0x319f53=_0x5905b[_0x17c4e6(0xb9)][_0x54e94c]?.['enabled']===!![];return _0x16b28f[_0x17c4e6(0xc7)](_0x5bd32f,_0x319f53);}export function disableSession(_0x24445d){const _0x12fe5a=_0xaa40b8,_0x3be05c={'xrkCw':function(_0x37d001,_0x55d749){return _0x37d001(_0x55d749);}},_0x12b1f7=loadCache(),_0x190f1c=getOrCreateSession(_0x12b1f7,_0x24445d);_0x190f1c['enabled']=![],_0x3be05c[_0x12fe5a(0xa9)](saveCache,_0x12b1f7);}export function updateBranchTracking(_0xa7c70c){const _0x18e353=_0xaa40b8,_0x49b7c9={'HxhOG':function(_0x1a5e46){return _0x1a5e46();},'QVBXi':function(_0x7e08c1,_0x9b1a48){return _0x7e08c1===_0x9b1a48;},'rsQDT':'master','TNdAw':function(_0xa84649,_0x3cc323){return _0xa84649!==_0x3cc323;}},_0x535f1f=_0x49b7c9[_0x18e353(0xac)](loadCache),_0xef92ab=_0x535f1f[_0x18e353(0xb9)][_0xa7c70c];if(!_0xef92ab?.['enabled'])return;const _0x263491=getCurrentBranch();if(!_0x263491||_0x263491===_0x18e353(0xa8)||_0x49b7c9[_0x18e353(0xb4)](_0x263491,_0x49b7c9[_0x18e353(0xa6)]))return;_0x49b7c9[_0x18e353(0xc4)](_0xef92ab['currentBranch'],_0x263491)&&(_0x535f1f['branches'][_0x263491]=!![],_0xef92ab['currentBranch']=_0x263491,saveCache(_0x535f1f));}function _0x4b62(_0x2897b1,_0x5c6eac){_0x2897b1=_0x2897b1-0x9e;const _0x2817d6=_0x2817();let _0x4b62fb=_0x2817d6[_0x2897b1];return _0x4b62fb;}export function initBranchTracking(_0x4d37ff){const _0x5d5597=_0xaa40b8,_0x1b801c={'hOhPy':function(_0x3e6b69){return _0x3e6b69();},'tpwER':function(_0x540038,_0x2dc22d){return _0x540038===_0x2dc22d;}},_0x32acc7=_0x1b801c[_0x5d5597(0xbd)](loadCache),_0x3a0335=getCurrentBranch();if(!_0x3a0335||_0x3a0335===_0x5d5597(0xa8)||_0x1b801c['tpwER'](_0x3a0335,'master'))return;if(_0x32acc7['branches'][_0x3a0335]===!![]){const _0x35d694=getOrCreateSession(_0x32acc7,_0x4d37ff);_0x35d694[_0x5d5597(0xb7)]=!![],_0x35d694['currentBranch']=_0x3a0335,saveCache(_0x32acc7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x4147b4){const _0x34e781=_0xaa40b8,_0x4b76d3=loadCache(),_0x809b65=_0x4b76d3[_0x34e781(0xb9)][_0x4147b4];_0x809b65?.['enabled']&&(_0x4b76d3[_0x34e781(0xc3)]=Date[_0x34e781(0xbf)](),saveCache(_0x4b76d3));}export function shouldAutoEnableAfterClear(_0x534d7a){const _0x2b2f8e=_0xaa40b8,_0x250aba={'xEfqw':function(_0x3a8632){return _0x3a8632();},'zglFo':function(_0x5429b5,_0x23c82a){return _0x5429b5<=_0x23c82a;}};if(_0x534d7a!==_0x2b2f8e(0xa5))return![];const _0x13746b=_0x250aba['xEfqw'](loadCache),_0x44455e=_0x13746b['lastEnabledSessionClearedAt'];if(!_0x44455e)return![];const _0x484263=Date['now']()-_0x44455e;return _0x250aba['zglFo'](_0x484263,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0xcd7435){const _0x36db33=_0xaa40b8,_0x1c0fe9={'dRgUx':function(_0x124031){return _0x124031();},'oadOb':function(_0x45e706){return _0x45e706();},'jzPtY':_0x36db33(0xb3)},_0x2b9d94=_0x1c0fe9[_0x36db33(0xc1)](loadCache),_0x2fe751=getOrCreateSession(_0x2b9d94,_0xcd7435);_0x2fe751[_0x36db33(0xb7)]=!![];const _0x2da64c=_0x1c0fe9[_0x36db33(0xb2)](getCurrentBranch);_0x2da64c&&_0x2da64c!=='main'&&_0x2da64c!==_0x1c0fe9['jzPtY']&&(_0x2fe751[_0x36db33(0xa7)]=_0x2da64c),delete _0x2b9d94['lastEnabledSessionClearedAt'],saveCache(_0x2b9d94);}export function registerSession(_0x4c8735,_0x5f1850){const _0xb3a60e=_0xaa40b8,_0x5049b5={'MuSfl':function(_0x2c4f3b){return _0x2c4f3b();},'WteGx':function(_0x4e3623,_0x11b0a6,_0x259b17){return _0x4e3623(_0x11b0a6,_0x259b17);}},_0x13c299=_0x5049b5['MuSfl'](loadCache),_0x2cc5f2=_0x5049b5['WteGx'](getOrCreateSession,_0x13c299,_0x4c8735);_0x2cc5f2['featureId']=_0x5f1850,_0x2cc5f2['registeredAt']=new Date()[_0xb3a60e(0xce)](),saveCache(_0x13c299);}export function getSessionEntry(_0x1ef64f){const _0x11e3d8=_0xaa40b8,_0x1df92d=loadCache(),_0x1786d6=_0x1df92d[_0x11e3d8(0xb9)][_0x1ef64f];if(_0x1786d6?.['featureId']&&_0x1786d6?.['registeredAt'])return{'featureId':_0x1786d6[_0x11e3d8(0xc8)],'registeredAt':_0x1786d6['registeredAt']};return null;}export function unregisterSession(_0x13fd5c){const _0x31b427=_0xaa40b8,_0x53659c={'hrrKE':function(_0x83f148){return _0x83f148();},'uVXIT':function(_0x318f02,_0x2f515e){return _0x318f02(_0x2f515e);}},_0x5cf67f=_0x53659c[_0x31b427(0xc6)](loadCache),_0x383b05=_0x5cf67f[_0x31b427(0xb9)][_0x13fd5c];_0x383b05&&(delete _0x383b05['featureId'],delete _0x383b05['registeredAt'],_0x53659c['uVXIT'](saveCache,_0x5cf67f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3976b6){const _0x3816d8=_0xaa40b8,_0x459efd={'CXJcC':function(_0x327018,_0x40eea9,_0x38af51){return _0x327018(_0x40eea9,_0x38af51);},'HlzBJ':function(_0xeac8c6,_0x26e2b2){return _0xeac8c6-_0x26e2b2;}},_0x5ab15b=loadCache(),_0x11e298=_0x459efd[_0x3816d8(0x9e)](getOrCreateSession,_0x5ab15b,_0x3976b6),_0x3c912f=_0x11e298[_0x3816d8(0xa2)]||0x0,_0x1e7d1d=Date[_0x3816d8(0xbf)]();if(_0x459efd['HlzBJ'](_0x1e7d1d,_0x3c912f)>=PLAN_REMINDER_INTERVAL_MS)return _0x11e298[_0x3816d8(0xa2)]=_0x1e7d1d,saveCache(_0x5ab15b),!![];return![];}export function shouldShowStopReminder(_0x23922c){const _0xcebc95=_0xaa40b8,_0x26f8a7={'bvzQS':function(_0x381e96){return _0x381e96();},'eWrUC':function(_0xe93d17,_0x9fa718,_0x500c17){return _0xe93d17(_0x9fa718,_0x500c17);},'ifUAq':function(_0x32a740,_0x3032e1){return _0x32a740>=_0x3032e1;},'LbSfY':function(_0x5e8df5,_0x2e1750){return _0x5e8df5-_0x2e1750;}},_0x3867ba=_0x26f8a7[_0xcebc95(0xbe)](loadCache),_0x37b062=_0x26f8a7['eWrUC'](getOrCreateSession,_0x3867ba,_0x23922c),_0x16beb6=_0x37b062['lastStopReminderAt']||0x0,_0x3a47c4=Date['now']();if(_0x26f8a7['ifUAq'](_0x26f8a7['LbSfY'](_0x3a47c4,_0x16beb6),STOP_REMINDER_INTERVAL_MS))return _0x37b062[_0xcebc95(0xba)]=_0x3a47c4,saveCache(_0x3867ba),!![];return![];}export function hasSessionBeenPrompted(_0xe6924e){const _0x45207c={'sAaKy':function(_0x401d08,_0x381706){return _0x401d08===_0x381706;}},_0x4aee07=loadCache();return _0x45207c['sAaKy'](_0x4aee07['sessions'][_0xe6924e]?.['prompted'],!![]);}export function markSessionPrompted(_0x5180e6){const _0x4e218c=_0xaa40b8,_0x1f264d={'upPUE':function(_0x316f73){return _0x316f73();},'meLcS':function(_0x3cef45,_0x901e1b,_0x37f33b){return _0x3cef45(_0x901e1b,_0x37f33b);}},_0x1154a8=_0x1f264d[_0x4e218c(0xb5)](loadCache),_0x3b5a53=_0x1f264d['meLcS'](getOrCreateSession,_0x1154a8,_0x5180e6);_0x3b5a53[_0x4e218c(0xad)]=!![],saveCache(_0x1154a8);}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 _0x21d118=_0x224b;(function(_0x346144,_0x41203c){const _0x1c33f5=_0x224b,_0x1bf68c=_0x346144();while(!![]){try{const _0x11d4d6=parseInt(_0x1c33f5(0x16e))/0x1+parseInt(_0x1c33f5(0x193))/0x2*(parseInt(_0x1c33f5(0x1e6))/0x3)+parseInt(_0x1c33f5(0x185))/0x4*(parseInt(_0x1c33f5(0x18c))/0x5)+-parseInt(_0x1c33f5(0x19c))/0x6*(parseInt(_0x1c33f5(0x19f))/0x7)+-parseInt(_0x1c33f5(0x1ac))/0x8*(-parseInt(_0x1c33f5(0x1f3))/0x9)+-parseInt(_0x1c33f5(0x1b2))/0xa+-parseInt(_0x1c33f5(0x16f))/0xb;if(_0x11d4d6===_0x41203c)break;else _0x1bf68c['push'](_0x1bf68c['shift']());}catch(_0x64cf61){_0x1bf68c['push'](_0x1bf68c['shift']());}}}(_0x5364,0x4a286));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(_0x3946dd,_0x7c226d){const _0x5eb32d=_0x224b,_0x9c4a36={'KxpEq':function(_0xea450,_0x3808d9,_0x539acf,_0x59fbe4){return _0xea450(_0x3808d9,_0x539acf,_0x59fbe4);},'vPsTF':'local','iTqtE':function(_0x1bd1b6,_0x2ed540,_0x216943){return _0x1bd1b6(_0x2ed540,_0x216943);},'uQrfh':function(_0x27558a,_0x2f9ff5){return _0x27558a(_0x2f9ff5);},'tXTlV':function(_0x7cf19c,_0x1b435c){return _0x7cf19c(_0x1b435c);},'XAQeV':function(_0x375dd8,_0x1f7305){return _0x375dd8!==_0x1f7305;}},_0x38d7d2=join(_0x7c226d,'ci',_0x3946dd),_0x546686=_0x9c4a36[_0x5eb32d(0x1f1)](join,_0x7c226d,_0x5eb32d(0x198),_0x3946dd),_0x1012da=join(_0x7c226d,_0x3946dd),_0x53f440=join(_0x7c226d,_0x9c4a36[_0x5eb32d(0x171)]),_0x58af71=_0x9c4a36[_0x5eb32d(0x1e1)](join,_0x7c226d,'ci');if(existsSync(_0x38d7d2))return _0x38d7d2;if(_0x9c4a36[_0x5eb32d(0x1ed)](existsSync,_0x546686))return _0x546686;if(_0x9c4a36[_0x5eb32d(0x1d0)](existsSync,_0x1012da)&&(_0x1012da!==_0x53f440&&_0x9c4a36[_0x5eb32d(0x180)](_0x1012da,_0x58af71)?!![]:hasLegacyProfileFiles(_0x1012da)))return _0x1012da;return null;}export function getEnvDir(_0x4e36c2,_0x3be119={}){const _0x1610e0=_0x224b,_0x565500={'tMZCS':function(_0x4724dc,_0x3a144e){return _0x4724dc(_0x3a144e);},'pFKrF':function(_0x2576a2,_0x52bbfd,_0x43de19){return _0x2576a2(_0x52bbfd,_0x43de19);},'FfHcq':function(_0xab5eb2){return _0xab5eb2();},'bkrIt':function(_0x2fed88,_0x31d45f){return _0x2fed88!==_0x31d45f;},'PtRnR':function(_0x11241c,_0x5c39d2,_0x29743d){return _0x11241c(_0x5c39d2,_0x29743d);},'nqiLu':_0x1610e0(0x198),'PbCea':function(_0x3281a7,_0x165410,_0x174ebd){return _0x3281a7(_0x165410,_0x174ebd);}},_0x716ad=getRangerDir(),_0x17f83f=findEnvInRoot(_0x4e36c2,_0x716ad);if(_0x17f83f){if(_0x3be119['forWrite']&&_0x565500['tMZCS'](isLegacyEnvPath,_0x17f83f))throw _0x565500['pFKrF'](legacyWriteError,_0x4e36c2,_0x17f83f);return _0x17f83f;}const _0x54931d=_0x565500['FfHcq'](getRangerHomeDir);if(_0x565500[_0x1610e0(0x17b)](_0x54931d,_0x716ad)){const _0x516f1f=_0x565500[_0x1610e0(0x1cb)](findEnvInRoot,_0x4e36c2,_0x54931d);if(_0x516f1f){if(_0x3be119[_0x1610e0(0x17f)]&&_0x565500[_0x1610e0(0x166)](isLegacyEnvPath,_0x516f1f))throw _0x565500[_0x1610e0(0x182)](legacyWriteError,_0x4e36c2,_0x516f1f);return _0x516f1f;}}const _0x15663a=join(_0x54931d,_0x565500[_0x1610e0(0x1e5)],_0x4e36c2);if(_0x3be119[_0x1610e0(0x17f)])throw _0x565500[_0x1610e0(0x1d3)](legacyWriteError,_0x4e36c2,_0x15663a);return _0x15663a;}function isLegacyEnvPath(_0xf50761){const _0x7d90d8=_0x224b,_0x5cecc1={'MxLaN':function(_0x35861c,_0x266ae3){return _0x35861c===_0x266ae3;}},_0x253615=getRangerDir(),_0x295002=getRangerHomeDir();for(const _0x1dd481 of new Set([_0x253615,_0x295002])){const _0x448db4=_0x1dd481['endsWith']('/')?_0x1dd481:_0x1dd481+'/';if(_0x5cecc1['MxLaN'](_0xf50761,_0x1dd481)||_0xf50761[_0x7d90d8(0x18a)](_0x448db4))return!![];}return![];}function legacyWriteError(_0x3b4d30,_0x186467){const _0x5286d4=_0x224b,_0x173821={'RkpVT':function(_0x489eb6,_0x89ddd7){return _0x489eb6+_0x89ddd7;}};return new Error(_0x173821[_0x5286d4(0x1a8)](_0x5286d4(0x1c7)+_0x3b4d30+_0x5286d4(0x168)+_0x186467+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x5286d4(0x16b)+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x25651f,_0x2a4a73){const _0x2c4c5c=_0x224b,_0x39b904={'ZzfRP':function(_0x38dde0){return _0x38dde0();},'Kyozm':function(_0x21bc5c){return _0x21bc5c();},'DjXgq':'local','VsQoh':'legacy','iVusm':function(_0x48202b,_0x27c86f,_0x4e4250){return _0x48202b(_0x27c86f,_0x4e4250);},'dBRAg':function(_0x40f610,_0xf0aa04,_0x29ade0){return _0x40f610(_0xf0aa04,_0x29ade0);},'lwRXL':function(_0xca4a3b,_0x2c0b34,_0x4f5377,_0x15a983){return _0xca4a3b(_0x2c0b34,_0x4f5377,_0x15a983);},'JFhSO':function(_0x583f97,_0x1b63dc){return _0x583f97(_0x1b63dc);},'cZHgd':function(_0x218ce5,_0x56d59d){return _0x218ce5===_0x56d59d;}},_0x2f96cd=_0x2a4a73?.['rangerDir'],_0x99b83f=_0x2f96cd?[_0x2f96cd]:[_0x39b904[_0x2c4c5c(0x18b)](getRangerDir),_0x39b904[_0x2c4c5c(0x197)](getRangerHomeDir)][_0x2c4c5c(0x17d)]((_0x448822,_0x292c27,_0x36d97e)=>_0x36d97e[_0x2c4c5c(0x1a0)](_0x448822)===_0x292c27),_0x670cc0=_0x2a4a73?.[_0x2c4c5c(0x19d)]??['ci',_0x39b904['DjXgq'],_0x39b904[_0x2c4c5c(0x1e8)]];for(const _0xdfe193 of _0x99b83f){const _0xe0594c=_0x39b904['iVusm'](join,_0xdfe193,_0x39b904[_0x2c4c5c(0x1e0)]),_0x10c6c6=_0x39b904['dBRAg'](join,_0xdfe193,'ci'),_0x2951f0=[{'location':'ci','path':join(_0xdfe193,'ci',_0x25651f)},{'location':'local','path':_0x39b904['lwRXL'](join,_0xdfe193,_0x39b904['DjXgq'],_0x25651f)},{'location':'legacy','path':join(_0xdfe193,_0x25651f)}];for(const _0x4e19b4 of _0x2951f0){if(_0x670cc0['includes'](_0x4e19b4[_0x2c4c5c(0x17c)])&&_0x39b904[_0x2c4c5c(0x1cc)](existsSync,_0x4e19b4[_0x2c4c5c(0x1b7)])){if(_0x39b904[_0x2c4c5c(0x191)](_0x4e19b4['location'],_0x2c4c5c(0x1d1))&&(_0x4e19b4['path']===_0xe0594c||_0x4e19b4['path']===_0x10c6c6)&&!hasLegacyProfileFiles(_0x4e19b4[_0x2c4c5c(0x1b7)]))continue;return{'path':_0x4e19b4[_0x2c4c5c(0x1b7)],'location':_0x4e19b4[_0x2c4c5c(0x17c)]};}}}return null;}function hasLegacyProfileFiles(_0x43449a){const _0x26e3f3=_0x224b,_0xa4ae29={'NnjSq':function(_0x2f3e49,_0x1dd91b){return _0x2f3e49(_0x1dd91b);},'HzExl':function(_0x5f3d2f,_0xf4da11,_0x20346a){return _0x5f3d2f(_0xf4da11,_0x20346a);},'iaKht':'auth.json','bpgCN':'auth.json.enc'};return _0xa4ae29['NnjSq'](existsSync,_0xa4ae29[_0x26e3f3(0x1d4)](join,_0x43449a,'settings.json'))||existsSync(join(_0x43449a,_0xa4ae29['iaKht']))||existsSync(join(_0x43449a,_0xa4ae29['bpgCN']));}export function isEnvCi(_0x274e71){const _0x149419=_0x224b,_0x437eea={'UciMG':function(_0x19a35c){return _0x19a35c();},'yTSGd':function(_0x31ed1b){return _0x31ed1b();}};if(existsSync(join(getRangerDir(),'ci',_0x274e71)))return!![];const _0x5dd4d3=_0x437eea[_0x149419(0x1b4)](getRangerHomeDir);if(_0x5dd4d3!==_0x437eea[_0x149419(0x1dd)](getRangerDir)&&existsSync(join(_0x5dd4d3,'ci',_0x274e71)))return!![];return![];}export async function cleanupTempFiles(_0x319af4){const _0xbe5e6=_0x224b,_0x2185a3=[_0x319af4[_0xbe5e6(0x167)],_0x319af4[_0xbe5e6(0x1ee)]][_0xbe5e6(0x17d)](Boolean);await Promise[_0xbe5e6(0x195)](_0x2185a3['map'](_0x5bc958=>unlink(_0x5bc958)[_0xbe5e6(0x184)](_0x17ebd4=>{const _0x23e97c=_0xbe5e6;_0x17ebd4[_0x23e97c(0x199)]!=='ENOENT'&&console['warn'](_0x23e97c(0x187)+_0x5bc958+':',_0x17ebd4['message']);})));}export function getSettingsPath(_0x5cd777){const _0x225ed7=_0x224b,_0x3f5efb={'tzsIV':function(_0x3fe35f,_0x3fa1c0,_0x12a575){return _0x3fe35f(_0x3fa1c0,_0x12a575);},'AXdJw':'settings.json'};return _0x3f5efb['tzsIV'](join,getEnvDir(_0x5cd777),_0x3f5efb[_0x225ed7(0x1c6)]);}function _0x5364(){const _0x5abe8a=['666570ZOhIko','eRyas','UciMG','.json','Failed\x20to\x20decrypt\x20auth\x20state:\x20','path','headers','install','KItIN','kTBex','--disable-features=WebBluetooth','map','rFQix','now','chromium','ignoreHTTPSErrors','oqTnt','storageStatePath','kPFHm','Jypxm','AXdJw','Refusing\x20to\x20write\x20profile\x20\x22','-rangerwright.json','--no-sandbox','PPUHl','pFKrF','JFhSO','boolean','clipboard-write','--disable-setuid-sandbox','tXTlV','legacy','entries','PbCea','HzExl','split','zpAzL','mmrJL','EvjNR','yVWNR','KPXZQ','userAgent','stringify','yTSGd','args','GKguR','DjXgq','iTqtE','ranger-config','object','isArray','nqiLu','200520BOsyBE','NMELR','VsQoh','lcMbX','extraHTTPHeaders','clEBN','storageState','uQrfh','configPath','string','keys','KxpEq','LSDDb','261EYGdXL','YQIuQ','setupHeader','tMZCS','tempAuthPath','\x22\x20to\x20legacy\x20path\x20','Fuiqz','getuid','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','baseUrl','tNnaH','516985DWqzsh','8779793GpMKES','ziRrT','vPsTF','KDtOh','lvZMl','matbv','clipboard-read','playwright-cli','includes','executablePath','pYquE','JWbnX','bkrIt','location','filter','sIAuh','forWrite','XAQeV','PlKTe','PtRnR','DoiZH','catch','15676sYfvxP','sPlDF','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','UTYHJ','mcZTz','startsWith','ZzfRP','515tlJFcd','vnEOp','stagehand','auth.json','message','cZHgd','LMIoR','6zeJlPH','HAYlE','all','PveKc','Kyozm','local','code','parse','jPurT','6OpXqPf','locations','sessions','3574067JRMiog','indexOf','length','CrWMB','TjnNo','lZnMs','LltOQ','fBjSK','lPJek','RkpVT','UqSXc','safeMode','--unsafely-treat-insecure-origin-as-secure=http://localhost','153928HAgeJA','TGfQq','none','cdpEndpoint','headless','header'];_0x5364=function(){return _0x5abe8a;};return _0x5364();}export async function loadSettings(_0x491085){const _0x208e0b=_0x224b,_0x3034f7={'zpAzL':function(_0x559052,_0x5b2dfb){return _0x559052(_0x5b2dfb);},'oqTnt':'utf-8'},_0x1f9b08=_0x3034f7[_0x208e0b(0x1d6)](getSettingsPath,_0x491085);if(!existsSync(_0x1f9b08))return{};try{const _0x3e0d49=await readFile(_0x1f9b08,_0x3034f7[_0x208e0b(0x1c2)]);return JSON[_0x208e0b(0x19a)](_0x3e0d49);}catch{return{};}}export async function saveSettings(_0x5e812e,_0x7728c5){const _0x13ff66=_0x224b,_0x5ec39d={'TjnNo':function(_0x59c8d7,_0x3ebe85){return _0x59c8d7(_0x3ebe85);},'YWlvC':function(_0x510e13,_0x14a018,_0x3621e9){return _0x510e13(_0x14a018,_0x3621e9);}},_0x1cf892=_0x5ec39d['TjnNo'](getSettingsPath,_0x5e812e),_0x36cf24=_0x5ec39d['TjnNo'](dirname,_0x1cf892);!_0x5ec39d[_0x13ff66(0x1a3)](existsSync,_0x36cf24)&&await mkdir(_0x36cf24,{'recursive':!![]}),await _0x5ec39d['YWlvC'](writeFile,_0x1cf892,JSON[_0x13ff66(0x1dc)](_0x7728c5,null,0x2));}export function resolveEnvVars(_0x255fc7){const _0x26eeb3=_0x224b,_0x33be99={'TGfQq':function(_0x3167fa,_0x2d5fc9){return _0x3167fa===_0x2d5fc9;},'pYquE':'string','uhgdd':'object'};if(_0x33be99[_0x26eeb3(0x1ad)](typeof _0x255fc7,_0x33be99[_0x26eeb3(0x179)]))return _0x255fc7['replace'](/\$\{(\w+)\}/g,(_0x13954e,_0x153694)=>{const _0x15e0cd=process['env'][_0x153694];if(_0x15e0cd===undefined)throw new Error('Environment\x20variable\x20'+_0x153694+'\x20is\x20not\x20set');return _0x15e0cd;});if(Array['isArray'](_0x255fc7))return _0x255fc7[_0x26eeb3(0x1bd)](resolveEnvVars);if(_0x255fc7&&_0x33be99[_0x26eeb3(0x1ad)](typeof _0x255fc7,_0x33be99['uhgdd']))return Object['fromEntries'](Object['entries'](_0x255fc7)[_0x26eeb3(0x1bd)](([_0x8b60dc,_0xef6221])=>[_0x8b60dc,resolveEnvVars(_0xef6221)]));return _0x255fc7;}const isRecord=_0x1d7772=>typeof _0x1d7772===_0x21d118(0x1e3)&&_0x1d7772!==null&&!Array[_0x21d118(0x1e4)](_0x1d7772),asRecord=_0x2bc15e=>isRecord(_0x2bc15e)?_0x2bc15e:undefined,mergeHeaders=(_0x298e3c,_0x5d3141)=>{const _0xfed17c=_0x21d118,_0x319afa={'UqSXc':function(_0x1bf6e8,_0x19e75b){return _0x1bf6e8??_0x19e75b;}},_0x2d26f6={..._0x319afa[_0xfed17c(0x1a9)](_0x298e3c,{}),..._0x319afa['UqSXc'](_0x5d3141,{})};return Object[_0xfed17c(0x1f0)](_0x2d26f6)[_0xfed17c(0x1a1)]?_0x2d26f6:undefined;},SAFE_MODE_ARGS=[_0x21d118(0x1bc)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x21d118(0x1ab),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0xb322be,_0x46350c={}){const _0x4fc1bf=_0x21d118,_0x5344f6={'xRgyb':function(_0x2b633f,_0x277d46){return _0x2b633f(_0x277d46);},'lvZMl':function(_0x4a4218,_0x4e8b57){return _0x4a4218(_0x4e8b57);},'glUAu':function(_0x3504ca,_0x19257b){return _0x3504ca(_0x19257b);}},_0x4c16f0=asRecord(_0xb322be['browser']),_0x138e98={..._0x5344f6['xRgyb'](asRecord,_0x4c16f0?.['launchOptions'])??{}};typeof _0x46350c[_0x4fc1bf(0x1b0)]===_0x4fc1bf(0x1cd)&&(_0x138e98['headless']=_0x46350c['headless']);if(_0xb322be[_0x4fc1bf(0x1aa)]){const _0xfe46e6=_0x138e98['args']??[],_0x2c463d=SAFE_MODE_ARGS[_0x4fc1bf(0x17d)](_0x825b96=>!_0xfe46e6[_0x4fc1bf(0x177)](_0x825b96));_0x138e98[_0x4fc1bf(0x1de)]=[..._0xfe46e6,..._0x2c463d];}if(_0xb322be['allowInsecureLocalhost']){const _0xc4ae26=_0x138e98['args']??[],_0x2787f2=ALLOW_LOCALHOST_ARGS['filter'](_0x5a6db0=>!_0xc4ae26[_0x4fc1bf(0x177)](_0x5a6db0));_0x138e98[_0x4fc1bf(0x1de)]=[..._0xc4ae26,..._0x2787f2];}const _0x5c5d2f={..._0x5344f6[_0x4fc1bf(0x173)](asRecord,_0x4c16f0?.['contextOptions'])??{}};_0x5c5d2f[_0x4fc1bf(0x1c1)]=!![];typeof _0xb322be[_0x4fc1bf(0x1db)]===_0x4fc1bf(0x1ef)&&(_0x5c5d2f[_0x4fc1bf(0x1db)]=_0xb322be[_0x4fc1bf(0x1db)]);const _0x806499=mergeHeaders(asRecord(_0x5c5d2f[_0x4fc1bf(0x1ea)]),_0x5344f6['glUAu'](asRecord,_0xb322be[_0x4fc1bf(0x1b8)]));return _0x806499?_0x5c5d2f[_0x4fc1bf(0x1ea)]=_0x806499:delete _0x5c5d2f['extraHTTPHeaders'],_0x46350c[_0x4fc1bf(0x1c3)]&&(_0x5c5d2f['storageState']=_0x46350c['storageStatePath']),{'launchOptions':_0x138e98,'contextOptions':_0x5c5d2f};}export async function resolveProfileStorageState(_0x2b228d){return resolveLocalAuthPath(getEnvDir(_0x2b228d));}async function resolveLocalAuthPath(_0x37445c){const _0x47dc79=_0x21d118,_0x4cc147={'GKguR':function(_0x5e2b6d,_0x309595,_0x486d54){return _0x5e2b6d(_0x309595,_0x486d54);},'YnPKw':'auth.json.enc','lcMbX':function(_0x1d23c9){return _0x1d23c9();},'KPXZQ':function(_0x33dc17,_0x1a13ae,_0x1f0695){return _0x33dc17(_0x1a13ae,_0x1f0695);},'aGOCu':function(_0x219b5a,_0x2794cd,_0x4bf048){return _0x219b5a(_0x2794cd,_0x4bf048);},'EvjNR':function(_0x280cac,_0xb15d51){return _0x280cac(_0xb15d51);}},_0x2f4852=_0x4cc147[_0x47dc79(0x1df)](join,_0x37445c,_0x4cc147['YnPKw']),_0x31495c=join(_0x37445c,_0x47dc79(0x18f));if(existsSync(_0x2f4852))try{const _0x40c122=await _0x4cc147[_0x47dc79(0x1e9)](getToken);if(!_0x40c122)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0xcf0ca9=await readFile(_0x2f4852),_0x308597=_0x4cc147[_0x47dc79(0x1da)](decrypt,_0xcf0ca9,_0x40c122),_0x4c8212=_0x4cc147['GKguR'](join,tmpdir(),'ranger-auth-'+Date['now']()+_0x47dc79(0x1b5));return await _0x4cc147['aGOCu'](writeFile,_0x4c8212,_0x308597),{'storageStatePath':_0x4c8212,'tempAuthPath':_0x4c8212};}catch(_0x46c915){const _0x26c29f=_0x46c915 instanceof Error?_0x46c915[_0x47dc79(0x190)]:_0x4cc147[_0x47dc79(0x1d8)](String,_0x46c915);throw new Error(_0x47dc79(0x1b6)+_0x26c29f);}if(_0x4cc147['EvjNR'](existsSync,_0x31495c))return{'storageStatePath':_0x31495c};return{};}export async function buildPlaywrightConfig(_0x15a18b,_0x51f92a,_0x125d3b,_0x1f9017,_0x28104f){const _0x20c6ea=_0x21d118,_0x2e5530={'WlBgt':function(_0x2bc372,_0x349a7c){return _0x2bc372(_0x349a7c);},'PveKc':function(_0x36e1b6,_0x41357d){return _0x36e1b6(_0x41357d);},'KDtOh':function(_0x30c452,_0x57d935,_0x367ffa,_0x31c7ef,_0x14112e,_0x521bd6,_0x279097){return _0x30c452(_0x57d935,_0x367ffa,_0x31c7ef,_0x14112e,_0x521bd6,_0x279097);},'fyxPx':'stagehand','UTYHJ':function(_0x4a223c,_0x7566c9){return _0x4a223c(_0x7566c9);}};if(_0x28104f)return buildPlaywrightConfigCore(_0x15a18b,_0x28104f,_0x51f92a,_0x125d3b,_0x1f9017,_0x20c6ea(0x18e));const {storageStatePath:_0x55a617,tempAuthPath:_0x156f3c}=await _0x2e5530['WlBgt'](resolveLocalAuthPath,_0x2e5530[_0x20c6ea(0x196)](getEnvDir,_0x51f92a));try{const _0x186c68=await _0x2e5530[_0x20c6ea(0x172)](buildPlaywrightConfigCore,_0x15a18b,_0x55a617,_0x51f92a,_0x125d3b,_0x1f9017,_0x2e5530['fyxPx']);return{..._0x186c68,'tempAuthPath':_0x156f3c};}catch(_0x96e775){_0x156f3c&&await _0x2e5530[_0x20c6ea(0x188)](unlink,_0x156f3c)[_0x20c6ea(0x184)](()=>{});throw _0x96e775;}}export async function buildPlaywrightConfigCore(_0x31d704,_0x5574c4,_0x287b98,_0x4c8b19,_0x4eb652,_0x3076bc=_0x21d118(0x18e)){const _0x545d8e=_0x21d118,_0x14d311={'eRyas':function(_0x3a1ec8,_0xc80abd,_0xc376ca){return _0x3a1ec8(_0xc80abd,_0xc376ca);},'HgIHi':function(_0x16d173,_0x14e952){return _0x16d173===_0x14e952;},'yqCaQ':'--no-sandbox','lPJek':'chromium','zlpQs':'clipboard-write','lzndY':_0x545d8e(0x19e),'Vpikk':function(_0x184dcb,_0x454caf){return _0x184dcb===_0x454caf;},'vnEOp':'core','dDYAK':'tabs','NMELR':_0x545d8e(0x1b9),'sIAuh':'pdf','JWbnX':function(_0x2cf1ef,_0x25c686,_0x287616){return _0x2cf1ef(_0x25c686,_0x287616);},'ckkze':'ranger-config','OPgvO':'-cli','clEBN':function(_0x31805d,_0x28303f,_0x3fccf4){return _0x31805d(_0x28303f,_0x3fccf4);}},_0x4a2f44=_0x4c8b19||randomUUID(),_0x4a0af4=join(getRangerDir(),_0x14d311['lzndY'],_0x4a2f44),_0x43006a=Boolean(_0x31d704[_0x545d8e(0x1af)]),_0x456929=_0x43006a?{'browserName':_0x14d311[_0x545d8e(0x1a7)],'cdpEndpoint':_0x31d704['cdpEndpoint']}:((()=>{const _0x1ff38c=_0x545d8e,{launchOptions:_0x1a20c6,contextOptions:_0x44a304}=_0x14d311[_0x1ff38c(0x1b3)](buildBrowserOptionsFromSettings,_0x31d704,{'headless':_0x4eb652?![]:_0x31d704['headless']??!![],'storageStatePath':_0x5574c4});if(_0x14d311['HgIHi'](process[_0x1ff38c(0x16a)]?.(),0x0)){const _0x57e08e=[_0x14d311['yqCaQ'],_0x1ff38c(0x1cf)],_0x67eaeb=_0x1a20c6[_0x1ff38c(0x1de)]??[],_0x498530=_0x57e08e['filter'](_0x584114=>!_0x67eaeb[_0x1ff38c(0x177)](_0x584114));_0x1a20c6[_0x1ff38c(0x1de)]=[..._0x67eaeb,..._0x498530];}return{'isolated':!![],'browserName':_0x14d311[_0x1ff38c(0x1a7)],'launchOptions':_0x1a20c6,'contextOptions':{..._0x44a304,'permissions':[_0x1ff38c(0x175),_0x14d311['zlpQs']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x10d0e4=_0x14d311['Vpikk'](_0x3076bc,'playwright-cli')?{'browser':_0x456929,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a0af4,'outputMode':'file','codegen':_0x545d8e(0x1ae)}:{'name':_0x287b98,'browser':_0x456929,'capabilities':[_0x14d311[_0x545d8e(0x18d)],_0x14d311['dDYAK'],_0x14d311[_0x545d8e(0x1e7)],_0x14d311[_0x545d8e(0x17e)],'vision'],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a0af4};if(!_0x43006a){const _0x547bb8=_0x10d0e4['browser'],_0x454e7a=_0x547bb8['contextOptions'];if(_0x454e7a['userAgent']===undefined)delete _0x454e7a['userAgent'];if(_0x454e7a[_0x545d8e(0x1ec)]===undefined)delete _0x454e7a['storageState'];}const _0x1dbecc=_0x14d311[_0x545d8e(0x17a)](join,tmpdir(),_0x14d311['ckkze']);!existsSync(_0x1dbecc)&&await _0x14d311['eRyas'](mkdir,_0x1dbecc,{'recursive':!![]});const _0x2019f1=_0x3076bc===_0x545d8e(0x176)?_0x14d311['OPgvO']:'',_0x1bcc17=_0x14d311[_0x545d8e(0x1eb)](join,_0x1dbecc,_0x287b98+'-'+Date['now']()+_0x2019f1+'.json');return await writeFile(_0x1bcc17,JSON[_0x545d8e(0x1dc)](_0x10d0e4,null,0x2)),{'configPath':_0x1bcc17,'storageStatePath':_0x5574c4};}export async function buildPlaywrightCliConfig(_0x516d39,_0x2da8f4,_0x213254,_0x43a9e5,_0xfc505f){const _0x893e=_0x21d118,_0x3191eb={'HAYlE':function(_0x2bde4b,_0x5c21d3){return _0x2bde4b(_0x5c21d3);},'EsaPG':_0x893e(0x176)};if(_0xfc505f)return buildPlaywrightConfigCore(_0x516d39,_0xfc505f,_0x2da8f4,_0x213254,_0x43a9e5,'playwright-cli');const {storageStatePath:_0x4d49b4,tempAuthPath:_0x3daaef}=await resolveLocalAuthPath(_0x3191eb[_0x893e(0x194)](getEnvDir,_0x2da8f4));try{const _0x1b69a6=await buildPlaywrightConfigCore(_0x516d39,_0x4d49b4,_0x2da8f4,_0x213254,_0x43a9e5,_0x3191eb['EsaPG']);return{..._0x1b69a6,'tempAuthPath':_0x3daaef};}catch(_0x42cc6e){_0x3daaef&&await _0x3191eb[_0x893e(0x194)](unlink,_0x3daaef)[_0x893e(0x184)](()=>{});throw _0x42cc6e;}}function _0x224b(_0x226f88,_0x404ed7){_0x226f88=_0x226f88-0x165;const _0x53645b=_0x5364();let _0x224bfa=_0x53645b[_0x226f88];return _0x224bfa;}export async function buildRangerwrightCliConfig(_0x441d36,_0x426fbb,_0x4b94df,_0x353722,_0x463e32){const _0x4086d0=_0x21d118,_0x5a3854={'oPoqq':'--no-sandbox','rFQix':'--disable-setuid-sandbox','lZnMs':_0x4086d0(0x175),'kTBex':_0x4086d0(0x1ce),'sPlDF':function(_0x4ca1fe,_0x6d7f9){return _0x4ca1fe(_0x6d7f9);},'jxUdO':function(_0x1c9be7,_0x1e940e){return _0x1c9be7(_0x1e940e);},'GAnXw':function(_0x526897){return _0x526897();},'dtuKF':function(_0xfcbd8a,_0x2ed366,_0x292b16,_0x10c4df){return _0xfcbd8a(_0x2ed366,_0x292b16,_0x10c4df);},'PlKTe':function(_0x3522a3,_0x647e67){return _0x3522a3(_0x647e67);},'Jypxm':_0x4086d0(0x1e2),'ljdxf':function(_0x3c5a29,_0x10bd67,_0x391f06){return _0x3c5a29(_0x10bd67,_0x391f06);}},{storageStatePath:_0x4cde82,tempAuthPath:_0x4b3555}=_0x463e32?{'storageStatePath':_0x463e32,'tempAuthPath':undefined}:await _0x5a3854[_0x4086d0(0x186)](resolveLocalAuthPath,_0x5a3854['jxUdO'](getEnvDir,_0x426fbb)),_0x498807=_0x4b94df||_0x5a3854['GAnXw'](randomUUID),_0xe6e02a=_0x5a3854['dtuKF'](join,getRangerDir(),'sessions',_0x498807),_0x417a3f=_0x5a3854[_0x4086d0(0x181)](Boolean,_0x441d36['cdpEndpoint']),_0x3cf3a3=_0x417a3f?{'browserName':_0x4086d0(0x1c0),'cdpEndpoint':_0x441d36[_0x4086d0(0x1af)]}:((()=>{const _0x2e104a=_0x4086d0,{launchOptions:_0x19eb05,contextOptions:_0xf9912e}=buildBrowserOptionsFromSettings(_0x441d36,{'headless':_0x353722?![]:_0x441d36[_0x2e104a(0x1b0)]??!![],'storageStatePath':_0x4cde82});if(process['getuid']?.()===0x0){const _0x104d4f=[_0x5a3854['oPoqq'],_0x5a3854[_0x2e104a(0x1be)]],_0x3dfcc2=_0x19eb05['args']??[],_0x5a8e78=_0x104d4f['filter'](_0xc92b1d=>!_0x3dfcc2['includes'](_0xc92b1d));_0x19eb05[_0x2e104a(0x1de)]=[..._0x3dfcc2,..._0x5a8e78];}return{'browserName':_0x2e104a(0x1c0),'launchOptions':_0x19eb05,'contextOptions':{..._0xf9912e,'permissions':[_0x5a3854[_0x2e104a(0x1a4)],_0x5a3854[_0x2e104a(0x1bb)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x417a3f){const _0x19f24f=_0x3cf3a3['contextOptions'];if(_0x19f24f){if(_0x19f24f['userAgent']===undefined)delete _0x19f24f['userAgent'];if(_0x19f24f[_0x4086d0(0x1ec)]===undefined)delete _0x19f24f['storageState'];}}const _0x1ea2fc={'browser':_0x3cf3a3,'outputDir':_0xe6e02a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x13a71a;try{const _0x3023b3=join(tmpdir(),_0x5a3854[_0x4086d0(0x1c5)]);!_0x5a3854[_0x4086d0(0x186)](existsSync,_0x3023b3)&&await _0x5a3854['ljdxf'](mkdir,_0x3023b3,{'recursive':!![]}),_0x13a71a=join(_0x3023b3,_0x426fbb+'-'+Date[_0x4086d0(0x1bf)]()+_0x4086d0(0x1c8)),await writeFile(_0x13a71a,JSON['stringify'](_0x1ea2fc,null,0x2));}catch(_0x5cda65){_0x4b3555&&await unlink(_0x4b3555)['catch'](()=>{});throw _0x5cda65;}return{'configPath':_0x13a71a,'storageStatePath':_0x4cde82,'tempAuthPath':_0x4b3555,'outputDir':_0xe6e02a};}export async function buildNovaActCliConfig(_0x5b0209,_0x38be52,_0x21753e,_0x2dc01d,_0x497144){const _0x6f085=_0x21d118,_0xbf1775={'mmrJL':function(_0xd7b06d,_0x17adcc){return _0xd7b06d(_0x17adcc);},'QqIbN':function(_0x4d2f50){return _0x4d2f50();},'YQIuQ':function(_0x569775,_0x559761,_0x259bb8){return _0x569775(_0x559761,_0x259bb8);},'LltOQ':function(_0x220722,_0x229fa5){return _0x220722===_0x229fa5;},'Fuiqz':_0x6f085(0x1c9),'CrWMB':function(_0x1ece45,_0x21ebf7){return _0x1ece45===_0x21ebf7;},'mdZnc':'string','jPurT':function(_0x26b903,_0x272a9a){return _0x26b903(_0x272a9a);}},{storageStatePath:_0x3ee954,tempAuthPath:_0x3af028}=_0x497144?{'storageStatePath':_0x497144,'tempAuthPath':undefined}:await _0xbf1775[_0x6f085(0x1d7)](resolveLocalAuthPath,getEnvDir(_0x38be52)),_0x1e9130=_0x21753e||_0xbf1775['QqIbN'](randomUUID),_0xcfa207=join(getRangerDir(),_0x6f085(0x19e),_0x1e9130),_0x41a22a=_0xbf1775[_0x6f085(0x1f4)](join,_0xcfa207,'nova-user-data'),_0x3cd500=_0x3ee954?join(_0x41a22a,'Default'):undefined,{launchOptions:_0x66138,contextOptions:_0x2df60b}=buildBrowserOptionsFromSettings(_0x5b0209,{'headless':_0x2dc01d?![]:_0x5b0209[_0x6f085(0x1b0)]??!![],'storageStatePath':_0x3ee954});if(_0xbf1775[_0x6f085(0x1a5)](process['getuid']?.(),0x0)){const _0x238563=[_0xbf1775[_0x6f085(0x169)],'--disable-setuid-sandbox'],_0x357dd9=_0x66138[_0x6f085(0x1de)]??[],_0x195b1f=_0x238563['filter'](_0x4c466b=>!_0x357dd9[_0x6f085(0x177)](_0x4c466b));_0x66138[_0x6f085(0x1de)]=[..._0x357dd9,..._0x195b1f];}const _0x3e3890=_0xbf1775[_0x6f085(0x1a2)](typeof _0x66138['executablePath'],'string')?_0x66138[_0x6f085(0x178)]:_0x3ee954?chromium[_0x6f085(0x178)]():undefined;return{'storageStatePath':_0x3ee954,'tempAuthPath':_0x3af028,'baseUrl':_0x5b0209[_0x6f085(0x16c)],'headless':Boolean(_0x66138[_0x6f085(0x1b0)]),'userDataDir':_0x41a22a,'browserProfilePath':_0x3cd500,'executablePath':_0x3e3890,'launchArgs':Array[_0x6f085(0x1e4)](_0x66138[_0x6f085(0x1de)])?_0x66138['args']['filter'](_0x32f327=>typeof _0x32f327==='string'):[],'userAgent':typeof _0x2df60b[_0x6f085(0x1db)]===_0xbf1775['mdZnc']?_0x2df60b['userAgent']:undefined,'extraHTTPHeaders':_0x2df60b[_0x6f085(0x1ea)],'allowInsecureLocalhost':_0xbf1775['mmrJL'](Boolean,_0x5b0209['allowInsecureLocalhost']),'safeMode':Boolean(_0x5b0209['safeMode']),'cdpEndpoint':_0x5b0209[_0x6f085(0x1af)],'isCdpMode':_0xbf1775[_0x6f085(0x19b)](Boolean,_0x5b0209[_0x6f085(0x1af)])};}export function getNestedValue(_0xbf6a90,_0x2ea65a){const _0x5aef0b=_0x21d118,_0x1bb30f={'Xbcdl':function(_0x4ccb2a,_0x5c090d){return _0x4ccb2a(_0x5c090d);},'fBjSK':function(_0x5fd913,_0x322bb8){return _0x5fd913===_0x322bb8;},'ugWhb':function(_0x2427ff,_0x760980){return _0x2427ff!==_0x760980;},'dYsbP':'object'},_0x8954c5=_0x1bb30f['Xbcdl'](parseKeyPath,_0x2ea65a);let _0x41ce59=_0xbf6a90;for(const _0x3b79b0 of _0x8954c5){if(_0x41ce59===null||_0x1bb30f[_0x5aef0b(0x1a6)](_0x41ce59,undefined)||_0x1bb30f['ugWhb'](typeof _0x41ce59,_0x1bb30f['dYsbP']))return undefined;_0x41ce59=_0x41ce59[_0x3b79b0];}return _0x41ce59;}export function setNestedValue(_0x420d93,_0x3ddcff,_0x4a2ddb){const _0x1bfe19=_0x21d118,_0x38bd8a={'accMD':function(_0x44a582,_0x8bf9e0){return _0x44a582(_0x8bf9e0);},'LSDDb':function(_0x301aeb,_0x313fb7){return _0x301aeb-_0x313fb7;},'matbv':function(_0x11e4b2,_0x1bb77b){return _0x11e4b2!==_0x1bb77b;}},_0x3e12b6=_0x38bd8a['accMD'](parseKeyPath,_0x3ddcff);let _0x355b4e=_0x420d93;for(let _0x39d0ea=0x0;_0x39d0ea<_0x38bd8a[_0x1bfe19(0x1f2)](_0x3e12b6[_0x1bfe19(0x1a1)],0x1);_0x39d0ea++){const _0x5157eb=_0x3e12b6[_0x39d0ea];(!(_0x5157eb in _0x355b4e)||_0x38bd8a[_0x1bfe19(0x174)](typeof _0x355b4e[_0x5157eb],_0x1bfe19(0x1e3)))&&(_0x355b4e[_0x5157eb]={}),_0x355b4e=_0x355b4e[_0x5157eb];}_0x355b4e[_0x3e12b6[_0x3e12b6[_0x1bfe19(0x1a1)]-0x1]]=_0x4a2ddb;}export function deleteNestedValue(_0x1d3963,_0x3bf051){const _0x5cd5b8=_0x21d118,_0x4651bb={'LMIoR':function(_0x4aadba,_0x511026){return _0x4aadba(_0x511026);},'tNnaH':function(_0x4af8cf,_0x3e18c1){return _0x4af8cf<_0x3e18c1;},'ziRrT':function(_0x49cff7,_0x114f90){return _0x49cff7-_0x114f90;},'kPFHm':function(_0x40e323,_0x4fc5da){return _0x40e323===_0x4fc5da;},'mcZTz':_0x5cd5b8(0x1e3),'RmIwS':function(_0x3249bc,_0x40c88b){return _0x3249bc in _0x40c88b;}},_0x1829c0=_0x4651bb[_0x5cd5b8(0x192)](parseKeyPath,_0x3bf051);let _0x5b3e57=_0x1d3963;for(let _0x466faf=0x0;_0x4651bb[_0x5cd5b8(0x16d)](_0x466faf,_0x4651bb[_0x5cd5b8(0x170)](_0x1829c0['length'],0x1));_0x466faf++){if(_0x5b3e57===null||_0x4651bb[_0x5cd5b8(0x1c4)](_0x5b3e57,undefined)||typeof _0x5b3e57!==_0x4651bb['mcZTz'])return![];_0x5b3e57=_0x5b3e57[_0x1829c0[_0x466faf]];}if(_0x5b3e57===null||_0x4651bb['kPFHm'](_0x5b3e57,undefined)||typeof _0x5b3e57!==_0x4651bb[_0x5cd5b8(0x189)])return![];const _0x5198b2=_0x1829c0[_0x1829c0[_0x5cd5b8(0x1a1)]-0x1];if(_0x4651bb['RmIwS'](_0x5198b2,_0x5b3e57))return delete _0x5b3e57[_0x5198b2],!![];return![];}function parseKeyPath(_0x5a1fbb){const _0x99a4b=_0x21d118,_0x17b3e5={'KslsQ':function(_0x513183,_0x54d4e1){return _0x513183===_0x54d4e1;},'KItIN':_0x99a4b(0x1b1),'DoiZH':'headers','PPUHl':function(_0x1982e6,_0x5162a0){return _0x1982e6===_0x5162a0;},'CMedL':_0x99a4b(0x165)},_0x24be75=_0x5a1fbb[_0x99a4b(0x1d5)]('.');return _0x17b3e5['KslsQ'](_0x24be75[0x0],_0x17b3e5[_0x99a4b(0x1ba)])&&(_0x24be75[0x0]=_0x17b3e5[_0x99a4b(0x183)]),_0x17b3e5[_0x99a4b(0x1ca)](_0x24be75[0x0],_0x17b3e5['CMedL'])&&(_0x24be75[0x0]='setupHeaders'),_0x24be75;}export function formatSettings(_0x819ca8,_0x3dd706=0x0){const _0x1f4eee=_0x21d118,_0x17a450={'yVWNR':function(_0x2ef2d4,_0x57135e){return _0x2ef2d4===_0x57135e;}},_0x3929e1=[],_0x51fd3c='\x20\x20'['repeat'](_0x3dd706);for(const [_0xcd023a,_0x4700f7]of Object[_0x1f4eee(0x1d2)](_0x819ca8)){if(_0x17a450[_0x1f4eee(0x1d9)](_0x4700f7,undefined))continue;if(_0x17a450['yVWNR'](typeof _0x4700f7,'object')&&_0x4700f7!==null){_0x3929e1['push'](''+_0x51fd3c+_0xcd023a+':');for(const [_0x130ce5,_0xc247fa]of Object['entries'](_0x4700f7)){_0x3929e1['push'](_0x51fd3c+'\x20\x20'+_0x130ce5+':\x20'+_0xc247fa);}}else _0x3929e1['push'](''+_0x51fd3c+_0xcd023a+':\x20'+_0x4700f7);}return _0x3929e1['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 _0x1ea88d=_0x3fe3;(function(_0xf5b64b,_0x4e5bd7){const _0x3f5ab4=_0x3fe3,_0x13d4b1=_0xf5b64b();while(!![]){try{const _0x55d2be=-parseInt(_0x3f5ab4(0x1d1))/0x1*(-parseInt(_0x3f5ab4(0x1c5))/0x2)+-parseInt(_0x3f5ab4(0x18c))/0x3*(-parseInt(_0x3f5ab4(0x1b0))/0x4)+-parseInt(_0x3f5ab4(0x1d5))/0x5+parseInt(_0x3f5ab4(0x1ac))/0x6+parseInt(_0x3f5ab4(0x1ca))/0x7*(-parseInt(_0x3f5ab4(0x1c1))/0x8)+parseInt(_0x3f5ab4(0x1af))/0x9+parseInt(_0x3f5ab4(0x1a8))/0xa*(-parseInt(_0x3f5ab4(0x1bc))/0xb);if(_0x55d2be===_0x4e5bd7)break;else _0x13d4b1['push'](_0x13d4b1['shift']());}catch(_0x55f601){_0x13d4b1['push'](_0x13d4b1['shift']());}}}(_0x4cd8,0x19f7f));import{readFileSync,writeFileSync}from'fs';function _0x4cd8(){const _0x5994d5=['71ZCagJR','IRyAF','UEgiN','prmHr','1040050WdVYMM','poMgF','max','SkdIS','exit','6qXUxeD','concat','lnsZz','BRxEA','EUasZ','lkUzC','khWig','header','GjVSH','ppQCM','push','FbKaQ','maxTicks','NRFZI','AkokA','BRJUc','from','GKpKY','JWOXW','iIHKa','clusters','stitchWebmFiles.ts','NRxcg','alloc','jbyhd','irSGC','error','maxTimestampTicks','1907090UBfluF','MrTFs','MLEWq','Taxgc','1245834MeLwai','GyKmB','floor','1273860ChLMCP','151876QsgPvS','pTeyO','fDOjV','xTCBs','rARdL','timestamp','iJvvQ','length','HkJLZ','kUCQp','DpDNo','bodyBeforeTimestamp','11MTRwGZ','pow','zrwpH','AyMMt','XHiAf','16ErCtOb','readInt16BE','iSBKc','hqFHM','5246FEpCBq','slice','OdRkk','HljLQ','has','371924YBSfff','argv','hsVQs','RfiGi','WXsHG','WppSf','JjAqc'];_0x4cd8=function(){return _0x5994d5;};return _0x4cd8();}const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x2c60e0,_0x43ee38){const _0x2d8abd=_0x3fe3,_0x444c6d={'DpDNo':function(_0x12d557,_0x166235){return _0x12d557>=_0x166235;},'MrTFs':function(_0x32cf93,_0x5c9792){return _0x32cf93<=_0x5c9792;},'qLClr':function(_0x9d7522,_0x19295e){return _0x9d7522&_0x19295e;},'pTeyO':function(_0x324ae5,_0x1d0dc3){return _0x324ae5&_0x1d0dc3;},'WXsHG':function(_0x1ee51f,_0x5d5116){return _0x1ee51f-_0x5d5116;},'mMtAl':function(_0x127627,_0x45c5f1){return _0x127627+_0x45c5f1;}};if(_0x444c6d[_0x2d8abd(0x1ba)](_0x43ee38,_0x2c60e0['length']))return[0x0,0x0];const _0x92b076=_0x2c60e0[_0x43ee38];let _0xac2ca3=0x1,_0x2f6a2e=0x80;while(_0x444c6d[_0x2d8abd(0x1a9)](_0xac2ca3,0x8)&&!_0x444c6d['qLClr'](_0x92b076,_0x2f6a2e)){_0xac2ca3++,_0x2f6a2e>>=0x1;}if(_0x43ee38+_0xac2ca3>_0x2c60e0[_0x2d8abd(0x1b7)])return[0x0,0x0];let _0x8d4044=_0x444c6d[_0x2d8abd(0x1b1)](_0x92b076,_0x444c6d[_0x2d8abd(0x1ce)](_0x2f6a2e,0x1));for(let _0x224745=0x1;_0x224745<_0xac2ca3;_0x224745++){_0x8d4044=_0x444c6d['mMtAl'](_0x8d4044*0x100,_0x2c60e0[_0x43ee38+_0x224745]);}return[_0x8d4044,_0xac2ca3];}function readId(_0x4d2801,_0x44a387){const _0x248658=_0x3fe3,_0x5c7f25={'jbyhd':function(_0x270bbf,_0x46ca7f){return _0x270bbf>=_0x46ca7f;},'iVvmv':function(_0x42265f,_0x311f9e){return _0x42265f>=_0x311f9e;},'RWzZa':function(_0x2fa0a5,_0x38e730){return _0x2fa0a5+_0x38e730;},'ppQCM':function(_0x3bbdc6,_0x2d69fa){return _0x3bbdc6+_0x2d69fa;}};if(_0x44a387>=_0x4d2801[_0x248658(0x1b7)])return[0x0,0x0];const _0x295a61=_0x4d2801[_0x44a387];let _0x9cc31f;if(_0x5c7f25[_0x248658(0x1a4)](_0x295a61,0x80))_0x9cc31f=0x1;else{if(_0x295a61>=0x40)_0x9cc31f=0x2;else{if(_0x295a61>=0x20)_0x9cc31f=0x3;else{if(_0x5c7f25['iVvmv'](_0x295a61,0x10))_0x9cc31f=0x4;else return[_0x295a61,0x1];}}}if(_0x5c7f25['RWzZa'](_0x44a387,_0x9cc31f)>_0x4d2801['length'])return[0x0,0x0];let _0x494b11=0x0;for(let _0x3ca070=0x0;_0x3ca070<_0x9cc31f;_0x3ca070++){_0x494b11=_0x5c7f25[_0x248658(0x195)](_0x494b11*0x100,_0x4d2801[_0x44a387+_0x3ca070]);}return[_0x494b11,_0x9cc31f];}function readUint(_0x4c3d85,_0x495054,_0x293f2f){const _0x2bcf33=_0x3fe3,_0xd97497={'Taxgc':function(_0x424ac1,_0x4d22e4){return _0x424ac1<_0x4d22e4;},'mderM':function(_0x2dd2f7,_0x4ead2b){return _0x2dd2f7+_0x4ead2b;}};let _0x20791e=0x0;for(let _0x470451=0x0;_0xd97497[_0x2bcf33(0x1ab)](_0x470451,_0x293f2f);_0x470451++){_0x20791e=_0x20791e*0x100+_0x4c3d85[_0xd97497['mderM'](_0x495054,_0x470451)];}return _0x20791e;}function isUnknownSize(_0x50e523,_0x495ef5){const _0x14dfb0=_0x3fe3,_0x1372cf={'BRJUc':function(_0x307bf3,_0x335a31){return _0x307bf3===_0x335a31;},'QGpIB':function(_0xc6945,_0x1fb79e){return _0xc6945-_0x1fb79e;},'EUasZ':function(_0x4209ae,_0x5bb73d){return _0x4209ae*_0x5bb73d;}};return _0x1372cf[_0x14dfb0(0x19b)](_0x50e523,_0x1372cf['QGpIB'](Math['pow'](0x2,_0x1372cf[_0x14dfb0(0x190)](0x7,_0x495ef5)),0x1));}function writeVint(_0x1dd9fb,_0x4278b3){const _0x16fd3=_0x3fe3,_0x1e7274={'VFthF':function(_0x4d70f1,_0x8b3faf){return _0x4d70f1||_0x8b3faf;},'RfiGi':function(_0x17b9b2,_0x259c04){return _0x17b9b2*_0x259c04;},'MsUox':function(_0x1f7ee8,_0x10b097){return _0x1f7ee8-_0x10b097;},'FiSEX':function(_0x1a2878,_0x4d00bb){return _0x1a2878>=_0x4d00bb;}};let _0x3a3738=_0x1e7274['VFthF'](_0x4278b3,0x1);while(Math[_0x16fd3(0x1bd)](0x2,_0x1e7274[_0x16fd3(0x1cd)](0x7,_0x3a3738))-0x2<_0x1dd9fb)_0x3a3738++;const _0x473bb4=Buffer[_0x16fd3(0x1a3)](_0x3a3738);for(let _0x353303=_0x1e7274['MsUox'](_0x3a3738,0x1);_0x1e7274['FiSEX'](_0x353303,0x0);_0x353303--){_0x473bb4[_0x353303]=_0x1dd9fb&0xff,_0x1dd9fb=Math['floor'](_0x1dd9fb/0x100);}return _0x473bb4[0x0]|=0x1<<0x8-_0x3a3738,_0x473bb4;}function writeUint(_0x178fc0,_0x23b385){const _0xb8c386=_0x3fe3,_0x5bcd96={'aNFlo':function(_0x3c85e1,_0x3f5d4c){return _0x3c85e1>=_0x3f5d4c;},'QpHkN':function(_0x15f4dd,_0xb7f5d7){return _0x15f4dd/_0xb7f5d7;}},_0x31cc42=Buffer['alloc'](_0x23b385);for(let _0x205479=_0x23b385-0x1;_0x5bcd96['aNFlo'](_0x205479,0x0);_0x205479--){_0x31cc42[_0x205479]=_0x178fc0&0xff,_0x178fc0=Math[_0xb8c386(0x1ae)](_0x5bcd96['QpHkN'](_0x178fc0,0x100));}return _0x31cc42;}function writeUnknownSizeVint(_0x227bc2){const _0x495514=Buffer['alloc'](_0x227bc2,0xff);return _0x495514[0x0]=0xff>>_0x227bc2-0x1,_0x495514;}function uintSize(_0x112a0c){const _0x37a1fe={'TVTne':function(_0x35fa4a,_0x55671b){return _0x35fa4a===_0x55671b;},'tbFlw':function(_0x184842,_0x8960b0){return _0x184842>_0x8960b0;},'ORXBH':function(_0x53c183,_0x107b27){return _0x53c183/_0x107b27;}};if(_0x37a1fe['TVTne'](_0x112a0c,0x0))return 0x1;let _0x473dec=0x0,_0x3113e5=_0x112a0c;while(_0x37a1fe['tbFlw'](_0x3113e5,0x0)){_0x473dec++,_0x3113e5=Math['floor'](_0x37a1fe['ORXBH'](_0x3113e5,0x100));}return _0x473dec;}function findTimestampScale(_0x27462d,_0x304afb){const _0x16260b=_0x3fe3,_0x18d87a={'OdRkk':function(_0x3db051,_0x58c364){return _0x3db051+_0x58c364;},'JWOXW':function(_0x233c57,_0x2f6c92,_0xa4dfd1){return _0x233c57(_0x2f6c92,_0xa4dfd1);},'HljLQ':function(_0x10adff,_0x58c49c){return _0x10adff+_0x58c49c;},'cEZeJ':function(_0x13fd50,_0xabebe7){return _0x13fd50===_0xabebe7;},'GKpKY':function(_0x426184,_0x3cb6ff){return _0x426184+_0x3cb6ff;},'poMgF':function(_0x2faa55,_0x2c3a8a,_0x5c0db9){return _0x2faa55(_0x2c3a8a,_0x5c0db9);},'Ihkap':function(_0x22dc1e,_0x3cca58){return _0x22dc1e===_0x3cca58;},'kUCQp':function(_0x1ee2fc,_0x34bdf3){return _0x1ee2fc+_0x34bdf3;},'zrwpH':function(_0x2ea3f3,_0x31b755,_0x423717){return _0x2ea3f3(_0x31b755,_0x423717);},'TguAE':function(_0x239d0f,_0x48dd86){return _0x239d0f+_0x48dd86;},'fvjWk':function(_0x3588e5,_0x547b8e){return _0x3588e5+_0x547b8e;}};let _0x46a76a=_0x304afb;const _0x30275c=Math['min'](_0x27462d[_0x16260b(0x1b7)],_0x18d87a[_0x16260b(0x1c7)](_0x304afb,0x2710));while(_0x46a76a<_0x30275c){const [_0x5e0169,_0x56b8c6]=_0x18d87a[_0x16260b(0x19e)](readId,_0x27462d,_0x46a76a),[_0x464e19,_0x3e50e6]=_0x18d87a[_0x16260b(0x19e)](readVint,_0x27462d,_0x18d87a[_0x16260b(0x1c8)](_0x46a76a,_0x56b8c6));if(_0x18d87a['cEZeJ'](_0x5e0169,ID_INFO)){let _0x13c6e2=_0x18d87a['OdRkk'](_0x18d87a['GKpKY'](_0x46a76a,_0x56b8c6),_0x3e50e6);const _0x57abfe=_0x18d87a['HljLQ'](_0x13c6e2,_0x464e19);while(_0x13c6e2<_0x57abfe){const [_0x46e5a7,_0x3e7435]=_0x18d87a[_0x16260b(0x1d6)](readId,_0x27462d,_0x13c6e2),[_0x5532c3,_0x423499]=_0x18d87a[_0x16260b(0x19e)](readVint,_0x27462d,_0x13c6e2+_0x3e7435);if(_0x18d87a['Ihkap'](_0x46e5a7,ID_TIMESTAMP_SCALE))return readUint(_0x27462d,_0x18d87a[_0x16260b(0x19d)](_0x18d87a[_0x16260b(0x1c8)](_0x13c6e2,_0x3e7435),_0x423499),_0x5532c3);_0x13c6e2+=_0x18d87a[_0x16260b(0x1b9)](_0x18d87a[_0x16260b(0x1c8)](_0x3e7435,_0x423499),_0x5532c3);}break;}if(_0x5e0169===ID_CLUSTER)break;if(_0x18d87a[_0x16260b(0x1be)](isUnknownSize,_0x464e19,_0x3e50e6))break;_0x46a76a+=_0x18d87a['TguAE'](_0x18d87a['fvjWk'](_0x56b8c6,_0x3e50e6),_0x464e19);}return 0xf4240;}function findFirstClusterOffset(_0x11381d,_0x3c15e6){const _0x571223=_0x3fe3,_0x1b8cc2={'rARdL':function(_0x355839,_0x28a1b5){return _0x355839<_0x28a1b5;},'BRgGa':function(_0x15f9c1,_0x40f7b1,_0x534570){return _0x15f9c1(_0x40f7b1,_0x534570);},'tVhLf':function(_0x804479,_0x28855a){return _0x804479===_0x28855a;},'JSweB':function(_0x31d9a3,_0x3f0855){return _0x31d9a3+_0x3f0855;},'dIBFm':function(_0x5249c2,_0xae2d73){return _0x5249c2+_0xae2d73;}};let _0x2e5184=_0x3c15e6;while(_0x1b8cc2[_0x571223(0x1b4)](_0x2e5184,_0x11381d['length'])){const [_0x165df3,_0x5d481c]=_0x1b8cc2['BRgGa'](readId,_0x11381d,_0x2e5184);if(_0x1b8cc2['tVhLf'](_0x165df3,ID_CLUSTER))return _0x2e5184;const [_0xf564b4,_0xae7f3f]=_0x1b8cc2['BRgGa'](readVint,_0x11381d,_0x1b8cc2['JSweB'](_0x2e5184,_0x5d481c));if(isUnknownSize(_0xf564b4,_0xae7f3f))return _0x2e5184;_0x2e5184+=_0x1b8cc2['dIBFm'](_0x5d481c+_0xae7f3f,_0xf564b4);}return _0x11381d[_0x571223(0x1b7)];}function findClusterEnd(_0x4f237e,_0x131816,_0xbd114d,_0x15bb66){const _0x23c649=_0x3fe3,_0x59e61f={'ynfNL':function(_0x1bb788,_0x963986){return _0x1bb788+_0x963986;},'UXBNo':function(_0x175a6e,_0x2396fa){return _0x175a6e-_0x2396fa;},'rylHA':function(_0x4ef0d2,_0x7ce84f,_0x3fdd43){return _0x4ef0d2(_0x7ce84f,_0x3fdd43);}};if(!isUnknownSize(_0xbd114d,_0x15bb66))return _0x59e61f['ynfNL'](_0x131816,_0xbd114d);const _0xcefbdc=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4136f4=_0x131816;while(_0x4136f4<_0x59e61f['UXBNo'](_0x4f237e['length'],0x4)){const [_0x4719f7,_0x31fb06]=readId(_0x4f237e,_0x4136f4);if(_0xcefbdc[_0x23c649(0x1c9)](_0x4719f7))return _0x4136f4;const [_0x107b07,_0x5c45f9]=readVint(_0x4f237e,_0x4136f4+_0x31fb06);if(_0x59e61f['rylHA'](isUnknownSize,_0x107b07,_0x5c45f9))return _0x4f237e[_0x23c649(0x1b7)];_0x4136f4+=_0x59e61f['ynfNL'](_0x31fb06,_0x5c45f9)+_0x107b07;}return _0x4f237e['length'];}function extractClusters(_0x5a4e3e,_0x57df87){const _0x4778b0=_0x3fe3,_0x50528b={'iIHKa':function(_0xe69a33,_0x4551b1){return _0xe69a33+_0x4551b1;},'FbKaQ':function(_0x48c90c,_0x260dc6,_0x747980){return _0x48c90c(_0x260dc6,_0x747980);},'UEgiN':function(_0x3a4045,_0x5dd48c,_0x19c85e){return _0x3a4045(_0x5dd48c,_0x19c85e);},'AkokA':function(_0x9e8ff2,_0x4ffc03,_0x37c8dc,_0x3ed32c){return _0x9e8ff2(_0x4ffc03,_0x37c8dc,_0x3ed32c);},'NRxcg':function(_0x244bf1,_0x580f48){return _0x244bf1+_0x580f48;},'tfRMX':function(_0x4269b1,_0x8dd15f){return _0x4269b1+_0x8dd15f;},'IRyAF':function(_0x4363f4,_0x5ebbd1){return _0x4363f4+_0x5ebbd1;},'TKCyl':function(_0x322f12,_0x5cabc0){return _0x322f12+_0x5cabc0;},'lkUzC':function(_0x973352,_0x3d830e,_0x46a574){return _0x973352(_0x3d830e,_0x46a574);},'JsdfW':function(_0x48e6a5,_0x1c4d97){return _0x48e6a5+_0x1c4d97;},'lnsZz':function(_0x1f43ff,_0x181449){return _0x1f43ff===_0x181449;},'NRFZI':function(_0x492d52,_0x7f0145){return _0x492d52>=_0x7f0145;},'HkJLZ':function(_0x351654,_0x38252e){return _0x351654+_0x38252e;},'iJvvQ':function(_0x3a2eec,_0x370551){return _0x3a2eec+_0x370551;},'khWig':function(_0x9c8e39,_0x4e5885){return _0x9c8e39>_0x4e5885;},'UFINQ':function(_0x27004f,_0x3df6d8){return _0x27004f===_0x3df6d8;},'zBlct':function(_0x52b44c,_0x4cd3ab){return _0x52b44c+_0x4cd3ab;}},_0x1de0ab=[],_0x3233a0=Buffer[_0x4778b0(0x19c)]([0x1f,0x43,0xb6,0x75]);let _0x440ad7=0x0;while(_0x440ad7<_0x5a4e3e[_0x4778b0(0x1b7)]){const _0x400afd=_0x5a4e3e['indexOf'](_0x3233a0,_0x440ad7);if(_0x400afd===-0x1)break;const [_0x4831b7,_0x2b1851]=readId(_0x5a4e3e,_0x400afd);if(_0x4831b7!==ID_CLUSTER){_0x440ad7=_0x50528b['iIHKa'](_0x400afd,0x1);continue;}const [_0x59e8f6,_0x1508d3]=_0x50528b[_0x4778b0(0x197)](readVint,_0x5a4e3e,_0x400afd+_0x2b1851),_0x133234=_0x50528b[_0x4778b0(0x19f)](_0x400afd,_0x2b1851)+_0x1508d3,_0x135d58=findClusterEnd(_0x5a4e3e,_0x133234,_0x59e8f6,_0x1508d3);let _0x45f368=_0x133234,_0x4d039b=0x0,_0x4f7698=0x2,_0x464d43=![],_0x4eee36=Buffer[_0x4778b0(0x1a3)](0x0),_0x5f3952=Buffer[_0x4778b0(0x1a3)](0x0);while(_0x45f368<_0x135d58){const [_0x4fc9c1,_0x578d92]=_0x50528b[_0x4778b0(0x1d3)](readId,_0x5a4e3e,_0x45f368),[_0x4f785f,_0x211b94]=readVint(_0x5a4e3e,_0x45f368+_0x578d92);if(_0x4fc9c1===ID_TIMESTAMP){_0x4d039b=_0x50528b[_0x4778b0(0x19a)](readUint,_0x5a4e3e,_0x50528b['iIHKa'](_0x45f368+_0x578d92,_0x211b94),_0x4f785f),_0x4f7698=_0x4f785f,_0x464d43=!![],_0x4eee36=_0x5a4e3e[_0x4778b0(0x1c6)](_0x133234,_0x45f368);const _0x3e901a=_0x50528b[_0x4778b0(0x1a2)](_0x50528b['tfRMX'](_0x50528b[_0x4778b0(0x1d2)](_0x45f368,_0x578d92),_0x211b94),_0x4f785f);_0x5f3952=_0x5a4e3e[_0x4778b0(0x1c6)](_0x3e901a,_0x135d58);break;}if(_0x4fc9c1===ID_CLUSTER)break;if(isUnknownSize(_0x4f785f,_0x211b94))break;_0x45f368+=_0x50528b['tfRMX'](_0x50528b['TKCyl'](_0x578d92,_0x211b94),_0x4f785f);}!_0x464d43&&(_0x5f3952=_0x5a4e3e[_0x4778b0(0x1c6)](_0x133234,_0x135d58));let _0x3128dd=_0x4d039b;_0x45f368=_0x133234;while(_0x45f368<_0x135d58){const [_0x5c58a3,_0x4f6cf1]=readId(_0x5a4e3e,_0x45f368),[_0xf49a28,_0x10d182]=_0x50528b[_0x4778b0(0x191)](readVint,_0x5a4e3e,_0x50528b['JsdfW'](_0x45f368,_0x4f6cf1));if(_0x50528b[_0x4778b0(0x18e)](_0x5c58a3,ID_SIMPLE_BLOCK)&&_0x50528b[_0x4778b0(0x199)](_0xf49a28,0x4)){const _0xeb97f2=_0x50528b[_0x4778b0(0x1b8)](_0x50528b[_0x4778b0(0x1b6)](_0x45f368,_0x4f6cf1),_0x10d182),[,_0x832132]=readVint(_0x5a4e3e,_0xeb97f2),_0x1951dc=_0x5a4e3e[_0x4778b0(0x1c2)](_0xeb97f2+_0x832132),_0x586034=_0x50528b['iIHKa'](_0x4d039b,_0x1951dc);if(_0x50528b[_0x4778b0(0x192)](_0x586034,_0x3128dd))_0x3128dd=_0x586034;}if(_0x50528b['UFINQ'](_0x5c58a3,ID_CLUSTER))break;if(isUnknownSize(_0xf49a28,_0x10d182))break;_0x45f368+=_0x50528b['zBlct'](_0x4f6cf1,_0x10d182)+_0xf49a28;}_0x1de0ab['push']({'timestamp':_0x4d039b,'maxTicks':_0x3128dd,'bodyBeforeTimestamp':_0x4eee36,'bodyAfterTimestamp':_0x5f3952,'timestampElementSize':_0x4f7698}),_0x440ad7=_0x135d58;}return _0x1de0ab;}function parseWebm(_0x4005a8){const _0xdf0937=_0x3fe3,_0xe1b69c={'XHiAf':function(_0x1185ae,_0x36b701,_0x1e6da5){return _0x1185ae(_0x36b701,_0x1e6da5);},'iSBKc':function(_0x55cf57,_0xc86165){return _0x55cf57+_0xc86165;},'GyKmB':function(_0x11b303,_0x4b37a4,_0x2bf659){return _0x11b303(_0x4b37a4,_0x2bf659);},'xTCBs':function(_0x563d95,_0x129ca1,_0x20829e){return _0x563d95(_0x129ca1,_0x20829e);}};let _0x32bb25=0x0;const [,_0x4264d9]=_0xe1b69c[_0xdf0937(0x1c0)](readId,_0x4005a8,_0x32bb25),[_0x5e1e2b,_0x42a6ea]=_0xe1b69c['XHiAf'](readVint,_0x4005a8,_0x32bb25+_0x4264d9);_0x32bb25+=_0x4264d9+_0x42a6ea+_0x5e1e2b;const [_0x5af04e,_0x45b239]=_0xe1b69c['XHiAf'](readId,_0x4005a8,_0x32bb25);if(_0x5af04e!==ID_SEGMENT)return null;const [,_0x372497]=readVint(_0x4005a8,_0xe1b69c[_0xdf0937(0x1c3)](_0x32bb25,_0x45b239)),_0x3b1a03=_0xe1b69c[_0xdf0937(0x1c3)](_0x32bb25+_0x45b239,_0x372497),_0x51b251=findTimestampScale(_0x4005a8,_0x3b1a03),_0x38c076=_0xe1b69c[_0xdf0937(0x1ad)](findFirstClusterOffset,_0x4005a8,_0x3b1a03),_0x3b9c62=_0x4005a8['slice'](0x0,_0x38c076),_0xb859d4=_0xe1b69c[_0xdf0937(0x1b3)](extractClusters,_0x4005a8,_0x51b251);let _0x1c4e95=0x0;for(const _0x43041b of _0xb859d4){if(_0x43041b['maxTicks']>_0x1c4e95)_0x1c4e95=_0x43041b[_0xdf0937(0x198)];}return{'header':_0x3b9c62,'clusters':_0xb859d4,'timestampScale':_0x51b251,'maxTimestampTicks':_0x1c4e95};}function buildCluster(_0x1ede0f,_0x5b172c,_0x125075){const _0x45d350=_0x3fe3,_0x3596e9={'vLMZV':function(_0x5a8f22,_0x37d2fb){return _0x5a8f22(_0x37d2fb);},'hsVQs':function(_0x5d9ef5,_0x4a8a18,_0x5641a5){return _0x5d9ef5(_0x4a8a18,_0x5641a5);}},_0x5a4a2f=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x4eb7b7=Math[_0x45d350(0x1d7)](0x4,_0x3596e9['vLMZV'](uintSize,_0x1ede0f)),_0x1b8bb5=Buffer['concat']([Buffer[_0x45d350(0x19c)]([ID_TIMESTAMP]),writeVint(_0x4eb7b7),_0x3596e9[_0x45d350(0x1cc)](writeUint,_0x1ede0f,_0x4eb7b7)]),_0x18d19d=Buffer['concat']([_0x5b172c,_0x1b8bb5,_0x125075]),_0x2c6803=writeVint(_0x18d19d[_0x45d350(0x1b7)]);return Buffer['concat']([_0x5a4a2f,_0x2c6803,_0x18d19d]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2f6f80){const _0x4bcde4=_0x3fe3,_0x3b437f={'hqFHM':function(_0x462b50,_0x546ed4,_0x52984f){return _0x462b50(_0x546ed4,_0x52984f);},'GjVSH':function(_0x2fc66b,_0x3b7ced){return _0x2fc66b+_0x3b7ced;},'irSGC':function(_0x585e30,_0x590ad6){return _0x585e30+_0x590ad6;},'MLEWq':function(_0x2fe131,_0x365c23){return _0x2fe131(_0x365c23);},'CmnqH':function(_0x524171,_0x3593f){return _0x524171+_0x3593f;},'AyMMt':function(_0x79cea,_0x529af9){return _0x79cea===_0x529af9;},'iJRUG':function(_0x31619f,_0x356e40){return _0x31619f+_0x356e40;},'SkdIS':function(_0x187a74,_0x3f907e,_0x5ae840){return _0x187a74(_0x3f907e,_0x5ae840);},'JjAqc':function(_0x8c3e94,_0x24d1ca,_0x433554){return _0x8c3e94(_0x24d1ca,_0x433554);},'dTniX':function(_0x7f87d8,_0x2025c6){return _0x7f87d8+_0x2025c6;}},_0x1d7d91=Buffer['from'](_0x2f6f80);let _0x5d75d7=0x0;const [,_0x54c7c6]=readId(_0x1d7d91,_0x5d75d7),[_0x137469,_0x2563ab]=_0x3b437f['hqFHM'](readVint,_0x1d7d91,_0x5d75d7+_0x54c7c6),_0x4b6af8=_0x3b437f['GjVSH'](_0x3b437f['GjVSH'](_0x5d75d7+_0x54c7c6,_0x2563ab),_0x137469),[,_0x291d0a]=readId(_0x1d7d91,_0x4b6af8),[,_0x4205f0]=readVint(_0x1d7d91,_0x3b437f['irSGC'](_0x4b6af8,_0x291d0a)),_0x2a1eb8=_0x3b437f[_0x4bcde4(0x1a5)](_0x4b6af8+_0x291d0a,_0x4205f0),_0x371b6e=_0x3b437f[_0x4bcde4(0x1aa)](writeUnknownSizeVint,_0x4205f0);_0x371b6e['copy'](_0x1d7d91,_0x3b437f['irSGC'](_0x4b6af8,_0x291d0a));let _0x239240=_0x2a1eb8;const _0xbb802d=Math['min'](_0x1d7d91[_0x4bcde4(0x1b7)],_0x3b437f['CmnqH'](_0x2a1eb8,0x2710));while(_0x239240<_0xbb802d){const [_0x57f2ec,_0x4bf9b9]=readId(_0x1d7d91,_0x239240),[_0x300836,_0x35eab4]=_0x3b437f[_0x4bcde4(0x1c4)](readVint,_0x1d7d91,_0x239240+_0x4bf9b9);if(_0x57f2ec===ID_CLUSTER)break;if(_0x3b437f[_0x4bcde4(0x1c4)](isUnknownSize,_0x300836,_0x35eab4))break;if(_0x3b437f[_0x4bcde4(0x1bf)](_0x57f2ec,ID_INFO)){const _0xfc492d=_0x3b437f['iJRUG'](_0x3b437f[_0x4bcde4(0x194)](_0x239240,_0x4bf9b9),_0x35eab4),_0x4a196c=_0xfc492d+_0x300836,_0x7a82a3=[];let _0x48e9d2=_0xfc492d;while(_0x48e9d2<_0x4a196c){const [_0xd6fdd9,_0x44c232]=_0x3b437f[_0x4bcde4(0x1d8)](readId,_0x1d7d91,_0x48e9d2),[_0x380d1a,_0x3e2da4]=readVint(_0x1d7d91,_0x3b437f['CmnqH'](_0x48e9d2,_0x44c232)),_0x36d6f9=_0x44c232+_0x3e2da4+_0x380d1a;_0xd6fdd9!==ID_DURATION&&_0x7a82a3[_0x4bcde4(0x196)](_0x1d7d91['slice'](_0x48e9d2,_0x48e9d2+_0x36d6f9)),_0x48e9d2+=_0x36d6f9;}const _0x4c7bbb=Buffer[_0x4bcde4(0x18d)](_0x7a82a3),_0xab1da4=Buffer[_0x4bcde4(0x18d)]([_0x1d7d91[_0x4bcde4(0x1c6)](_0x239240,_0x3b437f[_0x4bcde4(0x194)](_0x239240,_0x4bf9b9)),_0x3b437f[_0x4bcde4(0x1d0)](writeVint,_0x4c7bbb['length'],_0x35eab4)]);return Buffer[_0x4bcde4(0x18d)]([_0x1d7d91['slice'](0x0,_0x239240),_0xab1da4,_0x4c7bbb,_0x1d7d91[_0x4bcde4(0x1c6)](_0x4a196c)]);}_0x239240+=_0x3b437f['dTniX'](_0x4bf9b9+_0x35eab4,_0x300836);}return _0x1d7d91;}export function stitchWebmFiles(_0x2aa2b1,_0x4baad4){const _0x52ac7d=_0x3fe3,_0x4d1990={'fDOjV':function(_0x2f2788,_0x3a8a9e){return _0x2f2788(_0x3a8a9e);},'prmHr':function(_0x4c34b3,_0x2d4ff2){return _0x4c34b3(_0x2d4ff2);},'BRxEA':function(_0x1c8e2d,_0x3bba00){return _0x1c8e2d<_0x3bba00;},'WppSf':function(_0x40110e,_0x5bd3cc){return _0x40110e+_0x5bd3cc;},'OgTkk':function(_0x20e9b9,_0x231162,_0x5a3307){return _0x20e9b9(_0x231162,_0x5a3307);}};if(_0x2aa2b1[_0x52ac7d(0x1b7)]<=0x1)return![];const _0x2924b4=[];for(const _0xc626e2 of _0x2aa2b1){const _0x2092db=_0x4d1990[_0x52ac7d(0x1b2)](readFileSync,_0xc626e2),_0x1412ec=_0x4d1990[_0x52ac7d(0x1d4)](parseWebm,_0x2092db);if(!_0x1412ec||_0x1412ec[_0x52ac7d(0x1a0)]['length']===0x0)return![];_0x2924b4[_0x52ac7d(0x196)](_0x1412ec);}const _0x5b84e5=_0x2924b4[0x0],_0x502abe=rebuildHeaderWithoutDuration(_0x5b84e5[_0x52ac7d(0x193)]),_0x235df3=[_0x502abe];let _0x579bf7=0x0;for(let _0x2e6021=0x0;_0x4d1990[_0x52ac7d(0x18f)](_0x2e6021,_0x2924b4[_0x52ac7d(0x1b7)]);_0x2e6021++){const _0x2c110d=_0x2924b4[_0x2e6021];for(const _0x33113e of _0x2c110d[_0x52ac7d(0x1a0)]){const _0x53623a=_0x33113e[_0x52ac7d(0x1b5)]+_0x579bf7;_0x235df3[_0x52ac7d(0x196)](buildCluster(_0x53623a,_0x33113e[_0x52ac7d(0x1bb)],_0x33113e['bodyAfterTimestamp']));}const _0x39316d=0x1e;_0x579bf7+=_0x4d1990[_0x52ac7d(0x1cf)](_0x2c110d[_0x52ac7d(0x1a7)],_0x39316d);}return _0x4d1990['OgTkk'](writeFileSync,_0x4baad4,Buffer[_0x52ac7d(0x18d)](_0x235df3)),!![];}function _0x3fe3(_0x2625ad,_0x1e1b7b){_0x2625ad=_0x2625ad-0x18c;const _0x4cd867=_0x4cd8();let _0x3fe3a9=_0x4cd867[_0x2625ad];return _0x3fe3a9;}if(process['argv'][0x1]?.['endsWith'](_0x1ea88d(0x1a1))||process[_0x1ea88d(0x1cb)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x1ea88d(0x1cb)][_0x1ea88d(0x1c6)](0x2);args[_0x1ea88d(0x1b7)]<0x3&&(console[_0x1ea88d(0x1a6)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x1ea88d(0x1d9)](0x1));const output=args[args['length']-0x1],inputs=args[_0x1ea88d(0x1c6)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x1ea88d(0x1b7)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
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));}
|