@ranger-testing/ranger-cli 2.5.4-alpha.1f7a251-7 → 2.5.4-alpha.27e3ee8-11
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/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/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/opencodeConfig.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/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/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/skills/ranger/verify.md +6 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ccfd3,_0x52b324){const _0x4553bd=_0x1b5b,_0x219814=_0x2ccfd3();while(!![]){try{const _0x45e691=-parseInt(_0x4553bd(0x17e))/0x1*(-parseInt(_0x4553bd(0x18e))/0x2)+parseInt(_0x4553bd(0x197))/0x3*(-parseInt(_0x4553bd(0x174))/0x4)+parseInt(_0x4553bd(0x180))/0x5*(parseInt(_0x4553bd(0x190))/0x6)+-parseInt(_0x4553bd(0x1a3))/0x7+parseInt(_0x4553bd(0x175))/0x8*(-parseInt(_0x4553bd(0x192))/0x9)+parseInt(_0x4553bd(0x1a7))/0xa+parseInt(_0x4553bd(0x194))/0xb*(parseInt(_0x4553bd(0x1a0))/0xc);if(_0x45e691===_0x52b324)break;else _0x219814['push'](_0x219814['shift']());}catch(_0x56fc3d){_0x219814['push'](_0x219814['shift']());}}}(_0x5353,0x916f9));import{existsSync}from'fs';import _0x3b5d8b from'inquirer';function _0x1b5b(_0x50bee7,_0xf82e0e){_0x50bee7=_0x50bee7-0x16e;const _0x535380=_0x5353();let _0x1b5b20=_0x535380[_0x50bee7];return _0x1b5b20;}import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x4358f2){const _0x20f06c=_0x1b5b,_0x494c41={'MrcaU':function(_0xd3871e){return _0xd3871e();},'NSyyq':function(_0x57718d,_0x45e2b0){return _0x57718d+_0x45e2b0;},'eiKoy':function(_0x5b2271,_0x5ba791){return _0x5b2271+_0x5ba791;},'MzDPH':function(_0x5b3580,_0x36c79d){return _0x5b3580+_0x36c79d;},'ukBBs':_0x20f06c(0x19f),'vDtQX':_0x20f06c(0x1a4),'HCYYl':function(_0x9f26ea,_0x11b122){return _0x9f26ea(_0x11b122);},'VKtuA':function(_0x6fb0a3,_0x5994ec){return _0x6fb0a3===_0x5994ec;},'CHMsy':function(_0x58b577,_0x33c671){return _0x58b577&&_0x33c671;},'mpbsx':function(_0x264889,_0x2b8290){return _0x264889+_0x2b8290;},'JkQFB':function(_0x2aa79e,_0x862389){return _0x2aa79e&&_0x862389;},'gbCVo':_0x20f06c(0x19c),'bgAnn':'source','JmJko':'local','lfNIr':'cloud','OLtgz':function(_0xdc428b,_0x5ec44a,_0x58c02e){return _0xdc428b(_0x5ec44a,_0x58c02e);},'DDKGW':function(_0x37a0af,_0x39412c,_0x22188a){return _0x37a0af(_0x39412c,_0x22188a);},'Effgg':function(_0x46eaef,_0x35bf11){return _0x46eaef??_0x35bf11;},'EUrdh':'0|4|2|3|1','RjpDS':function(_0xb3085f,_0x5c4bcf){return _0xb3085f(_0x5c4bcf);}},_0x1cb6aa=_0x4358f2['profile'];let _0x1da743=_0x4358f2[_0x20f06c(0x181)]??await _0x494c41[_0x20f06c(0x16e)](readActiveProfileName),_0xd3d2ce=null;if(!_0x1da743&&process[_0x20f06c(0x1a1)][_0x20f06c(0x196)]){const _0x5bfad6=await resolveAdHocProfile();_0x5bfad6&&(_0x1da743=_0x5bfad6[_0x20f06c(0x19a)],_0xd3d2ce=_0x5bfad6[_0x20f06c(0x181)]);}if(!_0x1da743)try{const _0x164e54=await _0x494c41['MrcaU'](listCloudProfiles);if(_0x164e54[_0x20f06c(0x186)]===0x1){const _0x7f3831=_0x164e54[0x0];_0x1da743=_0x7f3831['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x7f3831[_0x20f06c(0x19a)]),console[_0x20f06c(0x191)](_0x20f06c(0x17a));}}catch{}if(!_0x1da743)throw new Error(_0x494c41[_0x20f06c(0x17d)](_0x494c41['eiKoy'](_0x494c41[_0x20f06c(0x189)](_0x494c41['ukBBs'],'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x20f06c(0x18d)),_0x494c41['vDtQX'])+_0x20f06c(0x199));const _0x402fa4=_0x494c41['HCYYl'](getEnvDir,_0x1da743),_0x38f386=existsSync(_0x402fa4);let _0x3d9576=_0xd3d2ce,_0x2efa0e=![];if(!_0x3d9576)try{_0x3d9576=await _0x494c41['HCYYl'](fetchCloudProfile,_0x1da743);if(!_0x3d9576)_0x2efa0e=!![];}catch(_0x33c043){_0x33c043 instanceof ApiError&&_0x494c41[_0x20f06c(0x16f)](_0x33c043['status'],0x194)&&(_0x2efa0e=!![]);}if(_0x494c41['CHMsy'](_0x1cb6aa,_0x2efa0e)&&!_0x38f386&&!_0x3d9576)throw new Error(_0x494c41[_0x20f06c(0x1a6)](_0x494c41[_0x20f06c(0x189)](_0x20f06c(0x198)+_0x1cb6aa+_0x20f06c(0x195),'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),'`ranger\x20profile\x20add`\x20to\x20create\x20one.'));if(_0x494c41[_0x20f06c(0x19e)](_0x3d9576,_0x38f386)){let _0x3b0d06=!![];if(_0x494c41[_0x20f06c(0x16e)](isInteractive)){const {source:_0x381e08}=await _0x3b5d8b[_0x20f06c(0x179)]([{'type':_0x494c41[_0x20f06c(0x18a)],'name':_0x494c41['bgAnn'],'message':'Profile\x20\x22'+_0x1da743+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x20f06c(0x18b),'value':_0x20f06c(0x193)},{'name':_0x20f06c(0x178),'value':_0x494c41[_0x20f06c(0x170)]}],'default':_0x494c41[_0x20f06c(0x177)]}]);_0x3b0d06=_0x381e08===_0x494c41[_0x20f06c(0x177)];}if(!_0x3b0d06)_0x3d9576=null;}const _0x2bd523=_0x494c41[_0x20f06c(0x182)](readProfileOverrides,process['cwd'](),_0x1da743);let _0x5bee37=null,_0x3091e0,_0x19e07f,_0x501889,_0x1cb6e6,_0x43284f=null,_0x3d5655;const _0x2db3f6=_0x494c41['HCYYl'](expandOverrides,_0x2bd523);if(_0x3d9576){_0x5bee37=_0x3d9576;const _0x1a738e=_0x3d9576[_0x20f06c(0x18c)]??{},_0x320c50=_0x494c41['DDKGW'](mergeCloudProfileSettings,_0x1a738e,_0x494c41['Effgg'](_0x2bd523,undefined)),_0x5b15d6={..._0x3d9576,'settings':_0x320c50},_0x255abe=process[_0x20f06c(0x1a1)][_0x20f06c(0x171)];if(_0x255abe){const _0x32f05a=_0x494c41[_0x20f06c(0x172)]['split']('|');let _0x3a7625=0x0;while(!![]){switch(_0x32f05a[_0x3a7625++]){case'0':if(!existsSync(_0x255abe))throw new Error('RANGER_SESSION_STATE_PATH='+_0x255abe+'\x20does\x20not\x20exist.');continue;case'1':_0x43284f={'baseUrl':expandString(_0x1a738e['baseUrl']),'startPath':expandString(_0x1a738e['startPath'])};continue;case'2':_0x19e07f=resolveEnvVars(_0x320c50);continue;case'3':_0x501889=_0x494c41[_0x20f06c(0x17f)](Boolean,_0x19e07f[_0x20f06c(0x173)]);continue;case'4':_0x3091e0=_0x255abe;continue;}break;}}else{const _0x4ff704=await resolveCloudProfileSession(_0x5b15d6);_0x3091e0=_0x4ff704['authPath'],_0x19e07f=resolveEnvVars(_0x320c50),_0x501889=_0x494c41['RjpDS'](Boolean,_0x19e07f[_0x20f06c(0x173)]),_0x43284f={'baseUrl':expandString(_0x1a738e[_0x20f06c(0x1a2)]),'startPath':expandString(_0x1a738e['startPath'])},_0x3d5655=_0x4ff704[_0x20f06c(0x188)]?.[_0x20f06c(0x185)]?.[0x0];}}else{if(!_0x38f386)throw new Error(_0x20f06c(0x198)+_0x1da743+_0x20f06c(0x184)+_0x1da743);const _0x33ec43=await _0x494c41[_0x20f06c(0x187)](loadSettings,_0x1da743);_0x19e07f=resolveEnvVars(_0x33ec43),_0x501889=Boolean(_0x19e07f[_0x20f06c(0x173)]),_0x1cb6e6=_0x19e07f[_0x20f06c(0x1a2)];}const _0x16b37c=readUrlEnvVars(),_0x12cbf5=resolveProfileUrl({'flagBaseUrl':_0x4358f2['baseUrl'],'flagStartPath':_0x4358f2[_0x20f06c(0x17c)],'envBaseUrl':_0x16b37c[_0x20f06c(0x18f)],'envStartPath':_0x16b37c[_0x20f06c(0x19d)],'localSettingsBaseUrl':_0x1cb6e6,'projectOverrides':_0x2db3f6,'cloudSettings':_0x43284f,'authEnvironmentDomain':_0x3d5655}),_0x45f37e=_0x12cbf5[_0x20f06c(0x176)]??_0x12cbf5[_0x20f06c(0x1a2)];if(_0x494c41[_0x20f06c(0x19e)](!_0x45f37e,!_0x501889))throw new Error(_0x20f06c(0x19b)+_0x1da743+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x1da743+'\x20baseUrl\x20<url>');return{'activeProfile':_0x1da743,'resolvedCloudProfile':_0x5bee37,'cloudAuthPath':_0x3091e0,'resolvedSettings':_0x19e07f,'isCdpMode':_0x501889,'url':_0x45f37e,'startPath':_0x12cbf5['startPath']};}function expandString(_0xa15dd8){const _0x186df3=_0x1b5b,_0x3a0be4={'jzaIV':function(_0x50987e,_0x354478){return _0x50987e!==_0x354478;}};if(_0x3a0be4['jzaIV'](typeof _0xa15dd8,_0x186df3(0x183)))return _0xa15dd8;return resolveEnvVars(_0xa15dd8);}function _0x5353(){const _0x38bf91=['1755VGExaY','cloud','6034479RClnku','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','RANGER_TEST_USERNAME','3QDkZpO','Profile\x20\x22','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','name','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','list','envStartPath','JkQFB','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','48ABDTCn','env','baseUrl','3547768aQNLWR','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','SoYcl','mpbsx','387220iuBaWM','MrcaU','VKtuA','JmJko','RANGER_SESSION_STATE_PATH','EUrdh','cdpEndpoint','2883812Fwfbtz','48320FfOZms','url','lfNIr','Local\x20profile','prompt','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','rNAdr','startPath','NSyyq','9ghhIcL','RjpDS','5Zjxbdd','profile','OLtgz','string','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','domains','length','HCYYl','resolvedEnv','MzDPH','gbCVo','Cloud\x20profile\x20(recommended)','settings','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','31294aHsvFO','envBaseUrl','3764286JTsIzO','log'];_0x5353=function(){return _0x38bf91;};return _0x5353();}function expandOverrides(_0x30ab72){const _0x1e1059=_0x1b5b,_0x16567f={'rNAdr':function(_0x5593b6,_0x4e2986){return _0x5593b6===_0x4e2986;},'SoYcl':function(_0x12b814,_0x2e6fe2){return _0x12b814(_0x2e6fe2);},'jLAXF':'string'};if(!_0x30ab72)return _0x30ab72;const _0x43e308={..._0x30ab72};return _0x16567f[_0x1e1059(0x17b)](typeof _0x43e308[_0x1e1059(0x1a2)],'string')&&(_0x43e308[_0x1e1059(0x1a2)]=_0x16567f[_0x1e1059(0x1a5)](resolveEnvVars,_0x43e308[_0x1e1059(0x1a2)])),_0x16567f[_0x1e1059(0x17b)](typeof _0x43e308['startPath'],_0x16567f['jLAXF'])&&(_0x43e308['startPath']=_0x16567f['SoYcl'](resolveEnvVars,_0x43e308['startPath'])),_0x43e308;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x37d710=_0x4c42;function _0x4c42(_0x2a3e82,_0x1a2b1b){_0x2a3e82=_0x2a3e82-0x16f;const _0x2c033d=_0x2c03();let _0x4c4252=_0x2c033d[_0x2a3e82];return _0x4c4252;}(function(_0x346d67,_0x147ca9){const _0x56f0c4=_0x4c42,_0x5802e8=_0x346d67();while(!![]){try{const _0x4d1d05=-parseInt(_0x56f0c4(0x17f))/0x1+-parseInt(_0x56f0c4(0x172))/0x2*(-parseInt(_0x56f0c4(0x180))/0x3)+parseInt(_0x56f0c4(0x17a))/0x4+-parseInt(_0x56f0c4(0x17b))/0x5*(-parseInt(_0x56f0c4(0x170))/0x6)+parseInt(_0x56f0c4(0x181))/0x7*(-parseInt(_0x56f0c4(0x171))/0x8)+parseInt(_0x56f0c4(0x17c))/0x9*(parseInt(_0x56f0c4(0x176))/0xa)+-parseInt(_0x56f0c4(0x175))/0xb;if(_0x4d1d05===_0x147ca9)break;else _0x5802e8['push'](_0x5802e8['shift']());}catch(_0x401b0b){_0x5802e8['push'](_0x5802e8['shift']());}}}(_0x2c03,0xe0f92));function firstDefined(..._0x3cacfc){const _0xa50a9=_0x4c42,_0x45ae1f={'WwfCI':function(_0x2323ba,_0x3ccf5e){return _0x2323ba!==_0x3ccf5e;}};for(const _0x62e38a of _0x3cacfc){if(_0x62e38a!==undefined&&_0x45ae1f[_0xa50a9(0x173)](_0x62e38a,null)&&_0x62e38a!=='')return _0x62e38a;}return undefined;}function normalizeAuthEnvironmentDomain(_0x1f3ac3){const _0x4b1f4a=_0x4c42;if(!_0x1f3ac3)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x4b1f4a(0x17e)](_0x1f3ac3))return _0x1f3ac3;return _0x4b1f4a(0x17d)+_0x1f3ac3;}export function resolveBaseUrl(_0x56e430){const _0x288c46=_0x4c42,_0x22062e={'GYFRG':function(_0x34a49e,_0x4f46b4){return _0x34a49e in _0x4f46b4;},'Fawqr':function(_0x3bffd5,_0x14e3a3,_0x25d913,_0x3ca3d9,_0x40d306,_0x32e036,_0x46b6b5){return _0x3bffd5(_0x14e3a3,_0x25d913,_0x3ca3d9,_0x40d306,_0x32e036,_0x46b6b5);}},_0x1d93ce=_0x56e430['projectOverrides'],_0x484c68=!!_0x1d93ce&&_0x22062e['GYFRG']('baseUrl',_0x1d93ce),_0x3f39cc=_0x1d93ce?.['baseUrl'],_0x3dd2aa=!(_0x484c68&&_0x3f39cc===null);return _0x22062e[_0x288c46(0x174)](firstDefined,_0x56e430['flagBaseUrl'],_0x56e430['envBaseUrl'],_0x56e430['localSettingsBaseUrl'],typeof _0x3f39cc===_0x288c46(0x177)?_0x3f39cc:undefined,_0x3dd2aa?_0x56e430['cloudSettings']?.['baseUrl']:undefined,_0x3dd2aa?normalizeAuthEnvironmentDomain(_0x56e430['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x157c63){const _0x56a9ed=_0x4c42,_0x412720={'CWOfN':function(_0x151349,_0x1c9bc1){return _0x151349 in _0x1c9bc1;},'VCLZX':function(_0x5185e2,_0x2e55ca){return _0x5185e2===_0x2e55ca;},'Jhvvv':function(_0x492cdf,_0x49d497,_0x20a094,_0x5bbf5,_0x4a5be1){return _0x492cdf(_0x49d497,_0x20a094,_0x5bbf5,_0x4a5be1);}},_0xb532f0=_0x157c63['projectOverrides'],_0x9bdf22=!!_0xb532f0&&_0x412720['CWOfN'](_0x56a9ed(0x178),_0xb532f0),_0x203142=_0xb532f0?.[_0x56a9ed(0x178)],_0xf7c6be=!(_0x9bdf22&&_0x412720['VCLZX'](_0x203142,null));return _0x412720['Jhvvv'](firstDefined,_0x157c63['flagStartPath'],_0x157c63[_0x56a9ed(0x16f)],_0x412720['VCLZX'](typeof _0x203142,_0x56a9ed(0x177))?_0x203142:undefined,_0xf7c6be?_0x157c63['cloudSettings']?.['startPath']:undefined);}function _0x2c03(){const _0x34852d=['Fawqr','490853JKoqjl','100nNnNKI','string','startPath','env','3845188ugLQMH','5vrmYdK','1592775oXdJsA','https://','test','1792361EPeyyy','3GLzReh','2947JDJaYo','EJuPx','envStartPath','4777554XFZYvX','20720SRfZPY','643116zHWQvK','WwfCI'];_0x2c03=function(){return _0x34852d;};return _0x2c03();}export function joinBaseAndPath(_0x553428,_0x336f9c){if(!_0x553428)return undefined;if(!_0x336f9c)return _0x553428;const _0x1746e1=_0x553428['endsWith']('/')?_0x553428['slice'](0x0,-0x1):_0x553428,_0x33d4e=_0x336f9c['startsWith']('/')?_0x336f9c:'/'+_0x336f9c;return _0x1746e1+_0x33d4e;}export function resolveProfileUrl(_0x21b329){const _0x216ed5=_0x4c42,_0x206939={'EJuPx':function(_0x390250,_0x441d2b){return _0x390250(_0x441d2b);},'yfMab':function(_0x3433b6,_0x21ced8){return _0x3433b6(_0x21ced8);}},_0x39da7a=_0x206939[_0x216ed5(0x182)](resolveBaseUrl,_0x21b329),_0x4bfa83=_0x206939['yfMab'](resolveStartPath,_0x21b329);return{'baseUrl':_0x39da7a,'startPath':_0x4bfa83,'url':joinBaseAndPath(_0x39da7a,_0x4bfa83)};}export function readUrlEnvVars(_0xcf1259=process[_0x37d710(0x179)]){return{'envBaseUrl':_0xcf1259['RANGER_BASE_URL'],'envStartPath':_0xcf1259['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bee57,_0xb4e94e){const _0x262a29=_0x3f0e,_0x196d2d=_0x3bee57();while(!![]){try{const _0x5c9cf4=parseInt(_0x262a29(0xe0))/0x1*(-parseInt(_0x262a29(0xda))/0x2)+-parseInt(_0x262a29(0xd6))/0x3+-parseInt(_0x262a29(0xd8))/0x4+-parseInt(_0x262a29(0xde))/0x5*(-parseInt(_0x262a29(0xd9))/0x6)+parseInt(_0x262a29(0xdb))/0x7+-parseInt(_0x262a29(0xd5))/0x8*(-parseInt(_0x262a29(0xdd))/0x9)+parseInt(_0x262a29(0xdc))/0xa;if(_0x5c9cf4===_0xb4e94e)break;else _0x196d2d['push'](_0x196d2d['shift']());}catch(_0x416f91){_0x196d2d['push'](_0x196d2d['shift']());}}}(_0x5505,0x35e34));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x3f0e(_0x366006,_0x39ce6c){_0x366006=_0x366006-0xd5;const _0x5505c2=_0x5505();let _0x3f0ecf=_0x5505c2[_0x366006];return _0x3f0ecf;}function _0x5505(){const _0x478734=['1489616IuDAlf','6OmbGhV','118486UdXbFq','2853816xLeVxf','1200280TZGLWW','60012syJGTY','1630585CHHWvo','baseDelayMs','1CrLDZz','ms...','pow','),\x20retrying\x20in\x20','maxRetries','88FnfAkQ','824430izUvPT','\x20failed\x20(attempt\x20'];_0x5505=function(){return _0x478734;};return _0x5505();}export async function withRetry(_0x6b1cf1,_0x1a15cf){const _0x5b6d6d=_0x3f0e,_0x5706d8={'TzKqy':function(_0x39ade4){return _0x39ade4();},'feMyG':function(_0x2dff19,_0x427e19){return _0x2dff19 instanceof _0x427e19;}},_0x27a077=_0x1a15cf?.[_0x5b6d6d(0xe4)]??DEFAULT_MAX_RETRIES,_0x539804=_0x1a15cf?.[_0x5b6d6d(0xdf)]??DEFAULT_BASE_DELAY_MS;let _0x2b61c0;for(let _0x4b9458=0x0;_0x4b9458<=_0x27a077;_0x4b9458++){try{return await _0x5706d8['TzKqy'](_0x6b1cf1);}catch(_0x2a62a9){_0x2b61c0=_0x5706d8['feMyG'](_0x2a62a9,Error)?_0x2a62a9:new Error(String(_0x2a62a9));if(_0x4b9458<_0x27a077){const _0x53ba5d=_0x539804*Math[_0x5b6d6d(0xe2)](0x2,_0x4b9458);_0x1a15cf?.['label']&&console['error'](_0x1a15cf['label']+_0x5b6d6d(0xd7)+(_0x4b9458+0x1)+'/'+(_0x27a077+0x1)+_0x5b6d6d(0xe3)+_0x53ba5d+_0x5b6d6d(0xe1)),await new Promise(_0x2c784e=>setTimeout(_0x2c784e,_0x53ba5d));}}}throw _0x2b61c0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1e6dd1=_0x17dc;(function(_0x31a41c,_0x15bb4a){const _0x153290=_0x17dc,_0x5f2bc2=_0x31a41c();while(!![]){try{const _0x324343=-parseInt(_0x153290(0x169))/0x1+parseInt(_0x153290(0x164))/0x2+-parseInt(_0x153290(0x148))/0x3+parseInt(_0x153290(0x14c))/0x4*(parseInt(_0x153290(0x158))/0x5)+parseInt(_0x153290(0x13d))/0x6*(-parseInt(_0x153290(0x16e))/0x7)+parseInt(_0x153290(0x144))/0x8*(parseInt(_0x153290(0x165))/0x9)+parseInt(_0x153290(0x16c))/0xa*(parseInt(_0x153290(0x15d))/0xb);if(_0x324343===_0x15bb4a)break;else _0x5f2bc2['push'](_0x5f2bc2['shift']());}catch(_0xf29334){_0x5f2bc2['push'](_0x5f2bc2['shift']());}}}(_0x18ca,0x72b41));import*as _0x3c986d from'fs';function _0x17dc(_0x556fc1,_0x340183){_0x556fc1=_0x556fc1-0x13c;const _0x18cacd=_0x18ca();let _0x17dc8f=_0x18cacd[_0x556fc1];return _0x17dc8f;}import*as _0x4522c8 from'path';import*as _0x509891 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4522c8[_0x1e6dd1(0x142)](_0x509891[_0x1e6dd1(0x16b)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x136d42=_0x1e6dd1,_0x636739={'uFMFy':_0x136d42(0x168)};try{if(_0x3c986d[_0x136d42(0x159)](CACHE_FILE)){const _0x366ef0=JSON['parse'](_0x3c986d[_0x136d42(0x150)](CACHE_FILE,_0x636739[_0x136d42(0x13f)]));return{'version':0x3,'sessions':_0x366ef0[_0x136d42(0x14a)]||{},'branches':_0x366ef0[_0x136d42(0x167)]||{},'lastEnabledSessionClearedAt':_0x366ef0['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x200572){const _0x32c34e=_0x1e6dd1;try{const _0x1aa135=_0x4522c8[_0x32c34e(0x151)](CACHE_FILE);!_0x3c986d[_0x32c34e(0x159)](_0x1aa135)&&_0x3c986d[_0x32c34e(0x15b)](_0x1aa135,{'recursive':!![]}),_0x3c986d[_0x32c34e(0x152)](CACHE_FILE,JSON['stringify'](_0x200572,null,0x2));}catch{}}export function getCurrentBranch(){const _0x15956b=_0x1e6dd1,_0x59b1b6={'urQev':function(_0x3a856d,_0x44a322,_0x4db634){return _0x3a856d(_0x44a322,_0x4db634);},'gqXwk':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','lyXHt':'utf-8','czyNF':'pipe','PAhAi':function(_0x414e11,_0x8aecc7){return _0x414e11===_0x8aecc7;}};try{const _0x2c620d=_0x59b1b6[_0x15956b(0x15f)](execSync,_0x59b1b6[_0x15956b(0x154)],{'encoding':_0x59b1b6['lyXHt'],'stdio':[_0x59b1b6[_0x15956b(0x14e)],_0x59b1b6['czyNF'],_0x59b1b6[_0x15956b(0x14e)]]})['trim']();if(!_0x2c620d||_0x59b1b6[_0x15956b(0x14f)](_0x2c620d,'HEAD'))return null;return _0x2c620d;}catch{return null;}}export function enableBranch(_0x477ec7){const _0x1d181b=_0x1e6dd1,_0x583d7b={'QWAlp':function(_0x32d712,_0x1b21a2){return _0x32d712(_0x1b21a2);}},_0x11def9=loadCache();_0x11def9[_0x1d181b(0x167)][_0x477ec7]=!![],_0x583d7b[_0x1d181b(0x13c)](saveCache,_0x11def9);}export function disableBranch(_0x850565){const _0x2aba30=_0x1e6dd1,_0x2cb7bb={'vShPK':function(_0x3f089a){return _0x3f089a();}},_0x229a80=_0x2cb7bb[_0x2aba30(0x149)](loadCache);delete _0x229a80['branches'][_0x850565],saveCache(_0x229a80);}export function isBranchEnabled(_0xa5dfc4){const _0xdbd1fe=_0x1e6dd1,_0x5f286b={'toDTv':function(_0x33f652,_0x333b36){return _0x33f652===_0x333b36;}},_0x243fa3=loadCache();return _0x5f286b[_0xdbd1fe(0x145)](_0x243fa3['branches'][_0xa5dfc4],!![]);}function getOrCreateSession(_0x56621c,_0x2ce0a8){const _0x506e3b=_0x1e6dd1;return!_0x56621c['sessions'][_0x2ce0a8]&&(_0x56621c['sessions'][_0x2ce0a8]={}),_0x56621c[_0x506e3b(0x14a)][_0x2ce0a8];}export function enableSession(_0x5ef5ee){const _0x1e6c67=_0x1e6dd1,_0x2e20ce={'dWgUs':function(_0x8bb605){return _0x8bb605();},'hHkos':_0x1e6c67(0x163),'hkLIv':function(_0x19c640,_0x2ddd98){return _0x19c640!==_0x2ddd98;}},_0x186fd5=loadCache(),_0x186858=getOrCreateSession(_0x186fd5,_0x5ef5ee);_0x186858['enabled']=!![];const _0x311e3d=_0x2e20ce[_0x1e6c67(0x146)](getCurrentBranch);_0x311e3d&&_0x311e3d!==_0x2e20ce['hHkos']&&_0x2e20ce['hkLIv'](_0x311e3d,'master')&&(_0x186fd5['branches'][_0x311e3d]=!![],_0x186858['currentBranch']=_0x311e3d),saveCache(_0x186fd5);}export function isSessionEnabled(_0xf00c88){const _0x6c81e=_0x1e6dd1,_0x3d075b={'prdlJ':function(_0x3adbe1,_0x34a5af){return _0x3adbe1===_0x34a5af;},'ATUpe':_0x6c81e(0x163),'mOPHS':function(_0x462353,_0x313d67){return _0x462353===_0x313d67;},'mJzZE':function(_0xd1af1b,_0x331bc9){return _0xd1af1b===_0x331bc9;}},_0x3972c2=loadCache(),_0x52ea55=getCurrentBranch();if(!_0x52ea55||_0x3d075b['prdlJ'](_0x52ea55,_0x3d075b['ATUpe'])||_0x3d075b[_0x6c81e(0x147)](_0x52ea55,'master'))return _0x3972c2[_0x6c81e(0x14a)][_0xf00c88]?.['enabled']===!![];const _0x2ff27e=_0x3972c2['branches'][_0x52ea55]===!![],_0x5539d1=_0x3d075b[_0x6c81e(0x140)](_0x3972c2[_0x6c81e(0x14a)][_0xf00c88]?.['enabled'],!![]);return _0x2ff27e||_0x5539d1;}export function disableSession(_0xe4b18){const _0x425c52=_0x1e6dd1,_0xeab247={'UDxma':function(_0xbf7195,_0x190d3e){return _0xbf7195(_0x190d3e);}},_0x20f803=loadCache(),_0x4b8da7=getOrCreateSession(_0x20f803,_0xe4b18);_0x4b8da7[_0x425c52(0x16f)]=![],_0xeab247['UDxma'](saveCache,_0x20f803);}export function updateBranchTracking(_0x56d91f){const _0x2e5909=_0x1e6dd1,_0x1b71a6={'NOdBO':function(_0x5b3bed){return _0x5b3bed();},'ETMIp':function(_0x7c751f,_0x962d72){return _0x7c751f===_0x962d72;},'WfSxf':function(_0x4dc830,_0x2d65d1){return _0x4dc830(_0x2d65d1);}},_0x14b684=_0x1b71a6['NOdBO'](loadCache),_0x413eab=_0x14b684['sessions'][_0x56d91f];if(!_0x413eab?.['enabled'])return;const _0x1023c7=_0x1b71a6['NOdBO'](getCurrentBranch);if(!_0x1023c7||_0x1023c7===_0x2e5909(0x163)||_0x1b71a6[_0x2e5909(0x15a)](_0x1023c7,_0x2e5909(0x157)))return;_0x413eab[_0x2e5909(0x15e)]!==_0x1023c7&&(_0x14b684[_0x2e5909(0x167)][_0x1023c7]=!![],_0x413eab[_0x2e5909(0x15e)]=_0x1023c7,_0x1b71a6[_0x2e5909(0x172)](saveCache,_0x14b684));}export function initBranchTracking(_0x3a7cb7){const _0x1f3ae2=_0x1e6dd1,_0x33674f={'YAEIM':function(_0x93e858){return _0x93e858();},'LOZiF':function(_0x5ab255,_0x16740d){return _0x5ab255===_0x16740d;},'qHuPS':_0x1f3ae2(0x157),'obYgZ':function(_0x48452f,_0x422880,_0x1ebd73){return _0x48452f(_0x422880,_0x1ebd73);},'IihvI':function(_0xcbe085,_0x38682c){return _0xcbe085(_0x38682c);}},_0x4edaf2=_0x33674f['YAEIM'](loadCache),_0x9b31ed=getCurrentBranch();if(!_0x9b31ed||_0x9b31ed==='main'||_0x33674f['LOZiF'](_0x9b31ed,_0x33674f['qHuPS']))return;if(_0x4edaf2[_0x1f3ae2(0x167)][_0x9b31ed]===!![]){const _0x388301=_0x33674f[_0x1f3ae2(0x155)](getOrCreateSession,_0x4edaf2,_0x3a7cb7);_0x388301['enabled']=!![],_0x388301[_0x1f3ae2(0x15e)]=_0x9b31ed,_0x33674f[_0x1f3ae2(0x14d)](saveCache,_0x4edaf2);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0xc5d59d){const _0x48eada=_0x1e6dd1,_0x265bda={'rjYKN':function(_0x3f2283){return _0x3f2283();}},_0x47cea6=_0x265bda['rjYKN'](loadCache),_0xf97690=_0x47cea6[_0x48eada(0x14a)][_0xc5d59d];_0xf97690?.[_0x48eada(0x16f)]&&(_0x47cea6[_0x48eada(0x171)]=Date['now'](),saveCache(_0x47cea6));}export function shouldAutoEnableAfterClear(_0x2d5197){const _0x148dc9=_0x1e6dd1,_0x220a43={'JtkVL':function(_0x12c189,_0x10c3e7){return _0x12c189!==_0x10c3e7;},'uZhgV':_0x148dc9(0x16a)};if(_0x220a43[_0x148dc9(0x15c)](_0x2d5197,_0x220a43[_0x148dc9(0x156)]))return![];const _0x4a3c20=loadCache(),_0x3d7010=_0x4a3c20[_0x148dc9(0x171)];if(!_0x3d7010)return![];const _0x4c03a4=Date['now']()-_0x3d7010;return _0x4c03a4<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x18ca(){const _0xdf2c29=['514984YjTUqL','IihvI','czyNF','PAhAi','readFileSync','dirname','writeFileSync','ADCZq','gqXwk','obYgZ','uZhgV','master','10sePmDC','existsSync','ETMIp','mkdirSync','JtkVL','107162LyIfHn','currentBranch','urQev','taCEm','mUvvU','featureId','main','364168bvzoEW','144EfQymR','MZlIl','branches','utf-8','800173tvyEcJ','clear','homedir','1200bIlFmD','registeredAt','994xwxuyg','enabled','lastPlanReminderAt','lastEnabledSessionClearedAt','WfSxf','QWAlp','12216yGdvtF','NhpIB','uFMFy','mJzZE','now','join','mvCKX','362632vVNxza','toDTv','dWgUs','mOPHS','2324310xGMUkR','vShPK','sessions','prompted'];_0x18ca=function(){return _0xdf2c29;};return _0x18ca();}export function autoEnableAfterClear(_0x17aef3){const _0x46ff4a=_0x1e6dd1,_0x497c04={'mvCKX':function(_0x18ccd6){return _0x18ccd6();},'YvsMG':function(_0xf9dd9,_0x5b612e,_0x33a121){return _0xf9dd9(_0x5b612e,_0x33a121);},'IynFr':function(_0x5e1f00){return _0x5e1f00();},'hPOfU':function(_0x5647d8,_0x107fe4){return _0x5647d8!==_0x107fe4;},'qfVqV':_0x46ff4a(0x163),'RIGpe':'master','mUvvU':function(_0x29c90e,_0x3bad87){return _0x29c90e(_0x3bad87);}},_0x37b1e7=_0x497c04[_0x46ff4a(0x143)](loadCache),_0x2ae289=_0x497c04['YvsMG'](getOrCreateSession,_0x37b1e7,_0x17aef3);_0x2ae289[_0x46ff4a(0x16f)]=!![];const _0x58d1d9=_0x497c04['IynFr'](getCurrentBranch);_0x58d1d9&&_0x497c04['hPOfU'](_0x58d1d9,_0x497c04['qfVqV'])&&_0x58d1d9!==_0x497c04['RIGpe']&&(_0x2ae289[_0x46ff4a(0x15e)]=_0x58d1d9),delete _0x37b1e7['lastEnabledSessionClearedAt'],_0x497c04[_0x46ff4a(0x161)](saveCache,_0x37b1e7);}export function registerSession(_0x1dc67c,_0x45edde){const _0x1e0412=_0x1e6dd1,_0x54972c={'pISpB':function(_0x3722f7,_0x527c8c,_0x272d2a){return _0x3722f7(_0x527c8c,_0x272d2a);},'AqrYh':function(_0x6d29b0,_0x4adcb5){return _0x6d29b0(_0x4adcb5);}},_0x346c8a=loadCache(),_0x133c45=_0x54972c['pISpB'](getOrCreateSession,_0x346c8a,_0x1dc67c);_0x133c45[_0x1e0412(0x162)]=_0x45edde,_0x133c45[_0x1e0412(0x16d)]=new Date()['toISOString'](),_0x54972c['AqrYh'](saveCache,_0x346c8a);}export function getSessionEntry(_0x549adf){const _0x13c142=_0x1e6dd1,_0x3608c2=loadCache(),_0x4e36b8=_0x3608c2[_0x13c142(0x14a)][_0x549adf];if(_0x4e36b8?.['featureId']&&_0x4e36b8?.[_0x13c142(0x16d)])return{'featureId':_0x4e36b8[_0x13c142(0x162)],'registeredAt':_0x4e36b8[_0x13c142(0x16d)]};return null;}export function unregisterSession(_0x106348){const _0x5cc4d5=_0x1e6dd1,_0x5e24a1={'CwMUN':function(_0xf43f77,_0x24bd19){return _0xf43f77(_0x24bd19);}},_0x12e15f=loadCache(),_0x4f5770=_0x12e15f['sessions'][_0x106348];_0x4f5770&&(delete _0x4f5770['featureId'],delete _0x4f5770[_0x5cc4d5(0x16d)],_0x5e24a1['CwMUN'](saveCache,_0x12e15f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x27df82){const _0x113d96=_0x1e6dd1,_0x163a19={'MZlIl':function(_0x336e61,_0x50d2a4,_0x57fa12){return _0x336e61(_0x50d2a4,_0x57fa12);},'XqkwF':function(_0x57ee98,_0x2e983c){return _0x57ee98-_0x2e983c;},'vkLcE':function(_0x2287f9,_0x2a5bda){return _0x2287f9(_0x2a5bda);}},_0x20321b=loadCache(),_0x5810ec=_0x163a19[_0x113d96(0x166)](getOrCreateSession,_0x20321b,_0x27df82),_0xc3faa8=_0x5810ec[_0x113d96(0x170)]||0x0,_0x3b32ba=Date['now']();if(_0x163a19['XqkwF'](_0x3b32ba,_0xc3faa8)>=PLAN_REMINDER_INTERVAL_MS)return _0x5810ec[_0x113d96(0x170)]=_0x3b32ba,_0x163a19['vkLcE'](saveCache,_0x20321b),!![];return![];}export function shouldShowStopReminder(_0x1da665){const _0x37302f=_0x1e6dd1,_0xf1dc9d={'OCuMY':function(_0x229389){return _0x229389();},'NhpIB':function(_0x341abc,_0x5ec1fe){return _0x341abc(_0x5ec1fe);}},_0x4703b8=_0xf1dc9d['OCuMY'](loadCache),_0x42fd9=getOrCreateSession(_0x4703b8,_0x1da665),_0x4f76e4=_0x42fd9['lastStopReminderAt']||0x0,_0x287415=Date[_0x37302f(0x141)]();if(_0x287415-_0x4f76e4>=STOP_REMINDER_INTERVAL_MS)return _0x42fd9['lastStopReminderAt']=_0x287415,_0xf1dc9d[_0x37302f(0x13e)](saveCache,_0x4703b8),!![];return![];}export function hasSessionBeenPrompted(_0x550fa0){const _0x564591=_0x1e6dd1,_0x123880={'ADCZq':function(_0x572792){return _0x572792();},'GAGGa':function(_0x33603a,_0x7c80c1){return _0x33603a===_0x7c80c1;}},_0x377cfc=_0x123880[_0x564591(0x153)](loadCache);return _0x123880['GAGGa'](_0x377cfc[_0x564591(0x14a)][_0x550fa0]?.['prompted'],!![]);}export function markSessionPrompted(_0x32ff86){const _0x2ea4e7=_0x1e6dd1,_0x23bc4c={'GNGRN':function(_0x1e88f3){return _0x1e88f3();},'taCEm':function(_0x59f9f8,_0x6af785,_0x2bee92){return _0x59f9f8(_0x6af785,_0x2bee92);}},_0x54dc0f=_0x23bc4c['GNGRN'](loadCache),_0x26ac36=_0x23bc4c[_0x2ea4e7(0x160)](getOrCreateSession,_0x54dc0f,_0x32ff86);_0x26ac36[_0x2ea4e7(0x14b)]=!![],saveCache(_0x54dc0f);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x22e4fb=_0xd0d3;(function(_0x1cdb35,_0x45fc65){const _0x157bc2=_0xd0d3,_0x5b08a7=_0x1cdb35();while(!![]){try{const _0x244e0a=parseInt(_0x157bc2(0x15c))/0x1+parseInt(_0x157bc2(0x153))/0x2+-parseInt(_0x157bc2(0x16d))/0x3+-parseInt(_0x157bc2(0x176))/0x4+-parseInt(_0x157bc2(0x146))/0x5+-parseInt(_0x157bc2(0x14f))/0x6*(-parseInt(_0x157bc2(0x14c))/0x7)+-parseInt(_0x157bc2(0x149))/0x8*(parseInt(_0x157bc2(0x159))/0x9);if(_0x244e0a===_0x45fc65)break;else _0x5b08a7['push'](_0x5b08a7['shift']());}catch(_0xb2b590){_0x5b08a7['push'](_0x5b08a7['shift']());}}}(_0xadc1,0x46002));import*as _0x4fa829 from'fs';import*as _0x4bdb53 from'path';import*as _0x128574 from'os';import{execSync}from'child_process';function _0xd0d3(_0x17cd1b,_0x5df059){_0x17cd1b=_0x17cd1b-0x144;const _0xadc1a1=_0xadc1();let _0xd0d3ff=_0xadc1a1[_0x17cd1b];return _0xd0d3ff;}const CACHE_FILE=_0x4bdb53[_0x22e4fb(0x168)](_0x128574['homedir'](),'.claude',_0x22e4fb(0x167));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x23f397=_0x22e4fb,_0xd407d1={'AckWZ':_0x23f397(0x16e)};try{if(_0x4fa829['existsSync'](CACHE_FILE)){const _0x39ef01=JSON[_0x23f397(0x16f)](_0x4fa829[_0x23f397(0x16a)](CACHE_FILE,_0xd407d1[_0x23f397(0x178)]));return{'version':0x3,'sessions':_0x39ef01[_0x23f397(0x177)]||{},'branches':_0x39ef01[_0x23f397(0x147)]||{},'lastEnabledSessionClearedAt':_0x39ef01['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x4c6952){const _0x4b38d6=_0x22e4fb;try{const _0x4c194e=_0x4bdb53['dirname'](CACHE_FILE);!_0x4fa829['existsSync'](_0x4c194e)&&_0x4fa829[_0x4b38d6(0x157)](_0x4c194e,{'recursive':!![]}),_0x4fa829[_0x4b38d6(0x15a)](CACHE_FILE,JSON[_0x4b38d6(0x14e)](_0x4c6952,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2ebecf=_0x22e4fb,_0x32213b={'erihD':function(_0x32b045,_0x3ba76b,_0x4fcb23){return _0x32b045(_0x3ba76b,_0x4fcb23);},'npNry':_0x2ebecf(0x156),'AxhRf':_0x2ebecf(0x172),'UPTfU':_0x2ebecf(0x145)};try{const _0x4b7406=_0x32213b[_0x2ebecf(0x14a)](execSync,_0x32213b[_0x2ebecf(0x148)],{'encoding':_0x2ebecf(0x16e),'stdio':[_0x32213b['AxhRf'],'pipe',_0x32213b['AxhRf']]})['trim']();if(!_0x4b7406||_0x4b7406===_0x32213b[_0x2ebecf(0x17b)])return null;return _0x4b7406;}catch{return null;}}export function enableBranch(_0x15d2a3){const _0x28d5c3=_0x22e4fb,_0x26701c={'iFsiU':function(_0x4ea9fb){return _0x4ea9fb();}},_0x1337bf=_0x26701c[_0x28d5c3(0x150)](loadCache);_0x1337bf[_0x28d5c3(0x147)][_0x15d2a3]=!![],saveCache(_0x1337bf);}export function disableBranch(_0xe6b90){const _0x5cb771=loadCache();delete _0x5cb771['branches'][_0xe6b90],saveCache(_0x5cb771);}export function isBranchEnabled(_0x50f5d7){const _0x2523d6=_0x22e4fb,_0x40a74c={'drgQX':function(_0x54b9cb){return _0x54b9cb();},'kbIso':function(_0x4260ce,_0x5dccf7){return _0x4260ce===_0x5dccf7;}},_0x1ae3a1=_0x40a74c['drgQX'](loadCache);return _0x40a74c[_0x2523d6(0x175)](_0x1ae3a1[_0x2523d6(0x147)][_0x50f5d7],!![]);}function getOrCreateSession(_0xa114ae,_0x58976e){const _0x1acabb=_0x22e4fb;return!_0xa114ae['sessions'][_0x58976e]&&(_0xa114ae['sessions'][_0x58976e]={}),_0xa114ae[_0x1acabb(0x177)][_0x58976e];}export function enableSession(_0x22c071){const _0x9a9899=_0x22e4fb,_0x58121c={'dhtyn':function(_0x144548){return _0x144548();},'cfltO':function(_0x3ca475,_0x54fdbd){return _0x3ca475!==_0x54fdbd;},'jIsGg':function(_0x45c73f,_0x261199){return _0x45c73f(_0x261199);}},_0x18db81=_0x58121c[_0x9a9899(0x15d)](loadCache),_0x148212=getOrCreateSession(_0x18db81,_0x22c071);_0x148212['enabled']=!![];const _0xcf312b=getCurrentBranch();_0xcf312b&&_0xcf312b!=='main'&&_0x58121c[_0x9a9899(0x164)](_0xcf312b,'master')&&(_0x18db81[_0x9a9899(0x147)][_0xcf312b]=!![],_0x148212['currentBranch']=_0xcf312b),_0x58121c['jIsGg'](saveCache,_0x18db81);}export function isSessionEnabled(_0x389f5d){const _0x1a4991=_0x22e4fb,_0x190612={'wLvbi':function(_0x3bd472){return _0x3bd472();},'wOOMJ':function(_0x4742de,_0x326457){return _0x4742de===_0x326457;},'dgIhi':'main','FnmOH':_0x1a4991(0x154),'sCWgb':function(_0xd85a2e,_0x25060b){return _0xd85a2e===_0x25060b;}},_0xca4019=_0x190612[_0x1a4991(0x171)](loadCache),_0x171d71=getCurrentBranch();if(!_0x171d71||_0x190612[_0x1a4991(0x162)](_0x171d71,_0x190612['dgIhi'])||_0x190612[_0x1a4991(0x162)](_0x171d71,_0x190612[_0x1a4991(0x144)]))return _0x190612['wOOMJ'](_0xca4019[_0x1a4991(0x177)][_0x389f5d]?.[_0x1a4991(0x166)],!![]);const _0x4f57f5=_0x190612[_0x1a4991(0x158)](_0xca4019[_0x1a4991(0x147)][_0x171d71],!![]),_0x311bfe=_0xca4019['sessions'][_0x389f5d]?.['enabled']===!![];return _0x4f57f5||_0x311bfe;}export function disableSession(_0x3f2c47){const _0x46e5a8=_0x22e4fb,_0x4010a5={'JmOOS':function(_0x5c69a4,_0x550da0,_0x3f7123){return _0x5c69a4(_0x550da0,_0x3f7123);}},_0x3682fc=loadCache(),_0xd09985=_0x4010a5['JmOOS'](getOrCreateSession,_0x3682fc,_0x3f2c47);_0xd09985[_0x46e5a8(0x166)]=![],saveCache(_0x3682fc);}export function updateBranchTracking(_0x24d850){const _0x574684=_0x22e4fb,_0x234ef7={'xmaNn':function(_0x577294,_0x3f9fcd){return _0x577294===_0x3f9fcd;}},_0x94824f=loadCache(),_0x36ab73=_0x94824f[_0x574684(0x177)][_0x24d850];if(!_0x36ab73?.['enabled'])return;const _0x591be7=getCurrentBranch();if(!_0x591be7||_0x234ef7[_0x574684(0x15f)](_0x591be7,_0x574684(0x15e))||_0x591be7===_0x574684(0x154))return;_0x36ab73[_0x574684(0x163)]!==_0x591be7&&(_0x94824f['branches'][_0x591be7]=!![],_0x36ab73['currentBranch']=_0x591be7,saveCache(_0x94824f));}export function initBranchTracking(_0xbef117){const _0x1b504a=_0x22e4fb,_0x1ecc00={'OueSk':function(_0x11b770){return _0x11b770();},'Xhzey':function(_0x12142f,_0x157685){return _0x12142f===_0x157685;},'KgAso':function(_0xb05e2,_0x2913dd){return _0xb05e2===_0x2913dd;},'yAkHK':function(_0x131d46,_0x179370){return _0x131d46(_0x179370);}},_0x4e6929=_0x1ecc00[_0x1b504a(0x17a)](loadCache),_0x303fcb=getCurrentBranch();if(!_0x303fcb||_0x1ecc00[_0x1b504a(0x152)](_0x303fcb,_0x1b504a(0x15e))||_0x1ecc00['KgAso'](_0x303fcb,'master'))return;if(_0x4e6929['branches'][_0x303fcb]===!![]){const _0xb6c7e6=getOrCreateSession(_0x4e6929,_0xbef117);_0xb6c7e6['enabled']=!![],_0xb6c7e6[_0x1b504a(0x163)]=_0x303fcb,_0x1ecc00[_0x1b504a(0x16b)](saveCache,_0x4e6929);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x1446b4){const _0x4dcc87=_0x22e4fb,_0x26c44d={'CPEtc':function(_0x3d5e62,_0x17603b){return _0x3d5e62(_0x17603b);}},_0x1260a6=loadCache(),_0x585684=_0x1260a6[_0x4dcc87(0x177)][_0x1446b4];_0x585684?.[_0x4dcc87(0x166)]&&(_0x1260a6[_0x4dcc87(0x14d)]=Date[_0x4dcc87(0x160)](),_0x26c44d['CPEtc'](saveCache,_0x1260a6));}export function shouldAutoEnableAfterClear(_0x1eaf10){const _0x5bc412=_0x22e4fb,_0x2527c3={'SZqqD':function(_0x4f3b3a){return _0x4f3b3a();},'koKfl':function(_0x398407,_0x41ce71){return _0x398407-_0x41ce71;},'EDxgI':function(_0x4ba15d,_0x26fd4d){return _0x4ba15d<=_0x26fd4d;}};if(_0x1eaf10!==_0x5bc412(0x169))return![];const _0x5c4a70=_0x2527c3['SZqqD'](loadCache),_0x587cad=_0x5c4a70[_0x5bc412(0x14d)];if(!_0x587cad)return![];const _0x43ee12=_0x2527c3[_0x5bc412(0x16c)](Date[_0x5bc412(0x160)](),_0x587cad);return _0x2527c3['EDxgI'](_0x43ee12,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x11e727){const _0x158e4c=_0x22e4fb,_0x11a61d={'myxVm':function(_0x1411a3){return _0x1411a3();},'UAngI':function(_0x3b2a05){return _0x3b2a05();},'HzKBh':'main','AdOjJ':function(_0x196657,_0x296c8e){return _0x196657!==_0x296c8e;},'ptdXK':'master','bGVIe':function(_0x25d448,_0x4a0c43){return _0x25d448(_0x4a0c43);}},_0x5c9a79=_0x11a61d[_0x158e4c(0x170)](loadCache),_0x5bf09e=getOrCreateSession(_0x5c9a79,_0x11e727);_0x5bf09e[_0x158e4c(0x166)]=!![];const _0x4d1aeb=_0x11a61d['UAngI'](getCurrentBranch);_0x4d1aeb&&_0x4d1aeb!==_0x11a61d['HzKBh']&&_0x11a61d[_0x158e4c(0x173)](_0x4d1aeb,_0x11a61d[_0x158e4c(0x151)])&&(_0x5bf09e[_0x158e4c(0x163)]=_0x4d1aeb),delete _0x5c9a79[_0x158e4c(0x14d)],_0x11a61d['bGVIe'](saveCache,_0x5c9a79);}export function registerSession(_0x36756e,_0x52b57e){const _0x501d29=_0x22e4fb,_0x10cc14=loadCache(),_0x134861=getOrCreateSession(_0x10cc14,_0x36756e);_0x134861['featureId']=_0x52b57e,_0x134861[_0x501d29(0x174)]=new Date()['toISOString'](),saveCache(_0x10cc14);}function _0xadc1(){const _0x4ca8b5=['parse','myxVm','wLvbi','pipe','AdOjJ','registeredAt','kbIso','1521824MMMFsH','sessions','AckWZ','RhlcD','OueSk','UPTfU','FnmOH','HEAD','800815MmHBLK','branches','npNry','8OpQDTD','erihD','eDzhZ','438487vENOCm','lastEnabledSessionClearedAt','stringify','54FxWkho','iFsiU','ptdXK','Xhzey','984510ZSFqoC','master','lastPlanReminderAt','git\x20rev-parse\x20--abbrev-ref\x20HEAD','mkdirSync','sCWgb','3011274nzrpbZ','writeFileSync','featureId','208905ufrXzQ','dhtyn','main','xmaNn','now','xzmbT','wOOMJ','currentBranch','cfltO','WiJCh','enabled','.ranger_cache.json','join','clear','readFileSync','yAkHK','koKfl','309006wviPYK','utf-8'];_0xadc1=function(){return _0x4ca8b5;};return _0xadc1();}export function getSessionEntry(_0x28de5e){const _0x35d4eb=_0x22e4fb,_0x8c039f={'fabmt':function(_0x222306){return _0x222306();}},_0x308ac5=_0x8c039f['fabmt'](loadCache),_0x2ce070=_0x308ac5[_0x35d4eb(0x177)][_0x28de5e];if(_0x2ce070?.['featureId']&&_0x2ce070?.['registeredAt'])return{'featureId':_0x2ce070['featureId'],'registeredAt':_0x2ce070[_0x35d4eb(0x174)]};return null;}export function unregisterSession(_0x25de22){const _0x3511b1=_0x22e4fb,_0xc79ed5={'WIRjk':function(_0x438aa6){return _0x438aa6();}},_0x21ca5e=_0xc79ed5['WIRjk'](loadCache),_0xe8d613=_0x21ca5e[_0x3511b1(0x177)][_0x25de22];_0xe8d613&&(delete _0xe8d613[_0x3511b1(0x15b)],delete _0xe8d613[_0x3511b1(0x174)],saveCache(_0x21ca5e));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x16f123){const _0x20d49e=_0x22e4fb,_0x1fb93c={'eDzhZ':function(_0x6ccf1){return _0x6ccf1();},'UNuDp':function(_0x47a1bf,_0x20ced0){return _0x47a1bf>=_0x20ced0;},'KTNsc':function(_0x5727c3,_0x585391){return _0x5727c3-_0x585391;}},_0x5c4942=_0x1fb93c[_0x20d49e(0x14b)](loadCache),_0x4ae7d9=getOrCreateSession(_0x5c4942,_0x16f123),_0x1445e6=_0x4ae7d9[_0x20d49e(0x155)]||0x0,_0xfc2e54=Date['now']();if(_0x1fb93c['UNuDp'](_0x1fb93c['KTNsc'](_0xfc2e54,_0x1445e6),PLAN_REMINDER_INTERVAL_MS))return _0x4ae7d9['lastPlanReminderAt']=_0xfc2e54,saveCache(_0x5c4942),!![];return![];}export function shouldShowStopReminder(_0xf439ae){const _0x526da3=_0x22e4fb,_0x2a1bfb={'RhlcD':function(_0x1d474b){return _0x1d474b();},'nAFBu':function(_0x5948c7,_0xea9c,_0x36c1e1){return _0x5948c7(_0xea9c,_0x36c1e1);},'UOAFC':function(_0x3105bc,_0x1c3d0a){return _0x3105bc>=_0x1c3d0a;},'WiJCh':function(_0x4b4090,_0x2882e3){return _0x4b4090-_0x2882e3;},'QAAEx':function(_0x2782a4,_0x556e1c){return _0x2782a4(_0x556e1c);}},_0x2dc16c=_0x2a1bfb[_0x526da3(0x179)](loadCache),_0x248278=_0x2a1bfb['nAFBu'](getOrCreateSession,_0x2dc16c,_0xf439ae),_0x3e3f01=_0x248278['lastStopReminderAt']||0x0,_0x3e5029=Date[_0x526da3(0x160)]();if(_0x2a1bfb['UOAFC'](_0x2a1bfb[_0x526da3(0x165)](_0x3e5029,_0x3e3f01),STOP_REMINDER_INTERVAL_MS))return _0x248278['lastStopReminderAt']=_0x3e5029,_0x2a1bfb['QAAEx'](saveCache,_0x2dc16c),!![];return![];}export function hasSessionBeenPrompted(_0xe76fb5){const _0x5b09d7=loadCache();return _0x5b09d7['sessions'][_0xe76fb5]?.['prompted']===!![];}export function markSessionPrompted(_0x2badea){const _0x459a9b=_0x22e4fb,_0x246743={'xzmbT':function(_0x3f7f41,_0x354a2c){return _0x3f7f41(_0x354a2c);}},_0x406136=loadCache(),_0xf2f80c=getOrCreateSession(_0x406136,_0x2badea);_0xf2f80c['prompted']=!![],_0x246743[_0x459a9b(0x161)](saveCache,_0x406136);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x7c6728=_0x18a2;(function(_0x32bc13,_0x389864){const _0x275cf6=_0x18a2,_0x218506=_0x32bc13();while(!![]){try{const _0x2ae1d2=parseInt(_0x275cf6(0xc9))/0x1*(parseInt(_0x275cf6(0xbf))/0x2)+parseInt(_0x275cf6(0x9e))/0x3*(-parseInt(_0x275cf6(0xc3))/0x4)+parseInt(_0x275cf6(0xba))/0x5+parseInt(_0x275cf6(0x96))/0x6*(parseInt(_0x275cf6(0x90))/0x7)+parseInt(_0x275cf6(0xeb))/0x8+-parseInt(_0x275cf6(0x94))/0x9*(parseInt(_0x275cf6(0xa9))/0xa)+parseInt(_0x275cf6(0xf4))/0xb*(-parseInt(_0x275cf6(0xb0))/0xc);if(_0x2ae1d2===_0x389864)break;else _0x218506['push'](_0x218506['shift']());}catch(_0x6a043){_0x218506['push'](_0x218506['shift']());}}}(_0x28d8,0x747e9));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x239a36,_0x5adc6e){const _0x547ee=_0x18a2,_0x5db9d4={'JQNbp':_0x547ee(0xcc),'tExDy':function(_0x187bc6,_0xbab862,_0x43c976){return _0x187bc6(_0xbab862,_0x43c976);},'Eufym':function(_0x234e94,_0x5ce47f,_0x4aa7dd){return _0x234e94(_0x5ce47f,_0x4aa7dd);},'pSwOI':function(_0x553a44,_0x51ad18){return _0x553a44(_0x51ad18);},'ntbGX':function(_0xfafecb,_0x3cd2a8){return _0xfafecb(_0x3cd2a8);},'qcOUn':function(_0x2d4a2c,_0x50d756){return _0x2d4a2c!==_0x50d756;}},_0x2755d8=join(_0x5adc6e,'ci',_0x239a36),_0x58fc8c=join(_0x5adc6e,_0x5db9d4[_0x547ee(0xac)],_0x239a36),_0x38aeca=_0x5db9d4['tExDy'](join,_0x5adc6e,_0x239a36),_0x47b018=_0x5db9d4[_0x547ee(0x9c)](join,_0x5adc6e,'local'),_0x5c499a=_0x5db9d4['tExDy'](join,_0x5adc6e,'ci');if(_0x5db9d4[_0x547ee(0xc6)](existsSync,_0x2755d8))return _0x2755d8;if(_0x5db9d4['ntbGX'](existsSync,_0x58fc8c))return _0x58fc8c;if(_0x5db9d4['pSwOI'](existsSync,_0x38aeca)&&(_0x5db9d4['qcOUn'](_0x38aeca,_0x47b018)&&_0x38aeca!==_0x5c499a?!![]:_0x5db9d4[_0x547ee(0xc6)](hasLegacyProfileFiles,_0x38aeca)))return _0x38aeca;return null;}export function getEnvDir(_0x4d3fd9){const _0x3cd995=_0x18a2,_0x1a3e52={'bmucp':function(_0x49d7be){return _0x49d7be();},'CkJFd':function(_0x46d34b,_0x192b2a){return _0x46d34b!==_0x192b2a;}},_0x5c0d85=_0x1a3e52[_0x3cd995(0x8f)](getRangerDir),_0x4dae54=findEnvInRoot(_0x4d3fd9,_0x5c0d85);if(_0x4dae54)return _0x4dae54;const _0x40d719=getRangerHomeDir();if(_0x1a3e52[_0x3cd995(0xc1)](_0x40d719,_0x5c0d85)){const _0x106318=findEnvInRoot(_0x4d3fd9,_0x40d719);if(_0x106318)return _0x106318;}return join(_0x5c0d85,_0x3cd995(0xcc),_0x4d3fd9);}export function findExistingEnv(_0x518cde,_0x399074){const _0x37c577=_0x18a2,_0x2c0ef2={'SwxHE':function(_0x1e7dc4){return _0x1e7dc4();},'udzGX':'local','wUMEo':function(_0x2ec8e1,_0x1cbc0f,_0xfcf61e){return _0x2ec8e1(_0x1cbc0f,_0xfcf61e);},'UdKFm':function(_0x112298,_0x43e369,_0x3910ad,_0x130f42){return _0x112298(_0x43e369,_0x3910ad,_0x130f42);},'BLmJd':'legacy','kCTxa':function(_0x247a70,_0x5deb12){return _0x247a70===_0x5deb12;},'ygmiH':function(_0x27a8b1,_0xe63b5){return _0x27a8b1===_0xe63b5;}},_0x7707f9=_0x399074?.[_0x37c577(0xd2)],_0x111091=_0x7707f9?[_0x7707f9]:[getRangerDir(),_0x2c0ef2[_0x37c577(0xdf)](getRangerHomeDir)][_0x37c577(0xe5)]((_0x1bc43a,_0x4da325,_0x597587)=>_0x597587['indexOf'](_0x1bc43a)===_0x4da325),_0x557813=_0x399074?.['locations']??['ci',_0x2c0ef2['udzGX'],'legacy'];for(const _0x1b6132 of _0x111091){const _0x36695a=_0x2c0ef2[_0x37c577(0x9d)](join,_0x1b6132,_0x2c0ef2[_0x37c577(0xa2)]),_0x5dd750=_0x2c0ef2['wUMEo'](join,_0x1b6132,'ci'),_0x2e4a3f=[{'location':'ci','path':join(_0x1b6132,'ci',_0x518cde)},{'location':_0x37c577(0xcc),'path':_0x2c0ef2[_0x37c577(0xf2)](join,_0x1b6132,'local',_0x518cde)},{'location':_0x2c0ef2['BLmJd'],'path':join(_0x1b6132,_0x518cde)}];for(const _0x49475e of _0x2e4a3f){if(_0x557813[_0x37c577(0x9b)](_0x49475e['location'])&&existsSync(_0x49475e['path'])){if(_0x2c0ef2['kCTxa'](_0x49475e['location'],_0x2c0ef2[_0x37c577(0xbe)])&&(_0x2c0ef2[_0x37c577(0xe8)](_0x49475e[_0x37c577(0x91)],_0x36695a)||_0x49475e['path']===_0x5dd750)&&!hasLegacyProfileFiles(_0x49475e[_0x37c577(0x91)]))continue;return{'path':_0x49475e['path'],'location':_0x49475e['location']};}}}return null;}function hasLegacyProfileFiles(_0xe73b3b){const _0x1e3ddb=_0x18a2,_0x549a2b={'nXZMt':function(_0x528fda,_0x80f264){return _0x528fda(_0x80f264);},'uKrAa':function(_0x30e973,_0x82f97f,_0x314b51){return _0x30e973(_0x82f97f,_0x314b51);},'BbleT':_0x1e3ddb(0xc4)};return existsSync(join(_0xe73b3b,_0x1e3ddb(0x99)))||_0x549a2b[_0x1e3ddb(0xc7)](existsSync,_0x549a2b[_0x1e3ddb(0xd8)](join,_0xe73b3b,_0x549a2b['BbleT']))||existsSync(_0x549a2b[_0x1e3ddb(0xd8)](join,_0xe73b3b,_0x1e3ddb(0xec)));}export function isEnvCi(_0x4d4627){const _0x120869=_0x18a2,_0x194170={'owcTO':function(_0x2c535a,_0x262aaa,_0x402d29,_0x19e66c){return _0x2c535a(_0x262aaa,_0x402d29,_0x19e66c);},'tvzmA':function(_0x3496ec,_0x3106f9){return _0x3496ec(_0x3106f9);}};if(existsSync(_0x194170[_0x120869(0xa7)](join,getRangerDir(),'ci',_0x4d4627)))return!![];const _0x54e7de=getRangerHomeDir();if(_0x54e7de!==getRangerDir()&&_0x194170['tvzmA'](existsSync,_0x194170['owcTO'](join,_0x54e7de,'ci',_0x4d4627)))return!![];return![];}export async function cleanupTempFiles(_0x5006ad){const _0x2365fc=_0x18a2,_0x4ac324=[_0x5006ad['tempAuthPath'],_0x5006ad[_0x2365fc(0xb7)]]['filter'](Boolean);await Promise['all'](_0x4ac324['map'](_0x790cad=>unlink(_0x790cad)['catch'](_0x59324d=>{const _0x2fabd2=_0x2365fc;_0x59324d['code']!=='ENOENT'&&console[_0x2fabd2(0xaa)](_0x2fabd2(0x9f)+_0x790cad+':',_0x59324d[_0x2fabd2(0xb5)]);})));}export function getSettingsPath(_0xf4a0ab){const _0x772d8e=_0x18a2,_0x22942d={'HCoAp':function(_0x450e50,_0x42ce10,_0x58babe){return _0x450e50(_0x42ce10,_0x58babe);}};return _0x22942d[_0x772d8e(0xb2)](join,getEnvDir(_0xf4a0ab),'settings.json');}export async function loadSettings(_0x2e265c){const _0x228db3=getSettingsPath(_0x2e265c);if(!existsSync(_0x228db3))return{};try{const _0x205b84=await readFile(_0x228db3,'utf-8');return JSON['parse'](_0x205b84);}catch{return{};}}export async function saveSettings(_0x5d0cd5,_0x36dc60){const _0x276162=_0x18a2,_0x24a5a6={'tfqoV':function(_0x3a7987,_0xc062b1){return _0x3a7987(_0xc062b1);},'vyknZ':function(_0x309fbe,_0x3c1ab2){return _0x309fbe(_0x3c1ab2);},'UAiTA':function(_0x2263c6,_0x1ee56c,_0x215c75){return _0x2263c6(_0x1ee56c,_0x215c75);}},_0x2a7d0e=_0x24a5a6['tfqoV'](getSettingsPath,_0x5d0cd5),_0x599fb9=_0x24a5a6[_0x276162(0xd9)](dirname,_0x2a7d0e);!_0x24a5a6[_0x276162(0xea)](existsSync,_0x599fb9)&&await _0x24a5a6['UAiTA'](mkdir,_0x599fb9,{'recursive':!![]}),await _0x24a5a6['UAiTA'](writeFile,_0x2a7d0e,JSON[_0x276162(0x95)](_0x36dc60,null,0x2));}export function resolveEnvVars(_0x1bb2a9){const _0x2bf0c5=_0x18a2,_0x5d6ab2={'YeqaK':function(_0x58df12,_0x1f5f07){return _0x58df12===_0x1f5f07;},'XZUht':'string','hRGFV':function(_0x28f7e2,_0x18588a){return _0x28f7e2===_0x18588a;}};if(typeof _0x1bb2a9===_0x5d6ab2['XZUht'])return _0x1bb2a9[_0x2bf0c5(0xa6)](/\$\{(\w+)\}/g,(_0x545204,_0x5490a1)=>{const _0x57ec03=process['env'][_0x5490a1];if(_0x5d6ab2['YeqaK'](_0x57ec03,undefined))throw new Error('Environment\x20variable\x20'+_0x5490a1+'\x20is\x20not\x20set');return _0x57ec03;});if(Array[_0x2bf0c5(0xb8)](_0x1bb2a9))return _0x1bb2a9[_0x2bf0c5(0xe7)](resolveEnvVars);if(_0x1bb2a9&&_0x5d6ab2['hRGFV'](typeof _0x1bb2a9,_0x2bf0c5(0xd3)))return Object['fromEntries'](Object[_0x2bf0c5(0xd6)](_0x1bb2a9)[_0x2bf0c5(0xe7)](([_0x4f2482,_0x21401f])=>[_0x4f2482,resolveEnvVars(_0x21401f)]));return _0x1bb2a9;}const isRecord=_0x37e9b7=>typeof _0x37e9b7==='object'&&_0x37e9b7!==null&&!Array['isArray'](_0x37e9b7),asRecord=_0x13af6e=>isRecord(_0x13af6e)?_0x13af6e:undefined,mergeHeaders=(_0x176dec,_0x51458e)=>{const _0x52b77d=_0x18a2,_0x539c72={'ZikwP':function(_0x475e6f,_0x1fc4d9){return _0x475e6f??_0x1fc4d9;}},_0xfdb2cb={..._0x176dec??{},..._0x539c72[_0x52b77d(0xa3)](_0x51458e,{})};return Object[_0x52b77d(0xcd)](_0xfdb2cb)[_0x52b77d(0xa4)]?_0xfdb2cb:undefined;},SAFE_MODE_ARGS=[_0x7c6728(0x93)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0xe12fc0,_0x5d96d3={}){const _0x5e0ad3=_0x7c6728,_0x183149={'pXBkw':function(_0x55e336,_0x4aa16a){return _0x55e336===_0x4aa16a;},'urcNA':_0x5e0ad3(0xee),'ixxUk':function(_0x34b653,_0x3ba0d5){return _0x34b653(_0x3ba0d5);},'gpuLB':_0x5e0ad3(0xb4)},_0x3f059c=asRecord(_0xe12fc0[_0x5e0ad3(0x92)]),_0x3124a8={...asRecord(_0x3f059c?.[_0x5e0ad3(0xa5)])??{}};_0x183149['pXBkw'](typeof _0x5d96d3['headless'],_0x183149[_0x5e0ad3(0xb6)])&&(_0x3124a8['headless']=_0x5d96d3['headless']);if(_0xe12fc0['safeMode']){const _0x2e6051=_0x3124a8['args']??[],_0x36808c=SAFE_MODE_ARGS['filter'](_0x1aaa97=>!_0x2e6051[_0x5e0ad3(0x9b)](_0x1aaa97));_0x3124a8['args']=[..._0x2e6051,..._0x36808c];}if(_0xe12fc0[_0x5e0ad3(0xb3)]){const _0x459072=_0x3124a8[_0x5e0ad3(0xae)]??[],_0x4f4b63=ALLOW_LOCALHOST_ARGS[_0x5e0ad3(0xe5)](_0x23b489=>!_0x459072[_0x5e0ad3(0x9b)](_0x23b489));_0x3124a8['args']=[..._0x459072,..._0x4f4b63];}const _0x564e74={..._0x183149[_0x5e0ad3(0xda)](asRecord,_0x3f059c?.[_0x5e0ad3(0xf3)])??{}};_0x564e74[_0x5e0ad3(0xe6)]=!![];typeof _0xe12fc0[_0x5e0ad3(0xd5)]===_0x183149[_0x5e0ad3(0xbc)]&&(_0x564e74['userAgent']=_0xe12fc0['userAgent']);const _0x450b81=mergeHeaders(asRecord(_0x564e74[_0x5e0ad3(0xe9)]),asRecord(_0xe12fc0['headers']));return _0x450b81?_0x564e74[_0x5e0ad3(0xe9)]=_0x450b81:delete _0x564e74[_0x5e0ad3(0xe9)],_0x5d96d3['storageStatePath']&&(_0x564e74['storageState']=_0x5d96d3['storageStatePath']),{'launchOptions':_0x3124a8,'contextOptions':_0x564e74};}function _0x28d8(){const _0x5d8ff4=['2yKgPvQ','catch','CkJFd','WtMXN','18888tBpwDt','auth.json','KPypL','pSwOI','nXZMt','wnyPw','12715OwZoLT','rGjLu','tabs','local','keys','setupHeaders','install','repeat','playwright-cli','rangerDir','object','clipboard-write','userAgent','entries','Ycjbw','uKrAa','tfqoV','ixxUk','push','stagehand','lFpSO','CbKGg','SwxHE','YdwvX','jAazp','vision','ATtFx','kHFes','filter','ignoreHTTPSErrors','map','ygmiH','extraHTTPHeaders','vyknZ','4039104UuSpJN','auth.json.enc','ljCai','boolean','gVuVu','VCuJh','LXHjZ','UdKFm','contextOptions','660whABuw','now','storageState','bmucp','17381HxwAku','path','browser','--disable-features=WebBluetooth','764046xhJKLL','stringify','1590bBWOft','header','.json','settings.json','getuid','includes','Eufym','wUMEo','234Cbpwai','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','headless','XIiVi','udzGX','ZikwP','length','launchOptions','replace','owcTO','ZiVUj','20nBaHBo','warn','ZgQuk','JQNbp','ZLYVJ','args','chromium','47724LKvboM','--disable-setuid-sandbox','HCoAp','allowInsecureLocalhost','string','message','urcNA','configPath','isArray','--no-sandbox','391435BIxjHg','Failed\x20to\x20decrypt\x20auth\x20state:\x20','gpuLB','rgvEo','BLmJd'];_0x28d8=function(){return _0x5d8ff4;};return _0x28d8();}async function resolveLocalAuthPath(_0x267a20){const _0x234eb8=_0x7c6728,_0x51e59f={'lFpSO':function(_0x30a36c,_0x76d2a9,_0x308fce){return _0x30a36c(_0x76d2a9,_0x308fce);},'CbKGg':_0x234eb8(0xc4),'ZLYVJ':function(_0x57787b,_0x369134){return _0x57787b(_0x369134);},'rGjLu':function(_0x1e31d2){return _0x1e31d2();},'Uwrpm':function(_0xe66979,_0x5babd8,_0x5c38a4){return _0xe66979(_0x5babd8,_0x5c38a4);},'eCYwm':function(_0x3b32e6,_0xaa4982){return _0x3b32e6(_0xaa4982);}},_0x252ba9=_0x51e59f[_0x234eb8(0xdd)](join,_0x267a20,_0x234eb8(0xec)),_0x278745=join(_0x267a20,_0x51e59f[_0x234eb8(0xde)]);if(_0x51e59f['ZLYVJ'](existsSync,_0x252ba9))try{const _0x9ccb4e=await _0x51e59f['rGjLu'](getToken);if(!_0x9ccb4e)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0xb30fa8=await _0x51e59f[_0x234eb8(0xad)](readFile,_0x252ba9),_0x2f2b2d=decrypt(_0xb30fa8,_0x9ccb4e),_0x144448=join(_0x51e59f[_0x234eb8(0xca)](tmpdir),'ranger-auth-'+Date[_0x234eb8(0xf5)]()+_0x234eb8(0x98));return await _0x51e59f['Uwrpm'](writeFile,_0x144448,_0x2f2b2d),{'storageStatePath':_0x144448,'tempAuthPath':_0x144448};}catch(_0x15a1ae){const _0x28bb6c=_0x15a1ae instanceof Error?_0x15a1ae[_0x234eb8(0xb5)]:_0x51e59f['eCYwm'](String,_0x15a1ae);throw new Error(_0x234eb8(0xbb)+_0x28bb6c);}if(existsSync(_0x278745))return{'storageStatePath':_0x278745};return{};}export async function buildPlaywrightConfig(_0x598dad,_0x360bf8,_0x4d2bef,_0x21af68,_0x524dc9){const _0x3bc28c=_0x7c6728,_0x53d69f={'WpGck':function(_0x721212,_0x312323){return _0x721212(_0x312323);}};if(_0x524dc9)return buildPlaywrightConfigCore(_0x598dad,_0x524dc9,_0x360bf8,_0x4d2bef,_0x21af68,_0x3bc28c(0xdc));const {storageStatePath:_0x21032d,tempAuthPath:_0x5b65ae}=await resolveLocalAuthPath(_0x53d69f['WpGck'](getEnvDir,_0x360bf8));try{const _0x4ca57f=await buildPlaywrightConfigCore(_0x598dad,_0x21032d,_0x360bf8,_0x4d2bef,_0x21af68,'stagehand');return{..._0x4ca57f,'tempAuthPath':_0x5b65ae};}catch(_0x5d6d2c){_0x5b65ae&&await unlink(_0x5b65ae)['catch'](()=>{});throw _0x5d6d2c;}}export async function buildPlaywrightConfigCore(_0x34b5d,_0x40ad83,_0x3998b0,_0x4629dc,_0x1eeb0a,_0x283d8a='stagehand'){const _0x5828be=_0x7c6728,_0x2e547f={'ZiVUj':function(_0x242212,_0xf18c90,_0x19653e){return _0x242212(_0xf18c90,_0x19653e);},'wnyPw':function(_0x24dd38,_0x5a3dec){return _0x24dd38===_0x5a3dec;},'CfKgl':_0x5828be(0xb9),'GKdUI':_0x5828be(0xb1),'gtJPK':_0x5828be(0xaf),'ljCai':'clipboard-read','MlpLf':_0x5828be(0xd4),'ATtFx':'sessions','LXHjZ':function(_0x27cc3b,_0xe0abd8){return _0x27cc3b===_0xe0abd8;},'WtMXN':'file','Jaevu':'core','XIiVi':function(_0x198973){return _0x198973();},'kHFes':'ranger-config','ZPyRp':function(_0x353a79,_0xa17888){return _0x353a79(_0xa17888);}},_0x2ed7ae=_0x4629dc||randomUUID(),_0x4cac44=join(getRangerDir(),_0x2e547f[_0x5828be(0xe3)],_0x2ed7ae),_0x4330a3=Boolean(_0x34b5d['cdpEndpoint']),_0x5020e9=_0x4330a3?{'browserName':'chromium','cdpEndpoint':_0x34b5d['cdpEndpoint']}:((()=>{const _0x5264e8=_0x5828be,{launchOptions:_0x363949,contextOptions:_0x2491ac}=_0x2e547f[_0x5264e8(0xa8)](buildBrowserOptionsFromSettings,_0x34b5d,{'headless':_0x1eeb0a?![]:_0x34b5d[_0x5264e8(0xa0)]??!![],'storageStatePath':_0x40ad83});if(_0x2e547f[_0x5264e8(0xc8)](process[_0x5264e8(0x9a)]?.(),0x0)){const _0x505796=[_0x2e547f['CfKgl'],_0x2e547f['GKdUI']],_0x949ae4=_0x363949[_0x5264e8(0xae)]??[],_0x5331a5=_0x505796['filter'](_0x294741=>!_0x949ae4['includes'](_0x294741));_0x363949[_0x5264e8(0xae)]=[..._0x949ae4,..._0x5331a5];}return{'isolated':!![],'browserName':_0x2e547f['gtJPK'],'launchOptions':_0x363949,'contextOptions':{..._0x2491ac,'permissions':[_0x2e547f[_0x5264e8(0xed)],_0x2e547f['MlpLf']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x52f639=_0x2e547f[_0x5828be(0xf1)](_0x283d8a,_0x5828be(0xd1))?{'browser':_0x5020e9,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4cac44,'outputMode':_0x2e547f[_0x5828be(0xc2)],'codegen':'none'}:{'name':_0x3998b0,'browser':_0x5020e9,'capabilities':[_0x2e547f['Jaevu'],_0x5828be(0xcb),_0x5828be(0xcf),'pdf',_0x5828be(0xe2)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4cac44};if(!_0x4330a3){const _0x30e610=_0x52f639['browser'],_0x1dfeab=_0x30e610[_0x5828be(0xf3)];if(_0x2e547f['wnyPw'](_0x1dfeab[_0x5828be(0xd5)],undefined))delete _0x1dfeab['userAgent'];if(_0x1dfeab['storageState']===undefined)delete _0x1dfeab[_0x5828be(0xf6)];}const _0x39ab76=join(_0x2e547f[_0x5828be(0xa1)](tmpdir),_0x2e547f[_0x5828be(0xe4)]);!_0x2e547f['ZPyRp'](existsSync,_0x39ab76)&&await mkdir(_0x39ab76,{'recursive':!![]});const _0x46d4eb=_0x2e547f['LXHjZ'](_0x283d8a,_0x5828be(0xd1))?'-cli':'',_0x588cd4=join(_0x39ab76,_0x3998b0+'-'+Date['now']()+_0x46d4eb+'.json');return await writeFile(_0x588cd4,JSON[_0x5828be(0x95)](_0x52f639,null,0x2)),{'configPath':_0x588cd4};}function _0x18a2(_0x27222b,_0x7032f6){_0x27222b=_0x27222b-0x8f;const _0x28d8bf=_0x28d8();let _0x18a2d7=_0x28d8bf[_0x27222b];return _0x18a2d7;}export async function buildPlaywrightCliConfig(_0x5726ac,_0x927724,_0x1dd4d2,_0x170fb7,_0x49d5f7){const _0x5186ab=_0x7c6728,_0x46a9b2={'QZkNx':'playwright-cli','hIabk':function(_0x51a0f8,_0x63ed45){return _0x51a0f8(_0x63ed45);},'rgvEo':function(_0x25d27c,_0x38fb86){return _0x25d27c(_0x38fb86);}};if(_0x49d5f7)return buildPlaywrightConfigCore(_0x5726ac,_0x49d5f7,_0x927724,_0x1dd4d2,_0x170fb7,_0x46a9b2['QZkNx']);const {storageStatePath:_0x365912,tempAuthPath:_0x1f0aa9}=await _0x46a9b2['hIabk'](resolveLocalAuthPath,getEnvDir(_0x927724));try{const _0x203e71=await buildPlaywrightConfigCore(_0x5726ac,_0x365912,_0x927724,_0x1dd4d2,_0x170fb7,'playwright-cli');return{..._0x203e71,'tempAuthPath':_0x1f0aa9};}catch(_0x491031){_0x1f0aa9&&await _0x46a9b2[_0x5186ab(0xbd)](unlink,_0x1f0aa9)[_0x5186ab(0xc0)](()=>{});throw _0x491031;}}export function getNestedValue(_0x3f7ce3,_0xa65bfe){const _0x2ccdc0=_0x7c6728,_0x2ea15c={'Ycjbw':function(_0x226974,_0x187931){return _0x226974(_0x187931);},'zEjaS':function(_0x13afa9,_0x31dddd){return _0x13afa9===_0x31dddd;},'YdwvX':function(_0xa95ede,_0x27743a){return _0xa95ede!==_0x27743a;}},_0x2ffc37=_0x2ea15c[_0x2ccdc0(0xd7)](parseKeyPath,_0xa65bfe);let _0x39dab2=_0x3f7ce3;for(const _0x53d8c7 of _0x2ffc37){if(_0x2ea15c['zEjaS'](_0x39dab2,null)||_0x39dab2===undefined||_0x2ea15c[_0x2ccdc0(0xe0)](typeof _0x39dab2,'object'))return undefined;_0x39dab2=_0x39dab2[_0x53d8c7];}return _0x39dab2;}export function setNestedValue(_0x23eb60,_0x2c7021,_0x26bdfe){const _0x4d3961=_0x7c6728,_0x185e30={'KPypL':function(_0xe986f7,_0x3c1557){return _0xe986f7!==_0x3c1557;},'SEdwM':_0x4d3961(0xd3)},_0x335dc8=parseKeyPath(_0x2c7021);let _0xa2ea8f=_0x23eb60;for(let _0x21587a=0x0;_0x21587a<_0x335dc8['length']-0x1;_0x21587a++){const _0x1e4ccd=_0x335dc8[_0x21587a];(!(_0x1e4ccd in _0xa2ea8f)||_0x185e30[_0x4d3961(0xc5)](typeof _0xa2ea8f[_0x1e4ccd],_0x185e30['SEdwM']))&&(_0xa2ea8f[_0x1e4ccd]={}),_0xa2ea8f=_0xa2ea8f[_0x1e4ccd];}_0xa2ea8f[_0x335dc8[_0x335dc8[_0x4d3961(0xa4)]-0x1]]=_0x26bdfe;}export function deleteNestedValue(_0x4d7ec4,_0x18ed0d){const _0x595905=_0x7c6728,_0x23ebd0={'QatDR':function(_0x1e9bff,_0x24eff6){return _0x1e9bff<_0x24eff6;},'gVuVu':function(_0x46544a,_0xb27a1){return _0x46544a-_0xb27a1;},'KWxDp':function(_0x226e50,_0x3d8f6a){return _0x226e50!==_0x3d8f6a;},'xOWqw':function(_0x4eeda,_0x1ead18){return _0x4eeda!==_0x1ead18;},'VCuJh':_0x595905(0xd3)},_0x188047=parseKeyPath(_0x18ed0d);let _0x14a998=_0x4d7ec4;for(let _0x552b77=0x0;_0x23ebd0['QatDR'](_0x552b77,_0x23ebd0[_0x595905(0xef)](_0x188047[_0x595905(0xa4)],0x1));_0x552b77++){if(_0x14a998===null||_0x14a998===undefined||_0x23ebd0['KWxDp'](typeof _0x14a998,'object'))return![];_0x14a998=_0x14a998[_0x188047[_0x552b77]];}if(_0x14a998===null||_0x14a998===undefined||_0x23ebd0['xOWqw'](typeof _0x14a998,_0x23ebd0[_0x595905(0xf0)]))return![];const _0xe212b8=_0x188047[_0x188047[_0x595905(0xa4)]-0x1];if(_0xe212b8 in _0x14a998)return delete _0x14a998[_0xe212b8],!![];return![];}function parseKeyPath(_0x5d4d1c){const _0x53798c=_0x7c6728,_0x14447b={'ZgQuk':function(_0x20757e,_0x54ff32){return _0x20757e===_0x54ff32;},'jAazp':'setupHeader'},_0x5ab2fa=_0x5d4d1c['split']('.');return _0x14447b[_0x53798c(0xab)](_0x5ab2fa[0x0],_0x53798c(0x97))&&(_0x5ab2fa[0x0]='headers'),_0x14447b['ZgQuk'](_0x5ab2fa[0x0],_0x14447b[_0x53798c(0xe1)])&&(_0x5ab2fa[0x0]=_0x53798c(0xce)),_0x5ab2fa;}export function formatSettings(_0x4b72ec,_0x755aa2=0x0){const _0x21ec4d=_0x7c6728,_0x5814e4={'qPIgQ':function(_0x3b8ab6,_0x3ed1cf){return _0x3b8ab6===_0x3ed1cf;},'DcFgT':function(_0x8715a8,_0x292f0c){return _0x8715a8!==_0x292f0c;}},_0xcf2597=[],_0x55283f='\x20\x20'[_0x21ec4d(0xd0)](_0x755aa2);for(const [_0x557ea3,_0x257720]of Object['entries'](_0x4b72ec)){if(_0x5814e4['qPIgQ'](_0x257720,undefined))continue;if(_0x5814e4['qPIgQ'](typeof _0x257720,_0x21ec4d(0xd3))&&_0x5814e4['DcFgT'](_0x257720,null)){_0xcf2597['push'](''+_0x55283f+_0x557ea3+':');for(const [_0x418147,_0x461d14]of Object['entries'](_0x257720)){_0xcf2597[_0x21ec4d(0xdb)](_0x55283f+'\x20\x20'+_0x418147+':\x20'+_0x461d14);}}else _0xcf2597['push'](''+_0x55283f+_0x557ea3+':\x20'+_0x257720);}return _0xcf2597['join']('\x0a');}
|
|
1
|
+
const _0x3ef812=_0x216e;(function(_0x21925d,_0x1af859){const _0x335ba9=_0x216e,_0x1bbb3b=_0x21925d();while(!![]){try{const _0x44fd05=parseInt(_0x335ba9(0x1d0))/0x1+-parseInt(_0x335ba9(0x1da))/0x2*(parseInt(_0x335ba9(0x1cd))/0x3)+parseInt(_0x335ba9(0x1de))/0x4*(parseInt(_0x335ba9(0x1cb))/0x5)+parseInt(_0x335ba9(0x195))/0x6*(parseInt(_0x335ba9(0x1c2))/0x7)+parseInt(_0x335ba9(0x18e))/0x8*(parseInt(_0x335ba9(0x1a7))/0x9)+parseInt(_0x335ba9(0x1d7))/0xa*(-parseInt(_0x335ba9(0x1c7))/0xb)+parseInt(_0x335ba9(0x1e8))/0xc*(-parseInt(_0x335ba9(0x1b5))/0xd);if(_0x44fd05===_0x1af859)break;else _0x1bbb3b['push'](_0x1bbb3b['shift']());}catch(_0x4becad){_0x1bbb3b['push'](_0x1bbb3b['shift']());}}}(_0x4efb,0xe2ec0));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';function _0x4efb(){const _0x1271b3=['replace','header','utf-8','fromEntries','XbaeN','stringify','30zBJkXP','--allow-insecure-localhost','locations','Failed\x20to\x20decrypt\x20auth\x20state:\x20','lJMTf','contextOptions','HzluV','headers','args','DGjfD','message','keys','allowInsecureLocalhost','object','oOPZw','clipboard-read','local','GbIpm','171uJexWT','entries','parse','EzCEu','oCFmm','dYRxX','--disable-web-security','includes','vbisH','SufBA','auth.json.enc','--unsafely-treat-insecure-origin-as-secure=http://localhost','setupHeader','JMtwK','715BylXgW','.json','jTAdQ','RNVIs','vpoIj','Zifsx','push','vision','length','LqCdR','repeat','userAgent','EcCKG','1357769ZPcphT','fZtUM','auth.json','boolean','legacy','2229095vDWKhf','pxPdk','Environment\x20variable\x20','NAdAB','153760YByhqg','ZpUoy','511923UUYQRO','none','ranger-auth-','1507494TkHGok','XleeJ','chromium','filter','configPath','erxag','ENOENT','20iwCdrW','zhLCM','rsmJo','14cPBABL','storageState','SHTqc','extraHTTPHeaders','64lLdytA','code','map','TApmj','--disable-setuid-sandbox','WDFCu','JskKa','getuid','path','rGFFH','161220wEqQPB','string','playwright-cli','headless','split','bOPgo','allow','tabs','RKNmv','WvWQR','now','browser','125816BpspCB'];_0x4efb=function(){return _0x1271b3;};return _0x4efb();}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x5634d0,_0x1260f8){const _0x4a10bb=_0x216e,_0x34f499={'SLtRo':function(_0x41730b,_0x1e7b94,_0x4549f0,_0x506430){return _0x41730b(_0x1e7b94,_0x4549f0,_0x506430);},'SHTqc':function(_0x536e3a,_0xc48bfc,_0x59e097,_0x54b450){return _0x536e3a(_0xc48bfc,_0x59e097,_0x54b450);},'ynSgS':_0x4a10bb(0x1a5),'RwJcs':function(_0x4ca837,_0x2c875b,_0x28f94b){return _0x4ca837(_0x2c875b,_0x28f94b);},'WvWQR':function(_0x1fa228,_0x343dbb){return _0x1fa228(_0x343dbb);},'CwqeT':function(_0x2ce8ec,_0x394d72){return _0x2ce8ec!==_0x394d72;},'aAUxK':function(_0x2de9c1,_0x3a8611){return _0x2de9c1(_0x3a8611);}},_0x4cf0ea=_0x34f499['SLtRo'](join,_0x1260f8,'ci',_0x5634d0),_0x1619e3=_0x34f499[_0x4a10bb(0x1dc)](join,_0x1260f8,_0x34f499['ynSgS'],_0x5634d0),_0x4bec53=join(_0x1260f8,_0x5634d0),_0x1c1a11=_0x34f499['RwJcs'](join,_0x1260f8,'local'),_0x50fc08=_0x34f499['RwJcs'](join,_0x1260f8,'ci');if(existsSync(_0x4cf0ea))return _0x4cf0ea;if(_0x34f499[_0x4a10bb(0x18b)](existsSync,_0x1619e3))return _0x1619e3;if(existsSync(_0x4bec53)&&(_0x34f499['CwqeT'](_0x4bec53,_0x1c1a11)&&_0x34f499['CwqeT'](_0x4bec53,_0x50fc08)?!![]:_0x34f499['aAUxK'](hasLegacyProfileFiles,_0x4bec53)))return _0x4bec53;return null;}export function getEnvDir(_0x1a0129){const _0x1a8d5d=_0x216e,_0x1b471f={'PDVOp':function(_0x3fd546){return _0x3fd546();},'stxNk':function(_0x2b1e8a,_0x54f825,_0x800bf4){return _0x2b1e8a(_0x54f825,_0x800bf4);},'WAMmm':function(_0x5e0dd8,_0x580c38,_0x1a7205,_0x160f43){return _0x5e0dd8(_0x580c38,_0x1a7205,_0x160f43);}},_0x41fd02=_0x1b471f['PDVOp'](getRangerDir),_0x583c26=_0x1b471f['stxNk'](findEnvInRoot,_0x1a0129,_0x41fd02);if(_0x583c26)return _0x583c26;const _0x418c8e=getRangerHomeDir();if(_0x418c8e!==_0x41fd02){const _0x31f210=findEnvInRoot(_0x1a0129,_0x418c8e);if(_0x31f210)return _0x31f210;}return _0x1b471f['WAMmm'](join,_0x41fd02,_0x1a8d5d(0x1a5),_0x1a0129);}export function findExistingEnv(_0x20f5ee,_0x5e7baa){const _0x310a39=_0x216e,_0x2bf86e={'WDFCu':function(_0x5b6624,_0xa94bb9,_0x2ea8a0){return _0x5b6624(_0xa94bb9,_0x2ea8a0);},'jTAdQ':function(_0x13f8a0,_0x1bab80,_0x5aebf7,_0x335270){return _0x13f8a0(_0x1bab80,_0x5aebf7,_0x335270);},'zhLCM':_0x310a39(0x1c6),'dYRxX':function(_0x47fc14,_0x42e78f){return _0x47fc14(_0x42e78f);},'IEgyH':function(_0x1c85ba,_0x51dc92){return _0x1c85ba===_0x51dc92;},'LqCdR':function(_0x1d6759,_0x336779){return _0x1d6759(_0x336779);}},_0x5436ab=_0x5e7baa?.['rangerDir'],_0x431524=_0x5436ab?[_0x5436ab]:[getRangerDir(),getRangerHomeDir()][_0x310a39(0x1d3)]((_0x3e6249,_0x4d9c8f,_0x513d4d)=>_0x513d4d['indexOf'](_0x3e6249)===_0x4d9c8f),_0x36036b=_0x5e7baa?.[_0x310a39(0x197)]??['ci','local',_0x310a39(0x1c6)];for(const _0x3a4214 of _0x431524){const _0x3bf638=join(_0x3a4214,'local'),_0x23f46d=_0x2bf86e[_0x310a39(0x1e3)](join,_0x3a4214,'ci'),_0x38ae03=[{'location':'ci','path':join(_0x3a4214,'ci',_0x20f5ee)},{'location':'local','path':_0x2bf86e[_0x310a39(0x1b7)](join,_0x3a4214,'local',_0x20f5ee)},{'location':_0x2bf86e[_0x310a39(0x1d8)],'path':_0x2bf86e[_0x310a39(0x1e3)](join,_0x3a4214,_0x20f5ee)}];for(const _0x545ffe of _0x38ae03){if(_0x36036b[_0x310a39(0x1ae)](_0x545ffe['location'])&&_0x2bf86e[_0x310a39(0x1ac)](existsSync,_0x545ffe[_0x310a39(0x1e6)])){if(_0x2bf86e['IEgyH'](_0x545ffe['location'],'legacy')&&(_0x545ffe['path']===_0x3bf638||_0x545ffe[_0x310a39(0x1e6)]===_0x23f46d)&&!_0x2bf86e[_0x310a39(0x1be)](hasLegacyProfileFiles,_0x545ffe[_0x310a39(0x1e6)]))continue;return{'path':_0x545ffe[_0x310a39(0x1e6)],'location':_0x545ffe['location']};}}}return null;}function hasLegacyProfileFiles(_0x4c187a){const _0x6372d=_0x216e,_0x5e2b4c={'vgLlV':function(_0x2c0468,_0x37a2ff){return _0x2c0468(_0x37a2ff);},'bwvGS':function(_0x513acc,_0xe7f666,_0x3884b1){return _0x513acc(_0xe7f666,_0x3884b1);},'lJMTf':function(_0x2b629a,_0x38e570){return _0x2b629a(_0x38e570);},'BxUFH':_0x6372d(0x1c4)};return _0x5e2b4c['vgLlV'](existsSync,_0x5e2b4c['bwvGS'](join,_0x4c187a,'settings.json'))||_0x5e2b4c[_0x6372d(0x199)](existsSync,join(_0x4c187a,_0x5e2b4c['BxUFH']))||_0x5e2b4c['vgLlV'](existsSync,join(_0x4c187a,_0x6372d(0x1b1)));}export function isEnvCi(_0xea2865){const _0x4f7228=_0x216e,_0x2459a2={'NAPlC':function(_0x517629,_0x2ee6eb,_0x1b849b,_0x37d59e){return _0x517629(_0x2ee6eb,_0x1b849b,_0x37d59e);},'fqXqg':function(_0x18c9be){return _0x18c9be();},'RKNmv':function(_0x1f5ee3,_0x3983df){return _0x1f5ee3!==_0x3983df;},'uYNPr':function(_0x98f510){return _0x98f510();}};if(existsSync(_0x2459a2['NAPlC'](join,getRangerDir(),'ci',_0xea2865)))return!![];const _0x50559b=_0x2459a2['fqXqg'](getRangerHomeDir);if(_0x2459a2[_0x4f7228(0x18a)](_0x50559b,_0x2459a2['uYNPr'](getRangerDir))&&existsSync(join(_0x50559b,'ci',_0xea2865)))return!![];return![];}export async function cleanupTempFiles(_0x424ff8){const _0x462bad=_0x216e,_0xfdaa7c={'THokc':function(_0x48d88c,_0x901bf0){return _0x48d88c!==_0x901bf0;}},_0x48d31f=[_0x424ff8['tempAuthPath'],_0x424ff8[_0x462bad(0x1d4)]][_0x462bad(0x1d3)](Boolean);await Promise['all'](_0x48d31f[_0x462bad(0x1e0)](_0x3e9620=>unlink(_0x3e9620)['catch'](_0x5b5ab3=>{const _0x2d9129=_0x462bad;_0xfdaa7c['THokc'](_0x5b5ab3[_0x2d9129(0x1df)],_0x2d9129(0x1d6))&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x3e9620+':',_0x5b5ab3[_0x2d9129(0x19f)]);})));}export function getSettingsPath(_0x4fe0c2){const _0x32b7b6=_0x216e,_0x55f625={'HzluV':function(_0x3e0051,_0x30e010,_0x2fd5fd){return _0x3e0051(_0x30e010,_0x2fd5fd);},'GbIpm':function(_0x971b4,_0x2fbdd6){return _0x971b4(_0x2fbdd6);},'fVmvf':'settings.json'};return _0x55f625[_0x32b7b6(0x19b)](join,_0x55f625[_0x32b7b6(0x1a6)](getEnvDir,_0x4fe0c2),_0x55f625['fVmvf']);}export async function loadSettings(_0x38ed1d){const _0x2bd6ad=_0x216e,_0x522695={'rGFFH':function(_0x1c269a,_0x2fe965){return _0x1c269a(_0x2fe965);}},_0x4a1962=_0x522695[_0x2bd6ad(0x1e7)](getSettingsPath,_0x38ed1d);if(!existsSync(_0x4a1962))return{};try{const _0x164211=await readFile(_0x4a1962,_0x2bd6ad(0x191));return JSON[_0x2bd6ad(0x1a9)](_0x164211);}catch{return{};}}export async function saveSettings(_0x1fab73,_0x51bdcf){const _0x3cb22a=_0x216e,_0x47cca2={'SufBA':function(_0x24e0d1,_0x3399e7){return _0x24e0d1(_0x3399e7);},'ViEod':function(_0x468f32,_0x2e8fae,_0x219b42){return _0x468f32(_0x2e8fae,_0x219b42);},'gzhbG':function(_0x58596d,_0x530cad,_0x31baeb){return _0x58596d(_0x530cad,_0x31baeb);}},_0xb0119d=getSettingsPath(_0x1fab73),_0xa36e0d=_0x47cca2[_0x3cb22a(0x1b0)](dirname,_0xb0119d);!existsSync(_0xa36e0d)&&await _0x47cca2['ViEod'](mkdir,_0xa36e0d,{'recursive':!![]}),await _0x47cca2['gzhbG'](writeFile,_0xb0119d,JSON[_0x3cb22a(0x194)](_0x51bdcf,null,0x2));}export function resolveEnvVars(_0x76553b){const _0x129189=_0x216e,_0x2c15a2={'xKFFq':function(_0x1eeae9,_0x5a4160){return _0x1eeae9===_0x5a4160;},'bquhw':function(_0x4dcc54,_0x366ca6){return _0x4dcc54===_0x366ca6;}};if(_0x2c15a2['bquhw'](typeof _0x76553b,'string'))return _0x76553b[_0x129189(0x18f)](/\$\{(\w+)\}/g,(_0x308ec7,_0x467cf5)=>{const _0x55573d=_0x129189,_0x556498=process['env'][_0x467cf5];if(_0x2c15a2['xKFFq'](_0x556498,undefined))throw new Error(_0x55573d(0x1c9)+_0x467cf5+'\x20is\x20not\x20set');return _0x556498;});if(Array['isArray'](_0x76553b))return _0x76553b['map'](resolveEnvVars);if(_0x76553b&&_0x2c15a2['bquhw'](typeof _0x76553b,'object'))return Object[_0x129189(0x192)](Object[_0x129189(0x1a8)](_0x76553b)['map'](([_0x9006ea,_0xceb01f])=>[_0x9006ea,resolveEnvVars(_0xceb01f)]));return _0x76553b;}const isRecord=_0x7625a2=>typeof _0x7625a2===_0x3ef812(0x1a2)&&_0x7625a2!==null&&!Array['isArray'](_0x7625a2),asRecord=_0x1ddf8b=>isRecord(_0x1ddf8b)?_0x1ddf8b:undefined,mergeHeaders=(_0x13a882,_0x3837f7)=>{const _0xe554d5=_0x3ef812,_0x3b6236={'nJiFh':function(_0x15c0df,_0x253d9a){return _0x15c0df??_0x253d9a;},'qsVKS':function(_0x29361d,_0x57b26b){return _0x29361d??_0x57b26b;}},_0x164b84={..._0x3b6236['nJiFh'](_0x13a882,{}),..._0x3b6236['qsVKS'](_0x3837f7,{})};return Object[_0xe554d5(0x1a0)](_0x164b84)[_0xe554d5(0x1bd)]?_0x164b84:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x3ef812(0x1ad),'--allow-running-insecure-content',_0x3ef812(0x1b2),_0x3ef812(0x196)];export function buildBrowserOptionsFromSettings(_0x199ef5,_0x2765f3={}){const _0x27ad81=_0x3ef812,_0x50b4c7={'aMBLt':function(_0x4b1942,_0x4d837d){return _0x4b1942(_0x4d837d);},'Zifsx':function(_0x4e4409,_0x2c9ba3){return _0x4e4409===_0x2c9ba3;},'rsmJo':function(_0x2f2c97,_0x2a7629){return _0x2f2c97(_0x2a7629);}},_0xe07dba=_0x50b4c7['aMBLt'](asRecord,_0x199ef5[_0x27ad81(0x18d)]),_0x3f3638={...asRecord(_0xe07dba?.['launchOptions'])??{}};_0x50b4c7[_0x27ad81(0x1ba)](typeof _0x2765f3['headless'],_0x27ad81(0x1c5))&&(_0x3f3638['headless']=_0x2765f3[_0x27ad81(0x185)]);if(_0x199ef5['safeMode']){const _0x1ef6fd=_0x3f3638['args']??[],_0x54ed19=SAFE_MODE_ARGS[_0x27ad81(0x1d3)](_0x3a3e4b=>!_0x1ef6fd['includes'](_0x3a3e4b));_0x3f3638['args']=[..._0x1ef6fd,..._0x54ed19];}if(_0x199ef5[_0x27ad81(0x1a1)]){const _0x4fc4c8=_0x3f3638['args']??[],_0x26f6cc=ALLOW_LOCALHOST_ARGS[_0x27ad81(0x1d3)](_0x213ff4=>!_0x4fc4c8['includes'](_0x213ff4));_0x3f3638['args']=[..._0x4fc4c8,..._0x26f6cc];}const _0x411c43={..._0x50b4c7['rsmJo'](asRecord,_0xe07dba?.['contextOptions'])??{}};_0x411c43['ignoreHTTPSErrors']=!![];typeof _0x199ef5['userAgent']===_0x27ad81(0x1e9)&&(_0x411c43['userAgent']=_0x199ef5[_0x27ad81(0x1c0)]);const _0x53400e=mergeHeaders(asRecord(_0x411c43['extraHTTPHeaders']),_0x50b4c7[_0x27ad81(0x1d9)](asRecord,_0x199ef5[_0x27ad81(0x19c)]));return _0x53400e?_0x411c43[_0x27ad81(0x1dd)]=_0x53400e:delete _0x411c43['extraHTTPHeaders'],_0x2765f3['storageStatePath']&&(_0x411c43[_0x27ad81(0x1db)]=_0x2765f3['storageStatePath']),{'launchOptions':_0x3f3638,'contextOptions':_0x411c43};}function _0x216e(_0x36011c,_0x202b00){_0x36011c=_0x36011c-0x185;const _0x4efb8f=_0x4efb();let _0x216ebf=_0x4efb8f[_0x36011c];return _0x216ebf;}async function resolveLocalAuthPath(_0x18664f){const _0x7a8976=_0x3ef812,_0x5e72a1={'fZtUM':function(_0x490a8b){return _0x490a8b();},'TApmj':function(_0x9a7192,_0x92d0c5,_0x90610f){return _0x9a7192(_0x92d0c5,_0x90610f);},'JMtwK':function(_0x22116c){return _0x22116c();},'xAjlf':function(_0x549142,_0x7ddf1e,_0x3d1dbe){return _0x549142(_0x7ddf1e,_0x3d1dbe);},'bOPgo':function(_0x4984b8,_0x327fa4){return _0x4984b8(_0x327fa4);}},_0x123418=join(_0x18664f,'auth.json.enc'),_0x446a23=join(_0x18664f,_0x7a8976(0x1c4));if(existsSync(_0x123418))try{const _0x5cf62f=await _0x5e72a1[_0x7a8976(0x1c3)](getToken);if(!_0x5cf62f)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5664c4=await readFile(_0x123418),_0x53680c=_0x5e72a1[_0x7a8976(0x1e1)](decrypt,_0x5664c4,_0x5cf62f),_0x2ca8a0=join(_0x5e72a1[_0x7a8976(0x1b4)](tmpdir),_0x7a8976(0x1cf)+Date[_0x7a8976(0x18c)]()+'.json');return await _0x5e72a1['xAjlf'](writeFile,_0x2ca8a0,_0x53680c),{'storageStatePath':_0x2ca8a0,'tempAuthPath':_0x2ca8a0};}catch(_0x33270c){const _0x4334c4=_0x33270c instanceof Error?_0x33270c[_0x7a8976(0x19f)]:String(_0x33270c);throw new Error(_0x7a8976(0x198)+_0x4334c4);}if(_0x5e72a1[_0x7a8976(0x187)](existsSync,_0x446a23))return{'storageStatePath':_0x446a23};return{};}export async function buildPlaywrightConfig(_0xa76dc0,_0x1c617d,_0x4ecef5,_0x2bea60,_0xd01ed4){const _0x30b760=_0x3ef812,_0x141570={'RJlJq':function(_0x2efafe,_0x1ceaf5,_0x22d1ee,_0xa2b0c,_0x2bfee1,_0x220693,_0x1653c5){return _0x2efafe(_0x1ceaf5,_0x22d1ee,_0xa2b0c,_0x2bfee1,_0x220693,_0x1653c5);},'ZaeYA':function(_0x4745e4,_0x127591){return _0x4745e4(_0x127591);},'oOPZw':function(_0x18ce0a,_0x1a9ef2){return _0x18ce0a(_0x1a9ef2);},'OUevO':function(_0x1ad2df,_0x315ec2,_0x2b2d4e,_0x5cd6a8,_0x3d8a19,_0x17a60f,_0x29a164){return _0x1ad2df(_0x315ec2,_0x2b2d4e,_0x5cd6a8,_0x3d8a19,_0x17a60f,_0x29a164);}};if(_0xd01ed4)return _0x141570['RJlJq'](buildPlaywrightConfigCore,_0xa76dc0,_0xd01ed4,_0x1c617d,_0x4ecef5,_0x2bea60,'stagehand');const {storageStatePath:_0x321156,tempAuthPath:_0x13b355}=await _0x141570['ZaeYA'](resolveLocalAuthPath,_0x141570[_0x30b760(0x1a3)](getEnvDir,_0x1c617d));try{const _0x18de82=await _0x141570['OUevO'](buildPlaywrightConfigCore,_0xa76dc0,_0x321156,_0x1c617d,_0x4ecef5,_0x2bea60,'stagehand');return{..._0x18de82,'tempAuthPath':_0x13b355};}catch(_0x2af6d7){_0x13b355&&await unlink(_0x13b355)['catch'](()=>{});throw _0x2af6d7;}}export async function buildPlaywrightConfigCore(_0x439a1e,_0x36b6dd,_0x3222d0,_0x79874e,_0x92a32e,_0x22265e='stagehand'){const _0x5aa684=_0x3ef812,_0x1b95f0={'khxDq':function(_0x27015e,_0x153806,_0x2175fe){return _0x27015e(_0x153806,_0x2175fe);},'vbisH':function(_0x240354,_0x201a61){return _0x240354===_0x201a61;},'yKoUh':_0x5aa684(0x1a4),'jWojw':function(_0x5cf45d,_0x1c45e4,_0x5f408a,_0x1b1ba3){return _0x5cf45d(_0x1c45e4,_0x5f408a,_0x1b1ba3);},'erxag':'sessions','oLpVT':'file','ihSPl':_0x5aa684(0x1ce),'QXPUR':'core','oCFmm':_0x5aa684(0x189),'EzCEu':function(_0x3f32eb,_0x58e5ad,_0x205f06){return _0x3f32eb(_0x58e5ad,_0x205f06);},'RNVIs':function(_0x598ad8,_0x1a1c04,_0x30c2d9){return _0x598ad8(_0x1a1c04,_0x30c2d9);},'ZpUoy':function(_0x4a93e5,_0x2c759d){return _0x4a93e5===_0x2c759d;},'DGjfD':_0x5aa684(0x1ea),'NAGSV':'-cli','WTZRp':function(_0x111e29,_0x3a250a,_0x1bd68a){return _0x111e29(_0x3a250a,_0x1bd68a);}},_0x42ad8e=_0x79874e||randomUUID(),_0x3b1d94=_0x1b95f0['jWojw'](join,getRangerDir(),_0x1b95f0[_0x5aa684(0x1d5)],_0x42ad8e),_0x57dbdf=Boolean(_0x439a1e['cdpEndpoint']),_0x10b138=_0x57dbdf?{'browserName':_0x5aa684(0x1d2),'cdpEndpoint':_0x439a1e['cdpEndpoint']}:((()=>{const _0x4fd09e=_0x5aa684,{launchOptions:_0x56faf1,contextOptions:_0x2f0b79}=_0x1b95f0['khxDq'](buildBrowserOptionsFromSettings,_0x439a1e,{'headless':_0x92a32e?![]:_0x439a1e[_0x4fd09e(0x185)]??!![],'storageStatePath':_0x36b6dd});if(_0x1b95f0[_0x4fd09e(0x1af)](process[_0x4fd09e(0x1e5)]?.(),0x0)){const _0x2c51b6=['--no-sandbox',_0x4fd09e(0x1e2)],_0x356f52=_0x56faf1[_0x4fd09e(0x19d)]??[],_0xe7d1cb=_0x2c51b6['filter'](_0x5ea03d=>!_0x356f52[_0x4fd09e(0x1ae)](_0x5ea03d));_0x56faf1[_0x4fd09e(0x19d)]=[..._0x356f52,..._0xe7d1cb];}return{'isolated':!![],'browserName':_0x4fd09e(0x1d2),'launchOptions':_0x56faf1,'contextOptions':{..._0x2f0b79,'permissions':[_0x1b95f0['yKoUh'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x549837=_0x22265e===_0x5aa684(0x1ea)?{'browser':_0x10b138,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3b1d94,'outputMode':_0x1b95f0['oLpVT'],'codegen':_0x1b95f0['ihSPl']}:{'name':_0x3222d0,'browser':_0x10b138,'capabilities':[_0x1b95f0['QXPUR'],_0x1b95f0[_0x5aa684(0x1ab)],'install','pdf',_0x5aa684(0x1bc)],'imageResponses':_0x5aa684(0x188),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3b1d94};if(!_0x57dbdf){const _0xa70329=_0x549837['browser'],_0x3ff5e3=_0xa70329[_0x5aa684(0x19a)];if(_0x3ff5e3[_0x5aa684(0x1c0)]===undefined)delete _0x3ff5e3['userAgent'];if(_0x3ff5e3['storageState']===undefined)delete _0x3ff5e3['storageState'];}const _0x52c642=_0x1b95f0[_0x5aa684(0x1aa)](join,tmpdir(),'ranger-config');!existsSync(_0x52c642)&&await _0x1b95f0[_0x5aa684(0x1b8)](mkdir,_0x52c642,{'recursive':!![]});const _0x24c063=_0x1b95f0[_0x5aa684(0x1cc)](_0x22265e,_0x1b95f0[_0x5aa684(0x19e)])?_0x1b95f0['NAGSV']:'',_0xaabe39=join(_0x52c642,_0x3222d0+'-'+Date[_0x5aa684(0x18c)]()+_0x24c063+_0x5aa684(0x1b6));return await _0x1b95f0['WTZRp'](writeFile,_0xaabe39,JSON['stringify'](_0x549837,null,0x2)),{'configPath':_0xaabe39};}export async function buildPlaywrightCliConfig(_0x4483f3,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0x4423ef){const _0xf25deb=_0x3ef812,_0x1b4677={'EcCKG':function(_0x3bf325,_0x16843c,_0x124756,_0x26f716,_0x45c1db,_0x17b9ed,_0x41941b){return _0x3bf325(_0x16843c,_0x124756,_0x26f716,_0x45c1db,_0x17b9ed,_0x41941b);},'XbaeN':function(_0x1ff554,_0x43096b){return _0x1ff554(_0x43096b);},'XleeJ':_0xf25deb(0x1ea)};if(_0x4423ef)return _0x1b4677[_0xf25deb(0x1c1)](buildPlaywrightConfigCore,_0x4483f3,_0x4423ef,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0xf25deb(0x1ea));const {storageStatePath:_0x3d34c1,tempAuthPath:_0x4d3335}=await _0x1b4677[_0xf25deb(0x193)](resolveLocalAuthPath,_0x1b4677['XbaeN'](getEnvDir,_0x6d41c2));try{const _0x44e879=await buildPlaywrightConfigCore(_0x4483f3,_0x3d34c1,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0x1b4677[_0xf25deb(0x1d1)]);return{..._0x44e879,'tempAuthPath':_0x4d3335};}catch(_0x137727){_0x4d3335&&await unlink(_0x4d3335)['catch'](()=>{});throw _0x137727;}}export function getNestedValue(_0x3befe0,_0x23e2c8){const _0x316367=_0x3ef812,_0x5098fc={'pxPdk':function(_0x4a8907,_0x3ea4a8){return _0x4a8907===_0x3ea4a8;},'RMwRR':function(_0xe8d5aa,_0x5059dd){return _0xe8d5aa!==_0x5059dd;}},_0x14717d=parseKeyPath(_0x23e2c8);let _0x120a49=_0x3befe0;for(const _0x4ce896 of _0x14717d){if(_0x5098fc[_0x316367(0x1c8)](_0x120a49,null)||_0x120a49===undefined||_0x5098fc['RMwRR'](typeof _0x120a49,_0x316367(0x1a2)))return undefined;_0x120a49=_0x120a49[_0x4ce896];}return _0x120a49;}export function setNestedValue(_0x45bbfa,_0x1e7dc1,_0x235bed){const _0x1b8ec0={'QLJzZ':function(_0x445462,_0x54df6b){return _0x445462 in _0x54df6b;},'srYQW':function(_0x1ae5e8,_0x24ba3a){return _0x1ae5e8!==_0x24ba3a;},'dvwbF':function(_0x136af8,_0x23d64a){return _0x136af8-_0x23d64a;}},_0x115b7e=parseKeyPath(_0x1e7dc1);let _0x297101=_0x45bbfa;for(let _0x2fa509=0x0;_0x2fa509<_0x115b7e['length']-0x1;_0x2fa509++){const _0x3d4df7=_0x115b7e[_0x2fa509];(!_0x1b8ec0['QLJzZ'](_0x3d4df7,_0x297101)||_0x1b8ec0['srYQW'](typeof _0x297101[_0x3d4df7],'object'))&&(_0x297101[_0x3d4df7]={}),_0x297101=_0x297101[_0x3d4df7];}_0x297101[_0x115b7e[_0x1b8ec0['dvwbF'](_0x115b7e['length'],0x1)]]=_0x235bed;}export function deleteNestedValue(_0x5c44e7,_0x330902){const _0x46e1cf=_0x3ef812,_0x4dc84d={'NAdAB':function(_0x1ec2e6,_0x560bc3){return _0x1ec2e6(_0x560bc3);},'pqbbs':function(_0x6dc089,_0x1b9f01){return _0x6dc089<_0x1b9f01;},'UHuUk':function(_0x58f5b8,_0x1a5f9b){return _0x58f5b8===_0x1a5f9b;},'feNbO':function(_0x5de7a5,_0x335b8e){return _0x5de7a5===_0x335b8e;},'IrjlH':function(_0x3f4f10,_0x46d4f7){return _0x3f4f10 in _0x46d4f7;}},_0x50c5bd=_0x4dc84d[_0x46e1cf(0x1ca)](parseKeyPath,_0x330902);let _0x274df4=_0x5c44e7;for(let _0x47c761=0x0;_0x4dc84d['pqbbs'](_0x47c761,_0x50c5bd[_0x46e1cf(0x1bd)]-0x1);_0x47c761++){if(_0x274df4===null||_0x4dc84d['UHuUk'](_0x274df4,undefined)||typeof _0x274df4!=='object')return![];_0x274df4=_0x274df4[_0x50c5bd[_0x47c761]];}if(_0x4dc84d['feNbO'](_0x274df4,null)||_0x274df4===undefined||typeof _0x274df4!=='object')return![];const _0x437ed0=_0x50c5bd[_0x50c5bd['length']-0x1];if(_0x4dc84d['IrjlH'](_0x437ed0,_0x274df4))return delete _0x274df4[_0x437ed0],!![];return![];}function parseKeyPath(_0x4af3e9){const _0x5ccf9a=_0x3ef812,_0x2dec80={'OUjJx':function(_0x5753f4,_0x2a0988){return _0x5753f4===_0x2a0988;},'JskKa':_0x5ccf9a(0x1b3)},_0x1eb8fd=_0x4af3e9[_0x5ccf9a(0x186)]('.');return _0x1eb8fd[0x0]===_0x5ccf9a(0x190)&&(_0x1eb8fd[0x0]=_0x5ccf9a(0x19c)),_0x2dec80['OUjJx'](_0x1eb8fd[0x0],_0x2dec80[_0x5ccf9a(0x1e4)])&&(_0x1eb8fd[0x0]='setupHeaders'),_0x1eb8fd;}export function formatSettings(_0x4dd779,_0x283527=0x0){const _0x2b889d=_0x3ef812,_0x3bb081={'vpoIj':function(_0x290e73,_0x6956cc){return _0x290e73===_0x6956cc;}},_0x194d6c=[],_0x27b7bd='\x20\x20'[_0x2b889d(0x1bf)](_0x283527);for(const [_0x47329a,_0x3fcbd7]of Object[_0x2b889d(0x1a8)](_0x4dd779)){if(_0x3bb081[_0x2b889d(0x1b9)](_0x3fcbd7,undefined))continue;if(typeof _0x3fcbd7===_0x2b889d(0x1a2)&&_0x3fcbd7!==null){_0x194d6c['push'](''+_0x27b7bd+_0x47329a+':');for(const [_0x466ef3,_0x2d6c59]of Object['entries'](_0x3fcbd7)){_0x194d6c['push'](_0x27b7bd+'\x20\x20'+_0x466ef3+':\x20'+_0x2d6c59);}}else _0x194d6c[_0x2b889d(0x1bb)](''+_0x27b7bd+_0x47329a+':\x20'+_0x3fcbd7);}return _0x194d6c['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e7b85,_0xa82619){const _0x497871=_0x13e8,_0x5aa9f1=_0x3e7b85();while(!![]){try{const _0x2ba60b=parseInt(_0x497871(0x93))/0x1+parseInt(_0x497871(0x94))/0x2+parseInt(_0x497871(0x96))/0x3*(parseInt(_0x497871(0x99))/0x4)+-parseInt(_0x497871(0x90))/0x5*(parseInt(_0x497871(0x9e))/0x6)+parseInt(_0x497871(0x9c))/0x7*(-parseInt(_0x497871(0x97))/0x8)+-parseInt(_0x497871(0x8f))/0x9*(-parseInt(_0x497871(0x95))/0xa)+-parseInt(_0x497871(0x92))/0xb;if(_0x2ba60b===_0xa82619)break;else _0x5aa9f1['push'](_0x5aa9f1['shift']());}catch(_0x194a09){_0x5aa9f1['push'](_0x5aa9f1['shift']());}}}(_0x4f8b,0x68c2d));function _0x13e8(_0x5366d2,_0x5e158e){_0x5366d2=_0x5366d2-0x8f;const _0x4f8b65=_0x4f8b();let _0x13e8e1=_0x4f8b65[_0x5366d2];return _0x13e8e1;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x4f8b(){const _0x636276=['oSPun','ranger/SKILL.md','7KhcvqX','skills','366UvJQjl','QxtFI','1037745hHNIIF','58365RsrvxH','kEbvj','2328062pdlorc','687880uTYdFN','355042SANrsa','10UFmRWw','1434189vOGBMR','847784skEwxb','utf-8','4wCRTtX'];_0x4f8b=function(){return _0x636276;};return _0x4f8b();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x638f91){const _0x4e6ce3=_0x13e8,_0x3e04d7={'kEbvj':function(_0x429659,_0x37af7d,_0x23c5ac,_0x512c8c,_0x17b11d){return _0x429659(_0x37af7d,_0x23c5ac,_0x512c8c,_0x17b11d);},'oSPun':function(_0x5837cf,_0x5327c8,_0x3d5a24){return _0x5837cf(_0x5327c8,_0x3d5a24);},'QxtFI':_0x4e6ce3(0x98)},_0x493ad6=_0x3e04d7[_0x4e6ce3(0x91)](join,__dirname,'..','..',_0x4e6ce3(0x9d)),_0x7899c0=_0x3e04d7[_0x4e6ce3(0x9a)](join,_0x493ad6,_0x638f91);try{return readFileSync(_0x7899c0,_0x3e04d7[_0x4e6ce3(0x9f)]);}catch{return'';}}export function getRangerSkillContent(){const _0x122572=_0x13e8;return readSkillContent(_0x122572(0x9b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x4e24(_0x1ffdfe,_0xb76ac3){_0x1ffdfe=_0x1ffdfe-0xa6;const _0x21b705=_0x21b7();let _0x4e2429=_0x21b705[_0x1ffdfe];return _0x4e2429;}(function(_0x2ce625,_0x33a4c1){const _0x19a70c=_0x4e24,_0x1dcbab=_0x2ce625();while(!![]){try{const _0x74c62c=parseInt(_0x19a70c(0xc0))/0x1*(parseInt(_0x19a70c(0xb2))/0x2)+-parseInt(_0x19a70c(0xc6))/0x3*(-parseInt(_0x19a70c(0xc2))/0x4)+parseInt(_0x19a70c(0xb5))/0x5*(parseInt(_0x19a70c(0xcb))/0x6)+-parseInt(_0x19a70c(0xae))/0x7+parseInt(_0x19a70c(0xc9))/0x8*(parseInt(_0x19a70c(0xb9))/0x9)+-parseInt(_0x19a70c(0xa7))/0xa*(parseInt(_0x19a70c(0xbb))/0xb)+-parseInt(_0x19a70c(0xa8))/0xc*(-parseInt(_0x19a70c(0xbe))/0xd);if(_0x74c62c===_0x33a4c1)break;else _0x1dcbab['push'](_0x1dcbab['shift']());}catch(_0x5daaa3){_0x1dcbab['push'](_0x1dcbab['shift']());}}}(_0x21b7,0x77e47));function _0x21b7(){const _0x108ea0=['4BtGiSq','match','filter','\x20\x20Removed\x20deprecated\x20skill:\x20','306141AXArwr','endsWith','\x20\x20Files:\x20','8oNoCzb','warn','10566wcFdxF','LdIxu','log','176490bAfQrL','48ZMtjmK','length','SKILL.md','utf-8','wvCPq','koaUM','3768856MGodJF','catch','.md','XpPmn','4WeJdqe','isDirectory','JlNka','435wnEJMk','trim','kbOmR','claude','2314638BsCsXK','project','253djvONL','join','NRlfw','2871661SEAAGu','push','19695BBnJse','ejqMk'];_0x21b7=function(){return _0x108ea0;};return _0x21b7();}import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0x5e2776,_0x4833a5={}){const _0x3b1266=_0x4e24,_0x3c1a61={'ejqMk':_0x3b1266(0xba),'kbOmR':function(_0x10ca61,_0x2d4acb,_0x4c60d0){return _0x10ca61(_0x2d4acb,_0x4c60d0);},'CZPgl':function(_0x2bfce6,_0x29758d,_0x536cb5){return _0x2bfce6(_0x29758d,_0x536cb5);},'VGliG':function(_0xebd2fa,_0xc074df){return _0xebd2fa&&_0xc074df;},'NRlfw':function(_0x5ee5f6,_0x780696){return _0x5ee5f6===_0x780696;},'wvCPq':function(_0x1a80d1,_0x381329){return _0x1a80d1(_0x381329);},'XpPmn':_0x3b1266(0xaa),'YOQlI':'utf-8','xbDws':function(_0x489969,_0x28de72,_0x22a1d7,_0x59b888){return _0x489969(_0x28de72,_0x22a1d7,_0x59b888);}},{level:level=_0x3c1a61[_0x3b1266(0xc1)],cliVersion:_0x1bf0df,platform:platform=_0x3b1266(0xb8)}=_0x4833a5,_0x402a35=getSourceSkillsDir(),_0x5396a6=_0x3c1a61['kbOmR'](join,_0x402a35,_0x5e2776),_0x323ecd=_0x3c1a61[_0x3b1266(0xb7)](join,_0x402a35,_0x5e2776+_0x3b1266(0xb0)),_0x4b74d8=existsSync(_0x5396a6)&&statSync(_0x5396a6)[_0x3b1266(0xb3)]()&&existsSync(_0x3c1a61['CZPgl'](join,_0x5396a6,'SKILL.md')),_0x4df26d=existsSync(_0x323ecd);if(_0x3c1a61['VGliG'](!_0x4b74d8,!_0x4df26d))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x5e2776),![];const _0xd94f4a=_0x3c1a61[_0x3b1266(0xbd)](platform,'opencode')?getOpencodeSkillsDir(level):_0x3c1a61[_0x3b1266(0xac)](getSkillsDir,level),_0x36e2f7=join(_0xd94f4a,_0x5e2776);await mkdir(_0x36e2f7,{'recursive':!![]});let _0x5cf5d6,_0x1cce98=[];if(_0x4b74d8){const _0x5cad8e=await _0x3c1a61[_0x3b1266(0xac)](readdir,_0x5396a6),_0x2864c8=_0x5cad8e[_0x3b1266(0xc4)](_0x4d0278=>_0x4d0278[_0x3b1266(0xc7)]('.md'));for(const _0x2a1b06 of _0x2864c8){const _0x58128d=join(_0x5396a6,_0x2a1b06),_0x183445=join(_0x36e2f7,_0x2a1b06);await _0x3c1a61['kbOmR'](copyFile,_0x58128d,_0x183445),_0x1cce98['push'](_0x2a1b06);}_0x5cf5d6=await readFile(_0x3c1a61[_0x3b1266(0xb7)](join,_0x5396a6,_0x3c1a61[_0x3b1266(0xb1)]),_0x3b1266(0xab));}else{_0x5cf5d6=await readFile(_0x323ecd,_0x3c1a61['YOQlI']);const _0x37f525=join(_0x36e2f7,'SKILL.md');await _0x3c1a61['xbDws'](writeFile,_0x37f525,_0x5cf5d6,_0x3b1266(0xab)),_0x1cce98[_0x3b1266(0xbf)](_0x3b1266(0xaa));}const {name:_0x44760a}=parseFrontmatter(_0x5cf5d6);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x44760a),console[_0x3b1266(0xa6)]('\x20\x20Location:\x20'+_0x36e2f7),_0x1cce98[_0x3b1266(0xa9)]>0x1&&console[_0x3b1266(0xa6)](_0x3b1266(0xc8)+_0x1cce98[_0x3b1266(0xbc)](',\x20')),logLocalAgentInstallation(_0x5e2776,{'skillDisplayName':_0x44760a,'installLevel':level},_0x1bf0df)[_0x3b1266(0xaf)](()=>{}),!![];}function getSourceSkillsDir(){const _0x5a54e4=_0x4e24,_0x296a71={'JlNka':'skills'},_0x7d3d4=[join(__dirname,'..','..',_0x296a71[_0x5a54e4(0xb4)]),join(__dirname,'..','..','..','skills')];for(const _0x1dead8 of _0x7d3d4){if(existsSync(_0x1dead8))return _0x1dead8;}return _0x7d3d4[0x0];}function parseFrontmatter(_0x162a38){const _0x3eee0c=_0x4e24,_0x4ca07a=_0x162a38['match'](/^---\n([\s\S]+?)\n---/);if(!_0x4ca07a)throw new Error('Invalid\x20skill\x20frontmatter');const _0x2589c4=_0x4ca07a[0x1],_0x2766fe=_0x2589c4[_0x3eee0c(0xc3)](/name:\s*(.+)/),_0x54a741=_0x2589c4['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x2766fe?.[0x1][_0x3eee0c(0xb6)]()||'','description':_0x54a741?.[0x1][_0x3eee0c(0xb6)]()||''};}export async function removeSkill(_0x44be63,_0x3bdbec){const _0x5a319c=_0x4e24,_0x1da5b3={'koaUM':function(_0x3bc645,_0x366a2a){return _0x3bc645(_0x366a2a);},'LdIxu':function(_0x49a404,_0x4e7290,_0x2173f8){return _0x49a404(_0x4e7290,_0x2173f8);},'WROeR':function(_0x4f351b,_0x4c7786){return _0x4f351b(_0x4c7786);}},_0x1cf153=_0x1da5b3[_0x5a319c(0xad)](getSkillsDir,_0x3bdbec),_0x79b427=_0x1da5b3[_0x5a319c(0xcc)](join,_0x1cf153,_0x44be63);if(!_0x1da5b3['WROeR'](existsSync,_0x79b427))return![];try{return await rm(_0x79b427,{'recursive':!![]}),console[_0x5a319c(0xa6)](_0x5a319c(0xc5)+_0x44be63),!![];}catch{return console[_0x5a319c(0xca)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x44be63),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x66851e=_0x3ddf;(function(_0x499a9a,_0x2d0c4b){const _0x4992a8=_0x3ddf,_0x14ac2b=_0x499a9a();while(!![]){try{const _0x1bba95=-parseInt(_0x4992a8(0x1c3))/0x1*(parseInt(_0x4992a8(0x1ed))/0x2)+parseInt(_0x4992a8(0x1bd))/0x3+parseInt(_0x4992a8(0x1d3))/0x4*(-parseInt(_0x4992a8(0x1c4))/0x5)+-parseInt(_0x4992a8(0x1ac))/0x6*(parseInt(_0x4992a8(0x1cd))/0x7)+parseInt(_0x4992a8(0x1db))/0x8*(-parseInt(_0x4992a8(0x1bb))/0x9)+-parseInt(_0x4992a8(0x1cf))/0xa*(-parseInt(_0x4992a8(0x1f1))/0xb)+parseInt(_0x4992a8(0x1eb))/0xc;if(_0x1bba95===_0x2d0c4b)break;else _0x14ac2b['push'](_0x14ac2b['shift']());}catch(_0xa52288){_0x14ac2b['push'](_0x14ac2b['shift']());}}}(_0x1381,0x602b5));function _0x3ddf(_0x9a3c2e,_0x4246a7){_0x9a3c2e=_0x9a3c2e-0x1a9;const _0x13813e=_0x1381();let _0x3ddfac=_0x13813e[_0x9a3c2e];return _0x3ddfac;}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(_0x39b3e9,_0x3799bc){const _0x464857=_0x3ddf,_0x1ca206={'trisJ':function(_0x454177,_0x769d3b){return _0x454177>=_0x769d3b;},'naQXt':function(_0x4ae9f1,_0x31b3e9){return _0x4ae9f1<=_0x31b3e9;},'LGJCN':function(_0x26d651,_0x15b954){return _0x26d651&_0x15b954;},'fsdkO':function(_0x39d8c4,_0x22fd5d){return _0x39d8c4+_0x22fd5d;},'WHsum':function(_0x1d94f8,_0x32611a){return _0x1d94f8-_0x32611a;},'UZtqK':function(_0x3b5ca4,_0x193fc4){return _0x3b5ca4+_0x193fc4;}};if(_0x1ca206[_0x464857(0x1d8)](_0x3799bc,_0x39b3e9['length']))return[0x0,0x0];const _0x49b7ca=_0x39b3e9[_0x3799bc];let _0x16a6a1=0x1,_0x4ad377=0x80;while(_0x1ca206['naQXt'](_0x16a6a1,0x8)&&!_0x1ca206['LGJCN'](_0x49b7ca,_0x4ad377)){_0x16a6a1++,_0x4ad377>>=0x1;}if(_0x1ca206[_0x464857(0x1ab)](_0x3799bc,_0x16a6a1)>_0x39b3e9['length'])return[0x0,0x0];let _0xa85bb4=_0x49b7ca&_0x1ca206[_0x464857(0x1b0)](_0x4ad377,0x1);for(let _0x32457e=0x1;_0x32457e<_0x16a6a1;_0x32457e++){_0xa85bb4=_0x1ca206['UZtqK'](_0xa85bb4*0x100,_0x39b3e9[_0x3799bc+_0x32457e]);}return[_0xa85bb4,_0x16a6a1];}function readId(_0x122e49,_0x1141c0){const _0x35872f=_0x3ddf,_0x339fa4={'PTcuC':function(_0xa5d304,_0x574173){return _0xa5d304>=_0x574173;},'uEBpZ':function(_0xd017ee,_0x253f36){return _0xd017ee>=_0x253f36;},'EGiVH':function(_0x30baf9,_0xe5d476){return _0x30baf9<_0xe5d476;},'HUHtr':function(_0x19e382,_0x4c0494){return _0x19e382+_0x4c0494;},'raUXe':function(_0xfc96c8,_0x231f08){return _0xfc96c8*_0x231f08;},'jveQC':function(_0x1f2c61,_0xe7be7a){return _0x1f2c61+_0xe7be7a;}};if(_0x339fa4[_0x35872f(0x1d9)](_0x1141c0,_0x122e49['length']))return[0x0,0x0];const _0x484622=_0x122e49[_0x1141c0];let _0x26382c;if(_0x339fa4[_0x35872f(0x1cb)](_0x484622,0x80))_0x26382c=0x1;else{if(_0x339fa4['PTcuC'](_0x484622,0x40))_0x26382c=0x2;else{if(_0x484622>=0x20)_0x26382c=0x3;else{if(_0x484622>=0x10)_0x26382c=0x4;else return[_0x484622,0x1];}}}if(_0x1141c0+_0x26382c>_0x122e49[_0x35872f(0x1f3)])return[0x0,0x0];let _0x4d4dd7=0x0;for(let _0x278558=0x0;_0x339fa4['EGiVH'](_0x278558,_0x26382c);_0x278558++){_0x4d4dd7=_0x339fa4[_0x35872f(0x1ad)](_0x339fa4['raUXe'](_0x4d4dd7,0x100),_0x122e49[_0x339fa4[_0x35872f(0x1d0)](_0x1141c0,_0x278558)]);}return[_0x4d4dd7,_0x26382c];}function readUint(_0x1524df,_0x191d2b,_0x23762e){let _0x7bc914=0x0;for(let _0x54374e=0x0;_0x54374e<_0x23762e;_0x54374e++){_0x7bc914=_0x7bc914*0x100+_0x1524df[_0x191d2b+_0x54374e];}return _0x7bc914;}function isUnknownSize(_0x356151,_0x55505e){const _0x1d10d3=_0x3ddf,_0x3d3f16={'Kkcuj':function(_0x4e47f6,_0x42afaa){return _0x4e47f6===_0x42afaa;},'DhsNK':function(_0x13b000,_0x4c06f7){return _0x13b000*_0x4c06f7;}};return _0x3d3f16['Kkcuj'](_0x356151,Math['pow'](0x2,_0x3d3f16[_0x1d10d3(0x1e9)](0x7,_0x55505e))-0x1);}function writeVint(_0x96e39c,_0x5b435c){const _0x4ce0d1=_0x3ddf,_0x2087c8={'atDaA':function(_0x5ef774,_0x490b27){return _0x5ef774<_0x490b27;},'nqMyv':function(_0x3c589a,_0x110d26){return _0x3c589a-_0x110d26;},'Uamof':function(_0x451414,_0x177c38){return _0x451414&_0x177c38;},'KLEKU':function(_0x2113aa,_0x1c75da){return _0x2113aa/_0x1c75da;},'fIZGD':function(_0x263284,_0x3d3a14){return _0x263284<<_0x3d3a14;}};let _0x1a2849=_0x5b435c||0x1;while(_0x2087c8['atDaA'](_0x2087c8['nqMyv'](Math['pow'](0x2,0x7*_0x1a2849),0x2),_0x96e39c))_0x1a2849++;const _0x1de3fe=Buffer[_0x4ce0d1(0x1aa)](_0x1a2849);for(let _0x1cb0e5=_0x1a2849-0x1;_0x1cb0e5>=0x0;_0x1cb0e5--){_0x1de3fe[_0x1cb0e5]=_0x2087c8[_0x4ce0d1(0x1d6)](_0x96e39c,0xff),_0x96e39c=Math['floor'](_0x2087c8['KLEKU'](_0x96e39c,0x100));}return _0x1de3fe[0x0]|=_0x2087c8[_0x4ce0d1(0x1e3)](0x1,_0x2087c8[_0x4ce0d1(0x1b7)](0x8,_0x1a2849)),_0x1de3fe;}function writeUint(_0x4e002c,_0x3fd1aa){const _0x36a56c=_0x3ddf,_0x38c1e2={'NNcts':function(_0xab59be,_0x28c9df){return _0xab59be-_0x28c9df;},'YUGHW':function(_0xeb7747,_0x143698){return _0xeb7747&_0x143698;},'nmYKU':function(_0x3f6c9f,_0x2783d2){return _0x3f6c9f/_0x2783d2;}},_0x3151c5=Buffer['alloc'](_0x3fd1aa);for(let _0x44ee16=_0x38c1e2[_0x36a56c(0x1f7)](_0x3fd1aa,0x1);_0x44ee16>=0x0;_0x44ee16--){_0x3151c5[_0x44ee16]=_0x38c1e2['YUGHW'](_0x4e002c,0xff),_0x4e002c=Math[_0x36a56c(0x1ea)](_0x38c1e2[_0x36a56c(0x1f0)](_0x4e002c,0x100));}return _0x3151c5;}function writeUnknownSizeVint(_0x598b14){const _0x21533e=_0x3ddf,_0x5ba293={'KYDyY':function(_0x23393a,_0x295397){return _0x23393a-_0x295397;}},_0x14142f=Buffer[_0x21533e(0x1aa)](_0x598b14,0xff);return _0x14142f[0x0]=0xff>>_0x5ba293[_0x21533e(0x1dd)](_0x598b14,0x1),_0x14142f;}function uintSize(_0x3e78e7){const _0x22330c=_0x3ddf,_0x397741={'HCEVB':function(_0x209367,_0x4a7566){return _0x209367>_0x4a7566;}};if(_0x3e78e7===0x0)return 0x1;let _0x589f08=0x0,_0x264b92=_0x3e78e7;while(_0x397741[_0x22330c(0x1ec)](_0x264b92,0x0)){_0x589f08++,_0x264b92=Math['floor'](_0x264b92/0x100);}return _0x589f08;}function findTimestampScale(_0x502cc9,_0x39de1e){const _0x21e63a=_0x3ddf,_0x43f676={'sUHzV':function(_0xdd40cf,_0x98838c,_0x3f1908){return _0xdd40cf(_0x98838c,_0x3f1908);},'vADcT':function(_0x9a54aa,_0x3add21){return _0x9a54aa===_0x3add21;},'OSlcY':function(_0x546f48,_0x56a817){return _0x546f48+_0x56a817;},'KQwjC':function(_0x595716,_0xcd6a1b){return _0x595716+_0xcd6a1b;},'VjhgA':function(_0x53cb2a,_0x4d95d9){return _0x53cb2a<_0x4d95d9;},'SjSnU':function(_0x546870,_0x52ed30,_0x2980f5){return _0x546870(_0x52ed30,_0x2980f5);},'lNJIT':function(_0x1737f1,_0x5a1f5e){return _0x1737f1+_0x5a1f5e;},'zrlVO':function(_0x4715be,_0x5dc11b,_0x281684){return _0x4715be(_0x5dc11b,_0x281684);},'oqEoY':function(_0x422538,_0x37c5a8){return _0x422538+_0x37c5a8;}};let _0x252986=_0x39de1e;const _0x2bd5a2=Math[_0x21e63a(0x1ae)](_0x502cc9[_0x21e63a(0x1f3)],_0x39de1e+0x2710);while(_0x252986<_0x2bd5a2){const [_0x3c6992,_0x169a25]=readId(_0x502cc9,_0x252986),[_0x3c92fb,_0x15d9a5]=_0x43f676['sUHzV'](readVint,_0x502cc9,_0x252986+_0x169a25);if(_0x43f676[_0x21e63a(0x1d2)](_0x3c6992,ID_INFO)){let _0x46a204=_0x43f676[_0x21e63a(0x1f5)](_0x252986+_0x169a25,_0x15d9a5);const _0x48337e=_0x43f676['KQwjC'](_0x46a204,_0x3c92fb);while(_0x43f676[_0x21e63a(0x1c1)](_0x46a204,_0x48337e)){const [_0x3a3b61,_0x551c6c]=_0x43f676[_0x21e63a(0x1ef)](readId,_0x502cc9,_0x46a204),[_0x487f5e,_0x1b274c]=_0x43f676['sUHzV'](readVint,_0x502cc9,_0x46a204+_0x551c6c);if(_0x3a3b61===ID_TIMESTAMP_SCALE)return readUint(_0x502cc9,_0x43f676[_0x21e63a(0x1f5)](_0x46a204,_0x551c6c)+_0x1b274c,_0x487f5e);_0x46a204+=_0x43f676['lNJIT'](_0x551c6c,_0x1b274c)+_0x487f5e;}break;}if(_0x43f676['vADcT'](_0x3c6992,ID_CLUSTER))break;if(_0x43f676[_0x21e63a(0x1c7)](isUnknownSize,_0x3c92fb,_0x15d9a5))break;_0x252986+=_0x43f676[_0x21e63a(0x1d1)](_0x169a25,_0x15d9a5)+_0x3c92fb;}return 0xf4240;}function findFirstClusterOffset(_0x5201a4,_0x2e42f8){const _0x4c1856=_0x3ddf,_0x291bb7={'UUodo':function(_0x27d66c,_0x3935cb,_0x903911){return _0x27d66c(_0x3935cb,_0x903911);},'ihhot':function(_0x9d84e4,_0x152521,_0x17e9dd){return _0x9d84e4(_0x152521,_0x17e9dd);}};let _0xebebbe=_0x2e42f8;while(_0xebebbe<_0x5201a4['length']){const [_0x508cf9,_0x3f3628]=_0x291bb7['UUodo'](readId,_0x5201a4,_0xebebbe);if(_0x508cf9===ID_CLUSTER)return _0xebebbe;const [_0x31c131,_0x530b4f]=_0x291bb7['UUodo'](readVint,_0x5201a4,_0xebebbe+_0x3f3628);if(_0x291bb7[_0x4c1856(0x1b8)](isUnknownSize,_0x31c131,_0x530b4f))return _0xebebbe;_0xebebbe+=_0x3f3628+_0x530b4f+_0x31c131;}return _0x5201a4['length'];}function findClusterEnd(_0x254952,_0x5dea0f,_0x303603,_0x41a0d9){const _0x21dfbd=_0x3ddf,_0x5e36fc={'ZrNCP':function(_0x7d64b9,_0x26e7f7,_0x3af4da){return _0x7d64b9(_0x26e7f7,_0x3af4da);},'MGWXi':function(_0x15c7d2,_0x3a20d0){return _0x15c7d2<_0x3a20d0;},'tVLpX':function(_0x336fc5,_0xc7ab04,_0x296382){return _0x336fc5(_0xc7ab04,_0x296382);},'ZunKf':function(_0x2aeb5f,_0x58dfbe){return _0x2aeb5f+_0x58dfbe;},'yUbkK':function(_0x19a887,_0x550a97){return _0x19a887+_0x550a97;}};if(!_0x5e36fc[_0x21dfbd(0x1ca)](isUnknownSize,_0x303603,_0x41a0d9))return _0x5dea0f+_0x303603;const _0x5ae819=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x109b2b=_0x5dea0f;while(_0x5e36fc[_0x21dfbd(0x1ba)](_0x109b2b,_0x254952[_0x21dfbd(0x1f3)]-0x4)){const [_0x61cb61,_0x2f61bc]=_0x5e36fc['tVLpX'](readId,_0x254952,_0x109b2b);if(_0x5ae819[_0x21dfbd(0x1e0)](_0x61cb61))return _0x109b2b;const [_0x2d630c,_0x55bec9]=readVint(_0x254952,_0x5e36fc['ZunKf'](_0x109b2b,_0x2f61bc));if(isUnknownSize(_0x2d630c,_0x55bec9))return _0x254952['length'];_0x109b2b+=_0x5e36fc[_0x21dfbd(0x1df)](_0x2f61bc+_0x55bec9,_0x2d630c);}return _0x254952['length'];}function extractClusters(_0x528d5e,_0x3812c7){const _0x487cc3=_0x3ddf,_0x2c8806={'GeqiA':function(_0x1c08c2,_0x56ce5e,_0x5c1e0f){return _0x1c08c2(_0x56ce5e,_0x5c1e0f);},'psfnN':function(_0x5dca57,_0x4c5595){return _0x5dca57+_0x4c5595;},'kGGgS':function(_0x4fc372,_0x285937,_0x5c1dd0){return _0x4fc372(_0x285937,_0x5c1dd0);},'OqCve':function(_0x747021,_0x4bac8d){return _0x747021+_0x4bac8d;},'haQJL':function(_0x1f9f58,_0x3bcf34,_0x446814){return _0x1f9f58(_0x3bcf34,_0x446814);},'FdsZf':function(_0x50eaee,_0x2420dc){return _0x50eaee===_0x2420dc;},'VkrjG':function(_0x3c02f9,_0x395b3e){return _0x3c02f9+_0x395b3e;},'YMqOT':function(_0x2ffb7f,_0x27635f){return _0x2ffb7f+_0x27635f;},'LJdQl':function(_0x4ac624,_0x12d666){return _0x4ac624+_0x12d666;},'bTaoS':function(_0x1fb82c,_0x13c4f4){return _0x1fb82c+_0x13c4f4;},'UdPaB':function(_0x86171a,_0x3b3c61){return _0x86171a<_0x3b3c61;},'XZBtr':function(_0x3dfd28,_0x2fa499,_0x2e0c59){return _0x3dfd28(_0x2fa499,_0x2e0c59);},'cCpxo':function(_0x3879bb,_0x3e612d){return _0x3879bb===_0x3e612d;},'oNGLt':function(_0x38a33c,_0x2f6a4c){return _0x38a33c>=_0x2f6a4c;},'WdbQa':function(_0x24b355,_0x7a96f3){return _0x24b355+_0x7a96f3;},'zkLxR':function(_0x72a926,_0x3638d6){return _0x72a926===_0x3638d6;},'FYSfn':function(_0x9a29c8,_0x216c1a){return _0x9a29c8+_0x216c1a;}},_0x459814=[],_0x1bc237=Buffer[_0x487cc3(0x1f9)]([0x1f,0x43,0xb6,0x75]);let _0x215302=0x0;while(_0x215302<_0x528d5e[_0x487cc3(0x1f3)]){const _0x1e8940=_0x528d5e[_0x487cc3(0x1e2)](_0x1bc237,_0x215302);if(_0x1e8940===-0x1)break;const [_0x38317b,_0x3d1b9e]=_0x2c8806[_0x487cc3(0x1a9)](readId,_0x528d5e,_0x1e8940);if(_0x38317b!==ID_CLUSTER){_0x215302=_0x2c8806[_0x487cc3(0x1c8)](_0x1e8940,0x1);continue;}const [_0x47f2ee,_0x3e209f]=_0x2c8806[_0x487cc3(0x1d5)](readVint,_0x528d5e,_0x2c8806[_0x487cc3(0x1f2)](_0x1e8940,_0x3d1b9e)),_0x2bf188=_0x2c8806['psfnN'](_0x1e8940+_0x3d1b9e,_0x3e209f),_0x449ac3=findClusterEnd(_0x528d5e,_0x2bf188,_0x47f2ee,_0x3e209f);let _0x2eab69=_0x2bf188,_0x3cafd4=0x0,_0x400e39=0x2,_0x591188=![],_0xeae8b1=Buffer[_0x487cc3(0x1aa)](0x0),_0x225c18=Buffer['alloc'](0x0);while(_0x2eab69<_0x449ac3){const [_0x547eb3,_0x466847]=_0x2c8806[_0x487cc3(0x1f4)](readId,_0x528d5e,_0x2eab69),[_0x1deae7,_0x536e71]=readVint(_0x528d5e,_0x2eab69+_0x466847);if(_0x2c8806[_0x487cc3(0x1fa)](_0x547eb3,ID_TIMESTAMP)){_0x3cafd4=readUint(_0x528d5e,_0x2c8806['VkrjG'](_0x2eab69,_0x466847)+_0x536e71,_0x1deae7),_0x400e39=_0x1deae7,_0x591188=!![],_0xeae8b1=_0x528d5e['slice'](_0x2bf188,_0x2eab69);const _0x421b68=_0x2c8806[_0x487cc3(0x1e4)](_0x2c8806['psfnN'](_0x2eab69,_0x466847),_0x536e71)+_0x1deae7;_0x225c18=_0x528d5e[_0x487cc3(0x1ee)](_0x421b68,_0x449ac3);break;}if(_0x2c8806['FdsZf'](_0x547eb3,ID_CLUSTER))break;if(isUnknownSize(_0x1deae7,_0x536e71))break;_0x2eab69+=_0x2c8806['LJdQl'](_0x2c8806['bTaoS'](_0x466847,_0x536e71),_0x1deae7);}!_0x591188&&(_0x225c18=_0x528d5e['slice'](_0x2bf188,_0x449ac3));let _0x377738=_0x3cafd4;_0x2eab69=_0x2bf188;while(_0x2c8806['UdPaB'](_0x2eab69,_0x449ac3)){const [_0x2dc1c2,_0x335e4a]=readId(_0x528d5e,_0x2eab69),[_0x1fee81,_0x180dcf]=_0x2c8806[_0x487cc3(0x1e1)](readVint,_0x528d5e,_0x2eab69+_0x335e4a);if(_0x2c8806[_0x487cc3(0x1e5)](_0x2dc1c2,ID_SIMPLE_BLOCK)&&_0x2c8806[_0x487cc3(0x1be)](_0x1fee81,0x4)){const _0x2b7935=_0x2c8806['psfnN'](_0x2eab69,_0x335e4a)+_0x180dcf,[,_0x385685]=readVint(_0x528d5e,_0x2b7935),_0x30bc2c=_0x528d5e['readInt16BE'](_0x2c8806[_0x487cc3(0x1f2)](_0x2b7935,_0x385685)),_0x44a3b2=_0x2c8806['WdbQa'](_0x3cafd4,_0x30bc2c);if(_0x44a3b2>_0x377738)_0x377738=_0x44a3b2;}if(_0x2c8806['zkLxR'](_0x2dc1c2,ID_CLUSTER))break;if(isUnknownSize(_0x1fee81,_0x180dcf))break;_0x2eab69+=_0x2c8806[_0x487cc3(0x1cc)](_0x2c8806[_0x487cc3(0x1c6)](_0x335e4a,_0x180dcf),_0x1fee81);}_0x459814['push']({'timestamp':_0x3cafd4,'maxTicks':_0x377738,'bodyBeforeTimestamp':_0xeae8b1,'bodyAfterTimestamp':_0x225c18,'timestampElementSize':_0x400e39}),_0x215302=_0x449ac3;}return _0x459814;}function parseWebm(_0x1bdb3c){const _0x392b63=_0x3ddf,_0xb49f82={'qUEQw':function(_0x28e181,_0x4fa22a){return _0x28e181+_0x4fa22a;},'dbxnO':function(_0x51dfa2,_0xda401c,_0x17d5e7){return _0x51dfa2(_0xda401c,_0x17d5e7);},'TSFzJ':function(_0x4bfa3c,_0x34d131){return _0x4bfa3c+_0x34d131;},'tbiOd':function(_0x38f22c,_0x346d82,_0x2d84a4){return _0x38f22c(_0x346d82,_0x2d84a4);},'BXEte':function(_0x258750,_0x1dbe2d,_0x757968){return _0x258750(_0x1dbe2d,_0x757968);}};let _0x1d3616=0x0;const [,_0x307b5d]=readId(_0x1bdb3c,_0x1d3616),[_0x6c0111,_0x12b705]=readVint(_0x1bdb3c,_0xb49f82['qUEQw'](_0x1d3616,_0x307b5d));_0x1d3616+=_0xb49f82['qUEQw'](_0xb49f82[_0x392b63(0x1b1)](_0x307b5d,_0x12b705),_0x6c0111);const [_0x4d085f,_0x10a61a]=readId(_0x1bdb3c,_0x1d3616);if(_0x4d085f!==ID_SEGMENT)return null;const [,_0x3982d9]=_0xb49f82['dbxnO'](readVint,_0x1bdb3c,_0xb49f82[_0x392b63(0x1b1)](_0x1d3616,_0x10a61a)),_0x2d1428=_0xb49f82['TSFzJ'](_0x1d3616,_0x10a61a)+_0x3982d9,_0x54d19f=findTimestampScale(_0x1bdb3c,_0x2d1428),_0x36a3ac=_0xb49f82['tbiOd'](findFirstClusterOffset,_0x1bdb3c,_0x2d1428),_0x39f8dd=_0x1bdb3c['slice'](0x0,_0x36a3ac),_0x49ebfe=_0xb49f82['BXEte'](extractClusters,_0x1bdb3c,_0x54d19f);let _0x4ddb74=0x0;for(const _0x42b8f8 of _0x49ebfe){if(_0x42b8f8['maxTicks']>_0x4ddb74)_0x4ddb74=_0x42b8f8['maxTicks'];}return{'header':_0x39f8dd,'clusters':_0x49ebfe,'timestampScale':_0x54d19f,'maxTimestampTicks':_0x4ddb74};}function buildCluster(_0x3284a1,_0x282f22,_0x127699){const _0x381154=_0x3ddf,_0x31ce70={'fAXer':function(_0x53cba4,_0x251ad6){return _0x53cba4(_0x251ad6);}},_0x443419=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x220ea7=Math['max'](0x4,uintSize(_0x3284a1)),_0x34b856=Buffer[_0x381154(0x1b9)]([Buffer['from']([ID_TIMESTAMP]),_0x31ce70[_0x381154(0x1b4)](writeVint,_0x220ea7),writeUint(_0x3284a1,_0x220ea7)]),_0x4b0e46=Buffer[_0x381154(0x1b9)]([_0x282f22,_0x34b856,_0x127699]),_0x11367b=writeVint(_0x4b0e46[_0x381154(0x1f3)]);return Buffer['concat']([_0x443419,_0x11367b,_0x4b0e46]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x42d1bb){const _0xec1ae6=_0x3ddf,_0x406d64={'eyzrN':function(_0x32df68,_0x182696){return _0x32df68+_0x182696;},'baMGu':function(_0x51ee97,_0x54bf54,_0x3b2e03){return _0x51ee97(_0x54bf54,_0x3b2e03);},'Haxhq':function(_0x1698de,_0x3e363a,_0x2e2400){return _0x1698de(_0x3e363a,_0x2e2400);},'xKRdD':function(_0x1478bd,_0x37a4ad){return _0x1478bd+_0x37a4ad;},'ghERA':function(_0x39d979,_0x2134a2){return _0x39d979+_0x2134a2;},'QEKkx':function(_0x2cf739,_0x50c438){return _0x2cf739<_0x50c438;},'NAGvu':function(_0x375ce0,_0x3ec4cb){return _0x375ce0+_0x3ec4cb;},'Hqboj':function(_0xc811bd,_0x50200c){return _0xc811bd===_0x50200c;},'ZVOYJ':function(_0x2dba6d,_0x7822ee){return _0x2dba6d===_0x7822ee;},'inuQW':function(_0x427b95,_0x474a43){return _0x427b95+_0x474a43;},'Bvvkc':function(_0x5f4cfc,_0x6671ff){return _0x5f4cfc+_0x6671ff;},'bfUnc':function(_0x3b658d,_0x279dc4){return _0x3b658d+_0x279dc4;},'SmJDQ':function(_0x5dcca4,_0x5e9158){return _0x5dcca4+_0x5e9158;}},_0x41094a=Buffer[_0xec1ae6(0x1f9)](_0x42d1bb);let _0x488d2b=0x0;const [,_0x12f604]=readId(_0x41094a,_0x488d2b),[_0x45fc8c,_0x39035f]=readVint(_0x41094a,_0x488d2b+_0x12f604),_0x276b9c=_0x406d64[_0xec1ae6(0x1c9)](_0x406d64['eyzrN'](_0x488d2b,_0x12f604),_0x39035f)+_0x45fc8c,[,_0x370d22]=_0x406d64[_0xec1ae6(0x1b6)](readId,_0x41094a,_0x276b9c),[,_0xe93469]=_0x406d64['Haxhq'](readVint,_0x41094a,_0x276b9c+_0x370d22),_0x308f25=_0x406d64[_0xec1ae6(0x1b2)](_0x276b9c+_0x370d22,_0xe93469),_0x4c2376=writeUnknownSizeVint(_0xe93469);_0x4c2376[_0xec1ae6(0x1da)](_0x41094a,_0x406d64['xKRdD'](_0x276b9c,_0x370d22));let _0x401c06=_0x308f25;const _0x4eff4a=Math[_0xec1ae6(0x1ae)](_0x41094a['length'],_0x406d64['ghERA'](_0x308f25,0x2710));while(_0x406d64['QEKkx'](_0x401c06,_0x4eff4a)){const [_0x36ad24,_0xbdd1fb]=readId(_0x41094a,_0x401c06),[_0x528823,_0x40c737]=readVint(_0x41094a,_0x406d64['NAGvu'](_0x401c06,_0xbdd1fb));if(_0x406d64[_0xec1ae6(0x1c2)](_0x36ad24,ID_CLUSTER))break;if(isUnknownSize(_0x528823,_0x40c737))break;if(_0x406d64['ZVOYJ'](_0x36ad24,ID_INFO)){const _0x470a61=_0x406d64['xKRdD'](_0x406d64[_0xec1ae6(0x1af)](_0x401c06,_0xbdd1fb),_0x40c737),_0x517306=_0x406d64[_0xec1ae6(0x1f8)](_0x470a61,_0x528823),_0x321bf8=[];let _0x352582=_0x470a61;while(_0x352582<_0x517306){const [_0x41bf75,_0x102d8b]=readId(_0x41094a,_0x352582),[_0x548c28,_0x2b31c4]=readVint(_0x41094a,_0x406d64['eyzrN'](_0x352582,_0x102d8b)),_0x32f7cb=_0x406d64['Bvvkc'](_0x102d8b,_0x2b31c4)+_0x548c28;_0x41bf75!==ID_DURATION&&_0x321bf8[_0xec1ae6(0x1d4)](_0x41094a['slice'](_0x352582,_0x352582+_0x32f7cb)),_0x352582+=_0x32f7cb;}const _0x4f9ad2=Buffer[_0xec1ae6(0x1b9)](_0x321bf8),_0x4e22b4=Buffer['concat']([_0x41094a[_0xec1ae6(0x1ee)](_0x401c06,_0x401c06+_0xbdd1fb),writeVint(_0x4f9ad2['length'],_0x40c737)]);return Buffer[_0xec1ae6(0x1b9)]([_0x41094a[_0xec1ae6(0x1ee)](0x0,_0x401c06),_0x4e22b4,_0x4f9ad2,_0x41094a['slice'](_0x517306)]);}_0x401c06+=_0x406d64['bfUnc'](_0x406d64['SmJDQ'](_0xbdd1fb,_0x40c737),_0x528823);}return _0x41094a;}function _0x1381(){const _0x590c1=['copy','8PRAXxi','argv','KYDyY','maxTimestampTicks','yUbkK','has','XZBtr','indexOf','fIZGD','YMqOT','cCpxo','exit','header','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','DhsNK','floor','13415940XVvYWU','HCEVB','1586TalFae','slice','SjSnU','nmYKU','2453hOLxYq','OqCve','length','haQJL','OSlcY','endsWith','NNcts','inuQW','from','FdsZf','GeqiA','alloc','fsdkO','334986OcmcQK','HUHtr','min','NAGvu','WHsum','qUEQw','xKRdD','gGJsv','fAXer','bodyBeforeTimestamp','baMGu','nqMyv','ihhot','concat','MGWXi','2783331rQiiun','Stitched\x20','1264734qgsccn','oNGLt','EABaG','\x20files\x20->\x20','VjhgA','Hqboj','681ZYtEXT','5HCBIIt','timestamp','FYSfn','zrlVO','psfnN','eyzrN','ZrNCP','uEBpZ','LJdQl','7SipJgF','bodyAfterTimestamp','7190cchOHh','jveQC','oqEoY','vADcT','1603512gNbjNq','push','kGGgS','Uamof','log','trisJ','PTcuC'];_0x1381=function(){return _0x590c1;};return _0x1381();}export function stitchWebmFiles(_0x2ee1d0,_0x273f65){const _0x212183=_0x3ddf,_0x2eb5d5={'SVFTu':function(_0x1d2a7e,_0x4c5fa0){return _0x1d2a7e<=_0x4c5fa0;},'gGJsv':function(_0x191c2a,_0x40fd76){return _0x191c2a(_0x40fd76);},'rYpnj':function(_0x4a9010,_0x1ee952){return _0x4a9010<_0x1ee952;},'EABaG':function(_0x56383e,_0x37ed7d,_0x586c26,_0x57183f){return _0x56383e(_0x37ed7d,_0x586c26,_0x57183f);}};if(_0x2eb5d5['SVFTu'](_0x2ee1d0[_0x212183(0x1f3)],0x1))return![];const _0xffa71=[];for(const _0x23e7ad of _0x2ee1d0){const _0x4511ee=readFileSync(_0x23e7ad),_0x4989bd=_0x2eb5d5[_0x212183(0x1b3)](parseWebm,_0x4511ee);if(!_0x4989bd||_0x4989bd['clusters']['length']===0x0)return![];_0xffa71[_0x212183(0x1d4)](_0x4989bd);}const _0x2bb552=_0xffa71[0x0],_0x16a9f3=rebuildHeaderWithoutDuration(_0x2bb552[_0x212183(0x1e7)]),_0x3fefeb=[_0x16a9f3];let _0x31226d=0x0;for(let _0x11239b=0x0;_0x2eb5d5['rYpnj'](_0x11239b,_0xffa71['length']);_0x11239b++){const _0x40b0fc=_0xffa71[_0x11239b];for(const _0x39dabd of _0x40b0fc['clusters']){const _0x4cffaa=_0x39dabd[_0x212183(0x1c5)]+_0x31226d;_0x3fefeb[_0x212183(0x1d4)](_0x2eb5d5[_0x212183(0x1bf)](buildCluster,_0x4cffaa,_0x39dabd[_0x212183(0x1b5)],_0x39dabd[_0x212183(0x1ce)]));}const _0xeb1acc=0x1e;_0x31226d+=_0x40b0fc[_0x212183(0x1de)]+_0xeb1acc;}return writeFileSync(_0x273f65,Buffer['concat'](_0x3fefeb)),!![];}if(process[_0x66851e(0x1dc)][0x1]?.[_0x66851e(0x1f6)]('stitchWebmFiles.ts')||process[_0x66851e(0x1dc)][0x1]?.[_0x66851e(0x1f6)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x66851e(0x1f3)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x66851e(0x1e6)](0x1));const output=args[args[_0x66851e(0x1f3)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x66851e(0x1d7)](_0x66851e(0x1bc)+inputs[_0x66851e(0x1f3)]+_0x66851e(0x1c0)+output):console['log'](_0x66851e(0x1e8));}
|
|
1
|
+
const _0x3bbe45=_0x314f;(function(_0x2b740a,_0x2a60e8){const _0x18f393=_0x314f,_0x4664fa=_0x2b740a();while(!![]){try{const _0x3c771b=-parseInt(_0x18f393(0x153))/0x1+parseInt(_0x18f393(0x169))/0x2*(-parseInt(_0x18f393(0x15e))/0x3)+parseInt(_0x18f393(0x170))/0x4*(-parseInt(_0x18f393(0x165))/0x5)+parseInt(_0x18f393(0x155))/0x6+parseInt(_0x18f393(0x147))/0x7*(parseInt(_0x18f393(0x166))/0x8)+-parseInt(_0x18f393(0x132))/0x9*(-parseInt(_0x18f393(0x143))/0xa)+parseInt(_0x18f393(0x154))/0xb;if(_0x3c771b===_0x2a60e8)break;else _0x4664fa['push'](_0x4664fa['shift']());}catch(_0x224b1e){_0x4664fa['push'](_0x4664fa['shift']());}}}(_0x1154,0x87e12));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(_0x2b3687,_0x37ecd2){const _0x39ee3a=_0x314f,_0x982c29={'raXiD':function(_0x44861c,_0x1b97f6){return _0x44861c+_0x1b97f6;},'peTTP':function(_0xd2e590,_0x2dbd80){return _0xd2e590&_0x2dbd80;}};if(_0x37ecd2>=_0x2b3687[_0x39ee3a(0x156)])return[0x0,0x0];const _0x311025=_0x2b3687[_0x37ecd2];let _0x1e4b23=0x1,_0x3dfa75=0x80;while(_0x1e4b23<=0x8&&!(_0x311025&_0x3dfa75)){_0x1e4b23++,_0x3dfa75>>=0x1;}if(_0x982c29[_0x39ee3a(0x135)](_0x37ecd2,_0x1e4b23)>_0x2b3687[_0x39ee3a(0x156)])return[0x0,0x0];let _0x21c5b8=_0x982c29['peTTP'](_0x311025,_0x3dfa75-0x1);for(let _0x553745=0x1;_0x553745<_0x1e4b23;_0x553745++){_0x21c5b8=_0x21c5b8*0x100+_0x2b3687[_0x982c29['raXiD'](_0x37ecd2,_0x553745)];}return[_0x21c5b8,_0x1e4b23];}function readId(_0x79f93c,_0x7e0377){const _0x2b6e3e=_0x314f,_0xec5af5={'hRsxt':function(_0x5ca802,_0x1f43d1){return _0x5ca802>=_0x1f43d1;},'xDXBl':function(_0x12e205,_0x5f243d){return _0x12e205>=_0x5f243d;},'cXSnG':function(_0x42a0f2,_0x17fd03){return _0x42a0f2>_0x17fd03;},'tkzoi':function(_0x1bef92,_0x322386){return _0x1bef92*_0x322386;},'QejCB':function(_0x3ced5b,_0xee04c8){return _0x3ced5b+_0xee04c8;}};if(_0xec5af5[_0x2b6e3e(0x176)](_0x7e0377,_0x79f93c['length']))return[0x0,0x0];const _0x416b8c=_0x79f93c[_0x7e0377];let _0x387f94;if(_0xec5af5[_0x2b6e3e(0x176)](_0x416b8c,0x80))_0x387f94=0x1;else{if(_0x416b8c>=0x40)_0x387f94=0x2;else{if(_0xec5af5[_0x2b6e3e(0x149)](_0x416b8c,0x20))_0x387f94=0x3;else{if(_0xec5af5[_0x2b6e3e(0x176)](_0x416b8c,0x10))_0x387f94=0x4;else return[_0x416b8c,0x1];}}}if(_0xec5af5[_0x2b6e3e(0x16f)](_0x7e0377+_0x387f94,_0x79f93c['length']))return[0x0,0x0];let _0x7fc128=0x0;for(let _0x49a9d8=0x0;_0x49a9d8<_0x387f94;_0x49a9d8++){_0x7fc128=_0xec5af5[_0x2b6e3e(0x14d)](_0x7fc128,0x100)+_0x79f93c[_0xec5af5['QejCB'](_0x7e0377,_0x49a9d8)];}return[_0x7fc128,_0x387f94];}function readUint(_0x63c855,_0x47de64,_0x5bfa4c){const _0x3e6e0d=_0x314f,_0x546e59={'DGYnA':function(_0x43d1b6,_0x5a0ecd){return _0x43d1b6*_0x5a0ecd;}};let _0x160cd7=0x0;for(let _0x4bb8f0=0x0;_0x4bb8f0<_0x5bfa4c;_0x4bb8f0++){_0x160cd7=_0x546e59[_0x3e6e0d(0x146)](_0x160cd7,0x100)+_0x63c855[_0x47de64+_0x4bb8f0];}return _0x160cd7;}function isUnknownSize(_0x53d625,_0x2b8c6c){const _0x1bb351=_0x314f,_0x4ddbab={'hKOEg':function(_0x46405b,_0x5511cf){return _0x46405b-_0x5511cf;},'zqzIu':function(_0x4f6d96,_0x11b046){return _0x4f6d96*_0x11b046;}};return _0x53d625===_0x4ddbab[_0x1bb351(0x14b)](Math[_0x1bb351(0x14f)](0x2,_0x4ddbab[_0x1bb351(0x145)](0x7,_0x2b8c6c)),0x1);}function writeVint(_0x36a261,_0x1e8d8f){const _0x272f88=_0x314f,_0x10ec37={'toUhK':function(_0x432129,_0x53aaaf){return _0x432129<_0x53aaaf;},'HasJi':function(_0x5e7eaf,_0x5bc33c){return _0x5e7eaf-_0x5bc33c;},'kNWEz':function(_0x28aa09,_0x2bd87e){return _0x28aa09-_0x2bd87e;},'cQnez':function(_0x452130,_0x17873f){return _0x452130&_0x17873f;},'ScllR':function(_0x546342,_0x36cf29){return _0x546342/_0x36cf29;},'Xjpif':function(_0x565e59,_0x1f0634){return _0x565e59<<_0x1f0634;}};let _0x2d148a=_0x1e8d8f||0x1;while(_0x10ec37['toUhK'](_0x10ec37[_0x272f88(0x139)](Math[_0x272f88(0x14f)](0x2,0x7*_0x2d148a),0x2),_0x36a261))_0x2d148a++;const _0x9cb7f1=Buffer[_0x272f88(0x14a)](_0x2d148a);for(let _0x2c1794=_0x10ec37[_0x272f88(0x15a)](_0x2d148a,0x1);_0x2c1794>=0x0;_0x2c1794--){_0x9cb7f1[_0x2c1794]=_0x10ec37[_0x272f88(0x16e)](_0x36a261,0xff),_0x36a261=Math[_0x272f88(0x13f)](_0x10ec37[_0x272f88(0x12e)](_0x36a261,0x100));}return _0x9cb7f1[0x0]|=_0x10ec37[_0x272f88(0x161)](0x1,0x8-_0x2d148a),_0x9cb7f1;}function writeUint(_0xbe7975,_0x2cd87e){const _0x3c1a3a=_0x314f,_0x12ede3={'sHFKQ':function(_0x1ac77f,_0x325033){return _0x1ac77f-_0x325033;},'efQEA':function(_0x1c6a9d,_0x15674f){return _0x1c6a9d/_0x15674f;}},_0x1bf3d0=Buffer[_0x3c1a3a(0x14a)](_0x2cd87e);for(let _0x501ad1=_0x12ede3[_0x3c1a3a(0x160)](_0x2cd87e,0x1);_0x501ad1>=0x0;_0x501ad1--){_0x1bf3d0[_0x501ad1]=_0xbe7975&0xff,_0xbe7975=Math[_0x3c1a3a(0x13f)](_0x12ede3['efQEA'](_0xbe7975,0x100));}return _0x1bf3d0;}function writeUnknownSizeVint(_0x1a937d){const _0x268f5e=_0x314f,_0x4cb454={'SlfWl':function(_0x23ea00,_0x34097a){return _0x23ea00>>_0x34097a;},'YtUer':function(_0x4c0c41,_0x3da99c){return _0x4c0c41-_0x3da99c;}},_0x47a65f=Buffer[_0x268f5e(0x14a)](_0x1a937d,0xff);return _0x47a65f[0x0]=_0x4cb454[_0x268f5e(0x144)](0xff,_0x4cb454[_0x268f5e(0x159)](_0x1a937d,0x1)),_0x47a65f;}function uintSize(_0x267d3c){const _0x57e4df=_0x314f,_0x1485e1={'JBuDd':function(_0x5bdf24,_0x17e3ec){return _0x5bdf24===_0x17e3ec;},'mHmgm':function(_0x12210d,_0x15d955){return _0x12210d/_0x15d955;}};if(_0x1485e1[_0x57e4df(0x168)](_0x267d3c,0x0))return 0x1;let _0x1b8c6b=0x0,_0x4c6235=_0x267d3c;while(_0x4c6235>0x0){_0x1b8c6b++,_0x4c6235=Math[_0x57e4df(0x13f)](_0x1485e1['mHmgm'](_0x4c6235,0x100));}return _0x1b8c6b;}function findTimestampScale(_0x5e806e,_0x47bfc5){const _0x4c07b2=_0x314f,_0x373679={'ULEQy':function(_0x4459fd,_0x19bbfd){return _0x4459fd+_0x19bbfd;},'zzAxN':function(_0x171855,_0x5d4c66){return _0x171855<_0x5d4c66;},'cTtIp':function(_0x211fe2,_0x3e4e87){return _0x211fe2+_0x3e4e87;},'jRnXB':function(_0x4376a1,_0x3adb38){return _0x4376a1+_0x3adb38;},'IVpMc':function(_0x1c386c,_0x32242e){return _0x1c386c<_0x32242e;},'LjPJa':function(_0x4946fe,_0x2bb0c3){return _0x4946fe+_0x2bb0c3;}};let _0x118c54=_0x47bfc5;const _0x421f02=Math['min'](_0x5e806e['length'],_0x373679[_0x4c07b2(0x13d)](_0x47bfc5,0x2710));while(_0x373679[_0x4c07b2(0x140)](_0x118c54,_0x421f02)){const [_0x19c8b1,_0x3790a9]=readId(_0x5e806e,_0x118c54),[_0x2531af,_0x2644d6]=readVint(_0x5e806e,_0x118c54+_0x3790a9);if(_0x19c8b1===ID_INFO){let _0x42cf2d=_0x373679['cTtIp'](_0x373679['jRnXB'](_0x118c54,_0x3790a9),_0x2644d6);const _0x233343=_0x42cf2d+_0x2531af;while(_0x373679['IVpMc'](_0x42cf2d,_0x233343)){const [_0x5edd05,_0x42d032]=readId(_0x5e806e,_0x42cf2d),[_0x95431a,_0xc09006]=readVint(_0x5e806e,_0x42cf2d+_0x42d032);if(_0x5edd05===ID_TIMESTAMP_SCALE)return readUint(_0x5e806e,_0x373679[_0x4c07b2(0x131)](_0x42cf2d+_0x42d032,_0xc09006),_0x95431a);_0x42cf2d+=_0x373679[_0x4c07b2(0x12f)](_0x42d032+_0xc09006,_0x95431a);}break;}if(_0x19c8b1===ID_CLUSTER)break;if(isUnknownSize(_0x2531af,_0x2644d6))break;_0x118c54+=_0x373679['LjPJa'](_0x373679[_0x4c07b2(0x13d)](_0x3790a9,_0x2644d6),_0x2531af);}return 0xf4240;}function findFirstClusterOffset(_0x5ba4c4,_0x15e173){const _0x45cace=_0x314f,_0x121a7e={'rNRss':function(_0x3cd35d,_0x412b79,_0x2c8592){return _0x3cd35d(_0x412b79,_0x2c8592);},'PDcYU':function(_0x4d8279,_0x100e7c){return _0x4d8279===_0x100e7c;},'MngOw':function(_0x3849e8,_0x11af26){return _0x3849e8+_0x11af26;},'YsfdP':function(_0x464aac,_0x332cd0){return _0x464aac+_0x332cd0;}};let _0x1c5a8c=_0x15e173;while(_0x1c5a8c<_0x5ba4c4['length']){const [_0x3ca7ff,_0x3b66a5]=_0x121a7e[_0x45cace(0x134)](readId,_0x5ba4c4,_0x1c5a8c);if(_0x121a7e['PDcYU'](_0x3ca7ff,ID_CLUSTER))return _0x1c5a8c;const [_0x58db5b,_0xe3fc]=_0x121a7e[_0x45cace(0x134)](readVint,_0x5ba4c4,_0x121a7e['MngOw'](_0x1c5a8c,_0x3b66a5));if(isUnknownSize(_0x58db5b,_0xe3fc))return _0x1c5a8c;_0x1c5a8c+=_0x121a7e['YsfdP'](_0x121a7e[_0x45cace(0x15c)](_0x3b66a5,_0xe3fc),_0x58db5b);}return _0x5ba4c4[_0x45cace(0x156)];}function findClusterEnd(_0x523590,_0xcde894,_0x1a0a8b,_0x541434){const _0x12489f=_0x314f,_0x36ebca={'waNng':function(_0x377bf9,_0x2628b1){return _0x377bf9-_0x2628b1;},'Nsdsr':function(_0x277c49,_0x3f0164,_0x23abb0){return _0x277c49(_0x3f0164,_0x23abb0);},'VGkOa':function(_0xed42ef,_0xb452b7){return _0xed42ef+_0xb452b7;},'eyLPE':function(_0x503d9f,_0x418ad5){return _0x503d9f+_0x418ad5;}};if(!isUnknownSize(_0x1a0a8b,_0x541434))return _0xcde894+_0x1a0a8b;const _0x62b4da=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4f801d=_0xcde894;while(_0x4f801d<_0x36ebca['waNng'](_0x523590[_0x12489f(0x156)],0x4)){const [_0x6fe025,_0x4c479f]=readId(_0x523590,_0x4f801d);if(_0x62b4da['has'](_0x6fe025))return _0x4f801d;const [_0xc77362,_0xf040b3]=_0x36ebca['Nsdsr'](readVint,_0x523590,_0x36ebca[_0x12489f(0x152)](_0x4f801d,_0x4c479f));if(isUnknownSize(_0xc77362,_0xf040b3))return _0x523590['length'];_0x4f801d+=_0x36ebca['eyLPE'](_0x4c479f+_0xf040b3,_0xc77362);}return _0x523590[_0x12489f(0x156)];}function _0x1154(){const _0x14f0f6=['SlfWl','zqzIu','DGYnA','23191lAQXAf','push','xDXBl','alloc','hKOEg','LBNcg','tkzoi','WkvTv','pow','argv','BlARl','VGkOa','937451pGMFOV','21650728AcyGvn','3332004hznXff','length','indexOf','nIhNf','YtUer','kNWEz','iMIGw','YsfdP','yxLfe','219beefEN','yjlPg','sHFKQ','Xjpif','mFfvn','ZYqah','stitchWebmFiles.ts','4383745rTwJNU','728CthmFB','exit','JBuDd','17704OmbIaU','\x20files\x20->\x20','xFXZF','HVHcy','PHGDD','cQnez','cXSnG','4nlGhmV','Stitched\x20','idBgq','log','endsWith','slice','hRsxt','bwUda','stitchWebmFiles.js','MhKmn','shcEA','ScllR','LjPJa','clusters','jRnXB','3393ydNfba','copy','rNRss','raXiD','concat','min','rhNAB','HasJi','zSoVn','maxTicks','jCmor','ULEQy','from','floor','zzAxN','readInt16BE','Wqtfi','5090JvYtNI'];_0x1154=function(){return _0x14f0f6;};return _0x1154();}function extractClusters(_0x5163d5,_0x72e4d5){const _0x199857=_0x314f,_0x6a765a={'jLTdN':function(_0x358bfc,_0x41c83d){return _0x358bfc+_0x41c83d;},'iMIGw':function(_0x3b19da,_0x8776fd){return _0x3b19da+_0x8776fd;},'AfQwj':function(_0x57a8d6,_0x2ddfeb,_0x2e4001,_0x57f96c,_0x3bc16f){return _0x57a8d6(_0x2ddfeb,_0x2e4001,_0x57f96c,_0x3bc16f);},'LYhkA':function(_0x2a605e,_0x256b57){return _0x2a605e<_0x256b57;},'rhNAB':function(_0x5141cc,_0x47f5d6,_0x532d2c){return _0x5141cc(_0x47f5d6,_0x532d2c);},'bwUda':function(_0x31a829,_0x4cb587,_0x28deec){return _0x31a829(_0x4cb587,_0x28deec);},'fCmrd':function(_0x13302a,_0x156f46){return _0x13302a+_0x156f46;},'YGrKD':function(_0xa9389,_0x346abc,_0x33b739,_0x5c5d0c){return _0xa9389(_0x346abc,_0x33b739,_0x5c5d0c);},'jCmor':function(_0x14d08b,_0x306abe){return _0x14d08b+_0x306abe;},'AQSGC':function(_0xa360f2,_0x5b0673){return _0xa360f2+_0x5b0673;},'HVHcy':function(_0x140055,_0x141fc6){return _0x140055+_0x141fc6;},'Kqtvm':function(_0x8b708b,_0x2f6327){return _0x8b708b+_0x2f6327;},'zSoVn':function(_0x567f5e,_0x36e01f){return _0x567f5e===_0x36e01f;},'LBNcg':function(_0x5afe47,_0x2bfae1){return _0x5afe47+_0x2bfae1;},'rTKNQ':function(_0x804fdb,_0x2e4356){return _0x804fdb<_0x2e4356;},'mFfvn':function(_0x91ebcb,_0x4e37ed,_0x515150){return _0x91ebcb(_0x4e37ed,_0x515150);},'yjlPg':function(_0x48eed4,_0x3d0c7f){return _0x48eed4>=_0x3d0c7f;},'jkMQW':function(_0x212505,_0xcc056f){return _0x212505+_0xcc056f;}},_0x36227a=[],_0x4225e4=Buffer[_0x199857(0x13e)]([0x1f,0x43,0xb6,0x75]);let _0x3aeb0c=0x0;while(_0x3aeb0c<_0x5163d5['length']){const _0x4256e0=_0x5163d5[_0x199857(0x157)](_0x4225e4,_0x3aeb0c);if(_0x4256e0===-0x1)break;const [_0x57cf55,_0x1c85ab]=readId(_0x5163d5,_0x4256e0);if(_0x57cf55!==ID_CLUSTER){_0x3aeb0c=_0x4256e0+0x1;continue;}const [_0xd8f06e,_0x1fba12]=readVint(_0x5163d5,_0x6a765a['jLTdN'](_0x4256e0,_0x1c85ab)),_0x5a1fa9=_0x6a765a['jLTdN'](_0x6a765a[_0x199857(0x15b)](_0x4256e0,_0x1c85ab),_0x1fba12),_0x46a5ee=_0x6a765a['AfQwj'](findClusterEnd,_0x5163d5,_0x5a1fa9,_0xd8f06e,_0x1fba12);let _0x1a12f1=_0x5a1fa9,_0x3eeecd=0x0,_0x2deb15=0x2,_0x4818cf=![],_0x1ff553=Buffer[_0x199857(0x14a)](0x0),_0x4c2be5=Buffer['alloc'](0x0);while(_0x6a765a['LYhkA'](_0x1a12f1,_0x46a5ee)){const [_0x27c04a,_0x5b6d76]=_0x6a765a[_0x199857(0x138)](readId,_0x5163d5,_0x1a12f1),[_0x5a0eaf,_0x403d10]=_0x6a765a[_0x199857(0x177)](readVint,_0x5163d5,_0x6a765a['fCmrd'](_0x1a12f1,_0x5b6d76));if(_0x27c04a===ID_TIMESTAMP){_0x3eeecd=_0x6a765a['YGrKD'](readUint,_0x5163d5,_0x6a765a[_0x199857(0x13c)](_0x6a765a['AQSGC'](_0x1a12f1,_0x5b6d76),_0x403d10),_0x5a0eaf),_0x2deb15=_0x5a0eaf,_0x4818cf=!![],_0x1ff553=_0x5163d5[_0x199857(0x175)](_0x5a1fa9,_0x1a12f1);const _0x48c6a0=_0x6a765a[_0x199857(0x16c)](_0x6a765a['Kqtvm'](_0x1a12f1+_0x5b6d76,_0x403d10),_0x5a0eaf);_0x4c2be5=_0x5163d5['slice'](_0x48c6a0,_0x46a5ee);break;}if(_0x6a765a[_0x199857(0x13a)](_0x27c04a,ID_CLUSTER))break;if(_0x6a765a['bwUda'](isUnknownSize,_0x5a0eaf,_0x403d10))break;_0x1a12f1+=_0x6a765a[_0x199857(0x14c)](_0x5b6d76+_0x403d10,_0x5a0eaf);}!_0x4818cf&&(_0x4c2be5=_0x5163d5[_0x199857(0x175)](_0x5a1fa9,_0x46a5ee));let _0x1a6874=_0x3eeecd;_0x1a12f1=_0x5a1fa9;while(_0x6a765a['rTKNQ'](_0x1a12f1,_0x46a5ee)){const [_0xed9e33,_0x411f44]=_0x6a765a[_0x199857(0x162)](readId,_0x5163d5,_0x1a12f1),[_0x37ff9c,_0x369263]=readVint(_0x5163d5,_0x6a765a['iMIGw'](_0x1a12f1,_0x411f44));if(_0x6a765a[_0x199857(0x13a)](_0xed9e33,ID_SIMPLE_BLOCK)&&_0x6a765a[_0x199857(0x15f)](_0x37ff9c,0x4)){const _0x501408=_0x6a765a['jkMQW'](_0x1a12f1+_0x411f44,_0x369263),[,_0x510877]=readVint(_0x5163d5,_0x501408),_0x4d7fcc=_0x5163d5[_0x199857(0x141)](_0x501408+_0x510877),_0x35bf33=_0x3eeecd+_0x4d7fcc;if(_0x35bf33>_0x1a6874)_0x1a6874=_0x35bf33;}if(_0x6a765a[_0x199857(0x13a)](_0xed9e33,ID_CLUSTER))break;if(isUnknownSize(_0x37ff9c,_0x369263))break;_0x1a12f1+=_0x411f44+_0x369263+_0x37ff9c;}_0x36227a[_0x199857(0x148)]({'timestamp':_0x3eeecd,'maxTicks':_0x1a6874,'bodyBeforeTimestamp':_0x1ff553,'bodyAfterTimestamp':_0x4c2be5,'timestampElementSize':_0x2deb15}),_0x3aeb0c=_0x46a5ee;}return _0x36227a;}function parseWebm(_0x3e19b2){const _0x44c4d1=_0x314f,_0xf823e9={'Wqtfi':function(_0x5f3602,_0xd1638f,_0x4bb90c){return _0x5f3602(_0xd1638f,_0x4bb90c);},'ZYqah':function(_0x5e116b,_0x5936e3){return _0x5e116b+_0x5936e3;},'PHGDD':function(_0x3e690b,_0x47519a){return _0x3e690b+_0x47519a;},'WkvTv':function(_0x3a8dae,_0x2b0112){return _0x3a8dae+_0x2b0112;},'shcEA':function(_0x3fb15b,_0x529e6a,_0x578401){return _0x3fb15b(_0x529e6a,_0x578401);}};let _0x172988=0x0;const [,_0x2c4384]=_0xf823e9[_0x44c4d1(0x142)](readId,_0x3e19b2,_0x172988),[_0x29e347,_0x4cf89b]=readVint(_0x3e19b2,_0xf823e9[_0x44c4d1(0x163)](_0x172988,_0x2c4384));_0x172988+=_0xf823e9[_0x44c4d1(0x16d)](_0xf823e9[_0x44c4d1(0x14e)](_0x2c4384,_0x4cf89b),_0x29e347);const [_0x3477fa,_0x4d34c1]=readId(_0x3e19b2,_0x172988);if(_0x3477fa!==ID_SEGMENT)return null;const [,_0x77acec]=readVint(_0x3e19b2,_0x172988+_0x4d34c1),_0x310512=_0x172988+_0x4d34c1+_0x77acec,_0x44d0c9=_0xf823e9[_0x44c4d1(0x12d)](findTimestampScale,_0x3e19b2,_0x310512),_0x552235=findFirstClusterOffset(_0x3e19b2,_0x310512),_0x20d2f1=_0x3e19b2['slice'](0x0,_0x552235),_0x227e9b=extractClusters(_0x3e19b2,_0x44d0c9);let _0x58e2bd=0x0;for(const _0x15de6e of _0x227e9b){if(_0x15de6e[_0x44c4d1(0x13b)]>_0x58e2bd)_0x58e2bd=_0x15de6e[_0x44c4d1(0x13b)];}return{'header':_0x20d2f1,'clusters':_0x227e9b,'timestampScale':_0x44d0c9,'maxTimestampTicks':_0x58e2bd};}function buildCluster(_0x20b751,_0x27003f,_0x342872){const _0x214e84=_0x314f,_0x23fb58={'idBgq':function(_0x39effc,_0x1f2520){return _0x39effc(_0x1f2520);}},_0x38d98c=Buffer[_0x214e84(0x13e)]([0x1f,0x43,0xb6,0x75]),_0x507168=Math['max'](0x4,uintSize(_0x20b751)),_0x5ba248=Buffer['concat']([Buffer[_0x214e84(0x13e)]([ID_TIMESTAMP]),writeVint(_0x507168),writeUint(_0x20b751,_0x507168)]),_0x4a99f5=Buffer[_0x214e84(0x136)]([_0x27003f,_0x5ba248,_0x342872]),_0x1b3fa0=_0x23fb58[_0x214e84(0x172)](writeVint,_0x4a99f5[_0x214e84(0x156)]);return Buffer['concat']([_0x38d98c,_0x1b3fa0,_0x4a99f5]);}const ID_DURATION=0x4489;function _0x314f(_0x1644ad,_0x45bce6){_0x1644ad=_0x1644ad-0x12b;const _0x1154fe=_0x1154();let _0x314f0a=_0x1154fe[_0x1644ad];return _0x314f0a;}function rebuildHeaderWithoutDuration(_0x1fcd66){const _0x2313e0=_0x314f,_0x370b39={'XIFgC':function(_0x187d41,_0x4b9ed6,_0x1ae14d){return _0x187d41(_0x4b9ed6,_0x1ae14d);},'PmYsc':function(_0x1bd991,_0x214375){return _0x1bd991+_0x214375;},'nIhNf':function(_0x5b7111,_0x1de973){return _0x5b7111+_0x1de973;},'QvXgj':function(_0x2906e8,_0x4c57e6,_0x361986){return _0x2906e8(_0x4c57e6,_0x361986);},'vVRta':function(_0x2939ab,_0x337459){return _0x2939ab+_0x337459;},'yxLfe':function(_0x3cfbe2,_0x39afc0){return _0x3cfbe2+_0x39afc0;},'knwtS':function(_0x261937,_0x4aae96,_0x18b950){return _0x261937(_0x4aae96,_0x18b950);},'nRqNH':function(_0x5398dd,_0x48ac86){return _0x5398dd+_0x48ac86;},'MhKmn':function(_0x5a50a4,_0x594a85){return _0x5a50a4+_0x594a85;},'IFsdm':function(_0x17e6ff,_0x8d4526){return _0x17e6ff!==_0x8d4526;},'xFXZF':function(_0x432c26,_0x32896e){return _0x432c26+_0x32896e;}},_0x5f3152=Buffer[_0x2313e0(0x13e)](_0x1fcd66);let _0x8142a=0x0;const [,_0x1bf5c7]=readId(_0x5f3152,_0x8142a),[_0x5e6fa0,_0x55cfa5]=_0x370b39['XIFgC'](readVint,_0x5f3152,_0x8142a+_0x1bf5c7),_0x944f6c=_0x370b39['PmYsc'](_0x370b39[_0x2313e0(0x158)](_0x8142a,_0x1bf5c7),_0x55cfa5)+_0x5e6fa0,[,_0x3754cd]=_0x370b39['QvXgj'](readId,_0x5f3152,_0x944f6c),[,_0x2d72ba]=readVint(_0x5f3152,_0x370b39['vVRta'](_0x944f6c,_0x3754cd)),_0x6511f7=_0x944f6c+_0x3754cd+_0x2d72ba,_0x17d286=writeUnknownSizeVint(_0x2d72ba);_0x17d286[_0x2313e0(0x133)](_0x5f3152,_0x370b39['nIhNf'](_0x944f6c,_0x3754cd));let _0x4e3e72=_0x6511f7;const _0x1e31a9=Math[_0x2313e0(0x137)](_0x5f3152['length'],_0x6511f7+0x2710);while(_0x4e3e72<_0x1e31a9){const [_0x24927c,_0xe86fdc]=readId(_0x5f3152,_0x4e3e72),[_0x2d9957,_0x2e1e19]=readVint(_0x5f3152,_0x4e3e72+_0xe86fdc);if(_0x24927c===ID_CLUSTER)break;if(_0x370b39['XIFgC'](isUnknownSize,_0x2d9957,_0x2e1e19))break;if(_0x24927c===ID_INFO){const _0x415731=_0x370b39['vVRta'](_0x4e3e72+_0xe86fdc,_0x2e1e19),_0x10b44d=_0x370b39[_0x2313e0(0x15d)](_0x415731,_0x2d9957),_0x1decfa=[];let _0x1d3b7a=_0x415731;while(_0x1d3b7a<_0x10b44d){const [_0x18fba1,_0x690170]=_0x370b39['knwtS'](readId,_0x5f3152,_0x1d3b7a),[_0x2e8f86,_0x113670]=readVint(_0x5f3152,_0x1d3b7a+_0x690170),_0x378125=_0x370b39['nRqNH'](_0x370b39[_0x2313e0(0x12c)](_0x690170,_0x113670),_0x2e8f86);_0x370b39['IFsdm'](_0x18fba1,ID_DURATION)&&_0x1decfa[_0x2313e0(0x148)](_0x5f3152['slice'](_0x1d3b7a,_0x370b39[_0x2313e0(0x16b)](_0x1d3b7a,_0x378125))),_0x1d3b7a+=_0x378125;}const _0x174cc0=Buffer[_0x2313e0(0x136)](_0x1decfa),_0x1aa246=Buffer[_0x2313e0(0x136)]([_0x5f3152['slice'](_0x4e3e72,_0x4e3e72+_0xe86fdc),writeVint(_0x174cc0['length'],_0x2e1e19)]);return Buffer['concat']([_0x5f3152[_0x2313e0(0x175)](0x0,_0x4e3e72),_0x1aa246,_0x174cc0,_0x5f3152['slice'](_0x10b44d)]);}_0x4e3e72+=_0xe86fdc+_0x2e1e19+_0x2d9957;}return _0x5f3152;}export function stitchWebmFiles(_0x5c267e,_0x5e57c3){const _0xf44146=_0x314f,_0xe2c8aa={'pTkRV':function(_0x3560dc,_0x4062ce){return _0x3560dc(_0x4062ce);},'fcpPi':function(_0x2149f6,_0x29caac){return _0x2149f6===_0x29caac;},'lKzek':function(_0x3b28e3,_0x340f76){return _0x3b28e3(_0x340f76);},'BlARl':function(_0x41d2af,_0x40dc57){return _0x41d2af<_0x40dc57;},'PPOwX':function(_0x131f90,_0x57d658,_0x3797b4,_0x5ddcd7){return _0x131f90(_0x57d658,_0x3797b4,_0x5ddcd7);}};if(_0x5c267e['length']<=0x1)return![];const _0x204c54=[];for(const _0x50b95b of _0x5c267e){const _0x24e326=_0xe2c8aa['pTkRV'](readFileSync,_0x50b95b),_0x43e442=parseWebm(_0x24e326);if(!_0x43e442||_0xe2c8aa['fcpPi'](_0x43e442[_0xf44146(0x130)]['length'],0x0))return![];_0x204c54['push'](_0x43e442);}const _0x52a0a0=_0x204c54[0x0],_0x5f502d=_0xe2c8aa['lKzek'](rebuildHeaderWithoutDuration,_0x52a0a0['header']),_0x1083fa=[_0x5f502d];let _0x2f374a=0x0;for(let _0x441fe5=0x0;_0xe2c8aa[_0xf44146(0x151)](_0x441fe5,_0x204c54[_0xf44146(0x156)]);_0x441fe5++){const _0x278f44=_0x204c54[_0x441fe5];for(const _0x3476f1 of _0x278f44[_0xf44146(0x130)]){const _0x2325b7=_0x3476f1['timestamp']+_0x2f374a;_0x1083fa[_0xf44146(0x148)](_0xe2c8aa['PPOwX'](buildCluster,_0x2325b7,_0x3476f1['bodyBeforeTimestamp'],_0x3476f1['bodyAfterTimestamp']));}const _0x3135f3=0x1e;_0x2f374a+=_0x278f44['maxTimestampTicks']+_0x3135f3;}return writeFileSync(_0x5e57c3,Buffer['concat'](_0x1083fa)),!![];}if(process[_0x3bbe45(0x150)][0x1]?.[_0x3bbe45(0x174)](_0x3bbe45(0x164))||process[_0x3bbe45(0x150)][0x1]?.['endsWith'](_0x3bbe45(0x12b))){const args=process[_0x3bbe45(0x150)][_0x3bbe45(0x175)](0x2);args[_0x3bbe45(0x156)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x3bbe45(0x167)](0x1));const output=args[args[_0x3bbe45(0x156)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3bbe45(0x173)](_0x3bbe45(0x171)+inputs['length']+_0x3bbe45(0x16a)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36d573=_0x15fb;(function(_0x42cdb6,_0x225dbb){const _0x9e2598=_0x15fb,_0x21baed=_0x42cdb6();while(!![]){try{const _0x3663f0=parseInt(_0x9e2598(0x141))/0x1*(parseInt(_0x9e2598(0x16e))/0x2)+parseInt(_0x9e2598(0x144))/0x3+-parseInt(_0x9e2598(0x138))/0x4*(parseInt(_0x9e2598(0x12d))/0x5)+parseInt(_0x9e2598(0x177))/0x6*(parseInt(_0x9e2598(0x137))/0x7)+-parseInt(_0x9e2598(0x161))/0x8*(-parseInt(_0x9e2598(0x168))/0x9)+-parseInt(_0x9e2598(0x150))/0xa+-parseInt(_0x9e2598(0x134))/0xb;if(_0x3663f0===_0x225dbb)break;else _0x21baed['push'](_0x21baed['shift']());}catch(_0x3ecad4){_0x21baed['push'](_0x21baed['shift']());}}}(_0x2942,0x3d07b));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x1806ff=_0x15fb,_0x3236cf={'DhNVj':function(_0x19d231,_0x490af8,_0x5edad4){return _0x19d231(_0x490af8,_0x5edad4);},'tKGDp':'.session','KMIFD':function(_0x47943b,_0x57fc3e){return _0x47943b(_0x57fc3e);},'LpIuR':_0x1806ff(0x170),'JcYUv':function(_0x3144c9,_0x2159b9,_0x545a16){return _0x3144c9(_0x2159b9,_0x545a16);},'kImwV':function(_0x38ce95){return _0x38ce95();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x1b42a3=_0x3236cf['DhNVj'](join,homedir(),'.ranger'),_0x12a992=join(_0x1b42a3,_0x3236cf[_0x1806ff(0x16f)]);if(_0x3236cf['KMIFD'](existsSync,_0x12a992)){cachedDeviceId=_0x3236cf['DhNVj'](readFileSync,_0x12a992,_0x3236cf[_0x1806ff(0x13e)])['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),mkdirSync(_0x1b42a3,{'recursive':!![]}),_0x3236cf['JcYUv'](writeFileSync,_0x12a992,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x3236cf['kImwV'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x36d573(0x16a)]=[];[_0x36d573(0x155)];['command'];[_0x36d573(0x14f)];[_0x36d573(0x133)]=0x0;[_0x36d573(0x147)]=new Map();[_0x36d573(0x135)]=null;[_0x36d573(0x151)];[_0x36d573(0x172)];['nodeVersion'];['platform'];['isTty'];[_0x36d573(0x15a)];['featureId'];['checklistItemId'];[_0x36d573(0x169)];[_0x36d573(0x16d)];constructor(_0x475888){const _0x39c900=_0x36d573,_0x2db1bd={'djYbO':'1|4|8|3|5|2|7|0|6','VEtxE':function(_0x4ee268){return _0x4ee268();}},_0x399da4=_0x2db1bd['djYbO']['split']('|');let _0x47a5b1=0x0;while(!![]){switch(_0x399da4[_0x47a5b1++]){case'0':this[_0x39c900(0x15b)]=process['stdout'][_0x39c900(0x12b)]??![];continue;case'1':this['commandId']=_0x2db1bd['VEtxE'](randomUUID);continue;case'2':this['nodeVersion']=process[_0x39c900(0x149)];continue;case'3':this[_0x39c900(0x151)]=getDeviceId();continue;case'4':this['command']=_0x475888;continue;case'5':this['cliVersion']=getCurrentVersion();continue;case'6':this['isCI']=!!(process['env']['CI']||process['env']['GITHUB_ACTIONS']);continue;case'7':this['platform']=process[_0x39c900(0x142)];continue;case'8':this[_0x39c900(0x14f)]=Date['now']();continue;}break;}}['setContext'](_0xd7849e){const _0x394cc8=_0x36d573;if(_0xd7849e['featureId'])this[_0x394cc8(0x145)]=_0xd7849e[_0x394cc8(0x145)];if(_0xd7849e[_0x394cc8(0x154)])this[_0x394cc8(0x154)]=_0xd7849e['checklistItemId'];if(_0xd7849e['browserSessionId'])this['browserSessionId']=_0xd7849e['browserSessionId'];if(_0xd7849e[_0x394cc8(0x16d)])this[_0x394cc8(0x16d)]=_0xd7849e[_0x394cc8(0x16d)];}async['trackCommandStart'](_0x5e62f1){const _0x10f4a6=_0x36d573,_0x35debb={'WXwEq':'command_start'},_0x119869=this[_0x10f4a6(0x12e)]({'eventType':_0x35debb['WXwEq'],'metadata':_0x5e62f1});await this[_0x10f4a6(0x139)](_0x119869);}async['trackCommandEnd'](_0x145762,_0x5bd260){const _0x235ba0=_0x36d573,_0x50004b={'NNONK':'command_end'},_0x4fe64d=this[_0x235ba0(0x12e)]({'eventType':_0x50004b[_0x235ba0(0x176)],'outcome':_0x145762,'durationMs':Date['now']()-this[_0x235ba0(0x14f)],'metadata':_0x5bd260});await this['sendImmediate'](_0x4fe64d),await this[_0x235ba0(0x167)]();}async['trackCommandError'](_0x9b6338,_0x4e50a2){const _0x3c52ec=_0x36d573,_0x4990ff={'ahONc':function(_0x123f4b,_0x522703,_0xae4b23){return _0x123f4b(_0x522703,_0xae4b23);},'CMOqi':function(_0x452a83,_0x245a5c){return _0x452a83 instanceof _0x245a5c;},'YRsgI':function(_0x30a29e,_0x420172){return _0x30a29e(_0x420172);}},_0x3b7112=this['buildEvent']({'eventType':_0x3c52ec(0x16c),'errorMessage':_0x4990ff[_0x3c52ec(0x156)](truncate,_0x4990ff['CMOqi'](_0x9b6338,Error)?_0x9b6338[_0x3c52ec(0x178)]:_0x4990ff[_0x3c52ec(0x15e)](String,_0x9b6338),0x1f4),'errorType':_0x4990ff['CMOqi'](_0x9b6338,Error)?_0x9b6338[_0x3c52ec(0x163)][_0x3c52ec(0x12f)]:_0x3c52ec(0x153),'durationMs':Date['now']()-this[_0x3c52ec(0x14f)],'metadata':_0x4e50a2});await this[_0x3c52ec(0x139)](_0x3b7112),await this['flush']();}[_0x36d573(0x12a)](_0x16fdb0,_0x3497fe){const _0x39957a=_0x36d573,_0x415831={'yKvOm':_0x39957a(0x14e)};this['phaseCounter']++,this['phaseStartTimes'][_0x39957a(0x16b)](_0x16fdb0,Date[_0x39957a(0x162)]());const _0x4a000c=this['buildEvent']({'eventType':_0x415831[_0x39957a(0x159)],'phase':_0x16fdb0,'phaseIndex':this['phaseCounter'],'metadata':_0x3497fe});this[_0x39957a(0x16a)][_0x39957a(0x174)](_0x4a000c);}[_0x36d573(0x158)](_0x5437ad,_0x3118e7){const _0x5a4581=_0x36d573,_0x310431={'UnPNN':function(_0x1ddc2e,_0x29bbc0){return _0x1ddc2e-_0x29bbc0;},'WHinZ':function(_0xd7537b,_0x134af7){return _0xd7537b>=_0x134af7;}},_0x398a86=this[_0x5a4581(0x147)]['get'](_0x5437ad),_0x4ee2ba=_0x398a86?_0x310431['UnPNN'](Date[_0x5a4581(0x162)](),_0x398a86):undefined;this['phaseStartTimes']['delete'](_0x5437ad);const _0x4d15e0=this[_0x5a4581(0x12e)]({'eventType':'phase_end','phase':_0x5437ad,'durationMs':_0x4ee2ba,'metadata':_0x3118e7});this['buffer']['push'](_0x4d15e0),_0x310431[_0x5a4581(0x13f)](this[_0x5a4581(0x16a)][_0x5a4581(0x157)],0xa)&&this[_0x5a4581(0x173)]();}async['trackPhaseError'](_0x5abf0c,_0xe12e05,_0x47d610){const _0x5b3f29=_0x36d573,_0x4417dd={'yFrtY':function(_0x2c3779,_0x2fbcb9){return _0x2c3779-_0x2fbcb9;},'sNtDT':_0x5b3f29(0x152),'KvCrt':function(_0x5f4d93,_0x282f3f,_0x3fec4a){return _0x5f4d93(_0x282f3f,_0x3fec4a);},'tqSPS':function(_0x314b6f,_0x55a80a){return _0x314b6f(_0x55a80a);},'zjoKV':function(_0xb34e10,_0x17fa2e){return _0xb34e10 instanceof _0x17fa2e;}},_0x533ed4=this['phaseStartTimes']['get'](_0x5abf0c),_0x5459a0=_0x533ed4?_0x4417dd['yFrtY'](Date['now'](),_0x533ed4):undefined;this['phaseStartTimes']['delete'](_0x5abf0c);const _0x1a87c0=this['buildEvent']({'eventType':_0x4417dd[_0x5b3f29(0x14c)],'phase':_0x5abf0c,'durationMs':_0x5459a0,'errorMessage':_0x4417dd[_0x5b3f29(0x14d)](truncate,_0xe12e05 instanceof Error?_0xe12e05['message']:_0x4417dd['tqSPS'](String,_0xe12e05),0x1f4),'errorType':_0x4417dd[_0x5b3f29(0x15d)](_0xe12e05,Error)?_0xe12e05['constructor'][_0x5b3f29(0x12f)]:_0x5b3f29(0x153),'metadata':_0x47d610});await this['sendImmediate'](_0x1a87c0);}async['flush'](){const _0x7756e3=_0x36d573,_0x5d12f5={'DXgwG':function(_0x25e416,_0x4c3270){return _0x25e416===_0x4c3270;}};if(_0x5d12f5['DXgwG'](this['buffer']['length'],0x0))return;const _0x394e5c=this[_0x7756e3(0x16a)]['splice'](0x0);try{await this[_0x7756e3(0x146)](_0x394e5c);}catch{}}[_0x36d573(0x12e)](_0x369be6){const _0x4fbf6b=_0x36d573;return{'eventType':_0x369be6[_0x4fbf6b(0x175)],'command':this[_0x4fbf6b(0x13b)],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x369be6['durationMs'],'phase':_0x369be6[_0x4fbf6b(0x14b)],'phaseIndex':_0x369be6[_0x4fbf6b(0x130)],'outcome':_0x369be6[_0x4fbf6b(0x132)],'errorMessage':_0x369be6[_0x4fbf6b(0x166)],'errorType':_0x369be6[_0x4fbf6b(0x148)],'featureId':this[_0x4fbf6b(0x145)],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0x4fbf6b(0x169)],'transport':this['transport'],'evaluation':_0x369be6[_0x4fbf6b(0x143)],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x4fbf6b(0x131)],'platform':this[_0x4fbf6b(0x142)],'cwd':process[_0x4fbf6b(0x160)](),'isTty':this[_0x4fbf6b(0x15b)],'isCI':this['isCI'],'metadata':_0x369be6[_0x4fbf6b(0x15f)]};}async[_0x36d573(0x139)](_0x42ef27){const _0x1eca14=_0x36d573;try{await this[_0x1eca14(0x146)]([_0x42ef27]);}catch{}}[_0x36d573(0x173)](){const _0x511a02=_0x36d573;if(this['flushing'])return;this['flushing']=this['flush']()[_0x511a02(0x13a)](()=>{this['flushing']=null;});}async[_0x36d573(0x146)](_0x4718bd){const _0x4db221=_0x36d573,_0x287e40={'fkLHw':function(_0x3ed413){return _0x3ed413();},'ipOxx':_0x4db221(0x136),'HYJKe':'POST'},_0x54f132=await getToken()['catch'](()=>null),_0x3f046f=_0x287e40[_0x4db221(0x164)](getApiBaseUrl),_0x232cd6={'Content-Type':_0x287e40['ipOxx']};_0x54f132&&(_0x232cd6['Authorization']='Bearer\x20'+_0x54f132);const _0x569698={'events':_0x4718bd};process['env']['DEBUG']&&console[_0x4db221(0x15c)]('[telemetry]\x20Sending\x20'+_0x4718bd['length']+_0x4db221(0x13c)+_0x3f046f+'/api/v1/mcp/cli-telemetry');const _0x31c629=new AbortController(),_0x45a2c7=setTimeout(()=>_0x31c629['abort'](),0x1388);try{await fetch(_0x3f046f+_0x4db221(0x171),{'method':_0x287e40['HYJKe'],'headers':_0x232cd6,'body':JSON[_0x4db221(0x165)](_0x569698),'signal':_0x31c629[_0x4db221(0x12c)]});}finally{clearTimeout(_0x45a2c7);}}}let currentCollector=null;export function createTelemetryCollector(_0x4aa404){return currentCollector=new TelemetryCollector(_0x4aa404),currentCollector;}export function getCurrentCollector(){return currentCollector;}function _0x15fb(_0x116486,_0x3e9f38){_0x116486=_0x116486-0x12a;const _0x2942ea=_0x2942();let _0x15fbd1=_0x2942ea[_0x116486];return _0x15fbd1;}export async function withTelemetry(_0x26fb8e,_0x664929,_0x55ffdc){const _0x183cec=_0x36d573,_0x583d50={'bEqbo':function(_0x36641e,_0x2a822e){return _0x36641e(_0x2a822e);},'SIVWw':'success'},_0xd1f639=_0x583d50[_0x183cec(0x13d)](createTelemetryCollector,_0x26fb8e);await _0xd1f639['trackCommandStart'](_0x55ffdc);try{const _0x5d700b=await _0x583d50['bEqbo'](_0x664929,_0xd1f639);return await _0xd1f639['trackCommandEnd'](_0x583d50['SIVWw']),_0x5d700b;}catch(_0x4fabc5){await _0xd1f639['trackCommandError'](_0x4fabc5);throw _0x4fabc5;}finally{await _0xd1f639['flush']();}}function truncate(_0x489912,_0x3daaf0){const _0x5d7299=_0x36d573;return _0x489912[_0x5d7299(0x157)]>_0x3daaf0?_0x489912[_0x5d7299(0x140)](0x0,_0x3daaf0)+_0x5d7299(0x14a):_0x489912;}function _0x2942(){const _0xd07466=['length','trackPhaseEnd','yKvOm','isCI','isTty','error','zjoKV','YRsgI','metadata','cwd','489064jzqlkZ','now','constructor','fkLHw','stringify','errorMessage','flush','18zocaEY','browserSessionId','buffer','set','command_error','transport','64wLfRMF','tKGDp','utf-8','/api/v1/mcp/cli-telemetry','cliVersion','flushAsync','push','eventType','NNONK','12ebVJXk','message','trackPhaseStart','isTTY','signal','5wOmFiO','buildEvent','name','phaseIndex','nodeVersion','outcome','phaseCounter','1087438sylAGu','flushing','application/json','1699649YwzVuc','1687852YPCGUD','sendImmediate','finally','command','\x20event(s)\x20to\x20','bEqbo','LpIuR','WHinZ','slice','3345pkKYTx','platform','evaluation','1265034TvwlDG','featureId','sendBatch','phaseStartTimes','errorType','version','...','phase','sNtDT','KvCrt','phase_start','commandStartTime','3657980ADpPoi','deviceId','phase_error','Unknown','checklistItemId','commandId','ahONc'];_0x2942=function(){return _0xd07466;};return _0x2942();}
|
|
1
|
+
const _0x12ec01=_0x3737;(function(_0x1fc4b2,_0x2f0326){const _0x1eb466=_0x3737,_0x13bc12=_0x1fc4b2();while(!![]){try{const _0x1a0bce=-parseInt(_0x1eb466(0x1ce))/0x1*(parseInt(_0x1eb466(0x1e9))/0x2)+-parseInt(_0x1eb466(0x1bd))/0x3*(parseInt(_0x1eb466(0x1f7))/0x4)+parseInt(_0x1eb466(0x1cf))/0x5*(-parseInt(_0x1eb466(0x1de))/0x6)+parseInt(_0x1eb466(0x1c0))/0x7+parseInt(_0x1eb466(0x1dc))/0x8+parseInt(_0x1eb466(0x1c1))/0x9+-parseInt(_0x1eb466(0x1d7))/0xa;if(_0x1a0bce===_0x2f0326)break;else _0x13bc12['push'](_0x13bc12['shift']());}catch(_0x3ed6e1){_0x13bc12['push'](_0x13bc12['shift']());}}}(_0x24d0,0x606c2));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x46ec2b=_0x3737,_0x1d7c7f={'atuhG':function(_0x22fa9b){return _0x22fa9b();},'bkXIH':function(_0x38bf77,_0x195dd8,_0x5fd016){return _0x38bf77(_0x195dd8,_0x5fd016);},'mVPMB':function(_0x369d50,_0x24a1f8,_0x20c752){return _0x369d50(_0x24a1f8,_0x20c752);},'lsmvK':function(_0x40c84c,_0x379158,_0x1188bc){return _0x40c84c(_0x379158,_0x1188bc);}};if(cachedDeviceId)return cachedDeviceId;try{const _0x243cfb=join(_0x1d7c7f['atuhG'](homedir),'.ranger'),_0x3ad155=join(_0x243cfb,_0x46ec2b(0x1ef));if(existsSync(_0x3ad155)){cachedDeviceId=_0x1d7c7f['bkXIH'](readFileSync,_0x3ad155,_0x46ec2b(0x1fe))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),_0x1d7c7f['mVPMB'](mkdirSync,_0x243cfb,{'recursive':!![]}),_0x1d7c7f[_0x46ec2b(0x1dd)](writeFileSync,_0x3ad155,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x1d7c7f['atuhG'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];['commandId'];['command'];[_0x12ec01(0x1d1)];[_0x12ec01(0x1eb)]=0x0;[_0x12ec01(0x1ca)]=new Map();['flushing']=null;['deviceId'];['cliVersion'];[_0x12ec01(0x1ed)];['platform'];[_0x12ec01(0x1b7)];[_0x12ec01(0x1fd)];[_0x12ec01(0x1fb)];['checklistItemId'];['browserSessionId'];[_0x12ec01(0x1bc)];constructor(_0x566850){const _0x338d00=_0x12ec01,_0x3ddf53='0|1|3|7|8|4|2|5|6'[_0x338d00(0x1f0)]('|');let _0x17d62a=0x0;while(!![]){switch(_0x3ddf53[_0x17d62a++]){case'0':this[_0x338d00(0x1bb)]=randomUUID();continue;case'1':this[_0x338d00(0x1fc)]=_0x566850;continue;case'2':this['platform']=process['platform'];continue;case'3':this['commandStartTime']=Date[_0x338d00(0x1da)]();continue;case'4':this[_0x338d00(0x1ed)]=process['version'];continue;case'5':this[_0x338d00(0x1b7)]=process[_0x338d00(0x1ea)]['isTTY']??![];continue;case'6':this['isCI']=!!(process['env']['CI']||process[_0x338d00(0x1c6)]['GITHUB_ACTIONS']);continue;case'7':this[_0x338d00(0x1ee)]=getDeviceId();continue;case'8':this[_0x338d00(0x1e4)]=getCurrentVersion();continue;}break;}}['setContext'](_0x1f3265){const _0x5a5ec7=_0x12ec01;if(_0x1f3265['featureId'])this['featureId']=_0x1f3265['featureId'];if(_0x1f3265['checklistItemId'])this['checklistItemId']=_0x1f3265[_0x5a5ec7(0x1f8)];if(_0x1f3265[_0x5a5ec7(0x1c9)])this['browserSessionId']=_0x1f3265[_0x5a5ec7(0x1c9)];if(_0x1f3265[_0x5a5ec7(0x1bc)])this[_0x5a5ec7(0x1bc)]=_0x1f3265['transport'];}async[_0x12ec01(0x1c5)](_0x415cf7){const _0x138bc3=_0x12ec01,_0x44be25={'tVbVp':_0x138bc3(0x1d0)},_0x216e7a=this[_0x138bc3(0x1fa)]({'eventType':_0x44be25[_0x138bc3(0x1d2)],'metadata':_0x415cf7});await this[_0x138bc3(0x1cc)](_0x216e7a);}async[_0x12ec01(0x1e8)](_0x39f4ce,_0x3174a3){const _0x200c0d=_0x12ec01,_0x2a7022={'EtPms':'command_end','rzyHk':function(_0x1f1ad4,_0x2eb333){return _0x1f1ad4-_0x2eb333;}},_0x2ca3af=this[_0x200c0d(0x1fa)]({'eventType':_0x2a7022['EtPms'],'outcome':_0x39f4ce,'durationMs':_0x2a7022['rzyHk'](Date[_0x200c0d(0x1da)](),this['commandStartTime']),'metadata':_0x3174a3});await this[_0x200c0d(0x1cc)](_0x2ca3af),await this['flush']();}async[_0x12ec01(0x1b8)](_0xe1b83,_0x11b8d4){const _0xbe9352=_0x12ec01,_0xa6c731={'Udxks':function(_0x1a3241,_0x297ce6){return _0x1a3241 instanceof _0x297ce6;},'CnZDv':function(_0x54056f,_0x48453d){return _0x54056f-_0x48453d;}},_0x131c78=this['buildEvent']({'eventType':_0xbe9352(0x1ba),'errorMessage':truncate(_0xa6c731[_0xbe9352(0x1d3)](_0xe1b83,Error)?_0xe1b83[_0xbe9352(0x1e3)]:String(_0xe1b83),0x1f4),'errorType':_0xa6c731['Udxks'](_0xe1b83,Error)?_0xe1b83['constructor'][_0xbe9352(0x1db)]:'Unknown','durationMs':_0xa6c731['CnZDv'](Date[_0xbe9352(0x1da)](),this[_0xbe9352(0x1d1)]),'metadata':_0x11b8d4});await this[_0xbe9352(0x1cc)](_0x131c78),await this[_0xbe9352(0x1ec)]();}[_0x12ec01(0x1bf)](_0x202e36,_0x2fb94c){const _0x49ac95=_0x12ec01,_0x5aacf3={'nEKlN':_0x49ac95(0x1c2)};this[_0x49ac95(0x1eb)]++,this['phaseStartTimes']['set'](_0x202e36,Date[_0x49ac95(0x1da)]());const _0x349585=this['buildEvent']({'eventType':_0x5aacf3[_0x49ac95(0x1c4)],'phase':_0x202e36,'phaseIndex':this['phaseCounter'],'metadata':_0x2fb94c});this['buffer']['push'](_0x349585);}['trackPhaseEnd'](_0x40bece,_0x506f72){const _0x49078d=_0x12ec01,_0x46ee13={'SVVyT':function(_0xfe02f,_0x470ac4){return _0xfe02f-_0x470ac4;},'EAEsy':function(_0x24591b,_0x1c2509){return _0x24591b>=_0x1c2509;}},_0x110463=this['phaseStartTimes'][_0x49078d(0x1f9)](_0x40bece),_0x4eafaf=_0x110463?_0x46ee13['SVVyT'](Date[_0x49078d(0x1da)](),_0x110463):undefined;this['phaseStartTimes']['delete'](_0x40bece);const _0x35bf71=this[_0x49078d(0x1fa)]({'eventType':_0x49078d(0x1d9),'phase':_0x40bece,'durationMs':_0x4eafaf,'metadata':_0x506f72});this[_0x49078d(0x1f1)]['push'](_0x35bf71),_0x46ee13[_0x49078d(0x1e7)](this['buffer'][_0x49078d(0x1d5)],0xa)&&this['flushAsync']();}async['trackPhaseError'](_0x36110c,_0x3b4f9c,_0x427148){const _0x2d4b0a=_0x12ec01,_0x28f2f1={'UhRqE':function(_0x50b12a,_0x5bec62,_0xcde1aa){return _0x50b12a(_0x5bec62,_0xcde1aa);},'Kwldd':function(_0x459b5b,_0x39c19e){return _0x459b5b instanceof _0x39c19e;}},_0x357781=this[_0x2d4b0a(0x1ca)][_0x2d4b0a(0x1f9)](_0x36110c),_0x4b0cad=_0x357781?Date[_0x2d4b0a(0x1da)]()-_0x357781:undefined;this[_0x2d4b0a(0x1ca)]['delete'](_0x36110c);const _0x362161=this['buildEvent']({'eventType':_0x2d4b0a(0x1d6),'phase':_0x36110c,'durationMs':_0x4b0cad,'errorMessage':_0x28f2f1['UhRqE'](truncate,_0x28f2f1[_0x2d4b0a(0x1e0)](_0x3b4f9c,Error)?_0x3b4f9c[_0x2d4b0a(0x1e3)]:String(_0x3b4f9c),0x1f4),'errorType':_0x28f2f1[_0x2d4b0a(0x1e0)](_0x3b4f9c,Error)?_0x3b4f9c[_0x2d4b0a(0x1cd)][_0x2d4b0a(0x1db)]:'Unknown','metadata':_0x427148});await this[_0x2d4b0a(0x1cc)](_0x362161);}async['flush'](){const _0x4d4b4c=_0x12ec01,_0x40f632={'UuGsi':function(_0x21aa49,_0x7e360d){return _0x21aa49===_0x7e360d;}};if(_0x40f632[_0x4d4b4c(0x1ff)](this['buffer']['length'],0x0))return;const _0x460bd0=this['buffer']['splice'](0x0);try{await this['sendBatch'](_0x460bd0);}catch{}}[_0x12ec01(0x1fa)](_0x407fc3){const _0x2f6bb2=_0x12ec01;return{'eventType':_0x407fc3[_0x2f6bb2(0x1e6)],'command':this['command'],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()[_0x2f6bb2(0x1f4)](),'durationMs':_0x407fc3['durationMs'],'phase':_0x407fc3[_0x2f6bb2(0x200)],'phaseIndex':_0x407fc3[_0x2f6bb2(0x1d8)],'outcome':_0x407fc3[_0x2f6bb2(0x1d4)],'errorMessage':_0x407fc3[_0x2f6bb2(0x1df)],'errorType':_0x407fc3['errorType'],'featureId':this[_0x2f6bb2(0x1fb)],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0x2f6bb2(0x1c9)],'transport':this['transport'],'evaluation':_0x407fc3['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x2f6bb2(0x1ed)],'platform':this[_0x2f6bb2(0x1cb)],'cwd':process['cwd'](),'isTty':this[_0x2f6bb2(0x1b7)],'isCI':this[_0x2f6bb2(0x1fd)],'metadata':_0x407fc3[_0x2f6bb2(0x1f3)]};}async[_0x12ec01(0x1cc)](_0x3a8179){const _0x5cb195=_0x12ec01;try{await this[_0x5cb195(0x1f5)]([_0x3a8179]);}catch{}}['flushAsync'](){const _0x542db5=_0x12ec01;if(this['flushing'])return;this['flushing']=this[_0x542db5(0x1ec)]()['finally'](()=>{const _0x144810=_0x542db5;this[_0x144810(0x1e2)]=null;});}async['sendBatch'](_0x276c24){const _0x9cd273=_0x12ec01,_0x17f204={'aHDvL':function(_0xd411c5){return _0xd411c5();},'WAmBj':_0x9cd273(0x1e1),'LkQGY':function(_0x4125ce,_0x334d21,_0x2af44d){return _0x4125ce(_0x334d21,_0x2af44d);}},_0x2c8194=await _0x17f204['aHDvL'](getToken)[_0x9cd273(0x1c8)](()=>null),_0x4256c5=getApiBaseUrl(),_0xd67bc={'Content-Type':'application/json'};_0x2c8194&&(_0xd67bc[_0x17f204[_0x9cd273(0x1c3)]]='Bearer\x20'+_0x2c8194);const _0x52c0ad={'events':_0x276c24};process['env']['DEBUG']&&console[_0x9cd273(0x1be)]('[telemetry]\x20Sending\x20'+_0x276c24[_0x9cd273(0x1d5)]+'\x20event(s)\x20to\x20'+_0x4256c5+'/api/v1/mcp/cli-telemetry');const _0x3b4187=new AbortController(),_0x816ab5=setTimeout(()=>_0x3b4187[_0x9cd273(0x1b9)](),0x1388);try{await _0x17f204[_0x9cd273(0x1e5)](fetch,_0x4256c5+'/api/v1/mcp/cli-telemetry',{'method':_0x9cd273(0x1c7),'headers':_0xd67bc,'body':JSON['stringify'](_0x52c0ad),'signal':_0x3b4187[_0x9cd273(0x1b6)]});}finally{clearTimeout(_0x816ab5);}}}let currentCollector=null;function _0x24d0(){const _0x2658ce=['lsmvK','361290QqtkCZ','errorMessage','Kwldd','Authorization','flushing','message','cliVersion','LkQGY','eventType','EAEsy','trackCommandEnd','4178tpSpsY','stdout','phaseCounter','flush','nodeVersion','deviceId','.session','split','buffer','PWtrJ','metadata','toISOString','sendBatch','...','26788GquazM','checklistItemId','get','buildEvent','featureId','command','isCI','utf-8','UuGsi','phase','signal','isTty','trackCommandError','abort','command_error','commandId','transport','6vyXVZS','error','trackPhaseStart','4948237rorKOD','6334371ZERKMt','phase_start','WAmBj','nEKlN','trackCommandStart','env','POST','catch','browserSessionId','phaseStartTimes','platform','sendImmediate','constructor','82hHjUkt','5FRdTSd','command_start','commandStartTime','tVbVp','Udxks','outcome','length','phase_error','9307550KpebiX','phaseIndex','phase_end','now','name','1279184aYaMYR'];_0x24d0=function(){return _0x2658ce;};return _0x24d0();}function _0x3737(_0x27f8e0,_0x278499){_0x27f8e0=_0x27f8e0-0x1b6;const _0x24d0d8=_0x24d0();let _0x3737ae=_0x24d0d8[_0x27f8e0];return _0x3737ae;}export function createTelemetryCollector(_0x1ce2e0){return currentCollector=new TelemetryCollector(_0x1ce2e0),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x24261c,_0x5e142e,_0x20779c){const _0x54ba83=_0x12ec01,_0x289416={'viePu':function(_0x5c992b,_0x382f89){return _0x5c992b(_0x382f89);}},_0x16c08d=createTelemetryCollector(_0x24261c);await _0x16c08d[_0x54ba83(0x1c5)](_0x20779c);try{const _0x136a77=await _0x289416['viePu'](_0x5e142e,_0x16c08d);return await _0x16c08d['trackCommandEnd']('success'),_0x136a77;}catch(_0x3ce57f){await _0x16c08d[_0x54ba83(0x1b8)](_0x3ce57f);throw _0x3ce57f;}finally{await _0x16c08d[_0x54ba83(0x1ec)]();}}function truncate(_0x198ef9,_0x145d6a){const _0x1d1db7=_0x12ec01,_0x35db3f={'XFWQg':function(_0x48a453,_0x5acff9){return _0x48a453>_0x5acff9;},'PWtrJ':_0x1d1db7(0x1f6)};return _0x35db3f['XFWQg'](_0x198ef9[_0x1d1db7(0x1d5)],_0x145d6a)?_0x198ef9['slice'](0x0,_0x145d6a)+_0x35db3f[_0x1d1db7(0x1f2)]:_0x198ef9;}
|