@ranger-testing/ranger-cli 3.1.5 → 3.1.6-alpha.4de822b-51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1e5a54,_0x2056f8){const _0x5e17ec=_0x49b4,_0x102813=_0x1e5a54();while(!![]){try{const _0x1d733=parseInt(_0x5e17ec(0x8d))/0x1+-parseInt(_0x5e17ec(0xb6))/0x2*(-parseInt(_0x5e17ec(0xab))/0x3)+-parseInt(_0x5e17ec(0xad))/0x4+parseInt(_0x5e17ec(0xb5))/0x5*(parseInt(_0x5e17ec(0x7c))/0x6)+parseInt(_0x5e17ec(0xb4))/0x7+parseInt(_0x5e17ec(0x73))/0x8+-parseInt(_0x5e17ec(0x97))/0x9;if(_0x1d733===_0x2056f8)break;else _0x102813['push'](_0x102813['shift']());}catch(_0xfa443){_0x102813['push'](_0x102813['shift']());}}}(_0x19e4,0x88876));function _0x19e4(){const _0xf0c03f=['resolvedEnv','figbT','uiQlV','RANGER_SESSION_STATE_PATH=','2124138hbzlBy','iCofa','2668436ZSabBq','message','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','key','Profile\x20\x22','lunKt','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','2963478OlAInW','2214755VPzLZM','2flEkwI','skDSY','VDUwf','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','7867392JOekYS','`\x20to\x20recreate\x20it.','FEcat','\x22.\x20Pass\x20--profile\x20','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','name','\x20\x20Note:\x20--env\x20\x22','local','UcbQd','6UkYIQU','startPath','env','BNYRy','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','source','telemetry','aWqDf','ZmzYG','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','log','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','prompt','authEnv','\x20does\x20not\x20exist.','gehWY','baseUrl','1084124HuheUM','list','kYhSY','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','`ranger\x20profile\x20add`\x20to\x20create\x20one.','envBaseUrl','settings','envStartPath','domains','21740112RSbhdq','KZnRu','laEcA','UGQpP','ySFwh','\x20to\x20override.','KNHuo','kYpOf','profile','RANGER_SESSION_STATE_PATH','cdpEndpoint','GWisu','environmentKey','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','cwd','taIpE'];_0x19e4=function(){return _0xf0c03f;};return _0x19e4();}import{existsSync}from'fs';import _0x342380 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x4a9cc4){const _0x4af5e0=_0x49b4,_0xfba835={'kYpOf':function(_0x5982c2){return _0x5982c2();},'UcbQd':function(_0x4b4c41){return _0x4b4c41();},'dBwum':function(_0x4b1d09,_0x38967c){return _0x4b1d09!==_0x38967c;},'BNYRy':function(_0x34c729,_0x3ade94){return _0x34c729(_0x3ade94);},'FEcat':function(_0xf1d115,_0x481ece){return _0xf1d115??_0x481ece;},'ZmzYG':function(_0x173554,_0x3828c6){return _0x173554+_0x3828c6;},'figbT':function(_0x5bf103,_0x1a156c){return _0x5bf103+_0x1a156c;},'vzxrX':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','uiQlV':_0x4af5e0(0x85),'GWisu':function(_0x3549c5,_0x4fea1f){return _0x3549c5(_0x4fea1f);},'UGQpP':function(_0x824fe8,_0xcc4866){return _0x824fe8 instanceof _0xcc4866;},'akaQH':function(_0x1dd704,_0x38f4bc){return _0x1dd704===_0x38f4bc;},'laEcA':function(_0x4a6528,_0xf5caf){return _0x4a6528+_0xf5caf;},'BRKRe':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','pgvXB':_0x4af5e0(0x92),'vprfx':function(_0x78d812,_0xef3ad5){return _0x78d812&&_0xef3ad5;},'KZnRu':'Local\x20profile','ySFwh':'cloud','zqiMW':function(_0x310386,_0x182559){return _0x310386===_0x182559;},'VDUwf':function(_0x300e42,_0x24491e,_0x4713ab){return _0x300e42(_0x24491e,_0x4713ab);},'lunKt':function(_0x54b837){return _0x54b837();},'NRZaI':function(_0x570bc3,_0x10e68e){return _0x570bc3(_0x10e68e);},'skDSY':function(_0x2f6b47,_0xf575b8){return _0x2f6b47(_0xf575b8);},'gehWY':function(_0x24d1b5,_0x295d8c){return _0x24d1b5+_0x295d8c;},'KNHuo':function(_0x564e60,_0x18fc61){return _0x564e60+_0x18fc61;},'taIpE':_0x4af5e0(0xb3),'EmjyP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'},_0x3d477b=_0x4a9cc4['profile'];let _0x299215=_0x3d477b,_0x1fa216=null;const _0xa87349=_0x3d477b?null:await _0xfba835[_0x4af5e0(0x9e)](readActiveProfileName);if(_0x4a9cc4['authEnv']&&_0x3d477b)console['log'](_0x4af5e0(0x79)+_0x4a9cc4[_0x4af5e0(0x89)]+_0x4af5e0(0x80));else _0x4a9cc4['authEnv']&&!process['env']['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x4a9cc4['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x3d477b&&process[_0x4af5e0(0x7e)]['RANGER_TEST_USERNAME'])try{const _0x531a27=await resolveAdHocProfile({'targetUrl':_0x4a9cc4[_0x4af5e0(0x8c)]??_0xfba835[_0x4af5e0(0x7b)](readUrlEnvVars)[_0x4af5e0(0x93)],'envKey':_0x4a9cc4['authEnv']});_0x531a27&&(_0xa87349&&_0xfba835['dBwum'](_0xa87349,_0x531a27[_0x4af5e0(0x78)])&&console[_0x4af5e0(0x86)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x531a27[_0x4af5e0(0x78)]+_0x4af5e0(0x72)+_0xa87349+_0x4af5e0(0x76)+_0xa87349+_0x4af5e0(0x9c)),_0x299215=_0x531a27[_0x4af5e0(0x78)],_0x1fa216=_0x531a27[_0x4af5e0(0x9f)]);}catch(_0xc83beb){if(!_0xa87349||_0x4a9cc4['authEnv'])throw _0xc83beb;console[_0x4af5e0(0x86)]('\x20\x20Warning:\x20'+(_0xc83beb instanceof Error?_0xc83beb[_0x4af5e0(0xae)]:_0xfba835[_0x4af5e0(0x7f)](String,_0xc83beb))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0xa87349+'\x22.');}if(!_0x299215)_0x299215=_0xfba835[_0x4af5e0(0x75)](_0xa87349,undefined);if(!_0x299215)try{const _0x30d411=await _0xfba835['UcbQd'](listCloudProfiles);if(_0x30d411['length']===0x1){const _0x5ef5ad=_0x30d411[0x0];_0x299215=_0x5ef5ad[_0x4af5e0(0x78)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x5ef5ad['name']),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x299215)throw new Error(_0xfba835[_0x4af5e0(0x84)](_0xfba835['ZmzYG'](_0xfba835[_0x4af5e0(0xa8)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x4af5e0(0x87))+_0xfba835['vzxrX'],_0xfba835[_0x4af5e0(0xa9)]),_0x4af5e0(0x77)));const _0x40b66e=_0xfba835[_0x4af5e0(0x7f)](getEnvDir,_0x299215),_0x5616ff=existsSync(_0x40b66e);let _0x4c31f2=_0x1fa216,_0x4dbb11=![];if(!_0x4c31f2)try{_0x4c31f2=await _0xfba835[_0x4af5e0(0xa2)](fetchCloudProfile,_0x299215);if(!_0x4c31f2)_0x4dbb11=!![];}catch(_0x4dc75b){_0xfba835[_0x4af5e0(0x9a)](_0x4dc75b,ApiError)&&_0xfba835['akaQH'](_0x4dc75b['status'],0x194)&&(_0x4dbb11=!![]);}if(_0x3d477b&&_0x4dbb11&&!_0x5616ff&&!_0x4c31f2)throw new Error(_0xfba835[_0x4af5e0(0x99)](_0x4af5e0(0xb1)+_0x3d477b+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0xfba835['BRKRe'])+_0xfba835['pgvXB']);if(_0xfba835['vprfx'](_0x4c31f2,_0x5616ff)){let _0x34777b=!![];if(isInteractive()){const {source:_0x298139}=await _0x342380[_0x4af5e0(0x88)]([{'type':_0x4af5e0(0x8e),'name':_0x4af5e0(0x81),'message':_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xa4),'choices':[{'name':'Cloud\x20profile\x20(recommended)','value':'cloud'},{'name':_0xfba835[_0x4af5e0(0x98)],'value':_0x4af5e0(0x7a)}],'default':_0xfba835[_0x4af5e0(0x9b)]}]);_0x34777b=_0xfba835['zqiMW'](_0x298139,_0xfba835[_0x4af5e0(0x9b)]);}if(!_0x34777b)_0x4c31f2=null;}const _0x27ee23=_0xfba835['VDUwf'](readProfileOverrides,process[_0x4af5e0(0xa5)](),_0x299215);let _0x35c1db=null,_0x177fd8,_0x2a8aa6,_0x32c6ba,_0x50c664,_0xe5dd3d=null,_0x289428,_0x5dafb3;const _0x4c4e89=_0xfba835[_0x4af5e0(0x7f)](expandOverrides,_0x27ee23),_0x145af6=_0xfba835[_0x4af5e0(0xb2)](readUrlEnvVars);if(_0x4c31f2){_0x35c1db=_0x4c31f2;const _0x447037=_0x4c31f2[_0x4af5e0(0x94)]??{},_0x511d5d=_0xfba835['VDUwf'](mergeCloudProfileSettings,_0x447037,_0x27ee23??undefined),_0x3df357={..._0x4c31f2,'settings':_0x511d5d};_0xe5dd3d={'baseUrl':_0xfba835[_0x4af5e0(0x7f)](expandString,_0x447037[_0x4af5e0(0x8c)]),'startPath':_0xfba835[_0x4af5e0(0xa2)](expandString,_0x447037[_0x4af5e0(0x7d)])};const _0x547697=await _0xfba835['UcbQd'](fetchAuthConfig),_0x551f80=_0x547697?resolveAuthEnvironmentLocally(_0x547697,_0x4c31f2[_0x4af5e0(0xa3)]):null;_0x289428=_0x551f80?.['domains']?.[0x0],_0x5dafb3=_0x551f80?.[_0x4af5e0(0xb0)];const _0x5551bf=_0xfba835[_0x4af5e0(0x7f)](resolveProfileUrl,{'flagBaseUrl':_0x4a9cc4[_0x4af5e0(0x8c)],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6[_0x4af5e0(0x95)],'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x50c640=process[_0x4af5e0(0x7e)][_0x4af5e0(0xa0)];if(_0x50c640){if(!_0xfba835[_0x4af5e0(0x7f)](existsSync,_0x50c640))throw new Error(_0x4af5e0(0xaa)+_0x50c640+_0x4af5e0(0x8a));_0x177fd8=_0x50c640,_0x2a8aa6=_0xfba835['NRZaI'](resolveEnvVars,_0x511d5d),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']);}else{const _0x2f0b44=await _0xfba835[_0x4af5e0(0xb8)](resolveCloudProfileSession,_0x3df357,{'effectiveBaseUrl':_0x5551bf[_0x4af5e0(0x8c)],'telemetry':_0x4a9cc4[_0x4af5e0(0x82)]});_0x177fd8=_0x2f0b44['authPath'],_0x2a8aa6=_0xfba835[_0x4af5e0(0xb7)](resolveEnvVars,_0x2f0b44[_0x4af5e0(0x94)]),_0x32c6ba=Boolean(_0x2a8aa6[_0x4af5e0(0xa1)]),_0x289428=_0x2f0b44['resolvedEnv']?.[_0x4af5e0(0x96)]?.[0x0],_0x5dafb3=_0x2f0b44[_0x4af5e0(0xa7)]?.['key'];}}else{if(!_0x5616ff){const _0x1a5eb7=!_0x3d477b;throw new Error(_0x1a5eb7?_0xfba835['gehWY'](_0xfba835[_0x4af5e0(0x8b)](_0xfba835[_0x4af5e0(0x9d)]('Active\x20profile\x20\x22'+_0x299215+_0x4af5e0(0x91),_0xfba835[_0x4af5e0(0xa6)]),_0xfba835['EmjyP']),_0x4af5e0(0x90)+_0x299215+_0x4af5e0(0x74)):_0x4af5e0(0xb1)+_0x299215+_0x4af5e0(0xaf)+_0x299215);}const _0x2c0a93=await loadSettings(_0x299215);_0x2a8aa6=_0xfba835['BNYRy'](resolveEnvVars,_0x2c0a93),_0x32c6ba=Boolean(_0x2a8aa6['cdpEndpoint']),_0x50c664=_0x2a8aa6['baseUrl'];}const _0x55f3fa=resolveProfileUrl({'flagBaseUrl':_0x4a9cc4['baseUrl'],'flagStartPath':_0x4a9cc4['startPath'],'envBaseUrl':_0x145af6[_0x4af5e0(0x93)],'envStartPath':_0x145af6['envStartPath'],'localSettingsBaseUrl':_0x50c664,'projectOverrides':_0x4c4e89,'cloudSettings':_0xe5dd3d,'authEnvironmentDomain':_0x289428}),_0x19c06c=_0x55f3fa['url']??_0x55f3fa['baseUrl'];if(!_0x19c06c&&!_0x32c6ba)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x299215+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x299215+'\x20baseUrl\x20<url>');return{'activeProfile':_0x299215,'resolvedCloudProfile':_0x35c1db,'cloudAuthPath':_0x177fd8,'resolvedSettings':_0x2a8aa6,'isCdpMode':_0x32c6ba,'url':_0x19c06c,'baseUrlSource':_0x55f3fa['baseUrlSource'],'authEnvKey':_0x5dafb3,'startPath':_0x55f3fa['startPath']};}function expandString(_0x1642f1){if(typeof _0x1642f1!=='string')return _0x1642f1;return resolveEnvVars(_0x1642f1);}function _0x49b4(_0x4632d4,_0x4a89a7){_0x4632d4=_0x4632d4-0x72;const _0x19e465=_0x19e4();let _0x49b467=_0x19e465[_0x4632d4];return _0x49b467;}function expandOverrides(_0xf9f49b){const _0x46efd8=_0x49b4,_0x2aaed5={'kYhSY':function(_0x2a999d,_0x2c9a58){return _0x2a999d===_0x2c9a58;},'iCofa':'string','aWqDf':function(_0x247c78,_0x3f8209){return _0x247c78(_0x3f8209);}};if(!_0xf9f49b)return _0xf9f49b;const _0xcc1765={..._0xf9f49b};return _0x2aaed5[_0x46efd8(0x8f)](typeof _0xcc1765[_0x46efd8(0x8c)],_0x2aaed5[_0x46efd8(0xac)])&&(_0xcc1765['baseUrl']=resolveEnvVars(_0xcc1765[_0x46efd8(0x8c)])),typeof _0xcc1765[_0x46efd8(0x7d)]==='string'&&(_0xcc1765[_0x46efd8(0x7d)]=_0x2aaed5[_0x46efd8(0x83)](resolveEnvVars,_0xcc1765['startPath'])),_0xcc1765;}
|
|
1
|
+
(function(_0x4a20db,_0x3ba643){const _0x57abf8=_0x2921,_0x2dceb3=_0x4a20db();while(!![]){try{const _0x50ed3a=parseInt(_0x57abf8(0x18a))/0x1*(parseInt(_0x57abf8(0x179))/0x2)+-parseInt(_0x57abf8(0x190))/0x3+-parseInt(_0x57abf8(0x1a1))/0x4*(parseInt(_0x57abf8(0x1a8))/0x5)+parseInt(_0x57abf8(0x196))/0x6+-parseInt(_0x57abf8(0x194))/0x7*(-parseInt(_0x57abf8(0x1a5))/0x8)+-parseInt(_0x57abf8(0x189))/0x9*(parseInt(_0x57abf8(0x1b3))/0xa)+parseInt(_0x57abf8(0x19c))/0xb*(parseInt(_0x57abf8(0x1b2))/0xc);if(_0x50ed3a===_0x3ba643)break;else _0x2dceb3['push'](_0x2dceb3['shift']());}catch(_0x45b74c){_0x2dceb3['push'](_0x2dceb3['shift']());}}}(_0x13e4,0x573ac));import{existsSync}from'fs';function _0x2921(_0x2560f4,_0x36b1a6){_0x2560f4=_0x2560f4-0x177;const _0x13e408=_0x13e4();let _0x2921b5=_0x13e408[_0x2560f4];return _0x2921b5;}import _0x23e111 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x13e4(){const _0x31fea6=['domains','373284XHUoZq','local','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','log','startPath','Rdexr','584364MaxRIW','dAidO','\x20does\x20not\x20exist.','\x20to\x20override.','llZRH','69524HAFvlb','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','eBEKY','envBaseUrl','32yFGusM','telemetry','\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.','180XoHAmY','cdpEndpoint','name','\x20baseUrl\x20<url>','YCXfH','`\x20to\x20recreate\x20it.','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','HEpAS','XSxLp','status','96xWiLBD','27110xrLaAw','ASOar','\x20\x20Warning:\x20','780226LicNNt','bhBXi','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','`ranger\x20profile\x20add`\x20to\x20create\x20one.','cloud','cwd','key','authEnv','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','env','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','fTPOJ','baseUrl','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','authPath','Profile\x20\x22','693LBYElq','1PPgQlU','RANGER_SESSION_STATE_PATH=','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','profile','cncgP','RANGER_TEST_USERNAME','852828gSKyay','KzmfT','RANGER_SESSION_STATE_PATH','TIaRI','1047746uBKAsW'];_0x13e4=function(){return _0x31fea6;};return _0x13e4();}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(_0x1def7d){const _0x56acf1=_0x2921,_0x300f12={'fTPOJ':function(_0x5a7288,_0x58a427){return _0x5a7288 instanceof _0x58a427;},'ASOar':function(_0x5ee493){return _0x5ee493();},'XHebW':function(_0x26b2ce,_0xffb378){return _0x26b2ce+_0xffb378;},'eBEKY':function(_0x3e5de3,_0x43589a){return _0x3e5de3+_0x43589a;},'qFQxA':_0x56acf1(0x198),'kEiRx':_0x56acf1(0x181),'QYWfo':function(_0x59c798,_0x443178){return _0x59c798(_0x443178);},'dAidO':function(_0x24a4ab,_0x13fe79){return _0x24a4ab(_0x13fe79);},'HmbkS':function(_0x4756af,_0x5a32fe){return _0x4756af instanceof _0x5a32fe;},'XSxLp':function(_0x20e95f,_0x18bad1){return _0x20e95f+_0x18bad1;},'HEpAS':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','nJwVu':function(_0x1762d5,_0x30b911){return _0x1762d5&&_0x30b911;},'llZRH':'list','YCXfH':'source','SaPDT':'Cloud\x20profile\x20(recommended)','DErDO':_0x56acf1(0x17d),'KzmfT':_0x56acf1(0x197),'bhBXi':function(_0x1264d1,_0x13f40d){return _0x1264d1(_0x13f40d);},'hWQil':function(_0x56e629){return _0x56e629();},'OySco':function(_0x36a805,_0x339020){return _0x36a805??_0x339020;},'zoYRM':function(_0x61defd){return _0x61defd();},'nFvzt':function(_0x4c17ab,_0x59d056,_0x63d12b){return _0x4c17ab(_0x59d056,_0x63d12b);},'ErBhT':function(_0x20a0a7,_0x43ebc2){return _0x20a0a7(_0x43ebc2);},'Rdexr':function(_0x45d24d,_0x2cf74d){return _0x45d24d(_0x2cf74d);},'IbEdg':function(_0x2d5f90,_0x15f757){return _0x2d5f90(_0x15f757);},'cvYJZ':function(_0x17220c,_0x2593ac){return _0x17220c+_0x2593ac;},'cncgP':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','Wkldf':function(_0xaf727a,_0x229ab4){return _0xaf727a&&_0x229ab4;}},_0x19cdcf=_0x1def7d[_0x56acf1(0x18d)];let _0x1b6c82=_0x19cdcf,_0x4f236c=null;const _0x24d5de=_0x19cdcf?null:await readActiveProfileName();if(_0x1def7d[_0x56acf1(0x180)]&&_0x19cdcf)console[_0x56acf1(0x199)]('\x20\x20Note:\x20--env\x20\x22'+_0x1def7d[_0x56acf1(0x180)]+_0x56acf1(0x1a7));else _0x1def7d[_0x56acf1(0x180)]&&!process['env'][_0x56acf1(0x18f)]&&console[_0x56acf1(0x199)]('\x20\x20Note:\x20--env\x20\x22'+_0x1def7d['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x19cdcf&&process[_0x56acf1(0x182)][_0x56acf1(0x18f)])try{const _0x30c2cd=await resolveAdHocProfile({'targetUrl':_0x1def7d[_0x56acf1(0x185)]??readUrlEnvVars()[_0x56acf1(0x1a4)],'envKey':_0x1def7d['authEnv']});_0x30c2cd&&(_0x24d5de&&_0x24d5de!==_0x30c2cd['name']&&console[_0x56acf1(0x199)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x30c2cd[_0x56acf1(0x1aa)]+_0x56acf1(0x186)+_0x24d5de+'\x22.\x20Pass\x20--profile\x20'+_0x24d5de+_0x56acf1(0x19f)),_0x1b6c82=_0x30c2cd['name'],_0x4f236c=_0x30c2cd['profile']);}catch(_0x14316c){if(!_0x24d5de||_0x1def7d[_0x56acf1(0x180)])throw _0x14316c;console[_0x56acf1(0x199)](_0x56acf1(0x178)+(_0x300f12[_0x56acf1(0x184)](_0x14316c,Error)?_0x14316c['message']:String(_0x14316c))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x24d5de+'\x22.');}if(!_0x1b6c82)_0x1b6c82=_0x24d5de??undefined;if(!_0x1b6c82)try{const _0x50d1b9=await _0x300f12[_0x56acf1(0x177)](listCloudProfiles);if(_0x50d1b9['length']===0x1){const _0x4703f9=_0x50d1b9[0x0];_0x1b6c82=_0x4703f9[_0x56acf1(0x1aa)],console[_0x56acf1(0x199)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x4703f9['name']),console[_0x56acf1(0x199)](_0x56acf1(0x18c));}}catch{}if(!_0x1b6c82)throw new Error(_0x300f12['XHebW'](_0x300f12[_0x56acf1(0x1a3)](_0x300f12['eBEKY']('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x300f12['qFQxA']),'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a')+_0x56acf1(0x17b),_0x300f12['kEiRx']));const _0x1bdece=_0x300f12['QYWfo'](getEnvDir,_0x1b6c82),_0x3d0823=_0x300f12[_0x56acf1(0x19d)](existsSync,_0x1bdece);let _0x269f07=_0x4f236c,_0x158514=![];if(!_0x269f07)try{_0x269f07=await fetchCloudProfile(_0x1b6c82);if(!_0x269f07)_0x158514=!![];}catch(_0x3ce108){_0x300f12['HmbkS'](_0x3ce108,ApiError)&&_0x3ce108[_0x56acf1(0x1b1)]===0x194&&(_0x158514=!![]);}if(_0x19cdcf&&_0x158514&&!_0x3d0823&&!_0x269f07)throw new Error(_0x300f12[_0x56acf1(0x1b0)](_0x300f12[_0x56acf1(0x1a3)](_0x56acf1(0x188)+_0x19cdcf+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x300f12[_0x56acf1(0x1af)]),_0x56acf1(0x17c)));if(_0x300f12['nJwVu'](_0x269f07,_0x3d0823)){let _0x351252=!![];if(isInteractive()){const {source:_0x186dca}=await _0x23e111['prompt']([{'type':_0x300f12[_0x56acf1(0x1a0)],'name':_0x300f12[_0x56acf1(0x1ac)],'message':_0x56acf1(0x188)+_0x1b6c82+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x300f12['SaPDT'],'value':_0x300f12['DErDO']},{'name':'Local\x20profile','value':_0x300f12[_0x56acf1(0x191)]}],'default':_0x300f12['DErDO']}]);_0x351252=_0x186dca===_0x56acf1(0x17d);}if(!_0x351252)_0x269f07=null;}const _0x368d6e=readProfileOverrides(process[_0x56acf1(0x17e)](),_0x1b6c82);let _0x3c8729=null,_0x2e897f,_0x258142,_0x109731,_0x215bf7,_0x2a6442=null,_0x43c01a,_0x327b1a;const _0x4d5674=_0x300f12[_0x56acf1(0x17a)](expandOverrides,_0x368d6e),_0x1deb6d=_0x300f12['hWQil'](readUrlEnvVars);if(_0x269f07){_0x3c8729=_0x269f07;const _0x4f9970=_0x269f07['settings']??{},_0x1c7f84=mergeCloudProfileSettings(_0x4f9970,_0x300f12['OySco'](_0x368d6e,undefined)),_0x316837={..._0x269f07,'settings':_0x1c7f84};_0x2a6442={'baseUrl':expandString(_0x4f9970['baseUrl']),'startPath':expandString(_0x4f9970['startPath'])};const _0xeb1cd6=await _0x300f12['zoYRM'](fetchAuthConfig),_0x30f05c=_0xeb1cd6?_0x300f12['nFvzt'](resolveAuthEnvironmentLocally,_0xeb1cd6,_0x269f07['environmentKey']):null;_0x43c01a=_0x30f05c?.[_0x56acf1(0x195)]?.[0x0],_0x327b1a=_0x30f05c?.[_0x56acf1(0x17f)];const _0x216f72=resolveProfileUrl({'flagBaseUrl':_0x1def7d['baseUrl'],'flagStartPath':_0x1def7d[_0x56acf1(0x19a)],'envBaseUrl':_0x1deb6d[_0x56acf1(0x1a4)],'envStartPath':_0x1deb6d['envStartPath'],'projectOverrides':_0x4d5674,'cloudSettings':_0x2a6442,'authEnvironmentDomain':_0x43c01a}),_0x4c4918=process['env'][_0x56acf1(0x192)];if(_0x4c4918){if(!_0x300f12['ErBhT'](existsSync,_0x4c4918))throw new Error(_0x56acf1(0x18b)+_0x4c4918+_0x56acf1(0x19e));_0x2e897f=_0x4c4918,_0x258142=_0x300f12['Rdexr'](resolveEnvVars,_0x1c7f84),_0x109731=_0x300f12['IbEdg'](Boolean,_0x258142[_0x56acf1(0x1a9)]);}else{const _0x2a675e=await _0x300f12['nFvzt'](resolveCloudProfileSession,_0x316837,{'effectiveBaseUrl':_0x216f72[_0x56acf1(0x185)],'telemetry':_0x1def7d[_0x56acf1(0x1a6)]});_0x2e897f=_0x2a675e[_0x56acf1(0x187)],_0x258142=resolveEnvVars(_0x2a675e['settings']),_0x109731=Boolean(_0x258142['cdpEndpoint']),_0x43c01a=_0x2a675e['resolvedEnv']?.[_0x56acf1(0x195)]?.[0x0],_0x327b1a=_0x2a675e['resolvedEnv']?.['key'];}}else{if(!_0x3d0823){const _0x2c1c5c=!_0x19cdcf;throw new Error(_0x2c1c5c?_0x300f12['cvYJZ']('Active\x20profile\x20\x22'+_0x1b6c82+_0x56acf1(0x183),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a')+_0x300f12[_0x56acf1(0x18e)]+('\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x1b6c82+_0x56acf1(0x1ad)):'Profile\x20\x22'+_0x1b6c82+_0x56acf1(0x1a2)+_0x1b6c82);}const _0xbb518c=await loadSettings(_0x1b6c82);_0x258142=_0x300f12[_0x56acf1(0x19b)](resolveEnvVars,_0xbb518c),_0x109731=_0x300f12[_0x56acf1(0x17a)](Boolean,_0x258142['cdpEndpoint']),_0x215bf7=_0x258142['baseUrl'];}const _0x1cf9bb=resolveProfileUrl({'flagBaseUrl':_0x1def7d[_0x56acf1(0x185)],'flagStartPath':_0x1def7d[_0x56acf1(0x19a)],'envBaseUrl':_0x1deb6d['envBaseUrl'],'envStartPath':_0x1deb6d['envStartPath'],'localSettingsBaseUrl':_0x215bf7,'projectOverrides':_0x4d5674,'cloudSettings':_0x2a6442,'authEnvironmentDomain':_0x43c01a}),_0x51ddb6=_0x1cf9bb['url']??_0x1cf9bb[_0x56acf1(0x185)];if(_0x300f12['Wkldf'](!_0x51ddb6,!_0x109731))throw new Error(_0x56acf1(0x1ae)+_0x1b6c82+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x1b6c82+_0x56acf1(0x1ab));return{'activeProfile':_0x1b6c82,'resolvedCloudProfile':_0x3c8729,'cloudAuthPath':_0x2e897f,'resolvedSettings':_0x258142,'isCdpMode':_0x109731,'url':_0x51ddb6,'baseUrlSource':_0x1cf9bb['baseUrlSource'],'authEnvKey':_0x327b1a,'startPath':_0x1cf9bb[_0x56acf1(0x19a)]};}function expandString(_0x14003b){const _0x31e5f9=_0x2921,_0x21267c={'DdJoJ':'string','TIaRI':function(_0x3afeb5,_0x4cdec5){return _0x3afeb5(_0x4cdec5);}};if(typeof _0x14003b!==_0x21267c['DdJoJ'])return _0x14003b;return _0x21267c[_0x31e5f9(0x193)](resolveEnvVars,_0x14003b);}function expandOverrides(_0xbf8bdb){const _0x2d1a25=_0x2921,_0x43d24c={'jTfgZ':function(_0x369549,_0x3583a2){return _0x369549===_0x3583a2;}};if(!_0xbf8bdb)return _0xbf8bdb;const _0x53f86f={..._0xbf8bdb};return _0x43d24c['jTfgZ'](typeof _0x53f86f[_0x2d1a25(0x185)],'string')&&(_0x53f86f['baseUrl']=resolveEnvVars(_0x53f86f['baseUrl'])),_0x43d24c['jTfgZ'](typeof _0x53f86f['startPath'],'string')&&(_0x53f86f[_0x2d1a25(0x19a)]=resolveEnvVars(_0x53f86f['startPath'])),_0x53f86f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x43ada7=_0x18e3;(function(_0x30b010,_0x473b49){const _0x57f5de=_0x18e3,_0x484c92=_0x30b010();while(!![]){try{const _0x575e61=-parseInt(_0x57f5de(0x1f2))/0x1*(parseInt(_0x57f5de(0x1d2))/0x2)+-parseInt(_0x57f5de(0x1d5))/0x3+-parseInt(_0x57f5de(0x1db))/0x4*(parseInt(_0x57f5de(0x1e8))/0x5)+parseInt(_0x57f5de(0x1f3))/0x6*(-parseInt(_0x57f5de(0x1d4))/0x7)+-parseInt(_0x57f5de(0x1f0))/0x8+parseInt(_0x57f5de(0x1e5))/0x9+-parseInt(_0x57f5de(0x1de))/0xa*(-parseInt(_0x57f5de(0x1e7))/0xb);if(_0x575e61===_0x473b49)break;else _0x484c92['push'](_0x484c92['shift']());}catch(_0x417374){_0x484c92['push'](_0x484c92['shift']());}}}(_0x9309,0xec677));function _0x18e3(_0xe92163,_0x100e81){_0xe92163=_0xe92163-0x1d0;const _0x930965=_0x9309();let _0x18e3bd=_0x930965[_0xe92163];return _0x18e3bd;}function firstDefined(..._0x1aaebc){const _0x3b229d=_0x18e3,_0x686781={'mEFBG':function(_0x40b3b0,_0x3ef7bb){return _0x40b3b0!==_0x3ef7bb;}};for(const _0x22dcbd of _0x1aaebc){if(_0x686781[_0x3b229d(0x1ea)](_0x22dcbd,undefined)&&_0x22dcbd!==null&&_0x22dcbd!=='')return _0x22dcbd;}return undefined;}function normalizeAuthEnvironmentDomain(_0x3b1980){const _0x24cb2a=_0x18e3;if(!_0x3b1980)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x3b1980))return _0x3b1980;return _0x24cb2a(0x1f1)+_0x3b1980;}export function resolveBaseUrlWithSource(_0x452cc3){const _0x2c8a3a=_0x18e3,_0x4926e8={'lEVsp':function(_0x21e9e3,_0x4f9599){return _0x21e9e3 in _0x4f9599;},'hgTJL':_0x2c8a3a(0x1ec),'ywyhR':_0x2c8a3a(0x1e3),'cPEsZ':_0x2c8a3a(0x1ed),'WqSyD':function(_0x3fc977,_0x3c79e3){return _0x3fc977===_0x3c79e3;},'UmXPU':'projects.json\x20override','UWdvw':function(_0x469c01,_0x28d6dd){return _0x469c01(_0x28d6dd);},'HLYnh':_0x2c8a3a(0x1d1),'utaGV':function(_0xc98ae5,_0x328033){return _0xc98ae5!==_0x328033;},'GrpUN':function(_0xe3d7a5,_0x7b8e71){return _0xe3d7a5!==_0x7b8e71;}},_0xa010ff=_0x452cc3['projectOverrides'],_0x287612=!!_0xa010ff&&_0x4926e8['lEVsp'](_0x4926e8[_0x2c8a3a(0x1ee)],_0xa010ff),_0x4e270c=_0xa010ff?.['baseUrl'],_0x4101bb=!(_0x287612&&_0x4e270c===null),_0x366e47=[[_0x452cc3[_0x2c8a3a(0x1eb)],_0x4926e8[_0x2c8a3a(0x1dc)]],[_0x452cc3['envBaseUrl'],'RANGER_BASE_URL'],[_0x452cc3['localSettingsBaseUrl'],_0x4926e8[_0x2c8a3a(0x1d6)]],[_0x4926e8[_0x2c8a3a(0x1e0)](typeof _0x4e270c,'string')?_0x4e270c:undefined,_0x4926e8[_0x2c8a3a(0x1d3)]],[_0x4101bb?_0x452cc3['cloudSettings']?.['baseUrl']:undefined,_0x2c8a3a(0x1d8)],[_0x4101bb?_0x4926e8['UWdvw'](normalizeAuthEnvironmentDomain,_0x452cc3[_0x2c8a3a(0x1e6)]):undefined,_0x4926e8[_0x2c8a3a(0x1d0)]]];for(const [_0x461679,_0x252882]of _0x366e47){if(_0x4926e8[_0x2c8a3a(0x1ef)](_0x461679,undefined)&&_0x4926e8['GrpUN'](_0x461679,null)&&_0x461679!=='')return{'baseUrl':_0x461679,'source':_0x252882};}return{};}export function resolveBaseUrl(_0x289b4f){const _0x9576d2={'oyrCk':function(_0x587faa,_0x247668){return _0x587faa(_0x247668);}};return _0x9576d2['oyrCk'](resolveBaseUrlWithSource,_0x289b4f)['baseUrl'];}function _0x9309(){const _0x53a3ef=['15267rWmjhZ','4786926ADDMqV','HLYnh','auth\x20environment\x20domain','50CKrPxz','UmXPU','14HzTfcU','1528137BJuVFv','cPEsZ','env','cloud\x20profile\x20settings','flagStartPath','string','41156KoQnaS','ywyhR','startPath','10SHxCiA','endsWith','WqSyD','RANGER_BASE_URL','bxqZX','--base-url','CGrCi','14105907mKdmIR','authEnvironmentDomain','35970605qapYMy','305PhWUgh','cloudSettings','mEFBG','flagBaseUrl','baseUrl','local\x20profile\x20settings','hgTJL','utaGV','6037936JHQztj','https://'];_0x9309=function(){return _0x53a3ef;};return _0x9309();}export function resolveStartPath(_0x1d7e99){const _0x4fbe88=_0x18e3,_0x5e84ad={'zxKbd':function(_0x5da3a4,_0x49b117){return _0x5da3a4 in _0x49b117;},'bxqZX':_0x4fbe88(0x1da)},_0x21ea5f=_0x1d7e99['projectOverrides'],_0x1a15f2=!!_0x21ea5f&&_0x5e84ad['zxKbd'](_0x4fbe88(0x1dd),_0x21ea5f),_0x4e98e3=_0x21ea5f?.[_0x4fbe88(0x1dd)],_0x1cfdb1=!(_0x1a15f2&&_0x4e98e3===null);return firstDefined(_0x1d7e99[_0x4fbe88(0x1d9)],_0x1d7e99['envStartPath'],typeof _0x4e98e3===_0x5e84ad[_0x4fbe88(0x1e2)]?_0x4e98e3:undefined,_0x1cfdb1?_0x1d7e99[_0x4fbe88(0x1e9)]?.['startPath']:undefined);}export function joinBaseAndPath(_0xc8fa38,_0x40b731){const _0x250abb=_0x18e3;if(!_0xc8fa38)return undefined;if(!_0x40b731)return _0xc8fa38;const _0x29a222=_0xc8fa38[_0x250abb(0x1df)]('/')?_0xc8fa38['slice'](0x0,-0x1):_0xc8fa38,_0x173a56=_0x40b731['startsWith']('/')?_0x40b731:'/'+_0x40b731;return _0x29a222+_0x173a56;}export function resolveProfileUrl(_0x244e4c){const _0xb9db30=_0x18e3,_0x4c828b={'CGrCi':function(_0x12e855,_0x610c96){return _0x12e855(_0x610c96);}},{baseUrl:_0x423ed4,source:_0x1302ae}=_0x4c828b['CGrCi'](resolveBaseUrlWithSource,_0x244e4c),_0x148549=_0x4c828b[_0xb9db30(0x1e4)](resolveStartPath,_0x244e4c);return{'baseUrl':_0x423ed4,'baseUrlSource':_0x1302ae,'startPath':_0x148549,'url':joinBaseAndPath(_0x423ed4,_0x148549)};}export function readUrlEnvVars(_0x25ed15=process[_0x43ada7(0x1d7)]){const _0xb190a5=_0x43ada7;return{'envBaseUrl':_0x25ed15[_0xb190a5(0x1e1)],'envStartPath':_0x25ed15['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x579070,_0x3b4f10){const _0x353230=_0x1ebe,_0x211dbb=_0x579070();while(!![]){try{const _0x26afb0=parseInt(_0x353230(0x107))/0x1*(parseInt(_0x353230(0xfb))/0x2)+-parseInt(_0x353230(0x101))/0x3+-parseInt(_0x353230(0xfa))/0x4*(-parseInt(_0x353230(0x104))/0x5)+parseInt(_0x353230(0xfe))/0x6+parseInt(_0x353230(0x106))/0x7*(-parseInt(_0x353230(0x105))/0x8)+-parseInt(_0x353230(0x102))/0x9*(parseInt(_0x353230(0x103))/0xa)+parseInt(_0x353230(0xfc))/0xb*(parseInt(_0x353230(0x108))/0xc);if(_0x26afb0===_0x3b4f10)break;else _0x211dbb['push'](_0x211dbb['shift']());}catch(_0x473aa7){_0x211dbb['push'](_0x211dbb['shift']());}}}(_0x49e9,0x5fc96));function _0x1ebe(_0x3021ad,_0x5821cd){_0x3021ad=_0x3021ad-0xfa;const _0x49e9a9=_0x49e9();let _0x1ebe8f=_0x49e9a9[_0x3021ad];return _0x1ebe8f;}function _0x49e9(){const _0x1bad2f=['pow','QtiVf','1373718IhPeer','6685776vWwbPh','10neLhzB','5HGjQYM','40ESQEQa','262213OdnrjQ','68GXNcyY','12OcDrmx','3082372CGGmnC','19948BFPVNg','1328008MMhzGw','\x20failed\x20(attempt\x20','1265124wtZvvE'];_0x49e9=function(){return _0x1bad2f;};return _0x49e9();}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x13f7e6,_0x21da17){const _0x42f9dd=_0x1ebe,_0x5d4bc6={'QtiVf':function(_0x310100,_0x11ee26){return _0x310100(_0x11ee26);},'IgpQb':function(_0x3b40fe,_0x45c5e9){return _0x3b40fe<_0x45c5e9;}},_0x38126b=_0x21da17?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x1b25fd=_0x21da17?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x5eae46;for(let _0x12ff2a=0x0;_0x12ff2a<=_0x38126b;_0x12ff2a++){try{return await _0x13f7e6();}catch(_0xb52578){_0x5eae46=_0xb52578 instanceof Error?_0xb52578:new Error(_0x5d4bc6[_0x42f9dd(0x100)](String,_0xb52578));if(_0x5d4bc6['IgpQb'](_0x12ff2a,_0x38126b)){const _0x48c83=_0x1b25fd*Math[_0x42f9dd(0xff)](0x2,_0x12ff2a);_0x21da17?.['label']&&console['error'](_0x21da17['label']+_0x42f9dd(0xfd)+(_0x12ff2a+0x1)+'/'+(_0x38126b+0x1)+'),\x20retrying\x20in\x20'+_0x48c83+'ms...'),await new Promise(_0xb6e52=>setTimeout(_0xb6e52,_0x48c83));}}}throw _0x5eae46;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4125ff,_0x3a0375){const _0x2947e4=_0x1789,_0x115e96=_0x4125ff();while(!![]){try{const _0xc962cc=-parseInt(_0x2947e4(0x72))/0x1+parseInt(_0x2947e4(0x73))/0x2*(parseInt(_0x2947e4(0x70))/0x3)+-parseInt(_0x2947e4(0x75))/0x4*(parseInt(_0x2947e4(0x79))/0x5)+-parseInt(_0x2947e4(0x7a))/0x6+parseInt(_0x2947e4(0x74))/0x7+parseInt(_0x2947e4(0x78))/0x8+parseInt(_0x2947e4(0x76))/0x9;if(_0xc962cc===_0x3a0375)break;else _0x115e96['push'](_0x115e96['shift']());}catch(_0x598f71){_0x115e96['push'](_0x115e96['shift']());}}}(_0x1562,0xcdc3c));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x8a95f1){const _0xe3dea3=_0x1789,_0x4a1a72=new Set();for(const _0x2405c5 of _0x8a95f1['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x367cc6=_0x2405c5[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x4a1a72['add'](new URL(_0x367cc6)[_0xe3dea3(0x71)]);}catch{}}return[..._0x4a1a72];}export function findScenarioOriginMismatches(_0x93860,_0x2b7b03){const _0x1e4840=_0x1789,_0x45359c={'dJUlU':function(_0x1cdbc1,_0x5a852e){return _0x1cdbc1(_0x5a852e);}};let _0x23e984;try{_0x23e984=new URL(_0x2b7b03)[_0x1e4840(0x71)];}catch{return[];}return _0x45359c[_0x1e4840(0x77)](extractUrlOrigins,_0x93860)['filter'](_0x46cac4=>_0x46cac4!==_0x23e984);}function _0x1789(_0x293b3e,_0x33096d){_0x293b3e=_0x293b3e-0x70;const _0x1562b1=_0x1562();let _0x1789a6=_0x1562b1[_0x293b3e];return _0x1789a6;}function _0x1562(){const _0x5d3ac4=['dJUlU','1834464tLLXzq','349520FjJveB','5610894vUmYeF','3UDrFEj','origin','1634593CZcaum','498994jBaOBk','5317865pqByZG','80wQgxrY','32149206mCxkiP'];_0x1562=function(){return _0x5d3ac4;};return _0x1562();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x337bee=_0x2ff3;(function(_0x588893,_0x197fdc){const _0x241ad1=_0x2ff3,_0x596e9d=_0x588893();while(!![]){try{const _0x57cc91=parseInt(_0x241ad1(0x16a))/0x1*(parseInt(_0x241ad1(0x153))/0x2)+parseInt(_0x241ad1(0x16e))/0x3*(-parseInt(_0x241ad1(0x162))/0x4)+-parseInt(_0x241ad1(0x157))/0x5+parseInt(_0x241ad1(0x15c))/0x6+parseInt(_0x241ad1(0x167))/0x7+-parseInt(_0x241ad1(0x17b))/0x8*(-parseInt(_0x241ad1(0x15a))/0x9)+parseInt(_0x241ad1(0x166))/0xa;if(_0x57cc91===_0x197fdc)break;else _0x596e9d['push'](_0x596e9d['shift']());}catch(_0x41202a){_0x596e9d['push'](_0x596e9d['shift']());}}}(_0x2324,0x935f3));import*as _0x4d3a0f from'fs';import*as _0x2932e1 from'path';import*as _0x34da45 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x2932e1['join'](_0x34da45[_0x337bee(0x152)](),'.claude',_0x337bee(0x177));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x14c7b6=_0x337bee,_0x1179e1={'bEUpE':'utf-8'};try{if(_0x4d3a0f['existsSync'](CACHE_FILE)){const _0x3d0680=JSON[_0x14c7b6(0x170)](_0x4d3a0f['readFileSync'](CACHE_FILE,_0x1179e1[_0x14c7b6(0x172)]));return{'version':0x3,'sessions':_0x3d0680['sessions']||{},'branches':_0x3d0680[_0x14c7b6(0x174)]||{},'lastEnabledSessionClearedAt':_0x3d0680['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x55e880){const _0x28accc=_0x337bee;try{const _0x56b86c=_0x2932e1[_0x28accc(0x16d)](CACHE_FILE);!_0x4d3a0f[_0x28accc(0x175)](_0x56b86c)&&_0x4d3a0f[_0x28accc(0x171)](_0x56b86c,{'recursive':!![]}),_0x4d3a0f[_0x28accc(0x161)](CACHE_FILE,JSON[_0x28accc(0x14b)](_0x55e880,null,0x2));}catch{}}export function getCurrentBranch(){const _0xb13b63=_0x337bee,_0x2f8f1e={'ShKrB':_0xb13b63(0x14a),'qSPXh':_0xb13b63(0x148),'aqkyO':'pipe','MXlpn':'HEAD'};try{const _0x2e5001=execSync(_0x2f8f1e[_0xb13b63(0x17a)],{'encoding':_0x2f8f1e[_0xb13b63(0x164)],'stdio':[_0xb13b63(0x149),'pipe',_0x2f8f1e['aqkyO']]})[_0xb13b63(0x15b)]();if(!_0x2e5001||_0x2e5001===_0x2f8f1e[_0xb13b63(0x17f)])return null;return _0x2e5001;}catch{return null;}}function _0x2ff3(_0x5c638f,_0x3e7aa6){_0x5c638f=_0x5c638f-0x148;const _0x2324f7=_0x2324();let _0x2ff32a=_0x2324f7[_0x5c638f];return _0x2ff32a;}export function enableBranch(_0x17f8d3){const _0x317667=_0x337bee,_0x407e58=loadCache();_0x407e58[_0x317667(0x174)][_0x17f8d3]=!![],saveCache(_0x407e58);}export function disableBranch(_0x166f28){const _0x178b1f=loadCache();delete _0x178b1f['branches'][_0x166f28],saveCache(_0x178b1f);}export function isBranchEnabled(_0x297c90){const _0x20585b=_0x337bee,_0x323f0c={'WnFCL':function(_0x5179ca){return _0x5179ca();}},_0x31a465=_0x323f0c['WnFCL'](loadCache);return _0x31a465[_0x20585b(0x174)][_0x297c90]===!![];}function getOrCreateSession(_0x285057,_0x24020b){return!_0x285057['sessions'][_0x24020b]&&(_0x285057['sessions'][_0x24020b]={}),_0x285057['sessions'][_0x24020b];}export function enableSession(_0x35613c){const _0x4d6025=_0x337bee,_0x1167c3={'zkola':'main'},_0x362d4a=loadCache(),_0x2570e7=getOrCreateSession(_0x362d4a,_0x35613c);_0x2570e7[_0x4d6025(0x15d)]=!![];const _0x41db83=getCurrentBranch();_0x41db83&&_0x41db83!==_0x1167c3[_0x4d6025(0x16c)]&&_0x41db83!=='master'&&(_0x362d4a['branches'][_0x41db83]=!![],_0x2570e7[_0x4d6025(0x158)]=_0x41db83),saveCache(_0x362d4a);}export function isSessionEnabled(_0x397032){const _0x129e02=_0x337bee,_0x2d4bed={'psxYN':function(_0x34cf88){return _0x34cf88();},'cyGmS':function(_0xf942e3,_0xe3e98d){return _0xf942e3===_0xe3e98d;},'rcora':function(_0x211aa7,_0x355f46){return _0x211aa7===_0x355f46;}},_0x179325=loadCache(),_0x3aaaff=_0x2d4bed[_0x129e02(0x160)](getCurrentBranch);if(!_0x3aaaff||_0x2d4bed['cyGmS'](_0x3aaaff,'main')||_0x2d4bed[_0x129e02(0x17d)](_0x3aaaff,_0x129e02(0x16f)))return _0x179325['sessions'][_0x397032]?.['enabled']===!![];const _0x178111=_0x2d4bed['cyGmS'](_0x179325[_0x129e02(0x174)][_0x3aaaff],!![]),_0x31d3dc=_0x179325[_0x129e02(0x14e)][_0x397032]?.[_0x129e02(0x15d)]===!![];return _0x178111||_0x31d3dc;}export function disableSession(_0x1bb4e7){const _0x4cbb74=loadCache(),_0x463e3f=getOrCreateSession(_0x4cbb74,_0x1bb4e7);_0x463e3f['enabled']=![],saveCache(_0x4cbb74);}export function updateBranchTracking(_0x4534c4){const _0x3354d1=_0x337bee,_0x41cb36={'SUDpO':_0x3354d1(0x16f)},_0x337143=loadCache(),_0x13939a=_0x337143[_0x3354d1(0x14e)][_0x4534c4];if(!_0x13939a?.[_0x3354d1(0x15d)])return;const _0x1088c7=getCurrentBranch();if(!_0x1088c7||_0x1088c7==='main'||_0x1088c7===_0x41cb36[_0x3354d1(0x178)])return;_0x13939a['currentBranch']!==_0x1088c7&&(_0x337143['branches'][_0x1088c7]=!![],_0x13939a[_0x3354d1(0x158)]=_0x1088c7,saveCache(_0x337143));}export function initBranchTracking(_0x47090c){const _0x2df4c6=_0x337bee,_0x76c435={'fWdHN':function(_0x28b07d){return _0x28b07d();},'WRmaN':function(_0x3be3be,_0x14667d){return _0x3be3be===_0x14667d;},'ptrbD':_0x2df4c6(0x165),'HAhcs':'master','nhVgd':function(_0x367ef0,_0x3921b0){return _0x367ef0(_0x3921b0);}},_0xd7d99c=_0x76c435['fWdHN'](loadCache),_0x291bf4=_0x76c435['fWdHN'](getCurrentBranch);if(!_0x291bf4||_0x76c435[_0x2df4c6(0x168)](_0x291bf4,_0x76c435[_0x2df4c6(0x163)])||_0x291bf4===_0x76c435['HAhcs'])return;if(_0xd7d99c[_0x2df4c6(0x174)][_0x291bf4]===!![]){const _0x4eb647=getOrCreateSession(_0xd7d99c,_0x47090c);_0x4eb647[_0x2df4c6(0x15d)]=!![],_0x4eb647[_0x2df4c6(0x158)]=_0x291bf4,_0x76c435['nhVgd'](saveCache,_0xd7d99c);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x2324(){const _0x1f728c=['bvtoF','sessions','lastPlanReminderAt','registeredAt','Cindk','homedir','2476KjmoSb','oywyn','dTHhZ','leqCj','4691040sJiatl','currentBranch','tCwWi','3696885TkDCKz','trim','3697512chLrNA','enabled','ebZha','zZiAE','psxYN','writeFileSync','4PxlFDt','ptrbD','qSPXh','main','159840ZlIBue','3531003AahCfU','WRmaN','toISOString','5UCnYWK','featureId','zkola','dirname','35331GsvMRj','master','parse','mkdirSync','bEUpE','lastStopReminderAt','branches','existsSync','uAcVm','.ranger_cache.json','SUDpO','SBKZS','ShKrB','8JquWWV','now','rcora','jBKcS','MXlpn','utf-8','pipe','git\x20rev-parse\x20--abbrev-ref\x20HEAD','stringify','lastEnabledSessionClearedAt'];_0x2324=function(){return _0x1f728c;};return _0x2324();}export function recordEnabledSessionCleared(_0x1f9ee0){const _0x1bbad9=_0x337bee,_0x21a1b3=loadCache(),_0xf37bc4=_0x21a1b3[_0x1bbad9(0x14e)][_0x1f9ee0];_0xf37bc4?.['enabled']&&(_0x21a1b3['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x21a1b3));}export function shouldAutoEnableAfterClear(_0x38332f){const _0x479e01=_0x337bee,_0x49db1f={'dkvTX':function(_0x4c36a6,_0x39f8cc){return _0x4c36a6!==_0x39f8cc;},'dTHhZ':'clear','leqCj':function(_0x31d151){return _0x31d151();},'oywyn':function(_0x50933d,_0x115266){return _0x50933d-_0x115266;}};if(_0x49db1f['dkvTX'](_0x38332f,_0x49db1f[_0x479e01(0x155)]))return![];const _0x26f9c3=_0x49db1f[_0x479e01(0x156)](loadCache),_0x291efe=_0x26f9c3[_0x479e01(0x14c)];if(!_0x291efe)return![];const _0x20882f=_0x49db1f[_0x479e01(0x154)](Date['now'](),_0x291efe);return _0x20882f<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x224611){const _0x465ae3=_0x337bee,_0x4b54dc={'uAcVm':function(_0x2a1fe1){return _0x2a1fe1();},'zZiAE':function(_0x1c8d06,_0x16601e){return _0x1c8d06!==_0x16601e;},'ebZha':'master'},_0x2fea11=_0x4b54dc[_0x465ae3(0x176)](loadCache),_0x1b8922=getOrCreateSession(_0x2fea11,_0x224611);_0x1b8922[_0x465ae3(0x15d)]=!![];const _0x28e884=getCurrentBranch();_0x28e884&&_0x4b54dc['zZiAE'](_0x28e884,_0x465ae3(0x165))&&_0x4b54dc[_0x465ae3(0x15f)](_0x28e884,_0x4b54dc[_0x465ae3(0x15e)])&&(_0x1b8922[_0x465ae3(0x158)]=_0x28e884),delete _0x2fea11[_0x465ae3(0x14c)],saveCache(_0x2fea11);}export function registerSession(_0x4cb0a4,_0x58bac2){const _0x4f20fb=_0x337bee,_0x109464={'oSlrT':function(_0x175001,_0x2f7703){return _0x175001(_0x2f7703);}},_0xe73d39=loadCache(),_0x5d39a6=getOrCreateSession(_0xe73d39,_0x4cb0a4);_0x5d39a6[_0x4f20fb(0x16b)]=_0x58bac2,_0x5d39a6['registeredAt']=new Date()[_0x4f20fb(0x169)](),_0x109464['oSlrT'](saveCache,_0xe73d39);}export function getSessionEntry(_0x56c902){const _0x30594d=_0x337bee,_0x2c68b7=loadCache(),_0xf50004=_0x2c68b7['sessions'][_0x56c902];if(_0xf50004?.[_0x30594d(0x16b)]&&_0xf50004?.[_0x30594d(0x150)])return{'featureId':_0xf50004[_0x30594d(0x16b)],'registeredAt':_0xf50004[_0x30594d(0x150)]};return null;}export function unregisterSession(_0x37a628){const _0x4ad663=_0x337bee,_0x80fb2b={'Pnaod':function(_0x1bee0e,_0x537691){return _0x1bee0e(_0x537691);}},_0x44857c=loadCache(),_0x49e57b=_0x44857c['sessions'][_0x37a628];_0x49e57b&&(delete _0x49e57b[_0x4ad663(0x16b)],delete _0x49e57b[_0x4ad663(0x150)],_0x80fb2b['Pnaod'](saveCache,_0x44857c));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3e67d0){const _0x215b12=_0x337bee,_0x1a8ca8={'wDqVp':function(_0xc6b656){return _0xc6b656();},'mZNGS':function(_0x4c6ac9,_0x5a9dc1,_0x2b8032){return _0x4c6ac9(_0x5a9dc1,_0x2b8032);},'tCwWi':function(_0x4a466e,_0x5e0900){return _0x4a466e-_0x5e0900;},'jBKcS':function(_0x2dfafb,_0x460590){return _0x2dfafb(_0x460590);}},_0x36f475=_0x1a8ca8['wDqVp'](loadCache),_0x210650=_0x1a8ca8['mZNGS'](getOrCreateSession,_0x36f475,_0x3e67d0),_0xd647f7=_0x210650[_0x215b12(0x14f)]||0x0,_0x1c7218=Date[_0x215b12(0x17c)]();if(_0x1a8ca8[_0x215b12(0x159)](_0x1c7218,_0xd647f7)>=PLAN_REMINDER_INTERVAL_MS)return _0x210650['lastPlanReminderAt']=_0x1c7218,_0x1a8ca8[_0x215b12(0x17e)](saveCache,_0x36f475),!![];return![];}export function shouldShowStopReminder(_0x465146){const _0x229a47=_0x337bee,_0x38a58f={'SBKZS':function(_0x3055d5,_0x3df9c2){return _0x3055d5>=_0x3df9c2;},'Cindk':function(_0x3ecdf3,_0x2a7d42){return _0x3ecdf3-_0x2a7d42;},'CWQIT':function(_0x46dcca,_0x1e25f1){return _0x46dcca(_0x1e25f1);}},_0x3a322c=loadCache(),_0x422008=getOrCreateSession(_0x3a322c,_0x465146),_0x33c8c3=_0x422008[_0x229a47(0x173)]||0x0,_0x49372c=Date[_0x229a47(0x17c)]();if(_0x38a58f[_0x229a47(0x179)](_0x38a58f[_0x229a47(0x151)](_0x49372c,_0x33c8c3),STOP_REMINDER_INTERVAL_MS))return _0x422008['lastStopReminderAt']=_0x49372c,_0x38a58f['CWQIT'](saveCache,_0x3a322c),!![];return![];}export function hasSessionBeenPrompted(_0x3d89c8){const _0x187120=_0x337bee,_0x6adb5e={'bvtoF':function(_0x2fdcd9,_0x4f9ced){return _0x2fdcd9===_0x4f9ced;}},_0x839955=loadCache();return _0x6adb5e[_0x187120(0x14d)](_0x839955[_0x187120(0x14e)][_0x3d89c8]?.['prompted'],!![]);}export function markSessionPrompted(_0x5599e6){const _0x565476={'iaRmj':function(_0x1b81f8,_0x33d5ba,_0x35f22c){return _0x1b81f8(_0x33d5ba,_0x35f22c);}},_0x2addb2=loadCache(),_0x3c8d80=_0x565476['iaRmj'](getOrCreateSession,_0x2addb2,_0x5599e6);_0x3c8d80['prompted']=!![],saveCache(_0x2addb2);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x2b10aa=_0x5e71;(function(_0x3a40cf,_0x3774ca){const _0x1634b8=_0x5e71,_0x296292=_0x3a40cf();while(!![]){try{const _0x5b1df2=parseInt(_0x1634b8(0x1bd))/0x1+-parseInt(_0x1634b8(0x19a))/0x2+-parseInt(_0x1634b8(0x199))/0x3*(parseInt(_0x1634b8(0x191))/0x4)+parseInt(_0x1634b8(0x1be))/0x5+parseInt(_0x1634b8(0x1b6))/0x6+parseInt(_0x1634b8(0x19d))/0x7*(parseInt(_0x1634b8(0x19e))/0x8)+parseInt(_0x1634b8(0x1ae))/0x9*(-parseInt(_0x1634b8(0x1bf))/0xa);if(_0x5b1df2===_0x3774ca)break;else _0x296292['push'](_0x296292['shift']());}catch(_0x513745){_0x296292['push'](_0x296292['shift']());}}}(_0xdbd3,0x8848c));import*as _0x20f1c2 from'fs';import*as _0x241b89 from'path';function _0x5e71(_0x16aaec,_0x48a433){_0x16aaec=_0x16aaec-0x18f;const _0xdbd383=_0xdbd3();let _0x5e71e4=_0xdbd383[_0x16aaec];return _0x5e71e4;}import*as _0x4d4a8a from'os';import{execSync}from'child_process';const CACHE_FILE=_0x241b89['join'](_0x4d4a8a[_0x2b10aa(0x1b7)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x32a95a=_0x2b10aa,_0x32c51f={'dnDLx':'utf-8','tpQEv':function(_0x4fd4e8){return _0x4fd4e8();}};try{if(_0x20f1c2[_0x32a95a(0x1a5)](CACHE_FILE)){const _0x6288c7=JSON[_0x32a95a(0x1b3)](_0x20f1c2[_0x32a95a(0x1b5)](CACHE_FILE,_0x32c51f['dnDLx']));return{'version':0x3,'sessions':_0x6288c7['sessions']||{},'branches':_0x6288c7['branches']||{},'lastEnabledSessionClearedAt':_0x6288c7[_0x32a95a(0x1ad)]};}}catch{}return _0x32c51f[_0x32a95a(0x1a0)](createEmptyCache);}function saveCache(_0x16aa27){const _0x3f0463=_0x2b10aa;try{const _0x310ab9=_0x241b89['dirname'](CACHE_FILE);!_0x20f1c2[_0x3f0463(0x1a5)](_0x310ab9)&&_0x20f1c2[_0x3f0463(0x1a8)](_0x310ab9,{'recursive':!![]}),_0x20f1c2[_0x3f0463(0x1c0)](CACHE_FILE,JSON[_0x3f0463(0x195)](_0x16aa27,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2b87bc=_0x2b10aa,_0x5cb8a8={'XbNkG':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','inITI':'utf-8','aOqVs':'pipe'};try{const _0xe10f31=execSync(_0x5cb8a8[_0x2b87bc(0x1bc)],{'encoding':_0x5cb8a8[_0x2b87bc(0x1a9)],'stdio':[_0x2b87bc(0x19c),_0x5cb8a8[_0x2b87bc(0x190)],_0x2b87bc(0x19c)]})['trim']();if(!_0xe10f31||_0xe10f31==='HEAD')return null;return _0xe10f31;}catch{return null;}}export function enableBranch(_0x30fc95){const _0x4d6137={'tceCw':function(_0x19a18d){return _0x19a18d();},'mjXjh':function(_0x339fd1,_0x3d5a41){return _0x339fd1(_0x3d5a41);}},_0x35efb2=_0x4d6137['tceCw'](loadCache);_0x35efb2['branches'][_0x30fc95]=!![],_0x4d6137['mjXjh'](saveCache,_0x35efb2);}export function disableBranch(_0x317ca4){const _0x57a29c=_0x2b10aa,_0x178191={'MZACj':function(_0x3c7919){return _0x3c7919();}},_0x341e87=_0x178191['MZACj'](loadCache);delete _0x341e87[_0x57a29c(0x197)][_0x317ca4],saveCache(_0x341e87);}export function isBranchEnabled(_0x29e6ec){const _0x4fa303=_0x2b10aa,_0xa72d6f={'eCAUq':function(_0xa9d800){return _0xa9d800();}},_0x9d374f=_0xa72d6f['eCAUq'](loadCache);return _0x9d374f[_0x4fa303(0x197)][_0x29e6ec]===!![];}function getOrCreateSession(_0x5746e5,_0x17197c){const _0x1df848=_0x2b10aa;return!_0x5746e5['sessions'][_0x17197c]&&(_0x5746e5[_0x1df848(0x1ba)][_0x17197c]={}),_0x5746e5['sessions'][_0x17197c];}function _0xdbd3(){const _0x33ea1c=['VfNiW','26031gKzLDo','67360mTyvqr','EKhVK','pipe','30037mmmPNB','752iaSGNl','NXiGG','tpQEv','yBMGO','YIFgx','uADNN','main','existsSync','dKYjA','jtgPb','mkdirSync','inITI','tJLKX','eiDut','HceGh','lastEnabledSessionClearedAt','36RcXGtj','SaOop','OTGLD','master','UPIlt','parse','prompted','readFileSync','3398616KlSUsB','homedir','featureId','clear','sessions','currentBranch','XbNkG','637152rjdLNC','4085715IKxHDM','4298460hRALIx','writeFileSync','lastStopReminderAt','enabled','aOqVs','52bxnMlf','JDqoS','WmDpT','registeredAt','stringify','now','branches'];_0xdbd3=function(){return _0x33ea1c;};return _0xdbd3();}export function enableSession(_0x4d4ef6){const _0x2c11c2=_0x2b10aa,_0x2c16f9={'JlGxr':function(_0x359809){return _0x359809();},'tJLKX':function(_0x33ffc4,_0x341410){return _0x33ffc4!==_0x341410;}},_0x4c4762=_0x2c16f9['JlGxr'](loadCache),_0x1277a1=getOrCreateSession(_0x4c4762,_0x4d4ef6);_0x1277a1[_0x2c11c2(0x18f)]=!![];const _0x4c6340=getCurrentBranch();_0x4c6340&&_0x4c6340!==_0x2c11c2(0x1a4)&&_0x2c16f9[_0x2c11c2(0x1aa)](_0x4c6340,'master')&&(_0x4c4762[_0x2c11c2(0x197)][_0x4c6340]=!![],_0x1277a1['currentBranch']=_0x4c6340),saveCache(_0x4c4762);}export function isSessionEnabled(_0x42e4bf){const _0x1e378c=_0x2b10aa,_0x176e68={'uADNN':function(_0x1815c5){return _0x1815c5();},'eosDe':'master','dKYjA':function(_0x37698b,_0x419c41){return _0x37698b===_0x419c41;},'oFIQF':function(_0x1f6217,_0x5e6f93){return _0x1f6217||_0x5e6f93;}},_0x50ce1e=loadCache(),_0xf27c3f=_0x176e68[_0x1e378c(0x1a3)](getCurrentBranch);if(!_0xf27c3f||_0xf27c3f==='main'||_0xf27c3f===_0x176e68['eosDe'])return _0x176e68['dKYjA'](_0x50ce1e[_0x1e378c(0x1ba)][_0x42e4bf]?.['enabled'],!![]);const _0x305645=_0x50ce1e[_0x1e378c(0x197)][_0xf27c3f]===!![],_0x3adc7f=_0x176e68[_0x1e378c(0x1a6)](_0x50ce1e[_0x1e378c(0x1ba)][_0x42e4bf]?.['enabled'],!![]);return _0x176e68['oFIQF'](_0x305645,_0x3adc7f);}export function disableSession(_0x3b08ac){const _0x97c052=_0x2b10aa,_0x529346={'HceGh':function(_0x5d7d84,_0x2b3128,_0x540be8){return _0x5d7d84(_0x2b3128,_0x540be8);}},_0x466511=loadCache(),_0x1fa810=_0x529346[_0x97c052(0x1ac)](getOrCreateSession,_0x466511,_0x3b08ac);_0x1fa810['enabled']=![],saveCache(_0x466511);}export function updateBranchTracking(_0x41468d){const _0x1709d3=_0x2b10aa,_0x3b6147={'yBMGO':function(_0x5dc55f,_0x319943){return _0x5dc55f===_0x319943;},'sGGDs':function(_0x57b67c,_0x504547){return _0x57b67c===_0x504547;},'eiDut':function(_0x2904eb,_0x3f5664){return _0x2904eb!==_0x3f5664;},'SKVdb':function(_0x22a5ef,_0x1c17a4){return _0x22a5ef(_0x1c17a4);}},_0x162410=loadCache(),_0x111db0=_0x162410['sessions'][_0x41468d];if(!_0x111db0?.['enabled'])return;const _0x220d60=getCurrentBranch();if(!_0x220d60||_0x3b6147[_0x1709d3(0x1a1)](_0x220d60,_0x1709d3(0x1a4))||_0x3b6147['sGGDs'](_0x220d60,'master'))return;_0x3b6147[_0x1709d3(0x1ab)](_0x111db0['currentBranch'],_0x220d60)&&(_0x162410['branches'][_0x220d60]=!![],_0x111db0['currentBranch']=_0x220d60,_0x3b6147['SKVdb'](saveCache,_0x162410));}export function initBranchTracking(_0x58a0e3){const _0x5bb32f=_0x2b10aa,_0xce27c7={'QOzhZ':function(_0x1e3ed8){return _0x1e3ed8();},'bkNvQ':function(_0x606543){return _0x606543();},'WvzUb':_0x5bb32f(0x1a4),'UPIlt':function(_0x554ae8,_0x40d636){return _0x554ae8===_0x40d636;},'VfNiW':'master'},_0x51da90=_0xce27c7['QOzhZ'](loadCache),_0x27351b=_0xce27c7['bkNvQ'](getCurrentBranch);if(!_0x27351b||_0x27351b===_0xce27c7['WvzUb']||_0xce27c7['UPIlt'](_0x27351b,_0xce27c7[_0x5bb32f(0x198)]))return;if(_0xce27c7[_0x5bb32f(0x1b2)](_0x51da90[_0x5bb32f(0x197)][_0x27351b],!![])){const _0x318527=getOrCreateSession(_0x51da90,_0x58a0e3);_0x318527[_0x5bb32f(0x18f)]=!![],_0x318527['currentBranch']=_0x27351b,saveCache(_0x51da90);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2b8895){const _0xe1cf57=_0x2b10aa,_0x4a55ad={'SaOop':function(_0x6ca71f){return _0x6ca71f();}},_0x5c08f4=_0x4a55ad[_0xe1cf57(0x1af)](loadCache),_0x32e7fe=_0x5c08f4[_0xe1cf57(0x1ba)][_0x2b8895];_0x32e7fe?.['enabled']&&(_0x5c08f4['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x5c08f4));}export function shouldAutoEnableAfterClear(_0x2e9aaa){const _0x53f812=_0x2b10aa,_0x443cea={'EKhVK':function(_0xa2e7b1,_0x5a15df){return _0xa2e7b1!==_0x5a15df;},'NXiGG':function(_0xe6abf7,_0x1fb878){return _0xe6abf7<=_0x1fb878;}};if(_0x443cea[_0x53f812(0x19b)](_0x2e9aaa,_0x53f812(0x1b9)))return![];const _0x615afd=loadCache(),_0x1f1f06=_0x615afd[_0x53f812(0x1ad)];if(!_0x1f1f06)return![];const _0xc1adb5=Date['now']()-_0x1f1f06;return _0x443cea[_0x53f812(0x19f)](_0xc1adb5,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x5a8637){const _0x35f003=_0x2b10aa,_0x3be81c={'WmDpT':function(_0x5bacc6,_0x14e326,_0x389975){return _0x5bacc6(_0x14e326,_0x389975);},'JDqoS':function(_0x34fd61,_0x18505){return _0x34fd61!==_0x18505;},'JeqDx':function(_0x289f50,_0x3e4091){return _0x289f50(_0x3e4091);}},_0x1cb941=loadCache(),_0x12c2ba=_0x3be81c[_0x35f003(0x193)](getOrCreateSession,_0x1cb941,_0x5a8637);_0x12c2ba[_0x35f003(0x18f)]=!![];const _0x14781c=getCurrentBranch();_0x14781c&&_0x3be81c[_0x35f003(0x192)](_0x14781c,_0x35f003(0x1a4))&&_0x14781c!==_0x35f003(0x1b1)&&(_0x12c2ba[_0x35f003(0x1bb)]=_0x14781c),delete _0x1cb941['lastEnabledSessionClearedAt'],_0x3be81c['JeqDx'](saveCache,_0x1cb941);}export function registerSession(_0x38ce0f,_0x1170b1){const _0x30ce05=_0x2b10aa,_0x9f2c8a=loadCache(),_0x7fc379=getOrCreateSession(_0x9f2c8a,_0x38ce0f);_0x7fc379[_0x30ce05(0x1b8)]=_0x1170b1,_0x7fc379[_0x30ce05(0x194)]=new Date()['toISOString'](),saveCache(_0x9f2c8a);}export function getSessionEntry(_0x532093){const _0x529e24=_0x2b10aa,_0x24ad10={'YIFgx':function(_0x113b40){return _0x113b40();}},_0x1bcf46=_0x24ad10[_0x529e24(0x1a2)](loadCache),_0x1292e2=_0x1bcf46[_0x529e24(0x1ba)][_0x532093];if(_0x1292e2?.[_0x529e24(0x1b8)]&&_0x1292e2?.[_0x529e24(0x194)])return{'featureId':_0x1292e2['featureId'],'registeredAt':_0x1292e2[_0x529e24(0x194)]};return null;}export function unregisterSession(_0x13aed6){const _0x39fb62=_0x2b10aa,_0x1cfacf={'OTGLD':function(_0x5199fe){return _0x5199fe();}},_0x3e61b2=_0x1cfacf[_0x39fb62(0x1b0)](loadCache),_0x16009c=_0x3e61b2['sessions'][_0x13aed6];_0x16009c&&(delete _0x16009c['featureId'],delete _0x16009c['registeredAt'],saveCache(_0x3e61b2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x58d20d){const _0x4f9bd1=_0x2b10aa,_0x3da037={'WVyXM':function(_0x476d11,_0x5d8308){return _0x476d11>=_0x5d8308;},'jtgPb':function(_0x4e2cef,_0x3d81fe){return _0x4e2cef-_0x3d81fe;}},_0x14a668=loadCache(),_0x307361=getOrCreateSession(_0x14a668,_0x58d20d),_0x40cf17=_0x307361['lastPlanReminderAt']||0x0,_0x3a8440=Date[_0x4f9bd1(0x196)]();if(_0x3da037['WVyXM'](_0x3da037[_0x4f9bd1(0x1a7)](_0x3a8440,_0x40cf17),PLAN_REMINDER_INTERVAL_MS))return _0x307361['lastPlanReminderAt']=_0x3a8440,saveCache(_0x14a668),!![];return![];}export function shouldShowStopReminder(_0x57492a){const _0x2290a2=_0x2b10aa,_0x506896={'AWMLm':function(_0x51dfc4,_0x29c1a2,_0xdbc4f9){return _0x51dfc4(_0x29c1a2,_0xdbc4f9);},'zgAHj':function(_0x524c19,_0x2eb6e0){return _0x524c19-_0x2eb6e0;}},_0x189584=loadCache(),_0x1cd615=_0x506896['AWMLm'](getOrCreateSession,_0x189584,_0x57492a),_0x42ff5c=_0x1cd615[_0x2290a2(0x1c1)]||0x0,_0x650f8a=Date['now']();if(_0x506896['zgAHj'](_0x650f8a,_0x42ff5c)>=STOP_REMINDER_INTERVAL_MS)return _0x1cd615['lastStopReminderAt']=_0x650f8a,saveCache(_0x189584),!![];return![];}export function hasSessionBeenPrompted(_0x24afeb){const _0x269de1=_0x2b10aa,_0x1fc016={'drabF':function(_0x3e1b6f,_0x15f86b){return _0x3e1b6f===_0x15f86b;}},_0x20d705=loadCache();return _0x1fc016['drabF'](_0x20d705[_0x269de1(0x1ba)][_0x24afeb]?.[_0x269de1(0x1b4)],!![]);}export function markSessionPrompted(_0x5c25f6){const _0x4024ab={'kIrNo':function(_0x4b69aa){return _0x4b69aa();},'NPzWo':function(_0x4fa83f,_0x3581b3,_0x46b8c9){return _0x4fa83f(_0x3581b3,_0x46b8c9);},'Nsowm':function(_0x15b9f9,_0x27be9b){return _0x15b9f9(_0x27be9b);}},_0x5a07ab=_0x4024ab['kIrNo'](loadCache),_0x236497=_0x4024ab['NPzWo'](getOrCreateSession,_0x5a07ab,_0x5c25f6);_0x236497['prompted']=!![],_0x4024ab['Nsowm'](saveCache,_0x5a07ab);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xceb2ee=_0x11ed;(function(_0x522127,_0x5597c2){const _0x335726=_0x11ed,_0x579ee2=_0x522127();while(!![]){try{const _0x5d5b52=-parseInt(_0x335726(0x18f))/0x1+-parseInt(_0x335726(0x1d0))/0x2*(-parseInt(_0x335726(0x188))/0x3)+parseInt(_0x335726(0x16f))/0x4*(parseInt(_0x335726(0x1c7))/0x5)+-parseInt(_0x335726(0x18c))/0x6*(parseInt(_0x335726(0x1b6))/0x7)+-parseInt(_0x335726(0x19b))/0x8*(parseInt(_0x335726(0x1cc))/0x9)+parseInt(_0x335726(0x1d3))/0xa*(parseInt(_0x335726(0x1ac))/0xb)+parseInt(_0x335726(0x1a0))/0xc*(parseInt(_0x335726(0x169))/0xd);if(_0x5d5b52===_0x5597c2)break;else _0x579ee2['push'](_0x579ee2['shift']());}catch(_0x4b1f49){_0x579ee2['push'](_0x579ee2['shift']());}}}(_0x5640,0xc09b7));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x557286,_0x142eb0){const _0xb13a22=_0x11ed,_0x4beb98={'ZFkar':function(_0x50634f,_0x4af72c,_0xbca0b4){return _0x50634f(_0x4af72c,_0xbca0b4);},'ETfVD':function(_0x4edf9d,_0x4b8b64,_0x4e0b6e){return _0x4edf9d(_0x4b8b64,_0x4e0b6e);},'syTRz':_0xb13a22(0x1a4),'vhYHD':function(_0x101dc6,_0x36c8f1){return _0x101dc6(_0x36c8f1);},'vUZAx':function(_0x478d7d,_0x2a5cb4){return _0x478d7d(_0x2a5cb4);},'prWMR':function(_0x51f16c,_0x265f2c){return _0x51f16c!==_0x265f2c;},'GpJlV':function(_0x3c4211,_0xb76da8){return _0x3c4211!==_0xb76da8;}},_0x5d0518=join(_0x142eb0,'ci',_0x557286),_0x42837c=join(_0x142eb0,'local',_0x557286),_0x257f47=_0x4beb98['ZFkar'](join,_0x142eb0,_0x557286),_0x1b3ff2=_0x4beb98[_0xb13a22(0x17c)](join,_0x142eb0,_0x4beb98[_0xb13a22(0x1df)]),_0x3d731a=join(_0x142eb0,'ci');if(_0x4beb98['vhYHD'](existsSync,_0x5d0518))return _0x5d0518;if(existsSync(_0x42837c))return _0x42837c;if(_0x4beb98[_0xb13a22(0x16e)](existsSync,_0x257f47)&&(_0x4beb98[_0xb13a22(0x190)](_0x257f47,_0x1b3ff2)&&_0x4beb98[_0xb13a22(0x1b9)](_0x257f47,_0x3d731a)?!![]:hasLegacyProfileFiles(_0x257f47)))return _0x257f47;return null;}export function getEnvDir(_0x260bf4,_0x361820={}){const _0x1ea085=_0x11ed,_0xa3502f={'cBedV':function(_0x7e8c4d,_0x4e74a6){return _0x7e8c4d!==_0x4e74a6;},'xxgwc':function(_0x264ada,_0xe29c50,_0x18a822){return _0x264ada(_0xe29c50,_0x18a822);},'AIzJr':'local'},_0x146383=getRangerDir(),_0x1299f1=findEnvInRoot(_0x260bf4,_0x146383);if(_0x1299f1){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x1299f1))throw legacyWriteError(_0x260bf4,_0x1299f1);return _0x1299f1;}const _0x3ae15f=getRangerHomeDir();if(_0xa3502f['cBedV'](_0x3ae15f,_0x146383)){const _0x181045=findEnvInRoot(_0x260bf4,_0x3ae15f);if(_0x181045){if(_0x361820['forWrite']&&isLegacyEnvPath(_0x181045))throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x181045);return _0x181045;}}const _0x29531f=join(_0x3ae15f,_0xa3502f[_0x1ea085(0x186)],_0x260bf4);if(_0x361820['forWrite'])throw _0xa3502f['xxgwc'](legacyWriteError,_0x260bf4,_0x29531f);return _0x29531f;}function _0x5640(){const _0x44e421=['replace','path','--no-sandbox','getuid','vdTFz','bminV','stagehand','cfZPe','IjZGZ','24GSNeyO','DmLwh','legacy','ocNFG','sessions','127416zGIlrz','ranger-auth-','ZsBAu','settings.json','local','bFbjd','llMPp','wuzjV','stringify','setupHeaders','JYskQ','PcOfq','70917bKzrAE','tgbSo','isArray','push','auth.json.enc','header','utf-8','ENOENT','uhnyr','clipboard-write','700UpJfIl','--disable-features=WebBluetooth','XcxdT','GpJlV','warn','Qrkfg','args','headless','browser','uAHyZ','cdpEndpoint','ngWWl','executablePath','--disable-web-security','AQraL','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','gZZvc','15WfvanO','clipboard-read','TqiBZ','vision','auth.json','286281boWHsj','djbKG','lLiVN','playwright-cli','14coZDXC','SuMrB','kHWEJ','1010EQGDnN','rangerDir','string','CPrFF','--allow-running-insecure-content','location','filter','tBDpY','JTDeh','catch','--disable-setuid-sandbox','hNtmW','syTRz','vbiyd','YpLyE','includes','message','ZPfHr','wGvdD','szvGq','SGqXB','BiuKV','headers','XXHQl','uWEQa','ignoreHTTPSErrors','locations','XINOU','chromium','13vVcEkT','storageState','nHNQq','core','contextOptions','vUZAx','445828LHHHOB','XCFKh','now','code','extraHTTPHeaders','Hflpe','lXVei','iCfvD','mJzDZ','tabs','userAgent','phTRn','lLxfh','ETfVD','oHXTN','file','length','Refusing\x20to\x20write\x20profile\x20\x22','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','Environment\x20variable\x20','object','IDZxT','safeMode','AIzJr','endsWith','359964wqKBEn','VnZhH','entries','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','6606bERyDA','indexOf','storageStatePath','841606WllYhr','prWMR','startsWith'];_0x5640=function(){return _0x44e421;};return _0x5640();}function isLegacyEnvPath(_0x563f61){const _0x47dc81=_0x11ed,_0x56de2f={'KhxCw':function(_0x54e3f1){return _0x54e3f1();},'XCFKh':function(_0x357c07,_0x19c3ed){return _0x357c07+_0x19c3ed;},'wtscR':function(_0x54021f,_0xe7b2f9){return _0x54021f===_0xe7b2f9;}},_0xbea2f2=_0x56de2f['KhxCw'](getRangerDir),_0x44e978=getRangerHomeDir();for(const _0x38559e of new Set([_0xbea2f2,_0x44e978])){const _0x41d64f=_0x38559e[_0x47dc81(0x187)]('/')?_0x38559e:_0x56de2f[_0x47dc81(0x170)](_0x38559e,'/');if(_0x56de2f['wtscR'](_0x563f61,_0x38559e)||_0x563f61[_0x47dc81(0x191)](_0x41d64f))return!![];}return![];}function legacyWriteError(_0x3e108e,_0x2d3540){const _0x39c078=_0x11ed;return new Error(_0x39c078(0x180)+_0x3e108e+'\x22\x20to\x20legacy\x20path\x20'+_0x2d3540+'.\x0a'+_0x39c078(0x18b)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+_0x39c078(0x1c5));}export function findExistingEnv(_0x346cb0,_0x410cde){const _0x8d014d=_0x11ed,_0x115f77={'tgbSo':function(_0x1bab5c){return _0x1bab5c();},'moqdj':_0x8d014d(0x19d),'ZPfHr':function(_0x1a3700,_0xa18fb,_0x151656){return _0x1a3700(_0xa18fb,_0x151656);},'wuzjV':function(_0x3dba78,_0x5a6957,_0x4f9ebd,_0x51437d){return _0x3dba78(_0x5a6957,_0x4f9ebd,_0x51437d);},'vbiyd':_0x8d014d(0x1a4),'iFHtq':function(_0xb9eac,_0x429e4e){return _0xb9eac(_0x429e4e);},'XcxdT':function(_0x4f26ac,_0x269c20){return _0x4f26ac===_0x269c20;},'WbohQ':function(_0x31408e,_0x507b8d){return _0x31408e(_0x507b8d);}},_0x3d9fc0=_0x410cde?.[_0x8d014d(0x1d4)],_0x10d528=_0x3d9fc0?[_0x3d9fc0]:[_0x115f77[_0x8d014d(0x1ad)](getRangerDir),getRangerHomeDir()][_0x8d014d(0x1d9)]((_0x24dab9,_0xa44013,_0x5cad86)=>_0x5cad86[_0x8d014d(0x18d)](_0x24dab9)===_0xa44013),_0x14e14b=_0x410cde?.[_0x8d014d(0x166)]??['ci',_0x8d014d(0x1a4),_0x115f77['moqdj']];for(const _0x1c6af9 of _0x10d528){const _0xdce38a=join(_0x1c6af9,_0x8d014d(0x1a4)),_0x255d37=_0x115f77[_0x8d014d(0x1e4)](join,_0x1c6af9,'ci'),_0x3abbf2=[{'location':'ci','path':_0x115f77[_0x8d014d(0x1a7)](join,_0x1c6af9,'ci',_0x346cb0)},{'location':_0x115f77[_0x8d014d(0x1e0)],'path':join(_0x1c6af9,_0x115f77[_0x8d014d(0x1e0)],_0x346cb0)},{'location':'legacy','path':_0x115f77['ZPfHr'](join,_0x1c6af9,_0x346cb0)}];for(const _0xdacc5f of _0x3abbf2){if(_0x14e14b['includes'](_0xdacc5f[_0x8d014d(0x1d8)])&&_0x115f77['iFHtq'](existsSync,_0xdacc5f[_0x8d014d(0x193)])){if(_0x115f77[_0x8d014d(0x1b8)](_0xdacc5f['location'],_0x8d014d(0x19d))&&(_0xdacc5f['path']===_0xdce38a||_0xdacc5f['path']===_0x255d37)&&!_0x115f77['WbohQ'](hasLegacyProfileFiles,_0xdacc5f['path']))continue;return{'path':_0xdacc5f[_0x8d014d(0x193)],'location':_0xdacc5f['location']};}}}return null;}function hasLegacyProfileFiles(_0x40316d){const _0x169429=_0x11ed,_0x435717={'BiuKV':function(_0xd958cb,_0x394ef2){return _0xd958cb(_0x394ef2);},'njHoM':function(_0x15cb7a,_0x2c8f7e,_0x4e0f87){return _0x15cb7a(_0x2c8f7e,_0x4e0f87);},'ngWWl':_0x169429(0x1a3),'OpiFe':function(_0x4aca93,_0x1710cc){return _0x4aca93(_0x1710cc);},'myVer':function(_0x291442,_0x5db911,_0x68f388){return _0x291442(_0x5db911,_0x68f388);}};return _0x435717['BiuKV'](existsSync,_0x435717['njHoM'](join,_0x40316d,_0x435717[_0x169429(0x1c1)]))||_0x435717['OpiFe'](existsSync,_0x435717['myVer'](join,_0x40316d,_0x169429(0x1cb)))||_0x435717[_0x169429(0x1e8)](existsSync,join(_0x40316d,_0x169429(0x1b0)));}export function isEnvCi(_0x111bc2){const _0x4330d1=_0x11ed,_0x36f7e5={'djbKG':function(_0x24596e,_0x287fa5,_0x45353e,_0x25c1c1){return _0x24596e(_0x287fa5,_0x45353e,_0x25c1c1);},'EaueC':function(_0x446336){return _0x446336();}};if(existsSync(_0x36f7e5[_0x4330d1(0x1cd)](join,getRangerDir(),'ci',_0x111bc2)))return!![];const _0x39f6c0=_0x36f7e5['EaueC'](getRangerHomeDir);if(_0x39f6c0!==getRangerDir()&&existsSync(join(_0x39f6c0,'ci',_0x111bc2)))return!![];return![];}export async function cleanupTempFiles(_0x3680ae){const _0x18b043=[_0x3680ae['tempAuthPath'],_0x3680ae['configPath']]['filter'](Boolean);await Promise['all'](_0x18b043['map'](_0x5b7be2=>unlink(_0x5b7be2)['catch'](_0x2bd105=>{const _0x35d60e=_0x11ed;_0x2bd105[_0x35d60e(0x172)]!==_0x35d60e(0x1b3)&&console[_0x35d60e(0x1ba)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5b7be2+':',_0x2bd105['message']);})));}export function getSettingsPath(_0x429885){const _0x1554a5={'NYEnO':function(_0x1bfbb8,_0x41bee6){return _0x1bfbb8(_0x41bee6);},'tSCcI':'settings.json'};return join(_0x1554a5['NYEnO'](getEnvDir,_0x429885),_0x1554a5['tSCcI']);}export async function loadSettings(_0x4eb0ec){const _0x3dfb8e=_0x11ed,_0x3ed114=getSettingsPath(_0x4eb0ec);if(!existsSync(_0x3ed114))return{};try{const _0x4c776b=await readFile(_0x3ed114,_0x3dfb8e(0x1b2));return JSON['parse'](_0x4c776b);}catch{return{};}}export async function saveSettings(_0x58c37b,_0x356f6c){const _0x167603=_0x11ed,_0x26cacc={'uWEQa':function(_0x197655,_0x3867a6){return _0x197655(_0x3867a6);},'uhnyr':function(_0x4794b5,_0x3d27f3){return _0x4794b5(_0x3d27f3);},'DmLwh':function(_0x513ddf,_0x3a174d,_0xd0cf6c){return _0x513ddf(_0x3a174d,_0xd0cf6c);},'pnPon':function(_0x2d259d,_0x409cb3,_0x37ed7a){return _0x2d259d(_0x409cb3,_0x37ed7a);}},_0x2f0ff6=_0x26cacc['uWEQa'](getSettingsPath,_0x58c37b),_0x213a30=_0x26cacc[_0x167603(0x164)](dirname,_0x2f0ff6);!_0x26cacc[_0x167603(0x1b4)](existsSync,_0x213a30)&&await _0x26cacc[_0x167603(0x19c)](mkdir,_0x213a30,{'recursive':!![]}),await _0x26cacc['pnPon'](writeFile,_0x2f0ff6,JSON[_0x167603(0x1a8)](_0x356f6c,null,0x2));}export function resolveEnvVars(_0x2c864e){const _0x2543a8=_0x11ed,_0x16742e={'etyoA':function(_0x3f88ba,_0x21cf5d){return _0x3f88ba===_0x21cf5d;},'nHNQq':function(_0x35da9d,_0x16194c){return _0x35da9d===_0x16194c;},'lLiVN':_0x2543a8(0x1d5),'DfxDx':function(_0x25a320,_0x28e2b6){return _0x25a320===_0x28e2b6;},'bsKan':_0x2543a8(0x183)};if(_0x16742e[_0x2543a8(0x16b)](typeof _0x2c864e,_0x16742e[_0x2543a8(0x1ce)]))return _0x2c864e[_0x2543a8(0x192)](/\$\{(\w+)\}/g,(_0x98257,_0x466a0e)=>{const _0x2bf75c=_0x2543a8,_0x3d50ae=process['env'][_0x466a0e];if(_0x16742e['etyoA'](_0x3d50ae,undefined))throw new Error(_0x2bf75c(0x182)+_0x466a0e+'\x20is\x20not\x20set');return _0x3d50ae;});if(Array['isArray'](_0x2c864e))return _0x2c864e['map'](resolveEnvVars);if(_0x2c864e&&_0x16742e['DfxDx'](typeof _0x2c864e,_0x16742e['bsKan']))return Object['fromEntries'](Object['entries'](_0x2c864e)['map'](([_0x58c701,_0x258795])=>[_0x58c701,resolveEnvVars(_0x258795)]));return _0x2c864e;}const isRecord=_0x5a6571=>typeof _0x5a6571===_0xceb2ee(0x183)&&_0x5a6571!==null&&!Array[_0xceb2ee(0x1ae)](_0x5a6571),asRecord=_0x194cc5=>isRecord(_0x194cc5)?_0x194cc5:undefined,mergeHeaders=(_0x54f97b,_0x3a7368)=>{const _0x2a4593=_0xceb2ee,_0x970295={'IDZxT':function(_0x5f4c7d,_0x112d7b){return _0x5f4c7d??_0x112d7b;},'glOxs':function(_0x1c211f,_0x4b75e3){return _0x1c211f??_0x4b75e3;}},_0x4df458={..._0x970295[_0x2a4593(0x184)](_0x54f97b,{}),..._0x970295['glOxs'](_0x3a7368,{})};return Object['keys'](_0x4df458)['length']?_0x4df458:undefined;},SAFE_MODE_ARGS=[_0xceb2ee(0x1b7)],ALLOW_LOCALHOST_ARGS=[_0xceb2ee(0x1c3),_0xceb2ee(0x1d7),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x121422,_0x5ed849={}){const _0x724e58=_0xceb2ee,_0x5ddeef={'SYZSD':function(_0x3d2324,_0x1f1477){return _0x3d2324(_0x1f1477);},'IjZGZ':function(_0x59a55a,_0x4747ab){return _0x59a55a===_0x4747ab;}},_0x5a5362=_0x5ddeef['SYZSD'](asRecord,_0x121422[_0x724e58(0x1be)]),_0x2844bc={...asRecord(_0x5a5362?.['launchOptions'])??{}};_0x5ddeef[_0x724e58(0x19a)](typeof _0x5ed849[_0x724e58(0x1bd)],'boolean')&&(_0x2844bc['headless']=_0x5ed849[_0x724e58(0x1bd)]);if(_0x121422[_0x724e58(0x185)]){const _0x15b314=_0x2844bc[_0x724e58(0x1bc)]??[],_0x27577e=SAFE_MODE_ARGS['filter'](_0x15e976=>!_0x15b314['includes'](_0x15e976));_0x2844bc[_0x724e58(0x1bc)]=[..._0x15b314,..._0x27577e];}if(_0x121422['allowInsecureLocalhost']){const _0x5a4318=_0x2844bc[_0x724e58(0x1bc)]??[],_0x12fbe6=ALLOW_LOCALHOST_ARGS['filter'](_0x38fc32=>!_0x5a4318['includes'](_0x38fc32));_0x2844bc['args']=[..._0x5a4318,..._0x12fbe6];}const _0x176350={...asRecord(_0x5a5362?.['contextOptions'])??{}};_0x176350[_0x724e58(0x165)]=!![];typeof _0x121422[_0x724e58(0x179)]==='string'&&(_0x176350[_0x724e58(0x179)]=_0x121422[_0x724e58(0x179)]);const _0x4b4820=mergeHeaders(asRecord(_0x176350['extraHTTPHeaders']),asRecord(_0x121422['headers']));return _0x4b4820?_0x176350[_0x724e58(0x173)]=_0x4b4820:delete _0x176350[_0x724e58(0x173)],_0x5ed849[_0x724e58(0x18e)]&&(_0x176350['storageState']=_0x5ed849['storageStatePath']),{'launchOptions':_0x2844bc,'contextOptions':_0x176350};}export async function resolveProfileStorageState(_0x5adeea){const _0x15eaf6=_0xceb2ee,_0x51f8b6={'VnZhH':function(_0x54c64f,_0x5a8b9f){return _0x54c64f(_0x5a8b9f);}};return _0x51f8b6[_0x15eaf6(0x189)](resolveLocalAuthPath,getEnvDir(_0x5adeea));}async function resolveLocalAuthPath(_0x54b5a5){const _0x506fc8=_0xceb2ee,_0x3e6520={'ZsBAu':function(_0x4e4f59,_0x62743,_0x126f6f){return _0x4e4f59(_0x62743,_0x126f6f);},'lLxfh':'auth.json.enc','ocNFG':'auth.json','kHWEJ':function(_0xfe2fa7,_0x5e79e2){return _0xfe2fa7(_0x5e79e2);},'sqidX':function(_0x590b7a,_0x42f632,_0x4c1984){return _0x590b7a(_0x42f632,_0x4c1984);},'BEjpb':function(_0x34b63d,_0x55638f){return _0x34b63d(_0x55638f);}},_0x306d0b=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x17b)]),_0x19c2de=_0x3e6520[_0x506fc8(0x1a2)](join,_0x54b5a5,_0x3e6520[_0x506fc8(0x19e)]);if(_0x3e6520['kHWEJ'](existsSync,_0x306d0b))try{const _0x4db9d7=await getToken();if(!_0x4db9d7)throw new Error(_0x506fc8(0x181));const _0xc3e384=await readFile(_0x306d0b),_0x54af09=_0x3e6520['sqidX'](decrypt,_0xc3e384,_0x4db9d7),_0x3de961=join(tmpdir(),_0x506fc8(0x1a1)+Date[_0x506fc8(0x171)]()+'.json');return await _0x3e6520['ZsBAu'](writeFile,_0x3de961,_0x54af09),{'storageStatePath':_0x3de961,'tempAuthPath':_0x3de961};}catch(_0x461efc){const _0x5ccea1=_0x461efc instanceof Error?_0x461efc[_0x506fc8(0x1e3)]:_0x3e6520[_0x506fc8(0x1d2)](String,_0x461efc);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x5ccea1);}if(_0x3e6520['BEjpb'](existsSync,_0x19c2de))return{'storageStatePath':_0x19c2de};return{};}export async function buildPlaywrightConfig(_0x3dc78d,_0x214cef,_0x2c1ff2,_0x21818f,_0x5517d1){const _0xae2c20={'CcHvK':function(_0x2673b8,_0x114818){return _0x2673b8(_0x114818);},'jNUMs':function(_0x24ead4,_0x220f1f){return _0x24ead4(_0x220f1f);}};if(_0x5517d1)return buildPlaywrightConfigCore(_0x3dc78d,_0x5517d1,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');const {storageStatePath:_0xef1a31,tempAuthPath:_0x4048b7}=await _0xae2c20['CcHvK'](resolveLocalAuthPath,_0xae2c20['jNUMs'](getEnvDir,_0x214cef));try{const _0x2ff2fa=await buildPlaywrightConfigCore(_0x3dc78d,_0xef1a31,_0x214cef,_0x2c1ff2,_0x21818f,'stagehand');return{..._0x2ff2fa,'tempAuthPath':_0x4048b7};}catch(_0x4cbc14){_0x4048b7&&await unlink(_0x4048b7)['catch'](()=>{});throw _0x4cbc14;}}export async function buildPlaywrightConfigCore(_0x2042f5,_0x270a75,_0x4dc58b,_0x502362,_0x4a654d,_0x4bace0=_0xceb2ee(0x198)){const _0x4a1891=_0xceb2ee,_0x2c86ad={'UtGFe':'--disable-setuid-sandbox','Zqkfk':_0x4a1891(0x1c8),'GNoZv':function(_0x3c7ce3){return _0x3c7ce3();},'wHNEa':function(_0x43665d,_0x2b307b,_0x36f48a,_0x4e9a74){return _0x43665d(_0x2b307b,_0x36f48a,_0x4e9a74);},'efeJj':function(_0x34adfd){return _0x34adfd();},'PcOfq':'chromium','SuMrB':'playwright-cli','SGqXB':_0x4a1891(0x17e),'YuiRq':_0x4a1891(0x178),'CoYwR':'pdf','BADGG':_0x4a1891(0x1ca),'VvnmA':'allow','szpHN':function(_0x93ffd5,_0x309622){return _0x93ffd5===_0x309622;},'gZZvc':'ranger-config','tbWyx':function(_0x520661,_0x38fd56){return _0x520661(_0x38fd56);},'JYskQ':function(_0x268320,_0x4dd02a,_0x248af4){return _0x268320(_0x4dd02a,_0x248af4);},'hNtmW':'-cli','oHXTN':function(_0x3712e3,_0x44c61b,_0x54bcfb){return _0x3712e3(_0x44c61b,_0x54bcfb);}},_0x1789e0=_0x502362||_0x2c86ad['GNoZv'](randomUUID),_0x5b2174=_0x2c86ad['wHNEa'](join,_0x2c86ad['efeJj'](getRangerDir),'sessions',_0x1789e0),_0x42fa00=Boolean(_0x2042f5[_0x4a1891(0x1c0)]),_0x2e1f71=_0x42fa00?{'browserName':_0x2c86ad[_0x4a1891(0x1ab)],'cdpEndpoint':_0x2042f5[_0x4a1891(0x1c0)]}:((()=>{const _0x3a1601=_0x4a1891,{launchOptions:_0x2d78c8,contextOptions:_0x33a8c5}=buildBrowserOptionsFromSettings(_0x2042f5,{'headless':_0x4a654d?![]:_0x2042f5[_0x3a1601(0x1bd)]??!![],'storageStatePath':_0x270a75});if(process[_0x3a1601(0x195)]?.()===0x0){const _0x55ec36=['--no-sandbox',_0x2c86ad['UtGFe']],_0x65958=_0x2d78c8[_0x3a1601(0x1bc)]??[],_0x541f8d=_0x55ec36[_0x3a1601(0x1d9)](_0x50adf5=>!_0x65958[_0x3a1601(0x1e2)](_0x50adf5));_0x2d78c8['args']=[..._0x65958,..._0x541f8d];}return{'isolated':!![],'browserName':_0x3a1601(0x168),'launchOptions':_0x2d78c8,'contextOptions':{..._0x33a8c5,'permissions':[_0x2c86ad['Zqkfk'],_0x3a1601(0x1b5)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3c700b=_0x4bace0===_0x2c86ad['SuMrB']?{'browser':_0x2e1f71,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174,'outputMode':_0x2c86ad[_0x4a1891(0x1e7)],'codegen':'none'}:{'name':_0x4dc58b,'browser':_0x2e1f71,'capabilities':[_0x4a1891(0x16c),_0x2c86ad['YuiRq'],'install',_0x2c86ad['CoYwR'],_0x2c86ad['BADGG']],'imageResponses':_0x2c86ad['VvnmA'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5b2174};if(!_0x42fa00){const _0x45d773=_0x3c700b[_0x4a1891(0x1be)],_0x638f18=_0x45d773[_0x4a1891(0x16d)];if(_0x2c86ad['szpHN'](_0x638f18[_0x4a1891(0x179)],undefined))delete _0x638f18['userAgent'];if(_0x638f18[_0x4a1891(0x16a)]===undefined)delete _0x638f18[_0x4a1891(0x16a)];}const _0x31ce55=join(tmpdir(),_0x2c86ad[_0x4a1891(0x1c6)]);!_0x2c86ad['tbWyx'](existsSync,_0x31ce55)&&await _0x2c86ad[_0x4a1891(0x1aa)](mkdir,_0x31ce55,{'recursive':!![]});const _0x2462b3=_0x4bace0===_0x2c86ad[_0x4a1891(0x1d1)]?_0x2c86ad[_0x4a1891(0x1de)]:'',_0x451df5=_0x2c86ad[_0x4a1891(0x1aa)](join,_0x31ce55,_0x4dc58b+'-'+Date['now']()+_0x2462b3+'.json');return await _0x2c86ad[_0x4a1891(0x17d)](writeFile,_0x451df5,JSON['stringify'](_0x3c700b,null,0x2)),{'configPath':_0x451df5,'storageStatePath':_0x270a75};}function _0x11ed(_0x3a8173,_0x22ed3d){_0x3a8173=_0x3a8173-0x162;const _0x564054=_0x5640();let _0x11ed50=_0x564054[_0x3a8173];return _0x11ed50;}export async function buildPlaywrightCliConfig(_0x16c1be,_0x3c450c,_0x298912,_0x1910c5,_0x26eff7){const _0x3ff5da=_0xceb2ee,_0x4f1160={'FvDnu':function(_0x3fb664,_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526){return _0x3fb664(_0x3db239,_0x50c42c,_0x379714,_0x120d43,_0x44ce8a,_0x581526);},'uRvVS':function(_0x575091,_0x5dd9ad){return _0x575091(_0x5dd9ad);}};if(_0x26eff7)return _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x26eff7,_0x3c450c,_0x298912,_0x1910c5,'playwright-cli');const {storageStatePath:_0x536e30,tempAuthPath:_0x3eedef}=await _0x4f1160['uRvVS'](resolveLocalAuthPath,getEnvDir(_0x3c450c));try{const _0x3e0370=await _0x4f1160['FvDnu'](buildPlaywrightConfigCore,_0x16c1be,_0x536e30,_0x3c450c,_0x298912,_0x1910c5,_0x3ff5da(0x1cf));return{..._0x3e0370,'tempAuthPath':_0x3eedef};}catch(_0x35dede){_0x3eedef&&await unlink(_0x3eedef)[_0x3ff5da(0x1dc)](()=>{});throw _0x35dede;}}export async function buildRangerwrightCliConfig(_0x59330e,_0x277230,_0x31a696,_0x50f8ae,_0x364986){const _0x13e416=_0xceb2ee,_0x2be3d9={'XXHQl':function(_0x4e0ccc,_0x4a9302){return _0x4e0ccc===_0x4a9302;},'xvbsV':'--no-sandbox','llMPp':'chromium','bYIZs':_0x13e416(0x1c8),'iCfvD':_0x13e416(0x1b5),'AQraL':function(_0x422bbb,_0x22efcb){return _0x422bbb(_0x22efcb);},'Qrkfg':function(_0x2a4585){return _0x2a4585();},'ONrhc':function(_0x32d433,_0x2d766d,_0x182019,_0x492d8c){return _0x32d433(_0x2d766d,_0x182019,_0x492d8c);},'phTRn':function(_0x12758d,_0x426ba3){return _0x12758d===_0x426ba3;},'vdTFz':function(_0x1d8797,_0x8d357d,_0x3a380a){return _0x1d8797(_0x8d357d,_0x3a380a);},'bminV':function(_0xc9e49b){return _0xc9e49b();},'TqiBZ':'ranger-config','wGkQz':function(_0x1dca51,_0x19313b,_0x5ce97f){return _0x1dca51(_0x19313b,_0x5ce97f);}},{storageStatePath:_0x59f547,tempAuthPath:_0x2abc42}=_0x364986?{'storageStatePath':_0x364986,'tempAuthPath':undefined}:await _0x2be3d9['AQraL'](resolveLocalAuthPath,getEnvDir(_0x277230)),_0x539574=_0x31a696||_0x2be3d9[_0x13e416(0x1bb)](randomUUID),_0x482cec=_0x2be3d9['ONrhc'](join,_0x2be3d9['Qrkfg'](getRangerDir),'sessions',_0x539574),_0x3e56f9=Boolean(_0x59330e['cdpEndpoint']),_0x226f4e=_0x3e56f9?{'browserName':_0x2be3d9['llMPp'],'cdpEndpoint':_0x59330e[_0x13e416(0x1c0)]}:((()=>{const _0x3b7a37=_0x13e416,{launchOptions:_0x2ee50e,contextOptions:_0x1ffef5}=buildBrowserOptionsFromSettings(_0x59330e,{'headless':_0x50f8ae?![]:_0x59330e['headless']??!![],'storageStatePath':_0x59f547});if(_0x2be3d9[_0x3b7a37(0x163)](process[_0x3b7a37(0x195)]?.(),0x0)){const _0x2f0250=[_0x2be3d9['xvbsV'],'--disable-setuid-sandbox'],_0x4dbf42=_0x2ee50e[_0x3b7a37(0x1bc)]??[],_0x2709a5=_0x2f0250[_0x3b7a37(0x1d9)](_0x5da699=>!_0x4dbf42[_0x3b7a37(0x1e2)](_0x5da699));_0x2ee50e[_0x3b7a37(0x1bc)]=[..._0x4dbf42,..._0x2709a5];}return{'browserName':_0x2be3d9[_0x3b7a37(0x1a6)],'launchOptions':_0x2ee50e,'contextOptions':{..._0x1ffef5,'permissions':[_0x2be3d9['bYIZs'],_0x2be3d9[_0x3b7a37(0x176)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3e56f9){const _0x3bd090=_0x226f4e[_0x13e416(0x16d)];if(_0x3bd090){if(_0x2be3d9[_0x13e416(0x17a)](_0x3bd090[_0x13e416(0x179)],undefined))delete _0x3bd090['userAgent'];if(_0x3bd090[_0x13e416(0x16a)]===undefined)delete _0x3bd090['storageState'];}}const _0x342cf7={'browser':_0x226f4e,'outputDir':_0x482cec,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3f37fd;try{const _0x4290f3=_0x2be3d9[_0x13e416(0x196)](join,_0x2be3d9[_0x13e416(0x197)](tmpdir),_0x2be3d9[_0x13e416(0x1c9)]);!_0x2be3d9['AQraL'](existsSync,_0x4290f3)&&await mkdir(_0x4290f3,{'recursive':!![]}),_0x3f37fd=_0x2be3d9['vdTFz'](join,_0x4290f3,_0x277230+'-'+Date[_0x13e416(0x171)]()+'-rangerwright.json'),await _0x2be3d9['wGkQz'](writeFile,_0x3f37fd,JSON[_0x13e416(0x1a8)](_0x342cf7,null,0x2));}catch(_0x3bd1cd){_0x2abc42&&await _0x2be3d9[_0x13e416(0x1c4)](unlink,_0x2abc42)['catch'](()=>{});throw _0x3bd1cd;}return{'configPath':_0x3f37fd,'storageStatePath':_0x59f547,'tempAuthPath':_0x2abc42,'outputDir':_0x482cec};}export async function buildNovaActCliConfig(_0x14d24c,_0x3f1619,_0x4589bd,_0xd7d706,_0x496d65){const _0x5b1642=_0xceb2ee,_0xec1d13={'xArhN':function(_0x1266a1,_0x540a85){return _0x1266a1(_0x540a85);},'cfZPe':function(_0x2c21de,_0x5ed889){return _0x2c21de(_0x5ed889);},'JTDeh':function(_0x219ce0,_0x3c5b1c,_0x34eb8a,_0x293131){return _0x219ce0(_0x3c5b1c,_0x34eb8a,_0x293131);},'SjtfG':'nova-user-data','szvGq':function(_0x16ce7b,_0x2f40d6,_0x3f4231){return _0x16ce7b(_0x2f40d6,_0x3f4231);},'bFbjd':function(_0x57477e,_0x35506b){return _0x57477e===_0x35506b;},'wGvdD':_0x5b1642(0x194),'gEBqi':_0x5b1642(0x1dd),'mJzDZ':function(_0x3696ed,_0x4618ee){return _0x3696ed===_0x4618ee;},'CPrFF':'string','uAHyZ':function(_0x41bbff,_0x4126e7){return _0x41bbff(_0x4126e7);}},{storageStatePath:_0x406b40,tempAuthPath:_0x4f6a78}=_0x496d65?{'storageStatePath':_0x496d65,'tempAuthPath':undefined}:await _0xec1d13['xArhN'](resolveLocalAuthPath,_0xec1d13[_0x5b1642(0x199)](getEnvDir,_0x3f1619)),_0x2665e9=_0x4589bd||randomUUID(),_0x57d8da=_0xec1d13[_0x5b1642(0x1db)](join,getRangerDir(),_0x5b1642(0x19f),_0x2665e9),_0x10baa9=join(_0x57d8da,_0xec1d13['SjtfG']),_0x242774=_0x406b40?_0xec1d13[_0x5b1642(0x1e6)](join,_0x10baa9,'Default'):undefined,{launchOptions:_0x1649c6,contextOptions:_0x249abd}=buildBrowserOptionsFromSettings(_0x14d24c,{'headless':_0xd7d706?![]:_0x14d24c['headless']??!![],'storageStatePath':_0x406b40});if(_0xec1d13[_0x5b1642(0x1a5)](process['getuid']?.(),0x0)){const _0x21531c=[_0xec1d13[_0x5b1642(0x1e5)],_0xec1d13['gEBqi']],_0xbb3ea=_0x1649c6[_0x5b1642(0x1bc)]??[],_0x86895=_0x21531c[_0x5b1642(0x1d9)](_0x12b743=>!_0xbb3ea[_0x5b1642(0x1e2)](_0x12b743));_0x1649c6['args']=[..._0xbb3ea,..._0x86895];}const _0x1ef183=_0xec1d13[_0x5b1642(0x177)](typeof _0x1649c6['executablePath'],'string')?_0x1649c6[_0x5b1642(0x1c2)]:_0x406b40?chromium['executablePath']():undefined;return{'storageStatePath':_0x406b40,'tempAuthPath':_0x4f6a78,'baseUrl':_0x14d24c['baseUrl'],'headless':_0xec1d13[_0x5b1642(0x199)](Boolean,_0x1649c6['headless']),'userDataDir':_0x10baa9,'browserProfilePath':_0x242774,'executablePath':_0x1ef183,'launchArgs':Array['isArray'](_0x1649c6['args'])?_0x1649c6[_0x5b1642(0x1bc)][_0x5b1642(0x1d9)](_0x3527fa=>typeof _0x3527fa==='string'):[],'userAgent':_0xec1d13['mJzDZ'](typeof _0x249abd['userAgent'],_0xec1d13[_0x5b1642(0x1d6)])?_0x249abd['userAgent']:undefined,'extraHTTPHeaders':_0x249abd['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x14d24c['allowInsecureLocalhost']),'safeMode':Boolean(_0x14d24c[_0x5b1642(0x185)]),'cdpEndpoint':_0x14d24c['cdpEndpoint'],'isCdpMode':_0xec1d13[_0x5b1642(0x1bf)](Boolean,_0x14d24c[_0x5b1642(0x1c0)])};}export function getNestedValue(_0x50805a,_0x128f8a){const _0x1792aa={'Pugsa':function(_0x3b899c,_0x39f6b3){return _0x3b899c(_0x39f6b3);},'VYsss':function(_0x36cc28,_0x2e3d5a){return _0x36cc28===_0x2e3d5a;}},_0x17ff7d=_0x1792aa['Pugsa'](parseKeyPath,_0x128f8a);let _0x43489c=_0x50805a;for(const _0x123dcb of _0x17ff7d){if(_0x1792aa['VYsss'](_0x43489c,null)||_0x43489c===undefined||typeof _0x43489c!=='object')return undefined;_0x43489c=_0x43489c[_0x123dcb];}return _0x43489c;}export function setNestedValue(_0x34ef53,_0x2cf163,_0x46f5e3){const _0x1da8b3=_0xceb2ee,_0x18defe={'Hflpe':function(_0x6974f9,_0x8738c6){return _0x6974f9<_0x8738c6;},'sOThA':function(_0x4e4e09,_0x4dc2a2){return _0x4e4e09!==_0x4dc2a2;},'RbZIC':function(_0x3916cd,_0x2c4e8d){return _0x3916cd-_0x2c4e8d;}},_0x54ecb1=parseKeyPath(_0x2cf163);let _0x16b366=_0x34ef53;for(let _0xb34c87=0x0;_0x18defe[_0x1da8b3(0x174)](_0xb34c87,_0x54ecb1[_0x1da8b3(0x17f)]-0x1);_0xb34c87++){const _0x3abf2e=_0x54ecb1[_0xb34c87];(!(_0x3abf2e in _0x16b366)||_0x18defe['sOThA'](typeof _0x16b366[_0x3abf2e],'object'))&&(_0x16b366[_0x3abf2e]={}),_0x16b366=_0x16b366[_0x3abf2e];}_0x16b366[_0x54ecb1[_0x18defe['RbZIC'](_0x54ecb1[_0x1da8b3(0x17f)],0x1)]]=_0x46f5e3;}export function deleteNestedValue(_0x387942,_0x410e98){const _0x3b709e=_0xceb2ee,_0x22f517={'lXVei':function(_0x13232d,_0x3faf2b){return _0x13232d<_0x3faf2b;},'fpJSG':function(_0x43b362,_0x5f1944){return _0x43b362-_0x5f1944;},'YpLyE':function(_0x47ab90,_0x84cc70){return _0x47ab90===_0x84cc70;},'hriMc':function(_0x4c7607,_0x23246a){return _0x4c7607===_0x23246a;}},_0x229f1c=parseKeyPath(_0x410e98);let _0x5a4195=_0x387942;for(let _0x2cd11c=0x0;_0x22f517[_0x3b709e(0x175)](_0x2cd11c,_0x22f517['fpJSG'](_0x229f1c[_0x3b709e(0x17f)],0x1));_0x2cd11c++){if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x5a4195===undefined||typeof _0x5a4195!=='object')return![];_0x5a4195=_0x5a4195[_0x229f1c[_0x2cd11c]];}if(_0x22f517[_0x3b709e(0x1e1)](_0x5a4195,null)||_0x22f517['hriMc'](_0x5a4195,undefined)||typeof _0x5a4195!==_0x3b709e(0x183))return![];const _0x1a96d8=_0x229f1c[_0x229f1c['length']-0x1];if(_0x1a96d8 in _0x5a4195)return delete _0x5a4195[_0x1a96d8],!![];return![];}function parseKeyPath(_0x53b8a5){const _0x1160ff=_0xceb2ee,_0x5109aa={'tBDpY':function(_0x562eba,_0x1c54e7){return _0x562eba===_0x1c54e7;}},_0x3758c0=_0x53b8a5['split']('.');return _0x5109aa[_0x1160ff(0x1da)](_0x3758c0[0x0],_0x1160ff(0x1b1))&&(_0x3758c0[0x0]=_0x1160ff(0x162)),_0x3758c0[0x0]==='setupHeader'&&(_0x3758c0[0x0]=_0x1160ff(0x1a9)),_0x3758c0;}export function formatSettings(_0x4f1366,_0x40d554=0x0){const _0x5848ee=_0xceb2ee,_0x55ec40={'ZZhHu':function(_0x19a623,_0xeddbea){return _0x19a623===_0xeddbea;},'XINOU':_0x5848ee(0x183)},_0x147889=[],_0x31c187='\x20\x20'['repeat'](_0x40d554);for(const [_0x38f8c0,_0x8c536c]of Object[_0x5848ee(0x18a)](_0x4f1366)){if(_0x8c536c===undefined)continue;if(_0x55ec40['ZZhHu'](typeof _0x8c536c,_0x55ec40[_0x5848ee(0x167)])&&_0x8c536c!==null){_0x147889[_0x5848ee(0x1af)](''+_0x31c187+_0x38f8c0+':');for(const [_0x262b91,_0x278d6a]of Object['entries'](_0x8c536c)){_0x147889[_0x5848ee(0x1af)](_0x31c187+'\x20\x20'+_0x262b91+':\x20'+_0x278d6a);}}else _0x147889['push'](''+_0x31c187+_0x38f8c0+':\x20'+_0x8c536c);}return _0x147889['join']('\x0a');}
|
|
1
|
+
const _0x3317b6=_0x2f56;(function(_0x2de584,_0x31438a){const _0x4cfbc3=_0x2f56,_0x3ab6cf=_0x2de584();while(!![]){try{const _0x36d535=parseInt(_0x4cfbc3(0xe5))/0x1*(parseInt(_0x4cfbc3(0xe4))/0x2)+parseInt(_0x4cfbc3(0xc4))/0x3*(-parseInt(_0x4cfbc3(0xf8))/0x4)+-parseInt(_0x4cfbc3(0x124))/0x5*(parseInt(_0x4cfbc3(0x116))/0x6)+parseInt(_0x4cfbc3(0xef))/0x7*(parseInt(_0x4cfbc3(0xcc))/0x8)+parseInt(_0x4cfbc3(0x125))/0x9*(parseInt(_0x4cfbc3(0x145))/0xa)+parseInt(_0x4cfbc3(0x11c))/0xb*(parseInt(_0x4cfbc3(0xc5))/0xc)+-parseInt(_0x4cfbc3(0x12c))/0xd;if(_0x36d535===_0x31438a)break;else _0x3ab6cf['push'](_0x3ab6cf['shift']());}catch(_0x2352a5){_0x3ab6cf['push'](_0x3ab6cf['shift']());}}}(_0x8c18,0xebd1d));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(_0x25f074,_0xbeb10e){const _0x5ea4ea=_0x2f56,_0x151da3={'xvcDw':'local','AaCdh':function(_0x2867d7,_0x2c5899,_0x55df9a){return _0x2867d7(_0x2c5899,_0x55df9a);},'pyCZE':function(_0x1bda26,_0x45cc8e,_0x53add6){return _0x1bda26(_0x45cc8e,_0x53add6);},'KUZUN':function(_0x1bacd5,_0x3eb340,_0x4b4892){return _0x1bacd5(_0x3eb340,_0x4b4892);},'XOBvd':function(_0x498707,_0x4f7199){return _0x498707(_0x4f7199);},'RqNiY':function(_0x2fccf5,_0x5e9aea){return _0x2fccf5!==_0x5e9aea;}},_0x427298=join(_0xbeb10e,'ci',_0x25f074),_0x26ef64=join(_0xbeb10e,_0x151da3[_0x5ea4ea(0xe9)],_0x25f074),_0x26a9f9=_0x151da3[_0x5ea4ea(0xcf)](join,_0xbeb10e,_0x25f074),_0x4a7ffc=_0x151da3[_0x5ea4ea(0xd9)](join,_0xbeb10e,_0x151da3[_0x5ea4ea(0xe9)]),_0x59622d=_0x151da3['KUZUN'](join,_0xbeb10e,'ci');if(_0x151da3[_0x5ea4ea(0x12a)](existsSync,_0x427298))return _0x427298;if(_0x151da3['XOBvd'](existsSync,_0x26ef64))return _0x26ef64;if(existsSync(_0x26a9f9)&&(_0x151da3[_0x5ea4ea(0xc6)](_0x26a9f9,_0x4a7ffc)&&_0x26a9f9!==_0x59622d?!![]:hasLegacyProfileFiles(_0x26a9f9)))return _0x26a9f9;return null;}export function getEnvDir(_0x5ca78b,_0x2450ff={}){const _0x527128=_0x2f56,_0x3073d6={'lumBZ':function(_0x4eab8b,_0x58f30,_0x259ea3){return _0x4eab8b(_0x58f30,_0x259ea3);},'RHIXn':function(_0x2ffdaa){return _0x2ffdaa();},'RKMGb':function(_0x35631c,_0x1b072e){return _0x35631c!==_0x1b072e;},'wbxNt':_0x527128(0xf7)},_0x375b1d=getRangerDir(),_0xaa1320=findEnvInRoot(_0x5ca78b,_0x375b1d);if(_0xaa1320){if(_0x2450ff[_0x527128(0xdc)]&&isLegacyEnvPath(_0xaa1320))throw _0x3073d6['lumBZ'](legacyWriteError,_0x5ca78b,_0xaa1320);return _0xaa1320;}const _0xada725=_0x3073d6['RHIXn'](getRangerHomeDir);if(_0x3073d6['RKMGb'](_0xada725,_0x375b1d)){const _0x3054d4=_0x3073d6['lumBZ'](findEnvInRoot,_0x5ca78b,_0xada725);if(_0x3054d4){if(_0x2450ff[_0x527128(0xdc)]&&isLegacyEnvPath(_0x3054d4))throw legacyWriteError(_0x5ca78b,_0x3054d4);return _0x3054d4;}}const _0x46f6cf=join(_0xada725,_0x3073d6[_0x527128(0x138)],_0x5ca78b);if(_0x2450ff['forWrite'])throw _0x3073d6[_0x527128(0x13b)](legacyWriteError,_0x5ca78b,_0x46f6cf);return _0x46f6cf;}function isLegacyEnvPath(_0x477caf){const _0x5e9e3c=_0x2f56,_0x404000={'xJdGr':function(_0x54e776){return _0x54e776();},'wnuyI':function(_0x59dfab,_0x3962e8){return _0x59dfab+_0x3962e8;},'tYUoG':function(_0x126ea9,_0x4dc2ca){return _0x126ea9===_0x4dc2ca;}},_0x540829=_0x404000[_0x5e9e3c(0xe1)](getRangerDir),_0x8771ad=_0x404000[_0x5e9e3c(0xe1)](getRangerHomeDir);for(const _0x3adcf8 of new Set([_0x540829,_0x8771ad])){const _0x5a1e17=_0x3adcf8[_0x5e9e3c(0xeb)]('/')?_0x3adcf8:_0x404000['wnuyI'](_0x3adcf8,'/');if(_0x404000[_0x5e9e3c(0xf1)](_0x477caf,_0x3adcf8)||_0x477caf['startsWith'](_0x5a1e17))return!![];}return![];}function _0x2f56(_0x2c248c,_0x24eaed){_0x2c248c=_0x2c248c-0xc0;const _0x8c182b=_0x8c18();let _0x2f5680=_0x8c182b[_0x2c248c];return _0x2f5680;}function legacyWriteError(_0x2a5930,_0x2f4787){const _0x2ee8a6=_0x2f56,_0x262e45={'rweoa':function(_0x74903b,_0x55826a){return _0x74903b+_0x55826a;},'ULUSx':function(_0x580af7,_0x4ce45c){return _0x580af7+_0x4ce45c;}};return new Error(_0x262e45[_0x2ee8a6(0xcd)](_0x262e45[_0x2ee8a6(0xf0)](_0x2ee8a6(0x105)+_0x2a5930+_0x2ee8a6(0xc0)+_0x2f4787+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x2ee8a6(0xc2));}export function findExistingEnv(_0x2947cd,_0x23fced){const _0x2bef10=_0x2f56,_0x3f9a82={'FMBnT':'local','pEJMe':_0x2bef10(0x10f),'cQGUv':function(_0x867f43,_0x497d73,_0x15b3c3){return _0x867f43(_0x497d73,_0x15b3c3);},'qEZEY':function(_0x7b4fbe,_0x5e706c){return _0x7b4fbe===_0x5e706c;}},_0x179cfb=_0x23fced?.[_0x2bef10(0x146)],_0x3c4bf7=_0x179cfb?[_0x179cfb]:[getRangerDir(),getRangerHomeDir()]['filter']((_0x43efb9,_0x264afa,_0x362b54)=>_0x362b54['indexOf'](_0x43efb9)===_0x264afa),_0x1ab827=_0x23fced?.[_0x2bef10(0x107)]??['ci',_0x3f9a82[_0x2bef10(0x11f)],_0x3f9a82['pEJMe']];for(const _0x5caf9a of _0x3c4bf7){const _0x29cc14=_0x3f9a82[_0x2bef10(0xe3)](join,_0x5caf9a,_0x3f9a82['FMBnT']),_0x7851ce=_0x3f9a82['cQGUv'](join,_0x5caf9a,'ci'),_0x3cbb6f=[{'location':'ci','path':join(_0x5caf9a,'ci',_0x2947cd)},{'location':_0x3f9a82[_0x2bef10(0x11f)],'path':join(_0x5caf9a,_0x2bef10(0xf7),_0x2947cd)},{'location':_0x3f9a82[_0x2bef10(0xe8)],'path':_0x3f9a82['cQGUv'](join,_0x5caf9a,_0x2947cd)}];for(const _0x1c24dd of _0x3cbb6f){if(_0x1ab827[_0x2bef10(0xdb)](_0x1c24dd['location'])&&existsSync(_0x1c24dd['path'])){if(_0x1c24dd[_0x2bef10(0xdf)]===_0x3f9a82['pEJMe']&&(_0x3f9a82['qEZEY'](_0x1c24dd[_0x2bef10(0x143)],_0x29cc14)||_0x3f9a82['qEZEY'](_0x1c24dd[_0x2bef10(0x143)],_0x7851ce))&&!hasLegacyProfileFiles(_0x1c24dd[_0x2bef10(0x143)]))continue;return{'path':_0x1c24dd[_0x2bef10(0x143)],'location':_0x1c24dd['location']};}}}return null;}function hasLegacyProfileFiles(_0xe224f){const _0x2d1b4b=_0x2f56,_0x54d501={'ukadg':function(_0x5ce8ab,_0x11a187){return _0x5ce8ab(_0x11a187);},'mexoN':_0x2d1b4b(0xf9),'yUeQF':function(_0x2a71ab,_0x302ce5,_0x3b1015){return _0x2a71ab(_0x302ce5,_0x3b1015);},'gfccJ':function(_0xd93da9,_0x44eaa9){return _0xd93da9(_0x44eaa9);}};return _0x54d501[_0x2d1b4b(0x119)](existsSync,join(_0xe224f,_0x54d501['mexoN']))||existsSync(_0x54d501['yUeQF'](join,_0xe224f,'auth.json'))||_0x54d501['gfccJ'](existsSync,join(_0xe224f,_0x2d1b4b(0xd7)));}export function isEnvCi(_0x529a47){const _0x21a238=_0x2f56,_0x146ff6={'EESty':function(_0x368919,_0x20a6a2,_0x38eff1,_0x3568fa){return _0x368919(_0x20a6a2,_0x38eff1,_0x3568fa);},'gZXWp':function(_0x321544){return _0x321544();},'SUxDl':function(_0x20611a,_0x244269){return _0x20611a!==_0x244269;},'GLWZh':function(_0x59d24a,_0x188acb,_0x4b40f8,_0x483347){return _0x59d24a(_0x188acb,_0x4b40f8,_0x483347);}};if(existsSync(_0x146ff6[_0x21a238(0x108)](join,_0x146ff6[_0x21a238(0xf5)](getRangerDir),'ci',_0x529a47)))return!![];const _0x30abc8=_0x146ff6[_0x21a238(0xf5)](getRangerHomeDir);if(_0x146ff6['SUxDl'](_0x30abc8,getRangerDir())&&existsSync(_0x146ff6['GLWZh'](join,_0x30abc8,'ci',_0x529a47)))return!![];return![];}export async function cleanupTempFiles(_0x44ad94){const _0x1f0042=_0x2f56,_0x74ed5b={'ROEFh':'ENOENT'},_0x1307a7=[_0x44ad94['tempAuthPath'],_0x44ad94['configPath']][_0x1f0042(0xfa)](Boolean);await Promise[_0x1f0042(0xc9)](_0x1307a7['map'](_0x2049d2=>unlink(_0x2049d2)['catch'](_0x32669=>{const _0x1d2fd3=_0x1f0042;_0x32669[_0x1d2fd3(0xfe)]!==_0x74ed5b['ROEFh']&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x2049d2+':',_0x32669[_0x1d2fd3(0xea)]);})));}export function getSettingsPath(_0x29c28c){const _0x5780e2=_0x2f56,_0x98ee19={'zxljF':function(_0x1825d4,_0x377c58,_0x3e78c1){return _0x1825d4(_0x377c58,_0x3e78c1);},'rcvVm':_0x5780e2(0xf9)};return _0x98ee19['zxljF'](join,getEnvDir(_0x29c28c),_0x98ee19[_0x5780e2(0x117)]);}export async function loadSettings(_0x20af4e){const _0x4b307a=_0x2f56,_0x18ee35={'ShRSB':function(_0x49271b,_0x54fb3b){return _0x49271b(_0x54fb3b);}},_0x65bf64=_0x18ee35[_0x4b307a(0x135)](getSettingsPath,_0x20af4e);if(!existsSync(_0x65bf64))return{};try{const _0x2f8099=await readFile(_0x65bf64,_0x4b307a(0x11b));return JSON['parse'](_0x2f8099);}catch{return{};}}export async function saveSettings(_0x566f6c,_0x5f3872){const _0x1c127b=_0x2f56,_0x7d7632={'MuKLI':function(_0x4c8826,_0x13bd4d){return _0x4c8826(_0x13bd4d);}},_0x460b3f=getSettingsPath(_0x566f6c),_0x5ad81b=dirname(_0x460b3f);!_0x7d7632[_0x1c127b(0xf6)](existsSync,_0x5ad81b)&&await mkdir(_0x5ad81b,{'recursive':!![]}),await writeFile(_0x460b3f,JSON['stringify'](_0x5f3872,null,0x2));}export function resolveEnvVars(_0x207812){const _0x31b435=_0x2f56,_0x277991={'XeOLF':function(_0x31267d,_0x529b23){return _0x31267d===_0x529b23;},'eNAXD':'object'};if(typeof _0x207812===_0x31b435(0xed))return _0x207812[_0x31b435(0xce)](/\$\{(\w+)\}/g,(_0x135246,_0xecc0d5)=>{const _0x53a04e=_0x31b435,_0x15efc9=process[_0x53a04e(0xda)][_0xecc0d5];if(_0x277991[_0x53a04e(0xd8)](_0x15efc9,undefined))throw new Error(_0x53a04e(0xff)+_0xecc0d5+_0x53a04e(0x134));return _0x15efc9;});if(Array[_0x31b435(0xe6)](_0x207812))return _0x207812['map'](resolveEnvVars);if(_0x207812&&typeof _0x207812===_0x277991['eNAXD'])return Object[_0x31b435(0xd3)](Object['entries'](_0x207812)[_0x31b435(0x133)](([_0x5e256c,_0x1e9d8b])=>[_0x5e256c,resolveEnvVars(_0x1e9d8b)]));return _0x207812;}const isRecord=_0x88f889=>typeof _0x88f889==='object'&&_0x88f889!==null&&!Array[_0x3317b6(0xe6)](_0x88f889),asRecord=_0x3598ef=>isRecord(_0x3598ef)?_0x3598ef:undefined,mergeHeaders=(_0x571b60,_0xd14dfd)=>{const _0x245455={'WztKg':function(_0x219637,_0x357b9d){return _0x219637??_0x357b9d;}},_0x44589c={..._0x245455['WztKg'](_0x571b60,{}),..._0xd14dfd??{}};return Object['keys'](_0x44589c)['length']?_0x44589c:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x3317b6(0xf2),'--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x3317b6(0xee)];export function buildBrowserOptionsFromSettings(_0x4b5163,_0xdcea01={}){const _0x1cdb6e=_0x3317b6,_0x47d95d={'wNvSJ':function(_0x3a1666,_0x1d886a){return _0x3a1666(_0x1d886a);},'DXVRV':'boolean','OVgiF':function(_0x396e9e,_0x1a15ce){return _0x396e9e(_0x1a15ce);},'UAwPZ':function(_0x8a4a2d,_0xaba98f){return _0x8a4a2d===_0xaba98f;},'KhVFZ':_0x1cdb6e(0xed),'QohGK':function(_0x34912b,_0x179bfb,_0x39e9ed){return _0x34912b(_0x179bfb,_0x39e9ed);}},_0x17d72a=_0x47d95d[_0x1cdb6e(0x140)](asRecord,_0x4b5163['browser']),_0x2a9535={..._0x47d95d['wNvSJ'](asRecord,_0x17d72a?.[_0x1cdb6e(0xd4)])??{}};typeof _0xdcea01['headless']===_0x47d95d[_0x1cdb6e(0x10b)]&&(_0x2a9535['headless']=_0xdcea01['headless']);if(_0x4b5163['safeMode']){const _0x244f55=_0x2a9535[_0x1cdb6e(0xe0)]??[],_0x115029=SAFE_MODE_ARGS[_0x1cdb6e(0xfa)](_0x5232c8=>!_0x244f55[_0x1cdb6e(0xdb)](_0x5232c8));_0x2a9535['args']=[..._0x244f55,..._0x115029];}if(_0x4b5163[_0x1cdb6e(0xd6)]){const _0x3b1134=_0x2a9535['args']??[],_0x4f7575=ALLOW_LOCALHOST_ARGS['filter'](_0x3accc6=>!_0x3b1134['includes'](_0x3accc6));_0x2a9535['args']=[..._0x3b1134,..._0x4f7575];}const _0x45a7cc={..._0x47d95d['OVgiF'](asRecord,_0x17d72a?.['contextOptions'])??{}};_0x45a7cc['ignoreHTTPSErrors']=!![];_0x47d95d[_0x1cdb6e(0xc1)](typeof _0x4b5163['userAgent'],_0x47d95d['KhVFZ'])&&(_0x45a7cc['userAgent']=_0x4b5163[_0x1cdb6e(0xde)]);const _0x2f91f8=_0x47d95d['QohGK'](mergeHeaders,_0x47d95d[_0x1cdb6e(0x121)](asRecord,_0x45a7cc['extraHTTPHeaders']),_0x47d95d['OVgiF'](asRecord,_0x4b5163[_0x1cdb6e(0xd0)]));return _0x2f91f8?_0x45a7cc[_0x1cdb6e(0xfd)]=_0x2f91f8:delete _0x45a7cc[_0x1cdb6e(0xfd)],_0xdcea01['storageStatePath']&&(_0x45a7cc[_0x1cdb6e(0x120)]=_0xdcea01['storageStatePath']),{'launchOptions':_0x2a9535,'contextOptions':_0x45a7cc};}export async function resolveProfileStorageState(_0x1ce7cb){const _0x561503=_0x3317b6,_0x5b5942={'jkTLo':function(_0xb6748b,_0x57cc89){return _0xb6748b(_0x57cc89);}};return resolveLocalAuthPath(_0x5b5942[_0x561503(0xc7)](getEnvDir,_0x1ce7cb));}async function resolveLocalAuthPath(_0x152ae9){const _0x29a177=_0x3317b6,_0x461c50={'lRdgR':'auth.json.enc','OjQFr':function(_0x5b9cc3,_0x4c1ed3,_0x663112){return _0x5b9cc3(_0x4c1ed3,_0x663112);},'aBAoG':function(_0x52ba03){return _0x52ba03();},'Vopru':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ZfnNn':function(_0x506113,_0x3e894d,_0x33de5c){return _0x506113(_0x3e894d,_0x33de5c);}},_0x5de4de=join(_0x152ae9,_0x461c50['lRdgR']),_0xada33a=_0x461c50['OjQFr'](join,_0x152ae9,'auth.json');if(existsSync(_0x5de4de))try{const _0x5c404a=await _0x461c50['aBAoG'](getToken);if(!_0x5c404a)throw new Error(_0x461c50['Vopru']);const _0x567d45=await readFile(_0x5de4de),_0x5658cf=_0x461c50['ZfnNn'](decrypt,_0x567d45,_0x5c404a),_0x4a1711=_0x461c50[_0x29a177(0x126)](join,_0x461c50['aBAoG'](tmpdir),_0x29a177(0xc3)+Date['now']()+_0x29a177(0xfb));return await writeFile(_0x4a1711,_0x5658cf),{'storageStatePath':_0x4a1711,'tempAuthPath':_0x4a1711};}catch(_0x4a74c0){const _0x5b7b7b=_0x4a74c0 instanceof Error?_0x4a74c0['message']:String(_0x4a74c0);throw new Error(_0x29a177(0x123)+_0x5b7b7b);}if(existsSync(_0xada33a))return{'storageStatePath':_0xada33a};return{};}export async function buildPlaywrightConfig(_0x4da0e5,_0x88cdaa,_0x48a970,_0x41952d,_0x567eca){const _0x4ef444=_0x3317b6,_0x34f72e={'GxCWb':function(_0x16b6d6,_0xb1f61f,_0x2a18c4,_0x2b1440,_0xc7d82e,_0x46ab2b,_0x461c80){return _0x16b6d6(_0xb1f61f,_0x2a18c4,_0x2b1440,_0xc7d82e,_0x46ab2b,_0x461c80);},'DRyKr':_0x4ef444(0xf3),'dlZAo':function(_0x261128,_0x96d584){return _0x261128(_0x96d584);},'ElGRM':function(_0x7a893a,_0x520ff7,_0x2e6a61,_0xe4d932,_0x19654b,_0x4df5be,_0x47b95c){return _0x7a893a(_0x520ff7,_0x2e6a61,_0xe4d932,_0x19654b,_0x4df5be,_0x47b95c);}};if(_0x567eca)return _0x34f72e[_0x4ef444(0x122)](buildPlaywrightConfigCore,_0x4da0e5,_0x567eca,_0x88cdaa,_0x48a970,_0x41952d,_0x34f72e[_0x4ef444(0xd2)]);const {storageStatePath:_0x5e6593,tempAuthPath:_0x5ff5fd}=await _0x34f72e[_0x4ef444(0x113)](resolveLocalAuthPath,getEnvDir(_0x88cdaa));try{const _0x444b0a=await _0x34f72e['ElGRM'](buildPlaywrightConfigCore,_0x4da0e5,_0x5e6593,_0x88cdaa,_0x48a970,_0x41952d,'stagehand');return{..._0x444b0a,'tempAuthPath':_0x5ff5fd};}catch(_0x3d486a){_0x5ff5fd&&await unlink(_0x5ff5fd)['catch'](()=>{});throw _0x3d486a;}}export async function buildPlaywrightConfigCore(_0x7bc6d4,_0x1d136e,_0x4a789c,_0x33504e,_0x56ed9a,_0xe0a31='stagehand'){const _0x41b6da=_0x3317b6,_0x1840f3={'TXoUU':'chromium','yrqnc':_0x41b6da(0xd1),'AMRLh':function(_0x37a23b){return _0x37a23b();},'uagQR':function(_0x4f27a3,_0x203b25,_0x28d4c6,_0x4d198a){return _0x4f27a3(_0x203b25,_0x28d4c6,_0x4d198a);},'JdXrd':function(_0x411c43,_0x5cb45e){return _0x411c43(_0x5cb45e);},'JyOwE':function(_0x312e29,_0x670356){return _0x312e29===_0x670356;},'NDGqF':'file','Wgomj':'tabs','wxLuo':'install','jgavo':'pdf','pmfqU':_0x41b6da(0x130),'zvQnQ':function(_0x423713,_0xc2b4ef,_0x534a63){return _0x423713(_0xc2b4ef,_0x534a63);},'GilSX':function(_0x49801f,_0x3d6d02){return _0x49801f===_0x3d6d02;},'QKeBW':'playwright-cli','fSXvR':'-cli'},_0x44412a=_0x33504e||_0x1840f3[_0x41b6da(0x104)](randomUUID),_0x1fe0c4=_0x1840f3['uagQR'](join,getRangerDir(),_0x41b6da(0x115),_0x44412a),_0x57083a=_0x1840f3['JdXrd'](Boolean,_0x7bc6d4['cdpEndpoint']),_0x43e699=_0x57083a?{'browserName':_0x1840f3[_0x41b6da(0x114)],'cdpEndpoint':_0x7bc6d4['cdpEndpoint']}:((()=>{const _0x4108c6=_0x41b6da,{launchOptions:_0x5eaf9a,contextOptions:_0x5cd227}=buildBrowserOptionsFromSettings(_0x7bc6d4,{'headless':_0x56ed9a?![]:_0x7bc6d4[_0x4108c6(0x10d)]??!![],'storageStatePath':_0x1d136e});if(process['getuid']?.()===0x0){const _0xafe25d=[_0x4108c6(0x142),'--disable-setuid-sandbox'],_0x47228c=_0x5eaf9a['args']??[],_0x36bba5=_0xafe25d[_0x4108c6(0xfa)](_0x323d07=>!_0x47228c['includes'](_0x323d07));_0x5eaf9a['args']=[..._0x47228c,..._0x36bba5];}return{'isolated':!![],'browserName':_0x1840f3['TXoUU'],'launchOptions':_0x5eaf9a,'contextOptions':{..._0x5cd227,'permissions':[_0x1840f3['yrqnc'],_0x4108c6(0x10a)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x5f4eb6=_0x1840f3['JyOwE'](_0xe0a31,'playwright-cli')?{'browser':_0x43e699,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1fe0c4,'outputMode':_0x1840f3[_0x41b6da(0x11d)],'codegen':'none'}:{'name':_0x4a789c,'browser':_0x43e699,'capabilities':[_0x41b6da(0x132),_0x1840f3['Wgomj'],_0x1840f3[_0x41b6da(0x12b)],_0x1840f3['jgavo'],_0x1840f3[_0x41b6da(0x13d)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1fe0c4};if(!_0x57083a){const _0x16c51b=_0x5f4eb6[_0x41b6da(0x12e)],_0x3ff25d=_0x16c51b['contextOptions'];if(_0x1840f3['JyOwE'](_0x3ff25d['userAgent'],undefined))delete _0x3ff25d[_0x41b6da(0xde)];if(_0x3ff25d['storageState']===undefined)delete _0x3ff25d[_0x41b6da(0x120)];}const _0x235302=_0x1840f3[_0x41b6da(0xec)](join,tmpdir(),_0x41b6da(0x100));!existsSync(_0x235302)&&await mkdir(_0x235302,{'recursive':!![]});const _0x41b1a5=_0x1840f3[_0x41b6da(0x110)](_0xe0a31,_0x1840f3[_0x41b6da(0xd5)])?_0x1840f3['fSXvR']:'',_0x482a26=join(_0x235302,_0x4a789c+'-'+Date['now']()+_0x41b1a5+_0x41b6da(0xfb));return await _0x1840f3[_0x41b6da(0xec)](writeFile,_0x482a26,JSON[_0x41b6da(0x144)](_0x5f4eb6,null,0x2)),{'configPath':_0x482a26,'storageStatePath':_0x1d136e};}export async function buildPlaywrightCliConfig(_0x2ba2aa,_0x5f1547,_0x29d179,_0x56a557,_0xa008e6){const _0x44222a=_0x3317b6,_0x532ae5={'mrauw':function(_0x5ea0c3,_0x13d41a,_0x9536,_0x32fa03,_0x6fc041,_0x335c26,_0x151e60){return _0x5ea0c3(_0x13d41a,_0x9536,_0x32fa03,_0x6fc041,_0x335c26,_0x151e60);},'NxzYz':_0x44222a(0x11a)};if(_0xa008e6)return _0x532ae5[_0x44222a(0x13e)](buildPlaywrightConfigCore,_0x2ba2aa,_0xa008e6,_0x5f1547,_0x29d179,_0x56a557,'playwright-cli');const {storageStatePath:_0x2811bf,tempAuthPath:_0x2273ce}=await resolveLocalAuthPath(getEnvDir(_0x5f1547));try{const _0x2ffc19=await _0x532ae5['mrauw'](buildPlaywrightConfigCore,_0x2ba2aa,_0x2811bf,_0x5f1547,_0x29d179,_0x56a557,_0x532ae5['NxzYz']);return{..._0x2ffc19,'tempAuthPath':_0x2273ce};}catch(_0x4c995e){_0x2273ce&&await unlink(_0x2273ce)[_0x44222a(0x141)](()=>{});throw _0x4c995e;}}export async function buildRangerwrightCliConfig(_0x557a5,_0x45c77d,_0xeae1f1,_0x58053b,_0x2c04c6){const _0x5aca55=_0x3317b6,_0x4ad933={'xGTzB':function(_0x27d514,_0x42e5dc){return _0x27d514===_0x42e5dc;},'bwBCq':'clipboard-read','EkIgh':function(_0x6c7d8d,_0x4d16b5){return _0x6c7d8d(_0x4d16b5);},'JkSWu':function(_0x1ea5c6,_0x38abfc,_0x440bc5,_0x1087d4){return _0x1ea5c6(_0x38abfc,_0x440bc5,_0x1087d4);},'IhpyK':function(_0x2b58a4){return _0x2b58a4();},'HhTkn':'sessions','avIoU':function(_0x33a64f,_0x1d5775){return _0x33a64f(_0x1d5775);},'GKUxe':'chromium'},{storageStatePath:_0x5e3b68,tempAuthPath:_0x935029}=_0x2c04c6?{'storageStatePath':_0x2c04c6,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x4ad933[_0x5aca55(0x139)](getEnvDir,_0x45c77d)),_0x5821ec=_0xeae1f1||randomUUID(),_0xd2a2bf=_0x4ad933['JkSWu'](join,_0x4ad933['IhpyK'](getRangerDir),_0x4ad933['HhTkn'],_0x5821ec),_0x168e04=_0x4ad933[_0x5aca55(0x101)](Boolean,_0x557a5[_0x5aca55(0x129)]),_0x396c78=_0x168e04?{'browserName':_0x4ad933['GKUxe'],'cdpEndpoint':_0x557a5['cdpEndpoint']}:((()=>{const _0x4820d9=_0x5aca55,{launchOptions:_0xc47f26,contextOptions:_0x27e1a8}=buildBrowserOptionsFromSettings(_0x557a5,{'headless':_0x58053b?![]:_0x557a5[_0x4820d9(0x10d)]??!![],'storageStatePath':_0x5e3b68});if(_0x4ad933[_0x4820d9(0xcb)](process[_0x4820d9(0x11e)]?.(),0x0)){const _0x4560ec=[_0x4820d9(0x142),_0x4820d9(0xe2)],_0x4c0076=_0xc47f26[_0x4820d9(0xe0)]??[],_0x57b85d=_0x4560ec['filter'](_0x1783a2=>!_0x4c0076['includes'](_0x1783a2));_0xc47f26[_0x4820d9(0xe0)]=[..._0x4c0076,..._0x57b85d];}return{'browserName':'chromium','launchOptions':_0xc47f26,'contextOptions':{..._0x27e1a8,'permissions':[_0x4ad933['bwBCq'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x168e04){const _0xc6a93e=_0x396c78['contextOptions'];if(_0xc6a93e){if(_0x4ad933[_0x5aca55(0xcb)](_0xc6a93e['userAgent'],undefined))delete _0xc6a93e['userAgent'];if(_0xc6a93e[_0x5aca55(0x120)]===undefined)delete _0xc6a93e['storageState'];}}const _0x29eef6={'browser':_0x396c78,'outputDir':_0xd2a2bf,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x54b581;try{const _0x5216fb=join(tmpdir(),'ranger-config');!existsSync(_0x5216fb)&&await mkdir(_0x5216fb,{'recursive':!![]}),_0x54b581=join(_0x5216fb,_0x45c77d+'-'+Date[_0x5aca55(0x10c)]()+_0x5aca55(0x118)),await writeFile(_0x54b581,JSON['stringify'](_0x29eef6,null,0x2));}catch(_0x2e5983){_0x935029&&await _0x4ad933['avIoU'](unlink,_0x935029)[_0x5aca55(0x141)](()=>{});throw _0x2e5983;}return{'configPath':_0x54b581,'storageStatePath':_0x5e3b68,'tempAuthPath':_0x935029,'outputDir':_0xd2a2bf};}export async function buildNovaActCliConfig(_0x5f13cc,_0x563112,_0x9875b7,_0x1cc341,_0x5db7ec){const _0x5d7ea6=_0x3317b6,_0x3ea2ef={'QsySB':function(_0xc753ed){return _0xc753ed();},'phjGK':_0x5d7ea6(0x115),'ISXqM':function(_0x551166,_0x10efe7,_0x5e92ac){return _0x551166(_0x10efe7,_0x5e92ac);},'hhVBe':function(_0x36b69f,_0x3eff3b){return _0x36b69f===_0x3eff3b;},'VYMJg':_0x5d7ea6(0xed),'exUxf':function(_0x8d8935,_0xaf6057){return _0x8d8935(_0xaf6057);},'JHJkw':function(_0x3b7a07,_0x5f3f1f){return _0x3b7a07(_0x5f3f1f);},'jwDeU':function(_0x83f0a9,_0x5e3007){return _0x83f0a9(_0x5e3007);}},{storageStatePath:_0x59cfe3,tempAuthPath:_0x14f8d5}=_0x5db7ec?{'storageStatePath':_0x5db7ec,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x563112)),_0xfee6a3=_0x9875b7||_0x3ea2ef[_0x5d7ea6(0x13f)](randomUUID),_0x5a0a7e=join(getRangerDir(),_0x3ea2ef[_0x5d7ea6(0x12d)],_0xfee6a3),_0x3013d0=join(_0x5a0a7e,'nova-user-data'),_0x3dec77=_0x59cfe3?_0x3ea2ef['ISXqM'](join,_0x3013d0,_0x5d7ea6(0x106)):undefined,{launchOptions:_0x384755,contextOptions:_0x5bdf10}=buildBrowserOptionsFromSettings(_0x5f13cc,{'headless':_0x1cc341?![]:_0x5f13cc[_0x5d7ea6(0x10d)]??!![],'storageStatePath':_0x59cfe3});if(_0x3ea2ef[_0x5d7ea6(0xe7)](process[_0x5d7ea6(0x11e)]?.(),0x0)){const _0x364e26=[_0x5d7ea6(0x142),_0x5d7ea6(0xe2)],_0x4d0681=_0x384755['args']??[],_0x1ca5fc=_0x364e26['filter'](_0x54e266=>!_0x4d0681[_0x5d7ea6(0xdb)](_0x54e266));_0x384755['args']=[..._0x4d0681,..._0x1ca5fc];}const _0x250ca2=typeof _0x384755['executablePath']===_0x3ea2ef[_0x5d7ea6(0x10e)]?_0x384755[_0x5d7ea6(0x12f)]:_0x59cfe3?chromium['executablePath']():undefined;return{'storageStatePath':_0x59cfe3,'tempAuthPath':_0x14f8d5,'baseUrl':_0x5f13cc[_0x5d7ea6(0x102)],'headless':_0x3ea2ef[_0x5d7ea6(0xc8)](Boolean,_0x384755[_0x5d7ea6(0x10d)]),'userDataDir':_0x3013d0,'browserProfilePath':_0x3dec77,'executablePath':_0x250ca2,'launchArgs':Array['isArray'](_0x384755[_0x5d7ea6(0xe0)])?_0x384755['args']['filter'](_0x322f0c=>typeof _0x322f0c===_0x5d7ea6(0xed)):[],'userAgent':typeof _0x5bdf10[_0x5d7ea6(0xde)]===_0x5d7ea6(0xed)?_0x5bdf10[_0x5d7ea6(0xde)]:undefined,'extraHTTPHeaders':_0x5bdf10['extraHTTPHeaders'],'allowInsecureLocalhost':_0x3ea2ef[_0x5d7ea6(0xc8)](Boolean,_0x5f13cc[_0x5d7ea6(0xd6)]),'safeMode':_0x3ea2ef['JHJkw'](Boolean,_0x5f13cc[_0x5d7ea6(0x13a)]),'cdpEndpoint':_0x5f13cc['cdpEndpoint'],'isCdpMode':_0x3ea2ef['jwDeU'](Boolean,_0x5f13cc[_0x5d7ea6(0x129)])};}export function getNestedValue(_0x4a4b4c,_0x704992){const _0x44fe46=_0x3317b6,_0xd87550={'BGHIS':function(_0x1d6831,_0x2f0926){return _0x1d6831(_0x2f0926);},'poVDK':function(_0x522a26,_0x5ce6eb){return _0x522a26===_0x5ce6eb;},'OdxHK':function(_0x4eefee,_0x4b1e56){return _0x4eefee===_0x4b1e56;},'ddURF':function(_0x12f328,_0x189aaf){return _0x12f328!==_0x189aaf;},'sgDKK':_0x44fe46(0x13c)},_0xcf6dd=_0xd87550['BGHIS'](parseKeyPath,_0x704992);let _0x3c53f8=_0x4a4b4c;for(const _0x4064a7 of _0xcf6dd){if(_0xd87550['poVDK'](_0x3c53f8,null)||_0xd87550[_0x44fe46(0x128)](_0x3c53f8,undefined)||_0xd87550['ddURF'](typeof _0x3c53f8,_0xd87550[_0x44fe46(0xdd)]))return undefined;_0x3c53f8=_0x3c53f8[_0x4064a7];}return _0x3c53f8;}export function setNestedValue(_0x285421,_0x2200c5,_0x2761a3){const _0x1b1614=_0x3317b6,_0x1861ef={'lNNKH':function(_0x468764,_0x59cafa){return _0x468764(_0x59cafa);},'yAOCf':function(_0xc7d3b1,_0x535b4d){return _0xc7d3b1<_0x535b4d;},'WRGTU':function(_0x417b36,_0xc7b671){return _0x417b36 in _0xc7b671;},'cJKex':function(_0x32e56e,_0x2d6f62){return _0x32e56e-_0x2d6f62;}},_0x34b9eb=_0x1861ef['lNNKH'](parseKeyPath,_0x2200c5);let _0x5f02a5=_0x285421;for(let _0x18a626=0x0;_0x1861ef[_0x1b1614(0xfc)](_0x18a626,_0x34b9eb['length']-0x1);_0x18a626++){const _0x40aefe=_0x34b9eb[_0x18a626];(!_0x1861ef['WRGTU'](_0x40aefe,_0x5f02a5)||typeof _0x5f02a5[_0x40aefe]!==_0x1b1614(0x13c))&&(_0x5f02a5[_0x40aefe]={}),_0x5f02a5=_0x5f02a5[_0x40aefe];}_0x5f02a5[_0x34b9eb[_0x1861ef['cJKex'](_0x34b9eb[_0x1b1614(0x137)],0x1)]]=_0x2761a3;}export function deleteNestedValue(_0x41f69f,_0xfe1e84){const _0x4f4939=_0x3317b6,_0x1b3c05={'cTDds':function(_0x3e2acc,_0x42a5b){return _0x3e2acc(_0x42a5b);},'zluZD':function(_0x5c21e4,_0x3f544d){return _0x5c21e4-_0x3f544d;},'HBIrL':function(_0x173038,_0x3bedbc){return _0x173038===_0x3bedbc;},'vSpCa':function(_0x219e5f,_0xc32df2){return _0x219e5f===_0xc32df2;},'wNpRm':_0x4f4939(0x13c),'jFaVE':function(_0x379f35,_0x54ff6d){return _0x379f35!==_0x54ff6d;}},_0x466b0b=_0x1b3c05['cTDds'](parseKeyPath,_0xfe1e84);let _0x166048=_0x41f69f;for(let _0x284c05=0x0;_0x284c05<_0x1b3c05[_0x4f4939(0x127)](_0x466b0b['length'],0x1);_0x284c05++){if(_0x1b3c05['HBIrL'](_0x166048,null)||_0x1b3c05[_0x4f4939(0x136)](_0x166048,undefined)||typeof _0x166048!==_0x1b3c05[_0x4f4939(0x112)])return![];_0x166048=_0x166048[_0x466b0b[_0x284c05]];}if(_0x1b3c05[_0x4f4939(0x136)](_0x166048,null)||_0x166048===undefined||_0x1b3c05['jFaVE'](typeof _0x166048,_0x1b3c05['wNpRm']))return![];const _0xd8ab2a=_0x466b0b[_0x466b0b['length']-0x1];if(_0xd8ab2a in _0x166048)return delete _0x166048[_0xd8ab2a],!![];return![];}function parseKeyPath(_0x165727){const _0x54ca27=_0x3317b6,_0x3b4840={'PscCT':function(_0x328c28,_0x5c1806){return _0x328c28===_0x5c1806;},'cJJJu':'headers','pGoYC':_0x54ca27(0x111),'Zooum':_0x54ca27(0x109)},_0x1d1df3=_0x165727['split']('.');return _0x3b4840[_0x54ca27(0xca)](_0x1d1df3[0x0],'header')&&(_0x1d1df3[0x0]=_0x3b4840['cJJJu']),_0x1d1df3[0x0]===_0x3b4840['pGoYC']&&(_0x1d1df3[0x0]=_0x3b4840['Zooum']),_0x1d1df3;}function _0x8c18(){const _0x36bb97=['EkIgh','safeMode','lumBZ','object','pmfqU','mrauw','QsySB','wNvSJ','catch','--no-sandbox','path','stringify','20cWYCvI','rangerDir','\x22\x20to\x20legacy\x20path\x20','UAwPZ','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','ranger-auth-','692235uXrwoe','4632JFLfQE','RqNiY','jkTLo','exUxf','all','PscCT','xGTzB','8TfeVTd','rweoa','replace','AaCdh','headers','clipboard-read','DRyKr','fromEntries','launchOptions','QKeBW','allowInsecureLocalhost','auth.json.enc','XeOLF','pyCZE','env','includes','forWrite','sgDKK','userAgent','location','args','xJdGr','--disable-setuid-sandbox','cQGUv','3754922pumVaw','1rYrULo','isArray','hhVBe','pEJMe','xvcDw','message','endsWith','zvQnQ','string','--allow-insecure-localhost','2100161IOzTdc','ULUSx','tYUoG','--disable-web-security','stagehand','push','gZXWp','MuKLI','local','16QFQJMx','settings.json','filter','.json','yAOCf','extraHTTPHeaders','code','Environment\x20variable\x20','ranger-config','avIoU','baseUrl','xoeDx','AMRLh','Refusing\x20to\x20write\x20profile\x20\x22','Default','locations','EESty','setupHeaders','clipboard-write','DXVRV','now','headless','VYMJg','legacy','GilSX','setupHeader','wNpRm','dlZAo','TXoUU','sessions','6NJXLsc','rcvVm','-rangerwright.json','ukadg','playwright-cli','utf-8','51469FymfJS','NDGqF','getuid','FMBnT','storageState','OVgiF','GxCWb','Failed\x20to\x20decrypt\x20auth\x20state:\x20','433850UDjqBn','4799106XZlQib','ZfnNn','zluZD','OdxHK','cdpEndpoint','XOBvd','wxLuo','39966927VYhIgW','phjGK','browser','executablePath','vision','join','core','map','\x20is\x20not\x20set','ShRSB','vSpCa','length','wbxNt'];_0x8c18=function(){return _0x36bb97;};return _0x8c18();}export function formatSettings(_0x59a643,_0x22bd25=0x0){const _0x1dc1d6=_0x3317b6,_0x8fe0ce={'xoeDx':function(_0x1618a2,_0x1b4236){return _0x1618a2===_0x1b4236;},'DBwKn':_0x1dc1d6(0x13c)},_0x1dc67f=[],_0x4922d9='\x20\x20'['repeat'](_0x22bd25);for(const [_0x15f3a6,_0xa5a09]of Object['entries'](_0x59a643)){if(_0xa5a09===undefined)continue;if(_0x8fe0ce[_0x1dc1d6(0x103)](typeof _0xa5a09,_0x8fe0ce['DBwKn'])&&_0xa5a09!==null){_0x1dc67f['push'](''+_0x4922d9+_0x15f3a6+':');for(const [_0x46aeaa,_0x4bed8c]of Object['entries'](_0xa5a09)){_0x1dc67f[_0x1dc1d6(0xf4)](_0x4922d9+'\x20\x20'+_0x46aeaa+':\x20'+_0x4bed8c);}}else _0x1dc67f['push'](''+_0x4922d9+_0x15f3a6+':\x20'+_0xa5a09);}return _0x1dc67f[_0x1dc1d6(0x131)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3499d6,_0x4e30a1){const _0x12e51f=_0x1ae5,_0x9218bd=_0x3499d6();while(!![]){try{const _0x1afcd0=parseInt(_0x12e51f(0x181))/0x1+parseInt(_0x12e51f(0x183))/0x2+-parseInt(_0x12e51f(0x17c))/0x3+parseInt(_0x12e51f(0x179))/0x4+-parseInt(_0x12e51f(0x17f))/0x5+-parseInt(_0x12e51f(0x182))/0x6*(-parseInt(_0x12e51f(0x177))/0x7)+-parseInt(_0x12e51f(0x17b))/0x8*(parseInt(_0x12e51f(0x17a))/0x9);if(_0x1afcd0===_0x4e30a1)break;else _0x9218bd['push'](_0x9218bd['shift']());}catch(_0x47dba4){_0x9218bd['push'](_0x9218bd['shift']());}}}(_0x5a0c,0xa134a));import{readFileSync}from'fs';function _0x1ae5(_0x37a862,_0x38b11d){_0x37a862=_0x37a862-0x177;const _0x5a0c64=_0x5a0c();let _0x1ae54b=_0x5a0c64[_0x37a862];return _0x1ae54b;}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0xb1f656){const _0x19d246=_0x1ae5,_0x28828f={'SPNiY':function(_0x5424c5,_0xcfcd99,_0x143581,_0xb6010b,_0x3a08b3){return _0x5424c5(_0xcfcd99,_0x143581,_0xb6010b,_0x3a08b3);},'AEmZr':_0x19d246(0x17d),'fJowo':function(_0x3d19b4,_0x147daa,_0x4a916b){return _0x3d19b4(_0x147daa,_0x4a916b);},'olDQf':function(_0x57bdf9,_0x1f20e6,_0x466724){return _0x57bdf9(_0x1f20e6,_0x466724);},'xheZs':_0x19d246(0x178)},_0x1535fd=_0x28828f[_0x19d246(0x180)](join,__dirname,'..','..',_0x28828f['AEmZr']),_0x40dae3=_0x28828f['fJowo'](join,_0x1535fd,_0xb1f656);try{return _0x28828f['olDQf'](readFileSync,_0x40dae3,_0x28828f[_0x19d246(0x17e)]);}catch{return'';}}export function getRangerSkillContent(){return readSkillContent('ranger/SKILL.md');}function _0x5a0c(){const _0x3bfe9e=['1002513TRgGpt','skills','xheZs','3016450MvHgTk','SPNiY','487700vsUpDV','221052eXYcxw','222576MESQol','49IaZIQB','utf-8','4455492nuHxGi','43038hVkfNx','624erBuAP'];_0x5a0c=function(){return _0x3bfe9e;};return _0x5a0c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x281a7a=_0x23f1;(function(_0x55ffea,_0x1aac2e){const _0x4a5408=_0x23f1,_0x34b6ef=_0x55ffea();while(!![]){try{const _0x48e994=parseInt(_0x4a5408(0x196))/0x1+-parseInt(_0x4a5408(0x198))/0x2*(-parseInt(_0x4a5408(0x18c))/0x3)+-parseInt(_0x4a5408(0x1a3))/0x4*(-parseInt(_0x4a5408(0x18e))/0x5)+parseInt(_0x4a5408(0x190))/0x6*(parseInt(_0x4a5408(0x187))/0x7)+-parseInt(_0x4a5408(0x1a9))/0x8*(-parseInt(_0x4a5408(0x191))/0x9)+-parseInt(_0x4a5408(0x184))/0xa*(-parseInt(_0x4a5408(0x1aa))/0xb)+-parseInt(_0x4a5408(0x183))/0xc;if(_0x48e994===_0x1aac2e)break;else _0x34b6ef['push'](_0x34b6ef['shift']());}catch(_0xa3ec03){_0x34b6ef['push'](_0x34b6ef['shift']());}}}(_0x4416,0x3f49b));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x23f1(_0x4fa9bd,_0xfd11c7){_0x4fa9bd=_0x4fa9bd-0x17f;const _0x44164d=_0x4416();let _0x23f148=_0x44164d[_0x4fa9bd];return _0x23f148;}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x281a7a(0x19a)];export const DEPRECATED_SKILLS=[_0x281a7a(0x197),'bug-bash','feature-tracker'];export async function installSkill(_0x30ea85,_0x3e960d={}){const _0x5253f2=_0x281a7a,_0x35da06={'NtAVi':function(_0x4454db){return _0x4454db();},'AeEpz':function(_0x525a82,_0x2dc937,_0x55d9fe){return _0x525a82(_0x2dc937,_0x55d9fe);},'tAJmV':function(_0x1aef70,_0x3ea796,_0x35cf6b){return _0x1aef70(_0x3ea796,_0x35cf6b);},'Xsvtm':function(_0xe4c318,_0x583f84){return _0xe4c318(_0x583f84);},'BuRUk':function(_0xe48963,_0x2b2d73){return _0xe48963(_0x2b2d73);},'byUfi':function(_0x5b7287,_0x1e8d00){return _0x5b7287&&_0x1e8d00;},'WDHcJ':function(_0x429b4e,_0x37d168){return _0x429b4e(_0x37d168);},'RGgnq':function(_0x52b12c,_0x19d712,_0x4e6b41){return _0x52b12c(_0x19d712,_0x4e6b41);},'jNkBt':function(_0x2550d8,_0x4e4175){return _0x2550d8(_0x4e4175);},'jyZCd':function(_0x252de1,_0x2adff8,_0x2499fd){return _0x252de1(_0x2adff8,_0x2499fd);},'MwFar':function(_0x39f701,_0x341ce6,_0xa73fbd){return _0x39f701(_0x341ce6,_0xa73fbd);},'wCUyX':'SKILL.md','McDcf':'utf-8','wqrop':function(_0x244fce,_0x3eb9c4,_0x252475){return _0x244fce(_0x3eb9c4,_0x252475);},'lsgOr':function(_0x6865bf,_0x199fbb,_0x274668,_0x167827){return _0x6865bf(_0x199fbb,_0x274668,_0x167827);},'SLtcj':function(_0x4e2b9a,_0x27a239,_0x364203,_0x5de1e2){return _0x4e2b9a(_0x27a239,_0x364203,_0x5de1e2);}},{level:level=_0x5253f2(0x1a8),cliVersion:_0x79d103,platform:platform=_0x5253f2(0x18d)}=_0x3e960d,_0x54e9f1=_0x35da06[_0x5253f2(0x1a5)](getSourceSkillsDir),_0x2ecab7=_0x35da06['AeEpz'](join,_0x54e9f1,_0x30ea85),_0x5831e5=_0x35da06[_0x5253f2(0x17f)](join,_0x54e9f1,_0x30ea85+_0x5253f2(0x192)),_0x1fc436=_0x35da06[_0x5253f2(0x1a7)](existsSync,_0x2ecab7)&&_0x35da06['BuRUk'](statSync,_0x2ecab7)[_0x5253f2(0x19f)]()&&existsSync(join(_0x2ecab7,_0x5253f2(0x19e))),_0x545fc2=existsSync(_0x5831e5);if(_0x35da06[_0x5253f2(0x1a1)](!_0x1fc436,!_0x545fc2))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x30ea85),![];const _0x104d0e=platform==='opencode'?getOpencodeSkillsDir(level):_0x35da06['WDHcJ'](getSkillsDir,level),_0x25616f=_0x35da06[_0x5253f2(0x194)](join,_0x104d0e,_0x30ea85);await mkdir(_0x25616f,{'recursive':!![]});let _0x8f3b9b,_0x528652=[];if(_0x1fc436){const _0x1a5e1b=await _0x35da06[_0x5253f2(0x193)](readdir,_0x2ecab7),_0x553bae=_0x1a5e1b['filter'](_0x54c626=>_0x54c626[_0x5253f2(0x1a4)]('.md'));for(const _0x58cdf2 of _0x553bae){const _0x35cd06=_0x35da06['jyZCd'](join,_0x2ecab7,_0x58cdf2),_0x31e872=_0x35da06[_0x5253f2(0x188)](join,_0x25616f,_0x58cdf2);await _0x35da06['MwFar'](copyFile,_0x35cd06,_0x31e872),_0x528652['push'](_0x58cdf2);}_0x8f3b9b=await readFile(join(_0x2ecab7,_0x35da06[_0x5253f2(0x189)]),_0x35da06['McDcf']);}else{_0x8f3b9b=await _0x35da06['MwFar'](readFile,_0x5831e5,'utf-8');const _0x3a3ab9=_0x35da06['wqrop'](join,_0x25616f,'SKILL.md');await _0x35da06['lsgOr'](writeFile,_0x3a3ab9,_0x8f3b9b,_0x35da06[_0x5253f2(0x180)]),_0x528652[_0x5253f2(0x181)](_0x35da06[_0x5253f2(0x189)]);}const {name:_0x1aaa8b}=parseFrontmatter(_0x8f3b9b);return console['log'](_0x5253f2(0x185)+_0x1aaa8b),console['log']('\x20\x20Location:\x20'+_0x25616f),_0x528652['length']>0x1&&console[_0x5253f2(0x1a2)](_0x5253f2(0x195)+_0x528652[_0x5253f2(0x19d)](',\x20')),_0x35da06['SLtcj'](logLocalAgentInstallation,_0x30ea85,{'skillDisplayName':_0x1aaa8b,'installLevel':level},_0x79d103)[_0x5253f2(0x186)](()=>{}),!![];}function _0x4416(){const _0x4c50fc=['JDCct','787131fbszIV','claude','5AHupNp','Invalid\x20skill\x20frontmatter','209052ZCPqnb','324711efNBDO','.md','jNkBt','RGgnq','\x20\x20Files:\x20','186611THFahF','e2e-test-recommender','2ZaFlgU','EANxx','ranger','skills','trim','join','SKILL.md','isDirectory','eICnq','byUfi','log','1890576OaCVrw','endsWith','NtAVi','\x20\x20Removed\x20deprecated\x20skill:\x20','Xsvtm','project','8liqvkU','11vUtprU','tAJmV','McDcf','push','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','18139452XkfeyK','3950330KXAFVk','\x20\x20Installed\x20skill:\x20','catch','84TmWZMs','jyZCd','wCUyX','GvFRp'];_0x4416=function(){return _0x4c50fc;};return _0x4416();}function getSourceSkillsDir(){const _0x3e2821=_0x281a7a,_0x1fa973={'DgZzY':function(_0x1518fa,_0x5cab24,_0x2ce6e0,_0x5c04ee,_0x4f1a4f){return _0x1518fa(_0x5cab24,_0x2ce6e0,_0x5c04ee,_0x4f1a4f);},'EANxx':function(_0x91adb7,_0x435ec4,_0x35b067,_0xffec96,_0x37ad07,_0x5efbaa){return _0x91adb7(_0x435ec4,_0x35b067,_0xffec96,_0x37ad07,_0x5efbaa);},'eICnq':_0x3e2821(0x19b)},_0x2e8da4=[_0x1fa973['DgZzY'](join,__dirname,'..','..','skills'),_0x1fa973[_0x3e2821(0x199)](join,__dirname,'..','..','..',_0x1fa973[_0x3e2821(0x1a0)])];for(const _0x396c8d of _0x2e8da4){if(existsSync(_0x396c8d))return _0x396c8d;}return _0x2e8da4[0x0];}function parseFrontmatter(_0x36d302){const _0x5a4c83=_0x281a7a,_0x45295c=_0x36d302['match'](/^---\n([\s\S]+?)\n---/);if(!_0x45295c)throw new Error(_0x5a4c83(0x18f));const _0x1180e7=_0x45295c[0x1],_0x1e839c=_0x1180e7['match'](/name:\s*(.+)/),_0x4f5986=_0x1180e7['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x1e839c?.[0x1][_0x5a4c83(0x19c)]()||'','description':_0x4f5986?.[0x1][_0x5a4c83(0x19c)]()||''};}export async function removeSkill(_0x115f7a,_0x45352c){const _0x2de2e0=_0x281a7a,_0x25fece={'GvFRp':function(_0x1b2f18,_0xe48788){return _0x1b2f18(_0xe48788);},'JDCct':function(_0x1f8f8b,_0x3d6ee8,_0x221159){return _0x1f8f8b(_0x3d6ee8,_0x221159);}},_0x2cd33b=_0x25fece[_0x2de2e0(0x18a)](getSkillsDir,_0x45352c),_0x34a6a3=join(_0x2cd33b,_0x115f7a);if(!_0x25fece['GvFRp'](existsSync,_0x34a6a3))return![];try{return await _0x25fece[_0x2de2e0(0x18b)](rm,_0x34a6a3,{'recursive':!![]}),console[_0x2de2e0(0x1a2)](_0x2de2e0(0x1a6)+_0x115f7a),!![];}catch{return console['warn'](_0x2de2e0(0x182)+_0x115f7a),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3935bf=_0x1edf;(function(_0x18585c,_0x111599){const _0x4bd028=_0x1edf,_0x29235f=_0x18585c();while(!![]){try{const _0x42cf09=parseInt(_0x4bd028(0x118))/0x1+parseInt(_0x4bd028(0x120))/0x2+parseInt(_0x4bd028(0x122))/0x3+-parseInt(_0x4bd028(0xf9))/0x4*(parseInt(_0x4bd028(0x102))/0x5)+-parseInt(_0x4bd028(0xff))/0x6+parseInt(_0x4bd028(0x12a))/0x7*(parseInt(_0x4bd028(0xfd))/0x8)+-parseInt(_0x4bd028(0x11b))/0x9*(parseInt(_0x4bd028(0xfe))/0xa);if(_0x42cf09===_0x111599)break;else _0x29235f['push'](_0x29235f['shift']());}catch(_0x2d60c1){_0x29235f['push'](_0x29235f['shift']());}}}(_0x4f86,0xdc15c));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x48adf8,_0x5be912){const _0x2cbca8=_0x1edf,_0x4c3fe6={'gyxaS':function(_0x37d12a,_0x227ad7){return _0x37d12a<=_0x227ad7;},'LRpQv':function(_0x356360,_0x4b8b76){return _0x356360+_0x4b8b76;},'Ipnwx':function(_0x2ebcfc,_0x28534d){return _0x2ebcfc*_0x28534d;}};if(_0x5be912>=_0x48adf8['length'])return[0x0,0x0];const _0x3841af=_0x48adf8[_0x5be912];let _0x3184ce=0x1,_0x33e893=0x80;while(_0x4c3fe6['gyxaS'](_0x3184ce,0x8)&&!(_0x3841af&_0x33e893)){_0x3184ce++,_0x33e893>>=0x1;}if(_0x5be912+_0x3184ce>_0x48adf8[_0x2cbca8(0x108)])return[0x0,0x0];let _0x548fcf=_0x3841af&_0x33e893-0x1;for(let _0x35adfc=0x1;_0x35adfc<_0x3184ce;_0x35adfc++){_0x548fcf=_0x4c3fe6[_0x2cbca8(0x10b)](_0x4c3fe6[_0x2cbca8(0x110)](_0x548fcf,0x100),_0x48adf8[_0x5be912+_0x35adfc]);}return[_0x548fcf,_0x3184ce];}function readId(_0x167c12,_0x46a282){const _0x112a0a=_0x1edf,_0x528548={'FMmEc':function(_0x457793,_0x5a7eec){return _0x457793>=_0x5a7eec;},'HhsyI':function(_0x1f907a,_0x4e58ff){return _0x1f907a>=_0x4e58ff;},'IWrKZ':function(_0xb0ba99,_0x3fd758){return _0xb0ba99+_0x3fd758;}};if(_0x46a282>=_0x167c12[_0x112a0a(0x108)])return[0x0,0x0];const _0x2f9ecc=_0x167c12[_0x46a282];let _0x514ea3;if(_0x2f9ecc>=0x80)_0x514ea3=0x1;else{if(_0x528548[_0x112a0a(0x138)](_0x2f9ecc,0x40))_0x514ea3=0x2;else{if(_0x528548[_0x112a0a(0x101)](_0x2f9ecc,0x20))_0x514ea3=0x3;else{if(_0x528548['FMmEc'](_0x2f9ecc,0x10))_0x514ea3=0x4;else return[_0x2f9ecc,0x1];}}}if(_0x46a282+_0x514ea3>_0x167c12['length'])return[0x0,0x0];let _0x1eab52=0x0;for(let _0x5e8e9f=0x0;_0x5e8e9f<_0x514ea3;_0x5e8e9f++){_0x1eab52=_0x1eab52*0x100+_0x167c12[_0x528548['IWrKZ'](_0x46a282,_0x5e8e9f)];}return[_0x1eab52,_0x514ea3];}function _0x1edf(_0x5afb5a,_0xab4175){_0x5afb5a=_0x5afb5a-0xf6;const _0x4f862e=_0x4f86();let _0x1edf9d=_0x4f862e[_0x5afb5a];return _0x1edf9d;}function _0x4f86(){const _0x58f224=['log','2938617sTPiKH','etDkw','uRUIq','maxTicks','sfGHf','KbcGJ','pIkOe','JBCsO','742560ebHMjq','indexOf','from','VJcUN','Pclkg','RvOec','header','VJNDP','KRVHG','maxTimestampTicks','CRsbj','bodyAfterTimestamp','argv','vyYSo','FMmEc','min','kgPKs','slice','TwFop','DYKOB','CKGZB','1156MQbJUC','JuhJy','qHRSD','floor','24VwBhZG','10abGnUd','5650152yMljhf','uAJqn','HhsyI','2075KvyShJ','\x20files\x20->\x20','kWkuG','hqDta','Stitched\x20','kWIlE','length','vcGGE','endsWith','LRpQv','nsjio','IKETS','dYtKM','push','Ipnwx','VIrBY','IZvWO','concat','fxfxH','aorBG','npMUs','clusters','603895ruyQmt','uydEK','alloc','723429EAkMrg','jeDUM','stitchWebmFiles.js','pow','mxsHu','283604nfkaoJ'];_0x4f86=function(){return _0x58f224;};return _0x4f86();}function readUint(_0x359f31,_0x36f0fd,_0x162f4a){const _0x33996b=_0x1edf,_0x1f38d2={'CLjVQ':function(_0x25e365,_0x41ca09){return _0x25e365<_0x41ca09;},'etDkw':function(_0x35a9b4,_0x37f2a0){return _0x35a9b4*_0x37f2a0;},'Cdeic':function(_0x3fa5ff,_0x5be083){return _0x3fa5ff+_0x5be083;}};let _0x57ee8a=0x0;for(let _0x2b4636=0x0;_0x1f38d2['CLjVQ'](_0x2b4636,_0x162f4a);_0x2b4636++){_0x57ee8a=_0x1f38d2[_0x33996b(0x123)](_0x57ee8a,0x100)+_0x359f31[_0x1f38d2['Cdeic'](_0x36f0fd,_0x2b4636)];}return _0x57ee8a;}function isUnknownSize(_0x2071ed,_0x22e72f){const _0x234188={'MOqgG':function(_0x21954a,_0x2491ea){return _0x21954a===_0x2491ea;},'vvdJj':function(_0x123dba,_0x3e1770){return _0x123dba*_0x3e1770;}};return _0x234188['MOqgG'](_0x2071ed,Math['pow'](0x2,_0x234188['vvdJj'](0x7,_0x22e72f))-0x1);}function writeVint(_0x314030,_0x1a7667){const _0x3cf4da=_0x1edf,_0x4def06={'aorBG':function(_0x48d21d,_0x256265){return _0x48d21d*_0x256265;},'CKGZB':function(_0x3896f3,_0x308b76){return _0x3896f3&_0x308b76;}};let _0x4f43c1=_0x1a7667||0x1;while(Math[_0x3cf4da(0x11e)](0x2,_0x4def06[_0x3cf4da(0x115)](0x7,_0x4f43c1))-0x2<_0x314030)_0x4f43c1++;const _0x4e8500=Buffer['alloc'](_0x4f43c1);for(let _0x5bc043=_0x4f43c1-0x1;_0x5bc043>=0x0;_0x5bc043--){_0x4e8500[_0x5bc043]=_0x4def06[_0x3cf4da(0xf8)](_0x314030,0xff),_0x314030=Math['floor'](_0x314030/0x100);}return _0x4e8500[0x0]|=0x1<<0x8-_0x4f43c1,_0x4e8500;}function writeUint(_0x1dcac1,_0x4f8440){const _0x1a8204=_0x1edf,_0x5dfd03={'fcTRn':function(_0xa14b49,_0x3c3caf){return _0xa14b49-_0x3c3caf;},'mxsHu':function(_0x3654be,_0x1b5fc2){return _0x3654be/_0x1b5fc2;}},_0x2968d4=Buffer[_0x1a8204(0x11a)](_0x4f8440);for(let _0x5a2231=_0x5dfd03['fcTRn'](_0x4f8440,0x1);_0x5a2231>=0x0;_0x5a2231--){_0x2968d4[_0x5a2231]=_0x1dcac1&0xff,_0x1dcac1=Math[_0x1a8204(0xfc)](_0x5dfd03[_0x1a8204(0x11f)](_0x1dcac1,0x100));}return _0x2968d4;}function writeUnknownSizeVint(_0x3e6c1f){const _0x4930f2=_0x1edf,_0x34297c={'TmMBr':function(_0x8ea7f5,_0x3c5798){return _0x8ea7f5>>_0x3c5798;}},_0x11d72b=Buffer[_0x4930f2(0x11a)](_0x3e6c1f,0xff);return _0x11d72b[0x0]=_0x34297c['TmMBr'](0xff,_0x3e6c1f-0x1),_0x11d72b;}function uintSize(_0x497980){const _0x11db95=_0x1edf,_0x480f17={'IZvWO':function(_0x2147c9,_0xcc65cd){return _0x2147c9===_0xcc65cd;},'kWkuG':function(_0x17f851,_0x5946e5){return _0x17f851/_0x5946e5;}};if(_0x480f17[_0x11db95(0x112)](_0x497980,0x0))return 0x1;let _0x3cc43a=0x0,_0x3e1b26=_0x497980;while(_0x3e1b26>0x0){_0x3cc43a++,_0x3e1b26=Math['floor'](_0x480f17[_0x11db95(0x104)](_0x3e1b26,0x100));}return _0x3cc43a;}function findTimestampScale(_0x351193,_0x32143d){const _0x16537f=_0x1edf,_0x28f32e={'fxfxH':function(_0x2ef263,_0x316b1a){return _0x2ef263<_0x316b1a;},'hJUHK':function(_0x2e7c3c,_0xa1f834,_0x9cb4c0){return _0x2e7c3c(_0xa1f834,_0x9cb4c0);},'DYKOB':function(_0x1366a5,_0x40a8bd){return _0x1366a5+_0x40a8bd;},'JuhJy':function(_0x1112de,_0x5e390c){return _0x1112de+_0x5e390c;},'ZFrXb':function(_0x682591,_0x1b8150,_0x3a6e85){return _0x682591(_0x1b8150,_0x3a6e85);},'qHRSD':function(_0x2e8b4e,_0x445ea4,_0x241e5c,_0xdc8236){return _0x2e8b4e(_0x445ea4,_0x241e5c,_0xdc8236);},'VJNDP':function(_0x1b9c85,_0x52e0c0){return _0x1b9c85===_0x52e0c0;}};let _0xc471ce=_0x32143d;const _0x380e08=Math['min'](_0x351193['length'],_0x32143d+0x2710);while(_0x28f32e[_0x16537f(0x114)](_0xc471ce,_0x380e08)){const [_0x14b3e4,_0x547575]=_0x28f32e['hJUHK'](readId,_0x351193,_0xc471ce),[_0xeab416,_0x1765f8]=readVint(_0x351193,_0x28f32e['DYKOB'](_0xc471ce,_0x547575));if(_0x14b3e4===ID_INFO){let _0xf5679c=_0x28f32e['JuhJy'](_0xc471ce+_0x547575,_0x1765f8);const _0x153df2=_0x28f32e[_0x16537f(0xfa)](_0xf5679c,_0xeab416);while(_0xf5679c<_0x153df2){const [_0x32fd3a,_0x152935]=_0x28f32e['ZFrXb'](readId,_0x351193,_0xf5679c),[_0x687be8,_0x1735f1]=readVint(_0x351193,_0xf5679c+_0x152935);if(_0x32fd3a===ID_TIMESTAMP_SCALE)return _0x28f32e[_0x16537f(0xfb)](readUint,_0x351193,_0xf5679c+_0x152935+_0x1735f1,_0x687be8);_0xf5679c+=_0x28f32e[_0x16537f(0xf7)](_0x152935+_0x1735f1,_0x687be8);}break;}if(_0x28f32e[_0x16537f(0x131)](_0x14b3e4,ID_CLUSTER))break;if(isUnknownSize(_0xeab416,_0x1765f8))break;_0xc471ce+=_0x28f32e['JuhJy'](_0x547575+_0x1765f8,_0xeab416);}return 0xf4240;}function findFirstClusterOffset(_0x54066c,_0x51ee43){const _0x28412f=_0x1edf,_0x5036ca={'VIrBY':function(_0x222231,_0x60a985){return _0x222231<_0x60a985;},'XlBrz':function(_0x1d6e74,_0xa546cc,_0x3c9544){return _0x1d6e74(_0xa546cc,_0x3c9544);},'VJcUN':function(_0x5322df,_0x27f2df,_0x3ca20e){return _0x5322df(_0x27f2df,_0x3ca20e);},'uRUIq':function(_0x2405c5,_0x2f6f64){return _0x2405c5+_0x2f6f64;},'kWIlE':function(_0x5dd77a,_0x44bd1f){return _0x5dd77a+_0x44bd1f;}};let _0xe7d8af=_0x51ee43;while(_0x5036ca[_0x28412f(0x111)](_0xe7d8af,_0x54066c['length'])){const [_0x423384,_0x59f976]=_0x5036ca['XlBrz'](readId,_0x54066c,_0xe7d8af);if(_0x423384===ID_CLUSTER)return _0xe7d8af;const [_0x35538c,_0x2d5760]=_0x5036ca[_0x28412f(0x12d)](readVint,_0x54066c,_0x5036ca[_0x28412f(0x124)](_0xe7d8af,_0x59f976));if(isUnknownSize(_0x35538c,_0x2d5760))return _0xe7d8af;_0xe7d8af+=_0x5036ca[_0x28412f(0x107)](_0x59f976+_0x2d5760,_0x35538c);}return _0x54066c[_0x28412f(0x108)];}function findClusterEnd(_0x3ce6d9,_0x10740b,_0x37c494,_0x405854){const _0x4290a3=_0x1edf,_0x308d76={'ZgnOp':function(_0x3f4b72,_0x228525,_0x2f6e19){return _0x3f4b72(_0x228525,_0x2f6e19);},'CRsbj':function(_0x42e95a,_0x433fdd){return _0x42e95a+_0x433fdd;},'RvOec':function(_0x5aeec6,_0x1d0215){return _0x5aeec6<_0x1d0215;},'DtcdL':function(_0x5e0e91,_0x28d11e,_0x496b34){return _0x5e0e91(_0x28d11e,_0x496b34);}};if(!_0x308d76['ZgnOp'](isUnknownSize,_0x37c494,_0x405854))return _0x308d76[_0x4290a3(0x134)](_0x10740b,_0x37c494);const _0x296324=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x1ca69d=_0x10740b;while(_0x308d76[_0x4290a3(0x12f)](_0x1ca69d,_0x3ce6d9[_0x4290a3(0x108)]-0x4)){const [_0x640b53,_0x136319]=_0x308d76['DtcdL'](readId,_0x3ce6d9,_0x1ca69d);if(_0x296324['has'](_0x640b53))return _0x1ca69d;const [_0x13330a,_0x49d81f]=readVint(_0x3ce6d9,_0x308d76['CRsbj'](_0x1ca69d,_0x136319));if(isUnknownSize(_0x13330a,_0x49d81f))return _0x3ce6d9['length'];_0x1ca69d+=_0x308d76['CRsbj'](_0x308d76[_0x4290a3(0x134)](_0x136319,_0x49d81f),_0x13330a);}return _0x3ce6d9[_0x4290a3(0x108)];}function extractClusters(_0x2956cd,_0x5b1f1d){const _0x39e580=_0x1edf,_0x573c86={'gRpMf':function(_0x5c8554,_0x503bd7){return _0x5c8554===_0x503bd7;},'EJMwI':function(_0xcc4cc4,_0x5bb935,_0x2819e6){return _0xcc4cc4(_0x5bb935,_0x2819e6);},'pIkOe':function(_0x33194d,_0x55ce8e){return _0x33194d+_0x55ce8e;},'KbcGJ':function(_0x4d0ba5,_0xe26446,_0x165325){return _0x4d0ba5(_0xe26446,_0x165325);},'CqWiy':function(_0x25e6b1,_0x344a31){return _0x25e6b1+_0x344a31;},'JBCsO':function(_0x5878d0,_0x36ee75){return _0x5878d0<_0x36ee75;},'Pclkg':function(_0x45ef17,_0x8497c6,_0x3af098){return _0x45ef17(_0x8497c6,_0x3af098);},'npMUs':function(_0x458709,_0xf4650d,_0x3b75e4,_0x5f1fd7){return _0x458709(_0xf4650d,_0x3b75e4,_0x5f1fd7);},'OevAL':function(_0x413736,_0x368b71){return _0x413736+_0x368b71;},'RoZWB':function(_0x1dd586,_0x519aa6){return _0x1dd586+_0x519aa6;}},_0x25a8c2=[],_0x14982b=Buffer[_0x39e580(0x12c)]([0x1f,0x43,0xb6,0x75]);let _0x9d3a3e=0x0;while(_0x9d3a3e<_0x2956cd['length']){const _0x13922b=_0x2956cd[_0x39e580(0x12b)](_0x14982b,_0x9d3a3e);if(_0x573c86['gRpMf'](_0x13922b,-0x1))break;const [_0x5ef843,_0x200459]=_0x573c86['EJMwI'](readId,_0x2956cd,_0x13922b);if(_0x5ef843!==ID_CLUSTER){_0x9d3a3e=_0x573c86[_0x39e580(0x128)](_0x13922b,0x1);continue;}const [_0x24e282,_0x2a6561]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x573c86['CqWiy'](_0x13922b,_0x200459)),_0x214bc7=_0x13922b+_0x200459+_0x2a6561,_0x264af8=findClusterEnd(_0x2956cd,_0x214bc7,_0x24e282,_0x2a6561);let _0x24b955=_0x214bc7,_0x153c5e=0x0,_0x4b2376=0x2,_0x38bc1f=![],_0xa0e5=Buffer['alloc'](0x0),_0x161a10=Buffer[_0x39e580(0x11a)](0x0);while(_0x573c86[_0x39e580(0x129)](_0x24b955,_0x264af8)){const [_0x1e0649,_0x2133ca]=_0x573c86[_0x39e580(0x12e)](readId,_0x2956cd,_0x24b955),[_0xd25996,_0x3a3119]=_0x573c86['EJMwI'](readVint,_0x2956cd,_0x24b955+_0x2133ca);if(_0x1e0649===ID_TIMESTAMP){_0x153c5e=_0x573c86[_0x39e580(0x116)](readUint,_0x2956cd,_0x573c86['OevAL'](_0x24b955,_0x2133ca)+_0x3a3119,_0xd25996),_0x4b2376=_0xd25996,_0x38bc1f=!![],_0xa0e5=_0x2956cd['slice'](_0x214bc7,_0x24b955);const _0x5a6af7=_0x573c86[_0x39e580(0x128)](_0x24b955,_0x2133ca)+_0x3a3119+_0xd25996;_0x161a10=_0x2956cd[_0x39e580(0x13b)](_0x5a6af7,_0x264af8);break;}if(_0x573c86['gRpMf'](_0x1e0649,ID_CLUSTER))break;if(isUnknownSize(_0xd25996,_0x3a3119))break;_0x24b955+=_0x2133ca+_0x3a3119+_0xd25996;}!_0x38bc1f&&(_0x161a10=_0x2956cd['slice'](_0x214bc7,_0x264af8));let _0x7481f3=_0x153c5e;_0x24b955=_0x214bc7;while(_0x573c86['JBCsO'](_0x24b955,_0x264af8)){const [_0x59bd0a,_0x4dfd31]=_0x573c86[_0x39e580(0x127)](readId,_0x2956cd,_0x24b955),[_0x15cdf5,_0x378b03]=_0x573c86[_0x39e580(0x127)](readVint,_0x2956cd,_0x24b955+_0x4dfd31);if(_0x59bd0a===ID_SIMPLE_BLOCK&&_0x15cdf5>=0x4){const _0x8c398a=_0x24b955+_0x4dfd31+_0x378b03,[,_0x56f208]=_0x573c86['KbcGJ'](readVint,_0x2956cd,_0x8c398a),_0x13faa1=_0x2956cd['readInt16BE'](_0x8c398a+_0x56f208),_0x4dc151=_0x153c5e+_0x13faa1;if(_0x4dc151>_0x7481f3)_0x7481f3=_0x4dc151;}if(_0x59bd0a===ID_CLUSTER)break;if(isUnknownSize(_0x15cdf5,_0x378b03))break;_0x24b955+=_0x573c86['RoZWB'](_0x4dfd31,_0x378b03)+_0x15cdf5;}_0x25a8c2[_0x39e580(0x10f)]({'timestamp':_0x153c5e,'maxTicks':_0x7481f3,'bodyBeforeTimestamp':_0xa0e5,'bodyAfterTimestamp':_0x161a10,'timestampElementSize':_0x4b2376}),_0x9d3a3e=_0x264af8;}return _0x25a8c2;}function parseWebm(_0x597e13){const _0x51ae7a=_0x1edf,_0x289507={'pOeQL':function(_0x1b34dc,_0x23383b,_0x4fed23){return _0x1b34dc(_0x23383b,_0x4fed23);},'IKETS':function(_0x227e06,_0x4deb5b){return _0x227e06+_0x4deb5b;},'zRViL':function(_0x33c8ed,_0x224b33){return _0x33c8ed!==_0x224b33;},'zVLFE':function(_0x5d370e,_0x49b949){return _0x5d370e+_0x49b949;},'TwFop':function(_0x57a0c3,_0x4009d9){return _0x57a0c3+_0x4009d9;},'dYtKM':function(_0x27f617,_0x33bf3b,_0x1c1781){return _0x27f617(_0x33bf3b,_0x1c1781);},'uydEK':function(_0x389719,_0x1abae9){return _0x389719>_0x1abae9;}};let _0x4af0bc=0x0;const [,_0x59025f]=readId(_0x597e13,_0x4af0bc),[_0x127b1e,_0x4c6385]=_0x289507['pOeQL'](readVint,_0x597e13,_0x4af0bc+_0x59025f);_0x4af0bc+=_0x289507['IKETS'](_0x289507[_0x51ae7a(0x10d)](_0x59025f,_0x4c6385),_0x127b1e);const [_0x1157f3,_0x9a785b]=readId(_0x597e13,_0x4af0bc);if(_0x289507['zRViL'](_0x1157f3,ID_SEGMENT))return null;const [,_0x270b76]=readVint(_0x597e13,_0x289507['zVLFE'](_0x4af0bc,_0x9a785b)),_0x2f41ed=_0x289507[_0x51ae7a(0xf6)](_0x4af0bc+_0x9a785b,_0x270b76),_0x1f2bd7=_0x289507['pOeQL'](findTimestampScale,_0x597e13,_0x2f41ed),_0x5eeee8=_0x289507[_0x51ae7a(0x10e)](findFirstClusterOffset,_0x597e13,_0x2f41ed),_0x45d056=_0x597e13['slice'](0x0,_0x5eeee8),_0x397817=extractClusters(_0x597e13,_0x1f2bd7);let _0x242c3f=0x0;for(const _0x277afc of _0x397817){if(_0x289507[_0x51ae7a(0x119)](_0x277afc[_0x51ae7a(0x125)],_0x242c3f))_0x242c3f=_0x277afc['maxTicks'];}return{'header':_0x45d056,'clusters':_0x397817,'timestampScale':_0x1f2bd7,'maxTimestampTicks':_0x242c3f};}function buildCluster(_0x890158,_0x312ab3,_0x40bdbe){const _0x422d03=_0x1edf,_0x550228={'SxvmK':function(_0x4d0e5f,_0x1dad06){return _0x4d0e5f(_0x1dad06);}},_0x23d25b=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xdc954c=Math['max'](0x4,_0x550228['SxvmK'](uintSize,_0x890158)),_0xdbc76a=Buffer['concat']([Buffer[_0x422d03(0x12c)]([ID_TIMESTAMP]),writeVint(_0xdc954c),writeUint(_0x890158,_0xdc954c)]),_0x56200b=Buffer['concat']([_0x312ab3,_0xdbc76a,_0x40bdbe]),_0x308767=writeVint(_0x56200b['length']);return Buffer[_0x422d03(0x113)]([_0x23d25b,_0x308767,_0x56200b]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x76fece){const _0xb571c9=_0x1edf,_0xfcca9c={'sfGHf':function(_0x512ad2,_0x58b1ab){return _0x512ad2+_0x58b1ab;},'hqDta':function(_0x1e1c46,_0x504fb4){return _0x1e1c46+_0x504fb4;},'PtBJs':function(_0x359f58,_0x17ad09){return _0x359f58+_0x17ad09;},'uAJqn':function(_0x15b73f,_0x187d42,_0x2c6cb8){return _0x15b73f(_0x187d42,_0x2c6cb8);},'nsjio':function(_0x17ac20,_0x500f78,_0x3ec56a){return _0x17ac20(_0x500f78,_0x3ec56a);},'hBuQa':function(_0x7ad18b,_0x392f54){return _0x7ad18b+_0x392f54;},'MAMqn':function(_0x57bc5c,_0x7dc0c2){return _0x57bc5c(_0x7dc0c2);},'kgPKs':function(_0x16502c,_0x1b04b5){return _0x16502c+_0x1b04b5;},'vcGGE':function(_0x4e6bfd,_0x13471a){return _0x4e6bfd===_0x13471a;},'cQApu':function(_0x4bf80e,_0x532768,_0x38695d){return _0x4bf80e(_0x532768,_0x38695d);}},_0x17c6ee=Buffer['from'](_0x76fece);let _0x23cc92=0x0;const [,_0x90c7ad]=readId(_0x17c6ee,_0x23cc92),[_0x30ccb9,_0x8247cf]=readVint(_0x17c6ee,_0xfcca9c[_0xb571c9(0x126)](_0x23cc92,_0x90c7ad)),_0x41be1e=_0xfcca9c[_0xb571c9(0x105)](_0xfcca9c['hqDta'](_0xfcca9c['PtBJs'](_0x23cc92,_0x90c7ad),_0x8247cf),_0x30ccb9),[,_0x2c64dd]=_0xfcca9c[_0xb571c9(0x100)](readId,_0x17c6ee,_0x41be1e),[,_0x518bfe]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0xfcca9c['hBuQa'](_0x41be1e,_0x2c64dd)),_0x175cdb=_0xfcca9c['hqDta'](_0xfcca9c['sfGHf'](_0x41be1e,_0x2c64dd),_0x518bfe),_0x5f1e53=_0xfcca9c['MAMqn'](writeUnknownSizeVint,_0x518bfe);_0x5f1e53['copy'](_0x17c6ee,_0x41be1e+_0x2c64dd);let _0x42ddfb=_0x175cdb;const _0x5b2cf0=Math[_0xb571c9(0x139)](_0x17c6ee['length'],_0xfcca9c[_0xb571c9(0x13a)](_0x175cdb,0x2710));while(_0x42ddfb<_0x5b2cf0){const [_0xe85338,_0x1e5111]=readId(_0x17c6ee,_0x42ddfb),[_0x46404f,_0x2b0105]=_0xfcca9c[_0xb571c9(0x10c)](readVint,_0x17c6ee,_0x42ddfb+_0x1e5111);if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_CLUSTER))break;if(_0xfcca9c['nsjio'](isUnknownSize,_0x46404f,_0x2b0105))break;if(_0xfcca9c[_0xb571c9(0x109)](_0xe85338,ID_INFO)){const _0x4b039a=_0x42ddfb+_0x1e5111+_0x2b0105,_0x3f921a=_0x4b039a+_0x46404f,_0x5767ec=[];let _0x511ef2=_0x4b039a;while(_0x511ef2<_0x3f921a){const [_0x19d5e,_0x5854ec]=readId(_0x17c6ee,_0x511ef2),[_0x4eb5ba,_0x56e7ef]=_0xfcca9c['cQApu'](readVint,_0x17c6ee,_0x511ef2+_0x5854ec),_0x5e800c=_0x5854ec+_0x56e7ef+_0x4eb5ba;_0x19d5e!==ID_DURATION&&_0x5767ec[_0xb571c9(0x10f)](_0x17c6ee[_0xb571c9(0x13b)](_0x511ef2,_0x511ef2+_0x5e800c)),_0x511ef2+=_0x5e800c;}const _0x532b26=Buffer[_0xb571c9(0x113)](_0x5767ec),_0x3d99e9=Buffer['concat']([_0x17c6ee['slice'](_0x42ddfb,_0x42ddfb+_0x1e5111),writeVint(_0x532b26['length'],_0x2b0105)]);return Buffer[_0xb571c9(0x113)]([_0x17c6ee['slice'](0x0,_0x42ddfb),_0x3d99e9,_0x532b26,_0x17c6ee['slice'](_0x3f921a)]);}_0x42ddfb+=_0xfcca9c[_0xb571c9(0x126)](_0x1e5111,_0x2b0105)+_0x46404f;}return _0x17c6ee;}export function stitchWebmFiles(_0x342bf0,_0x56f41a){const _0x58663c=_0x1edf,_0x25595c={'KRVHG':function(_0x57a0a5,_0x49d40f){return _0x57a0a5(_0x49d40f);},'vyYSo':function(_0x4757d5,_0x49b482){return _0x4757d5(_0x49b482);},'jeDUM':function(_0x4e834b,_0x48fefc){return _0x4e834b+_0x48fefc;}};if(_0x342bf0['length']<=0x1)return![];const _0x3c5d39=[];for(const _0x46d837 of _0x342bf0){const _0x2228b6=_0x25595c[_0x58663c(0x132)](readFileSync,_0x46d837),_0x2e4cdb=_0x25595c['KRVHG'](parseWebm,_0x2228b6);if(!_0x2e4cdb||_0x2e4cdb[_0x58663c(0x117)]['length']===0x0)return![];_0x3c5d39[_0x58663c(0x10f)](_0x2e4cdb);}const _0x3e6d37=_0x3c5d39[0x0],_0x3db3d7=_0x25595c[_0x58663c(0x137)](rebuildHeaderWithoutDuration,_0x3e6d37[_0x58663c(0x130)]),_0x2166c6=[_0x3db3d7];let _0x1e4680=0x0;for(let _0x339017=0x0;_0x339017<_0x3c5d39['length'];_0x339017++){const _0x3ed6af=_0x3c5d39[_0x339017];for(const _0x33a1c6 of _0x3ed6af['clusters']){const _0x20b0c5=_0x33a1c6['timestamp']+_0x1e4680;_0x2166c6[_0x58663c(0x10f)](buildCluster(_0x20b0c5,_0x33a1c6['bodyBeforeTimestamp'],_0x33a1c6[_0x58663c(0x135)]));}const _0x408d76=0x1e;_0x1e4680+=_0x25595c[_0x58663c(0x11c)](_0x3ed6af[_0x58663c(0x133)],_0x408d76);}return writeFileSync(_0x56f41a,Buffer['concat'](_0x2166c6)),!![];}if(process['argv'][0x1]?.[_0x3935bf(0x10a)]('stitchWebmFiles.ts')||process[_0x3935bf(0x136)][0x1]?.['endsWith'](_0x3935bf(0x11d))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x3935bf(0x108)]-0x1],inputs=args[_0x3935bf(0x13b)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3935bf(0x121)](_0x3935bf(0x106)+inputs['length']+_0x3935bf(0x103)+output):console[_0x3935bf(0x121)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x36ba89=_0x11ce;(function(_0x473f31,_0x3a9ffb){const _0x302745=_0x11ce,_0x5531a6=_0x473f31();while(!![]){try{const _0x52a2e4=-parseInt(_0x302745(0xb0))/0x1+parseInt(_0x302745(0x73))/0x2*(-parseInt(_0x302745(0xa2))/0x3)+-parseInt(_0x302745(0x9c))/0x4*(-parseInt(_0x302745(0x93))/0x5)+-parseInt(_0x302745(0x78))/0x6+parseInt(_0x302745(0xac))/0x7*(parseInt(_0x302745(0x94))/0x8)+parseInt(_0x302745(0x79))/0x9*(parseInt(_0x302745(0xb5))/0xa)+parseInt(_0x302745(0x7d))/0xb*(-parseInt(_0x302745(0xa5))/0xc);if(_0x52a2e4===_0x3a9ffb)break;else _0x5531a6['push'](_0x5531a6['shift']());}catch(_0x277358){_0x5531a6['push'](_0x5531a6['shift']());}}}(_0x145f,0x71f17));function _0x11ce(_0x1a63ff,_0x333a5a){_0x1a63ff=_0x1a63ff-0x72;const _0x145f5c=_0x145f();let _0x11ce57=_0x145f5c[_0x1a63ff];return _0x11ce57;}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(_0x57818c,_0x25f552){const _0x401b6c=_0x11ce,_0x5b6751={'hAHtt':function(_0xfc109b,_0x10c0c5){return _0xfc109b>=_0x10c0c5;},'VqSyH':function(_0xf8de2e,_0x552091){return _0xf8de2e&_0x552091;},'ClNkZ':function(_0x272356,_0x1a951a){return _0x272356+_0x1a951a;}};if(_0x5b6751['hAHtt'](_0x25f552,_0x57818c[_0x401b6c(0xa9)]))return[0x0,0x0];const _0x3fda9d=_0x57818c[_0x25f552];let _0x48484e=0x1,_0x5d68be=0x80;while(_0x48484e<=0x8&&!_0x5b6751[_0x401b6c(0xb9)](_0x3fda9d,_0x5d68be)){_0x48484e++,_0x5d68be>>=0x1;}if(_0x25f552+_0x48484e>_0x57818c[_0x401b6c(0xa9)])return[0x0,0x0];let _0x5ce327=_0x3fda9d&_0x5d68be-0x1;for(let _0xb9b90a=0x1;_0xb9b90a<_0x48484e;_0xb9b90a++){_0x5ce327=_0x5ce327*0x100+_0x57818c[_0x5b6751[_0x401b6c(0x72)](_0x25f552,_0xb9b90a)];}return[_0x5ce327,_0x48484e];}function readId(_0x1d20be,_0x3f8614){const _0x2a9fc2=_0x11ce,_0x31b511={'Nyiju':function(_0x6e079a,_0x29166e){return _0x6e079a>=_0x29166e;},'OygqL':function(_0x4335ae,_0x3e5f2e){return _0x4335ae>_0x3e5f2e;},'EIYkA':function(_0x4d56f9,_0x41b231){return _0x4d56f9+_0x41b231;},'BSnVE':function(_0x525e7b,_0x446b83){return _0x525e7b+_0x446b83;},'BFKgt':function(_0x5eb900,_0x3cacdb){return _0x5eb900*_0x3cacdb;}};if(_0x31b511[_0x2a9fc2(0xad)](_0x3f8614,_0x1d20be['length']))return[0x0,0x0];const _0x3c505c=_0x1d20be[_0x3f8614];let _0x48c52d;if(_0x3c505c>=0x80)_0x48c52d=0x1;else{if(_0x31b511[_0x2a9fc2(0xad)](_0x3c505c,0x40))_0x48c52d=0x2;else{if(_0x31b511[_0x2a9fc2(0xad)](_0x3c505c,0x20))_0x48c52d=0x3;else{if(_0x3c505c>=0x10)_0x48c52d=0x4;else return[_0x3c505c,0x1];}}}if(_0x31b511['OygqL'](_0x31b511[_0x2a9fc2(0xa7)](_0x3f8614,_0x48c52d),_0x1d20be['length']))return[0x0,0x0];let _0xfcee74=0x0;for(let _0x1373ca=0x0;_0x1373ca<_0x48c52d;_0x1373ca++){_0xfcee74=_0x31b511['BSnVE'](_0x31b511['BFKgt'](_0xfcee74,0x100),_0x1d20be[_0x3f8614+_0x1373ca]);}return[_0xfcee74,_0x48c52d];}function readUint(_0x5b967d,_0x5eb70e,_0x3ec00c){const _0x567867=_0x11ce,_0x1fcb30={'GSbNd':function(_0x2e7d52,_0x5b8d2d){return _0x2e7d52+_0x5b8d2d;},'dfUbE':function(_0x4eada3,_0x1b7eec){return _0x4eada3*_0x1b7eec;},'UoJnB':function(_0x26e3ea,_0x38c4ac){return _0x26e3ea+_0x38c4ac;}};let _0x31c03e=0x0;for(let _0x4c2d20=0x0;_0x4c2d20<_0x3ec00c;_0x4c2d20++){_0x31c03e=_0x1fcb30['GSbNd'](_0x1fcb30[_0x567867(0xb3)](_0x31c03e,0x100),_0x5b967d[_0x1fcb30['UoJnB'](_0x5eb70e,_0x4c2d20)]);}return _0x31c03e;}function isUnknownSize(_0x3f8bf3,_0x88c9b6){const _0xe9c683=_0x11ce,_0x115bd8={'KQnCr':function(_0x59a69d,_0x2179b4){return _0x59a69d*_0x2179b4;}};return _0x3f8bf3===Math[_0xe9c683(0x91)](0x2,_0x115bd8[_0xe9c683(0x9d)](0x7,_0x88c9b6))-0x1;}function writeVint(_0x5a35d7,_0x278ec4){const _0x14c3be=_0x11ce,_0x5827eb={'gFTgV':function(_0x1a1a42,_0x3a84d1){return _0x1a1a42||_0x3a84d1;},'wOXZT':function(_0x5a63ca,_0x68a99c){return _0x5a63ca-_0x68a99c;}};let _0x4ed0af=_0x5827eb['gFTgV'](_0x278ec4,0x1);while(Math[_0x14c3be(0x91)](0x2,0x7*_0x4ed0af)-0x2<_0x5a35d7)_0x4ed0af++;const _0x44f0c4=Buffer['alloc'](_0x4ed0af);for(let _0x46efad=_0x5827eb['wOXZT'](_0x4ed0af,0x1);_0x46efad>=0x0;_0x46efad--){_0x44f0c4[_0x46efad]=_0x5a35d7&0xff,_0x5a35d7=Math[_0x14c3be(0xa1)](_0x5a35d7/0x100);}return _0x44f0c4[0x0]|=0x1<<_0x5827eb['wOXZT'](0x8,_0x4ed0af),_0x44f0c4;}function writeUint(_0x31dd08,_0x482a0c){const _0x321b34=_0x11ce,_0x5a9ece={'iuHbj':function(_0xdba077,_0x43654a){return _0xdba077>=_0x43654a;},'qWRia':function(_0x5bd8de,_0x2c3f2e){return _0x5bd8de/_0x2c3f2e;}},_0x3ddf3e=Buffer['alloc'](_0x482a0c);for(let _0x222769=_0x482a0c-0x1;_0x5a9ece['iuHbj'](_0x222769,0x0);_0x222769--){_0x3ddf3e[_0x222769]=_0x31dd08&0xff,_0x31dd08=Math['floor'](_0x5a9ece[_0x321b34(0x86)](_0x31dd08,0x100));}return _0x3ddf3e;}function writeUnknownSizeVint(_0x1a0330){const _0x3a0613=Buffer['alloc'](_0x1a0330,0xff);return _0x3a0613[0x0]=0xff>>_0x1a0330-0x1,_0x3a0613;}function uintSize(_0xbae153){if(_0xbae153===0x0)return 0x1;let _0x5f4cbe=0x0,_0x236afc=_0xbae153;while(_0x236afc>0x0){_0x5f4cbe++,_0x236afc=Math['floor'](_0x236afc/0x100);}return _0x5f4cbe;}function _0x145f(){const _0x411b66=['rsghr','UFHfF','231beyKDH','uUdhw','KEggz','wDpUP','iojUa','stitchWebmFiles.ts','sEaGq','xDUsH','copy','qWRia','hLsDb','fRKdQ','has','slice','push','EMtGg','JVJHO','NcLtc','seeaa','YygdW','pow','IMKoS','10GfoQkX','4204520EpYaLq','maxTicks','CGryK','endsWith','JXbbP','UxGsA','AvJBR','bodyBeforeTimestamp','1308716fGBTwk','KQnCr','QkZkD','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','indexOf','floor','344379Dndwry','MdjTo','argv','42324IHIfUZ','FRJgE','EIYkA','yTVIy','length','concat','vBRKA','7SnEJAL','Nyiju','UULeA','tZpRl','429111rRLmYh','lrJxo','wdHFh','dfUbE','IcFUl','20VSgTdJ','kLaUM','mEsYo','zHRZJ','VqSyH','stitchWebmFiles.js','ClNkZ','2xZoWEH','max','jVmqP','min','EKMuk','4486494SBdshd','2936286KcUzMV','from'];_0x145f=function(){return _0x411b66;};return _0x145f();}function findTimestampScale(_0x5f2966,_0x11457d){const _0x54c8f3=_0x11ce,_0x38b324={'UxGsA':function(_0x10c934,_0x5523ee){return _0x10c934+_0x5523ee;},'wDpUP':function(_0x387724,_0x39d16f,_0x38205b){return _0x387724(_0x39d16f,_0x38205b);},'QkZkD':function(_0x9a8a84,_0x3a9198){return _0x9a8a84===_0x3a9198;},'MdjTo':function(_0x40e862,_0x5ec191,_0x43e69a,_0x6e73cb){return _0x40e862(_0x5ec191,_0x43e69a,_0x6e73cb);},'FRJgE':function(_0x28acc8,_0x4b9b86){return _0x28acc8+_0x4b9b86;},'UULeA':function(_0x2fbe5f,_0x495be1){return _0x2fbe5f===_0x495be1;},'PwwTx':function(_0x5dec46,_0x1fad11,_0x5cea8f){return _0x5dec46(_0x1fad11,_0x5cea8f);}};let _0x214e80=_0x11457d;const _0x2bb78d=Math['min'](_0x5f2966['length'],_0x38b324[_0x54c8f3(0x99)](_0x11457d,0x2710));while(_0x214e80<_0x2bb78d){const [_0x3fcef3,_0x51d057]=readId(_0x5f2966,_0x214e80),[_0x579cdf,_0x5ea4db]=_0x38b324['wDpUP'](readVint,_0x5f2966,_0x214e80+_0x51d057);if(_0x38b324[_0x54c8f3(0x9e)](_0x3fcef3,ID_INFO)){let _0x4c1625=_0x38b324['UxGsA'](_0x38b324[_0x54c8f3(0x99)](_0x214e80,_0x51d057),_0x5ea4db);const _0x26d7e2=_0x38b324[_0x54c8f3(0x99)](_0x4c1625,_0x579cdf);while(_0x4c1625<_0x26d7e2){const [_0x58cf2f,_0x293e44]=readId(_0x5f2966,_0x4c1625),[_0x518d06,_0x148e99]=_0x38b324[_0x54c8f3(0x80)](readVint,_0x5f2966,_0x38b324['UxGsA'](_0x4c1625,_0x293e44));if(_0x38b324['QkZkD'](_0x58cf2f,ID_TIMESTAMP_SCALE))return _0x38b324[_0x54c8f3(0xa3)](readUint,_0x5f2966,_0x38b324[_0x54c8f3(0xa6)](_0x38b324[_0x54c8f3(0xa6)](_0x4c1625,_0x293e44),_0x148e99),_0x518d06);_0x4c1625+=_0x293e44+_0x148e99+_0x518d06;}break;}if(_0x38b324[_0x54c8f3(0xae)](_0x3fcef3,ID_CLUSTER))break;if(_0x38b324['PwwTx'](isUnknownSize,_0x579cdf,_0x5ea4db))break;_0x214e80+=_0x38b324['FRJgE'](_0x51d057+_0x5ea4db,_0x579cdf);}return 0xf4240;}function findFirstClusterOffset(_0x7259bb,_0x26cbf7){const _0x391799=_0x11ce,_0x5347fa={'gfhBE':function(_0x51774d,_0x216423){return _0x51774d<_0x216423;},'eTIak':function(_0x27e060,_0x15c81e){return _0x27e060+_0x15c81e;}};let _0x2f1290=_0x26cbf7;while(_0x5347fa['gfhBE'](_0x2f1290,_0x7259bb['length'])){const [_0x132e6d,_0x2a7484]=readId(_0x7259bb,_0x2f1290);if(_0x132e6d===ID_CLUSTER)return _0x2f1290;const [_0x49daf2,_0xd2a160]=readVint(_0x7259bb,_0x5347fa['eTIak'](_0x2f1290,_0x2a7484));if(isUnknownSize(_0x49daf2,_0xd2a160))return _0x2f1290;_0x2f1290+=_0x2a7484+_0xd2a160+_0x49daf2;}return _0x7259bb[_0x391799(0xa9)];}function findClusterEnd(_0x303cfd,_0xd8272d,_0x286e3e,_0x1253d1){const _0x4af98d=_0x11ce,_0x3df8a9={'UFHfF':function(_0x5640ef,_0x1f8765,_0x3cfe81){return _0x5640ef(_0x1f8765,_0x3cfe81);},'KZWje':function(_0x1fe5b1,_0x413d69){return _0x1fe5b1+_0x413d69;},'mEsYo':function(_0xe09e51,_0x209916){return _0xe09e51<_0x209916;},'FDxha':function(_0x5dd716,_0x4b199c,_0x1a1caf){return _0x5dd716(_0x4b199c,_0x1a1caf);},'IMKoS':function(_0x52e77d,_0x5cffd1,_0x4ccfbf){return _0x52e77d(_0x5cffd1,_0x4ccfbf);},'EMtGg':function(_0x479fa3,_0x49e713,_0x206e1c){return _0x479fa3(_0x49e713,_0x206e1c);},'JVJHO':function(_0x24f639,_0x5953b4){return _0x24f639+_0x5953b4;}};if(!_0x3df8a9[_0x4af98d(0x7c)](isUnknownSize,_0x286e3e,_0x1253d1))return _0x3df8a9['KZWje'](_0xd8272d,_0x286e3e);const _0x9aaf00=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x19e84a=_0xd8272d;while(_0x3df8a9[_0x4af98d(0xb7)](_0x19e84a,_0x303cfd[_0x4af98d(0xa9)]-0x4)){const [_0x24d0e5,_0x579fcd]=_0x3df8a9['FDxha'](readId,_0x303cfd,_0x19e84a);if(_0x9aaf00[_0x4af98d(0x89)](_0x24d0e5))return _0x19e84a;const [_0x5ad6a2,_0x4f3bc0]=_0x3df8a9[_0x4af98d(0x92)](readVint,_0x303cfd,_0x19e84a+_0x579fcd);if(_0x3df8a9[_0x4af98d(0x8c)](isUnknownSize,_0x5ad6a2,_0x4f3bc0))return _0x303cfd[_0x4af98d(0xa9)];_0x19e84a+=_0x3df8a9[_0x4af98d(0x8d)](_0x579fcd+_0x4f3bc0,_0x5ad6a2);}return _0x303cfd['length'];}function extractClusters(_0x48a0ed,_0x3af3fa){const _0xa130af=_0x11ce,_0x52cf75={'lrJxo':function(_0x15bfb5,_0x291e8d,_0x4cec76){return _0x15bfb5(_0x291e8d,_0x4cec76);},'NcLtc':function(_0x4f7faf,_0x25b6e3){return _0x4f7faf+_0x25b6e3;},'Vpqnp':function(_0x57a3d7,_0x3c3bb5,_0x5c8c42,_0x54784e,_0x20fa8e){return _0x57a3d7(_0x3c3bb5,_0x5c8c42,_0x54784e,_0x20fa8e);},'CGryK':function(_0x140d1c,_0x332fb4){return _0x140d1c<_0x332fb4;},'YygdW':function(_0x9c44c8,_0x4c0c92,_0x23afec){return _0x9c44c8(_0x4c0c92,_0x23afec);},'zHRZJ':function(_0x3f44fc,_0x383f50){return _0x3f44fc+_0x383f50;},'qbPhk':function(_0x353d01,_0x16bdc2,_0x2b2053,_0x4b7215){return _0x353d01(_0x16bdc2,_0x2b2053,_0x4b7215);},'kUTHT':function(_0x485a79,_0xb7e372){return _0x485a79+_0xb7e372;},'YZtEy':function(_0x3cf9b9,_0x2310e4){return _0x3cf9b9+_0x2310e4;},'xDUsH':function(_0x1683c2,_0x507802){return _0x1683c2+_0x507802;},'yTVIy':function(_0x584318,_0x592b6a){return _0x584318===_0x592b6a;},'seeaa':function(_0x3fc0cc,_0x3f5e68,_0x120566){return _0x3fc0cc(_0x3f5e68,_0x120566);},'AvJBR':function(_0x15ef4d,_0x46d4b4){return _0x15ef4d+_0x46d4b4;},'jVmqP':function(_0x2dba52,_0x56d530){return _0x2dba52+_0x56d530;},'vBRKA':function(_0x19a051,_0x386efc){return _0x19a051>_0x386efc;},'hLsDb':function(_0x1ef355,_0x126d4b){return _0x1ef355===_0x126d4b;},'IcFUl':function(_0x2f8f7e,_0x2221fd){return _0x2f8f7e+_0x2221fd;}},_0x393194=[],_0x197864=Buffer[_0xa130af(0x7a)]([0x1f,0x43,0xb6,0x75]);let _0xf61ade=0x0;while(_0xf61ade<_0x48a0ed['length']){const _0x4934d9=_0x48a0ed[_0xa130af(0xa0)](_0x197864,_0xf61ade);if(_0x4934d9===-0x1)break;const [_0x1a70ac,_0x22ff26]=readId(_0x48a0ed,_0x4934d9);if(_0x1a70ac!==ID_CLUSTER){_0xf61ade=_0x4934d9+0x1;continue;}const [_0x30a6cf,_0x2b535d]=_0x52cf75[_0xa130af(0xb1)](readVint,_0x48a0ed,_0x52cf75[_0xa130af(0x8e)](_0x4934d9,_0x22ff26)),_0x579df2=_0x52cf75[_0xa130af(0x8e)](_0x4934d9+_0x22ff26,_0x2b535d),_0x5d7ff6=_0x52cf75['Vpqnp'](findClusterEnd,_0x48a0ed,_0x579df2,_0x30a6cf,_0x2b535d);let _0x23f08e=_0x579df2,_0x5a6904=0x0,_0x49c7bc=0x2,_0x51524c=![],_0x202a71=Buffer['alloc'](0x0),_0x565d80=Buffer['alloc'](0x0);while(_0x52cf75[_0xa130af(0x96)](_0x23f08e,_0x5d7ff6)){const [_0x32126d,_0x10bd77]=_0x52cf75['lrJxo'](readId,_0x48a0ed,_0x23f08e),[_0x25b928,_0x216cd7]=_0x52cf75[_0xa130af(0x90)](readVint,_0x48a0ed,_0x52cf75[_0xa130af(0xb8)](_0x23f08e,_0x10bd77));if(_0x32126d===ID_TIMESTAMP){_0x5a6904=_0x52cf75['qbPhk'](readUint,_0x48a0ed,_0x52cf75['kUTHT'](_0x23f08e,_0x10bd77)+_0x216cd7,_0x25b928),_0x49c7bc=_0x25b928,_0x51524c=!![],_0x202a71=_0x48a0ed[_0xa130af(0x8a)](_0x579df2,_0x23f08e);const _0x29a8a6=_0x52cf75[_0xa130af(0xb8)](_0x52cf75['zHRZJ'](_0x23f08e+_0x10bd77,_0x216cd7),_0x25b928);_0x565d80=_0x48a0ed['slice'](_0x29a8a6,_0x5d7ff6);break;}if(_0x32126d===ID_CLUSTER)break;if(_0x52cf75['lrJxo'](isUnknownSize,_0x25b928,_0x216cd7))break;_0x23f08e+=_0x52cf75['YZtEy'](_0x10bd77+_0x216cd7,_0x25b928);}!_0x51524c&&(_0x565d80=_0x48a0ed['slice'](_0x579df2,_0x5d7ff6));let _0x3ede28=_0x5a6904;_0x23f08e=_0x579df2;while(_0x23f08e<_0x5d7ff6){const [_0x294d6d,_0x3f5421]=readId(_0x48a0ed,_0x23f08e),[_0x1c1c6a,_0x582eca]=readVint(_0x48a0ed,_0x52cf75[_0xa130af(0x84)](_0x23f08e,_0x3f5421));if(_0x52cf75[_0xa130af(0xa8)](_0x294d6d,ID_SIMPLE_BLOCK)&&_0x1c1c6a>=0x4){const _0x573bd1=_0x52cf75['zHRZJ'](_0x23f08e,_0x3f5421)+_0x582eca,[,_0x73daf0]=_0x52cf75[_0xa130af(0x8f)](readVint,_0x48a0ed,_0x573bd1),_0x189523=_0x48a0ed['readInt16BE'](_0x52cf75[_0xa130af(0x9a)](_0x573bd1,_0x73daf0)),_0x3d7349=_0x52cf75[_0xa130af(0x75)](_0x5a6904,_0x189523);if(_0x52cf75[_0xa130af(0xab)](_0x3d7349,_0x3ede28))_0x3ede28=_0x3d7349;}if(_0x52cf75[_0xa130af(0x87)](_0x294d6d,ID_CLUSTER))break;if(isUnknownSize(_0x1c1c6a,_0x582eca))break;_0x23f08e+=_0x52cf75['AvJBR'](_0x52cf75[_0xa130af(0xb4)](_0x3f5421,_0x582eca),_0x1c1c6a);}_0x393194[_0xa130af(0x8b)]({'timestamp':_0x5a6904,'maxTicks':_0x3ede28,'bodyBeforeTimestamp':_0x202a71,'bodyAfterTimestamp':_0x565d80,'timestampElementSize':_0x49c7bc}),_0xf61ade=_0x5d7ff6;}return _0x393194;}function parseWebm(_0x5830a2){const _0x5498da=_0x11ce,_0x30e89e={'JXbbP':function(_0x2d8ca7,_0x43b663,_0x4f4ac6){return _0x2d8ca7(_0x43b663,_0x4f4ac6);},'fRKdQ':function(_0x5dc944,_0x3544f6){return _0x5dc944!==_0x3544f6;},'rsghr':function(_0x1d9891,_0x13ce28){return _0x1d9891+_0x13ce28;},'ibfpL':function(_0x494378,_0x1f4f59,_0x3f3839){return _0x494378(_0x1f4f59,_0x3f3839);}};let _0x29fc35=0x0;const [,_0x3c1de9]=_0x30e89e[_0x5498da(0x98)](readId,_0x5830a2,_0x29fc35),[_0x252759,_0x52bc11]=readVint(_0x5830a2,_0x29fc35+_0x3c1de9);_0x29fc35+=_0x3c1de9+_0x52bc11+_0x252759;const [_0x3dc9e4,_0x173cf0]=_0x30e89e['JXbbP'](readId,_0x5830a2,_0x29fc35);if(_0x30e89e[_0x5498da(0x88)](_0x3dc9e4,ID_SEGMENT))return null;const [,_0x35ee91]=readVint(_0x5830a2,_0x29fc35+_0x173cf0),_0x588003=_0x30e89e[_0x5498da(0x7b)](_0x29fc35+_0x173cf0,_0x35ee91),_0x37913f=findTimestampScale(_0x5830a2,_0x588003),_0xd1a848=findFirstClusterOffset(_0x5830a2,_0x588003),_0x4bdf86=_0x5830a2[_0x5498da(0x8a)](0x0,_0xd1a848),_0x416732=_0x30e89e['ibfpL'](extractClusters,_0x5830a2,_0x37913f);let _0x4880d1=0x0;for(const _0x2fe6bc of _0x416732){if(_0x2fe6bc['maxTicks']>_0x4880d1)_0x4880d1=_0x2fe6bc[_0x5498da(0x95)];}return{'header':_0x4bdf86,'clusters':_0x416732,'timestampScale':_0x37913f,'maxTimestampTicks':_0x4880d1};}function buildCluster(_0x5df17b,_0x36a9d8,_0x4d4bd0){const _0x3d685c=_0x11ce,_0x5ba6fd={'wdHFh':function(_0x305efb,_0x2f6618,_0x5c1a40){return _0x305efb(_0x2f6618,_0x5c1a40);},'iojUa':function(_0x36bb22,_0x444a0f){return _0x36bb22(_0x444a0f);}},_0x4b1f53=Buffer[_0x3d685c(0x7a)]([0x1f,0x43,0xb6,0x75]),_0x2382f9=Math[_0x3d685c(0x74)](0x4,uintSize(_0x5df17b)),_0x4e0ec5=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x2382f9),_0x5ba6fd[_0x3d685c(0xb2)](writeUint,_0x5df17b,_0x2382f9)]),_0x16c8a5=Buffer[_0x3d685c(0xaa)]([_0x36a9d8,_0x4e0ec5,_0x4d4bd0]),_0x4fe895=_0x5ba6fd[_0x3d685c(0x81)](writeVint,_0x16c8a5['length']);return Buffer[_0x3d685c(0xaa)]([_0x4b1f53,_0x4fe895,_0x16c8a5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0xbef616){const _0x5174d5=_0x11ce,_0x1488ff={'tZpRl':function(_0x3e165c,_0x377305,_0x286d19){return _0x3e165c(_0x377305,_0x286d19);},'KEggz':function(_0x3e279b,_0x174104){return _0x3e279b+_0x174104;},'zkMBO':function(_0x309f10,_0x57a28a){return _0x309f10===_0x57a28a;},'EKMuk':function(_0x2956b2,_0x26c078){return _0x2956b2!==_0x26c078;},'LzeGI':function(_0xf3781e,_0x14ac2b){return _0xf3781e+_0x14ac2b;}},_0x3b8ab2=Buffer['from'](_0xbef616);let _0x4dcb6=0x0;const [,_0x194113]=_0x1488ff[_0x5174d5(0xaf)](readId,_0x3b8ab2,_0x4dcb6),[_0x2ea531,_0x2223f4]=_0x1488ff[_0x5174d5(0xaf)](readVint,_0x3b8ab2,_0x1488ff[_0x5174d5(0x7f)](_0x4dcb6,_0x194113)),_0x4d9f5d=_0x4dcb6+_0x194113+_0x2223f4+_0x2ea531,[,_0x7cc7ef]=readId(_0x3b8ab2,_0x4d9f5d),[,_0x50f606]=readVint(_0x3b8ab2,_0x1488ff['KEggz'](_0x4d9f5d,_0x7cc7ef)),_0x276ca2=_0x1488ff[_0x5174d5(0x7f)](_0x4d9f5d+_0x7cc7ef,_0x50f606),_0x3ddc8e=writeUnknownSizeVint(_0x50f606);_0x3ddc8e[_0x5174d5(0x85)](_0x3b8ab2,_0x4d9f5d+_0x7cc7ef);let _0x2bd015=_0x276ca2;const _0x3269ee=Math[_0x5174d5(0x76)](_0x3b8ab2['length'],_0x276ca2+0x2710);while(_0x2bd015<_0x3269ee){const [_0x227a5a,_0x5888d8]=_0x1488ff['tZpRl'](readId,_0x3b8ab2,_0x2bd015),[_0x5d82f3,_0x37f05d]=readVint(_0x3b8ab2,_0x1488ff[_0x5174d5(0x7f)](_0x2bd015,_0x5888d8));if(_0x1488ff['zkMBO'](_0x227a5a,ID_CLUSTER))break;if(_0x1488ff[_0x5174d5(0xaf)](isUnknownSize,_0x5d82f3,_0x37f05d))break;if(_0x227a5a===ID_INFO){const _0x4b2766=_0x1488ff['KEggz'](_0x2bd015+_0x5888d8,_0x37f05d),_0x16c3ff=_0x4b2766+_0x5d82f3,_0x334bbe=[];let _0x6711d9=_0x4b2766;while(_0x6711d9<_0x16c3ff){const [_0x60a422,_0x453b68]=readId(_0x3b8ab2,_0x6711d9),[_0x530b51,_0x3af732]=readVint(_0x3b8ab2,_0x6711d9+_0x453b68),_0x11a7d1=_0x453b68+_0x3af732+_0x530b51;_0x1488ff[_0x5174d5(0x77)](_0x60a422,ID_DURATION)&&_0x334bbe[_0x5174d5(0x8b)](_0x3b8ab2['slice'](_0x6711d9,_0x1488ff['LzeGI'](_0x6711d9,_0x11a7d1))),_0x6711d9+=_0x11a7d1;}const _0xe8655d=Buffer['concat'](_0x334bbe),_0x5effee=Buffer[_0x5174d5(0xaa)]([_0x3b8ab2[_0x5174d5(0x8a)](_0x2bd015,_0x2bd015+_0x5888d8),_0x1488ff[_0x5174d5(0xaf)](writeVint,_0xe8655d[_0x5174d5(0xa9)],_0x37f05d)]);return Buffer[_0x5174d5(0xaa)]([_0x3b8ab2['slice'](0x0,_0x2bd015),_0x5effee,_0xe8655d,_0x3b8ab2['slice'](_0x16c3ff)]);}_0x2bd015+=_0x1488ff[_0x5174d5(0x7f)](_0x5888d8,_0x37f05d)+_0x5d82f3;}return _0x3b8ab2;}export function stitchWebmFiles(_0x2be2bb,_0x16147b){const _0xbfa7f3=_0x11ce,_0x298e7d={'sEaGq':function(_0x5ee53d,_0x354ffe){return _0x5ee53d<=_0x354ffe;},'kLaUM':function(_0x954563,_0x3da437){return _0x954563(_0x3da437);},'hpvwC':function(_0x4ddf3a,_0x5913b5){return _0x4ddf3a+_0x5913b5;},'uUdhw':function(_0x489ccb,_0x32e21f,_0x2d8f2f){return _0x489ccb(_0x32e21f,_0x2d8f2f);}};if(_0x298e7d[_0xbfa7f3(0x83)](_0x2be2bb['length'],0x1))return![];const _0x1d336a=[];for(const _0x25533f of _0x2be2bb){const _0x1dec9a=readFileSync(_0x25533f),_0x57a57=_0x298e7d[_0xbfa7f3(0xb6)](parseWebm,_0x1dec9a);if(!_0x57a57||_0x57a57['clusters']['length']===0x0)return![];_0x1d336a['push'](_0x57a57);}const _0x9e97a3=_0x1d336a[0x0],_0x1ae9c2=rebuildHeaderWithoutDuration(_0x9e97a3['header']),_0x59b977=[_0x1ae9c2];let _0x4384b0=0x0;for(let _0x463313=0x0;_0x463313<_0x1d336a[_0xbfa7f3(0xa9)];_0x463313++){const _0x1ccb9c=_0x1d336a[_0x463313];for(const _0x207490 of _0x1ccb9c['clusters']){const _0x41a017=_0x298e7d['hpvwC'](_0x207490['timestamp'],_0x4384b0);_0x59b977[_0xbfa7f3(0x8b)](buildCluster(_0x41a017,_0x207490[_0xbfa7f3(0x9b)],_0x207490['bodyAfterTimestamp']));}const _0x183b3d=0x1e;_0x4384b0+=_0x1ccb9c['maxTimestampTicks']+_0x183b3d;}return _0x298e7d[_0xbfa7f3(0x7e)](writeFileSync,_0x16147b,Buffer['concat'](_0x59b977)),!![];}if(process[_0x36ba89(0xa4)][0x1]?.[_0x36ba89(0x97)](_0x36ba89(0x82))||process['argv'][0x1]?.['endsWith'](_0x36ba89(0xba))){const args=process['argv'][_0x36ba89(0x8a)](0x2);args[_0x36ba89(0xa9)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x36ba89(0xa9)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x36ba89(0xa9)]+'\x20files\x20->\x20'+output):console['log'](_0x36ba89(0x9f));}
|