@ranger-testing/ranger-cli 2.5.4-alpha.a70fc60-4 → 2.5.4-alpha.b28d3b1-14
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/legacyWarning.js +1 -0
- 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/SKILL.md +25 -5
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +34 -7
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x285e(){const _0x34743d=['5223360qlPPVp','vvZWS','1218996idZsyY','4835205wdYhKv','30EMWDir','4AcnXTu','rEgPk','4016583SlmmrB','vViWF','162211jtqZwx','8594957KczDZp','2215vgylqG','uluuT','.ranger','13986nOYmYn','root','HuRmu'];_0x285e=function(){return _0x34743d;};return _0x285e();}(function(_0x391736,_0x448082){const _0x2d6942=_0x2e36,_0xe3825f=_0x391736();while(!![]){try{const _0x329144=-parseInt(_0x2d6942(0x1dc))/0x1*(-parseInt(_0x2d6942(0x1d8))/0x2)+parseInt(_0x2d6942(0x1da))/0x3+parseInt(_0x2d6942(0x1e6))/0x4+-parseInt(_0x2d6942(0x1de))/0x5*(-parseInt(_0x2d6942(0x1e1))/0x6)+-parseInt(_0x2d6942(0x1dd))/0x7+parseInt(_0x2d6942(0x1e4))/0x8+parseInt(_0x2d6942(0x1e7))/0x9*(-parseInt(_0x2d6942(0x1e8))/0xa);if(_0x329144===_0x448082)break;else _0xe3825f['push'](_0xe3825f['shift']());}catch(_0x141f48){_0xe3825f['push'](_0xe3825f['shift']());}}}(_0x285e,0xc6baf));import{dirname,join,parse}from'path';import{existsSync}from'fs';import{homedir}from'os';function _0x2e36(_0x3fdf1e,_0x58f6e9){_0x3fdf1e=_0x3fdf1e-0x1d8;const _0x285e06=_0x285e();let _0x2e3683=_0x285e06[_0x3fdf1e];return _0x2e3683;}export function getRangerRoot(){const _0x30fa3e=_0x2e36,_0x41f44={'DufMl':function(_0x2f6abd,_0x5a1080){return _0x2f6abd!==_0x5a1080;},'BfeHO':'.ranger','vViWF':function(_0x232e03,_0x598109){return _0x232e03(_0x598109);},'iWQNr':function(_0x817e29,_0x3229c0,_0x48b9fb){return _0x817e29(_0x3229c0,_0x48b9fb);},'vzzJo':function(_0x5a412d){return _0x5a412d();}};let _0x275065=process['cwd']();const _0x5c3b16=parse(_0x275065)[_0x30fa3e(0x1e2)];while(_0x41f44['DufMl'](_0x275065,_0x5c3b16)){if(existsSync(join(_0x275065,_0x41f44['BfeHO'])))return _0x275065;_0x275065=_0x41f44[_0x30fa3e(0x1db)](dirname,_0x275065);}if(existsSync(_0x41f44['iWQNr'](join,_0x5c3b16,_0x30fa3e(0x1e0))))return _0x5c3b16;const _0x17dc58=_0x41f44['vzzJo'](findGitRoot);if(_0x17dc58)return _0x17dc58;return process['cwd']();}export function getRangerDir(){const _0x49d10f={'ZUPEB':'.ranger'};return join(getRangerRoot(),_0x49d10f['ZUPEB']);}export function findGitRoot(){const _0x1738ce=_0x2e36,_0x5968d6={'TofPq':function(_0x2cfec7,_0x5736b7){return _0x2cfec7!==_0x5736b7;},'uluuT':function(_0x1df75a,_0x2cb1b9){return _0x1df75a(_0x2cb1b9);},'HuRmu':function(_0x419625,_0x2598a4,_0x2cf480){return _0x419625(_0x2598a4,_0x2cf480);},'vvZWS':function(_0xeb8912,_0x2ca3fd){return _0xeb8912(_0x2ca3fd);},'CkRya':function(_0x172078,_0x1dd21d,_0xa71e38){return _0x172078(_0x1dd21d,_0xa71e38);},'rEgPk':'.git'};let _0x5ea3e6=process['cwd']();const _0x45b464=parse(_0x5ea3e6)['root'];while(_0x5968d6['TofPq'](_0x5ea3e6,_0x45b464)){if(_0x5968d6[_0x1738ce(0x1df)](existsSync,_0x5968d6[_0x1738ce(0x1e3)](join,_0x5ea3e6,'.git')))return _0x5ea3e6;_0x5ea3e6=_0x5968d6[_0x1738ce(0x1e5)](dirname,_0x5ea3e6);}if(_0x5968d6[_0x1738ce(0x1e5)](existsSync,_0x5968d6['CkRya'](join,_0x45b464,_0x5968d6[_0x1738ce(0x1d9)])))return _0x45b464;return null;}export function getRangerHomeDir(){const _0x37c2ab={'qVCwG':'.ranger'};return join(homedir(),_0x37c2ab['qVCwG']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x3499(_0x229315,_0x26a4d9){_0x229315=_0x229315-0x12e;const _0x1a7320=_0x1a73();let _0x3499c5=_0x1a7320[_0x229315];return _0x3499c5;}(function(_0x33ef06,_0x284ac6){const _0x141594=_0x3499,_0x35b095=_0x33ef06();while(!![]){try{const _0x1d5892=parseInt(_0x141594(0x13a))/0x1*(-parseInt(_0x141594(0x154))/0x2)+-parseInt(_0x141594(0x136))/0x3*(parseInt(_0x141594(0x162))/0x4)+parseInt(_0x141594(0x152))/0x5*(parseInt(_0x141594(0x138))/0x6)+-parseInt(_0x141594(0x153))/0x7+-parseInt(_0x141594(0x137))/0x8+parseInt(_0x141594(0x13e))/0x9*(parseInt(_0x141594(0x135))/0xa)+parseInt(_0x141594(0x143))/0xb;if(_0x1d5892===_0x284ac6)break;else _0x35b095['push'](_0x35b095['shift']());}catch(_0x5b207a){_0x35b095['push'](_0x35b095['shift']());}}}(_0x1a73,0x60cfb));import{existsSync}from'fs';import _0x121a27 from'inquirer';import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x1a73(){const _0x125341=['Local\x20profile','cdpEndpoint','1|2|3|4|0','profile','RANGER_SESSION_STATE_PATH','69192gkYwEo','resolvedEnv','tTKyw','url','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','cwd','rwVLi','kTJSe','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','40GdTBGC','129cGQUIL','1159688fXaOUf','2043486aoQdDI','name','355898vLQMNb','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','startPath','wrnFM','596088cmXQCs','\x20baseUrl\x20<url>','cloud','domains','prompt','18101677rLKfqs','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','env','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','local','string','envStartPath','SrseR','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','Profile\x20\x22','\x20does\x20not\x20exist.','RANGER_SESSION_STATE_PATH=','list','AmuLu','dmwZj','5GdmfRV','1778042uYZlQW','4zdAbqE','KKdHO','log','YXwJF','GSXVa','dVMEq','baseUrl','RANGER_TEST_USERNAME','source'];_0x1a73=function(){return _0x125341;};return _0x1a73();}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(_0x3538b7){const _0x377f4e=_0x3499,_0x2082f8={'YXwJF':function(_0x31f456,_0x11a463){return _0x31f456===_0x11a463;},'Rirtz':function(_0xc25da4,_0x5db8c5){return _0xc25da4+_0x5db8c5;},'AmuLu':function(_0xd20ccc,_0x1a193f){return _0xd20ccc+_0x1a193f;},'GxNTq':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','GSXVa':function(_0x161f1d,_0x1162de){return _0x161f1d(_0x1162de);},'bzuQx':function(_0x274397,_0x43df35){return _0x274397 instanceof _0x43df35;},'yFiSP':function(_0x5408ae,_0x7c0956){return _0x5408ae&&_0x7c0956;},'KKdHO':function(_0x2e3eff){return _0x2e3eff();},'kTJSe':_0x377f4e(0x14f),'joXJM':_0x377f4e(0x15c),'YqJCM':'Cloud\x20profile\x20(recommended)','SrseR':'cloud','dIRmA':function(_0x425935,_0x1be253){return _0x425935??_0x1be253;},'uvmCc':_0x377f4e(0x15f),'tTKyw':function(_0x209d14,_0x4d8310){return _0x209d14(_0x4d8310);},'ERvLT':function(_0x54da40,_0x387c9b){return _0x54da40(_0x387c9b);},'KmEcC':function(_0x4d8416){return _0x4d8416();}},_0x473a24=_0x3538b7['profile'];let _0x40b866=_0x3538b7[_0x377f4e(0x160)]??await readActiveProfileName(),_0x40112d=null;if(!_0x40b866&&process[_0x377f4e(0x145)][_0x377f4e(0x15b)]){const _0x33b082=await resolveAdHocProfile();_0x33b082&&(_0x40b866=_0x33b082[_0x377f4e(0x139)],_0x40112d=_0x33b082[_0x377f4e(0x160)]);}if(!_0x40b866)try{const _0x2fe5de=await listCloudProfiles();if(_0x2082f8[_0x377f4e(0x157)](_0x2fe5de['length'],0x1)){const _0x5543e0=_0x2fe5de[0x0];_0x40b866=_0x5543e0['name'],console[_0x377f4e(0x156)](_0x377f4e(0x134)+_0x5543e0['name']),console['log'](_0x377f4e(0x144));}}catch{}if(!_0x40b866)throw new Error(_0x2082f8['Rirtz'](_0x2082f8[_0x377f4e(0x150)](_0x377f4e(0x146),'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a')+_0x377f4e(0x13b)+_0x2082f8['GxNTq'],'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.'));const _0x521f8e=_0x2082f8['GSXVa'](getEnvDir,_0x40b866),_0x5afded=existsSync(_0x521f8e);let _0x13e7f6=_0x40112d,_0x248b3e=![];if(!_0x13e7f6)try{_0x13e7f6=await fetchCloudProfile(_0x40b866);if(!_0x13e7f6)_0x248b3e=!![];}catch(_0x5853d4){_0x2082f8['bzuQx'](_0x5853d4,ApiError)&&_0x5853d4['status']===0x194&&(_0x248b3e=!![]);}if(_0x2082f8['yFiSP'](_0x473a24,_0x248b3e)&&!_0x5afded&&!_0x13e7f6)throw new Error(_0x377f4e(0x14c)+_0x473a24+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x13e7f6&&_0x5afded){let _0x3ff4a6=!![];if(_0x2082f8[_0x377f4e(0x155)](isInteractive)){const {source:_0x537b13}=await _0x121a27[_0x377f4e(0x142)]([{'type':_0x2082f8[_0x377f4e(0x132)],'name':_0x2082f8['joXJM'],'message':_0x377f4e(0x14c)+_0x40b866+_0x377f4e(0x133),'choices':[{'name':_0x2082f8['YqJCM'],'value':_0x377f4e(0x140)},{'name':_0x377f4e(0x15d),'value':_0x377f4e(0x147)}],'default':_0x2082f8[_0x377f4e(0x14a)]}]);_0x3ff4a6=_0x537b13===_0x2082f8['SrseR'];}if(!_0x3ff4a6)_0x13e7f6=null;}const _0x17d975=readProfileOverrides(process[_0x377f4e(0x130)](),_0x40b866);let _0x47b979=null,_0x18ba15,_0x551d77,_0x5c0465,_0x53d704,_0x10a01a=null,_0x18d47c;const _0x5a28b4=expandOverrides(_0x17d975);if(_0x13e7f6){_0x47b979=_0x13e7f6;const _0x4910ee=_0x13e7f6['settings']??{},_0x382052=mergeCloudProfileSettings(_0x4910ee,_0x2082f8['dIRmA'](_0x17d975,undefined)),_0x5a1d3c={..._0x13e7f6,'settings':_0x382052},_0x3b833d=process['env'][_0x377f4e(0x161)];if(_0x3b833d){const _0x296448=_0x2082f8['uvmCc']['split']('|');let _0x179d6e=0x0;while(!![]){switch(_0x296448[_0x179d6e++]){case'0':_0x10a01a={'baseUrl':_0x2082f8[_0x377f4e(0x158)](expandString,_0x4910ee[_0x377f4e(0x15a)]),'startPath':expandString(_0x4910ee[_0x377f4e(0x13c)])};continue;case'1':if(!existsSync(_0x3b833d))throw new Error(_0x377f4e(0x14e)+_0x3b833d+_0x377f4e(0x14d));continue;case'2':_0x18ba15=_0x3b833d;continue;case'3':_0x551d77=_0x2082f8['tTKyw'](resolveEnvVars,_0x382052);continue;case'4':_0x5c0465=_0x2082f8[_0x377f4e(0x164)](Boolean,_0x551d77[_0x377f4e(0x15e)]);continue;}break;}}else{const _0x3fa24=await resolveCloudProfileSession(_0x5a1d3c);_0x18ba15=_0x3fa24['authPath'],_0x551d77=resolveEnvVars(_0x382052),_0x5c0465=Boolean(_0x551d77[_0x377f4e(0x15e)]),_0x10a01a={'baseUrl':expandString(_0x4910ee[_0x377f4e(0x15a)]),'startPath':_0x2082f8['GSXVa'](expandString,_0x4910ee['startPath'])},_0x18d47c=_0x3fa24[_0x377f4e(0x163)]?.[_0x377f4e(0x141)]?.[0x0];}}else{if(!_0x5afded)throw new Error('Profile\x20\x22'+_0x40b866+_0x377f4e(0x12f)+_0x40b866);const _0x1ab3d2=await loadSettings(_0x40b866);_0x551d77=_0x2082f8['ERvLT'](resolveEnvVars,_0x1ab3d2),_0x5c0465=Boolean(_0x551d77[_0x377f4e(0x15e)]),_0x53d704=_0x551d77[_0x377f4e(0x15a)];}const _0xd9b054=_0x2082f8['KmEcC'](readUrlEnvVars),_0x3a6efd=resolveProfileUrl({'flagBaseUrl':_0x3538b7['baseUrl'],'flagStartPath':_0x3538b7[_0x377f4e(0x13c)],'envBaseUrl':_0xd9b054['envBaseUrl'],'envStartPath':_0xd9b054[_0x377f4e(0x149)],'localSettingsBaseUrl':_0x53d704,'projectOverrides':_0x5a28b4,'cloudSettings':_0x10a01a,'authEnvironmentDomain':_0x18d47c}),_0x4bb2af=_0x3a6efd[_0x377f4e(0x12e)]??_0x3a6efd['baseUrl'];if(!_0x4bb2af&&!_0x5c0465)throw new Error(_0x377f4e(0x14b)+_0x40b866+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x40b866+_0x377f4e(0x13f));return{'activeProfile':_0x40b866,'resolvedCloudProfile':_0x47b979,'cloudAuthPath':_0x18ba15,'resolvedSettings':_0x551d77,'isCdpMode':_0x5c0465,'url':_0x4bb2af,'startPath':_0x3a6efd[_0x377f4e(0x13c)]};}function expandString(_0x24211f){const _0xc8e616=_0x3499,_0x553595={'MhUkl':function(_0x516cac,_0x10550f){return _0x516cac!==_0x10550f;},'dmwZj':_0xc8e616(0x148),'dVMEq':function(_0xd1c433,_0x2bc213){return _0xd1c433(_0x2bc213);}};if(_0x553595['MhUkl'](typeof _0x24211f,_0x553595[_0xc8e616(0x151)]))return _0x24211f;return _0x553595[_0xc8e616(0x159)](resolveEnvVars,_0x24211f);}function expandOverrides(_0x2ccfbe){const _0x317e7a=_0x3499,_0x420d8b={'piPiA':function(_0x5477c8,_0x126e90){return _0x5477c8===_0x126e90;},'rwVLi':_0x317e7a(0x148),'wrnFM':function(_0x6822d5,_0xaf9a27){return _0x6822d5(_0xaf9a27);}};if(!_0x2ccfbe)return _0x2ccfbe;const _0x33b9dd={..._0x2ccfbe};return _0x420d8b['piPiA'](typeof _0x33b9dd['baseUrl'],_0x420d8b[_0x317e7a(0x131)])&&(_0x33b9dd['baseUrl']=_0x420d8b['wrnFM'](resolveEnvVars,_0x33b9dd['baseUrl'])),typeof _0x33b9dd['startPath']===_0x420d8b[_0x317e7a(0x131)]&&(_0x33b9dd['startPath']=_0x420d8b[_0x317e7a(0x13d)](resolveEnvVars,_0x33b9dd[_0x317e7a(0x13c)])),_0x33b9dd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26e71a,_0x1ad1ad){const _0x5554ab=_0x5d64,_0x19afa5=_0x26e71a();while(!![]){try{const _0x35479d=parseInt(_0x5554ab(0x154))/0x1+parseInt(_0x5554ab(0x149))/0x2+-parseInt(_0x5554ab(0x147))/0x3*(-parseInt(_0x5554ab(0x150))/0x4)+parseInt(_0x5554ab(0x157))/0x5*(-parseInt(_0x5554ab(0x13e))/0x6)+parseInt(_0x5554ab(0x14a))/0x7+parseInt(_0x5554ab(0x15a))/0x8*(-parseInt(_0x5554ab(0x14e))/0x9)+-parseInt(_0x5554ab(0x155))/0xa;if(_0x35479d===_0x1ad1ad)break;else _0x19afa5['push'](_0x19afa5['shift']());}catch(_0x4d8b91){_0x19afa5['push'](_0x19afa5['shift']());}}}(_0x4ce3,0xac856));function firstDefined(..._0x445a2b){const _0xe75f1b={'ncPBU':function(_0x5231f3,_0x157a9a){return _0x5231f3!==_0x157a9a;}};for(const _0x29e64a of _0x445a2b){if(_0x29e64a!==undefined&&_0xe75f1b['ncPBU'](_0x29e64a,null)&&_0x29e64a!=='')return _0x29e64a;}return undefined;}function normalizeAuthEnvironmentDomain(_0x5ea0ec){const _0x2ce03d=_0x5d64;if(!_0x5ea0ec)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x2ce03d(0x146)](_0x5ea0ec))return _0x5ea0ec;return'https://'+_0x5ea0ec;}function _0x4ce3(){const _0x5f3e2e=['4tmXVOU','baseUrl','envBaseUrl','flagStartPath','1206588QrViCi','32747690pivaYl','localSettingsBaseUrl','5HVaiLY','RANGER_BASE_URL','string','24tMncxs','CWMjQ','304122HPlQxw','ltiwv','cloudSettings','startsWith','envStartPath','authEnvironmentDomain','qtOwn','rMwcZ','test','2785377nFNkUc','endsWith','2164910GEeZQJ','6040993lmWfLT','RANGER_START_PATH','projectOverrides','KPoat','145197hWGNJy','TnauP'];_0x4ce3=function(){return _0x5f3e2e;};return _0x4ce3();}export function resolveBaseUrl(_0x35b889){const _0x13b659=_0x5d64,_0x309890={'qtOwn':_0x13b659(0x151),'adrZr':function(_0x5536fb,_0x1a3625){return _0x5536fb===_0x1a3625;},'SOmqf':function(_0x5bf9b8,_0x152e27,_0x566750,_0x2e88da,_0x5f14ed,_0x1726bb,_0x458e57){return _0x5bf9b8(_0x152e27,_0x566750,_0x2e88da,_0x5f14ed,_0x1726bb,_0x458e57);},'ltiwv':function(_0x32b151,_0xc1ead8){return _0x32b151===_0xc1ead8;},'TnauP':'string','KPoat':function(_0x34dda1,_0x450e04){return _0x34dda1(_0x450e04);}},_0x5a04f1=_0x35b889[_0x13b659(0x14c)],_0x52779a=!!_0x5a04f1&&_0x309890[_0x13b659(0x144)]in _0x5a04f1,_0x46e45d=_0x5a04f1?.['baseUrl'],_0x2eb340=!(_0x52779a&&_0x309890['adrZr'](_0x46e45d,null));return _0x309890['SOmqf'](firstDefined,_0x35b889['flagBaseUrl'],_0x35b889[_0x13b659(0x152)],_0x35b889[_0x13b659(0x156)],_0x309890[_0x13b659(0x13f)](typeof _0x46e45d,_0x309890[_0x13b659(0x14f)])?_0x46e45d:undefined,_0x2eb340?_0x35b889[_0x13b659(0x140)]?.['baseUrl']:undefined,_0x2eb340?_0x309890[_0x13b659(0x14d)](normalizeAuthEnvironmentDomain,_0x35b889[_0x13b659(0x143)]):undefined);}export function resolveStartPath(_0x29aa62){const _0x45c925=_0x5d64,_0x379b59={'CWMjQ':'startPath','rMwcZ':function(_0x4fff88,_0x51b792){return _0x4fff88===_0x51b792;}},_0x2e65ae=_0x29aa62[_0x45c925(0x14c)],_0x50f0ac=!!_0x2e65ae&&_0x379b59[_0x45c925(0x15b)]in _0x2e65ae,_0x47aac9=_0x2e65ae?.['startPath'],_0x1bd99d=!(_0x50f0ac&&_0x379b59[_0x45c925(0x145)](_0x47aac9,null));return firstDefined(_0x29aa62[_0x45c925(0x153)],_0x29aa62[_0x45c925(0x142)],typeof _0x47aac9===_0x45c925(0x159)?_0x47aac9:undefined,_0x1bd99d?_0x29aa62['cloudSettings']?.['startPath']:undefined);}export function joinBaseAndPath(_0x28e6e4,_0x147f4e){const _0x5fa1e3=_0x5d64,_0x2ee4fd={'rMEBd':function(_0x3b1e41,_0x5c88e0){return _0x3b1e41+_0x5c88e0;}};if(!_0x28e6e4)return undefined;if(!_0x147f4e)return _0x28e6e4;const _0x30ed0e=_0x28e6e4[_0x5fa1e3(0x148)]('/')?_0x28e6e4['slice'](0x0,-0x1):_0x28e6e4,_0x293833=_0x147f4e[_0x5fa1e3(0x141)]('/')?_0x147f4e:'/'+_0x147f4e;return _0x2ee4fd['rMEBd'](_0x30ed0e,_0x293833);}function _0x5d64(_0x5c8c68,_0x52ea73){_0x5c8c68=_0x5c8c68-0x13e;const _0x4ce3bb=_0x4ce3();let _0x5d6403=_0x4ce3bb[_0x5c8c68];return _0x5d6403;}export function resolveProfileUrl(_0x422dc9){const _0x304146={'EGIOm':function(_0x15f2c2,_0x4b75a0){return _0x15f2c2(_0x4b75a0);}},_0x52e4d7=_0x304146['EGIOm'](resolveBaseUrl,_0x422dc9),_0x35a800=resolveStartPath(_0x422dc9);return{'baseUrl':_0x52e4d7,'startPath':_0x35a800,'url':joinBaseAndPath(_0x52e4d7,_0x35a800)};}export function readUrlEnvVars(_0x1f6a7d=process['env']){const _0x465f5c=_0x5d64;return{'envBaseUrl':_0x1f6a7d[_0x465f5c(0x158)],'envStartPath':_0x1f6a7d[_0x465f5c(0x14b)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fe6b0,_0x489f5e){const _0xf7905d=_0x516b,_0x3a0a04=_0x2fe6b0();while(!![]){try{const _0x39a52d=-parseInt(_0xf7905d(0x1d9))/0x1*(parseInt(_0xf7905d(0x1d8))/0x2)+-parseInt(_0xf7905d(0x1d5))/0x3+-parseInt(_0xf7905d(0x1d6))/0x4+parseInt(_0xf7905d(0x1dd))/0x5*(parseInt(_0xf7905d(0x1d3))/0x6)+parseInt(_0xf7905d(0x1d2))/0x7+parseInt(_0xf7905d(0x1dc))/0x8+parseInt(_0xf7905d(0x1d4))/0x9;if(_0x39a52d===_0x489f5e)break;else _0x3a0a04['push'](_0x3a0a04['shift']());}catch(_0x2a6038){_0x3a0a04['push'](_0x3a0a04['shift']());}}}(_0x21d9,0xc3bfd));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x38d164,_0x167214){const _0x4ff9d8=_0x516b,_0x444717={'VxOqc':function(_0x230b29,_0x5b049e){return _0x230b29<=_0x5b049e;},'dPwsh':function(_0x16d629){return _0x16d629();},'UIPKf':function(_0x52fa4a,_0x432ad1){return _0x52fa4a instanceof _0x432ad1;},'giUQK':function(_0x1edc2f,_0x25b5fe){return _0x1edc2f<_0x25b5fe;}},_0x33992b=_0x167214?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x24cdec=_0x167214?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x129c15;for(let _0x104237=0x0;_0x444717['VxOqc'](_0x104237,_0x33992b);_0x104237++){try{return await _0x444717[_0x4ff9d8(0x1d7)](_0x38d164);}catch(_0x520fa4){_0x129c15=_0x444717['UIPKf'](_0x520fa4,Error)?_0x520fa4:new Error(String(_0x520fa4));if(_0x444717['giUQK'](_0x104237,_0x33992b)){const _0x63442=_0x24cdec*Math[_0x4ff9d8(0x1da)](0x2,_0x104237);_0x167214?.['label']&&console['error'](_0x167214['label']+'\x20failed\x20(attempt\x20'+(_0x104237+0x1)+'/'+(_0x33992b+0x1)+'),\x20retrying\x20in\x20'+_0x63442+_0x4ff9d8(0x1db)),await new Promise(_0x243969=>setTimeout(_0x243969,_0x63442));}}}throw _0x129c15;}function _0x516b(_0x22a56e,_0x13e0a5){_0x22a56e=_0x22a56e-0x1d2;const _0x21d9e3=_0x21d9();let _0x516b06=_0x21d9e3[_0x22a56e];return _0x516b06;}function _0x21d9(){const _0x368595=['1950201jngYJO','5607864MkgkZu','dPwsh','45116YTlZrz','52QYNejf','pow','ms...','740296GlsWZg','59115KfFjJP','5104050YKvRon','72DOGEqJ','27569475lQgWrM'];_0x21d9=function(){return _0x368595;};return _0x21d9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe64401=_0x6942;(function(_0x293251,_0x2aee33){const _0x37a1e8=_0x6942,_0x8e8f80=_0x293251();while(!![]){try{const _0x4deb69=parseInt(_0x37a1e8(0xc9))/0x1+parseInt(_0x37a1e8(0xc4))/0x2+parseInt(_0x37a1e8(0x9b))/0x3+-parseInt(_0x37a1e8(0xa1))/0x4*(-parseInt(_0x37a1e8(0xaa))/0x5)+parseInt(_0x37a1e8(0xa9))/0x6*(parseInt(_0x37a1e8(0xbd))/0x7)+parseInt(_0x37a1e8(0xb3))/0x8+-parseInt(_0x37a1e8(0x9a))/0x9;if(_0x4deb69===_0x2aee33)break;else _0x8e8f80['push'](_0x8e8f80['shift']());}catch(_0x4363ca){_0x8e8f80['push'](_0x8e8f80['shift']());}}}(_0x47a8,0x34f87));import*as _0x5d2aa5 from'fs';import*as _0x384bb5 from'path';import*as _0x22a86d from'os';import{execSync}from'child_process';const CACHE_FILE=_0x384bb5[_0xe64401(0xaf)](_0x22a86d['homedir'](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x4244d5=_0xe64401,_0x472e64={'bMLgG':function(_0x425b68){return _0x425b68();}};try{if(_0x5d2aa5['existsSync'](CACHE_FILE)){const _0x5e7f5d=JSON[_0x4244d5(0xbf)](_0x5d2aa5['readFileSync'](CACHE_FILE,_0x4244d5(0xb9)));return{'version':0x3,'sessions':_0x5e7f5d[_0x4244d5(0x98)]||{},'branches':_0x5e7f5d['branches']||{},'lastEnabledSessionClearedAt':_0x5e7f5d['lastEnabledSessionClearedAt']};}}catch{}return _0x472e64['bMLgG'](createEmptyCache);}function saveCache(_0x276e41){const _0x19bac6=_0xe64401;try{const _0x27392a=_0x384bb5[_0x19bac6(0xc8)](CACHE_FILE);!_0x5d2aa5[_0x19bac6(0x9c)](_0x27392a)&&_0x5d2aa5['mkdirSync'](_0x27392a,{'recursive':!![]}),_0x5d2aa5[_0x19bac6(0xc5)](CACHE_FILE,JSON[_0x19bac6(0xa6)](_0x276e41,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3eb0b3=_0xe64401,_0x3216cc={'fjTsD':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','eEWuV':_0x3eb0b3(0xb9),'PhVBR':'pipe'};try{const _0x1f85f4=execSync(_0x3216cc[_0x3eb0b3(0xb5)],{'encoding':_0x3216cc['eEWuV'],'stdio':[_0x3216cc[_0x3eb0b3(0xb7)],_0x3216cc[_0x3eb0b3(0xb7)],_0x3eb0b3(0xb6)]})[_0x3eb0b3(0xac)]();if(!_0x1f85f4||_0x1f85f4==='HEAD')return null;return _0x1f85f4;}catch{return null;}}export function enableBranch(_0x5aece7){const _0xf04021=loadCache();_0xf04021['branches'][_0x5aece7]=!![],saveCache(_0xf04021);}export function disableBranch(_0x24f9ba){const _0xdae885=_0xe64401,_0x27b259=loadCache();delete _0x27b259[_0xdae885(0xa3)][_0x24f9ba],saveCache(_0x27b259);}export function isBranchEnabled(_0xbc2ae){const _0x293af8=_0xe64401,_0x114e68={'LbaOo':function(_0x2996b3){return _0x2996b3();}},_0x4634a1=_0x114e68['LbaOo'](loadCache);return _0x4634a1[_0x293af8(0xa3)][_0xbc2ae]===!![];}function getOrCreateSession(_0x565b96,_0x407060){return!_0x565b96['sessions'][_0x407060]&&(_0x565b96['sessions'][_0x407060]={}),_0x565b96['sessions'][_0x407060];}export function enableSession(_0x5444b7){const _0x4e911e=_0xe64401,_0x56ff5e={'mpMak':function(_0xed335f){return _0xed335f();},'KpJwd':function(_0x14ef29,_0x296745){return _0x14ef29!==_0x296745;},'ifhvM':'main','oqEGy':function(_0x459390,_0x5486e7){return _0x459390(_0x5486e7);}},_0x204b57=_0x56ff5e['mpMak'](loadCache),_0x31c430=getOrCreateSession(_0x204b57,_0x5444b7);_0x31c430['enabled']=!![];const _0x35d13f=getCurrentBranch();_0x35d13f&&_0x56ff5e[_0x4e911e(0xc6)](_0x35d13f,_0x56ff5e[_0x4e911e(0xc0)])&&_0x35d13f!==_0x4e911e(0xb8)&&(_0x204b57[_0x4e911e(0xa3)][_0x35d13f]=!![],_0x31c430['currentBranch']=_0x35d13f),_0x56ff5e['oqEGy'](saveCache,_0x204b57);}export function isSessionEnabled(_0x56a67f){const _0xb3fd5b=_0xe64401,_0x2536d6={'gaiCX':function(_0x18ac99){return _0x18ac99();},'RXEgp':function(_0x22a780,_0x56c414){return _0x22a780===_0x56c414;},'ymajo':function(_0x4da143,_0x2db52a){return _0x4da143===_0x2db52a;},'JnCCa':function(_0x1afa41,_0x35b15e){return _0x1afa41===_0x35b15e;},'RfEFr':function(_0x340741,_0x5be512){return _0x340741||_0x5be512;}},_0x53b10e=loadCache(),_0x2ea36f=_0x2536d6[_0xb3fd5b(0xb0)](getCurrentBranch);if(!_0x2ea36f||_0x2536d6['RXEgp'](_0x2ea36f,'main')||_0x2536d6[_0xb3fd5b(0xca)](_0x2ea36f,'master'))return _0x53b10e[_0xb3fd5b(0x98)][_0x56a67f]?.[_0xb3fd5b(0x95)]===!![];const _0x582ddb=_0x2536d6['RXEgp'](_0x53b10e[_0xb3fd5b(0xa3)][_0x2ea36f],!![]),_0x427fe6=_0x2536d6[_0xb3fd5b(0x9e)](_0x53b10e[_0xb3fd5b(0x98)][_0x56a67f]?.[_0xb3fd5b(0x95)],!![]);return _0x2536d6[_0xb3fd5b(0xc3)](_0x582ddb,_0x427fe6);}export function disableSession(_0x17c3ce){const _0x30aad2=_0xe64401,_0x1cb6e2={'SCuRg':function(_0x2be6a3){return _0x2be6a3();},'ZVXtp':function(_0x5cc558,_0x2ac0f1,_0x2699db){return _0x5cc558(_0x2ac0f1,_0x2699db);},'jkYkT':function(_0x4f75be,_0x53bcc1){return _0x4f75be(_0x53bcc1);}},_0x45b361=_0x1cb6e2[_0x30aad2(0xa7)](loadCache),_0x51339b=_0x1cb6e2[_0x30aad2(0xa4)](getOrCreateSession,_0x45b361,_0x17c3ce);_0x51339b['enabled']=![],_0x1cb6e2[_0x30aad2(0xba)](saveCache,_0x45b361);}export function updateBranchTracking(_0x55db73){const _0x10aafd=_0xe64401,_0x405ac7={'AqQnM':function(_0x2863ec){return _0x2863ec();},'MPPXc':function(_0x4bd2c5,_0x31839e){return _0x4bd2c5===_0x31839e;},'wqtfU':_0x10aafd(0xbb),'GAGPr':'master','iHKNy':function(_0x5a715c,_0x94d6ed){return _0x5a715c!==_0x94d6ed;},'xkHcv':function(_0x41c3b1,_0x2392db){return _0x41c3b1(_0x2392db);}},_0x4b9f27=loadCache(),_0x5de611=_0x4b9f27[_0x10aafd(0x98)][_0x55db73];if(!_0x5de611?.['enabled'])return;const _0x53aa9b=_0x405ac7['AqQnM'](getCurrentBranch);if(!_0x53aa9b||_0x405ac7['MPPXc'](_0x53aa9b,_0x405ac7[_0x10aafd(0xa5)])||_0x53aa9b===_0x405ac7[_0x10aafd(0xbc)])return;_0x405ac7['iHKNy'](_0x5de611[_0x10aafd(0x9f)],_0x53aa9b)&&(_0x4b9f27['branches'][_0x53aa9b]=!![],_0x5de611[_0x10aafd(0x9f)]=_0x53aa9b,_0x405ac7[_0x10aafd(0x9d)](saveCache,_0x4b9f27));}export function initBranchTracking(_0x2e3bd5){const _0x1a6dd7=_0xe64401,_0x41c25e={'EsrPY':function(_0x446c2a){return _0x446c2a();},'jNlTj':function(_0x5675f5,_0x4e138d){return _0x5675f5===_0x4e138d;},'SmBGm':_0x1a6dd7(0xb8),'TeiJx':function(_0x171eb6,_0x42b53c,_0x1d48dd){return _0x171eb6(_0x42b53c,_0x1d48dd);}},_0x12e2cb=_0x41c25e['EsrPY'](loadCache),_0x46b045=getCurrentBranch();if(!_0x46b045||_0x41c25e['jNlTj'](_0x46b045,_0x1a6dd7(0xbb))||_0x46b045===_0x41c25e['SmBGm'])return;if(_0x12e2cb['branches'][_0x46b045]===!![]){const _0x38ba76=_0x41c25e['TeiJx'](getOrCreateSession,_0x12e2cb,_0x2e3bd5);_0x38ba76[_0x1a6dd7(0x95)]=!![],_0x38ba76[_0x1a6dd7(0x9f)]=_0x46b045,saveCache(_0x12e2cb);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;function _0x6942(_0x55ad94,_0x49e518){_0x55ad94=_0x55ad94-0x94;const _0x47a8d9=_0x47a8();let _0x6942f2=_0x47a8d9[_0x55ad94];return _0x6942f2;}export function recordEnabledSessionCleared(_0x105cac){const _0x2de0b3=loadCache(),_0x2adafd=_0x2de0b3['sessions'][_0x105cac];_0x2adafd?.['enabled']&&(_0x2de0b3['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x2de0b3));}export function shouldAutoEnableAfterClear(_0x12e723){const _0x97237=_0xe64401,_0x44a20d={'dDlKi':_0x97237(0xae),'CErfo':function(_0x4f8907,_0x1c55fe){return _0x4f8907-_0x1c55fe;},'ZKXwX':function(_0x38dfd1,_0x143564){return _0x38dfd1<=_0x143564;}};if(_0x12e723!==_0x44a20d[_0x97237(0x99)])return![];const _0x4b63d6=loadCache(),_0x424629=_0x4b63d6[_0x97237(0xad)];if(!_0x424629)return![];const _0x49f91f=_0x44a20d[_0x97237(0xb1)](Date['now'](),_0x424629);return _0x44a20d['ZKXwX'](_0x49f91f,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x2b972f){const _0x262732=_0xe64401,_0x352ab3={'NolXU':function(_0x42263d){return _0x42263d();},'Nxogm':function(_0x305c00,_0x2adae7,_0x929db){return _0x305c00(_0x2adae7,_0x929db);},'KnbYL':function(_0x5774f4,_0x4e603e){return _0x5774f4!==_0x4e603e;},'BsvvF':_0x262732(0xbb),'mxNqx':function(_0x23f48f,_0x3b01a1){return _0x23f48f(_0x3b01a1);}},_0x4a37d7=_0x352ab3[_0x262732(0xc7)](loadCache),_0x50c0af=_0x352ab3['Nxogm'](getOrCreateSession,_0x4a37d7,_0x2b972f);_0x50c0af[_0x262732(0x95)]=!![];const _0x20330b=getCurrentBranch();_0x20330b&&_0x352ab3[_0x262732(0x94)](_0x20330b,_0x352ab3['BsvvF'])&&_0x352ab3[_0x262732(0x94)](_0x20330b,_0x262732(0xb8))&&(_0x50c0af['currentBranch']=_0x20330b),delete _0x4a37d7['lastEnabledSessionClearedAt'],_0x352ab3['mxNqx'](saveCache,_0x4a37d7);}export function registerSession(_0x36023c,_0x15b163){const _0x3a4680=_0xe64401,_0x1f10cd=loadCache(),_0x49fb13=getOrCreateSession(_0x1f10cd,_0x36023c);_0x49fb13[_0x3a4680(0xb4)]=_0x15b163,_0x49fb13['registeredAt']=new Date()['toISOString'](),saveCache(_0x1f10cd);}export function getSessionEntry(_0x198c06){const _0x3a6cc9=_0xe64401,_0x144293=loadCache(),_0x3bf88b=_0x144293['sessions'][_0x198c06];if(_0x3bf88b?.[_0x3a6cc9(0xb4)]&&_0x3bf88b?.['registeredAt'])return{'featureId':_0x3bf88b[_0x3a6cc9(0xb4)],'registeredAt':_0x3bf88b['registeredAt']};return null;}export function unregisterSession(_0x3ee27b){const _0x9c374a=_0xe64401,_0x2a5d94={'VtLrC':function(_0x268840){return _0x268840();}},_0x506060=_0x2a5d94['VtLrC'](loadCache),_0x57648d=_0x506060['sessions'][_0x3ee27b];_0x57648d&&(delete _0x57648d['featureId'],delete _0x57648d[_0x9c374a(0x97)],saveCache(_0x506060));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2de1ee){const _0x39568b=_0xe64401,_0x104552={'dDbmL':function(_0x31f864,_0x574bb8,_0x456192){return _0x31f864(_0x574bb8,_0x456192);},'iiMUL':function(_0x4577c4,_0x15f7a4){return _0x4577c4>=_0x15f7a4;},'QeBOB':function(_0x22b7d1,_0x4caa25){return _0x22b7d1-_0x4caa25;}},_0x485fab=loadCache(),_0xd848d1=_0x104552['dDbmL'](getOrCreateSession,_0x485fab,_0x2de1ee),_0x30da86=_0xd848d1['lastPlanReminderAt']||0x0,_0x4b1bdd=Date[_0x39568b(0xa8)]();if(_0x104552[_0x39568b(0xbe)](_0x104552[_0x39568b(0xa2)](_0x4b1bdd,_0x30da86),PLAN_REMINDER_INTERVAL_MS))return _0xd848d1['lastPlanReminderAt']=_0x4b1bdd,saveCache(_0x485fab),!![];return![];}export function shouldShowStopReminder(_0x112ddd){const _0x4fc693=_0xe64401,_0x2912ea={'HCknw':function(_0x473cdb){return _0x473cdb();},'rfDLA':function(_0x34db2e,_0xfab8ca,_0x48718b){return _0x34db2e(_0xfab8ca,_0x48718b);},'JCCuV':function(_0x1f86b9,_0x50ca34){return _0x1f86b9>=_0x50ca34;},'JKvCf':function(_0x21dbca,_0x222941){return _0x21dbca-_0x222941;}},_0x87de2e=_0x2912ea[_0x4fc693(0x96)](loadCache),_0x246fec=_0x2912ea[_0x4fc693(0xb2)](getOrCreateSession,_0x87de2e,_0x112ddd),_0x521f9c=_0x246fec[_0x4fc693(0xc2)]||0x0,_0x91389e=Date[_0x4fc693(0xa8)]();if(_0x2912ea[_0x4fc693(0xab)](_0x2912ea['JKvCf'](_0x91389e,_0x521f9c),STOP_REMINDER_INTERVAL_MS))return _0x246fec[_0x4fc693(0xc2)]=_0x91389e,saveCache(_0x87de2e),!![];return![];}function _0x47a8(){const _0x30ab18=['SCuRg','now','105654yUVMcf','1270ONtsnI','JCCuV','trim','lastEnabledSessionClearedAt','clear','join','gaiCX','CErfo','rfDLA','1965792nZOrNV','featureId','fjTsD','pipe','PhVBR','master','utf-8','jkYkT','main','GAGPr','28tsTXPy','iiMUL','parse','ifhvM','cOJBT','lastStopReminderAt','RfEFr','482584LajpKf','writeFileSync','KpJwd','NolXU','dirname','73278JarbnR','ymajo','KnbYL','enabled','HCknw','registeredAt','sessions','dDlKi','8122482JJUDKu','1224651eRllNB','existsSync','xkHcv','JnCCa','currentBranch','prompted','1268OvFtNY','QeBOB','branches','ZVXtp','wqtfU','stringify'];_0x47a8=function(){return _0x30ab18;};return _0x47a8();}export function hasSessionBeenPrompted(_0x592e24){const _0x4b30a7=_0xe64401,_0x593273={'UXpQh':function(_0x52d144,_0x594bfa){return _0x52d144===_0x594bfa;}},_0x5e3ffc=loadCache();return _0x593273['UXpQh'](_0x5e3ffc[_0x4b30a7(0x98)][_0x592e24]?.['prompted'],!![]);}export function markSessionPrompted(_0x3b5625){const _0x5c6312=_0xe64401,_0x4ff664={'cOJBT':function(_0x4d4a47){return _0x4d4a47();},'vuDXM':function(_0x175b1e,_0x504d67,_0x1cccd5){return _0x175b1e(_0x504d67,_0x1cccd5);}},_0x224ba9=_0x4ff664[_0x5c6312(0xc1)](loadCache),_0x304c4d=_0x4ff664['vuDXM'](getOrCreateSession,_0x224ba9,_0x3b5625);_0x304c4d[_0x5c6312(0xa0)]=!![],saveCache(_0x224ba9);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x342eeb=_0x56ec;(function(_0x2c7e94,_0x3be7fb){const _0x4c2e29=_0x56ec,_0x45866a=_0x2c7e94();while(!![]){try{const _0x1d35cb=parseInt(_0x4c2e29(0xa0))/0x1+-parseInt(_0x4c2e29(0xb4))/0x2+-parseInt(_0x4c2e29(0xb5))/0x3+-parseInt(_0x4c2e29(0xb7))/0x4*(-parseInt(_0x4c2e29(0xa7))/0x5)+-parseInt(_0x4c2e29(0xb3))/0x6+-parseInt(_0x4c2e29(0x95))/0x7+-parseInt(_0x4c2e29(0x8c))/0x8*(-parseInt(_0x4c2e29(0x9f))/0x9);if(_0x1d35cb===_0x3be7fb)break;else _0x45866a['push'](_0x45866a['shift']());}catch(_0x5c2878){_0x45866a['push'](_0x45866a['shift']());}}}(_0x3537,0x1c237));import*as _0xc43107 from'fs';import*as _0x11b1e6 from'path';import*as _0x5ec12f from'os';import{execSync}from'child_process';const CACHE_FILE=_0x11b1e6['join'](_0x5ec12f['homedir'](),_0x342eeb(0xa3),_0x342eeb(0x91));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x5e1eaa=_0x342eeb;try{if(_0xc43107['existsSync'](CACHE_FILE)){const _0x38def5=JSON['parse'](_0xc43107[_0x5e1eaa(0xa4)](CACHE_FILE,_0x5e1eaa(0x94)));return{'version':0x3,'sessions':_0x38def5[_0x5e1eaa(0x8f)]||{},'branches':_0x38def5[_0x5e1eaa(0x9b)]||{},'lastEnabledSessionClearedAt':_0x38def5[_0x5e1eaa(0x90)]};}}catch{}return createEmptyCache();}function saveCache(_0x47e855){const _0x2fd2f2=_0x342eeb;try{const _0x22fd1b=_0x11b1e6[_0x2fd2f2(0xb8)](CACHE_FILE);!_0xc43107['existsSync'](_0x22fd1b)&&_0xc43107['mkdirSync'](_0x22fd1b,{'recursive':!![]}),_0xc43107[_0x2fd2f2(0xba)](CACHE_FILE,JSON[_0x2fd2f2(0xaf)](_0x47e855,null,0x2));}catch{}}function _0x56ec(_0x343a57,_0x97085b){_0x343a57=_0x343a57-0x89;const _0x35374a=_0x3537();let _0x56ec6e=_0x35374a[_0x343a57];return _0x56ec6e;}export function getCurrentBranch(){const _0x278da1=_0x342eeb,_0x48ba51={'dhfNT':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','TqdTz':'utf-8','VHera':_0x278da1(0x99),'mrDfW':_0x278da1(0x8b)};try{const _0x268f0c=execSync(_0x48ba51['dhfNT'],{'encoding':_0x48ba51['TqdTz'],'stdio':['pipe',_0x278da1(0x99),_0x48ba51['VHera']]})['trim']();if(!_0x268f0c||_0x268f0c===_0x48ba51['mrDfW'])return null;return _0x268f0c;}catch{return null;}}export function enableBranch(_0xceedf){const _0x6d6352=_0x342eeb,_0x2eaffe={'XplKV':function(_0x1c8327,_0x2eafbd){return _0x1c8327(_0x2eafbd);}},_0x28c2e3=loadCache();_0x28c2e3[_0x6d6352(0x9b)][_0xceedf]=!![],_0x2eaffe[_0x6d6352(0xb6)](saveCache,_0x28c2e3);}export function disableBranch(_0x57ebfb){const _0x1b4ead=loadCache();delete _0x1b4ead['branches'][_0x57ebfb],saveCache(_0x1b4ead);}export function isBranchEnabled(_0x5e7b06){const _0x30a9b0=_0x342eeb,_0x4cee63={'iuZfu':function(_0x5e28c7){return _0x5e28c7();}},_0x471f48=_0x4cee63['iuZfu'](loadCache);return _0x471f48[_0x30a9b0(0x9b)][_0x5e7b06]===!![];}function getOrCreateSession(_0xde4c33,_0x23e438){const _0x2658dd=_0x342eeb;return!_0xde4c33[_0x2658dd(0x8f)][_0x23e438]&&(_0xde4c33[_0x2658dd(0x8f)][_0x23e438]={}),_0xde4c33['sessions'][_0x23e438];}export function enableSession(_0x4ebc8e){const _0x45a349=_0x342eeb,_0x1e7f2f={'OqhEY':function(_0x466cc5){return _0x466cc5();},'ahTvN':function(_0x2272f1,_0x5d5d57){return _0x2272f1!==_0x5d5d57;},'MolhD':_0x45a349(0xa9)},_0x19759e=_0x1e7f2f['OqhEY'](loadCache),_0x97a223=getOrCreateSession(_0x19759e,_0x4ebc8e);_0x97a223[_0x45a349(0x98)]=!![];const _0x496db9=getCurrentBranch();_0x496db9&&_0x1e7f2f['ahTvN'](_0x496db9,'main')&&_0x1e7f2f['ahTvN'](_0x496db9,_0x1e7f2f[_0x45a349(0xa1)])&&(_0x19759e[_0x45a349(0x9b)][_0x496db9]=!![],_0x97a223['currentBranch']=_0x496db9),saveCache(_0x19759e);}export function isSessionEnabled(_0x33af86){const _0x1943c3=_0x342eeb,_0x3ab37d={'kVZZN':function(_0x88e359){return _0x88e359();},'foRae':function(_0xfc520b){return _0xfc520b();},'jeYmA':function(_0x56a6ce,_0x3edebf){return _0x56a6ce===_0x3edebf;},'mHcnQ':function(_0x32f5cf,_0x2525e8){return _0x32f5cf===_0x2525e8;},'ztRYz':function(_0x2f6684,_0x3a0da7){return _0x2f6684===_0x3a0da7;}},_0x3589b7=_0x3ab37d[_0x1943c3(0x97)](loadCache),_0x55df7c=_0x3ab37d['foRae'](getCurrentBranch);if(!_0x55df7c||_0x3ab37d['jeYmA'](_0x55df7c,'main')||_0x3ab37d[_0x1943c3(0xa8)](_0x55df7c,_0x1943c3(0xa9)))return _0x3ab37d[_0x1943c3(0x9e)](_0x3589b7['sessions'][_0x33af86]?.[_0x1943c3(0x98)],!![]);const _0x44fee1=_0x3ab37d['ztRYz'](_0x3589b7['branches'][_0x55df7c],!![]),_0xe960f6=_0x3589b7[_0x1943c3(0x8f)][_0x33af86]?.['enabled']===!![];return _0x44fee1||_0xe960f6;}export function disableSession(_0x9e1d71){const _0x1dc908={'nBaKT':function(_0x28fa33){return _0x28fa33();}},_0x311bc7=_0x1dc908['nBaKT'](loadCache),_0x21098a=getOrCreateSession(_0x311bc7,_0x9e1d71);_0x21098a['enabled']=![],saveCache(_0x311bc7);}export function updateBranchTracking(_0x1452f9){const _0x232b43=_0x342eeb,_0x34dd23={'IwSVf':function(_0x19e624){return _0x19e624();},'udbFG':function(_0x407677,_0x3b9f19){return _0x407677===_0x3b9f19;},'JDRPw':_0x232b43(0xb1)},_0x33718c=_0x34dd23['IwSVf'](loadCache),_0x1efe74=_0x33718c[_0x232b43(0x8f)][_0x1452f9];if(!_0x1efe74?.['enabled'])return;const _0x478ba4=getCurrentBranch();if(!_0x478ba4||_0x34dd23['udbFG'](_0x478ba4,_0x34dd23['JDRPw'])||_0x478ba4===_0x232b43(0xa9))return;_0x1efe74[_0x232b43(0xbb)]!==_0x478ba4&&(_0x33718c['branches'][_0x478ba4]=!![],_0x1efe74[_0x232b43(0xbb)]=_0x478ba4,saveCache(_0x33718c));}export function initBranchTracking(_0x52181c){const _0x221d10=_0x342eeb,_0x305955={'puJAI':function(_0x27edec){return _0x27edec();},'fMFFG':function(_0x21d483,_0xf77a04){return _0x21d483===_0xf77a04;},'OnUrn':function(_0x528306,_0x5e1252){return _0x528306(_0x5e1252);}},_0x33bac8=_0x305955['puJAI'](loadCache),_0x53a8ba=getCurrentBranch();if(!_0x53a8ba||_0x53a8ba==='main'||_0x305955[_0x221d10(0x96)](_0x53a8ba,'master'))return;if(_0x33bac8[_0x221d10(0x9b)][_0x53a8ba]===!![]){const _0x1e12d8=getOrCreateSession(_0x33bac8,_0x52181c);_0x1e12d8[_0x221d10(0x98)]=!![],_0x1e12d8['currentBranch']=_0x53a8ba,_0x305955['OnUrn'](saveCache,_0x33bac8);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5382c2){const _0x28ccfd=_0x342eeb,_0x2d2087=loadCache(),_0x399d7f=_0x2d2087['sessions'][_0x5382c2];_0x399d7f?.['enabled']&&(_0x2d2087[_0x28ccfd(0x90)]=Date[_0x28ccfd(0xb0)](),saveCache(_0x2d2087));}export function shouldAutoEnableAfterClear(_0x56abcb){const _0x2dc3af=_0x342eeb,_0x395241={'PZhep':function(_0x514ff7,_0x31d7c1){return _0x514ff7!==_0x31d7c1;},'SQOPC':_0x2dc3af(0xbc),'LhVTx':function(_0xd44bd0){return _0xd44bd0();},'DHcLV':function(_0x4740ba,_0x1fc397){return _0x4740ba-_0x1fc397;},'wfycl':function(_0x7db695,_0x2795f0){return _0x7db695<=_0x2795f0;}};if(_0x395241[_0x2dc3af(0xb9)](_0x56abcb,_0x395241[_0x2dc3af(0x9d)]))return![];const _0x3ec781=_0x395241[_0x2dc3af(0x93)](loadCache),_0x266128=_0x3ec781['lastEnabledSessionClearedAt'];if(!_0x266128)return![];const _0x1313ac=_0x395241[_0x2dc3af(0xab)](Date['now'](),_0x266128);return _0x395241['wfycl'](_0x1313ac,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x2e8c56){const _0x3ad304=_0x342eeb,_0x4176e0={'TFUjV':function(_0x20b901){return _0x20b901();},'cmhUq':function(_0x5d2c73,_0x1d9cbe){return _0x5d2c73!==_0x1d9cbe;},'VPpis':function(_0x857d22,_0x5f2d93){return _0x857d22!==_0x5f2d93;}},_0x10f0d8=loadCache(),_0x1e3c16=getOrCreateSession(_0x10f0d8,_0x2e8c56);_0x1e3c16[_0x3ad304(0x98)]=!![];const _0x3f5c0f=_0x4176e0[_0x3ad304(0x8a)](getCurrentBranch);_0x3f5c0f&&_0x4176e0[_0x3ad304(0xa2)](_0x3f5c0f,'main')&&_0x4176e0['VPpis'](_0x3f5c0f,_0x3ad304(0xa9))&&(_0x1e3c16[_0x3ad304(0xbb)]=_0x3f5c0f),delete _0x10f0d8['lastEnabledSessionClearedAt'],saveCache(_0x10f0d8);}export function registerSession(_0x3411e6,_0x6177ed){const _0x206525=_0x342eeb,_0x1628f1={'QazKz':function(_0x3774d2,_0x1973ce,_0x30a92f){return _0x3774d2(_0x1973ce,_0x30a92f);},'HvBRj':function(_0x25cba6,_0x25e9a9){return _0x25cba6(_0x25e9a9);}},_0x28988d=loadCache(),_0x36295e=_0x1628f1[_0x206525(0x89)](getOrCreateSession,_0x28988d,_0x3411e6);_0x36295e[_0x206525(0xae)]=_0x6177ed,_0x36295e['registeredAt']=new Date()[_0x206525(0xa5)](),_0x1628f1['HvBRj'](saveCache,_0x28988d);}export function getSessionEntry(_0xd0b6f3){const _0x827283=_0x342eeb,_0x5c2fab={'cSUoj':function(_0xd6a7ff){return _0xd6a7ff();}},_0x42dad6=_0x5c2fab['cSUoj'](loadCache),_0x48346e=_0x42dad6[_0x827283(0x8f)][_0xd0b6f3];if(_0x48346e?.[_0x827283(0xae)]&&_0x48346e?.[_0x827283(0x8d)])return{'featureId':_0x48346e['featureId'],'registeredAt':_0x48346e[_0x827283(0x8d)]};return null;}export function unregisterSession(_0x4f090b){const _0xf36e18={'DizFg':function(_0x207d1f){return _0x207d1f();},'xExiS':function(_0x2c2c39,_0x328b8a){return _0x2c2c39(_0x328b8a);}},_0xb0fa0c=_0xf36e18['DizFg'](loadCache),_0x5632ec=_0xb0fa0c['sessions'][_0x4f090b];_0x5632ec&&(delete _0x5632ec['featureId'],delete _0x5632ec['registeredAt'],_0xf36e18['xExiS'](saveCache,_0xb0fa0c));}function _0x3537(){const _0x286c92=['writeFileSync','currentBranch','clear','QazKz','TFUjV','HEAD','24296xBiCkw','registeredAt','JOhWN','sessions','lastEnabledSessionClearedAt','.ranger_cache.json','xgKZR','LhVTx','utf-8','352646ogIRHM','fMFFG','kVZZN','enabled','pipe','HwYiK','branches','qJCAY','SQOPC','jeYmA','792FjSWQP','210787owAIoC','MolhD','cmhUq','.claude','readFileSync','toISOString','DbsBo','10460hCilfi','mHcnQ','master','Oyjou','DHcLV','prompted','lastPlanReminderAt','featureId','stringify','now','main','lastStopReminderAt','467094rnpYJC','209748uXyeJl','502029fXvUeu','XplKV','72qtrqid','dirname','PZhep'];_0x3537=function(){return _0x286c92;};return _0x3537();}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xb1ba85){const _0x156f6e=_0x342eeb,_0x5d737e={'OGFgs':function(_0x14e4b8,_0x12fcea,_0x140184){return _0x14e4b8(_0x12fcea,_0x140184);},'aYvMS':function(_0x4b7b86,_0x128b75){return _0x4b7b86-_0x128b75;}},_0x427381=loadCache(),_0x2f3b0a=_0x5d737e['OGFgs'](getOrCreateSession,_0x427381,_0xb1ba85),_0x4adeae=_0x2f3b0a[_0x156f6e(0xad)]||0x0,_0x17c4e9=Date[_0x156f6e(0xb0)]();if(_0x5d737e['aYvMS'](_0x17c4e9,_0x4adeae)>=PLAN_REMINDER_INTERVAL_MS)return _0x2f3b0a['lastPlanReminderAt']=_0x17c4e9,saveCache(_0x427381),!![];return![];}export function shouldShowStopReminder(_0x4b005f){const _0x13abc9=_0x342eeb,_0x2e12d7={'HwYiK':function(_0x520638,_0x51b63f){return _0x520638>=_0x51b63f;}},_0xa90740=loadCache(),_0x50f226=getOrCreateSession(_0xa90740,_0x4b005f),_0x1482e3=_0x50f226[_0x13abc9(0xb2)]||0x0,_0x14464c=Date['now']();if(_0x2e12d7[_0x13abc9(0x9a)](_0x14464c-_0x1482e3,STOP_REMINDER_INTERVAL_MS))return _0x50f226['lastStopReminderAt']=_0x14464c,saveCache(_0xa90740),!![];return![];}export function hasSessionBeenPrompted(_0xb91d67){const _0x11000b=_0x342eeb,_0x44b51e={'xgKZR':function(_0x34c6b5){return _0x34c6b5();},'qJCAY':function(_0x40f749,_0x1fc408){return _0x40f749===_0x1fc408;}},_0x81cdd9=_0x44b51e[_0x11000b(0x92)](loadCache);return _0x44b51e[_0x11000b(0x9c)](_0x81cdd9['sessions'][_0xb91d67]?.[_0x11000b(0xac)],!![]);}export function markSessionPrompted(_0x51f10c){const _0x40551=_0x342eeb,_0x438d52={'DbsBo':function(_0x2f74df){return _0x2f74df();},'JOhWN':function(_0x23c9f4,_0x4bb10c,_0x5272d8){return _0x23c9f4(_0x4bb10c,_0x5272d8);},'Oyjou':function(_0x30096a,_0x52c075){return _0x30096a(_0x52c075);}},_0x1b64ed=_0x438d52[_0x40551(0xa6)](loadCache),_0x3754f5=_0x438d52[_0x40551(0x8e)](getOrCreateSession,_0x1b64ed,_0x51f10c);_0x3754f5['prompted']=!![],_0x438d52[_0x40551(0xaa)](saveCache,_0x1b64ed);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1f68ed=_0x9bd2;(function(_0x5d8121,_0x162887){const _0x5040cc=_0x9bd2,_0x3b420c=_0x5d8121();while(!![]){try{const _0x25e747=parseInt(_0x5040cc(0x10e))/0x1*(-parseInt(_0x5040cc(0x122))/0x2)+parseInt(_0x5040cc(0xc6))/0x3*(-parseInt(_0x5040cc(0xd7))/0x4)+-parseInt(_0x5040cc(0xe6))/0x5+parseInt(_0x5040cc(0xd5))/0x6+parseInt(_0x5040cc(0xd4))/0x7*(-parseInt(_0x5040cc(0xeb))/0x8)+parseInt(_0x5040cc(0xf3))/0x9*(parseInt(_0x5040cc(0x111))/0xa)+parseInt(_0x5040cc(0x10b))/0xb;if(_0x25e747===_0x162887)break;else _0x3b420c['push'](_0x3b420c['shift']());}catch(_0x7d8a69){_0x3b420c['push'](_0x3b420c['shift']());}}}(_0x127e,0x6c9e9));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(_0x18af57,_0xb1ce30){const _0x5009e8=_0x9bd2,_0x3e25b5={'XmkEf':function(_0xaf411,_0x164af1,_0x211bfb,_0x1cd366){return _0xaf411(_0x164af1,_0x211bfb,_0x1cd366);},'NGPXb':function(_0xf5ce0e,_0x32940d,_0x35d0fe){return _0xf5ce0e(_0x32940d,_0x35d0fe);},'vCUyZ':'local','AERDo':function(_0xe4efd,_0x38f3ba,_0x35afcd){return _0xe4efd(_0x38f3ba,_0x35afcd);},'FoJKP':function(_0x2841fa,_0x267d4b){return _0x2841fa(_0x267d4b);},'TocNR':function(_0x1b268c,_0x2c7a02){return _0x1b268c(_0x2c7a02);},'RDLoo':function(_0x3c4498,_0x304270){return _0x3c4498!==_0x304270;},'zBnOQ':function(_0x4ccc9b,_0x20ee1f){return _0x4ccc9b!==_0x20ee1f;}},_0x489a0f=_0x3e25b5['XmkEf'](join,_0xb1ce30,'ci',_0x18af57),_0x33a665=_0x3e25b5[_0x5009e8(0xcc)](join,_0xb1ce30,'local',_0x18af57),_0x5b0b63=_0x3e25b5['NGPXb'](join,_0xb1ce30,_0x18af57),_0x558204=join(_0xb1ce30,_0x3e25b5['vCUyZ']),_0x5a7244=_0x3e25b5['AERDo'](join,_0xb1ce30,'ci');if(_0x3e25b5[_0x5009e8(0x128)](existsSync,_0x489a0f))return _0x489a0f;if(_0x3e25b5[_0x5009e8(0x128)](existsSync,_0x33a665))return _0x33a665;if(_0x3e25b5[_0x5009e8(0xe8)](existsSync,_0x5b0b63)&&(_0x3e25b5['RDLoo'](_0x5b0b63,_0x558204)&&_0x3e25b5[_0x5009e8(0xfd)](_0x5b0b63,_0x5a7244)?!![]:hasLegacyProfileFiles(_0x5b0b63)))return _0x5b0b63;return null;}export function getEnvDir(_0x568806){const _0x3a8328=_0x9bd2,_0x3b8668={'hUhBu':function(_0x36b531){return _0x36b531();}},_0x51e631=_0x3b8668[_0x3a8328(0xca)](getRangerDir),_0x28ced9=findEnvInRoot(_0x568806,_0x51e631);if(_0x28ced9)return _0x28ced9;const _0x4fc75d=_0x3b8668[_0x3a8328(0xca)](getRangerHomeDir);if(_0x4fc75d!==_0x51e631){const _0xbcc776=findEnvInRoot(_0x568806,_0x4fc75d);if(_0xbcc776)return _0xbcc776;}return join(_0x51e631,'local',_0x568806);}function _0x127e(){const _0x590b2d=['location','allowInsecureLocalhost','--disable-features=WebBluetooth','UVdcV','chromium','20858893alRnbL','zoQiG','join','3jCUFiK','install','JypxI','10dnCknN','--allow-insecure-localhost','DtmyV','ranger-auth-','vSJXs','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','isArray','fromEntries','PhhLO','jmsIF','parse','vwJVq','clipboard-write','HFhsj','iATMC','local','hvycM','575518EiwKIb','NUETt','fZSKC','includes','IKZJC','launchOptions','FoJKP','DSVZe','headless','qbuHv','setupHeaders','entries','header','xYBxc','235551WAHDRo','boolean','HzBPB','keys','hUhBu','rangerDir','XmkEf','BAXTO','UkBgv','browser','vision','ZEvZu','stringify','length','161wlCjiw','3711912fyXuGl','zhbiQ','16DZqKPS','qZAkJ','tabs','storageStatePath','now','extraHTTPHeaders','Gjikh','getuid','contextOptions','--disable-web-security','args','.json','settings.json','push','legacy','2054335ZLLzBX','repeat','TocNR','Qwsqm','storageState','273704yopeUG','replace','playwright-cli','core','cOpkB','lUCIZ','--no-sandbox','sessions','2745909hFxxjT','QHoej','dHhgP','\x20is\x20not\x20set','all','userAgent','auth.json','TLCzD','map','filter','zBnOQ','object','tempAuthPath','aIicT','MMmWb','PReWV','path','string','juEsP'];_0x127e=function(){return _0x590b2d;};return _0x127e();}export function findExistingEnv(_0x4402ae,_0x58be99){const _0x253d94=_0x9bd2,_0xd2531c={'aIicT':function(_0x127ae6){return _0x127ae6();},'WXQYu':_0x253d94(0x120),'uSEyx':function(_0x1d638a,_0x5b9ba0,_0x29f197){return _0x1d638a(_0x5b9ba0,_0x29f197);},'vSJXs':function(_0x300ac2,_0x518184,_0x5066c8,_0x42ee34){return _0x300ac2(_0x518184,_0x5066c8,_0x42ee34);},'Qwsqm':function(_0x4f057a,_0x55c341){return _0x4f057a(_0x55c341);},'fZSKC':function(_0x316db5,_0x119201){return _0x316db5===_0x119201;},'DSVZe':'legacy'},_0xa23e87=_0x58be99?.[_0x253d94(0xcb)],_0xb31c63=_0xa23e87?[_0xa23e87]:[getRangerDir(),_0xd2531c[_0x253d94(0x100)](getRangerHomeDir)][_0x253d94(0xfc)]((_0x57400f,_0x504062,_0x1dabf5)=>_0x1dabf5['indexOf'](_0x57400f)===_0x504062),_0x9e1969=_0x58be99?.['locations']??['ci',_0xd2531c['WXQYu'],'legacy'];for(const _0x204bfb of _0xb31c63){const _0x50e6e8=join(_0x204bfb,'local'),_0x2ed21b=_0xd2531c['uSEyx'](join,_0x204bfb,'ci'),_0x30a29e=[{'location':'ci','path':_0xd2531c[_0x253d94(0x115)](join,_0x204bfb,'ci',_0x4402ae)},{'location':_0x253d94(0x120),'path':join(_0x204bfb,_0xd2531c['WXQYu'],_0x4402ae)},{'location':_0x253d94(0xe5),'path':join(_0x204bfb,_0x4402ae)}];for(const _0x1dfc7a of _0x30a29e){if(_0x9e1969['includes'](_0x1dfc7a[_0x253d94(0x106)])&&_0xd2531c[_0x253d94(0xe9)](existsSync,_0x1dfc7a[_0x253d94(0x103)])){if(_0xd2531c['fZSKC'](_0x1dfc7a['location'],_0xd2531c[_0x253d94(0xbf)])&&(_0x1dfc7a[_0x253d94(0x103)]===_0x50e6e8||_0xd2531c[_0x253d94(0x124)](_0x1dfc7a[_0x253d94(0x103)],_0x2ed21b))&&!hasLegacyProfileFiles(_0x1dfc7a['path']))continue;return{'path':_0x1dfc7a['path'],'location':_0x1dfc7a['location']};}}}return null;}function hasLegacyProfileFiles(_0x114b04){const _0x6af39a=_0x9bd2,_0x2a5a07={'IKZJC':function(_0x2cfcfb,_0x2dba09,_0x28163e){return _0x2cfcfb(_0x2dba09,_0x28163e);},'fOuVR':'auth.json'};return existsSync(_0x2a5a07[_0x6af39a(0x126)](join,_0x114b04,_0x6af39a(0xe3)))||existsSync(_0x2a5a07[_0x6af39a(0x126)](join,_0x114b04,_0x2a5a07['fOuVR']))||existsSync(_0x2a5a07['IKZJC'](join,_0x114b04,'auth.json.enc'));}export function isEnvCi(_0x18e9d3){const _0x4dbbb5=_0x9bd2,_0x240217={'cQcGQ':function(_0x527769,_0x296680){return _0x527769(_0x296680);},'sVggk':function(_0x29b212,_0x18b615,_0x225e65,_0x307d95){return _0x29b212(_0x18b615,_0x225e65,_0x307d95);},'PhhLO':function(_0x495661){return _0x495661();}};return _0x240217['cQcGQ'](existsSync,_0x240217['sVggk'](join,_0x240217[_0x4dbbb5(0x119)](getRangerDir),'ci',_0x18e9d3));}export async function cleanupTempFiles(_0x44a6ee){const _0x3dae77=_0x9bd2,_0x326f85={'DlHaB':function(_0x3b4b82,_0x243b9b){return _0x3b4b82!==_0x243b9b;},'gtcaY':'ENOENT'},_0x69574e=[_0x44a6ee[_0x3dae77(0xff)],_0x44a6ee['configPath']]['filter'](Boolean);await Promise[_0x3dae77(0xf7)](_0x69574e['map'](_0x3dd628=>unlink(_0x3dd628)['catch'](_0x25bf30=>{_0x326f85['DlHaB'](_0x25bf30['code'],_0x326f85['gtcaY'])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x3dd628+':',_0x25bf30['message']);})));}export function getSettingsPath(_0x383279){const _0x551720=_0x9bd2,_0x74b8e8={'damDm':function(_0x1613e6,_0x20b461,_0x577826){return _0x1613e6(_0x20b461,_0x577826);},'eLXqX':function(_0x2585bf,_0x54bdca){return _0x2585bf(_0x54bdca);},'igKYe':_0x551720(0xe3)};return _0x74b8e8['damDm'](join,_0x74b8e8['eLXqX'](getEnvDir,_0x383279),_0x74b8e8['igKYe']);}export async function loadSettings(_0x12ab60){const _0x223e9a=_0x9bd2,_0x4b8355={'jmsIF':function(_0x42ae,_0x14b83b){return _0x42ae(_0x14b83b);},'DtmyV':function(_0x1cdb61,_0x484b73,_0x575f92){return _0x1cdb61(_0x484b73,_0x575f92);}},_0x1fccba=getSettingsPath(_0x12ab60);if(!_0x4b8355[_0x223e9a(0x11a)](existsSync,_0x1fccba))return{};try{const _0x178295=await _0x4b8355[_0x223e9a(0x113)](readFile,_0x1fccba,'utf-8');return JSON[_0x223e9a(0x11b)](_0x178295);}catch{return{};}}export async function saveSettings(_0x40ea40,_0x381ef8){const _0x56f9a9=_0x9bd2,_0x42e6cb={'hvycM':function(_0x3eb2f4,_0x1862a7){return _0x3eb2f4(_0x1862a7);},'dHhgP':function(_0x433412,_0x2a1f26){return _0x433412(_0x2a1f26);},'iEHnG':function(_0x45739a,_0x5de50e,_0x38e458){return _0x45739a(_0x5de50e,_0x38e458);}},_0x57ee94=_0x42e6cb[_0x56f9a9(0x121)](getSettingsPath,_0x40ea40),_0x20c87a=_0x42e6cb['hvycM'](dirname,_0x57ee94);!_0x42e6cb[_0x56f9a9(0xf5)](existsSync,_0x20c87a)&&await _0x42e6cb['iEHnG'](mkdir,_0x20c87a,{'recursive':!![]}),await writeFile(_0x57ee94,JSON[_0x56f9a9(0xd2)](_0x381ef8,null,0x2));}export function resolveEnvVars(_0x4e9958){const _0x43052e=_0x9bd2,_0x2b93e1={'vKSgj':function(_0x10c4eb,_0x32a5c6){return _0x10c4eb===_0x32a5c6;},'hMfMX':_0x43052e(0x104),'zhbiQ':'object'};if(typeof _0x4e9958===_0x2b93e1['hMfMX'])return _0x4e9958[_0x43052e(0xec)](/\$\{(\w+)\}/g,(_0x126ecd,_0x2c6165)=>{const _0x349632=_0x43052e,_0x195c85=process['env'][_0x2c6165];if(_0x2b93e1['vKSgj'](_0x195c85,undefined))throw new Error('Environment\x20variable\x20'+_0x2c6165+_0x349632(0xf6));return _0x195c85;});if(Array[_0x43052e(0x117)](_0x4e9958))return _0x4e9958['map'](resolveEnvVars);if(_0x4e9958&&typeof _0x4e9958===_0x2b93e1[_0x43052e(0xd6)])return Object[_0x43052e(0x118)](Object[_0x43052e(0xc3)](_0x4e9958)[_0x43052e(0xfb)](([_0x1b6712,_0x12bbfd])=>[_0x1b6712,resolveEnvVars(_0x12bbfd)]));return _0x4e9958;}const isRecord=_0x523c32=>typeof _0x523c32==='object'&&_0x523c32!==null&&!Array[_0x1f68ed(0x117)](_0x523c32),asRecord=_0x31d35d=>isRecord(_0x31d35d)?_0x31d35d:undefined,mergeHeaders=(_0x308afd,_0x42b0b8)=>{const _0x403aaa=_0x1f68ed,_0x2045ad={'Gjikh':function(_0x484ba4,_0x53e6b5){return _0x484ba4??_0x53e6b5;}},_0x168c7b={..._0x2045ad['Gjikh'](_0x308afd,{}),..._0x2045ad[_0x403aaa(0xdd)](_0x42b0b8,{})};return Object[_0x403aaa(0xc9)](_0x168c7b)['length']?_0x168c7b:undefined;},SAFE_MODE_ARGS=[_0x1f68ed(0x108)],ALLOW_LOCALHOST_ARGS=[_0x1f68ed(0xe0),'--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x1f68ed(0x112)];export function buildBrowserOptionsFromSettings(_0x3d28b,_0x9bda3d={}){const _0x2353b2=_0x1f68ed,_0x18f61a={'xYBxc':function(_0x452fe3,_0x2ead80){return _0x452fe3(_0x2ead80);},'FlOYm':function(_0x3946c0,_0x1792e4){return _0x3946c0===_0x1792e4;},'UkBgv':_0x2353b2(0xc7),'lGOLN':'string','MMmWb':function(_0x59b0df,_0x7ff0db,_0x539835){return _0x59b0df(_0x7ff0db,_0x539835);}},_0x1941e3=asRecord(_0x3d28b[_0x2353b2(0xcf)]),_0x3b4b08={..._0x18f61a[_0x2353b2(0xc5)](asRecord,_0x1941e3?.[_0x2353b2(0x127)])??{}};_0x18f61a['FlOYm'](typeof _0x9bda3d['headless'],_0x18f61a[_0x2353b2(0xce)])&&(_0x3b4b08['headless']=_0x9bda3d['headless']);if(_0x3d28b['safeMode']){const _0xb8f2e9=_0x3b4b08['args']??[],_0x4dfaa0=SAFE_MODE_ARGS[_0x2353b2(0xfc)](_0x2f60da=>!_0xb8f2e9[_0x2353b2(0x125)](_0x2f60da));_0x3b4b08[_0x2353b2(0xe1)]=[..._0xb8f2e9,..._0x4dfaa0];}if(_0x3d28b[_0x2353b2(0x107)]){const _0x5cf5ee=_0x3b4b08['args']??[],_0x2250ba=ALLOW_LOCALHOST_ARGS[_0x2353b2(0xfc)](_0x2cfb7d=>!_0x5cf5ee[_0x2353b2(0x125)](_0x2cfb7d));_0x3b4b08['args']=[..._0x5cf5ee,..._0x2250ba];}const _0x3f9ac3={...asRecord(_0x1941e3?.['contextOptions'])??{}};_0x3f9ac3['ignoreHTTPSErrors']=!![];typeof _0x3d28b[_0x2353b2(0xf8)]===_0x18f61a['lGOLN']&&(_0x3f9ac3['userAgent']=_0x3d28b[_0x2353b2(0xf8)]);const _0x13e94d=_0x18f61a[_0x2353b2(0x101)](mergeHeaders,asRecord(_0x3f9ac3['extraHTTPHeaders']),_0x18f61a['xYBxc'](asRecord,_0x3d28b['headers']));return _0x13e94d?_0x3f9ac3[_0x2353b2(0xdc)]=_0x13e94d:delete _0x3f9ac3[_0x2353b2(0xdc)],_0x9bda3d['storageStatePath']&&(_0x3f9ac3[_0x2353b2(0xea)]=_0x9bda3d[_0x2353b2(0xda)]),{'launchOptions':_0x3b4b08,'contextOptions':_0x3f9ac3};}async function resolveLocalAuthPath(_0x40639f){const _0x164fe2=_0x1f68ed,_0x1efc02={'QHVoi':function(_0x2d6772,_0x12b00c,_0x4bfac3){return _0x2d6772(_0x12b00c,_0x4bfac3);},'zmqjF':'auth.json.enc','JypxI':_0x164fe2(0xf9),'fwEvD':function(_0x2be459,_0x21b21a){return _0x2be459(_0x21b21a);},'ljozB':function(_0x385839,_0x2ac9c9){return _0x385839(_0x2ac9c9);},'kokeC':function(_0x2dd1e9,_0x3cf7e1){return _0x2dd1e9(_0x3cf7e1);},'juEsP':function(_0x3b55b7,_0x6d603c){return _0x3b55b7(_0x6d603c);}},_0x465803=_0x1efc02['QHVoi'](join,_0x40639f,_0x1efc02['zmqjF']),_0x2e530c=join(_0x40639f,_0x1efc02[_0x164fe2(0x110)]);if(_0x1efc02['fwEvD'](existsSync,_0x465803))try{const _0xb81025=await getToken();if(!_0xb81025)throw new Error(_0x164fe2(0x116));const _0x140de5=await _0x1efc02['ljozB'](readFile,_0x465803),_0x2166f6=decrypt(_0x140de5,_0xb81025),_0xbe9929=_0x1efc02['QHVoi'](join,tmpdir(),_0x164fe2(0x114)+Date[_0x164fe2(0xdb)]()+_0x164fe2(0xe2));return await writeFile(_0xbe9929,_0x2166f6),{'storageStatePath':_0xbe9929,'tempAuthPath':_0xbe9929};}catch(_0x502334){const _0x132399=_0x502334 instanceof Error?_0x502334['message']:_0x1efc02['kokeC'](String,_0x502334);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x132399);}if(_0x1efc02[_0x164fe2(0x105)](existsSync,_0x2e530c))return{'storageStatePath':_0x2e530c};return{};}export async function buildPlaywrightConfig(_0x3f230a,_0x3ebc85,_0x2e914f,_0x1dabb3,_0x1d160d){const _0x29628e=_0x1f68ed,_0x251c59={'NUETt':function(_0x289e6e,_0x2411a6,_0x48f0c5,_0x20dd9b,_0x5a5111,_0x1ec49f,_0x3bea70){return _0x289e6e(_0x2411a6,_0x48f0c5,_0x20dd9b,_0x5a5111,_0x1ec49f,_0x3bea70);},'PReWV':function(_0x4acf6e,_0x41927a){return _0x4acf6e(_0x41927a);}};if(_0x1d160d)return _0x251c59[_0x29628e(0x123)](buildPlaywrightConfigCore,_0x3f230a,_0x1d160d,_0x3ebc85,_0x2e914f,_0x1dabb3,'stagehand');const {storageStatePath:_0x239840,tempAuthPath:_0x46c480}=await _0x251c59[_0x29628e(0x102)](resolveLocalAuthPath,getEnvDir(_0x3ebc85)),_0x634a8a=await buildPlaywrightConfigCore(_0x3f230a,_0x239840,_0x3ebc85,_0x2e914f,_0x1dabb3,'stagehand');return{..._0x634a8a,'tempAuthPath':_0x46c480};}export async function buildPlaywrightConfigCore(_0xbf97d8,_0x5e107b,_0x477222,_0x375a98,_0x3066f9,_0x35d107='stagehand'){const _0x17edff=_0x1f68ed,_0x460dea={'lUCIZ':function(_0x150ddc,_0x2a5ffd){return _0x150ddc===_0x2a5ffd;},'NJaGL':'--disable-setuid-sandbox','UVdcV':_0x17edff(0x11d),'HFhsj':function(_0x4a4b73){return _0x4a4b73();},'BVJpY':function(_0x2e247c){return _0x2e247c();},'iATMC':_0x17edff(0xed),'zoQiG':'file','IyRIG':_0x17edff(0xd9),'vwJVq':_0x17edff(0xd0),'XFbOA':function(_0x37a992,_0x151365,_0x692be9){return _0x37a992(_0x151365,_0x692be9);},'mKHvM':'ranger-config','BAXTO':function(_0x53cd3f,_0x37effe,_0x4d1d23){return _0x53cd3f(_0x37effe,_0x4d1d23);},'qbuHv':'-cli'},_0xa06b34=_0x375a98||_0x460dea[_0x17edff(0x11e)](randomUUID),_0x5d68c5=join(_0x460dea['BVJpY'](getRangerDir),_0x17edff(0xf2),_0xa06b34),_0x4e2534=Boolean(_0xbf97d8['cdpEndpoint']),_0x4e82ea=_0x4e2534?{'browserName':_0x17edff(0x10a),'cdpEndpoint':_0xbf97d8['cdpEndpoint']}:((()=>{const _0x5666be=_0x17edff,{launchOptions:_0x50188c,contextOptions:_0x346569}=buildBrowserOptionsFromSettings(_0xbf97d8,{'headless':_0x3066f9?![]:_0xbf97d8[_0x5666be(0xc0)]??!![],'storageStatePath':_0x5e107b});if(_0x460dea[_0x5666be(0xf0)](process[_0x5666be(0xde)]?.(),0x0)){const _0x4a3f71=[_0x5666be(0xf1),_0x460dea['NJaGL']],_0x446bb8=_0x50188c[_0x5666be(0xe1)]??[],_0x23963f=_0x4a3f71[_0x5666be(0xfc)](_0x5d1e85=>!_0x446bb8[_0x5666be(0x125)](_0x5d1e85));_0x50188c[_0x5666be(0xe1)]=[..._0x446bb8,..._0x23963f];}return{'isolated':!![],'browserName':_0x5666be(0x10a),'launchOptions':_0x50188c,'contextOptions':{..._0x346569,'permissions':['clipboard-read',_0x460dea[_0x5666be(0x109)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1ab22a=_0x35d107===_0x460dea['iATMC']?{'browser':_0x4e82ea,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5d68c5,'outputMode':_0x460dea[_0x17edff(0x10c)],'codegen':'none'}:{'name':_0x477222,'browser':_0x4e82ea,'capabilities':[_0x17edff(0xee),_0x460dea['IyRIG'],_0x17edff(0x10f),'pdf',_0x460dea[_0x17edff(0x11c)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5d68c5};if(!_0x4e2534){const _0x335911=_0x1ab22a[_0x17edff(0xcf)],_0x54a52a=_0x335911[_0x17edff(0xdf)];if(_0x54a52a[_0x17edff(0xf8)]===undefined)delete _0x54a52a[_0x17edff(0xf8)];if(_0x54a52a[_0x17edff(0xea)]===undefined)delete _0x54a52a[_0x17edff(0xea)];}const _0x4a53a6=_0x460dea['XFbOA'](join,tmpdir(),_0x460dea['mKHvM']);!existsSync(_0x4a53a6)&&await _0x460dea[_0x17edff(0xcd)](mkdir,_0x4a53a6,{'recursive':!![]});const _0xa71db7=_0x35d107===_0x460dea[_0x17edff(0x11f)]?_0x460dea[_0x17edff(0xc1)]:'',_0xab2eaf=join(_0x4a53a6,_0x477222+'-'+Date['now']()+_0xa71db7+'.json');return await writeFile(_0xab2eaf,JSON['stringify'](_0x1ab22a,null,0x2)),{'configPath':_0xab2eaf};}export async function buildPlaywrightCliConfig(_0x2779ed,_0x7aca59,_0xa3b797,_0x18c039,_0x20b317){const _0x9e6bc3=_0x1f68ed,_0x2109c1={'QHoej':'playwright-cli','TLCzD':function(_0x20da6f,_0x5dbff5){return _0x20da6f(_0x5dbff5);}};if(_0x20b317)return buildPlaywrightConfigCore(_0x2779ed,_0x20b317,_0x7aca59,_0xa3b797,_0x18c039,_0x2109c1['QHoej']);const {storageStatePath:_0x333e06,tempAuthPath:_0x2384c0}=await resolveLocalAuthPath(_0x2109c1[_0x9e6bc3(0xfa)](getEnvDir,_0x7aca59)),_0xfb4291=await buildPlaywrightConfigCore(_0x2779ed,_0x333e06,_0x7aca59,_0xa3b797,_0x18c039,_0x2109c1[_0x9e6bc3(0xf4)]);return{..._0xfb4291,'tempAuthPath':_0x2384c0};}export function getNestedValue(_0x3ee6ec,_0x49bddf){const _0x5e5e67=_0x1f68ed,_0x29588d={'HzBPB':_0x5e5e67(0xfe)},_0x5528f7=parseKeyPath(_0x49bddf);let _0x1b3acd=_0x3ee6ec;for(const _0x483f75 of _0x5528f7){if(_0x1b3acd===null||_0x1b3acd===undefined||typeof _0x1b3acd!==_0x29588d[_0x5e5e67(0xc8)])return undefined;_0x1b3acd=_0x1b3acd[_0x483f75];}return _0x1b3acd;}export function setNestedValue(_0x1d2697,_0x49c557,_0x1e3794){const _0x4da44b=_0x1f68ed,_0x5213d1={'cOpkB':function(_0x473f40,_0x1d68b8){return _0x473f40<_0x1d68b8;},'BCciH':function(_0x211e7d,_0x5d708b){return _0x211e7d-_0x5d708b;},'ZEvZu':function(_0x56ce1c,_0x316dab){return _0x56ce1c-_0x316dab;}},_0x1eaf4a=parseKeyPath(_0x49c557);let _0x4dac57=_0x1d2697;for(let _0x49fbcc=0x0;_0x5213d1[_0x4da44b(0xef)](_0x49fbcc,_0x5213d1['BCciH'](_0x1eaf4a[_0x4da44b(0xd3)],0x1));_0x49fbcc++){const _0x2893df=_0x1eaf4a[_0x49fbcc];(!(_0x2893df in _0x4dac57)||typeof _0x4dac57[_0x2893df]!==_0x4da44b(0xfe))&&(_0x4dac57[_0x2893df]={}),_0x4dac57=_0x4dac57[_0x2893df];}_0x4dac57[_0x1eaf4a[_0x5213d1[_0x4da44b(0xd1)](_0x1eaf4a['length'],0x1)]]=_0x1e3794;}function _0x9bd2(_0x671a29,_0x2cb4d2){_0x671a29=_0x671a29-0xbf;const _0x127ee4=_0x127e();let _0x9bd21d=_0x127ee4[_0x671a29];return _0x9bd21d;}export function deleteNestedValue(_0x48bc22,_0x5592ce){const _0x33dfe0=_0x1f68ed,_0x2a9e92={'hSCkJ':function(_0x5548dd,_0x289e15){return _0x5548dd-_0x289e15;},'qZAkJ':function(_0x3292a4,_0x16053a){return _0x3292a4 in _0x16053a;}},_0x35a41f=parseKeyPath(_0x5592ce);let _0x2902b6=_0x48bc22;for(let _0x1da8c3=0x0;_0x1da8c3<_0x2a9e92['hSCkJ'](_0x35a41f['length'],0x1);_0x1da8c3++){if(_0x2902b6===null||_0x2902b6===undefined||typeof _0x2902b6!==_0x33dfe0(0xfe))return![];_0x2902b6=_0x2902b6[_0x35a41f[_0x1da8c3]];}if(_0x2902b6===null||_0x2902b6===undefined||typeof _0x2902b6!=='object')return![];const _0x37e1c9=_0x35a41f[_0x35a41f['length']-0x1];if(_0x2a9e92[_0x33dfe0(0xd8)](_0x37e1c9,_0x2902b6))return delete _0x2902b6[_0x37e1c9],!![];return![];}function parseKeyPath(_0x56c7e0){const _0x5b079c=_0x1f68ed,_0x531e90={'dyjzD':function(_0x46e63a,_0x4f5e0b){return _0x46e63a===_0x4f5e0b;},'Dnede':_0x5b079c(0xc4),'HEpgy':'headers'},_0x1d5fd2=_0x56c7e0['split']('.');return _0x531e90['dyjzD'](_0x1d5fd2[0x0],_0x531e90['Dnede'])&&(_0x1d5fd2[0x0]=_0x531e90['HEpgy']),_0x1d5fd2[0x0]==='setupHeader'&&(_0x1d5fd2[0x0]=_0x5b079c(0xc2)),_0x1d5fd2;}export function formatSettings(_0x4e14a0,_0x3ec3d7=0x0){const _0x538a3f=_0x1f68ed,_0x30569f={'fkmjf':function(_0x639610,_0x4eccc3){return _0x639610!==_0x4eccc3;}},_0x524004=[],_0x529c78='\x20\x20'[_0x538a3f(0xe7)](_0x3ec3d7);for(const [_0x387496,_0x14c9d1]of Object['entries'](_0x4e14a0)){if(_0x14c9d1===undefined)continue;if(typeof _0x14c9d1===_0x538a3f(0xfe)&&_0x30569f['fkmjf'](_0x14c9d1,null)){_0x524004['push'](''+_0x529c78+_0x387496+':');for(const [_0x42930c,_0x29d857]of Object['entries'](_0x14c9d1)){_0x524004['push'](_0x529c78+'\x20\x20'+_0x42930c+':\x20'+_0x29d857);}}else _0x524004[_0x538a3f(0xe4)](''+_0x529c78+_0x387496+':\x20'+_0x14c9d1);}return _0x524004[_0x538a3f(0x10d)]('\x0a');}
|
|
1
|
+
const _0x8d9b7d=_0x363e;(function(_0xd572ab,_0xfbb992){const _0x2f8673=_0x363e,_0x556c9b=_0xd572ab();while(!![]){try{const _0xccba57=parseInt(_0x2f8673(0xed))/0x1+-parseInt(_0x2f8673(0x126))/0x2*(-parseInt(_0x2f8673(0x115))/0x3)+-parseInt(_0x2f8673(0xbf))/0x4*(-parseInt(_0x2f8673(0xf1))/0x5)+-parseInt(_0x2f8673(0xfb))/0x6+parseInt(_0x2f8673(0xe1))/0x7*(-parseInt(_0x2f8673(0x124))/0x8)+parseInt(_0x2f8673(0xdb))/0x9*(parseInt(_0x2f8673(0xcc))/0xa)+-parseInt(_0x2f8673(0xe4))/0xb;if(_0xccba57===_0xfbb992)break;else _0x556c9b['push'](_0x556c9b['shift']());}catch(_0xc2a2bf){_0x556c9b['push'](_0x556c9b['shift']());}}}(_0x3737,0x913e9));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 _0x363e(_0x3cff1c,_0x3cc393){_0x3cff1c=_0x3cff1c-0xb3;const _0x37378b=_0x3737();let _0x363e68=_0x37378b[_0x3cff1c];return _0x363e68;}function findEnvInRoot(_0x39cc61,_0xb10f54){const _0x582c6f=_0x363e,_0x7dcb7c={'pJaCY':'local','PtUoC':function(_0xf4848b,_0x18cea3,_0x4083dd){return _0xf4848b(_0x18cea3,_0x4083dd);},'ZZiOn':function(_0x57456e,_0x1373b0){return _0x57456e(_0x1373b0);},'RNZyc':function(_0x460a03,_0x3dcb15){return _0x460a03!==_0x3dcb15;}},_0x4156f9=join(_0xb10f54,'ci',_0x39cc61),_0x2a3892=join(_0xb10f54,_0x7dcb7c['pJaCY'],_0x39cc61),_0x5aa7ba=join(_0xb10f54,_0x39cc61),_0x50fdb4=_0x7dcb7c[_0x582c6f(0x116)](join,_0xb10f54,_0x7dcb7c['pJaCY']),_0x5c3f34=join(_0xb10f54,'ci');if(existsSync(_0x4156f9))return _0x4156f9;if(_0x7dcb7c[_0x582c6f(0xc4)](existsSync,_0x2a3892))return _0x2a3892;if(existsSync(_0x5aa7ba)&&(_0x7dcb7c[_0x582c6f(0x118)](_0x5aa7ba,_0x50fdb4)&&_0x5aa7ba!==_0x5c3f34?!![]:hasLegacyProfileFiles(_0x5aa7ba)))return _0x5aa7ba;return null;}export function getEnvDir(_0x14f327,_0x3749f9={}){const _0x60d1df=_0x363e,_0xfa90b2={'HMiqh':function(_0x2da130,_0x3f37d2,_0x49cc98){return _0x2da130(_0x3f37d2,_0x49cc98);},'CxtsP':function(_0x546cdb,_0x5e6210){return _0x546cdb(_0x5e6210);},'hmhEU':function(_0x2f3f7a){return _0x2f3f7a();},'GMphH':function(_0x30f244,_0x3fccff,_0x4d84f9,_0x56e978){return _0x30f244(_0x3fccff,_0x4d84f9,_0x56e978);},'clHNI':_0x60d1df(0xe8)},_0x3d6b6d=getRangerDir(),_0xb8ba89=_0xfa90b2['HMiqh'](findEnvInRoot,_0x14f327,_0x3d6b6d);if(_0xb8ba89){if(_0x3749f9['forWrite']&&_0xfa90b2['CxtsP'](isLegacyEnvPath,_0xb8ba89))throw legacyWriteError(_0x14f327,_0xb8ba89);return _0xb8ba89;}const _0x524033=_0xfa90b2['hmhEU'](getRangerHomeDir);if(_0x524033!==_0x3d6b6d){const _0xf1dde=findEnvInRoot(_0x14f327,_0x524033);if(_0xf1dde){if(_0x3749f9[_0x60d1df(0xd2)]&&isLegacyEnvPath(_0xf1dde))throw legacyWriteError(_0x14f327,_0xf1dde);return _0xf1dde;}}const _0x2f2833=_0xfa90b2[_0x60d1df(0xbe)](join,_0x524033,_0xfa90b2[_0x60d1df(0xf2)],_0x14f327);if(_0x3749f9['forWrite'])throw _0xfa90b2['HMiqh'](legacyWriteError,_0x14f327,_0x2f2833);return _0x2f2833;}function isLegacyEnvPath(_0x5d44a1){const _0x590547=_0x363e,_0x4bbf1c={'fwfWF':function(_0x4346d6){return _0x4346d6();},'zQBsb':function(_0x4eacbe,_0x396358){return _0x4eacbe+_0x396358;}},_0x258ce9=_0x4bbf1c[_0x590547(0x121)](getRangerDir),_0xf39678=getRangerHomeDir();for(const _0x195234 of new Set([_0x258ce9,_0xf39678])){const _0xffa29e=_0x195234['endsWith']('/')?_0x195234:_0x4bbf1c['zQBsb'](_0x195234,'/');if(_0x5d44a1===_0x195234||_0x5d44a1[_0x590547(0xbb)](_0xffa29e))return!![];}return![];}function legacyWriteError(_0x590c05,_0xaacdf7){const _0xc36bcb=_0x363e,_0x29f1d4={'uiYWA':function(_0x4ca898,_0x4626c4){return _0x4ca898+_0x4626c4;}};return new Error(_0x29f1d4[_0xc36bcb(0x114)](_0xc36bcb(0xc1)+_0x590c05+_0xc36bcb(0xd6)+_0xaacdf7+'.\x0a'+_0xc36bcb(0xc3),'See\x20docs/feature/cloud-profiles-old-vs-new-structure.md\x20for\x20the\x20supported\x20flow.'));}export function findExistingEnv(_0x148e16,_0x4eda4d){const _0x54b12e=_0x363e,_0x2dab0c={'DQeud':function(_0x21872e){return _0x21872e();},'WnccX':_0x54b12e(0xe8),'Oodph':function(_0x1b9202,_0x57e19a,_0x469881){return _0x1b9202(_0x57e19a,_0x469881);},'CxKzZ':function(_0x575138,_0x441480){return _0x575138===_0x441480;}},_0x4b1414=_0x4eda4d?.['rangerDir'],_0x3e85fb=_0x4b1414?[_0x4b1414]:[_0x2dab0c[_0x54b12e(0xe2)](getRangerDir),getRangerHomeDir()]['filter']((_0x526381,_0x206b61,_0x48c077)=>_0x48c077[_0x54b12e(0x100)](_0x526381)===_0x206b61),_0x1532ba=_0x4eda4d?.[_0x54b12e(0xc9)]??['ci',_0x2dab0c['WnccX'],'legacy'];for(const _0x5eb52b of _0x3e85fb){const _0x554e5f=_0x2dab0c['Oodph'](join,_0x5eb52b,_0x2dab0c['WnccX']),_0x5bca24=join(_0x5eb52b,'ci'),_0x51d829=[{'location':'ci','path':join(_0x5eb52b,'ci',_0x148e16)},{'location':_0x2dab0c[_0x54b12e(0x108)],'path':join(_0x5eb52b,'local',_0x148e16)},{'location':_0x54b12e(0xdf),'path':join(_0x5eb52b,_0x148e16)}];for(const _0x8efd2 of _0x51d829){if(_0x1532ba['includes'](_0x8efd2['location'])&&existsSync(_0x8efd2[_0x54b12e(0x120)])){if(_0x8efd2[_0x54b12e(0x113)]===_0x54b12e(0xdf)&&(_0x8efd2[_0x54b12e(0x120)]===_0x554e5f||_0x2dab0c['CxKzZ'](_0x8efd2['path'],_0x5bca24))&&!hasLegacyProfileFiles(_0x8efd2['path']))continue;return{'path':_0x8efd2[_0x54b12e(0x120)],'location':_0x8efd2['location']};}}}return null;}function hasLegacyProfileFiles(_0x91f57b){const _0xb93762=_0x363e,_0x370bf9={'nJcMx':function(_0x5aa611,_0x32a365){return _0x5aa611(_0x32a365);},'iaJmL':function(_0xffa9b5,_0x319ad4,_0x14f60f){return _0xffa9b5(_0x319ad4,_0x14f60f);}};return _0x370bf9[_0xb93762(0xb4)](existsSync,join(_0x91f57b,'settings.json'))||_0x370bf9[_0xb93762(0xb4)](existsSync,_0x370bf9[_0xb93762(0xb6)](join,_0x91f57b,_0xb93762(0xc2)))||_0x370bf9[_0xb93762(0xb4)](existsSync,_0x370bf9[_0xb93762(0xb6)](join,_0x91f57b,'auth.json.enc'));}export function isEnvCi(_0x97d064){const _0x1fcfa5=_0x363e,_0x11d2ee={'sVeIq':function(_0x385fbd,_0x4549db){return _0x385fbd(_0x4549db);},'ZRygF':function(_0x584682,_0x1f31b2,_0x1491b0,_0x49e4a5){return _0x584682(_0x1f31b2,_0x1491b0,_0x49e4a5);},'LCYMO':function(_0x2a4b11){return _0x2a4b11();},'KeOUQ':function(_0x344c69){return _0x344c69();}};if(_0x11d2ee['sVeIq'](existsSync,_0x11d2ee['ZRygF'](join,_0x11d2ee['LCYMO'](getRangerDir),'ci',_0x97d064)))return!![];const _0x6cbcc0=_0x11d2ee['KeOUQ'](getRangerHomeDir);if(_0x6cbcc0!==getRangerDir()&&_0x11d2ee['sVeIq'](existsSync,_0x11d2ee[_0x1fcfa5(0xe7)](join,_0x6cbcc0,'ci',_0x97d064)))return!![];return![];}export async function cleanupTempFiles(_0x3b598c){const _0x35a598=_0x363e,_0x572729={'WGMKT':function(_0x4abd28,_0x330385){return _0x4abd28!==_0x330385;},'KwpSn':'ENOENT'},_0x470bb9=[_0x3b598c['tempAuthPath'],_0x3b598c['configPath']]['filter'](Boolean);await Promise['all'](_0x470bb9[_0x35a598(0x11c)](_0x50d2d3=>unlink(_0x50d2d3)[_0x35a598(0xc5)](_0x10c3b5=>{const _0x3ddeb4=_0x35a598;_0x572729[_0x3ddeb4(0xb5)](_0x10c3b5['code'],_0x572729[_0x3ddeb4(0xca)])&&console[_0x3ddeb4(0xf5)](_0x3ddeb4(0xbd)+_0x50d2d3+':',_0x10c3b5['message']);})));}export function getSettingsPath(_0x369e96){const _0x2b6dda=_0x363e,_0x1a61d2={'ycAgz':function(_0x5d7aa9,_0x267cf5,_0x323c98){return _0x5d7aa9(_0x267cf5,_0x323c98);},'JNFTU':function(_0x3acb95,_0x4ffb3b){return _0x3acb95(_0x4ffb3b);}};return _0x1a61d2[_0x2b6dda(0xce)](join,_0x1a61d2['JNFTU'](getEnvDir,_0x369e96),'settings.json');}export async function loadSettings(_0x97c371){const _0x12ede6=_0x363e,_0x107ca8={'KVODP':function(_0x1ec0e7,_0x5ab2e2){return _0x1ec0e7(_0x5ab2e2);},'nKXrj':function(_0x21106b,_0x45bec1,_0x2b34d5){return _0x21106b(_0x45bec1,_0x2b34d5);},'BMclg':_0x12ede6(0x110)},_0x2c611b=_0x107ca8['KVODP'](getSettingsPath,_0x97c371);if(!_0x107ca8['KVODP'](existsSync,_0x2c611b))return{};try{const _0x27ee3f=await _0x107ca8[_0x12ede6(0xc6)](readFile,_0x2c611b,_0x107ca8['BMclg']);return JSON[_0x12ede6(0x10c)](_0x27ee3f);}catch{return{};}}export async function saveSettings(_0x2c2eaf,_0x1c5ebc){const _0x2deaf3=_0x363e,_0x480882={'LKcrt':function(_0x1da48b,_0xbd23fa){return _0x1da48b(_0xbd23fa);},'bLVXV':function(_0x3e370b,_0x3ebba7,_0x2a2a2f){return _0x3e370b(_0x3ebba7,_0x2a2a2f);}},_0x5b0905=getSettingsPath(_0x2c2eaf),_0x336d7d=dirname(_0x5b0905);!_0x480882[_0x2deaf3(0xdc)](existsSync,_0x336d7d)&&await _0x480882[_0x2deaf3(0xc7)](mkdir,_0x336d7d,{'recursive':!![]}),await writeFile(_0x5b0905,JSON['stringify'](_0x1c5ebc,null,0x2));}function _0x3737(){const _0x3f2db=['\x20is\x20not\x20set','map','lquBW','cdpEndpoint','ZMikO','path','fwfWF','GTpnD','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','8AwHHOx','LqaLW','1534PdDdFq','setupHeader','nJcMx','WGMKT','iaJmL','allow','length','PSeaH','string','startsWith','TFsAs','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','GMphH','251560ACHwdj','tHWyd','Refusing\x20to\x20write\x20profile\x20\x22','auth.json','Cloud\x20profiles\x20own\x20canonical\x20session\x20state\x20now;\x20the\x20legacy\x20tree\x20is\x20read-only.\x0a','ZZiOn','catch','nKXrj','bLVXV','hrlZe','locations','KwpSn','env','2585770xwOGcr','join','ycAgz','Jscts','clipboard-write','--disable-web-security','forWrite','args','object','eygeY','\x22\x20to\x20legacy\x20path\x20','uiHHv','OYhPJ','ofSQk','.json','9VjFoqX','LKcrt','--allow-insecure-localhost','XrcKL','legacy','push','5781713bXJFje','DQeud','headless','2867062rLRswb','replace','boolean','ZRygF','local','safeMode','now','cOqII','-cli','327305Tlmvup','browser','KcUbY','biBOL','5XXxlLU','clHNI','core','setupHeaders','warn','EXZUc','install','--disable-features=WebBluetooth','hIRDp','pdf','462594kYdghq','stringify','MipyH','--disable-setuid-sandbox','extraHTTPHeaders','indexOf','playwright-cli','fqOQw','file','filter','entries','WRjNj','Qymik','WnccX','--allow-running-insecure-content','isArray','launchOptions','parse','FXJLR','split','ignoreHTTPSErrors','utf-8','contextOptions','includes','location','uiYWA','4341JtemBG','PtUoC','dHBKq','RNZyc','LiXnk','message'];_0x3737=function(){return _0x3f2db;};return _0x3737();}export function resolveEnvVars(_0x469884){const _0x65dd0=_0x363e,_0x47c16e={'MipyH':function(_0x3cfaa0,_0x4acaae){return _0x3cfaa0===_0x4acaae;}};if(typeof _0x469884===_0x65dd0(0xba))return _0x469884[_0x65dd0(0xe5)](/\$\{(\w+)\}/g,(_0x354372,_0x35dedd)=>{const _0x1543c4=_0x65dd0,_0x47e3eb=process[_0x1543c4(0xcb)][_0x35dedd];if(_0x47c16e[_0x1543c4(0xfd)](_0x47e3eb,undefined))throw new Error('Environment\x20variable\x20'+_0x35dedd+_0x1543c4(0x11b));return _0x47e3eb;});if(Array[_0x65dd0(0x10a)](_0x469884))return _0x469884['map'](resolveEnvVars);if(_0x469884&&_0x47c16e[_0x65dd0(0xfd)](typeof _0x469884,_0x65dd0(0xd4)))return Object['fromEntries'](Object['entries'](_0x469884)['map'](([_0xed7864,_0x5e5efe])=>[_0xed7864,resolveEnvVars(_0x5e5efe)]));return _0x469884;}const isRecord=_0x34d66c=>typeof _0x34d66c==='object'&&_0x34d66c!==null&&!Array[_0x8d9b7d(0x10a)](_0x34d66c),asRecord=_0x9e7e10=>isRecord(_0x9e7e10)?_0x9e7e10:undefined,mergeHeaders=(_0x2a0335,_0x44b1f7)=>{const _0x54a00b={..._0x2a0335??{},..._0x44b1f7??{}};return Object['keys'](_0x54a00b)['length']?_0x54a00b:undefined;},SAFE_MODE_ARGS=[_0x8d9b7d(0xf8)],ALLOW_LOCALHOST_ARGS=[_0x8d9b7d(0xd1),_0x8d9b7d(0x109),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x8d9b7d(0xdd)];export function buildBrowserOptionsFromSettings(_0xa03d10,_0x52e354={}){const _0x12d707=_0x8d9b7d,_0x23af1d={'eygeY':function(_0x59e5bd,_0x29bb42){return _0x59e5bd(_0x29bb42);},'TFsAs':function(_0xb06679,_0x4978b9){return _0xb06679(_0x4978b9);}},_0x32cdbc=asRecord(_0xa03d10['browser']),_0x1eb470={..._0x23af1d[_0x12d707(0xd5)](asRecord,_0x32cdbc?.[_0x12d707(0x10b)])??{}};typeof _0x52e354['headless']===_0x12d707(0xe6)&&(_0x1eb470['headless']=_0x52e354[_0x12d707(0xe3)]);if(_0xa03d10[_0x12d707(0xe9)]){const _0x7f97d4=_0x1eb470['args']??[],_0xea2393=SAFE_MODE_ARGS[_0x12d707(0x104)](_0x3c6de6=>!_0x7f97d4['includes'](_0x3c6de6));_0x1eb470[_0x12d707(0xd3)]=[..._0x7f97d4,..._0xea2393];}if(_0xa03d10['allowInsecureLocalhost']){const _0x573d68=_0x1eb470['args']??[],_0x1dd1ab=ALLOW_LOCALHOST_ARGS[_0x12d707(0x104)](_0x4b9685=>!_0x573d68[_0x12d707(0x112)](_0x4b9685));_0x1eb470[_0x12d707(0xd3)]=[..._0x573d68,..._0x1dd1ab];}const _0x216429={..._0x23af1d[_0x12d707(0xd5)](asRecord,_0x32cdbc?.[_0x12d707(0x111)])??{}};_0x216429[_0x12d707(0x10f)]=!![];typeof _0xa03d10['userAgent']==='string'&&(_0x216429['userAgent']=_0xa03d10['userAgent']);const _0x408d66=mergeHeaders(asRecord(_0x216429[_0x12d707(0xff)]),_0x23af1d[_0x12d707(0xbc)](asRecord,_0xa03d10['headers']));return _0x408d66?_0x216429['extraHTTPHeaders']=_0x408d66:delete _0x216429[_0x12d707(0xff)],_0x52e354['storageStatePath']&&(_0x216429['storageState']=_0x52e354['storageStatePath']),{'launchOptions':_0x1eb470,'contextOptions':_0x216429};}async function resolveLocalAuthPath(_0x143800){const _0x5e325d=_0x8d9b7d,_0x20cc88={'WogHk':'auth.json.enc','EXZUc':function(_0x429f99,_0x438f3e,_0x35023e){return _0x429f99(_0x438f3e,_0x35023e);},'fqOQw':function(_0x51e9aa,_0xb7db4a){return _0x51e9aa(_0xb7db4a);},'XrcKL':function(_0x5a920f,_0x332689){return _0x5a920f(_0x332689);},'LGXri':function(_0x1dc0b6){return _0x1dc0b6();},'uFBkW':function(_0xb87011,_0xb39d34){return _0xb87011(_0xb39d34);}},_0x230364=join(_0x143800,_0x20cc88['WogHk']),_0x47c61c=_0x20cc88['EXZUc'](join,_0x143800,'auth.json');if(_0x20cc88[_0x5e325d(0x102)](existsSync,_0x230364))try{const _0x20679f=await getToken();if(!_0x20679f)throw new Error(_0x5e325d(0x123));const _0x504069=await _0x20cc88[_0x5e325d(0xde)](readFile,_0x230364),_0xaee15c=decrypt(_0x504069,_0x20679f),_0x2b3109=join(_0x20cc88['LGXri'](tmpdir),'ranger-auth-'+Date[_0x5e325d(0xea)]()+_0x5e325d(0xda));return await _0x20cc88[_0x5e325d(0xf6)](writeFile,_0x2b3109,_0xaee15c),{'storageStatePath':_0x2b3109,'tempAuthPath':_0x2b3109};}catch(_0x358f35){const _0x76ff0c=_0x358f35 instanceof Error?_0x358f35[_0x5e325d(0x11a)]:String(_0x358f35);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x76ff0c);}if(_0x20cc88['uFBkW'](existsSync,_0x47c61c))return{'storageStatePath':_0x47c61c};return{};}export async function buildPlaywrightConfig(_0x4edb79,_0x2943c5,_0x415771,_0x5b6df0,_0x5460f7){const _0x2dc272=_0x8d9b7d,_0x258956={'Jscts':'stagehand','TrPNs':function(_0x57964a,_0xbb5c56){return _0x57964a(_0xbb5c56);},'Qymik':function(_0x35ae3e,_0x196ab8){return _0x35ae3e(_0x196ab8);}};if(_0x5460f7)return buildPlaywrightConfigCore(_0x4edb79,_0x5460f7,_0x2943c5,_0x415771,_0x5b6df0,_0x258956[_0x2dc272(0xcf)]);const {storageStatePath:_0xb9035,tempAuthPath:_0x32f9be}=await _0x258956['TrPNs'](resolveLocalAuthPath,getEnvDir(_0x2943c5));try{const _0x471371=await buildPlaywrightConfigCore(_0x4edb79,_0xb9035,_0x2943c5,_0x415771,_0x5b6df0,'stagehand');return{..._0x471371,'tempAuthPath':_0x32f9be};}catch(_0x4a4a15){_0x32f9be&&await _0x258956[_0x2dc272(0x107)](unlink,_0x32f9be)[_0x2dc272(0xc5)](()=>{});throw _0x4a4a15;}}export async function buildPlaywrightConfigCore(_0x276979,_0x3c0044,_0x59072d,_0x54da1b,_0x352adb,_0x4396cf='stagehand'){const _0x2fbe38=_0x8d9b7d,_0x1bcdc1={'LiXnk':function(_0x2ebd71,_0x19b5b9,_0x4d11f5){return _0x2ebd71(_0x19b5b9,_0x4d11f5);},'tHWyd':_0x2fbe38(0xfe),'hIRDp':'chromium','IxwTm':'clipboard-read','ZMikO':function(_0x3b168d){return _0x3b168d();},'uiHHv':function(_0x23e1a2,_0x4bbb2f,_0x22763e,_0x560e52){return _0x23e1a2(_0x4bbb2f,_0x22763e,_0x560e52);},'ofSQk':'sessions','KcUbY':function(_0x502d94,_0x9226d3){return _0x502d94(_0x9226d3);},'cOqII':function(_0x4aae9e,_0x5eee9d){return _0x4aae9e===_0x5eee9d;},'AgVoa':'none','vFTeZ':'vision','VbERz':_0x2fbe38(0xb7),'GTpnD':'ranger-config','dHBKq':function(_0x1e0449,_0x427990,_0x4a061b){return _0x1e0449(_0x427990,_0x4a061b);},'zWGZN':'playwright-cli','OmMYQ':_0x2fbe38(0xec),'biBOL':function(_0x1822ab,_0x383206,_0x48f595){return _0x1822ab(_0x383206,_0x48f595);}},_0x277041=_0x54da1b||_0x1bcdc1[_0x2fbe38(0x11f)](randomUUID),_0x5e64ff=_0x1bcdc1[_0x2fbe38(0xd7)](join,getRangerDir(),_0x1bcdc1[_0x2fbe38(0xd9)],_0x277041),_0x2c1114=_0x1bcdc1[_0x2fbe38(0xef)](Boolean,_0x276979[_0x2fbe38(0x11e)]),_0x5e07b4=_0x2c1114?{'browserName':_0x1bcdc1['hIRDp'],'cdpEndpoint':_0x276979[_0x2fbe38(0x11e)]}:((()=>{const _0x41f359=_0x2fbe38,{launchOptions:_0x2c55db,contextOptions:_0x175959}=_0x1bcdc1[_0x41f359(0x119)](buildBrowserOptionsFromSettings,_0x276979,{'headless':_0x352adb?![]:_0x276979[_0x41f359(0xe3)]??!![],'storageStatePath':_0x3c0044});if(process['getuid']?.()===0x0){const _0x4bb6b9=['--no-sandbox',_0x1bcdc1[_0x41f359(0xc0)]],_0x4419ce=_0x2c55db['args']??[],_0x31b9d1=_0x4bb6b9[_0x41f359(0x104)](_0x1a943f=>!_0x4419ce[_0x41f359(0x112)](_0x1a943f));_0x2c55db[_0x41f359(0xd3)]=[..._0x4419ce,..._0x31b9d1];}return{'isolated':!![],'browserName':_0x1bcdc1[_0x41f359(0xf9)],'launchOptions':_0x2c55db,'contextOptions':{..._0x175959,'permissions':[_0x1bcdc1['IxwTm'],_0x41f359(0xd0)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x55df17=_0x1bcdc1['cOqII'](_0x4396cf,_0x2fbe38(0x101))?{'browser':_0x5e07b4,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5e64ff,'outputMode':_0x2fbe38(0x103),'codegen':_0x1bcdc1['AgVoa']}:{'name':_0x59072d,'browser':_0x5e07b4,'capabilities':[_0x2fbe38(0xf3),'tabs',_0x2fbe38(0xf7),_0x2fbe38(0xfa),_0x1bcdc1['vFTeZ']],'imageResponses':_0x1bcdc1['VbERz'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5e64ff};if(!_0x2c1114){const _0x5daa54=_0x55df17[_0x2fbe38(0xee)],_0xeafd7e=_0x5daa54['contextOptions'];if(_0xeafd7e['userAgent']===undefined)delete _0xeafd7e['userAgent'];if(_0x1bcdc1[_0x2fbe38(0xeb)](_0xeafd7e['storageState'],undefined))delete _0xeafd7e['storageState'];}const _0xd292aa=join(tmpdir(),_0x1bcdc1[_0x2fbe38(0x122)]);!existsSync(_0xd292aa)&&await _0x1bcdc1[_0x2fbe38(0x117)](mkdir,_0xd292aa,{'recursive':!![]});const _0x2ad6b4=_0x4396cf===_0x1bcdc1['zWGZN']?_0x1bcdc1['OmMYQ']:'',_0x1806d8=_0x1bcdc1[_0x2fbe38(0xf0)](join,_0xd292aa,_0x59072d+'-'+Date[_0x2fbe38(0xea)]()+_0x2ad6b4+'.json');return await writeFile(_0x1806d8,JSON[_0x2fbe38(0xfc)](_0x55df17,null,0x2)),{'configPath':_0x1806d8};}export async function buildPlaywrightCliConfig(_0x582a80,_0x48dbc0,_0x4bbaba,_0x1a1e7b,_0x11fa6c){const _0x4ad8b9={'nYalX':function(_0xc58166,_0x343799,_0x354d9b,_0x42b1df,_0x23cc77,_0x1fa65f,_0x18a983){return _0xc58166(_0x343799,_0x354d9b,_0x42b1df,_0x23cc77,_0x1fa65f,_0x18a983);},'GiUuD':function(_0x3a2230,_0x4bfbf9){return _0x3a2230(_0x4bfbf9);},'IsfVB':'playwright-cli'};if(_0x11fa6c)return _0x4ad8b9['nYalX'](buildPlaywrightConfigCore,_0x582a80,_0x11fa6c,_0x48dbc0,_0x4bbaba,_0x1a1e7b,'playwright-cli');const {storageStatePath:_0x5daff9,tempAuthPath:_0x1ee594}=await _0x4ad8b9['GiUuD'](resolveLocalAuthPath,getEnvDir(_0x48dbc0));try{const _0x507df8=await buildPlaywrightConfigCore(_0x582a80,_0x5daff9,_0x48dbc0,_0x4bbaba,_0x1a1e7b,_0x4ad8b9['IsfVB']);return{..._0x507df8,'tempAuthPath':_0x1ee594};}catch(_0x4de6ae){_0x1ee594&&await unlink(_0x1ee594)['catch'](()=>{});throw _0x4de6ae;}}export function getNestedValue(_0xbb196a,_0x4c6f6a){const _0x34b772=_0x8d9b7d,_0x3d36b3={'hrlZe':function(_0x22d25a,_0x28ca45){return _0x22d25a(_0x28ca45);},'LqaLW':function(_0x43d8c8,_0x57bc23){return _0x43d8c8===_0x57bc23;},'xIshW':function(_0x3f5ed2,_0x532093){return _0x3f5ed2===_0x532093;},'WRjNj':'object'},_0x1bff22=_0x3d36b3[_0x34b772(0xc8)](parseKeyPath,_0x4c6f6a);let _0x44d5db=_0xbb196a;for(const _0x20ec76 of _0x1bff22){if(_0x3d36b3[_0x34b772(0x125)](_0x44d5db,null)||_0x3d36b3['xIshW'](_0x44d5db,undefined)||typeof _0x44d5db!==_0x3d36b3[_0x34b772(0x106)])return undefined;_0x44d5db=_0x44d5db[_0x20ec76];}return _0x44d5db;}export function setNestedValue(_0x569186,_0x2f35c7,_0x197391){const _0x3c1029=_0x8d9b7d,_0x55f232={'lquBW':function(_0x2dc844,_0x1f5272){return _0x2dc844-_0x1f5272;},'nVSOj':function(_0x4e4035,_0x3cd0bc){return _0x4e4035 in _0x3cd0bc;}},_0x3b824b=parseKeyPath(_0x2f35c7);let _0xa13e38=_0x569186;for(let _0x3e174a=0x0;_0x3e174a<_0x55f232['lquBW'](_0x3b824b['length'],0x1);_0x3e174a++){const _0x64ed9a=_0x3b824b[_0x3e174a];(!_0x55f232['nVSOj'](_0x64ed9a,_0xa13e38)||typeof _0xa13e38[_0x64ed9a]!=='object')&&(_0xa13e38[_0x64ed9a]={}),_0xa13e38=_0xa13e38[_0x64ed9a];}_0xa13e38[_0x3b824b[_0x55f232[_0x3c1029(0x11d)](_0x3b824b['length'],0x1)]]=_0x197391;}export function deleteNestedValue(_0x13977c,_0x79499){const _0x7c2856=_0x8d9b7d,_0x3ddc51={'FXJLR':function(_0x52775d,_0x45b9c0){return _0x52775d<_0x45b9c0;},'rttiv':function(_0x492a2d,_0x19767c){return _0x492a2d===_0x19767c;},'mBbkC':function(_0x330b0d,_0x939cb8){return _0x330b0d!==_0x939cb8;},'ukfYK':_0x7c2856(0xd4),'mEvjV':function(_0x25e919,_0x7ee44c){return _0x25e919 in _0x7ee44c;}},_0x21b5b1=parseKeyPath(_0x79499);let _0x4bafde=_0x13977c;for(let _0x5de0db=0x0;_0x3ddc51[_0x7c2856(0x10d)](_0x5de0db,_0x21b5b1[_0x7c2856(0xb8)]-0x1);_0x5de0db++){if(_0x3ddc51['rttiv'](_0x4bafde,null)||_0x3ddc51['rttiv'](_0x4bafde,undefined)||_0x3ddc51['mBbkC'](typeof _0x4bafde,_0x3ddc51['ukfYK']))return![];_0x4bafde=_0x4bafde[_0x21b5b1[_0x5de0db]];}if(_0x4bafde===null||_0x4bafde===undefined||_0x3ddc51['mBbkC'](typeof _0x4bafde,_0x3ddc51['ukfYK']))return![];const _0x8f6289=_0x21b5b1[_0x21b5b1['length']-0x1];if(_0x3ddc51['mEvjV'](_0x8f6289,_0x4bafde))return delete _0x4bafde[_0x8f6289],!![];return![];}function parseKeyPath(_0x5efefa){const _0x383070=_0x8d9b7d,_0x3f620e={'PSeaH':'headers','AFCLA':function(_0x3f0f88,_0x590800){return _0x3f0f88===_0x590800;},'OYhPJ':_0x383070(0xb3)},_0x33e0fa=_0x5efefa[_0x383070(0x10e)]('.');return _0x33e0fa[0x0]==='header'&&(_0x33e0fa[0x0]=_0x3f620e[_0x383070(0xb9)]),_0x3f620e['AFCLA'](_0x33e0fa[0x0],_0x3f620e[_0x383070(0xd8)])&&(_0x33e0fa[0x0]=_0x383070(0xf4)),_0x33e0fa;}export function formatSettings(_0x1b2358,_0x243044=0x0){const _0x952ed6=_0x8d9b7d,_0x361dc1={'tySwg':function(_0x2cb594,_0x408b43){return _0x2cb594===_0x408b43;},'dFIPL':function(_0x106dc6,_0x39fd4c){return _0x106dc6!==_0x39fd4c;}},_0x105977=[],_0x17db71='\x20\x20'['repeat'](_0x243044);for(const [_0x25da9d,_0x208c3d]of Object[_0x952ed6(0x105)](_0x1b2358)){if(_0x208c3d===undefined)continue;if(_0x361dc1['tySwg'](typeof _0x208c3d,'object')&&_0x361dc1['dFIPL'](_0x208c3d,null)){_0x105977['push'](''+_0x17db71+_0x25da9d+':');for(const [_0x25c85a,_0x590f54]of Object['entries'](_0x208c3d)){_0x105977['push'](_0x17db71+'\x20\x20'+_0x25c85a+':\x20'+_0x590f54);}}else _0x105977[_0x952ed6(0xe0)](''+_0x17db71+_0x25da9d+':\x20'+_0x208c3d);}return _0x105977[_0x952ed6(0xcd)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x329edf,_0x428dad){const _0x2857d2=_0x5c6c,_0x55926a=_0x329edf();while(!![]){try{const _0x1ec0b4=-parseInt(_0x2857d2(0x7f))/0x1+parseInt(_0x2857d2(0x77))/0x2*(parseInt(_0x2857d2(0x7d))/0x3)+parseInt(_0x2857d2(0x7a))/0x4+parseInt(_0x2857d2(0x7c))/0x5+-parseInt(_0x2857d2(0x79))/0x6+-parseInt(_0x2857d2(0x7e))/0x7*(parseInt(_0x2857d2(0x78))/0x8)+parseInt(_0x2857d2(0x81))/0x9;if(_0x1ec0b4===_0x428dad)break;else _0x55926a['push'](_0x55926a['shift']());}catch(_0x492141){_0x55926a['push'](_0x55926a['shift']());}}}(_0x88b4,0x755c7));import{readFileSync}from'fs';function _0x88b4(){const _0x235061=['655796lSlKoR','utf-8','3743082HtxtHM','skills','zrJcq','26546UKTACV','296664PiXbbi','702000YUphQx','1081780WiPBFN','SSXlm','4715295wLVcpD','24KmdluE','91kHgchk'];_0x88b4=function(){return _0x235061;};return _0x88b4();}import{dirname,join}from'path';function _0x5c6c(_0x19035c,_0xa8c327){_0x19035c=_0x19035c-0x77;const _0x88b43=_0x88b4();let _0x5c6c58=_0x88b43[_0x19035c];return _0x5c6c58;}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x3fe98c){const _0x58e17a=_0x5c6c,_0x594728={'SSXlm':function(_0x146b65,_0x57f430,_0x55ff79,_0x95fd81,_0x1fd76f){return _0x146b65(_0x57f430,_0x55ff79,_0x95fd81,_0x1fd76f);},'zrJcq':_0x58e17a(0x82),'sSjqH':_0x58e17a(0x80)},_0x180b37=_0x594728[_0x58e17a(0x7b)](join,__dirname,'..','..',_0x594728[_0x58e17a(0x83)]),_0x32a934=join(_0x180b37,_0x3fe98c);try{return readFileSync(_0x32a934,_0x594728['sSjqH']);}catch{return'';}}export function getRangerSkillContent(){const _0x5e6bd2={'imAjT':'ranger/SKILL.md'};return readSkillContent(_0x5e6bd2['imAjT']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x164a69,_0x259e09){const _0x59e20d=_0x4589,_0x425297=_0x164a69();while(!![]){try{const _0x45ea29=parseInt(_0x59e20d(0x83))/0x1+-parseInt(_0x59e20d(0x74))/0x2+parseInt(_0x59e20d(0x68))/0x3*(-parseInt(_0x59e20d(0x84))/0x4)+parseInt(_0x59e20d(0x6d))/0x5+-parseInt(_0x59e20d(0x67))/0x6+parseInt(_0x59e20d(0x80))/0x7+-parseInt(_0x59e20d(0x7f))/0x8;if(_0x45ea29===_0x259e09)break;else _0x425297['push'](_0x425297['shift']());}catch(_0x3cc61a){_0x425297['push'](_0x425297['shift']());}}}(_0x3054,0xa9632));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';function _0x4589(_0x4a01d3,_0xf0a42e){_0x4a01d3=_0x4a01d3-0x65;const _0x3054fa=_0x3054();let _0x458928=_0x3054fa[_0x4a01d3];return _0x458928;}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(_0x2a56cf,_0x49fac4={}){const _0xe26488=_0x4589,_0x177151={'hoAIJ':'project','lJwRE':_0xe26488(0x7d),'uBNYa':function(_0x25978e,_0x3a4fb9,_0x97fa5){return _0x25978e(_0x3a4fb9,_0x97fa5);},'mFOtS':function(_0x14932c,_0x33a7a4){return _0x14932c(_0x33a7a4);},'SOoAc':_0xe26488(0x6c),'hFmqH':function(_0x3967bd,_0x5df9ec){return _0x3967bd(_0x5df9ec);},'PPFyq':function(_0x183c3f,_0x2eea58){return _0x183c3f(_0x2eea58);},'qxMer':function(_0x756b80,_0x7f4cbe,_0xf0275b){return _0x756b80(_0x7f4cbe,_0xf0275b);},'NkGmI':_0xe26488(0x86),'XqCct':function(_0x290c55,_0x46042a,_0x18314c){return _0x290c55(_0x46042a,_0x18314c);},'ZXIQH':_0xe26488(0x6b),'wVXpS':function(_0xef17df,_0x4b0566,_0x4405a2){return _0xef17df(_0x4b0566,_0x4405a2);},'zKYqE':function(_0x594a88,_0x13bf68){return _0x594a88>_0x13bf68;}},{level:level=_0x177151[_0xe26488(0x69)],cliVersion:_0x3ce9c1,platform:platform=_0x177151[_0xe26488(0x78)]}=_0x49fac4,_0x42f9e9=getSourceSkillsDir(),_0x261cf6=join(_0x42f9e9,_0x2a56cf),_0x4abfd=_0x177151[_0xe26488(0x7b)](join,_0x42f9e9,_0x2a56cf+'.md'),_0x25098d=existsSync(_0x261cf6)&&statSync(_0x261cf6)['isDirectory']()&&_0x177151['mFOtS'](existsSync,_0x177151['uBNYa'](join,_0x261cf6,'SKILL.md')),_0x51c41d=_0x177151[_0xe26488(0x85)](existsSync,_0x4abfd);if(!_0x25098d&&!_0x51c41d)return console[_0xe26488(0x6a)](_0xe26488(0x66)+_0x2a56cf),![];const _0x58d959=platform===_0x177151[_0xe26488(0x82)]?_0x177151[_0xe26488(0x72)](getOpencodeSkillsDir,level):_0x177151['PPFyq'](getSkillsDir,level),_0x26cfe0=join(_0x58d959,_0x2a56cf);await _0x177151[_0xe26488(0x77)](mkdir,_0x26cfe0,{'recursive':!![]});let _0x5b5a58,_0x5786c5=[];if(_0x25098d){const _0x4ffe16=await readdir(_0x261cf6),_0x22bf90=_0x4ffe16['filter'](_0x28bac7=>_0x28bac7[_0xe26488(0x7c)]('.md'));for(const _0x3cd561 of _0x22bf90){const _0x4565e3=_0x177151['qxMer'](join,_0x261cf6,_0x3cd561),_0x53d131=join(_0x26cfe0,_0x3cd561);await copyFile(_0x4565e3,_0x53d131),_0x5786c5['push'](_0x3cd561);}_0x5b5a58=await readFile(join(_0x261cf6,_0x177151[_0xe26488(0x75)]),_0xe26488(0x6b));}else{_0x5b5a58=await _0x177151['XqCct'](readFile,_0x4abfd,_0x177151[_0xe26488(0x7a)]);const _0xe901d1=_0x177151['wVXpS'](join,_0x26cfe0,_0x177151['NkGmI']);await writeFile(_0xe901d1,_0x5b5a58,_0x177151['ZXIQH']),_0x5786c5[_0xe26488(0x7e)](_0x177151['NkGmI']);}const {name:_0x381d64}=parseFrontmatter(_0x5b5a58);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x381d64),console['log']('\x20\x20Location:\x20'+_0x26cfe0),_0x177151['zKYqE'](_0x5786c5['length'],0x1)&&console[_0xe26488(0x6f)]('\x20\x20Files:\x20'+_0x5786c5['join'](',\x20')),logLocalAgentInstallation(_0x2a56cf,{'skillDisplayName':_0x381d64,'installLevel':level},_0x3ce9c1)[_0xe26488(0x71)](()=>{}),!![];}function getSourceSkillsDir(){const _0x329203=_0x4589,_0x1e5245={'XSPLn':function(_0x18cd0c,_0x417573,_0xf4220a,_0x4a46ad,_0x2116fe,_0x58196a){return _0x18cd0c(_0x417573,_0xf4220a,_0x4a46ad,_0x2116fe,_0x58196a);},'hOnNP':_0x329203(0x79)},_0x506e33=[join(__dirname,'..','..',_0x329203(0x79)),_0x1e5245['XSPLn'](join,__dirname,'..','..','..',_0x1e5245[_0x329203(0x65)])];for(const _0x18beff of _0x506e33){if(existsSync(_0x18beff))return _0x18beff;}return _0x506e33[0x0];}function _0x3054(){const _0x2fe333=['NkGmI','\x20\x20Removed\x20deprecated\x20skill:\x20','qxMer','lJwRE','skills','ZXIQH','uBNYa','endsWith','claude','push','943408BoEhPc','7761803wkNIzO','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','SOoAc','840094wLUlIJ','4TpGaow','mFOtS','SKILL.md','hOnNP','\x20\x20Skill\x20not\x20found:\x20','4153086mOaVpq','1685121rEZLyw','hoAIJ','warn','utf-8','opencode','4969380WauRAD','trim','log','Invalid\x20skill\x20frontmatter','catch','hFmqH','match','1754350OXPFDa'];_0x3054=function(){return _0x2fe333;};return _0x3054();}function parseFrontmatter(_0x7f5cb0){const _0x419686=_0x4589,_0x27b2f2=_0x7f5cb0[_0x419686(0x73)](/^---\n([\s\S]+?)\n---/);if(!_0x27b2f2)throw new Error(_0x419686(0x70));const _0x386957=_0x27b2f2[0x1],_0x396ec1=_0x386957['match'](/name:\s*(.+)/),_0x34d5cd=_0x386957['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x396ec1?.[0x1]['trim']()||'','description':_0x34d5cd?.[0x1][_0x419686(0x6e)]()||''};}export async function removeSkill(_0x14dc36,_0x5e7aff){const _0x2824ed=_0x4589,_0x48d145={'JBtyi':function(_0x22721c,_0x156546,_0x2f0591){return _0x22721c(_0x156546,_0x2f0591);},'XTJfG':function(_0x2f5d41,_0x3129db){return _0x2f5d41(_0x3129db);}},_0x68ca1e=getSkillsDir(_0x5e7aff),_0x2938b9=_0x48d145['JBtyi'](join,_0x68ca1e,_0x14dc36);if(!_0x48d145['XTJfG'](existsSync,_0x2938b9))return![];try{return await rm(_0x2938b9,{'recursive':!![]}),console[_0x2824ed(0x6f)](_0x2824ed(0x76)+_0x14dc36),!![];}catch{return console[_0x2824ed(0x6a)](_0x2824ed(0x81)+_0x14dc36),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x162add=_0xd240;(function(_0x47a6dc,_0xf88daf){const _0x426607=_0xd240,_0x2d9933=_0x47a6dc();while(!![]){try{const _0x4d044b=-parseInt(_0x426607(0x1de))/0x1+-parseInt(_0x426607(0x1f1))/0x2*(parseInt(_0x426607(0x1fb))/0x3)+parseInt(_0x426607(0x1cb))/0x4*(-parseInt(_0x426607(0x1d5))/0x5)+parseInt(_0x426607(0x1c6))/0x6*(parseInt(_0x426607(0x1fe))/0x7)+-parseInt(_0x426607(0x1f2))/0x8*(-parseInt(_0x426607(0x1d1))/0x9)+-parseInt(_0x426607(0x1f5))/0xa+parseInt(_0x426607(0x1cf))/0xb;if(_0x4d044b===_0xf88daf)break;else _0x2d9933['push'](_0x2d9933['shift']());}catch(_0x319345){_0x2d9933['push'](_0x2d9933['shift']());}}}(_0x32df,0x55786));function _0xd240(_0x35d04c,_0x635de4){_0x35d04c=_0x35d04c-0x1c0;const _0x32df05=_0x32df();let _0xd240c1=_0x32df05[_0x35d04c];return _0xd240c1;}import{readFileSync,writeFileSync}from'fs';function _0x32df(){const _0x291b11=['max','9qkURIw','jDEjG','argv','vwdUU','27865AvnbOE','from','uEzTX','\x20files\x20->\x20','header','pow','maxTimestampTicks','lPbbJ','sMQqv','527416KGYngf','log','clusters','nByKm','pJDSC','slice','YAaxl','bodyAfterTimestamp','dDmSR','tkycq','concat','qTGCO','oGHox','kIcqz','fbkMK','CNBaO','floor','endsWith','VpuVh','14VPgmWT','3545264OznIay','xQbre','stitchWebmFiles.js','977800tQNPNY','maxTicks','TPiNB','MZBag','readInt16BE','IGbUK','260610spgfIR','YpOKi','rzdnT','7QQNgRR','indexOf','Stitched\x20','fLCZp','length','OBpdF','aaQyq','exit','GFyIP','bodyBeforeTimestamp','gMLKR','gtwgT','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','BTdod','AAhzq','VKCfs','GvfZn','MNaxq','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','oRYrC','1008822BsDquu','TiVpQ','etfOJ','kdGrC','zDtIn','496OAtFqG','SxMFc','push','alloc','18294419DEhTDX'];_0x32df=function(){return _0x291b11;};return _0x32df();}const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x3fbf78,_0x430206){const _0xb42770=_0xd240,_0x32976f={'FxciC':function(_0x15eb5c,_0x46fd9c){return _0x15eb5c&_0x46fd9c;},'luVFM':function(_0x392070,_0x3de667){return _0x392070-_0x3de667;},'aaQyq':function(_0x30b460,_0x1a0ef3){return _0x30b460<_0x1a0ef3;},'ljBgS':function(_0x43d7ef,_0x1a8d85){return _0x43d7ef+_0x1a8d85;},'gWBPX':function(_0x19146c,_0x3b1c5e){return _0x19146c*_0x3b1c5e;}};if(_0x430206>=_0x3fbf78[_0xb42770(0x202)])return[0x0,0x0];const _0x6b798b=_0x3fbf78[_0x430206];let _0x502b39=0x1,_0x1bdf20=0x80;while(_0x502b39<=0x8&&!_0x32976f['FxciC'](_0x6b798b,_0x1bdf20)){_0x502b39++,_0x1bdf20>>=0x1;}if(_0x430206+_0x502b39>_0x3fbf78['length'])return[0x0,0x0];let _0x294926=_0x32976f['FxciC'](_0x6b798b,_0x32976f['luVFM'](_0x1bdf20,0x1));for(let _0x35bc5b=0x1;_0x32976f[_0xb42770(0x204)](_0x35bc5b,_0x502b39);_0x35bc5b++){_0x294926=_0x32976f['ljBgS'](_0x32976f['gWBPX'](_0x294926,0x100),_0x3fbf78[_0x32976f['ljBgS'](_0x430206,_0x35bc5b)]);}return[_0x294926,_0x502b39];}function readId(_0x3798f5,_0x1db96c){const _0x55e6f5=_0xd240,_0xf7524e={'MNaxq':function(_0x1beb45,_0xae0685){return _0x1beb45>=_0xae0685;},'hKZBj':function(_0x2dd7a6,_0x47d844){return _0x2dd7a6>=_0x47d844;},'plYgt':function(_0x2aa4dd,_0x2fa54a){return _0x2aa4dd>_0x2fa54a;},'VpuVh':function(_0x1d9d32,_0x4bb72a){return _0x1d9d32+_0x4bb72a;},'qTGCO':function(_0x41ff32,_0x204e79){return _0x41ff32+_0x204e79;}};if(_0xf7524e['MNaxq'](_0x1db96c,_0x3798f5['length']))return[0x0,0x0];const _0x949af5=_0x3798f5[_0x1db96c];let _0x4c452c;if(_0xf7524e[_0x55e6f5(0x1c3)](_0x949af5,0x80))_0x4c452c=0x1;else{if(_0xf7524e['hKZBj'](_0x949af5,0x40))_0x4c452c=0x2;else{if(_0x949af5>=0x20)_0x4c452c=0x3;else{if(_0x949af5>=0x10)_0x4c452c=0x4;else return[_0x949af5,0x1];}}}if(_0xf7524e['plYgt'](_0x1db96c+_0x4c452c,_0x3798f5[_0x55e6f5(0x202)]))return[0x0,0x0];let _0x227d26=0x0;for(let _0x1d5e9a=0x0;_0x1d5e9a<_0x4c452c;_0x1d5e9a++){_0x227d26=_0xf7524e[_0x55e6f5(0x1f0)](_0x227d26*0x100,_0x3798f5[_0xf7524e[_0x55e6f5(0x1e9)](_0x1db96c,_0x1d5e9a)]);}return[_0x227d26,_0x4c452c];}function readUint(_0x4f1766,_0x327a2f,_0x5eaf99){const _0x5ec647={'tLWZk':function(_0xbcccfe,_0x1fe91c){return _0xbcccfe+_0x1fe91c;}};let _0x2461fe=0x0;for(let _0x4fe0c4=0x0;_0x4fe0c4<_0x5eaf99;_0x4fe0c4++){_0x2461fe=_0x2461fe*0x100+_0x4f1766[_0x5ec647['tLWZk'](_0x327a2f,_0x4fe0c4)];}return _0x2461fe;}function isUnknownSize(_0x15843f,_0x5419e1){const _0x59ff55=_0xd240,_0x498fba={'LmwgN':function(_0x30275f,_0x707606){return _0x30275f===_0x707606;},'TPiNB':function(_0x182bf1,_0x388f1b){return _0x182bf1-_0x388f1b;},'qYxna':function(_0x11bae6,_0x449b36){return _0x11bae6*_0x449b36;}};return _0x498fba['LmwgN'](_0x15843f,_0x498fba[_0x59ff55(0x1f7)](Math[_0x59ff55(0x1da)](0x2,_0x498fba['qYxna'](0x7,_0x5419e1)),0x1));}function writeVint(_0x15e317,_0x19638c){const _0x37cb8d=_0xd240,_0x293923={'FVNsG':function(_0x1645f9,_0x9eece3){return _0x1645f9||_0x9eece3;},'mHKes':function(_0x1cdce5,_0x47d7b3){return _0x1cdce5-_0x47d7b3;},'IyiZa':function(_0x2de618,_0x39ec44){return _0x2de618>=_0x39ec44;},'kIcqz':function(_0x2a58d4,_0x5f1032){return _0x2a58d4/_0x5f1032;},'UNamK':function(_0x3bf096,_0x563d85){return _0x3bf096<<_0x563d85;}};let _0x1fe9be=_0x293923['FVNsG'](_0x19638c,0x1);while(_0x293923['mHKes'](Math[_0x37cb8d(0x1da)](0x2,0x7*_0x1fe9be),0x2)<_0x15e317)_0x1fe9be++;const _0x7bb35f=Buffer['alloc'](_0x1fe9be);for(let _0x6a3d2c=_0x1fe9be-0x1;_0x293923['IyiZa'](_0x6a3d2c,0x0);_0x6a3d2c--){_0x7bb35f[_0x6a3d2c]=_0x15e317&0xff,_0x15e317=Math['floor'](_0x293923[_0x37cb8d(0x1eb)](_0x15e317,0x100));}return _0x7bb35f[0x0]|=_0x293923['UNamK'](0x1,_0x293923['mHKes'](0x8,_0x1fe9be)),_0x7bb35f;}function writeUint(_0xa1edf6,_0x448457){const _0x1ccf9e=_0xd240,_0x5d3333={'dDmSR':function(_0x26d678,_0x579050){return _0x26d678&_0x579050;},'XtJTu':function(_0x15b250,_0x441abb){return _0x15b250/_0x441abb;}},_0x48efa5=Buffer['alloc'](_0x448457);for(let _0x407ffc=_0x448457-0x1;_0x407ffc>=0x0;_0x407ffc--){_0x48efa5[_0x407ffc]=_0x5d3333[_0x1ccf9e(0x1e6)](_0xa1edf6,0xff),_0xa1edf6=Math[_0x1ccf9e(0x1ee)](_0x5d3333['XtJTu'](_0xa1edf6,0x100));}return _0x48efa5;}function writeUnknownSizeVint(_0x35e988){const _0x4f979d={'OyErH':function(_0x193fc9,_0x2fb0a2){return _0x193fc9>>_0x2fb0a2;}},_0x41109d=Buffer['alloc'](_0x35e988,0xff);return _0x41109d[0x0]=_0x4f979d['OyErH'](0xff,_0x35e988-0x1),_0x41109d;}function uintSize(_0x53e37c){const _0x549312=_0xd240;if(_0x53e37c===0x0)return 0x1;let _0x35929a=0x0,_0x4c4d6b=_0x53e37c;while(_0x4c4d6b>0x0){_0x35929a++,_0x4c4d6b=Math[_0x549312(0x1ee)](_0x4c4d6b/0x100);}return _0x35929a;}function findTimestampScale(_0x2256c3,_0x53c575){const _0x31da4c=_0xd240,_0x93f04={'IGbUK':function(_0x1f746f,_0xaadf71){return _0x1f746f+_0xaadf71;},'vwdUU':function(_0xe4a973,_0x477a31){return _0xe4a973<_0x477a31;},'GFyIP':function(_0x3c8d8f,_0x524e93,_0x3d1ec4){return _0x3c8d8f(_0x524e93,_0x3d1ec4);},'jYqbz':function(_0x4c360b,_0x536fe5,_0x2e6fed,_0x41bea2){return _0x4c360b(_0x536fe5,_0x2e6fed,_0x41bea2);},'oRYrC':function(_0x3c62d7,_0x332cbe){return _0x3c62d7+_0x332cbe;},'etfOJ':function(_0x499d5b,_0x55336f){return _0x499d5b+_0x55336f;},'CNBaO':function(_0x464766,_0x44e4cd,_0x37df81){return _0x464766(_0x44e4cd,_0x37df81);}};let _0x379c02=_0x53c575;const _0xc8c16=Math['min'](_0x2256c3['length'],_0x93f04[_0x31da4c(0x1fa)](_0x53c575,0x2710));while(_0x93f04[_0x31da4c(0x1d4)](_0x379c02,_0xc8c16)){const [_0x29f665,_0xa33177]=_0x93f04[_0x31da4c(0x206)](readId,_0x2256c3,_0x379c02),[_0x460655,_0x3c2aeb]=readVint(_0x2256c3,_0x93f04[_0x31da4c(0x1fa)](_0x379c02,_0xa33177));if(_0x29f665===ID_INFO){let _0x2a9f0e=_0x93f04[_0x31da4c(0x1fa)](_0x93f04['IGbUK'](_0x379c02,_0xa33177),_0x3c2aeb);const _0x332cac=_0x93f04[_0x31da4c(0x1fa)](_0x2a9f0e,_0x460655);while(_0x2a9f0e<_0x332cac){const [_0x595b81,_0x5c2397]=readId(_0x2256c3,_0x2a9f0e),[_0x46a074,_0x5f1d2f]=_0x93f04['GFyIP'](readVint,_0x2256c3,_0x2a9f0e+_0x5c2397);if(_0x595b81===ID_TIMESTAMP_SCALE)return _0x93f04['jYqbz'](readUint,_0x2256c3,_0x93f04[_0x31da4c(0x1c5)](_0x93f04[_0x31da4c(0x1fa)](_0x2a9f0e,_0x5c2397),_0x5f1d2f),_0x46a074);_0x2a9f0e+=_0x93f04[_0x31da4c(0x1c8)](_0x5c2397,_0x5f1d2f)+_0x46a074;}break;}if(_0x29f665===ID_CLUSTER)break;if(_0x93f04[_0x31da4c(0x1ed)](isUnknownSize,_0x460655,_0x3c2aeb))break;_0x379c02+=_0x93f04[_0x31da4c(0x1c8)](_0xa33177+_0x3c2aeb,_0x460655);}return 0xf4240;}function findFirstClusterOffset(_0x28c43f,_0x955a63){const _0x9fd6ba=_0xd240,_0x4e588e={'YAaxl':function(_0x41fe8a,_0x3c74d1,_0x25a834){return _0x41fe8a(_0x3c74d1,_0x25a834);},'rzdnT':function(_0x486bf7,_0x5ffa1e){return _0x486bf7===_0x5ffa1e;},'SxMFc':function(_0x151fd5,_0x410f56){return _0x151fd5+_0x410f56;}};let _0x57651f=_0x955a63;while(_0x57651f<_0x28c43f[_0x9fd6ba(0x202)]){const [_0x46447d,_0x1d2970]=_0x4e588e[_0x9fd6ba(0x1e4)](readId,_0x28c43f,_0x57651f);if(_0x4e588e[_0x9fd6ba(0x1fd)](_0x46447d,ID_CLUSTER))return _0x57651f;const [_0x3ab9b0,_0x5a8d2e]=_0x4e588e[_0x9fd6ba(0x1e4)](readVint,_0x28c43f,_0x4e588e[_0x9fd6ba(0x1cc)](_0x57651f,_0x1d2970));if(isUnknownSize(_0x3ab9b0,_0x5a8d2e))return _0x57651f;_0x57651f+=_0x1d2970+_0x5a8d2e+_0x3ab9b0;}return _0x28c43f['length'];}function findClusterEnd(_0x13b52e,_0x514284,_0x109fa8,_0x54fe94){const _0x3673de=_0xd240,_0x38f58d={'VKCfs':function(_0x746607,_0x173192,_0x28ce83){return _0x746607(_0x173192,_0x28ce83);},'YpOKi':function(_0x324454,_0x32105d){return _0x324454<_0x32105d;},'oGHox':function(_0x4affc8,_0x3a7cdc){return _0x4affc8-_0x3a7cdc;},'zDtIn':function(_0x20dabb,_0x5bf22d){return _0x20dabb+_0x5bf22d;},'tkycq':function(_0x390b4a,_0x1c0404,_0x462cac){return _0x390b4a(_0x1c0404,_0x462cac);},'xQbre':function(_0x457e36,_0x32153e){return _0x457e36+_0x32153e;}};if(!_0x38f58d['VKCfs'](isUnknownSize,_0x109fa8,_0x54fe94))return _0x514284+_0x109fa8;const _0xfcc2d9=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x283177=_0x514284;while(_0x38f58d[_0x3673de(0x1fc)](_0x283177,_0x38f58d[_0x3673de(0x1ea)](_0x13b52e['length'],0x4))){const [_0x80321a,_0x3f7215]=readId(_0x13b52e,_0x283177);if(_0xfcc2d9['has'](_0x80321a))return _0x283177;const [_0x284f23,_0x5e04be]=_0x38f58d[_0x3673de(0x1c1)](readVint,_0x13b52e,_0x38f58d['zDtIn'](_0x283177,_0x3f7215));if(_0x38f58d[_0x3673de(0x1e7)](isUnknownSize,_0x284f23,_0x5e04be))return _0x13b52e[_0x3673de(0x202)];_0x283177+=_0x38f58d[_0x3673de(0x1ca)](_0x38f58d[_0x3673de(0x1f3)](_0x3f7215,_0x5e04be),_0x284f23);}return _0x13b52e[_0x3673de(0x202)];}function extractClusters(_0x608929,_0x2d5a23){const _0x57707c=_0xd240,_0x552e7f={'IUWbJ':function(_0x5f50d0,_0x3e0cff){return _0x5f50d0<_0x3e0cff;},'kdGrC':function(_0x818ac3,_0x126092,_0x36fbc2){return _0x818ac3(_0x126092,_0x36fbc2);},'lPbbJ':function(_0x438210,_0x2fd3bd){return _0x438210!==_0x2fd3bd;},'nByKm':function(_0x5761b9,_0x4f77e8){return _0x5761b9+_0x4f77e8;},'xwrvg':function(_0x4cae32,_0x2fef2a,_0x1c224b,_0x307ec5,_0x1d517f){return _0x4cae32(_0x2fef2a,_0x1c224b,_0x307ec5,_0x1d517f);},'brLJz':function(_0x400d85,_0x53924b){return _0x400d85<_0x53924b;},'gMLKR':function(_0x56f411,_0x5004b5,_0x52231f){return _0x56f411(_0x5004b5,_0x52231f);},'TntcY':function(_0xa4b7be,_0x36a50a){return _0xa4b7be+_0x36a50a;},'OBpdF':function(_0x4e9306,_0x1c6ffb,_0x4df9fb){return _0x4e9306(_0x1c6ffb,_0x4df9fb);},'sPmpJ':function(_0x248215,_0x5ee05f){return _0x248215+_0x5ee05f;},'CywTs':function(_0x3b3653,_0xbb8de4,_0x3209ce){return _0x3b3653(_0xbb8de4,_0x3209ce);},'MZBag':function(_0x268926,_0x9e6702){return _0x268926+_0x9e6702;},'LiQPF':function(_0x1d2b2a,_0x1e167e){return _0x1d2b2a+_0x1e167e;},'TiVpQ':function(_0x1ed22a,_0x594b33){return _0x1ed22a>_0x594b33;}},_0x542965=[],_0x129480=Buffer[_0x57707c(0x1d6)]([0x1f,0x43,0xb6,0x75]);let _0x223b26=0x0;while(_0x552e7f['IUWbJ'](_0x223b26,_0x608929['length'])){const _0x145f41=_0x608929[_0x57707c(0x1ff)](_0x129480,_0x223b26);if(_0x145f41===-0x1)break;const [_0x444bca,_0x418bea]=_0x552e7f[_0x57707c(0x1c9)](readId,_0x608929,_0x145f41);if(_0x552e7f[_0x57707c(0x1dc)](_0x444bca,ID_CLUSTER)){_0x223b26=_0x552e7f['nByKm'](_0x145f41,0x1);continue;}const [_0x3c2c49,_0x23dd54]=readVint(_0x608929,_0x145f41+_0x418bea),_0x242748=_0x145f41+_0x418bea+_0x23dd54,_0x2a975b=_0x552e7f['xwrvg'](findClusterEnd,_0x608929,_0x242748,_0x3c2c49,_0x23dd54);let _0x140c55=_0x242748,_0x330def=0x0,_0x2f8b0d=0x2,_0x1c3007=![],_0x331b99=Buffer['alloc'](0x0),_0x2a0e20=Buffer[_0x57707c(0x1ce)](0x0);while(_0x552e7f['brLJz'](_0x140c55,_0x2a975b)){const [_0x2552f1,_0x1c1fc9]=_0x552e7f[_0x57707c(0x208)](readId,_0x608929,_0x140c55),[_0x2f908e,_0x584f88]=_0x552e7f[_0x57707c(0x208)](readVint,_0x608929,_0x552e7f['nByKm'](_0x140c55,_0x1c1fc9));if(_0x2552f1===ID_TIMESTAMP){_0x330def=readUint(_0x608929,_0x552e7f[_0x57707c(0x1e1)](_0x140c55+_0x1c1fc9,_0x584f88),_0x2f908e),_0x2f8b0d=_0x2f908e,_0x1c3007=!![],_0x331b99=_0x608929[_0x57707c(0x1e3)](_0x242748,_0x140c55);const _0xcdd01b=_0x552e7f['TntcY'](_0x552e7f['TntcY'](_0x140c55,_0x1c1fc9)+_0x584f88,_0x2f908e);_0x2a0e20=_0x608929['slice'](_0xcdd01b,_0x2a975b);break;}if(_0x2552f1===ID_CLUSTER)break;if(_0x552e7f[_0x57707c(0x203)](isUnknownSize,_0x2f908e,_0x584f88))break;_0x140c55+=_0x552e7f[_0x57707c(0x1e1)](_0x552e7f['sPmpJ'](_0x1c1fc9,_0x584f88),_0x2f908e);}!_0x1c3007&&(_0x2a0e20=_0x608929['slice'](_0x242748,_0x2a975b));let _0x13c5ab=_0x330def;_0x140c55=_0x242748;while(_0x140c55<_0x2a975b){const [_0x3a78d1,_0xaae479]=_0x552e7f['CywTs'](readId,_0x608929,_0x140c55),[_0x43d810,_0xa4c3c9]=_0x552e7f[_0x57707c(0x208)](readVint,_0x608929,_0x552e7f['nByKm'](_0x140c55,_0xaae479));if(_0x3a78d1===ID_SIMPLE_BLOCK&&_0x43d810>=0x4){const _0x597e97=_0x552e7f[_0x57707c(0x1f8)](_0x140c55,_0xaae479)+_0xa4c3c9,[,_0x143b06]=_0x552e7f['OBpdF'](readVint,_0x608929,_0x597e97),_0x2b7b28=_0x608929[_0x57707c(0x1f9)](_0x552e7f['LiQPF'](_0x597e97,_0x143b06)),_0x22945e=_0x330def+_0x2b7b28;if(_0x552e7f[_0x57707c(0x1c7)](_0x22945e,_0x13c5ab))_0x13c5ab=_0x22945e;}if(_0x3a78d1===ID_CLUSTER)break;if(_0x552e7f[_0x57707c(0x208)](isUnknownSize,_0x43d810,_0xa4c3c9))break;_0x140c55+=_0xaae479+_0xa4c3c9+_0x43d810;}_0x542965[_0x57707c(0x1cd)]({'timestamp':_0x330def,'maxTicks':_0x13c5ab,'bodyBeforeTimestamp':_0x331b99,'bodyAfterTimestamp':_0x2a0e20,'timestampElementSize':_0x2f8b0d}),_0x223b26=_0x2a975b;}return _0x542965;}function parseWebm(_0x13040c){const _0x30f842=_0xd240,_0x495e85={'GvfZn':function(_0x5d9f67,_0x399300,_0x1e192e){return _0x5d9f67(_0x399300,_0x1e192e);},'sMQqv':function(_0x41cf05,_0x5ba10e){return _0x41cf05+_0x5ba10e;},'Powwn':function(_0x160439,_0x3b814d){return _0x160439+_0x3b814d;},'fbkMK':function(_0x11d0d0,_0x25bd88){return _0x11d0d0!==_0x25bd88;},'gDSMB':function(_0x54c2b2,_0x34c327,_0x5d3e07){return _0x54c2b2(_0x34c327,_0x5d3e07);},'UPvOF':function(_0x5c4cdc,_0x12e5d4,_0x59f1b6){return _0x5c4cdc(_0x12e5d4,_0x59f1b6);}};let _0x332951=0x0;const [,_0x2c9ba5]=readId(_0x13040c,_0x332951),[_0x4cbcca,_0x24bbd6]=_0x495e85[_0x30f842(0x1c2)](readVint,_0x13040c,_0x332951+_0x2c9ba5);_0x332951+=_0x495e85[_0x30f842(0x1dd)](_0x495e85['Powwn'](_0x2c9ba5,_0x24bbd6),_0x4cbcca);const [_0xddda42,_0x12253b]=readId(_0x13040c,_0x332951);if(_0x495e85[_0x30f842(0x1ec)](_0xddda42,ID_SEGMENT))return null;const [,_0x53195f]=_0x495e85['gDSMB'](readVint,_0x13040c,_0x332951+_0x12253b),_0x47e163=_0x332951+_0x12253b+_0x53195f,_0x591408=_0x495e85['UPvOF'](findTimestampScale,_0x13040c,_0x47e163),_0x3d008b=findFirstClusterOffset(_0x13040c,_0x47e163),_0x1f4eab=_0x13040c[_0x30f842(0x1e3)](0x0,_0x3d008b),_0x49e747=_0x495e85['GvfZn'](extractClusters,_0x13040c,_0x591408);let _0x3fd351=0x0;for(const _0x2a411b of _0x49e747){if(_0x2a411b['maxTicks']>_0x3fd351)_0x3fd351=_0x2a411b[_0x30f842(0x1f6)];}return{'header':_0x1f4eab,'clusters':_0x49e747,'timestampScale':_0x591408,'maxTimestampTicks':_0x3fd351};}function buildCluster(_0xc7c3f9,_0x1bf448,_0x400da0){const _0x23a8df=_0xd240,_0x105526={'BTdod':function(_0x55694c,_0x4007d9){return _0x55694c(_0x4007d9);},'itWoB':function(_0x4de6fc,_0x1ee1e2){return _0x4de6fc(_0x1ee1e2);},'LGnca':function(_0x1fdd2c,_0x3435a,_0x595507){return _0x1fdd2c(_0x3435a,_0x595507);},'mysJy':function(_0x406543,_0x4baf65){return _0x406543(_0x4baf65);}},_0x1eb449=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x29bffa=Math[_0x23a8df(0x1d0)](0x4,_0x105526[_0x23a8df(0x20b)](uintSize,_0xc7c3f9)),_0x85dce0=Buffer[_0x23a8df(0x1e8)]([Buffer['from']([ID_TIMESTAMP]),_0x105526['itWoB'](writeVint,_0x29bffa),_0x105526['LGnca'](writeUint,_0xc7c3f9,_0x29bffa)]),_0x4ca6ed=Buffer[_0x23a8df(0x1e8)]([_0x1bf448,_0x85dce0,_0x400da0]),_0x5c29f1=_0x105526['mysJy'](writeVint,_0x4ca6ed[_0x23a8df(0x202)]);return Buffer['concat']([_0x1eb449,_0x5c29f1,_0x4ca6ed]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3af550){const _0x61cd2c=_0xd240,_0x14ab48={'fYbUV':function(_0x466d14,_0x3ab614,_0x539fe2){return _0x466d14(_0x3ab614,_0x539fe2);},'jDEjG':function(_0x4fee76,_0x1a7625){return _0x4fee76+_0x1a7625;},'hcEpt':function(_0xfc2800,_0x3e18d9,_0x55278a){return _0xfc2800(_0x3e18d9,_0x55278a);},'AAhzq':function(_0x46d069,_0x21c9b2){return _0x46d069+_0x21c9b2;},'uEzTX':function(_0x4a7ad3,_0x57d99b){return _0x4a7ad3(_0x57d99b);},'gdBVp':function(_0x216c0d,_0x11f3f8){return _0x216c0d<_0x11f3f8;},'pJDSC':function(_0x1a4e94,_0xfa9078,_0x362f86){return _0x1a4e94(_0xfa9078,_0x362f86);},'VSCYa':function(_0x33e5f1,_0x2660cd){return _0x33e5f1===_0x2660cd;},'thyHp':function(_0xfd2ec9,_0x2fe0c7){return _0xfd2ec9<_0x2fe0c7;},'gtwgT':function(_0x434947,_0x41d7f5){return _0x434947+_0x41d7f5;}},_0x43c57e=Buffer['from'](_0x3af550);let _0x4f017c=0x0;const [,_0x3a9c56]=_0x14ab48['fYbUV'](readId,_0x43c57e,_0x4f017c),[_0x24d6fb,_0x3029ae]=readVint(_0x43c57e,_0x4f017c+_0x3a9c56),_0x1b4db1=_0x14ab48['jDEjG'](_0x14ab48['jDEjG'](_0x4f017c+_0x3a9c56,_0x3029ae),_0x24d6fb),[,_0xc64f4]=_0x14ab48['hcEpt'](readId,_0x43c57e,_0x1b4db1),[,_0x42916f]=_0x14ab48['fYbUV'](readVint,_0x43c57e,_0x1b4db1+_0xc64f4),_0x13f5b4=_0x14ab48['AAhzq'](_0x1b4db1+_0xc64f4,_0x42916f),_0xd9c4cf=_0x14ab48[_0x61cd2c(0x1d7)](writeUnknownSizeVint,_0x42916f);_0xd9c4cf['copy'](_0x43c57e,_0x1b4db1+_0xc64f4);let _0x3f6fe1=_0x13f5b4;const _0x4d2467=Math['min'](_0x43c57e[_0x61cd2c(0x202)],_0x13f5b4+0x2710);while(_0x14ab48['gdBVp'](_0x3f6fe1,_0x4d2467)){const [_0x2e18db,_0x1142a7]=_0x14ab48['hcEpt'](readId,_0x43c57e,_0x3f6fe1),[_0x4718f9,_0x3f530c]=readVint(_0x43c57e,_0x14ab48['AAhzq'](_0x3f6fe1,_0x1142a7));if(_0x2e18db===ID_CLUSTER)break;if(_0x14ab48[_0x61cd2c(0x1e2)](isUnknownSize,_0x4718f9,_0x3f530c))break;if(_0x14ab48['VSCYa'](_0x2e18db,ID_INFO)){const _0x3bb3dd=_0x14ab48['jDEjG'](_0x14ab48[_0x61cd2c(0x1c0)](_0x3f6fe1,_0x1142a7),_0x3f530c),_0x722bd1=_0x14ab48['AAhzq'](_0x3bb3dd,_0x4718f9),_0x3495b9=[];let _0x463ac2=_0x3bb3dd;while(_0x14ab48['thyHp'](_0x463ac2,_0x722bd1)){const [_0x312514,_0x58fd71]=readId(_0x43c57e,_0x463ac2),[_0x393ad3,_0x2e4606]=readVint(_0x43c57e,_0x463ac2+_0x58fd71),_0x8fd38e=_0x14ab48[_0x61cd2c(0x209)](_0x58fd71,_0x2e4606)+_0x393ad3;_0x312514!==ID_DURATION&&_0x3495b9['push'](_0x43c57e['slice'](_0x463ac2,_0x14ab48[_0x61cd2c(0x1d2)](_0x463ac2,_0x8fd38e))),_0x463ac2+=_0x8fd38e;}const _0xf38e52=Buffer[_0x61cd2c(0x1e8)](_0x3495b9),_0xb42212=Buffer[_0x61cd2c(0x1e8)]([_0x43c57e[_0x61cd2c(0x1e3)](_0x3f6fe1,_0x3f6fe1+_0x1142a7),writeVint(_0xf38e52['length'],_0x3f530c)]);return Buffer[_0x61cd2c(0x1e8)]([_0x43c57e['slice'](0x0,_0x3f6fe1),_0xb42212,_0xf38e52,_0x43c57e[_0x61cd2c(0x1e3)](_0x722bd1)]);}_0x3f6fe1+=_0x14ab48['jDEjG'](_0x1142a7,_0x3f530c)+_0x4718f9;}return _0x43c57e;}export function stitchWebmFiles(_0x3ead00,_0x30bd06){const _0x4f55de=_0xd240,_0x2973a9={'pMFta':function(_0x485252,_0x1733ec){return _0x485252(_0x1733ec);},'xEwkk':function(_0x491277,_0x326ffa){return _0x491277+_0x326ffa;},'fLCZp':function(_0x266649,_0x51dfc7,_0x55f5b5,_0xb2f262){return _0x266649(_0x51dfc7,_0x55f5b5,_0xb2f262);}};if(_0x3ead00['length']<=0x1)return![];const _0x470c2c=[];for(const _0x36c0bf of _0x3ead00){const _0x52bd94=_0x2973a9['pMFta'](readFileSync,_0x36c0bf),_0x373355=parseWebm(_0x52bd94);if(!_0x373355||_0x373355[_0x4f55de(0x1e0)]['length']===0x0)return![];_0x470c2c['push'](_0x373355);}const _0x46fe62=_0x470c2c[0x0],_0x34f675=_0x2973a9['pMFta'](rebuildHeaderWithoutDuration,_0x46fe62[_0x4f55de(0x1d9)]),_0x3848c7=[_0x34f675];let _0x358145=0x0;for(let _0x311fcc=0x0;_0x311fcc<_0x470c2c[_0x4f55de(0x202)];_0x311fcc++){const _0x56fe9d=_0x470c2c[_0x311fcc];for(const _0x1b21a7 of _0x56fe9d['clusters']){const _0x58da61=_0x2973a9['xEwkk'](_0x1b21a7['timestamp'],_0x358145);_0x3848c7['push'](_0x2973a9[_0x4f55de(0x201)](buildCluster,_0x58da61,_0x1b21a7[_0x4f55de(0x207)],_0x1b21a7[_0x4f55de(0x1e5)]));}const _0x3d23e9=0x1e;_0x358145+=_0x2973a9['xEwkk'](_0x56fe9d[_0x4f55de(0x1db)],_0x3d23e9);}return writeFileSync(_0x30bd06,Buffer[_0x4f55de(0x1e8)](_0x3848c7)),!![];}if(process['argv'][0x1]?.['endsWith']('stitchWebmFiles.ts')||process[_0x162add(0x1d3)][0x1]?.[_0x162add(0x1ef)](_0x162add(0x1f4))){const args=process['argv']['slice'](0x2);args[_0x162add(0x202)]<0x3&&(console['error'](_0x162add(0x20a)),process[_0x162add(0x205)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x162add(0x1df)](_0x162add(0x200)+inputs['length']+_0x162add(0x1d8)+output):console[_0x162add(0x1df)](_0x162add(0x1c4));}
|
|
1
|
+
const _0x2ee616=_0x5596;(function(_0x1b4aac,_0x34b42a){const _0x431353=_0x5596,_0x2106a5=_0x1b4aac();while(!![]){try{const _0x3b57aa=parseInt(_0x431353(0xd9))/0x1+parseInt(_0x431353(0xfd))/0x2*(-parseInt(_0x431353(0x101))/0x3)+parseInt(_0x431353(0xcd))/0x4*(-parseInt(_0x431353(0xd6))/0x5)+-parseInt(_0x431353(0x10a))/0x6+-parseInt(_0x431353(0xe2))/0x7+parseInt(_0x431353(0xd3))/0x8*(-parseInt(_0x431353(0xfc))/0x9)+parseInt(_0x431353(0xe4))/0xa;if(_0x3b57aa===_0x34b42a)break;else _0x2106a5['push'](_0x2106a5['shift']());}catch(_0x93c2fb){_0x2106a5['push'](_0x2106a5['shift']());}}}(_0x3f8e,0x43caa));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(_0x421477,_0x2e2ec8){const _0xa00713=_0x5596,_0x4bb997={'hmvUN':function(_0x8fbfcc,_0x42f3e2){return _0x8fbfcc>=_0x42f3e2;},'InBJW':function(_0x29050f,_0x3fd687){return _0x29050f&_0x3fd687;},'FlIKD':function(_0x5a13d9,_0x12c373){return _0x5a13d9+_0x12c373;}};if(_0x4bb997[_0xa00713(0xf7)](_0x2e2ec8,_0x421477[_0xa00713(0x104)]))return[0x0,0x0];const _0x3c4975=_0x421477[_0x2e2ec8];let _0x3f1286=0x1,_0x26f978=0x80;while(_0x3f1286<=0x8&&!_0x4bb997[_0xa00713(0xed)](_0x3c4975,_0x26f978)){_0x3f1286++,_0x26f978>>=0x1;}if(_0x2e2ec8+_0x3f1286>_0x421477['length'])return[0x0,0x0];let _0x2b9ed6=_0x3c4975&_0x26f978-0x1;for(let _0x448f01=0x1;_0x448f01<_0x3f1286;_0x448f01++){_0x2b9ed6=_0x4bb997['FlIKD'](_0x2b9ed6*0x100,_0x421477[_0x2e2ec8+_0x448f01]);}return[_0x2b9ed6,_0x3f1286];}function readId(_0x382ddc,_0x409f8c){const _0x9a58dc=_0x5596,_0x42266a={'xEySg':function(_0x11413c,_0x13ec09){return _0x11413c>=_0x13ec09;},'uktio':function(_0x35cf7d,_0x56fe74){return _0x35cf7d>_0x56fe74;},'XnGgh':function(_0x55b8ea,_0x546b0f){return _0x55b8ea+_0x546b0f;},'sGlyB':function(_0x369f3c,_0x47e9f2){return _0x369f3c<_0x47e9f2;},'eJEMw':function(_0x3731ba,_0x1f4c1f){return _0x3731ba+_0x1f4c1f;}};if(_0x409f8c>=_0x382ddc[_0x9a58dc(0x104)])return[0x0,0x0];const _0x3c02a3=_0x382ddc[_0x409f8c];let _0x3aa759;if(_0x42266a[_0x9a58dc(0xf3)](_0x3c02a3,0x80))_0x3aa759=0x1;else{if(_0x3c02a3>=0x40)_0x3aa759=0x2;else{if(_0x3c02a3>=0x20)_0x3aa759=0x3;else{if(_0x3c02a3>=0x10)_0x3aa759=0x4;else return[_0x3c02a3,0x1];}}}if(_0x42266a[_0x9a58dc(0xe9)](_0x42266a['XnGgh'](_0x409f8c,_0x3aa759),_0x382ddc[_0x9a58dc(0x104)]))return[0x0,0x0];let _0x41fb91=0x0;for(let _0x5c5b52=0x0;_0x42266a[_0x9a58dc(0xe8)](_0x5c5b52,_0x3aa759);_0x5c5b52++){_0x41fb91=_0x42266a['XnGgh'](_0x41fb91*0x100,_0x382ddc[_0x42266a['eJEMw'](_0x409f8c,_0x5c5b52)]);}return[_0x41fb91,_0x3aa759];}function readUint(_0x24e893,_0x5e3a0c,_0x37013b){const _0x5c4633=_0x5596,_0x2c8ee9={'PcmDM':function(_0x4ff650,_0x2eff3a){return _0x4ff650<_0x2eff3a;},'PLulW':function(_0xad853,_0x317dd1){return _0xad853+_0x317dd1;}};let _0x4c3715=0x0;for(let _0x54283d=0x0;_0x2c8ee9[_0x5c4633(0xeb)](_0x54283d,_0x37013b);_0x54283d++){_0x4c3715=_0x2c8ee9[_0x5c4633(0xee)](_0x4c3715*0x100,_0x24e893[_0x5e3a0c+_0x54283d]);}return _0x4c3715;}function isUnknownSize(_0x2d976f,_0x5c4fe){const _0x40daee=_0x5596,_0x55c486={'tskqN':function(_0x4d5250,_0x2e76a4){return _0x4d5250-_0x2e76a4;},'kQKlR':function(_0x2bb266,_0x126560){return _0x2bb266*_0x126560;}};return _0x2d976f===_0x55c486[_0x40daee(0xf4)](Math[_0x40daee(0x103)](0x2,_0x55c486[_0x40daee(0xd7)](0x7,_0x5c4fe)),0x1);}function _0x5596(_0x23ca60,_0x27d61b){_0x23ca60=_0x23ca60-0xcd;const _0x3f8e54=_0x3f8e();let _0x5596e4=_0x3f8e54[_0x23ca60];return _0x5596e4;}function writeVint(_0x121223,_0x172761){const _0x33af85=_0x5596,_0x50b0b3={'YFUew':function(_0x25c2bc,_0xdf22a9){return _0x25c2bc<_0xdf22a9;},'JlTzB':function(_0x384dc1,_0x50bf8b){return _0x384dc1-_0x50bf8b;},'nDpGn':function(_0x43c9a8,_0x514a10){return _0x43c9a8*_0x514a10;},'ShWsl':function(_0x130ae4,_0x559964){return _0x130ae4&_0x559964;},'KReSv':function(_0x3ce470,_0x303df3){return _0x3ce470<<_0x303df3;}};let _0x51b3c0=_0x172761||0x1;while(_0x50b0b3['YFUew'](_0x50b0b3['JlTzB'](Math[_0x33af85(0x103)](0x2,_0x50b0b3['nDpGn'](0x7,_0x51b3c0)),0x2),_0x121223))_0x51b3c0++;const _0x2d7e04=Buffer[_0x33af85(0xd1)](_0x51b3c0);for(let _0x5ab558=_0x50b0b3['JlTzB'](_0x51b3c0,0x1);_0x5ab558>=0x0;_0x5ab558--){_0x2d7e04[_0x5ab558]=_0x50b0b3['ShWsl'](_0x121223,0xff),_0x121223=Math['floor'](_0x121223/0x100);}return _0x2d7e04[0x0]|=_0x50b0b3[_0x33af85(0xd4)](0x1,0x8-_0x51b3c0),_0x2d7e04;}function writeUint(_0x6d97b7,_0x36793d){const _0x2d7aa2=_0x5596,_0x5a7674={'SVvgG':function(_0x2b2b99,_0x2cd34e){return _0x2b2b99-_0x2cd34e;}},_0x5eb470=Buffer['alloc'](_0x36793d);for(let _0x1c21cd=_0x5a7674['SVvgG'](_0x36793d,0x1);_0x1c21cd>=0x0;_0x1c21cd--){_0x5eb470[_0x1c21cd]=_0x6d97b7&0xff,_0x6d97b7=Math[_0x2d7aa2(0xf2)](_0x6d97b7/0x100);}return _0x5eb470;}function writeUnknownSizeVint(_0x3b4706){const _0x285e65={'ZwaNO':function(_0x388846,_0x26a928){return _0x388846>>_0x26a928;}},_0x23551b=Buffer['alloc'](_0x3b4706,0xff);return _0x23551b[0x0]=_0x285e65['ZwaNO'](0xff,_0x3b4706-0x1),_0x23551b;}function uintSize(_0x5e1bfa){if(_0x5e1bfa===0x0)return 0x1;let _0xe41cbf=0x0,_0x387401=_0x5e1bfa;while(_0x387401>0x0){_0xe41cbf++,_0x387401=Math['floor'](_0x387401/0x100);}return _0xe41cbf;}function _0x3f8e(){const _0x4b963c=['2016966emhxdI','Jebzi','JtiyM','TDFkr','xheVE','KtUwN','eMHyS','4952cXJJvU','maxTicks','JYwzQ','error','alloc','Uymzr','1955120YhgzBP','KReSv','concat','1445xXAADq','kQKlR','Hnrjh','225873yfYTOO','\x20files\x20->\x20','CHuFi','argv','GYlFP','CLnte','ZLDEk','endsWith','timestamp','2862244QieqPw','cAgcl','16393940FpfCmX','nPZHf','byKgA','stitchWebmFiles.js','sGlyB','uktio','xJzKl','PcmDM','PrROV','InBJW','PLulW','FDkVw','qnKWJ','CitMz','floor','xEySg','tskqN','qcfuY','bodyBeforeTimestamp','hmvUN','has','vkbyI','slice','cmBFW','9YSnjil','332WnouMQ','from','xNjiI','PJsQa','4344jBAlLB','wFLgj','pow','length','nJCZP','MbCit','push','Stitched\x20','VdrSI'];_0x3f8e=function(){return _0x4b963c;};return _0x3f8e();}function findTimestampScale(_0x3c3dc2,_0x57798a){const _0x150e94=_0x5596,_0x3041aa={'JtiyM':function(_0x462679,_0x111a22){return _0x462679+_0x111a22;},'MbCit':function(_0x1a24a4,_0x5204d9){return _0x1a24a4+_0x5204d9;},'VdrSI':function(_0x14299f,_0x2a5b4e){return _0x14299f===_0x2a5b4e;},'CHmIH':function(_0x11ea9c,_0x5816f2){return _0x11ea9c<_0x5816f2;},'FsXIJ':function(_0x2556fc,_0x146091,_0x34bf52){return _0x2556fc(_0x146091,_0x34bf52);},'XAOey':function(_0x28c475,_0x2ec8b5,_0x557ea2){return _0x28c475(_0x2ec8b5,_0x557ea2);},'vkbyI':function(_0xf7a271,_0x36283d,_0x442e42,_0x114eed){return _0xf7a271(_0x36283d,_0x442e42,_0x114eed);},'cmBFW':function(_0x299581,_0x3755da){return _0x299581+_0x3755da;},'bSdhf':function(_0xbbcfae,_0x58e6e0){return _0xbbcfae+_0x58e6e0;}};let _0x221011=_0x57798a;const _0x31792c=Math['min'](_0x3c3dc2[_0x150e94(0x104)],_0x3041aa[_0x150e94(0x10c)](_0x57798a,0x2710));while(_0x221011<_0x31792c){const [_0x52d5bc,_0x1712f0]=readId(_0x3c3dc2,_0x221011),[_0x59bc88,_0x273e6e]=readVint(_0x3c3dc2,_0x3041aa[_0x150e94(0x106)](_0x221011,_0x1712f0));if(_0x3041aa[_0x150e94(0x109)](_0x52d5bc,ID_INFO)){let _0x2e545a=_0x3041aa['JtiyM'](_0x3041aa[_0x150e94(0x106)](_0x221011,_0x1712f0),_0x273e6e);const _0x4ca90e=_0x2e545a+_0x59bc88;while(_0x3041aa['CHmIH'](_0x2e545a,_0x4ca90e)){const [_0x59d0f4,_0x5fbbe]=_0x3041aa['FsXIJ'](readId,_0x3c3dc2,_0x2e545a),[_0x1565e7,_0x36ec50]=_0x3041aa['XAOey'](readVint,_0x3c3dc2,_0x2e545a+_0x5fbbe);if(_0x3041aa['VdrSI'](_0x59d0f4,ID_TIMESTAMP_SCALE))return _0x3041aa[_0x150e94(0xf9)](readUint,_0x3c3dc2,_0x3041aa[_0x150e94(0xfb)](_0x2e545a+_0x5fbbe,_0x36ec50),_0x1565e7);_0x2e545a+=_0x3041aa[_0x150e94(0x10c)](_0x5fbbe,_0x36ec50)+_0x1565e7;}break;}if(_0x3041aa[_0x150e94(0x109)](_0x52d5bc,ID_CLUSTER))break;if(_0x3041aa['FsXIJ'](isUnknownSize,_0x59bc88,_0x273e6e))break;_0x221011+=_0x3041aa['JtiyM'](_0x3041aa['bSdhf'](_0x1712f0,_0x273e6e),_0x59bc88);}return 0xf4240;}function findFirstClusterOffset(_0x2ab641,_0x165fd4){const _0x2c1333=_0x5596,_0x3b1929={'xNjiI':function(_0x197ba9,_0x31a0e0,_0x5d309f){return _0x197ba9(_0x31a0e0,_0x5d309f);},'vihLD':function(_0xfd7e14,_0x412363){return _0xfd7e14===_0x412363;},'kcDka':function(_0x1e8a80,_0x4535fe){return _0x1e8a80+_0x4535fe;}};let _0xb703dc=_0x165fd4;while(_0xb703dc<_0x2ab641['length']){const [_0x53db2e,_0x34f73c]=_0x3b1929[_0x2c1333(0xff)](readId,_0x2ab641,_0xb703dc);if(_0x3b1929['vihLD'](_0x53db2e,ID_CLUSTER))return _0xb703dc;const [_0x5e60cc,_0x29809e]=_0x3b1929['xNjiI'](readVint,_0x2ab641,_0x3b1929['kcDka'](_0xb703dc,_0x34f73c));if(_0x3b1929[_0x2c1333(0xff)](isUnknownSize,_0x5e60cc,_0x29809e))return _0xb703dc;_0xb703dc+=_0x3b1929['kcDka'](_0x34f73c,_0x29809e)+_0x5e60cc;}return _0x2ab641[_0x2c1333(0x104)];}function findClusterEnd(_0x25df72,_0x38c843,_0x103a77,_0xb19e8f){const _0x699fd0=_0x5596,_0x29ef4d={'qQrip':function(_0x1584d3,_0x125eae){return _0x1584d3<_0x125eae;},'Myhhp':function(_0x128064,_0x4833f2,_0x53656d){return _0x128064(_0x4833f2,_0x53656d);},'KtUwN':function(_0x2b0a56,_0x5dcbff){return _0x2b0a56+_0x5dcbff;},'Uymzr':function(_0x5ca080,_0x125ff2,_0x3ee868){return _0x5ca080(_0x125ff2,_0x3ee868);},'YgdLB':function(_0x259a8f,_0x5d6b89){return _0x259a8f+_0x5d6b89;}};if(!isUnknownSize(_0x103a77,_0xb19e8f))return _0x38c843+_0x103a77;const _0x28bd6b=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0xc843f4=_0x38c843;while(_0x29ef4d['qQrip'](_0xc843f4,_0x25df72['length']-0x4)){const [_0x369495,_0x5d44a8]=_0x29ef4d['Myhhp'](readId,_0x25df72,_0xc843f4);if(_0x28bd6b[_0x699fd0(0xf8)](_0x369495))return _0xc843f4;const [_0x2bcae7,_0x54ea72]=readVint(_0x25df72,_0x29ef4d[_0x699fd0(0x10f)](_0xc843f4,_0x5d44a8));if(_0x29ef4d[_0x699fd0(0xd2)](isUnknownSize,_0x2bcae7,_0x54ea72))return _0x25df72['length'];_0xc843f4+=_0x29ef4d['YgdLB'](_0x5d44a8+_0x54ea72,_0x2bcae7);}return _0x25df72['length'];}function extractClusters(_0x175349,_0x48f879){const _0x20abfc=_0x5596,_0x175677={'wFLgj':function(_0x58e044,_0x560615){return _0x58e044===_0x560615;},'uuDqf':function(_0x460db3,_0x9b470e,_0x28d457){return _0x460db3(_0x9b470e,_0x28d457);},'OWDbK':function(_0x373d36,_0x44b624){return _0x373d36!==_0x44b624;},'CitMz':function(_0x8962f,_0x218244){return _0x8962f+_0x218244;},'nPZHf':function(_0x264e74,_0x332ad1,_0x2a0eeb){return _0x264e74(_0x332ad1,_0x2a0eeb);},'cAgcl':function(_0x56bb91,_0x5c26b8){return _0x56bb91+_0x5c26b8;},'Hapky':function(_0x5124b4,_0x3880f9,_0x8f579a){return _0x5124b4(_0x3880f9,_0x8f579a);},'HaqTP':function(_0x25e27d,_0x582011){return _0x25e27d===_0x582011;},'tzYOU':function(_0x2743f0,_0x5db0d4,_0x40f994,_0x54e69b){return _0x2743f0(_0x5db0d4,_0x40f994,_0x54e69b);},'Hnrjh':function(_0xa08d70,_0x53a0cc){return _0xa08d70+_0x53a0cc;},'HXtKq':function(_0x426874,_0x41b441){return _0x426874===_0x41b441;},'FDkVw':function(_0x21dc34,_0x5d0355,_0x4b35f4){return _0x21dc34(_0x5d0355,_0x4b35f4);},'ZLDEk':function(_0x1dab70,_0x2c17d4,_0x3cd380){return _0x1dab70(_0x2c17d4,_0x3cd380);},'qnKWJ':function(_0x538e65,_0x573515){return _0x538e65+_0x573515;},'dmctn':function(_0x3ea53a,_0x1cb74a){return _0x3ea53a+_0x1cb74a;},'PJsQa':function(_0x4addaa,_0x3b47e9){return _0x4addaa>_0x3b47e9;},'QigBV':function(_0x3548a0,_0x1287e6){return _0x3548a0===_0x1287e6;}},_0x3e3a39=[],_0x589ac0=Buffer[_0x20abfc(0xfe)]([0x1f,0x43,0xb6,0x75]);let _0x328a96=0x0;while(_0x328a96<_0x175349['length']){const _0x48cad0=_0x175349['indexOf'](_0x589ac0,_0x328a96);if(_0x175677[_0x20abfc(0x102)](_0x48cad0,-0x1))break;const [_0x2252d1,_0x2f7e1d]=_0x175677['uuDqf'](readId,_0x175349,_0x48cad0);if(_0x175677['OWDbK'](_0x2252d1,ID_CLUSTER)){_0x328a96=_0x175677['CitMz'](_0x48cad0,0x1);continue;}const [_0x264b50,_0x5831cf]=_0x175677[_0x20abfc(0xe5)](readVint,_0x175349,_0x48cad0+_0x2f7e1d),_0x41739e=_0x175677['CitMz'](_0x175677[_0x20abfc(0xe3)](_0x48cad0,_0x2f7e1d),_0x5831cf),_0x5b47ca=findClusterEnd(_0x175349,_0x41739e,_0x264b50,_0x5831cf);let _0x37855a=_0x41739e,_0x3bba18=0x0,_0x3dfe80=0x2,_0x12c295=![],_0x38bc52=Buffer['alloc'](0x0),_0x44b9c1=Buffer['alloc'](0x0);while(_0x37855a<_0x5b47ca){const [_0x249c48,_0x87318f]=readId(_0x175349,_0x37855a),[_0x39e806,_0x353f22]=_0x175677['Hapky'](readVint,_0x175349,_0x175677['CitMz'](_0x37855a,_0x87318f));if(_0x175677['HaqTP'](_0x249c48,ID_TIMESTAMP)){_0x3bba18=_0x175677['tzYOU'](readUint,_0x175349,_0x175677[_0x20abfc(0xd8)](_0x175677[_0x20abfc(0xf1)](_0x37855a,_0x87318f),_0x353f22),_0x39e806),_0x3dfe80=_0x39e806,_0x12c295=!![],_0x38bc52=_0x175349['slice'](_0x41739e,_0x37855a);const _0x1fa9f5=_0x37855a+_0x87318f+_0x353f22+_0x39e806;_0x44b9c1=_0x175349[_0x20abfc(0xfa)](_0x1fa9f5,_0x5b47ca);break;}if(_0x175677['HXtKq'](_0x249c48,ID_CLUSTER))break;if(isUnknownSize(_0x39e806,_0x353f22))break;_0x37855a+=_0x87318f+_0x353f22+_0x39e806;}!_0x12c295&&(_0x44b9c1=_0x175349[_0x20abfc(0xfa)](_0x41739e,_0x5b47ca));let _0x2af15d=_0x3bba18;_0x37855a=_0x41739e;while(_0x37855a<_0x5b47ca){const [_0x4a5bbb,_0x414919]=_0x175677[_0x20abfc(0xef)](readId,_0x175349,_0x37855a),[_0x509b4a,_0x5d42af]=_0x175677[_0x20abfc(0xdf)](readVint,_0x175349,_0x175677['CitMz'](_0x37855a,_0x414919));if(_0x175677['wFLgj'](_0x4a5bbb,ID_SIMPLE_BLOCK)&&_0x509b4a>=0x4){const _0x38b62a=_0x175677[_0x20abfc(0xf1)](_0x175677[_0x20abfc(0xf0)](_0x37855a,_0x414919),_0x5d42af),[,_0x228569]=readVint(_0x175349,_0x38b62a),_0x44c3fd=_0x175349['readInt16BE'](_0x38b62a+_0x228569),_0x3357d2=_0x175677['dmctn'](_0x3bba18,_0x44c3fd);if(_0x175677[_0x20abfc(0x100)](_0x3357d2,_0x2af15d))_0x2af15d=_0x3357d2;}if(_0x175677['QigBV'](_0x4a5bbb,ID_CLUSTER))break;if(isUnknownSize(_0x509b4a,_0x5d42af))break;_0x37855a+=_0x175677['Hnrjh'](_0x414919,_0x5d42af)+_0x509b4a;}_0x3e3a39[_0x20abfc(0x107)]({'timestamp':_0x3bba18,'maxTicks':_0x2af15d,'bodyBeforeTimestamp':_0x38bc52,'bodyAfterTimestamp':_0x44b9c1,'timestampElementSize':_0x3dfe80}),_0x328a96=_0x5b47ca;}return _0x3e3a39;}function parseWebm(_0x5ce445){const _0x57e5aa=_0x5596,_0x4e0633={'eMHyS':function(_0x1dcace,_0x296211,_0x4ad041){return _0x1dcace(_0x296211,_0x4ad041);},'rpzra':function(_0x3e5910,_0x23c0d1){return _0x3e5910!==_0x23c0d1;},'mSwXH':function(_0x2df509,_0x5a3ca8){return _0x2df509+_0x5a3ca8;},'CuFBK':function(_0x4234c1,_0x4da3b8,_0x4dc592){return _0x4234c1(_0x4da3b8,_0x4dc592);},'CLnte':function(_0xfebf8b,_0x3cc81b){return _0xfebf8b>_0x3cc81b;}};let _0x485001=0x0;const [,_0x5717a2]=readId(_0x5ce445,_0x485001),[_0x3ec993,_0x5d9dc7]=_0x4e0633[_0x57e5aa(0x110)](readVint,_0x5ce445,_0x485001+_0x5717a2);_0x485001+=_0x5717a2+_0x5d9dc7+_0x3ec993;const [_0x46ea8e,_0x175279]=readId(_0x5ce445,_0x485001);if(_0x4e0633['rpzra'](_0x46ea8e,ID_SEGMENT))return null;const [,_0x54202b]=readVint(_0x5ce445,_0x485001+_0x175279),_0x5d34a7=_0x4e0633['mSwXH'](_0x485001+_0x175279,_0x54202b),_0x46d0fc=_0x4e0633['CuFBK'](findTimestampScale,_0x5ce445,_0x5d34a7),_0x41af65=findFirstClusterOffset(_0x5ce445,_0x5d34a7),_0x4a2f6d=_0x5ce445[_0x57e5aa(0xfa)](0x0,_0x41af65),_0x56a21a=extractClusters(_0x5ce445,_0x46d0fc);let _0x391bba=0x0;for(const _0x14f77f of _0x56a21a){if(_0x4e0633[_0x57e5aa(0xde)](_0x14f77f[_0x57e5aa(0xce)],_0x391bba))_0x391bba=_0x14f77f[_0x57e5aa(0xce)];}return{'header':_0x4a2f6d,'clusters':_0x56a21a,'timestampScale':_0x46d0fc,'maxTimestampTicks':_0x391bba};}function buildCluster(_0x3a33e7,_0x4a6511,_0x324f38){const _0x1e561f=_0x5596,_0x4c501b={'TRwtu':function(_0x57eab8,_0x44e18e){return _0x57eab8(_0x44e18e);},'JYwzQ':function(_0x3b0e67,_0x450d5b,_0x19b34d){return _0x3b0e67(_0x450d5b,_0x19b34d);}},_0xda244b=Buffer[_0x1e561f(0xfe)]([0x1f,0x43,0xb6,0x75]),_0x8316a2=Math['max'](0x4,_0x4c501b['TRwtu'](uintSize,_0x3a33e7)),_0x109a52=Buffer[_0x1e561f(0xd5)]([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x8316a2),_0x4c501b[_0x1e561f(0xcf)](writeUint,_0x3a33e7,_0x8316a2)]),_0x432ef4=Buffer['concat']([_0x4a6511,_0x109a52,_0x324f38]),_0x1fa66c=writeVint(_0x432ef4['length']);return Buffer['concat']([_0xda244b,_0x1fa66c,_0x432ef4]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x423f27){const _0x42c130=_0x5596,_0x24f020={'xheVE':function(_0x54854a,_0x3beaa3,_0x526a3e){return _0x54854a(_0x3beaa3,_0x526a3e);},'Jebzi':function(_0x50ff58,_0x355594){return _0x50ff58+_0x355594;},'byKgA':function(_0x2dfefe,_0x3b25e7){return _0x2dfefe+_0x3b25e7;},'dodnM':function(_0x142418,_0x10be54,_0x4259c2){return _0x142418(_0x10be54,_0x4259c2);},'xJzKl':function(_0x5153ef,_0x45e910){return _0x5153ef+_0x45e910;},'nJCZP':function(_0x143d7b,_0x5ab15f,_0x58c821){return _0x143d7b(_0x5ab15f,_0x58c821);},'PrROV':function(_0x2c63b5,_0x2d6bcb){return _0x2c63b5+_0x2d6bcb;},'RYnvL':function(_0x18661d,_0xbeda9b){return _0x18661d===_0xbeda9b;},'DxoIi':function(_0x430f5e,_0x4fb7d9){return _0x430f5e+_0x4fb7d9;},'RnNDj':function(_0x2f1539,_0x1f84a2){return _0x2f1539<_0x1f84a2;},'mdgWP':function(_0x319227,_0x273455){return _0x319227!==_0x273455;},'bReCb':function(_0xce7e4,_0x28cb2e){return _0xce7e4+_0x28cb2e;},'CHuFi':function(_0x23373a,_0x20f3a4){return _0x23373a+_0x20f3a4;}},_0x11343b=Buffer[_0x42c130(0xfe)](_0x423f27);let _0xe3470a=0x0;const [,_0x3bdf63]=readId(_0x11343b,_0xe3470a),[_0x5d8324,_0x103e0f]=_0x24f020[_0x42c130(0x10e)](readVint,_0x11343b,_0x24f020['Jebzi'](_0xe3470a,_0x3bdf63)),_0x4bc652=_0x24f020[_0x42c130(0x10b)](_0x24f020[_0x42c130(0xe6)](_0xe3470a,_0x3bdf63)+_0x103e0f,_0x5d8324),[,_0x38b495]=_0x24f020['xheVE'](readId,_0x11343b,_0x4bc652),[,_0x395af6]=_0x24f020['dodnM'](readVint,_0x11343b,_0x24f020[_0x42c130(0xe6)](_0x4bc652,_0x38b495)),_0x313c56=_0x24f020[_0x42c130(0xe6)](_0x4bc652+_0x38b495,_0x395af6),_0x294f23=writeUnknownSizeVint(_0x395af6);_0x294f23['copy'](_0x11343b,_0x24f020[_0x42c130(0x10b)](_0x4bc652,_0x38b495));let _0x55983e=_0x313c56;const _0x1f9444=Math['min'](_0x11343b[_0x42c130(0x104)],_0x24f020[_0x42c130(0xea)](_0x313c56,0x2710));while(_0x55983e<_0x1f9444){const [_0x5637e6,_0x44526d]=_0x24f020[_0x42c130(0x105)](readId,_0x11343b,_0x55983e),[_0x32d927,_0x1690f8]=readVint(_0x11343b,_0x24f020[_0x42c130(0xec)](_0x55983e,_0x44526d));if(_0x5637e6===ID_CLUSTER)break;if(_0x24f020[_0x42c130(0x105)](isUnknownSize,_0x32d927,_0x1690f8))break;if(_0x24f020['RYnvL'](_0x5637e6,ID_INFO)){const _0x54a34c=_0x55983e+_0x44526d+_0x1690f8,_0x26fd4f=_0x24f020['DxoIi'](_0x54a34c,_0x32d927),_0x273a1f=[];let _0x2b0756=_0x54a34c;while(_0x24f020['RnNDj'](_0x2b0756,_0x26fd4f)){const [_0xf49d86,_0x4b2749]=_0x24f020['dodnM'](readId,_0x11343b,_0x2b0756),[_0x2c077e,_0x10885b]=readVint(_0x11343b,_0x2b0756+_0x4b2749),_0x36e044=_0x4b2749+_0x10885b+_0x2c077e;_0x24f020['mdgWP'](_0xf49d86,ID_DURATION)&&_0x273a1f['push'](_0x11343b['slice'](_0x2b0756,_0x2b0756+_0x36e044)),_0x2b0756+=_0x36e044;}const _0x9d745d=Buffer[_0x42c130(0xd5)](_0x273a1f),_0x38b94f=Buffer['concat']([_0x11343b['slice'](_0x55983e,_0x24f020['bReCb'](_0x55983e,_0x44526d)),_0x24f020['xheVE'](writeVint,_0x9d745d['length'],_0x1690f8)]);return Buffer['concat']([_0x11343b[_0x42c130(0xfa)](0x0,_0x55983e),_0x38b94f,_0x9d745d,_0x11343b[_0x42c130(0xfa)](_0x26fd4f)]);}_0x55983e+=_0x24f020['xJzKl'](_0x24f020[_0x42c130(0xdb)](_0x44526d,_0x1690f8),_0x32d927);}return _0x11343b;}export function stitchWebmFiles(_0x15c19c,_0x3a0c47){const _0x356367=_0x5596,_0x3fcc68={'MiqHO':function(_0x5e7999,_0xdae641){return _0x5e7999(_0xdae641);},'TDFkr':function(_0x3528a9,_0x30df11){return _0x3528a9<_0x30df11;},'qcfuY':function(_0x41effa,_0x55890d){return _0x41effa+_0x55890d;},'GYlFP':function(_0x4a4aae,_0x52c687,_0x1d8938){return _0x4a4aae(_0x52c687,_0x1d8938);}};if(_0x15c19c['length']<=0x1)return![];const _0x1cc70b=[];for(const _0x5c7e0f of _0x15c19c){const _0x2f97e9=readFileSync(_0x5c7e0f),_0x514c13=_0x3fcc68['MiqHO'](parseWebm,_0x2f97e9);if(!_0x514c13||_0x514c13['clusters']['length']===0x0)return![];_0x1cc70b[_0x356367(0x107)](_0x514c13);}const _0x1f22ef=_0x1cc70b[0x0],_0x24a849=rebuildHeaderWithoutDuration(_0x1f22ef['header']),_0x391d3a=[_0x24a849];let _0xef417f=0x0;for(let _0x40aa8d=0x0;_0x3fcc68[_0x356367(0x10d)](_0x40aa8d,_0x1cc70b[_0x356367(0x104)]);_0x40aa8d++){const _0x37dec6=_0x1cc70b[_0x40aa8d];for(const _0x2070c0 of _0x37dec6['clusters']){const _0x54dca8=_0x3fcc68[_0x356367(0xf5)](_0x2070c0[_0x356367(0xe1)],_0xef417f);_0x391d3a[_0x356367(0x107)](buildCluster(_0x54dca8,_0x2070c0[_0x356367(0xf6)],_0x2070c0['bodyAfterTimestamp']));}const _0x3dcf02=0x1e;_0xef417f+=_0x37dec6['maxTimestampTicks']+_0x3dcf02;}return _0x3fcc68[_0x356367(0xdd)](writeFileSync,_0x3a0c47,Buffer['concat'](_0x391d3a)),!![];}if(process[_0x2ee616(0xdc)][0x1]?.[_0x2ee616(0xe0)]('stitchWebmFiles.ts')||process['argv'][0x1]?.['endsWith'](_0x2ee616(0xe7))){const args=process[_0x2ee616(0xdc)][_0x2ee616(0xfa)](0x2);args['length']<0x3&&(console[_0x2ee616(0xd0)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args[_0x2ee616(0xfa)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x2ee616(0x108)+inputs['length']+_0x2ee616(0xda)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x149399=_0x150c;(function(_0x5d3d5c,_0x3e42b8){const _0x579240=_0x150c,_0x18beca=_0x5d3d5c();while(!![]){try{const _0x2939c8=-parseInt(_0x579240(0x1a4))/0x1*(parseInt(_0x579240(0x198))/0x2)+parseInt(_0x579240(0x1a0))/0x3+-parseInt(_0x579240(0x1a3))/0x4+-parseInt(_0x579240(0x18e))/0x5*(parseInt(_0x579240(0x1a7))/0x6)+-parseInt(_0x579240(0x17d))/0x7+parseInt(_0x579240(0x187))/0x8+parseInt(_0x579240(0x172))/0x9;if(_0x2939c8===_0x3e42b8)break;else _0x18beca['push'](_0x18beca['shift']());}catch(_0x1963da){_0x18beca['push'](_0x18beca['shift']());}}}(_0x369f,0x7a6a1));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';function _0x369f(){const _0x525abe=['flushAsync','commandStartTime','now','POST','version','2722748YIOqIT','phase','outcome','metadata','durationMs','gNCqc','command','DEBUG','platform','setContext','7922216cwxhsY','NaRMC','stdout','buffer','splice','checklistItemId','/api/v1/mcp/cli-telemetry','245oDfoFe','phaseCounter','sendBatch','env','[telemetry]\x20Sending\x20','constructor','message','isCI','nFjPg','phase_start','1154dJUkaX','push','zGtLX','trackCommandError','trackCommandEnd','HHroP','phaseStartTimes','mzbuc','189378usreya','slice','errorMessage','1355352KsyxfS','1633kIHLFu','UnGUr','cliVersion','106734TNByUu','MxFXL','cRwBR','stringify','sendImmediate','Unknown','LbRfE','flush','commandId','nodeVersion','command_error','transport','name','buildEvent','trackPhaseEnd','abort','WsBIl','success','.session','.ranger','NvJOd','trim','length','Bearer\x20','errorType','\x20event(s)\x20to\x20','utf-8','flushing','browserSessionId','delete','phase_error','isTty','loCjf','17907390RDlDgR','trackPhaseStart','split','featureId','catch','finally'];_0x369f=function(){return _0x525abe;};return _0x369f();}import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x2af51d=_0x150c,_0x37e01a={'LbRfE':function(_0xfca602,_0x402133,_0x2272c4){return _0xfca602(_0x402133,_0x2272c4);},'UnGUr':_0x2af51d(0x1b9),'loCjf':function(_0x18ee9f){return _0x18ee9f();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x56ee16=join(homedir(),_0x2af51d(0x1ba)),_0x167989=_0x37e01a[_0x2af51d(0x1ad)](join,_0x56ee16,_0x37e01a[_0x2af51d(0x1a5)]);if(existsSync(_0x167989)){cachedDeviceId=readFileSync(_0x167989,_0x2af51d(0x16b))[_0x2af51d(0x166)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),mkdirSync(_0x56ee16,{'recursive':!![]}),_0x37e01a[_0x2af51d(0x1ad)](writeFileSync,_0x167989,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x37e01a[_0x2af51d(0x171)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x149399(0x18a)]=[];['commandId'];[_0x149399(0x183)];['commandStartTime'];[_0x149399(0x18f)]=0x0;['phaseStartTimes']=new Map();[_0x149399(0x16c)]=null;['deviceId'];[_0x149399(0x1a6)];['nodeVersion'];[_0x149399(0x185)];[_0x149399(0x170)];[_0x149399(0x195)];['featureId'];[_0x149399(0x18c)];[_0x149399(0x16d)];['transport'];constructor(_0x46c66a){const _0x1668d0=_0x149399,_0x19b2c2={'rfAGy':function(_0x13e28c){return _0x13e28c();}},_0x3abdc6='4|1|8|2|7|6|5|0|3'[_0x1668d0(0x174)]('|');let _0x3d7e60=0x0;while(!![]){switch(_0x3abdc6[_0x3d7e60++]){case'0':this['isTty']=process[_0x1668d0(0x189)]['isTTY']??![];continue;case'1':this['command']=_0x46c66a;continue;case'2':this['deviceId']=_0x19b2c2['rfAGy'](getDeviceId);continue;case'3':this['isCI']=!!(process['env']['CI']||process['env']['GITHUB_ACTIONS']);continue;case'4':this[_0x1668d0(0x1af)]=randomUUID();continue;case'5':this[_0x1668d0(0x185)]=process['platform'];continue;case'6':this[_0x1668d0(0x1b0)]=process[_0x1668d0(0x17c)];continue;case'7':this[_0x1668d0(0x1a6)]=_0x19b2c2['rfAGy'](getCurrentVersion);continue;case'8':this[_0x1668d0(0x179)]=Date[_0x1668d0(0x17a)]();continue;}break;}}[_0x149399(0x186)](_0x1dbc5d){const _0x4a95bc=_0x149399;if(_0x1dbc5d['featureId'])this[_0x4a95bc(0x175)]=_0x1dbc5d['featureId'];if(_0x1dbc5d['checklistItemId'])this['checklistItemId']=_0x1dbc5d[_0x4a95bc(0x18c)];if(_0x1dbc5d[_0x4a95bc(0x16d)])this[_0x4a95bc(0x16d)]=_0x1dbc5d['browserSessionId'];if(_0x1dbc5d['transport'])this['transport']=_0x1dbc5d['transport'];}async['trackCommandStart'](_0x509d0a){const _0x445b07=_0x149399,_0x124447=this['buildEvent']({'eventType':'command_start','metadata':_0x509d0a});await this[_0x445b07(0x1ab)](_0x124447);}async[_0x149399(0x19c)](_0x24bb3b,_0x417e64){const _0x354682=_0x149399,_0x5109f5={'HHroP':'command_end'},_0x175910=this['buildEvent']({'eventType':_0x5109f5[_0x354682(0x19d)],'outcome':_0x24bb3b,'durationMs':Date['now']()-this[_0x354682(0x179)],'metadata':_0x417e64});await this[_0x354682(0x1ab)](_0x175910),await this[_0x354682(0x1ae)]();}async['trackCommandError'](_0x33de17,_0x441b6d){const _0x1f5c59=_0x149399,_0x2d34a2={'fSjAm':_0x1f5c59(0x1b1),'TjBDk':function(_0x43f9d9,_0x1e7bd0,_0xff3b09){return _0x43f9d9(_0x1e7bd0,_0xff3b09);},'LmRyz':function(_0x10ba5d,_0x10567a){return _0x10ba5d instanceof _0x10567a;},'TXJis':function(_0x4de3b3,_0x567953){return _0x4de3b3(_0x567953);},'nFjPg':function(_0x4834bd,_0x53d241){return _0x4834bd instanceof _0x53d241;}},_0x3d5e28=this['buildEvent']({'eventType':_0x2d34a2['fSjAm'],'errorMessage':_0x2d34a2['TjBDk'](truncate,_0x2d34a2['LmRyz'](_0x33de17,Error)?_0x33de17[_0x1f5c59(0x194)]:_0x2d34a2['TXJis'](String,_0x33de17),0x1f4),'errorType':_0x2d34a2[_0x1f5c59(0x196)](_0x33de17,Error)?_0x33de17[_0x1f5c59(0x193)][_0x1f5c59(0x1b3)]:'Unknown','durationMs':Date[_0x1f5c59(0x17a)]()-this['commandStartTime'],'metadata':_0x441b6d});await this[_0x1f5c59(0x1ab)](_0x3d5e28),await this[_0x1f5c59(0x1ae)]();}[_0x149399(0x173)](_0x1302b1,_0x25c68d){const _0x1fd279=_0x149399,_0x4bdffb={'SeWSP':_0x1fd279(0x197)};this[_0x1fd279(0x18f)]++,this['phaseStartTimes']['set'](_0x1302b1,Date['now']());const _0x4270e3=this['buildEvent']({'eventType':_0x4bdffb['SeWSP'],'phase':_0x1302b1,'phaseIndex':this['phaseCounter'],'metadata':_0x25c68d});this[_0x1fd279(0x18a)][_0x1fd279(0x199)](_0x4270e3);}[_0x149399(0x1b5)](_0x3206db,_0x3599fd){const _0x5dd733=_0x149399,_0x474fa0={'MxFXL':'phase_end'},_0x83d281=this[_0x5dd733(0x19e)]['get'](_0x3206db),_0x22c294=_0x83d281?Date[_0x5dd733(0x17a)]()-_0x83d281:undefined;this[_0x5dd733(0x19e)]['delete'](_0x3206db);const _0x5e9807=this[_0x5dd733(0x1b4)]({'eventType':_0x474fa0[_0x5dd733(0x1a8)],'phase':_0x3206db,'durationMs':_0x22c294,'metadata':_0x3599fd});this[_0x5dd733(0x18a)][_0x5dd733(0x199)](_0x5e9807),this[_0x5dd733(0x18a)][_0x5dd733(0x167)]>=0xa&&this[_0x5dd733(0x178)]();}async['trackPhaseError'](_0x6e4510,_0x3557ac,_0x2a2941){const _0x33cbd1=_0x149399,_0x23e017={'DUDTR':_0x33cbd1(0x16f),'NvJOd':function(_0x24e801,_0x126f03){return _0x24e801 instanceof _0x126f03;}},_0x3e7ece=this[_0x33cbd1(0x19e)]['get'](_0x6e4510),_0x543bfb=_0x3e7ece?Date[_0x33cbd1(0x17a)]()-_0x3e7ece:undefined;this[_0x33cbd1(0x19e)][_0x33cbd1(0x16e)](_0x6e4510);const _0x4a9289=this['buildEvent']({'eventType':_0x23e017['DUDTR'],'phase':_0x6e4510,'durationMs':_0x543bfb,'errorMessage':truncate(_0x23e017[_0x33cbd1(0x165)](_0x3557ac,Error)?_0x3557ac[_0x33cbd1(0x194)]:String(_0x3557ac),0x1f4),'errorType':_0x23e017[_0x33cbd1(0x165)](_0x3557ac,Error)?_0x3557ac[_0x33cbd1(0x193)]['name']:_0x33cbd1(0x1ac),'metadata':_0x2a2941});await this[_0x33cbd1(0x1ab)](_0x4a9289);}async['flush'](){const _0x25221b=_0x149399,_0x4bda7a={'gNCqc':function(_0x5a404e,_0x8be3ff){return _0x5a404e===_0x8be3ff;}};if(_0x4bda7a[_0x25221b(0x182)](this['buffer']['length'],0x0))return;const _0x25b475=this['buffer'][_0x25221b(0x18b)](0x0);try{await this['sendBatch'](_0x25b475);}catch{}}[_0x149399(0x1b4)](_0x130bee){const _0x1734be=_0x149399;return{'eventType':_0x130bee['eventType'],'command':this[_0x1734be(0x183)],'commandId':this[_0x1734be(0x1af)],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x130bee[_0x1734be(0x181)],'phase':_0x130bee[_0x1734be(0x17e)],'phaseIndex':_0x130bee['phaseIndex'],'outcome':_0x130bee[_0x1734be(0x17f)],'errorMessage':_0x130bee[_0x1734be(0x1a2)],'errorType':_0x130bee[_0x1734be(0x169)],'featureId':this['featureId'],'checklistItemId':this['checklistItemId'],'browserSessionId':this['browserSessionId'],'transport':this[_0x1734be(0x1b2)],'evaluation':_0x130bee['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this['nodeVersion'],'platform':this[_0x1734be(0x185)],'cwd':process['cwd'](),'isTty':this[_0x1734be(0x170)],'isCI':this[_0x1734be(0x195)],'metadata':_0x130bee[_0x1734be(0x180)]};}async['sendImmediate'](_0x2c9645){const _0x187ee8=_0x149399;try{await this[_0x187ee8(0x190)]([_0x2c9645]);}catch{}}[_0x149399(0x178)](){const _0x427078=_0x149399;if(this['flushing'])return;this['flushing']=this['flush']()[_0x427078(0x177)](()=>{this['flushing']=null;});}async[_0x149399(0x190)](_0x48380c){const _0x2d1328=_0x149399,_0x1da0a4={'mzbuc':function(_0x2e57b2,_0x40eeb0,_0x1d6a77){return _0x2e57b2(_0x40eeb0,_0x1d6a77);},'zGtLX':_0x2d1328(0x17b),'NaRMC':function(_0x4ae73c,_0x6f8ebd){return _0x4ae73c(_0x6f8ebd);}},_0x101ad5=await getToken()[_0x2d1328(0x176)](()=>null),_0x11b326=getApiBaseUrl(),_0x312d85={'Content-Type':'application/json'};_0x101ad5&&(_0x312d85['Authorization']=_0x2d1328(0x168)+_0x101ad5);const _0x48305b={'events':_0x48380c};process[_0x2d1328(0x191)][_0x2d1328(0x184)]&&console['error'](_0x2d1328(0x192)+_0x48380c[_0x2d1328(0x167)]+_0x2d1328(0x16a)+_0x11b326+_0x2d1328(0x18d));const _0x56122b=new AbortController(),_0x3be6ad=_0x1da0a4[_0x2d1328(0x19f)](setTimeout,()=>_0x56122b[_0x2d1328(0x1b6)](),0x1388);try{await _0x1da0a4[_0x2d1328(0x19f)](fetch,_0x11b326+'/api/v1/mcp/cli-telemetry',{'method':_0x1da0a4[_0x2d1328(0x19a)],'headers':_0x312d85,'body':JSON[_0x2d1328(0x1aa)](_0x48305b),'signal':_0x56122b['signal']});}finally{_0x1da0a4[_0x2d1328(0x188)](clearTimeout,_0x3be6ad);}}}function _0x150c(_0x233496,_0x17fa07){_0x233496=_0x233496-0x165;const _0x369f2e=_0x369f();let _0x150cfe=_0x369f2e[_0x233496];return _0x150cfe;}let currentCollector=null;export function createTelemetryCollector(_0x251948){return currentCollector=new TelemetryCollector(_0x251948),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x175968,_0x57f29f,_0x3bba14){const _0x4a6d96=_0x149399,_0x5a8702={'TLoEp':function(_0x50923b,_0x373db6){return _0x50923b(_0x373db6);},'WsBIl':_0x4a6d96(0x1b8)},_0x53ef09=_0x5a8702['TLoEp'](createTelemetryCollector,_0x175968);await _0x53ef09['trackCommandStart'](_0x3bba14);try{const _0x590ffe=await _0x57f29f(_0x53ef09);return await _0x53ef09['trackCommandEnd'](_0x5a8702[_0x4a6d96(0x1b7)]),_0x590ffe;}catch(_0x383b16){await _0x53ef09[_0x4a6d96(0x19b)](_0x383b16);throw _0x383b16;}finally{await _0x53ef09[_0x4a6d96(0x1ae)]();}}function truncate(_0x1f6379,_0x30faab){const _0x48c70c=_0x149399,_0x77a6f9={'UYHFn':function(_0x3d7a48,_0x3b34fc){return _0x3d7a48>_0x3b34fc;},'cjSBA':function(_0x11f44d,_0x484ace){return _0x11f44d+_0x484ace;},'cRwBR':'...'};return _0x77a6f9['UYHFn'](_0x1f6379[_0x48c70c(0x167)],_0x30faab)?_0x77a6f9['cjSBA'](_0x1f6379[_0x48c70c(0x1a1)](0x0,_0x30faab),_0x77a6f9[_0x48c70c(0x1a9)]):_0x1f6379;}
|
|
1
|
+
const _0x174b70=_0x3ce4;(function(_0x2487f5,_0x1c0258){const _0x50e297=_0x3ce4,_0x3b31c4=_0x2487f5();while(!![]){try{const _0x1f146f=-parseInt(_0x50e297(0x155))/0x1+-parseInt(_0x50e297(0x146))/0x2*(parseInt(_0x50e297(0x166))/0x3)+-parseInt(_0x50e297(0x192))/0x4+parseInt(_0x50e297(0x18b))/0x5+-parseInt(_0x50e297(0x191))/0x6*(parseInt(_0x50e297(0x15b))/0x7)+-parseInt(_0x50e297(0x16d))/0x8+parseInt(_0x50e297(0x148))/0x9*(parseInt(_0x50e297(0x17e))/0xa);if(_0x1f146f===_0x1c0258)break;else _0x3b31c4['push'](_0x3b31c4['shift']());}catch(_0x41460c){_0x3b31c4['push'](_0x3b31c4['shift']());}}}(_0x66c6,0x9ff2d));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function _0x3ce4(_0x246cfb,_0x518d63){_0x246cfb=_0x246cfb-0x145;const _0x66c649=_0x66c6();let _0x3ce460=_0x66c649[_0x246cfb];return _0x3ce460;}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 _0x13a0f0=_0x3ce4,_0x3aeeae={'BBHVl':function(_0x535c1d){return _0x535c1d();},'oqVGK':_0x13a0f0(0x165),'ellCV':function(_0x49bc57,_0x23abe9,_0x2122c5){return _0x49bc57(_0x23abe9,_0x2122c5);},'QLLxT':function(_0x26418f){return _0x26418f();},'QUgIx':function(_0xe069ce){return _0xe069ce();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x1f9569=join(_0x3aeeae['BBHVl'](homedir),_0x3aeeae['oqVGK']),_0x50e13b=join(_0x1f9569,'.session');if(existsSync(_0x50e13b)){cachedDeviceId=_0x3aeeae[_0x13a0f0(0x17d)](readFileSync,_0x50e13b,'utf-8')[_0x13a0f0(0x187)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x3aeeae[_0x13a0f0(0x14a)](randomUUID),_0x3aeeae[_0x13a0f0(0x17d)](mkdirSync,_0x1f9569,{'recursive':!![]}),writeFileSync(_0x50e13b,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x3aeeae['QUgIx'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];[_0x174b70(0x14b)];[_0x174b70(0x18d)];['commandStartTime'];['phaseCounter']=0x0;[_0x174b70(0x17b)]=new Map();['flushing']=null;[_0x174b70(0x176)];[_0x174b70(0x14c)];[_0x174b70(0x163)];['platform'];[_0x174b70(0x184)];[_0x174b70(0x151)];['featureId'];[_0x174b70(0x170)];['browserSessionId'];['transport'];constructor(_0x596796){const _0x5ead27=_0x174b70,_0x1d95ed={'WGtkP':function(_0xa45b84){return _0xa45b84();}},_0xeee2ac=_0x5ead27(0x156)['split']('|');let _0x24e263=0x0;while(!![]){switch(_0xeee2ac[_0x24e263++]){case'0':this['isCI']=!!(process[_0x5ead27(0x18f)]['CI']||process['env']['GITHUB_ACTIONS']);continue;case'1':this['isTty']=process['stdout']['isTTY']??![];continue;case'2':this[_0x5ead27(0x186)]=Date['now']();continue;case'3':this[_0x5ead27(0x175)]=process[_0x5ead27(0x175)];continue;case'4':this['cliVersion']=getCurrentVersion();continue;case'5':this['deviceId']=getDeviceId();continue;case'6':this[_0x5ead27(0x163)]=process['version'];continue;case'7':this[_0x5ead27(0x18d)]=_0x596796;continue;case'8':this['commandId']=_0x1d95ed[_0x5ead27(0x159)](randomUUID);continue;}break;}}['setContext'](_0x388f2a){const _0x29f078=_0x174b70;if(_0x388f2a['featureId'])this[_0x29f078(0x181)]=_0x388f2a[_0x29f078(0x181)];if(_0x388f2a['checklistItemId'])this['checklistItemId']=_0x388f2a['checklistItemId'];if(_0x388f2a['browserSessionId'])this[_0x29f078(0x171)]=_0x388f2a['browserSessionId'];if(_0x388f2a[_0x29f078(0x164)])this[_0x29f078(0x164)]=_0x388f2a['transport'];}async[_0x174b70(0x189)](_0x37967a){const _0x39d620=_0x174b70,_0x354a66={'BXLtJ':_0x39d620(0x154)},_0x43475f=this['buildEvent']({'eventType':_0x354a66[_0x39d620(0x174)],'metadata':_0x37967a});await this['sendImmediate'](_0x43475f);}async['trackCommandEnd'](_0x2ca33d,_0x166119){const _0x224423=_0x174b70,_0xd14376=this[_0x224423(0x173)]({'eventType':_0x224423(0x152),'outcome':_0x2ca33d,'durationMs':Date[_0x224423(0x197)]()-this['commandStartTime'],'metadata':_0x166119});await this['sendImmediate'](_0xd14376),await this[_0x224423(0x195)]();}async[_0x174b70(0x180)](_0x406d0a,_0x4ad016){const _0x35a8b0=_0x174b70,_0x24187a={'rNnNO':_0x35a8b0(0x17c),'QkoEW':function(_0x1082e7,_0xa9c689,_0x231d91){return _0x1082e7(_0xa9c689,_0x231d91);},'pQoIu':function(_0x4ce87c,_0x4d7898){return _0x4ce87c instanceof _0x4d7898;},'vuLUo':function(_0x33dd54,_0x4d7ff1){return _0x33dd54 instanceof _0x4d7ff1;},'UUpXq':_0x35a8b0(0x193)},_0x4c292d=this['buildEvent']({'eventType':_0x24187a[_0x35a8b0(0x158)],'errorMessage':_0x24187a['QkoEW'](truncate,_0x24187a['pQoIu'](_0x406d0a,Error)?_0x406d0a['message']:String(_0x406d0a),0x1f4),'errorType':_0x24187a['vuLUo'](_0x406d0a,Error)?_0x406d0a['constructor']['name']:_0x24187a[_0x35a8b0(0x185)],'durationMs':Date['now']()-this['commandStartTime'],'metadata':_0x4ad016});await this['sendImmediate'](_0x4c292d),await this[_0x35a8b0(0x195)]();}[_0x174b70(0x168)](_0x1fa00b,_0x150d9f){const _0x9fdd9c=_0x174b70;this['phaseCounter']++,this[_0x9fdd9c(0x17b)][_0x9fdd9c(0x17a)](_0x1fa00b,Date[_0x9fdd9c(0x197)]());const _0x2d0905=this['buildEvent']({'eventType':'phase_start','phase':_0x1fa00b,'phaseIndex':this[_0x9fdd9c(0x15d)],'metadata':_0x150d9f});this['buffer']['push'](_0x2d0905);}[_0x174b70(0x17f)](_0x6e87b8,_0x231d78){const _0x1445a5=_0x174b70,_0x88ac9e={'NExum':function(_0x275f34,_0x4be16a){return _0x275f34-_0x4be16a;}},_0x3107de=this[_0x1445a5(0x17b)][_0x1445a5(0x160)](_0x6e87b8),_0x15c9f0=_0x3107de?_0x88ac9e[_0x1445a5(0x16f)](Date['now'](),_0x3107de):undefined;this[_0x1445a5(0x17b)][_0x1445a5(0x169)](_0x6e87b8);const _0x5bb349=this['buildEvent']({'eventType':'phase_end','phase':_0x6e87b8,'durationMs':_0x15c9f0,'metadata':_0x231d78});this['buffer'][_0x1445a5(0x198)](_0x5bb349),this[_0x1445a5(0x15a)][_0x1445a5(0x145)]>=0xa&&this[_0x1445a5(0x16e)]();}async[_0x174b70(0x196)](_0x401c44,_0x5adaa5,_0x17431b){const _0x511c49=_0x174b70,_0x25f2f6={'cqGDN':function(_0x42fea9,_0x560611){return _0x42fea9-_0x560611;},'kmbSh':_0x511c49(0x16c),'OboUX':function(_0x10281c,_0x4a8dfa,_0x16aa00){return _0x10281c(_0x4a8dfa,_0x16aa00);},'usUyx':function(_0x472483,_0x158b23){return _0x472483 instanceof _0x158b23;},'dDBhJ':function(_0x11d78d,_0x2c70a1){return _0x11d78d(_0x2c70a1);},'IESkr':function(_0x5265ef,_0x2be39b){return _0x5265ef instanceof _0x2be39b;},'Arcsk':'Unknown'},_0x2de162=this['phaseStartTimes']['get'](_0x401c44),_0x5bd8ad=_0x2de162?_0x25f2f6[_0x511c49(0x16a)](Date[_0x511c49(0x197)](),_0x2de162):undefined;this['phaseStartTimes']['delete'](_0x401c44);const _0x33c9a7=this[_0x511c49(0x173)]({'eventType':_0x25f2f6[_0x511c49(0x188)],'phase':_0x401c44,'durationMs':_0x5bd8ad,'errorMessage':_0x25f2f6['OboUX'](truncate,_0x25f2f6['usUyx'](_0x5adaa5,Error)?_0x5adaa5['message']:_0x25f2f6[_0x511c49(0x149)](String,_0x5adaa5),0x1f4),'errorType':_0x25f2f6['IESkr'](_0x5adaa5,Error)?_0x5adaa5[_0x511c49(0x161)][_0x511c49(0x182)]:_0x25f2f6['Arcsk'],'metadata':_0x17431b});await this[_0x511c49(0x167)](_0x33c9a7);}async['flush'](){const _0x57839b=_0x174b70;if(this[_0x57839b(0x15a)][_0x57839b(0x145)]===0x0)return;const _0x4e92b7=this['buffer']['splice'](0x0);try{await this[_0x57839b(0x16b)](_0x4e92b7);}catch{}}['buildEvent'](_0x397a94){const _0x2c965d=_0x174b70;return{'eventType':_0x397a94['eventType'],'command':this[_0x2c965d(0x18d)],'commandId':this[_0x2c965d(0x14b)],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x397a94[_0x2c965d(0x183)],'phase':_0x397a94[_0x2c965d(0x172)],'phaseIndex':_0x397a94['phaseIndex'],'outcome':_0x397a94['outcome'],'errorMessage':_0x397a94[_0x2c965d(0x14f)],'errorType':_0x397a94['errorType'],'featureId':this['featureId'],'checklistItemId':this[_0x2c965d(0x170)],'browserSessionId':this[_0x2c965d(0x171)],'transport':this[_0x2c965d(0x164)],'evaluation':_0x397a94['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x2c965d(0x163)],'platform':this[_0x2c965d(0x175)],'cwd':process['cwd'](),'isTty':this[_0x2c965d(0x184)],'isCI':this['isCI'],'metadata':_0x397a94['metadata']};}async['sendImmediate'](_0xb02135){try{await this['sendBatch']([_0xb02135]);}catch{}}['flushAsync'](){const _0x211792=_0x174b70;if(this[_0x211792(0x15f)])return;this[_0x211792(0x15f)]=this[_0x211792(0x195)]()['finally'](()=>{this['flushing']=null;});}async['sendBatch'](_0x137f89){const _0x373150=_0x174b70,_0x4fc110={'zFRPk':function(_0x4fc86e){return _0x4fc86e();},'wrjpV':_0x373150(0x194),'IHuUm':_0x373150(0x153),'wIZtH':function(_0x5d6a88,_0x7531e0,_0x1e970c){return _0x5d6a88(_0x7531e0,_0x1e970c);},'eUeiP':function(_0x269a75,_0x12820c,_0x347c36){return _0x269a75(_0x12820c,_0x347c36);},'qNlJw':_0x373150(0x15e),'hcRUX':function(_0xdf43e7,_0x2d950e){return _0xdf43e7(_0x2d950e);}},_0x1a2537=await _0x4fc110['zFRPk'](getToken)[_0x373150(0x18e)](()=>null),_0x14679b=_0x4fc110[_0x373150(0x179)](getApiBaseUrl),_0x3b9c67={'Content-Type':_0x4fc110['wrjpV']};_0x1a2537&&(_0x3b9c67[_0x4fc110[_0x373150(0x190)]]=_0x373150(0x157)+_0x1a2537);const _0x2efd4f={'events':_0x137f89};process[_0x373150(0x18f)]['DEBUG']&&console[_0x373150(0x162)](_0x373150(0x178)+_0x137f89['length']+_0x373150(0x150)+_0x14679b+'/api/v1/mcp/cli-telemetry');const _0x5948df=new AbortController(),_0x6a7e49=_0x4fc110['wIZtH'](setTimeout,()=>_0x5948df['abort'](),0x1388);try{await _0x4fc110['eUeiP'](fetch,_0x14679b+_0x373150(0x14e),{'method':_0x4fc110['qNlJw'],'headers':_0x3b9c67,'body':JSON[_0x373150(0x18c)](_0x2efd4f),'signal':_0x5948df['signal']});}finally{_0x4fc110[_0x373150(0x18a)](clearTimeout,_0x6a7e49);}}}let currentCollector=null;export function createTelemetryCollector(_0xdc5d03){return currentCollector=new TelemetryCollector(_0xdc5d03),currentCollector;}function _0x66c6(){const _0x2561d2=['2255450AXryVG','trackPhaseEnd','trackCommandError','featureId','name','durationMs','isTty','UUpXq','commandStartTime','trim','kmbSh','trackCommandStart','hcRUX','2053265SeAwjM','stringify','command','catch','env','IHuUm','42TtZhKW','2135636dBGpZm','Unknown','application/json','flush','trackPhaseError','now','push','length','4756XHeESk','slice','135yswzIW','dDBhJ','QLLxT','commandId','cliVersion','sjccY','/api/v1/mcp/cli-telemetry','errorMessage','\x20event(s)\x20to\x20','isCI','command_end','Authorization','command_start','1291867oQLNfB','8|7|2|5|4|6|3|1|0','Bearer\x20','rNnNO','WGtkP','buffer','803327Maymzn','trackCommandEnd','phaseCounter','POST','flushing','get','constructor','error','nodeVersion','transport','.ranger','579bRUajz','sendImmediate','trackPhaseStart','delete','cqGDN','sendBatch','phase_error','404976gcQFxY','flushAsync','NExum','checklistItemId','browserSessionId','phase','buildEvent','BXLtJ','platform','deviceId','FpSLj','[telemetry]\x20Sending\x20','zFRPk','set','phaseStartTimes','command_error','ellCV'];_0x66c6=function(){return _0x2561d2;};return _0x66c6();}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x1c61a8,_0x4b05a8,_0x5c431f){const _0x442939=_0x174b70,_0x3e2a88={'FpSLj':function(_0xdd3cf2,_0x11621b){return _0xdd3cf2(_0x11621b);},'sKJWL':function(_0xed54f8,_0x16dc8f){return _0xed54f8(_0x16dc8f);},'ADyvl':'success'},_0x454396=_0x3e2a88[_0x442939(0x177)](createTelemetryCollector,_0x1c61a8);await _0x454396[_0x442939(0x189)](_0x5c431f);try{const _0x417574=await _0x3e2a88['sKJWL'](_0x4b05a8,_0x454396);return await _0x454396[_0x442939(0x15c)](_0x3e2a88['ADyvl']),_0x417574;}catch(_0x149c7a){await _0x454396[_0x442939(0x180)](_0x149c7a);throw _0x149c7a;}finally{await _0x454396['flush']();}}function truncate(_0x519e05,_0x1c72ee){const _0x190cbe=_0x174b70,_0x8b39ba={'sjccY':'...'};return _0x519e05['length']>_0x1c72ee?_0x519e05[_0x190cbe(0x147)](0x0,_0x1c72ee)+_0x8b39ba[_0x190cbe(0x14d)]:_0x519e05;}
|