@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.9dea9f8-61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +2 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2899(_0x312ee3,_0x1e2dd3){_0x312ee3=_0x312ee3-0x176;const _0x3116b5=_0x3116();let _0x2899f8=_0x3116b5[_0x312ee3];return _0x2899f8;}(function(_0x5f3aab,_0x25ef69){const _0x3686a6=_0x2899,_0x5b22d2=_0x5f3aab();while(!![]){try{const _0x29bce9=-parseInt(_0x3686a6(0x19a))/0x1+-parseInt(_0x3686a6(0x190))/0x2+parseInt(_0x3686a6(0x17e))/0x3*(parseInt(_0x3686a6(0x187))/0x4)+-parseInt(_0x3686a6(0x179))/0x5+parseInt(_0x3686a6(0x1af))/0x6+-parseInt(_0x3686a6(0x1ab))/0x7*(-parseInt(_0x3686a6(0x19e))/0x8)+parseInt(_0x3686a6(0x181))/0x9;if(_0x29bce9===_0x25ef69)break;else _0x5b22d2['push'](_0x5b22d2['shift']());}catch(_0x39e399){_0x5b22d2['push'](_0x5b22d2['shift']());}}}(_0x3116,0x97516));import{existsSync}from'fs';import _0x3e62cb from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x17ddec){const _0x28a274=_0x2899,_0x471ed4={'nYoQb':function(_0x422204,_0x2e6f3b){return _0x422204(_0x2e6f3b);},'oJbxk':function(_0x35426d,_0x1ff75d){return _0x35426d!==_0x1ff75d;},'GHAPn':function(_0x48ef24){return _0x48ef24();},'NqeAg':function(_0x3674b2,_0x12744a){return _0x3674b2===_0x12744a;},'bZobn':function(_0x51c339,_0x5cb8a0){return _0x51c339+_0x5cb8a0;},'whQBl':function(_0x231bbe,_0x37c067){return _0x231bbe+_0x37c067;},'NFlYl':function(_0x49d340,_0x36a093){return _0x49d340+_0x36a093;},'ltoyF':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','wEORJ':_0x28a274(0x18e),'iCWfP':_0x28a274(0x176),'ICGEZ':function(_0x1e0512,_0x48813e){return _0x1e0512 instanceof _0x48813e;},'cTnrG':_0x28a274(0x177),'alRTh':function(_0x1909bd){return _0x1909bd();},'NlbqP':_0x28a274(0x17f),'SsFqv':'source','amGgg':'Cloud\x20profile\x20(recommended)','sLcxS':'cloud','xWwRy':'local','IQABX':function(_0xbff4f3,_0x55a24f){return _0xbff4f3===_0x55a24f;},'snUFH':function(_0x5802d0,_0x2cb353,_0x246ce){return _0x5802d0(_0x2cb353,_0x246ce);},'VMiDu':function(_0x1d3b34,_0x31904c){return _0x1d3b34(_0x31904c);},'HRHDz':function(_0x2236b4,_0x4ef048){return _0x2236b4(_0x4ef048);},'dNbug':function(_0x302e05,_0x36ffbc){return _0x302e05+_0x36ffbc;},'SkyHi':function(_0x32fbec,_0x2a7203){return _0x32fbec+_0x2a7203;},'XsWgh':_0x28a274(0x1a2),'zzNsg':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','RwhnM':function(_0x59760c,_0x39e1a5){return _0x59760c(_0x39e1a5);}},_0x22466f=_0x17ddec['profile'];let _0x37a984=_0x22466f,_0x2d8ea3=null;const _0x1dd825=_0x22466f?null:await readActiveProfileName();if(_0x17ddec[_0x28a274(0x18b)]&&_0x22466f)console['log'](_0x28a274(0x1ad)+_0x17ddec['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x22466f+_0x28a274(0x192));else _0x17ddec['authEnv']&&!process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x17ddec[_0x28a274(0x18b)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x22466f&&process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME'])try{const _0x359a7b=await _0x471ed4['nYoQb'](resolveAdHocProfile,{'targetUrl':_0x17ddec['baseUrl']??readUrlEnvVars()[_0x28a274(0x178)],'envKey':_0x17ddec[_0x28a274(0x18b)]});_0x359a7b&&(_0x1dd825&&_0x471ed4[_0x28a274(0x189)](_0x1dd825,_0x359a7b['name'])&&console[_0x28a274(0x17a)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x359a7b['name']+_0x28a274(0x17b)+_0x1dd825+'\x22.\x20Pass\x20--profile\x20'+_0x1dd825+'\x20to\x20override.'),_0x37a984=_0x359a7b[_0x28a274(0x182)],_0x2d8ea3=_0x359a7b[_0x28a274(0x193)]);}catch(_0x4b5afd){if(!_0x1dd825||_0x17ddec['authEnv'])throw _0x4b5afd;console['log']('\x20\x20Warning:\x20'+(_0x4b5afd instanceof Error?_0x4b5afd['message']:String(_0x4b5afd))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x1dd825+'\x22.');}if(!_0x37a984)_0x37a984=_0x1dd825??undefined;if(!_0x37a984)try{const _0xf6fcdf=await _0x471ed4['GHAPn'](listCloudProfiles);if(_0x471ed4['NqeAg'](_0xf6fcdf[_0x28a274(0x1ac)],0x1)){const _0x17dc45=_0xf6fcdf[0x0];_0x37a984=_0x17dc45[_0x28a274(0x182)],console['log'](_0x28a274(0x198)+_0x17dc45[_0x28a274(0x182)]),console['log'](_0x28a274(0x183));}}catch{}if(!_0x37a984)throw new Error(_0x471ed4['bZobn'](_0x471ed4[_0x28a274(0x19c)](_0x471ed4[_0x28a274(0x196)](_0x471ed4['NFlYl'](_0x28a274(0x197),_0x471ed4['ltoyF']),_0x471ed4['wEORJ']),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x471ed4[_0x28a274(0x1a5)]));const _0x2bdd83=getEnvDir(_0x37a984),_0x27b626=existsSync(_0x2bdd83);let _0x4d4dd3=_0x2d8ea3,_0x1fa8fc=![];if(!_0x4d4dd3)try{_0x4d4dd3=await fetchCloudProfile(_0x37a984);if(!_0x4d4dd3)_0x1fa8fc=!![];}catch(_0x3df2b1){_0x471ed4['ICGEZ'](_0x3df2b1,ApiError)&&_0x3df2b1[_0x28a274(0x17d)]===0x194&&(_0x1fa8fc=!![]);}if(_0x22466f&&_0x1fa8fc&&!_0x27b626&&!_0x4d4dd3)throw new Error(_0x28a274(0x1ae)+_0x22466f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x471ed4[_0x28a274(0x1a9)]+_0x28a274(0x194));if(_0x4d4dd3&&_0x27b626){let _0x357cb6=!![];if(_0x471ed4['alRTh'](isInteractive)){const {source:_0x15e822}=await _0x3e62cb['prompt']([{'type':_0x471ed4['NlbqP'],'name':_0x471ed4['SsFqv'],'message':'Profile\x20\x22'+_0x37a984+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x471ed4[_0x28a274(0x1a6)],'value':_0x471ed4[_0x28a274(0x1a3)]},{'name':'Local\x20profile','value':_0x471ed4[_0x28a274(0x1a0)]}],'default':'cloud'}]);_0x357cb6=_0x471ed4['IQABX'](_0x15e822,'cloud');}if(!_0x357cb6)_0x4d4dd3=null;}const _0x5c0112=readProfileOverrides(process['cwd'](),_0x37a984);let _0x5ad791=null,_0x182f93,_0x437f53,_0x362b26,_0x2811db,_0xb0e0c=null,_0x59c32a,_0x2ceca9;const _0x38f2a9=_0x471ed4[_0x28a274(0x19d)](expandOverrides,_0x5c0112),_0x476ada=readUrlEnvVars();if(_0x4d4dd3){_0x5ad791=_0x4d4dd3;const _0x1584be=_0x4d4dd3[_0x28a274(0x1b0)]??{},_0x2c1199=_0x471ed4[_0x28a274(0x18c)](mergeCloudProfileSettings,_0x1584be,_0x5c0112??undefined),_0x4b6bcc={..._0x4d4dd3,'settings':_0x2c1199};_0xb0e0c={'baseUrl':_0x471ed4['nYoQb'](expandString,_0x1584be['baseUrl']),'startPath':expandString(_0x1584be[_0x28a274(0x19f)])};const _0x16c6fd=await fetchAuthConfig(),_0x27f617=_0x16c6fd?_0x471ed4[_0x28a274(0x18c)](resolveAuthEnvironmentLocally,_0x16c6fd,_0x4d4dd3[_0x28a274(0x199)]):null;_0x59c32a=_0x27f617?.['domains']?.[0x0],_0x2ceca9=_0x27f617?.['key'];const _0x5eddd7=_0x471ed4[_0x28a274(0x19d)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec['baseUrl'],'flagStartPath':_0x17ddec[_0x28a274(0x19f)],'envBaseUrl':_0x476ada['envBaseUrl'],'envStartPath':_0x476ada['envStartPath'],'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x39a3df=process[_0x28a274(0x1b1)]['RANGER_SESSION_STATE_PATH'];if(_0x39a3df){if(!existsSync(_0x39a3df))throw new Error('RANGER_SESSION_STATE_PATH='+_0x39a3df+'\x20does\x20not\x20exist.');_0x182f93=_0x39a3df,_0x437f53=_0x471ed4[_0x28a274(0x180)](resolveEnvVars,_0x2c1199),_0x362b26=Boolean(_0x437f53[_0x28a274(0x17c)]);}else{const _0x4f5ebd=await _0x471ed4['snUFH'](resolveCloudProfileSession,_0x4b6bcc,{'effectiveBaseUrl':_0x5eddd7['baseUrl'],'telemetry':_0x17ddec[_0x28a274(0x1aa)],'assertedEnv':_0x17ddec['authEnv']});_0x182f93=_0x4f5ebd['authPath'],_0x437f53=resolveEnvVars(_0x4f5ebd['settings']),_0x362b26=_0x471ed4['HRHDz'](Boolean,_0x437f53[_0x28a274(0x17c)]),_0x59c32a=_0x4f5ebd[_0x28a274(0x18d)]?.['domains']?.[0x0],_0x2ceca9=_0x4f5ebd['resolvedEnv']?.[_0x28a274(0x1a8)];}}else{if(!_0x27b626){const _0x59ca8c=!_0x22466f;throw new Error(_0x59ca8c?_0x471ed4['dNbug'](_0x471ed4[_0x28a274(0x1b2)]('Active\x20profile\x20\x22'+_0x37a984+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x471ed4[_0x28a274(0x18a)]),_0x471ed4[_0x28a274(0x191)])+(_0x28a274(0x186)+_0x37a984+_0x28a274(0x18f)):_0x28a274(0x1ae)+_0x37a984+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x37a984);}const _0x1adf6b=await loadSettings(_0x37a984);_0x437f53=_0x471ed4[_0x28a274(0x195)](resolveEnvVars,_0x1adf6b),_0x362b26=_0x471ed4['RwhnM'](Boolean,_0x437f53['cdpEndpoint']),_0x2811db=_0x437f53[_0x28a274(0x1a7)];}const _0x2fd455=_0x471ed4[_0x28a274(0x195)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec[_0x28a274(0x1a7)],'flagStartPath':_0x17ddec['startPath'],'envBaseUrl':_0x476ada[_0x28a274(0x178)],'envStartPath':_0x476ada['envStartPath'],'localSettingsBaseUrl':_0x2811db,'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x2c6824=_0x2fd455[_0x28a274(0x1a1)]??_0x2fd455[_0x28a274(0x1a7)];if(!_0x2c6824&&!_0x362b26)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x37a984+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x37a984+_0x28a274(0x19b));return{'activeProfile':_0x37a984,'resolvedCloudProfile':_0x5ad791,'cloudAuthPath':_0x182f93,'resolvedSettings':_0x437f53,'isCdpMode':_0x362b26,'url':_0x2c6824,'baseUrlSource':_0x2fd455['baseUrlSource'],'authEnvKey':_0x2ceca9,'startPath':_0x2fd455['startPath']};}function expandString(_0x1d2f1a){if(typeof _0x1d2f1a!=='string')return _0x1d2f1a;return resolveEnvVars(_0x1d2f1a);}function expandOverrides(_0x40788f){const _0x5e5125=_0x2899,_0x4f9927={'enqTk':_0x5e5125(0x184),'zEGJF':function(_0x4b8796,_0x4b44b1){return _0x4b8796(_0x4b44b1);},'rkERv':function(_0x500c4c,_0x39356a){return _0x500c4c===_0x39356a;}};if(!_0x40788f)return _0x40788f;const _0x30fc08={..._0x40788f};return typeof _0x30fc08[_0x5e5125(0x1a7)]===_0x4f9927[_0x5e5125(0x188)]&&(_0x30fc08[_0x5e5125(0x1a7)]=_0x4f9927['zEGJF'](resolveEnvVars,_0x30fc08[_0x5e5125(0x1a7)])),_0x4f9927[_0x5e5125(0x1a4)](typeof _0x30fc08['startPath'],_0x5e5125(0x184))&&(_0x30fc08['startPath']=_0x4f9927[_0x5e5125(0x185)](resolveEnvVars,_0x30fc08['startPath'])),_0x30fc08;}function _0x3116(){const _0x489ae0=['iCWfP','amGgg','baseUrl','key','cTnrG','telemetry','7DOtzQJ','length','\x20\x20Note:\x20--env\x20\x22','Profile\x20\x22','7259094dJuiXk','settings','env','SkyHi','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','envBaseUrl','3690475ZLsBXS','log','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','cdpEndpoint','status','3501AYlhbP','list','VMiDu','330921nvDNiw','name','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','string','zEGJF','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','3808gqVmAw','enqTk','oJbxk','XsWgh','authEnv','snUFH','resolvedEnv','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','`\x20to\x20recreate\x20it.','559004VmzFap','zzNsg','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','profile','`ranger\x20profile\x20add`\x20to\x20create\x20one.','RwhnM','whQBl','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','environmentKey','1030946edhQju','\x20baseUrl\x20<url>','bZobn','nYoQb','2485912OFhYKW','startPath','xWwRy','url','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','sLcxS','rkERv'];_0x3116=function(){return _0x489ae0;};return _0x3116();}
|
|
1
|
+
(function(_0xda5b88,_0x4fe656){const _0x1badf4=_0x5419,_0x4373fd=_0xda5b88();while(!![]){try{const _0x50de7c=parseInt(_0x1badf4(0x171))/0x1+-parseInt(_0x1badf4(0x190))/0x2*(-parseInt(_0x1badf4(0x199))/0x3)+-parseInt(_0x1badf4(0x17c))/0x4+-parseInt(_0x1badf4(0x174))/0x5*(parseInt(_0x1badf4(0x176))/0x6)+-parseInt(_0x1badf4(0x16e))/0x7*(-parseInt(_0x1badf4(0x19a))/0x8)+-parseInt(_0x1badf4(0x161))/0x9+parseInt(_0x1badf4(0x1a7))/0xa*(-parseInt(_0x1badf4(0x178))/0xb);if(_0x50de7c===_0x4fe656)break;else _0x4373fd['push'](_0x4373fd['shift']());}catch(_0x26c4b4){_0x4373fd['push'](_0x4373fd['shift']());}}}(_0x32af,0x5c28b));import{existsSync}from'fs';import _0x366f42 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x1f786a){const _0x5081ee=_0x5419,_0x2603f4={'lKbSV':function(_0x1b7d37){return _0x1b7d37();},'qQdoI':function(_0x45e7b4,_0x5ab359){return _0x45e7b4(_0x5ab359);},'MhykU':function(_0xfb3dbc,_0x1a18c0){return _0xfb3dbc+_0x1a18c0;},'GkDnL':function(_0x4f03e5,_0x4090fa){return _0x4f03e5+_0x4090fa;},'qhGgq':_0x5081ee(0x19f),'HTmzT':_0x5081ee(0x164),'VCufD':_0x5081ee(0x196),'KHxmu':function(_0x5d4937,_0x3c29aa){return _0x5d4937(_0x3c29aa);},'NNHbg':function(_0x2fc579,_0x1e0564){return _0x2fc579===_0x1e0564;},'vCBbd':function(_0x24e8cf,_0x38db68){return _0x24e8cf&&_0x38db68;},'Wycjp':function(_0xe54a2b,_0x5ac31d){return _0xe54a2b+_0x5ac31d;},'AcogM':_0x5081ee(0x19e),'vDuEX':'Cloud\x20profile\x20(recommended)','ayWBg':_0x5081ee(0x187),'rbyLS':function(_0x3c8e88,_0x2132b4,_0x1b1894){return _0x3c8e88(_0x2132b4,_0x1b1894);},'GESbC':function(_0x38ef20,_0x5ad10e){return _0x38ef20??_0x5ad10e;},'OMsgr':function(_0x29fcfb,_0x37a847){return _0x29fcfb(_0x37a847);},'IbAOa':function(_0x3e3fc0){return _0x3e3fc0();},'nRQWT':function(_0x38f68c,_0x1d644a){return _0x38f68c+_0x1d644a;},'SnBrP':function(_0x275295,_0x503d1d){return _0x275295+_0x503d1d;},'NwJux':function(_0x461e80,_0xff4b71){return _0x461e80(_0xff4b71);},'WjEsO':function(_0x513326,_0x4938c5){return _0x513326&&_0x4938c5;}},_0x33bf14=_0x1f786a['profile'];let _0x1e1715=_0x33bf14,_0x3aafb2=null;const _0x1e4e30=_0x33bf14?null:await _0x2603f4[_0x5081ee(0x18b)](readActiveProfileName);if(_0x1f786a[_0x5081ee(0x17a)]&&_0x33bf14)console[_0x5081ee(0x1a3)]('\x20\x20Note:\x20--env\x20\x22'+_0x1f786a['authEnv']+_0x5081ee(0x1a4)+_0x33bf14+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x1f786a['authEnv']&&!process[_0x5081ee(0x184)][_0x5081ee(0x16b)]&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x1f786a[_0x5081ee(0x17a)]+_0x5081ee(0x195));if(!_0x33bf14&&process['env']['RANGER_TEST_USERNAME'])try{const _0x5c5c7b=await resolveAdHocProfile({'targetUrl':_0x1f786a['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0x1f786a['authEnv']});_0x5c5c7b&&(_0x1e4e30&&_0x1e4e30!==_0x5c5c7b[_0x5081ee(0x169)]&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x5c5c7b[_0x5081ee(0x169)]+_0x5081ee(0x17f)+_0x1e4e30+_0x5081ee(0x1a1)+_0x1e4e30+'\x20to\x20override.'),_0x1e1715=_0x5c5c7b[_0x5081ee(0x169)],_0x3aafb2=_0x5c5c7b[_0x5081ee(0x19c)]);}catch(_0x315dcd){if(!_0x1e4e30||_0x1f786a[_0x5081ee(0x17a)])throw _0x315dcd;console[_0x5081ee(0x1a3)](_0x5081ee(0x17d)+(_0x315dcd instanceof Error?_0x315dcd[_0x5081ee(0x165)]:_0x2603f4['qQdoI'](String,_0x315dcd))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x1e4e30+'\x22.');}if(!_0x1e1715)_0x1e1715=_0x1e4e30??undefined;if(!_0x1e1715)try{const _0x5b02e3=await _0x2603f4['lKbSV'](listCloudProfiles);if(_0x5b02e3['length']===0x1){const _0x416cb4=_0x5b02e3[0x0];_0x1e1715=_0x416cb4[_0x5081ee(0x169)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x416cb4[_0x5081ee(0x169)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x1e1715)throw new Error(_0x2603f4[_0x5081ee(0x16f)](_0x2603f4[_0x5081ee(0x162)](_0x5081ee(0x18a)+_0x2603f4[_0x5081ee(0x193)],_0x2603f4['HTmzT'])+_0x2603f4[_0x5081ee(0x1a0)],_0x5081ee(0x179)));const _0x3b28f4=_0x2603f4['KHxmu'](getEnvDir,_0x1e1715),_0x1a9c3b=existsSync(_0x3b28f4);let _0x4fb366=_0x3aafb2,_0x552894=![];if(!_0x4fb366)try{_0x4fb366=await fetchCloudProfile(_0x1e1715);if(!_0x4fb366)_0x552894=!![];}catch(_0x227c6d){_0x227c6d instanceof ApiError&&_0x2603f4['NNHbg'](_0x227c6d[_0x5081ee(0x197)],0x194)&&(_0x552894=!![]);}if(_0x2603f4['vCBbd'](_0x33bf14,_0x552894)&&!_0x1a9c3b&&!_0x4fb366)throw new Error(_0x2603f4[_0x5081ee(0x168)](_0x5081ee(0x166)+_0x33bf14+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x2603f4['AcogM'])+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x4fb366&&_0x1a9c3b){let _0x5eca25=!![];if(isInteractive()){const {source:_0x3282f0}=await _0x366f42[_0x5081ee(0x185)]([{'type':_0x5081ee(0x175),'name':_0x5081ee(0x192),'message':'Profile\x20\x22'+_0x1e1715+_0x5081ee(0x16d),'choices':[{'name':_0x2603f4[_0x5081ee(0x1a2)],'value':_0x5081ee(0x187)},{'name':'Local\x20profile','value':_0x5081ee(0x1a6)}],'default':_0x2603f4['ayWBg']}]);_0x5eca25=_0x3282f0===_0x5081ee(0x187);}if(!_0x5eca25)_0x4fb366=null;}const _0x1ba419=_0x2603f4[_0x5081ee(0x17e)](readProfileOverrides,process[_0x5081ee(0x17b)](),_0x1e1715);let _0x1e0767=null,_0x3688fa,_0x3146a0,_0x59052f,_0x60bb45,_0x5b49f3=null,_0x2d65af,_0x16a2bb;const _0x21005c=expandOverrides(_0x1ba419),_0x53e4e7=readUrlEnvVars();if(_0x4fb366){_0x1e0767=_0x4fb366;const _0x2d6f84=_0x4fb366['settings']??{},_0x35a23e=mergeCloudProfileSettings(_0x2d6f84,_0x2603f4['GESbC'](_0x1ba419,undefined)),_0x2e90df={..._0x4fb366,'settings':_0x35a23e};_0x5b49f3={'baseUrl':_0x2603f4['KHxmu'](expandString,_0x2d6f84['baseUrl']),'startPath':_0x2603f4[_0x5081ee(0x181)](expandString,_0x2d6f84['startPath'])};const _0x538b3e=await _0x2603f4[_0x5081ee(0x198)](fetchAuthConfig),_0x6cc3a4=_0x538b3e?resolveAuthEnvironmentLocally(_0x538b3e,_0x4fb366['environmentKey']):null;_0x2d65af=_0x6cc3a4?.[_0x5081ee(0x194)]?.[0x0],_0x16a2bb=_0x6cc3a4?.[_0x5081ee(0x167)];const _0x2bdb26=resolveProfileUrl({'flagBaseUrl':_0x1f786a[_0x5081ee(0x19d)],'flagStartPath':_0x1f786a[_0x5081ee(0x18c)],'envBaseUrl':_0x53e4e7['envBaseUrl'],'envStartPath':_0x53e4e7['envStartPath'],'projectOverrides':_0x21005c,'cloudSettings':_0x5b49f3,'authEnvironmentDomain':_0x2d65af}),_0x721a34=process[_0x5081ee(0x184)][_0x5081ee(0x19b)];if(_0x721a34){if(!existsSync(_0x721a34))throw new Error(_0x5081ee(0x180)+_0x721a34+'\x20does\x20not\x20exist.');_0x3688fa=_0x721a34,_0x3146a0=resolveEnvVars(_0x35a23e),_0x59052f=Boolean(_0x3146a0[_0x5081ee(0x189)]);}else{const _0x45d98a=await resolveCloudProfileSession(_0x2e90df,{'effectiveBaseUrl':_0x2bdb26['baseUrl'],'telemetry':_0x1f786a['telemetry'],'assertedEnv':_0x1f786a['authEnv']});_0x3688fa=_0x45d98a[_0x5081ee(0x18e)],_0x3146a0=resolveEnvVars(_0x45d98a['settings']),_0x59052f=_0x2603f4['OMsgr'](Boolean,_0x3146a0[_0x5081ee(0x189)]),_0x2d65af=_0x45d98a['resolvedEnv']?.[_0x5081ee(0x194)]?.[0x0],_0x16a2bb=_0x45d98a[_0x5081ee(0x183)]?.[_0x5081ee(0x167)];}}else{if(!_0x1a9c3b){const _0x3dff2e=!_0x33bf14;throw new Error(_0x3dff2e?_0x2603f4['nRQWT'](_0x2603f4['SnBrP'](_0x2603f4[_0x5081ee(0x163)](_0x5081ee(0x186)+_0x1e1715+_0x5081ee(0x16a),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'),_0x5081ee(0x16c)+_0x1e1715+_0x5081ee(0x177)):'Profile\x20\x22'+_0x1e1715+_0x5081ee(0x191)+_0x1e1715);}const _0x17bdac=await _0x2603f4[_0x5081ee(0x188)](loadSettings,_0x1e1715);_0x3146a0=resolveEnvVars(_0x17bdac),_0x59052f=Boolean(_0x3146a0[_0x5081ee(0x189)]),_0x60bb45=_0x3146a0['baseUrl'];}const _0xce170b=resolveProfileUrl({'flagBaseUrl':_0x1f786a[_0x5081ee(0x19d)],'flagStartPath':_0x1f786a[_0x5081ee(0x18c)],'envBaseUrl':_0x53e4e7[_0x5081ee(0x182)],'envStartPath':_0x53e4e7[_0x5081ee(0x172)],'localSettingsBaseUrl':_0x60bb45,'projectOverrides':_0x21005c,'cloudSettings':_0x5b49f3,'authEnvironmentDomain':_0x2d65af}),_0x331ee1=_0xce170b[_0x5081ee(0x18f)]??_0xce170b['baseUrl'];if(_0x2603f4[_0x5081ee(0x173)](!_0x331ee1,!_0x59052f))throw new Error(_0x5081ee(0x18d)+_0x1e1715+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x1e1715+'\x20baseUrl\x20<url>');return{'activeProfile':_0x1e1715,'resolvedCloudProfile':_0x1e0767,'cloudAuthPath':_0x3688fa,'resolvedSettings':_0x3146a0,'isCdpMode':_0x59052f,'url':_0x331ee1,'baseUrlSource':_0xce170b['baseUrlSource'],'authEnvKey':_0x16a2bb,'startPath':_0xce170b[_0x5081ee(0x18c)]};}function _0x32af(){const _0x406674=['65IZuegq','list','118158mZrJQZ','`\x20to\x20recreate\x20it.','914441FJanne','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','authEnv','cwd','566056xHBRUw','\x20\x20Warning:\x20','rbyLS','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','RANGER_SESSION_STATE_PATH=','OMsgr','envBaseUrl','resolvedEnv','env','prompt','Active\x20profile\x20\x22','cloud','NwJux','cdpEndpoint','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','lKbSV','startPath','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','authPath','url','618204TGdoEA','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','source','qhGgq','domains','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','status','IbAOa','6GZkMec','1130536jgwGTX','RANGER_SESSION_STATE_PATH','profile','baseUrl','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','VCufD','\x22.\x20Pass\x20--profile\x20','vDuEX','log','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','RWfPy','local','30ibxgsW','4134294GIHrYY','GkDnL','nRQWT','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','message','Profile\x20\x22','key','Wycjp','name','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','RANGER_TEST_USERNAME','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','7HxzNSl','MhykU','string','724244ZPrunR','envStartPath','WjEsO'];_0x32af=function(){return _0x406674;};return _0x32af();}function _0x5419(_0x222d0b,_0x2f4a94){_0x222d0b=_0x222d0b-0x161;const _0x32afde=_0x32af();let _0x54196b=_0x32afde[_0x222d0b];return _0x54196b;}function expandString(_0x27850c){const _0x214609=_0x5419;if(typeof _0x27850c!==_0x214609(0x170))return _0x27850c;return resolveEnvVars(_0x27850c);}function expandOverrides(_0x23d672){const _0x92848e=_0x5419,_0x581f11={'RTBYL':function(_0x5a6b12,_0xf118e9){return _0x5a6b12(_0xf118e9);},'RWfPy':_0x92848e(0x170)};if(!_0x23d672)return _0x23d672;const _0x2ab4fa={..._0x23d672};return typeof _0x2ab4fa['baseUrl']==='string'&&(_0x2ab4fa['baseUrl']=_0x581f11['RTBYL'](resolveEnvVars,_0x2ab4fa[_0x92848e(0x19d)])),typeof _0x2ab4fa['startPath']===_0x581f11[_0x92848e(0x1a5)]&&(_0x2ab4fa['startPath']=_0x581f11['RTBYL'](resolveEnvVars,_0x2ab4fa[_0x92848e(0x18c)])),_0x2ab4fa;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e76b7,_0x34c859){const _0x392ef1=_0x12cc,_0x521a5f=_0x3e76b7();while(!![]){try{const _0x25b553=-parseInt(_0x392ef1(0xcf))/0x1+-parseInt(_0x392ef1(0xc9))/0x2+-parseInt(_0x392ef1(0xbd))/0x3*(parseInt(_0x392ef1(0xd0))/0x4)+-parseInt(_0x392ef1(0xbe))/0x5*(-parseInt(_0x392ef1(0xd3))/0x6)+parseInt(_0x392ef1(0xb9))/0x7+parseInt(_0x392ef1(0xb4))/0x8*(parseInt(_0x392ef1(0xc6))/0x9)+-parseInt(_0x392ef1(0xba))/0xa*(parseInt(_0x392ef1(0xb5))/0xb);if(_0x25b553===_0x34c859)break;else _0x521a5f['push'](_0x521a5f['shift']());}catch(_0x2c01fb){_0x521a5f['push'](_0x521a5f['shift']());}}}(_0x2287,0x1ab07));function _0x12cc(_0x1cb75f,_0x31b35d){_0x1cb75f=_0x1cb75f-0xb4;const _0x228705=_0x2287();let _0x12cc56=_0x228705[_0x1cb75f];return _0x12cc56;}function firstDefined(..._0x15862b){const _0x19cd17=_0x12cc,_0x277e52={'WlrTZ':function(_0x3982ec,_0x1aa06b){return _0x3982ec!==_0x1aa06b;},'QFHWf':function(_0x121f8f,_0x5cb915){return _0x121f8f!==_0x5cb915;}};for(const _0x53c1d1 of _0x15862b){if(_0x277e52['WlrTZ'](_0x53c1d1,undefined)&&_0x277e52[_0x19cd17(0xc7)](_0x53c1d1,null)&&_0x53c1d1!=='')return _0x53c1d1;}return undefined;}function normalizeAuthEnvironmentDomain(_0x213281){const _0x2806ad=_0x12cc;if(!_0x213281)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x2806ad(0xc1)](_0x213281))return _0x213281;return _0x2806ad(0xb7)+_0x213281;}function _0x2287(){const _0x3ed9d1=['bOJAz','projects.json\x20override','1151166FsegOa','GFcCK','lFlFD','295216KaICHc','187TtcYFx','envBaseUrl','https://','Ajwzu','394716mMMuKo','13230tVixAl','LhNnZ','BZLwh','212013rEQkXx','5YuQfvv','local\x20profile\x20settings','auth\x20environment\x20domain','test','flagStartPath','RANGER_BASE_URL','dGrLI','mLGbY','45sOmimQ','QFHWf','projectOverrides','367930ZhFzLK','baseUrl','--base-url','RANGER_START_PATH','startPath','cloudSettings','46313iWbDtN','4lMjvWl'];_0x2287=function(){return _0x3ed9d1;};return _0x2287();}export function resolveBaseUrlWithSource(_0x351c9a){const _0x34a7a4=_0x12cc,_0x3f6d3b={'LhNnZ':function(_0x25c77d,_0x389765){return _0x25c77d in _0x389765;},'Ajwzu':'RANGER_BASE_URL','dGrLI':_0x34a7a4(0xbf),'eMNsb':'string','rHZmZ':function(_0xab6c1f,_0x217c1b){return _0xab6c1f!==_0x217c1b;},'lFlFD':function(_0x7a5443,_0x3267f5){return _0x7a5443!==_0x3267f5;}},_0x3f0869=_0x351c9a[_0x34a7a4(0xc8)],_0x33d301=!!_0x3f0869&&_0x3f6d3b[_0x34a7a4(0xbb)](_0x34a7a4(0xca),_0x3f0869),_0x54937c=_0x3f0869?.['baseUrl'],_0x2f2a81=!(_0x33d301&&_0x54937c===null),_0xd205f5=[[_0x351c9a['flagBaseUrl'],_0x34a7a4(0xcb)],[_0x351c9a[_0x34a7a4(0xb6)],_0x3f6d3b[_0x34a7a4(0xb8)]],[_0x351c9a['localSettingsBaseUrl'],_0x3f6d3b[_0x34a7a4(0xc4)]],[typeof _0x54937c===_0x3f6d3b['eMNsb']?_0x54937c:undefined,_0x34a7a4(0xd2)],[_0x2f2a81?_0x351c9a[_0x34a7a4(0xce)]?.['baseUrl']:undefined,'cloud\x20profile\x20settings'],[_0x2f2a81?normalizeAuthEnvironmentDomain(_0x351c9a['authEnvironmentDomain']):undefined,_0x34a7a4(0xc0)]];for(const [_0x546090,_0x30adb6]of _0xd205f5){if(_0x546090!==undefined&&_0x3f6d3b['rHZmZ'](_0x546090,null)&&_0x3f6d3b[_0x34a7a4(0xd5)](_0x546090,''))return{'baseUrl':_0x546090,'source':_0x30adb6};}return{};}export function resolveBaseUrl(_0x463650){const _0x270617={'UDEdU':function(_0x48097e,_0x5da8c8){return _0x48097e(_0x5da8c8);}};return _0x270617['UDEdU'](resolveBaseUrlWithSource,_0x463650)['baseUrl'];}export function resolveStartPath(_0xb983a8){const _0x5b6b1e=_0x12cc,_0x5d60bb={'mLGbY':'startPath','GFcCK':function(_0x52a51b,_0x4c39cd){return _0x52a51b===_0x4c39cd;}},_0xc42079=_0xb983a8[_0x5b6b1e(0xc8)],_0x351741=!!_0xc42079&&_0x5d60bb[_0x5b6b1e(0xc5)]in _0xc42079,_0x2c45c2=_0xc42079?.[_0x5b6b1e(0xcd)],_0x5a59c8=!(_0x351741&&_0x5d60bb[_0x5b6b1e(0xd4)](_0x2c45c2,null));return firstDefined(_0xb983a8[_0x5b6b1e(0xc2)],_0xb983a8['envStartPath'],_0x5d60bb['GFcCK'](typeof _0x2c45c2,'string')?_0x2c45c2:undefined,_0x5a59c8?_0xb983a8['cloudSettings']?.[_0x5b6b1e(0xcd)]:undefined);}export function joinBaseAndPath(_0x3d81fc,_0x3242b0){const _0x50c885=_0x12cc,_0x381d4e={'acxtW':function(_0x13bad6,_0x3aa61c){return _0x13bad6+_0x3aa61c;},'BZLwh':function(_0x4d4dce,_0x4f9f37){return _0x4d4dce+_0x4f9f37;}};if(!_0x3d81fc)return undefined;if(!_0x3242b0)return _0x3d81fc;const _0x11bdd1=_0x3d81fc['endsWith']('/')?_0x3d81fc['slice'](0x0,-0x1):_0x3d81fc,_0x1f84f0=_0x3242b0['startsWith']('/')?_0x3242b0:_0x381d4e['acxtW']('/',_0x3242b0);return _0x381d4e[_0x50c885(0xbc)](_0x11bdd1,_0x1f84f0);}export function resolveProfileUrl(_0x3f7ea3){const _0x5486f8=_0x12cc,_0x3d9503={'bOJAz':function(_0x1d4627,_0x405d4b){return _0x1d4627(_0x405d4b);}},{baseUrl:_0xedeebd,source:_0x309d54}=resolveBaseUrlWithSource(_0x3f7ea3),_0x17c2f0=_0x3d9503[_0x5486f8(0xd1)](resolveStartPath,_0x3f7ea3);return{'baseUrl':_0xedeebd,'baseUrlSource':_0x309d54,'startPath':_0x17c2f0,'url':joinBaseAndPath(_0xedeebd,_0x17c2f0)};}export function readUrlEnvVars(_0x48e224=process['env']){const _0x326897=_0x12cc;return{'envBaseUrl':_0x48e224[_0x326897(0xc3)],'envStartPath':_0x48e224[_0x326897(0xcc)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2f2f71,_0x1c4662){const _0x3907d4=_0x49b4,_0x465970=_0x2f2f71();while(!![]){try{const _0x5be718=-parseInt(_0x3907d4(0x17f))/0x1+parseInt(_0x3907d4(0x17e))/0x2+-parseInt(_0x3907d4(0x188))/0x3*(-parseInt(_0x3907d4(0x180))/0x4)+-parseInt(_0x3907d4(0x17a))/0x5+-parseInt(_0x3907d4(0x182))/0x6*(-parseInt(_0x3907d4(0x17c))/0x7)+parseInt(_0x3907d4(0x17b))/0x8*(-parseInt(_0x3907d4(0x183))/0x9)+parseInt(_0x3907d4(0x181))/0xa;if(_0x5be718===_0x1c4662)break;else _0x465970['push'](_0x465970['shift']());}catch(_0x6f408e){_0x465970['push'](_0x465970['shift']());}}}(_0x43aa,0xae71b));function _0x43aa(){const _0x389201=['658260FaANNi','107765LWsVrh','52srTNXJ','7801010OXjduW','8285262kXSYmn','18QzJHon','\x20failed\x20(attempt\x20','baseDelayMs','label','ms...','36543TiWJxG','5494555PEMsdF','2909048XehDVo','7DQfjzV','EVgfE'];_0x43aa=function(){return _0x389201;};return _0x43aa();}function _0x49b4(_0x5e0987,_0x3ebace){_0x5e0987=_0x5e0987-0x17a;const _0x43aa7d=_0x43aa();let _0x49b48a=_0x43aa7d[_0x5e0987];return _0x49b48a;}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x4ce2de,_0x346620){const _0x375c60=_0x49b4,_0x54b39c={'WVIky':function(_0x3949c8,_0x413931){return _0x3949c8(_0x413931);},'iCwSA':function(_0xf33195,_0x49c5af){return _0xf33195*_0x49c5af;},'EVgfE':function(_0x4c6814,_0x5d6ec1){return _0x4c6814+_0x5d6ec1;}},_0x304063=_0x346620?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x3d9423=_0x346620?.[_0x375c60(0x185)]??DEFAULT_BASE_DELAY_MS;let _0x602ab1;for(let _0x2ca300=0x0;_0x2ca300<=_0x304063;_0x2ca300++){try{return await _0x4ce2de();}catch(_0x1cfcbd){_0x602ab1=_0x1cfcbd instanceof Error?_0x1cfcbd:new Error(_0x54b39c['WVIky'](String,_0x1cfcbd));if(_0x2ca300<_0x304063){const _0x5e6909=_0x54b39c['iCwSA'](_0x3d9423,Math['pow'](0x2,_0x2ca300));_0x346620?.['label']&&console['error'](_0x346620[_0x375c60(0x186)]+_0x375c60(0x184)+(_0x2ca300+0x1)+'/'+_0x54b39c[_0x375c60(0x17d)](_0x304063,0x1)+'),\x20retrying\x20in\x20'+_0x5e6909+_0x375c60(0x187)),await new Promise(_0x5aae27=>setTimeout(_0x5aae27,_0x5e6909));}}}throw _0x602ab1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x449a(_0x1c6fab,_0x1f8cb6){_0x1c6fab=_0x1c6fab-0xc2;const _0x2c6ce6=_0x2c6c();let _0x449add=_0x2c6ce6[_0x1c6fab];return _0x449add;}(function(_0x30753c,_0x263f5a){const _0x3509af=_0x449a,_0x4d9ac7=_0x30753c();while(!![]){try{const _0x120bdf=-parseInt(_0x3509af(0xcc))/0x1+parseInt(_0x3509af(0xc7))/0x2*(parseInt(_0x3509af(0xc3))/0x3)+parseInt(_0x3509af(0xcd))/0x4*(parseInt(_0x3509af(0xca))/0x5)+parseInt(_0x3509af(0xce))/0x6*(parseInt(_0x3509af(0xcf))/0x7)+parseInt(_0x3509af(0xcb))/0x8*(-parseInt(_0x3509af(0xc8))/0x9)+-parseInt(_0x3509af(0xc6))/0xa+parseInt(_0x3509af(0xc4))/0xb;if(_0x120bdf===_0x263f5a)break;else _0x4d9ac7['push'](_0x4d9ac7['shift']());}catch(_0x1c08b5){_0x4d9ac7['push'](_0x4d9ac7['shift']());}}}(_0x2c6c,0xe1916));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x2e7661){const _0x4a0a47=_0x449a,_0x4f12fe=new Set();for(const _0x2a8661 of _0x2e7661[_0x4a0a47(0xc9)](ABSOLUTE_URL_PATTERN)){const _0x10a5bc=_0x2a8661[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x4f12fe['add'](new URL(_0x10a5bc)['origin']);}catch{}}return[..._0x4f12fe];}function _0x2c6c(){const _0x1eb06d=['20mmDKdT','106422misfzW','679OMfryH','filter','729ggnjPU','17917493WNipFM','origin','6907390SvKDjd','1082eAehdO','109485yMrdKZ','matchAll','175105XknOWV','840rWPqJl','763930dOXxLt'];_0x2c6c=function(){return _0x1eb06d;};return _0x2c6c();}export function findScenarioOriginMismatches(_0x36a101,_0x1af85e){const _0x4c75f7=_0x449a;let _0x5bcddc;try{_0x5bcddc=new URL(_0x1af85e)[_0x4c75f7(0xc5)];}catch{return[];}return extractUrlOrigins(_0x36a101)[_0x4c75f7(0xc2)](_0x1aecf2=>_0x1aecf2!==_0x5bcddc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x11e65d=_0x395e;(function(_0x2d7493,_0xf86de9){const _0x4c34bd=_0x395e,_0x114ef8=_0x2d7493();while(!![]){try{const _0x4a3d68=-parseInt(_0x4c34bd(0x11c))/0x1+-parseInt(_0x4c34bd(0x12e))/0x2*(parseInt(_0x4c34bd(0x118))/0x3)+parseInt(_0x4c34bd(0x134))/0x4*(-parseInt(_0x4c34bd(0x127))/0x5)+parseInt(_0x4c34bd(0x123))/0x6*(-parseInt(_0x4c34bd(0x11a))/0x7)+parseInt(_0x4c34bd(0x11d))/0x8*(-parseInt(_0x4c34bd(0x110))/0x9)+-parseInt(_0x4c34bd(0x128))/0xa+parseInt(_0x4c34bd(0x117))/0xb;if(_0x4a3d68===_0xf86de9)break;else _0x114ef8['push'](_0x114ef8['shift']());}catch(_0x3ecb53){_0x114ef8['push'](_0x114ef8['shift']());}}}(_0x2e1c,0x56bcb));import*as _0x110111 from'fs';import*as _0x4b41a8 from'path';import*as _0x105108 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4b41a8['join'](_0x105108[_0x11e65d(0x135)](),_0x11e65d(0x10e),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x24fd0a=_0x11e65d,_0x255ae2={'dPVtL':'utf-8','Drquy':function(_0x311288){return _0x311288();}};try{if(_0x110111['existsSync'](CACHE_FILE)){const _0x25b7d1=JSON[_0x24fd0a(0x115)](_0x110111[_0x24fd0a(0x12f)](CACHE_FILE,_0x255ae2['dPVtL']));return{'version':0x3,'sessions':_0x25b7d1['sessions']||{},'branches':_0x25b7d1['branches']||{},'lastEnabledSessionClearedAt':_0x25b7d1[_0x24fd0a(0x131)]};}}catch{}return _0x255ae2['Drquy'](createEmptyCache);}function saveCache(_0x1271bb){const _0x1de0fa=_0x11e65d;try{const _0x16038b=_0x4b41a8['dirname'](CACHE_FILE);!_0x110111['existsSync'](_0x16038b)&&_0x110111[_0x1de0fa(0x10f)](_0x16038b,{'recursive':!![]}),_0x110111[_0x1de0fa(0x132)](CACHE_FILE,JSON['stringify'](_0x1271bb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3908b1=_0x11e65d,_0x393e3b={'UHxeN':_0x3908b1(0x137),'gEQeC':function(_0x61c4a0,_0x2b7fa7){return _0x61c4a0===_0x2b7fa7;},'WeaTK':'HEAD'};try{const _0xdbaef2=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x3908b1(0x119),'stdio':[_0x393e3b['UHxeN'],_0x393e3b['UHxeN'],'pipe']})[_0x3908b1(0x11b)]();if(!_0xdbaef2||_0x393e3b[_0x3908b1(0x12c)](_0xdbaef2,_0x393e3b['WeaTK']))return null;return _0xdbaef2;}catch{return null;}}export function enableBranch(_0x215f80){const _0x564688=_0x11e65d,_0x54a3b0={'FowNH':function(_0x19fbe5){return _0x19fbe5();},'thxFl':function(_0x23a3af,_0x35d356){return _0x23a3af(_0x35d356);}},_0x4b79a4=_0x54a3b0['FowNH'](loadCache);_0x4b79a4['branches'][_0x215f80]=!![],_0x54a3b0[_0x564688(0x133)](saveCache,_0x4b79a4);}export function disableBranch(_0x4d601e){const _0x3808e6=_0x11e65d,_0x5c620b={'OwEWm':function(_0x4a47d3,_0x5bc8ff){return _0x4a47d3(_0x5bc8ff);}},_0x390919=loadCache();delete _0x390919[_0x3808e6(0x12d)][_0x4d601e],_0x5c620b[_0x3808e6(0x122)](saveCache,_0x390919);}export function isBranchEnabled(_0x323e48){const _0x9e08fb=_0x11e65d,_0x52b395={'LGCtn':function(_0x194fd2,_0x29ea8b){return _0x194fd2===_0x29ea8b;}},_0x47e1ff=loadCache();return _0x52b395[_0x9e08fb(0x113)](_0x47e1ff[_0x9e08fb(0x12d)][_0x323e48],!![]);}function getOrCreateSession(_0x2bb235,_0x255929){const _0x471663=_0x11e65d;return!_0x2bb235[_0x471663(0x125)][_0x255929]&&(_0x2bb235['sessions'][_0x255929]={}),_0x2bb235[_0x471663(0x125)][_0x255929];}export function enableSession(_0x3f2155){const _0x30a179=_0x11e65d,_0x440476={'uGOBU':function(_0x58f741,_0x54622c,_0x5960ce){return _0x58f741(_0x54622c,_0x5960ce);},'ZGgyW':function(_0x5778c9,_0x48ae7c){return _0x5778c9!==_0x48ae7c;}},_0x54e007=loadCache(),_0x53cf12=_0x440476['uGOBU'](getOrCreateSession,_0x54e007,_0x3f2155);_0x53cf12['enabled']=!![];const _0x444b7c=getCurrentBranch();_0x444b7c&&_0x440476[_0x30a179(0x120)](_0x444b7c,'main')&&_0x440476['ZGgyW'](_0x444b7c,_0x30a179(0x10d))&&(_0x54e007['branches'][_0x444b7c]=!![],_0x53cf12[_0x30a179(0x10a)]=_0x444b7c),saveCache(_0x54e007);}export function isSessionEnabled(_0x2ca52b){const _0x16d9b9=_0x11e65d,_0x40a0f4={'sskWz':function(_0x454b1e){return _0x454b1e();},'rEVYN':function(_0x196980,_0x865900){return _0x196980===_0x865900;},'iouBj':function(_0x3b273f,_0x18d913){return _0x3b273f||_0x18d913;}},_0x251dea=loadCache(),_0x24349c=_0x40a0f4['sskWz'](getCurrentBranch);if(!_0x24349c||_0x40a0f4[_0x16d9b9(0x10c)](_0x24349c,'main')||_0x24349c==='master')return _0x251dea['sessions'][_0x2ca52b]?.[_0x16d9b9(0x116)]===!![];const _0x2c1172=_0x251dea[_0x16d9b9(0x12d)][_0x24349c]===!![],_0xffa7c1=_0x251dea[_0x16d9b9(0x125)][_0x2ca52b]?.['enabled']===!![];return _0x40a0f4[_0x16d9b9(0x124)](_0x2c1172,_0xffa7c1);}export function disableSession(_0xf9aff9){const _0x3bfaa4=_0x11e65d,_0x4c181a={'rpXVY':function(_0x3b1de2){return _0x3b1de2();}},_0x238376=_0x4c181a[_0x3bfaa4(0x126)](loadCache),_0x16e528=getOrCreateSession(_0x238376,_0xf9aff9);_0x16e528[_0x3bfaa4(0x116)]=![],saveCache(_0x238376);}export function updateBranchTracking(_0xad482){const _0xfebe08=_0x11e65d,_0x3d3922={'YuPsB':function(_0x5cbe3b){return _0x5cbe3b();},'JmTos':function(_0x585bf9,_0x1ddfdd){return _0x585bf9!==_0x1ddfdd;}},_0x377e23=_0x3d3922['YuPsB'](loadCache),_0x447b28=_0x377e23['sessions'][_0xad482];if(!_0x447b28?.[_0xfebe08(0x116)])return;const _0x15a2a4=getCurrentBranch();if(!_0x15a2a4||_0x15a2a4===_0xfebe08(0x111)||_0x15a2a4===_0xfebe08(0x10d))return;_0x3d3922[_0xfebe08(0x109)](_0x447b28[_0xfebe08(0x10a)],_0x15a2a4)&&(_0x377e23[_0xfebe08(0x12d)][_0x15a2a4]=!![],_0x447b28['currentBranch']=_0x15a2a4,saveCache(_0x377e23));}export function initBranchTracking(_0x14926d){const _0x2b7f9f=_0x11e65d,_0x20ec86={'uULfv':_0x2b7f9f(0x111),'XmQia':function(_0xb404a0,_0xc4e80e){return _0xb404a0===_0xc4e80e;},'riQiY':'master','sQQIz':function(_0x7fe0c0,_0x32c261){return _0x7fe0c0(_0x32c261);}},_0x1bb103=loadCache(),_0xdc9ad6=getCurrentBranch();if(!_0xdc9ad6||_0xdc9ad6===_0x20ec86[_0x2b7f9f(0x136)]||_0x20ec86[_0x2b7f9f(0x12a)](_0xdc9ad6,_0x20ec86['riQiY']))return;if(_0x1bb103['branches'][_0xdc9ad6]===!![]){const _0x5a8272=getOrCreateSession(_0x1bb103,_0x14926d);_0x5a8272['enabled']=!![],_0x5a8272['currentBranch']=_0xdc9ad6,_0x20ec86[_0x2b7f9f(0x130)](saveCache,_0x1bb103);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2cb2fe){const _0x107cb2=_0x11e65d,_0x391e86=loadCache(),_0x5d9555=_0x391e86['sessions'][_0x2cb2fe];_0x5d9555?.[_0x107cb2(0x116)]&&(_0x391e86[_0x107cb2(0x131)]=Date[_0x107cb2(0x10b)](),saveCache(_0x391e86));}export function shouldAutoEnableAfterClear(_0x1e92c9){const _0x13b56=_0x11e65d,_0x134bb5={'eEUls':'clear','fRRBV':function(_0x4ec6b3){return _0x4ec6b3();},'YiZTj':function(_0x384d62,_0x51c17e){return _0x384d62<=_0x51c17e;}};if(_0x1e92c9!==_0x134bb5[_0x13b56(0x11e)])return![];const _0x599bf5=_0x134bb5['fRRBV'](loadCache),_0x353dc4=_0x599bf5['lastEnabledSessionClearedAt'];if(!_0x353dc4)return![];const _0x463b46=Date[_0x13b56(0x10b)]()-_0x353dc4;return _0x134bb5['YiZTj'](_0x463b46,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x59d8ec){const _0x4420c4=_0x11e65d,_0x9ada27={'CdCUK':function(_0x5daa2b){return _0x5daa2b();},'fdNKf':function(_0x355013,_0xe9f45b,_0x157f32){return _0x355013(_0xe9f45b,_0x157f32);},'dUjBO':function(_0x48ea96){return _0x48ea96();},'hWhnW':function(_0x49da8b,_0x351806){return _0x49da8b!==_0x351806;},'KMbYz':function(_0x56e332,_0x4619d5){return _0x56e332(_0x4619d5);}},_0x17f321=_0x9ada27['CdCUK'](loadCache),_0x48c05f=_0x9ada27['fdNKf'](getOrCreateSession,_0x17f321,_0x59d8ec);_0x48c05f[_0x4420c4(0x116)]=!![];const _0x54c0c1=_0x9ada27['dUjBO'](getCurrentBranch);_0x54c0c1&&_0x54c0c1!=='main'&&_0x9ada27['hWhnW'](_0x54c0c1,'master')&&(_0x48c05f[_0x4420c4(0x10a)]=_0x54c0c1),delete _0x17f321[_0x4420c4(0x131)],_0x9ada27['KMbYz'](saveCache,_0x17f321);}export function registerSession(_0x4d5061,_0x545029){const _0x381bec=_0x11e65d,_0x2a4a6c={'LtcwG':function(_0x3b83dd,_0x4ff6f3,_0x8ef33d){return _0x3b83dd(_0x4ff6f3,_0x8ef33d);},'XecfF':function(_0x1b2d84,_0x35f314){return _0x1b2d84(_0x35f314);}},_0x3516fc=loadCache(),_0x1e1332=_0x2a4a6c[_0x381bec(0x114)](getOrCreateSession,_0x3516fc,_0x4d5061);_0x1e1332[_0x381bec(0x129)]=_0x545029,_0x1e1332[_0x381bec(0x12b)]=new Date()['toISOString'](),_0x2a4a6c['XecfF'](saveCache,_0x3516fc);}export function getSessionEntry(_0xf4e34){const _0x1ddf09=_0x11e65d,_0x1d46a4={'qKitK':function(_0x49d633){return _0x49d633();}},_0x2c23bf=_0x1d46a4['qKitK'](loadCache),_0x32ae92=_0x2c23bf[_0x1ddf09(0x125)][_0xf4e34];if(_0x32ae92?.[_0x1ddf09(0x129)]&&_0x32ae92?.[_0x1ddf09(0x12b)])return{'featureId':_0x32ae92[_0x1ddf09(0x129)],'registeredAt':_0x32ae92[_0x1ddf09(0x12b)]};return null;}function _0x395e(_0x305d2b,_0x5722bb){_0x305d2b=_0x305d2b-0x109;const _0x2e1cfe=_0x2e1c();let _0x395e13=_0x2e1cfe[_0x305d2b];return _0x395e13;}export function unregisterSession(_0x2673bf){const _0x467c13=_0x11e65d,_0x44e683=loadCache(),_0x2021cd=_0x44e683['sessions'][_0x2673bf];_0x2021cd&&(delete _0x2021cd[_0x467c13(0x129)],delete _0x2021cd['registeredAt'],saveCache(_0x44e683));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1cde54){const _0x263818=_0x11e65d,_0x56d61d={'zxRtB':function(_0x37027e){return _0x37027e();},'NAQpk':function(_0x3b0984,_0x40d228){return _0x3b0984>=_0x40d228;},'iTflX':function(_0x5b0727,_0x3b52b8){return _0x5b0727(_0x3b52b8);}},_0x100969=_0x56d61d['zxRtB'](loadCache),_0x316124=getOrCreateSession(_0x100969,_0x1cde54),_0x2c14ba=_0x316124['lastPlanReminderAt']||0x0,_0x217078=Date['now']();if(_0x56d61d['NAQpk'](_0x217078-_0x2c14ba,PLAN_REMINDER_INTERVAL_MS))return _0x316124[_0x263818(0x11f)]=_0x217078,_0x56d61d['iTflX'](saveCache,_0x100969),!![];return![];}export function shouldShowStopReminder(_0x146f64){const _0x37b18a=_0x11e65d,_0xd2b2b7={'pUWLX':function(_0x2416c9,_0x1e0225){return _0x2416c9>=_0x1e0225;},'VdRVO':function(_0xa3957b,_0x38c83c){return _0xa3957b-_0x38c83c;}},_0x5e4950=loadCache(),_0x35e39b=getOrCreateSession(_0x5e4950,_0x146f64),_0x16e37a=_0x35e39b[_0x37b18a(0x121)]||0x0,_0x44fa5e=Date['now']();if(_0xd2b2b7['pUWLX'](_0xd2b2b7['VdRVO'](_0x44fa5e,_0x16e37a),STOP_REMINDER_INTERVAL_MS))return _0x35e39b[_0x37b18a(0x121)]=_0x44fa5e,saveCache(_0x5e4950),!![];return![];}export function hasSessionBeenPrompted(_0x2bb3c3){const _0x31cbb6=_0x11e65d,_0x1a0475={'NGJoA':function(_0x4282d4,_0x13036b){return _0x4282d4===_0x13036b;}},_0x233cd8=loadCache();return _0x1a0475['NGJoA'](_0x233cd8[_0x31cbb6(0x125)][_0x2bb3c3]?.['prompted'],!![]);}function _0x2e1c(){const _0x198019=['iouBj','sessions','rpXVY','5Zqtgww','4736230eHYPTc','featureId','XmQia','registeredAt','gEQeC','branches','452RSWiDt','readFileSync','sQQIz','lastEnabledSessionClearedAt','writeFileSync','thxFl','265416YWfYyS','homedir','uULfv','pipe','JmTos','currentBranch','now','rEVYN','master','.claude','mkdirSync','9XOkGEA','main','prompted','LGCtn','LtcwG','parse','enabled','24527888ZVLeXX','2772YFxBIu','utf-8','347641mQZmnb','trim','184980eIdPcB','4744888aIheMH','eEUls','lastPlanReminderAt','ZGgyW','lastStopReminderAt','OwEWm','42mPDOGF'];_0x2e1c=function(){return _0x198019;};return _0x2e1c();}export function markSessionPrompted(_0x481a7c){const _0x1f6206=_0x11e65d,_0x90e29a={'shVdO':function(_0x6f76){return _0x6f76();}},_0x4355eb=_0x90e29a['shVdO'](loadCache),_0x5872b7=getOrCreateSession(_0x4355eb,_0x481a7c);_0x5872b7[_0x1f6206(0x112)]=!![],saveCache(_0x4355eb);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x350438=_0x5ad0;(function(_0xa5967d,_0x59a894){const _0x188054=_0x5ad0,_0xb5859c=_0xa5967d();while(!![]){try{const _0xc09e95=-parseInt(_0x188054(0xa8))/0x1*(-parseInt(_0x188054(0xaa))/0x2)+-parseInt(_0x188054(0xae))/0x3*(parseInt(_0x188054(0x97))/0x4)+-parseInt(_0x188054(0xa1))/0x5*(parseInt(_0x188054(0x9d))/0x6)+-parseInt(_0x188054(0xa2))/0x7+parseInt(_0x188054(0xa0))/0x8+-parseInt(_0x188054(0x78))/0x9+parseInt(_0x188054(0xa9))/0xa;if(_0xc09e95===_0x59a894)break;else _0xb5859c['push'](_0xb5859c['shift']());}catch(_0x27c183){_0xb5859c['push'](_0xb5859c['shift']());}}}(_0x49e3,0xe6b2b));import*as _0x290230 from'fs';import*as _0x4339e7 from'path';import*as _0x197d37 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4339e7['join'](_0x197d37[_0x350438(0x7f)](),_0x350438(0x77),'.ranger_cache.json');function _0x5ad0(_0x506eb5,_0xc6791){_0x506eb5=_0x506eb5-0x73;const _0x49e315=_0x49e3();let _0x5ad07d=_0x49e315[_0x506eb5];return _0x5ad07d;}function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x39d0fb=_0x350438,_0x27047b={'TApWl':'utf-8'};try{if(_0x290230['existsSync'](CACHE_FILE)){const _0x34bdce=JSON[_0x39d0fb(0x88)](_0x290230['readFileSync'](CACHE_FILE,_0x27047b[_0x39d0fb(0x89)]));return{'version':0x3,'sessions':_0x34bdce['sessions']||{},'branches':_0x34bdce[_0x39d0fb(0x94)]||{},'lastEnabledSessionClearedAt':_0x34bdce['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x394596){const _0x2a46ae=_0x350438;try{const _0x1f93c5=_0x4339e7['dirname'](CACHE_FILE);!_0x290230[_0x2a46ae(0x7d)](_0x1f93c5)&&_0x290230['mkdirSync'](_0x1f93c5,{'recursive':!![]}),_0x290230['writeFileSync'](CACHE_FILE,JSON[_0x2a46ae(0x90)](_0x394596,null,0x2));}catch{}}export function getCurrentBranch(){const _0x500364=_0x350438,_0x3b7759={'WZcqq':function(_0x5b405d,_0x9e3a79,_0x1db648){return _0x5b405d(_0x9e3a79,_0x1db648);},'KszcV':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','wKKUk':'pipe','tzlTI':function(_0x47d463,_0x1746a6){return _0x47d463===_0x1746a6;},'LxxjH':_0x500364(0x86)};try{const _0x348a18=_0x3b7759['WZcqq'](execSync,_0x3b7759['KszcV'],{'encoding':'utf-8','stdio':[_0x3b7759[_0x500364(0x9c)],_0x500364(0x9f),_0x3b7759['wKKUk']]})[_0x500364(0x99)]();if(!_0x348a18||_0x3b7759['tzlTI'](_0x348a18,_0x3b7759['LxxjH']))return null;return _0x348a18;}catch{return null;}}export function enableBranch(_0x51c9c5){const _0x25724c=_0x350438,_0x5633a3={'BZEnw':function(_0x4d4ed4,_0x445885){return _0x4d4ed4(_0x445885);}},_0x5aef75=loadCache();_0x5aef75[_0x25724c(0x94)][_0x51c9c5]=!![],_0x5633a3[_0x25724c(0x8d)](saveCache,_0x5aef75);}export function disableBranch(_0x43832e){const _0x4e3ded={'CMeQT':function(_0x11b313){return _0x11b313();}},_0x240d49=_0x4e3ded['CMeQT'](loadCache);delete _0x240d49['branches'][_0x43832e],saveCache(_0x240d49);}export function isBranchEnabled(_0x495992){const _0x4b2ab3=_0x350438,_0x1dde43={'cxrQs':function(_0x2bae13){return _0x2bae13();},'qNpWx':function(_0x285e73,_0x4f5ca8){return _0x285e73===_0x4f5ca8;}},_0x5d2b07=_0x1dde43['cxrQs'](loadCache);return _0x1dde43[_0x4b2ab3(0x9e)](_0x5d2b07[_0x4b2ab3(0x94)][_0x495992],!![]);}function getOrCreateSession(_0x3ee803,_0x1fa952){const _0x4d180f=_0x350438;return!_0x3ee803['sessions'][_0x1fa952]&&(_0x3ee803['sessions'][_0x1fa952]={}),_0x3ee803[_0x4d180f(0x82)][_0x1fa952];}export function enableSession(_0x13a183){const _0x4da960=_0x350438,_0x568621={'NNVsx':function(_0xc74351){return _0xc74351();}},_0x182b61=_0x568621['NNVsx'](loadCache),_0x18c515=getOrCreateSession(_0x182b61,_0x13a183);_0x18c515[_0x4da960(0x95)]=!![];const _0x5e01fa=getCurrentBranch();_0x5e01fa&&_0x5e01fa!==_0x4da960(0x7a)&&_0x5e01fa!==_0x4da960(0x75)&&(_0x182b61['branches'][_0x5e01fa]=!![],_0x18c515[_0x4da960(0x98)]=_0x5e01fa),saveCache(_0x182b61);}export function isSessionEnabled(_0x4f17c5){const _0xae3c34=_0x350438,_0x1b3bee={'oiwkB':function(_0x1e47cb){return _0x1e47cb();},'qZyqq':function(_0x5e3ea6,_0x353089){return _0x5e3ea6===_0x353089;},'xpKyr':'master','nmfWL':function(_0x9a641f,_0x15b471){return _0x9a641f===_0x15b471;},'DLipz':function(_0x157b1d,_0x49e1e3){return _0x157b1d||_0x49e1e3;}},_0x370c5a=_0x1b3bee[_0xae3c34(0x93)](loadCache),_0x26c0a4=getCurrentBranch();if(!_0x26c0a4||_0x1b3bee[_0xae3c34(0xa3)](_0x26c0a4,'main')||_0x1b3bee[_0xae3c34(0xa3)](_0x26c0a4,_0x1b3bee[_0xae3c34(0x76)]))return _0x370c5a[_0xae3c34(0x82)][_0x4f17c5]?.['enabled']===!![];const _0x1c97e0=_0x1b3bee[_0xae3c34(0xa3)](_0x370c5a['branches'][_0x26c0a4],!![]),_0x4e9bc2=_0x1b3bee[_0xae3c34(0xa7)](_0x370c5a[_0xae3c34(0x82)][_0x4f17c5]?.[_0xae3c34(0x95)],!![]);return _0x1b3bee['DLipz'](_0x1c97e0,_0x4e9bc2);}export function disableSession(_0x47ef29){const _0xd809c=_0x350438,_0x40e0ca={'xPRPO':function(_0x42ec60){return _0x42ec60();},'KVxpz':function(_0x7cd1b2,_0x4968aa,_0x1e0eaf){return _0x7cd1b2(_0x4968aa,_0x1e0eaf);}},_0x2a0633=_0x40e0ca['xPRPO'](loadCache),_0x462105=_0x40e0ca[_0xd809c(0x96)](getOrCreateSession,_0x2a0633,_0x47ef29);_0x462105['enabled']=![],saveCache(_0x2a0633);}export function updateBranchTracking(_0x41d34f){const _0x28af64=_0x350438,_0xaf39f9={'bcDbO':function(_0x2b46aa){return _0x2b46aa();},'zVHYQ':function(_0x108b6f,_0x15db06){return _0x108b6f===_0x15db06;},'Xirgf':_0x28af64(0x7a),'xdDkO':'master','mWAzt':function(_0x13272b,_0x11e892){return _0x13272b!==_0x11e892;},'yFSOh':function(_0x2b917b,_0xc1378a){return _0x2b917b(_0xc1378a);}},_0x2262e4=loadCache(),_0x9a754c=_0x2262e4['sessions'][_0x41d34f];if(!_0x9a754c?.[_0x28af64(0x95)])return;const _0x4d1206=_0xaf39f9['bcDbO'](getCurrentBranch);if(!_0x4d1206||_0xaf39f9[_0x28af64(0x9b)](_0x4d1206,_0xaf39f9['Xirgf'])||_0x4d1206===_0xaf39f9[_0x28af64(0x84)])return;_0xaf39f9['mWAzt'](_0x9a754c[_0x28af64(0x98)],_0x4d1206)&&(_0x2262e4[_0x28af64(0x94)][_0x4d1206]=!![],_0x9a754c['currentBranch']=_0x4d1206,_0xaf39f9[_0x28af64(0xad)](saveCache,_0x2262e4));}export function initBranchTracking(_0x5bcd53){const _0x2ce2e3=_0x350438,_0x539ae6={'jiokQ':function(_0x2dcc11){return _0x2dcc11();},'JGmiT':function(_0x43c0bc){return _0x43c0bc();},'oQjBb':function(_0x179300,_0x2b0d65){return _0x179300===_0x2b0d65;},'HsDrM':'main','IvZvi':function(_0x149d77,_0x14681d){return _0x149d77===_0x14681d;},'DnetN':function(_0x126384,_0xf05809,_0x5ac364){return _0x126384(_0xf05809,_0x5ac364);},'siSGa':function(_0x28507f,_0x9641cc){return _0x28507f(_0x9641cc);}},_0x29924a=_0x539ae6[_0x2ce2e3(0x9a)](loadCache),_0x5cac09=_0x539ae6[_0x2ce2e3(0x80)](getCurrentBranch);if(!_0x5cac09||_0x539ae6[_0x2ce2e3(0xa5)](_0x5cac09,_0x539ae6[_0x2ce2e3(0x83)])||_0x5cac09==='master')return;if(_0x539ae6['IvZvi'](_0x29924a['branches'][_0x5cac09],!![])){const _0x516cd0=_0x539ae6['DnetN'](getOrCreateSession,_0x29924a,_0x5bcd53);_0x516cd0['enabled']=!![],_0x516cd0['currentBranch']=_0x5cac09,_0x539ae6[_0x2ce2e3(0x7e)](saveCache,_0x29924a);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5208a7){const _0x26ba03=_0x350438,_0x5aaab1=loadCache(),_0x465556=_0x5aaab1['sessions'][_0x5208a7];_0x465556?.[_0x26ba03(0x95)]&&(_0x5aaab1[_0x26ba03(0x85)]=Date[_0x26ba03(0xa4)](),saveCache(_0x5aaab1));}export function shouldAutoEnableAfterClear(_0x6edfb6){const _0x167573=_0x350438,_0xf537f4={'zgZcI':function(_0x2e7cb8,_0x2c7edf){return _0x2e7cb8!==_0x2c7edf;},'paBZO':function(_0x46d542){return _0x46d542();},'xQwxP':function(_0x256d06,_0x483d54){return _0x256d06-_0x483d54;}};if(_0xf537f4['zgZcI'](_0x6edfb6,'clear'))return![];const _0x4f5b17=_0xf537f4[_0x167573(0x91)](loadCache),_0xd68a53=_0x4f5b17['lastEnabledSessionClearedAt'];if(!_0xd68a53)return![];const _0xb51f85=_0xf537f4[_0x167573(0x79)](Date[_0x167573(0xa4)](),_0xd68a53);return _0xb51f85<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x49e3(){const _0x484b5b=['oQjBb','fPYPG','nmfWL','1123047CYQcvl','13847850XtbzBe','2rMpIhP','pNicd','orgHf','yFSOh','356964WQwQEI','QWEQF','lastPlanReminderAt','master','xpKyr','.claude','13646394mYAaUi','xQwxP','main','lastStopReminderAt','toISOString','existsSync','siSGa','homedir','JGmiT','jGayd','sessions','HsDrM','xdDkO','lastEnabledSessionClearedAt','HEAD','RlXfD','parse','TApWl','DsFiN','prompted','JweYZ','BZEnw','featureId','registeredAt','stringify','paBZO','YNFll','oiwkB','branches','enabled','KVxpz','4TsWwTy','currentBranch','trim','jiokQ','zVHYQ','wKKUk','6uVxjuX','qNpWx','pipe','7712672JhgZZk','3831185fEawsz','878402fxQLpD','qZyqq','now'];_0x49e3=function(){return _0x484b5b;};return _0x49e3();}export function autoEnableAfterClear(_0x47f275){const _0x126300=_0x350438,_0x8e5f6c={'DsFiN':function(_0x39955a){return _0x39955a();},'JweYZ':function(_0x497c35,_0x266f48){return _0x497c35!==_0x266f48;},'Ushro':_0x126300(0x75)},_0x425409=loadCache(),_0x549fcd=getOrCreateSession(_0x425409,_0x47f275);_0x549fcd['enabled']=!![];const _0x14df00=_0x8e5f6c[_0x126300(0x8a)](getCurrentBranch);_0x14df00&&_0x8e5f6c[_0x126300(0x8c)](_0x14df00,'main')&&_0x8e5f6c[_0x126300(0x8c)](_0x14df00,_0x8e5f6c['Ushro'])&&(_0x549fcd['currentBranch']=_0x14df00),delete _0x425409['lastEnabledSessionClearedAt'],saveCache(_0x425409);}export function registerSession(_0x24f1b9,_0x53ecc6){const _0x2d0ebe=_0x350438,_0x50f6f0={'kqANE':function(_0x1d82d4){return _0x1d82d4();}},_0x1f0673=_0x50f6f0['kqANE'](loadCache),_0x18114b=getOrCreateSession(_0x1f0673,_0x24f1b9);_0x18114b['featureId']=_0x53ecc6,_0x18114b[_0x2d0ebe(0x8f)]=new Date()[_0x2d0ebe(0x7c)](),saveCache(_0x1f0673);}export function getSessionEntry(_0x292c3d){const _0x2ea648=_0x350438,_0x952230=loadCache(),_0xcca0d3=_0x952230[_0x2ea648(0x82)][_0x292c3d];if(_0xcca0d3?.['featureId']&&_0xcca0d3?.['registeredAt'])return{'featureId':_0xcca0d3[_0x2ea648(0x8e)],'registeredAt':_0xcca0d3[_0x2ea648(0x8f)]};return null;}export function unregisterSession(_0xd2459){const _0x49b7d4=_0x350438,_0x6aba96={'spmDO':function(_0x836049,_0x517b49){return _0x836049(_0x517b49);}},_0x326346=loadCache(),_0x50bdc5=_0x326346['sessions'][_0xd2459];_0x50bdc5&&(delete _0x50bdc5[_0x49b7d4(0x8e)],delete _0x50bdc5['registeredAt'],_0x6aba96['spmDO'](saveCache,_0x326346));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3db49f){const _0x12f45a=_0x350438,_0x3fc60a={'mCWYt':function(_0x31b48a,_0x56287e,_0x187dd1){return _0x31b48a(_0x56287e,_0x187dd1);},'orgHf':function(_0x10280d,_0x4788da){return _0x10280d>=_0x4788da;},'dPonR':function(_0x30d1ac,_0x3497c6){return _0x30d1ac-_0x3497c6;},'fPYPG':function(_0x286f0e,_0x3aaeeb){return _0x286f0e(_0x3aaeeb);}},_0x2f8053=loadCache(),_0x2c9d36=_0x3fc60a['mCWYt'](getOrCreateSession,_0x2f8053,_0x3db49f),_0x4ae64e=_0x2c9d36[_0x12f45a(0x74)]||0x0,_0x1f29b6=Date['now']();if(_0x3fc60a[_0x12f45a(0xac)](_0x3fc60a['dPonR'](_0x1f29b6,_0x4ae64e),PLAN_REMINDER_INTERVAL_MS))return _0x2c9d36['lastPlanReminderAt']=_0x1f29b6,_0x3fc60a[_0x12f45a(0xa6)](saveCache,_0x2f8053),!![];return![];}export function shouldShowStopReminder(_0x54da46){const _0x4ad610=_0x350438,_0x382dd7={'RlXfD':function(_0x1d1bff,_0x303d26,_0x26c9df){return _0x1d1bff(_0x303d26,_0x26c9df);},'jGayd':function(_0x418f5f,_0x45840d){return _0x418f5f>=_0x45840d;},'pNicd':function(_0x1dcbba,_0x4c6877){return _0x1dcbba(_0x4c6877);}},_0x66180d=loadCache(),_0x57d2d7=_0x382dd7[_0x4ad610(0x87)](getOrCreateSession,_0x66180d,_0x54da46),_0x5a4db4=_0x57d2d7['lastStopReminderAt']||0x0,_0x22bb96=Date['now']();if(_0x382dd7[_0x4ad610(0x81)](_0x22bb96-_0x5a4db4,STOP_REMINDER_INTERVAL_MS))return _0x57d2d7[_0x4ad610(0x7b)]=_0x22bb96,_0x382dd7[_0x4ad610(0xab)](saveCache,_0x66180d),!![];return![];}export function hasSessionBeenPrompted(_0x1d8f0d){const _0xd4bbbd=_0x350438,_0x46a204={'YNFll':function(_0x175684){return _0x175684();},'QWEQF':function(_0x4b0bc0,_0x24c83b){return _0x4b0bc0===_0x24c83b;}},_0x835d41=_0x46a204[_0xd4bbbd(0x92)](loadCache);return _0x46a204[_0xd4bbbd(0x73)](_0x835d41[_0xd4bbbd(0x82)][_0x1d8f0d]?.[_0xd4bbbd(0x8b)],!![]);}export function markSessionPrompted(_0x14e9bf){const _0x15c2c7={'QguZo':function(_0x35bcd7){return _0x35bcd7();},'kWBCI':function(_0x3ca993,_0x3fc286){return _0x3ca993(_0x3fc286);}},_0x4f434e=_0x15c2c7['QguZo'](loadCache),_0x4d0ef1=getOrCreateSession(_0x4f434e,_0x14e9bf);_0x4d0ef1['prompted']=!![],_0x15c2c7['kWBCI'](saveCache,_0x4f434e);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2efe12=_0x4f98;(function(_0x4cce18,_0x1a0dcd){const _0x2af609=_0x4f98,_0xfc811e=_0x4cce18();while(!![]){try{const _0x22f0cb=parseInt(_0x2af609(0xc6))/0x1+parseInt(_0x2af609(0x120))/0x2*(parseInt(_0x2af609(0x12b))/0x3)+-parseInt(_0x2af609(0xcc))/0x4*(parseInt(_0x2af609(0x126))/0x5)+parseInt(_0x2af609(0xec))/0x6+parseInt(_0x2af609(0xd2))/0x7*(parseInt(_0x2af609(0xf6))/0x8)+parseInt(_0x2af609(0x137))/0x9*(parseInt(_0x2af609(0x11a))/0xa)+-parseInt(_0x2af609(0xd3))/0xb;if(_0x22f0cb===_0x1a0dcd)break;else _0xfc811e['push'](_0xfc811e['shift']());}catch(_0x23fa4e){_0xfc811e['push'](_0xfc811e['shift']());}}}(_0x456a,0x5bd93));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x4f27e6,_0x4d7f80){const _0x268efe=_0x4f98,_0x2b4e9c={'NbPRq':function(_0x327e69,_0x38bd15,_0x4aaa86,_0x39561a){return _0x327e69(_0x38bd15,_0x4aaa86,_0x39561a);},'ukeVl':function(_0x13779b,_0x48cd72,_0x2c0323,_0x688747){return _0x13779b(_0x48cd72,_0x2c0323,_0x688747);},'rYEzm':'local','rHIOK':function(_0x216a64,_0x882b5e,_0x5a33ed){return _0x216a64(_0x882b5e,_0x5a33ed);},'XDNMV':function(_0x4e5764,_0x312266){return _0x4e5764(_0x312266);},'EaVcU':function(_0x432142,_0x2bd0c2){return _0x432142(_0x2bd0c2);},'LGapJ':function(_0x8775d8,_0x3e9a8b){return _0x8775d8(_0x3e9a8b);}},_0x26ba0e=_0x2b4e9c[_0x268efe(0xe0)](join,_0x4d7f80,'ci',_0x4f27e6),_0x3de0e3=_0x2b4e9c['ukeVl'](join,_0x4d7f80,'local',_0x4f27e6),_0x248a75=join(_0x4d7f80,_0x4f27e6),_0x41024b=join(_0x4d7f80,_0x2b4e9c[_0x268efe(0xe2)]),_0x7c904b=_0x2b4e9c[_0x268efe(0x10d)](join,_0x4d7f80,'ci');if(_0x2b4e9c[_0x268efe(0x10c)](existsSync,_0x26ba0e))return _0x26ba0e;if(_0x2b4e9c['EaVcU'](existsSync,_0x3de0e3))return _0x3de0e3;if(_0x2b4e9c['EaVcU'](existsSync,_0x248a75)&&(_0x248a75!==_0x41024b&&_0x248a75!==_0x7c904b?!![]:_0x2b4e9c[_0x268efe(0xc5)](hasLegacyProfileFiles,_0x248a75)))return _0x248a75;return null;}export function getEnvDir(_0xe5b590,_0x42fd3d={}){const _0x5294de=_0x4f98,_0x3b5c05={'cTJFV':function(_0x285106,_0x1a9f9e,_0x687da8){return _0x285106(_0x1a9f9e,_0x687da8);},'McUgm':function(_0x1f6e7e,_0x29b107){return _0x1f6e7e(_0x29b107);},'zzHwk':function(_0x543ce9){return _0x543ce9();},'GhJVU':function(_0x8cc3ca,_0x10d6a8){return _0x8cc3ca!==_0x10d6a8;},'DRXhy':function(_0x1d0ab3,_0xb17345,_0x2e0d65){return _0x1d0ab3(_0xb17345,_0x2e0d65);},'PERaF':function(_0x1bf988,_0x344171,_0x224308){return _0x1bf988(_0x344171,_0x224308);}},_0x3d0c96=getRangerDir(),_0x407168=_0x3b5c05['cTJFV'](findEnvInRoot,_0xe5b590,_0x3d0c96);if(_0x407168){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x407168))throw _0x3b5c05['cTJFV'](legacyWriteError,_0xe5b590,_0x407168);return _0x407168;}const _0x369ed1=_0x3b5c05[_0x5294de(0x119)](getRangerHomeDir);if(_0x3b5c05[_0x5294de(0xde)](_0x369ed1,_0x3d0c96)){const _0x532be2=_0x3b5c05[_0x5294de(0x13d)](findEnvInRoot,_0xe5b590,_0x369ed1);if(_0x532be2){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x532be2))throw _0x3b5c05['PERaF'](legacyWriteError,_0xe5b590,_0x532be2);return _0x532be2;}}const _0x41e874=join(_0x369ed1,'local',_0xe5b590);if(_0x42fd3d['forWrite'])throw legacyWriteError(_0xe5b590,_0x41e874);return _0x41e874;}function isLegacyEnvPath(_0x2946e5){const _0x22cbe8=_0x4f98,_0x3d9b46={'LPFpF':function(_0xf3966b){return _0xf3966b();}},_0x4fe29e=getRangerDir(),_0x1bdc68=_0x3d9b46[_0x22cbe8(0xea)](getRangerHomeDir);for(const _0x4a1ced of new Set([_0x4fe29e,_0x1bdc68])){const _0x268662=_0x4a1ced['endsWith']('/')?_0x4a1ced:_0x4a1ced+'/';if(_0x2946e5===_0x4a1ced||_0x2946e5['startsWith'](_0x268662))return!![];}return![];}function legacyWriteError(_0x266280,_0x178ee3){const _0x47caf3=_0x4f98,_0x22c47c={'leFhX':function(_0x545a7c,_0x529022){return _0x545a7c+_0x529022;}};return new Error(_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x47caf3(0x125)+_0x266280+'\x22\x20to\x20legacy\x20path\x20'+_0x178ee3+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x47caf3(0x107)));}export function findExistingEnv(_0x1efc44,_0x4eaa64){const _0x599ba4=_0x4f98,_0x39ed1f={'dZOyk':'legacy','VjPMO':_0x599ba4(0xdf),'ikwfx':function(_0x2749cf,_0x39804d,_0x2c73ba){return _0x2749cf(_0x39804d,_0x2c73ba);},'EYauh':function(_0x4a8b5a,_0x19687c){return _0x4a8b5a(_0x19687c);},'LyXaj':function(_0x5e3de6,_0x400cde){return _0x5e3de6===_0x400cde;}},_0x2fe412=_0x4eaa64?.['rangerDir'],_0x2c6bc7=_0x2fe412?[_0x2fe412]:[getRangerDir(),getRangerHomeDir()][_0x599ba4(0x102)]((_0x248382,_0xd5801b,_0x134151)=>_0x134151[_0x599ba4(0xf5)](_0x248382)===_0xd5801b),_0x19a6e1=_0x4eaa64?.['locations']??['ci','local',_0x39ed1f['dZOyk']];for(const _0x162e00 of _0x2c6bc7){const _0x235b29=join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)]),_0x15d844=_0x39ed1f['ikwfx'](join,_0x162e00,'ci'),_0x4fce9d=[{'location':'ci','path':join(_0x162e00,'ci',_0x1efc44)},{'location':_0x39ed1f['VjPMO'],'path':join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)],_0x1efc44)},{'location':_0x599ba4(0xc3),'path':join(_0x162e00,_0x1efc44)}];for(const _0x2a81f1 of _0x4fce9d){if(_0x19a6e1['includes'](_0x2a81f1[_0x599ba4(0xc4)])&&_0x39ed1f[_0x599ba4(0xcd)](existsSync,_0x2a81f1['path'])){if(_0x2a81f1[_0x599ba4(0xc4)]==='legacy'&&(_0x39ed1f[_0x599ba4(0xed)](_0x2a81f1['path'],_0x235b29)||_0x2a81f1[_0x599ba4(0x114)]===_0x15d844)&&!_0x39ed1f['EYauh'](hasLegacyProfileFiles,_0x2a81f1[_0x599ba4(0x114)]))continue;return{'path':_0x2a81f1['path'],'location':_0x2a81f1['location']};}}}return null;}function hasLegacyProfileFiles(_0x4679ec){const _0x13dbfe=_0x4f98,_0x573c7f={'xynbG':function(_0x5f255c,_0x14b051){return _0x5f255c(_0x14b051);},'cNPKq':function(_0x3beb42,_0x164a5c,_0x2b933d){return _0x3beb42(_0x164a5c,_0x2b933d);},'ixrhD':_0x13dbfe(0xcf),'IbZaV':_0x13dbfe(0xef),'QjDSq':function(_0x223d5e,_0x542bf6){return _0x223d5e(_0x542bf6);},'PeUWT':function(_0x256783,_0x3a549f,_0x9f10c0){return _0x256783(_0x3a549f,_0x9f10c0);}};return _0x573c7f['xynbG'](existsSync,_0x573c7f[_0x13dbfe(0xf7)](join,_0x4679ec,_0x573c7f[_0x13dbfe(0x116)]))||_0x573c7f['xynbG'](existsSync,join(_0x4679ec,_0x573c7f['IbZaV']))||_0x573c7f[_0x13dbfe(0xfa)](existsSync,_0x573c7f['PeUWT'](join,_0x4679ec,_0x13dbfe(0x135)));}export function isEnvCi(_0xc26f37){const _0x192899=_0x4f98,_0x3a7d4d={'HqEBI':function(_0x59a181,_0x2a2dec){return _0x59a181(_0x2a2dec);},'FmEPf':function(_0x5bbc38,_0x126041,_0x318a53,_0x31b957){return _0x5bbc38(_0x126041,_0x318a53,_0x31b957);},'cPCmu':function(_0x6e0d9d){return _0x6e0d9d();},'ZgjUl':function(_0x15cce6){return _0x15cce6();}};if(_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,getRangerDir(),'ci',_0xc26f37)))return!![];const _0x514bca=_0x3a7d4d['cPCmu'](getRangerHomeDir);if(_0x514bca!==_0x3a7d4d[_0x192899(0x118)](getRangerDir)&&_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,_0x514bca,'ci',_0xc26f37)))return!![];return![];}function _0x4f98(_0x53bf3f,_0x34ca5d){_0x53bf3f=_0x53bf3f-0xc2;const _0x456a2d=_0x456a();let _0x4f986e=_0x456a2d[_0x53bf3f];return _0x4f986e;}export async function cleanupTempFiles(_0x926b09){const _0x2c739d=_0x4f98,_0x995d6={'slDlP':function(_0x310d66,_0x146cc6){return _0x310d66!==_0x146cc6;},'cVtuu':_0x2c739d(0x123)},_0x5393f6=[_0x926b09[_0x2c739d(0x130)],_0x926b09['configPath']]['filter'](Boolean);await Promise['all'](_0x5393f6['map'](_0x16e2d1=>unlink(_0x16e2d1)[_0x2c739d(0xf0)](_0xea7daf=>{const _0x169c13=_0x2c739d;_0x995d6['slDlP'](_0xea7daf['code'],_0x995d6[_0x169c13(0x133)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x16e2d1+':',_0xea7daf['message']);})));}export function getSettingsPath(_0x2e0357){const _0x53df0d=_0x4f98,_0x5b0007={'SQWBg':function(_0x3c8b3c,_0x1c168,_0x21a27e){return _0x3c8b3c(_0x1c168,_0x21a27e);}};return _0x5b0007[_0x53df0d(0xe8)](join,getEnvDir(_0x2e0357),_0x53df0d(0xcf));}export async function loadSettings(_0x185291){const _0x55fb83=_0x4f98,_0x413928={'gzYYs':_0x55fb83(0x11d)},_0x2b9bfd=getSettingsPath(_0x185291);if(!existsSync(_0x2b9bfd))return{};try{const _0x456464=await readFile(_0x2b9bfd,_0x413928[_0x55fb83(0xe6)]);return JSON['parse'](_0x456464);}catch{return{};}}export async function saveSettings(_0x48cca6,_0x192b00){const _0x4d3614=_0x4f98,_0x2c8e00={'KNKcD':function(_0x5c6774,_0x495781){return _0x5c6774(_0x495781);}},_0x4e74de=_0x2c8e00[_0x4d3614(0x101)](getSettingsPath,_0x48cca6),_0x22d93c=dirname(_0x4e74de);!_0x2c8e00[_0x4d3614(0x101)](existsSync,_0x22d93c)&&await mkdir(_0x22d93c,{'recursive':!![]}),await writeFile(_0x4e74de,JSON['stringify'](_0x192b00,null,0x2));}export function resolveEnvVars(_0x3c843a){const _0x2589cf=_0x4f98,_0x1cd64d={'FQaxk':function(_0x48969e,_0x32674e){return _0x48969e===_0x32674e;}};if(typeof _0x3c843a==='string')return _0x3c843a[_0x2589cf(0xd5)](/\$\{(\w+)\}/g,(_0x215240,_0x2b8288)=>{const _0x44fcef=_0x2589cf,_0x4938df=process['env'][_0x2b8288];if(_0x1cd64d[_0x44fcef(0xd7)](_0x4938df,undefined))throw new Error(_0x44fcef(0xc8)+_0x2b8288+_0x44fcef(0x105));return _0x4938df;});if(Array[_0x2589cf(0xeb)](_0x3c843a))return _0x3c843a['map'](resolveEnvVars);if(_0x3c843a&&typeof _0x3c843a==='object')return Object['fromEntries'](Object[_0x2589cf(0x108)](_0x3c843a)['map'](([_0x322727,_0x281a6e])=>[_0x322727,resolveEnvVars(_0x281a6e)]));return _0x3c843a;}const isRecord=_0x8389e7=>typeof _0x8389e7==='object'&&_0x8389e7!==null&&!Array[_0x2efe12(0xeb)](_0x8389e7),asRecord=_0x5d8561=>isRecord(_0x5d8561)?_0x5d8561:undefined,mergeHeaders=(_0xed83f5,_0x492f0e)=>{const _0x1f2767={'ZBjmL':function(_0x16d8b7,_0x59bbe9){return _0x16d8b7??_0x59bbe9;}},_0x50901f={..._0xed83f5??{},..._0x1f2767['ZBjmL'](_0x492f0e,{})};return Object['keys'](_0x50901f)['length']?_0x50901f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x2efe12(0xd4),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];function _0x456a(){const _0x1623eb=['ixrhD','flIwp','ZgjUl','zzHwk','1609330rxhtGv','allow','LduLW','utf-8','WlSFc','VjPMO','906BrpIrY','now','iITNM','ENOENT','contextOptions','Refusing\x20to\x20write\x20profile\x20\x22','5fOpQwK','install','push','headers','playwright-cli','1359ihwuvc','tQQTr','setupHeader','ZcoFu','safeMode','tempAuthPath','IBIOA','--disable-setuid-sandbox','cVtuu','HqEBI','auth.json.enc','headless','18uTfoVs','message','IxeKT','nCuSr','clipboard-read','UtLPn','DRXhy','JDyfY','chromium','ujmpu','includes','setupHeaders','legacy','location','LGapJ','674799ITiiYT','Default','Environment\x20variable\x20','TBNBh','--no-sandbox','FkMdO','1566332xPjwOD','EYauh','browser','settings.json','object','RwhYd','4528447GxmHYs','12839563KPUiHr','--allow-running-insecure-content','replace','aLMIH','FQaxk','cdpEndpoint','vision','baseUrl','eKWse','launchOptions','.json','GhJVU','local','NbPRq','string','rYEzm','executablePath','HzhzC','stagehand','gzYYs','-cli','SQWBg','JdiSh','LPFpF','isArray','517392EtYOOl','LyXaj','args','auth.json','catch','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','QhUMq','XvwMk','indexOf','8zWpTaw','cNPKq','RkIDe','userAgent','QjDSq','hSKzE','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','GrwbO','leFhX','none','pdf','KNKcD','filter','clipboard-write','iWGdK','\x20is\x20not\x20set','length','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','entries','extraHTTPHeaders','wFhQS','tZpwY','XDNMV','rHIOK','tYYKy','forWrite','UoEHo','enoSZ','core','hxywE','path','AiTti'];_0x456a=function(){return _0x1623eb;};return _0x456a();}export function buildBrowserOptionsFromSettings(_0x23d04c,_0x34e748={}){const _0x35f233=_0x2efe12,_0xcba57a={'CmgpZ':function(_0x15b203,_0x775ed9){return _0x15b203(_0x775ed9);},'bVTup':'boolean','chDaI':function(_0x628a59,_0x32539b){return _0x628a59(_0x32539b);},'IpNhr':function(_0x4e542d,_0x3228f2){return _0x4e542d===_0x3228f2;},'UtLPn':function(_0x226a64,_0x456df3,_0x3c9514){return _0x226a64(_0x456df3,_0x3c9514);}},_0x3f4570=asRecord(_0x23d04c[_0x35f233(0xce)]),_0x3a2cc8={..._0xcba57a['CmgpZ'](asRecord,_0x3f4570?.[_0x35f233(0xdc)])??{}};typeof _0x34e748['headless']===_0xcba57a['bVTup']&&(_0x3a2cc8[_0x35f233(0x136)]=_0x34e748['headless']);if(_0x23d04c[_0x35f233(0x12f)]){const _0x106fb1=_0x3a2cc8['args']??[],_0x599f14=SAFE_MODE_ARGS[_0x35f233(0x102)](_0x143252=>!_0x106fb1[_0x35f233(0x141)](_0x143252));_0x3a2cc8[_0x35f233(0xee)]=[..._0x106fb1,..._0x599f14];}if(_0x23d04c['allowInsecureLocalhost']){const _0x3cc908=_0x3a2cc8[_0x35f233(0xee)]??[],_0x53067b=ALLOW_LOCALHOST_ARGS['filter'](_0xe86aeb=>!_0x3cc908['includes'](_0xe86aeb));_0x3a2cc8['args']=[..._0x3cc908,..._0x53067b];}const _0x137966={..._0xcba57a['chDaI'](asRecord,_0x3f4570?.['contextOptions'])??{}};_0x137966['ignoreHTTPSErrors']=!![];_0xcba57a['IpNhr'](typeof _0x23d04c['userAgent'],_0x35f233(0xe1))&&(_0x137966[_0x35f233(0xf9)]=_0x23d04c[_0x35f233(0xf9)]);const _0x5d4afa=_0xcba57a[_0x35f233(0x13c)](mergeHeaders,asRecord(_0x137966['extraHTTPHeaders']),_0xcba57a['CmgpZ'](asRecord,_0x23d04c[_0x35f233(0x129)]));return _0x5d4afa?_0x137966['extraHTTPHeaders']=_0x5d4afa:delete _0x137966['extraHTTPHeaders'],_0x34e748['storageStatePath']&&(_0x137966[_0x35f233(0xf2)]=_0x34e748['storageStatePath']),{'launchOptions':_0x3a2cc8,'contextOptions':_0x137966};}export async function resolveProfileStorageState(_0x3faf0e){const _0x4f3844=_0x2efe12,_0x394d30={'JDyfY':function(_0x51f0d8,_0x30c0bf){return _0x51f0d8(_0x30c0bf);}};return resolveLocalAuthPath(_0x394d30[_0x4f3844(0x13e)](getEnvDir,_0x3faf0e));}async function resolveLocalAuthPath(_0x55415d){const _0x4032b0=_0x2efe12,_0x1b14a9={'AiTti':function(_0x303d13,_0x1f5941,_0x3a35ed){return _0x303d13(_0x1f5941,_0x3a35ed);},'hmdlM':_0x4032b0(0xfc),'iWGdK':function(_0x4cb965,_0xf12445){return _0x4cb965(_0xf12445);},'UoEHo':function(_0x83217b,_0x5736ba,_0x46833f){return _0x83217b(_0x5736ba,_0x46833f);},'IulPd':function(_0x19dced){return _0x19dced();},'tMbXE':function(_0x29cd01,_0x29de28){return _0x29cd01(_0x29de28);}},_0x2f6594=_0x1b14a9[_0x4032b0(0x115)](join,_0x55415d,'auth.json.enc'),_0x912593=join(_0x55415d,_0x4032b0(0xef));if(existsSync(_0x2f6594))try{const _0x5bea6e=await getToken();if(!_0x5bea6e)throw new Error(_0x1b14a9['hmdlM']);const _0x5058d7=await _0x1b14a9[_0x4032b0(0x104)](readFile,_0x2f6594),_0x258d66=_0x1b14a9['AiTti'](decrypt,_0x5058d7,_0x5bea6e),_0x43808a=_0x1b14a9[_0x4032b0(0x110)](join,_0x1b14a9['IulPd'](tmpdir),'ranger-auth-'+Date[_0x4032b0(0x121)]()+'.json');return await _0x1b14a9[_0x4032b0(0x115)](writeFile,_0x43808a,_0x258d66),{'storageStatePath':_0x43808a,'tempAuthPath':_0x43808a};}catch(_0xc3007e){const _0x473732=_0xc3007e instanceof Error?_0xc3007e[_0x4032b0(0x138)]:_0x1b14a9[_0x4032b0(0x104)](String,_0xc3007e);throw new Error(_0x4032b0(0xf1)+_0x473732);}if(_0x1b14a9['tMbXE'](existsSync,_0x912593))return{'storageStatePath':_0x912593};return{};}export async function buildPlaywrightConfig(_0x365784,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x156300){const _0x3dc9f6=_0x2efe12,_0x387ba5={'GrwbO':function(_0x218c0f,_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12){return _0x218c0f(_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12);},'jdsSu':function(_0x2427c8,_0x460e20){return _0x2427c8(_0x460e20);},'PVAuc':_0x3dc9f6(0xe5)};if(_0x156300)return _0x387ba5[_0x3dc9f6(0xfd)](buildPlaywrightConfigCore,_0x365784,_0x156300,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x3dc9f6(0xe5));const {storageStatePath:_0x1db940,tempAuthPath:_0x36a65f}=await _0x387ba5['jdsSu'](resolveLocalAuthPath,getEnvDir(_0x2f6c9d));try{const _0x4f4a2b=await buildPlaywrightConfigCore(_0x365784,_0x1db940,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x387ba5['PVAuc']);return{..._0x4f4a2b,'tempAuthPath':_0x36a65f};}catch(_0x358c44){_0x36a65f&&await unlink(_0x36a65f)[_0x3dc9f6(0xf0)](()=>{});throw _0x358c44;}}export async function buildPlaywrightConfigCore(_0x4b8cab,_0x29c0e4,_0x437097,_0xa45710,_0xdcbc92,_0x18b194=_0x2efe12(0xe5)){const _0x4dcf29=_0x2efe12,_0x1d6913={'LduLW':function(_0x1dd8f7,_0x247864){return _0x1dd8f7===_0x247864;},'frnpK':'--disable-setuid-sandbox','HzhzC':'clipboard-write','uUqUC':function(_0x2851c1,_0x5b549c){return _0x2851c1(_0x5b549c);},'sdhFj':_0x4dcf29(0x13f),'hSKzE':'playwright-cli','TBNBh':_0x4dcf29(0xff),'prviW':_0x4dcf29(0x100),'QIZNC':_0x4dcf29(0x11b),'tZpwY':function(_0x4a1742,_0x3f68b7){return _0x4a1742===_0x3f68b7;},'iITNM':function(_0x2f80cc,_0x4e3a37,_0xbd84a0){return _0x2f80cc(_0x4e3a37,_0xbd84a0);},'Ygcbh':function(_0x2114ab){return _0x2114ab();},'dUmow':function(_0x435af3,_0x21ef0a,_0x1b92c7){return _0x435af3(_0x21ef0a,_0x1b92c7);}},_0x50a131=_0xa45710||randomUUID(),_0xa47f94=join(getRangerDir(),'sessions',_0x50a131),_0x111f3c=_0x1d6913['uUqUC'](Boolean,_0x4b8cab[_0x4dcf29(0xd8)]),_0x58effe=_0x111f3c?{'browserName':_0x1d6913['sdhFj'],'cdpEndpoint':_0x4b8cab['cdpEndpoint']}:((()=>{const _0x35db36=_0x4dcf29,{launchOptions:_0x20331c,contextOptions:_0x4e57ae}=buildBrowserOptionsFromSettings(_0x4b8cab,{'headless':_0xdcbc92?![]:_0x4b8cab['headless']??!![],'storageStatePath':_0x29c0e4});if(_0x1d6913['LduLW'](process['getuid']?.(),0x0)){const _0x35a998=['--no-sandbox',_0x1d6913['frnpK']],_0x249db7=_0x20331c['args']??[],_0x4dc7a2=_0x35a998[_0x35db36(0x102)](_0x4c2ec8=>!_0x249db7['includes'](_0x4c2ec8));_0x20331c['args']=[..._0x249db7,..._0x4dc7a2];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20331c,'contextOptions':{..._0x4e57ae,'permissions':[_0x35db36(0x13b),_0x1d6913[_0x35db36(0xe4)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1900b7=_0x18b194===_0x1d6913['hSKzE']?{'browser':_0x58effe,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94,'outputMode':'file','codegen':_0x1d6913[_0x4dcf29(0xc9)]}:{'name':_0x437097,'browser':_0x58effe,'capabilities':[_0x4dcf29(0x112),'tabs',_0x4dcf29(0x127),_0x1d6913['prviW'],_0x4dcf29(0xd9)],'imageResponses':_0x1d6913['QIZNC'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94};if(!_0x111f3c){const _0x2a7da0=_0x1900b7[_0x4dcf29(0xce)],_0x5926ac=_0x2a7da0[_0x4dcf29(0x124)];if(_0x1d6913[_0x4dcf29(0x11c)](_0x5926ac[_0x4dcf29(0xf9)],undefined))delete _0x5926ac[_0x4dcf29(0xf9)];if(_0x1d6913[_0x4dcf29(0x10b)](_0x5926ac[_0x4dcf29(0xf2)],undefined))delete _0x5926ac[_0x4dcf29(0xf2)];}const _0x42853a=_0x1d6913['iITNM'](join,_0x1d6913['Ygcbh'](tmpdir),'ranger-config');!existsSync(_0x42853a)&&await _0x1d6913['dUmow'](mkdir,_0x42853a,{'recursive':!![]});const _0x1d1740=_0x18b194===_0x1d6913[_0x4dcf29(0xfb)]?_0x4dcf29(0xe7):'',_0x4cf92c=join(_0x42853a,_0x437097+'-'+Date[_0x4dcf29(0x121)]()+_0x1d1740+_0x4dcf29(0xdd));return await _0x1d6913[_0x4dcf29(0x122)](writeFile,_0x4cf92c,JSON['stringify'](_0x1900b7,null,0x2)),{'configPath':_0x4cf92c,'storageStatePath':_0x29c0e4};}export async function buildPlaywrightCliConfig(_0x5ab2d1,_0x1706c3,_0x5c7667,_0x5922b1,_0x54ccf6){const _0x26e0e9=_0x2efe12,_0x35789e={'JdiSh':function(_0x647fa2,_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44){return _0x647fa2(_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44);},'ZcoFu':function(_0x470b69,_0x3e35c3){return _0x470b69(_0x3e35c3);}};if(_0x54ccf6)return _0x35789e[_0x26e0e9(0xe9)](buildPlaywrightConfigCore,_0x5ab2d1,_0x54ccf6,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));const {storageStatePath:_0x563358,tempAuthPath:_0x329e90}=await resolveLocalAuthPath(_0x35789e[_0x26e0e9(0x12e)](getEnvDir,_0x1706c3));try{const _0x881362=await buildPlaywrightConfigCore(_0x5ab2d1,_0x563358,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));return{..._0x881362,'tempAuthPath':_0x329e90};}catch(_0x45ff16){_0x329e90&&await unlink(_0x329e90)[_0x26e0e9(0xf0)](()=>{});throw _0x45ff16;}}export async function buildRangerwrightCliConfig(_0x228678,_0x2e1de2,_0x3ccbd6,_0x43e9d4,_0x17821d){const _0x25d139=_0x2efe12,_0x1c79d9={'RkIDe':function(_0x267a78,_0x468417,_0x442e99){return _0x267a78(_0x468417,_0x442e99);},'eifzM':function(_0x55dcff,_0x4ba2cd){return _0x55dcff===_0x4ba2cd;},'cwdSy':_0x25d139(0x132),'QhUMq':function(_0xc6be8e){return _0xc6be8e();},'wFhQS':_0x25d139(0x13f),'aLMIH':function(_0x441fa7,_0x1cc20f){return _0x441fa7===_0x1cc20f;},'WlSFc':function(_0x500577,_0x99679f,_0x5e4c12){return _0x500577(_0x99679f,_0x5e4c12);},'enoSZ':function(_0x455eb0,_0x5b71ae){return _0x455eb0(_0x5b71ae);}},{storageStatePath:_0x1679ac,tempAuthPath:_0xf8f932}=_0x17821d?{'storageStatePath':_0x17821d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x2e1de2)),_0xa6257=_0x3ccbd6||_0x1c79d9[_0x25d139(0xf3)](randomUUID),_0x5070aa=join(getRangerDir(),'sessions',_0xa6257),_0x38abaf=Boolean(_0x228678[_0x25d139(0xd8)]),_0x286e20=_0x38abaf?{'browserName':_0x1c79d9[_0x25d139(0x10a)],'cdpEndpoint':_0x228678['cdpEndpoint']}:((()=>{const _0xdc2191=_0x25d139,{launchOptions:_0xec42f8,contextOptions:_0xea3dc4}=_0x1c79d9['RkIDe'](buildBrowserOptionsFromSettings,_0x228678,{'headless':_0x43e9d4?![]:_0x228678['headless']??!![],'storageStatePath':_0x1679ac});if(_0x1c79d9['eifzM'](process['getuid']?.(),0x0)){const _0x340bd8=[_0xdc2191(0xca),_0x1c79d9['cwdSy']],_0x64aa1f=_0xec42f8[_0xdc2191(0xee)]??[],_0xdf2ab4=_0x340bd8['filter'](_0x2f9a80=>!_0x64aa1f[_0xdc2191(0x141)](_0x2f9a80));_0xec42f8[_0xdc2191(0xee)]=[..._0x64aa1f,..._0xdf2ab4];}return{'browserName':'chromium','launchOptions':_0xec42f8,'contextOptions':{..._0xea3dc4,'permissions':[_0xdc2191(0x13b),_0xdc2191(0x103)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x38abaf){const _0x543287=_0x286e20[_0x25d139(0x124)];if(_0x543287){if(_0x1c79d9[_0x25d139(0xd6)](_0x543287['userAgent'],undefined))delete _0x543287[_0x25d139(0xf9)];if(_0x543287['storageState']===undefined)delete _0x543287[_0x25d139(0xf2)];}}const _0x55f378={'browser':_0x286e20,'outputDir':_0x5070aa,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x43610b;try{const _0x10a669=join(tmpdir(),'ranger-config');!existsSync(_0x10a669)&&await _0x1c79d9[_0x25d139(0xf8)](mkdir,_0x10a669,{'recursive':!![]}),_0x43610b=join(_0x10a669,_0x2e1de2+'-'+Date['now']()+'-rangerwright.json'),await _0x1c79d9[_0x25d139(0x11e)](writeFile,_0x43610b,JSON['stringify'](_0x55f378,null,0x2));}catch(_0x4a0950){_0xf8f932&&await _0x1c79d9[_0x25d139(0x111)](unlink,_0xf8f932)[_0x25d139(0xf0)](()=>{});throw _0x4a0950;}return{'configPath':_0x43610b,'storageStatePath':_0x1679ac,'tempAuthPath':_0xf8f932,'outputDir':_0x5070aa};}export async function buildNovaActCliConfig(_0x244995,_0x50f2d8,_0x32a907,_0x51fd5f,_0x40e4fa){const _0x448094=_0x2efe12,_0xeb34bf={'gKTUk':function(_0x3bf451){return _0x3bf451();},'flIwp':function(_0x27b4d2,_0x14ce4b,_0x442c84,_0x5c3d6c){return _0x27b4d2(_0x14ce4b,_0x442c84,_0x5c3d6c);},'gUpfb':'sessions','danKp':function(_0x4676fa,_0x4a9bef){return _0x4676fa===_0x4a9bef;},'tQQTr':_0x448094(0xe1),'ILkDd':function(_0xbaf075,_0x193da2){return _0xbaf075(_0x193da2);},'FkMdO':function(_0x2ba6b2,_0x311f90){return _0x2ba6b2===_0x311f90;},'IBIOA':function(_0x21d558,_0x1cd6b0){return _0x21d558(_0x1cd6b0);}},{storageStatePath:_0x48cf87,tempAuthPath:_0x3c408a}=_0x40e4fa?{'storageStatePath':_0x40e4fa,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x50f2d8)),_0x590b1b=_0x32a907||_0xeb34bf['gKTUk'](randomUUID),_0x380317=_0xeb34bf[_0x448094(0x117)](join,_0xeb34bf['gKTUk'](getRangerDir),_0xeb34bf['gUpfb'],_0x590b1b),_0x3316c4=join(_0x380317,'nova-user-data'),_0x180e0=_0x48cf87?join(_0x3316c4,_0x448094(0xc7)):undefined,{launchOptions:_0x306c94,contextOptions:_0x32719c}=buildBrowserOptionsFromSettings(_0x244995,{'headless':_0x51fd5f?![]:_0x244995['headless']??!![],'storageStatePath':_0x48cf87});if(_0xeb34bf['danKp'](process['getuid']?.(),0x0)){const _0x521453=['--no-sandbox','--disable-setuid-sandbox'],_0xca97b5=_0x306c94[_0x448094(0xee)]??[],_0xd9eff9=_0x521453['filter'](_0x512318=>!_0xca97b5['includes'](_0x512318));_0x306c94['args']=[..._0xca97b5,..._0xd9eff9];}const _0x501d62=typeof _0x306c94[_0x448094(0xe3)]===_0xeb34bf[_0x448094(0x12c)]?_0x306c94['executablePath']:_0x48cf87?chromium['executablePath']():undefined;return{'storageStatePath':_0x48cf87,'tempAuthPath':_0x3c408a,'baseUrl':_0x244995[_0x448094(0xda)],'headless':_0xeb34bf['ILkDd'](Boolean,_0x306c94[_0x448094(0x136)]),'userDataDir':_0x3316c4,'browserProfilePath':_0x180e0,'executablePath':_0x501d62,'launchArgs':Array[_0x448094(0xeb)](_0x306c94['args'])?_0x306c94['args']['filter'](_0x5108e1=>typeof _0x5108e1==='string'):[],'userAgent':_0xeb34bf[_0x448094(0xcb)](typeof _0x32719c['userAgent'],'string')?_0x32719c['userAgent']:undefined,'extraHTTPHeaders':_0x32719c[_0x448094(0x109)],'allowInsecureLocalhost':Boolean(_0x244995['allowInsecureLocalhost']),'safeMode':Boolean(_0x244995['safeMode']),'cdpEndpoint':_0x244995[_0x448094(0xd8)],'isCdpMode':_0xeb34bf[_0x448094(0x131)](Boolean,_0x244995[_0x448094(0xd8)])};}export function getNestedValue(_0x3740ac,_0x2d64e6){const _0x230aeb=_0x2efe12,_0x27c812={'IxeKT':_0x230aeb(0xd0)},_0x38dddb=parseKeyPath(_0x2d64e6);let _0x4ad453=_0x3740ac;for(const _0x24c6cb of _0x38dddb){if(_0x4ad453===null||_0x4ad453===undefined||typeof _0x4ad453!==_0x27c812[_0x230aeb(0x139)])return undefined;_0x4ad453=_0x4ad453[_0x24c6cb];}return _0x4ad453;}export function setNestedValue(_0x376f59,_0x2dada0,_0x628804){const _0x303173=_0x2efe12,_0xc50cea={'HANAJ':function(_0x30270a,_0x3ba5d1){return _0x30270a-_0x3ba5d1;},'RwhYd':function(_0x21d9df,_0x71506f){return _0x21d9df in _0x71506f;},'wAojq':function(_0x112826,_0x427502){return _0x112826!==_0x427502;}},_0x42a068=parseKeyPath(_0x2dada0);let _0x51a4a6=_0x376f59;for(let _0x4ab765=0x0;_0x4ab765<_0xc50cea['HANAJ'](_0x42a068[_0x303173(0x106)],0x1);_0x4ab765++){const _0x4dba43=_0x42a068[_0x4ab765];(!_0xc50cea[_0x303173(0xd1)](_0x4dba43,_0x51a4a6)||_0xc50cea['wAojq'](typeof _0x51a4a6[_0x4dba43],'object'))&&(_0x51a4a6[_0x4dba43]={}),_0x51a4a6=_0x51a4a6[_0x4dba43];}_0x51a4a6[_0x42a068[_0x42a068['length']-0x1]]=_0x628804;}export function deleteNestedValue(_0x5f2727,_0x1e470d){const _0xa5dcd1=_0x2efe12,_0x1ed13b={'eKWse':function(_0x1dc368,_0x838f4e){return _0x1dc368(_0x838f4e);},'DWEVU':function(_0x3d2ce3,_0x22eee3){return _0x3d2ce3-_0x22eee3;},'sRmEv':function(_0x4c823f,_0x2787d4){return _0x4c823f===_0x2787d4;},'hxywE':_0xa5dcd1(0xd0),'tYYKy':function(_0x113de0,_0x35c170){return _0x113de0!==_0x35c170;}},_0x4fa44e=_0x1ed13b[_0xa5dcd1(0xdb)](parseKeyPath,_0x1e470d);let _0x104dd5=_0x5f2727;for(let _0x1246fc=0x0;_0x1246fc<_0x1ed13b['DWEVU'](_0x4fa44e[_0xa5dcd1(0x106)],0x1);_0x1246fc++){if(_0x1ed13b['sRmEv'](_0x104dd5,null)||_0x104dd5===undefined||typeof _0x104dd5!==_0x1ed13b['hxywE'])return![];_0x104dd5=_0x104dd5[_0x4fa44e[_0x1246fc]];}if(_0x104dd5===null||_0x104dd5===undefined||_0x1ed13b[_0xa5dcd1(0x10e)](typeof _0x104dd5,_0x1ed13b[_0xa5dcd1(0x113)]))return![];const _0x25a78d=_0x4fa44e[_0x4fa44e[_0xa5dcd1(0x106)]-0x1];if(_0x25a78d in _0x104dd5)return delete _0x104dd5[_0x25a78d],!![];return![];}function parseKeyPath(_0x4c8bf4){const _0x429f3a=_0x2efe12,_0x2c4b5a={'TJnRy':function(_0x151cf4,_0x5a41df){return _0x151cf4===_0x5a41df;},'nCuSr':'header','ujmpu':'headers','jupKg':_0x429f3a(0xc2)},_0x2ae4c7=_0x4c8bf4['split']('.');return _0x2c4b5a['TJnRy'](_0x2ae4c7[0x0],_0x2c4b5a[_0x429f3a(0x13a)])&&(_0x2ae4c7[0x0]=_0x2c4b5a[_0x429f3a(0x140)]),_0x2ae4c7[0x0]===_0x429f3a(0x12d)&&(_0x2ae4c7[0x0]=_0x2c4b5a['jupKg']),_0x2ae4c7;}export function formatSettings(_0x30287f,_0x1b3ed7=0x0){const _0x5334ef=_0x2efe12,_0x2a538b={'XvwMk':function(_0xb1f33f,_0x4aced6){return _0xb1f33f===_0x4aced6;},'mOeNq':'object'},_0x1ac219=[],_0x1ff680='\x20\x20'['repeat'](_0x1b3ed7);for(const [_0x3318b1,_0x4e2aad]of Object[_0x5334ef(0x108)](_0x30287f)){if(_0x2a538b[_0x5334ef(0xf4)](_0x4e2aad,undefined))continue;if(typeof _0x4e2aad===_0x2a538b['mOeNq']&&_0x4e2aad!==null){_0x1ac219['push'](''+_0x1ff680+_0x3318b1+':');for(const [_0x301574,_0x471abd]of Object[_0x5334ef(0x108)](_0x4e2aad)){_0x1ac219['push'](_0x1ff680+'\x20\x20'+_0x301574+':\x20'+_0x471abd);}}else _0x1ac219[_0x5334ef(0x128)](''+_0x1ff680+_0x3318b1+':\x20'+_0x4e2aad);}return _0x1ac219['join']('\x0a');}
|
|
1
|
+
const _0xa4002b=_0x2cd7;(function(_0x358084,_0x3e80c0){const _0x59ccd1=_0x2cd7,_0x29e33f=_0x358084();while(!![]){try{const _0x4a71f5=parseInt(_0x59ccd1(0x169))/0x1*(parseInt(_0x59ccd1(0x106))/0x2)+-parseInt(_0x59ccd1(0x11f))/0x3+parseInt(_0x59ccd1(0xff))/0x4+parseInt(_0x59ccd1(0x14d))/0x5+parseInt(_0x59ccd1(0xfd))/0x6*(parseInt(_0x59ccd1(0x147))/0x7)+-parseInt(_0x59ccd1(0x103))/0x8+-parseInt(_0x59ccd1(0x10c))/0x9;if(_0x4a71f5===_0x3e80c0)break;else _0x29e33f['push'](_0x29e33f['shift']());}catch(_0x2ec395){_0x29e33f['push'](_0x29e33f['shift']());}}}(_0x4515,0x29d16));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x2cd7(_0x450024,_0x2cea47){_0x450024=_0x450024-0xf2;const _0x4515d8=_0x4515();let _0x2cd708=_0x4515d8[_0x450024];return _0x2cd708;}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(_0x3e2089,_0x2240d8){const _0x10b978=_0x2cd7,_0x45dbd5={'CtMsv':function(_0x5daf13,_0x41d4e1,_0x151e04){return _0x5daf13(_0x41d4e1,_0x151e04);},'ntqGM':function(_0x3e15db,_0x174e90,_0x4a9eba){return _0x3e15db(_0x174e90,_0x4a9eba);},'jodRC':function(_0x55a439,_0x3b56a8){return _0x55a439(_0x3b56a8);}},_0x31be1a=join(_0x2240d8,'ci',_0x3e2089),_0x5a87c0=join(_0x2240d8,_0x10b978(0x114),_0x3e2089),_0x7adfb5=_0x45dbd5['CtMsv'](join,_0x2240d8,_0x3e2089),_0x1aba7c=_0x45dbd5[_0x10b978(0x149)](join,_0x2240d8,_0x10b978(0x114)),_0x1e6d92=join(_0x2240d8,'ci');if(_0x45dbd5[_0x10b978(0x14b)](existsSync,_0x31be1a))return _0x31be1a;if(_0x45dbd5[_0x10b978(0x14b)](existsSync,_0x5a87c0))return _0x5a87c0;if(existsSync(_0x7adfb5)&&(_0x7adfb5!==_0x1aba7c&&_0x7adfb5!==_0x1e6d92?!![]:hasLegacyProfileFiles(_0x7adfb5)))return _0x7adfb5;return null;}export function getEnvDir(_0x3de6e8,_0x175f36={}){const _0xf5ae65=_0x2cd7,_0x54f461={'abVfi':function(_0x5e3432){return _0x5e3432();},'mrlkl':function(_0x359352,_0x202e63){return _0x359352!==_0x202e63;},'NSwxG':function(_0x5138a7,_0x362108){return _0x5138a7(_0x362108);},'ACjhA':function(_0x4bfaf7,_0x242f05,_0x3d0af4){return _0x4bfaf7(_0x242f05,_0x3d0af4);},'tBXao':function(_0x1b7cae,_0x174379,_0x2bc34b,_0x4ad41e){return _0x1b7cae(_0x174379,_0x2bc34b,_0x4ad41e);},'MPFWO':_0xf5ae65(0x114)},_0x2e615a=_0x54f461[_0xf5ae65(0x152)](getRangerDir),_0xcb2e6e=findEnvInRoot(_0x3de6e8,_0x2e615a);if(_0xcb2e6e){if(_0x175f36[_0xf5ae65(0x141)]&&isLegacyEnvPath(_0xcb2e6e))throw legacyWriteError(_0x3de6e8,_0xcb2e6e);return _0xcb2e6e;}const _0x402da8=getRangerHomeDir();if(_0x54f461['mrlkl'](_0x402da8,_0x2e615a)){const _0x4399f4=findEnvInRoot(_0x3de6e8,_0x402da8);if(_0x4399f4){if(_0x175f36[_0xf5ae65(0x141)]&&_0x54f461[_0xf5ae65(0x104)](isLegacyEnvPath,_0x4399f4))throw _0x54f461['ACjhA'](legacyWriteError,_0x3de6e8,_0x4399f4);return _0x4399f4;}}const _0x2d5dc6=_0x54f461['tBXao'](join,_0x402da8,_0x54f461[_0xf5ae65(0x113)],_0x3de6e8);if(_0x175f36[_0xf5ae65(0x141)])throw legacyWriteError(_0x3de6e8,_0x2d5dc6);return _0x2d5dc6;}function isLegacyEnvPath(_0x594417){const _0x2062cd=_0x2cd7,_0x187562={'tEqHq':function(_0x362b41){return _0x362b41();},'GeiRx':function(_0x106935,_0x52aeb3){return _0x106935+_0x52aeb3;},'AlmQo':function(_0x1765c8,_0x322590){return _0x1765c8===_0x322590;}},_0x1aebaf=getRangerDir(),_0x3edc1f=_0x187562[_0x2062cd(0x16e)](getRangerHomeDir);for(const _0x4e08ab of new Set([_0x1aebaf,_0x3edc1f])){const _0x36b5ce=_0x4e08ab[_0x2062cd(0x139)]('/')?_0x4e08ab:_0x187562['GeiRx'](_0x4e08ab,'/');if(_0x187562[_0x2062cd(0x15a)](_0x594417,_0x4e08ab)||_0x594417[_0x2062cd(0x12e)](_0x36b5ce))return!![];}return![];}function legacyWriteError(_0x5b9a78,_0x2f0cf9){const _0x1035f6=_0x2cd7,_0x7fc0ad={'zYtlB':function(_0x38f049,_0x1aca2a){return _0x38f049+_0x1aca2a;}};return new Error(_0x7fc0ad[_0x1035f6(0x157)](_0x1035f6(0x132)+_0x5b9a78+'\x22\x20to\x20legacy\x20path\x20'+_0x2f0cf9+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x79617e,_0x9e04e0){const _0x30220c=_0x2cd7,_0x1e6f7e={'aKcwl':function(_0x1e2539){return _0x1e2539();},'zwznx':function(_0x3adbca){return _0x3adbca();},'sjhdZ':_0x30220c(0x114),'PMDeQ':function(_0x3fec38,_0x3ce2a7,_0x1569be){return _0x3fec38(_0x3ce2a7,_0x1569be);},'loUxj':function(_0x38d1b2,_0x2e1147,_0x26841e,_0x73ae48){return _0x38d1b2(_0x2e1147,_0x26841e,_0x73ae48);},'nHhPA':function(_0x4f561f,_0x91c1a4,_0xcf9178,_0x2344fe){return _0x4f561f(_0x91c1a4,_0xcf9178,_0x2344fe);},'OutFd':function(_0xab6c0f,_0x5682a9){return _0xab6c0f===_0x5682a9;},'PLfoD':function(_0x24bfc1,_0xe5881e){return _0x24bfc1===_0xe5881e;}},_0x4a0b6a=_0x9e04e0?.['rangerDir'],_0x1e01b1=_0x4a0b6a?[_0x4a0b6a]:[_0x1e6f7e['aKcwl'](getRangerDir),_0x1e6f7e['zwznx'](getRangerHomeDir)][_0x30220c(0x140)]((_0x3fadaa,_0x500d1e,_0x39a207)=>_0x39a207['indexOf'](_0x3fadaa)===_0x500d1e),_0x1878dc=_0x9e04e0?.['locations']??['ci',_0x1e6f7e[_0x30220c(0x166)],'legacy'];for(const _0x435858 of _0x1e01b1){const _0x1dbda8=join(_0x435858,'local'),_0x5ac536=_0x1e6f7e['PMDeQ'](join,_0x435858,'ci'),_0x2ae82f=[{'location':'ci','path':_0x1e6f7e[_0x30220c(0x131)](join,_0x435858,'ci',_0x79617e)},{'location':_0x30220c(0x114),'path':_0x1e6f7e['nHhPA'](join,_0x435858,'local',_0x79617e)},{'location':_0x30220c(0x168),'path':_0x1e6f7e[_0x30220c(0x127)](join,_0x435858,_0x79617e)}];for(const _0x37355d of _0x2ae82f){if(_0x1878dc['includes'](_0x37355d['location'])&&existsSync(_0x37355d[_0x30220c(0x155)])){if(_0x1e6f7e['OutFd'](_0x37355d[_0x30220c(0x150)],_0x30220c(0x168))&&(_0x1e6f7e['PLfoD'](_0x37355d[_0x30220c(0x155)],_0x1dbda8)||_0x37355d['path']===_0x5ac536)&&!hasLegacyProfileFiles(_0x37355d['path']))continue;return{'path':_0x37355d['path'],'location':_0x37355d[_0x30220c(0x150)]};}}}return null;}function hasLegacyProfileFiles(_0x37074c){const _0x5a8b0c=_0x2cd7,_0x31d0a4={'yNsri':function(_0x2f3c1f,_0x49c794){return _0x2f3c1f(_0x49c794);},'SmVuk':function(_0x25baf6,_0x2f22ca,_0x3c000d){return _0x25baf6(_0x2f22ca,_0x3c000d);},'CVgPE':'auth.json','xSelV':function(_0x3f01bf,_0x9db4b4){return _0x3f01bf(_0x9db4b4);},'AlNsJ':_0x5a8b0c(0x16a)};return _0x31d0a4[_0x5a8b0c(0x112)](existsSync,_0x31d0a4['SmVuk'](join,_0x37074c,_0x5a8b0c(0x10f)))||existsSync(join(_0x37074c,_0x31d0a4['CVgPE']))||_0x31d0a4['xSelV'](existsSync,join(_0x37074c,_0x31d0a4[_0x5a8b0c(0x137)]));}export function isEnvCi(_0x50f114){const _0x4a943e={'WWCWK':function(_0xfc2830,_0x3ef9cc){return _0xfc2830(_0x3ef9cc);},'cXYRO':function(_0x4a8cea,_0x1b1ee0,_0x1d9e3a,_0x5bafa9){return _0x4a8cea(_0x1b1ee0,_0x1d9e3a,_0x5bafa9);},'Llwkm':function(_0x56e151,_0x5756d8){return _0x56e151!==_0x5756d8;},'Leebi':function(_0x217464){return _0x217464();}};if(_0x4a943e['WWCWK'](existsSync,_0x4a943e['cXYRO'](join,getRangerDir(),'ci',_0x50f114)))return!![];const _0x57edb7=getRangerHomeDir();if(_0x4a943e['Llwkm'](_0x57edb7,_0x4a943e['Leebi'](getRangerDir))&&existsSync(join(_0x57edb7,'ci',_0x50f114)))return!![];return![];}export async function cleanupTempFiles(_0x99b193){const _0x5a253b=_0x2cd7,_0x2bf0ad={'UcSRf':function(_0x4f2c6b,_0x442aa2){return _0x4f2c6b!==_0x442aa2;}},_0x20b9e6=[_0x99b193['tempAuthPath'],_0x99b193['configPath']][_0x5a253b(0x140)](Boolean);await Promise[_0x5a253b(0x101)](_0x20b9e6['map'](_0x69d4e5=>unlink(_0x69d4e5)[_0x5a253b(0x134)](_0x2767b4=>{const _0x126bac=_0x5a253b;_0x2bf0ad['UcSRf'](_0x2767b4['code'],'ENOENT')&&console[_0x126bac(0x120)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x69d4e5+':',_0x2767b4[_0x126bac(0x15d)]);})));}export function getSettingsPath(_0x13217c){const _0x55062e=_0x2cd7,_0x511fb5={'ecJRi':_0x55062e(0x10f)};return join(getEnvDir(_0x13217c),_0x511fb5[_0x55062e(0x13f)]);}export async function loadSettings(_0x344c2e){const _0x40cc1d=_0x2cd7,_0x515277={'nximI':function(_0x1bf948,_0x442a54){return _0x1bf948(_0x442a54);},'scBIe':'utf-8'},_0x6cc621=_0x515277['nximI'](getSettingsPath,_0x344c2e);if(!existsSync(_0x6cc621))return{};try{const _0x16e3ae=await readFile(_0x6cc621,_0x515277['scBIe']);return JSON[_0x40cc1d(0x153)](_0x16e3ae);}catch{return{};}}export async function saveSettings(_0x5ddda4,_0x45437c){const _0x300f00=_0x2cd7,_0x549832={'tjwKv':function(_0x2e620b,_0x1224b0){return _0x2e620b(_0x1224b0);},'XWpzd':function(_0x26e605,_0x104db0,_0x1b5d32){return _0x26e605(_0x104db0,_0x1b5d32);}},_0x4ac5bb=_0x549832[_0x300f00(0x123)](getSettingsPath,_0x5ddda4),_0xcb6445=_0x549832[_0x300f00(0x123)](dirname,_0x4ac5bb);!existsSync(_0xcb6445)&&await _0x549832[_0x300f00(0x100)](mkdir,_0xcb6445,{'recursive':!![]}),await writeFile(_0x4ac5bb,JSON[_0x300f00(0xf5)](_0x45437c,null,0x2));}export function resolveEnvVars(_0x182ead){const _0x3cea17=_0x2cd7,_0x12539f={'sVwMJ':function(_0x1a4684,_0x4d2bf9){return _0x1a4684===_0x4d2bf9;},'KjKXd':'string','IMnzB':function(_0xc05033,_0x130153){return _0xc05033===_0x130153;},'nTDoD':_0x3cea17(0x12c)};if(_0x12539f['sVwMJ'](typeof _0x182ead,_0x12539f[_0x3cea17(0x128)]))return _0x182ead['replace'](/\$\{(\w+)\}/g,(_0x307e32,_0x126eac)=>{const _0x2fafa3=_0x3cea17,_0x9ea222=process['env'][_0x126eac];if(_0x9ea222===undefined)throw new Error(_0x2fafa3(0x111)+_0x126eac+_0x2fafa3(0x126));return _0x9ea222;});if(Array[_0x3cea17(0x10b)](_0x182ead))return _0x182ead[_0x3cea17(0x12b)](resolveEnvVars);if(_0x182ead&&_0x12539f['IMnzB'](typeof _0x182ead,_0x12539f['nTDoD']))return Object['fromEntries'](Object['entries'](_0x182ead)['map'](([_0xbd3d5f,_0x58398f])=>[_0xbd3d5f,resolveEnvVars(_0x58398f)]));return _0x182ead;}const isRecord=_0x2a8964=>typeof _0x2a8964===_0xa4002b(0x12c)&&_0x2a8964!==null&&!Array['isArray'](_0x2a8964),asRecord=_0x2b3aa5=>isRecord(_0x2b3aa5)?_0x2b3aa5:undefined,mergeHeaders=(_0x3a6aa6,_0x2afcd1)=>{const _0x410151=_0xa4002b,_0x11c56d={'tAXqK':function(_0x496ba3,_0x39ce22){return _0x496ba3??_0x39ce22;}},_0x48c818={..._0x11c56d['tAXqK'](_0x3a6aa6,{}),..._0x11c56d[_0x410151(0x16c)](_0x2afcd1,{})};return Object['keys'](_0x48c818)['length']?_0x48c818:undefined;},SAFE_MODE_ARGS=[_0xa4002b(0x12a)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0xa4002b(0x135),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x448839,_0x1e15d5={}){const _0x371676=_0xa4002b,_0x1a6a38={'edUPP':function(_0x44a6f0,_0x32c072){return _0x44a6f0===_0x32c072;},'MnZkp':function(_0x102c78,_0x5746bc){return _0x102c78(_0x5746bc);}},_0x5a8e18=asRecord(_0x448839[_0x371676(0x142)]),_0x5550a4={...asRecord(_0x5a8e18?.[_0x371676(0x167)])??{}};_0x1a6a38['edUPP'](typeof _0x1e15d5[_0x371676(0x11d)],_0x371676(0x117))&&(_0x5550a4['headless']=_0x1e15d5['headless']);if(_0x448839[_0x371676(0x15b)]){const _0x593f90=_0x5550a4[_0x371676(0xf7)]??[],_0x2ad426=SAFE_MODE_ARGS['filter'](_0x3e8f87=>!_0x593f90[_0x371676(0x11a)](_0x3e8f87));_0x5550a4['args']=[..._0x593f90,..._0x2ad426];}if(_0x448839['allowInsecureLocalhost']){const _0x2efb40=_0x5550a4['args']??[],_0x2fde6d=ALLOW_LOCALHOST_ARGS[_0x371676(0x140)](_0x137f06=>!_0x2efb40['includes'](_0x137f06));_0x5550a4[_0x371676(0xf7)]=[..._0x2efb40,..._0x2fde6d];}const _0x2fe143={...asRecord(_0x5a8e18?.['contextOptions'])??{}};_0x2fe143[_0x371676(0x138)]=!![];_0x1a6a38[_0x371676(0x119)](typeof _0x448839[_0x371676(0x118)],'string')&&(_0x2fe143['userAgent']=_0x448839[_0x371676(0x118)]);const _0x151ad1=mergeHeaders(asRecord(_0x2fe143[_0x371676(0xf9)]),_0x1a6a38['MnZkp'](asRecord,_0x448839['headers']));return _0x151ad1?_0x2fe143['extraHTTPHeaders']=_0x151ad1:delete _0x2fe143['extraHTTPHeaders'],_0x1e15d5[_0x371676(0x14f)]&&(_0x2fe143['storageState']=_0x1e15d5['storageStatePath']),{'launchOptions':_0x5550a4,'contextOptions':_0x2fe143};}export async function resolveProfileStorageState(_0x14caa3){return resolveLocalAuthPath(getEnvDir(_0x14caa3));}async function resolveLocalAuthPath(_0x1e4df7){const _0x23293e=_0xa4002b,_0x3f0fc3={'Boylb':_0x23293e(0x16a),'HkXDE':function(_0x295424,_0x4c29f9,_0x4de09f){return _0x295424(_0x4c29f9,_0x4de09f);},'cjUqx':function(_0x55ab68,_0x300c02){return _0x55ab68(_0x300c02);},'GqhBV':function(_0x4554fc,_0x4b509c,_0x46d713){return _0x4554fc(_0x4b509c,_0x46d713);},'olKmo':function(_0x238b30,_0x2004df,_0x166ca5){return _0x238b30(_0x2004df,_0x166ca5);}},_0x2cf926=join(_0x1e4df7,_0x3f0fc3[_0x23293e(0x154)]),_0x4bdcf8=_0x3f0fc3['HkXDE'](join,_0x1e4df7,_0x23293e(0x110));if(_0x3f0fc3[_0x23293e(0xf4)](existsSync,_0x2cf926))try{const _0x43c9d2=await getToken();if(!_0x43c9d2)throw new Error(_0x23293e(0x145));const _0x3a1492=await readFile(_0x2cf926),_0x4ce50f=_0x3f0fc3['GqhBV'](decrypt,_0x3a1492,_0x43c9d2),_0xd58af=_0x3f0fc3[_0x23293e(0x108)](join,tmpdir(),_0x23293e(0x13c)+Date['now']()+'.json');return await writeFile(_0xd58af,_0x4ce50f),{'storageStatePath':_0xd58af,'tempAuthPath':_0xd58af};}catch(_0x411bc0){const _0x32c2d5=_0x411bc0 instanceof Error?_0x411bc0['message']:String(_0x411bc0);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x32c2d5);}if(existsSync(_0x4bdcf8))return{'storageStatePath':_0x4bdcf8};return{};}export async function buildPlaywrightConfig(_0x354803,_0x4d2061,_0x258a48,_0x4a44d3,_0x17c64d){const _0x156bbe=_0xa4002b,_0x41fdc2={'SOHvp':function(_0x5875a2,_0x4b74de){return _0x5875a2(_0x4b74de);},'NpQJA':function(_0x16608f,_0x3a6c0f,_0x2782be,_0x569930,_0x10342c,_0x588275,_0x27b077){return _0x16608f(_0x3a6c0f,_0x2782be,_0x569930,_0x10342c,_0x588275,_0x27b077);},'JgYyx':'stagehand'};if(_0x17c64d)return buildPlaywrightConfigCore(_0x354803,_0x17c64d,_0x4d2061,_0x258a48,_0x4a44d3,'stagehand');const {storageStatePath:_0x35dc6,tempAuthPath:_0x741d43}=await _0x41fdc2[_0x156bbe(0x165)](resolveLocalAuthPath,_0x41fdc2[_0x156bbe(0x165)](getEnvDir,_0x4d2061));try{const _0x491395=await _0x41fdc2[_0x156bbe(0x116)](buildPlaywrightConfigCore,_0x354803,_0x35dc6,_0x4d2061,_0x258a48,_0x4a44d3,_0x41fdc2['JgYyx']);return{..._0x491395,'tempAuthPath':_0x741d43};}catch(_0x45c5c8){_0x741d43&&await unlink(_0x741d43)['catch'](()=>{});throw _0x45c5c8;}}export async function buildPlaywrightConfigCore(_0x1e7e91,_0x227630,_0x358741,_0x2e4372,_0x553145,_0xb9b0b3=_0xa4002b(0x151)){const _0x30b38b=_0xa4002b,_0x318f2b={'QhArv':function(_0x5384bb,_0x3c9fb1,_0x5c600f){return _0x5384bb(_0x3c9fb1,_0x5c600f);},'hNoYc':function(_0x186881,_0x3e88f2){return _0x186881===_0x3e88f2;},'RmUiH':'chromium','LCYqb':_0x30b38b(0x14e),'iomWA':function(_0x33095b){return _0x33095b();},'zQiBv':'file','WngkC':'none','GpcRR':'install','dXVvc':_0x30b38b(0xfe),'jtoRM':'ranger-config','DXHlp':function(_0x5087f9,_0x22c3d4,_0x2e95c3){return _0x5087f9(_0x22c3d4,_0x2e95c3);},'vrANQ':function(_0x48b3b3,_0x297d13){return _0x48b3b3===_0x297d13;},'wCszg':_0x30b38b(0x109)},_0x415ebe=_0x2e4372||_0x318f2b['iomWA'](randomUUID),_0x4d96a3=join(getRangerDir(),_0x30b38b(0x102),_0x415ebe),_0x3df6d8=Boolean(_0x1e7e91['cdpEndpoint']),_0x2db539=_0x3df6d8?{'browserName':'chromium','cdpEndpoint':_0x1e7e91['cdpEndpoint']}:((()=>{const _0x520586=_0x30b38b,{launchOptions:_0x198607,contextOptions:_0x20d8d4}=_0x318f2b['QhArv'](buildBrowserOptionsFromSettings,_0x1e7e91,{'headless':_0x553145?![]:_0x1e7e91[_0x520586(0x11d)]??!![],'storageStatePath':_0x227630});if(_0x318f2b[_0x520586(0x148)](process[_0x520586(0x16d)]?.(),0x0)){const _0x14ec92=[_0x520586(0xfa),_0x520586(0x12f)],_0x1f79b6=_0x198607['args']??[],_0x7bcc9b=_0x14ec92[_0x520586(0x140)](_0x502427=>!_0x1f79b6[_0x520586(0x11a)](_0x502427));_0x198607['args']=[..._0x1f79b6,..._0x7bcc9b];}return{'isolated':!![],'browserName':_0x318f2b[_0x520586(0x164)],'launchOptions':_0x198607,'contextOptions':{..._0x20d8d4,'permissions':[_0x318f2b[_0x520586(0x129)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x5e31e9=_0xb9b0b3==='playwright-cli'?{'browser':_0x2db539,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d96a3,'outputMode':_0x318f2b['zQiBv'],'codegen':_0x318f2b[_0x30b38b(0x162)]}:{'name':_0x358741,'browser':_0x2db539,'capabilities':['core','tabs',_0x318f2b[_0x30b38b(0xfb)],_0x318f2b[_0x30b38b(0x143)],'vision'],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d96a3};if(!_0x3df6d8){const _0x53e3a9=_0x5e31e9['browser'],_0x48bbec=_0x53e3a9['contextOptions'];if(_0x48bbec[_0x30b38b(0x118)]===undefined)delete _0x48bbec['userAgent'];if(_0x48bbec['storageState']===undefined)delete _0x48bbec[_0x30b38b(0x133)];}const _0x36d090=join(tmpdir(),_0x318f2b[_0x30b38b(0x13e)]);!existsSync(_0x36d090)&&await _0x318f2b['DXHlp'](mkdir,_0x36d090,{'recursive':!![]});const _0x4c10a7=_0x318f2b['vrANQ'](_0xb9b0b3,'playwright-cli')?_0x318f2b[_0x30b38b(0x136)]:'',_0x521f44=_0x318f2b['DXHlp'](join,_0x36d090,_0x358741+'-'+Date[_0x30b38b(0x105)]()+_0x4c10a7+_0x30b38b(0x124));return await writeFile(_0x521f44,JSON[_0x30b38b(0xf5)](_0x5e31e9,null,0x2)),{'configPath':_0x521f44,'storageStatePath':_0x227630};}export async function buildPlaywrightCliConfig(_0xae4cd1,_0x590ddd,_0x29fd59,_0x374e5d,_0x5ee84d){const _0x330e54=_0xa4002b,_0x318843={'nwTFw':function(_0xd3b64c,_0x51664d,_0x316f9c,_0x544f85,_0x955eb8,_0x3c85e1,_0x204d4e){return _0xd3b64c(_0x51664d,_0x316f9c,_0x544f85,_0x955eb8,_0x3c85e1,_0x204d4e);},'ZCRje':_0x330e54(0x16b)};if(_0x5ee84d)return buildPlaywrightConfigCore(_0xae4cd1,_0x5ee84d,_0x590ddd,_0x29fd59,_0x374e5d,'playwright-cli');const {storageStatePath:_0x2e6a50,tempAuthPath:_0x1faf10}=await resolveLocalAuthPath(getEnvDir(_0x590ddd));try{const _0x5ce4a1=await _0x318843[_0x330e54(0xf8)](buildPlaywrightConfigCore,_0xae4cd1,_0x2e6a50,_0x590ddd,_0x29fd59,_0x374e5d,_0x318843['ZCRje']);return{..._0x5ce4a1,'tempAuthPath':_0x1faf10};}catch(_0x206ac7){_0x1faf10&&await unlink(_0x1faf10)[_0x330e54(0x134)](()=>{});throw _0x206ac7;}}export async function buildRangerwrightCliConfig(_0x1523cc,_0x159939,_0x38d67e,_0x4f4f36,_0x3f672c){const _0x1b4ea0=_0xa4002b,_0x6fb608={'MOVwd':_0x1b4ea0(0x12f),'LELAZ':'chromium','UVSTh':function(_0x1ac03b,_0x9cf442){return _0x1ac03b===_0x9cf442;},'CuOyS':function(_0x2220d8,_0x1cc42d){return _0x2220d8===_0x1cc42d;},'CncUa':function(_0x17c1c8,_0x44e6b8,_0x53d42b){return _0x17c1c8(_0x44e6b8,_0x53d42b);},'STdWA':function(_0x388870){return _0x388870();},'bQtbl':function(_0x4f9a06,_0x43a2cc,_0x5e8d42){return _0x4f9a06(_0x43a2cc,_0x5e8d42);}},{storageStatePath:_0x14ca86,tempAuthPath:_0x2d8fe5}=_0x3f672c?{'storageStatePath':_0x3f672c,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x159939)),_0x2b5294=_0x38d67e||randomUUID(),_0x1dcf9b=join(getRangerDir(),'sessions',_0x2b5294),_0x42e862=Boolean(_0x1523cc[_0x1b4ea0(0x13a)]),_0x2d1aa8=_0x42e862?{'browserName':_0x6fb608[_0x1b4ea0(0x121)],'cdpEndpoint':_0x1523cc[_0x1b4ea0(0x13a)]}:((()=>{const _0x3c4334=_0x1b4ea0,{launchOptions:_0x22f201,contextOptions:_0x151d70}=buildBrowserOptionsFromSettings(_0x1523cc,{'headless':_0x4f4f36?![]:_0x1523cc['headless']??!![],'storageStatePath':_0x14ca86});if(process[_0x3c4334(0x16d)]?.()===0x0){const _0xd9a989=[_0x3c4334(0xfa),_0x6fb608['MOVwd']],_0x8ca3a8=_0x22f201[_0x3c4334(0xf7)]??[],_0x47de10=_0xd9a989[_0x3c4334(0x140)](_0x30ab54=>!_0x8ca3a8[_0x3c4334(0x11a)](_0x30ab54));_0x22f201['args']=[..._0x8ca3a8,..._0x47de10];}return{'browserName':'chromium','launchOptions':_0x22f201,'contextOptions':{..._0x151d70,'permissions':[_0x3c4334(0x14e),_0x3c4334(0xf2)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x42e862){const _0x54ce53=_0x2d1aa8[_0x1b4ea0(0x10e)];if(_0x54ce53){if(_0x6fb608[_0x1b4ea0(0x11c)](_0x54ce53['userAgent'],undefined))delete _0x54ce53['userAgent'];if(_0x6fb608[_0x1b4ea0(0x163)](_0x54ce53['storageState'],undefined))delete _0x54ce53[_0x1b4ea0(0x133)];}}const _0x42fca5={'browser':_0x2d1aa8,'outputDir':_0x1dcf9b,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x367b15;try{const _0x30f7c=_0x6fb608[_0x1b4ea0(0xf3)](join,_0x6fb608['STdWA'](tmpdir),'ranger-config');!existsSync(_0x30f7c)&&await mkdir(_0x30f7c,{'recursive':!![]}),_0x367b15=_0x6fb608[_0x1b4ea0(0x146)](join,_0x30f7c,_0x159939+'-'+Date[_0x1b4ea0(0x105)]()+'-rangerwright.json'),await _0x6fb608[_0x1b4ea0(0xf3)](writeFile,_0x367b15,JSON[_0x1b4ea0(0xf5)](_0x42fca5,null,0x2));}catch(_0x2bd24d){_0x2d8fe5&&await unlink(_0x2d8fe5)['catch'](()=>{});throw _0x2bd24d;}return{'configPath':_0x367b15,'storageStatePath':_0x14ca86,'tempAuthPath':_0x2d8fe5,'outputDir':_0x1dcf9b};}export async function buildNovaActCliConfig(_0x365683,_0x49f8d9,_0x43f4be,_0x4f5f33,_0x52b06d){const _0x404fc1=_0xa4002b,_0x5c3b7a={'bKLrF':function(_0x102817){return _0x102817();},'EeRBn':function(_0x26eb3c,_0x10c61b,_0x3d68e0,_0x22ed4d){return _0x26eb3c(_0x10c61b,_0x3d68e0,_0x22ed4d);},'RdBxN':_0x404fc1(0x102),'arCbb':_0x404fc1(0x10d),'ZKZhS':'Default','FSmCm':function(_0x432966,_0x5ee9fa){return _0x432966===_0x5ee9fa;},'CzrMR':'string','ejXwY':function(_0x9899f,_0x4bc3b4){return _0x9899f(_0x4bc3b4);}},{storageStatePath:_0x140e1e,tempAuthPath:_0x5c689e}=_0x52b06d?{'storageStatePath':_0x52b06d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x49f8d9)),_0x18f58b=_0x43f4be||_0x5c3b7a[_0x404fc1(0x10a)](randomUUID),_0x52cd2c=_0x5c3b7a[_0x404fc1(0x122)](join,getRangerDir(),_0x5c3b7a[_0x404fc1(0x130)],_0x18f58b),_0x30b86c=join(_0x52cd2c,_0x5c3b7a[_0x404fc1(0x115)]),_0x2b5bc6=_0x140e1e?join(_0x30b86c,_0x5c3b7a[_0x404fc1(0x161)]):undefined,{launchOptions:_0x2c9cd6,contextOptions:_0x2dbe82}=buildBrowserOptionsFromSettings(_0x365683,{'headless':_0x4f5f33?![]:_0x365683[_0x404fc1(0x11d)]??!![],'storageStatePath':_0x140e1e});if(_0x5c3b7a['FSmCm'](process[_0x404fc1(0x16d)]?.(),0x0)){const _0x48c9f4=['--no-sandbox','--disable-setuid-sandbox'],_0x33f020=_0x2c9cd6['args']??[],_0x4e8770=_0x48c9f4[_0x404fc1(0x140)](_0x2eba5f=>!_0x33f020[_0x404fc1(0x11a)](_0x2eba5f));_0x2c9cd6[_0x404fc1(0xf7)]=[..._0x33f020,..._0x4e8770];}const _0x2ff34e=typeof _0x2c9cd6['executablePath']===_0x5c3b7a[_0x404fc1(0x15c)]?_0x2c9cd6['executablePath']:_0x140e1e?chromium['executablePath']():undefined;return{'storageStatePath':_0x140e1e,'tempAuthPath':_0x5c689e,'baseUrl':_0x365683[_0x404fc1(0xfc)],'headless':_0x5c3b7a[_0x404fc1(0xf6)](Boolean,_0x2c9cd6['headless']),'userDataDir':_0x30b86c,'browserProfilePath':_0x2b5bc6,'executablePath':_0x2ff34e,'launchArgs':Array[_0x404fc1(0x10b)](_0x2c9cd6['args'])?_0x2c9cd6['args']['filter'](_0x10f476=>typeof _0x10f476==='string'):[],'userAgent':typeof _0x2dbe82['userAgent']===_0x404fc1(0x160)?_0x2dbe82[_0x404fc1(0x118)]:undefined,'extraHTTPHeaders':_0x2dbe82['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x365683['allowInsecureLocalhost']),'safeMode':Boolean(_0x365683['safeMode']),'cdpEndpoint':_0x365683['cdpEndpoint'],'isCdpMode':Boolean(_0x365683['cdpEndpoint'])};}export function getNestedValue(_0x298907,_0x4ae858){const _0x267bee=_0xa4002b,_0x14868b={'FKezA':function(_0xcab5b1,_0x420f01){return _0xcab5b1(_0x420f01);},'xyJxP':function(_0x42108b,_0x533e3b){return _0x42108b===_0x533e3b;}},_0x145827=_0x14868b['FKezA'](parseKeyPath,_0x4ae858);let _0x564a51=_0x298907;for(const _0x34a54e of _0x145827){if(_0x14868b[_0x267bee(0x13d)](_0x564a51,null)||_0x564a51===undefined||typeof _0x564a51!==_0x267bee(0x12c))return undefined;_0x564a51=_0x564a51[_0x34a54e];}return _0x564a51;}function _0x4515(){const _0x2a2795=['message','entries','repeat','string','ZKZhS','WngkC','CuOyS','RmUiH','SOHvp','sjhdZ','launchOptions','legacy','12428XmpbEV','auth.json.enc','playwright-cli','tAXqK','getuid','tEqHq','clipboard-write','CncUa','cjUqx','stringify','ejXwY','args','nwTFw','extraHTTPHeaders','--no-sandbox','GpcRR','baseUrl','86076pMyhjC','pdf','264480VmrxkF','XWpzd','all','sessions','1811136wySIaW','NSwxG','now','16iCiIUm','hMUXX','olKmo','-cli','bKLrF','isArray','2485728vIvEmj','nova-user-data','contextOptions','settings.json','auth.json','Environment\x20variable\x20','yNsri','MPFWO','local','arCbb','NpQJA','boolean','userAgent','edUPP','includes','NKLWq','UVSTh','headless','split','321453IVCOKc','warn','LELAZ','EeRBn','tjwKv','.json','EQINm','\x20is\x20not\x20set','PMDeQ','KjKXd','LCYqb','--disable-features=WebBluetooth','map','object','SEREn','startsWith','--disable-setuid-sandbox','RdBxN','loUxj','Refusing\x20to\x20write\x20profile\x20\x22','storageState','catch','--unsafely-treat-insecure-origin-as-secure=http://localhost','wCszg','AlNsJ','ignoreHTTPSErrors','endsWith','cdpEndpoint','setupHeaders','ranger-auth-','xyJxP','jtoRM','ecJRi','filter','forWrite','browser','dXVvc','BNBJf','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','bQtbl','154WliVPT','hNoYc','ntqGM','push','jodRC','length','1499325hBXlpL','clipboard-read','storageStatePath','location','stagehand','abVfi','parse','Boylb','path','HWATj','zYtlB','headers','VxtrD','AlmQo','safeMode','CzrMR'];_0x4515=function(){return _0x2a2795;};return _0x4515();}export function setNestedValue(_0x4796e8,_0x246feb,_0x163ac6){const _0x354b66=_0xa4002b,_0x2b6610={'wGjfd':function(_0x36d58e,_0x4cb0a0){return _0x36d58e(_0x4cb0a0);},'SEREn':function(_0x5b86cd,_0x3549ba){return _0x5b86cd<_0x3549ba;},'VxtrD':function(_0x4d63fd,_0x5de497){return _0x4d63fd-_0x5de497;}},_0x420196=_0x2b6610['wGjfd'](parseKeyPath,_0x246feb);let _0x3b4945=_0x4796e8;for(let _0x2f5562=0x0;_0x2b6610[_0x354b66(0x12d)](_0x2f5562,_0x420196['length']-0x1);_0x2f5562++){const _0x1fe987=_0x420196[_0x2f5562];(!(_0x1fe987 in _0x3b4945)||typeof _0x3b4945[_0x1fe987]!=='object')&&(_0x3b4945[_0x1fe987]={}),_0x3b4945=_0x3b4945[_0x1fe987];}_0x3b4945[_0x420196[_0x2b6610[_0x354b66(0x159)](_0x420196[_0x354b66(0x14c)],0x1)]]=_0x163ac6;}export function deleteNestedValue(_0xfa52c9,_0x48e014){const _0x1fb4f6=_0xa4002b,_0x329ead={'hMUXX':function(_0x393a67,_0x1b6969){return _0x393a67===_0x1b6969;},'EQINm':function(_0x265bc9,_0x325ffc){return _0x265bc9===_0x325ffc;},'NNVdW':function(_0x551163,_0x1fc677){return _0x551163!==_0x1fc677;},'RniJK':function(_0x20c94f,_0x5309f4){return _0x20c94f-_0x5309f4;},'LjKHA':function(_0x2037d0,_0x573e9e){return _0x2037d0 in _0x573e9e;}},_0x2cf428=parseKeyPath(_0x48e014);let _0x3719bb=_0xfa52c9;for(let _0x1e2240=0x0;_0x1e2240<_0x2cf428['length']-0x1;_0x1e2240++){if(_0x329ead['hMUXX'](_0x3719bb,null)||_0x329ead[_0x1fb4f6(0x107)](_0x3719bb,undefined)||typeof _0x3719bb!=='object')return![];_0x3719bb=_0x3719bb[_0x2cf428[_0x1e2240]];}if(_0x329ead[_0x1fb4f6(0x125)](_0x3719bb,null)||_0x3719bb===undefined||_0x329ead['NNVdW'](typeof _0x3719bb,'object'))return![];const _0x204a51=_0x2cf428[_0x329ead['RniJK'](_0x2cf428['length'],0x1)];if(_0x329ead['LjKHA'](_0x204a51,_0x3719bb))return delete _0x3719bb[_0x204a51],!![];return![];}function parseKeyPath(_0x4a58f7){const _0x31a601=_0xa4002b,_0x879fe4={'HWATj':function(_0x6f2814,_0x56457e){return _0x6f2814===_0x56457e;},'BNBJf':'setupHeader','NKLWq':_0x31a601(0x13b)},_0x160c53=_0x4a58f7[_0x31a601(0x11e)]('.');return _0x879fe4[_0x31a601(0x156)](_0x160c53[0x0],'header')&&(_0x160c53[0x0]=_0x31a601(0x158)),_0x160c53[0x0]===_0x879fe4[_0x31a601(0x144)]&&(_0x160c53[0x0]=_0x879fe4[_0x31a601(0x11b)]),_0x160c53;}export function formatSettings(_0x37d689,_0x584d62=0x0){const _0x4c2c7d=_0xa4002b,_0x53bc41=[],_0x132d67='\x20\x20'[_0x4c2c7d(0x15f)](_0x584d62);for(const [_0x38191a,_0x1bbc62]of Object[_0x4c2c7d(0x15e)](_0x37d689)){if(_0x1bbc62===undefined)continue;if(typeof _0x1bbc62==='object'&&_0x1bbc62!==null){_0x53bc41['push'](''+_0x132d67+_0x38191a+':');for(const [_0x102bc8,_0x1b0bc1]of Object['entries'](_0x1bbc62)){_0x53bc41[_0x4c2c7d(0x14a)](_0x132d67+'\x20\x20'+_0x102bc8+':\x20'+_0x1b0bc1);}}else _0x53bc41['push'](''+_0x132d67+_0x38191a+':\x20'+_0x1bbc62);}return _0x53bc41['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5bae91,_0x537841){const _0x346de3=_0x3466,_0x3d57fe=_0x5bae91();while(!![]){try{const _0x39fdc0=parseInt(_0x346de3(0x121))/0x1+parseInt(_0x346de3(0x124))/0x2+parseInt(_0x346de3(0x11f))/0x3+parseInt(_0x346de3(0x120))/0x4+parseInt(_0x346de3(0x11d))/0x5*(-parseInt(_0x346de3(0x125))/0x6)+-parseInt(_0x346de3(0x126))/0x7*(parseInt(_0x346de3(0x11c))/0x8)+parseInt(_0x346de3(0x122))/0x9*(-parseInt(_0x346de3(0x11e))/0xa);if(_0x39fdc0===_0x537841)break;else _0x3d57fe['push'](_0x3d57fe['shift']());}catch(_0xb0372f){_0x3d57fe['push'](_0x3d57fe['shift']());}}}(_0x2ccf,0x55db4));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x3466(_0x77bc07,_0xac9cea){_0x77bc07=_0x77bc07-0x11c;const _0x2ccfa8=_0x2ccf();let _0x34660f=_0x2ccfa8[_0x77bc07];return _0x34660f;}function _0x2ccf(){const _0x2749fc=['utf-8','1105488Uesosm','1644rubgYu','955920PWGrfn','8KrgDSM','985XPbPMJ','460hMneXd','1207938bEKTnr','1892308AeGIwL','268569RkVUQS','225945dpxbaB'];_0x2ccf=function(){return _0x2749fc;};return _0x2ccf();}export function readSkillContent(_0x11b896){const _0xb235ff=_0x3466,_0x94f28e={'wGSvW':function(_0x3f36b8,_0xcecfff,_0x525c8d,_0xe8df74,_0xafdca4){return _0x3f36b8(_0xcecfff,_0x525c8d,_0xe8df74,_0xafdca4);},'zhuKI':function(_0xb7187,_0x207786,_0x24e649){return _0xb7187(_0x207786,_0x24e649);}},_0xfc7abe=_0x94f28e['wGSvW'](join,__dirname,'..','..','skills'),_0x2ed4d4=_0x94f28e['zhuKI'](join,_0xfc7abe,_0x11b896);try{return readFileSync(_0x2ed4d4,_0xb235ff(0x123));}catch{return'';}}export function getRangerSkillContent(){const _0x4179ed={'uoAxC':function(_0x3b2fd4,_0x1c81fb){return _0x3b2fd4(_0x1c81fb);}};return _0x4179ed['uoAxC'](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x362c9b=_0x407f;(function(_0x5383dd,_0x25b5b2){const _0x4daacc=_0x407f,_0x5c59cc=_0x5383dd();while(!![]){try{const _0x12992c=parseInt(_0x4daacc(0x1e1))/0x1+parseInt(_0x4daacc(0x1de))/0x2+parseInt(_0x4daacc(0x1ed))/0x3*(-parseInt(_0x4daacc(0x1e7))/0x4)+-parseInt(_0x4daacc(0x1ea))/0x5*(parseInt(_0x4daacc(0x1db))/0x6)+parseInt(_0x4daacc(0x1ce))/0x7+-parseInt(_0x4daacc(0x1e5))/0x8+-parseInt(_0x4daacc(0x1e0))/0x9*(parseInt(_0x4daacc(0x1ef))/0xa);if(_0x12992c===_0x25b5b2)break;else _0x5c59cc['push'](_0x5c59cc['shift']());}catch(_0x43341a){_0x5c59cc['push'](_0x5c59cc['shift']());}}}(_0x5396,0x222e6));function _0x5396(){const _0x11ed6b=['\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','326642lqLFRI','TDIID','9ysqHML','251517OprSlp','warn','UIfNM','\x20\x20Files:\x20','76960JbNrbH','trim','349220FmWPvF','opencode','MWVpQ','75080RiJAQg','match','utf-8','3eufqqh','qiEup','3136190AyGlHX','\x20\x20Location:\x20','BAiyJ','skills','1055096wUIkTR','isDirectory','length','feature-tracker','e2e-test-recommender','Dtbju','endsWith','\x20\x20Removed\x20deprecated\x20skill:\x20','SGeSm','wajqk','log','\x20\x20Installed\x20skill:\x20','VyVNK','6pXImZI','project'];_0x5396=function(){return _0x11ed6b;};return _0x5396();}import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';function _0x407f(_0x46551b,_0x4e36c0){_0x46551b=_0x46551b-0x1cd;const _0x5396c3=_0x5396();let _0x407fb7=_0x5396c3[_0x46551b];return _0x407fb7;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x362c9b(0x1d2),'bug-bash',_0x362c9b(0x1d1)];export async function installSkill(_0x83f5dc,_0x16b68d={}){const _0x2e825e=_0x362c9b,_0x21008a={'hSwiE':'claude','TDIID':function(_0xbca01c){return _0xbca01c();},'SGeSm':function(_0x181b89,_0x43692b,_0x2c9e45){return _0x181b89(_0x43692b,_0x2c9e45);},'UIfNM':'SKILL.md','wajqk':function(_0x355dbc,_0x2d5365){return _0x355dbc(_0x2d5365);},'DoUbN':function(_0x37765d,_0xe89bcb){return _0x37765d&&_0xe89bcb;},'VyVNK':function(_0xde4b9c,_0x1e5d64){return _0xde4b9c(_0x1e5d64);},'CszFs':function(_0x1c30ac,_0x35bc34,_0x1a3020,_0x1efddb){return _0x1c30ac(_0x35bc34,_0x1a3020,_0x1efddb);},'mVaUy':_0x2e825e(0x1ec),'kakMM':function(_0x2f1b9f,_0xc59586){return _0x2f1b9f>_0xc59586;}},{level:level=_0x2e825e(0x1dc),cliVersion:_0xccf59c,platform:platform=_0x21008a['hSwiE']}=_0x16b68d,_0x22d632=_0x21008a[_0x2e825e(0x1df)](getSourceSkillsDir),_0x4ff06f=_0x21008a[_0x2e825e(0x1d6)](join,_0x22d632,_0x83f5dc),_0x47042a=join(_0x22d632,_0x83f5dc+'.md'),_0x498a33=existsSync(_0x4ff06f)&&statSync(_0x4ff06f)[_0x2e825e(0x1cf)]()&&existsSync(_0x21008a[_0x2e825e(0x1d6)](join,_0x4ff06f,_0x21008a[_0x2e825e(0x1e3)])),_0x17abe5=_0x21008a['wajqk'](existsSync,_0x47042a);if(_0x21008a['DoUbN'](!_0x498a33,!_0x17abe5))return console[_0x2e825e(0x1e2)]('\x20\x20Skill\x20not\x20found:\x20'+_0x83f5dc),![];const _0x22122a=platform===_0x2e825e(0x1e8)?_0x21008a[_0x2e825e(0x1da)](getOpencodeSkillsDir,level):_0x21008a['wajqk'](getSkillsDir,level),_0x5bf070=join(_0x22122a,_0x83f5dc);await mkdir(_0x5bf070,{'recursive':!![]});let _0x592fd1,_0xdf63ce=[];if(_0x498a33){const _0x23fd12=await _0x21008a[_0x2e825e(0x1d7)](readdir,_0x4ff06f),_0xe7e45f=_0x23fd12['filter'](_0x347109=>_0x347109[_0x2e825e(0x1d4)]('.md'));for(const _0x4a54e0 of _0xe7e45f){const _0x4b3b38=join(_0x4ff06f,_0x4a54e0),_0x456173=_0x21008a['SGeSm'](join,_0x5bf070,_0x4a54e0);await _0x21008a[_0x2e825e(0x1d6)](copyFile,_0x4b3b38,_0x456173),_0xdf63ce['push'](_0x4a54e0);}_0x592fd1=await _0x21008a['SGeSm'](readFile,join(_0x4ff06f,_0x21008a['UIfNM']),_0x2e825e(0x1ec));}else{_0x592fd1=await readFile(_0x47042a,'utf-8');const _0x1dc00b=join(_0x5bf070,'SKILL.md');await _0x21008a['CszFs'](writeFile,_0x1dc00b,_0x592fd1,_0x21008a['mVaUy']),_0xdf63ce['push'](_0x21008a[_0x2e825e(0x1e3)]);}const {name:_0x2f425c}=_0x21008a[_0x2e825e(0x1da)](parseFrontmatter,_0x592fd1);return console['log'](_0x2e825e(0x1d9)+_0x2f425c),console['log'](_0x2e825e(0x1f0)+_0x5bf070),_0x21008a['kakMM'](_0xdf63ce[_0x2e825e(0x1d0)],0x1)&&console[_0x2e825e(0x1d8)](_0x2e825e(0x1e4)+_0xdf63ce['join'](',\x20')),logLocalAgentInstallation(_0x83f5dc,{'skillDisplayName':_0x2f425c,'installLevel':level},_0xccf59c)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x4773b8=_0x362c9b,_0x5e6ea0={'aFStT':function(_0x48d26d,_0x408aa1,_0xf99604,_0x11153b,_0x1a6d7b){return _0x48d26d(_0x408aa1,_0xf99604,_0x11153b,_0x1a6d7b);},'FyYEU':_0x4773b8(0x1cd),'qiEup':function(_0x28a09b,_0x10baf5,_0x44736c,_0x2e668a,_0x58b56b,_0x128b0e){return _0x28a09b(_0x10baf5,_0x44736c,_0x2e668a,_0x58b56b,_0x128b0e);},'MWVpQ':function(_0x2916d4,_0x21c9b9){return _0x2916d4(_0x21c9b9);}},_0xee5bc4=[_0x5e6ea0['aFStT'](join,__dirname,'..','..',_0x5e6ea0['FyYEU']),_0x5e6ea0[_0x4773b8(0x1ee)](join,__dirname,'..','..','..','skills')];for(const _0x5cd597 of _0xee5bc4){if(_0x5e6ea0[_0x4773b8(0x1e9)](existsSync,_0x5cd597))return _0x5cd597;}return _0xee5bc4[0x0];}function parseFrontmatter(_0x4fab7c){const _0x286f43=_0x362c9b,_0x353bc7=_0x4fab7c[_0x286f43(0x1eb)](/^---\n([\s\S]+?)\n---/);if(!_0x353bc7)throw new Error('Invalid\x20skill\x20frontmatter');const _0x3935b7=_0x353bc7[0x1],_0x9c1504=_0x3935b7['match'](/name:\s*(.+)/),_0x434978=_0x3935b7[_0x286f43(0x1eb)](/description:\s*"?(.+?)"?\n/);return{'name':_0x9c1504?.[0x1][_0x286f43(0x1e6)]()||'','description':_0x434978?.[0x1]['trim']()||''};}export async function removeSkill(_0x92e8f,_0x242819){const _0x43ec15=_0x362c9b,_0x57f9f2={'IagmU':function(_0x46ef40,_0x8ca681){return _0x46ef40(_0x8ca681);},'yixwz':function(_0x4a706f,_0x2efe5a,_0x212dd5){return _0x4a706f(_0x2efe5a,_0x212dd5);},'BAiyJ':function(_0x15f0a3,_0x2aa633){return _0x15f0a3(_0x2aa633);},'Dtbju':function(_0x1f385d,_0x2eb804,_0x370418){return _0x1f385d(_0x2eb804,_0x370418);}},_0x50c504=_0x57f9f2['IagmU'](getSkillsDir,_0x242819),_0x13d664=_0x57f9f2['yixwz'](join,_0x50c504,_0x92e8f);if(!_0x57f9f2[_0x43ec15(0x1f1)](existsSync,_0x13d664))return![];try{return await _0x57f9f2[_0x43ec15(0x1d3)](rm,_0x13d664,{'recursive':!![]}),console['log'](_0x43ec15(0x1d5)+_0x92e8f),!![];}catch{return console[_0x43ec15(0x1e2)](_0x43ec15(0x1dd)+_0x92e8f),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x35ece4=_0x5e2a;function _0x5e2a(_0x27237d,_0x4e6354){_0x27237d=_0x27237d-0xad;const _0x1e3fbe=_0x1e3f();let _0x5e2a61=_0x1e3fbe[_0x27237d];return _0x5e2a61;}(function(_0x4491f1,_0x121143){const _0x44b73f=_0x5e2a,_0x2c2f17=_0x4491f1();while(!![]){try{const _0x580de5=parseInt(_0x44b73f(0xb8))/0x1*(parseInt(_0x44b73f(0xf9))/0x2)+-parseInt(_0x44b73f(0xf7))/0x3*(-parseInt(_0x44b73f(0xb3))/0x4)+-parseInt(_0x44b73f(0xbf))/0x5*(parseInt(_0x44b73f(0xb0))/0x6)+parseInt(_0x44b73f(0xd1))/0x7*(-parseInt(_0x44b73f(0xb1))/0x8)+-parseInt(_0x44b73f(0xda))/0x9+-parseInt(_0x44b73f(0xc1))/0xa+parseInt(_0x44b73f(0xee))/0xb;if(_0x580de5===_0x121143)break;else _0x2c2f17['push'](_0x2c2f17['shift']());}catch(_0x12ed63){_0x2c2f17['push'](_0x2c2f17['shift']());}}}(_0x1e3f,0xec8fd));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x32d6e5,_0x1ea598){const _0x4027d8=_0x5e2a,_0x3216ee={'sxuFE':function(_0x32838e,_0x2b6c2){return _0x32838e>=_0x2b6c2;},'jmEmX':function(_0x3ab47f,_0x591108){return _0x3ab47f<=_0x591108;},'Ezbkf':function(_0x4e0314,_0x528e72){return _0x4e0314<_0x528e72;},'gxEUq':function(_0x29b8b4,_0x51d9a7){return _0x29b8b4+_0x51d9a7;},'mVokk':function(_0x440e9a,_0x31a63c){return _0x440e9a*_0x31a63c;}};if(_0x3216ee[_0x4027d8(0xf1)](_0x1ea598,_0x32d6e5[_0x4027d8(0xc4)]))return[0x0,0x0];const _0x4a2cb1=_0x32d6e5[_0x1ea598];let _0x41beab=0x1,_0x26396c=0x80;while(_0x3216ee['jmEmX'](_0x41beab,0x8)&&!(_0x4a2cb1&_0x26396c)){_0x41beab++,_0x26396c>>=0x1;}if(_0x1ea598+_0x41beab>_0x32d6e5['length'])return[0x0,0x0];let _0x1e18fb=_0x4a2cb1&_0x26396c-0x1;for(let _0x3fd941=0x1;_0x3216ee['Ezbkf'](_0x3fd941,_0x41beab);_0x3fd941++){_0x1e18fb=_0x3216ee['gxEUq'](_0x3216ee[_0x4027d8(0xd0)](_0x1e18fb,0x100),_0x32d6e5[_0x3216ee['gxEUq'](_0x1ea598,_0x3fd941)]);}return[_0x1e18fb,_0x41beab];}function readId(_0x276b57,_0x7b2735){const _0x3f6611=_0x5e2a,_0x152bee={'jCTJI':function(_0x4c72f7,_0x579668){return _0x4c72f7>=_0x579668;},'IIEpJ':function(_0x409976,_0x47c55d){return _0x409976+_0x47c55d;},'fzowY':function(_0x574be8,_0x43143c){return _0x574be8*_0x43143c;}};if(_0x152bee[_0x3f6611(0xe1)](_0x7b2735,_0x276b57['length']))return[0x0,0x0];const _0x15d236=_0x276b57[_0x7b2735];let _0x213008;if(_0x15d236>=0x80)_0x213008=0x1;else{if(_0x15d236>=0x40)_0x213008=0x2;else{if(_0x152bee[_0x3f6611(0xe1)](_0x15d236,0x20))_0x213008=0x3;else{if(_0x15d236>=0x10)_0x213008=0x4;else return[_0x15d236,0x1];}}}if(_0x152bee[_0x3f6611(0xf2)](_0x7b2735,_0x213008)>_0x276b57['length'])return[0x0,0x0];let _0x37b39d=0x0;for(let _0x4cf1a9=0x0;_0x4cf1a9<_0x213008;_0x4cf1a9++){_0x37b39d=_0x152bee['fzowY'](_0x37b39d,0x100)+_0x276b57[_0x152bee['IIEpJ'](_0x7b2735,_0x4cf1a9)];}return[_0x37b39d,_0x213008];}function readUint(_0x575416,_0x5d00b6,_0x648db5){const _0x316d93=_0x5e2a,_0x16e0d8={'WgJHH':function(_0x28684c,_0x4f4bdb){return _0x28684c<_0x4f4bdb;},'esRGO':function(_0xca0b38,_0x13d494){return _0xca0b38+_0x13d494;}};let _0x46c46b=0x0;for(let _0x55f766=0x0;_0x16e0d8['WgJHH'](_0x55f766,_0x648db5);_0x55f766++){_0x46c46b=_0x16e0d8[_0x316d93(0xb6)](_0x46c46b*0x100,_0x575416[_0x5d00b6+_0x55f766]);}return _0x46c46b;}function isUnknownSize(_0x4babcd,_0x51935c){const _0x46b803=_0x5e2a,_0x1244f4={'JFgOb':function(_0x1e396d,_0x474f08){return _0x1e396d===_0x474f08;},'YkcNL':function(_0x511667,_0xc5cb99){return _0x511667-_0xc5cb99;}};return _0x1244f4[_0x46b803(0xdc)](_0x4babcd,_0x1244f4['YkcNL'](Math['pow'](0x2,0x7*_0x51935c),0x1));}function writeVint(_0xf47c45,_0x343258){const _0x3f5730=_0x5e2a,_0x5ebe3b={'jwuPw':function(_0x283a1a,_0x28a88b){return _0x283a1a||_0x28a88b;},'dcfRq':function(_0x151b58,_0x4d1e35){return _0x151b58-_0x4d1e35;},'GpsPk':function(_0x1037b7,_0x193bcd){return _0x1037b7&_0x193bcd;},'zGOcI':function(_0x459ec8,_0x19cc3e){return _0x459ec8/_0x19cc3e;},'PHhVo':function(_0xcae16f,_0x233781){return _0xcae16f<<_0x233781;}};let _0x25ab28=_0x5ebe3b['jwuPw'](_0x343258,0x1);while(_0x5ebe3b[_0x3f5730(0xbb)](Math[_0x3f5730(0xcf)](0x2,0x7*_0x25ab28),0x2)<_0xf47c45)_0x25ab28++;const _0x439436=Buffer[_0x3f5730(0xae)](_0x25ab28);for(let _0x3859b6=_0x25ab28-0x1;_0x3859b6>=0x0;_0x3859b6--){_0x439436[_0x3859b6]=_0x5ebe3b[_0x3f5730(0xe3)](_0xf47c45,0xff),_0xf47c45=Math[_0x3f5730(0xf0)](_0x5ebe3b[_0x3f5730(0xf4)](_0xf47c45,0x100));}return _0x439436[0x0]|=_0x5ebe3b[_0x3f5730(0xed)](0x1,0x8-_0x25ab28),_0x439436;}function writeUint(_0x3b19de,_0x24db9d){const _0x2fa3ee=_0x5e2a,_0x3e5e0e={'kHZHu':function(_0x3b11a2,_0x5ca6f2){return _0x3b11a2>=_0x5ca6f2;}},_0x290360=Buffer[_0x2fa3ee(0xae)](_0x24db9d);for(let _0x22e65a=_0x24db9d-0x1;_0x3e5e0e[_0x2fa3ee(0xe0)](_0x22e65a,0x0);_0x22e65a--){_0x290360[_0x22e65a]=_0x3b19de&0xff,_0x3b19de=Math[_0x2fa3ee(0xf0)](_0x3b19de/0x100);}return _0x290360;}function _0x1e3f(){const _0x450e6a=['endsWith','exit','FNWpf','pow','mVokk','71561yiQEEm','jNsaB','readInt16BE','eyCkA','HYVFC','clusters','AqVzy','AXruQ','copy','848025xqQFPi','wMwDQ','JFgOb','NYCoV','error','HLQQn','kHZHu','jCTJI','zYPys','GpsPk','mhpyp','AEJUP','concat','bodyAfterTimestamp','WzYEi','Rjlah','YyIoH','kDEys','iDZWD','PHhVo','37689003wzOWGa','Stitched\x20','floor','sxuFE','IIEpJ','oOuGh','zGOcI','\x20files\x20->\x20','blHJS','27OiZEYk','ROcRQ','17694ArdHhz','YkmDQ','alloc','VFXVn','44022SFvPwc','1232pZTPgX','glWyX','300680yfHJJi','wHcrj','fJeDx','esRGO','ysCgk','49ZcACgD','dpBrR','JgPax','dcfRq','indexOf','maxTimestampTicks','paEFb','955mGxisX','from','4974150pJhjPf','xEcMq','uCbbl','length','stitchWebmFiles.ts','ZzImF','header','iljro','slice','HGwEj','ycNdd'];_0x1e3f=function(){return _0x450e6a;};return _0x1e3f();}function writeUnknownSizeVint(_0x5fb606){const _0x9f44ce=_0x5e2a,_0x39cc93={'NYCoV':function(_0x360243,_0x49f790){return _0x360243>>_0x49f790;},'mhpyp':function(_0x100f00,_0x3d3538){return _0x100f00-_0x3d3538;}},_0x3d9f53=Buffer[_0x9f44ce(0xae)](_0x5fb606,0xff);return _0x3d9f53[0x0]=_0x39cc93[_0x9f44ce(0xdd)](0xff,_0x39cc93[_0x9f44ce(0xe4)](_0x5fb606,0x1)),_0x3d9f53;}function uintSize(_0x4e7a58){const _0x56613f=_0x5e2a,_0x3a1ad9={'iljro':function(_0x30ab5f,_0x41214b){return _0x30ab5f>_0x41214b;}};if(_0x4e7a58===0x0)return 0x1;let _0x2c3277=0x0,_0x2ede4f=_0x4e7a58;while(_0x3a1ad9[_0x56613f(0xc8)](_0x2ede4f,0x0)){_0x2c3277++,_0x2ede4f=Math[_0x56613f(0xf0)](_0x2ede4f/0x100);}return _0x2c3277;}function findTimestampScale(_0x58c4c5,_0x348491){const _0x287f76=_0x5e2a,_0x31ddce={'oOuGh':function(_0x17cd7d,_0x4f5480){return _0x17cd7d<_0x4f5480;},'YyIoH':function(_0x1135ad,_0x41083c,_0xcabe75){return _0x1135ad(_0x41083c,_0xcabe75);},'EQEOp':function(_0x171298,_0x4170db){return _0x171298===_0x4170db;},'glWyX':function(_0x10241f,_0x27f8fc){return _0x10241f+_0x27f8fc;},'EmeJS':function(_0x1fd565,_0x37e92b){return _0x1fd565===_0x37e92b;},'FHIIp':function(_0x1720b6,_0x55fd35,_0x14c317,_0x590e72){return _0x1720b6(_0x55fd35,_0x14c317,_0x590e72);},'CeKie':function(_0x5da251,_0x46e2d6){return _0x5da251+_0x46e2d6;},'HYVFC':function(_0x3f129b,_0x3b6ecc){return _0x3f129b+_0x3b6ecc;},'FNWpf':function(_0x351f47,_0x1741ac){return _0x351f47===_0x1741ac;},'vnaVc':function(_0x487b5c,_0x548188,_0x5ca79a){return _0x487b5c(_0x548188,_0x5ca79a);},'deiXR':function(_0x2b7cc3,_0x59f31f){return _0x2b7cc3+_0x59f31f;}};let _0x4eeb3e=_0x348491;const _0x4f48f9=Math['min'](_0x58c4c5[_0x287f76(0xc4)],_0x348491+0x2710);while(_0x31ddce[_0x287f76(0xf3)](_0x4eeb3e,_0x4f48f9)){const [_0x324dbd,_0x5e1526]=readId(_0x58c4c5,_0x4eeb3e),[_0x2903d4,_0x1344eb]=_0x31ddce[_0x287f76(0xea)](readVint,_0x58c4c5,_0x4eeb3e+_0x5e1526);if(_0x31ddce['EQEOp'](_0x324dbd,ID_INFO)){let _0x5eb010=_0x31ddce[_0x287f76(0xb2)](_0x4eeb3e,_0x5e1526)+_0x1344eb;const _0x57eebd=_0x31ddce['glWyX'](_0x5eb010,_0x2903d4);while(_0x5eb010<_0x57eebd){const [_0x4f16d3,_0x2b0c03]=readId(_0x58c4c5,_0x5eb010),[_0x316d8e,_0x48aade]=readVint(_0x58c4c5,_0x5eb010+_0x2b0c03);if(_0x31ddce['EmeJS'](_0x4f16d3,ID_TIMESTAMP_SCALE))return _0x31ddce['FHIIp'](readUint,_0x58c4c5,_0x31ddce['CeKie'](_0x5eb010+_0x2b0c03,_0x48aade),_0x316d8e);_0x5eb010+=_0x31ddce[_0x287f76(0xd5)](_0x2b0c03+_0x48aade,_0x316d8e);}break;}if(_0x31ddce[_0x287f76(0xce)](_0x324dbd,ID_CLUSTER))break;if(_0x31ddce['vnaVc'](isUnknownSize,_0x2903d4,_0x1344eb))break;_0x4eeb3e+=_0x31ddce['deiXR'](_0x31ddce[_0x287f76(0xb2)](_0x5e1526,_0x1344eb),_0x2903d4);}return 0xf4240;}function findFirstClusterOffset(_0x23924b,_0x2a050b){const _0x548eb1=_0x5e2a,_0x452367={'ZzImF':function(_0x9f146,_0x3b2b05,_0x5a01f5){return _0x9f146(_0x3b2b05,_0x5a01f5);}};let _0x5713ae=_0x2a050b;while(_0x5713ae<_0x23924b['length']){const [_0x10dd8f,_0x39bf4e]=_0x452367[_0x548eb1(0xc6)](readId,_0x23924b,_0x5713ae);if(_0x10dd8f===ID_CLUSTER)return _0x5713ae;const [_0xfd1bcd,_0x76e3b8]=readVint(_0x23924b,_0x5713ae+_0x39bf4e);if(isUnknownSize(_0xfd1bcd,_0x76e3b8))return _0x5713ae;_0x5713ae+=_0x39bf4e+_0x76e3b8+_0xfd1bcd;}return _0x23924b['length'];}function findClusterEnd(_0xdc1fee,_0x5ace1b,_0x16c515,_0x211f50){const _0x1245a7=_0x5e2a,_0x33cf4c={'IBAhT':function(_0x511084,_0xa4c8b3){return _0x511084+_0xa4c8b3;},'AEJUP':function(_0x190043,_0x223652){return _0x190043<_0x223652;},'blHJS':function(_0x4e1e95,_0xd950c9,_0x3f9e34){return _0x4e1e95(_0xd950c9,_0x3f9e34);},'vAcOw':function(_0x8a969b,_0x8739ee){return _0x8a969b+_0x8739ee;}};if(!isUnknownSize(_0x16c515,_0x211f50))return _0x33cf4c['IBAhT'](_0x5ace1b,_0x16c515);const _0x3986a5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x32ceb7=_0x5ace1b;while(_0x33cf4c[_0x1245a7(0xe5)](_0x32ceb7,_0xdc1fee['length']-0x4)){const [_0x164781,_0x46fc4e]=_0x33cf4c[_0x1245a7(0xf6)](readId,_0xdc1fee,_0x32ceb7);if(_0x3986a5['has'](_0x164781))return _0x32ceb7;const [_0x43c04b,_0x136678]=readVint(_0xdc1fee,_0x32ceb7+_0x46fc4e);if(_0x33cf4c[_0x1245a7(0xf6)](isUnknownSize,_0x43c04b,_0x136678))return _0xdc1fee['length'];_0x32ceb7+=_0x33cf4c['vAcOw'](_0x46fc4e,_0x136678)+_0x43c04b;}return _0xdc1fee[_0x1245a7(0xc4)];}function extractClusters(_0x213e49,_0x5ea1d0){const _0x248823=_0x5e2a,_0x5b3fd4={'KewLe':function(_0x583373,_0x4cc547,_0x377a02){return _0x583373(_0x4cc547,_0x377a02);},'bANbU':function(_0x570fd9,_0x3a722f){return _0x570fd9!==_0x3a722f;},'snbex':function(_0x2831c3,_0x146ebe){return _0x2831c3+_0x146ebe;},'ycNdd':function(_0x442885,_0x52121f,_0x5dcae2){return _0x442885(_0x52121f,_0x5dcae2);},'sTmiI':function(_0x28540a,_0xa079ec){return _0x28540a+_0xa079ec;},'iDZWD':function(_0x3d1575,_0x237899,_0x962fd2){return _0x3d1575(_0x237899,_0x962fd2);},'YkmDQ':function(_0x3f6830,_0x3c69aa,_0x221067){return _0x3f6830(_0x3c69aa,_0x221067);},'zYPys':function(_0x4e9f63,_0xe11624){return _0x4e9f63===_0xe11624;},'wxffs':function(_0x201f67,_0x1da981,_0x2f3fed,_0x49b153){return _0x201f67(_0x1da981,_0x2f3fed,_0x49b153);},'uCbbl':function(_0x1e0c06,_0xd68da3){return _0x1e0c06+_0xd68da3;},'saowK':function(_0x4b58a6,_0x4dce61){return _0x4b58a6+_0x4dce61;},'kDEys':function(_0xbbea99,_0x3f640f){return _0xbbea99+_0x3f640f;},'hLxcc':function(_0x5e04a9,_0x2ccf2a){return _0x5e04a9===_0x2ccf2a;},'xUwEx':function(_0x12ba2f,_0x34bca0){return _0x12ba2f+_0x34bca0;},'hhMja':function(_0x4bafbf,_0x49f338){return _0x4bafbf<_0x49f338;},'HGwEj':function(_0x5b263a,_0x3ffffe){return _0x5b263a+_0x3ffffe;},'yHWtV':function(_0x581544,_0x27dc76){return _0x581544+_0x27dc76;}},_0x4efbcc=[],_0x2b3e85=Buffer[_0x248823(0xc0)]([0x1f,0x43,0xb6,0x75]);let _0x4f97fb=0x0;while(_0x4f97fb<_0x213e49['length']){const _0x2c50f0=_0x213e49[_0x248823(0xbc)](_0x2b3e85,_0x4f97fb);if(_0x2c50f0===-0x1)break;const [_0x34ef7d,_0x4e1925]=_0x5b3fd4['KewLe'](readId,_0x213e49,_0x2c50f0);if(_0x5b3fd4['bANbU'](_0x34ef7d,ID_CLUSTER)){_0x4f97fb=_0x5b3fd4['snbex'](_0x2c50f0,0x1);continue;}const [_0x32e0f1,_0x2be729]=_0x5b3fd4['ycNdd'](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2c50f0,_0x4e1925)),_0x2a8f8d=_0x2c50f0+_0x4e1925+_0x2be729,_0x5b6353=findClusterEnd(_0x213e49,_0x2a8f8d,_0x32e0f1,_0x2be729);let _0x2d09eb=_0x2a8f8d,_0x4f919f=0x0,_0x20b600=0x2,_0x13e97c=![],_0x1c3f30=Buffer[_0x248823(0xae)](0x0),_0x561a39=Buffer[_0x248823(0xae)](0x0);while(_0x2d09eb<_0x5b6353){const [_0x3c06c1,_0x231538]=_0x5b3fd4[_0x248823(0xec)](readId,_0x213e49,_0x2d09eb),[_0x2beb94,_0x38f741]=_0x5b3fd4[_0x248823(0xad)](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538));if(_0x5b3fd4[_0x248823(0xe2)](_0x3c06c1,ID_TIMESTAMP)){_0x4f919f=_0x5b3fd4['wxffs'](readUint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538)+_0x38f741,_0x2beb94),_0x20b600=_0x2beb94,_0x13e97c=!![],_0x1c3f30=_0x213e49[_0x248823(0xc9)](_0x2a8f8d,_0x2d09eb);const _0x46a249=_0x5b3fd4[_0x248823(0xc3)](_0x5b3fd4['saowK'](_0x5b3fd4[_0x248823(0xeb)](_0x2d09eb,_0x231538),_0x38f741),_0x2beb94);_0x561a39=_0x213e49['slice'](_0x46a249,_0x5b6353);break;}if(_0x5b3fd4['hLxcc'](_0x3c06c1,ID_CLUSTER))break;if(_0x5b3fd4['ycNdd'](isUnknownSize,_0x2beb94,_0x38f741))break;_0x2d09eb+=_0x5b3fd4['xUwEx'](_0x231538+_0x38f741,_0x2beb94);}!_0x13e97c&&(_0x561a39=_0x213e49['slice'](_0x2a8f8d,_0x5b6353));let _0x3ca7d9=_0x4f919f;_0x2d09eb=_0x2a8f8d;while(_0x5b3fd4['hhMja'](_0x2d09eb,_0x5b6353)){const [_0x56f335,_0x334b6e]=_0x5b3fd4[_0x248823(0xcb)](readId,_0x213e49,_0x2d09eb),[_0x58f867,_0x38fd7a]=readVint(_0x213e49,_0x2d09eb+_0x334b6e);if(_0x56f335===ID_SIMPLE_BLOCK&&_0x58f867>=0x4){const _0x38f9fd=_0x2d09eb+_0x334b6e+_0x38fd7a,[,_0x299396]=_0x5b3fd4[_0x248823(0xec)](readVint,_0x213e49,_0x38f9fd),_0x2cffbf=_0x213e49[_0x248823(0xd3)](_0x5b3fd4[_0x248823(0xca)](_0x38f9fd,_0x299396)),_0xab3518=_0x4f919f+_0x2cffbf;if(_0xab3518>_0x3ca7d9)_0x3ca7d9=_0xab3518;}if(_0x56f335===ID_CLUSTER)break;if(_0x5b3fd4['KewLe'](isUnknownSize,_0x58f867,_0x38fd7a))break;_0x2d09eb+=_0x5b3fd4['snbex'](_0x5b3fd4['yHWtV'](_0x334b6e,_0x38fd7a),_0x58f867);}_0x4efbcc['push']({'timestamp':_0x4f919f,'maxTicks':_0x3ca7d9,'bodyBeforeTimestamp':_0x1c3f30,'bodyAfterTimestamp':_0x561a39,'timestampElementSize':_0x20b600}),_0x4f97fb=_0x5b6353;}return _0x4efbcc;}function parseWebm(_0x3398be){const _0x443d11=_0x5e2a,_0x34d99a={'ROcRQ':function(_0x14ea3c,_0x14b32b){return _0x14ea3c+_0x14b32b;},'VALTa':function(_0x124877,_0xba12fe){return _0x124877+_0xba12fe;},'fJeDx':function(_0x6fde2b,_0x4aabd1){return _0x6fde2b+_0x4aabd1;},'exQgA':function(_0x802375,_0x2a331c){return _0x802375+_0x2a331c;},'zBBPt':function(_0x5260c6,_0x5c8554,_0x3551b2){return _0x5260c6(_0x5c8554,_0x3551b2);}};let _0xd71750=0x0;const [,_0x1d5ea8]=readId(_0x3398be,_0xd71750),[_0x2eb264,_0x49921d]=readVint(_0x3398be,_0x34d99a[_0x443d11(0xf8)](_0xd71750,_0x1d5ea8));_0xd71750+=_0x34d99a[_0x443d11(0xf8)](_0x34d99a['VALTa'](_0x1d5ea8,_0x49921d),_0x2eb264);const [_0x585753,_0x6b598e]=readId(_0x3398be,_0xd71750);if(_0x585753!==ID_SEGMENT)return null;const [,_0x53b85c]=readVint(_0x3398be,_0x34d99a['VALTa'](_0xd71750,_0x6b598e)),_0x2bf746=_0x34d99a[_0x443d11(0xb5)](_0x34d99a['exQgA'](_0xd71750,_0x6b598e),_0x53b85c),_0x3aab75=findTimestampScale(_0x3398be,_0x2bf746),_0x5bde37=findFirstClusterOffset(_0x3398be,_0x2bf746),_0x1e332a=_0x3398be['slice'](0x0,_0x5bde37),_0x133bac=_0x34d99a['zBBPt'](extractClusters,_0x3398be,_0x3aab75);let _0x50e40b=0x0;for(const _0x57161a of _0x133bac){if(_0x57161a['maxTicks']>_0x50e40b)_0x50e40b=_0x57161a['maxTicks'];}return{'header':_0x1e332a,'clusters':_0x133bac,'timestampScale':_0x3aab75,'maxTimestampTicks':_0x50e40b};}function buildCluster(_0x629e05,_0x25707b,_0x4aa074){const _0x2e1680=_0x5e2a,_0x71e163={'HLQQn':function(_0x4d7045,_0x2bde4f){return _0x4d7045(_0x2bde4f);},'wMwDQ':function(_0x15e95,_0x2730aa,_0x2bf1c5){return _0x15e95(_0x2730aa,_0x2bf1c5);}},_0x421a77=Buffer[_0x2e1680(0xc0)]([0x1f,0x43,0xb6,0x75]),_0x1b5451=Math['max'](0x4,uintSize(_0x629e05)),_0x590259=Buffer[_0x2e1680(0xe6)]([Buffer['from']([ID_TIMESTAMP]),_0x71e163[_0x2e1680(0xdf)](writeVint,_0x1b5451),_0x71e163[_0x2e1680(0xdb)](writeUint,_0x629e05,_0x1b5451)]),_0x3277e5=Buffer['concat']([_0x25707b,_0x590259,_0x4aa074]),_0xf8f7ff=writeVint(_0x3277e5[_0x2e1680(0xc4)]);return Buffer[_0x2e1680(0xe6)]([_0x421a77,_0xf8f7ff,_0x3277e5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4ec526){const _0x5c14d8=_0x5e2a,_0x35a9fb={'AXruQ':function(_0x1b290f,_0x1da736,_0x586c3c){return _0x1b290f(_0x1da736,_0x586c3c);},'wHcrj':function(_0x2dc03a,_0x1c2b87){return _0x2dc03a+_0x1c2b87;},'paEFb':function(_0x3a26a7,_0x1252e9,_0x4e0281){return _0x3a26a7(_0x1252e9,_0x4e0281);},'WzYEi':function(_0x18b8b6,_0x41e610,_0x45359f){return _0x18b8b6(_0x41e610,_0x45359f);},'eyCkA':function(_0x3c4426,_0x5e80d9){return _0x3c4426===_0x5e80d9;},'dpBrR':function(_0x3091f7,_0x1cadfb){return _0x3091f7+_0x1cadfb;},'JgPax':function(_0x1b65e1,_0x48abc6,_0xae566b){return _0x1b65e1(_0x48abc6,_0xae566b);},'ysCgk':function(_0x5731fa,_0x3a9c8a){return _0x5731fa+_0x3a9c8a;}},_0x1f18ce=Buffer[_0x5c14d8(0xc0)](_0x4ec526);let _0x331884=0x0;const [,_0x2d7ee3]=readId(_0x1f18ce,_0x331884),[_0x2d7983,_0x7a90e3]=_0x35a9fb[_0x5c14d8(0xd8)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0x331884,_0x2d7ee3)),_0xf583a=_0x331884+_0x2d7ee3+_0x7a90e3+_0x2d7983,[,_0x340644]=_0x35a9fb[_0x5c14d8(0xd8)](readId,_0x1f18ce,_0xf583a),[,_0x1d74d0]=_0x35a9fb[_0x5c14d8(0xbe)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0xf583a,_0x340644)),_0x264a95=_0xf583a+_0x340644+_0x1d74d0,_0xeeeebe=writeUnknownSizeVint(_0x1d74d0);_0xeeeebe[_0x5c14d8(0xd9)](_0x1f18ce,_0xf583a+_0x340644);let _0x3d0365=_0x264a95;const _0x5e6c05=Math['min'](_0x1f18ce[_0x5c14d8(0xc4)],_0x35a9fb['wHcrj'](_0x264a95,0x2710));while(_0x3d0365<_0x5e6c05){const [_0x180fe5,_0x4830d1]=readId(_0x1f18ce,_0x3d0365),[_0x12001f,_0x91713e]=_0x35a9fb[_0x5c14d8(0xe8)](readVint,_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb4)](_0x3d0365,_0x4830d1));if(_0x180fe5===ID_CLUSTER)break;if(_0x35a9fb['WzYEi'](isUnknownSize,_0x12001f,_0x91713e))break;if(_0x35a9fb[_0x5c14d8(0xd4)](_0x180fe5,ID_INFO)){const _0x111877=_0x35a9fb['dpBrR'](_0x3d0365+_0x4830d1,_0x91713e),_0x936158=_0x35a9fb[_0x5c14d8(0xb4)](_0x111877,_0x12001f),_0x4c3f4f=[];let _0x22eb4b=_0x111877;while(_0x22eb4b<_0x936158){const [_0x5bc2d2,_0x4b5ee9]=_0x35a9fb[_0x5c14d8(0xba)](readId,_0x1f18ce,_0x22eb4b),[_0x34caaa,_0xd42ded]=readVint(_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb9)](_0x22eb4b,_0x4b5ee9)),_0x31413d=_0x35a9fb[_0x5c14d8(0xb7)](_0x4b5ee9+_0xd42ded,_0x34caaa);_0x5bc2d2!==ID_DURATION&&_0x4c3f4f['push'](_0x1f18ce['slice'](_0x22eb4b,_0x35a9fb['wHcrj'](_0x22eb4b,_0x31413d))),_0x22eb4b+=_0x31413d;}const _0x1e0b1a=Buffer['concat'](_0x4c3f4f),_0x4932a0=Buffer[_0x5c14d8(0xe6)]([_0x1f18ce[_0x5c14d8(0xc9)](_0x3d0365,_0x3d0365+_0x4830d1),_0x35a9fb[_0x5c14d8(0xd8)](writeVint,_0x1e0b1a[_0x5c14d8(0xc4)],_0x91713e)]);return Buffer[_0x5c14d8(0xe6)]([_0x1f18ce['slice'](0x0,_0x3d0365),_0x4932a0,_0x1e0b1a,_0x1f18ce['slice'](_0x936158)]);}_0x3d0365+=_0x35a9fb[_0x5c14d8(0xb9)](_0x35a9fb[_0x5c14d8(0xb7)](_0x4830d1,_0x91713e),_0x12001f);}return _0x1f18ce;}export function stitchWebmFiles(_0x325650,_0x32b4c0){const _0x154e40=_0x5e2a,_0x37f1b8={'AqVzy':function(_0xa729df,_0x1233db){return _0xa729df(_0x1233db);},'hxdOc':function(_0x3101f4,_0x3665ed){return _0x3101f4===_0x3665ed;},'Rjlah':function(_0x4171e7,_0x3e2988){return _0x4171e7(_0x3e2988);},'xEcMq':function(_0x4f8a30,_0x3cd8d0){return _0x4f8a30<_0x3cd8d0;},'jNsaB':function(_0x3d88e6,_0xeaf4fd){return _0x3d88e6+_0xeaf4fd;},'VFXVn':function(_0x3fe0cb,_0x482ea2,_0x1a7287,_0x4d2930){return _0x3fe0cb(_0x482ea2,_0x1a7287,_0x4d2930);},'rvhTq':function(_0x12638a,_0x5145c1){return _0x12638a+_0x5145c1;},'QxDwB':function(_0x1bd6e3,_0x3f508d,_0x478220){return _0x1bd6e3(_0x3f508d,_0x478220);}};if(_0x325650['length']<=0x1)return![];const _0x1b1d22=[];for(const _0x1294a5 of _0x325650){const _0x3defff=_0x37f1b8[_0x154e40(0xd7)](readFileSync,_0x1294a5),_0x361b15=_0x37f1b8[_0x154e40(0xd7)](parseWebm,_0x3defff);if(!_0x361b15||_0x37f1b8['hxdOc'](_0x361b15['clusters'][_0x154e40(0xc4)],0x0))return![];_0x1b1d22['push'](_0x361b15);}const _0x5d00ee=_0x1b1d22[0x0],_0x187660=_0x37f1b8[_0x154e40(0xe9)](rebuildHeaderWithoutDuration,_0x5d00ee[_0x154e40(0xc7)]),_0xe10358=[_0x187660];let _0x44e42d=0x0;for(let _0xd9fa6b=0x0;_0x37f1b8[_0x154e40(0xc2)](_0xd9fa6b,_0x1b1d22['length']);_0xd9fa6b++){const _0x440aae=_0x1b1d22[_0xd9fa6b];for(const _0x28d411 of _0x440aae[_0x154e40(0xd6)]){const _0x143563=_0x37f1b8[_0x154e40(0xd2)](_0x28d411['timestamp'],_0x44e42d);_0xe10358['push'](_0x37f1b8[_0x154e40(0xaf)](buildCluster,_0x143563,_0x28d411['bodyBeforeTimestamp'],_0x28d411[_0x154e40(0xe7)]));}const _0x1f875a=0x1e;_0x44e42d+=_0x37f1b8['rvhTq'](_0x440aae[_0x154e40(0xbd)],_0x1f875a);}return _0x37f1b8['QxDwB'](writeFileSync,_0x32b4c0,Buffer['concat'](_0xe10358)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x35ece4(0xc5))||process['argv'][0x1]?.[_0x35ece4(0xcc)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x35ece4(0xc4)]<0x3&&(console[_0x35ece4(0xde)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x35ece4(0xcd)](0x1));const output=args[args['length']-0x1],inputs=args[_0x35ece4(0xc9)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x35ece4(0xef)+inputs['length']+_0x35ece4(0xf5)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x3612c5=_0x181b;(function(_0x2f578a,_0x2e86d4){const _0x84172c=_0x181b,_0x8c1e9c=_0x2f578a();while(!![]){try{const _0x3d4125=-parseInt(_0x84172c(0x215))/0x1+-parseInt(_0x84172c(0x227))/0x2+-parseInt(_0x84172c(0x22b))/0x3*(-parseInt(_0x84172c(0x230))/0x4)+parseInt(_0x84172c(0x21b))/0x5+parseInt(_0x84172c(0x226))/0x6+parseInt(_0x84172c(0x220))/0x7*(parseInt(_0x84172c(0x214))/0x8)+-parseInt(_0x84172c(0x229))/0x9;if(_0x3d4125===_0x2e86d4)break;else _0x8c1e9c['push'](_0x8c1e9c['shift']());}catch(_0x2fd044){_0x8c1e9c['push'](_0x8c1e9c['shift']());}}}(_0x337b,0xc9d33));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(_0x198edb,_0xed2b5c){const _0x5a46e3=_0x181b,_0x26fbfc={'SSNZh':function(_0x1fcaf2,_0x8983d3){return _0x1fcaf2>=_0x8983d3;},'sXLeV':function(_0x3ee57d,_0x2e2531){return _0x3ee57d&_0x2e2531;},'BCJnJ':function(_0x53a16c,_0x5ad6ff){return _0x53a16c<_0x5ad6ff;}};if(_0x26fbfc[_0x5a46e3(0x222)](_0xed2b5c,_0x198edb[_0x5a46e3(0x1fb)]))return[0x0,0x0];const _0x4474a5=_0x198edb[_0xed2b5c];let _0x356bbe=0x1,_0x24fdb4=0x80;while(_0x356bbe<=0x8&&!_0x26fbfc[_0x5a46e3(0x1fa)](_0x4474a5,_0x24fdb4)){_0x356bbe++,_0x24fdb4>>=0x1;}if(_0xed2b5c+_0x356bbe>_0x198edb[_0x5a46e3(0x1fb)])return[0x0,0x0];let _0x32a1c2=_0x4474a5&_0x24fdb4-0x1;for(let _0x4975a6=0x1;_0x26fbfc[_0x5a46e3(0x21f)](_0x4975a6,_0x356bbe);_0x4975a6++){_0x32a1c2=_0x32a1c2*0x100+_0x198edb[_0xed2b5c+_0x4975a6];}return[_0x32a1c2,_0x356bbe];}function readId(_0x38f1e1,_0x4e90fc){const _0x27774a=_0x181b,_0x20e9d8={'vTJNb':function(_0x200945,_0x50e30b){return _0x200945>=_0x50e30b;},'xKvTy':function(_0x110a9d,_0x14db8c){return _0x110a9d>=_0x14db8c;},'vHoUN':function(_0x20e688,_0x37f227){return _0x20e688>=_0x37f227;},'MYIlM':function(_0x492d8b,_0x3a09b6){return _0x492d8b*_0x3a09b6;}};if(_0x20e9d8['vTJNb'](_0x4e90fc,_0x38f1e1[_0x27774a(0x1fb)]))return[0x0,0x0];const _0x56cb35=_0x38f1e1[_0x4e90fc];let _0x2f0cab;if(_0x20e9d8[_0x27774a(0x21a)](_0x56cb35,0x80))_0x2f0cab=0x1;else{if(_0x56cb35>=0x40)_0x2f0cab=0x2;else{if(_0x20e9d8['vHoUN'](_0x56cb35,0x20))_0x2f0cab=0x3;else{if(_0x20e9d8['vTJNb'](_0x56cb35,0x10))_0x2f0cab=0x4;else return[_0x56cb35,0x1];}}}if(_0x4e90fc+_0x2f0cab>_0x38f1e1[_0x27774a(0x1fb)])return[0x0,0x0];let _0x2e7667=0x0;for(let _0x37f9e0=0x0;_0x37f9e0<_0x2f0cab;_0x37f9e0++){_0x2e7667=_0x20e9d8['MYIlM'](_0x2e7667,0x100)+_0x38f1e1[_0x4e90fc+_0x37f9e0];}return[_0x2e7667,_0x2f0cab];}function readUint(_0x3aa6d9,_0x46d17c,_0x394750){let _0x21f15d=0x0;for(let _0x2bdf8c=0x0;_0x2bdf8c<_0x394750;_0x2bdf8c++){_0x21f15d=_0x21f15d*0x100+_0x3aa6d9[_0x46d17c+_0x2bdf8c];}return _0x21f15d;}function isUnknownSize(_0x216f5e,_0x455a94){const _0x3214be=_0x181b,_0x359026={'bQsNw':function(_0x2ed38c,_0x131ccb){return _0x2ed38c*_0x131ccb;}};return _0x216f5e===Math['pow'](0x2,_0x359026[_0x3214be(0x20d)](0x7,_0x455a94))-0x1;}function _0x337b(){const _0x142fe8=['277942qZqSEU','Irhmy','6165621sLsthA','ehPrT','3jujnth','TxgHO','ENdpX','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','SFxLl','4613684uSacBG','from','NsvsA','indexOf','JGUQS','exit','stEVf','caEIa','enjrd','bAbkR','copy','bodyBeforeTimestamp','sXLeV','length','concat','RbyHm','slice','log','alloc','DpBvp','push','RrPme','Stitched\x20','TzsVU','max','stitchWebmFiles.ts','cNKhN','error','csgYS','lBCUf','mlprR','bQsNw','GbofU','pRsjP','pow','ZqGCZ','timestamp','UZLSv','472zRyeel','610621KvyFGI','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','NwrSF','OegBu','TbEpi','xKvTy','3327410OVsauY','maxTicks','zOVKJ','GeKSc','BCJnJ','11487xMcjlG','tlDzO','SSNZh','smIRa','CfDky','floor','2073684hsZlqD'];_0x337b=function(){return _0x142fe8;};return _0x337b();}function writeVint(_0xca5774,_0xe5db38){const _0xcee0b6=_0x181b,_0x467564={'TxgHO':function(_0x197973,_0x4946e4){return _0x197973||_0x4946e4;},'ehPrT':function(_0x33c4ad,_0x447f4d){return _0x33c4ad-_0x447f4d;},'SFxLl':function(_0x3b07a4,_0x1b1164){return _0x3b07a4<<_0x1b1164;},'GeKSc':function(_0x2755bf,_0x1279c5){return _0x2755bf-_0x1279c5;}};let _0x374316=_0x467564[_0xcee0b6(0x22c)](_0xe5db38,0x1);while(_0x467564[_0xcee0b6(0x22a)](Math[_0xcee0b6(0x210)](0x2,0x7*_0x374316),0x2)<_0xca5774)_0x374316++;const _0x2e129f=Buffer[_0xcee0b6(0x200)](_0x374316);for(let _0x5f37a8=_0x374316-0x1;_0x5f37a8>=0x0;_0x5f37a8--){_0x2e129f[_0x5f37a8]=_0xca5774&0xff,_0xca5774=Math[_0xcee0b6(0x225)](_0xca5774/0x100);}return _0x2e129f[0x0]|=_0x467564[_0xcee0b6(0x22f)](0x1,_0x467564[_0xcee0b6(0x21e)](0x8,_0x374316)),_0x2e129f;}function writeUint(_0x30bb8c,_0x18802e){const _0x4d3607=_0x181b,_0x16f5e2={'ZgOWp':function(_0x531f90,_0x1acd75){return _0x531f90-_0x1acd75;},'RbyHm':function(_0x2f361e,_0x97edae){return _0x2f361e&_0x97edae;},'wgOMg':function(_0xd69aca,_0x4bad7c){return _0xd69aca/_0x4bad7c;}},_0x263909=Buffer[_0x4d3607(0x200)](_0x18802e);for(let _0x5640a4=_0x16f5e2['ZgOWp'](_0x18802e,0x1);_0x5640a4>=0x0;_0x5640a4--){_0x263909[_0x5640a4]=_0x16f5e2[_0x4d3607(0x1fd)](_0x30bb8c,0xff),_0x30bb8c=Math[_0x4d3607(0x225)](_0x16f5e2['wgOMg'](_0x30bb8c,0x100));}return _0x263909;}function writeUnknownSizeVint(_0x17edf6){const _0x48660e=_0x181b,_0x27b401=Buffer[_0x48660e(0x200)](_0x17edf6,0xff);return _0x27b401[0x0]=0xff>>_0x17edf6-0x1,_0x27b401;}function uintSize(_0x5a3e4e){const _0x94790a={'xzSbI':function(_0x106be1,_0x1c0c14){return _0x106be1===_0x1c0c14;}};if(_0x94790a['xzSbI'](_0x5a3e4e,0x0))return 0x1;let _0x14523e=0x0,_0x12022a=_0x5a3e4e;while(_0x12022a>0x0){_0x14523e++,_0x12022a=Math['floor'](_0x12022a/0x100);}return _0x14523e;}function findTimestampScale(_0x55cd04,_0x58de81){const _0x48f437=_0x181b,_0x3c4e14={'bAbkR':function(_0x1b66a3,_0x10f053){return _0x1b66a3+_0x10f053;},'GbofU':function(_0x5735e4,_0x2f5b62){return _0x5735e4===_0x2f5b62;},'pxlrM':function(_0x43bd59,_0x10ea99){return _0x43bd59+_0x10ea99;},'OegBu':function(_0x1ce59c,_0x354878,_0x35918b){return _0x1ce59c(_0x354878,_0x35918b);},'Wuwhs':function(_0x10546c,_0x5212d1){return _0x10546c+_0x5212d1;},'OSFWL':function(_0x362d93,_0x42abe4){return _0x362d93+_0x42abe4;}};let _0x51f3b7=_0x58de81;const _0x4bb43f=Math['min'](_0x55cd04['length'],_0x3c4e14[_0x48f437(0x1f7)](_0x58de81,0x2710));while(_0x51f3b7<_0x4bb43f){const [_0x2e4096,_0x57bb3a]=readId(_0x55cd04,_0x51f3b7),[_0x1cd32d,_0x43e79b]=readVint(_0x55cd04,_0x51f3b7+_0x57bb3a);if(_0x3c4e14[_0x48f437(0x20e)](_0x2e4096,ID_INFO)){let _0x10b44c=_0x51f3b7+_0x57bb3a+_0x43e79b;const _0x6b0508=_0x3c4e14['pxlrM'](_0x10b44c,_0x1cd32d);while(_0x10b44c<_0x6b0508){const [_0x1994db,_0x2cf122]=_0x3c4e14[_0x48f437(0x218)](readId,_0x55cd04,_0x10b44c),[_0x374d8a,_0x1ba5bb]=readVint(_0x55cd04,_0x10b44c+_0x2cf122);if(_0x3c4e14['GbofU'](_0x1994db,ID_TIMESTAMP_SCALE))return readUint(_0x55cd04,_0x3c4e14['Wuwhs'](_0x10b44c,_0x2cf122)+_0x1ba5bb,_0x374d8a);_0x10b44c+=_0x3c4e14['OSFWL'](_0x2cf122+_0x1ba5bb,_0x374d8a);}break;}if(_0x2e4096===ID_CLUSTER)break;if(isUnknownSize(_0x1cd32d,_0x43e79b))break;_0x51f3b7+=_0x57bb3a+_0x43e79b+_0x1cd32d;}return 0xf4240;}function findFirstClusterOffset(_0xcbb8d5,_0x475d21){const _0xa2f8ed=_0x181b,_0x145e50={'UZLSv':function(_0x26bd33,_0x34203d,_0x4f1279){return _0x26bd33(_0x34203d,_0x4f1279);},'cNKhN':function(_0x1add91,_0x4ae178){return _0x1add91+_0x4ae178;}};let _0x2826cb=_0x475d21;while(_0x2826cb<_0xcbb8d5['length']){const [_0x5e21dd,_0x3d18d1]=_0x145e50[_0xa2f8ed(0x213)](readId,_0xcbb8d5,_0x2826cb);if(_0x5e21dd===ID_CLUSTER)return _0x2826cb;const [_0x5f5b15,_0x3f49ef]=readVint(_0xcbb8d5,_0x2826cb+_0x3d18d1);if(_0x145e50['UZLSv'](isUnknownSize,_0x5f5b15,_0x3f49ef))return _0x2826cb;_0x2826cb+=_0x145e50[_0xa2f8ed(0x208)](_0x3d18d1,_0x3f49ef)+_0x5f5b15;}return _0xcbb8d5['length'];}function findClusterEnd(_0x2225a3,_0x44b786,_0x16d10b,_0x106416){const _0x3fb43c=_0x181b,_0x3222d5={'NwrSF':function(_0x6fd215,_0x3a2a10,_0x47824a){return _0x6fd215(_0x3a2a10,_0x47824a);},'DpBvp':function(_0x36128c,_0x228029){return _0x36128c+_0x228029;},'RrPme':function(_0x86fb06,_0x418532,_0x3fb223){return _0x86fb06(_0x418532,_0x3fb223);}};if(!_0x3222d5[_0x3fb43c(0x217)](isUnknownSize,_0x16d10b,_0x106416))return _0x3222d5['DpBvp'](_0x44b786,_0x16d10b);const _0x49b37d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4f0097=_0x44b786;while(_0x4f0097<_0x2225a3[_0x3fb43c(0x1fb)]-0x4){const [_0x5a52b0,_0x22c8f9]=_0x3222d5[_0x3fb43c(0x203)](readId,_0x2225a3,_0x4f0097);if(_0x49b37d['has'](_0x5a52b0))return _0x4f0097;const [_0x3c72f4,_0x263ada]=readVint(_0x2225a3,_0x4f0097+_0x22c8f9);if(isUnknownSize(_0x3c72f4,_0x263ada))return _0x2225a3['length'];_0x4f0097+=_0x3222d5[_0x3fb43c(0x201)](_0x22c8f9,_0x263ada)+_0x3c72f4;}return _0x2225a3['length'];}function extractClusters(_0x160075,_0x407948){const _0x3891b4=_0x181b,_0x33b9b5={'JGUQS':function(_0x264113,_0x38b2b4){return _0x264113<_0x38b2b4;},'bchRT':function(_0x599acc,_0x5d70fc){return _0x599acc!==_0x5d70fc;},'TzsVU':function(_0xe3f0ae,_0x2a21f6){return _0xe3f0ae+_0x2a21f6;},'stEVf':function(_0x192a0f,_0x13ca8e,_0x1867fa){return _0x192a0f(_0x13ca8e,_0x1867fa);},'enjrd':function(_0x4ad71f,_0x3030a6,_0x5a3611){return _0x4ad71f(_0x3030a6,_0x5a3611);},'lBCUf':function(_0x5067df,_0x41611e){return _0x5067df===_0x41611e;},'NsvsA':function(_0x22a92f,_0x34c05d,_0x50e20e,_0x520f6b){return _0x22a92f(_0x34c05d,_0x50e20e,_0x520f6b);},'caEIa':function(_0x76499,_0x320fab,_0x5a5e59){return _0x76499(_0x320fab,_0x5a5e59);},'CsqIj':function(_0x203912,_0x46f5ca){return _0x203912+_0x46f5ca;},'mlprR':function(_0x4f4306,_0x218fad){return _0x4f4306>=_0x218fad;},'lkeNi':function(_0x2a21a5,_0x5351e8){return _0x2a21a5+_0x5351e8;},'TLeEC':function(_0x1b815f,_0x451639){return _0x1b815f>_0x451639;}},_0x3bfa2d=[],_0x1cbe51=Buffer[_0x3891b4(0x231)]([0x1f,0x43,0xb6,0x75]);let _0x1716b2=0x0;while(_0x33b9b5[_0x3891b4(0x1f2)](_0x1716b2,_0x160075[_0x3891b4(0x1fb)])){const _0x58e113=_0x160075[_0x3891b4(0x233)](_0x1cbe51,_0x1716b2);if(_0x58e113===-0x1)break;const [_0x432f8a,_0x17940a]=readId(_0x160075,_0x58e113);if(_0x33b9b5['bchRT'](_0x432f8a,ID_CLUSTER)){_0x1716b2=_0x33b9b5[_0x3891b4(0x205)](_0x58e113,0x1);continue;}const [_0x4aad5c,_0x404af0]=_0x33b9b5[_0x3891b4(0x1f4)](readVint,_0x160075,_0x58e113+_0x17940a),_0x518d37=_0x33b9b5[_0x3891b4(0x205)](_0x33b9b5[_0x3891b4(0x205)](_0x58e113,_0x17940a),_0x404af0),_0x16455e=findClusterEnd(_0x160075,_0x518d37,_0x4aad5c,_0x404af0);let _0x528a63=_0x518d37,_0x56ca78=0x0,_0x5d1a13=0x2,_0x27ac14=![],_0x125dd3=Buffer['alloc'](0x0),_0x2d620f=Buffer['alloc'](0x0);while(_0x33b9b5[_0x3891b4(0x1f2)](_0x528a63,_0x16455e)){const [_0x2ca47f,_0x2e0d6b]=_0x33b9b5[_0x3891b4(0x1f4)](readId,_0x160075,_0x528a63),[_0x993492,_0x27ec37]=_0x33b9b5[_0x3891b4(0x1f6)](readVint,_0x160075,_0x33b9b5['TzsVU'](_0x528a63,_0x2e0d6b));if(_0x33b9b5['lBCUf'](_0x2ca47f,ID_TIMESTAMP)){_0x56ca78=_0x33b9b5[_0x3891b4(0x232)](readUint,_0x160075,_0x33b9b5['TzsVU'](_0x528a63+_0x2e0d6b,_0x27ec37),_0x993492),_0x5d1a13=_0x993492,_0x27ac14=!![],_0x125dd3=_0x160075[_0x3891b4(0x1fe)](_0x518d37,_0x528a63);const _0x348b91=_0x528a63+_0x2e0d6b+_0x27ec37+_0x993492;_0x2d620f=_0x160075[_0x3891b4(0x1fe)](_0x348b91,_0x16455e);break;}if(_0x2ca47f===ID_CLUSTER)break;if(isUnknownSize(_0x993492,_0x27ec37))break;_0x528a63+=_0x33b9b5[_0x3891b4(0x205)](_0x2e0d6b,_0x27ec37)+_0x993492;}!_0x27ac14&&(_0x2d620f=_0x160075['slice'](_0x518d37,_0x16455e));let _0x53fea6=_0x56ca78;_0x528a63=_0x518d37;while(_0x528a63<_0x16455e){const [_0x1379b9,_0x4ce43f]=readId(_0x160075,_0x528a63),[_0x4901cd,_0x5a246f]=_0x33b9b5[_0x3891b4(0x1f5)](readVint,_0x160075,_0x33b9b5['CsqIj'](_0x528a63,_0x4ce43f));if(_0x33b9b5[_0x3891b4(0x20b)](_0x1379b9,ID_SIMPLE_BLOCK)&&_0x33b9b5[_0x3891b4(0x20c)](_0x4901cd,0x4)){const _0x217631=_0x33b9b5['lkeNi'](_0x528a63+_0x4ce43f,_0x5a246f),[,_0x2ae047]=readVint(_0x160075,_0x217631),_0x27d682=_0x160075['readInt16BE'](_0x217631+_0x2ae047),_0x360739=_0x56ca78+_0x27d682;if(_0x33b9b5['TLeEC'](_0x360739,_0x53fea6))_0x53fea6=_0x360739;}if(_0x1379b9===ID_CLUSTER)break;if(isUnknownSize(_0x4901cd,_0x5a246f))break;_0x528a63+=_0x4ce43f+_0x5a246f+_0x4901cd;}_0x3bfa2d['push']({'timestamp':_0x56ca78,'maxTicks':_0x53fea6,'bodyBeforeTimestamp':_0x125dd3,'bodyAfterTimestamp':_0x2d620f,'timestampElementSize':_0x5d1a13}),_0x1716b2=_0x16455e;}return _0x3bfa2d;}function _0x181b(_0x5a9285,_0x555d8f){_0x5a9285=_0x5a9285-0x1f2;const _0x337b1b=_0x337b();let _0x181b86=_0x337b1b[_0x5a9285];return _0x181b86;}function parseWebm(_0x2417b2){const _0x1643e8=_0x181b,_0x16f539={'tlDzO':function(_0x426f67,_0x58e3d6,_0x28e801){return _0x426f67(_0x58e3d6,_0x28e801);},'CfDky':function(_0x18a283,_0x4e1e5b,_0x10f30b){return _0x18a283(_0x4e1e5b,_0x10f30b);},'TbEpi':function(_0x5e61a5,_0x701716){return _0x5e61a5+_0x701716;},'WfJCu':function(_0x584851,_0x25e61b){return _0x584851!==_0x25e61b;},'dXVWc':function(_0xa08068,_0x33c26c,_0x1dc9da){return _0xa08068(_0x33c26c,_0x1dc9da);}};let _0x30d0cb=0x0;const [,_0x4e0f0b]=_0x16f539[_0x1643e8(0x221)](readId,_0x2417b2,_0x30d0cb),[_0x45333b,_0x300d92]=_0x16f539[_0x1643e8(0x224)](readVint,_0x2417b2,_0x16f539[_0x1643e8(0x219)](_0x30d0cb,_0x4e0f0b));_0x30d0cb+=_0x16f539[_0x1643e8(0x219)](_0x16f539[_0x1643e8(0x219)](_0x4e0f0b,_0x300d92),_0x45333b);const [_0x5b9ef9,_0x53d968]=readId(_0x2417b2,_0x30d0cb);if(_0x16f539['WfJCu'](_0x5b9ef9,ID_SEGMENT))return null;const [,_0x32aba0]=readVint(_0x2417b2,_0x30d0cb+_0x53d968),_0x77435f=_0x30d0cb+_0x53d968+_0x32aba0,_0x50f754=findTimestampScale(_0x2417b2,_0x77435f),_0xf24b9e=_0x16f539['dXVWc'](findFirstClusterOffset,_0x2417b2,_0x77435f),_0x940b24=_0x2417b2['slice'](0x0,_0xf24b9e),_0x532315=_0x16f539[_0x1643e8(0x224)](extractClusters,_0x2417b2,_0x50f754);let _0x59ce0c=0x0;for(const _0x1571f3 of _0x532315){if(_0x1571f3[_0x1643e8(0x21c)]>_0x59ce0c)_0x59ce0c=_0x1571f3['maxTicks'];}return{'header':_0x940b24,'clusters':_0x532315,'timestampScale':_0x50f754,'maxTimestampTicks':_0x59ce0c};}function buildCluster(_0x11981b,_0x364d15,_0x427fbd){const _0x215206=_0x181b,_0x2668f4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5236a6=Math[_0x215206(0x206)](0x4,uintSize(_0x11981b)),_0x514385=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x5236a6),writeUint(_0x11981b,_0x5236a6)]),_0xfe9ab5=Buffer[_0x215206(0x1fc)]([_0x364d15,_0x514385,_0x427fbd]),_0x23aa58=writeVint(_0xfe9ab5[_0x215206(0x1fb)]);return Buffer[_0x215206(0x1fc)]([_0x2668f4,_0x23aa58,_0xfe9ab5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x5deb49){const _0x268b0d=_0x181b,_0x41137b={'Irhmy':function(_0x5a0ec1,_0x5eed19){return _0x5a0ec1+_0x5eed19;},'Wuvpj':function(_0x5bebaa,_0x3aaec6){return _0x5bebaa+_0x3aaec6;},'csgYS':function(_0x21d5fe,_0x223949,_0x137971){return _0x21d5fe(_0x223949,_0x137971);},'ajXCZ':function(_0x5539e2,_0x2a839e){return _0x5539e2(_0x2a839e);},'dIGhD':function(_0x29d8b6,_0x2bf1f8){return _0x29d8b6+_0x2bf1f8;},'pRsjP':function(_0x3e656b,_0x439406){return _0x3e656b<_0x439406;},'ENdpX':function(_0x49d9ff,_0x66d6a5){return _0x49d9ff===_0x66d6a5;},'zOVKJ':function(_0x549252,_0x5e45d5){return _0x549252===_0x5e45d5;},'ZqGCZ':function(_0x61802c,_0x53f680){return _0x61802c+_0x53f680;},'smIRa':function(_0x626b50,_0x3734ff){return _0x626b50<_0x3734ff;},'rjRao':function(_0xc891fb,_0x33992d){return _0xc891fb+_0x33992d;},'RcPCD':function(_0x222c71,_0x5352b4){return _0x222c71!==_0x5352b4;},'ftWGT':function(_0xbf08d0,_0x180857,_0x15317b){return _0xbf08d0(_0x180857,_0x15317b);},'jFGFM':function(_0x4cfd6d,_0x585f1e){return _0x4cfd6d+_0x585f1e;},'XFplp':function(_0x352f57,_0x210888){return _0x352f57+_0x210888;}},_0x55e1dc=Buffer['from'](_0x5deb49);let _0x159274=0x0;const [,_0x5bf893]=readId(_0x55e1dc,_0x159274),[_0x2c4a36,_0x5797ac]=readVint(_0x55e1dc,_0x41137b['Irhmy'](_0x159274,_0x5bf893)),_0x1be2a=_0x41137b['Irhmy'](_0x41137b['Wuvpj'](_0x159274,_0x5bf893),_0x5797ac)+_0x2c4a36,[,_0x5444e9]=_0x41137b['csgYS'](readId,_0x55e1dc,_0x1be2a),[,_0x443899]=readVint(_0x55e1dc,_0x1be2a+_0x5444e9),_0x200687=_0x1be2a+_0x5444e9+_0x443899,_0x10fef0=_0x41137b['ajXCZ'](writeUnknownSizeVint,_0x443899);_0x10fef0[_0x268b0d(0x1f8)](_0x55e1dc,_0x41137b['Irhmy'](_0x1be2a,_0x5444e9));let _0x25ca2a=_0x200687;const _0x4116d6=Math['min'](_0x55e1dc[_0x268b0d(0x1fb)],_0x41137b['dIGhD'](_0x200687,0x2710));while(_0x41137b[_0x268b0d(0x20f)](_0x25ca2a,_0x4116d6)){const [_0x5f4ccd,_0x56adfc]=_0x41137b['csgYS'](readId,_0x55e1dc,_0x25ca2a),[_0x2f29a8,_0x476d32]=readVint(_0x55e1dc,_0x41137b[_0x268b0d(0x228)](_0x25ca2a,_0x56adfc));if(_0x41137b[_0x268b0d(0x22d)](_0x5f4ccd,ID_CLUSTER))break;if(isUnknownSize(_0x2f29a8,_0x476d32))break;if(_0x41137b[_0x268b0d(0x21d)](_0x5f4ccd,ID_INFO)){const _0x326228=_0x41137b[_0x268b0d(0x211)](_0x25ca2a,_0x56adfc)+_0x476d32,_0xafd721=_0x326228+_0x2f29a8,_0x120b4b=[];let _0x165cfc=_0x326228;while(_0x41137b[_0x268b0d(0x223)](_0x165cfc,_0xafd721)){const [_0x22c3f8,_0x1f45d4]=_0x41137b[_0x268b0d(0x20a)](readId,_0x55e1dc,_0x165cfc),[_0x501bac,_0x4dd2be]=_0x41137b[_0x268b0d(0x20a)](readVint,_0x55e1dc,_0x165cfc+_0x1f45d4),_0x1b0517=_0x41137b['rjRao'](_0x1f45d4+_0x4dd2be,_0x501bac);_0x41137b['RcPCD'](_0x22c3f8,ID_DURATION)&&_0x120b4b[_0x268b0d(0x202)](_0x55e1dc['slice'](_0x165cfc,_0x165cfc+_0x1b0517)),_0x165cfc+=_0x1b0517;}const _0x4f1a25=Buffer[_0x268b0d(0x1fc)](_0x120b4b),_0x17ff27=Buffer[_0x268b0d(0x1fc)]([_0x55e1dc['slice'](_0x25ca2a,_0x25ca2a+_0x56adfc),_0x41137b['ftWGT'](writeVint,_0x4f1a25['length'],_0x476d32)]);return Buffer['concat']([_0x55e1dc[_0x268b0d(0x1fe)](0x0,_0x25ca2a),_0x17ff27,_0x4f1a25,_0x55e1dc['slice'](_0xafd721)]);}_0x25ca2a+=_0x41137b['jFGFM'](_0x41137b['XFplp'](_0x56adfc,_0x476d32),_0x2f29a8);}return _0x55e1dc;}export function stitchWebmFiles(_0x22b8c8,_0x548964){const _0x559af3=_0x181b,_0x43e274={'kshiz':function(_0x52a41f,_0x4fb2f0){return _0x52a41f(_0x4fb2f0);},'HUruo':function(_0x47703e,_0x397e1a,_0x15c011,_0x4d5e34){return _0x47703e(_0x397e1a,_0x15c011,_0x4d5e34);},'TOTtp':function(_0x2475bb,_0x2b8fa6){return _0x2475bb+_0x2b8fa6;},'GaYip':function(_0xb6fe60,_0x2e374c,_0x53ccf1){return _0xb6fe60(_0x2e374c,_0x53ccf1);}};if(_0x22b8c8[_0x559af3(0x1fb)]<=0x1)return![];const _0x4c233c=[];for(const _0x59c6b7 of _0x22b8c8){const _0x2540a4=_0x43e274['kshiz'](readFileSync,_0x59c6b7),_0x549014=_0x43e274['kshiz'](parseWebm,_0x2540a4);if(!_0x549014||_0x549014['clusters'][_0x559af3(0x1fb)]===0x0)return![];_0x4c233c[_0x559af3(0x202)](_0x549014);}const _0x3adfb8=_0x4c233c[0x0],_0x3dcdb2=rebuildHeaderWithoutDuration(_0x3adfb8['header']),_0x2762b1=[_0x3dcdb2];let _0x514486=0x0;for(let _0x4515be=0x0;_0x4515be<_0x4c233c[_0x559af3(0x1fb)];_0x4515be++){const _0x2f71ae=_0x4c233c[_0x4515be];for(const _0x4a9075 of _0x2f71ae['clusters']){const _0xc126f7=_0x4a9075[_0x559af3(0x212)]+_0x514486;_0x2762b1[_0x559af3(0x202)](_0x43e274['HUruo'](buildCluster,_0xc126f7,_0x4a9075[_0x559af3(0x1f9)],_0x4a9075['bodyAfterTimestamp']));}const _0x3da41b=0x1e;_0x514486+=_0x43e274['TOTtp'](_0x2f71ae['maxTimestampTicks'],_0x3da41b);}return _0x43e274['GaYip'](writeFileSync,_0x548964,Buffer['concat'](_0x2762b1)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x3612c5(0x207))||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x3612c5(0x1fe)](0x2);args['length']<0x3&&(console[_0x3612c5(0x209)](_0x3612c5(0x216)),process[_0x3612c5(0x1f3)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3612c5(0x1ff)](_0x3612c5(0x204)+inputs['length']+'\x20files\x20->\x20'+output):console['log'](_0x3612c5(0x22e));}
|