@ranger-testing/ranger-cli 3.1.7-alpha.34400c2-56 → 3.1.7-alpha.44736ee-66
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/actors.js +1 -0
- 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/build/skills/ranger/SKILL.md +8 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2d3653,_0x2c8eab){const _0x337c7b=_0x5903,_0xeb7ff0=_0x2d3653();while(!![]){try{const _0x2093c7=parseInt(_0x337c7b(0xb1))/0x1*(-parseInt(_0x337c7b(0x83))/0x2)+parseInt(_0x337c7b(0xb8))/0x3*(-parseInt(_0x337c7b(0xa3))/0x4)+parseInt(_0x337c7b(0xc8))/0x5*(-parseInt(_0x337c7b(0x88))/0x6)+parseInt(_0x337c7b(0xaf))/0x7+-parseInt(_0x337c7b(0x93))/0x8*(-parseInt(_0x337c7b(0xab))/0x9)+-parseInt(_0x337c7b(0x96))/0xa*(-parseInt(_0x337c7b(0x90))/0xb)+parseInt(_0x337c7b(0x9a))/0xc*(-parseInt(_0x337c7b(0xb4))/0xd);if(_0x2093c7===_0x2c8eab)break;else _0xeb7ff0['push'](_0xeb7ff0['shift']());}catch(_0x254f09){_0xeb7ff0['push'](_0xeb7ff0['shift']());}}}(_0x30ad,0xd192f));import{existsSync}from'fs';import _0x86b3f3 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';function _0x5903(_0x1c5c96,_0x1500a8){_0x1c5c96=_0x1c5c96-0x83;const _0x30ad4d=_0x30ad();let _0x59035f=_0x30ad4d[_0x1c5c96];return _0x59035f;}import{readActiveProfileName}from'./activeProfile.js';function _0x30ad(){const _0x8eec18=['\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','4CCvqPG','domains','`\x20to\x20recreate\x20it.','environmentKey','source','`ranger\x20profile\x20add`\x20to\x20create\x20one.','PcbRY','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','6744069uXtLbA','zkMBo','iGbOe','string','5269047euFGcF','sqoGY','43291oyJZVt','cloud','local','13ZHgPsf','startPath','list','TloKo','2895267iDDrGM','name','log','RANGER_SESSION_STATE_PATH','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','envStartPath','\x20to\x20override.','authPath','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','Local\x20profile','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','resolvedEnv','cdpEndpoint','Aqkay','CgzvD','2722660GqIadJ','26KgTUwt','Zossp','ALmQJ','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','baseUrl','6gYOSqm','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x20baseUrl\x20<url>','envBaseUrl','QcIqv','Profile\x20\x22','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','OcGWF','22CaZSak','Cloud\x20profile\x20(recommended)','toFKV','8MhNdut','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','settings','7714540WbtMCW','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','baseUrlSource','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','1369812XgDhkB','message','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','RANGER_SESSION_STATE_PATH=','kiZGI','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','authEnv'];_0x30ad=function(){return _0x8eec18;};return _0x30ad();}export async function resolveProfileContext(_0x37c212){const _0x110b0f=_0x5903,_0xc1754b={'CgzvD':function(_0x43d21e,_0x18550d){return _0x43d21e(_0x18550d);},'zagvB':function(_0x4e01a0){return _0x4e01a0();},'TXNDW':function(_0x264152,_0x5226f2){return _0x264152!==_0x5226f2;},'zkMBo':function(_0x52dbe8,_0x537fbb){return _0x52dbe8(_0x537fbb);},'gnEsW':function(_0x72f6f1,_0x5f44d6){return _0x72f6f1+_0x5f44d6;},'ALmQJ':'Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','GAHMR':_0x110b0f(0x86),'FtRXq':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','OcGWF':function(_0x201963,_0x1ec6c3){return _0x201963(_0x1ec6c3);},'iGbOe':function(_0x1c057b,_0x3c3d7e){return _0x1c057b instanceof _0x3c3d7e;},'QcIqv':function(_0x35a5cf,_0x51140f){return _0x35a5cf+_0x51140f;},'NzZTc':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','LrrLL':function(_0x5e19dd,_0x3768ff){return _0x5e19dd&&_0x3768ff;},'IWmgX':_0x110b0f(0xb6),'wFhGO':_0x110b0f(0xa7),'fzvjF':_0x110b0f(0xb2),'kiZGI':function(_0x45bdf9,_0x13369b,_0x3350f5){return _0x45bdf9(_0x13369b,_0x3350f5);},'dNQFX':function(_0x3199f8,_0x13a7bc){return _0x3199f8(_0x13a7bc);},'Aqkay':function(_0x3bd80e){return _0x3bd80e();},'RsseX':function(_0x26b2e6,_0x59bc04){return _0x26b2e6??_0x59bc04;},'toFKV':function(_0x182421,_0x407d23){return _0x182421(_0x407d23);},'sqoGY':function(_0xdd53cd,_0x3c1df8){return _0xdd53cd+_0x3c1df8;},'aUAdb':_0x110b0f(0xc1),'PcbRY':function(_0x58209,_0x1c3326){return _0x58209(_0x1c3326);},'cyIKV':function(_0x1a4bf8,_0x4327c4){return _0x1a4bf8(_0x4327c4);}},_0x5e676c=_0x37c212['profile'];let _0x1a212b=_0x5e676c,_0x4230f9=null;const _0x2d3ae2=_0x5e676c?null:await readActiveProfileName();if(_0x37c212['authEnv']&&_0x5e676c)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x37c212[_0x110b0f(0xa0)]+_0x110b0f(0x8e)+_0x5e676c+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x37c212[_0x110b0f(0xa0)]&&!process['env']['RANGER_TEST_USERNAME']&&console[_0x110b0f(0xba)]('\x20\x20Note:\x20--env\x20\x22'+_0x37c212[_0x110b0f(0xa0)]+_0x110b0f(0x94));if(!_0x5e676c&&process['env']['RANGER_TEST_USERNAME'])try{const _0x449ea9=await _0xc1754b[_0x110b0f(0xc7)](resolveAdHocProfile,{'targetUrl':_0x37c212['baseUrl']??_0xc1754b['zagvB'](readUrlEnvVars)['envBaseUrl'],'envKey':_0x37c212['authEnv']});_0x449ea9&&(_0x2d3ae2&&_0xc1754b['TXNDW'](_0x2d3ae2,_0x449ea9[_0x110b0f(0xb9)])&&console['log'](_0x110b0f(0x9f)+_0x449ea9['name']+_0x110b0f(0xaa)+_0x2d3ae2+'\x22.\x20Pass\x20--profile\x20'+_0x2d3ae2+_0x110b0f(0xbf)),_0x1a212b=_0x449ea9[_0x110b0f(0xb9)],_0x4230f9=_0x449ea9['profile']);}catch(_0x3a1f0c){if(!_0x2d3ae2||_0x37c212['authEnv'])throw _0x3a1f0c;console[_0x110b0f(0xba)]('\x20\x20Warning:\x20'+(_0x3a1f0c instanceof Error?_0x3a1f0c[_0x110b0f(0x9b)]:_0xc1754b['zkMBo'](String,_0x3a1f0c))),console[_0x110b0f(0xba)]('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x2d3ae2+'\x22.');}if(!_0x1a212b)_0x1a212b=_0x2d3ae2??undefined;if(!_0x1a212b)try{const _0xe7bbc9=await listCloudProfiles();if(_0xe7bbc9['length']===0x1){const _0x5aff62=_0xe7bbc9[0x0];_0x1a212b=_0x5aff62[_0x110b0f(0xb9)],console[_0x110b0f(0xba)](_0x110b0f(0xbd)+_0x5aff62['name']),console[_0x110b0f(0xba)](_0x110b0f(0xc3));}}catch{}if(!_0x1a212b)throw new Error(_0xc1754b['gnEsW'](_0xc1754b[_0x110b0f(0x85)]+_0x110b0f(0x9c)+_0xc1754b['GAHMR'],_0x110b0f(0x97))+_0xc1754b['FtRXq']);const _0x47cc48=getEnvDir(_0x1a212b),_0x47ce63=existsSync(_0x47cc48);let _0x18a756=_0x4230f9,_0x147515=![];if(!_0x18a756)try{_0x18a756=await _0xc1754b[_0x110b0f(0x8f)](fetchCloudProfile,_0x1a212b);if(!_0x18a756)_0x147515=!![];}catch(_0x3812a1){_0xc1754b[_0x110b0f(0xad)](_0x3812a1,ApiError)&&_0x3812a1['status']===0x194&&(_0x147515=!![]);}if(_0x5e676c&&_0x147515&&!_0x47ce63&&!_0x18a756)throw new Error(_0xc1754b[_0x110b0f(0x8c)]('Profile\x20\x22'+_0x5e676c+_0x110b0f(0xbc),_0xc1754b['NzZTc'])+_0x110b0f(0xa8));if(_0xc1754b['LrrLL'](_0x18a756,_0x47ce63)){let _0xf6d7c=!![];if(isInteractive()){const {source:_0x16902e}=await _0x86b3f3['prompt']([{'type':_0xc1754b['IWmgX'],'name':_0xc1754b['wFhGO'],'message':_0x110b0f(0x8d)+_0x1a212b+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x110b0f(0x91),'value':_0xc1754b['fzvjF']},{'name':_0x110b0f(0xc2),'value':_0x110b0f(0xb3)}],'default':'cloud'}]);_0xf6d7c=_0x16902e===_0xc1754b['fzvjF'];}if(!_0xf6d7c)_0x18a756=null;}const _0x411ec2=_0xc1754b[_0x110b0f(0x9e)](readProfileOverrides,process['cwd'](),_0x1a212b);let _0x4e0e35=null,_0x543455,_0x72c168,_0x1da286,_0xc72309,_0x81abba=null,_0x17a3a9,_0xa84a84;const _0x9d1101=_0xc1754b['dNQFX'](expandOverrides,_0x411ec2),_0x4209d1=_0xc1754b[_0x110b0f(0xc6)](readUrlEnvVars);if(_0x18a756){_0x4e0e35=_0x18a756;const _0x177520=_0x18a756['settings']??{},_0x53bc41=mergeCloudProfileSettings(_0x177520,_0xc1754b['RsseX'](_0x411ec2,undefined)),_0x57d9e6={..._0x18a756,'settings':_0x53bc41};_0x81abba={'baseUrl':expandString(_0x177520['baseUrl']),'startPath':_0xc1754b[_0x110b0f(0xac)](expandString,_0x177520[_0x110b0f(0xb5)])};const _0x32ecef=await fetchAuthConfig(),_0x58254d=_0x32ecef?resolveAuthEnvironmentLocally(_0x32ecef,_0x18a756[_0x110b0f(0xa6)]):null;_0x17a3a9=_0x58254d?.['domains']?.[0x0],_0xa84a84=_0x58254d?.['key'];const _0xe961cf=_0xc1754b[_0x110b0f(0x92)](resolveProfileUrl,{'flagBaseUrl':_0x37c212[_0x110b0f(0x87)],'flagStartPath':_0x37c212[_0x110b0f(0xb5)],'envBaseUrl':_0x4209d1['envBaseUrl'],'envStartPath':_0x4209d1['envStartPath'],'projectOverrides':_0x9d1101,'cloudSettings':_0x81abba,'authEnvironmentDomain':_0x17a3a9}),_0x270d2d=process['env'][_0x110b0f(0xbb)];if(_0x270d2d){if(!existsSync(_0x270d2d))throw new Error(_0x110b0f(0x9d)+_0x270d2d+'\x20does\x20not\x20exist.');_0x543455=_0x270d2d,_0x72c168=_0xc1754b[_0x110b0f(0x92)](resolveEnvVars,_0x53bc41),_0x1da286=Boolean(_0x72c168['cdpEndpoint']);}else{const _0x1acf93=await resolveCloudProfileSession(_0x57d9e6,{'effectiveBaseUrl':_0xe961cf[_0x110b0f(0x87)],'telemetry':_0x37c212['telemetry'],'assertedEnv':_0x37c212['authEnv']});_0x543455=_0x1acf93[_0x110b0f(0xc0)],_0x72c168=resolveEnvVars(_0x1acf93[_0x110b0f(0x95)]),_0x1da286=Boolean(_0x72c168[_0x110b0f(0xc5)]),_0x17a3a9=_0x1acf93['resolvedEnv']?.[_0x110b0f(0xa4)]?.[0x0],_0xa84a84=_0x1acf93[_0x110b0f(0xc4)]?.['key'];}}else{if(!_0x47ce63){const _0x331468=!_0x5e676c;throw new Error(_0x331468?_0xc1754b[_0x110b0f(0xb0)]('Active\x20profile\x20\x22'+_0x1a212b+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0xc1754b['aUAdb'])+'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'+(_0x110b0f(0x89)+_0x1a212b+_0x110b0f(0xa5)):_0x110b0f(0x8d)+_0x1a212b+_0x110b0f(0x99)+_0x1a212b);}const _0x596d8c=await _0xc1754b[_0x110b0f(0xa9)](loadSettings,_0x1a212b);_0x72c168=resolveEnvVars(_0x596d8c),_0x1da286=Boolean(_0x72c168[_0x110b0f(0xc5)]),_0xc72309=_0x72c168['baseUrl'];}const _0x496192=_0xc1754b['cyIKV'](resolveProfileUrl,{'flagBaseUrl':_0x37c212['baseUrl'],'flagStartPath':_0x37c212[_0x110b0f(0xb5)],'envBaseUrl':_0x4209d1[_0x110b0f(0x8b)],'envStartPath':_0x4209d1[_0x110b0f(0xbe)],'localSettingsBaseUrl':_0xc72309,'projectOverrides':_0x9d1101,'cloudSettings':_0x81abba,'authEnvironmentDomain':_0x17a3a9}),_0x585f30=_0x496192['url']??_0x496192['baseUrl'];if(!_0x585f30&&!_0x1da286)throw new Error(_0x110b0f(0xa2)+_0x1a212b+_0x110b0f(0xa1)+_0x1a212b+_0x110b0f(0x8a));return{'activeProfile':_0x1a212b,'resolvedCloudProfile':_0x4e0e35,'cloudAuthPath':_0x543455,'resolvedSettings':_0x72c168,'isCdpMode':_0x1da286,'url':_0x585f30,'baseUrlSource':_0x496192[_0x110b0f(0x98)],'authEnvKey':_0xa84a84,'startPath':_0x496192['startPath']};}function expandString(_0x227cd8){const _0x5e392a=_0x5903,_0x37142c={'Zossp':function(_0x34a254,_0x494d1c){return _0x34a254!==_0x494d1c;}};if(_0x37142c[_0x5e392a(0x84)](typeof _0x227cd8,_0x5e392a(0xae)))return _0x227cd8;return resolveEnvVars(_0x227cd8);}function expandOverrides(_0x5e3f9c){const _0x1577d2=_0x5903,_0x2acc48={'TloKo':function(_0x17fcc,_0x17110c){return _0x17fcc===_0x17110c;},'DpPuJ':_0x1577d2(0xae),'kSKnC':function(_0x306248,_0x1cee63){return _0x306248(_0x1cee63);}};if(!_0x5e3f9c)return _0x5e3f9c;const _0xe253fc={..._0x5e3f9c};return _0x2acc48[_0x1577d2(0xb7)](typeof _0xe253fc['baseUrl'],_0x2acc48['DpPuJ'])&&(_0xe253fc[_0x1577d2(0x87)]=_0x2acc48['kSKnC'](resolveEnvVars,_0xe253fc['baseUrl'])),typeof _0xe253fc['startPath']===_0x2acc48['DpPuJ']&&(_0xe253fc['startPath']=resolveEnvVars(_0xe253fc[_0x1577d2(0xb5)])),_0xe253fc;}
|
|
1
|
+
(function(_0x115664,_0x20ae57){const _0x5c1cca=_0x2f2a,_0x35a78a=_0x115664();while(!![]){try{const _0xfedabc=parseInt(_0x5c1cca(0x1a2))/0x1*(parseInt(_0x5c1cca(0x1c9))/0x2)+parseInt(_0x5c1cca(0x1dc))/0x3*(-parseInt(_0x5c1cca(0x1b1))/0x4)+-parseInt(_0x5c1cca(0x1c3))/0x5*(parseInt(_0x5c1cca(0x1b6))/0x6)+-parseInt(_0x5c1cca(0x1a9))/0x7+parseInt(_0x5c1cca(0x1b4))/0x8*(parseInt(_0x5c1cca(0x1d0))/0x9)+parseInt(_0x5c1cca(0x1b0))/0xa+-parseInt(_0x5c1cca(0x1bb))/0xb*(-parseInt(_0x5c1cca(0x1e0))/0xc);if(_0xfedabc===_0x20ae57)break;else _0x35a78a['push'](_0x35a78a['shift']());}catch(_0x455764){_0x35a78a['push'](_0x35a78a['shift']());}}}(_0x3573,0x8704c));import{existsSync}from'fs';import _0x4ab907 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';function _0x2f2a(_0x15d5b1,_0xe96caf){_0x15d5b1=_0x15d5b1-0x19d;const _0x3573a9=_0x3573();let _0x2f2a3f=_0x3573a9[_0x15d5b1];return _0x2f2a3f;}export async function resolveProfileContext(_0x426074){const _0x4f40de=_0x2f2a,_0x422ae0={'ugtpa':function(_0xaaf182){return _0xaaf182();},'UCBzK':function(_0x4af65e,_0x134bb6){return _0x4af65e!==_0x134bb6;},'VFXfU':function(_0x565ec9,_0x28a04a){return _0x565ec9 instanceof _0x28a04a;},'wlWmN':function(_0x273636,_0x182f1a){return _0x273636??_0x182f1a;},'dmVbD':function(_0x16be8c){return _0x16be8c();},'NuDYR':function(_0x4bb280,_0x5b2b2b){return _0x4bb280===_0x5b2b2b;},'iTDqo':function(_0x21aa13,_0x48501c){return _0x21aa13+_0x48501c;},'oEjkT':function(_0x3e4172,_0x49aa33){return _0x3e4172+_0x49aa33;},'CfwCX':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','qONvP':function(_0x1f7d07,_0xf1faa0){return _0x1f7d07(_0xf1faa0);},'jDoOC':function(_0xc2c198,_0x3c89c3){return _0xc2c198(_0x3c89c3);},'QlxFX':function(_0x4143eb,_0x3b3046){return _0x4143eb===_0x3b3046;},'rRkIh':_0x4f40de(0x1a5),'Idguy':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','Qptvu':function(_0x37da11){return _0x37da11();},'PNpPv':'cloud','bdexJ':function(_0x5a3e0c,_0x550f73,_0x127923){return _0x5a3e0c(_0x550f73,_0x127923);},'TTNMA':function(_0x1183db,_0x4fcefa){return _0x1183db(_0x4fcefa);},'jtelQ':function(_0x5d648b,_0x3913b9){return _0x5d648b(_0x3913b9);},'GGFor':function(_0x1d68b8,_0x4e16d8,_0x11b8b0){return _0x1d68b8(_0x4e16d8,_0x11b8b0);},'juSgp':function(_0x35516c,_0x14226a){return _0x35516c(_0x14226a);},'UBBVP':function(_0x2d67f6,_0x1451fc,_0x3a41ff){return _0x2d67f6(_0x1451fc,_0x3a41ff);},'ZAkCR':function(_0x109245,_0x32115a){return _0x109245+_0x32115a;},'kMVni':function(_0xf01263,_0x910d94){return _0xf01263+_0x910d94;},'rpmxM':function(_0x1d55e7,_0x2bc03d){return _0x1d55e7+_0x2bc03d;},'sVWci':_0x4f40de(0x1ae),'WGIrh':function(_0x43b558,_0x34d1b3){return _0x43b558&&_0x34d1b3;}},_0x980f82=_0x426074['profile'];let _0x43a740=_0x980f82,_0x5c2ed8=null;const _0x5cfdc=_0x980f82?null:await _0x422ae0['ugtpa'](readActiveProfileName);if(_0x426074[_0x4f40de(0x1d3)]&&_0x980f82)console[_0x4f40de(0x1d5)](_0x4f40de(0x1a3)+_0x426074['authEnv']+_0x4f40de(0x1ce)+_0x980f82+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x426074[_0x4f40de(0x1d3)]&&!process[_0x4f40de(0x1b5)]['RANGER_TEST_USERNAME']&&console[_0x4f40de(0x1d5)]('\x20\x20Note:\x20--env\x20\x22'+_0x426074[_0x4f40de(0x1d3)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x980f82&&process['env']['RANGER_TEST_USERNAME'])try{const _0xc7f9ab=await resolveAdHocProfile({'targetUrl':_0x426074[_0x4f40de(0x1ac)]??_0x422ae0[_0x4f40de(0x1c8)](readUrlEnvVars)['envBaseUrl'],'envKey':_0x426074[_0x4f40de(0x1d3)]});_0xc7f9ab&&(_0x5cfdc&&_0x422ae0[_0x4f40de(0x1b2)](_0x5cfdc,_0xc7f9ab['name'])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0xc7f9ab['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x5cfdc+'\x22.\x20Pass\x20--profile\x20'+_0x5cfdc+'\x20to\x20override.'),_0x43a740=_0xc7f9ab[_0x4f40de(0x1db)],_0x5c2ed8=_0xc7f9ab[_0x4f40de(0x1b8)]);}catch(_0x570562){if(!_0x5cfdc||_0x426074['authEnv'])throw _0x570562;console[_0x4f40de(0x1d5)](_0x4f40de(0x1d6)+(_0x422ae0[_0x4f40de(0x1de)](_0x570562,Error)?_0x570562[_0x4f40de(0x1d9)]:String(_0x570562))),console['log'](_0x4f40de(0x1d7)+_0x5cfdc+'\x22.');}if(!_0x43a740)_0x43a740=_0x422ae0['wlWmN'](_0x5cfdc,undefined);if(!_0x43a740)try{const _0x4e87b2=await _0x422ae0[_0x4f40de(0x1af)](listCloudProfiles);if(_0x422ae0[_0x4f40de(0x1c4)](_0x4e87b2[_0x4f40de(0x1d2)],0x1)){const _0x590d50=_0x4e87b2[0x0];_0x43a740=_0x590d50['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x590d50[_0x4f40de(0x1db)]),console[_0x4f40de(0x1d5)](_0x4f40de(0x1ca));}}catch{}if(!_0x43a740)throw new Error(_0x422ae0['iTDqo'](_0x422ae0['iTDqo'](_0x422ae0[_0x4f40de(0x1a4)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x422ae0['CfwCX']),_0x4f40de(0x1d8))+_0x4f40de(0x1a1),_0x4f40de(0x1c1)));const _0x2a5e45=_0x422ae0[_0x4f40de(0x1ba)](getEnvDir,_0x43a740),_0x15e5ce=_0x422ae0['jDoOC'](existsSync,_0x2a5e45);let _0x4d68a4=_0x5c2ed8,_0xf496d=![];if(!_0x4d68a4)try{_0x4d68a4=await fetchCloudProfile(_0x43a740);if(!_0x4d68a4)_0xf496d=!![];}catch(_0x1db1c7){_0x1db1c7 instanceof ApiError&&_0x422ae0[_0x4f40de(0x1cb)](_0x1db1c7['status'],0x194)&&(_0xf496d=!![]);}if(_0x980f82&&_0xf496d&&!_0x15e5ce&&!_0x4d68a4)throw new Error(_0x422ae0['iTDqo'](_0x4f40de(0x19e)+_0x980f82+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x422ae0[_0x4f40de(0x19f)],_0x422ae0[_0x4f40de(0x1a6)]));if(_0x4d68a4&&_0x15e5ce){let _0x3eac9a=!![];if(_0x422ae0['Qptvu'](isInteractive)){const {source:_0x5ea5f3}=await _0x4ab907[_0x4f40de(0x1c2)]([{'type':'list','name':_0x4f40de(0x1df),'message':'Profile\x20\x22'+_0x43a740+_0x4f40de(0x1cd),'choices':[{'name':_0x4f40de(0x1b9),'value':_0x422ae0['PNpPv']},{'name':'Local\x20profile','value':'local'}],'default':_0x4f40de(0x1ad)}]);_0x3eac9a=_0x5ea5f3===_0x422ae0[_0x4f40de(0x1a7)];}if(!_0x3eac9a)_0x4d68a4=null;}const _0x1513d5=_0x422ae0[_0x4f40de(0x1bc)](readProfileOverrides,process[_0x4f40de(0x1cf)](),_0x43a740);let _0x2bfbb9=null,_0x31be93,_0x1c659a,_0x4a1bd1,_0x1d9717,_0x24f551=null,_0x35d80f,_0x1a6c20;const _0x3eac72=_0x422ae0[_0x4f40de(0x1aa)](expandOverrides,_0x1513d5),_0x388326=readUrlEnvVars();if(_0x4d68a4){_0x2bfbb9=_0x4d68a4;const _0x49163b=_0x4d68a4[_0x4f40de(0x1d1)]??{},_0x3e071e=mergeCloudProfileSettings(_0x49163b,_0x1513d5??undefined),_0x3d5858={..._0x4d68a4,'settings':_0x3e071e};_0x24f551={'baseUrl':expandString(_0x49163b['baseUrl']),'startPath':_0x422ae0[_0x4f40de(0x1cc)](expandString,_0x49163b[_0x4f40de(0x1a0)])};const _0x2db4ea=await fetchAuthConfig(),_0x5bca73=_0x2db4ea?_0x422ae0['GGFor'](resolveAuthEnvironmentLocally,_0x2db4ea,_0x4d68a4['environmentKey']):null;_0x35d80f=_0x5bca73?.[_0x4f40de(0x1d4)]?.[0x0],_0x1a6c20=_0x5bca73?.[_0x4f40de(0x1bd)];const _0x52897e=resolveProfileUrl({'flagBaseUrl':_0x426074['baseUrl'],'flagStartPath':_0x426074['startPath'],'envBaseUrl':_0x388326['envBaseUrl'],'envStartPath':_0x388326['envStartPath'],'projectOverrides':_0x3eac72,'cloudSettings':_0x24f551,'authEnvironmentDomain':_0x35d80f}),_0x1cc8af=process['env'][_0x4f40de(0x1da)];if(_0x1cc8af){if(!_0x422ae0[_0x4f40de(0x1be)](existsSync,_0x1cc8af))throw new Error(_0x4f40de(0x1c0)+_0x1cc8af+'\x20does\x20not\x20exist.');_0x31be93=_0x1cc8af,_0x1c659a=_0x422ae0['juSgp'](resolveEnvVars,_0x3e071e),_0x4a1bd1=Boolean(_0x1c659a[_0x4f40de(0x1bf)]);}else{const _0x204b42=await _0x422ae0['UBBVP'](resolveCloudProfileSession,_0x3d5858,{'effectiveBaseUrl':_0x52897e['baseUrl'],'telemetry':_0x426074[_0x4f40de(0x1b3)],'assertedEnv':_0x426074['authEnv']});_0x31be93=_0x204b42[_0x4f40de(0x19d)],_0x1c659a=resolveEnvVars(_0x204b42['settings']),_0x4a1bd1=Boolean(_0x1c659a[_0x4f40de(0x1bf)]),_0x35d80f=_0x204b42[_0x4f40de(0x1dd)]?.['domains']?.[0x0],_0x1a6c20=_0x204b42[_0x4f40de(0x1dd)]?.['key'];}}else{if(!_0x15e5ce){const _0xae8850=!_0x980f82;throw new Error(_0xae8850?_0x422ae0[_0x4f40de(0x1c7)](_0x422ae0[_0x4f40de(0x1c5)](_0x422ae0['rpmxM']('Active\x20profile\x20\x22'+_0x43a740+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),_0x422ae0['sVWci']),'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x43a740+'`\x20to\x20recreate\x20it.'):_0x4f40de(0x19e)+_0x43a740+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x43a740);}const _0x36a5c8=await loadSettings(_0x43a740);_0x1c659a=resolveEnvVars(_0x36a5c8),_0x4a1bd1=Boolean(_0x1c659a['cdpEndpoint']),_0x1d9717=_0x1c659a['baseUrl'];}const _0x48b03c=_0x422ae0['qONvP'](resolveProfileUrl,{'flagBaseUrl':_0x426074['baseUrl'],'flagStartPath':_0x426074['startPath'],'envBaseUrl':_0x388326[_0x4f40de(0x1b7)],'envStartPath':_0x388326['envStartPath'],'localSettingsBaseUrl':_0x1d9717,'projectOverrides':_0x3eac72,'cloudSettings':_0x24f551,'authEnvironmentDomain':_0x35d80f}),_0x10daa7=_0x48b03c['url']??_0x48b03c[_0x4f40de(0x1ac)];if(_0x422ae0['WGIrh'](!_0x10daa7,!_0x4a1bd1))throw new Error(_0x4f40de(0x1a8)+_0x43a740+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x43a740+'\x20baseUrl\x20<url>');return{'activeProfile':_0x43a740,'resolvedCloudProfile':_0x2bfbb9,'cloudAuthPath':_0x31be93,'resolvedSettings':_0x1c659a,'isCdpMode':_0x4a1bd1,'url':_0x10daa7,'baseUrlSource':_0x48b03c[_0x4f40de(0x1e1)],'authEnvKey':_0x1a6c20,'startPath':_0x48b03c[_0x4f40de(0x1a0)]};}function expandString(_0xa5bfc9){const _0x1aebaa=_0x2f2a,_0x3b8868={'RZLCu':function(_0x5a053e,_0xc38008){return _0x5a053e!==_0xc38008;},'UZlsK':_0x1aebaa(0x1c6)};if(_0x3b8868['RZLCu'](typeof _0xa5bfc9,_0x3b8868['UZlsK']))return _0xa5bfc9;return resolveEnvVars(_0xa5bfc9);}function expandOverrides(_0x2e8ef5){const _0x1228b1=_0x2f2a,_0x486cc7={'pmuza':'string','xXtPa':function(_0x52b9e3,_0x11be15){return _0x52b9e3(_0x11be15);}};if(!_0x2e8ef5)return _0x2e8ef5;const _0xb57b76={..._0x2e8ef5};return typeof _0xb57b76[_0x1228b1(0x1ac)]===_0x486cc7['pmuza']&&(_0xb57b76[_0x1228b1(0x1ac)]=_0x486cc7[_0x1228b1(0x1ab)](resolveEnvVars,_0xb57b76[_0x1228b1(0x1ac)])),typeof _0xb57b76[_0x1228b1(0x1a0)]==='string'&&(_0xb57b76[_0x1228b1(0x1a0)]=resolveEnvVars(_0xb57b76['startPath'])),_0xb57b76;}function _0x3573(){const _0x40731b=['RANGER_SESSION_STATE_PATH=','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','prompt','2169210qHJJUE','NuDYR','kMVni','string','ZAkCR','ugtpa','68106QXHbRO','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','QlxFX','jtelQ','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','cwd','297puLsJc','settings','length','authEnv','domains','log','\x20\x20Warning:\x20','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','message','RANGER_SESSION_STATE_PATH','name','738DiojMd','resolvedEnv','VFXfU','source','24bjwLfW','baseUrlSource','authPath','Profile\x20\x22','rRkIh','startPath','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','25ijXing','\x20\x20Note:\x20--env\x20\x22','oEjkT','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','Idguy','PNpPv','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','4363163pdPJte','TTNMA','xXtPa','baseUrl','cloud','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','dmVbD','4720690AAVbIb','16404sJKHZk','UCBzK','telemetry','197336McPYXL','env','12IPTNXb','envBaseUrl','profile','Cloud\x20profile\x20(recommended)','qONvP','5035085zvsmNk','bdexJ','key','juSgp','cdpEndpoint'];_0x3573=function(){return _0x40731b;};return _0x3573();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2968f3=_0x59a9;(function(_0x24165e,_0x46e1c1){const _0x1c46ee=_0x59a9,_0x5b6240=_0x24165e();while(!![]){try{const _0x5498b2=-parseInt(_0x1c46ee(0xb2))/0x1*(-parseInt(_0x1c46ee(0xcb))/0x2)+parseInt(_0x1c46ee(0xc7))/0x3*(-parseInt(_0x1c46ee(0xbe))/0x4)+-parseInt(_0x1c46ee(0xc2))/0x5*(parseInt(_0x1c46ee(0xc0))/0x6)+-parseInt(_0x1c46ee(0xb7))/0x7+parseInt(_0x1c46ee(0xb3))/0x8*(parseInt(_0x1c46ee(0xb1))/0x9)+-parseInt(_0x1c46ee(0xd0))/0xa*(-parseInt(_0x1c46ee(0xc6))/0xb)+parseInt(_0x1c46ee(0xb0))/0xc;if(_0x5498b2===_0x46e1c1)break;else _0x5b6240['push'](_0x5b6240['shift']());}catch(_0x1d0bac){_0x5b6240['push'](_0x5b6240['shift']());}}}(_0x4a45,0x199ad));function firstDefined(..._0x49deee){const _0xf4a680=_0x59a9,_0xc96510={'ItVcJ':function(_0x387277,_0x606776){return _0x387277!==_0x606776;},'UzjBM':function(_0x4a6d4f,_0x9b0456){return _0x4a6d4f!==_0x9b0456;}};for(const _0x5bbcba of _0x49deee){if(_0xc96510[_0xf4a680(0xce)](_0x5bbcba,undefined)&&_0x5bbcba!==null&&_0xc96510['UzjBM'](_0x5bbcba,''))return _0x5bbcba;}return undefined;}function normalizeAuthEnvironmentDomain(_0x44fdb3){const _0x5224e0=_0x59a9;if(!_0x44fdb3)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x44fdb3))return _0x44fdb3;return _0x5224e0(0xc8)+_0x44fdb3;}export function resolveBaseUrlWithSource(_0x310bd4){const _0x4337b1=_0x59a9,_0xde18ea={'YYXtH':_0x4337b1(0xbb),'hCSdI':'--base-url','MkizV':'RANGER_BASE_URL','sYeHs':function(_0x74d177,_0x3adcc0){return _0x74d177===_0x3adcc0;},'mSVoK':_0x4337b1(0xc5),'rzHqe':function(_0x59e999,_0x3e1053){return _0x59e999(_0x3e1053);},'ksysi':_0x4337b1(0xca),'yrQpl':function(_0x33af34,_0xf8450e){return _0x33af34!==_0xf8450e;}},_0x4abe3f=_0x310bd4['projectOverrides'],_0x2fed95=!!_0x4abe3f&&_0xde18ea['YYXtH']in _0x4abe3f,_0x5c9155=_0x4abe3f?.['baseUrl'],_0x229714=!(_0x2fed95&&_0x5c9155===null),_0x35515d=[[_0x310bd4[_0x4337b1(0xc1)],_0xde18ea['hCSdI']],[_0x310bd4['envBaseUrl'],_0xde18ea['MkizV']],[_0x310bd4[_0x4337b1(0xc9)],_0x4337b1(0xb8)],[_0xde18ea['sYeHs'](typeof _0x5c9155,_0xde18ea['mSVoK'])?_0x5c9155:undefined,_0x4337b1(0xb9)],[_0x229714?_0x310bd4['cloudSettings']?.['baseUrl']:undefined,'cloud\x20profile\x20settings'],[_0x229714?_0xde18ea[_0x4337b1(0xcc)](normalizeAuthEnvironmentDomain,_0x310bd4['authEnvironmentDomain']):undefined,_0xde18ea[_0x4337b1(0xaf)]]];for(const [_0xa85903,_0x35b870]of _0x35515d){if(_0xde18ea['yrQpl'](_0xa85903,undefined)&&_0xde18ea[_0x4337b1(0xbc)](_0xa85903,null)&&_0xa85903!=='')return{'baseUrl':_0xa85903,'source':_0x35b870};}return{};}export function resolveBaseUrl(_0x5d0cef){const _0x35fbd9=_0x59a9,_0xde22b9={'mpDRw':function(_0x295ced,_0x5d271b){return _0x295ced(_0x5d271b);}};return _0xde22b9[_0x35fbd9(0xcf)](resolveBaseUrlWithSource,_0x5d0cef)['baseUrl'];}export function resolveStartPath(_0x27d6e8){const _0x29ac79=_0x59a9,_0x1eca6c={'yoDTi':function(_0x257c18,_0x73642e){return _0x257c18===_0x73642e;}},_0x87d3c0=_0x27d6e8['projectOverrides'],_0x4d4a4f=!!_0x87d3c0&&_0x29ac79(0xbd)in _0x87d3c0,_0x295420=_0x87d3c0?.['startPath'],_0x13d0a0=!(_0x4d4a4f&&_0x295420===null);return firstDefined(_0x27d6e8['flagStartPath'],_0x27d6e8[_0x29ac79(0xc3)],_0x1eca6c[_0x29ac79(0xb4)](typeof _0x295420,_0x29ac79(0xc5))?_0x295420:undefined,_0x13d0a0?_0x27d6e8[_0x29ac79(0xbf)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x17781c,_0x1a57ad){const _0x5a614e=_0x59a9,_0x2e555d={'rbbuF':function(_0x4a4126,_0x67cd48){return _0x4a4126+_0x67cd48;}};if(!_0x17781c)return undefined;if(!_0x1a57ad)return _0x17781c;const _0x57e96b=_0x17781c[_0x5a614e(0xb6)]('/')?_0x17781c[_0x5a614e(0xb5)](0x0,-0x1):_0x17781c,_0x474fb9=_0x1a57ad['startsWith']('/')?_0x1a57ad:_0x2e555d[_0x5a614e(0xcd)]('/',_0x1a57ad);return _0x57e96b+_0x474fb9;}function _0x59a9(_0x30f864,_0x115bf6){_0x30f864=_0x30f864-0xaf;const _0x4a4530=_0x4a45();let _0x59a9b9=_0x4a4530[_0x30f864];return _0x59a9b9;}function _0x4a45(){const _0x439f18=['local\x20profile\x20settings','projects.json\x20override','env','baseUrl','yrQpl','startPath','12BWQipY','cloudSettings','6CvNfYe','flagBaseUrl','1046315jnmrLT','envStartPath','hJGlE','string','1924285xVsfmQ','46737qRiAnh','https://','localSettingsBaseUrl','auth\x20environment\x20domain','2yZXXfr','rzHqe','rbbuF','ItVcJ','mpDRw','10kycmNs','ksysi','547260gXoFhm','198uuCsGl','52699JiCTgU','40472txuoie','yoDTi','slice','endsWith','165620jITPMf'];_0x4a45=function(){return _0x439f18;};return _0x4a45();}export function resolveProfileUrl(_0x273ee9){const _0xf72de1=_0x59a9,_0x26d638={'hJGlE':function(_0x46e337,_0x2ad878){return _0x46e337(_0x2ad878);}},{baseUrl:_0x5b7c26,source:_0x3a29be}=resolveBaseUrlWithSource(_0x273ee9),_0x45c0d6=_0x26d638[_0xf72de1(0xc4)](resolveStartPath,_0x273ee9);return{'baseUrl':_0x5b7c26,'baseUrlSource':_0x3a29be,'startPath':_0x45c0d6,'url':joinBaseAndPath(_0x5b7c26,_0x45c0d6)};}export function readUrlEnvVars(_0x52f92f=process[_0x2968f3(0xba)]){return{'envBaseUrl':_0x52f92f['RANGER_BASE_URL'],'envStartPath':_0x52f92f['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53ad00,_0x508fe8){const _0x67621b=_0x42f8,_0x241699=_0x53ad00();while(!![]){try{const _0x916fb=-parseInt(_0x67621b(0x162))/0x1*(parseInt(_0x67621b(0x163))/0x2)+parseInt(_0x67621b(0x16b))/0x3+-parseInt(_0x67621b(0x169))/0x4+-parseInt(_0x67621b(0x166))/0x5+-parseInt(_0x67621b(0x16a))/0x6+-parseInt(_0x67621b(0x16c))/0x7+-parseInt(_0x67621b(0x167))/0x8*(-parseInt(_0x67621b(0x164))/0x9);if(_0x916fb===_0x508fe8)break;else _0x241699['push'](_0x241699['shift']());}catch(_0x3982cc){_0x241699['push'](_0x241699['shift']());}}}(_0x2452,0x192a6));function _0x42f8(_0x4a9e7d,_0x3ae45b){_0x4a9e7d=_0x4a9e7d-0x15f;const _0x245284=_0x2452();let _0x42f86a=_0x245284[_0x4a9e7d];return _0x42f86a;}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x2452(){const _0x3964a4=['27wqBdtQ','xAIAV','101595nLoJcH','483832UGxyKW','maxRetries','619084aJSGGD','26028MJUxtP','320412XqDCgp','13510eaJaVm','kNrsr','label','\x20failed\x20(attempt\x20','error','tVyin','pow','3805QeFfEd','2uXxWeS'];_0x2452=function(){return _0x3964a4;};return _0x2452();}export async function withRetry(_0x4e15cc,_0x5f3584){const _0x51bef1=_0x42f8,_0x15efde={'xAIAV':function(_0x59b536){return _0x59b536();},'kNrsr':function(_0x18972f,_0x4ac76e){return _0x18972f instanceof _0x4ac76e;},'mGiOo':function(_0x32f681,_0x165643){return _0x32f681<_0x165643;},'tVyin':function(_0x210eb2,_0xbd2b80){return _0x210eb2*_0xbd2b80;},'PwcIq':function(_0x27481c,_0x240d46){return _0x27481c+_0x240d46;}},_0x5bf066=_0x5f3584?.[_0x51bef1(0x168)]??DEFAULT_MAX_RETRIES,_0x585efb=_0x5f3584?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x356ca1;for(let _0x331e5f=0x0;_0x331e5f<=_0x5bf066;_0x331e5f++){try{return await _0x15efde[_0x51bef1(0x165)](_0x4e15cc);}catch(_0x2e263b){_0x356ca1=_0x15efde[_0x51bef1(0x16d)](_0x2e263b,Error)?_0x2e263b:new Error(String(_0x2e263b));if(_0x15efde['mGiOo'](_0x331e5f,_0x5bf066)){const _0x4c2012=_0x15efde[_0x51bef1(0x160)](_0x585efb,Math[_0x51bef1(0x161)](0x2,_0x331e5f));_0x5f3584?.['label']&&console[_0x51bef1(0x15f)](_0x5f3584[_0x51bef1(0x16e)]+_0x51bef1(0x16f)+(_0x331e5f+0x1)+'/'+_0x15efde['PwcIq'](_0x5bf066,0x1)+'),\x20retrying\x20in\x20'+_0x4c2012+'ms...'),await new Promise(_0x3174c3=>setTimeout(_0x3174c3,_0x4c2012));}}}throw _0x356ca1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d1056,_0x2328a8){const _0x3b3baf=_0x54c2,_0x364ae8=_0x2d1056();while(!![]){try{const _0x1fcab6=-parseInt(_0x3b3baf(0x125))/0x1*(-parseInt(_0x3b3baf(0x123))/0x2)+parseInt(_0x3b3baf(0x129))/0x3+parseInt(_0x3b3baf(0x12e))/0x4*(parseInt(_0x3b3baf(0x12b))/0x5)+parseInt(_0x3b3baf(0x121))/0x6*(parseInt(_0x3b3baf(0x12d))/0x7)+parseInt(_0x3b3baf(0x122))/0x8*(-parseInt(_0x3b3baf(0x12c))/0x9)+-parseInt(_0x3b3baf(0x124))/0xa+-parseInt(_0x3b3baf(0x128))/0xb*(parseInt(_0x3b3baf(0x12a))/0xc);if(_0x1fcab6===_0x2328a8)break;else _0x364ae8['push'](_0x364ae8['shift']());}catch(_0x29559d){_0x364ae8['push'](_0x364ae8['shift']());}}}(_0x234b,0x7371b));function _0x234b(){const _0x1de4fd=['1619057QpsEPl','1607451zecpew','60xjdcXE','9050DewKYC','2263383cfbEKG','21ytwRbO','740eyUewv','origin','1216746PnSScU','16XfroTy','12202pTRBNj','4932910vphyFA','119sNTqBA','add','matchAll'];_0x234b=function(){return _0x1de4fd;};return _0x234b();}function _0x54c2(_0x18da8b,_0x319283){_0x18da8b=_0x18da8b-0x121;const _0x234b3b=_0x234b();let _0x54c2f7=_0x234b3b[_0x18da8b];return _0x54c2f7;}const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x5223cf){const _0x3ad47f=_0x54c2,_0x1cc68e=new Set();for(const _0x346e36 of _0x5223cf[_0x3ad47f(0x127)](ABSOLUTE_URL_PATTERN)){const _0x240118=_0x346e36[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x1cc68e[_0x3ad47f(0x126)](new URL(_0x240118)[_0x3ad47f(0x12f)]);}catch{}}return[..._0x1cc68e];}export function findScenarioOriginMismatches(_0x5ded3a,_0x5ddcb1){const _0x52ad4b=_0x54c2;let _0x12c6d4;try{_0x12c6d4=new URL(_0x5ddcb1)[_0x52ad4b(0x12f)];}catch{return[];}return extractUrlOrigins(_0x5ded3a)['filter'](_0x4ec489=>_0x4ec489!==_0x12c6d4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5b09(){const _0xff86d3=['lClHY','jOYhR','registeredAt','dirname','yiiee','now','yGzdx','6256DMSYGk','11265WvLukW','aLRFm','sessions','HELbL','branches','lastEnabledSessionClearedAt','dmVTc','EFcDd','parse','vpVbz','toISOString','pipe','existsSync','5168385lOZCsN','writeFileSync','clear','featureId','BneAO','currentBranch','24633RuwhdR','Bgdfj','bFXmG','534ruSvPj','ytsEy','tPXUd','1765996QuvWvK','main','GHVRt','fPSbt','HEAD','HLqzS','utf-8','402PsdzxQ','pLVTN','enabled','1854140sUlllq','xYllm','LhheT','prompted','11511360AhFJrb','8qiFKmS','homedir','readFileSync'];_0x5b09=function(){return _0xff86d3;};return _0x5b09();}const _0x3d7d5f=_0x1c4c;(function(_0x486e6c,_0x1f3e4c){const _0x3dd5e6=_0x1c4c,_0x14b78c=_0x486e6c();while(!![]){try{const _0x3ff234=parseInt(_0x3dd5e6(0xeb))/0x1+-parseInt(_0x3dd5e6(0xea))/0x2*(-parseInt(_0x3dd5e6(0x10b))/0x3)+parseInt(_0x3dd5e6(0x104))/0x4+parseInt(_0x3dd5e6(0xdb))/0x5+-parseInt(_0x3dd5e6(0x101))/0x6*(parseInt(_0x3dd5e6(0xfe))/0x7)+-parseInt(_0x3dd5e6(0xe0))/0x8*(-parseInt(_0x3dd5e6(0xf8))/0x9)+-parseInt(_0x3dd5e6(0xdf))/0xa;if(_0x3ff234===_0x1f3e4c)break;else _0x14b78c['push'](_0x14b78c['shift']());}catch(_0x35f1f9){_0x14b78c['push'](_0x14b78c['shift']());}}}(_0x5b09,0x561aa));import*as _0x232705 from'fs';import*as _0x214a08 from'path';import*as _0xa9fd06 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x214a08['join'](_0xa9fd06[_0x3d7d5f(0xe1)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x41e754=_0x3d7d5f,_0x2bcba1={'GnWVS':'utf-8'};try{if(_0x232705[_0x41e754(0xf7)](CACHE_FILE)){const _0x4a223b=JSON[_0x41e754(0xf3)](_0x232705[_0x41e754(0xe2)](CACHE_FILE,_0x2bcba1['GnWVS']));return{'version':0x3,'sessions':_0x4a223b[_0x41e754(0xed)]||{},'branches':_0x4a223b[_0x41e754(0xef)]||{},'lastEnabledSessionClearedAt':_0x4a223b[_0x41e754(0xf0)]};}}catch{}return createEmptyCache();}function saveCache(_0x740483){const _0x5731ba=_0x3d7d5f;try{const _0x1333fe=_0x214a08[_0x5731ba(0xe6)](CACHE_FILE);!_0x232705[_0x5731ba(0xf7)](_0x1333fe)&&_0x232705['mkdirSync'](_0x1333fe,{'recursive':!![]}),_0x232705[_0x5731ba(0xf9)](CACHE_FILE,JSON['stringify'](_0x740483,null,0x2));}catch{}}export function getCurrentBranch(){const _0x334546=_0x3d7d5f,_0x537da3={'LhheT':function(_0x5d52ce,_0x197aeb,_0x4067eb){return _0x5d52ce(_0x197aeb,_0x4067eb);},'ytsEy':_0x334546(0x10a),'qptYw':_0x334546(0xf6),'pLVTN':_0x334546(0x108)};try{const _0x29c461=_0x537da3[_0x334546(0xdd)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x537da3[_0x334546(0x102)],'stdio':['pipe',_0x537da3['qptYw'],_0x537da3['qptYw']]})['trim']();if(!_0x29c461||_0x29c461===_0x537da3[_0x334546(0x10c)])return null;return _0x29c461;}catch{return null;}}export function enableBranch(_0x51df14){const _0x44d70d=_0x3d7d5f,_0x30b7b4={'ksRSc':function(_0x11b40a){return _0x11b40a();}},_0x2efbfd=_0x30b7b4['ksRSc'](loadCache);_0x2efbfd[_0x44d70d(0xef)][_0x51df14]=!![],saveCache(_0x2efbfd);}export function disableBranch(_0x4dddd4){const _0x3321e6=_0x3d7d5f,_0x40361={'UiAyZ':function(_0x17c5b3,_0x327bdf){return _0x17c5b3(_0x327bdf);}},_0x49ff8c=loadCache();delete _0x49ff8c[_0x3321e6(0xef)][_0x4dddd4],_0x40361['UiAyZ'](saveCache,_0x49ff8c);}export function isBranchEnabled(_0x562d7e){const _0x33ba44=_0x3d7d5f,_0x1e7c5f={'HELbL':function(_0xe290c9){return _0xe290c9();}},_0x127bb4=_0x1e7c5f[_0x33ba44(0xee)](loadCache);return _0x127bb4[_0x33ba44(0xef)][_0x562d7e]===!![];}function getOrCreateSession(_0x538a93,_0x107195){const _0x61772d=_0x3d7d5f;return!_0x538a93['sessions'][_0x107195]&&(_0x538a93['sessions'][_0x107195]={}),_0x538a93[_0x61772d(0xed)][_0x107195];}export function enableSession(_0x42f097){const _0x2a1e1e=_0x3d7d5f,_0x3a13ec={'jOYhR':function(_0xfb9738){return _0xfb9738();},'gNmpF':function(_0x306464,_0x52dc08,_0x245f96){return _0x306464(_0x52dc08,_0x245f96);},'HJBub':function(_0x7af027){return _0x7af027();},'yGzdx':function(_0x492073,_0x466de9){return _0x492073!==_0x466de9;},'vpVbz':'master'},_0x36714f=_0x3a13ec[_0x2a1e1e(0xe4)](loadCache),_0x209851=_0x3a13ec['gNmpF'](getOrCreateSession,_0x36714f,_0x42f097);_0x209851['enabled']=!![];const _0x2be0e2=_0x3a13ec['HJBub'](getCurrentBranch);_0x2be0e2&&_0x3a13ec[_0x2a1e1e(0xe9)](_0x2be0e2,_0x2a1e1e(0x105))&&_0x2be0e2!==_0x3a13ec[_0x2a1e1e(0xf4)]&&(_0x36714f['branches'][_0x2be0e2]=!![],_0x209851['currentBranch']=_0x2be0e2),saveCache(_0x36714f);}export function isSessionEnabled(_0x30c2aa){const _0x30fc63=_0x3d7d5f,_0x2539a2={'NdGcp':function(_0x261218){return _0x261218();},'bFXmG':function(_0x1f44bd,_0x51f6ed){return _0x1f44bd===_0x51f6ed;},'fPSbt':function(_0x1f43d1,_0x2ccbbb){return _0x1f43d1===_0x2ccbbb;},'EFcDd':'master'},_0x469354=_0x2539a2['NdGcp'](loadCache),_0x317120=getCurrentBranch();if(!_0x317120||_0x2539a2[_0x30fc63(0x100)](_0x317120,'main')||_0x2539a2[_0x30fc63(0x107)](_0x317120,_0x2539a2[_0x30fc63(0xf2)]))return _0x469354[_0x30fc63(0xed)][_0x30c2aa]?.['enabled']===!![];const _0x4cec79=_0x469354['branches'][_0x317120]===!![],_0x8ea6a2=_0x469354[_0x30fc63(0xed)][_0x30c2aa]?.['enabled']===!![];return _0x4cec79||_0x8ea6a2;}export function disableSession(_0xacfb72){const _0x54796a={'xMTSL':function(_0x8cd0c0,_0xa41096,_0x464923){return _0x8cd0c0(_0xa41096,_0x464923);}},_0x442e03=loadCache(),_0x5b6a48=_0x54796a['xMTSL'](getOrCreateSession,_0x442e03,_0xacfb72);_0x5b6a48['enabled']=![],saveCache(_0x442e03);}export function updateBranchTracking(_0x12219e){const _0x143b47=_0x3d7d5f,_0x43da31={'dmVTc':function(_0x38f393){return _0x38f393();},'BneAO':'master','OYkTh':function(_0x5c4283,_0x51190a){return _0x5c4283!==_0x51190a;},'KbIyw':function(_0x3b50fd,_0x49a93a){return _0x3b50fd(_0x49a93a);}},_0x178949=_0x43da31[_0x143b47(0xf1)](loadCache),_0x463417=_0x178949['sessions'][_0x12219e];if(!_0x463417?.[_0x143b47(0x10d)])return;const _0x20a217=_0x43da31['dmVTc'](getCurrentBranch);if(!_0x20a217||_0x20a217===_0x143b47(0x105)||_0x20a217===_0x43da31[_0x143b47(0xfc)])return;_0x43da31['OYkTh'](_0x463417[_0x143b47(0xfd)],_0x20a217)&&(_0x178949[_0x143b47(0xef)][_0x20a217]=!![],_0x463417[_0x143b47(0xfd)]=_0x20a217,_0x43da31['KbIyw'](saveCache,_0x178949));}export function initBranchTracking(_0xa85fe8){const _0x53b81d=_0x3d7d5f,_0x590b08={'xIAnQ':function(_0x37d815,_0x20ac57){return _0x37d815===_0x20ac57;},'GHVRt':'master','HLqzS':function(_0x24f528,_0x2798aa,_0x2efea0){return _0x24f528(_0x2798aa,_0x2efea0);}},_0x25d908=loadCache(),_0x4ac8fe=getCurrentBranch();if(!_0x4ac8fe||_0x4ac8fe==='main'||_0x590b08['xIAnQ'](_0x4ac8fe,_0x590b08[_0x53b81d(0x106)]))return;if(_0x25d908[_0x53b81d(0xef)][_0x4ac8fe]===!![]){const _0x297f84=_0x590b08[_0x53b81d(0x109)](getOrCreateSession,_0x25d908,_0xa85fe8);_0x297f84[_0x53b81d(0x10d)]=!![],_0x297f84[_0x53b81d(0xfd)]=_0x4ac8fe,saveCache(_0x25d908);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x18438a){const _0x4e8985=_0x3d7d5f,_0x57d674=loadCache(),_0x51a219=_0x57d674['sessions'][_0x18438a];_0x51a219?.[_0x4e8985(0x10d)]&&(_0x57d674[_0x4e8985(0xf0)]=Date['now'](),saveCache(_0x57d674));}export function shouldAutoEnableAfterClear(_0xe37f1a){const _0x184793=_0x3d7d5f,_0x2e5d93={'DnxZy':function(_0x4ccc3d,_0xc38afd){return _0x4ccc3d!==_0xc38afd;},'hwDGU':_0x184793(0xfa),'Ykzcq':function(_0x23bf09,_0x3fdcf5){return _0x23bf09-_0x3fdcf5;}};if(_0x2e5d93['DnxZy'](_0xe37f1a,_0x2e5d93['hwDGU']))return![];const _0x30d3af=loadCache(),_0x4b618c=_0x30d3af['lastEnabledSessionClearedAt'];if(!_0x4b618c)return![];const _0x42ecdd=_0x2e5d93['Ykzcq'](Date[_0x184793(0xe8)](),_0x4b618c);return _0x42ecdd<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x24e83b){const _0x4f16e6=_0x3d7d5f,_0x3aef03={'xYllm':function(_0x2f8729,_0x57ea18,_0x513c1a){return _0x2f8729(_0x57ea18,_0x513c1a);},'yiiee':function(_0x357d19){return _0x357d19();},'LZKXr':'main','aLRFm':function(_0x258dcd,_0x4f4731){return _0x258dcd!==_0x4f4731;},'DPJdB':function(_0x2ec667,_0x55b908){return _0x2ec667(_0x55b908);}},_0x1af5a1=loadCache(),_0x518da8=_0x3aef03[_0x4f16e6(0xdc)](getOrCreateSession,_0x1af5a1,_0x24e83b);_0x518da8[_0x4f16e6(0x10d)]=!![];const _0x124d7b=_0x3aef03[_0x4f16e6(0xe7)](getCurrentBranch);_0x124d7b&&_0x124d7b!==_0x3aef03['LZKXr']&&_0x3aef03[_0x4f16e6(0xec)](_0x124d7b,'master')&&(_0x518da8['currentBranch']=_0x124d7b),delete _0x1af5a1[_0x4f16e6(0xf0)],_0x3aef03['DPJdB'](saveCache,_0x1af5a1);}export function registerSession(_0x24a6eb,_0xc61c6b){const _0x2e81d5=_0x3d7d5f,_0x480d8b={'jacAt':function(_0x26c505){return _0x26c505();}},_0x23e18c=_0x480d8b['jacAt'](loadCache),_0x4ad51e=getOrCreateSession(_0x23e18c,_0x24a6eb);_0x4ad51e['featureId']=_0xc61c6b,_0x4ad51e[_0x2e81d5(0xe5)]=new Date()[_0x2e81d5(0xf5)](),saveCache(_0x23e18c);}export function getSessionEntry(_0x11e475){const _0x4bd354=_0x3d7d5f,_0xfe19a9={'UjvAu':function(_0x291793){return _0x291793();}},_0x58dbc4=_0xfe19a9['UjvAu'](loadCache),_0x2d4a01=_0x58dbc4['sessions'][_0x11e475];if(_0x2d4a01?.['featureId']&&_0x2d4a01?.['registeredAt'])return{'featureId':_0x2d4a01[_0x4bd354(0xfb)],'registeredAt':_0x2d4a01['registeredAt']};return null;}function _0x1c4c(_0x566323,_0x1d5d4a){_0x566323=_0x566323-0xdb;const _0x5b0963=_0x5b09();let _0x1c4c9f=_0x5b0963[_0x566323];return _0x1c4c9f;}export function unregisterSession(_0x2ef2f5){const _0x19f553=_0x3d7d5f,_0x33857e={'Bgdfj':function(_0x260d78){return _0x260d78();},'hDSIR':function(_0x4a22e7,_0xfe5139){return _0x4a22e7(_0xfe5139);}},_0x1a9242=_0x33857e[_0x19f553(0xff)](loadCache),_0x1d64b6=_0x1a9242[_0x19f553(0xed)][_0x2ef2f5];_0x1d64b6&&(delete _0x1d64b6['featureId'],delete _0x1d64b6['registeredAt'],_0x33857e['hDSIR'](saveCache,_0x1a9242));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x5bd999){const _0x41d5b2=_0x3d7d5f,_0x4b8f26={'tPXUd':function(_0x443cb7){return _0x443cb7();},'DZGZJ':function(_0x41883a,_0x3e62a9,_0x3f9b0d){return _0x41883a(_0x3e62a9,_0x3f9b0d);},'DqTLJ':function(_0x224005,_0x54a417){return _0x224005>=_0x54a417;},'YUXEK':function(_0x127558,_0x52dca9){return _0x127558(_0x52dca9);}},_0x509342=_0x4b8f26[_0x41d5b2(0x103)](loadCache),_0x2e52de=_0x4b8f26['DZGZJ'](getOrCreateSession,_0x509342,_0x5bd999),_0x37d93a=_0x2e52de['lastPlanReminderAt']||0x0,_0xb08096=Date['now']();if(_0x4b8f26['DqTLJ'](_0xb08096-_0x37d93a,PLAN_REMINDER_INTERVAL_MS))return _0x2e52de['lastPlanReminderAt']=_0xb08096,_0x4b8f26['YUXEK'](saveCache,_0x509342),!![];return![];}export function shouldShowStopReminder(_0x383006){const _0x150c48=loadCache(),_0x258dc6=getOrCreateSession(_0x150c48,_0x383006),_0x468dbf=_0x258dc6['lastStopReminderAt']||0x0,_0x307f27=Date['now']();if(_0x307f27-_0x468dbf>=STOP_REMINDER_INTERVAL_MS)return _0x258dc6['lastStopReminderAt']=_0x307f27,saveCache(_0x150c48),!![];return![];}export function hasSessionBeenPrompted(_0x10860c){const _0x3516bd=loadCache();return _0x3516bd['sessions'][_0x10860c]?.['prompted']===!![];}export function markSessionPrompted(_0x1b7e40){const _0x423aba=_0x3d7d5f,_0x24c4aa={'ybNbh':function(_0x12c1d2,_0x5995a9,_0x42222a){return _0x12c1d2(_0x5995a9,_0x42222a);},'lClHY':function(_0x3d9bd6,_0x2e8f14){return _0x3d9bd6(_0x2e8f14);}},_0x4b19fb=loadCache(),_0x1aaf5b=_0x24c4aa['ybNbh'](getOrCreateSession,_0x4b19fb,_0x1b7e40);_0x1aaf5b[_0x423aba(0xde)]=!![],_0x24c4aa[_0x423aba(0xe3)](saveCache,_0x4b19fb);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x22168b=_0x41f5;(function(_0x2d3902,_0x5a7392){const _0x294bd8=_0x41f5,_0x5d31ee=_0x2d3902();while(!![]){try{const _0x2ec2dc=parseInt(_0x294bd8(0x1a5))/0x1+-parseInt(_0x294bd8(0x19d))/0x2*(parseInt(_0x294bd8(0x18f))/0x3)+parseInt(_0x294bd8(0x1a7))/0x4+parseInt(_0x294bd8(0x1b0))/0x5*(-parseInt(_0x294bd8(0x19b))/0x6)+parseInt(_0x294bd8(0x1aa))/0x7+parseInt(_0x294bd8(0x19e))/0x8+-parseInt(_0x294bd8(0x187))/0x9;if(_0x2ec2dc===_0x5a7392)break;else _0x5d31ee['push'](_0x5d31ee['shift']());}catch(_0x322c42){_0x5d31ee['push'](_0x5d31ee['shift']());}}}(_0x2991,0xe77db));import*as _0x56e161 from'fs';import*as _0x58803e from'path';import*as _0x505bbb from'os';import{execSync}from'child_process';const CACHE_FILE=_0x58803e[_0x22168b(0x18a)](_0x505bbb[_0x22168b(0x18e)](),'.claude',_0x22168b(0x1a3));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0xd70fa9=_0x22168b,_0x4decdc={'OVrvx':'utf-8','QjSnK':function(_0x422a17){return _0x422a17();}};try{if(_0x56e161[_0xd70fa9(0x17f)](CACHE_FILE)){const _0x49ba40=JSON['parse'](_0x56e161['readFileSync'](CACHE_FILE,_0x4decdc[_0xd70fa9(0x18b)]));return{'version':0x3,'sessions':_0x49ba40['sessions']||{},'branches':_0x49ba40['branches']||{},'lastEnabledSessionClearedAt':_0x49ba40['lastEnabledSessionClearedAt']};}}catch{}return _0x4decdc[_0xd70fa9(0x1ac)](createEmptyCache);}function saveCache(_0x479f06){const _0x47304b=_0x22168b;try{const _0x3aa6e4=_0x58803e[_0x47304b(0x185)](CACHE_FILE);!_0x56e161['existsSync'](_0x3aa6e4)&&_0x56e161[_0x47304b(0x17e)](_0x3aa6e4,{'recursive':!![]}),_0x56e161[_0x47304b(0x1ad)](CACHE_FILE,JSON['stringify'](_0x479f06,null,0x2));}catch{}}export function getCurrentBranch(){const _0x9e4b40=_0x22168b,_0x4a3f90={'iEoIe':'utf-8','IdoPB':'pipe'};try{const _0xd88be0=execSync(_0x9e4b40(0x1a0),{'encoding':_0x4a3f90[_0x9e4b40(0x1af)],'stdio':[_0x4a3f90['IdoPB'],'pipe','pipe']})['trim']();if(!_0xd88be0||_0xd88be0===_0x9e4b40(0x188))return null;return _0xd88be0;}catch{return null;}}export function enableBranch(_0xbfbf15){const _0x1ebf28=_0x22168b,_0x24fc56={'Yjxep':function(_0x130cfb,_0xc1f94b){return _0x130cfb(_0xc1f94b);}},_0x5ba449=loadCache();_0x5ba449['branches'][_0xbfbf15]=!![],_0x24fc56[_0x1ebf28(0x197)](saveCache,_0x5ba449);}function _0x2991(){const _0x2afa35=['hEnCk','bXYBp','wEOsw','clear','QvkIt','dirname','pbZOM','1327185dWjXTZ','HEAD','TViEs','join','OVrvx','lastEnabledSessionClearedAt','Dnwjj','homedir','3rlHdLR','now','registeredAt','enabled','currentBranch','prompted','uIckV','featureId','Yjxep','CLttm','jcBdU','xpOHp','90ilFveV','sessions','1339436BLlqXV','6174768PrkeDC','nHOgJ','git\x20rev-parse\x20--abbrev-ref\x20HEAD','lastStopReminderAt','master','.ranger_cache.json','pOddx','700722iaWOkh','lPpsC','3810644lTGNjT','LxZPJ','branches','8304072TzDxRa','ZifRV','QjSnK','writeFileSync','IVoZn','iEoIe','615385vYYAVW','OqlTF','SNnQO','LgaKN','sVrXq','main','mkdirSync','existsSync'];_0x2991=function(){return _0x2afa35;};return _0x2991();}export function disableBranch(_0xbf76bf){const _0x32ea1b=_0x22168b,_0xec5f9f=loadCache();delete _0xec5f9f[_0x32ea1b(0x1a9)][_0xbf76bf],saveCache(_0xec5f9f);}export function isBranchEnabled(_0x2b928b){const _0x15cd0d=_0x22168b,_0x11b431={'OhkEq':function(_0x39a584){return _0x39a584();}},_0x414303=_0x11b431['OhkEq'](loadCache);return _0x414303[_0x15cd0d(0x1a9)][_0x2b928b]===!![];}function getOrCreateSession(_0xa1ffde,_0x5f079a){const _0x5e6c93=_0x22168b;return!_0xa1ffde['sessions'][_0x5f079a]&&(_0xa1ffde[_0x5e6c93(0x19c)][_0x5f079a]={}),_0xa1ffde['sessions'][_0x5f079a];}export function enableSession(_0x383ca3){const _0x2872dc=_0x22168b,_0x2842c7={'LgaKN':function(_0x5f37d3){return _0x5f37d3();},'jRlcR':function(_0x475964,_0x1498e9,_0x52bd6b){return _0x475964(_0x1498e9,_0x52bd6b);},'sVrXq':function(_0x35aab5,_0x147449){return _0x35aab5(_0x147449);}},_0x52fbbf=_0x2842c7[_0x2872dc(0x17b)](loadCache),_0x1edbd2=_0x2842c7['jRlcR'](getOrCreateSession,_0x52fbbf,_0x383ca3);_0x1edbd2[_0x2872dc(0x192)]=!![];const _0x2e42f7=getCurrentBranch();_0x2e42f7&&_0x2e42f7!==_0x2872dc(0x17d)&&_0x2e42f7!=='master'&&(_0x52fbbf[_0x2872dc(0x1a9)][_0x2e42f7]=!![],_0x1edbd2[_0x2872dc(0x193)]=_0x2e42f7),_0x2842c7[_0x2872dc(0x17c)](saveCache,_0x52fbbf);}export function isSessionEnabled(_0x524695){const _0x1ce5a4=_0x22168b,_0x471694={'OqlTF':'main','hEnCk':_0x1ce5a4(0x1a2),'SNnQO':function(_0x481c69,_0x4241b1){return _0x481c69===_0x4241b1;},'iHOoZ':function(_0x2e6af3,_0x5b2dca){return _0x2e6af3===_0x5b2dca;}},_0xe5cd00=loadCache(),_0x47aa9b=getCurrentBranch();if(!_0x47aa9b||_0x47aa9b===_0x471694[_0x1ce5a4(0x1b1)]||_0x47aa9b===_0x471694[_0x1ce5a4(0x180)])return _0x471694['SNnQO'](_0xe5cd00[_0x1ce5a4(0x19c)][_0x524695]?.[_0x1ce5a4(0x192)],!![]);const _0xca57e1=_0x471694[_0x1ce5a4(0x17a)](_0xe5cd00[_0x1ce5a4(0x1a9)][_0x47aa9b],!![]),_0x1ef4d5=_0x471694['iHOoZ'](_0xe5cd00['sessions'][_0x524695]?.['enabled'],!![]);return _0xca57e1||_0x1ef4d5;}export function disableSession(_0x45c629){const _0x53f775=_0x22168b,_0x5919ca={'IVoZn':function(_0x413458,_0x2b2a53,_0x235ab8){return _0x413458(_0x2b2a53,_0x235ab8);},'pOddx':function(_0x5689d3,_0x3cab52){return _0x5689d3(_0x3cab52);}},_0x177876=loadCache(),_0xcc597c=_0x5919ca[_0x53f775(0x1ae)](getOrCreateSession,_0x177876,_0x45c629);_0xcc597c[_0x53f775(0x192)]=![],_0x5919ca[_0x53f775(0x1a4)](saveCache,_0x177876);}export function updateBranchTracking(_0x16a2b7){const _0x5086b6=_0x22168b,_0x33126d={'wxeFZ':function(_0x3a2e17){return _0x3a2e17();},'lPpsC':_0x5086b6(0x17d)},_0x48d833=loadCache(),_0x42b8d8=_0x48d833[_0x5086b6(0x19c)][_0x16a2b7];if(!_0x42b8d8?.[_0x5086b6(0x192)])return;const _0x17039d=_0x33126d['wxeFZ'](getCurrentBranch);if(!_0x17039d||_0x17039d===_0x33126d[_0x5086b6(0x1a6)]||_0x17039d===_0x5086b6(0x1a2))return;_0x42b8d8['currentBranch']!==_0x17039d&&(_0x48d833[_0x5086b6(0x1a9)][_0x17039d]=!![],_0x42b8d8[_0x5086b6(0x193)]=_0x17039d,saveCache(_0x48d833));}export function initBranchTracking(_0x2a45d0){const _0x1dedd8=_0x22168b,_0x5b2bfb={'bXYBp':function(_0x24dd47){return _0x24dd47();},'ZifRV':function(_0x5e30ba,_0x336717){return _0x5e30ba===_0x336717;},'JlQux':_0x1dedd8(0x17d),'DIzBQ':_0x1dedd8(0x1a2),'TViEs':function(_0x2c17e6,_0x30613e){return _0x2c17e6(_0x30613e);}},_0x3a8bd9=_0x5b2bfb[_0x1dedd8(0x181)](loadCache),_0x201be1=getCurrentBranch();if(!_0x201be1||_0x5b2bfb[_0x1dedd8(0x1ab)](_0x201be1,_0x5b2bfb['JlQux'])||_0x201be1===_0x5b2bfb['DIzBQ'])return;if(_0x3a8bd9[_0x1dedd8(0x1a9)][_0x201be1]===!![]){const _0x3b2da2=getOrCreateSession(_0x3a8bd9,_0x2a45d0);_0x3b2da2[_0x1dedd8(0x192)]=!![],_0x3b2da2['currentBranch']=_0x201be1,_0x5b2bfb[_0x1dedd8(0x189)](saveCache,_0x3a8bd9);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x41f5(_0x258f49,_0x473642){_0x258f49=_0x258f49-0x17a;const _0x299147=_0x2991();let _0x41f591=_0x299147[_0x258f49];return _0x41f591;}export function recordEnabledSessionCleared(_0x19d316){const _0x13d08f=_0x22168b,_0x1c9a6f=loadCache(),_0x5356c3=_0x1c9a6f['sessions'][_0x19d316];_0x5356c3?.[_0x13d08f(0x192)]&&(_0x1c9a6f[_0x13d08f(0x18c)]=Date['now'](),saveCache(_0x1c9a6f));}export function shouldAutoEnableAfterClear(_0x3aba1d){const _0x207229=_0x22168b,_0x5d5674={'pbZOM':function(_0x51bdd7){return _0x51bdd7();},'QvkIt':function(_0x161755,_0x580ccb){return _0x161755-_0x580ccb;},'jcBdU':function(_0x4823bc,_0x1fe719){return _0x4823bc<=_0x1fe719;}};if(_0x3aba1d!==_0x207229(0x183))return![];const _0x4822c7=_0x5d5674[_0x207229(0x186)](loadCache),_0x59895e=_0x4822c7['lastEnabledSessionClearedAt'];if(!_0x59895e)return![];const _0x54ba92=_0x5d5674[_0x207229(0x184)](Date[_0x207229(0x190)](),_0x59895e);return _0x5d5674[_0x207229(0x199)](_0x54ba92,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x2372b9){const _0x20a21a=_0x22168b,_0x43cd58={'Dnwjj':function(_0x4d1357){return _0x4d1357();},'nHOgJ':_0x20a21a(0x17d),'LxZPJ':function(_0x384464,_0x41881b){return _0x384464!==_0x41881b;}},_0x220414=_0x43cd58[_0x20a21a(0x18d)](loadCache),_0xc04c86=getOrCreateSession(_0x220414,_0x2372b9);_0xc04c86['enabled']=!![];const _0x465894=getCurrentBranch();_0x465894&&_0x465894!==_0x43cd58[_0x20a21a(0x19f)]&&_0x43cd58[_0x20a21a(0x1a8)](_0x465894,'master')&&(_0xc04c86['currentBranch']=_0x465894),delete _0x220414['lastEnabledSessionClearedAt'],saveCache(_0x220414);}export function registerSession(_0x2d8d53,_0x4ba3fe){const _0x1a3818=_0x22168b,_0xad596f={'CLttm':function(_0x4884be,_0x5c693c,_0xdf4afa){return _0x4884be(_0x5c693c,_0xdf4afa);},'CtPKn':function(_0x2b1b9d,_0x91f1ee){return _0x2b1b9d(_0x91f1ee);}},_0x35b658=loadCache(),_0x8f82d=_0xad596f[_0x1a3818(0x198)](getOrCreateSession,_0x35b658,_0x2d8d53);_0x8f82d['featureId']=_0x4ba3fe,_0x8f82d[_0x1a3818(0x191)]=new Date()['toISOString'](),_0xad596f['CtPKn'](saveCache,_0x35b658);}export function getSessionEntry(_0x315cb1){const _0x15cd62=_0x22168b,_0x41e131=loadCache(),_0x5efe0b=_0x41e131[_0x15cd62(0x19c)][_0x315cb1];if(_0x5efe0b?.[_0x15cd62(0x196)]&&_0x5efe0b?.[_0x15cd62(0x191)])return{'featureId':_0x5efe0b[_0x15cd62(0x196)],'registeredAt':_0x5efe0b['registeredAt']};return null;}export function unregisterSession(_0x14cda7){const _0x521dbe=_0x22168b,_0x14a763=loadCache(),_0x3e1f7e=_0x14a763[_0x521dbe(0x19c)][_0x14cda7];_0x3e1f7e&&(delete _0x3e1f7e['featureId'],delete _0x3e1f7e[_0x521dbe(0x191)],saveCache(_0x14a763));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x492a10){const _0xcd6f12=_0x22168b,_0x2bc9c1={'jBGMF':function(_0x427440,_0x5dbb20){return _0x427440-_0x5dbb20;},'aELlw':function(_0x4878e1,_0x248b30){return _0x4878e1(_0x248b30);}},_0x216b45=loadCache(),_0x14dd04=getOrCreateSession(_0x216b45,_0x492a10),_0x2f5b04=_0x14dd04['lastPlanReminderAt']||0x0,_0x287d10=Date[_0xcd6f12(0x190)]();if(_0x2bc9c1['jBGMF'](_0x287d10,_0x2f5b04)>=PLAN_REMINDER_INTERVAL_MS)return _0x14dd04['lastPlanReminderAt']=_0x287d10,_0x2bc9c1['aELlw'](saveCache,_0x216b45),!![];return![];}export function shouldShowStopReminder(_0x866244){const _0x57af2a=_0x22168b,_0x214dbd={'wEOsw':function(_0x18bafc){return _0x18bafc();},'PEVUz':function(_0x1d72d8,_0xd8c892,_0x260be4){return _0x1d72d8(_0xd8c892,_0x260be4);},'uIckV':function(_0x190995,_0x2a1be6){return _0x190995-_0x2a1be6;},'xpOHp':function(_0x105c61,_0x4e6734){return _0x105c61(_0x4e6734);}},_0x2fa73a=_0x214dbd[_0x57af2a(0x182)](loadCache),_0x50199f=_0x214dbd['PEVUz'](getOrCreateSession,_0x2fa73a,_0x866244),_0x2b7e50=_0x50199f[_0x57af2a(0x1a1)]||0x0,_0x586ea5=Date[_0x57af2a(0x190)]();if(_0x214dbd[_0x57af2a(0x195)](_0x586ea5,_0x2b7e50)>=STOP_REMINDER_INTERVAL_MS)return _0x50199f[_0x57af2a(0x1a1)]=_0x586ea5,_0x214dbd[_0x57af2a(0x19a)](saveCache,_0x2fa73a),!![];return![];}export function hasSessionBeenPrompted(_0x497b46){const _0x14bfc3=_0x22168b,_0x480d96={'VKfaK':function(_0x44140f){return _0x44140f();},'zYHAY':function(_0x15a544,_0x1d93df){return _0x15a544===_0x1d93df;}},_0x5f20eb=_0x480d96['VKfaK'](loadCache);return _0x480d96['zYHAY'](_0x5f20eb['sessions'][_0x497b46]?.[_0x14bfc3(0x194)],!![]);}export function markSessionPrompted(_0x4d825b){const _0x3e50a9=_0x22168b,_0x39051d=loadCache(),_0x494904=getOrCreateSession(_0x39051d,_0x4d825b);_0x494904[_0x3e50a9(0x194)]=!![],saveCache(_0x39051d);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x33543a=_0x5069;(function(_0x3fce1c,_0x465192){const _0x160789=_0x5069,_0x3a4b62=_0x3fce1c();while(!![]){try{const _0x56a3f9=-parseInt(_0x160789(0x1a4))/0x1*(-parseInt(_0x160789(0x1a8))/0x2)+parseInt(_0x160789(0x1e6))/0x3*(-parseInt(_0x160789(0x1d7))/0x4)+-parseInt(_0x160789(0x1f8))/0x5+parseInt(_0x160789(0x1f4))/0x6*(parseInt(_0x160789(0x20e))/0x7)+-parseInt(_0x160789(0x1d0))/0x8*(parseInt(_0x160789(0x1e8))/0x9)+parseInt(_0x160789(0x1af))/0xa*(parseInt(_0x160789(0x21f))/0xb)+parseInt(_0x160789(0x1a1))/0xc;if(_0x56a3f9===_0x465192)break;else _0x3a4b62['push'](_0x3a4b62['shift']());}catch(_0x69dac2){_0x3a4b62['push'](_0x3a4b62['shift']());}}}(_0x4b62,0xf3d60));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x5069(_0x5cea6d,_0x5e34c0){_0x5cea6d=_0x5cea6d-0x19d;const _0x4b62f5=_0x4b62();let _0x50697b=_0x4b62f5[_0x5cea6d];return _0x50697b;}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(_0x918caa,_0x4a52f5){const _0x23a3da=_0x5069,_0x4e2a73={'CAbsg':function(_0x38e107,_0x321f5c,_0x5b4ac8,_0x537d51){return _0x38e107(_0x321f5c,_0x5b4ac8,_0x537d51);},'mFDEa':function(_0x37b66a,_0x4191a4,_0x2a291b){return _0x37b66a(_0x4191a4,_0x2a291b);},'NdlOz':_0x23a3da(0x222),'IBfIv':function(_0x3dde79,_0x54ac52,_0x961c44){return _0x3dde79(_0x54ac52,_0x961c44);},'nxfeb':function(_0x1182fe,_0x52f95e){return _0x1182fe(_0x52f95e);},'oXzKH':function(_0x5ce050,_0x31e745){return _0x5ce050(_0x31e745);},'xGdhK':function(_0x19622a,_0x453742){return _0x19622a!==_0x453742;},'DdMGP':function(_0x3d1edb,_0x21299a){return _0x3d1edb(_0x21299a);}},_0x5975cf=_0x4e2a73[_0x23a3da(0x1bc)](join,_0x4a52f5,'ci',_0x918caa),_0x42196b=join(_0x4a52f5,_0x23a3da(0x222),_0x918caa),_0x16c054=join(_0x4a52f5,_0x918caa),_0x18d53a=_0x4e2a73[_0x23a3da(0x213)](join,_0x4a52f5,_0x4e2a73['NdlOz']),_0x53d69e=_0x4e2a73['IBfIv'](join,_0x4a52f5,'ci');if(existsSync(_0x5975cf))return _0x5975cf;if(_0x4e2a73[_0x23a3da(0x216)](existsSync,_0x42196b))return _0x42196b;if(_0x4e2a73['oXzKH'](existsSync,_0x16c054)&&(_0x16c054!==_0x18d53a&&_0x4e2a73['xGdhK'](_0x16c054,_0x53d69e)?!![]:_0x4e2a73[_0x23a3da(0x1fd)](hasLegacyProfileFiles,_0x16c054)))return _0x16c054;return null;}export function getEnvDir(_0x71fe70,_0x402580={}){const _0x4387d8=_0x5069,_0x5751e6={'rnucv':function(_0x41028f){return _0x41028f();},'slAwH':function(_0x3cc01d,_0xc911a6,_0x57b8ab){return _0x3cc01d(_0xc911a6,_0x57b8ab);},'vYsiv':function(_0x26917a,_0x2dac71){return _0x26917a(_0x2dac71);},'sNzpl':function(_0x84c4ec,_0x379002,_0x3097eb){return _0x84c4ec(_0x379002,_0x3097eb);},'hQLUP':function(_0x53ff9d,_0x5ba7c4,_0x57b527,_0x50a5e7){return _0x53ff9d(_0x5ba7c4,_0x57b527,_0x50a5e7);},'UgkdE':function(_0x13f256,_0x2e42b6,_0x326c7d){return _0x13f256(_0x2e42b6,_0x326c7d);}},_0x139f7d=_0x5751e6['rnucv'](getRangerDir),_0x432dca=findEnvInRoot(_0x71fe70,_0x139f7d);if(_0x432dca){if(_0x402580[_0x4387d8(0x1a2)]&&isLegacyEnvPath(_0x432dca))throw _0x5751e6[_0x4387d8(0x1b3)](legacyWriteError,_0x71fe70,_0x432dca);return _0x432dca;}const _0xe3df6b=getRangerHomeDir();if(_0xe3df6b!==_0x139f7d){const _0x2ddbd9=findEnvInRoot(_0x71fe70,_0xe3df6b);if(_0x2ddbd9){if(_0x402580[_0x4387d8(0x1a2)]&&_0x5751e6[_0x4387d8(0x1dd)](isLegacyEnvPath,_0x2ddbd9))throw _0x5751e6['sNzpl'](legacyWriteError,_0x71fe70,_0x2ddbd9);return _0x2ddbd9;}}const _0x1022a0=_0x5751e6[_0x4387d8(0x1ae)](join,_0xe3df6b,_0x4387d8(0x222),_0x71fe70);if(_0x402580['forWrite'])throw _0x5751e6['UgkdE'](legacyWriteError,_0x71fe70,_0x1022a0);return _0x1022a0;}function isLegacyEnvPath(_0x6a21b1){const _0x58bfbb=_0x5069,_0x19953e={'mTBRu':function(_0x16d87d){return _0x16d87d();},'WANLV':function(_0xa225e5,_0x246b53){return _0xa225e5+_0x246b53;},'IUCDM':function(_0x5c0413,_0x597812){return _0x5c0413===_0x597812;}},_0xe13e96=_0x19953e[_0x58bfbb(0x1fc)](getRangerDir),_0x2124e5=getRangerHomeDir();for(const _0x6a3039 of new Set([_0xe13e96,_0x2124e5])){const _0x2252af=_0x6a3039[_0x58bfbb(0x19d)]('/')?_0x6a3039:_0x19953e['WANLV'](_0x6a3039,'/');if(_0x19953e['IUCDM'](_0x6a21b1,_0x6a3039)||_0x6a21b1['startsWith'](_0x2252af))return!![];}return![];}function legacyWriteError(_0x3ff4db,_0x178eea){const _0x53d570=_0x5069,_0x393ca6={'ZZNnq':function(_0x322566,_0x139e2b){return _0x322566+_0x139e2b;}};return new Error(_0x393ca6[_0x53d570(0x204)](_0x393ca6[_0x53d570(0x204)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x3ff4db+'\x22\x20to\x20legacy\x20path\x20'+_0x178eea+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x53d570(0x1ef),_0x53d570(0x1b1)));}export function findExistingEnv(_0xddbd4f,_0x2430c6){const _0x36ba62=_0x5069,_0x10dbb5={'XzIan':function(_0x3a91d4){return _0x3a91d4();},'RVGfT':function(_0x30d8b5){return _0x30d8b5();},'dyFrX':_0x36ba62(0x222),'DxFoh':function(_0x295b76,_0x74b2a,_0x423602){return _0x295b76(_0x74b2a,_0x423602);},'lsctg':function(_0x1d311d,_0x404fc7,_0x1d4928){return _0x1d311d(_0x404fc7,_0x1d4928);},'CZgtT':function(_0x5500fc,_0x1e43a7){return _0x5500fc(_0x1e43a7);},'ixkwH':'legacy','oUpLD':function(_0x553a2b,_0x354302){return _0x553a2b===_0x354302;},'lSrut':function(_0x31378d,_0x3b9f94){return _0x31378d(_0x3b9f94);}},_0x557bf5=_0x2430c6?.['rangerDir'],_0x49f9e8=_0x557bf5?[_0x557bf5]:[_0x10dbb5[_0x36ba62(0x1bb)](getRangerDir),_0x10dbb5['RVGfT'](getRangerHomeDir)]['filter']((_0x3c45cf,_0x4228da,_0x1db3d9)=>_0x1db3d9['indexOf'](_0x3c45cf)===_0x4228da),_0x28141a=_0x2430c6?.[_0x36ba62(0x1ab)]??['ci',_0x10dbb5[_0x36ba62(0x1e3)],'legacy'];for(const _0x152340 of _0x49f9e8){const _0x4259a7=_0x10dbb5['DxFoh'](join,_0x152340,_0x10dbb5[_0x36ba62(0x1e3)]),_0x6f0774=join(_0x152340,'ci'),_0x4ab108=[{'location':'ci','path':join(_0x152340,'ci',_0xddbd4f)},{'location':_0x10dbb5[_0x36ba62(0x1e3)],'path':join(_0x152340,_0x10dbb5['dyFrX'],_0xddbd4f)},{'location':_0x36ba62(0x1c6),'path':_0x10dbb5[_0x36ba62(0x1a5)](join,_0x152340,_0xddbd4f)}];for(const _0x3676a8 of _0x4ab108){if(_0x28141a[_0x36ba62(0x211)](_0x3676a8[_0x36ba62(0x1cd)])&&_0x10dbb5[_0x36ba62(0x223)](existsSync,_0x3676a8['path'])){if(_0x3676a8['location']===_0x10dbb5['ixkwH']&&(_0x10dbb5['oUpLD'](_0x3676a8[_0x36ba62(0x20c)],_0x4259a7)||_0x3676a8[_0x36ba62(0x20c)]===_0x6f0774)&&!_0x10dbb5[_0x36ba62(0x215)](hasLegacyProfileFiles,_0x3676a8['path']))continue;return{'path':_0x3676a8[_0x36ba62(0x20c)],'location':_0x3676a8['location']};}}}return null;}function hasLegacyProfileFiles(_0x22c291){const _0x17e9e8=_0x5069,_0x3456af={'LuLFM':function(_0x3473b4,_0x4f30e5,_0x272c32){return _0x3473b4(_0x4f30e5,_0x272c32);},'CZrxT':'settings.json','NdBkS':function(_0x1e70a3,_0x3c2140){return _0x1e70a3(_0x3c2140);},'pbMaY':_0x17e9e8(0x1c5),'IamTx':function(_0x46ccfe,_0x3fc52c){return _0x46ccfe(_0x3fc52c);}};return existsSync(_0x3456af['LuLFM'](join,_0x22c291,_0x3456af[_0x17e9e8(0x208)]))||_0x3456af['NdBkS'](existsSync,join(_0x22c291,_0x3456af['pbMaY']))||_0x3456af[_0x17e9e8(0x1d4)](existsSync,join(_0x22c291,'auth.json.enc'));}export function isEnvCi(_0x32525b){const _0x10bc68=_0x5069,_0xd1a12a={'vTEss':function(_0x36abe9,_0x306e78,_0x6f5d01,_0x21266f){return _0x36abe9(_0x306e78,_0x6f5d01,_0x21266f);},'OVSdF':function(_0x43f9a1){return _0x43f9a1();},'AUviJ':function(_0xb8cc8f,_0x3913c7){return _0xb8cc8f(_0x3913c7);},'usQMI':function(_0x453684,_0x231084,_0x15b2af,_0xedea1f){return _0x453684(_0x231084,_0x15b2af,_0xedea1f);}};if(existsSync(_0xd1a12a['vTEss'](join,_0xd1a12a[_0x10bc68(0x1b6)](getRangerDir),'ci',_0x32525b)))return!![];const _0x573679=getRangerHomeDir();if(_0x573679!==getRangerDir()&&_0xd1a12a[_0x10bc68(0x1e1)](existsSync,_0xd1a12a['usQMI'](join,_0x573679,'ci',_0x32525b)))return!![];return![];}export async function cleanupTempFiles(_0x26cec7){const _0x3b3aca=_0x5069,_0x14848b={'AViEN':function(_0x4b7a24,_0x371fb7){return _0x4b7a24!==_0x371fb7;}},_0x108f9c=[_0x26cec7['tempAuthPath'],_0x26cec7['configPath']]['filter'](Boolean);await Promise[_0x3b3aca(0x205)](_0x108f9c[_0x3b3aca(0x1b2)](_0x2d23b4=>unlink(_0x2d23b4)[_0x3b3aca(0x226)](_0x5b663a=>{const _0xdbb1c3=_0x3b3aca;_0x14848b['AViEN'](_0x5b663a['code'],'ENOENT')&&console['warn'](_0xdbb1c3(0x219)+_0x2d23b4+':',_0x5b663a['message']);})));}export function getSettingsPath(_0x46484c){const _0x5cd26a=_0x5069,_0x1eae37={'egLdf':function(_0xe8b367,_0x5f5b5e,_0x21bf4e){return _0xe8b367(_0x5f5b5e,_0x21bf4e);},'OTCsq':function(_0x49b937,_0x4f62fb){return _0x49b937(_0x4f62fb);},'niMcb':_0x5cd26a(0x1c8)};return _0x1eae37[_0x5cd26a(0x225)](join,_0x1eae37['OTCsq'](getEnvDir,_0x46484c),_0x1eae37[_0x5cd26a(0x20f)]);}export async function loadSettings(_0x4c55d6){const _0x375e0c=_0x5069,_0x1fc4f8={'bSoDn':function(_0x31a1cd,_0x57f787){return _0x31a1cd(_0x57f787);}},_0x47f9a9=getSettingsPath(_0x4c55d6);if(!_0x1fc4f8[_0x375e0c(0x221)](existsSync,_0x47f9a9))return{};try{const _0x3cd8be=await readFile(_0x47f9a9,_0x375e0c(0x1aa));return JSON[_0x375e0c(0x1f1)](_0x3cd8be);}catch{return{};}}export async function saveSettings(_0x43c5e0,_0xa2f737){const _0x14dff4=_0x5069,_0x3b386c={'nwUZs':function(_0xa44624,_0x1b5e53){return _0xa44624(_0x1b5e53);}},_0x376732=getSettingsPath(_0x43c5e0),_0x566d48=_0x3b386c['nwUZs'](dirname,_0x376732);!_0x3b386c['nwUZs'](existsSync,_0x566d48)&&await mkdir(_0x566d48,{'recursive':!![]}),await writeFile(_0x376732,JSON[_0x14dff4(0x1e2)](_0xa2f737,null,0x2));}export function resolveEnvVars(_0x562e02){const _0x5cfad6=_0x5069;if(typeof _0x562e02==='string')return _0x562e02[_0x5cfad6(0x1c3)](/\$\{(\w+)\}/g,(_0x1b989d,_0x768891)=>{const _0x539e0c=_0x5cfad6,_0x30630a=process[_0x539e0c(0x20a)][_0x768891];if(_0x30630a===undefined)throw new Error('Environment\x20variable\x20'+_0x768891+'\x20is\x20not\x20set');return _0x30630a;});if(Array['isArray'](_0x562e02))return _0x562e02[_0x5cfad6(0x1b2)](resolveEnvVars);if(_0x562e02&&typeof _0x562e02==='object')return Object['fromEntries'](Object[_0x5cfad6(0x1d8)](_0x562e02)[_0x5cfad6(0x1b2)](([_0x2ff487,_0x9d9595])=>[_0x2ff487,resolveEnvVars(_0x9d9595)]));return _0x562e02;}const isRecord=_0x25075c=>typeof _0x25075c===_0x33543a(0x210)&&_0x25075c!==null&&!Array[_0x33543a(0x1de)](_0x25075c),asRecord=_0x8f17f9=>isRecord(_0x8f17f9)?_0x8f17f9:undefined,mergeHeaders=(_0x487794,_0x11f224)=>{const _0x3a10eb=_0x33543a,_0x5a7009={'haPpY':function(_0x3482ce,_0x1da8c1){return _0x3482ce??_0x1da8c1;}},_0x4e4346={..._0x5a7009[_0x3a10eb(0x1c7)](_0x487794,{}),..._0x11f224??{}};return Object[_0x3a10eb(0x1b9)](_0x4e4346)['length']?_0x4e4346:undefined;},SAFE_MODE_ARGS=[_0x33543a(0x1e7)],ALLOW_LOCALHOST_ARGS=[_0x33543a(0x1ed),_0x33543a(0x19f),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x52a93b,_0x33dce9={}){const _0x3b8f8e=_0x33543a,_0x4d1411={'SmfVC':function(_0x41b287,_0x16e7aa){return _0x41b287(_0x16e7aa);},'NHpEd':function(_0x167675,_0x366836){return _0x167675===_0x366836;},'iZvED':_0x3b8f8e(0x1c2),'nownM':function(_0x2e154b,_0x59ef7e,_0x266713){return _0x2e154b(_0x59ef7e,_0x266713);},'OvAlL':function(_0x40adf6,_0xed3328){return _0x40adf6(_0xed3328);}},_0xcc82f6=asRecord(_0x52a93b[_0x3b8f8e(0x1ac)]),_0x18783e={..._0x4d1411['SmfVC'](asRecord,_0xcc82f6?.['launchOptions'])??{}};_0x4d1411['NHpEd'](typeof _0x33dce9[_0x3b8f8e(0x1d1)],_0x3b8f8e(0x227))&&(_0x18783e[_0x3b8f8e(0x1d1)]=_0x33dce9['headless']);if(_0x52a93b[_0x3b8f8e(0x218)]){const _0x528adc=_0x18783e['args']??[],_0x38e324=SAFE_MODE_ARGS['filter'](_0x58948=>!_0x528adc['includes'](_0x58948));_0x18783e[_0x3b8f8e(0x1da)]=[..._0x528adc,..._0x38e324];}if(_0x52a93b['allowInsecureLocalhost']){const _0x2e44c6=_0x18783e['args']??[],_0x48d302=ALLOW_LOCALHOST_ARGS[_0x3b8f8e(0x1be)](_0x1e822b=>!_0x2e44c6['includes'](_0x1e822b));_0x18783e['args']=[..._0x2e44c6,..._0x48d302];}const _0x58ec64={...asRecord(_0xcc82f6?.[_0x3b8f8e(0x200)])??{}};_0x58ec64[_0x3b8f8e(0x20b)]=!![];_0x4d1411[_0x3b8f8e(0x1c9)](typeof _0x52a93b[_0x3b8f8e(0x1ca)],_0x4d1411['iZvED'])&&(_0x58ec64['userAgent']=_0x52a93b['userAgent']);const _0x368a92=_0x4d1411[_0x3b8f8e(0x1c4)](mergeHeaders,asRecord(_0x58ec64[_0x3b8f8e(0x1f3)]),_0x4d1411['OvAlL'](asRecord,_0x52a93b['headers']));return _0x368a92?_0x58ec64[_0x3b8f8e(0x1f3)]=_0x368a92:delete _0x58ec64[_0x3b8f8e(0x1f3)],_0x33dce9['storageStatePath']&&(_0x58ec64['storageState']=_0x33dce9[_0x3b8f8e(0x1ee)]),{'launchOptions':_0x18783e,'contextOptions':_0x58ec64};}export async function resolveProfileStorageState(_0x2543f2){const _0x5ac5fa=_0x33543a,_0x2ef53a={'YySSj':function(_0x36cd13,_0x1e61fb){return _0x36cd13(_0x1e61fb);}};return _0x2ef53a[_0x5ac5fa(0x1a0)](resolveLocalAuthPath,_0x2ef53a[_0x5ac5fa(0x1a0)](getEnvDir,_0x2543f2));}async function resolveLocalAuthPath(_0x51257d){const _0x4ae71f=_0x33543a,_0x327e3e={'xXJJy':'auth.json.enc','BZISV':'auth.json','JIkWi':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','mVlvG':function(_0x25a83d,_0x1a9dc6,_0x1f395c){return _0x25a83d(_0x1a9dc6,_0x1f395c);},'RMZmO':function(_0x36aabc){return _0x36aabc();},'tXzqu':function(_0x116802,_0x5ebbac,_0x3c94a9){return _0x116802(_0x5ebbac,_0x3c94a9);},'ICPWt':function(_0x2e8650,_0x2ab114){return _0x2e8650 instanceof _0x2ab114;},'NYGsY':function(_0x789362,_0x48b2e3){return _0x789362(_0x48b2e3);}},_0x543273=join(_0x51257d,_0x327e3e['xXJJy']),_0x4780b2=join(_0x51257d,_0x327e3e[_0x4ae71f(0x1e0)]);if(existsSync(_0x543273))try{const _0x1b69db=await getToken();if(!_0x1b69db)throw new Error(_0x327e3e[_0x4ae71f(0x1f5)]);const _0x524c72=await readFile(_0x543273),_0x98abc0=_0x327e3e[_0x4ae71f(0x1cc)](decrypt,_0x524c72,_0x1b69db),_0x2d629f=_0x327e3e[_0x4ae71f(0x1cc)](join,_0x327e3e[_0x4ae71f(0x1ad)](tmpdir),_0x4ae71f(0x1b8)+Date['now']()+_0x4ae71f(0x1d2));return await _0x327e3e[_0x4ae71f(0x1ba)](writeFile,_0x2d629f,_0x98abc0),{'storageStatePath':_0x2d629f,'tempAuthPath':_0x2d629f};}catch(_0x12b534){const _0x138532=_0x327e3e[_0x4ae71f(0x1d6)](_0x12b534,Error)?_0x12b534['message']:_0x327e3e[_0x4ae71f(0x1db)](String,_0x12b534);throw new Error(_0x4ae71f(0x1ce)+_0x138532);}if(existsSync(_0x4780b2))return{'storageStatePath':_0x4780b2};return{};}export async function buildPlaywrightConfig(_0x188be3,_0xbb0fcc,_0x336be1,_0x2f9090,_0x19faed){const _0x2dd1c0=_0x33543a,_0x562ba4={'SocKc':function(_0xf45299,_0x34f90e,_0xef0d5a,_0x7d3be7,_0x2e2386,_0x1ea161,_0x18e70a){return _0xf45299(_0x34f90e,_0xef0d5a,_0x7d3be7,_0x2e2386,_0x1ea161,_0x18e70a);},'pBsXh':_0x2dd1c0(0x1a9),'FKmQK':function(_0x39c736,_0x1c7442){return _0x39c736(_0x1c7442);}};if(_0x19faed)return _0x562ba4[_0x2dd1c0(0x207)](buildPlaywrightConfigCore,_0x188be3,_0x19faed,_0xbb0fcc,_0x336be1,_0x2f9090,_0x562ba4[_0x2dd1c0(0x20d)]);const {storageStatePath:_0x29c367,tempAuthPath:_0x2e013f}=await resolveLocalAuthPath(getEnvDir(_0xbb0fcc));try{const _0x432194=await buildPlaywrightConfigCore(_0x188be3,_0x29c367,_0xbb0fcc,_0x336be1,_0x2f9090,'stagehand');return{..._0x432194,'tempAuthPath':_0x2e013f};}catch(_0x5493f9){_0x2e013f&&await _0x562ba4[_0x2dd1c0(0x1dc)](unlink,_0x2e013f)[_0x2dd1c0(0x226)](()=>{});throw _0x5493f9;}}export async function buildPlaywrightConfigCore(_0xe30608,_0x59cce1,_0x16f1f3,_0x52695b,_0x52fd9f,_0xc58db8='stagehand'){const _0x8f71dc=_0x33543a,_0xc06ff6={'frQBf':function(_0x7fe67a,_0x187eb7,_0x2c811b){return _0x7fe67a(_0x187eb7,_0x2c811b);},'HxkkD':'--disable-setuid-sandbox','cATYK':'chromium','oeOAh':'clipboard-read','UZVdK':function(_0x3dcc70){return _0x3dcc70();},'LTgGy':_0x8f71dc(0x21e),'hqVkQ':'file','qnZli':_0x8f71dc(0x202),'bSbHx':_0x8f71dc(0x1ec),'fijCN':_0x8f71dc(0x1f9),'WghSS':'allow','ZZaKL':function(_0xc1ae10,_0x3360d1){return _0xc1ae10===_0x3360d1;},'PWhHo':function(_0x5ca4ce,_0x430c62,_0x2bb407){return _0x5ca4ce(_0x430c62,_0x2bb407);}},_0x4ab4b0=_0x52695b||_0xc06ff6[_0x8f71dc(0x217)](randomUUID),_0x3a0d18=join(_0xc06ff6[_0x8f71dc(0x217)](getRangerDir),_0x8f71dc(0x220),_0x4ab4b0),_0x5c5535=Boolean(_0xe30608['cdpEndpoint']),_0x17490b=_0x5c5535?{'browserName':_0x8f71dc(0x1b7),'cdpEndpoint':_0xe30608['cdpEndpoint']}:((()=>{const _0x29b1cf=_0x8f71dc,{launchOptions:_0x573569,contextOptions:_0xd4ac10}=_0xc06ff6['frQBf'](buildBrowserOptionsFromSettings,_0xe30608,{'headless':_0x52fd9f?![]:_0xe30608[_0x29b1cf(0x1d1)]??!![],'storageStatePath':_0x59cce1});if(process['getuid']?.()===0x0){const _0x84f5a9=[_0x29b1cf(0x1b4),_0xc06ff6[_0x29b1cf(0x1f2)]],_0x12fec0=_0x573569[_0x29b1cf(0x1da)]??[],_0x36de45=_0x84f5a9['filter'](_0x797135=>!_0x12fec0[_0x29b1cf(0x211)](_0x797135));_0x573569[_0x29b1cf(0x1da)]=[..._0x12fec0,..._0x36de45];}return{'isolated':!![],'browserName':_0xc06ff6[_0x29b1cf(0x1fa)],'launchOptions':_0x573569,'contextOptions':{..._0xd4ac10,'permissions':[_0xc06ff6[_0x29b1cf(0x1fb)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x22cd41=_0xc58db8===_0xc06ff6['LTgGy']?{'browser':_0x17490b,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3a0d18,'outputMode':_0xc06ff6['hqVkQ'],'codegen':_0xc06ff6['qnZli']}:{'name':_0x16f1f3,'browser':_0x17490b,'capabilities':['core',_0x8f71dc(0x1d5),_0xc06ff6[_0x8f71dc(0x1e5)],'pdf',_0xc06ff6[_0x8f71dc(0x209)]],'imageResponses':_0xc06ff6[_0x8f71dc(0x1a7)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3a0d18};if(!_0x5c5535){const _0xac64e1=_0x22cd41[_0x8f71dc(0x1ac)],_0x44ec9c=_0xac64e1[_0x8f71dc(0x200)];if(_0xc06ff6[_0x8f71dc(0x203)](_0x44ec9c['userAgent'],undefined))delete _0x44ec9c[_0x8f71dc(0x1ca)];if(_0xc06ff6[_0x8f71dc(0x203)](_0x44ec9c['storageState'],undefined))delete _0x44ec9c['storageState'];}const _0x4fc9de=_0xc06ff6['frQBf'](join,tmpdir(),'ranger-config');!existsSync(_0x4fc9de)&&await mkdir(_0x4fc9de,{'recursive':!![]});const _0x1853b0=_0xc58db8===_0x8f71dc(0x21e)?'-cli':'',_0x38b657=join(_0x4fc9de,_0x16f1f3+'-'+Date['now']()+_0x1853b0+'.json');return await _0xc06ff6['PWhHo'](writeFile,_0x38b657,JSON[_0x8f71dc(0x1e2)](_0x22cd41,null,0x2)),{'configPath':_0x38b657,'storageStatePath':_0x59cce1};}export async function buildPlaywrightCliConfig(_0x3bb312,_0x34c6eb,_0x41a944,_0x509bfc,_0x3802c3){const _0x31ba07=_0x33543a,_0x43c617={'LIDAp':function(_0x255621,_0x599092){return _0x255621(_0x599092);},'PzqvE':function(_0x3baf8f,_0x1edcf8,_0x26d319,_0x3fb0e8,_0x504abb,_0x3a5d7f,_0x354d51){return _0x3baf8f(_0x1edcf8,_0x26d319,_0x3fb0e8,_0x504abb,_0x3a5d7f,_0x354d51);},'yTySA':'playwright-cli'};if(_0x3802c3)return buildPlaywrightConfigCore(_0x3bb312,_0x3802c3,_0x34c6eb,_0x41a944,_0x509bfc,_0x31ba07(0x21e));const {storageStatePath:_0x3e125a,tempAuthPath:_0x2c8e25}=await _0x43c617[_0x31ba07(0x1f7)](resolveLocalAuthPath,_0x43c617[_0x31ba07(0x1f7)](getEnvDir,_0x34c6eb));try{const _0x455cc3=await _0x43c617[_0x31ba07(0x224)](buildPlaywrightConfigCore,_0x3bb312,_0x3e125a,_0x34c6eb,_0x41a944,_0x509bfc,_0x43c617[_0x31ba07(0x212)]);return{..._0x455cc3,'tempAuthPath':_0x2c8e25};}catch(_0x3097e7){_0x2c8e25&&await unlink(_0x2c8e25)['catch'](()=>{});throw _0x3097e7;}}export async function buildRangerwrightCliConfig(_0x390e5d,_0x351048,_0x4cb036,_0x2ea8fa,_0x3cf362){const _0x57501b=_0x33543a,_0x1f3992={'eiyma':function(_0x1a8db2,_0x2efac5,_0x387c47){return _0x1a8db2(_0x2efac5,_0x387c47);},'msxhF':function(_0x3d35a,_0x11a4a7){return _0x3d35a===_0x11a4a7;},'jbgVG':_0x57501b(0x1b7),'DQAHV':_0x57501b(0x19e),'SanCA':function(_0x3cb668,_0xf0dd17){return _0x3cb668(_0xf0dd17);},'LCsSN':function(_0x3c60ed){return _0x3c60ed();},'AHxfr':_0x57501b(0x220),'WIIfV':function(_0x2f05b5,_0x408cd0){return _0x2f05b5(_0x408cd0);},'NJUdS':function(_0x2932f5,_0x3c7180,_0x411544){return _0x2932f5(_0x3c7180,_0x411544);}},{storageStatePath:_0x411e81,tempAuthPath:_0x2316dd}=_0x3cf362?{'storageStatePath':_0x3cf362,'tempAuthPath':undefined}:await _0x1f3992[_0x57501b(0x1c1)](resolveLocalAuthPath,_0x1f3992['SanCA'](getEnvDir,_0x351048)),_0x433cf8=_0x4cb036||_0x1f3992['LCsSN'](randomUUID),_0x2f8685=join(getRangerDir(),_0x1f3992[_0x57501b(0x214)],_0x433cf8),_0x1e7f1e=_0x1f3992['WIIfV'](Boolean,_0x390e5d['cdpEndpoint']),_0xceb44b=_0x1e7f1e?{'browserName':_0x57501b(0x1b7),'cdpEndpoint':_0x390e5d['cdpEndpoint']}:((()=>{const _0x44f4b1=_0x57501b,{launchOptions:_0x231c07,contextOptions:_0x2a4bb1}=_0x1f3992['eiyma'](buildBrowserOptionsFromSettings,_0x390e5d,{'headless':_0x2ea8fa?![]:_0x390e5d['headless']??!![],'storageStatePath':_0x411e81});if(_0x1f3992[_0x44f4b1(0x21c)](process[_0x44f4b1(0x1b5)]?.(),0x0)){const _0x4819a2=['--no-sandbox','--disable-setuid-sandbox'],_0x4d638f=_0x231c07[_0x44f4b1(0x1da)]??[],_0x23f930=_0x4819a2['filter'](_0x26bd32=>!_0x4d638f[_0x44f4b1(0x211)](_0x26bd32));_0x231c07['args']=[..._0x4d638f,..._0x23f930];}return{'browserName':_0x1f3992['jbgVG'],'launchOptions':_0x231c07,'contextOptions':{..._0x2a4bb1,'permissions':[_0x1f3992['DQAHV'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x1e7f1e){const _0x2a503c=_0xceb44b[_0x57501b(0x200)];if(_0x2a503c){if(_0x2a503c['userAgent']===undefined)delete _0x2a503c[_0x57501b(0x1ca)];if(_0x2a503c['storageState']===undefined)delete _0x2a503c['storageState'];}}const _0xf2508b={'browser':_0xceb44b,'outputDir':_0x2f8685,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x2063c1;try{const _0x78676e=join(_0x1f3992[_0x57501b(0x1ea)](tmpdir),'ranger-config');!existsSync(_0x78676e)&&await _0x1f3992[_0x57501b(0x21d)](mkdir,_0x78676e,{'recursive':!![]}),_0x2063c1=join(_0x78676e,_0x351048+'-'+Date[_0x57501b(0x21a)]()+'-rangerwright.json'),await _0x1f3992[_0x57501b(0x1eb)](writeFile,_0x2063c1,JSON[_0x57501b(0x1e2)](_0xf2508b,null,0x2));}catch(_0x4e0dea){_0x2316dd&&await unlink(_0x2316dd)[_0x57501b(0x226)](()=>{});throw _0x4e0dea;}return{'configPath':_0x2063c1,'storageStatePath':_0x411e81,'tempAuthPath':_0x2316dd,'outputDir':_0x2f8685};}export async function buildNovaActCliConfig(_0x23799a,_0x2cb269,_0x3b6b93,_0x139baf,_0x4a02b7){const _0x2543de=_0x33543a,_0x33a855={'jzaIZ':function(_0x3e2122,_0x2f4218){return _0x3e2122(_0x2f4218);},'pLfXG':function(_0x4126a3){return _0x4126a3();},'ggsTR':_0x2543de(0x220),'fBOrV':_0x2543de(0x1e4),'CLVby':function(_0x98564b,_0x41717a,_0x2f7add){return _0x98564b(_0x41717a,_0x2f7add);},'pCmMq':_0x2543de(0x1b4),'xQsKS':_0x2543de(0x1bf),'sSWZr':function(_0x251c30,_0xeef4e9){return _0x251c30===_0xeef4e9;},'ZjNni':function(_0x498607,_0x3b20d7){return _0x498607(_0x3b20d7);},'VJfXI':'string','URKbG':function(_0x3ad57f,_0x133dbd){return _0x3ad57f(_0x133dbd);},'EihGe':function(_0x3c5cb6,_0x5ec13b){return _0x3c5cb6(_0x5ec13b);}},{storageStatePath:_0x41acaf,tempAuthPath:_0x10baef}=_0x4a02b7?{'storageStatePath':_0x4a02b7,'tempAuthPath':undefined}:await _0x33a855[_0x2543de(0x1d9)](resolveLocalAuthPath,getEnvDir(_0x2cb269)),_0x4a1015=_0x3b6b93||_0x33a855['pLfXG'](randomUUID),_0x57a4e7=join(_0x33a855['pLfXG'](getRangerDir),_0x33a855[_0x2543de(0x1cf)],_0x4a1015),_0xe92823=join(_0x57a4e7,_0x33a855[_0x2543de(0x1fe)]),_0x3e1205=_0x41acaf?join(_0xe92823,'Default'):undefined,{launchOptions:_0x5360ef,contextOptions:_0x2b7790}=_0x33a855['CLVby'](buildBrowserOptionsFromSettings,_0x23799a,{'headless':_0x139baf?![]:_0x23799a[_0x2543de(0x1d1)]??!![],'storageStatePath':_0x41acaf});if(process[_0x2543de(0x1b5)]?.()===0x0){const _0x100e2f=[_0x33a855['pCmMq'],_0x33a855['xQsKS']],_0x38696c=_0x5360ef[_0x2543de(0x1da)]??[],_0x22d34e=_0x100e2f[_0x2543de(0x1be)](_0x27a8c8=>!_0x38696c[_0x2543de(0x211)](_0x27a8c8));_0x5360ef['args']=[..._0x38696c,..._0x22d34e];}const _0x2c946d=_0x33a855[_0x2543de(0x1f6)](typeof _0x5360ef['executablePath'],'string')?_0x5360ef['executablePath']:_0x41acaf?chromium['executablePath']():undefined;return{'storageStatePath':_0x41acaf,'tempAuthPath':_0x10baef,'baseUrl':_0x23799a['baseUrl'],'headless':_0x33a855['ZjNni'](Boolean,_0x5360ef[_0x2543de(0x1d1)]),'userDataDir':_0xe92823,'browserProfilePath':_0x3e1205,'executablePath':_0x2c946d,'launchArgs':Array['isArray'](_0x5360ef[_0x2543de(0x1da)])?_0x5360ef['args']['filter'](_0x50c899=>typeof _0x50c899==='string'):[],'userAgent':_0x33a855['sSWZr'](typeof _0x2b7790[_0x2543de(0x1ca)],_0x33a855[_0x2543de(0x1f0)])?_0x2b7790['userAgent']:undefined,'extraHTTPHeaders':_0x2b7790['extraHTTPHeaders'],'allowInsecureLocalhost':_0x33a855['URKbG'](Boolean,_0x23799a[_0x2543de(0x1b0)]),'safeMode':_0x33a855['URKbG'](Boolean,_0x23799a['safeMode']),'cdpEndpoint':_0x23799a['cdpEndpoint'],'isCdpMode':_0x33a855['EihGe'](Boolean,_0x23799a[_0x2543de(0x1bd)])};}function _0x4b62(){const _0xbd0e84=['OVSdF','chromium','ranger-auth-','keys','tXzqu','XzIan','CAbsg','cdpEndpoint','filter','--disable-setuid-sandbox','headers','SanCA','string','replace','nownM','auth.json','legacy','haPpY','settings.json','NHpEd','userAgent','NVopn','mVlvG','location','Failed\x20to\x20decrypt\x20auth\x20state:\x20','ggsTR','223096beLQCE','headless','.json','Ttzhi','IamTx','tabs','ICPWt','529216tbqPYe','entries','jzaIZ','args','NYGsY','FKmQK','vYsiv','isArray','join','BZISV','AUviJ','stringify','dyFrX','nova-user-data','bSbHx','39ONwebT','--disable-features=WebBluetooth','423DvliZB','DNalW','LCsSN','NJUdS','install','--disable-web-security','storageStatePath','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','VJfXI','parse','HxkkD','extraHTTPHeaders','6lfzdBn','JIkWi','sSWZr','LIDAp','4860700kJVTTU','vision','cATYK','oeOAh','mTBRu','DdMGP','fBOrV','ziHDP','contextOptions','XsbBx','none','ZZaKL','ZZNnq','all','RvBTp','SocKc','CZrxT','fijCN','env','ignoreHTTPSErrors','path','pBsXh','2325568zyxWQC','niMcb','object','includes','yTySA','mFDEa','AHxfr','lSrut','nxfeb','UZVdK','safeMode','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','now','tLYZz','msxhF','eiyma','playwright-cli','5467bOBpox','sessions','bSoDn','local','CZgtT','PzqvE','egLdf','catch','boolean','endsWith','clipboard-read','--allow-running-insecure-content','YySSj','42651336NjlRDU','forWrite','TULQl','441466LyporT','lsctg','length','WghSS','4rXfYew','stagehand','utf-8','locations','browser','RMZmO','hQLUP','4670cHMvZE','allowInsecureLocalhost','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','map','slAwH','--no-sandbox','getuid'];_0x4b62=function(){return _0xbd0e84;};return _0x4b62();}export function getNestedValue(_0xd3d2ac,_0x444c73){const _0x4e8514=_0x33543a,_0x5e229c={'KUwhi':function(_0x1d35d4,_0x406baf){return _0x1d35d4(_0x406baf);},'TKhbn':function(_0x2f1387,_0x342cc0){return _0x2f1387===_0x342cc0;},'RvBTp':function(_0x655302,_0x226691){return _0x655302!==_0x226691;}},_0x1cf177=_0x5e229c['KUwhi'](parseKeyPath,_0x444c73);let _0x543e3e=_0xd3d2ac;for(const _0x5d477e of _0x1cf177){if(_0x543e3e===null||_0x5e229c['TKhbn'](_0x543e3e,undefined)||_0x5e229c[_0x4e8514(0x206)](typeof _0x543e3e,'object'))return undefined;_0x543e3e=_0x543e3e[_0x5d477e];}return _0x543e3e;}export function setNestedValue(_0x4ccaf3,_0x1293b1,_0x464a0d){const _0x450bb5=_0x33543a,_0x115801={'tLYZz':function(_0x33f918,_0x484629){return _0x33f918<_0x484629;},'NVopn':function(_0x2c6f27,_0x586a4a){return _0x2c6f27-_0x586a4a;},'LkoBD':function(_0x4b6bb8,_0x3fa138){return _0x4b6bb8!==_0x3fa138;}},_0x2070e7=parseKeyPath(_0x1293b1);let _0x54f6e9=_0x4ccaf3;for(let _0x239d25=0x0;_0x115801[_0x450bb5(0x21b)](_0x239d25,_0x115801[_0x450bb5(0x1cb)](_0x2070e7['length'],0x1));_0x239d25++){const _0x49634a=_0x2070e7[_0x239d25];(!(_0x49634a in _0x54f6e9)||_0x115801['LkoBD'](typeof _0x54f6e9[_0x49634a],'object'))&&(_0x54f6e9[_0x49634a]={}),_0x54f6e9=_0x54f6e9[_0x49634a];}_0x54f6e9[_0x2070e7[_0x2070e7[_0x450bb5(0x1a6)]-0x1]]=_0x464a0d;}export function deleteNestedValue(_0x4c8417,_0x3b0a1a){const _0x3d6457=_0x33543a,_0x417ead={'XsbBx':function(_0x27a7ab,_0x337a0c){return _0x27a7ab(_0x337a0c);},'DNalW':function(_0x155d55,_0x38b4f4){return _0x155d55<_0x38b4f4;},'Ttzhi':function(_0x53c2e2,_0x2ab5b3){return _0x53c2e2-_0x2ab5b3;},'TULQl':function(_0x3e357c,_0x5c5b71){return _0x3e357c===_0x5c5b71;},'mIfMi':function(_0x4a55f9,_0x17c423){return _0x4a55f9!==_0x17c423;},'MYuCA':_0x3d6457(0x210),'HoYIf':function(_0x5aea8b,_0x527d03){return _0x5aea8b in _0x527d03;}},_0x165c67=_0x417ead[_0x3d6457(0x201)](parseKeyPath,_0x3b0a1a);let _0xe69e7c=_0x4c8417;for(let _0x4209c7=0x0;_0x417ead[_0x3d6457(0x1e9)](_0x4209c7,_0x417ead[_0x3d6457(0x1d3)](_0x165c67[_0x3d6457(0x1a6)],0x1));_0x4209c7++){if(_0xe69e7c===null||_0x417ead[_0x3d6457(0x1a3)](_0xe69e7c,undefined)||typeof _0xe69e7c!==_0x3d6457(0x210))return![];_0xe69e7c=_0xe69e7c[_0x165c67[_0x4209c7]];}if(_0xe69e7c===null||_0xe69e7c===undefined||_0x417ead['mIfMi'](typeof _0xe69e7c,_0x417ead['MYuCA']))return![];const _0x2e61c6=_0x165c67[_0x165c67[_0x3d6457(0x1a6)]-0x1];if(_0x417ead['HoYIf'](_0x2e61c6,_0xe69e7c))return delete _0xe69e7c[_0x2e61c6],!![];return![];}function parseKeyPath(_0x53b3a4){const _0x4fd3be=_0x33543a,_0x91a667={'wdPMx':'setupHeader','xRQJx':'setupHeaders'},_0x5b84d5=_0x53b3a4['split']('.');return _0x5b84d5[0x0]==='header'&&(_0x5b84d5[0x0]=_0x4fd3be(0x1c0)),_0x5b84d5[0x0]===_0x91a667['wdPMx']&&(_0x5b84d5[0x0]=_0x91a667['xRQJx']),_0x5b84d5;}export function formatSettings(_0x3f546f,_0x524727=0x0){const _0x4104a0=_0x33543a,_0x4ad016={'YvOtN':function(_0x431440,_0xfab8){return _0x431440===_0xfab8;},'ziHDP':function(_0x273ae0,_0x448d77){return _0x273ae0===_0x448d77;},'Eiqvz':function(_0x41cafd,_0xcf06ba){return _0x41cafd!==_0xcf06ba;}},_0x2b25d2=[],_0x33089f='\x20\x20'['repeat'](_0x524727);for(const [_0x56d9ae,_0x15d571]of Object['entries'](_0x3f546f)){if(_0x4ad016['YvOtN'](_0x15d571,undefined))continue;if(_0x4ad016[_0x4104a0(0x1ff)](typeof _0x15d571,_0x4104a0(0x210))&&_0x4ad016['Eiqvz'](_0x15d571,null)){_0x2b25d2['push'](''+_0x33089f+_0x56d9ae+':');for(const [_0x418b21,_0x4afb1a]of Object[_0x4104a0(0x1d8)](_0x15d571)){_0x2b25d2['push'](_0x33089f+'\x20\x20'+_0x418b21+':\x20'+_0x4afb1a);}}else _0x2b25d2['push'](''+_0x33089f+_0x56d9ae+':\x20'+_0x15d571);}return _0x2b25d2[_0x4104a0(0x1df)]('\x0a');}
|
|
1
|
+
const _0x231513=_0x24f2;(function(_0x7d19f0,_0x2a516d){const _0x26b42a=_0x24f2,_0x15a498=_0x7d19f0();while(!![]){try{const _0x453ac0=parseInt(_0x26b42a(0xea))/0x1+parseInt(_0x26b42a(0x100))/0x2*(parseInt(_0x26b42a(0x108))/0x3)+-parseInt(_0x26b42a(0xe6))/0x4*(-parseInt(_0x26b42a(0xad))/0x5)+-parseInt(_0x26b42a(0x10d))/0x6+-parseInt(_0x26b42a(0xc1))/0x7+parseInt(_0x26b42a(0xcd))/0x8+-parseInt(_0x26b42a(0xe8))/0x9*(-parseInt(_0x26b42a(0xb1))/0xa);if(_0x453ac0===_0x2a516d)break;else _0x15a498['push'](_0x15a498['shift']());}catch(_0x4eb412){_0x15a498['push'](_0x15a498['shift']());}}}(_0x2695,0xc5f21));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x24f2(_0x3ed20f,_0x40afb9){_0x3ed20f=_0x3ed20f-0xab;const _0x2695b1=_0x2695();let _0x24f2cf=_0x2695b1[_0x3ed20f];return _0x24f2cf;}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(_0x589d72,_0x5b56dd){const _0x327c76=_0x24f2,_0x6ae1c8={'towex':function(_0x185d29,_0x3227b8,_0x10197c,_0x33b252){return _0x185d29(_0x3227b8,_0x10197c,_0x33b252);},'qIgad':'local','QLRPJ':function(_0x1ae36f,_0x3684ab,_0x99c27f){return _0x1ae36f(_0x3684ab,_0x99c27f);},'RxhWj':function(_0x2e5494,_0x2c9abf){return _0x2e5494(_0x2c9abf);},'yFFat':function(_0x296334,_0x57ff39){return _0x296334(_0x57ff39);}},_0x431368=join(_0x5b56dd,'ci',_0x589d72),_0x2d22ec=_0x6ae1c8[_0x327c76(0xfa)](join,_0x5b56dd,_0x6ae1c8[_0x327c76(0x125)],_0x589d72),_0x541529=_0x6ae1c8['QLRPJ'](join,_0x5b56dd,_0x589d72),_0x30f7b9=join(_0x5b56dd,_0x6ae1c8['qIgad']),_0x6310cb=_0x6ae1c8['QLRPJ'](join,_0x5b56dd,'ci');if(existsSync(_0x431368))return _0x431368;if(_0x6ae1c8['RxhWj'](existsSync,_0x2d22ec))return _0x2d22ec;if(existsSync(_0x541529)&&(_0x541529!==_0x30f7b9&&_0x541529!==_0x6310cb?!![]:_0x6ae1c8[_0x327c76(0x124)](hasLegacyProfileFiles,_0x541529)))return _0x541529;return null;}export function getEnvDir(_0x4224f6,_0x375de2={}){const _0x3ab3c1=_0x24f2,_0x13b154={'TvvmM':function(_0x3853c8){return _0x3853c8();},'NiTkI':function(_0x105a72,_0x5cd916,_0xcbae5b){return _0x105a72(_0x5cd916,_0xcbae5b);},'IfIhP':function(_0x3c88a5,_0x4093b8,_0x56ac3c){return _0x3c88a5(_0x4093b8,_0x56ac3c);},'QNrCo':function(_0x276b53,_0x21f71f){return _0x276b53(_0x21f71f);},'LVsxw':function(_0x42aec6,_0xc17296,_0x55b3df,_0x5604b2){return _0x42aec6(_0xc17296,_0x55b3df,_0x5604b2);},'rJkhv':'local','HCbRu':function(_0x51cd81,_0x35a893,_0x4f8852){return _0x51cd81(_0x35a893,_0x4f8852);}},_0x235d8b=_0x13b154[_0x3ab3c1(0xc3)](getRangerDir),_0x2c5357=findEnvInRoot(_0x4224f6,_0x235d8b);if(_0x2c5357){if(_0x375de2[_0x3ab3c1(0x11a)]&&isLegacyEnvPath(_0x2c5357))throw _0x13b154['NiTkI'](legacyWriteError,_0x4224f6,_0x2c5357);return _0x2c5357;}const _0x1c3cb1=getRangerHomeDir();if(_0x1c3cb1!==_0x235d8b){const _0x3a09c5=_0x13b154[_0x3ab3c1(0xc8)](findEnvInRoot,_0x4224f6,_0x1c3cb1);if(_0x3a09c5){if(_0x375de2['forWrite']&&_0x13b154[_0x3ab3c1(0xfb)](isLegacyEnvPath,_0x3a09c5))throw legacyWriteError(_0x4224f6,_0x3a09c5);return _0x3a09c5;}}const _0x68eda6=_0x13b154['LVsxw'](join,_0x1c3cb1,_0x13b154[_0x3ab3c1(0xf2)],_0x4224f6);if(_0x375de2['forWrite'])throw _0x13b154[_0x3ab3c1(0xe0)](legacyWriteError,_0x4224f6,_0x68eda6);return _0x68eda6;}function isLegacyEnvPath(_0x58105b){const _0x2eb153=_0x24f2,_0x3211f4={'jdfla':function(_0x3cc36f,_0x1414fd){return _0x3cc36f+_0x1414fd;},'okGCp':function(_0x111440,_0x357962){return _0x111440===_0x357962;}},_0x1a5782=getRangerDir(),_0x1e4266=getRangerHomeDir();for(const _0x29efc9 of new Set([_0x1a5782,_0x1e4266])){const _0x213abe=_0x29efc9['endsWith']('/')?_0x29efc9:_0x3211f4['jdfla'](_0x29efc9,'/');if(_0x3211f4[_0x2eb153(0xd5)](_0x58105b,_0x29efc9)||_0x58105b['startsWith'](_0x213abe))return!![];}return![];}function _0x2695(){const _0x1d383b=['Sghfa','zTzIP','LmqLh','indexOf','args','Refusing\x20to\x20write\x20profile\x20\x22','3LznzZH','-rangerwright.json','--disable-web-security','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','legacy','7825512ATNOTZ','gsNTx','auth.json','filter','DOsyZ','DXdKs','wXeTn','file','executablePath','xxfcs','ranger-config','UeaEO','local','forWrite','includes','SliGV','vision','--no-sandbox','xlxBa','string','vpqyB','install','HlZQI','yFFat','qIgad','safeMode','qckNh','tlkml','baseUrl','message','entries','19035dkyZSJ','isArray','NkuXc','--unsafely-treat-insecure-origin-as-secure=http://localhost','10MJQcdT','LKGUz','contextOptions','object','tTmyf','replace','--disable-features=WebBluetooth','YDQgi','tabs','keys','UNaDo','stringify','fQDlP','cKWxn','storageStatePath','now','10077907EQEZHy','vNlfC','TvvmM','bASjt','LgfjY','wIKSB','YubPz','IfIhP','ieeOT','Failed\x20to\x20decrypt\x20auth\x20state:\x20','mSerM','HtiSq','1987088GLwwkI','UltzP','auth.json.enc','launchOptions','PmqJN','length','--allow-running-insecure-content','Cswjr','okGCp','headless','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fromEntries','IzPAg','allow','extraHTTPHeaders','FdEFl','locations','tempAuthPath','ISGwu','HCbRu','storageState','seDnU','all','location','userAgent','984hZhFwg','code','8748153ldMpAC','cdpEndpoint','618760RRoZZw','ewSHJ','tHiiD','ENOENT','map','chromium','path','czrZx','rJkhv','repeat','qUZYS','headers','dggAs','YKqLS','playwright-cli','stagehand','towex','QNrCo','CtYgC','HBltW','mLyPE','nova-user-data','1558106duMWzf','catch'];_0x2695=function(){return _0x1d383b;};return _0x2695();}function legacyWriteError(_0x15f46b,_0x489607){const _0x1df971=_0x24f2;return new Error(_0x1df971(0x107)+_0x15f46b+'\x22\x20to\x20legacy\x20path\x20'+_0x489607+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x1df971(0xd7)+_0x1df971(0x10b));}export function findExistingEnv(_0x3fc59f,_0x1e7e70){const _0x1725bb=_0x24f2,_0x5c7a50={'AnpPL':function(_0x1ab32e){return _0x1ab32e();},'zTzIP':function(_0x39c60e,_0x120bb3,_0x4c9743){return _0x39c60e(_0x120bb3,_0x4c9743);},'isDsT':_0x1725bb(0x119),'UeaEO':function(_0x4594f5,_0x545afa,_0x5d6810,_0x39949b){return _0x4594f5(_0x545afa,_0x5d6810,_0x39949b);},'cpNnz':function(_0x302d9c,_0x54bbbd){return _0x302d9c(_0x54bbbd);},'ptmoc':function(_0x1e1fc3,_0x3433e5){return _0x1e1fc3===_0x3433e5;},'ENFhQ':_0x1725bb(0x10c),'IzPAg':function(_0x396a02,_0x101d59){return _0x396a02===_0x101d59;}},_0x917c5d=_0x1e7e70?.['rangerDir'],_0xef8f1f=_0x917c5d?[_0x917c5d]:[_0x5c7a50['AnpPL'](getRangerDir),getRangerHomeDir()][_0x1725bb(0x110)]((_0x98f5b8,_0x474c79,_0x1751c6)=>_0x1751c6[_0x1725bb(0x105)](_0x98f5b8)===_0x474c79),_0x64b35=_0x1e7e70?.[_0x1725bb(0xdd)]??['ci',_0x1725bb(0x119),_0x1725bb(0x10c)];for(const _0x50a86e of _0xef8f1f){const _0x24af4c=_0x5c7a50['zTzIP'](join,_0x50a86e,_0x5c7a50['isDsT']),_0x39210d=_0x5c7a50[_0x1725bb(0x103)](join,_0x50a86e,'ci'),_0x5b3406=[{'location':'ci','path':_0x5c7a50[_0x1725bb(0x118)](join,_0x50a86e,'ci',_0x3fc59f)},{'location':_0x5c7a50['isDsT'],'path':join(_0x50a86e,'local',_0x3fc59f)},{'location':'legacy','path':join(_0x50a86e,_0x3fc59f)}];for(const _0x33a9e8 of _0x5b3406){if(_0x64b35[_0x1725bb(0x11b)](_0x33a9e8[_0x1725bb(0xe4)])&&_0x5c7a50['cpNnz'](existsSync,_0x33a9e8['path'])){if(_0x5c7a50['ptmoc'](_0x33a9e8['location'],_0x5c7a50['ENFhQ'])&&(_0x5c7a50[_0x1725bb(0xd9)](_0x33a9e8['path'],_0x24af4c)||_0x33a9e8[_0x1725bb(0xf0)]===_0x39210d)&&!hasLegacyProfileFiles(_0x33a9e8[_0x1725bb(0xf0)]))continue;return{'path':_0x33a9e8['path'],'location':_0x33a9e8[_0x1725bb(0xe4)]};}}}return null;}function hasLegacyProfileFiles(_0x264491){const _0x25c84a=_0x24f2,_0x3452ab={'wXeTn':function(_0xbebf9a,_0x50b82d,_0xbac6df){return _0xbebf9a(_0x50b82d,_0xbac6df);},'mSerM':function(_0x971543,_0x845153,_0x2eef87){return _0x971543(_0x845153,_0x2eef87);}};return existsSync(_0x3452ab[_0x25c84a(0x113)](join,_0x264491,'settings.json'))||existsSync(_0x3452ab[_0x25c84a(0xcb)](join,_0x264491,_0x25c84a(0x10f)))||existsSync(join(_0x264491,_0x25c84a(0xcf)));}export function isEnvCi(_0x3dcc37){const _0x353847=_0x24f2,_0x9cb3d1={'DOsyZ':function(_0xf690d2,_0x408a1b){return _0xf690d2(_0x408a1b);},'LgfjY':function(_0x403b40,_0x591ffb,_0x20e05a,_0x269bdf){return _0x403b40(_0x591ffb,_0x20e05a,_0x269bdf);},'PZxbs':function(_0x3945c8){return _0x3945c8();},'fQDlP':function(_0x18af47,_0x3ca6d7){return _0x18af47!==_0x3ca6d7;},'tlkml':function(_0x154b1e,_0x3d65c8,_0xe96576,_0x3971f1){return _0x154b1e(_0x3d65c8,_0xe96576,_0x3971f1);}};if(_0x9cb3d1[_0x353847(0x111)](existsSync,_0x9cb3d1[_0x353847(0xc5)](join,getRangerDir(),'ci',_0x3dcc37)))return!![];const _0x47eba9=_0x9cb3d1['PZxbs'](getRangerHomeDir);if(_0x9cb3d1[_0x353847(0xbd)](_0x47eba9,_0x9cb3d1['PZxbs'](getRangerDir))&&existsSync(_0x9cb3d1[_0x353847(0x128)](join,_0x47eba9,'ci',_0x3dcc37)))return!![];return![];}export async function cleanupTempFiles(_0x2b455e){const _0xab0929=_0x24f2,_0x4d4097=[_0x2b455e[_0xab0929(0xde)],_0x2b455e['configPath']]['filter'](Boolean);await Promise[_0xab0929(0xe3)](_0x4d4097[_0xab0929(0xee)](_0x170b22=>unlink(_0x170b22)['catch'](_0x515dc0=>{const _0x4868f3=_0xab0929;_0x515dc0[_0x4868f3(0xe7)]!==_0x4868f3(0xed)&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x170b22+':',_0x515dc0[_0x4868f3(0xab)]);})));}export function getSettingsPath(_0x53bab0){const _0x4f2e37={'rOJqu':function(_0x2c97a6,_0xb52035,_0x8bd96d){return _0x2c97a6(_0xb52035,_0x8bd96d);},'Qtrdi':'settings.json'};return _0x4f2e37['rOJqu'](join,getEnvDir(_0x53bab0),_0x4f2e37['Qtrdi']);}export async function loadSettings(_0x2f03fa){const _0x25fcf1=_0x24f2,_0x594e5f={'DXdKs':function(_0x25b482,_0xe6ce08){return _0x25b482(_0xe6ce08);},'Cswjr':function(_0x5c812d,_0xfe7cb3,_0x3fde9d){return _0x5c812d(_0xfe7cb3,_0x3fde9d);}},_0x2e38a8=_0x594e5f[_0x25fcf1(0x112)](getSettingsPath,_0x2f03fa);if(!existsSync(_0x2e38a8))return{};try{const _0x479b52=await _0x594e5f[_0x25fcf1(0xd4)](readFile,_0x2e38a8,'utf-8');return JSON['parse'](_0x479b52);}catch{return{};}}export async function saveSettings(_0x47090b,_0x5fd6c9){const _0x494576=_0x24f2,_0x5b197e={'UltzP':function(_0x2e3d81,_0x54825f){return _0x2e3d81(_0x54825f);}},_0x66f35c=getSettingsPath(_0x47090b),_0x245304=_0x5b197e['UltzP'](dirname,_0x66f35c);!_0x5b197e[_0x494576(0xce)](existsSync,_0x245304)&&await mkdir(_0x245304,{'recursive':!![]}),await writeFile(_0x66f35c,JSON[_0x494576(0xbc)](_0x5fd6c9,null,0x2));}export function resolveEnvVars(_0x4a9dc0){const _0x238cd5=_0x24f2,_0x1b80a8={'Sghfa':function(_0x3404cc,_0x4ca29d){return _0x3404cc===_0x4ca29d;},'czrZx':_0x238cd5(0xb4)};if(typeof _0x4a9dc0===_0x238cd5(0x120))return _0x4a9dc0[_0x238cd5(0xb6)](/\$\{(\w+)\}/g,(_0x8c160d,_0x278d7a)=>{const _0x17a400=_0x238cd5,_0x4eee6c=process['env'][_0x278d7a];if(_0x1b80a8[_0x17a400(0x102)](_0x4eee6c,undefined))throw new Error('Environment\x20variable\x20'+_0x278d7a+'\x20is\x20not\x20set');return _0x4eee6c;});if(Array[_0x238cd5(0xae)](_0x4a9dc0))return _0x4a9dc0[_0x238cd5(0xee)](resolveEnvVars);if(_0x4a9dc0&&_0x1b80a8['Sghfa'](typeof _0x4a9dc0,_0x1b80a8[_0x238cd5(0xf1)]))return Object[_0x238cd5(0xd8)](Object[_0x238cd5(0xac)](_0x4a9dc0)[_0x238cd5(0xee)](([_0x502bd1,_0x13af4b])=>[_0x502bd1,resolveEnvVars(_0x13af4b)]));return _0x4a9dc0;}const isRecord=_0x1f2b07=>typeof _0x1f2b07===_0x231513(0xb4)&&_0x1f2b07!==null&&!Array['isArray'](_0x1f2b07),asRecord=_0x435501=>isRecord(_0x435501)?_0x435501:undefined,mergeHeaders=(_0x45476d,_0x376958)=>{const _0x328833=_0x231513,_0x425c34={..._0x45476d??{},..._0x376958??{}};return Object[_0x328833(0xba)](_0x425c34)[_0x328833(0xd2)]?_0x425c34:undefined;},SAFE_MODE_ARGS=[_0x231513(0xb7)],ALLOW_LOCALHOST_ARGS=[_0x231513(0x10a),_0x231513(0xd3),_0x231513(0xb0),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x5a6ad2,_0xc5e810={}){const _0x2ad086=_0x231513,_0x3b0a21={'oTBui':function(_0x311a51,_0x1a8d3e){return _0x311a51===_0x1a8d3e;},'mMDIa':function(_0x5093b6,_0x36fe25,_0xf14c08){return _0x5093b6(_0x36fe25,_0xf14c08);},'ISGwu':function(_0x4bbf44,_0x245023){return _0x4bbf44(_0x245023);}},_0x5ebf6b=asRecord(_0x5a6ad2['browser']),_0x48df40={...asRecord(_0x5ebf6b?.[_0x2ad086(0xd0)])??{}};typeof _0xc5e810['headless']==='boolean'&&(_0x48df40['headless']=_0xc5e810[_0x2ad086(0xd6)]);if(_0x5a6ad2['safeMode']){const _0x1d60f4=_0x48df40['args']??[],_0x214f33=SAFE_MODE_ARGS[_0x2ad086(0x110)](_0x298ff8=>!_0x1d60f4[_0x2ad086(0x11b)](_0x298ff8));_0x48df40[_0x2ad086(0x106)]=[..._0x1d60f4,..._0x214f33];}if(_0x5a6ad2['allowInsecureLocalhost']){const _0x328f44=_0x48df40[_0x2ad086(0x106)]??[],_0x48a770=ALLOW_LOCALHOST_ARGS['filter'](_0x42fb97=>!_0x328f44['includes'](_0x42fb97));_0x48df40[_0x2ad086(0x106)]=[..._0x328f44,..._0x48a770];}const _0x4cfd74={...asRecord(_0x5ebf6b?.['contextOptions'])??{}};_0x4cfd74['ignoreHTTPSErrors']=!![];_0x3b0a21['oTBui'](typeof _0x5a6ad2[_0x2ad086(0xe5)],'string')&&(_0x4cfd74[_0x2ad086(0xe5)]=_0x5a6ad2['userAgent']);const _0x13ba27=_0x3b0a21['mMDIa'](mergeHeaders,_0x3b0a21[_0x2ad086(0xdf)](asRecord,_0x4cfd74[_0x2ad086(0xdb)]),asRecord(_0x5a6ad2[_0x2ad086(0xf5)]));return _0x13ba27?_0x4cfd74[_0x2ad086(0xdb)]=_0x13ba27:delete _0x4cfd74[_0x2ad086(0xdb)],_0xc5e810[_0x2ad086(0xbf)]&&(_0x4cfd74['storageState']=_0xc5e810[_0x2ad086(0xbf)]),{'launchOptions':_0x48df40,'contextOptions':_0x4cfd74};}export async function resolveProfileStorageState(_0xe74d73){const _0xaffb07={'qnxsZ':function(_0x373d72,_0x9c7e92){return _0x373d72(_0x9c7e92);}};return _0xaffb07['qnxsZ'](resolveLocalAuthPath,getEnvDir(_0xe74d73));}async function resolveLocalAuthPath(_0x25a3e9){const _0x5b31bd=_0x231513,_0x51c972={'qckNh':'auth.json.enc','zPEQO':function(_0x1745aa,_0x2d42b6,_0x18c5fb){return _0x1745aa(_0x2d42b6,_0x18c5fb);},'tTmyf':'auth.json','EhqnK':function(_0x3204d5){return _0x3204d5();},'ieeOT':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','HtiSq':function(_0x20f5bf,_0x3518fc){return _0x20f5bf(_0x3518fc);},'BgbIM':function(_0x28f976,_0x8e6ab7,_0x32b701){return _0x28f976(_0x8e6ab7,_0x32b701);},'aoErf':function(_0x400078){return _0x400078();},'YIZcj':function(_0x47582f,_0x4fdb3f){return _0x47582f instanceof _0x4fdb3f;},'GSYqT':function(_0x548059,_0x3c558a){return _0x548059(_0x3c558a);}},_0x384d78=join(_0x25a3e9,_0x51c972[_0x5b31bd(0x127)]),_0x11b435=_0x51c972['zPEQO'](join,_0x25a3e9,_0x51c972[_0x5b31bd(0xb5)]);if(existsSync(_0x384d78))try{const _0x53746a=await _0x51c972['EhqnK'](getToken);if(!_0x53746a)throw new Error(_0x51c972[_0x5b31bd(0xc9)]);const _0x5729a5=await _0x51c972[_0x5b31bd(0xcc)](readFile,_0x384d78),_0x15bb02=_0x51c972['BgbIM'](decrypt,_0x5729a5,_0x53746a),_0x4a9108=_0x51c972['zPEQO'](join,_0x51c972['aoErf'](tmpdir),'ranger-auth-'+Date[_0x5b31bd(0xc0)]()+'.json');return await writeFile(_0x4a9108,_0x15bb02),{'storageStatePath':_0x4a9108,'tempAuthPath':_0x4a9108};}catch(_0x24e8e0){const _0x349c9b=_0x51c972['YIZcj'](_0x24e8e0,Error)?_0x24e8e0['message']:_0x51c972['GSYqT'](String,_0x24e8e0);throw new Error(_0x5b31bd(0xca)+_0x349c9b);}if(_0x51c972['GSYqT'](existsSync,_0x11b435))return{'storageStatePath':_0x11b435};return{};}export async function buildPlaywrightConfig(_0xa5502c,_0x6bd1a1,_0x1e2041,_0x2be100,_0x52d5e7){const _0x5d56c8=_0x231513,_0xd34f68={'mLyPE':function(_0x55e174,_0x3d5416){return _0x55e174(_0x3d5416);},'vORFK':function(_0x1d39a3,_0x3755c4,_0x556ccd,_0x3736b8,_0x107f4e,_0x21e21c,_0x16ba30){return _0x1d39a3(_0x3755c4,_0x556ccd,_0x3736b8,_0x107f4e,_0x21e21c,_0x16ba30);},'vxpHo':'stagehand'};if(_0x52d5e7)return buildPlaywrightConfigCore(_0xa5502c,_0x52d5e7,_0x6bd1a1,_0x1e2041,_0x2be100,_0x5d56c8(0xf9));const {storageStatePath:_0x1b0067,tempAuthPath:_0xc1ce94}=await _0xd34f68[_0x5d56c8(0xfe)](resolveLocalAuthPath,getEnvDir(_0x6bd1a1));try{const _0x271e8d=await _0xd34f68['vORFK'](buildPlaywrightConfigCore,_0xa5502c,_0x1b0067,_0x6bd1a1,_0x1e2041,_0x2be100,_0xd34f68['vxpHo']);return{..._0x271e8d,'tempAuthPath':_0xc1ce94};}catch(_0x4fbc10){_0xc1ce94&&await unlink(_0xc1ce94)[_0x5d56c8(0x101)](()=>{});throw _0x4fbc10;}}export async function buildPlaywrightConfigCore(_0x3e4026,_0xba1c9d,_0x4b76a0,_0x1cc6aa,_0x1bc1ca,_0x2e58a5=_0x231513(0xf9)){const _0x5c3cf7=_0x231513,_0x167eab={'wecoP':function(_0x1938f9,_0x198804){return _0x1938f9===_0x198804;},'SliGV':'--no-sandbox','HBltW':'clipboard-write','hgyyv':function(_0x357b70,_0x403ebc){return _0x357b70(_0x403ebc);},'rzuuP':'chromium','LKGUz':_0x5c3cf7(0xf8),'ETXEm':_0x5c3cf7(0xb9),'FdEFl':_0x5c3cf7(0x122),'vNlfC':_0x5c3cf7(0x11d),'PmqJN':function(_0x254932,_0x2c58a5){return _0x254932===_0x2c58a5;},'RxdkZ':function(_0x23842b,_0x2f48c3,_0x159a57){return _0x23842b(_0x2f48c3,_0x159a57);},'xxfcs':_0x5c3cf7(0x117),'YKqLS':'-cli'},_0x4b57fe=_0x1cc6aa||randomUUID(),_0xe03ddc=join(getRangerDir(),'sessions',_0x4b57fe),_0x52f30a=_0x167eab['hgyyv'](Boolean,_0x3e4026[_0x5c3cf7(0xe9)]),_0xd3550a=_0x52f30a?{'browserName':_0x167eab['rzuuP'],'cdpEndpoint':_0x3e4026['cdpEndpoint']}:((()=>{const _0x474fe7=_0x5c3cf7,{launchOptions:_0x29c57b,contextOptions:_0x11a6c1}=buildBrowserOptionsFromSettings(_0x3e4026,{'headless':_0x1bc1ca?![]:_0x3e4026[_0x474fe7(0xd6)]??!![],'storageStatePath':_0xba1c9d});if(_0x167eab['wecoP'](process['getuid']?.(),0x0)){const _0x60581e=[_0x167eab[_0x474fe7(0x11c)],'--disable-setuid-sandbox'],_0x468d93=_0x29c57b['args']??[],_0xe10c2a=_0x60581e['filter'](_0x23c75b=>!_0x468d93[_0x474fe7(0x11b)](_0x23c75b));_0x29c57b[_0x474fe7(0x106)]=[..._0x468d93,..._0xe10c2a];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x29c57b,'contextOptions':{..._0x11a6c1,'permissions':['clipboard-read',_0x167eab[_0x474fe7(0xfd)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x22a0fa=_0x167eab['wecoP'](_0x2e58a5,_0x167eab[_0x5c3cf7(0xb2)])?{'browser':_0xd3550a,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xe03ddc,'outputMode':_0x5c3cf7(0x114),'codegen':'none'}:{'name':_0x4b76a0,'browser':_0xd3550a,'capabilities':['core',_0x167eab['ETXEm'],_0x167eab[_0x5c3cf7(0xdc)],'pdf',_0x167eab[_0x5c3cf7(0xc2)]],'imageResponses':_0x5c3cf7(0xda),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xe03ddc};if(!_0x52f30a){const _0x3f536f=_0x22a0fa['browser'],_0x215028=_0x3f536f[_0x5c3cf7(0xb3)];if(_0x167eab[_0x5c3cf7(0xd1)](_0x215028[_0x5c3cf7(0xe5)],undefined))delete _0x215028['userAgent'];if(_0x215028['storageState']===undefined)delete _0x215028[_0x5c3cf7(0xe1)];}const _0x153ffc=_0x167eab['RxdkZ'](join,tmpdir(),_0x167eab[_0x5c3cf7(0x116)]);!existsSync(_0x153ffc)&&await mkdir(_0x153ffc,{'recursive':!![]});const _0x24aa15=_0x167eab['PmqJN'](_0x2e58a5,'playwright-cli')?_0x167eab[_0x5c3cf7(0xf7)]:'',_0x229ecf=_0x167eab['RxdkZ'](join,_0x153ffc,_0x4b76a0+'-'+Date['now']()+_0x24aa15+'.json');return await writeFile(_0x229ecf,JSON['stringify'](_0x22a0fa,null,0x2)),{'configPath':_0x229ecf,'storageStatePath':_0xba1c9d};}export async function buildPlaywrightCliConfig(_0xb94e09,_0x649c79,_0x1c96c2,_0x535c45,_0x343b68){const _0x159bca=_0x231513,_0x4fba9e={'cKWxn':function(_0x101156,_0x527c9a,_0x24aa2c,_0x4c0df1,_0x54fe77,_0x2fdef2,_0xa0ba40){return _0x101156(_0x527c9a,_0x24aa2c,_0x4c0df1,_0x54fe77,_0x2fdef2,_0xa0ba40);},'sNIOQ':function(_0x5c64f6,_0x4a242a){return _0x5c64f6(_0x4a242a);},'tHiiD':_0x159bca(0xf8)};if(_0x343b68)return _0x4fba9e[_0x159bca(0xbe)](buildPlaywrightConfigCore,_0xb94e09,_0x343b68,_0x649c79,_0x1c96c2,_0x535c45,'playwright-cli');const {storageStatePath:_0x37bff9,tempAuthPath:_0x11715e}=await _0x4fba9e['sNIOQ'](resolveLocalAuthPath,getEnvDir(_0x649c79));try{const _0x19364e=await buildPlaywrightConfigCore(_0xb94e09,_0x37bff9,_0x649c79,_0x1c96c2,_0x535c45,_0x4fba9e[_0x159bca(0xec)]);return{..._0x19364e,'tempAuthPath':_0x11715e};}catch(_0x37a063){_0x11715e&&await unlink(_0x11715e)['catch'](()=>{});throw _0x37a063;}}export async function buildRangerwrightCliConfig(_0x231b66,_0xb46bbd,_0x49392a,_0xd20f54,_0x3890d0){const _0x497afb=_0x231513,_0x2c4080={'xYtuZ':function(_0x3ae340,_0x25fd05){return _0x3ae340===_0x25fd05;},'hBxvm':'--disable-setuid-sandbox','xlxBa':_0x497afb(0xef),'zGpFO':function(_0x5d7a71,_0x2d572c){return _0x5d7a71(_0x2d572c);},'tnIoO':function(_0x2c3bb8){return _0x2c3bb8();},'UNaDo':function(_0x12a901,_0x4296d4,_0x4ce32e){return _0x12a901(_0x4296d4,_0x4ce32e);},'ewSHJ':function(_0xb09a9e,_0x295800){return _0xb09a9e(_0x295800);},'gsNTx':function(_0x2d9d34,_0xcf56b2,_0x29633c){return _0x2d9d34(_0xcf56b2,_0x29633c);}},{storageStatePath:_0x38ba9d,tempAuthPath:_0x323206}=_0x3890d0?{'storageStatePath':_0x3890d0,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x2c4080['zGpFO'](getEnvDir,_0xb46bbd)),_0x1f8b35=_0x49392a||_0x2c4080['tnIoO'](randomUUID),_0x3a2fd7=join(getRangerDir(),'sessions',_0x1f8b35),_0x22fbe6=Boolean(_0x231b66[_0x497afb(0xe9)]),_0x44c0a5=_0x22fbe6?{'browserName':_0x2c4080[_0x497afb(0x11f)],'cdpEndpoint':_0x231b66['cdpEndpoint']}:((()=>{const _0x165b63=_0x497afb,{launchOptions:_0x5859c8,contextOptions:_0x3236b4}=buildBrowserOptionsFromSettings(_0x231b66,{'headless':_0xd20f54?![]:_0x231b66['headless']??!![],'storageStatePath':_0x38ba9d});if(_0x2c4080['xYtuZ'](process['getuid']?.(),0x0)){const _0x41ed75=[_0x165b63(0x11e),_0x2c4080['hBxvm']],_0x53d254=_0x5859c8[_0x165b63(0x106)]??[],_0x21bd62=_0x41ed75[_0x165b63(0x110)](_0x4beffc=>!_0x53d254[_0x165b63(0x11b)](_0x4beffc));_0x5859c8['args']=[..._0x53d254,..._0x21bd62];}return{'browserName':_0x2c4080['xlxBa'],'launchOptions':_0x5859c8,'contextOptions':{..._0x3236b4,'permissions':['clipboard-read','clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x22fbe6){const _0x7b4613=_0x44c0a5[_0x497afb(0xb3)];if(_0x7b4613){if(_0x7b4613[_0x497afb(0xe5)]===undefined)delete _0x7b4613['userAgent'];if(_0x7b4613[_0x497afb(0xe1)]===undefined)delete _0x7b4613['storageState'];}}const _0x23889b={'browser':_0x44c0a5,'outputDir':_0x3a2fd7,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4b8f67;try{const _0x5b01ee=_0x2c4080[_0x497afb(0xbb)](join,_0x2c4080['tnIoO'](tmpdir),_0x497afb(0x117));!_0x2c4080[_0x497afb(0xeb)](existsSync,_0x5b01ee)&&await mkdir(_0x5b01ee,{'recursive':!![]}),_0x4b8f67=join(_0x5b01ee,_0xb46bbd+'-'+Date['now']()+_0x497afb(0x109)),await _0x2c4080[_0x497afb(0x10e)](writeFile,_0x4b8f67,JSON[_0x497afb(0xbc)](_0x23889b,null,0x2));}catch(_0x3cda46){_0x323206&&await unlink(_0x323206)[_0x497afb(0x101)](()=>{});throw _0x3cda46;}return{'configPath':_0x4b8f67,'storageStatePath':_0x38ba9d,'tempAuthPath':_0x323206,'outputDir':_0x3a2fd7};}export async function buildNovaActCliConfig(_0x86679,_0x340acb,_0x3e7bc5,_0x3ed65f,_0x1af4a8){const _0x545754=_0x231513,_0x2b6d7f={'dggAs':function(_0x443081,_0x2966b5){return _0x443081(_0x2966b5);},'vpqyB':function(_0x5b8064){return _0x5b8064();},'uEWWk':'sessions','jKSXA':_0x545754(0xff),'YubPz':function(_0x1490b6,_0x4e73ad,_0x18891d){return _0x1490b6(_0x4e73ad,_0x18891d);},'dPKMI':'Default','NkuXc':'--disable-setuid-sandbox'},{storageStatePath:_0x3b293f,tempAuthPath:_0x453eb3}=_0x1af4a8?{'storageStatePath':_0x1af4a8,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x2b6d7f['dggAs'](getEnvDir,_0x340acb)),_0x23a8b5=_0x3e7bc5||randomUUID(),_0x470b33=join(_0x2b6d7f[_0x545754(0x121)](getRangerDir),_0x2b6d7f['uEWWk'],_0x23a8b5),_0x1b562d=join(_0x470b33,_0x2b6d7f['jKSXA']),_0xd8f367=_0x3b293f?_0x2b6d7f[_0x545754(0xc7)](join,_0x1b562d,_0x2b6d7f['dPKMI']):undefined,{launchOptions:_0x423e32,contextOptions:_0x19b60e}=buildBrowserOptionsFromSettings(_0x86679,{'headless':_0x3ed65f?![]:_0x86679['headless']??!![],'storageStatePath':_0x3b293f});if(process['getuid']?.()===0x0){const _0x3b9e84=['--no-sandbox',_0x2b6d7f[_0x545754(0xaf)]],_0x2569be=_0x423e32[_0x545754(0x106)]??[],_0xd815fe=_0x3b9e84[_0x545754(0x110)](_0x143c51=>!_0x2569be['includes'](_0x143c51));_0x423e32[_0x545754(0x106)]=[..._0x2569be,..._0xd815fe];}const _0x321425=typeof _0x423e32[_0x545754(0x115)]===_0x545754(0x120)?_0x423e32['executablePath']:_0x3b293f?chromium['executablePath']():undefined;return{'storageStatePath':_0x3b293f,'tempAuthPath':_0x453eb3,'baseUrl':_0x86679[_0x545754(0x129)],'headless':Boolean(_0x423e32['headless']),'userDataDir':_0x1b562d,'browserProfilePath':_0xd8f367,'executablePath':_0x321425,'launchArgs':Array[_0x545754(0xae)](_0x423e32['args'])?_0x423e32[_0x545754(0x106)][_0x545754(0x110)](_0x44acc7=>typeof _0x44acc7===_0x545754(0x120)):[],'userAgent':typeof _0x19b60e['userAgent']===_0x545754(0x120)?_0x19b60e[_0x545754(0xe5)]:undefined,'extraHTTPHeaders':_0x19b60e['extraHTTPHeaders'],'allowInsecureLocalhost':_0x2b6d7f[_0x545754(0xf6)](Boolean,_0x86679['allowInsecureLocalhost']),'safeMode':Boolean(_0x86679[_0x545754(0x126)]),'cdpEndpoint':_0x86679[_0x545754(0xe9)],'isCdpMode':Boolean(_0x86679['cdpEndpoint'])};}export function getNestedValue(_0xb4943f,_0x1175cd){const _0x12def0=_0x231513,_0x448eaf={'iaREM':function(_0x171d07,_0x48b73e){return _0x171d07(_0x48b73e);},'bASjt':function(_0x2c663c,_0x1f29db){return _0x2c663c===_0x1f29db;},'wIKSB':function(_0xb67d3b,_0x5f1b17){return _0xb67d3b===_0x5f1b17;}},_0x4f6dad=_0x448eaf['iaREM'](parseKeyPath,_0x1175cd);let _0x1c5a43=_0xb4943f;for(const _0x3ca1ed of _0x4f6dad){if(_0x448eaf[_0x12def0(0xc4)](_0x1c5a43,null)||_0x448eaf[_0x12def0(0xc6)](_0x1c5a43,undefined)||typeof _0x1c5a43!==_0x12def0(0xb4))return undefined;_0x1c5a43=_0x1c5a43[_0x3ca1ed];}return _0x1c5a43;}export function setNestedValue(_0x15bf49,_0x3262b0,_0x150a14){const _0x43b7c5=_0x231513,_0x8cbd1c={'seDnU':function(_0xc54ba5,_0x5f46d6){return _0xc54ba5-_0x5f46d6;},'tVzJs':function(_0x353c34,_0x2f3520){return _0x353c34 in _0x2f3520;},'PAVJR':function(_0x1ea6d8,_0x528181){return _0x1ea6d8!==_0x528181;}},_0x291102=parseKeyPath(_0x3262b0);let _0x139a62=_0x15bf49;for(let _0x33f050=0x0;_0x33f050<_0x8cbd1c[_0x43b7c5(0xe2)](_0x291102['length'],0x1);_0x33f050++){const _0x353111=_0x291102[_0x33f050];(!_0x8cbd1c['tVzJs'](_0x353111,_0x139a62)||_0x8cbd1c['PAVJR'](typeof _0x139a62[_0x353111],_0x43b7c5(0xb4)))&&(_0x139a62[_0x353111]={}),_0x139a62=_0x139a62[_0x353111];}_0x139a62[_0x291102[_0x291102['length']-0x1]]=_0x150a14;}export function deleteNestedValue(_0x38693c,_0x4001c9){const _0x1cdc5d=_0x231513,_0x2ff0c4={'jKLUl':function(_0x30ef39,_0x2d6745){return _0x30ef39-_0x2d6745;},'HlZQI':function(_0x485ed5,_0x4d23ad){return _0x485ed5===_0x4d23ad;},'CtYgC':function(_0xa0b497,_0x56b236){return _0xa0b497!==_0x56b236;},'LmqLh':'object','YDQgi':function(_0x46de93,_0x339f79){return _0x46de93===_0x339f79;},'dkJkK':function(_0x57a620,_0x512cfc){return _0x57a620-_0x512cfc;}},_0xee1cf4=parseKeyPath(_0x4001c9);let _0x428d29=_0x38693c;for(let _0x2d81b7=0x0;_0x2d81b7<_0x2ff0c4['jKLUl'](_0xee1cf4['length'],0x1);_0x2d81b7++){if(_0x2ff0c4['HlZQI'](_0x428d29,null)||_0x428d29===undefined||_0x2ff0c4[_0x1cdc5d(0xfc)](typeof _0x428d29,_0x2ff0c4['LmqLh']))return![];_0x428d29=_0x428d29[_0xee1cf4[_0x2d81b7]];}if(_0x2ff0c4[_0x1cdc5d(0x123)](_0x428d29,null)||_0x2ff0c4[_0x1cdc5d(0xb8)](_0x428d29,undefined)||_0x2ff0c4[_0x1cdc5d(0xfc)](typeof _0x428d29,_0x2ff0c4[_0x1cdc5d(0x104)]))return![];const _0x3b7227=_0xee1cf4[_0x2ff0c4['dkJkK'](_0xee1cf4['length'],0x1)];if(_0x3b7227 in _0x428d29)return delete _0x428d29[_0x3b7227],!![];return![];}function parseKeyPath(_0x952cc0){const _0x324719={'Ybnqn':function(_0x1eaec6,_0x4946ea){return _0x1eaec6===_0x4946ea;},'Qvnrq':'setupHeaders'},_0x58e8fb=_0x952cc0['split']('.');return _0x324719['Ybnqn'](_0x58e8fb[0x0],'header')&&(_0x58e8fb[0x0]='headers'),_0x58e8fb[0x0]==='setupHeader'&&(_0x58e8fb[0x0]=_0x324719['Qvnrq']),_0x58e8fb;}export function formatSettings(_0x54b9e0,_0x39f9dc=0x0){const _0x4668ac=_0x231513,_0x35c637={'miWvT':function(_0x52453b,_0x25bbf9){return _0x52453b===_0x25bbf9;},'qUZYS':function(_0x59f6e9,_0x1b16a4){return _0x59f6e9===_0x1b16a4;}},_0x13acdb=[],_0x4a88f4='\x20\x20'[_0x4668ac(0xf3)](_0x39f9dc);for(const [_0x401bd2,_0x171d47]of Object['entries'](_0x54b9e0)){if(_0x35c637['miWvT'](_0x171d47,undefined))continue;if(_0x35c637[_0x4668ac(0xf4)](typeof _0x171d47,_0x4668ac(0xb4))&&_0x171d47!==null){_0x13acdb['push'](''+_0x4a88f4+_0x401bd2+':');for(const [_0x4f397d,_0x2e7c1c]of Object[_0x4668ac(0xac)](_0x171d47)){_0x13acdb['push'](_0x4a88f4+'\x20\x20'+_0x4f397d+':\x20'+_0x2e7c1c);}}else _0x13acdb['push'](''+_0x4a88f4+_0x401bd2+':\x20'+_0x171d47);}return _0x13acdb['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45ca96,_0x41affb){const _0x24892a=_0x5ee1,_0x41103b=_0x45ca96();while(!![]){try{const _0x54ab9b=-parseInt(_0x24892a(0x11d))/0x1*(parseInt(_0x24892a(0x122))/0x2)+-parseInt(_0x24892a(0x128))/0x3*(-parseInt(_0x24892a(0x124))/0x4)+parseInt(_0x24892a(0x11f))/0x5*(-parseInt(_0x24892a(0x120))/0x6)+-parseInt(_0x24892a(0x127))/0x7*(-parseInt(_0x24892a(0x121))/0x8)+-parseInt(_0x24892a(0x123))/0x9+-parseInt(_0x24892a(0x126))/0xa*(-parseInt(_0x24892a(0x125))/0xb)+-parseInt(_0x24892a(0x12b))/0xc*(parseInt(_0x24892a(0x11e))/0xd);if(_0x54ab9b===_0x41affb)break;else _0x41103b['push'](_0x41103b['shift']());}catch(_0x2864e3){_0x41103b['push'](_0x41103b['shift']());}}}(_0x5eba,0xbc1df));import{readFileSync}from'fs';function _0x5eba(){const _0x222219=['26hysipo','5SjGlwi','3003276ztJsnj','56beQosS','96BQuwYz','1854819iLWwBj','4keegHR','6441017mQlVhT','10ffcAcT','184919ineimo','4115634fQWhFy','utf-8','skills','2960328lUjCNY','HIRyJ','3579yLKsuF'];_0x5eba=function(){return _0x222219;};return _0x5eba();}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x1ea157){const _0x732ad2=_0x5ee1,_0x54e395={'tfFAk':function(_0x1724df,_0xc42b5c,_0x55c3d8){return _0x1724df(_0xc42b5c,_0x55c3d8);}},_0x1e60ff=join(__dirname,'..','..',_0x732ad2(0x12a)),_0x4bc1d0=join(_0x1e60ff,_0x1ea157);try{return _0x54e395['tfFAk'](readFileSync,_0x4bc1d0,_0x732ad2(0x129));}catch{return'';}}function _0x5ee1(_0x34779f,_0x1ecf0f){_0x34779f=_0x34779f-0x11c;const _0x5ebab7=_0x5eba();let _0x5ee19f=_0x5ebab7[_0x34779f];return _0x5ee19f;}export function getRangerSkillContent(){const _0x2ef212=_0x5ee1,_0x5b1178={'HIRyJ':function(_0x2e1785,_0xf92448){return _0x2e1785(_0xf92448);}};return _0x5b1178[_0x2ef212(0x11c)](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0xc3041e=_0x7c7e;(function(_0x1add21,_0x34508b){const _0x2dfb83=_0x7c7e,_0x1edfca=_0x1add21();while(!![]){try{const _0x2f5003=-parseInt(_0x2dfb83(0x184))/0x1+-parseInt(_0x2dfb83(0x177))/0x2+parseInt(_0x2dfb83(0x17f))/0x3*(parseInt(_0x2dfb83(0x180))/0x4)+-parseInt(_0x2dfb83(0x18b))/0x5*(parseInt(_0x2dfb83(0x17b))/0x6)+-parseInt(_0x2dfb83(0x189))/0x7*(parseInt(_0x2dfb83(0x174))/0x8)+parseInt(_0x2dfb83(0x192))/0x9+parseInt(_0x2dfb83(0x18f))/0xa*(parseInt(_0x2dfb83(0x188))/0xb);if(_0x2f5003===_0x34508b)break;else _0x1edfca['push'](_0x1edfca['shift']());}catch(_0x1d2665){_0x1edfca['push'](_0x1edfca['shift']());}}}(_0x4262,0x565e5));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';function _0x7c7e(_0x1aaad9,_0x11b4ba){_0x1aaad9=_0x1aaad9-0x16d;const _0x4262c5=_0x4262();let _0x7c7e44=_0x4262c5[_0x1aaad9];return _0x7c7e44;}function _0x4262(){const _0xd66daa=['80Mcmtxp','bug-bash','zySFk','match','460tbyumw','dhUJE','whDpl','6176610ikSXOY','HUemg','utf-8','catch','PJxis','\x20\x20Files:\x20','\x20\x20Location:\x20','dvBzm','ranger','216QxdWDj','warn','trim','27142fYcTfQ','e2e-test-recommender','.md','FCHlH','141090DiPjXa','SKILL.md','XOpSc','length','141YxkoeG','876OTjBEZ','iAYNt','log','\x20\x20Removed\x20deprecated\x20skill:\x20','168147erSRIT','Invalid\x20skill\x20frontmatter','fSJXY','join','95777dRQdEo','48062glFjsU','xNTnH'];_0x4262=function(){return _0xd66daa;};return _0x4262();}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=[_0xc3041e(0x173)];export const DEPRECATED_SKILLS=[_0xc3041e(0x178),_0xc3041e(0x18c),'feature-tracker'];export async function installSkill(_0x11fe2f,_0x5e004c={}){const _0x298977=_0xc3041e,_0x31dca3={'dhUJE':'project','TjrTV':'claude','fSJXY':function(_0x1214c2){return _0x1214c2();},'iAYNt':function(_0x5d5f27,_0x305ea8,_0xdd705f){return _0x5d5f27(_0x305ea8,_0xdd705f);},'FCHlH':function(_0x2c4f62,_0x5c721b){return _0x2c4f62(_0x5c721b);},'zySFk':function(_0x18c62,_0x364967,_0x2ff9e1){return _0x18c62(_0x364967,_0x2ff9e1);},'SlNSp':function(_0x293bf2,_0x13a005){return _0x293bf2(_0x13a005);},'PxnqU':_0x298977(0x17c),'HUemg':_0x298977(0x16d),'xNTnH':function(_0x3da74e,_0xe14db,_0x1dffab){return _0x3da74e(_0xe14db,_0x1dffab);},'PJxis':function(_0x12f786,_0x22ce75,_0xc1e631){return _0x12f786(_0x22ce75,_0xc1e631);},'whDpl':function(_0x2f28c0,_0x5204d8,_0x1ab5f7,_0x27effe){return _0x2f28c0(_0x5204d8,_0x1ab5f7,_0x27effe);},'dvBzm':function(_0x1230f6,_0x1ce2e1){return _0x1230f6(_0x1ce2e1);},'Cimkt':function(_0x35013a,_0x82976f,_0x5544d3,_0x41b14c){return _0x35013a(_0x82976f,_0x5544d3,_0x41b14c);}},{level:level=_0x31dca3[_0x298977(0x190)],cliVersion:_0x5d3888,platform:platform=_0x31dca3['TjrTV']}=_0x5e004c,_0x48e656=_0x31dca3[_0x298977(0x186)](getSourceSkillsDir),_0x55ad9b=join(_0x48e656,_0x11fe2f),_0x359f8b=_0x31dca3['iAYNt'](join,_0x48e656,_0x11fe2f+'.md'),_0x890094=existsSync(_0x55ad9b)&&_0x31dca3[_0x298977(0x17a)](statSync,_0x55ad9b)['isDirectory']()&&existsSync(_0x31dca3[_0x298977(0x18d)](join,_0x55ad9b,_0x298977(0x17c))),_0x3ba5c9=existsSync(_0x359f8b);if(!_0x890094&&!_0x3ba5c9)return console[_0x298977(0x175)]('\x20\x20Skill\x20not\x20found:\x20'+_0x11fe2f),![];const _0x22660c=platform==='opencode'?getOpencodeSkillsDir(level):getSkillsDir(level),_0x4675d0=join(_0x22660c,_0x11fe2f);await _0x31dca3[_0x298977(0x181)](mkdir,_0x4675d0,{'recursive':!![]});let _0x1b2936,_0x5b7586=[];if(_0x890094){const _0x37a2ac=await _0x31dca3['SlNSp'](readdir,_0x55ad9b),_0x44c71b=_0x37a2ac['filter'](_0x37d759=>_0x37d759['endsWith'](_0x298977(0x179)));for(const _0x24942b of _0x44c71b){const _0x298985=_0x31dca3[_0x298977(0x18d)](join,_0x55ad9b,_0x24942b),_0x595a96=join(_0x4675d0,_0x24942b);await copyFile(_0x298985,_0x595a96),_0x5b7586['push'](_0x24942b);}_0x1b2936=await _0x31dca3[_0x298977(0x18d)](readFile,join(_0x55ad9b,_0x31dca3['PxnqU']),_0x31dca3[_0x298977(0x193)]);}else{_0x1b2936=await _0x31dca3[_0x298977(0x18a)](readFile,_0x359f8b,'utf-8');const _0x526de5=_0x31dca3[_0x298977(0x16f)](join,_0x4675d0,_0x31dca3['PxnqU']);await _0x31dca3[_0x298977(0x191)](writeFile,_0x526de5,_0x1b2936,_0x298977(0x16d)),_0x5b7586['push']('SKILL.md');}const {name:_0x7e6f75}=_0x31dca3[_0x298977(0x172)](parseFrontmatter,_0x1b2936);return console[_0x298977(0x182)]('\x20\x20Installed\x20skill:\x20'+_0x7e6f75),console['log'](_0x298977(0x171)+_0x4675d0),_0x5b7586[_0x298977(0x17e)]>0x1&&console['log'](_0x298977(0x170)+_0x5b7586[_0x298977(0x187)](',\x20')),_0x31dca3['Cimkt'](logLocalAgentInstallation,_0x11fe2f,{'skillDisplayName':_0x7e6f75,'installLevel':level},_0x5d3888)[_0x298977(0x16e)](()=>{}),!![];}function getSourceSkillsDir(){const _0x4c2b04=_0xc3041e,_0x4e4c78={'XOpSc':'skills'},_0x54e42e=[join(__dirname,'..','..',_0x4e4c78['XOpSc']),join(__dirname,'..','..','..',_0x4e4c78[_0x4c2b04(0x17d)])];for(const _0x55e5e0 of _0x54e42e){if(existsSync(_0x55e5e0))return _0x55e5e0;}return _0x54e42e[0x0];}function parseFrontmatter(_0x176d6c){const _0x8fddd8=_0xc3041e,_0x2aa2fd={'RnmDr':_0x8fddd8(0x185)},_0x103dfa=_0x176d6c[_0x8fddd8(0x18e)](/^---\n([\s\S]+?)\n---/);if(!_0x103dfa)throw new Error(_0x2aa2fd['RnmDr']);const _0x2281cd=_0x103dfa[0x1],_0x2d244c=_0x2281cd['match'](/name:\s*(.+)/),_0x3763f9=_0x2281cd[_0x8fddd8(0x18e)](/description:\s*"?(.+?)"?\n/);return{'name':_0x2d244c?.[0x1][_0x8fddd8(0x176)]()||'','description':_0x3763f9?.[0x1]['trim']()||''};}export async function removeSkill(_0x1412d4,_0x1cd947){const _0x53b021=_0xc3041e,_0x7b29c7={'OOEFb':function(_0x1b2505,_0xb143e0,_0xa3360f){return _0x1b2505(_0xb143e0,_0xa3360f);}},_0x4b5c35=getSkillsDir(_0x1cd947),_0x4188cf=_0x7b29c7['OOEFb'](join,_0x4b5c35,_0x1412d4);if(!existsSync(_0x4188cf))return![];try{return await rm(_0x4188cf,{'recursive':!![]}),console['log'](_0x53b021(0x183)+_0x1412d4),!![];}catch{return console[_0x53b021(0x175)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x1412d4),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd8e7bb=_0x81fe;(function(_0xd5875b,_0x575a50){const _0x5f5364=_0x81fe,_0x28453d=_0xd5875b();while(!![]){try{const _0x484998=parseInt(_0x5f5364(0x1a6))/0x1*(-parseInt(_0x5f5364(0x1b8))/0x2)+parseInt(_0x5f5364(0x1c5))/0x3+-parseInt(_0x5f5364(0x1a1))/0x4+parseInt(_0x5f5364(0x1ce))/0x5*(-parseInt(_0x5f5364(0x1b2))/0x6)+-parseInt(_0x5f5364(0x193))/0x7+-parseInt(_0x5f5364(0x1b7))/0x8*(parseInt(_0x5f5364(0x1ae))/0x9)+-parseInt(_0x5f5364(0x18f))/0xa*(-parseInt(_0x5f5364(0x1ca))/0xb);if(_0x484998===_0x575a50)break;else _0x28453d['push'](_0x28453d['shift']());}catch(_0x478708){_0x28453d['push'](_0x28453d['shift']());}}}(_0x1149,0xc8f89));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(_0x3e8148,_0x384ecd){const _0x1810ef=_0x81fe,_0x3994da={'huOFc':function(_0x59d9cd,_0x275394){return _0x59d9cd>=_0x275394;},'DCnWP':function(_0x515d92,_0x4439e0){return _0x515d92<=_0x4439e0;},'lKHZo':function(_0x15bf16,_0x45a84d){return _0x15bf16>_0x45a84d;},'tcsnU':function(_0x218881,_0x4626c4){return _0x218881+_0x4626c4;},'HxjZA':function(_0x1c0869,_0x1c27fa){return _0x1c0869-_0x1c27fa;},'bfbDq':function(_0x1c00ce,_0x112639){return _0x1c00ce<_0x112639;},'WpfTU':function(_0x53931e,_0x37dd32){return _0x53931e+_0x37dd32;}};if(_0x3994da[_0x1810ef(0x1c2)](_0x384ecd,_0x3e8148[_0x1810ef(0x1ac)]))return[0x0,0x0];const _0x5b061c=_0x3e8148[_0x384ecd];let _0x2010c0=0x1,_0x299cbc=0x80;while(_0x3994da['DCnWP'](_0x2010c0,0x8)&&!(_0x5b061c&_0x299cbc)){_0x2010c0++,_0x299cbc>>=0x1;}if(_0x3994da[_0x1810ef(0x1bd)](_0x3994da['tcsnU'](_0x384ecd,_0x2010c0),_0x3e8148[_0x1810ef(0x1ac)]))return[0x0,0x0];let _0x1c9cae=_0x5b061c&_0x3994da[_0x1810ef(0x1c4)](_0x299cbc,0x1);for(let _0x3a35ce=0x1;_0x3994da[_0x1810ef(0x1ba)](_0x3a35ce,_0x2010c0);_0x3a35ce++){_0x1c9cae=_0x1c9cae*0x100+_0x3e8148[_0x3994da['WpfTU'](_0x384ecd,_0x3a35ce)];}return[_0x1c9cae,_0x2010c0];}function readId(_0xb91152,_0x1f97c6){const _0x280187=_0x81fe,_0x2a1a7c={'PyHcH':function(_0x35f460,_0x35c093){return _0x35f460>=_0x35c093;},'XltAx':function(_0x586ee0,_0x4bf515){return _0x586ee0>=_0x4bf515;},'YBVJj':function(_0x618d02,_0x2cf665){return _0x618d02>=_0x2cf665;},'NoPCj':function(_0x53070f,_0x3272ab){return _0x53070f+_0x3272ab;},'bKjdE':function(_0x18a984,_0x13a325){return _0x18a984*_0x13a325;}};if(_0x1f97c6>=_0xb91152[_0x280187(0x1ac)])return[0x0,0x0];const _0x4aa254=_0xb91152[_0x1f97c6];let _0x34f055;if(_0x2a1a7c[_0x280187(0x1a8)](_0x4aa254,0x80))_0x34f055=0x1;else{if(_0x4aa254>=0x40)_0x34f055=0x2;else{if(_0x2a1a7c[_0x280187(0x1b1)](_0x4aa254,0x20))_0x34f055=0x3;else{if(_0x2a1a7c[_0x280187(0x1c8)](_0x4aa254,0x10))_0x34f055=0x4;else return[_0x4aa254,0x1];}}}if(_0x2a1a7c[_0x280187(0x1d4)](_0x1f97c6,_0x34f055)>_0xb91152[_0x280187(0x1ac)])return[0x0,0x0];let _0x2409be=0x0;for(let _0x149fc9=0x0;_0x149fc9<_0x34f055;_0x149fc9++){_0x2409be=_0x2a1a7c['bKjdE'](_0x2409be,0x100)+_0xb91152[_0x1f97c6+_0x149fc9];}return[_0x2409be,_0x34f055];}function readUint(_0x198836,_0x1e5b09,_0x161d5e){const _0x30b6e2={'mTdWG':function(_0x5e6788,_0x3f68a6){return _0x5e6788<_0x3f68a6;},'yEpYH':function(_0x330ae4,_0x593a7a){return _0x330ae4+_0x593a7a;}};let _0x544ad2=0x0;for(let _0x12ad58=0x0;_0x30b6e2['mTdWG'](_0x12ad58,_0x161d5e);_0x12ad58++){_0x544ad2=_0x30b6e2['yEpYH'](_0x544ad2*0x100,_0x198836[_0x1e5b09+_0x12ad58]);}return _0x544ad2;}function isUnknownSize(_0x19241b,_0x3792ff){const _0x243b3b=_0x81fe;return _0x19241b===Math[_0x243b3b(0x1c7)](0x2,0x7*_0x3792ff)-0x1;}function writeVint(_0x1a21fa,_0x174ca2){const _0x11ac78=_0x81fe,_0x222cdd={'ImOXa':function(_0xee15b7,_0x12d895){return _0xee15b7||_0x12d895;},'sFvlk':function(_0x4275ff,_0x38976e){return _0x4275ff<_0x38976e;},'zsxHo':function(_0x6bb123,_0xcebf46){return _0x6bb123-_0xcebf46;},'qjjgp':function(_0x55c736,_0x2edbb3){return _0x55c736*_0x2edbb3;},'aiOvp':function(_0x4f9de9,_0x51fb36){return _0x4f9de9>=_0x51fb36;},'UGNXm':function(_0x2f98f2,_0x5ecad4){return _0x2f98f2&_0x5ecad4;},'rluou':function(_0x2b159d,_0x495095){return _0x2b159d/_0x495095;}};let _0x3bdeb9=_0x222cdd['ImOXa'](_0x174ca2,0x1);while(_0x222cdd['sFvlk'](_0x222cdd['zsxHo'](Math[_0x11ac78(0x1c7)](0x2,_0x222cdd[_0x11ac78(0x1c6)](0x7,_0x3bdeb9)),0x2),_0x1a21fa))_0x3bdeb9++;const _0x1ae0d8=Buffer[_0x11ac78(0x1a9)](_0x3bdeb9);for(let _0x3201ce=_0x222cdd['zsxHo'](_0x3bdeb9,0x1);_0x222cdd[_0x11ac78(0x18c)](_0x3201ce,0x0);_0x3201ce--){_0x1ae0d8[_0x3201ce]=_0x222cdd['UGNXm'](_0x1a21fa,0xff),_0x1a21fa=Math[_0x11ac78(0x1b9)](_0x222cdd['rluou'](_0x1a21fa,0x100));}return _0x1ae0d8[0x0]|=0x1<<0x8-_0x3bdeb9,_0x1ae0d8;}function writeUint(_0x237eb6,_0x4baa9b){const _0x4e0d21=_0x81fe,_0x4b27f7={'OwiIf':function(_0x3e45ac,_0x2b0128){return _0x3e45ac-_0x2b0128;},'YbxXB':function(_0xa45ead,_0x358abf){return _0xa45ead>=_0x358abf;},'tjUDd':function(_0x1e0dce,_0x1e7a68){return _0x1e0dce&_0x1e7a68;},'oYAFn':function(_0xb7bccb,_0xe45b18){return _0xb7bccb/_0xe45b18;}},_0x51dfe3=Buffer['alloc'](_0x4baa9b);for(let _0x358415=_0x4b27f7['OwiIf'](_0x4baa9b,0x1);_0x4b27f7[_0x4e0d21(0x19d)](_0x358415,0x0);_0x358415--){_0x51dfe3[_0x358415]=_0x4b27f7[_0x4e0d21(0x1d7)](_0x237eb6,0xff),_0x237eb6=Math['floor'](_0x4b27f7[_0x4e0d21(0x1a7)](_0x237eb6,0x100));}return _0x51dfe3;}function writeUnknownSizeVint(_0x50976a){const _0x49c841=_0x81fe,_0x2f1115={'Sseaa':function(_0x2e262d,_0x302bee){return _0x2e262d-_0x302bee;}},_0x3e14ae=Buffer[_0x49c841(0x1a9)](_0x50976a,0xff);return _0x3e14ae[0x0]=0xff>>_0x2f1115['Sseaa'](_0x50976a,0x1),_0x3e14ae;}function uintSize(_0x55d12f){const _0x4fc0e2=_0x81fe,_0xac4600={'ccUAY':function(_0x1c4dce,_0x35bdad){return _0x1c4dce===_0x35bdad;},'FPNND':function(_0x56b324,_0x37e5c8){return _0x56b324>_0x37e5c8;}};if(_0xac4600[_0x4fc0e2(0x1a5)](_0x55d12f,0x0))return 0x1;let _0x1ea4c4=0x0,_0xfbb400=_0x55d12f;while(_0xac4600['FPNND'](_0xfbb400,0x0)){_0x1ea4c4++,_0xfbb400=Math['floor'](_0xfbb400/0x100);}return _0x1ea4c4;}function findTimestampScale(_0xbeca19,_0xfc579d){const _0x5e974c=_0x81fe,_0x2ad145={'ApVBj':function(_0xb5c0a7,_0x340148){return _0xb5c0a7+_0x340148;},'HzqWE':function(_0x563ae8,_0x298cb1,_0x15e124){return _0x563ae8(_0x298cb1,_0x15e124);},'OSaTj':function(_0x345b7a,_0xca391c){return _0x345b7a+_0xca391c;},'wDwBP':function(_0x23b4a7,_0x829055){return _0x23b4a7<_0x829055;},'WnXiL':function(_0x56bc7f,_0x4b1621,_0xae3521,_0x268ae3){return _0x56bc7f(_0x4b1621,_0xae3521,_0x268ae3);},'VxDHe':function(_0x134ddf,_0x580678){return _0x134ddf+_0x580678;},'KOBPU':function(_0x5ce23c,_0x5cc921){return _0x5ce23c+_0x5cc921;},'UHnaS':function(_0x453713,_0x36abd0){return _0x453713+_0x36abd0;},'zETjl':function(_0x45cb56,_0x37e327){return _0x45cb56===_0x37e327;},'FalbV':function(_0x44f098,_0x2b2e85){return _0x44f098+_0x2b2e85;}};let _0x50b513=_0xfc579d;const _0x44b18e=Math[_0x5e974c(0x1af)](_0xbeca19[_0x5e974c(0x1ac)],_0x2ad145[_0x5e974c(0x198)](_0xfc579d,0x2710));while(_0x50b513<_0x44b18e){const [_0x47bdb2,_0x198a3b]=readId(_0xbeca19,_0x50b513),[_0x204cf3,_0x47aa78]=_0x2ad145[_0x5e974c(0x196)](readVint,_0xbeca19,_0x50b513+_0x198a3b);if(_0x47bdb2===ID_INFO){let _0x18b331=_0x50b513+_0x198a3b+_0x47aa78;const _0x40fcee=_0x2ad145['OSaTj'](_0x18b331,_0x204cf3);while(_0x2ad145[_0x5e974c(0x1d0)](_0x18b331,_0x40fcee)){const [_0x2b0a15,_0x2bb0c5]=readId(_0xbeca19,_0x18b331),[_0x15ebe8,_0x3a094b]=readVint(_0xbeca19,_0x18b331+_0x2bb0c5);if(_0x2b0a15===ID_TIMESTAMP_SCALE)return _0x2ad145[_0x5e974c(0x1d8)](readUint,_0xbeca19,_0x2ad145['VxDHe'](_0x2ad145[_0x5e974c(0x194)](_0x18b331,_0x2bb0c5),_0x3a094b),_0x15ebe8);_0x18b331+=_0x2ad145[_0x5e974c(0x197)](_0x2bb0c5+_0x3a094b,_0x15ebe8);}break;}if(_0x2ad145[_0x5e974c(0x1b3)](_0x47bdb2,ID_CLUSTER))break;if(_0x2ad145['HzqWE'](isUnknownSize,_0x204cf3,_0x47aa78))break;_0x50b513+=_0x2ad145['FalbV'](_0x198a3b,_0x47aa78)+_0x204cf3;}return 0xf4240;}function findFirstClusterOffset(_0xc434bc,_0x1f9ac3){const _0x5cb2d0=_0x81fe,_0x501746={'VKHUK':function(_0x3f227f,_0x5a16a2){return _0x3f227f+_0x5a16a2;}};let _0x132c24=_0x1f9ac3;while(_0x132c24<_0xc434bc['length']){const [_0x34cbf9,_0x3903c2]=readId(_0xc434bc,_0x132c24);if(_0x34cbf9===ID_CLUSTER)return _0x132c24;const [_0x41fc55,_0x1ac03e]=readVint(_0xc434bc,_0x132c24+_0x3903c2);if(isUnknownSize(_0x41fc55,_0x1ac03e))return _0x132c24;_0x132c24+=_0x501746[_0x5cb2d0(0x192)](_0x3903c2+_0x1ac03e,_0x41fc55);}return _0xc434bc[_0x5cb2d0(0x1ac)];}function findClusterEnd(_0x45eb1e,_0x1612f6,_0x4e3b69,_0x131aea){const _0xc806e7=_0x81fe,_0x391f56={'zsMpc':function(_0x555bf4,_0x529df0){return _0x555bf4+_0x529df0;},'ABjGf':function(_0x506274,_0x2d0f87){return _0x506274<_0x2d0f87;},'uocvf':function(_0x206e97,_0x30181a){return _0x206e97+_0x30181a;},'YoppD':function(_0x1e7070,_0x2b6a7c){return _0x1e7070+_0x2b6a7c;}};if(!isUnknownSize(_0x4e3b69,_0x131aea))return _0x391f56['zsMpc'](_0x1612f6,_0x4e3b69);const _0x40fa6d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x171b18=_0x1612f6;while(_0x391f56[_0xc806e7(0x1a2)](_0x171b18,_0x45eb1e['length']-0x4)){const [_0x510773,_0x5cdef1]=readId(_0x45eb1e,_0x171b18);if(_0x40fa6d[_0xc806e7(0x1bb)](_0x510773))return _0x171b18;const [_0x1fcf51,_0x44f82c]=readVint(_0x45eb1e,_0x391f56['uocvf'](_0x171b18,_0x5cdef1));if(isUnknownSize(_0x1fcf51,_0x44f82c))return _0x45eb1e['length'];_0x171b18+=_0x391f56[_0xc806e7(0x1c9)](_0x391f56['YoppD'](_0x5cdef1,_0x44f82c),_0x1fcf51);}return _0x45eb1e[_0xc806e7(0x1ac)];}function extractClusters(_0x4f726c,_0x125f40){const _0x35227a=_0x81fe,_0x2a38e5={'nBbtg':function(_0x44cc23,_0x1e4e7a){return _0x44cc23<_0x1e4e7a;},'QwIAu':function(_0x2885dc,_0x3e5b0b,_0x19ca8c){return _0x2885dc(_0x3e5b0b,_0x19ca8c);},'NMTvW':function(_0x224921,_0x10e9c0){return _0x224921!==_0x10e9c0;},'tArtP':function(_0x1cd768,_0x350513){return _0x1cd768+_0x350513;},'YCPbC':function(_0x446913,_0x590d91){return _0x446913+_0x590d91;},'UnraS':function(_0x10bf0c,_0x4b0aed){return _0x10bf0c<_0x4b0aed;},'yyrGo':function(_0x4f2336,_0x43862b,_0x57eef4){return _0x4f2336(_0x43862b,_0x57eef4);},'DODvv':function(_0x26ed42,_0x1d5dbc){return _0x26ed42+_0x1d5dbc;},'PJCqe':function(_0x578b16,_0x4f4599){return _0x578b16+_0x4f4599;},'XgzdE':function(_0x2b5a2d,_0x5a73d3){return _0x2b5a2d===_0x5a73d3;},'NqkZf':function(_0x2f503c,_0x390e78){return _0x2f503c+_0x390e78;},'xonLr':function(_0x4d1d97,_0x14170b){return _0x4d1d97===_0x14170b;},'HFPIU':function(_0x1eba49,_0x274de4){return _0x1eba49+_0x274de4;}},_0xc841=[],_0x58141b=Buffer[_0x35227a(0x1d6)]([0x1f,0x43,0xb6,0x75]);let _0x3319db=0x0;while(_0x2a38e5[_0x35227a(0x191)](_0x3319db,_0x4f726c[_0x35227a(0x1ac)])){const _0xc1d267=_0x4f726c['indexOf'](_0x58141b,_0x3319db);if(_0xc1d267===-0x1)break;const [_0x4cbcdf,_0x4ff94b]=_0x2a38e5[_0x35227a(0x1a4)](readId,_0x4f726c,_0xc1d267);if(_0x2a38e5[_0x35227a(0x1be)](_0x4cbcdf,ID_CLUSTER)){_0x3319db=_0x2a38e5['tArtP'](_0xc1d267,0x1);continue;}const [_0x5ee348,_0x236258]=readVint(_0x4f726c,_0x2a38e5['YCPbC'](_0xc1d267,_0x4ff94b)),_0x4c81f8=_0xc1d267+_0x4ff94b+_0x236258,_0x2e6b15=findClusterEnd(_0x4f726c,_0x4c81f8,_0x5ee348,_0x236258);let _0x152737=_0x4c81f8,_0x5b8b4d=0x0,_0x2c6e85=0x2,_0x153133=![],_0x3494cb=Buffer['alloc'](0x0),_0x516edf=Buffer['alloc'](0x0);while(_0x2a38e5['UnraS'](_0x152737,_0x2e6b15)){const [_0x495a10,_0x128b2d]=_0x2a38e5[_0x35227a(0x19f)](readId,_0x4f726c,_0x152737),[_0x1e9406,_0x45f09f]=_0x2a38e5['QwIAu'](readVint,_0x4f726c,_0x2a38e5[_0x35227a(0x1d5)](_0x152737,_0x128b2d));if(_0x495a10===ID_TIMESTAMP){_0x5b8b4d=readUint(_0x4f726c,_0x2a38e5['DODvv'](_0x152737+_0x128b2d,_0x45f09f),_0x1e9406),_0x2c6e85=_0x1e9406,_0x153133=!![],_0x3494cb=_0x4f726c['slice'](_0x4c81f8,_0x152737);const _0x2e0fda=_0x2a38e5['PJCqe'](_0x152737+_0x128b2d+_0x45f09f,_0x1e9406);_0x516edf=_0x4f726c[_0x35227a(0x1d2)](_0x2e0fda,_0x2e6b15);break;}if(_0x2a38e5['XgzdE'](_0x495a10,ID_CLUSTER))break;if(isUnknownSize(_0x1e9406,_0x45f09f))break;_0x152737+=_0x128b2d+_0x45f09f+_0x1e9406;}!_0x153133&&(_0x516edf=_0x4f726c[_0x35227a(0x1d2)](_0x4c81f8,_0x2e6b15));let _0x2aa943=_0x5b8b4d;_0x152737=_0x4c81f8;while(_0x2a38e5[_0x35227a(0x191)](_0x152737,_0x2e6b15)){const [_0x5ee82d,_0x1cb6bf]=_0x2a38e5[_0x35227a(0x1a4)](readId,_0x4f726c,_0x152737),[_0xc7e980,_0x53a17d]=readVint(_0x4f726c,_0x2a38e5[_0x35227a(0x1c3)](_0x152737,_0x1cb6bf));if(_0x2a38e5[_0x35227a(0x18e)](_0x5ee82d,ID_SIMPLE_BLOCK)&&_0xc7e980>=0x4){const _0x12e477=_0x2a38e5['NqkZf'](_0x152737,_0x1cb6bf)+_0x53a17d,[,_0x16836c]=readVint(_0x4f726c,_0x12e477),_0x20042a=_0x4f726c[_0x35227a(0x1cd)](_0x2a38e5[_0x35227a(0x19a)](_0x12e477,_0x16836c)),_0x4abb73=_0x5b8b4d+_0x20042a;if(_0x4abb73>_0x2aa943)_0x2aa943=_0x4abb73;}if(_0x5ee82d===ID_CLUSTER)break;if(_0x2a38e5['QwIAu'](isUnknownSize,_0xc7e980,_0x53a17d))break;_0x152737+=_0x2a38e5['NqkZf'](_0x1cb6bf,_0x53a17d)+_0xc7e980;}_0xc841['push']({'timestamp':_0x5b8b4d,'maxTicks':_0x2aa943,'bodyBeforeTimestamp':_0x3494cb,'bodyAfterTimestamp':_0x516edf,'timestampElementSize':_0x2c6e85}),_0x3319db=_0x2e6b15;}return _0xc841;}function parseWebm(_0x3aba3a){const _0x2851db=_0x81fe,_0x24f792={'OTrDt':function(_0x4f75d3,_0x1600e9,_0x3015c5){return _0x4f75d3(_0x1600e9,_0x3015c5);},'uWXjK':function(_0x3f153e,_0xb807dd){return _0x3f153e+_0xb807dd;},'GZMxB':function(_0x53f093,_0x5bbbad,_0x4610ed){return _0x53f093(_0x5bbbad,_0x4610ed);},'dCVVa':function(_0x1bd099,_0x524aa5){return _0x1bd099!==_0x524aa5;},'zfCxZ':function(_0xbf669f,_0x1a3283,_0xc7fee7){return _0xbf669f(_0x1a3283,_0xc7fee7);},'BQdca':function(_0x21719c,_0x2374d9){return _0x21719c>_0x2374d9;}};let _0x347898=0x0;const [,_0x1af844]=_0x24f792['OTrDt'](readId,_0x3aba3a,_0x347898),[_0x2174a5,_0x2eead4]=readVint(_0x3aba3a,_0x347898+_0x1af844);_0x347898+=_0x24f792['uWXjK'](_0x1af844,_0x2eead4)+_0x2174a5;const [_0x27c82a,_0x44a7ee]=_0x24f792[_0x2851db(0x1d3)](readId,_0x3aba3a,_0x347898);if(_0x24f792[_0x2851db(0x199)](_0x27c82a,ID_SEGMENT))return null;const [,_0x3908a0]=readVint(_0x3aba3a,_0x347898+_0x44a7ee),_0x4784e0=_0x24f792['uWXjK'](_0x24f792[_0x2851db(0x1c0)](_0x347898,_0x44a7ee),_0x3908a0),_0x3a291e=_0x24f792[_0x2851db(0x19c)](findTimestampScale,_0x3aba3a,_0x4784e0),_0x201587=findFirstClusterOffset(_0x3aba3a,_0x4784e0),_0x19c984=_0x3aba3a['slice'](0x0,_0x201587),_0x13878e=_0x24f792['OTrDt'](extractClusters,_0x3aba3a,_0x3a291e);let _0x216068=0x0;for(const _0x17e661 of _0x13878e){if(_0x24f792[_0x2851db(0x19b)](_0x17e661['maxTicks'],_0x216068))_0x216068=_0x17e661[_0x2851db(0x1c1)];}return{'header':_0x19c984,'clusters':_0x13878e,'timestampScale':_0x3a291e,'maxTimestampTicks':_0x216068};}function buildCluster(_0x2791bf,_0xce5982,_0x2aa461){const _0x5a5dfb=_0x81fe,_0x42cb58={'mRmPW':function(_0x4cc1bd,_0xc7c49a){return _0x4cc1bd(_0xc7c49a);}},_0x240700=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x231521=Math['max'](0x4,uintSize(_0x2791bf)),_0x308284=Buffer[_0x5a5dfb(0x1b4)]([Buffer[_0x5a5dfb(0x1d6)]([ID_TIMESTAMP]),_0x42cb58[_0x5a5dfb(0x1a0)](writeVint,_0x231521),writeUint(_0x2791bf,_0x231521)]),_0x266038=Buffer['concat']([_0xce5982,_0x308284,_0x2aa461]),_0xfa3439=writeVint(_0x266038[_0x5a5dfb(0x1ac)]);return Buffer['concat']([_0x240700,_0xfa3439,_0x266038]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x5e1471){const _0x12d672=_0x81fe,_0x5b1710={'SKgWB':function(_0x140099,_0x5e7c77,_0xfe9cd7){return _0x140099(_0x5e7c77,_0xfe9cd7);},'QNVPW':function(_0x4acada,_0x253f46,_0xdd03cf){return _0x4acada(_0x253f46,_0xdd03cf);},'RJXGc':function(_0xd40aba,_0x2d0eaf){return _0xd40aba+_0x2d0eaf;},'NRpmj':function(_0x355817,_0x5681ec){return _0x355817+_0x5681ec;},'eADUS':function(_0x5f29c8,_0x2e9a5a,_0x1f770c){return _0x5f29c8(_0x2e9a5a,_0x1f770c);},'FUAQh':function(_0x39892b,_0x12a1e7,_0x5858be){return _0x39892b(_0x12a1e7,_0x5858be);},'GbNNJ':function(_0x2ebc89,_0x55a04b){return _0x2ebc89+_0x55a04b;},'uRoSq':function(_0x39b87a,_0x4ddec2){return _0x39b87a+_0x4ddec2;},'qBUNP':function(_0x46dabf,_0x512360){return _0x46dabf+_0x512360;},'YADof':function(_0x4a07a9,_0x4c1af0){return _0x4a07a9<_0x4c1af0;},'AMUBw':function(_0x294a0c,_0x5e95d8,_0x2722c5){return _0x294a0c(_0x5e95d8,_0x2722c5);},'yXBMI':function(_0x2cf76,_0x1d9847){return _0x2cf76!==_0x1d9847;},'hPBKZ':function(_0x184849,_0xec060e){return _0x184849+_0xec060e;},'FbrWN':function(_0x4778cc,_0xfa8021){return _0x4778cc+_0xfa8021;}},_0x34f170=Buffer[_0x12d672(0x1d6)](_0x5e1471);let _0x3bdbbc=0x0;const [,_0x276291]=_0x5b1710['SKgWB'](readId,_0x34f170,_0x3bdbbc),[_0x76ca7d,_0x38d824]=_0x5b1710[_0x12d672(0x1bf)](readVint,_0x34f170,_0x3bdbbc+_0x276291),_0x1b06b9=_0x5b1710['RJXGc'](_0x3bdbbc,_0x276291)+_0x38d824+_0x76ca7d,[,_0x2805e2]=readId(_0x34f170,_0x1b06b9),[,_0x2066e0]=readVint(_0x34f170,_0x1b06b9+_0x2805e2),_0x2707bb=_0x1b06b9+_0x2805e2+_0x2066e0,_0x8d1229=writeUnknownSizeVint(_0x2066e0);_0x8d1229[_0x12d672(0x1b5)](_0x34f170,_0x1b06b9+_0x2805e2);let _0xb5658=_0x2707bb;const _0x37e3ca=Math['min'](_0x34f170['length'],_0x5b1710['NRpmj'](_0x2707bb,0x2710));while(_0xb5658<_0x37e3ca){const [_0x4ffb14,_0x53d510]=_0x5b1710[_0x12d672(0x1d1)](readId,_0x34f170,_0xb5658),[_0x3125e0,_0x1cf84f]=_0x5b1710['FUAQh'](readVint,_0x34f170,_0x5b1710[_0x12d672(0x1a3)](_0xb5658,_0x53d510));if(_0x4ffb14===ID_CLUSTER)break;if(isUnknownSize(_0x3125e0,_0x1cf84f))break;if(_0x4ffb14===ID_INFO){const _0x488469=_0x5b1710['uRoSq'](_0x5b1710['qBUNP'](_0xb5658,_0x53d510),_0x1cf84f),_0x45c397=_0x488469+_0x3125e0,_0x50a17d=[];let _0x4997c6=_0x488469;while(_0x5b1710['YADof'](_0x4997c6,_0x45c397)){const [_0x257215,_0x52ecb8]=readId(_0x34f170,_0x4997c6),[_0x31e79e,_0x3422b8]=_0x5b1710['AMUBw'](readVint,_0x34f170,_0x4997c6+_0x52ecb8),_0x30b418=_0x52ecb8+_0x3422b8+_0x31e79e;_0x5b1710['yXBMI'](_0x257215,ID_DURATION)&&_0x50a17d['push'](_0x34f170[_0x12d672(0x1d2)](_0x4997c6,_0x5b1710[_0x12d672(0x190)](_0x4997c6,_0x30b418))),_0x4997c6+=_0x30b418;}const _0x506b02=Buffer[_0x12d672(0x1b4)](_0x50a17d),_0x2a937c=Buffer[_0x12d672(0x1b4)]([_0x34f170[_0x12d672(0x1d2)](_0xb5658,_0xb5658+_0x53d510),writeVint(_0x506b02['length'],_0x1cf84f)]);return Buffer[_0x12d672(0x1b4)]([_0x34f170[_0x12d672(0x1d2)](0x0,_0xb5658),_0x2a937c,_0x506b02,_0x34f170['slice'](_0x45c397)]);}_0xb5658+=_0x5b1710['hPBKZ'](_0x5b1710['FbrWN'](_0x53d510,_0x1cf84f),_0x3125e0);}return _0x34f170;}export function stitchWebmFiles(_0x38c550,_0x35c2d1){const _0x30e422=_0x81fe,_0x3b5c65={'kOtUs':function(_0x1ff061,_0x1e087b){return _0x1ff061<=_0x1e087b;},'wWRqN':function(_0x1b1f6a,_0xeb161d){return _0x1b1f6a(_0xeb161d);},'gWflC':function(_0x8d0380,_0x504089){return _0x8d0380===_0x504089;},'aKEJi':function(_0x3a27f5,_0x2988b2){return _0x3a27f5<_0x2988b2;},'aPrpm':function(_0x4c5d0e,_0x4b354d,_0x3e58b3){return _0x4c5d0e(_0x4b354d,_0x3e58b3);}};if(_0x3b5c65['kOtUs'](_0x38c550['length'],0x1))return![];const _0x1840c1=[];for(const _0x1aa81e of _0x38c550){const _0x1a0488=readFileSync(_0x1aa81e),_0x1026e5=_0x3b5c65[_0x30e422(0x1cf)](parseWebm,_0x1a0488);if(!_0x1026e5||_0x3b5c65['gWflC'](_0x1026e5['clusters']['length'],0x0))return![];_0x1840c1[_0x30e422(0x19e)](_0x1026e5);}const _0x335602=_0x1840c1[0x0],_0x597727=_0x3b5c65[_0x30e422(0x1cf)](rebuildHeaderWithoutDuration,_0x335602[_0x30e422(0x1cb)]),_0x4e1bb4=[_0x597727];let _0x43ac82=0x0;for(let _0x1be18a=0x0;_0x3b5c65[_0x30e422(0x1ad)](_0x1be18a,_0x1840c1[_0x30e422(0x1ac)]);_0x1be18a++){const _0xbf329a=_0x1840c1[_0x1be18a];for(const _0x584f13 of _0xbf329a['clusters']){const _0x47ac4e=_0x584f13['timestamp']+_0x43ac82;_0x4e1bb4[_0x30e422(0x19e)](buildCluster(_0x47ac4e,_0x584f13[_0x30e422(0x1cc)],_0x584f13['bodyAfterTimestamp']));}const _0x348404=0x1e;_0x43ac82+=_0xbf329a['maxTimestampTicks']+_0x348404;}return _0x3b5c65['aPrpm'](writeFileSync,_0x35c2d1,Buffer['concat'](_0x4e1bb4)),!![];}function _0x81fe(_0xc8d0e6,_0x1f9f99){_0xc8d0e6=_0xc8d0e6-0x18c;const _0x1149c3=_0x1149();let _0x81fedb=_0x1149c3[_0xc8d0e6];return _0x81fedb;}function _0x1149(){const _0x106ecb=['stitchWebmFiles.js','5944asKbwY','2TxXmWZ','floor','bfbDq','has','argv','lKHZo','NMTvW','QNVPW','uWXjK','maxTicks','huOFc','NqkZf','HxjZA','252840eHhPeF','qjjgp','pow','YBVJj','zsMpc','4424255PvZhGU','header','bodyBeforeTimestamp','readInt16BE','5NEboez','wWRqN','wDwBP','eADUS','slice','GZMxB','NoPCj','tArtP','from','tjUDd','WnXiL','aiOvp','stitchWebmFiles.ts','xonLr','120Qpiobr','qBUNP','nBbtg','VKHUK','3405633bBJAdR','KOBPU','log','HzqWE','UHnaS','ApVBj','dCVVa','HFPIU','BQdca','zfCxZ','YbxXB','push','yyrGo','mRmPW','4381824odonie','ABjGf','GbNNJ','QwIAu','ccUAY','1436692acTfjh','oYAFn','PyHcH','alloc','endsWith','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','length','aKEJi','12933gdWFfP','min','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','XltAx','7230aphpCC','zETjl','concat','copy'];_0x1149=function(){return _0x106ecb;};return _0x1149();}if(process['argv'][0x1]?.[_0xd8e7bb(0x1aa)](_0xd8e7bb(0x18d))||process['argv'][0x1]?.[_0xd8e7bb(0x1aa)](_0xd8e7bb(0x1b6))){const args=process[_0xd8e7bb(0x1bc)][_0xd8e7bb(0x1d2)](0x2);args[_0xd8e7bb(0x1ac)]<0x3&&(console['error'](_0xd8e7bb(0x1b0)),process['exit'](0x1));const output=args[args[_0xd8e7bb(0x1ac)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xd8e7bb(0x195)]('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console['log'](_0xd8e7bb(0x1ab));}
|
|
1
|
+
const _0x4c28c2=_0x28ef;(function(_0x2d34d3,_0x4d5c1d){const _0x2d87ef=_0x28ef,_0x196dee=_0x2d34d3();while(!![]){try{const _0xece21e=-parseInt(_0x2d87ef(0x110))/0x1*(parseInt(_0x2d87ef(0x109))/0x2)+parseInt(_0x2d87ef(0xf7))/0x3+-parseInt(_0x2d87ef(0x10b))/0x4+parseInt(_0x2d87ef(0xd7))/0x5+-parseInt(_0x2d87ef(0xd5))/0x6*(-parseInt(_0x2d87ef(0xff))/0x7)+parseInt(_0x2d87ef(0x10a))/0x8+parseInt(_0x2d87ef(0x106))/0x9*(-parseInt(_0x2d87ef(0xd2))/0xa);if(_0xece21e===_0x4d5c1d)break;else _0x196dee['push'](_0x196dee['shift']());}catch(_0x50d239){_0x196dee['push'](_0x196dee['shift']());}}}(_0x5cc4,0x6f657));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(_0x196633,_0x4e233c){const _0x127ba7=_0x28ef,_0x3ad0c9={'RjRIi':function(_0x321580,_0x4069e1){return _0x321580>=_0x4069e1;},'iXPEL':function(_0x4e6b89,_0x1630ac){return _0x4e6b89<=_0x1630ac;},'KLlSB':function(_0x10c482,_0xde4ece){return _0x10c482&_0xde4ece;},'HkpnT':function(_0x2f8105,_0x41a01e){return _0x2f8105>_0x41a01e;},'BbCgv':function(_0xbd5443,_0x3a72a2){return _0xbd5443+_0x3a72a2;},'vBuym':function(_0x3497a9,_0x838357){return _0x3497a9&_0x838357;}};if(_0x3ad0c9[_0x127ba7(0xf9)](_0x4e233c,_0x196633['length']))return[0x0,0x0];const _0x441971=_0x196633[_0x4e233c];let _0x345074=0x1,_0x46ecf3=0x80;while(_0x3ad0c9[_0x127ba7(0xef)](_0x345074,0x8)&&!_0x3ad0c9[_0x127ba7(0xf2)](_0x441971,_0x46ecf3)){_0x345074++,_0x46ecf3>>=0x1;}if(_0x3ad0c9[_0x127ba7(0x10c)](_0x3ad0c9['BbCgv'](_0x4e233c,_0x345074),_0x196633[_0x127ba7(0xdc)]))return[0x0,0x0];let _0x55ea84=_0x3ad0c9['vBuym'](_0x441971,_0x46ecf3-0x1);for(let _0x18b2a3=0x1;_0x18b2a3<_0x345074;_0x18b2a3++){_0x55ea84=_0x3ad0c9[_0x127ba7(0xe9)](_0x55ea84*0x100,_0x196633[_0x3ad0c9[_0x127ba7(0xe9)](_0x4e233c,_0x18b2a3)]);}return[_0x55ea84,_0x345074];}function readId(_0x126369,_0x4ad0f3){const _0x1f152d=_0x28ef,_0x18b1af={'SxJhq':function(_0x15d262,_0x8071ca){return _0x15d262>=_0x8071ca;},'raqeg':function(_0x3a1801,_0x2b0ac4){return _0x3a1801>_0x2b0ac4;},'SoHNB':function(_0x5f4430,_0x2ae49b){return _0x5f4430+_0x2ae49b;},'iStWk':function(_0x494949,_0x415cb8){return _0x494949+_0x415cb8;}};if(_0x4ad0f3>=_0x126369['length'])return[0x0,0x0];const _0x4c841f=_0x126369[_0x4ad0f3];let _0x6f9e75;if(_0x4c841f>=0x80)_0x6f9e75=0x1;else{if(_0x4c841f>=0x40)_0x6f9e75=0x2;else{if(_0x18b1af[_0x1f152d(0xda)](_0x4c841f,0x20))_0x6f9e75=0x3;else{if(_0x18b1af['SxJhq'](_0x4c841f,0x10))_0x6f9e75=0x4;else return[_0x4c841f,0x1];}}}if(_0x18b1af[_0x1f152d(0x104)](_0x18b1af[_0x1f152d(0x112)](_0x4ad0f3,_0x6f9e75),_0x126369[_0x1f152d(0xdc)]))return[0x0,0x0];let _0x54dbda=0x0;for(let _0x5f91c8=0x0;_0x5f91c8<_0x6f9e75;_0x5f91c8++){_0x54dbda=_0x54dbda*0x100+_0x126369[_0x18b1af['iStWk'](_0x4ad0f3,_0x5f91c8)];}return[_0x54dbda,_0x6f9e75];}function readUint(_0x34d045,_0x1ee035,_0x59bca8){const _0x127d6f=_0x28ef,_0x2687c0={'IPYXA':function(_0x2eecfe,_0x46b050){return _0x2eecfe+_0x46b050;}};let _0x3fa51f=0x0;for(let _0xdfccb8=0x0;_0xdfccb8<_0x59bca8;_0xdfccb8++){_0x3fa51f=_0x2687c0[_0x127d6f(0x107)](_0x3fa51f*0x100,_0x34d045[_0x1ee035+_0xdfccb8]);}return _0x3fa51f;}function _0x28ef(_0x7d29f1,_0x3deecb){_0x7d29f1=_0x7d29f1-0xd2;const _0x5cc4d8=_0x5cc4();let _0x28ef07=_0x5cc4d8[_0x7d29f1];return _0x28ef07;}function isUnknownSize(_0xfa05c9,_0x34a52a){const _0x48f45b={'wweGg':function(_0x440689,_0x7febd){return _0x440689-_0x7febd;},'LCksG':function(_0x4db018,_0x56d1f5){return _0x4db018*_0x56d1f5;}};return _0xfa05c9===_0x48f45b['wweGg'](Math['pow'](0x2,_0x48f45b['LCksG'](0x7,_0x34a52a)),0x1);}function writeVint(_0x6b5a72,_0x107a55){const _0x36bc31=_0x28ef,_0x594a94={'bmXfu':function(_0x1ad758,_0x176608){return _0x1ad758<_0x176608;},'dvllz':function(_0x16a3e7,_0x12f87d){return _0x16a3e7-_0x12f87d;},'ALocb':function(_0x11ec18,_0x49adc5){return _0x11ec18>=_0x49adc5;},'VFOGD':function(_0x224759,_0x5e495e){return _0x224759/_0x5e495e;},'yuQcz':function(_0x15bc66,_0x35bd4e){return _0x15bc66<<_0x35bd4e;},'gIelB':function(_0x225f09,_0x80b30e){return _0x225f09-_0x80b30e;}};let _0xa97179=_0x107a55||0x1;while(_0x594a94[_0x36bc31(0x108)](_0x594a94[_0x36bc31(0xea)](Math[_0x36bc31(0xee)](0x2,0x7*_0xa97179),0x2),_0x6b5a72))_0xa97179++;const _0x3e5e73=Buffer[_0x36bc31(0xf3)](_0xa97179);for(let _0x3897e1=_0x594a94[_0x36bc31(0xea)](_0xa97179,0x1);_0x594a94['ALocb'](_0x3897e1,0x0);_0x3897e1--){_0x3e5e73[_0x3897e1]=_0x6b5a72&0xff,_0x6b5a72=Math[_0x36bc31(0xe1)](_0x594a94[_0x36bc31(0xd4)](_0x6b5a72,0x100));}return _0x3e5e73[0x0]|=_0x594a94[_0x36bc31(0x10f)](0x1,_0x594a94['gIelB'](0x8,_0xa97179)),_0x3e5e73;}function writeUint(_0x28c534,_0x1f0ad3){const _0x290e73=_0x28ef,_0x5c1e2d={'yjgXS':function(_0x6777df,_0x414e56){return _0x6777df>=_0x414e56;},'EfEqY':function(_0x440616,_0x5456c8){return _0x440616&_0x5456c8;}},_0x133744=Buffer[_0x290e73(0xf3)](_0x1f0ad3);for(let _0x46a381=_0x1f0ad3-0x1;_0x5c1e2d['yjgXS'](_0x46a381,0x0);_0x46a381--){_0x133744[_0x46a381]=_0x5c1e2d['EfEqY'](_0x28c534,0xff),_0x28c534=Math[_0x290e73(0xe1)](_0x28c534/0x100);}return _0x133744;}function writeUnknownSizeVint(_0x4e276c){const _0x309186=_0x28ef,_0x548963={'feswk':function(_0x3ab4b2,_0x3ef79e){return _0x3ab4b2>>_0x3ef79e;},'glxhA':function(_0x242e8e,_0x3ce466){return _0x242e8e-_0x3ce466;}},_0x39062c=Buffer['alloc'](_0x4e276c,0xff);return _0x39062c[0x0]=_0x548963[_0x309186(0x113)](0xff,_0x548963['glxhA'](_0x4e276c,0x1)),_0x39062c;}function uintSize(_0x3bf1c0){const _0x4c5ebd={'EzCgi':function(_0x351f7f,_0x8979d0){return _0x351f7f===_0x8979d0;},'SpqGq':function(_0xb49ff,_0x79862f){return _0xb49ff>_0x79862f;}};if(_0x4c5ebd['EzCgi'](_0x3bf1c0,0x0))return 0x1;let _0x363cda=0x0,_0x3b5e09=_0x3bf1c0;while(_0x4c5ebd['SpqGq'](_0x3b5e09,0x0)){_0x363cda++,_0x3b5e09=Math['floor'](_0x3b5e09/0x100);}return _0x363cda;}function findTimestampScale(_0x36d40e,_0x1cce76){const _0x252df5=_0x28ef,_0x2994fd={'eUMwD':function(_0x325549,_0x47e28e){return _0x325549<_0x47e28e;},'bIcYb':function(_0x283e1b,_0x3695cd){return _0x283e1b+_0x3695cd;},'cvsPU':function(_0x37187b,_0xbfa785){return _0x37187b===_0xbfa785;},'xfCbw':function(_0x218ece,_0x101dbb){return _0x218ece+_0x101dbb;},'VliDt':function(_0x181284,_0x337235){return _0x181284+_0x337235;},'yPapj':function(_0x4f6a31,_0x165f11){return _0x4f6a31+_0x165f11;},'eCHbh':function(_0xa01591,_0x11614f,_0x447630){return _0xa01591(_0x11614f,_0x447630);},'ZhjbT':function(_0xad4766,_0x1a5e55,_0x51519e,_0x55978c){return _0xad4766(_0x1a5e55,_0x51519e,_0x55978c);}};let _0x3fec37=_0x1cce76;const _0x492d5e=Math['min'](_0x36d40e[_0x252df5(0xdc)],_0x1cce76+0x2710);while(_0x2994fd[_0x252df5(0xf1)](_0x3fec37,_0x492d5e)){const [_0x17bff4,_0x1c9cb3]=readId(_0x36d40e,_0x3fec37),[_0x185da6,_0xe38465]=readVint(_0x36d40e,_0x2994fd['bIcYb'](_0x3fec37,_0x1c9cb3));if(_0x2994fd['cvsPU'](_0x17bff4,ID_INFO)){let _0x5902be=_0x2994fd['xfCbw'](_0x2994fd['VliDt'](_0x3fec37,_0x1c9cb3),_0xe38465);const _0x21ce2d=_0x2994fd['yPapj'](_0x5902be,_0x185da6);while(_0x2994fd['eUMwD'](_0x5902be,_0x21ce2d)){const [_0x410799,_0x3485d0]=_0x2994fd[_0x252df5(0xe2)](readId,_0x36d40e,_0x5902be),[_0x46ddd9,_0x5e179c]=readVint(_0x36d40e,_0x2994fd[_0x252df5(0xdb)](_0x5902be,_0x3485d0));if(_0x410799===ID_TIMESTAMP_SCALE)return _0x2994fd[_0x252df5(0xeb)](readUint,_0x36d40e,_0x5902be+_0x3485d0+_0x5e179c,_0x46ddd9);_0x5902be+=_0x2994fd['yPapj'](_0x2994fd['bIcYb'](_0x3485d0,_0x5e179c),_0x46ddd9);}break;}if(_0x2994fd[_0x252df5(0xfb)](_0x17bff4,ID_CLUSTER))break;if(isUnknownSize(_0x185da6,_0xe38465))break;_0x3fec37+=_0x2994fd['bIcYb'](_0x1c9cb3,_0xe38465)+_0x185da6;}return 0xf4240;}function findFirstClusterOffset(_0x49e73e,_0x5651b1){const _0x175ea2=_0x28ef,_0x4e2bcc={'kCJzQ':function(_0x13ae28,_0x1d4a2d,_0x48f15f){return _0x13ae28(_0x1d4a2d,_0x48f15f);},'ZTXns':function(_0x33486e,_0x18941c,_0x4a5133){return _0x33486e(_0x18941c,_0x4a5133);}};let _0x33f5c7=_0x5651b1;while(_0x33f5c7<_0x49e73e['length']){const [_0x216c35,_0x5adaa8]=_0x4e2bcc['kCJzQ'](readId,_0x49e73e,_0x33f5c7);if(_0x216c35===ID_CLUSTER)return _0x33f5c7;const [_0x555c47,_0x2a7e8c]=readVint(_0x49e73e,_0x33f5c7+_0x5adaa8);if(_0x4e2bcc['ZTXns'](isUnknownSize,_0x555c47,_0x2a7e8c))return _0x33f5c7;_0x33f5c7+=_0x5adaa8+_0x2a7e8c+_0x555c47;}return _0x49e73e[_0x175ea2(0xdc)];}function findClusterEnd(_0x2f9b2b,_0x348dd2,_0x121813,_0x5a02b0){const _0x1ba31b=_0x28ef,_0x35ea47={'GfZlQ':function(_0x3290da,_0x581d63){return _0x3290da+_0x581d63;},'VxnPU':function(_0x2d93cb,_0x17be78){return _0x2d93cb-_0x17be78;},'jjhyI':function(_0xc69632,_0x69ac66,_0x651a9){return _0xc69632(_0x69ac66,_0x651a9);}};if(!isUnknownSize(_0x121813,_0x5a02b0))return _0x35ea47[_0x1ba31b(0xdf)](_0x348dd2,_0x121813);const _0x451cc5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x57dbcb=_0x348dd2;while(_0x57dbcb<_0x35ea47[_0x1ba31b(0xec)](_0x2f9b2b[_0x1ba31b(0xdc)],0x4)){const [_0x36bf73,_0x1f2bb7]=_0x35ea47[_0x1ba31b(0x100)](readId,_0x2f9b2b,_0x57dbcb);if(_0x451cc5[_0x1ba31b(0xdd)](_0x36bf73))return _0x57dbcb;const [_0x16f4ef,_0x2c5bcc]=readVint(_0x2f9b2b,_0x35ea47['GfZlQ'](_0x57dbcb,_0x1f2bb7));if(isUnknownSize(_0x16f4ef,_0x2c5bcc))return _0x2f9b2b[_0x1ba31b(0xdc)];_0x57dbcb+=_0x1f2bb7+_0x2c5bcc+_0x16f4ef;}return _0x2f9b2b['length'];}function extractClusters(_0x31b5eb,_0x7ec2){const _0x42283d=_0x28ef,_0x568987={'sHmFG':function(_0x5f27c2,_0x387d21){return _0x5f27c2===_0x387d21;},'rTzGP':function(_0x322f71,_0x4cf750,_0x56f5f3){return _0x322f71(_0x4cf750,_0x56f5f3);},'LIcJg':function(_0x4895c6,_0x10ce49){return _0x4895c6+_0x10ce49;},'rbsWU':function(_0x8cff5b,_0x2cfcc4){return _0x8cff5b+_0x2cfcc4;},'yTnvG':function(_0x3d294f,_0x2455dd,_0x52a71f,_0x514633,_0x295119){return _0x3d294f(_0x2455dd,_0x52a71f,_0x514633,_0x295119);},'GKIDa':function(_0xa1a685,_0x27d404){return _0xa1a685<_0x27d404;},'IiLZb':function(_0x354afd,_0x4d1634,_0x1d3471){return _0x354afd(_0x4d1634,_0x1d3471);},'taaXd':function(_0x154a49,_0x13abd6,_0x579a59){return _0x154a49(_0x13abd6,_0x579a59);},'bMIwX':function(_0xa2cd8c,_0x3a3436,_0x21145d,_0x4a035d){return _0xa2cd8c(_0x3a3436,_0x21145d,_0x4a035d);},'cNXGB':function(_0x5492cc,_0x54783a){return _0x5492cc+_0x54783a;},'MfExE':function(_0x5c5ea0,_0x265ec6){return _0x5c5ea0===_0x265ec6;},'rAbxt':function(_0x5044ef,_0x530cb9){return _0x5044ef+_0x530cb9;},'qsWeF':function(_0x424895,_0x6e0fad){return _0x424895<_0x6e0fad;},'GFeqB':function(_0x2cee3f,_0x107ce6){return _0x2cee3f+_0x107ce6;},'eESfE':function(_0x584937,_0x29eefb){return _0x584937>=_0x29eefb;},'qBEMv':function(_0x4a0d48,_0x122833){return _0x4a0d48+_0x122833;},'UPpXE':function(_0x1aa3e7,_0x164337){return _0x1aa3e7+_0x164337;},'BxBGv':function(_0x307c75,_0x45f387){return _0x307c75===_0x45f387;},'YpEus':function(_0x1ee0a0,_0x3f86ec){return _0x1ee0a0+_0x3f86ec;},'cDsaK':function(_0x511fe3,_0x495924){return _0x511fe3+_0x495924;}},_0x2b816e=[],_0x52172f=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x5054e8=0x0;while(_0x5054e8<_0x31b5eb['length']){const _0x29a0d6=_0x31b5eb['indexOf'](_0x52172f,_0x5054e8);if(_0x568987['sHmFG'](_0x29a0d6,-0x1))break;const [_0x3605f6,_0x4a5ab0]=_0x568987['rTzGP'](readId,_0x31b5eb,_0x29a0d6);if(_0x3605f6!==ID_CLUSTER){_0x5054e8=_0x568987['LIcJg'](_0x29a0d6,0x1);continue;}const [_0x2f38ac,_0x51801c]=readVint(_0x31b5eb,_0x29a0d6+_0x4a5ab0),_0x25fb79=_0x568987['LIcJg'](_0x568987['rbsWU'](_0x29a0d6,_0x4a5ab0),_0x51801c),_0xd92abd=_0x568987['yTnvG'](findClusterEnd,_0x31b5eb,_0x25fb79,_0x2f38ac,_0x51801c);let _0x2893c9=_0x25fb79,_0x327214=0x0,_0x3b9145=0x2,_0x1f7b32=![],_0x4984e1=Buffer['alloc'](0x0),_0x1b4488=Buffer['alloc'](0x0);while(_0x568987['GKIDa'](_0x2893c9,_0xd92abd)){const [_0x5ee572,_0x5c58f0]=_0x568987[_0x42283d(0xfa)](readId,_0x31b5eb,_0x2893c9),[_0x14ecd5,_0x397ed0]=_0x568987['taaXd'](readVint,_0x31b5eb,_0x2893c9+_0x5c58f0);if(_0x5ee572===ID_TIMESTAMP){_0x327214=_0x568987['bMIwX'](readUint,_0x31b5eb,_0x568987[_0x42283d(0x116)](_0x568987['LIcJg'](_0x2893c9,_0x5c58f0),_0x397ed0),_0x14ecd5),_0x3b9145=_0x14ecd5,_0x1f7b32=!![],_0x4984e1=_0x31b5eb[_0x42283d(0x118)](_0x25fb79,_0x2893c9);const _0x7f6a99=_0x568987[_0x42283d(0xfd)](_0x2893c9+_0x5c58f0+_0x397ed0,_0x14ecd5);_0x1b4488=_0x31b5eb[_0x42283d(0x118)](_0x7f6a99,_0xd92abd);break;}if(_0x568987['MfExE'](_0x5ee572,ID_CLUSTER))break;if(_0x568987['taaXd'](isUnknownSize,_0x14ecd5,_0x397ed0))break;_0x2893c9+=_0x568987['cNXGB'](_0x568987['rAbxt'](_0x5c58f0,_0x397ed0),_0x14ecd5);}!_0x1f7b32&&(_0x1b4488=_0x31b5eb[_0x42283d(0x118)](_0x25fb79,_0xd92abd));let _0x26b93b=_0x327214;_0x2893c9=_0x25fb79;while(_0x568987['qsWeF'](_0x2893c9,_0xd92abd)){const [_0x5c81c6,_0x5134ff]=_0x568987[_0x42283d(0x111)](readId,_0x31b5eb,_0x2893c9),[_0x5c8583,_0xbf34d4]=readVint(_0x31b5eb,_0x568987[_0x42283d(0xe4)](_0x2893c9,_0x5134ff));if(_0x5c81c6===ID_SIMPLE_BLOCK&&_0x568987['eESfE'](_0x5c8583,0x4)){const _0x590a39=_0x2893c9+_0x5134ff+_0xbf34d4,[,_0x3caba0]=readVint(_0x31b5eb,_0x590a39),_0x328a53=_0x31b5eb['readInt16BE'](_0x568987[_0x42283d(0x101)](_0x590a39,_0x3caba0)),_0x55c0cb=_0x568987['UPpXE'](_0x327214,_0x328a53);if(_0x55c0cb>_0x26b93b)_0x26b93b=_0x55c0cb;}if(_0x568987[_0x42283d(0x103)](_0x5c81c6,ID_CLUSTER))break;if(isUnknownSize(_0x5c8583,_0xbf34d4))break;_0x2893c9+=_0x568987['YpEus'](_0x568987[_0x42283d(0x119)](_0x5134ff,_0xbf34d4),_0x5c8583);}_0x2b816e['push']({'timestamp':_0x327214,'maxTicks':_0x26b93b,'bodyBeforeTimestamp':_0x4984e1,'bodyAfterTimestamp':_0x1b4488,'timestampElementSize':_0x3b9145}),_0x5054e8=_0xd92abd;}return _0x2b816e;}function parseWebm(_0x3f64ec){const _0x7317d3=_0x28ef,_0x598a7c={'VWerT':function(_0x400028,_0xd13704,_0x142aa8){return _0x400028(_0xd13704,_0x142aa8);},'SWgRp':function(_0x38ce09,_0x66cd96){return _0x38ce09+_0x66cd96;},'daOnw':function(_0x11ad9a,_0x55a852){return _0x11ad9a!==_0x55a852;},'OxzJy':function(_0x3e1363,_0xe2e75a){return _0x3e1363+_0xe2e75a;},'uPRQe':function(_0x1af8e6,_0x28ea97,_0x3e8145){return _0x1af8e6(_0x28ea97,_0x3e8145);}};let _0x46e46c=0x0;const [,_0x1301fc]=_0x598a7c['VWerT'](readId,_0x3f64ec,_0x46e46c),[_0x95df57,_0x45e02d]=_0x598a7c[_0x7317d3(0xf4)](readVint,_0x3f64ec,_0x598a7c[_0x7317d3(0xd9)](_0x46e46c,_0x1301fc));_0x46e46c+=_0x598a7c[_0x7317d3(0xd9)](_0x1301fc+_0x45e02d,_0x95df57);const [_0x42e6ea,_0x221d21]=_0x598a7c[_0x7317d3(0xf4)](readId,_0x3f64ec,_0x46e46c);if(_0x598a7c['daOnw'](_0x42e6ea,ID_SEGMENT))return null;const [,_0x2f138b]=readVint(_0x3f64ec,_0x598a7c[_0x7317d3(0xd9)](_0x46e46c,_0x221d21)),_0x52831a=_0x598a7c['OxzJy'](_0x46e46c,_0x221d21)+_0x2f138b,_0x25ebd6=_0x598a7c['uPRQe'](findTimestampScale,_0x3f64ec,_0x52831a),_0x462cf2=findFirstClusterOffset(_0x3f64ec,_0x52831a),_0xa4c80f=_0x3f64ec['slice'](0x0,_0x462cf2),_0x55d6a6=extractClusters(_0x3f64ec,_0x25ebd6);let _0x4dbdce=0x0;for(const _0x5e5944 of _0x55d6a6){if(_0x5e5944['maxTicks']>_0x4dbdce)_0x4dbdce=_0x5e5944[_0x7317d3(0x117)];}return{'header':_0xa4c80f,'clusters':_0x55d6a6,'timestampScale':_0x25ebd6,'maxTimestampTicks':_0x4dbdce};}function buildCluster(_0x4e1cc4,_0xe78c6f,_0x2f49f6){const _0x51ac96=_0x28ef,_0x2ab951={'GMVDj':function(_0x16a4ca,_0x513397){return _0x16a4ca(_0x513397);},'NQxeH':function(_0x53eb30,_0xff1de5,_0x596ab0){return _0x53eb30(_0xff1de5,_0x596ab0);}},_0x15978b=Buffer[_0x51ac96(0xfc)]([0x1f,0x43,0xb6,0x75]),_0x3e700c=Math['max'](0x4,uintSize(_0x4e1cc4)),_0x5cdde3=Buffer[_0x51ac96(0xf6)]([Buffer['from']([ID_TIMESTAMP]),_0x2ab951['GMVDj'](writeVint,_0x3e700c),_0x2ab951['NQxeH'](writeUint,_0x4e1cc4,_0x3e700c)]),_0x193906=Buffer['concat']([_0xe78c6f,_0x5cdde3,_0x2f49f6]),_0x359ea0=writeVint(_0x193906['length']);return Buffer['concat']([_0x15978b,_0x359ea0,_0x193906]);}function _0x5cc4(){const _0x2671b0=['VWerT','exit','concat','380067LErMBn','header','RjRIi','IiLZb','cvsPU','from','cNXGB','\x20files\x20->\x20','1988007PSzBUd','jjhyI','qBEMv','copy','BxBGv','raqeg','push','9zWIHoG','IPYXA','bmXfu','8WnuxeB','3765384SSAnvi','3341964eYtbfa','HkpnT','stitchWebmFiles.ts','LWKGP','yuQcz','39127kmYfbS','rTzGP','SoHNB','feswk','MCFOH','log','rbsWU','maxTicks','slice','cDsaK','8598440tkzbMv','kLpaL','VFOGD','18CQFlrP','clusters','4293785nxRfqy','LcWah','SWgRp','SxJhq','VliDt','length','has','kLqla','GfZlQ','Stitched\x20','floor','eCHbh','argv','GFeqB','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','min','OsFCD','timestamp','BbCgv','dvllz','ZhjbT','VxnPU','error','pow','iXPEL','endsWith','eUMwD','KLlSB','alloc'];_0x5cc4=function(){return _0x2671b0;};return _0x5cc4();}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x7ea73e){const _0x11a3d2=_0x28ef,_0x11b748={'kLqla':function(_0x4cfcbe,_0xa50f62){return _0x4cfcbe+_0xa50f62;},'OsFCD':function(_0x2093b2,_0x17174f){return _0x2093b2+_0x17174f;},'oWZIL':function(_0x1613e7,_0x3a4c83,_0x11bdef){return _0x1613e7(_0x3a4c83,_0x11bdef);},'MCFOH':function(_0xd561e7,_0x4fe2cb){return _0xd561e7<_0x4fe2cb;},'LcWah':function(_0x288bac,_0x3ea1e0,_0xea222b){return _0x288bac(_0x3ea1e0,_0xea222b);},'oRVFl':function(_0x1116b7,_0xa9c3b2){return _0x1116b7===_0xa9c3b2;},'vJfCw':function(_0x4c5701,_0x536299,_0x2c8677){return _0x4c5701(_0x536299,_0x2c8677);},'LJkYR':function(_0x114bc0,_0xccd6da){return _0x114bc0+_0xccd6da;},'kjrMG':function(_0xf44264,_0x106b77){return _0xf44264+_0x106b77;},'aaMfW':function(_0x7db088,_0x5082a9){return _0x7db088<_0x5082a9;},'LWKGP':function(_0x15ff76,_0xef2d3b){return _0x15ff76+_0xef2d3b;},'kLpaL':function(_0x36cadc,_0x4d1cc2){return _0x36cadc!==_0x4d1cc2;}},_0x5032f4=Buffer['from'](_0x7ea73e);let _0x229eb8=0x0;const [,_0x1178de]=readId(_0x5032f4,_0x229eb8),[_0x43d081,_0x2ad225]=readVint(_0x5032f4,_0x11b748['kLqla'](_0x229eb8,_0x1178de)),_0xac779=_0x11b748['kLqla'](_0x11b748[_0x11a3d2(0xe7)](_0x229eb8+_0x1178de,_0x2ad225),_0x43d081),[,_0x477cb6]=readId(_0x5032f4,_0xac779),[,_0x132bf5]=_0x11b748['oWZIL'](readVint,_0x5032f4,_0xac779+_0x477cb6),_0x57a05d=_0xac779+_0x477cb6+_0x132bf5,_0x52dc8a=writeUnknownSizeVint(_0x132bf5);_0x52dc8a[_0x11a3d2(0x102)](_0x5032f4,_0x11b748[_0x11a3d2(0xde)](_0xac779,_0x477cb6));let _0xf0e38=_0x57a05d;const _0x47da4c=Math[_0x11a3d2(0xe6)](_0x5032f4['length'],_0x57a05d+0x2710);while(_0x11b748[_0x11a3d2(0x114)](_0xf0e38,_0x47da4c)){const [_0x45eae8,_0x2de806]=_0x11b748[_0x11a3d2(0xd8)](readId,_0x5032f4,_0xf0e38),[_0x325459,_0x2b4111]=readVint(_0x5032f4,_0xf0e38+_0x2de806);if(_0x11b748['oRVFl'](_0x45eae8,ID_CLUSTER))break;if(_0x11b748['vJfCw'](isUnknownSize,_0x325459,_0x2b4111))break;if(_0x45eae8===ID_INFO){const _0x139222=_0x11b748['LJkYR'](_0xf0e38,_0x2de806)+_0x2b4111,_0x1a00f3=_0x11b748['kjrMG'](_0x139222,_0x325459),_0x565903=[];let _0xf689fa=_0x139222;while(_0x11b748['aaMfW'](_0xf689fa,_0x1a00f3)){const [_0x1e8b43,_0x124ef7]=_0x11b748[_0x11a3d2(0xd8)](readId,_0x5032f4,_0xf689fa),[_0x21da02,_0x32e40c]=_0x11b748[_0x11a3d2(0xd8)](readVint,_0x5032f4,_0xf689fa+_0x124ef7),_0x672129=_0x11b748[_0x11a3d2(0x10e)](_0x11b748['LJkYR'](_0x124ef7,_0x32e40c),_0x21da02);_0x11b748[_0x11a3d2(0xd3)](_0x1e8b43,ID_DURATION)&&_0x565903[_0x11a3d2(0x105)](_0x5032f4['slice'](_0xf689fa,_0xf689fa+_0x672129)),_0xf689fa+=_0x672129;}const _0x12aec4=Buffer['concat'](_0x565903),_0x312839=Buffer[_0x11a3d2(0xf6)]([_0x5032f4[_0x11a3d2(0x118)](_0xf0e38,_0xf0e38+_0x2de806),writeVint(_0x12aec4['length'],_0x2b4111)]);return Buffer['concat']([_0x5032f4[_0x11a3d2(0x118)](0x0,_0xf0e38),_0x312839,_0x12aec4,_0x5032f4[_0x11a3d2(0x118)](_0x1a00f3)]);}_0xf0e38+=_0x2de806+_0x2b4111+_0x325459;}return _0x5032f4;}export function stitchWebmFiles(_0x31c5d1,_0x35243a){const _0x4103cb=_0x28ef,_0x41d0a6={'LRfnZ':function(_0x1f0895,_0x378bb2){return _0x1f0895<=_0x378bb2;},'thVMg':function(_0x12ea05,_0x21f3f1){return _0x12ea05(_0x21f3f1);}};if(_0x41d0a6['LRfnZ'](_0x31c5d1['length'],0x1))return![];const _0x2f41aa=[];for(const _0x3fa0d0 of _0x31c5d1){const _0x201b5d=readFileSync(_0x3fa0d0),_0x4588dd=_0x41d0a6['thVMg'](parseWebm,_0x201b5d);if(!_0x4588dd||_0x4588dd[_0x4103cb(0xd6)][_0x4103cb(0xdc)]===0x0)return![];_0x2f41aa['push'](_0x4588dd);}const _0x193c55=_0x2f41aa[0x0],_0x50b368=rebuildHeaderWithoutDuration(_0x193c55[_0x4103cb(0xf8)]),_0x32825f=[_0x50b368];let _0x4b5b6b=0x0;for(let _0x17c01a=0x0;_0x17c01a<_0x2f41aa[_0x4103cb(0xdc)];_0x17c01a++){const _0x142628=_0x2f41aa[_0x17c01a];for(const _0x2a18bb of _0x142628[_0x4103cb(0xd6)]){const _0x26a6a5=_0x2a18bb[_0x4103cb(0xe8)]+_0x4b5b6b;_0x32825f[_0x4103cb(0x105)](buildCluster(_0x26a6a5,_0x2a18bb['bodyBeforeTimestamp'],_0x2a18bb['bodyAfterTimestamp']));}const _0x55bada=0x1e;_0x4b5b6b+=_0x142628['maxTimestampTicks']+_0x55bada;}return writeFileSync(_0x35243a,Buffer['concat'](_0x32825f)),!![];}if(process['argv'][0x1]?.[_0x4c28c2(0xf0)](_0x4c28c2(0x10d))||process[_0x4c28c2(0xe3)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x4c28c2(0x118)](0x2);args[_0x4c28c2(0xdc)]<0x3&&(console[_0x4c28c2(0xed)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x4c28c2(0xf5)](0x1));const output=args[args['length']-0x1],inputs=args[_0x4c28c2(0x118)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x4c28c2(0x115)](_0x4c28c2(0xe0)+inputs[_0x4c28c2(0xdc)]+_0x4c28c2(0xfe)+output):console['log'](_0x4c28c2(0xe5));}
|