@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 3.0.1-alpha.aab0a1c-26

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.
Files changed (82) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -0
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -0
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/playwrightCli.js +1 -1
  60. package/build/commands/utils/profileMessages.js +1 -1
  61. package/build/commands/utils/profileSetupBanner.js +1 -1
  62. package/build/commands/utils/projectsConfig.js +1 -1
  63. package/build/commands/utils/rangerConfig.js +1 -1
  64. package/build/commands/utils/rangerRoot.js +1 -1
  65. package/build/commands/utils/resolveProfileContext.js +1 -1
  66. package/build/commands/utils/resolveProfileUrl.js +1 -1
  67. package/build/commands/utils/retry.js +1 -1
  68. package/build/commands/utils/sessionCache.js +1 -1
  69. package/build/commands/utils/settings.js +1 -1
  70. package/build/commands/utils/skillContent.js +1 -1
  71. package/build/commands/utils/skills.js +1 -1
  72. package/build/commands/utils/stitchWebmFiles.js +1 -1
  73. package/build/commands/utils/telemetry.js +1 -1
  74. package/build/commands/utils/tokenRefresh.js +1 -1
  75. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  76. package/build/commands/utils/userApi.js +1 -1
  77. package/build/commands/utils/version.js +1 -1
  78. package/build/commands/verifyFeature.js +1 -1
  79. package/build/commands/verifyFeatureCli.js +1 -1
  80. package/build/commands/verifyFeatureNovaCli.js +1 -0
  81. package/build/skills/ranger/SKILL.md +1 -1
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5d657a,_0x23370a){const _0x323061=_0x6d57,_0x2bdbb2=_0x5d657a();while(!![]){try{const _0x440816=parseInt(_0x323061(0x1a2))/0x1*(parseInt(_0x323061(0x1a1))/0x2)+-parseInt(_0x323061(0x1b8))/0x3+-parseInt(_0x323061(0x1c7))/0x4*(-parseInt(_0x323061(0x1ad))/0x5)+parseInt(_0x323061(0x1c1))/0x6+parseInt(_0x323061(0x1cb))/0x7*(-parseInt(_0x323061(0x1a8))/0x8)+-parseInt(_0x323061(0x1ae))/0x9*(-parseInt(_0x323061(0x1b7))/0xa)+parseInt(_0x323061(0x1a5))/0xb*(-parseInt(_0x323061(0x1c5))/0xc);if(_0x440816===_0x23370a)break;else _0x2bdbb2['push'](_0x2bdbb2['shift']());}catch(_0x4b55b1){_0x2bdbb2['push'](_0x2bdbb2['shift']());}}}(_0x5200,0x305c3));function _0x6d57(_0x353767,_0xea2948){_0x353767=_0x353767-0x198;const _0x520063=_0x5200();let _0x6d5778=_0x520063[_0x353767];return _0x6d5778;}import{existsSync}from'fs';import _0x158f71 from'inquirer';import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x289c59){const _0x326b7e=_0x6d57,_0x34db87={'JvwbG':function(_0x123d49){return _0x123d49();},'dOvPA':function(_0x462b5c,_0x497c07){return _0x462b5c===_0x497c07;},'wFVkH':function(_0x44840b,_0x55baf7){return _0x44840b+_0x55baf7;},'ezuqa':_0x326b7e(0x1ac),'ipTyT':_0x326b7e(0x19e),'tfESE':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','uthMk':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','vrylr':function(_0x1636a1,_0xc89840){return _0x1636a1(_0xc89840);},'Vedmn':function(_0x7888f3,_0x1f764f){return _0x7888f3 instanceof _0x1f764f;},'dMPky':function(_0x174061,_0x112947){return _0x174061&&_0x112947;},'UymFA':function(_0x26851a,_0x2a3e12){return _0x26851a&&_0x2a3e12;},'WHZQu':function(_0x2be470){return _0x2be470();},'DEhJA':'source','sxOrA':_0x326b7e(0x1af),'eUCgB':_0x326b7e(0x1c0),'YcGyq':function(_0x44bf6c,_0x577bd5){return _0x44bf6c===_0x577bd5;},'yVZNN':function(_0x3abe7c,_0x56d65f,_0x4a3bac){return _0x3abe7c(_0x56d65f,_0x4a3bac);},'KykFO':function(_0x1c2099,_0xc0a31d){return _0x1c2099(_0xc0a31d);},'jbqkS':function(_0x2771a4,_0x2578f1){return _0x2771a4??_0x2578f1;},'fVyQe':function(_0xf20a40,_0x153ffc){return _0xf20a40(_0x153ffc);}},_0x3d0d4d=_0x289c59[_0x326b7e(0x19f)];let _0x2fead2=_0x289c59[_0x326b7e(0x19f)]??await _0x34db87['JvwbG'](readActiveProfileName),_0x1cabbb=null;if(!_0x2fead2&&process[_0x326b7e(0x198)][_0x326b7e(0x1b9)]){const _0x104e33=await resolveAdHocProfile();_0x104e33&&(_0x2fead2=_0x104e33['name'],_0x1cabbb=_0x104e33['profile']);}if(!_0x2fead2)try{const _0x43a9c3=await listCloudProfiles();if(_0x34db87[_0x326b7e(0x1bc)](_0x43a9c3['length'],0x1)){const _0x34a0fe=_0x43a9c3[0x0];_0x2fead2=_0x34a0fe[_0x326b7e(0x1ca)],console['log'](_0x326b7e(0x1a4)+_0x34a0fe['name']),console['log'](_0x326b7e(0x1a0));}}catch{}if(!_0x2fead2)throw new Error(_0x34db87['wFVkH'](_0x34db87[_0x326b7e(0x1c3)](_0x34db87[_0x326b7e(0x1a6)],_0x34db87[_0x326b7e(0x1c2)]),_0x34db87['tfESE'])+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x34db87[_0x326b7e(0x1b6)]);const _0x29d06c=_0x34db87['vrylr'](getEnvDir,_0x2fead2),_0x3eaf77=_0x34db87['vrylr'](existsSync,_0x29d06c);let _0x29cc50=_0x1cabbb,_0x360375=![];if(!_0x29cc50)try{_0x29cc50=await fetchCloudProfile(_0x2fead2);if(!_0x29cc50)_0x360375=!![];}catch(_0x49f80d){_0x34db87['Vedmn'](_0x49f80d,ApiError)&&_0x34db87[_0x326b7e(0x1bc)](_0x49f80d[_0x326b7e(0x1ba)],0x194)&&(_0x360375=!![]);}if(_0x34db87['dMPky'](_0x3d0d4d,_0x360375)&&!_0x3eaf77&&!_0x29cc50)throw new Error(_0x34db87['wFVkH']('Profile\x20\x22'+_0x3d0d4d+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20')+_0x326b7e(0x1b4));if(_0x34db87['UymFA'](_0x29cc50,_0x3eaf77)){let _0xe1255b=!![];if(_0x34db87['WHZQu'](isInteractive)){const {source:_0x89ce3b}=await _0x158f71[_0x326b7e(0x1b5)]([{'type':'list','name':_0x34db87[_0x326b7e(0x19a)],'message':'Profile\x20\x22'+_0x2fead2+_0x326b7e(0x1be),'choices':[{'name':_0x34db87['sxOrA'],'value':'cloud'},{'name':'Local\x20profile','value':_0x326b7e(0x1b3)}],'default':_0x34db87[_0x326b7e(0x199)]}]);_0xe1255b=_0x34db87[_0x326b7e(0x1bd)](_0x89ce3b,_0x34db87[_0x326b7e(0x199)]);}if(!_0xe1255b)_0x29cc50=null;}const _0x3cbb17=_0x34db87[_0x326b7e(0x1c4)](readProfileOverrides,process['cwd'](),_0x2fead2);let _0x4d0678=null,_0x41b8da,_0x2c7581,_0x9dfe7a,_0x29a827,_0x2c7499=null,_0x2e6226;const _0x21535d=_0x34db87[_0x326b7e(0x1a7)](expandOverrides,_0x3cbb17);if(_0x29cc50){_0x4d0678=_0x29cc50;const _0x243851=_0x29cc50[_0x326b7e(0x1a9)]??{},_0x3d231=_0x34db87['yVZNN'](mergeCloudProfileSettings,_0x243851,_0x34db87[_0x326b7e(0x1cc)](_0x3cbb17,undefined)),_0x208d9c={..._0x29cc50,'settings':_0x3d231},_0x403b6c=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x403b6c){const _0x42972e=_0x326b7e(0x1ab)[_0x326b7e(0x1a3)]('|');let _0x1bfa14=0x0;while(!![]){switch(_0x42972e[_0x1bfa14++]){case'0':_0x41b8da=_0x403b6c;continue;case'1':if(!existsSync(_0x403b6c))throw new Error('RANGER_SESSION_STATE_PATH='+_0x403b6c+'\x20does\x20not\x20exist.');continue;case'2':_0x2c7581=resolveEnvVars(_0x3d231);continue;case'3':_0x9dfe7a=Boolean(_0x2c7581[_0x326b7e(0x19b)]);continue;case'4':_0x2c7499={'baseUrl':expandString(_0x243851[_0x326b7e(0x1c9)]),'startPath':expandString(_0x243851['startPath'])};continue;}break;}}else{const _0x55c07a=await resolveCloudProfileSession(_0x208d9c);_0x41b8da=_0x55c07a[_0x326b7e(0x1bb)],_0x2c7581=resolveEnvVars(_0x3d231),_0x9dfe7a=Boolean(_0x2c7581['cdpEndpoint']),_0x2c7499={'baseUrl':expandString(_0x243851[_0x326b7e(0x1c9)]),'startPath':expandString(_0x243851['startPath'])},_0x2e6226=_0x55c07a[_0x326b7e(0x1b1)]?.[_0x326b7e(0x1b2)]?.[0x0];}}else{if(!_0x3eaf77)throw new Error('Profile\x20\x22'+_0x2fead2+_0x326b7e(0x1b0)+_0x2fead2);const _0x3d3dc3=await _0x34db87['fVyQe'](loadSettings,_0x2fead2);_0x2c7581=resolveEnvVars(_0x3d3dc3),_0x9dfe7a=_0x34db87[_0x326b7e(0x1c8)](Boolean,_0x2c7581['cdpEndpoint']),_0x29a827=_0x2c7581[_0x326b7e(0x1c9)];}const _0x3c95df=readUrlEnvVars(),_0x90daff=_0x34db87['KykFO'](resolveProfileUrl,{'flagBaseUrl':_0x289c59['baseUrl'],'flagStartPath':_0x289c59['startPath'],'envBaseUrl':_0x3c95df['envBaseUrl'],'envStartPath':_0x3c95df['envStartPath'],'localSettingsBaseUrl':_0x29a827,'projectOverrides':_0x21535d,'cloudSettings':_0x2c7499,'authEnvironmentDomain':_0x2e6226}),_0x4a2644=_0x90daff[_0x326b7e(0x1bf)]??_0x90daff[_0x326b7e(0x1c9)];if(_0x34db87[_0x326b7e(0x1c6)](!_0x4a2644,!_0x9dfe7a))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x2fead2+_0x326b7e(0x19d)+_0x2fead2+'\x20baseUrl\x20<url>');return{'activeProfile':_0x2fead2,'resolvedCloudProfile':_0x4d0678,'cloudAuthPath':_0x41b8da,'resolvedSettings':_0x2c7581,'isCdpMode':_0x9dfe7a,'url':_0x4a2644,'startPath':_0x90daff['startPath']};}function expandString(_0x36f531){const _0x24bfce={'BMojD':function(_0x4bb866,_0x43f9cf){return _0x4bb866!==_0x43f9cf;}};if(_0x24bfce['BMojD'](typeof _0x36f531,'string'))return _0x36f531;return resolveEnvVars(_0x36f531);}function _0x5200(){const _0x563509=['name','504Jotgqh','jbqkS','env','eUCgB','DEhJA','cdpEndpoint','string','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','profile','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','1924SzWirz','245IdWzpG','split','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','11acbftR','ezuqa','KykFO','4024BxDxyf','settings','startPath','1|0|2|3|4','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','52235UkZdbI','9iGcyqf','Cloud\x20profile\x20(recommended)','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','resolvedEnv','domains','local','`ranger\x20profile\x20add`\x20to\x20create\x20one.','prompt','uthMk','208790tYbuLQ','66114pRzOUv','RANGER_TEST_USERNAME','status','authPath','dOvPA','YcGyq','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','url','cloud','1831950zouspz','ipTyT','wFVkH','yVZNN','3792048FGmeyG','dMPky','4PYSjoY','vrylr','baseUrl'];_0x5200=function(){return _0x563509;};return _0x5200();}function expandOverrides(_0x5d6099){const _0x281795=_0x6d57,_0x37bed1={'bCpKa':'string','CuNPW':function(_0x562b81,_0xba3780){return _0x562b81(_0xba3780);}};if(!_0x5d6099)return _0x5d6099;const _0x495e24={..._0x5d6099};return typeof _0x495e24['baseUrl']===_0x281795(0x19c)&&(_0x495e24['baseUrl']=resolveEnvVars(_0x495e24['baseUrl'])),typeof _0x495e24['startPath']===_0x37bed1['bCpKa']&&(_0x495e24[_0x281795(0x1aa)]=_0x37bed1['CuNPW'](resolveEnvVars,_0x495e24['startPath'])),_0x495e24;}
1
+ (function(_0x17b8bc,_0x11ed2d){const _0xc8df31=_0x3de2,_0x224f51=_0x17b8bc();while(!![]){try{const _0x44f2a3=-parseInt(_0xc8df31(0x211))/0x1*(-parseInt(_0xc8df31(0x203))/0x2)+parseInt(_0xc8df31(0x20d))/0x3+-parseInt(_0xc8df31(0x1e8))/0x4*(parseInt(_0xc8df31(0x1f4))/0x5)+-parseInt(_0xc8df31(0x20c))/0x6*(-parseInt(_0xc8df31(0x1fe))/0x7)+-parseInt(_0xc8df31(0x20e))/0x8*(parseInt(_0xc8df31(0x1f1))/0x9)+-parseInt(_0xc8df31(0x217))/0xa+parseInt(_0xc8df31(0x216))/0xb;if(_0x44f2a3===_0x11ed2d)break;else _0x224f51['push'](_0x224f51['shift']());}catch(_0x48c112){_0x224f51['push'](_0x224f51['shift']());}}}(_0xb8ae,0x6beb1));import{existsSync}from'fs';import _0x22d718 from'inquirer';function _0x3de2(_0x11df54,_0x41e186){_0x11df54=_0x11df54-0x1e8;const _0xb8ae0d=_0xb8ae();let _0x3de2a7=_0xb8ae0d[_0x11df54];return _0x3de2a7;}function _0xb8ae(){const _0xa971f0=['profile','baseUrl','126074UTAtLq','cDEfz','cwd','startPath','envBaseUrl','10250163EBWrBY','4809060RtfJrN','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','RANGER_TEST_USERNAME','1056Fjwuod','EYKir','CeLil','VcDLe','list','QmgPs','Cloud\x20profile\x20(recommended)','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','27TpnouK','SKvmN','name','13950dqyMIP','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','env','\x20baseUrl\x20<url>','WOGJD','HsyMM','FrToY','log','cloud','source','91uiiTot','ubCqB','PjjcX','Profile\x20\x22','`ranger\x20profile\x20add`\x20to\x20create\x20one.','2OMNmHp','AgMIC','prompt','string','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','length','SRZeM','\x20does\x20not\x20exist.','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','354180Oyksdp','456858OofpKp','848224qwYzMZ'];_0xb8ae=function(){return _0xa971f0;};return _0xb8ae();}import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x40c07){const _0x279b6b=_0x3de2,_0x3b108f={'cDEfz':function(_0x324b56){return _0x324b56();},'CgobK':function(_0x1cc959,_0x36ee38){return _0x1cc959+_0x36ee38;},'srOcz':function(_0x13cdcb,_0x2738b9){return _0x13cdcb+_0x2738b9;},'bRihR':_0x279b6b(0x218),'PjjcX':function(_0x334adc,_0x5bd26c){return _0x334adc(_0x5bd26c);},'DuhxD':function(_0x1f1a16,_0x59674f){return _0x1f1a16===_0x59674f;},'QmgPs':function(_0xaacbf8,_0x2ce346){return _0xaacbf8&&_0x2ce346;},'EYKir':function(_0x4aca32,_0x3f297a){return _0x4aca32+_0x3f297a;},'QxOKO':function(_0x5b0c50,_0x5b7e68){return _0x5b0c50&&_0x5b7e68;},'NwwPJ':function(_0x1c10d){return _0x1c10d();},'WOGJD':_0x279b6b(0x1ee),'FrToY':'local','HsyMM':function(_0x3601b9,_0x28633c){return _0x3601b9===_0x28633c;},'AgMIC':function(_0x147230,_0x22223e,_0x3c3ad4){return _0x147230(_0x22223e,_0x3c3ad4);},'QDAos':function(_0x1dac61,_0x512c21){return _0x1dac61(_0x512c21);},'xHyVP':function(_0x56bdf1,_0x305152,_0x26678a){return _0x56bdf1(_0x305152,_0x26678a);},'VcDLe':function(_0x52ce56,_0x462425){return _0x52ce56(_0x462425);},'eiDAY':function(_0x2e7b37,_0x195603){return _0x2e7b37(_0x195603);},'SKvmN':function(_0x391988,_0x18c217){return _0x391988(_0x18c217);},'VCDSN':function(_0x2a5954,_0xc42574){return _0x2a5954(_0xc42574);},'CeLil':function(_0x1fac23,_0x95eab4){return _0x1fac23&&_0x95eab4;}},_0x3ac385=_0x40c07[_0x279b6b(0x20f)];let _0x4fae5d=_0x40c07['profile']??await readActiveProfileName(),_0x571aad=null;if(!_0x4fae5d&&process['env'][_0x279b6b(0x219)]){const _0x827e6a=await _0x3b108f[_0x279b6b(0x212)](resolveAdHocProfile);_0x827e6a&&(_0x4fae5d=_0x827e6a['name'],_0x571aad=_0x827e6a[_0x279b6b(0x20f)]);}if(!_0x4fae5d)try{const _0x4ab64c=await listCloudProfiles();if(_0x4ab64c[_0x279b6b(0x208)]===0x1){const _0x61eca8=_0x4ab64c[0x0];_0x4fae5d=_0x61eca8['name'],console[_0x279b6b(0x1fb)](_0x279b6b(0x207)+_0x61eca8[_0x279b6b(0x1f3)]),console[_0x279b6b(0x1fb)](_0x279b6b(0x20b));}}catch{}if(!_0x4fae5d)throw new Error(_0x3b108f['CgobK'](_0x3b108f['srOcz'](_0x3b108f['srOcz']('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x3b108f['bRihR']),_0x279b6b(0x1f0))+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.'));const _0x3b02da=_0x3b108f[_0x279b6b(0x200)](getEnvDir,_0x4fae5d),_0x57b636=_0x3b108f['PjjcX'](existsSync,_0x3b02da);let _0x84da94=_0x571aad,_0x3a8426=![];if(!_0x84da94)try{_0x84da94=await fetchCloudProfile(_0x4fae5d);if(!_0x84da94)_0x3a8426=!![];}catch(_0x2e1404){_0x2e1404 instanceof ApiError&&_0x3b108f['DuhxD'](_0x2e1404['status'],0x194)&&(_0x3a8426=!![]);}if(_0x3b108f[_0x279b6b(0x1ed)](_0x3ac385,_0x3a8426)&&!_0x57b636&&!_0x84da94)throw new Error(_0x3b108f[_0x279b6b(0x1e9)](_0x279b6b(0x201)+_0x3ac385+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20')+_0x279b6b(0x202));if(_0x3b108f['QxOKO'](_0x84da94,_0x57b636)){let _0x520bcd=!![];if(_0x3b108f['NwwPJ'](isInteractive)){const {source:_0x3a7592}=await _0x22d718[_0x279b6b(0x205)]([{'type':_0x279b6b(0x1ec),'name':_0x279b6b(0x1fd),'message':_0x279b6b(0x201)+_0x4fae5d+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x3b108f[_0x279b6b(0x1f8)],'value':'cloud'},{'name':'Local\x20profile','value':_0x3b108f[_0x279b6b(0x1fa)]}],'default':_0x279b6b(0x1fc)}]);_0x520bcd=_0x3b108f[_0x279b6b(0x1f9)](_0x3a7592,'cloud');}if(!_0x520bcd)_0x84da94=null;}const _0x5cda50=_0x3b108f[_0x279b6b(0x204)](readProfileOverrides,process[_0x279b6b(0x213)](),_0x4fae5d);let _0x3c1bda=null,_0x5dc6c8,_0xa3df2f,_0x1c8acb,_0x5e5487,_0x112ce1=null,_0x2f7daf;const _0xcf6342=_0x3b108f['QDAos'](expandOverrides,_0x5cda50);if(_0x84da94){_0x3c1bda=_0x84da94;const _0x1e233a=_0x84da94['settings']??{},_0x246cb3=_0x3b108f['xHyVP'](mergeCloudProfileSettings,_0x1e233a,_0x5cda50??undefined),_0x25ddfd={..._0x84da94,'settings':_0x246cb3},_0x2e42ee=process[_0x279b6b(0x1f6)]['RANGER_SESSION_STATE_PATH'];if(_0x2e42ee){if(!existsSync(_0x2e42ee))throw new Error('RANGER_SESSION_STATE_PATH='+_0x2e42ee+_0x279b6b(0x20a));_0x5dc6c8=_0x2e42ee,_0xa3df2f=_0x3b108f['PjjcX'](resolveEnvVars,_0x246cb3),_0x1c8acb=_0x3b108f['QDAos'](Boolean,_0xa3df2f['cdpEndpoint']),_0x112ce1={'baseUrl':_0x3b108f[_0x279b6b(0x1eb)](expandString,_0x1e233a['baseUrl']),'startPath':expandString(_0x1e233a[_0x279b6b(0x214)])};}else{const _0x361860=await resolveCloudProfileSession(_0x25ddfd);_0x5dc6c8=_0x361860['authPath'],_0xa3df2f=resolveEnvVars(_0x246cb3),_0x1c8acb=Boolean(_0xa3df2f['cdpEndpoint']),_0x112ce1={'baseUrl':expandString(_0x1e233a['baseUrl']),'startPath':_0x3b108f['eiDAY'](expandString,_0x1e233a[_0x279b6b(0x214)])},_0x2f7daf=_0x361860['resolvedEnv']?.['domains']?.[0x0];}}else{if(!_0x57b636)throw new Error(_0x279b6b(0x201)+_0x4fae5d+_0x279b6b(0x1f5)+_0x4fae5d);const _0x1cff0c=await _0x3b108f['QDAos'](loadSettings,_0x4fae5d);_0xa3df2f=_0x3b108f[_0x279b6b(0x1f2)](resolveEnvVars,_0x1cff0c),_0x1c8acb=_0x3b108f['VCDSN'](Boolean,_0xa3df2f['cdpEndpoint']),_0x5e5487=_0xa3df2f['baseUrl'];}const _0x47a630=_0x3b108f[_0x279b6b(0x212)](readUrlEnvVars),_0xfeab85=resolveProfileUrl({'flagBaseUrl':_0x40c07[_0x279b6b(0x210)],'flagStartPath':_0x40c07[_0x279b6b(0x214)],'envBaseUrl':_0x47a630[_0x279b6b(0x215)],'envStartPath':_0x47a630['envStartPath'],'localSettingsBaseUrl':_0x5e5487,'projectOverrides':_0xcf6342,'cloudSettings':_0x112ce1,'authEnvironmentDomain':_0x2f7daf}),_0x10a0c9=_0xfeab85['url']??_0xfeab85['baseUrl'];if(_0x3b108f[_0x279b6b(0x1ea)](!_0x10a0c9,!_0x1c8acb))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x4fae5d+_0x279b6b(0x1ef)+_0x4fae5d+_0x279b6b(0x1f7));return{'activeProfile':_0x4fae5d,'resolvedCloudProfile':_0x3c1bda,'cloudAuthPath':_0x5dc6c8,'resolvedSettings':_0xa3df2f,'isCdpMode':_0x1c8acb,'url':_0x10a0c9,'startPath':_0xfeab85['startPath']};}function expandString(_0x5a3cdf){const _0x32a171=_0x3de2,_0x2615ae={'seBMR':function(_0x314096,_0x9953){return _0x314096!==_0x9953;},'ubCqB':_0x32a171(0x206)};if(_0x2615ae['seBMR'](typeof _0x5a3cdf,_0x2615ae[_0x32a171(0x1ff)]))return _0x5a3cdf;return resolveEnvVars(_0x5a3cdf);}function expandOverrides(_0x4328f0){const _0x3fa737=_0x3de2,_0x36a351={'SRZeM':_0x3fa737(0x206),'EzHVY':function(_0x4cabea,_0x3c5803){return _0x4cabea(_0x3c5803);}};if(!_0x4328f0)return _0x4328f0;const _0x30c9d5={..._0x4328f0};return typeof _0x30c9d5[_0x3fa737(0x210)]===_0x36a351['SRZeM']&&(_0x30c9d5['baseUrl']=_0x36a351['EzHVY'](resolveEnvVars,_0x30c9d5[_0x3fa737(0x210)])),typeof _0x30c9d5['startPath']===_0x36a351[_0x3fa737(0x209)]&&(_0x30c9d5[_0x3fa737(0x214)]=resolveEnvVars(_0x30c9d5['startPath'])),_0x30c9d5;}
@@ -1 +1 @@
1
- function _0x427e(_0x3aeef7,_0x5566d2){_0x3aeef7=_0x3aeef7-0x1e1;const _0x506161=_0x5061();let _0x427e71=_0x506161[_0x3aeef7];return _0x427e71;}(function(_0x4d532b,_0x85ae4){const _0x508cf6=_0x427e,_0x12dc90=_0x4d532b();while(!![]){try{const _0x3427c7=parseInt(_0x508cf6(0x1e5))/0x1+parseInt(_0x508cf6(0x1e1))/0x2+parseInt(_0x508cf6(0x1f0))/0x3+-parseInt(_0x508cf6(0x1e4))/0x4*(parseInt(_0x508cf6(0x1e3))/0x5)+-parseInt(_0x508cf6(0x1e9))/0x6*(-parseInt(_0x508cf6(0x1ee))/0x7)+parseInt(_0x508cf6(0x1f1))/0x8*(parseInt(_0x508cf6(0x1f3))/0x9)+-parseInt(_0x508cf6(0x1ef))/0xa;if(_0x3427c7===_0x85ae4)break;else _0x12dc90['push'](_0x12dc90['shift']());}catch(_0x2d26c9){_0x12dc90['push'](_0x12dc90['shift']());}}}(_0x5061,0x72fff));function firstDefined(..._0x3f3fbc){const _0x2a42c2={'WGvsM':function(_0x382197,_0x20967e){return _0x382197!==_0x20967e;}};for(const _0x34cc44 of _0x3f3fbc){if(_0x34cc44!==undefined&&_0x2a42c2['WGvsM'](_0x34cc44,null)&&_0x2a42c2['WGvsM'](_0x34cc44,''))return _0x34cc44;}return undefined;}function _0x5061(){const _0x17c31a=['3964304YTIEfI','baseUrl','9uvjYvB','flagStartPath','881702dvKRzJ','string','517625RHyqoO','36BeJttn','75606AZkFiP','startPath','NDiZq','cloudSettings','5635086jhYjZH','flagBaseUrl','RANGER_BASE_URL','tmjDP','RRyiW','7ZnUFmg','6666280xVVTso','354648FRhogo'];_0x5061=function(){return _0x17c31a;};return _0x5061();}function normalizeAuthEnvironmentDomain(_0x21eee7){if(!_0x21eee7)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x21eee7))return _0x21eee7;return'https://'+_0x21eee7;}export function resolveBaseUrl(_0x100c0b){const _0x278eb2=_0x427e,_0x4cbc49={'tmjDP':'baseUrl','tVaGO':_0x278eb2(0x1e2),'eRbOd':function(_0x3cb75e,_0xcb1e1c){return _0x3cb75e(_0xcb1e1c);}},_0x2ead4c=_0x100c0b['projectOverrides'],_0x426dee=!!_0x2ead4c&&_0x4cbc49[_0x278eb2(0x1ec)]in _0x2ead4c,_0x5eb99f=_0x2ead4c?.[_0x278eb2(0x1f2)],_0x460bde=!(_0x426dee&&_0x5eb99f===null);return firstDefined(_0x100c0b[_0x278eb2(0x1ea)],_0x100c0b['envBaseUrl'],_0x100c0b['localSettingsBaseUrl'],typeof _0x5eb99f===_0x4cbc49['tVaGO']?_0x5eb99f:undefined,_0x460bde?_0x100c0b['cloudSettings']?.[_0x278eb2(0x1f2)]:undefined,_0x460bde?_0x4cbc49['eRbOd'](normalizeAuthEnvironmentDomain,_0x100c0b['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x39beba){const _0x2a6540=_0x427e,_0x34bbe0={'NDiZq':function(_0x5552fe,_0x2038aa){return _0x5552fe in _0x2038aa;},'QenAb':function(_0x48bdc,_0x1acb10,_0x145cd2,_0x4c2385,_0x102bc3){return _0x48bdc(_0x1acb10,_0x145cd2,_0x4c2385,_0x102bc3);},'NpkGF':function(_0x5d74f0,_0xf94ca5){return _0x5d74f0===_0xf94ca5;}},_0x38d60b=_0x39beba['projectOverrides'],_0x1f768f=!!_0x38d60b&&_0x34bbe0[_0x2a6540(0x1e7)]('startPath',_0x38d60b),_0x453462=_0x38d60b?.[_0x2a6540(0x1e6)],_0x57ee6b=!(_0x1f768f&&_0x453462===null);return _0x34bbe0['QenAb'](firstDefined,_0x39beba[_0x2a6540(0x1f4)],_0x39beba['envStartPath'],_0x34bbe0['NpkGF'](typeof _0x453462,'string')?_0x453462:undefined,_0x57ee6b?_0x39beba[_0x2a6540(0x1e8)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x327246,_0x14eba8){const _0x39efdb={'hmVOl':function(_0x112cdc,_0x31a636){return _0x112cdc+_0x31a636;}};if(!_0x327246)return undefined;if(!_0x14eba8)return _0x327246;const _0xe0ef6d=_0x327246['endsWith']('/')?_0x327246['slice'](0x0,-0x1):_0x327246,_0x41b33e=_0x14eba8['startsWith']('/')?_0x14eba8:'/'+_0x14eba8;return _0x39efdb['hmVOl'](_0xe0ef6d,_0x41b33e);}export function resolveProfileUrl(_0x58af59){const _0x2248ab=_0x427e,_0x50d675={'bUZnA':function(_0x29a793,_0x4a95d8){return _0x29a793(_0x4a95d8);},'RRyiW':function(_0x5cf721,_0x2b63b4,_0x8ce73){return _0x5cf721(_0x2b63b4,_0x8ce73);}},_0x8cfcfe=_0x50d675['bUZnA'](resolveBaseUrl,_0x58af59),_0x4a26ac=resolveStartPath(_0x58af59);return{'baseUrl':_0x8cfcfe,'startPath':_0x4a26ac,'url':_0x50d675[_0x2248ab(0x1ed)](joinBaseAndPath,_0x8cfcfe,_0x4a26ac)};}export function readUrlEnvVars(_0x37d9f4=process['env']){const _0xbaa163=_0x427e;return{'envBaseUrl':_0x37d9f4[_0xbaa163(0x1eb)],'envStartPath':_0x37d9f4['RANGER_START_PATH']};}
1
+ function _0x6d19(_0x53f5f3,_0x50599f){_0x53f5f3=_0x53f5f3-0x71;const _0x57a02d=_0x57a0();let _0x6d19d1=_0x57a02d[_0x53f5f3];return _0x6d19d1;}const _0x4a6c3a=_0x6d19;function _0x57a0(){const _0x1a767d=['localSettingsBaseUrl','416658XvaHqf','authEnvironmentDomain','lTWZB','bSdNg','envBaseUrl','RANGER_START_PATH','baseUrl','1352946gsoaUQ','LbBZS','HLjgC','cloudSettings','envStartPath','uWuuz','716304KEaSQk','866664cqCRdt','RANGER_BASE_URL','4136517jQovFc','2Plygnf','221348uOiWgz','LiqIL','15FsPwxW','ievXr','133157gyurgu','projectOverrides','startPath','test','env'];_0x57a0=function(){return _0x1a767d;};return _0x57a0();}(function(_0x4b2c23,_0x359ab7){const _0x4c3888=_0x6d19,_0xd494b2=_0x4b2c23();while(!![]){try{const _0x5a9c98=parseInt(_0x4c3888(0x88))/0x1*(parseInt(_0x4c3888(0x83))/0x2)+-parseInt(_0x4c3888(0x72))/0x3+-parseInt(_0x4c3888(0x84))/0x4*(-parseInt(_0x4c3888(0x86))/0x5)+parseInt(_0x4c3888(0x7f))/0x6+parseInt(_0x4c3888(0x79))/0x7+parseInt(_0x4c3888(0x80))/0x8+-parseInt(_0x4c3888(0x82))/0x9;if(_0x5a9c98===_0x359ab7)break;else _0xd494b2['push'](_0xd494b2['shift']());}catch(_0x277350){_0xd494b2['push'](_0xd494b2['shift']());}}}(_0x57a0,0x1db40));function firstDefined(..._0x2265ce){const _0x13ee92=_0x6d19,_0x30b1eb={'LbBZS':function(_0x33a897,_0x186c2d){return _0x33a897!==_0x186c2d;}};for(const _0x17c1d9 of _0x2265ce){if(_0x30b1eb[_0x13ee92(0x7a)](_0x17c1d9,undefined)&&_0x17c1d9!==null&&_0x17c1d9!=='')return _0x17c1d9;}return undefined;}function normalizeAuthEnvironmentDomain(_0x2a0ab0){const _0x10432e=_0x6d19;if(!_0x2a0ab0)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x10432e(0x8b)](_0x2a0ab0))return _0x2a0ab0;return'https://'+_0x2a0ab0;}export function resolveBaseUrl(_0x1e5189){const _0x40d988=_0x6d19,_0x9e81e2={'uWuuz':function(_0x5774e6,_0x2edd80){return _0x5774e6===_0x2edd80;},'ievXr':function(_0x1f4937,_0x378688,_0x5789f4,_0x8ce6b9,_0x1ffbf8,_0xa13ef,_0x2fa5e4){return _0x1f4937(_0x378688,_0x5789f4,_0x8ce6b9,_0x1ffbf8,_0xa13ef,_0x2fa5e4);}},_0x57cd58=_0x1e5189[_0x40d988(0x89)],_0x3440ae=!!_0x57cd58&&_0x40d988(0x78)in _0x57cd58,_0x269ff9=_0x57cd58?.['baseUrl'],_0xd87123=!(_0x3440ae&&_0x9e81e2[_0x40d988(0x7e)](_0x269ff9,null));return _0x9e81e2[_0x40d988(0x87)](firstDefined,_0x1e5189['flagBaseUrl'],_0x1e5189[_0x40d988(0x76)],_0x1e5189[_0x40d988(0x71)],_0x9e81e2['uWuuz'](typeof _0x269ff9,'string')?_0x269ff9:undefined,_0xd87123?_0x1e5189[_0x40d988(0x7c)]?.[_0x40d988(0x78)]:undefined,_0xd87123?normalizeAuthEnvironmentDomain(_0x1e5189[_0x40d988(0x73)]):undefined);}export function resolveStartPath(_0x25c147){const _0x45c522=_0x6d19,_0x3e2e6c={'HLjgC':function(_0x16e313,_0x15117c){return _0x16e313 in _0x15117c;},'DbVru':_0x45c522(0x8a),'bSdNg':function(_0x2310bb,_0x411eee,_0x196247,_0x3f474d,_0x25bb49){return _0x2310bb(_0x411eee,_0x196247,_0x3f474d,_0x25bb49);},'JtNUf':'string'},_0x4c5e99=_0x25c147['projectOverrides'],_0x1a37cd=!!_0x4c5e99&&_0x3e2e6c[_0x45c522(0x7b)](_0x3e2e6c['DbVru'],_0x4c5e99),_0xecd567=_0x4c5e99?.['startPath'],_0x5dc4ae=!(_0x1a37cd&&_0xecd567===null);return _0x3e2e6c[_0x45c522(0x75)](firstDefined,_0x25c147['flagStartPath'],_0x25c147[_0x45c522(0x7d)],typeof _0xecd567===_0x3e2e6c['JtNUf']?_0xecd567:undefined,_0x5dc4ae?_0x25c147[_0x45c522(0x7c)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x3d1a69,_0x396f43){if(!_0x3d1a69)return undefined;if(!_0x396f43)return _0x3d1a69;const _0x16fb61=_0x3d1a69['endsWith']('/')?_0x3d1a69['slice'](0x0,-0x1):_0x3d1a69,_0x33e4b1=_0x396f43['startsWith']('/')?_0x396f43:'/'+_0x396f43;return _0x16fb61+_0x33e4b1;}export function resolveProfileUrl(_0x1abf7d){const _0x4c8a90=_0x6d19,_0x3f86db={'lTWZB':function(_0x1c5a70,_0x436ef8){return _0x1c5a70(_0x436ef8);},'LiqIL':function(_0x519709,_0x3b8416,_0x231d69){return _0x519709(_0x3b8416,_0x231d69);}},_0x2acf5e=resolveBaseUrl(_0x1abf7d),_0x55f851=_0x3f86db[_0x4c8a90(0x74)](resolveStartPath,_0x1abf7d);return{'baseUrl':_0x2acf5e,'startPath':_0x55f851,'url':_0x3f86db[_0x4c8a90(0x85)](joinBaseAndPath,_0x2acf5e,_0x55f851)};}export function readUrlEnvVars(_0x57ce95=process[_0x4a6c3a(0x8c)]){const _0x853d5b=_0x4a6c3a;return{'envBaseUrl':_0x57ce95[_0x853d5b(0x81)],'envStartPath':_0x57ce95[_0x853d5b(0x77)]};}
@@ -1 +1 @@
1
- function _0x5907(){const _0x41cea1=['1485042BrzlSR','19625705lTiDsf','ms...','3QVNfbW','label','1294078xyUOWE','UWayj','3207796tRMVAW','12hXNikE','1863170uItgBP','11235160NpbTBH','9RKBnIG','maxRetries','427GOGgMr','245656TmomLt'];_0x5907=function(){return _0x41cea1;};return _0x5907();}(function(_0x2e57b5,_0x87944){const _0x298a51=_0xf075,_0x4bce69=_0x2e57b5();while(!![]){try{const _0x1bf01f=parseInt(_0x298a51(0xed))/0x1+parseInt(_0x298a51(0xe8))/0x2+parseInt(_0x298a51(0xeb))/0x3*(-parseInt(_0x298a51(0xe0))/0x4)+-parseInt(_0x298a51(0xe2))/0x5*(-parseInt(_0x298a51(0xe1))/0x6)+parseInt(_0x298a51(0xe6))/0x7*(parseInt(_0x298a51(0xe7))/0x8)+parseInt(_0x298a51(0xe4))/0x9*(-parseInt(_0x298a51(0xe3))/0xa)+-parseInt(_0x298a51(0xe9))/0xb;if(_0x1bf01f===_0x87944)break;else _0x4bce69['push'](_0x4bce69['shift']());}catch(_0x16ada5){_0x4bce69['push'](_0x4bce69['shift']());}}}(_0x5907,0xe6cde));function _0xf075(_0x5c2ca0,_0xccd852){_0x5c2ca0=_0x5c2ca0-0xe0;const _0x590720=_0x5907();let _0xf075cf=_0x590720[_0x5c2ca0];return _0xf075cf;}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x42aeea,_0x457c4b){const _0x47e9b8=_0xf075,_0xb9e0c2={'UWayj':function(_0x262981,_0x3dd457){return _0x262981 instanceof _0x3dd457;}},_0x5b82f9=_0x457c4b?.[_0x47e9b8(0xe5)]??DEFAULT_MAX_RETRIES,_0x2b92e0=_0x457c4b?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x217fd5;for(let _0x5ede91=0x0;_0x5ede91<=_0x5b82f9;_0x5ede91++){try{return await _0x42aeea();}catch(_0x4d063e){_0x217fd5=_0xb9e0c2[_0x47e9b8(0xee)](_0x4d063e,Error)?_0x4d063e:new Error(String(_0x4d063e));if(_0x5ede91<_0x5b82f9){const _0x2c4170=_0x2b92e0*Math['pow'](0x2,_0x5ede91);_0x457c4b?.[_0x47e9b8(0xec)]&&console['error'](_0x457c4b['label']+'\x20failed\x20(attempt\x20'+(_0x5ede91+0x1)+'/'+(_0x5b82f9+0x1)+'),\x20retrying\x20in\x20'+_0x2c4170+_0x47e9b8(0xea)),await new Promise(_0x198311=>setTimeout(_0x198311,_0x2c4170));}}}throw _0x217fd5;}
1
+ function _0x279d(){const _0x39271b=['\x20failed\x20(attempt\x20','12630726VThsGN','),\x20retrying\x20in\x20','2831630BwsZRT','77vzGHMn','7230680bhRtTI','3983688aUqkZu','2ifViMD','233944KGtKbm','15zfTxYB','135693xBapvN','5EHLXDd','tXeZz','6197835gQRVDK'];_0x279d=function(){return _0x39271b;};return _0x279d();}function _0xc750(_0xb4882f,_0x30eec2){_0xb4882f=_0xb4882f-0xeb;const _0x279d1d=_0x279d();let _0xc75019=_0x279d1d[_0xb4882f];return _0xc75019;}(function(_0x369f05,_0x197b35){const _0x24649c=_0xc750,_0x43a3c5=_0x369f05();while(!![]){try{const _0x1e7657=-parseInt(_0x24649c(0xec))/0x1*(-parseInt(_0x24649c(0xf7))/0x2)+parseInt(_0x24649c(0xeb))/0x3*(-parseInt(_0x24649c(0xf8))/0x4)+parseInt(_0x24649c(0xed))/0x5*(-parseInt(_0x24649c(0xf6))/0x6)+-parseInt(_0x24649c(0xef))/0x7+-parseInt(_0x24649c(0xf5))/0x8+parseInt(_0x24649c(0xf1))/0x9+-parseInt(_0x24649c(0xf3))/0xa*(-parseInt(_0x24649c(0xf4))/0xb);if(_0x1e7657===_0x197b35)break;else _0x43a3c5['push'](_0x43a3c5['shift']());}catch(_0x58804a){_0x43a3c5['push'](_0x43a3c5['shift']());}}}(_0x279d,0xbd5ce));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x1f5d62,_0x4f432b){const _0x405f05=_0xc750,_0x540668={'oMTKq':function(_0x1ace56,_0x4c5928){return _0x1ace56<=_0x4c5928;},'uJVxQ':function(_0x4de12d){return _0x4de12d();},'VNZdr':function(_0x478825,_0x44f6d1){return _0x478825*_0x44f6d1;},'tXeZz':function(_0x38af5f,_0x530ed9){return _0x38af5f+_0x530ed9;}},_0x426112=_0x4f432b?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x4eed91=_0x4f432b?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x1405b1;for(let _0x40a75a=0x0;_0x540668['oMTKq'](_0x40a75a,_0x426112);_0x40a75a++){try{return await _0x540668['uJVxQ'](_0x1f5d62);}catch(_0x3767be){_0x1405b1=_0x3767be instanceof Error?_0x3767be:new Error(String(_0x3767be));if(_0x40a75a<_0x426112){const _0x2c58cb=_0x540668['VNZdr'](_0x4eed91,Math['pow'](0x2,_0x40a75a));_0x4f432b?.['label']&&console['error'](_0x4f432b['label']+_0x405f05(0xf0)+_0x540668[_0x405f05(0xee)](_0x40a75a,0x1)+'/'+_0x540668['tXeZz'](_0x426112,0x1)+_0x405f05(0xf2)+_0x2c58cb+'ms...'),await new Promise(_0x1c1242=>setTimeout(_0x1c1242,_0x2c58cb));}}}throw _0x1405b1;}
@@ -1 +1 @@
1
- const _0x26a228=_0x2de8;(function(_0x22200e,_0x24dadb){const _0x5dadce=_0x2de8,_0x371c07=_0x22200e();while(!![]){try{const _0x40c2e7=-parseInt(_0x5dadce(0xce))/0x1+parseInt(_0x5dadce(0xd1))/0x2+parseInt(_0x5dadce(0xd3))/0x3+parseInt(_0x5dadce(0xf8))/0x4*(parseInt(_0x5dadce(0xe5))/0x5)+parseInt(_0x5dadce(0xdc))/0x6+-parseInt(_0x5dadce(0xcb))/0x7+-parseInt(_0x5dadce(0xf9))/0x8*(parseInt(_0x5dadce(0xdd))/0x9);if(_0x40c2e7===_0x24dadb)break;else _0x371c07['push'](_0x371c07['shift']());}catch(_0x20455d){_0x371c07['push'](_0x371c07['shift']());}}}(_0x3225,0xbd78c));function _0x2de8(_0x477d4c,_0x26e075){_0x477d4c=_0x477d4c-0xc8;const _0x32252e=_0x3225();let _0x2de857=_0x32252e[_0x477d4c];return _0x2de857;}import*as _0x18288d from'fs';import*as _0x392e86 from'path';import*as _0x50d671 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x392e86[_0x26a228(0xd6)](_0x50d671['homedir'](),_0x26a228(0xe8),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x23b092=_0x26a228;try{if(_0x18288d['existsSync'](CACHE_FILE)){const _0x2c4154=JSON['parse'](_0x18288d[_0x23b092(0xee)](CACHE_FILE,_0x23b092(0xf0)));return{'version':0x3,'sessions':_0x2c4154[_0x23b092(0xf1)]||{},'branches':_0x2c4154[_0x23b092(0xf3)]||{},'lastEnabledSessionClearedAt':_0x2c4154[_0x23b092(0xe6)]};}}catch{}return createEmptyCache();}function saveCache(_0x1a7f43){try{const _0x5acf14=_0x392e86['dirname'](CACHE_FILE);!_0x18288d['existsSync'](_0x5acf14)&&_0x18288d['mkdirSync'](_0x5acf14,{'recursive':!![]}),_0x18288d['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x1a7f43,null,0x2));}catch{}}export function getCurrentBranch(){const _0x4483c6=_0x26a228,_0x228791={'vVqxX':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','ZeGfQ':'pipe','MtWLA':'HEAD'};try{const _0x468fb0=execSync(_0x228791[_0x4483c6(0xd9)],{'encoding':'utf-8','stdio':[_0x4483c6(0xdb),_0x228791[_0x4483c6(0xef)],_0x228791['ZeGfQ']]})['trim']();if(!_0x468fb0||_0x468fb0===_0x228791[_0x4483c6(0xca)])return null;return _0x468fb0;}catch{return null;}}export function enableBranch(_0x32809c){const _0x557aba=loadCache();_0x557aba['branches'][_0x32809c]=!![],saveCache(_0x557aba);}export function disableBranch(_0x3800c4){const _0x2227f9=_0x26a228,_0x1e5e12={'nDrRc':function(_0x240c49){return _0x240c49();}},_0x255dff=_0x1e5e12[_0x2227f9(0xea)](loadCache);delete _0x255dff[_0x2227f9(0xf3)][_0x3800c4],saveCache(_0x255dff);}export function isBranchEnabled(_0x10612d){const _0x13570f=_0x26a228,_0x3cb633={'MjNYG':function(_0x3b931d,_0x5ee231){return _0x3b931d===_0x5ee231;}},_0x2cb49a=loadCache();return _0x3cb633['MjNYG'](_0x2cb49a[_0x13570f(0xf3)][_0x10612d],!![]);}function getOrCreateSession(_0x360213,_0x38e3ba){const _0x42c062=_0x26a228;return!_0x360213['sessions'][_0x38e3ba]&&(_0x360213[_0x42c062(0xf1)][_0x38e3ba]={}),_0x360213['sessions'][_0x38e3ba];}export function enableSession(_0x5e90a9){const _0x13fcb3=_0x26a228,_0x105994={'upNGU':function(_0x306d46,_0x40c9a7,_0x513564){return _0x306d46(_0x40c9a7,_0x513564);},'hmBuK':function(_0x19e4a7,_0x2879f9){return _0x19e4a7!==_0x2879f9;},'LUuxP':'main'},_0x56c562=loadCache(),_0x490185=_0x105994['upNGU'](getOrCreateSession,_0x56c562,_0x5e90a9);_0x490185[_0x13fcb3(0xd4)]=!![];const _0x1f2e13=getCurrentBranch();_0x1f2e13&&_0x105994[_0x13fcb3(0xe0)](_0x1f2e13,_0x105994['LUuxP'])&&_0x1f2e13!=='master'&&(_0x56c562[_0x13fcb3(0xf3)][_0x1f2e13]=!![],_0x490185[_0x13fcb3(0xf5)]=_0x1f2e13),saveCache(_0x56c562);}export function isSessionEnabled(_0x4e8b27){const _0x32227b=_0x26a228,_0x7e9c26={'Wwgpo':function(_0x3d6b2d){return _0x3d6b2d();},'JYbGz':function(_0x19a542,_0x337520){return _0x19a542===_0x337520;}},_0x2afd83=loadCache(),_0x4e3f53=_0x7e9c26[_0x32227b(0xd0)](getCurrentBranch);if(!_0x4e3f53||_0x7e9c26[_0x32227b(0xcc)](_0x4e3f53,_0x32227b(0xf4))||_0x4e3f53==='master')return _0x7e9c26[_0x32227b(0xcc)](_0x2afd83['sessions'][_0x4e8b27]?.['enabled'],!![]);const _0x39dfba=_0x7e9c26[_0x32227b(0xcc)](_0x2afd83['branches'][_0x4e3f53],!![]),_0x52252c=_0x2afd83['sessions'][_0x4e8b27]?.['enabled']===!![];return _0x39dfba||_0x52252c;}function _0x3225(){const _0x1bcf32=['enabled','toISOString','join','LDuwP','uHDxM','vVqxX','VMlQx','pipe','8743008MtbAoW','477qovbRa','fDkbe','KepEA','hmBuK','itjgP','lyyCu','leYmT','dGXMp','5jBwOLg','lastEnabledSessionClearedAt','zCOiB','.claude','lastPlanReminderAt','nDrRc','njhnQ','mVWkA','IkcAD','readFileSync','ZeGfQ','utf-8','sessions','featureId','branches','main','currentBranch','registeredAt','mduQZ','3140828yOKpAR','116168lVNdhw','now','master','MtWLA','3593268bWaiXC','JYbGz','prompted','1549414sdWKtx','lTuto','Wwgpo','2299048ZGMMvn','foFWJ','649584BeZZDI'];_0x3225=function(){return _0x1bcf32;};return _0x3225();}export function disableSession(_0x2616f7){const _0x45145f=_0x26a228,_0x38c72c={'xWZFQ':function(_0x4572b4){return _0x4572b4();},'mduQZ':function(_0x1ba32a,_0x36895a,_0x449b63){return _0x1ba32a(_0x36895a,_0x449b63);},'mVWkA':function(_0x5394f3,_0x507cca){return _0x5394f3(_0x507cca);}},_0x31d9a5=_0x38c72c['xWZFQ'](loadCache),_0x2bafcc=_0x38c72c[_0x45145f(0xf7)](getOrCreateSession,_0x31d9a5,_0x2616f7);_0x2bafcc[_0x45145f(0xd4)]=![],_0x38c72c[_0x45145f(0xec)](saveCache,_0x31d9a5);}export function updateBranchTracking(_0x1bdfa0){const _0x481f85=_0x26a228,_0x3fd992={'VMlQx':function(_0x2159a6){return _0x2159a6();},'KepEA':function(_0x69ac55,_0x49a8a0){return _0x69ac55===_0x49a8a0;},'Qcyds':function(_0x1be60a,_0x1f7e8d){return _0x1be60a===_0x1f7e8d;},'HSzCz':function(_0x3a2546,_0x279854){return _0x3a2546(_0x279854);}},_0x57eb5e=loadCache(),_0x40d970=_0x57eb5e['sessions'][_0x1bdfa0];if(!_0x40d970?.['enabled'])return;const _0x3d3e12=_0x3fd992[_0x481f85(0xda)](getCurrentBranch);if(!_0x3d3e12||_0x3fd992[_0x481f85(0xdf)](_0x3d3e12,_0x481f85(0xf4))||_0x3fd992['Qcyds'](_0x3d3e12,_0x481f85(0xc9)))return;_0x40d970[_0x481f85(0xf5)]!==_0x3d3e12&&(_0x57eb5e['branches'][_0x3d3e12]=!![],_0x40d970['currentBranch']=_0x3d3e12,_0x3fd992['HSzCz'](saveCache,_0x57eb5e));}export function initBranchTracking(_0x4d1f1e){const _0x113a90=_0x26a228,_0x222fcc={'LDuwP':function(_0x187f13){return _0x187f13();},'leYmT':'main','MNgKZ':function(_0x1a321f,_0x3745ed){return _0x1a321f===_0x3745ed;},'rWWpY':_0x113a90(0xc9),'yOGJd':function(_0x2db5b0,_0x1409ee){return _0x2db5b0===_0x1409ee;},'lyyCu':function(_0x293eaf,_0x36a63b){return _0x293eaf(_0x36a63b);}},_0x1945de=_0x222fcc[_0x113a90(0xd7)](loadCache),_0x4f4379=getCurrentBranch();if(!_0x4f4379||_0x4f4379===_0x222fcc[_0x113a90(0xe3)]||_0x222fcc['MNgKZ'](_0x4f4379,_0x222fcc['rWWpY']))return;if(_0x222fcc['yOGJd'](_0x1945de['branches'][_0x4f4379],!![])){const _0x5b549e=getOrCreateSession(_0x1945de,_0x4d1f1e);_0x5b549e['enabled']=!![],_0x5b549e['currentBranch']=_0x4f4379,_0x222fcc[_0x113a90(0xe2)](saveCache,_0x1945de);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x56715f){const _0x59dc49=_0x26a228,_0xde39f6=loadCache(),_0x4a1a52=_0xde39f6[_0x59dc49(0xf1)][_0x56715f];_0x4a1a52?.[_0x59dc49(0xd4)]&&(_0xde39f6[_0x59dc49(0xe6)]=Date['now'](),saveCache(_0xde39f6));}export function shouldAutoEnableAfterClear(_0x20c0cf){const _0x2ecae5=_0x26a228,_0x2da1da={'yysJv':'clear','EJZrY':function(_0x41ed53,_0x55c332){return _0x41ed53-_0x55c332;},'jWbiv':function(_0x376884,_0x29d4d0){return _0x376884<=_0x29d4d0;}};if(_0x20c0cf!==_0x2da1da['yysJv'])return![];const _0x2ea6bc=loadCache(),_0x1eba3b=_0x2ea6bc[_0x2ecae5(0xe6)];if(!_0x1eba3b)return![];const _0x126e7b=_0x2da1da['EJZrY'](Date['now'](),_0x1eba3b);return _0x2da1da['jWbiv'](_0x126e7b,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x204ecc){const _0xe424a1=_0x26a228,_0x554a62={'dGXMp':function(_0x1207a5){return _0x1207a5();},'fDkbe':function(_0x7e918,_0x56f412){return _0x7e918!==_0x56f412;}},_0x30893f=_0x554a62['dGXMp'](loadCache),_0x44158f=getOrCreateSession(_0x30893f,_0x204ecc);_0x44158f[_0xe424a1(0xd4)]=!![];const _0x42252d=_0x554a62[_0xe424a1(0xe4)](getCurrentBranch);_0x42252d&&_0x554a62[_0xe424a1(0xde)](_0x42252d,'main')&&_0x42252d!==_0xe424a1(0xc9)&&(_0x44158f['currentBranch']=_0x42252d),delete _0x30893f['lastEnabledSessionClearedAt'],saveCache(_0x30893f);}export function registerSession(_0x3eb081,_0x5680a5){const _0x10aac9=_0x26a228,_0x15319a={'xWfPn':function(_0x26613a,_0x446ddb,_0x3c9fa1){return _0x26613a(_0x446ddb,_0x3c9fa1);}},_0xa279db=loadCache(),_0x17bca9=_0x15319a['xWfPn'](getOrCreateSession,_0xa279db,_0x3eb081);_0x17bca9[_0x10aac9(0xf2)]=_0x5680a5,_0x17bca9[_0x10aac9(0xf6)]=new Date()[_0x10aac9(0xd5)](),saveCache(_0xa279db);}export function getSessionEntry(_0x1435b5){const _0x48ed65={'FtpaI':function(_0x30d026){return _0x30d026();}},_0x212552=_0x48ed65['FtpaI'](loadCache),_0x502146=_0x212552['sessions'][_0x1435b5];if(_0x502146?.['featureId']&&_0x502146?.['registeredAt'])return{'featureId':_0x502146['featureId'],'registeredAt':_0x502146['registeredAt']};return null;}export function unregisterSession(_0x5d3c65){const _0x1d9d5a=_0x26a228,_0x4b6172={'kPWoy':function(_0xc34a9,_0x511d6c){return _0xc34a9(_0x511d6c);}},_0x55f8e2=loadCache(),_0x3bf427=_0x55f8e2[_0x1d9d5a(0xf1)][_0x5d3c65];_0x3bf427&&(delete _0x3bf427[_0x1d9d5a(0xf2)],delete _0x3bf427[_0x1d9d5a(0xf6)],_0x4b6172['kPWoy'](saveCache,_0x55f8e2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x53c030){const _0x55d064=_0x26a228,_0x47eb79={'itjgP':function(_0x11c9b3,_0xa1d300){return _0x11c9b3>=_0xa1d300;},'aPMMP':function(_0x2f33dc,_0xc28180){return _0x2f33dc-_0xc28180;},'nMAkh':function(_0x29d4eb,_0x555763){return _0x29d4eb(_0x555763);}},_0x4b139e=loadCache(),_0x5a99a5=getOrCreateSession(_0x4b139e,_0x53c030),_0x50da10=_0x5a99a5[_0x55d064(0xe9)]||0x0,_0x3dfeb0=Date[_0x55d064(0xc8)]();if(_0x47eb79[_0x55d064(0xe1)](_0x47eb79['aPMMP'](_0x3dfeb0,_0x50da10),PLAN_REMINDER_INTERVAL_MS))return _0x5a99a5[_0x55d064(0xe9)]=_0x3dfeb0,_0x47eb79['nMAkh'](saveCache,_0x4b139e),!![];return![];}export function shouldShowStopReminder(_0x26dd73){const _0x50afc7=_0x26a228,_0x47f706={'foFWJ':function(_0x4a0a4b,_0x2f6a81,_0x52e28e){return _0x4a0a4b(_0x2f6a81,_0x52e28e);},'uHDxM':function(_0x12a4d6,_0x1fc9e9){return _0x12a4d6>=_0x1fc9e9;},'zTvOC':function(_0x4c76ba,_0x21f75c){return _0x4c76ba-_0x21f75c;},'IkcAD':function(_0x32d4f2,_0x5bfe21){return _0x32d4f2(_0x5bfe21);}},_0x86786d=loadCache(),_0x17b45a=_0x47f706[_0x50afc7(0xd2)](getOrCreateSession,_0x86786d,_0x26dd73),_0xd53b66=_0x17b45a['lastStopReminderAt']||0x0,_0x23705b=Date['now']();if(_0x47f706[_0x50afc7(0xd8)](_0x47f706['zTvOC'](_0x23705b,_0xd53b66),STOP_REMINDER_INTERVAL_MS))return _0x17b45a['lastStopReminderAt']=_0x23705b,_0x47f706[_0x50afc7(0xed)](saveCache,_0x86786d),!![];return![];}export function hasSessionBeenPrompted(_0x22563b){const _0x13a4f8=_0x26a228,_0x25af49={'njhnQ':function(_0x17854a){return _0x17854a();}},_0x432b26=_0x25af49[_0x13a4f8(0xeb)](loadCache);return _0x432b26['sessions'][_0x22563b]?.[_0x13a4f8(0xcd)]===!![];}export function markSessionPrompted(_0x7b08b4){const _0xdeebee=_0x26a228,_0x23983d={'lTuto':function(_0x3594f8,_0x1ea13e,_0x5784fb){return _0x3594f8(_0x1ea13e,_0x5784fb);},'zCOiB':function(_0x159dc9,_0x126cf4){return _0x159dc9(_0x126cf4);}},_0x317c4f=loadCache(),_0x1c8a66=_0x23983d[_0xdeebee(0xcf)](getOrCreateSession,_0x317c4f,_0x7b08b4);_0x1c8a66['prompted']=!![],_0x23983d[_0xdeebee(0xe7)](saveCache,_0x317c4f);}export function getCacheFile(){return CACHE_FILE;}
1
+ const _0x2b63c9=_0x6302;(function(_0x34c756,_0x2f2628){const _0x596d97=_0x6302,_0xa25551=_0x34c756();while(!![]){try{const _0x1eabd2=parseInt(_0x596d97(0x162))/0x1+-parseInt(_0x596d97(0x15c))/0x2+-parseInt(_0x596d97(0x159))/0x3+-parseInt(_0x596d97(0x156))/0x4*(parseInt(_0x596d97(0x152))/0x5)+-parseInt(_0x596d97(0x150))/0x6+parseInt(_0x596d97(0x16f))/0x7*(-parseInt(_0x596d97(0x170))/0x8)+-parseInt(_0x596d97(0x148))/0x9*(-parseInt(_0x596d97(0x15e))/0xa);if(_0x1eabd2===_0x2f2628)break;else _0xa25551['push'](_0xa25551['shift']());}catch(_0x4a4c58){_0xa25551['push'](_0xa25551['shift']());}}}(_0xecf6,0x5d2ab));import*as _0x4c9d66 from'fs';import*as _0x593260 from'path';import*as _0x1f692b from'os';import{execSync}from'child_process';const CACHE_FILE=_0x593260['join'](_0x1f692b[_0x2b63c9(0x158)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x3ef653=_0x2b63c9,_0x2ba552={'tbZPF':function(_0x4046c2){return _0x4046c2();}};try{if(_0x4c9d66[_0x3ef653(0x147)](CACHE_FILE)){const _0x3d502a=JSON[_0x3ef653(0x16a)](_0x4c9d66[_0x3ef653(0x15b)](CACHE_FILE,_0x3ef653(0x14e)));return{'version':0x3,'sessions':_0x3d502a['sessions']||{},'branches':_0x3d502a[_0x3ef653(0x14d)]||{},'lastEnabledSessionClearedAt':_0x3d502a['lastEnabledSessionClearedAt']};}}catch{}return _0x2ba552['tbZPF'](createEmptyCache);}function saveCache(_0x5dcaaa){const _0x51a0b8=_0x2b63c9;try{const _0x92ab40=_0x593260['dirname'](CACHE_FILE);!_0x4c9d66['existsSync'](_0x92ab40)&&_0x4c9d66[_0x51a0b8(0x151)](_0x92ab40,{'recursive':!![]}),_0x4c9d66[_0x51a0b8(0x149)](CACHE_FILE,JSON[_0x51a0b8(0x155)](_0x5dcaaa,null,0x2));}catch{}}export function getCurrentBranch(){const _0x1a0ec0=_0x2b63c9,_0x1bae79={'FPhjN':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','RDRhc':_0x1a0ec0(0x14e),'NKeib':'pipe'};try{const _0x50888b=execSync(_0x1bae79[_0x1a0ec0(0x16b)],{'encoding':_0x1bae79['RDRhc'],'stdio':['pipe',_0x1bae79['NKeib'],_0x1a0ec0(0x171)]})[_0x1a0ec0(0x175)]();if(!_0x50888b||_0x50888b==='HEAD')return null;return _0x50888b;}catch{return null;}}export function enableBranch(_0x5165e6){const _0x4e8f42=_0x2b63c9,_0x2c4b81={'dsUpO':function(_0x34d957){return _0x34d957();},'ZomVt':function(_0x200dbd,_0x125075){return _0x200dbd(_0x125075);}},_0x175c86=_0x2c4b81[_0x4e8f42(0x16e)](loadCache);_0x175c86[_0x4e8f42(0x14d)][_0x5165e6]=!![],_0x2c4b81['ZomVt'](saveCache,_0x175c86);}export function disableBranch(_0x15b6b6){const _0x211959={'KantS':function(_0x1ffe63,_0x4db89c){return _0x1ffe63(_0x4db89c);}},_0x116a58=loadCache();delete _0x116a58['branches'][_0x15b6b6],_0x211959['KantS'](saveCache,_0x116a58);}export function isBranchEnabled(_0x2514e9){const _0x3065d7=_0x2b63c9,_0x4a3864={'OsGYL':function(_0x1d39ee){return _0x1d39ee();},'UHVwi':function(_0x1480b1,_0x3cb061){return _0x1480b1===_0x3cb061;}},_0x47e169=_0x4a3864['OsGYL'](loadCache);return _0x4a3864[_0x3065d7(0x165)](_0x47e169[_0x3065d7(0x14d)][_0x2514e9],!![]);}function getOrCreateSession(_0x21755f,_0x552c06){const _0xcda40b=_0x2b63c9;return!_0x21755f['sessions'][_0x552c06]&&(_0x21755f['sessions'][_0x552c06]={}),_0x21755f[_0xcda40b(0x157)][_0x552c06];}export function enableSession(_0x56be32){const _0x41b811=_0x2b63c9,_0xdf6adb={'JpjWT':function(_0x5d95e7){return _0x5d95e7();},'RXHkf':function(_0x29be5f){return _0x29be5f();},'XyJVL':function(_0x2c4e05,_0x3456a7){return _0x2c4e05!==_0x3456a7;},'bpbmE':_0x41b811(0x176),'pyaHQ':function(_0xd8bae0,_0x1ea933){return _0xd8bae0(_0x1ea933);}},_0x3709e3=_0xdf6adb[_0x41b811(0x15a)](loadCache),_0xde3a84=getOrCreateSession(_0x3709e3,_0x56be32);_0xde3a84[_0x41b811(0x14a)]=!![];const _0x1921b0=_0xdf6adb['RXHkf'](getCurrentBranch);_0x1921b0&&_0xdf6adb[_0x41b811(0x160)](_0x1921b0,_0xdf6adb['bpbmE'])&&_0x1921b0!=='master'&&(_0x3709e3['branches'][_0x1921b0]=!![],_0xde3a84[_0x41b811(0x167)]=_0x1921b0),_0xdf6adb[_0x41b811(0x15f)](saveCache,_0x3709e3);}export function isSessionEnabled(_0x40bd80){const _0x290f45=_0x2b63c9,_0x1662ff={'zTVuN':function(_0x259e15,_0x28c273){return _0x259e15===_0x28c273;},'dBQUj':_0x290f45(0x14c),'rKUyF':function(_0x10a8d3,_0x142f05){return _0x10a8d3===_0x142f05;}},_0x5b64e7=loadCache(),_0x55783f=getCurrentBranch();if(!_0x55783f||_0x1662ff[_0x290f45(0x15d)](_0x55783f,'main')||_0x55783f===_0x1662ff['dBQUj'])return _0x5b64e7[_0x290f45(0x157)][_0x40bd80]?.['enabled']===!![];const _0x5eb7a0=_0x5b64e7['branches'][_0x55783f]===!![],_0x12e09b=_0x1662ff[_0x290f45(0x14b)](_0x5b64e7[_0x290f45(0x157)][_0x40bd80]?.[_0x290f45(0x14a)],!![]);return _0x5eb7a0||_0x12e09b;}export function disableSession(_0x22c70f){const _0x444596=_0x2b63c9,_0x3d9004={'oAUqa':function(_0x1b21f4,_0x5519ac,_0x5c7c44){return _0x1b21f4(_0x5519ac,_0x5c7c44);}},_0xd11f20=loadCache(),_0x51b2b2=_0x3d9004[_0x444596(0x153)](getOrCreateSession,_0xd11f20,_0x22c70f);_0x51b2b2['enabled']=![],saveCache(_0xd11f20);}export function updateBranchTracking(_0x9440df){const _0x42c8a4=_0x2b63c9,_0x483c52={'kuNEq':function(_0x2167c2){return _0x2167c2();},'GbbsV':function(_0x4111ff){return _0x4111ff();},'ZcXoZ':function(_0x1e303c,_0x4cacc7){return _0x1e303c===_0x4cacc7;},'BuVHf':function(_0x3cd627,_0x2ce6b4){return _0x3cd627!==_0x2ce6b4;},'QCXhx':function(_0x3e1248,_0x4b7c76){return _0x3e1248(_0x4b7c76);}},_0x505b71=_0x483c52['kuNEq'](loadCache),_0x2967bf=_0x505b71[_0x42c8a4(0x157)][_0x9440df];if(!_0x2967bf?.[_0x42c8a4(0x14a)])return;const _0xdd2952=_0x483c52['GbbsV'](getCurrentBranch);if(!_0xdd2952||_0xdd2952==='main'||_0x483c52[_0x42c8a4(0x16c)](_0xdd2952,_0x42c8a4(0x14c)))return;_0x483c52['BuVHf'](_0x2967bf['currentBranch'],_0xdd2952)&&(_0x505b71['branches'][_0xdd2952]=!![],_0x2967bf[_0x42c8a4(0x167)]=_0xdd2952,_0x483c52['QCXhx'](saveCache,_0x505b71));}export function initBranchTracking(_0x20bd6c){const _0x572dd6=_0x2b63c9,_0x371625={'bPkdO':function(_0x4065bb,_0x401dbc){return _0x4065bb===_0x401dbc;},'yfqSN':'master','tHRyV':function(_0x58e669,_0xaa4c3e,_0x42e7e2){return _0x58e669(_0xaa4c3e,_0x42e7e2);},'sdWvW':function(_0x3a7323,_0x90d72d){return _0x3a7323(_0x90d72d);}},_0x392263=loadCache(),_0x4e8232=getCurrentBranch();if(!_0x4e8232||_0x371625['bPkdO'](_0x4e8232,_0x572dd6(0x176))||_0x371625[_0x572dd6(0x173)](_0x4e8232,_0x371625['yfqSN']))return;if(_0x392263['branches'][_0x4e8232]===!![]){const _0x557840=_0x371625[_0x572dd6(0x166)](getOrCreateSession,_0x392263,_0x20bd6c);_0x557840[_0x572dd6(0x14a)]=!![],_0x557840[_0x572dd6(0x167)]=_0x4e8232,_0x371625['sdWvW'](saveCache,_0x392263);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x327726){const _0xa7df3f=_0x2b63c9,_0x5f38c8={'PIVos':function(_0x7b5216,_0x9a5ba3){return _0x7b5216(_0x9a5ba3);}},_0x52ba3b=loadCache(),_0x4b1866=_0x52ba3b[_0xa7df3f(0x157)][_0x327726];_0x4b1866?.[_0xa7df3f(0x14a)]&&(_0x52ba3b[_0xa7df3f(0x172)]=Date[_0xa7df3f(0x163)](),_0x5f38c8['PIVos'](saveCache,_0x52ba3b));}function _0xecf6(){const _0x5e91bd=['4132OzczQd','sessions','homedir','2168487QJlgVR','JpjWT','readFileSync','179320DeqVoh','zTVuN','264790fdQFBU','pyaHQ','XyJVL','MWNnc','421289VaoeJq','now','registeredAt','UHVwi','tHRyV','currentBranch','lastPlanReminderAt','Zdbjo','parse','FPhjN','ZcXoZ','IvzhH','dsUpO','3292163NNOlpn','8zqFXJf','pipe','lastEnabledSessionClearedAt','bPkdO','oKvml','trim','main','dlXao','existsSync','603njxVtp','writeFileSync','enabled','rKUyF','master','branches','utf-8','lastStopReminderAt','2082594MLcUlP','mkdirSync','890eaEqFR','oAUqa','featureId','stringify'];_0xecf6=function(){return _0x5e91bd;};return _0xecf6();}export function shouldAutoEnableAfterClear(_0x5da1ef){const _0x5a25c0={'rICoV':function(_0x5b6784,_0x49e1fb){return _0x5b6784<=_0x49e1fb;}};if(_0x5da1ef!=='clear')return![];const _0x190da5=loadCache(),_0x377b51=_0x190da5['lastEnabledSessionClearedAt'];if(!_0x377b51)return![];const _0xc0ee5e=Date['now']()-_0x377b51;return _0x5a25c0['rICoV'](_0xc0ee5e,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x83cf3d){const _0x382354=_0x2b63c9,_0x2862df={'MWNnc':function(_0x816606){return _0x816606();},'Zdbjo':'main','IvzhH':function(_0x45526b,_0x19d505){return _0x45526b!==_0x19d505;},'Xipec':_0x382354(0x14c),'uTcpQ':function(_0x296226,_0x19d552){return _0x296226(_0x19d552);}},_0x2eb5b8=loadCache(),_0x2b6ad9=getOrCreateSession(_0x2eb5b8,_0x83cf3d);_0x2b6ad9[_0x382354(0x14a)]=!![];const _0x397096=_0x2862df[_0x382354(0x161)](getCurrentBranch);_0x397096&&_0x397096!==_0x2862df[_0x382354(0x169)]&&_0x2862df[_0x382354(0x16d)](_0x397096,_0x2862df['Xipec'])&&(_0x2b6ad9['currentBranch']=_0x397096),delete _0x2eb5b8['lastEnabledSessionClearedAt'],_0x2862df['uTcpQ'](saveCache,_0x2eb5b8);}export function registerSession(_0x3c3c43,_0x338dd2){const _0x48a7f5=_0x2b63c9,_0x33a241={'zfjpz':function(_0x55726c){return _0x55726c();},'nEnjt':function(_0x52c4f3,_0x1b232e){return _0x52c4f3(_0x1b232e);}},_0x3d005b=_0x33a241['zfjpz'](loadCache),_0x4f5921=getOrCreateSession(_0x3d005b,_0x3c3c43);_0x4f5921['featureId']=_0x338dd2,_0x4f5921[_0x48a7f5(0x164)]=new Date()['toISOString'](),_0x33a241['nEnjt'](saveCache,_0x3d005b);}export function getSessionEntry(_0x145d49){const _0x2c0a77=_0x2b63c9,_0x87654={'UUgkC':function(_0x19b761){return _0x19b761();}},_0x9e3dc0=_0x87654['UUgkC'](loadCache),_0x3492c2=_0x9e3dc0[_0x2c0a77(0x157)][_0x145d49];if(_0x3492c2?.[_0x2c0a77(0x154)]&&_0x3492c2?.[_0x2c0a77(0x164)])return{'featureId':_0x3492c2['featureId'],'registeredAt':_0x3492c2[_0x2c0a77(0x164)]};return null;}export function unregisterSession(_0x3cbd0b){const _0x4846e9=_0x2b63c9,_0x3f7123={'OBdSi':function(_0x2a68a2,_0x426517){return _0x2a68a2(_0x426517);}},_0x18e35d=loadCache(),_0x89b596=_0x18e35d[_0x4846e9(0x157)][_0x3cbd0b];_0x89b596&&(delete _0x89b596['featureId'],delete _0x89b596['registeredAt'],_0x3f7123['OBdSi'](saveCache,_0x18e35d));}function _0x6302(_0x4debc8,_0x1aa23e){_0x4debc8=_0x4debc8-0x147;const _0xecf690=_0xecf6();let _0x63025d=_0xecf690[_0x4debc8];return _0x63025d;}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xdf818a){const _0x59c968=_0x2b63c9,_0x4efc8c={'zKjvs':function(_0x2c32b6,_0x31e0a1,_0xecddf0){return _0x2c32b6(_0x31e0a1,_0xecddf0);}},_0x12ef3a=loadCache(),_0x50404b=_0x4efc8c['zKjvs'](getOrCreateSession,_0x12ef3a,_0xdf818a),_0x275db2=_0x50404b['lastPlanReminderAt']||0x0,_0x1dea3f=Date['now']();if(_0x1dea3f-_0x275db2>=PLAN_REMINDER_INTERVAL_MS)return _0x50404b[_0x59c968(0x168)]=_0x1dea3f,saveCache(_0x12ef3a),!![];return![];}export function shouldShowStopReminder(_0x36d85f){const _0x307418=_0x2b63c9,_0x1746e1={'oKvml':function(_0x732c87){return _0x732c87();},'HVBeP':function(_0x53cb58,_0x5bca99){return _0x53cb58-_0x5bca99;}},_0x53b0b8=_0x1746e1[_0x307418(0x174)](loadCache),_0x5f3393=getOrCreateSession(_0x53b0b8,_0x36d85f),_0x1da8fc=_0x5f3393[_0x307418(0x14f)]||0x0,_0x36962c=Date[_0x307418(0x163)]();if(_0x1746e1['HVBeP'](_0x36962c,_0x1da8fc)>=STOP_REMINDER_INTERVAL_MS)return _0x5f3393['lastStopReminderAt']=_0x36962c,saveCache(_0x53b0b8),!![];return![];}export function hasSessionBeenPrompted(_0x22afbb){const _0xc74ee4={'kFRqt':function(_0x977c3f,_0x2ebf59){return _0x977c3f===_0x2ebf59;}},_0x4d3ac7=loadCache();return _0xc74ee4['kFRqt'](_0x4d3ac7['sessions'][_0x22afbb]?.['prompted'],!![]);}export function markSessionPrompted(_0x59a6ae){const _0x2cb77f=_0x2b63c9,_0x2f80d5={'dlXao':function(_0x51630b){return _0x51630b();}},_0xe57d9d=_0x2f80d5[_0x2cb77f(0x177)](loadCache),_0x58cf4c=getOrCreateSession(_0xe57d9d,_0x59a6ae);_0x58cf4c['prompted']=!![],saveCache(_0xe57d9d);}export function getCacheFile(){return CACHE_FILE;}
@@ -1 +1 @@
1
- const _0x5b1811=_0x5b85;(function(_0x4c5598,_0x438a7d){const _0x48ad2f=_0x5b85,_0x3e2fa7=_0x4c5598();while(!![]){try{const _0x4102d6=parseInt(_0x48ad2f(0xe9))/0x1+-parseInt(_0x48ad2f(0xce))/0x2+parseInt(_0x48ad2f(0xc2))/0x3+-parseInt(_0x48ad2f(0xdf))/0x4+-parseInt(_0x48ad2f(0xf0))/0x5*(-parseInt(_0x48ad2f(0xea))/0x6)+parseInt(_0x48ad2f(0xc4))/0x7*(parseInt(_0x48ad2f(0xb4))/0x8)+-parseInt(_0x48ad2f(0xc7))/0x9;if(_0x4102d6===_0x438a7d)break;else _0x3e2fa7['push'](_0x3e2fa7['shift']());}catch(_0x1a6e91){_0x3e2fa7['push'](_0x3e2fa7['shift']());}}}(_0x5b1f,0x2ce9f));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';function _0x5b85(_0x9dc27c,_0x5dd8d5){_0x9dc27c=_0x9dc27c-0x9d;const _0x5b1fc2=_0x5b1f();let _0x5b8539=_0x5b1fc2[_0x9dc27c];return _0x5b8539;}import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0xfaeeb8,_0x353064){const _0x280b3d=_0x5b85,_0x7a8f8b={'cQcvD':function(_0x1429d1,_0x1c5845,_0x16c8d7,_0x466dc8){return _0x1429d1(_0x1c5845,_0x16c8d7,_0x466dc8);},'MNdHq':function(_0x3de07d,_0x3720c0,_0x41807e,_0x28fedf){return _0x3de07d(_0x3720c0,_0x41807e,_0x28fedf);},'Tthhc':_0x280b3d(0xcd),'COdEn':function(_0x1c4300,_0x54740a){return _0x1c4300(_0x54740a);}},_0x15d43f=_0x7a8f8b['cQcvD'](join,_0x353064,'ci',_0xfaeeb8),_0x6b83dc=_0x7a8f8b[_0x280b3d(0xa7)](join,_0x353064,_0x7a8f8b['Tthhc'],_0xfaeeb8),_0x3a4e14=join(_0x353064,_0xfaeeb8),_0x4824a5=join(_0x353064,_0x7a8f8b['Tthhc']),_0x544ca4=join(_0x353064,'ci');if(existsSync(_0x15d43f))return _0x15d43f;if(_0x7a8f8b['COdEn'](existsSync,_0x6b83dc))return _0x6b83dc;if(_0x7a8f8b['COdEn'](existsSync,_0x3a4e14)&&(_0x3a4e14!==_0x4824a5&&_0x3a4e14!==_0x544ca4?!![]:hasLegacyProfileFiles(_0x3a4e14)))return _0x3a4e14;return null;}export function getEnvDir(_0x565de6,_0x2a9c39={}){const _0x2ada3f=_0x5b85,_0xf5b7b8={'MCrFl':function(_0x1c35dd,_0x573edc,_0x3c6db0){return _0x1c35dd(_0x573edc,_0x3c6db0);},'ywHvJ':function(_0x13712c,_0x466f1b){return _0x13712c(_0x466f1b);},'qEpgr':function(_0x5cd453){return _0x5cd453();},'mwDbz':_0x2ada3f(0xcd)},_0x1da0fa=getRangerDir(),_0x240d76=_0xf5b7b8['MCrFl'](findEnvInRoot,_0x565de6,_0x1da0fa);if(_0x240d76){if(_0x2a9c39['forWrite']&&_0xf5b7b8['ywHvJ'](isLegacyEnvPath,_0x240d76))throw _0xf5b7b8['MCrFl'](legacyWriteError,_0x565de6,_0x240d76);return _0x240d76;}const _0x1d8dce=_0xf5b7b8['qEpgr'](getRangerHomeDir);if(_0x1d8dce!==_0x1da0fa){const _0x79d670=_0xf5b7b8['MCrFl'](findEnvInRoot,_0x565de6,_0x1d8dce);if(_0x79d670){if(_0x2a9c39[_0x2ada3f(0xfd)]&&_0xf5b7b8['ywHvJ'](isLegacyEnvPath,_0x79d670))throw legacyWriteError(_0x565de6,_0x79d670);return _0x79d670;}}const _0x500b07=join(_0x1d8dce,_0xf5b7b8[_0x2ada3f(0xf7)],_0x565de6);if(_0x2a9c39[_0x2ada3f(0xfd)])throw legacyWriteError(_0x565de6,_0x500b07);return _0x500b07;}function isLegacyEnvPath(_0x47bdfc){const _0x3ccbbf=_0x5b85,_0x12877f={'XBpGl':function(_0x41eddd,_0xf75a17){return _0x41eddd===_0xf75a17;}},_0x1b4a70=getRangerDir(),_0x1e1859=getRangerHomeDir();for(const _0x50b0cc of new Set([_0x1b4a70,_0x1e1859])){const _0x54dfbe=_0x50b0cc[_0x3ccbbf(0xc5)]('/')?_0x50b0cc:_0x50b0cc+'/';if(_0x12877f[_0x3ccbbf(0xf4)](_0x47bdfc,_0x50b0cc)||_0x47bdfc['startsWith'](_0x54dfbe))return!![];}return![];}function legacyWriteError(_0x39064a,_0x3a407d){const _0x360561=_0x5b85,_0x2902e5={'JjfZJ':function(_0x53016d,_0x1a0816){return _0x53016d+_0x1a0816;}};return new Error(_0x2902e5[_0x360561(0xf2)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x39064a+_0x360561(0x105)+_0x3a407d+'.\x0a'+_0x360561(0xae),_0x360561(0x9f))+_0x360561(0xb0));}export function findExistingEnv(_0x5d2b6a,_0x2b05b5){const _0x48d003=_0x5b85,_0x170526={'rZLwF':function(_0x3e2024){return _0x3e2024();},'NBrFM':_0x48d003(0xe7),'gmLZC':function(_0x58b1e0,_0xdf032e,_0x3f90ab){return _0x58b1e0(_0xdf032e,_0x3f90ab);},'nHWLh':function(_0x3dd79f,_0x2b06a1,_0x3cbded,_0x288018){return _0x3dd79f(_0x2b06a1,_0x3cbded,_0x288018);},'doUkG':_0x48d003(0xcd),'yFMzu':function(_0x5ad7e1,_0x8b20b4,_0x101116){return _0x5ad7e1(_0x8b20b4,_0x101116);},'bQeBw':function(_0x22276f,_0x419bad){return _0x22276f(_0x419bad);},'vHina':function(_0x40c848,_0x23a2ae){return _0x40c848===_0x23a2ae;},'oNXCA':function(_0x2d8c8f,_0x2e876f){return _0x2d8c8f===_0x2e876f;},'fqchB':function(_0x4da9c1,_0x2ad847){return _0x4da9c1(_0x2ad847);}},_0x5ac1dc=_0x2b05b5?.[_0x48d003(0xd9)],_0x4e1247=_0x5ac1dc?[_0x5ac1dc]:[_0x170526[_0x48d003(0x102)](getRangerDir),_0x170526[_0x48d003(0x102)](getRangerHomeDir)][_0x48d003(0xd7)]((_0x507729,_0x36703f,_0x19305c)=>_0x19305c['indexOf'](_0x507729)===_0x36703f),_0x43d5c9=_0x2b05b5?.['locations']??['ci',_0x48d003(0xcd),_0x170526[_0x48d003(0xca)]];for(const _0x1052ae of _0x4e1247){const _0x43f9a0=join(_0x1052ae,'local'),_0x49ad98=_0x170526[_0x48d003(0xfe)](join,_0x1052ae,'ci'),_0x51cf6a=[{'location':'ci','path':_0x170526[_0x48d003(0xcf)](join,_0x1052ae,'ci',_0x5d2b6a)},{'location':_0x170526['doUkG'],'path':_0x170526[_0x48d003(0xcf)](join,_0x1052ae,_0x48d003(0xcd),_0x5d2b6a)},{'location':_0x48d003(0xe7),'path':_0x170526['yFMzu'](join,_0x1052ae,_0x5d2b6a)}];for(const _0x38d7a7 of _0x51cf6a){if(_0x43d5c9[_0x48d003(0xb9)](_0x38d7a7['location'])&&_0x170526[_0x48d003(0xd5)](existsSync,_0x38d7a7[_0x48d003(0x104)])){if(_0x170526[_0x48d003(0xa2)](_0x38d7a7['location'],_0x170526['NBrFM'])&&(_0x38d7a7[_0x48d003(0x104)]===_0x43f9a0||_0x170526['oNXCA'](_0x38d7a7[_0x48d003(0x104)],_0x49ad98))&&!_0x170526[_0x48d003(0xde)](hasLegacyProfileFiles,_0x38d7a7['path']))continue;return{'path':_0x38d7a7['path'],'location':_0x38d7a7[_0x48d003(0xbe)]};}}}return null;}function hasLegacyProfileFiles(_0x5e13e2){const _0x4e0300=_0x5b85,_0x2d6db0={'UjWHS':function(_0x138146,_0x14cbb2){return _0x138146(_0x14cbb2);},'weGBc':function(_0x35cf3e,_0x12066e,_0x37f748){return _0x35cf3e(_0x12066e,_0x37f748);},'fOWIU':'auth.json','TJIjX':'auth.json.enc'};return _0x2d6db0[_0x4e0300(0xd2)](existsSync,_0x2d6db0['weGBc'](join,_0x5e13e2,_0x4e0300(0xee)))||existsSync(join(_0x5e13e2,_0x2d6db0['fOWIU']))||_0x2d6db0[_0x4e0300(0xd2)](existsSync,join(_0x5e13e2,_0x2d6db0['TJIjX']));}export function isEnvCi(_0x573a5f){const _0x4ddace=_0x5b85,_0x323f20={'wtxCo':function(_0x28ed70){return _0x28ed70();},'nVBFx':function(_0x217ae7,_0x50f7d4){return _0x217ae7!==_0x50f7d4;},'MRiyn':function(_0x8a13da,_0x2bb3e0,_0x3e1d19,_0x35e756){return _0x8a13da(_0x2bb3e0,_0x3e1d19,_0x35e756);}};if(existsSync(join(_0x323f20[_0x4ddace(0xd4)](getRangerDir),'ci',_0x573a5f)))return!![];const _0xb2cca4=getRangerHomeDir();if(_0x323f20['nVBFx'](_0xb2cca4,getRangerDir())&&existsSync(_0x323f20[_0x4ddace(0xf3)](join,_0xb2cca4,'ci',_0x573a5f)))return!![];return![];}export async function cleanupTempFiles(_0x3e7644){const _0x3e84f7=_0x5b85,_0x5bb1c6={'qrfsl':_0x3e84f7(0xff)},_0x11b4ba=[_0x3e7644['tempAuthPath'],_0x3e7644['configPath']][_0x3e84f7(0xd7)](Boolean);await Promise[_0x3e84f7(0xcc)](_0x11b4ba['map'](_0x3d8aff=>unlink(_0x3d8aff)['catch'](_0x1bbdbd=>{const _0x5d7cbe=_0x3e84f7;_0x1bbdbd['code']!==_0x5bb1c6['qrfsl']&&console['warn'](_0x5d7cbe(0xb2)+_0x3d8aff+':',_0x1bbdbd['message']);})));}export function getSettingsPath(_0x3127b3){const _0xa60108=_0x5b85,_0x2bd008={'XOZRY':function(_0x301531,_0x2c7666,_0x2deb4d){return _0x301531(_0x2c7666,_0x2deb4d);}};return _0x2bd008['XOZRY'](join,getEnvDir(_0x3127b3),_0xa60108(0xee));}export async function loadSettings(_0x462bc0){const _0x35469e=_0x5b85,_0x4c8f01={'eBsvH':function(_0x1aba08,_0x2f94db){return _0x1aba08(_0x2f94db);},'HadjV':function(_0xa50166,_0x37c507,_0x336cb3){return _0xa50166(_0x37c507,_0x336cb3);}},_0x20dfcb=_0x4c8f01[_0x35469e(0xd3)](getSettingsPath,_0x462bc0);if(!existsSync(_0x20dfcb))return{};try{const _0x1aeef3=await _0x4c8f01[_0x35469e(0xa9)](readFile,_0x20dfcb,'utf-8');return JSON[_0x35469e(0xe2)](_0x1aeef3);}catch{return{};}}export async function saveSettings(_0x3190ff,_0x112e26){const _0x4e52a8=_0x5b85,_0x279304={'TazEk':function(_0x181168,_0x5e5a27){return _0x181168(_0x5e5a27);},'sHFmC':function(_0x176ee8,_0xd3c94e){return _0x176ee8(_0xd3c94e);},'PzgYE':function(_0x1f9ee3,_0x3b5775,_0x51270f){return _0x1f9ee3(_0x3b5775,_0x51270f);}},_0x135a64=_0x279304[_0x4e52a8(0xe0)](getSettingsPath,_0x3190ff),_0x4d712d=_0x279304['sHFmC'](dirname,_0x135a64);!_0x279304[_0x4e52a8(0xe0)](existsSync,_0x4d712d)&&await mkdir(_0x4d712d,{'recursive':!![]}),await _0x279304[_0x4e52a8(0xd8)](writeFile,_0x135a64,JSON[_0x4e52a8(0xc0)](_0x112e26,null,0x2));}export function resolveEnvVars(_0x1652df){const _0x53824d=_0x5b85,_0x283042={'NxJYV':function(_0x418264,_0x2a3ca5){return _0x418264===_0x2a3ca5;}};if(typeof _0x1652df===_0x53824d(0xec))return _0x1652df[_0x53824d(0xda)](/\$\{(\w+)\}/g,(_0x1fddeb,_0xb13f2e)=>{const _0x342c6e=_0x53824d,_0x43b41a=process['env'][_0xb13f2e];if(_0x43b41a===undefined)throw new Error(_0x342c6e(0xb8)+_0xb13f2e+_0x342c6e(0xa5));return _0x43b41a;});if(Array['isArray'](_0x1652df))return _0x1652df[_0x53824d(0x100)](resolveEnvVars);if(_0x1652df&&_0x283042['NxJYV'](typeof _0x1652df,_0x53824d(0xe1)))return Object[_0x53824d(0xe4)](Object['entries'](_0x1652df)['map'](([_0x2249f9,_0x3a9398])=>[_0x2249f9,resolveEnvVars(_0x3a9398)]));return _0x1652df;}const isRecord=_0x40c0ac=>typeof _0x40c0ac===_0x5b1811(0xe1)&&_0x40c0ac!==null&&!Array[_0x5b1811(0xdd)](_0x40c0ac),asRecord=_0x2fe945=>isRecord(_0x2fe945)?_0x2fe945:undefined,mergeHeaders=(_0x61e654,_0x5e4b65)=>{const _0x2f07f5=_0x5b1811,_0x153403={'yGrIv':function(_0xf81df3,_0x5b69e8){return _0xf81df3??_0x5b69e8;}},_0x5631cd={..._0x153403['yGrIv'](_0x61e654,{}),..._0x153403[_0x2f07f5(0xa8)](_0x5e4b65,{})};return Object['keys'](_0x5631cd)['length']?_0x5631cd:undefined;},SAFE_MODE_ARGS=[_0x5b1811(0x9d)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x5b1811(0xd0)];export function buildBrowserOptionsFromSettings(_0x50c783,_0x4c0016={}){const _0x1f787d=_0x5b1811,_0x2ceb4d={'fNgor':function(_0x3973ea,_0x199d95){return _0x3973ea===_0x199d95;},'QakIb':function(_0x5e49f9,_0x19dd6b){return _0x5e49f9(_0x19dd6b);},'VzPsr':_0x1f787d(0xec),'vyMJd':function(_0x4ee846,_0x59ccc6,_0x3f0cbe){return _0x4ee846(_0x59ccc6,_0x3f0cbe);}},_0xabee43=asRecord(_0x50c783['browser']),_0x39b23c={...asRecord(_0xabee43?.['launchOptions'])??{}};_0x2ceb4d[_0x1f787d(0xc6)](typeof _0x4c0016[_0x1f787d(0xef)],_0x1f787d(0xb3))&&(_0x39b23c[_0x1f787d(0xef)]=_0x4c0016['headless']);if(_0x50c783[_0x1f787d(0xd1)]){const _0x4ae669=_0x39b23c[_0x1f787d(0xc8)]??[],_0x591c9d=SAFE_MODE_ARGS[_0x1f787d(0xd7)](_0x560ce0=>!_0x4ae669['includes'](_0x560ce0));_0x39b23c['args']=[..._0x4ae669,..._0x591c9d];}if(_0x50c783[_0x1f787d(0xfa)]){const _0x3a5eca=_0x39b23c['args']??[],_0x4fdcf7=ALLOW_LOCALHOST_ARGS['filter'](_0x306fa0=>!_0x3a5eca[_0x1f787d(0xb9)](_0x306fa0));_0x39b23c['args']=[..._0x3a5eca,..._0x4fdcf7];}const _0xf98ae8={..._0x2ceb4d['QakIb'](asRecord,_0xabee43?.[_0x1f787d(0xa1)])??{}};_0xf98ae8['ignoreHTTPSErrors']=!![];typeof _0x50c783['userAgent']===_0x2ceb4d['VzPsr']&&(_0xf98ae8[_0x1f787d(0x103)]=_0x50c783[_0x1f787d(0x103)]);const _0x1fff6b=_0x2ceb4d['vyMJd'](mergeHeaders,asRecord(_0xf98ae8[_0x1f787d(0xfc)]),asRecord(_0x50c783[_0x1f787d(0xa3)]));return _0x1fff6b?_0xf98ae8[_0x1f787d(0xfc)]=_0x1fff6b:delete _0xf98ae8['extraHTTPHeaders'],_0x4c0016[_0x1f787d(0xaf)]&&(_0xf98ae8['storageState']=_0x4c0016['storageStatePath']),{'launchOptions':_0x39b23c,'contextOptions':_0xf98ae8};}async function resolveLocalAuthPath(_0xd26ab){const _0x3f45c5=_0x5b1811,_0x3b35ef={'mdBfy':_0x3f45c5(0xac),'ncrzP':'auth.json','coblY':function(_0x446c94,_0x2cbcca){return _0x446c94(_0x2cbcca);},'xQPzk':function(_0xdc0c37,_0x27d5d3){return _0xdc0c37(_0x27d5d3);},'PFFWI':function(_0x2491f3,_0x1af6c0){return _0x2491f3(_0x1af6c0);}},_0x20ee11=join(_0xd26ab,_0x3b35ef['mdBfy']),_0x3a0e48=join(_0xd26ab,_0x3b35ef['ncrzP']);if(_0x3b35ef[_0x3f45c5(0xb6)](existsSync,_0x20ee11))try{const _0x685709=await getToken();if(!_0x685709)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x36ae1a=await _0x3b35ef[_0x3f45c5(0xed)](readFile,_0x20ee11),_0x122ae5=decrypt(_0x36ae1a,_0x685709),_0x3473eb=join(tmpdir(),_0x3f45c5(0xc1)+Date[_0x3f45c5(0xbf)]()+'.json');return await writeFile(_0x3473eb,_0x122ae5),{'storageStatePath':_0x3473eb,'tempAuthPath':_0x3473eb};}catch(_0x435daa){const _0x116b55=_0x435daa instanceof Error?_0x435daa['message']:String(_0x435daa);throw new Error(_0x3f45c5(0x9e)+_0x116b55);}if(_0x3b35ef[_0x3f45c5(0xb1)](existsSync,_0x3a0e48))return{'storageStatePath':_0x3a0e48};return{};}export async function buildPlaywrightConfig(_0x2f20e5,_0x2208a6,_0xf37d6f,_0x451f8a,_0x486fee){const _0x44b095=_0x5b1811,_0x3f393b={'BOvoV':function(_0xcec985,_0x30f471,_0x544838,_0x44cd95,_0x1bec39,_0x3f8c4,_0x1dfd0d){return _0xcec985(_0x30f471,_0x544838,_0x44cd95,_0x1bec39,_0x3f8c4,_0x1dfd0d);},'FAXvb':function(_0x2b1f80,_0x290312){return _0x2b1f80(_0x290312);}};if(_0x486fee)return _0x3f393b[_0x44b095(0xf9)](buildPlaywrightConfigCore,_0x2f20e5,_0x486fee,_0x2208a6,_0xf37d6f,_0x451f8a,'stagehand');const {storageStatePath:_0x18e263,tempAuthPath:_0x4b7a64}=await _0x3f393b['FAXvb'](resolveLocalAuthPath,getEnvDir(_0x2208a6));try{const _0x150df8=await buildPlaywrightConfigCore(_0x2f20e5,_0x18e263,_0x2208a6,_0xf37d6f,_0x451f8a,_0x44b095(0xf5));return{..._0x150df8,'tempAuthPath':_0x4b7a64};}catch(_0x5d8e25){_0x4b7a64&&await _0x3f393b[_0x44b095(0xeb)](unlink,_0x4b7a64)['catch'](()=>{});throw _0x5d8e25;}}export async function buildPlaywrightConfigCore(_0x5a86c6,_0x1314bc,_0x383e77,_0x5ba1c8,_0x4d2204,_0x1e82ae='stagehand'){const _0x150a39=_0x5b1811,_0x2568fc={'UUDuM':'--disable-setuid-sandbox','Ffwov':function(_0x132f47){return _0x132f47();},'swMFH':function(_0x46024b,_0x917061){return _0x46024b(_0x917061);},'Bejxm':_0x150a39(0xad),'cyMBi':_0x150a39(0xbb),'OXxHp':_0x150a39(0xfb),'lfMGI':'pdf','BtjHh':'vision','yXwrM':function(_0x1ae106,_0x4aa112,_0xc4864e){return _0x1ae106(_0x4aa112,_0xc4864e);},'QLdEa':function(_0x1e3e42,_0xb50496){return _0x1e3e42===_0xb50496;},'rNVNh':'playwright-cli','zOuvv':'-cli'},_0x4d3341=_0x5ba1c8||_0x2568fc[_0x150a39(0xbc)](randomUUID),_0x8751ff=join(_0x2568fc[_0x150a39(0xbc)](getRangerDir),'sessions',_0x4d3341),_0x264648=_0x2568fc[_0x150a39(0xaa)](Boolean,_0x5a86c6[_0x150a39(0xbd)]),_0x25c21a=_0x264648?{'browserName':_0x2568fc[_0x150a39(0xba)],'cdpEndpoint':_0x5a86c6[_0x150a39(0xbd)]}:((()=>{const _0x1b0698=_0x150a39,{launchOptions:_0x4b3465,contextOptions:_0x5b1e03}=buildBrowserOptionsFromSettings(_0x5a86c6,{'headless':_0x4d2204?![]:_0x5a86c6['headless']??!![],'storageStatePath':_0x1314bc});if(process['getuid']?.()===0x0){const _0x155e28=['--no-sandbox',_0x2568fc['UUDuM']],_0x465f3b=_0x4b3465['args']??[],_0x5dcc50=_0x155e28[_0x1b0698(0xd7)](_0x2b4d66=>!_0x465f3b[_0x1b0698(0xb9)](_0x2b4d66));_0x4b3465[_0x1b0698(0xc8)]=[..._0x465f3b,..._0x5dcc50];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x4b3465,'contextOptions':{..._0x5b1e03,'permissions':['clipboard-read',_0x1b0698(0xf1)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x12fdbb=_0x1e82ae==='playwright-cli'?{'browser':_0x25c21a,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x8751ff,'outputMode':_0x2568fc[_0x150a39(0xd6)],'codegen':_0x150a39(0xb5)}:{'name':_0x383e77,'browser':_0x25c21a,'capabilities':['core',_0x2568fc['OXxHp'],_0x150a39(0xa0),_0x2568fc[_0x150a39(0xc9)],_0x2568fc[_0x150a39(0xb7)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x8751ff};if(!_0x264648){const _0x52151d=_0x12fdbb[_0x150a39(0xe5)],_0x3e785a=_0x52151d[_0x150a39(0xa1)];if(_0x3e785a['userAgent']===undefined)delete _0x3e785a[_0x150a39(0x103)];if(_0x3e785a['storageState']===undefined)delete _0x3e785a['storageState'];}const _0x53a5c9=join(tmpdir(),'ranger-config');!_0x2568fc[_0x150a39(0xaa)](existsSync,_0x53a5c9)&&await _0x2568fc['yXwrM'](mkdir,_0x53a5c9,{'recursive':!![]});const _0x1a6d5b=_0x2568fc['QLdEa'](_0x1e82ae,_0x2568fc['rNVNh'])?_0x2568fc['zOuvv']:'',_0x4c8ec8=join(_0x53a5c9,_0x383e77+'-'+Date['now']()+_0x1a6d5b+_0x150a39(0xe8));return await writeFile(_0x4c8ec8,JSON['stringify'](_0x12fdbb,null,0x2)),{'configPath':_0x4c8ec8};}export async function buildPlaywrightCliConfig(_0x130460,_0x375735,_0x39f763,_0x526318,_0x2868c4){const _0x235e22={'XZuYK':function(_0x3f756d,_0x1a95e7){return _0x3f756d(_0x1a95e7);},'gliAD':function(_0x2cf545,_0x2ffabb,_0xf19aa,_0x510363,_0x4df87d,_0x1329f6,_0x4b345e){return _0x2cf545(_0x2ffabb,_0xf19aa,_0x510363,_0x4df87d,_0x1329f6,_0x4b345e);},'skUvA':function(_0x43f072,_0x51d22c){return _0x43f072(_0x51d22c);}};if(_0x2868c4)return buildPlaywrightConfigCore(_0x130460,_0x2868c4,_0x375735,_0x39f763,_0x526318,'playwright-cli');const {storageStatePath:_0x4f5fc4,tempAuthPath:_0x40cdef}=await _0x235e22['XZuYK'](resolveLocalAuthPath,getEnvDir(_0x375735));try{const _0x11366f=await _0x235e22['gliAD'](buildPlaywrightConfigCore,_0x130460,_0x4f5fc4,_0x375735,_0x39f763,_0x526318,'playwright-cli');return{..._0x11366f,'tempAuthPath':_0x40cdef};}catch(_0x4a098f){_0x40cdef&&await _0x235e22['skUvA'](unlink,_0x40cdef)['catch'](()=>{});throw _0x4a098f;}}export function getNestedValue(_0x3099d6,_0x1ac030){const _0x2221be=_0x5b1811,_0x30cd36={'KPjeE':function(_0x4bfdb8,_0x105f84){return _0x4bfdb8(_0x105f84);},'kzaKt':function(_0x147197,_0x5946b5){return _0x147197===_0x5946b5;},'zrydz':function(_0x273d86,_0x1573c0){return _0x273d86!==_0x1573c0;}},_0x1e6f3c=_0x30cd36['KPjeE'](parseKeyPath,_0x1ac030);let _0xe74650=_0x3099d6;for(const _0x3ea99a of _0x1e6f3c){if(_0xe74650===null||_0x30cd36['kzaKt'](_0xe74650,undefined)||_0x30cd36[_0x2221be(0xe6)](typeof _0xe74650,_0x2221be(0xe1)))return undefined;_0xe74650=_0xe74650[_0x3ea99a];}return _0xe74650;}function _0x5b1f(){const _0x22370b=['gmLZC','ENOENT','map','join','rZLwF','userAgent','path','\x22\x20to\x20legacy\x20path\x20','--disable-features=WebBluetooth','Failed\x20to\x20decrypt\x20auth\x20state:\x20','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','install','contextOptions','vHina','headers','length','\x20is\x20not\x20set','yaTdC','MNdHq','yGrIv','HadjV','swMFH','setupHeader','auth.json.enc','chromium','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','storageStatePath','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','PFFWI','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','boolean','592ZhJfBU','none','coblY','BtjHh','Environment\x20variable\x20','includes','Bejxm','file','Ffwov','cdpEndpoint','location','now','stringify','ranger-auth-','649920fOfmIE','repeat','32375nSPSxh','endsWith','fNgor','373068eWufEP','args','lfMGI','NBrFM','entries','all','local','467298EZrQzO','nHWLh','--allow-insecure-localhost','safeMode','UjWHS','eBsvH','wtxCo','bQeBw','cyMBi','filter','PzgYE','rangerDir','replace','aqTiU','ZAqJG','isArray','fqchB','1467784RKhFlQ','TazEk','object','parse','yuwrC','fromEntries','browser','zrydz','legacy','.json','141242CZPGIV','678qGiEOS','FAXvb','string','xQPzk','settings.json','headless','5570HuExZz','clipboard-write','JjfZJ','MRiyn','XBpGl','stagehand','tXDhe','mwDbz','push','BOvoV','allowInsecureLocalhost','tabs','extraHTTPHeaders','forWrite'];_0x5b1f=function(){return _0x22370b;};return _0x5b1f();}export function setNestedValue(_0x1bda3f,_0xf271a1,_0x421b77){const _0x357e71=_0x5b1811,_0x40223a={'qkJTd':_0x357e71(0xe1),'eURtT':function(_0x599826,_0x3a3caa){return _0x599826-_0x3a3caa;}},_0x10c6e1=parseKeyPath(_0xf271a1);let _0x5b4fce=_0x1bda3f;for(let _0x50ce53=0x0;_0x50ce53<_0x10c6e1[_0x357e71(0xa4)]-0x1;_0x50ce53++){const _0x3ebe6c=_0x10c6e1[_0x50ce53];(!(_0x3ebe6c in _0x5b4fce)||typeof _0x5b4fce[_0x3ebe6c]!==_0x40223a['qkJTd'])&&(_0x5b4fce[_0x3ebe6c]={}),_0x5b4fce=_0x5b4fce[_0x3ebe6c];}_0x5b4fce[_0x10c6e1[_0x40223a['eURtT'](_0x10c6e1[_0x357e71(0xa4)],0x1)]]=_0x421b77;}export function deleteNestedValue(_0x72d5aa,_0xf34f84){const _0x55ca33=_0x5b1811,_0x2f171e={'vOXsb':function(_0x262ed5,_0x1f2b20){return _0x262ed5<_0x1f2b20;},'aqTiU':function(_0x1f44eb,_0x3d365b){return _0x1f44eb!==_0x3d365b;},'OKwIP':function(_0x289cd4,_0x1aec46){return _0x289cd4!==_0x1aec46;},'tXDhe':function(_0xcc480e,_0x37572f){return _0xcc480e in _0x37572f;}},_0x566979=parseKeyPath(_0xf34f84);let _0x30c04d=_0x72d5aa;for(let _0x3693b3=0x0;_0x2f171e['vOXsb'](_0x3693b3,_0x566979[_0x55ca33(0xa4)]-0x1);_0x3693b3++){if(_0x30c04d===null||_0x30c04d===undefined||_0x2f171e[_0x55ca33(0xdb)](typeof _0x30c04d,'object'))return![];_0x30c04d=_0x30c04d[_0x566979[_0x3693b3]];}if(_0x30c04d===null||_0x30c04d===undefined||_0x2f171e['OKwIP'](typeof _0x30c04d,'object'))return![];const _0x28389d=_0x566979[_0x566979[_0x55ca33(0xa4)]-0x1];if(_0x2f171e[_0x55ca33(0xf6)](_0x28389d,_0x30c04d))return delete _0x30c04d[_0x28389d],!![];return![];}function parseKeyPath(_0x9c4421){const _0x1efb33=_0x5b1811,_0x20aeb9={'yaTdC':function(_0x2cf9f1,_0x3fb9bb){return _0x2cf9f1===_0x3fb9bb;},'ZAqJG':_0x1efb33(0xa3),'yuwrC':'setupHeaders'},_0x366b9f=_0x9c4421['split']('.');return _0x20aeb9[_0x1efb33(0xa6)](_0x366b9f[0x0],'header')&&(_0x366b9f[0x0]=_0x20aeb9[_0x1efb33(0xdc)]),_0x366b9f[0x0]===_0x1efb33(0xab)&&(_0x366b9f[0x0]=_0x20aeb9[_0x1efb33(0xe3)]),_0x366b9f;}export function formatSettings(_0x255732,_0x57d276=0x0){const _0x39fc2b=_0x5b1811,_0x14962a={'SnGMz':function(_0x415a18,_0x551723){return _0x415a18===_0x551723;}},_0x1f865e=[],_0x3d1e03='\x20\x20'[_0x39fc2b(0xc3)](_0x57d276);for(const [_0x19c4df,_0xae3af8]of Object[_0x39fc2b(0xcb)](_0x255732)){if(_0x14962a['SnGMz'](_0xae3af8,undefined))continue;if(typeof _0xae3af8==='object'&&_0xae3af8!==null){_0x1f865e[_0x39fc2b(0xf8)](''+_0x3d1e03+_0x19c4df+':');for(const [_0x58adba,_0x1ec6a1]of Object['entries'](_0xae3af8)){_0x1f865e['push'](_0x3d1e03+'\x20\x20'+_0x58adba+':\x20'+_0x1ec6a1);}}else _0x1f865e[_0x39fc2b(0xf8)](''+_0x3d1e03+_0x19c4df+':\x20'+_0xae3af8);}return _0x1f865e[_0x39fc2b(0x101)]('\x0a');}
1
+ const _0x554c9f=_0x3f79;(function(_0x516fd9,_0x5c8a35){const _0x103fc4=_0x3f79,_0x5e8021=_0x516fd9();while(!![]){try{const _0x458fa7=parseInt(_0x103fc4(0x1ca))/0x1+parseInt(_0x103fc4(0x1aa))/0x2+parseInt(_0x103fc4(0x17f))/0x3+-parseInt(_0x103fc4(0x19a))/0x4+parseInt(_0x103fc4(0x198))/0x5+-parseInt(_0x103fc4(0x1a4))/0x6*(-parseInt(_0x103fc4(0x17a))/0x7)+parseInt(_0x103fc4(0x1bc))/0x8*(-parseInt(_0x103fc4(0x19b))/0x9);if(_0x458fa7===_0x5c8a35)break;else _0x5e8021['push'](_0x5e8021['shift']());}catch(_0x12dbf8){_0x5e8021['push'](_0x5e8021['shift']());}}}(_0x14ae,0x5330f));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x14ae(){const _0xd75efe=['string','icDRj','169631LFjmAg','join','yDImM','fhhKi','--no-sandbox','MAzHU','doQtu','KftFd','length','fcsuq','CldXj','cdpEndpoint','yskQT','stringify','ZwKGI','Pniep','mKKUs','boolean','path','message','args','entries','aceKE','--disable-setuid-sandbox','YOJyQ','replace','settings.json','TikFp','ijUXA','XCEth','7UOfOdJ','env','Default','tEqsm','CStAk','88986VTbGEv','Environment\x20variable\x20','ranger-config','TjPAm','FMJXC','QUaXX','fromEntries','allowInsecureLocalhost','extraHTTPHeaders','EzcMJ','storageStatePath','SgvQn','--disable-web-security','includes','userAgent','locations','legacy','BOSMV','file','rangerDir','auth.json','configPath','local','SyOtL','contextOptions','2573380FBTtwx','sessions','2079124EIOSwl','9bAkpWt','safeMode','hmBiS','smOSl','PwjNg','BAhsP','headers','LdKQg','push','4043172SAhthC','now','rXQdN','zPWrL','startsWith','Refusing\x20to\x20write\x20profile\x20\x22','345146gqlydW','GQAeK','pvDWj','location','VPZtu','playwright-cli','EXBPK','forWrite','filter','storageState','setupHeaders','--allow-insecure-localhost','ENOENT','guQiQ','luZFc','rwQCa','object','cwZup','5598976VVgKoJ','browser','headless','baseUrl','nova-user-data','--allow-running-insecure-content','clipboard-write','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','catch','KtReA','plUkT','allow'];_0x14ae=function(){return _0xd75efe;};return _0x14ae();}import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x2b73a4,_0x251e5c){const _0x1f4d52=_0x3f79,_0x320318={'TjPAm':function(_0x1eeb37,_0xc04ef2,_0x295f17){return _0x1eeb37(_0xc04ef2,_0x295f17);},'Pniep':function(_0x556ebe,_0x1d493e,_0x356b79){return _0x556ebe(_0x1d493e,_0x356b79);},'GQAeK':function(_0x4d0596,_0x3cece5){return _0x4d0596(_0x3cece5);},'KftFd':function(_0x18c7f6,_0xe75291){return _0x18c7f6!==_0xe75291;}},_0x47a39b=join(_0x251e5c,'ci',_0x2b73a4),_0x4897dc=join(_0x251e5c,'local',_0x2b73a4),_0x5a2f2d=_0x320318[_0x1f4d52(0x182)](join,_0x251e5c,_0x2b73a4),_0x5f0ee3=join(_0x251e5c,_0x1f4d52(0x195)),_0x3b9c50=_0x320318[_0x1f4d52(0x1d9)](join,_0x251e5c,'ci');if(_0x320318['GQAeK'](existsSync,_0x47a39b))return _0x47a39b;if(_0x320318[_0x1f4d52(0x1ab)](existsSync,_0x4897dc))return _0x4897dc;if(existsSync(_0x5a2f2d)&&(_0x5a2f2d!==_0x5f0ee3&&_0x320318[_0x1f4d52(0x1d1)](_0x5a2f2d,_0x3b9c50)?!![]:hasLegacyProfileFiles(_0x5a2f2d)))return _0x5a2f2d;return null;}export function getEnvDir(_0x3750de,_0x6d3efa={}){const _0x3ca41c=_0x3f79,_0x391c69={'icDRj':function(_0x135cac){return _0x135cac();},'BZAQB':function(_0x384db7,_0xef3a52){return _0x384db7(_0xef3a52);},'enSvv':function(_0x45567d,_0x5d7be2,_0x20b3f5){return _0x45567d(_0x5d7be2,_0x20b3f5);},'ghiqT':function(_0x3fa760,_0x581384,_0x2a7b8a){return _0x3fa760(_0x581384,_0x2a7b8a);}},_0x53bcb7=_0x391c69[_0x3ca41c(0x1c9)](getRangerDir),_0x4c507b=findEnvInRoot(_0x3750de,_0x53bcb7);if(_0x4c507b){if(_0x6d3efa['forWrite']&&_0x391c69['BZAQB'](isLegacyEnvPath,_0x4c507b))throw legacyWriteError(_0x3750de,_0x4c507b);return _0x4c507b;}const _0x2a9415=getRangerHomeDir();if(_0x2a9415!==_0x53bcb7){const _0xd4dd64=_0x391c69['enSvv'](findEnvInRoot,_0x3750de,_0x2a9415);if(_0xd4dd64){if(_0x6d3efa[_0x3ca41c(0x1b1)]&&isLegacyEnvPath(_0xd4dd64))throw _0x391c69['ghiqT'](legacyWriteError,_0x3750de,_0xd4dd64);return _0xd4dd64;}}const _0x53f786=join(_0x2a9415,'local',_0x3750de);if(_0x6d3efa[_0x3ca41c(0x1b1)])throw legacyWriteError(_0x3750de,_0x53f786);return _0x53f786;}function isLegacyEnvPath(_0x24f448){const _0x48ce1a=_0x3f79,_0x1638a4={'oFxZZ':function(_0x2ad0e6,_0x1c44c1){return _0x2ad0e6+_0x1c44c1;},'VPZtu':function(_0x4ffe1f,_0x48cc61){return _0x4ffe1f===_0x48cc61;}},_0x5a3e7d=getRangerDir(),_0x23b1c9=getRangerHomeDir();for(const _0x3d33ea of new Set([_0x5a3e7d,_0x23b1c9])){const _0x54634e=_0x3d33ea['endsWith']('/')?_0x3d33ea:_0x1638a4['oFxZZ'](_0x3d33ea,'/');if(_0x1638a4[_0x48ce1a(0x1ae)](_0x24f448,_0x3d33ea)||_0x24f448[_0x48ce1a(0x1a8)](_0x54634e))return!![];}return![];}function legacyWriteError(_0xceadff,_0x36f4ac){const _0x3ef170=_0x3f79,_0x49dbc4={'Pcuqq':function(_0x1bd721,_0x5742a5){return _0x1bd721+_0x5742a5;}};return new Error(_0x49dbc4['Pcuqq'](_0x3ef170(0x1a9)+_0xceadff+'\x22\x20to\x20legacy\x20path\x20'+_0x36f4ac+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x3a09e4,_0x1c31df){const _0x24af23=_0x3f79,_0x9df5b9={'fqQTT':function(_0x2a29f4){return _0x2a29f4();},'GaIXh':_0x24af23(0x195),'smOSl':function(_0x5cc738,_0x99d404,_0x35945d){return _0x5cc738(_0x99d404,_0x35945d);},'pvDWj':function(_0x504bf4,_0xb2c78d,_0x3d76c8){return _0x504bf4(_0xb2c78d,_0x3d76c8);},'nbdMi':function(_0xfecb1b,_0x2e13dd){return _0xfecb1b(_0x2e13dd);},'tEqsm':'legacy','FMJXC':function(_0x1c7d8f,_0x540c8f){return _0x1c7d8f===_0x540c8f;}},_0x3b94d3=_0x1c31df?.[_0x24af23(0x192)],_0x45a71a=_0x3b94d3?[_0x3b94d3]:[getRangerDir(),_0x9df5b9['fqQTT'](getRangerHomeDir)][_0x24af23(0x1b2)]((_0x3fea21,_0x3565fd,_0x27073a)=>_0x27073a['indexOf'](_0x3fea21)===_0x3565fd),_0x3d2c4e=_0x1c31df?.[_0x24af23(0x18e)]??['ci','local',_0x24af23(0x18f)];for(const _0x21789f of _0x45a71a){const _0x236bf2=join(_0x21789f,_0x9df5b9['GaIXh']),_0x2230d0=_0x9df5b9[_0x24af23(0x19e)](join,_0x21789f,'ci'),_0xfd2227=[{'location':'ci','path':join(_0x21789f,'ci',_0x3a09e4)},{'location':'local','path':join(_0x21789f,_0x24af23(0x195),_0x3a09e4)},{'location':'legacy','path':_0x9df5b9[_0x24af23(0x1ac)](join,_0x21789f,_0x3a09e4)}];for(const _0x1198eb of _0xfd2227){if(_0x3d2c4e[_0x24af23(0x18c)](_0x1198eb[_0x24af23(0x1ad)])&&_0x9df5b9['nbdMi'](existsSync,_0x1198eb['path'])){if(_0x1198eb['location']===_0x9df5b9[_0x24af23(0x17d)]&&(_0x9df5b9[_0x24af23(0x183)](_0x1198eb['path'],_0x236bf2)||_0x9df5b9['FMJXC'](_0x1198eb[_0x24af23(0x1dc)],_0x2230d0))&&!hasLegacyProfileFiles(_0x1198eb['path']))continue;return{'path':_0x1198eb[_0x24af23(0x1dc)],'location':_0x1198eb[_0x24af23(0x1ad)]};}}}return null;}function hasLegacyProfileFiles(_0x157bbb){const _0x14a359=_0x3f79,_0x735718={'rwQCa':function(_0x5b3223,_0x5e07bd,_0x5a0176){return _0x5b3223(_0x5e07bd,_0x5a0176);}};return existsSync(join(_0x157bbb,'settings.json'))||existsSync(join(_0x157bbb,_0x14a359(0x193)))||existsSync(_0x735718[_0x14a359(0x1b9)](join,_0x157bbb,'auth.json.enc'));}export function isEnvCi(_0x58c881){const _0x5102a3=_0x3f79,_0x35d864={'XCEth':function(_0x168280,_0x4557ed){return _0x168280(_0x4557ed);},'cHOst':function(_0x1a2e64){return _0x1a2e64();},'gkrqm':function(_0x56aa51,_0x117f3e){return _0x56aa51!==_0x117f3e;},'ZKiUd':function(_0x280de9){return _0x280de9();}};if(_0x35d864[_0x5102a3(0x179)](existsSync,join(getRangerDir(),'ci',_0x58c881)))return!![];const _0x4f7f57=_0x35d864['cHOst'](getRangerHomeDir);if(_0x35d864['gkrqm'](_0x4f7f57,_0x35d864['ZKiUd'](getRangerDir))&&existsSync(join(_0x4f7f57,'ci',_0x58c881)))return!![];return![];}export async function cleanupTempFiles(_0x470ad4){const _0x1d4241=_0x3f79,_0x57181e=[_0x470ad4['tempAuthPath'],_0x470ad4[_0x1d4241(0x194)]]['filter'](Boolean);await Promise['all'](_0x57181e['map'](_0x2a28cc=>unlink(_0x2a28cc)[_0x1d4241(0x1c4)](_0x45f273=>{const _0x36bb6c=_0x1d4241;_0x45f273['code']!==_0x36bb6c(0x1b6)&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x2a28cc+':',_0x45f273['message']);})));}export function getSettingsPath(_0x55935a){const _0x1a2258=_0x3f79,_0x360eac={'tJgvp':function(_0x4d7bcb,_0x29f318,_0x2efa5e){return _0x4d7bcb(_0x29f318,_0x2efa5e);},'dOJOD':function(_0x50c76,_0x196fe8){return _0x50c76(_0x196fe8);}};return _0x360eac['tJgvp'](join,_0x360eac['dOJOD'](getEnvDir,_0x55935a),_0x1a2258(0x1e4));}export async function loadSettings(_0x305e4a){const _0x42e7df=_0x3f79,_0x383b59={'CldXj':function(_0x4459af,_0x52deeb){return _0x4459af(_0x52deeb);}},_0x136da5=getSettingsPath(_0x305e4a);if(!_0x383b59[_0x42e7df(0x1d4)](existsSync,_0x136da5))return{};try{const _0xac9e38=await readFile(_0x136da5,'utf-8');return JSON['parse'](_0xac9e38);}catch{return{};}}export async function saveSettings(_0x1886e5,_0x511e0d){const _0x3ca22e=_0x3f79,_0x326a50={'PwjNg':function(_0x1deb67,_0x986cf8){return _0x1deb67(_0x986cf8);},'ijUXA':function(_0x4429e9,_0x44ee39,_0x48feac){return _0x4429e9(_0x44ee39,_0x48feac);}},_0x5ba327=_0x326a50['PwjNg'](getSettingsPath,_0x1886e5),_0x1ceac2=dirname(_0x5ba327);!_0x326a50[_0x3ca22e(0x19f)](existsSync,_0x1ceac2)&&await _0x326a50[_0x3ca22e(0x178)](mkdir,_0x1ceac2,{'recursive':!![]}),await writeFile(_0x5ba327,JSON[_0x3ca22e(0x1d7)](_0x511e0d,null,0x2));}export function resolveEnvVars(_0x7ad348){const _0x206ffb=_0x3f79,_0x394575={'BAhsP':function(_0x5df3cf,_0x2de831){return _0x5df3cf===_0x2de831;},'yDImM':_0x206ffb(0x1ba)};if(typeof _0x7ad348===_0x206ffb(0x1c8))return _0x7ad348[_0x206ffb(0x1e3)](/\$\{(\w+)\}/g,(_0x48d26e,_0x27ca5e)=>{const _0x234e9c=_0x206ffb,_0x115cb7=process[_0x234e9c(0x17b)][_0x27ca5e];if(_0x394575[_0x234e9c(0x1a0)](_0x115cb7,undefined))throw new Error(_0x234e9c(0x180)+_0x27ca5e+'\x20is\x20not\x20set');return _0x115cb7;});if(Array['isArray'](_0x7ad348))return _0x7ad348['map'](resolveEnvVars);if(_0x7ad348&&_0x394575['BAhsP'](typeof _0x7ad348,_0x394575[_0x206ffb(0x1cc)]))return Object[_0x206ffb(0x185)](Object['entries'](_0x7ad348)['map'](([_0x1eac86,_0x5d87cf])=>[_0x1eac86,resolveEnvVars(_0x5d87cf)]));return _0x7ad348;}const isRecord=_0x2bb659=>typeof _0x2bb659==='object'&&_0x2bb659!==null&&!Array['isArray'](_0x2bb659),asRecord=_0x38a50d=>isRecord(_0x38a50d)?_0x38a50d:undefined,mergeHeaders=(_0x49c7cd,_0x51502b)=>{const _0x370b56=_0x3f79,_0x52d7e7={'EzcMJ':function(_0x5bee22,_0x38a320){return _0x5bee22??_0x38a320;}},_0x1e9569={..._0x52d7e7[_0x370b56(0x188)](_0x49c7cd,{}),..._0x51502b??{}};return Object['keys'](_0x1e9569)[_0x370b56(0x1d2)]?_0x1e9569:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x554c9f(0x18b),_0x554c9f(0x1c1),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x554c9f(0x1b5)];export function buildBrowserOptionsFromSettings(_0x303939,_0x40209f={}){const _0x17e069=_0x554c9f,_0x5d18eb={'BOSMV':function(_0x580f21,_0x238032){return _0x580f21===_0x238032;},'COkOm':_0x17e069(0x1db),'cwZup':'string','fhhKi':function(_0x450221,_0x1f0e17){return _0x450221(_0x1f0e17);}},_0x153902=asRecord(_0x303939[_0x17e069(0x1bd)]),_0x2858b7={...asRecord(_0x153902?.['launchOptions'])??{}};_0x5d18eb[_0x17e069(0x190)](typeof _0x40209f[_0x17e069(0x1be)],_0x5d18eb['COkOm'])&&(_0x2858b7[_0x17e069(0x1be)]=_0x40209f[_0x17e069(0x1be)]);if(_0x303939['safeMode']){const _0xeb22ad=_0x2858b7['args']??[],_0x57159b=SAFE_MODE_ARGS['filter'](_0x5cceeb=>!_0xeb22ad['includes'](_0x5cceeb));_0x2858b7[_0x17e069(0x1de)]=[..._0xeb22ad,..._0x57159b];}if(_0x303939[_0x17e069(0x186)]){const _0x1ac9c6=_0x2858b7['args']??[],_0x5d5476=ALLOW_LOCALHOST_ARGS[_0x17e069(0x1b2)](_0x4f733c=>!_0x1ac9c6[_0x17e069(0x18c)](_0x4f733c));_0x2858b7['args']=[..._0x1ac9c6,..._0x5d5476];}const _0xcc959b={...asRecord(_0x153902?.[_0x17e069(0x197)])??{}};_0xcc959b['ignoreHTTPSErrors']=!![];typeof _0x303939['userAgent']===_0x5d18eb[_0x17e069(0x1bb)]&&(_0xcc959b['userAgent']=_0x303939[_0x17e069(0x18d)]);const _0x511c2e=mergeHeaders(_0x5d18eb[_0x17e069(0x1cd)](asRecord,_0xcc959b['extraHTTPHeaders']),asRecord(_0x303939['headers']));return _0x511c2e?_0xcc959b['extraHTTPHeaders']=_0x511c2e:delete _0xcc959b['extraHTTPHeaders'],_0x40209f[_0x17e069(0x189)]&&(_0xcc959b[_0x17e069(0x1b3)]=_0x40209f['storageStatePath']),{'launchOptions':_0x2858b7,'contextOptions':_0xcc959b};}function _0x3f79(_0x5c5bc2,_0xee93ef){_0x5c5bc2=_0x5c5bc2-0x177;const _0x14ae55=_0x14ae();let _0x3f79d4=_0x14ae55[_0x5c5bc2];return _0x3f79d4;}export async function resolveProfileStorageState(_0x2df6f0){const _0x1796fa={'smyEv':function(_0x1a8391,_0x2d084f){return _0x1a8391(_0x2d084f);}};return resolveLocalAuthPath(_0x1796fa['smyEv'](getEnvDir,_0x2df6f0));}async function resolveLocalAuthPath(_0x5945d1){const _0x4f55ad=_0x554c9f,_0x198a7d={'KtReA':function(_0x3a0606,_0x3451b1,_0x47b405){return _0x3a0606(_0x3451b1,_0x47b405);},'yskQT':function(_0x4afa3d){return _0x4afa3d();},'CStAk':_0x4f55ad(0x1c3),'rXQdN':function(_0x54c24e,_0x32e539,_0x5685f2){return _0x54c24e(_0x32e539,_0x5685f2);},'SyOtL':function(_0x22df20){return _0x22df20();}},_0x244f94=join(_0x5945d1,'auth.json.enc'),_0x14a6e8=_0x198a7d[_0x4f55ad(0x1c5)](join,_0x5945d1,'auth.json');if(existsSync(_0x244f94))try{const _0x2c98a6=await _0x198a7d[_0x4f55ad(0x1d6)](getToken);if(!_0x2c98a6)throw new Error(_0x198a7d[_0x4f55ad(0x17e)]);const _0x13854b=await readFile(_0x244f94),_0x655b91=decrypt(_0x13854b,_0x2c98a6),_0x3ba2b6=_0x198a7d[_0x4f55ad(0x1a6)](join,_0x198a7d[_0x4f55ad(0x196)](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x3ba2b6,_0x655b91),{'storageStatePath':_0x3ba2b6,'tempAuthPath':_0x3ba2b6};}catch(_0x2f2599){const _0x49f45d=_0x2f2599 instanceof Error?_0x2f2599[_0x4f55ad(0x1dd)]:String(_0x2f2599);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x49f45d);}if(existsSync(_0x14a6e8))return{'storageStatePath':_0x14a6e8};return{};}export async function buildPlaywrightConfig(_0x29b6b0,_0x3a5669,_0x501beb,_0x257160,_0x419755){const _0x8296e0=_0x554c9f,_0x20bce9={'JmsTm':'stagehand','BFBzE':function(_0x589d63,_0x151763){return _0x589d63(_0x151763);}};if(_0x419755)return buildPlaywrightConfigCore(_0x29b6b0,_0x419755,_0x3a5669,_0x501beb,_0x257160,_0x20bce9['JmsTm']);const {storageStatePath:_0x225446,tempAuthPath:_0x42240f}=await _0x20bce9['BFBzE'](resolveLocalAuthPath,getEnvDir(_0x3a5669));try{const _0x39ae6d=await buildPlaywrightConfigCore(_0x29b6b0,_0x225446,_0x3a5669,_0x501beb,_0x257160,'stagehand');return{..._0x39ae6d,'tempAuthPath':_0x42240f};}catch(_0x546bcf){_0x42240f&&await unlink(_0x42240f)[_0x8296e0(0x1c4)](()=>{});throw _0x546bcf;}}export async function buildPlaywrightConfigCore(_0x4a9689,_0x2ddb80,_0x46d2ad,_0x932fb7,_0x4be56c,_0x3f8606='stagehand'){const _0x5a3d80=_0x554c9f,_0xe71b44={'QVLSv':_0x5a3d80(0x1ce),'zPWrL':_0x5a3d80(0x1e1),'LdKQg':'clipboard-read','gDngU':_0x5a3d80(0x1c2),'auqcu':function(_0x1115d0){return _0x1115d0();},'MAzHU':function(_0x5b10a3,_0x5437f7,_0x222fb3,_0x56c4be){return _0x5b10a3(_0x5437f7,_0x222fb3,_0x56c4be);},'QUaXX':_0x5a3d80(0x199),'gnCoO':'chromium','EmVTh':function(_0x51ae88,_0x4e06e0){return _0x51ae88===_0x4e06e0;},'Mregm':'playwright-cli','ZwKGI':_0x5a3d80(0x191),'PnAtm':'core','plUkT':'vision','aceKE':function(_0x16ea05,_0x536b47,_0x2dd434){return _0x16ea05(_0x536b47,_0x2dd434);},'doQtu':_0x5a3d80(0x181),'NkVKh':function(_0x22e1a3,_0x25ae5d,_0x1a1d28){return _0x22e1a3(_0x25ae5d,_0x1a1d28);},'kVcVY':'-cli'},_0x4bb230=_0x932fb7||_0xe71b44['auqcu'](randomUUID),_0x5cc0e0=_0xe71b44[_0x5a3d80(0x1cf)](join,getRangerDir(),_0xe71b44[_0x5a3d80(0x184)],_0x4bb230),_0x4116fb=Boolean(_0x4a9689[_0x5a3d80(0x1d5)]),_0x10f3aa=_0x4116fb?{'browserName':_0xe71b44['gnCoO'],'cdpEndpoint':_0x4a9689['cdpEndpoint']}:((()=>{const _0x4f4d8c=_0x5a3d80,{launchOptions:_0x185a58,contextOptions:_0x396d5c}=buildBrowserOptionsFromSettings(_0x4a9689,{'headless':_0x4be56c?![]:_0x4a9689['headless']??!![],'storageStatePath':_0x2ddb80});if(process['getuid']?.()===0x0){const _0x1b2fa2=[_0xe71b44['QVLSv'],_0xe71b44[_0x4f4d8c(0x1a7)]],_0x3f999a=_0x185a58['args']??[],_0x538ed7=_0x1b2fa2[_0x4f4d8c(0x1b2)](_0x4eb84b=>!_0x3f999a[_0x4f4d8c(0x18c)](_0x4eb84b));_0x185a58[_0x4f4d8c(0x1de)]=[..._0x3f999a,..._0x538ed7];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x185a58,'contextOptions':{..._0x396d5c,'permissions':[_0xe71b44[_0x4f4d8c(0x1a2)],_0xe71b44['gDngU']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x54213=_0xe71b44['EmVTh'](_0x3f8606,_0xe71b44['Mregm'])?{'browser':_0x10f3aa,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5cc0e0,'outputMode':_0xe71b44[_0x5a3d80(0x1d8)],'codegen':'none'}:{'name':_0x46d2ad,'browser':_0x10f3aa,'capabilities':[_0xe71b44['PnAtm'],'tabs','install','pdf',_0xe71b44[_0x5a3d80(0x1c6)]],'imageResponses':_0x5a3d80(0x1c7),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5cc0e0};if(!_0x4116fb){const _0x7e41e3=_0x54213['browser'],_0x5588b8=_0x7e41e3['contextOptions'];if(_0x5588b8['userAgent']===undefined)delete _0x5588b8['userAgent'];if(_0x5588b8['storageState']===undefined)delete _0x5588b8[_0x5a3d80(0x1b3)];}const _0x8c2f9f=_0xe71b44[_0x5a3d80(0x1e0)](join,tmpdir(),_0xe71b44[_0x5a3d80(0x1d0)]);!existsSync(_0x8c2f9f)&&await _0xe71b44['NkVKh'](mkdir,_0x8c2f9f,{'recursive':!![]});const _0x42cb2b=_0x3f8606===_0x5a3d80(0x1af)?_0xe71b44['kVcVY']:'',_0x22667e=join(_0x8c2f9f,_0x46d2ad+'-'+Date[_0x5a3d80(0x1a5)]()+_0x42cb2b+'.json');return await _0xe71b44['NkVKh'](writeFile,_0x22667e,JSON['stringify'](_0x54213,null,0x2)),{'configPath':_0x22667e,'storageStatePath':_0x2ddb80};}export async function buildPlaywrightCliConfig(_0x4b5ff5,_0x2428b6,_0x183e0e,_0x7ca621,_0x316ab5){const _0x574da1=_0x554c9f,_0x342efc={'YOJyQ':_0x574da1(0x1af),'mKKUs':function(_0x4e60d9,_0x9c85df){return _0x4e60d9(_0x9c85df);},'JKwge':function(_0x22b493,_0x2af3d8,_0x24d2ac,_0x4013cd,_0x4c7256,_0x2429d8,_0x3db733){return _0x22b493(_0x2af3d8,_0x24d2ac,_0x4013cd,_0x4c7256,_0x2429d8,_0x3db733);}};if(_0x316ab5)return buildPlaywrightConfigCore(_0x4b5ff5,_0x316ab5,_0x2428b6,_0x183e0e,_0x7ca621,_0x342efc['YOJyQ']);const {storageStatePath:_0x3e3736,tempAuthPath:_0x306715}=await resolveLocalAuthPath(_0x342efc[_0x574da1(0x1da)](getEnvDir,_0x2428b6));try{const _0x1b6c09=await _0x342efc['JKwge'](buildPlaywrightConfigCore,_0x4b5ff5,_0x3e3736,_0x2428b6,_0x183e0e,_0x7ca621,_0x342efc[_0x574da1(0x1e2)]);return{..._0x1b6c09,'tempAuthPath':_0x306715};}catch(_0x2b2154){_0x306715&&await _0x342efc['mKKUs'](unlink,_0x306715)[_0x574da1(0x1c4)](()=>{});throw _0x2b2154;}}export async function buildNovaActCliConfig(_0x5c00d4,_0x1ab36b,_0x1c09b0,_0x22b971,_0x5e04ac){const _0x333150=_0x554c9f,_0x80d989={'TikFp':function(_0x448191,_0x3835b8){return _0x448191(_0x3835b8);},'MUIvD':function(_0x190e86){return _0x190e86();},'SgvQn':function(_0x40d3ea,_0x372626,_0x87fd2a,_0x57ba60){return _0x40d3ea(_0x372626,_0x87fd2a,_0x57ba60);},'VVaCx':'sessions','guQiQ':function(_0x4865af,_0xd7d6ec,_0x27eb3b){return _0x4865af(_0xd7d6ec,_0x27eb3b);},'EXBPK':_0x333150(0x17c),'yAvUV':function(_0x49a0e1,_0x1254e2){return _0x49a0e1===_0x1254e2;},'KJvyZ':'string','Rccen':function(_0x54743a,_0x13f17d){return _0x54743a(_0x13f17d);}},{storageStatePath:_0x32c861,tempAuthPath:_0x377384}=_0x5e04ac?{'storageStatePath':_0x5e04ac,'tempAuthPath':undefined}:await _0x80d989['TikFp'](resolveLocalAuthPath,getEnvDir(_0x1ab36b)),_0x3cd8d2=_0x1c09b0||_0x80d989['MUIvD'](randomUUID),_0x80bb6d=_0x80d989[_0x333150(0x18a)](join,_0x80d989['MUIvD'](getRangerDir),_0x80d989['VVaCx'],_0x3cd8d2),_0x23591e=join(_0x80bb6d,_0x333150(0x1c0)),_0x5454be=_0x32c861?_0x80d989[_0x333150(0x1b7)](join,_0x23591e,_0x80d989[_0x333150(0x1b0)]):undefined,{launchOptions:_0x1916db,contextOptions:_0x454f14}=buildBrowserOptionsFromSettings(_0x5c00d4,{'headless':_0x22b971?![]:_0x5c00d4[_0x333150(0x1be)]??!![],'storageStatePath':_0x32c861});if(process['getuid']?.()===0x0){const _0x224053=['--no-sandbox','--disable-setuid-sandbox'],_0x433d97=_0x1916db['args']??[],_0x169e3c=_0x224053[_0x333150(0x1b2)](_0x5b37e=>!_0x433d97['includes'](_0x5b37e));_0x1916db['args']=[..._0x433d97,..._0x169e3c];}const _0x46c4e8=_0x80d989['yAvUV'](typeof _0x1916db['executablePath'],_0x80d989['KJvyZ'])?_0x1916db['executablePath']:_0x32c861?chromium['executablePath']():undefined;return{'storageStatePath':_0x32c861,'tempAuthPath':_0x377384,'baseUrl':_0x5c00d4[_0x333150(0x1bf)],'headless':Boolean(_0x1916db[_0x333150(0x1be)]),'userDataDir':_0x23591e,'browserProfilePath':_0x5454be,'executablePath':_0x46c4e8,'launchArgs':Array['isArray'](_0x1916db[_0x333150(0x1de)])?_0x1916db[_0x333150(0x1de)][_0x333150(0x1b2)](_0x3a6199=>typeof _0x3a6199===_0x333150(0x1c8)):[],'userAgent':typeof _0x454f14[_0x333150(0x18d)]===_0x80d989['KJvyZ']?_0x454f14['userAgent']:undefined,'extraHTTPHeaders':_0x454f14[_0x333150(0x187)],'allowInsecureLocalhost':_0x80d989['Rccen'](Boolean,_0x5c00d4['allowInsecureLocalhost']),'safeMode':_0x80d989[_0x333150(0x177)](Boolean,_0x5c00d4[_0x333150(0x19c)]),'cdpEndpoint':_0x5c00d4['cdpEndpoint'],'isCdpMode':Boolean(_0x5c00d4[_0x333150(0x1d5)])};}export function getNestedValue(_0x39bae9,_0x4f341f){const _0x730379={'ZXVos':'object'},_0x19f30b=parseKeyPath(_0x4f341f);let _0x13b409=_0x39bae9;for(const _0x2c514a of _0x19f30b){if(_0x13b409===null||_0x13b409===undefined||typeof _0x13b409!==_0x730379['ZXVos'])return undefined;_0x13b409=_0x13b409[_0x2c514a];}return _0x13b409;}export function setNestedValue(_0x22e8a1,_0x49f38c,_0x28d22f){const _0x10dac4=_0x554c9f,_0x16daf0={'Oinub':function(_0x41aacb,_0xb18899){return _0x41aacb<_0xb18899;},'fcsuq':function(_0x2ae25c,_0x326387){return _0x2ae25c-_0x326387;}},_0x3ebe08=parseKeyPath(_0x49f38c);let _0x44c939=_0x22e8a1;for(let _0x1208aa=0x0;_0x16daf0['Oinub'](_0x1208aa,_0x16daf0['fcsuq'](_0x3ebe08[_0x10dac4(0x1d2)],0x1));_0x1208aa++){const _0x1d8c97=_0x3ebe08[_0x1208aa];(!(_0x1d8c97 in _0x44c939)||typeof _0x44c939[_0x1d8c97]!=='object')&&(_0x44c939[_0x1d8c97]={}),_0x44c939=_0x44c939[_0x1d8c97];}_0x44c939[_0x3ebe08[_0x16daf0[_0x10dac4(0x1d3)](_0x3ebe08['length'],0x1)]]=_0x28d22f;}export function deleteNestedValue(_0x346971,_0x2bb4cb){const _0x21b2df=_0x554c9f,_0x2d3414={'hmBiS':function(_0x4de72f,_0x2f2534){return _0x4de72f<_0x2f2534;},'FxykZ':_0x21b2df(0x1ba),'luZFc':function(_0x560555,_0x4f8b19){return _0x560555===_0x4f8b19;}},_0x10f453=parseKeyPath(_0x2bb4cb);let _0x22c33c=_0x346971;for(let _0x816018=0x0;_0x2d3414[_0x21b2df(0x19d)](_0x816018,_0x10f453['length']-0x1);_0x816018++){if(_0x22c33c===null||_0x22c33c===undefined||typeof _0x22c33c!==_0x2d3414['FxykZ'])return![];_0x22c33c=_0x22c33c[_0x10f453[_0x816018]];}if(_0x2d3414[_0x21b2df(0x1b8)](_0x22c33c,null)||_0x2d3414[_0x21b2df(0x1b8)](_0x22c33c,undefined)||typeof _0x22c33c!=='object')return![];const _0x20faf2=_0x10f453[_0x10f453[_0x21b2df(0x1d2)]-0x1];if(_0x20faf2 in _0x22c33c)return delete _0x22c33c[_0x20faf2],!![];return![];}function parseKeyPath(_0x59ca44){const _0x1657d5=_0x554c9f,_0xdff0c3={'arDvW':_0x1657d5(0x1b4)},_0x255780=_0x59ca44['split']('.');return _0x255780[0x0]==='header'&&(_0x255780[0x0]=_0x1657d5(0x1a1)),_0x255780[0x0]==='setupHeader'&&(_0x255780[0x0]=_0xdff0c3['arDvW']),_0x255780;}export function formatSettings(_0x4483b7,_0x1323bb=0x0){const _0x4faf9f=_0x554c9f,_0x5261cc={'JEzWI':_0x4faf9f(0x1ba)},_0x2ae5a7=[],_0xb54906='\x20\x20'['repeat'](_0x1323bb);for(const [_0x4d7731,_0x1b6337]of Object['entries'](_0x4483b7)){if(_0x1b6337===undefined)continue;if(typeof _0x1b6337===_0x5261cc['JEzWI']&&_0x1b6337!==null){_0x2ae5a7['push'](''+_0xb54906+_0x4d7731+':');for(const [_0x3daa13,_0x482bc7]of Object[_0x4faf9f(0x1df)](_0x1b6337)){_0x2ae5a7[_0x4faf9f(0x1a3)](_0xb54906+'\x20\x20'+_0x3daa13+':\x20'+_0x482bc7);}}else _0x2ae5a7['push'](''+_0xb54906+_0x4d7731+':\x20'+_0x1b6337);}return _0x2ae5a7[_0x4faf9f(0x1cb)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x3d6d12,_0x49a686){const _0x425a51=_0x4601,_0x3d49ae=_0x3d6d12();while(!![]){try{const _0x2029ae=parseInt(_0x425a51(0xe4))/0x1*(parseInt(_0x425a51(0xe6))/0x2)+-parseInt(_0x425a51(0xea))/0x3*(-parseInt(_0x425a51(0xef))/0x4)+parseInt(_0x425a51(0xeb))/0x5*(-parseInt(_0x425a51(0xed))/0x6)+-parseInt(_0x425a51(0xe5))/0x7+parseInt(_0x425a51(0xec))/0x8+parseInt(_0x425a51(0xe7))/0x9+parseInt(_0x425a51(0xe9))/0xa*(-parseInt(_0x425a51(0xf1))/0xb);if(_0x2029ae===_0x49a686)break;else _0x3d49ae['push'](_0x3d49ae['shift']());}catch(_0x598c92){_0x3d49ae['push'](_0x3d49ae['shift']());}}}(_0x4924,0xc2d10));function _0x4924(){const _0x190604=['10nxUdfh','2322593IKlOON','153580AJmHDX','5040594aofAlY','PMGJy','370WOoDOt','9gMnvGC','3626065AAXmFa','7860472THYwip','12pUyEXU','cLHlh','1166108SMChzV','skills','179839MNRztq'];_0x4924=function(){return _0x190604;};return _0x4924();}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x4601(_0x1ce2a2,_0x31f465){_0x1ce2a2=_0x1ce2a2-0xe4;const _0x4924bb=_0x4924();let _0x46012a=_0x4924bb[_0x1ce2a2];return _0x46012a;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x433fac){const _0x583ef6=_0x4601,_0x2ba128={'zcnjp':function(_0x21e03c,_0x4811eb,_0x2fdebf){return _0x21e03c(_0x4811eb,_0x2fdebf);},'PMGJy':'utf-8'},_0x209c4b=join(__dirname,'..','..',_0x583ef6(0xf0)),_0x47cc31=join(_0x209c4b,_0x433fac);try{return _0x2ba128['zcnjp'](readFileSync,_0x47cc31,_0x2ba128[_0x583ef6(0xe8)]);}catch{return'';}}export function getRangerSkillContent(){const _0x3261a0=_0x4601,_0x4e83d3={'vqdcI':function(_0x200c0f,_0x562771){return _0x200c0f(_0x562771);},'cLHlh':'ranger/SKILL.md'};return _0x4e83d3['vqdcI'](readSkillContent,_0x4e83d3[_0x3261a0(0xee)]);}
1
+ (function(_0x46739b,_0x41af72){const _0xf59b2a=_0x1ca9,_0x46694c=_0x46739b();while(!![]){try{const _0x5f58d1=parseInt(_0xf59b2a(0x1bf))/0x1*(-parseInt(_0xf59b2a(0x1b8))/0x2)+parseInt(_0xf59b2a(0x1bc))/0x3*(parseInt(_0xf59b2a(0x1c0))/0x4)+parseInt(_0xf59b2a(0x1c3))/0x5*(parseInt(_0xf59b2a(0x1bb))/0x6)+-parseInt(_0xf59b2a(0x1c1))/0x7*(parseInt(_0xf59b2a(0x1c4))/0x8)+-parseInt(_0xf59b2a(0x1be))/0x9*(-parseInt(_0xf59b2a(0x1b9))/0xa)+parseInt(_0xf59b2a(0x1b4))/0xb*(parseInt(_0xf59b2a(0x1b6))/0xc)+parseInt(_0xf59b2a(0x1bd))/0xd*(-parseInt(_0xf59b2a(0x1ba))/0xe);if(_0x5f58d1===_0x41af72)break;else _0x46694c['push'](_0x46694c['shift']());}catch(_0x1c3329){_0x46694c['push'](_0x46694c['shift']());}}}(_0x4e1c,0x73b29));import{readFileSync}from'fs';import{dirname,join}from'path';function _0x1ca9(_0x1db5b3,_0x259e27){_0x1db5b3=_0x1db5b3-0x1b4;const _0x4e1cb5=_0x4e1c();let _0x1ca971=_0x4e1cb5[_0x1db5b3];return _0x1ca971;}function _0x4e1c(){const _0xd8e35c=['2IaETud','23076dzbsEK','73213ZaueaD','skills','4431395JgoUmH','568KPJLJT','11UjfAMU','HNUjI','3975228kOhcve','nEWNA','42886eCtDFN','280eKLTKD','3486LUoUUG','6fqKYDu','75VJaBvi','14781GszIAf','58086PHoDWa'];_0x4e1c=function(){return _0xd8e35c;};return _0x4e1c();}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x33fdda){const _0x33d9b8=_0x1ca9,_0x3641df={'lRqIF':_0x33d9b8(0x1c2),'nEWNA':function(_0x5f054f,_0x6f6b0b,_0x3dc696){return _0x5f054f(_0x6f6b0b,_0x3dc696);},'HNUjI':'utf-8'},_0x409ee9=join(__dirname,'..','..',_0x3641df['lRqIF']),_0x2bd770=join(_0x409ee9,_0x33fdda);try{return _0x3641df[_0x33d9b8(0x1b7)](readFileSync,_0x2bd770,_0x3641df[_0x33d9b8(0x1b5)]);}catch{return'';}}export function getRangerSkillContent(){const _0x134633={'YJxtB':function(_0x1cdf10,_0x2bd43c){return _0x1cdf10(_0x2bd43c);}};return _0x134633['YJxtB'](readSkillContent,'ranger/SKILL.md');}
@@ -1 +1 @@
1
- const _0x5e5289=_0x43eb;(function(_0x2e914d,_0x1af0f8){const _0x2f7ccf=_0x43eb,_0x3d9de2=_0x2e914d();while(!![]){try{const _0x12dcf6=-parseInt(_0x2f7ccf(0x170))/0x1+-parseInt(_0x2f7ccf(0x15c))/0x2*(parseInt(_0x2f7ccf(0x164))/0x3)+parseInt(_0x2f7ccf(0x159))/0x4*(parseInt(_0x2f7ccf(0x171))/0x5)+parseInt(_0x2f7ccf(0x172))/0x6+-parseInt(_0x2f7ccf(0x160))/0x7+-parseInt(_0x2f7ccf(0x176))/0x8+-parseInt(_0x2f7ccf(0x155))/0x9*(-parseInt(_0x2f7ccf(0x175))/0xa);if(_0x12dcf6===_0x1af0f8)break;else _0x3d9de2['push'](_0x3d9de2['shift']());}catch(_0x34cee2){_0x3d9de2['push'](_0x3d9de2['shift']());}}}(_0x4ca4,0xeedfb));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';function _0x4ca4(){const _0x41ef8e=['EKVfe','join','1644376VPLZbx','24385pOuoEE','2944734aOPovr','push','.md','15356710wYQStj','231856euFrQf','filter','9yVDcSH','utf-8','catch','ByXJu','1220OXBgqX','trim','skills','2gUOCgT','log','SKILL.md','feature-tracker','1543234EuafUI','YeOHF','warn','wxehX','1925094ccnISx','\x20\x20Files:\x20','chJhc','PWaBb','\x20\x20Installed\x20skill:\x20','zFPph','e2e-test-recommender','length','ranger','KZgei'];_0x4ca4=function(){return _0x41ef8e;};return _0x4ca4();}import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';function _0x43eb(_0xad7f84,_0x254144){_0xad7f84=_0xad7f84-0x154;const _0x4ca448=_0x4ca4();let _0x43eb9d=_0x4ca448[_0xad7f84];return _0x43eb9d;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x5e5289(0x16c)];export const DEPRECATED_SKILLS=[_0x5e5289(0x16a),'bug-bash',_0x5e5289(0x15f)];export async function installSkill(_0x347526,_0x43f036={}){const _0x36831a=_0x5e5289,_0x572a41={'JCPGV':function(_0x488fe5){return _0x488fe5();},'YeOHF':function(_0x2a99a8,_0x44a6d1){return _0x2a99a8(_0x44a6d1);},'WEigG':_0x36831a(0x15e),'EKVfe':function(_0x996f38,_0x373c52){return _0x996f38&&_0x373c52;},'PyfUG':function(_0x504615,_0x2927bb){return _0x504615(_0x2927bb);},'gxFQx':function(_0x3a6dd8,_0xe07527){return _0x3a6dd8(_0xe07527);},'vMnZr':function(_0x41ff06,_0x1b09ee,_0x36cc4c){return _0x41ff06(_0x1b09ee,_0x36cc4c);},'rHrYS':function(_0x455071,_0x3d0fad,_0x2f988c){return _0x455071(_0x3d0fad,_0x2f988c);},'qFdEs':_0x36831a(0x156),'ByXJu':function(_0x1fed3d,_0x11d44e,_0x5953dc,_0xe3617c){return _0x1fed3d(_0x11d44e,_0x5953dc,_0xe3617c);},'PWaBb':function(_0x2efd06,_0x307d98){return _0x2efd06>_0x307d98;}},{level:level='project',cliVersion:_0x10e703,platform:platform='claude'}=_0x43f036,_0x2a7046=_0x572a41['JCPGV'](getSourceSkillsDir),_0x52209a=join(_0x2a7046,_0x347526),_0x5e257b=join(_0x2a7046,_0x347526+'.md'),_0x4c1567=existsSync(_0x52209a)&&_0x572a41['YeOHF'](statSync,_0x52209a)['isDirectory']()&&_0x572a41['YeOHF'](existsSync,join(_0x52209a,_0x572a41['WEigG'])),_0x3acbf6=existsSync(_0x5e257b);if(_0x572a41[_0x36831a(0x16e)](!_0x4c1567,!_0x3acbf6))return console[_0x36831a(0x162)]('\x20\x20Skill\x20not\x20found:\x20'+_0x347526),![];const _0x870bd6=platform==='opencode'?_0x572a41['PyfUG'](getOpencodeSkillsDir,level):_0x572a41['gxFQx'](getSkillsDir,level),_0x5a4b71=join(_0x870bd6,_0x347526);await mkdir(_0x5a4b71,{'recursive':!![]});let _0x4bf9ac,_0x5cc2e9=[];if(_0x4c1567){const _0x1fd121=await _0x572a41[_0x36831a(0x161)](readdir,_0x52209a),_0x246992=_0x1fd121[_0x36831a(0x154)](_0x5f1ac0=>_0x5f1ac0['endsWith'](_0x36831a(0x174)));for(const _0x30e23a of _0x246992){const _0x1d5191=_0x572a41['vMnZr'](join,_0x52209a,_0x30e23a),_0x565891=join(_0x5a4b71,_0x30e23a);await _0x572a41['rHrYS'](copyFile,_0x1d5191,_0x565891),_0x5cc2e9[_0x36831a(0x173)](_0x30e23a);}_0x4bf9ac=await _0x572a41['vMnZr'](readFile,join(_0x52209a,_0x572a41['WEigG']),_0x572a41['qFdEs']);}else{_0x4bf9ac=await readFile(_0x5e257b,'utf-8');const _0x32edcc=join(_0x5a4b71,_0x572a41['WEigG']);await _0x572a41[_0x36831a(0x158)](writeFile,_0x32edcc,_0x4bf9ac,_0x36831a(0x156)),_0x5cc2e9['push'](_0x572a41['WEigG']);}const {name:_0x2bff04}=parseFrontmatter(_0x4bf9ac);return console['log'](_0x36831a(0x168)+_0x2bff04),console['log']('\x20\x20Location:\x20'+_0x5a4b71),_0x572a41[_0x36831a(0x167)](_0x5cc2e9[_0x36831a(0x16b)],0x1)&&console['log'](_0x36831a(0x165)+_0x5cc2e9[_0x36831a(0x16f)](',\x20')),logLocalAgentInstallation(_0x347526,{'skillDisplayName':_0x2bff04,'installLevel':level},_0x10e703)[_0x36831a(0x157)](()=>{}),!![];}function getSourceSkillsDir(){const _0x5042f3=_0x5e5289,_0x38c4b9={'kaIXZ':function(_0x1cb27a,_0x59f64a,_0x517947,_0x5bd201,_0x3e6a52){return _0x1cb27a(_0x59f64a,_0x517947,_0x5bd201,_0x3e6a52);},'KZgei':_0x5042f3(0x15b),'chJhc':function(_0x2de111,_0x5a4690,_0x4ccdb8,_0x458c52,_0x4eb052,_0x1e567d){return _0x2de111(_0x5a4690,_0x4ccdb8,_0x458c52,_0x4eb052,_0x1e567d);},'uwHWv':function(_0x3509c8,_0x2cb720){return _0x3509c8(_0x2cb720);}},_0x56b097=[_0x38c4b9['kaIXZ'](join,__dirname,'..','..',_0x38c4b9[_0x5042f3(0x16d)]),_0x38c4b9[_0x5042f3(0x166)](join,__dirname,'..','..','..',_0x5042f3(0x15b))];for(const _0x14f2ef of _0x56b097){if(_0x38c4b9['uwHWv'](existsSync,_0x14f2ef))return _0x14f2ef;}return _0x56b097[0x0];}function parseFrontmatter(_0x45f57c){const _0x33bbf9=_0x5e5289,_0x1c7708=_0x45f57c['match'](/^---\n([\s\S]+?)\n---/);if(!_0x1c7708)throw new Error('Invalid\x20skill\x20frontmatter');const _0x423689=_0x1c7708[0x1],_0x49b539=_0x423689['match'](/name:\s*(.+)/),_0x28c588=_0x423689['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x49b539?.[0x1][_0x33bbf9(0x15a)]()||'','description':_0x28c588?.[0x1][_0x33bbf9(0x15a)]()||''};}export async function removeSkill(_0x353501,_0xb23c86){const _0x40d856=_0x5e5289,_0x8d196f={'wxehX':function(_0x30020a,_0x526d65){return _0x30020a(_0x526d65);},'zFPph':function(_0x1f4809,_0x194b35,_0x230c06){return _0x1f4809(_0x194b35,_0x230c06);},'HhXsK':function(_0x4ae40c,_0x170729){return _0x4ae40c(_0x170729);}},_0x574b10=_0x8d196f[_0x40d856(0x163)](getSkillsDir,_0xb23c86),_0x416bee=_0x8d196f[_0x40d856(0x169)](join,_0x574b10,_0x353501);if(!_0x8d196f['HhXsK'](existsSync,_0x416bee))return![];try{return await _0x8d196f[_0x40d856(0x169)](rm,_0x416bee,{'recursive':!![]}),console[_0x40d856(0x15d)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x353501),!![];}catch{return console[_0x40d856(0x162)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x353501),![];}}
1
+ const _0x3d328c=_0x23ba;(function(_0x3b2192,_0xd433fe){const _0x355a81=_0x23ba,_0x405f8c=_0x3b2192();while(!![]){try{const _0x2069f5=-parseInt(_0x355a81(0x10c))/0x1*(-parseInt(_0x355a81(0xfb))/0x2)+parseInt(_0x355a81(0xeb))/0x3*(-parseInt(_0x355a81(0x109))/0x4)+parseInt(_0x355a81(0x107))/0x5*(parseInt(_0x355a81(0xf9))/0x6)+parseInt(_0x355a81(0xf6))/0x7*(parseInt(_0x355a81(0x104))/0x8)+-parseInt(_0x355a81(0xed))/0x9+parseInt(_0x355a81(0xef))/0xa*(-parseInt(_0x355a81(0x106))/0xb)+parseInt(_0x355a81(0x101))/0xc;if(_0x2069f5===_0xd433fe)break;else _0x405f8c['push'](_0x405f8c['shift']());}catch(_0x3dd776){_0x405f8c['push'](_0x405f8c['shift']());}}}(_0x2099,0x82583));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x2099(){const _0x16acff=['sLPtN','claude','Invalid\x20skill\x20frontmatter','JhDLI','\x20\x20Skill\x20not\x20found:\x20','IALXm','3052kidbPA','push','utf-8','150ZhFaXX','isDirectory','218884BVoaVs','join','.md','wIxoe','\x20\x20Location:\x20','TKPqt','17379648yPsYtT','OXsCm','warn','872FWGYpu','trim','275jmAWMi','120775JNTDQw','catch','3307552uoqqKA','ranger','AsWXw','5fcNeYw','match','\x20\x20Installed\x20skill:\x20','ptewD','log','3JAzmdY','\x20\x20Files:\x20','1993131zkIKKD','wbrvK','425870NRGdVv'];_0x2099=function(){return _0x16acff;};return _0x2099();}function _0x23ba(_0x5b1e48,_0x5c4a72){_0x5b1e48=_0x5b1e48-0xe8;const _0x209948=_0x2099();let _0x23bab8=_0x209948[_0x5b1e48];return _0x23bab8;}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x3d328c(0x10a)];export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0x2f134c,_0x4e5993={}){const _0x505a4a=_0x3d328c,_0x23ea83={'tpFsH':'project','ptewD':function(_0x3fe01f){return _0x3fe01f();},'TKPqt':function(_0x340356,_0x794fc6,_0x1e74c1){return _0x340356(_0x794fc6,_0x1e74c1);},'oVoUe':function(_0x1544a7,_0x111ee2){return _0x1544a7(_0x111ee2);},'LgjTZ':'SKILL.md','IALXm':function(_0x5911e9,_0x20fca8){return _0x5911e9(_0x20fca8);},'OXsCm':'opencode','MeJEy':function(_0x45a7f1,_0x2bdd45,_0x4390d9){return _0x45a7f1(_0x2bdd45,_0x4390d9);},'wbrvK':function(_0x5c9072,_0x9d8924,_0x12d8ae){return _0x5c9072(_0x9d8924,_0x12d8ae);},'SmkKv':'utf-8','AsWXw':function(_0x412b0e,_0x38c674,_0x442fee){return _0x412b0e(_0x38c674,_0x442fee);},'wIxoe':function(_0x280c9d,_0x5ba8de,_0x1d4353,_0x3bbc0b){return _0x280c9d(_0x5ba8de,_0x1d4353,_0x3bbc0b);},'OKIJK':function(_0x357e43,_0x5ec7d1){return _0x357e43>_0x5ec7d1;}},{level:level=_0x23ea83['tpFsH'],cliVersion:_0x2f3376,platform:platform=_0x505a4a(0xf1)}=_0x4e5993,_0x413ded=_0x23ea83[_0x505a4a(0xe9)](getSourceSkillsDir),_0x54098b=_0x23ea83[_0x505a4a(0x100)](join,_0x413ded,_0x2f134c),_0x504844=join(_0x413ded,_0x2f134c+_0x505a4a(0xfd)),_0x915e64=_0x23ea83['oVoUe'](existsSync,_0x54098b)&&statSync(_0x54098b)[_0x505a4a(0xfa)]()&&existsSync(_0x23ea83['TKPqt'](join,_0x54098b,_0x23ea83['LgjTZ'])),_0x11b772=_0x23ea83[_0x505a4a(0xf5)](existsSync,_0x504844);if(!_0x915e64&&!_0x11b772)return console[_0x505a4a(0x103)](_0x505a4a(0xf4)+_0x2f134c),![];const _0x2ae354=platform===_0x23ea83[_0x505a4a(0x102)]?_0x23ea83['oVoUe'](getOpencodeSkillsDir,level):getSkillsDir(level),_0xd9f64=join(_0x2ae354,_0x2f134c);await mkdir(_0xd9f64,{'recursive':!![]});let _0x1c794e,_0x2345c0=[];if(_0x915e64){const _0x49e2d9=await _0x23ea83['IALXm'](readdir,_0x54098b),_0x42bc69=_0x49e2d9['filter'](_0x584473=>_0x584473['endsWith'](_0x505a4a(0xfd)));for(const _0x5c7c85 of _0x42bc69){const _0x35c824=join(_0x54098b,_0x5c7c85),_0x4fbf76=join(_0xd9f64,_0x5c7c85);await copyFile(_0x35c824,_0x4fbf76),_0x2345c0['push'](_0x5c7c85);}_0x1c794e=await readFile(_0x23ea83['MeJEy'](join,_0x54098b,'SKILL.md'),'utf-8');}else{_0x1c794e=await _0x23ea83[_0x505a4a(0xee)](readFile,_0x504844,_0x23ea83['SmkKv']);const _0x388afd=_0x23ea83[_0x505a4a(0x10b)](join,_0xd9f64,'SKILL.md');await _0x23ea83[_0x505a4a(0xfe)](writeFile,_0x388afd,_0x1c794e,_0x505a4a(0xf8)),_0x2345c0[_0x505a4a(0xf7)](_0x23ea83['LgjTZ']);}const {name:_0x18687d}=parseFrontmatter(_0x1c794e);return console['log'](_0x505a4a(0xe8)+_0x18687d),console['log'](_0x505a4a(0xff)+_0xd9f64),_0x23ea83['OKIJK'](_0x2345c0['length'],0x1)&&console[_0x505a4a(0xea)](_0x505a4a(0xec)+_0x2345c0[_0x505a4a(0xfc)](',\x20')),_0x23ea83['wIxoe'](logLocalAgentInstallation,_0x2f134c,{'skillDisplayName':_0x18687d,'installLevel':level},_0x2f3376)[_0x505a4a(0x108)](()=>{}),!![];}function getSourceSkillsDir(){const _0x1c9dde=_0x3d328c,_0x36168e={'gYDJD':function(_0x41b4b6,_0x23308d,_0x65ccf1,_0x1519b9,_0x2812dd){return _0x41b4b6(_0x23308d,_0x65ccf1,_0x1519b9,_0x2812dd);},'sLPtN':'skills','WpVBV':function(_0x113e8d,_0x536934){return _0x113e8d(_0x536934);}},_0x2f318e=[_0x36168e['gYDJD'](join,__dirname,'..','..',_0x36168e[_0x1c9dde(0xf0)]),join(__dirname,'..','..','..','skills')];for(const _0x5f1616 of _0x2f318e){if(_0x36168e['WpVBV'](existsSync,_0x5f1616))return _0x5f1616;}return _0x2f318e[0x0];}function parseFrontmatter(_0x7241e2){const _0x3c8823=_0x3d328c,_0x59b20b=_0x7241e2[_0x3c8823(0x10d)](/^---\n([\s\S]+?)\n---/);if(!_0x59b20b)throw new Error(_0x3c8823(0xf2));const _0x12b2c5=_0x59b20b[0x1],_0x40eac3=_0x12b2c5[_0x3c8823(0x10d)](/name:\s*(.+)/),_0x13c4b0=_0x12b2c5['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x40eac3?.[0x1]['trim']()||'','description':_0x13c4b0?.[0x1][_0x3c8823(0x105)]()||''};}export async function removeSkill(_0x5c3bd4,_0x437546){const _0x3cdc37=_0x3d328c,_0x5b8f47={'OwaGy':function(_0x380466,_0xccc99,_0x4393a7){return _0x380466(_0xccc99,_0x4393a7);},'JhDLI':function(_0x349929,_0x304a74){return _0x349929(_0x304a74);},'LxLcH':function(_0x37c9de,_0x22d495,_0x354fe8){return _0x37c9de(_0x22d495,_0x354fe8);}},_0x3d0a4c=getSkillsDir(_0x437546),_0x4098d6=_0x5b8f47['OwaGy'](join,_0x3d0a4c,_0x5c3bd4);if(!_0x5b8f47[_0x3cdc37(0xf3)](existsSync,_0x4098d6))return![];try{return await _0x5b8f47['LxLcH'](rm,_0x4098d6,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x5c3bd4),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x5c3bd4),![];}}
@@ -1 +1 @@
1
- function _0x1122(){const _0x287eac=['zaqaT','VdcAu','XzlLJ','STUak','Cezoc','endsWith','JkiDb','615525LnAnXg','kVPed','min','OYYYH','Stitched\x20','clusters','pZMdT','AboDr','7hzZgje','jizom','yCwmU','633vWWKIX','concat','\x20files\x20->\x20','SKJBD','RqxqG','776604hTBLWb','max','stitchWebmFiles.js','has','QzDHD','817340arjUvj','8CPPcFJ','SqEHb','CUrlR','DMBAt','length','SzvWI','KdOSg','error','omULY','DoNSg','ARULy','maxTicks','copy','WznOx','674MWwmbB','2988060zdknQK','MUoIo','NZYCd','11eSdnMu','qaoDC','5mctToG','MwxXD','readInt16BE','mRLpB','3262590smxhQW','push','iuNfe','VWlGj','tBmOP','krEhT','stitchWebmFiles.ts','jQjXR','BdLQu','alloc','WZiSA','JjljE','JRGow','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','UJeiJ','zLIOk','slice','floor','from','woBzv','jWifl','header','argv','TvMyK','744564IOZRrK','ewBrA','rrLEI'];_0x1122=function(){return _0x287eac;};return _0x1122();}const _0x75aa3a=_0x59ce;(function(_0x21a8b5,_0x112624){const _0x13c70f=_0x59ce,_0x804f32=_0x21a8b5();while(!![]){try{const _0x2c2bd5=parseInt(_0x13c70f(0xe0))/0x1*(-parseInt(_0x13c70f(0xf9))/0x2)+parseInt(_0x13c70f(0xd5))/0x3+-parseInt(_0x13c70f(0xcb))/0x4*(parseInt(_0x13c70f(0xff))/0x5)+parseInt(_0x13c70f(0xfa))/0x6*(parseInt(_0x13c70f(0xdd))/0x7)+-parseInt(_0x13c70f(0xeb))/0x8*(-parseInt(_0x13c70f(0xb3))/0x9)+-parseInt(_0x13c70f(0xea))/0xa+parseInt(_0x13c70f(0xfd))/0xb*(-parseInt(_0x13c70f(0xe5))/0xc);if(_0x2c2bd5===_0x112624)break;else _0x804f32['push'](_0x804f32['shift']());}catch(_0x4235bd){_0x804f32['push'](_0x804f32['shift']());}}}(_0x1122,0x7ee66));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(_0x5bbb56,_0x31ca9c){const _0xc44643=_0x59ce,_0xe8215d={'BKQIx':function(_0xa258d0,_0x2b88ce){return _0xa258d0&_0x2b88ce;},'ARULy':function(_0x55655a,_0x2185c8){return _0x55655a-_0x2185c8;},'NoKSy':function(_0x49b3e9,_0x5c909f){return _0x49b3e9<_0x5c909f;},'pvJhn':function(_0x4a49eb,_0x38e7b8){return _0x4a49eb+_0x38e7b8;},'woBzv':function(_0x1cc20d,_0x738ec1){return _0x1cc20d*_0x738ec1;}};if(_0x31ca9c>=_0x5bbb56[_0xc44643(0xef)])return[0x0,0x0];const _0xbd614a=_0x5bbb56[_0x31ca9c];let _0x387db5=0x1,_0x5759eb=0x80;while(_0x387db5<=0x8&&!_0xe8215d['BKQIx'](_0xbd614a,_0x5759eb)){_0x387db5++,_0x5759eb>>=0x1;}if(_0x31ca9c+_0x387db5>_0x5bbb56[_0xc44643(0xef)])return[0x0,0x0];let _0x475638=_0xe8215d['BKQIx'](_0xbd614a,_0xe8215d[_0xc44643(0xf5)](_0x5759eb,0x1));for(let _0x5a5643=0x1;_0xe8215d['NoKSy'](_0x5a5643,_0x387db5);_0x5a5643++){_0x475638=_0xe8215d['pvJhn'](_0xe8215d[_0xc44643(0xc6)](_0x475638,0x100),_0x5bbb56[_0x31ca9c+_0x5a5643]);}return[_0x475638,_0x387db5];}function readId(_0x1a8fe1,_0x1d6952){const _0x2f1193=_0x59ce,_0x454f5d={'VWlGj':function(_0x3ec15f,_0x393e29){return _0x3ec15f>=_0x393e29;},'ULdoe':function(_0x3fba5f,_0x470d1f){return _0x3fba5f>=_0x470d1f;},'xzyvD':function(_0xe8107b,_0x292ad5){return _0xe8107b*_0x292ad5;}};if(_0x454f5d[_0x2f1193(0xb6)](_0x1d6952,_0x1a8fe1[_0x2f1193(0xef)]))return[0x0,0x0];const _0x593812=_0x1a8fe1[_0x1d6952];let _0x224885;if(_0x454f5d['ULdoe'](_0x593812,0x80))_0x224885=0x1;else{if(_0x593812>=0x40)_0x224885=0x2;else{if(_0x593812>=0x20)_0x224885=0x3;else{if(_0x454f5d['VWlGj'](_0x593812,0x10))_0x224885=0x4;else return[_0x593812,0x1];}}}if(_0x1d6952+_0x224885>_0x1a8fe1['length'])return[0x0,0x0];let _0x5472be=0x0;for(let _0x1c0d72=0x0;_0x1c0d72<_0x224885;_0x1c0d72++){_0x5472be=_0x454f5d['xzyvD'](_0x5472be,0x100)+_0x1a8fe1[_0x1d6952+_0x1c0d72];}return[_0x5472be,_0x224885];}function readUint(_0x44e5c4,_0x53c554,_0x4aafb5){let _0x294f36=0x0;for(let _0x394395=0x0;_0x394395<_0x4aafb5;_0x394395++){_0x294f36=_0x294f36*0x100+_0x44e5c4[_0x53c554+_0x394395];}return _0x294f36;}function isUnknownSize(_0x408568,_0x62d04){const _0x5173ca=_0x59ce,_0x2904ff={'ewBrA':function(_0xe06fe4,_0x13dd94){return _0xe06fe4===_0x13dd94;},'KdOSg':function(_0x432ae4,_0x13ae7a){return _0x432ae4*_0x13ae7a;}};return _0x2904ff[_0x5173ca(0xcc)](_0x408568,Math['pow'](0x2,_0x2904ff[_0x5173ca(0xf1)](0x7,_0x62d04))-0x1);}function writeVint(_0x3025fe,_0x20fd15){const _0x1530d2=_0x59ce,_0x454913={'kVPed':function(_0x303995,_0xa14d57){return _0x303995||_0xa14d57;},'zKMMk':function(_0xaa6d86,_0x2f22ee){return _0xaa6d86-_0x2f22ee;},'hqwEv':function(_0x39ae37,_0x23ee1e){return _0x39ae37*_0x23ee1e;},'SqEHb':function(_0x2eb538,_0x21afa4){return _0x2eb538&_0x21afa4;}};let _0x345228=_0x454913[_0x1530d2(0xd6)](_0x20fd15,0x1);while(_0x454913['zKMMk'](Math['pow'](0x2,_0x454913['hqwEv'](0x7,_0x345228)),0x2)<_0x3025fe)_0x345228++;const _0x1e9bd9=Buffer[_0x1530d2(0xbc)](_0x345228);for(let _0x234572=_0x345228-0x1;_0x234572>=0x0;_0x234572--){_0x1e9bd9[_0x234572]=_0x454913[_0x1530d2(0xec)](_0x3025fe,0xff),_0x3025fe=Math['floor'](_0x3025fe/0x100);}return _0x1e9bd9[0x0]|=0x1<<0x8-_0x345228,_0x1e9bd9;}function writeUint(_0x4a8341,_0x21473d){const _0x4bfb60=_0x59ce,_0x5882e7={'STUak':function(_0x3ed510,_0x58dd2d){return _0x3ed510-_0x58dd2d;},'CxaJE':function(_0x255b2c,_0x35e985){return _0x255b2c>=_0x35e985;}},_0x484757=Buffer['alloc'](_0x21473d);for(let _0x3abfbd=_0x5882e7[_0x4bfb60(0xd1)](_0x21473d,0x1);_0x5882e7['CxaJE'](_0x3abfbd,0x0);_0x3abfbd--){_0x484757[_0x3abfbd]=_0x4a8341&0xff,_0x4a8341=Math[_0x4bfb60(0xc4)](_0x4a8341/0x100);}return _0x484757;}function _0x59ce(_0x25b43c,_0x557d28){_0x25b43c=_0x25b43c-0xb2;const _0x112234=_0x1122();let _0x59ce29=_0x112234[_0x25b43c];return _0x59ce29;}function writeUnknownSizeVint(_0x28c9ea){const _0x35f3c6=_0x59ce,_0x3cca5e={'MUoIo':function(_0x1d349e,_0x39bcaa){return _0x1d349e>>_0x39bcaa;}},_0x394fe0=Buffer['alloc'](_0x28c9ea,0xff);return _0x394fe0[0x0]=_0x3cca5e[_0x35f3c6(0xfb)](0xff,_0x28c9ea-0x1),_0x394fe0;}function uintSize(_0x740156){const _0x1f9c00=_0x59ce,_0xae7f62={'Cezoc':function(_0x58d20f,_0x11129f){return _0x58d20f>_0x11129f;},'SKJBD':function(_0x273b67,_0xe271de){return _0x273b67/_0xe271de;}};if(_0x740156===0x0)return 0x1;let _0x4cced0=0x0,_0x239cc2=_0x740156;while(_0xae7f62[_0x1f9c00(0xd2)](_0x239cc2,0x0)){_0x4cced0++,_0x239cc2=Math[_0x1f9c00(0xc4)](_0xae7f62[_0x1f9c00(0xe3)](_0x239cc2,0x100));}return _0x4cced0;}function findTimestampScale(_0x2f1c02,_0x3a4166){const _0x40ec4c=_0x59ce,_0x5a52c2={'qaoDC':function(_0x1ba937,_0x3de6f7){return _0x1ba937<_0x3de6f7;},'UJeiJ':function(_0x3ab7a3,_0x128ade,_0x592b73){return _0x3ab7a3(_0x128ade,_0x592b73);},'omULY':function(_0x52bc3a,_0x531ce5){return _0x52bc3a+_0x531ce5;},'RqxqG':function(_0x126a59,_0x377a82){return _0x126a59+_0x377a82;},'JjljE':function(_0x152f49,_0x49c79d){return _0x152f49<_0x49c79d;},'iuNfe':function(_0x2ce2cd,_0xc59fcf,_0x2e248a,_0x272567){return _0x2ce2cd(_0xc59fcf,_0x2e248a,_0x272567);},'pZMdT':function(_0x493248,_0x5e16ef){return _0x493248+_0x5e16ef;},'ruOFD':function(_0x327afb,_0x5ba60a){return _0x327afb===_0x5ba60a;}};let _0x3ee8b4=_0x3a4166;const _0x4024e2=Math[_0x40ec4c(0xd7)](_0x2f1c02[_0x40ec4c(0xef)],_0x3a4166+0x2710);while(_0x5a52c2[_0x40ec4c(0xfe)](_0x3ee8b4,_0x4024e2)){const [_0x562fae,_0xa62cca]=_0x5a52c2[_0x40ec4c(0xc1)](readId,_0x2f1c02,_0x3ee8b4),[_0x30c772,_0xe2f47]=readVint(_0x2f1c02,_0x5a52c2[_0x40ec4c(0xf3)](_0x3ee8b4,_0xa62cca));if(_0x562fae===ID_INFO){let _0x431e89=_0x5a52c2['RqxqG'](_0x3ee8b4,_0xa62cca)+_0xe2f47;const _0x18affd=_0x431e89+_0x30c772;while(_0x5a52c2[_0x40ec4c(0xbe)](_0x431e89,_0x18affd)){const [_0x1a9d1d,_0x265255]=readId(_0x2f1c02,_0x431e89),[_0xe2bed6,_0x235664]=readVint(_0x2f1c02,_0x431e89+_0x265255);if(_0x1a9d1d===ID_TIMESTAMP_SCALE)return _0x5a52c2[_0x40ec4c(0xb5)](readUint,_0x2f1c02,_0x5a52c2[_0x40ec4c(0xdb)](_0x5a52c2[_0x40ec4c(0xe4)](_0x431e89,_0x265255),_0x235664),_0xe2bed6);_0x431e89+=_0x265255+_0x235664+_0xe2bed6;}break;}if(_0x5a52c2['ruOFD'](_0x562fae,ID_CLUSTER))break;if(isUnknownSize(_0x30c772,_0xe2f47))break;_0x3ee8b4+=_0xa62cca+_0xe2f47+_0x30c772;}return 0xf4240;}function findFirstClusterOffset(_0x262f0f,_0x336ade){const _0x4f864a=_0x59ce,_0xab75e0={'QMuRa':function(_0x58fb03,_0x406a4e){return _0x58fb03<_0x406a4e;},'XFURt':function(_0xd41e71,_0x316209,_0x7f1ab8){return _0xd41e71(_0x316209,_0x7f1ab8);},'ItOKy':function(_0x41d3a6,_0x5e1348,_0x5c362e){return _0x41d3a6(_0x5e1348,_0x5c362e);},'gcnjq':function(_0x41cd38,_0x1ffb0f){return _0x41cd38+_0x1ffb0f;},'QQxnK':function(_0x2c8ff0,_0x523fe0){return _0x2c8ff0+_0x523fe0;}};let _0x44197b=_0x336ade;while(_0xab75e0['QMuRa'](_0x44197b,_0x262f0f[_0x4f864a(0xef)])){const [_0x3409b1,_0x464c2b]=_0xab75e0['XFURt'](readId,_0x262f0f,_0x44197b);if(_0x3409b1===ID_CLUSTER)return _0x44197b;const [_0x1d5230,_0x2fe0eb]=_0xab75e0['ItOKy'](readVint,_0x262f0f,_0x44197b+_0x464c2b);if(_0xab75e0['ItOKy'](isUnknownSize,_0x1d5230,_0x2fe0eb))return _0x44197b;_0x44197b+=_0xab75e0['gcnjq'](_0xab75e0['QQxnK'](_0x464c2b,_0x2fe0eb),_0x1d5230);}return _0x262f0f[_0x4f864a(0xef)];}function findClusterEnd(_0x5a0857,_0x2954e8,_0x277d5f,_0x23c159){const _0x325f2e=_0x59ce,_0x42c005={'MfNff':function(_0x38462a,_0x27c9f2,_0x49cf0e){return _0x38462a(_0x27c9f2,_0x49cf0e);},'gAEcI':function(_0x28d736,_0x49e560){return _0x28d736<_0x49e560;},'zcZds':function(_0xd51e92,_0x2f3cb8){return _0xd51e92-_0x2f3cb8;},'gTHZm':function(_0x182173,_0x75939b){return _0x182173+_0x75939b;},'kbSPI':function(_0x12ba7e,_0x4f9cb0){return _0x12ba7e+_0x4f9cb0;}};if(!_0x42c005['MfNff'](isUnknownSize,_0x277d5f,_0x23c159))return _0x2954e8+_0x277d5f;const _0x4430e6=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0xc09a67=_0x2954e8;while(_0x42c005['gAEcI'](_0xc09a67,_0x42c005['zcZds'](_0x5a0857[_0x325f2e(0xef)],0x4))){const [_0x592a8c,_0x44d848]=_0x42c005['MfNff'](readId,_0x5a0857,_0xc09a67);if(_0x4430e6[_0x325f2e(0xe8)](_0x592a8c))return _0xc09a67;const [_0xdba4d3,_0x22aca7]=readVint(_0x5a0857,_0x42c005['gTHZm'](_0xc09a67,_0x44d848));if(isUnknownSize(_0xdba4d3,_0x22aca7))return _0x5a0857[_0x325f2e(0xef)];_0xc09a67+=_0x42c005['kbSPI'](_0x44d848,_0x22aca7)+_0xdba4d3;}return _0x5a0857[_0x325f2e(0xef)];}function extractClusters(_0x2d1948,_0x1488d5){const _0x53d1f6=_0x59ce,_0x4e6efb={'TvMyK':function(_0x3c2441,_0x2d1c35,_0x5903d6){return _0x3c2441(_0x2d1c35,_0x5903d6);},'NZYCd':function(_0xae2353,_0x438362){return _0xae2353!==_0x438362;},'rrLEI':function(_0x2c78b2,_0x2276ad,_0x38251d){return _0x2c78b2(_0x2276ad,_0x38251d);},'CUrlR':function(_0x18213e,_0x2c4ca8){return _0x18213e+_0x2c4ca8;},'BdLQu':function(_0x3cb541,_0x5beb2c,_0xa4f168,_0xfc5f5d,_0xd6a93a){return _0x3cb541(_0x5beb2c,_0xa4f168,_0xfc5f5d,_0xd6a93a);},'OYYYH':function(_0x1c51cc,_0x4d8a9d){return _0x1c51cc<_0x4d8a9d;},'WZiSA':function(_0x3d9071,_0x10e99e){return _0x3d9071===_0x10e99e;},'ikMJf':function(_0x4850f6,_0x9fc46d,_0x53cdb2){return _0x4850f6(_0x9fc46d,_0x53cdb2);},'yCwmU':function(_0xabea1,_0x3bbb4f){return _0xabea1===_0x3bbb4f;},'jQjXR':function(_0x54c605,_0x357d4b){return _0x54c605+_0x357d4b;},'XzlLJ':function(_0x2b40a5,_0x1797d3){return _0x2b40a5+_0x1797d3;},'jWifl':function(_0x1d6f40,_0x593040){return _0x1d6f40===_0x593040;},'qskgB':function(_0x4f7c5d,_0x3df6c4,_0x3e8aeb){return _0x4f7c5d(_0x3df6c4,_0x3e8aeb);}},_0x25ba0f=[],_0x1e0ca7=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x481d2f=0x0;while(_0x481d2f<_0x2d1948['length']){const _0x5b6050=_0x2d1948['indexOf'](_0x1e0ca7,_0x481d2f);if(_0x5b6050===-0x1)break;const [_0x511f07,_0x19974f]=_0x4e6efb[_0x53d1f6(0xca)](readId,_0x2d1948,_0x5b6050);if(_0x4e6efb[_0x53d1f6(0xfc)](_0x511f07,ID_CLUSTER)){_0x481d2f=_0x5b6050+0x1;continue;}const [_0x5ab66c,_0x11c1bf]=_0x4e6efb[_0x53d1f6(0xcd)](readVint,_0x2d1948,_0x5b6050+_0x19974f),_0x3584f7=_0x4e6efb['CUrlR'](_0x5b6050+_0x19974f,_0x11c1bf),_0x52a7aa=_0x4e6efb[_0x53d1f6(0xbb)](findClusterEnd,_0x2d1948,_0x3584f7,_0x5ab66c,_0x11c1bf);let _0x53fa3d=_0x3584f7,_0x2c1f6c=0x0,_0x40a276=0x2,_0x3a43c4=![],_0x309bb5=Buffer[_0x53d1f6(0xbc)](0x0),_0x1c4bcd=Buffer['alloc'](0x0);while(_0x4e6efb[_0x53d1f6(0xd8)](_0x53fa3d,_0x52a7aa)){const [_0x5bdd0c,_0x1fbfef]=_0x4e6efb[_0x53d1f6(0xca)](readId,_0x2d1948,_0x53fa3d),[_0x2229fc,_0x293502]=readVint(_0x2d1948,_0x53fa3d+_0x1fbfef);if(_0x4e6efb[_0x53d1f6(0xbd)](_0x5bdd0c,ID_TIMESTAMP)){_0x2c1f6c=readUint(_0x2d1948,_0x4e6efb['CUrlR'](_0x53fa3d+_0x1fbfef,_0x293502),_0x2229fc),_0x40a276=_0x2229fc,_0x3a43c4=!![],_0x309bb5=_0x2d1948['slice'](_0x3584f7,_0x53fa3d);const _0x1dace9=_0x53fa3d+_0x1fbfef+_0x293502+_0x2229fc;_0x1c4bcd=_0x2d1948['slice'](_0x1dace9,_0x52a7aa);break;}if(_0x5bdd0c===ID_CLUSTER)break;if(isUnknownSize(_0x2229fc,_0x293502))break;_0x53fa3d+=_0x1fbfef+_0x293502+_0x2229fc;}!_0x3a43c4&&(_0x1c4bcd=_0x2d1948[_0x53d1f6(0xc3)](_0x3584f7,_0x52a7aa));let _0x31de42=_0x2c1f6c;_0x53fa3d=_0x3584f7;while(_0x53fa3d<_0x52a7aa){const [_0x3708e7,_0x24cbce]=_0x4e6efb['ikMJf'](readId,_0x2d1948,_0x53fa3d),[_0xcf79d9,_0x3c0f78]=_0x4e6efb[_0x53d1f6(0xcd)](readVint,_0x2d1948,_0x53fa3d+_0x24cbce);if(_0x4e6efb[_0x53d1f6(0xdf)](_0x3708e7,ID_SIMPLE_BLOCK)&&_0xcf79d9>=0x4){const _0x5711c1=_0x4e6efb[_0x53d1f6(0xed)](_0x4e6efb[_0x53d1f6(0xba)](_0x53fa3d,_0x24cbce),_0x3c0f78),[,_0x21763e]=_0x4e6efb['TvMyK'](readVint,_0x2d1948,_0x5711c1),_0x141de5=_0x2d1948[_0x53d1f6(0x101)](_0x4e6efb[_0x53d1f6(0xd0)](_0x5711c1,_0x21763e)),_0x2e6a61=_0x4e6efb[_0x53d1f6(0xd0)](_0x2c1f6c,_0x141de5);if(_0x2e6a61>_0x31de42)_0x31de42=_0x2e6a61;}if(_0x4e6efb[_0x53d1f6(0xc7)](_0x3708e7,ID_CLUSTER))break;if(_0x4e6efb['qskgB'](isUnknownSize,_0xcf79d9,_0x3c0f78))break;_0x53fa3d+=_0x4e6efb[_0x53d1f6(0xba)](_0x4e6efb['XzlLJ'](_0x24cbce,_0x3c0f78),_0xcf79d9);}_0x25ba0f[_0x53d1f6(0xb4)]({'timestamp':_0x2c1f6c,'maxTicks':_0x31de42,'bodyBeforeTimestamp':_0x309bb5,'bodyAfterTimestamp':_0x1c4bcd,'timestampElementSize':_0x40a276}),_0x481d2f=_0x52a7aa;}return _0x25ba0f;}function parseWebm(_0x17671e){const _0x1b517f=_0x59ce,_0x34dff6={'DoNSg':function(_0x36e0aa,_0x385929){return _0x36e0aa+_0x385929;},'MwxXD':function(_0xc7085f,_0x4caaf7,_0xcd338){return _0xc7085f(_0x4caaf7,_0xcd338);},'zaqaT':function(_0x5e28c4,_0xeb236d){return _0x5e28c4+_0xeb236d;},'jizom':function(_0x8a1a2b,_0x54d96e,_0xbff917){return _0x8a1a2b(_0x54d96e,_0xbff917);},'cikOG':function(_0x111545,_0x179aa2){return _0x111545>_0x179aa2;}};let _0x4120d4=0x0;const [,_0x376538]=readId(_0x17671e,_0x4120d4),[_0x3f2f9f,_0x31fd98]=readVint(_0x17671e,_0x4120d4+_0x376538);_0x4120d4+=_0x34dff6[_0x1b517f(0xf4)](_0x376538,_0x31fd98)+_0x3f2f9f;const [_0x163a4b,_0x58b8fe]=_0x34dff6[_0x1b517f(0x100)](readId,_0x17671e,_0x4120d4);if(_0x163a4b!==ID_SEGMENT)return null;const [,_0x4fe457]=_0x34dff6['MwxXD'](readVint,_0x17671e,_0x34dff6['zaqaT'](_0x4120d4,_0x58b8fe)),_0x451227=_0x34dff6[_0x1b517f(0xce)](_0x4120d4,_0x58b8fe)+_0x4fe457,_0x8ac1ef=findTimestampScale(_0x17671e,_0x451227),_0x2bcdc9=_0x34dff6[_0x1b517f(0x100)](findFirstClusterOffset,_0x17671e,_0x451227),_0x173abe=_0x17671e['slice'](0x0,_0x2bcdc9),_0x4f981d=_0x34dff6[_0x1b517f(0xde)](extractClusters,_0x17671e,_0x8ac1ef);let _0x59c44c=0x0;for(const _0x2af796 of _0x4f981d){if(_0x34dff6['cikOG'](_0x2af796[_0x1b517f(0xf6)],_0x59c44c))_0x59c44c=_0x2af796['maxTicks'];}return{'header':_0x173abe,'clusters':_0x4f981d,'timestampScale':_0x8ac1ef,'maxTimestampTicks':_0x59c44c};}function buildCluster(_0x5a14f4,_0x1307bc,_0x43aad4){const _0x685d28=_0x59ce,_0x33172e={'AboDr':function(_0x457306,_0xd9a14,_0x2c0795){return _0x457306(_0xd9a14,_0x2c0795);}},_0x310a53=Buffer[_0x685d28(0xc5)]([0x1f,0x43,0xb6,0x75]),_0x9942bc=Math[_0x685d28(0xe6)](0x4,uintSize(_0x5a14f4)),_0x5eb640=Buffer[_0x685d28(0xe1)]([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x9942bc),_0x33172e[_0x685d28(0xdc)](writeUint,_0x5a14f4,_0x9942bc)]),_0x2292bd=Buffer[_0x685d28(0xe1)]([_0x1307bc,_0x5eb640,_0x43aad4]),_0x32bd2e=writeVint(_0x2292bd[_0x685d28(0xef)]);return Buffer['concat']([_0x310a53,_0x32bd2e,_0x2292bd]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x1d49e4){const _0x376bd5=_0x59ce,_0x36d6ae={'WznOx':function(_0x41e3fc,_0x221381,_0x2ccefd){return _0x41e3fc(_0x221381,_0x2ccefd);},'QzDHD':function(_0xd6119a,_0x1846c5){return _0xd6119a+_0x1846c5;},'JDQxH':function(_0x68d43f,_0x399737,_0x4f7c6c){return _0x68d43f(_0x399737,_0x4f7c6c);},'JRGow':function(_0x22b546,_0xc90183){return _0x22b546+_0xc90183;},'tBmOP':function(_0x20d4a0,_0x53822c){return _0x20d4a0+_0x53822c;},'JkiDb':function(_0x45e7e0,_0xe3ae29){return _0x45e7e0(_0xe3ae29);},'DMBAt':function(_0x37a8ef,_0x121d95){return _0x37a8ef<_0x121d95;},'VdcAu':function(_0xef9bc4,_0x5dcff2,_0x5140c0){return _0xef9bc4(_0x5dcff2,_0x5140c0);},'EyWwx':function(_0x53dfb8,_0x3b8675){return _0x53dfb8+_0x3b8675;},'zLIOk':function(_0x20ec16,_0x1753b0,_0x3aa41a){return _0x20ec16(_0x1753b0,_0x3aa41a);},'mRLpB':function(_0x1fe988,_0x10db27){return _0x1fe988===_0x10db27;},'krEhT':function(_0x4db6de,_0xe150f3){return _0x4db6de<_0xe150f3;},'XYyuS':function(_0x55b9c2,_0xa9f090){return _0x55b9c2+_0xa9f090;},'aVWAl':function(_0x435832,_0x20215f){return _0x435832+_0x20215f;}},_0x2a7737=Buffer[_0x376bd5(0xc5)](_0x1d49e4);let _0x215dd9=0x0;const [,_0x248992]=_0x36d6ae[_0x376bd5(0xf8)](readId,_0x2a7737,_0x215dd9),[_0x249c2e,_0x149dc9]=_0x36d6ae['WznOx'](readVint,_0x2a7737,_0x215dd9+_0x248992),_0x581bb6=_0x36d6ae[_0x376bd5(0xe9)](_0x215dd9+_0x248992+_0x149dc9,_0x249c2e),[,_0x5aa559]=readId(_0x2a7737,_0x581bb6),[,_0x2a73a7]=_0x36d6ae['JDQxH'](readVint,_0x2a7737,_0x36d6ae[_0x376bd5(0xbf)](_0x581bb6,_0x5aa559)),_0x274f28=_0x36d6ae[_0x376bd5(0xb7)](_0x581bb6,_0x5aa559)+_0x2a73a7,_0x1a548a=_0x36d6ae[_0x376bd5(0xd4)](writeUnknownSizeVint,_0x2a73a7);_0x1a548a[_0x376bd5(0xf7)](_0x2a7737,_0x36d6ae['QzDHD'](_0x581bb6,_0x5aa559));let _0x287fa0=_0x274f28;const _0x236312=Math[_0x376bd5(0xd7)](_0x2a7737[_0x376bd5(0xef)],_0x36d6ae[_0x376bd5(0xb7)](_0x274f28,0x2710));while(_0x36d6ae[_0x376bd5(0xee)](_0x287fa0,_0x236312)){const [_0x213858,_0x2a4df2]=_0x36d6ae[_0x376bd5(0xf8)](readId,_0x2a7737,_0x287fa0),[_0x146842,_0x1e2304]=_0x36d6ae[_0x376bd5(0xcf)](readVint,_0x2a7737,_0x36d6ae['EyWwx'](_0x287fa0,_0x2a4df2));if(_0x213858===ID_CLUSTER)break;if(_0x36d6ae[_0x376bd5(0xc2)](isUnknownSize,_0x146842,_0x1e2304))break;if(_0x36d6ae[_0x376bd5(0xb2)](_0x213858,ID_INFO)){const _0x4534a8=_0x36d6ae['tBmOP'](_0x287fa0+_0x2a4df2,_0x1e2304),_0x451759=_0x4534a8+_0x146842,_0x1dbc36=[];let _0xa4e775=_0x4534a8;while(_0x36d6ae[_0x376bd5(0xb8)](_0xa4e775,_0x451759)){const [_0x24b552,_0x5b22f0]=readId(_0x2a7737,_0xa4e775),[_0x55df21,_0x4c3bf3]=readVint(_0x2a7737,_0xa4e775+_0x5b22f0),_0x2f8280=_0x36d6ae[_0x376bd5(0xb7)](_0x36d6ae['XYyuS'](_0x5b22f0,_0x4c3bf3),_0x55df21);_0x24b552!==ID_DURATION&&_0x1dbc36['push'](_0x2a7737[_0x376bd5(0xc3)](_0xa4e775,_0x36d6ae['aVWAl'](_0xa4e775,_0x2f8280))),_0xa4e775+=_0x2f8280;}const _0x5b861e=Buffer['concat'](_0x1dbc36),_0x49467e=Buffer['concat']([_0x2a7737['slice'](_0x287fa0,_0x36d6ae[_0x376bd5(0xb7)](_0x287fa0,_0x2a4df2)),writeVint(_0x5b861e[_0x376bd5(0xef)],_0x1e2304)]);return Buffer['concat']([_0x2a7737[_0x376bd5(0xc3)](0x0,_0x287fa0),_0x49467e,_0x5b861e,_0x2a7737[_0x376bd5(0xc3)](_0x451759)]);}_0x287fa0+=_0x2a4df2+_0x1e2304+_0x146842;}return _0x2a7737;}export function stitchWebmFiles(_0x7f2de1,_0x423816){const _0x5f53ff=_0x59ce,_0x36498f={'SzvWI':function(_0x3a04b4,_0x4a018b){return _0x3a04b4+_0x4a018b;},'BEbNi':function(_0x756036,_0x301507,_0x2ceea5,_0xab05a9){return _0x756036(_0x301507,_0x2ceea5,_0xab05a9);}};if(_0x7f2de1['length']<=0x1)return![];const _0x20bb25=[];for(const _0xb60a5d of _0x7f2de1){const _0x3df7b6=readFileSync(_0xb60a5d),_0xc93251=parseWebm(_0x3df7b6);if(!_0xc93251||_0xc93251['clusters'][_0x5f53ff(0xef)]===0x0)return![];_0x20bb25[_0x5f53ff(0xb4)](_0xc93251);}const _0x1afe3f=_0x20bb25[0x0],_0x530f81=rebuildHeaderWithoutDuration(_0x1afe3f[_0x5f53ff(0xc8)]),_0x10cff5=[_0x530f81];let _0x29451c=0x0;for(let _0x289686=0x0;_0x289686<_0x20bb25[_0x5f53ff(0xef)];_0x289686++){const _0x572aaf=_0x20bb25[_0x289686];for(const _0x1c9201 of _0x572aaf[_0x5f53ff(0xda)]){const _0x48be30=_0x36498f[_0x5f53ff(0xf0)](_0x1c9201['timestamp'],_0x29451c);_0x10cff5[_0x5f53ff(0xb4)](_0x36498f['BEbNi'](buildCluster,_0x48be30,_0x1c9201['bodyBeforeTimestamp'],_0x1c9201['bodyAfterTimestamp']));}const _0x539bd7=0x1e;_0x29451c+=_0x572aaf['maxTimestampTicks']+_0x539bd7;}return writeFileSync(_0x423816,Buffer[_0x5f53ff(0xe1)](_0x10cff5)),!![];}if(process['argv'][0x1]?.[_0x75aa3a(0xd3)](_0x75aa3a(0xb9))||process[_0x75aa3a(0xc9)][0x1]?.[_0x75aa3a(0xd3)](_0x75aa3a(0xe7))){const args=process[_0x75aa3a(0xc9)]['slice'](0x2);args['length']<0x3&&(console[_0x75aa3a(0xf2)](_0x75aa3a(0xc0)),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x75aa3a(0xd9)+inputs['length']+_0x75aa3a(0xe2)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
1
+ const _0x58d46a=_0x53b7;(function(_0x36c768,_0x4b89e6){const _0x4f6588=_0x53b7,_0x18dc6c=_0x36c768();while(!![]){try{const _0xac0774=-parseInt(_0x4f6588(0x1e8))/0x1*(parseInt(_0x4f6588(0x1dc))/0x2)+-parseInt(_0x4f6588(0x1d4))/0x3+-parseInt(_0x4f6588(0x204))/0x4+parseInt(_0x4f6588(0x1d9))/0x5+parseInt(_0x4f6588(0x1d5))/0x6*(parseInt(_0x4f6588(0x1d7))/0x7)+parseInt(_0x4f6588(0x208))/0x8*(parseInt(_0x4f6588(0x203))/0x9)+parseInt(_0x4f6588(0x209))/0xa;if(_0xac0774===_0x4b89e6)break;else _0x18dc6c['push'](_0x18dc6c['shift']());}catch(_0x2f7e14){_0x18dc6c['push'](_0x18dc6c['shift']());}}}(_0xc7d8,0xd3b5c));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(_0x249b92,_0x2f830b){const _0x230b90=_0x53b7,_0x4f4d5e={'yyzTS':function(_0x220df7,_0x3f980d){return _0x220df7>_0x3f980d;},'MIgKS':function(_0x54a632,_0x1096ed){return _0x54a632+_0x1096ed;},'GntOV':function(_0x2a8065,_0x4168b1){return _0x2a8065&_0x4168b1;},'POwdd':function(_0x6dc0ec,_0x2c8b07){return _0x6dc0ec<_0x2c8b07;},'ykPNg':function(_0x4b8f2d,_0x282167){return _0x4b8f2d*_0x282167;}};if(_0x2f830b>=_0x249b92[_0x230b90(0x1f0)])return[0x0,0x0];const _0x2b10c3=_0x249b92[_0x2f830b];let _0x5bc7f7=0x1,_0x38e07b=0x80;while(_0x5bc7f7<=0x8&&!(_0x2b10c3&_0x38e07b)){_0x5bc7f7++,_0x38e07b>>=0x1;}if(_0x4f4d5e[_0x230b90(0x1ef)](_0x4f4d5e['MIgKS'](_0x2f830b,_0x5bc7f7),_0x249b92['length']))return[0x0,0x0];let _0x53c6ae=_0x4f4d5e[_0x230b90(0x20e)](_0x2b10c3,_0x38e07b-0x1);for(let _0x3d5653=0x1;_0x4f4d5e['POwdd'](_0x3d5653,_0x5bc7f7);_0x3d5653++){_0x53c6ae=_0x4f4d5e['ykPNg'](_0x53c6ae,0x100)+_0x249b92[_0x2f830b+_0x3d5653];}return[_0x53c6ae,_0x5bc7f7];}function _0xc7d8(){const _0x33f1b3=['83276ieOzGr','zylyH','vuybp','GUtbj','argv','TkaUP','log','SfuXn','concat','OZIuf','clusters','XCgoM','34gNdMLl','max','maxTicks','xaKRr','mSzdj','WwHXj','\x20files\x20->\x20','yyzTS','length','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','jSvfU','pow','kvXrO','slice','jTWyc','qesEG','Cazcw','alloc','SXzcc','Oewyw','hzaAU','endsWith','hNZpy','DVrNv','ptpGK','Trssu','afUbi','6489990tqmSYY','2189560zhjFwK','bodyBeforeTimestamp','floor','KaekI','8ObZgmn','12632210WRHGwO','kSvtd','IUrSS','wwTsK','has','GntOV','agHjD','oiVMR','HnbhO','RHbRW','from','mPFlk','TDojK','fccht','JQfkt','rrTqE','bodyAfterTimestamp','UGFtY','zDPcb','push','pYWYe','snoSh','CKXvq','maxTimestampTicks','3102795kBfAjU','552000qOrYcM','readInt16BE','63ExkFst','LMvZx','5260900dTVjmc','sbPpb','header'];_0xc7d8=function(){return _0x33f1b3;};return _0xc7d8();}function readId(_0x4d8ef8,_0x17b54d){const _0x11a8a9=_0x53b7,_0x1548ae={'SfuXn':function(_0x591153,_0x47ee48){return _0x591153>=_0x47ee48;},'Oewyw':function(_0x28b285,_0x56b1de){return _0x28b285>_0x56b1de;},'GUtbj':function(_0x1fea60,_0x44b0c3){return _0x1fea60+_0x44b0c3;}};if(_0x1548ae[_0x11a8a9(0x1e3)](_0x17b54d,_0x4d8ef8[_0x11a8a9(0x1f0)]))return[0x0,0x0];const _0x5db2c6=_0x4d8ef8[_0x17b54d];let _0xe8f3d6;if(_0x5db2c6>=0x80)_0xe8f3d6=0x1;else{if(_0x5db2c6>=0x40)_0xe8f3d6=0x2;else{if(_0x5db2c6>=0x20)_0xe8f3d6=0x3;else{if(_0x1548ae[_0x11a8a9(0x1e3)](_0x5db2c6,0x10))_0xe8f3d6=0x4;else return[_0x5db2c6,0x1];}}}if(_0x1548ae[_0x11a8a9(0x1fb)](_0x1548ae[_0x11a8a9(0x1df)](_0x17b54d,_0xe8f3d6),_0x4d8ef8['length']))return[0x0,0x0];let _0x1ee928=0x0;for(let _0x171ddd=0x0;_0x171ddd<_0xe8f3d6;_0x171ddd++){_0x1ee928=_0x1548ae[_0x11a8a9(0x1df)](_0x1ee928*0x100,_0x4d8ef8[_0x17b54d+_0x171ddd]);}return[_0x1ee928,_0xe8f3d6];}function readUint(_0x252443,_0x142292,_0x544c88){const _0x3b8784=_0x53b7,_0x5dab48={'QaAta':function(_0x1c8363,_0xcaed83){return _0x1c8363<_0xcaed83;},'xaKRr':function(_0x1d9014,_0x560de4){return _0x1d9014*_0x560de4;}};let _0x4d9373=0x0;for(let _0x3baa24=0x0;_0x5dab48['QaAta'](_0x3baa24,_0x544c88);_0x3baa24++){_0x4d9373=_0x5dab48[_0x3b8784(0x1eb)](_0x4d9373,0x100)+_0x252443[_0x142292+_0x3baa24];}return _0x4d9373;}function isUnknownSize(_0x15e377,_0x28834a){const _0x50e94f=_0x53b7,_0x5755b4={'WwHXj':function(_0x2b892c,_0x1b2f02){return _0x2b892c===_0x1b2f02;},'RHbRW':function(_0x190a18,_0x5132c8){return _0x190a18*_0x5132c8;}};return _0x5755b4[_0x50e94f(0x1ed)](_0x15e377,Math[_0x50e94f(0x1f3)](0x2,_0x5755b4[_0x50e94f(0x1c5)](0x7,_0x28834a))-0x1);}function writeVint(_0x1cb6dd,_0x2fe55c){const _0x190b11=_0x53b7,_0x4d16d7={'ptpGK':function(_0x1e590,_0x276679){return _0x1e590-_0x276679;},'vuybp':function(_0xba1e43,_0x59f222){return _0xba1e43*_0x59f222;},'jSvfU':function(_0x32072c,_0x4f1ba8){return _0x32072c>=_0x4f1ba8;},'hzaAU':function(_0x1287fc,_0x3e8639){return _0x1287fc&_0x3e8639;},'fccht':function(_0x1a9e58,_0x376575){return _0x1a9e58/_0x376575;},'zylyH':function(_0x4bb7bd,_0x5acd17){return _0x4bb7bd<<_0x5acd17;}};let _0x52cb21=_0x2fe55c||0x1;while(_0x4d16d7[_0x190b11(0x200)](Math['pow'](0x2,_0x4d16d7[_0x190b11(0x1de)](0x7,_0x52cb21)),0x2)<_0x1cb6dd)_0x52cb21++;const _0x5a68c6=Buffer[_0x190b11(0x1f9)](_0x52cb21);for(let _0x5b9a75=_0x52cb21-0x1;_0x4d16d7[_0x190b11(0x1f2)](_0x5b9a75,0x0);_0x5b9a75--){_0x5a68c6[_0x5b9a75]=_0x4d16d7[_0x190b11(0x1fc)](_0x1cb6dd,0xff),_0x1cb6dd=Math[_0x190b11(0x206)](_0x4d16d7[_0x190b11(0x1c9)](_0x1cb6dd,0x100));}return _0x5a68c6[0x0]|=_0x4d16d7[_0x190b11(0x1dd)](0x1,_0x4d16d7['ptpGK'](0x8,_0x52cb21)),_0x5a68c6;}function writeUint(_0x23c76e,_0x947800){const _0xa97355=_0x53b7,_0x5aac01={'VNzVD':function(_0x610d2d,_0x384cce){return _0x610d2d-_0x384cce;},'qxTuU':function(_0x3c8979,_0x259ea1){return _0x3c8979&_0x259ea1;}},_0x2f1207=Buffer['alloc'](_0x947800);for(let _0x2c749f=_0x5aac01['VNzVD'](_0x947800,0x1);_0x2c749f>=0x0;_0x2c749f--){_0x2f1207[_0x2c749f]=_0x5aac01['qxTuU'](_0x23c76e,0xff),_0x23c76e=Math[_0xa97355(0x206)](_0x23c76e/0x100);}return _0x2f1207;}function writeUnknownSizeVint(_0x4da35b){const _0xefc1cf=_0x53b7,_0x224df1={'SfKzh':function(_0x2a3822,_0x2c900e){return _0x2a3822>>_0x2c900e;},'agHjD':function(_0x771331,_0x23f699){return _0x771331-_0x23f699;}},_0x594c04=Buffer[_0xefc1cf(0x1f9)](_0x4da35b,0xff);return _0x594c04[0x0]=_0x224df1['SfKzh'](0xff,_0x224df1[_0xefc1cf(0x20f)](_0x4da35b,0x1)),_0x594c04;}function uintSize(_0x204817){const _0x4ff311=_0x53b7,_0x5313ca={'mSzdj':function(_0x44fc28,_0x57daba){return _0x44fc28===_0x57daba;},'zDPcb':function(_0x15b6fa,_0x53732c){return _0x15b6fa/_0x53732c;}};if(_0x5313ca[_0x4ff311(0x1ec)](_0x204817,0x0))return 0x1;let _0x2e282f=0x0,_0x3c3d5b=_0x204817;while(_0x3c3d5b>0x0){_0x2e282f++,_0x3c3d5b=Math[_0x4ff311(0x206)](_0x5313ca[_0x4ff311(0x1ce)](_0x3c3d5b,0x100));}return _0x2e282f;}function findTimestampScale(_0x3e9410,_0x45adbd){const _0x11aa6d=_0x53b7,_0x1fc5da={'wWSPx':function(_0x4e8cc1,_0x42810f){return _0x4e8cc1<_0x42810f;},'xwfls':function(_0x3f4149,_0x3bd3aa,_0x411072){return _0x3f4149(_0x3bd3aa,_0x411072);},'jTWyc':function(_0x42b52d,_0x4b5157){return _0x42b52d+_0x4b5157;},'hNZpy':function(_0xa653ef,_0x3ad271){return _0xa653ef+_0x3ad271;}};let _0x1d64f0=_0x45adbd;const _0x1a3dce=Math['min'](_0x3e9410['length'],_0x45adbd+0x2710);while(_0x1fc5da['wWSPx'](_0x1d64f0,_0x1a3dce)){const [_0x26b22d,_0x36b63f]=_0x1fc5da['xwfls'](readId,_0x3e9410,_0x1d64f0),[_0x3a7bf4,_0x48c3f8]=_0x1fc5da['xwfls'](readVint,_0x3e9410,_0x1d64f0+_0x36b63f);if(_0x26b22d===ID_INFO){let _0x58f749=_0x1d64f0+_0x36b63f+_0x48c3f8;const _0x2e4fab=_0x1fc5da[_0x11aa6d(0x1f6)](_0x58f749,_0x3a7bf4);while(_0x58f749<_0x2e4fab){const [_0x2426a8,_0x2b3cc2]=_0x1fc5da['xwfls'](readId,_0x3e9410,_0x58f749),[_0x10cf44,_0x125c44]=_0x1fc5da['xwfls'](readVint,_0x3e9410,_0x58f749+_0x2b3cc2);if(_0x2426a8===ID_TIMESTAMP_SCALE)return readUint(_0x3e9410,_0x58f749+_0x2b3cc2+_0x125c44,_0x10cf44);_0x58f749+=_0x1fc5da[_0x11aa6d(0x1f6)](_0x2b3cc2+_0x125c44,_0x10cf44);}break;}if(_0x26b22d===ID_CLUSTER)break;if(isUnknownSize(_0x3a7bf4,_0x48c3f8))break;_0x1d64f0+=_0x1fc5da[_0x11aa6d(0x1fe)](_0x36b63f+_0x48c3f8,_0x3a7bf4);}return 0xf4240;}function findFirstClusterOffset(_0x33ce29,_0x4d9d0d){const _0x59aac4=_0x53b7,_0x16fa1d={'rrTqE':function(_0x568252,_0xb774a9,_0x34ca6f){return _0x568252(_0xb774a9,_0x34ca6f);},'FWpTc':function(_0x33c9e0,_0x314ca8){return _0x33c9e0===_0x314ca8;},'bHdVe':function(_0x41c99f,_0x481027){return _0x41c99f+_0x481027;}};let _0xd9e23b=_0x4d9d0d;while(_0xd9e23b<_0x33ce29['length']){const [_0x3be74e,_0x776000]=_0x16fa1d['rrTqE'](readId,_0x33ce29,_0xd9e23b);if(_0x16fa1d['FWpTc'](_0x3be74e,ID_CLUSTER))return _0xd9e23b;const [_0x4a46e4,_0x3976bc]=_0x16fa1d[_0x59aac4(0x1cb)](readVint,_0x33ce29,_0x16fa1d['bHdVe'](_0xd9e23b,_0x776000));if(isUnknownSize(_0x4a46e4,_0x3976bc))return _0xd9e23b;_0xd9e23b+=_0x16fa1d['bHdVe'](_0x776000+_0x3976bc,_0x4a46e4);}return _0x33ce29[_0x59aac4(0x1f0)];}function findClusterEnd(_0x1ac931,_0x19054e,_0x48ba7e,_0x190387){const _0x5a408e=_0x53b7,_0x28b77b={'RADhP':function(_0x271274,_0x421b3e,_0x381ccd){return _0x271274(_0x421b3e,_0x381ccd);},'oiVMR':function(_0x448f1d,_0x57390f){return _0x448f1d<_0x57390f;},'LMvZx':function(_0xad3a4d,_0xde2acf,_0x1972f3){return _0xad3a4d(_0xde2acf,_0x1972f3);},'sbPpb':function(_0x26e6e3,_0x287ec2){return _0x26e6e3+_0x287ec2;}};if(!_0x28b77b['RADhP'](isUnknownSize,_0x48ba7e,_0x190387))return _0x19054e+_0x48ba7e;const _0x15de58=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4355ca=_0x19054e;while(_0x28b77b[_0x5a408e(0x210)](_0x4355ca,_0x1ac931[_0x5a408e(0x1f0)]-0x4)){const [_0x2c6580,_0x50fc04]=_0x28b77b[_0x5a408e(0x1d8)](readId,_0x1ac931,_0x4355ca);if(_0x15de58[_0x5a408e(0x20d)](_0x2c6580))return _0x4355ca;const [_0x2251b4,_0x13f06e]=readVint(_0x1ac931,_0x28b77b[_0x5a408e(0x1da)](_0x4355ca,_0x50fc04));if(isUnknownSize(_0x2251b4,_0x13f06e))return _0x1ac931['length'];_0x4355ca+=_0x28b77b[_0x5a408e(0x1da)](_0x50fc04,_0x13f06e)+_0x2251b4;}return _0x1ac931['length'];}function _0x53b7(_0x4e3cb7,_0x4e35b3){_0x4e3cb7=_0x4e3cb7-0x1c5;const _0xc7d8bc=_0xc7d8();let _0x53b7f2=_0xc7d8bc[_0x4e3cb7];return _0x53b7f2;}function extractClusters(_0x5096a6,_0x10a87f){const _0x2df84f=_0x53b7,_0x3ced5a={'KaekI':function(_0x4e8d52,_0x4b5591){return _0x4e8d52<_0x4b5591;},'qesEG':function(_0x3e2cb4,_0x5b46e2,_0x456d24){return _0x3e2cb4(_0x5b46e2,_0x456d24);},'UGFtY':function(_0x51cb1d,_0x3aefff){return _0x51cb1d+_0x3aefff;},'eBPNZ':function(_0x5099a0,_0x3988e9){return _0x5099a0+_0x3988e9;},'TDojK':function(_0x308a31,_0xa7e069,_0x378978,_0x146ce5,_0x1cf26e){return _0x308a31(_0xa7e069,_0x378978,_0x146ce5,_0x1cf26e);},'IUrSS':function(_0x334226,_0x18e234){return _0x334226<_0x18e234;},'jHfBu':function(_0x3e1f83,_0x121402,_0x20f485){return _0x3e1f83(_0x121402,_0x20f485);},'OZIuf':function(_0x553b58,_0x5a07fd){return _0x553b58===_0x5a07fd;},'hCDcY':function(_0x3cd7d6,_0x2d9b4c,_0x3dc84d,_0x51cc17){return _0x3cd7d6(_0x2d9b4c,_0x3dc84d,_0x51cc17);},'jrtMA':function(_0x90aeec,_0x29b803){return _0x90aeec+_0x29b803;},'NIMRL':function(_0x394b2d,_0x19bcb1,_0x50b074){return _0x394b2d(_0x19bcb1,_0x50b074);},'gToYK':function(_0x3a51ff,_0x4179c8){return _0x3a51ff>=_0x4179c8;},'CKXvq':function(_0x5b2b15,_0x2f0a68){return _0x5b2b15+_0x2f0a68;},'Trssu':function(_0x16963f,_0x425569,_0x59382e){return _0x16963f(_0x425569,_0x59382e);}},_0x19f170=[],_0x527390=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x501882=0x0;while(_0x3ced5a[_0x2df84f(0x207)](_0x501882,_0x5096a6[_0x2df84f(0x1f0)])){const _0x293102=_0x5096a6['indexOf'](_0x527390,_0x501882);if(_0x293102===-0x1)break;const [_0x2efcd4,_0x7752fc]=readId(_0x5096a6,_0x293102);if(_0x2efcd4!==ID_CLUSTER){_0x501882=_0x293102+0x1;continue;}const [_0x172ead,_0x236ecc]=_0x3ced5a['qesEG'](readVint,_0x5096a6,_0x3ced5a[_0x2df84f(0x1cd)](_0x293102,_0x7752fc)),_0x24900c=_0x3ced5a['eBPNZ'](_0x293102+_0x7752fc,_0x236ecc),_0x55b8ed=_0x3ced5a[_0x2df84f(0x1c8)](findClusterEnd,_0x5096a6,_0x24900c,_0x172ead,_0x236ecc);let _0x564868=_0x24900c,_0x4e8d88=0x0,_0x3dac10=0x2,_0x53228f=![],_0x2cae0a=Buffer[_0x2df84f(0x1f9)](0x0),_0x2f4423=Buffer[_0x2df84f(0x1f9)](0x0);while(_0x3ced5a[_0x2df84f(0x20b)](_0x564868,_0x55b8ed)){const [_0x3f03dd,_0x3d4d08]=_0x3ced5a[_0x2df84f(0x1f7)](readId,_0x5096a6,_0x564868),[_0x46541c,_0xad1efe]=_0x3ced5a['jHfBu'](readVint,_0x5096a6,_0x564868+_0x3d4d08);if(_0x3ced5a['OZIuf'](_0x3f03dd,ID_TIMESTAMP)){_0x4e8d88=_0x3ced5a['hCDcY'](readUint,_0x5096a6,_0x564868+_0x3d4d08+_0xad1efe,_0x46541c),_0x3dac10=_0x46541c,_0x53228f=!![],_0x2cae0a=_0x5096a6['slice'](_0x24900c,_0x564868);const _0x5d47e6=_0x3ced5a['jrtMA'](_0x564868,_0x3d4d08)+_0xad1efe+_0x46541c;_0x2f4423=_0x5096a6['slice'](_0x5d47e6,_0x55b8ed);break;}if(_0x3ced5a['OZIuf'](_0x3f03dd,ID_CLUSTER))break;if(_0x3ced5a[_0x2df84f(0x1f7)](isUnknownSize,_0x46541c,_0xad1efe))break;_0x564868+=_0x3d4d08+_0xad1efe+_0x46541c;}!_0x53228f&&(_0x2f4423=_0x5096a6['slice'](_0x24900c,_0x55b8ed));let _0x52db8f=_0x4e8d88;_0x564868=_0x24900c;while(_0x3ced5a[_0x2df84f(0x207)](_0x564868,_0x55b8ed)){const [_0x218c2d,_0x1b9cff]=_0x3ced5a['NIMRL'](readId,_0x5096a6,_0x564868),[_0x49bc06,_0x6ab660]=readVint(_0x5096a6,_0x564868+_0x1b9cff);if(_0x3ced5a[_0x2df84f(0x1e5)](_0x218c2d,ID_SIMPLE_BLOCK)&&_0x3ced5a['gToYK'](_0x49bc06,0x4)){const _0x54ec0d=_0x3ced5a[_0x2df84f(0x1d2)](_0x3ced5a[_0x2df84f(0x1d2)](_0x564868,_0x1b9cff),_0x6ab660),[,_0x562fd2]=_0x3ced5a[_0x2df84f(0x201)](readVint,_0x5096a6,_0x54ec0d),_0x2c4b9b=_0x5096a6[_0x2df84f(0x1d6)](_0x54ec0d+_0x562fd2),_0x30e8f6=_0x3ced5a['eBPNZ'](_0x4e8d88,_0x2c4b9b);if(_0x30e8f6>_0x52db8f)_0x52db8f=_0x30e8f6;}if(_0x3ced5a['OZIuf'](_0x218c2d,ID_CLUSTER))break;if(isUnknownSize(_0x49bc06,_0x6ab660))break;_0x564868+=_0x1b9cff+_0x6ab660+_0x49bc06;}_0x19f170['push']({'timestamp':_0x4e8d88,'maxTicks':_0x52db8f,'bodyBeforeTimestamp':_0x2cae0a,'bodyAfterTimestamp':_0x2f4423,'timestampElementSize':_0x3dac10}),_0x501882=_0x55b8ed;}return _0x19f170;}function parseWebm(_0x5aa01d){const _0x440333=_0x53b7,_0x13c43b={'uhWtH':function(_0x360a50,_0xdc582a,_0x3d1b78){return _0x360a50(_0xdc582a,_0x3d1b78);},'DcKEa':function(_0x4cc1e8,_0x261c81){return _0x4cc1e8+_0x261c81;},'XCgoM':function(_0x47d8f3,_0x4a846f){return _0x47d8f3+_0x4a846f;},'fRUxB':function(_0x5372e0,_0xb93d14){return _0x5372e0!==_0xb93d14;},'kvXrO':function(_0xbb273f,_0x4b629e){return _0xbb273f+_0x4b629e;},'pYWYe':function(_0x4b2aa7,_0x27f765,_0x9598bb){return _0x4b2aa7(_0x27f765,_0x9598bb);},'TkaUP':function(_0x2f20f7,_0x2d6774){return _0x2f20f7>_0x2d6774;}};let _0x54b761=0x0;const [,_0x2293d5]=readId(_0x5aa01d,_0x54b761),[_0x37b4d4,_0x2d12e9]=_0x13c43b['uhWtH'](readVint,_0x5aa01d,_0x54b761+_0x2293d5);_0x54b761+=_0x13c43b['DcKEa'](_0x13c43b[_0x440333(0x1e7)](_0x2293d5,_0x2d12e9),_0x37b4d4);const [_0x1b81f5,_0x233ce1]=readId(_0x5aa01d,_0x54b761);if(_0x13c43b['fRUxB'](_0x1b81f5,ID_SEGMENT))return null;const [,_0x427e95]=readVint(_0x5aa01d,_0x13c43b[_0x440333(0x1f4)](_0x54b761,_0x233ce1)),_0x5c99e4=_0x54b761+_0x233ce1+_0x427e95,_0xfee550=_0x13c43b[_0x440333(0x1d0)](findTimestampScale,_0x5aa01d,_0x5c99e4),_0x509885=findFirstClusterOffset(_0x5aa01d,_0x5c99e4),_0x2df3fc=_0x5aa01d['slice'](0x0,_0x509885),_0x512c9e=_0x13c43b['uhWtH'](extractClusters,_0x5aa01d,_0xfee550);let _0xe36d3d=0x0;for(const _0x1ecb89 of _0x512c9e){if(_0x13c43b[_0x440333(0x1e1)](_0x1ecb89['maxTicks'],_0xe36d3d))_0xe36d3d=_0x1ecb89[_0x440333(0x1ea)];}return{'header':_0x2df3fc,'clusters':_0x512c9e,'timestampScale':_0xfee550,'maxTimestampTicks':_0xe36d3d};}function buildCluster(_0xd109b4,_0x326e49,_0x1efff5){const _0xd1b23f=_0x53b7,_0x400307={'McBeF':function(_0x2095b8,_0x566be8){return _0x2095b8(_0x566be8);},'CtXrR':function(_0x2c1581,_0x592e05){return _0x2c1581(_0x592e05);}},_0x4e9117=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x24a758=Math[_0xd1b23f(0x1e9)](0x4,_0x400307['McBeF'](uintSize,_0xd109b4)),_0x1f1d15=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x400307['CtXrR'](writeVint,_0x24a758),writeUint(_0xd109b4,_0x24a758)]),_0x2da70d=Buffer[_0xd1b23f(0x1e4)]([_0x326e49,_0x1f1d15,_0x1efff5]),_0x58ff68=writeVint(_0x2da70d['length']);return Buffer['concat']([_0x4e9117,_0x58ff68,_0x2da70d]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x5e950a){const _0x4d1987=_0x53b7,_0x337d53={'mPFlk':function(_0x3d97ea,_0x1553af,_0x1188f9){return _0x3d97ea(_0x1553af,_0x1188f9);},'kSvtd':function(_0xe2b80,_0x3c75e3){return _0xe2b80+_0x3c75e3;},'afUbi':function(_0x37386f,_0x4123ee){return _0x37386f+_0x4123ee;},'snoSh':function(_0x5ab428,_0x29f273){return _0x5ab428(_0x29f273);},'KJJRf':function(_0x998c61,_0x77717c){return _0x998c61+_0x77717c;},'HnbhO':function(_0x4e2926,_0x4baa61){return _0x4e2926<_0x4baa61;},'SPuML':function(_0x4d08d4,_0x507dd8){return _0x4d08d4===_0x507dd8;},'NVVVp':function(_0x366c21,_0xb299d7){return _0x366c21+_0xb299d7;},'Vcpyb':function(_0x353d91,_0x25120b,_0x27b337){return _0x353d91(_0x25120b,_0x27b337);},'VOgMZ':function(_0x3ac2d8,_0xfcb6a9){return _0x3ac2d8!==_0xfcb6a9;},'wwTsK':function(_0x5ed42d,_0x4fc21e){return _0x5ed42d+_0x4fc21e;},'Jodca':function(_0x1a4d81,_0x398e48,_0x3bbfb6){return _0x1a4d81(_0x398e48,_0x3bbfb6);},'VoAOD':function(_0x4e6de7,_0x4802f9){return _0x4e6de7+_0x4802f9;}},_0x1ab262=Buffer[_0x4d1987(0x1c6)](_0x5e950a);let _0x2b2e6f=0x0;const [,_0x6fec4]=readId(_0x1ab262,_0x2b2e6f),[_0x7cd4e,_0x440e1d]=_0x337d53['mPFlk'](readVint,_0x1ab262,_0x2b2e6f+_0x6fec4),_0x1a1975=_0x337d53[_0x4d1987(0x20a)](_0x2b2e6f+_0x6fec4,_0x440e1d)+_0x7cd4e,[,_0x5a679c]=readId(_0x1ab262,_0x1a1975),[,_0x4407b3]=readVint(_0x1ab262,_0x337d53[_0x4d1987(0x202)](_0x1a1975,_0x5a679c)),_0x224710=_0x337d53['kSvtd'](_0x1a1975+_0x5a679c,_0x4407b3),_0x2c2116=_0x337d53[_0x4d1987(0x1d1)](writeUnknownSizeVint,_0x4407b3);_0x2c2116['copy'](_0x1ab262,_0x337d53['KJJRf'](_0x1a1975,_0x5a679c));let _0x2e33ae=_0x224710;const _0x1b9bbe=Math['min'](_0x1ab262[_0x4d1987(0x1f0)],_0x224710+0x2710);while(_0x337d53[_0x4d1987(0x211)](_0x2e33ae,_0x1b9bbe)){const [_0x38a34e,_0x2b4b2b]=readId(_0x1ab262,_0x2e33ae),[_0x3b4f75,_0x5737fa]=_0x337d53[_0x4d1987(0x1c7)](readVint,_0x1ab262,_0x2e33ae+_0x2b4b2b);if(_0x38a34e===ID_CLUSTER)break;if(isUnknownSize(_0x3b4f75,_0x5737fa))break;if(_0x337d53['SPuML'](_0x38a34e,ID_INFO)){const _0x32b3fe=_0x337d53[_0x4d1987(0x20a)](_0x337d53['kSvtd'](_0x2e33ae,_0x2b4b2b),_0x5737fa),_0x588b2a=_0x337d53['NVVVp'](_0x32b3fe,_0x3b4f75),_0x5b3c48=[];let _0x14ba50=_0x32b3fe;while(_0x337d53[_0x4d1987(0x211)](_0x14ba50,_0x588b2a)){const [_0x18f6fc,_0x4139d0]=_0x337d53[_0x4d1987(0x1c7)](readId,_0x1ab262,_0x14ba50),[_0x523606,_0x5ecbc3]=_0x337d53['Vcpyb'](readVint,_0x1ab262,_0x14ba50+_0x4139d0),_0x14aea0=_0x337d53['kSvtd'](_0x337d53['kSvtd'](_0x4139d0,_0x5ecbc3),_0x523606);_0x337d53['VOgMZ'](_0x18f6fc,ID_DURATION)&&_0x5b3c48['push'](_0x1ab262['slice'](_0x14ba50,_0x337d53[_0x4d1987(0x20c)](_0x14ba50,_0x14aea0))),_0x14ba50+=_0x14aea0;}const _0x3d7216=Buffer[_0x4d1987(0x1e4)](_0x5b3c48),_0x495dab=Buffer[_0x4d1987(0x1e4)]([_0x1ab262['slice'](_0x2e33ae,_0x2e33ae+_0x2b4b2b),_0x337d53['Jodca'](writeVint,_0x3d7216[_0x4d1987(0x1f0)],_0x5737fa)]);return Buffer[_0x4d1987(0x1e4)]([_0x1ab262['slice'](0x0,_0x2e33ae),_0x495dab,_0x3d7216,_0x1ab262['slice'](_0x588b2a)]);}_0x2e33ae+=_0x337d53['VoAOD'](_0x2b4b2b,_0x5737fa)+_0x3b4f75;}return _0x1ab262;}export function stitchWebmFiles(_0x599a02,_0x1afae3){const _0x43147a=_0x53b7,_0x4324bf={'SlTJA':function(_0x1c3f72,_0xbbc405){return _0x1c3f72===_0xbbc405;},'JQfkt':function(_0x190dca,_0x59d446){return _0x190dca(_0x59d446);},'DVrNv':function(_0x46ff2b,_0x14454e){return _0x46ff2b<_0x14454e;},'uJLES':function(_0x537be9,_0x1732f4,_0x20e35f,_0x5b9ac1){return _0x537be9(_0x1732f4,_0x20e35f,_0x5b9ac1);},'Cazcw':function(_0x245b21,_0x245092){return _0x245b21+_0x245092;},'SXzcc':function(_0x4f0689,_0x56af03,_0x9a8c2b){return _0x4f0689(_0x56af03,_0x9a8c2b);}};if(_0x599a02['length']<=0x1)return![];const _0x2dc00d=[];for(const _0x1cb46f of _0x599a02){const _0x258bdd=readFileSync(_0x1cb46f),_0x59cb23=parseWebm(_0x258bdd);if(!_0x59cb23||_0x4324bf['SlTJA'](_0x59cb23['clusters']['length'],0x0))return![];_0x2dc00d[_0x43147a(0x1cf)](_0x59cb23);}const _0x160154=_0x2dc00d[0x0],_0xa0f630=_0x4324bf[_0x43147a(0x1ca)](rebuildHeaderWithoutDuration,_0x160154[_0x43147a(0x1db)]),_0x430ae4=[_0xa0f630];let _0x1b15e9=0x0;for(let _0x4742d9=0x0;_0x4324bf[_0x43147a(0x1ff)](_0x4742d9,_0x2dc00d['length']);_0x4742d9++){const _0x199015=_0x2dc00d[_0x4742d9];for(const _0x1e2fe9 of _0x199015[_0x43147a(0x1e6)]){const _0x3adc01=_0x1e2fe9['timestamp']+_0x1b15e9;_0x430ae4[_0x43147a(0x1cf)](_0x4324bf['uJLES'](buildCluster,_0x3adc01,_0x1e2fe9[_0x43147a(0x205)],_0x1e2fe9[_0x43147a(0x1cc)]));}const _0xbf8344=0x1e;_0x1b15e9+=_0x4324bf[_0x43147a(0x1f8)](_0x199015[_0x43147a(0x1d3)],_0xbf8344);}return _0x4324bf[_0x43147a(0x1fa)](writeFileSync,_0x1afae3,Buffer['concat'](_0x430ae4)),!![];}if(process[_0x58d46a(0x1e0)][0x1]?.[_0x58d46a(0x1fd)]('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x58d46a(0x1fd)]('stitchWebmFiles.js')){const args=process['argv'][_0x58d46a(0x1f5)](0x2);args[_0x58d46a(0x1f0)]<0x3&&(console['error'](_0x58d46a(0x1f1)),process['exit'](0x1));const output=args[args[_0x58d46a(0x1f0)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x58d46a(0x1f0)]+_0x58d46a(0x1ee)+output):console[_0x58d46a(0x1e2)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
@@ -1 +1 @@
1
- const _0xe95e8b=_0x38ee;(function(_0x4db1a7,_0x14bb67){const _0x588315=_0x38ee,_0x326082=_0x4db1a7();while(!![]){try{const _0x29bc8d=-parseInt(_0x588315(0x217))/0x1*(parseInt(_0x588315(0x20f))/0x2)+parseInt(_0x588315(0x233))/0x3+-parseInt(_0x588315(0x211))/0x4*(-parseInt(_0x588315(0x221))/0x5)+parseInt(_0x588315(0x228))/0x6+-parseInt(_0x588315(0x1f7))/0x7*(-parseInt(_0x588315(0x1f9))/0x8)+parseInt(_0x588315(0x232))/0x9*(parseInt(_0x588315(0x22a))/0xa)+-parseInt(_0x588315(0x220))/0xb;if(_0x29bc8d===_0x14bb67)break;else _0x326082['push'](_0x326082['shift']());}catch(_0x4d2dad){_0x326082['push'](_0x326082['shift']());}}}(_0x184d,0x8ef24));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x184d(){const _0x5f362e=['XVOBA','phaseStartTimes','isTTY','name','trackCommandError','DEBUG','command_error','delete','aIAqw','trackPhaseEnd','7vSahpp','phaseCounter','3336176ohYKsK','oMwFq','command_end','deviceId','trackCommandEnd','success','commandStartTime','stdout','kxmaZ','isCI','now','trackCommandStart','uLIgg','nodeVersion','NqVhZ','cliVersion','buildEvent','flushing','yjKUD','/api/v1/mcp/cli-telemetry','outcome','GITHUB_ACTIONS','2107532kWTVlY','[telemetry]\x20Sending\x20','368356YfkptD','QsScE','durationMs','commandId','constructor','cwd','1pSXZti','sendBatch','sendImmediate','get','VQsxZ','flush','transport','slice','featureId','28051078CXUFAf','50tXZDqr','checklistItemId','command','length','abort','isTty','utf-8','6028140pleWoZ','MUbyF','380IfpESO','POST','flushAsync','finally','iKOAc','Qdyoh','stringify','set','222363KpuaPt','2723712wYPqeg','buffer','env','VszjD','evaluation','browserSessionId'];_0x184d=function(){return _0x5f362e;};return _0x184d();}let cachedDeviceId=null;function getDeviceId(){const _0xe173b4=_0x38ee,_0x2c1dac={'oMwFq':function(_0x44ee9c,_0x218fbf,_0x86ff1b){return _0x44ee9c(_0x218fbf,_0x86ff1b);},'iKOAc':function(_0x1a0171){return _0x1a0171();},'RnrNT':function(_0x30f59d){return _0x30f59d();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x2b57db=_0x2c1dac[_0xe173b4(0x1fa)](join,_0x2c1dac[_0xe173b4(0x22e)](homedir),'.ranger'),_0x585a07=_0x2c1dac[_0xe173b4(0x1fa)](join,_0x2b57db,'.session');if(existsSync(_0x585a07)){cachedDeviceId=readFileSync(_0x585a07,_0xe173b4(0x227))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x2c1dac['RnrNT'](randomUUID),mkdirSync(_0x2b57db,{'recursive':!![]}),writeFileSync(_0x585a07,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=randomUUID(),cachedDeviceId;}}function _0x38ee(_0x56d3a6,_0x1e2d51){_0x56d3a6=_0x56d3a6-0x1f0;const _0x184d45=_0x184d();let _0x38eed2=_0x184d45[_0x56d3a6];return _0x38eed2;}export class TelemetryCollector{[_0xe95e8b(0x234)]=[];['commandId'];[_0xe95e8b(0x223)];['commandStartTime'];[_0xe95e8b(0x1f8)]=0x0;[_0xe95e8b(0x23a)]=new Map();[_0xe95e8b(0x20a)]=null;[_0xe95e8b(0x1fc)];[_0xe95e8b(0x208)];['nodeVersion'];['platform'];['isTty'];['isCI'];['featureId'];[_0xe95e8b(0x222)];[_0xe95e8b(0x238)];[_0xe95e8b(0x21d)];constructor(_0x3d1084){const _0x20ee05=_0xe95e8b,_0x3afd8c={'aIAqw':function(_0x44fed4){return _0x44fed4();}};this['commandId']=randomUUID(),this[_0x20ee05(0x223)]=_0x3d1084,this[_0x20ee05(0x1ff)]=Date[_0x20ee05(0x203)](),this[_0x20ee05(0x1fc)]=_0x3afd8c[_0x20ee05(0x1f5)](getDeviceId),this[_0x20ee05(0x208)]=getCurrentVersion(),this['nodeVersion']=process['version'],this['platform']=process['platform'],this[_0x20ee05(0x226)]=process[_0x20ee05(0x200)][_0x20ee05(0x23b)]??![],this[_0x20ee05(0x202)]=!!(process[_0x20ee05(0x235)]['CI']||process['env'][_0x20ee05(0x20e)]);}['setContext'](_0x548bd9){const _0x3a8d7b=_0xe95e8b;if(_0x548bd9[_0x3a8d7b(0x21f)])this[_0x3a8d7b(0x21f)]=_0x548bd9['featureId'];if(_0x548bd9[_0x3a8d7b(0x222)])this['checklistItemId']=_0x548bd9['checklistItemId'];if(_0x548bd9['browserSessionId'])this[_0x3a8d7b(0x238)]=_0x548bd9[_0x3a8d7b(0x238)];if(_0x548bd9[_0x3a8d7b(0x21d)])this['transport']=_0x548bd9['transport'];}async['trackCommandStart'](_0x586d55){const _0x48f5bb=_0xe95e8b,_0x22a7fa={'WBsyq':'command_start'},_0x42f3ee=this[_0x48f5bb(0x209)]({'eventType':_0x22a7fa['WBsyq'],'metadata':_0x586d55});await this['sendImmediate'](_0x42f3ee);}async[_0xe95e8b(0x1fd)](_0x16989b,_0x21435a){const _0x32ea38=_0xe95e8b,_0xf56a64={'nMHoI':function(_0x57b218,_0x1df738){return _0x57b218-_0x1df738;}},_0x29bf24=this[_0x32ea38(0x209)]({'eventType':_0x32ea38(0x1fb),'outcome':_0x16989b,'durationMs':_0xf56a64['nMHoI'](Date[_0x32ea38(0x203)](),this['commandStartTime']),'metadata':_0x21435a});await this[_0x32ea38(0x219)](_0x29bf24),await this['flush']();}async['trackCommandError'](_0x4afe95,_0x279fe9){const _0x7d4888=_0xe95e8b,_0x358523={'kxmaZ':function(_0x593a51,_0x150403,_0x3bc3b6){return _0x593a51(_0x150403,_0x3bc3b6);},'VQsxZ':function(_0x3d1968,_0x1dde5a){return _0x3d1968(_0x1dde5a);},'Qdyoh':'Unknown','zYKed':function(_0x2de92a,_0x28ef35){return _0x2de92a-_0x28ef35;}},_0x53b41c=this[_0x7d4888(0x209)]({'eventType':_0x7d4888(0x1f3),'errorMessage':_0x358523[_0x7d4888(0x201)](truncate,_0x4afe95 instanceof Error?_0x4afe95['message']:_0x358523[_0x7d4888(0x21b)](String,_0x4afe95),0x1f4),'errorType':_0x4afe95 instanceof Error?_0x4afe95[_0x7d4888(0x215)]['name']:_0x358523[_0x7d4888(0x22f)],'durationMs':_0x358523['zYKed'](Date['now'](),this['commandStartTime']),'metadata':_0x279fe9});await this[_0x7d4888(0x219)](_0x53b41c),await this['flush']();}['trackPhaseStart'](_0x19a545,_0x2a9036){const _0x57d350=_0xe95e8b;this['phaseCounter']++,this['phaseStartTimes'][_0x57d350(0x231)](_0x19a545,Date[_0x57d350(0x203)]());const _0x18a13d=this[_0x57d350(0x209)]({'eventType':'phase_start','phase':_0x19a545,'phaseIndex':this['phaseCounter'],'metadata':_0x2a9036});this['buffer']['push'](_0x18a13d);}[_0xe95e8b(0x1f6)](_0x2ae12a,_0x3c6fe9){const _0x628360=_0xe95e8b,_0x17194d={'NqVhZ':function(_0x8e7f63,_0x729ec4){return _0x8e7f63-_0x729ec4;},'XVOBA':'phase_end'},_0x3f8f17=this['phaseStartTimes']['get'](_0x2ae12a),_0x502ce5=_0x3f8f17?_0x17194d[_0x628360(0x207)](Date[_0x628360(0x203)](),_0x3f8f17):undefined;this[_0x628360(0x23a)]['delete'](_0x2ae12a);const _0xdcd19c=this[_0x628360(0x209)]({'eventType':_0x17194d[_0x628360(0x239)],'phase':_0x2ae12a,'durationMs':_0x502ce5,'metadata':_0x3c6fe9});this['buffer']['push'](_0xdcd19c),this['buffer'][_0x628360(0x224)]>=0xa&&this[_0x628360(0x22c)]();}async['trackPhaseError'](_0x58b770,_0x221f68,_0x1cbd95){const _0xebeb6c=_0xe95e8b,_0x3b5982={'AKnsS':'phase_error','xRVJL':function(_0x4343d1,_0x5a585b,_0x28f1a1){return _0x4343d1(_0x5a585b,_0x28f1a1);},'VszjD':function(_0x4a0a2c,_0x24ab11){return _0x4a0a2c instanceof _0x24ab11;},'ZqrPl':function(_0x475470,_0x209f6d){return _0x475470(_0x209f6d);},'Esxpl':function(_0x213bc2,_0x160b67){return _0x213bc2 instanceof _0x160b67;},'ImrYc':'Unknown'},_0xa0af33=this['phaseStartTimes'][_0xebeb6c(0x21a)](_0x58b770),_0x3e6d2b=_0xa0af33?Date['now']()-_0xa0af33:undefined;this[_0xebeb6c(0x23a)][_0xebeb6c(0x1f4)](_0x58b770);const _0x4bd8a7=this[_0xebeb6c(0x209)]({'eventType':_0x3b5982['AKnsS'],'phase':_0x58b770,'durationMs':_0x3e6d2b,'errorMessage':_0x3b5982['xRVJL'](truncate,_0x3b5982[_0xebeb6c(0x236)](_0x221f68,Error)?_0x221f68['message']:_0x3b5982['ZqrPl'](String,_0x221f68),0x1f4),'errorType':_0x3b5982['Esxpl'](_0x221f68,Error)?_0x221f68[_0xebeb6c(0x215)][_0xebeb6c(0x1f0)]:_0x3b5982['ImrYc'],'metadata':_0x1cbd95});await this[_0xebeb6c(0x219)](_0x4bd8a7);}async['flush'](){const _0xce9ca7=_0xe95e8b;if(this[_0xce9ca7(0x234)][_0xce9ca7(0x224)]===0x0)return;const _0x32f490=this['buffer']['splice'](0x0);try{await this['sendBatch'](_0x32f490);}catch{}}[_0xe95e8b(0x209)](_0x4ba128){const _0xae6807=_0xe95e8b;return{'eventType':_0x4ba128['eventType'],'command':this['command'],'commandId':this[_0xae6807(0x214)],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x4ba128[_0xae6807(0x213)],'phase':_0x4ba128['phase'],'phaseIndex':_0x4ba128['phaseIndex'],'outcome':_0x4ba128[_0xae6807(0x20d)],'errorMessage':_0x4ba128['errorMessage'],'errorType':_0x4ba128['errorType'],'featureId':this['featureId'],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0xae6807(0x238)],'transport':this[_0xae6807(0x21d)],'evaluation':_0x4ba128[_0xae6807(0x237)],'cliVersion':this[_0xae6807(0x208)],'nodeVersion':this[_0xae6807(0x206)],'platform':this['platform'],'cwd':process[_0xae6807(0x216)](),'isTty':this['isTty'],'isCI':this[_0xae6807(0x202)],'metadata':_0x4ba128['metadata']};}async[_0xe95e8b(0x219)](_0x258cc7){const _0x4f57b9=_0xe95e8b;try{await this[_0x4f57b9(0x218)]([_0x258cc7]);}catch{}}[_0xe95e8b(0x22c)](){const _0x214c0d=_0xe95e8b;if(this['flushing'])return;this[_0x214c0d(0x20a)]=this['flush']()[_0x214c0d(0x22d)](()=>{this['flushing']=null;});}async['sendBatch'](_0xee0593){const _0x43c973=_0xe95e8b,_0xa5503b={'MUbyF':function(_0x402bb8){return _0x402bb8();},'QsScE':'Authorization','yjKUD':function(_0x237d23,_0x157f6d,_0x1245f3){return _0x237d23(_0x157f6d,_0x1245f3);},'GAJxg':_0x43c973(0x22b),'uLIgg':function(_0xacc58a,_0x5cb909){return _0xacc58a(_0x5cb909);}},_0x320606=await _0xa5503b[_0x43c973(0x229)](getToken)['catch'](()=>null),_0x31e06a=_0xa5503b[_0x43c973(0x229)](getApiBaseUrl),_0xa20d2f={'Content-Type':'application/json'};_0x320606&&(_0xa20d2f[_0xa5503b[_0x43c973(0x212)]]='Bearer\x20'+_0x320606);const _0x4f2f9e={'events':_0xee0593};process[_0x43c973(0x235)][_0x43c973(0x1f2)]&&console['error'](_0x43c973(0x210)+_0xee0593['length']+'\x20event(s)\x20to\x20'+_0x31e06a+'/api/v1/mcp/cli-telemetry');const _0x5ec45f=new AbortController(),_0x3188ef=_0xa5503b[_0x43c973(0x20b)](setTimeout,()=>_0x5ec45f[_0x43c973(0x225)](),0x1388);try{await _0xa5503b[_0x43c973(0x20b)](fetch,_0x31e06a+_0x43c973(0x20c),{'method':_0xa5503b['GAJxg'],'headers':_0xa20d2f,'body':JSON[_0x43c973(0x230)](_0x4f2f9e),'signal':_0x5ec45f['signal']});}finally{_0xa5503b[_0x43c973(0x205)](clearTimeout,_0x3188ef);}}}let currentCollector=null;export function createTelemetryCollector(_0x589885){return currentCollector=new TelemetryCollector(_0x589885),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x20afb2,_0x237d4d,_0x4ce8d6){const _0x1faac1=_0xe95e8b,_0x134488={'RcLoc':function(_0x4a3fed,_0x5b0818){return _0x4a3fed(_0x5b0818);}},_0x55461b=_0x134488['RcLoc'](createTelemetryCollector,_0x20afb2);await _0x55461b[_0x1faac1(0x204)](_0x4ce8d6);try{const _0x54c7d6=await _0x237d4d(_0x55461b);return await _0x55461b[_0x1faac1(0x1fd)](_0x1faac1(0x1fe)),_0x54c7d6;}catch(_0x373727){await _0x55461b[_0x1faac1(0x1f1)](_0x373727);throw _0x373727;}finally{await _0x55461b[_0x1faac1(0x21c)]();}}function truncate(_0x2d9179,_0x115891){const _0x2d8ed3=_0xe95e8b;return _0x2d9179['length']>_0x115891?_0x2d9179[_0x2d8ed3(0x21e)](0x0,_0x115891)+'...':_0x2d9179;}
1
+ const _0x301daf=_0x57fb;(function(_0x4d74e7,_0x2eee7b){const _0x57791e=_0x57fb,_0x55fb0c=_0x4d74e7();while(!![]){try{const _0x219ce7=-parseInt(_0x57791e(0x1c2))/0x1*(parseInt(_0x57791e(0x1b3))/0x2)+-parseInt(_0x57791e(0x1bd))/0x3+-parseInt(_0x57791e(0x1aa))/0x4*(-parseInt(_0x57791e(0x1c5))/0x5)+-parseInt(_0x57791e(0x190))/0x6*(parseInt(_0x57791e(0x1b2))/0x7)+parseInt(_0x57791e(0x18c))/0x8*(parseInt(_0x57791e(0x17c))/0x9)+-parseInt(_0x57791e(0x1c4))/0xa*(-parseInt(_0x57791e(0x186))/0xb)+-parseInt(_0x57791e(0x17e))/0xc;if(_0x219ce7===_0x2eee7b)break;else _0x55fb0c['push'](_0x55fb0c['shift']());}catch(_0x29809d){_0x55fb0c['push'](_0x55fb0c['shift']());}}}(_0x4162,0x9d08b));import{randomUUID}from'crypto';function _0x57fb(_0x46eda0,_0x5431b2){_0x46eda0=_0x46eda0-0x179;const _0x4162cc=_0x4162();let _0x57fb2c=_0x4162cc[_0x46eda0];return _0x57fb2c;}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x4162(){const _0x57fb2c=['version','phase','408463uRAZkq','luFyo','3409110gsVUTV','11335ZhNIAy','phaseStartTimes','command','trackPhaseEnd','buildEvent','isCI','command_start','errorType','checklistItemId','9TefNWT','phase_end','15013272ISedGZ','BfRtl','name','cliVersion','command_end','push','tLhTa','outcome','33GZdZOi','trackPhaseError','setContext','ukHtR','catch','pYkSg','7912648ZkDBvh','tPCjR','trackCommandEnd','trackCommandError','163194oHnIQa','/api/v1/mcp/cli-telemetry','ryNUv','flushing','delete','HIvNl','flushAsync','eDEiC','igDka','phaseIndex','Authorization','commandStartTime','browserSessionId','buffer','transport','phaseCounter','application/json','NCGZl','featureId','env','commandId','CJKlh','ZhjLM','trackCommandStart','trim','isTty','1724wvIQKW','abort','DEBUG','success','platform','isTTY','message','now','14SnbaMo','2pQlBdl','sendImmediate','length','jWidj','OpccH','deviceId','toISOString','evaluation','get','finally','1895139jMWLwG','MdUKN','flush'];_0x4162=function(){return _0x57fb2c;};return _0x4162();}let cachedDeviceId=null;function getDeviceId(){const _0x87b6fa=_0x57fb,_0x34c0ae={'cAHIF':function(_0x4e5732,_0x191d17,_0x4d97e9){return _0x4e5732(_0x191d17,_0x4d97e9);},'MdUKN':'.ranger','OpccH':function(_0x4f4316,_0x313eb9){return _0x4f4316(_0x313eb9);},'BfRtl':'utf-8','eDEiC':function(_0x1fde6e){return _0x1fde6e();},'bKuZY':function(_0x1fc02c,_0x588992,_0x1e34b2){return _0x1fc02c(_0x588992,_0x1e34b2);},'CJKlh':function(_0x41ea37,_0x1e7985,_0xe07738){return _0x41ea37(_0x1e7985,_0xe07738);},'zWLmg':function(_0x4df743){return _0x4df743();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x200380=_0x34c0ae['cAHIF'](join,homedir(),_0x34c0ae[_0x87b6fa(0x1be)]),_0xfa4ff1=join(_0x200380,'.session');if(_0x34c0ae[_0x87b6fa(0x1b7)](existsSync,_0xfa4ff1)){cachedDeviceId=readFileSync(_0xfa4ff1,_0x34c0ae[_0x87b6fa(0x17f)])[_0x87b6fa(0x1a8)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x34c0ae[_0x87b6fa(0x197)](randomUUID),_0x34c0ae['bKuZY'](mkdirSync,_0x200380,{'recursive':!![]}),_0x34c0ae[_0x87b6fa(0x1a5)](writeFileSync,_0xfa4ff1,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x34c0ae['zWLmg'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x301daf(0x19d)]=[];[_0x301daf(0x1a4)];[_0x301daf(0x1c7)];['commandStartTime'];[_0x301daf(0x19f)]=0x0;[_0x301daf(0x1c6)]=new Map();['flushing']=null;['deviceId'];['cliVersion'];['nodeVersion'];[_0x301daf(0x1ae)];[_0x301daf(0x1a9)];['isCI'];['featureId'];['checklistItemId'];[_0x301daf(0x19c)];[_0x301daf(0x19e)];constructor(_0x42bc89){const _0x55f898=_0x301daf,_0x6e17da={'GTIGT':function(_0x2c7ddc){return _0x2c7ddc();}};this[_0x55f898(0x1a4)]=randomUUID(),this[_0x55f898(0x1c7)]=_0x42bc89,this['commandStartTime']=Date[_0x55f898(0x1b1)](),this['deviceId']=getDeviceId(),this['cliVersion']=_0x6e17da['GTIGT'](getCurrentVersion),this['nodeVersion']=process[_0x55f898(0x1c0)],this[_0x55f898(0x1ae)]=process['platform'],this['isTty']=process['stdout'][_0x55f898(0x1af)]??![],this[_0x55f898(0x1ca)]=!!(process['env']['CI']||process[_0x55f898(0x1a3)]['GITHUB_ACTIONS']);}[_0x301daf(0x188)](_0x14130a){const _0x54ccf8=_0x301daf;if(_0x14130a[_0x54ccf8(0x1a2)])this[_0x54ccf8(0x1a2)]=_0x14130a[_0x54ccf8(0x1a2)];if(_0x14130a[_0x54ccf8(0x17b)])this[_0x54ccf8(0x17b)]=_0x14130a['checklistItemId'];if(_0x14130a[_0x54ccf8(0x19c)])this[_0x54ccf8(0x19c)]=_0x14130a[_0x54ccf8(0x19c)];if(_0x14130a[_0x54ccf8(0x19e)])this['transport']=_0x14130a[_0x54ccf8(0x19e)];}async['trackCommandStart'](_0x46d989){const _0x25c0c8=_0x301daf,_0x15a42d={'kKAjf':_0x25c0c8(0x179)},_0x47cc95=this[_0x25c0c8(0x1c9)]({'eventType':_0x15a42d['kKAjf'],'metadata':_0x46d989});await this['sendImmediate'](_0x47cc95);}async[_0x301daf(0x18e)](_0x369f42,_0x2dbf95){const _0x3bd04e=_0x301daf,_0x19cbde={'rKiQb':function(_0x188c30,_0x18109c){return _0x188c30-_0x18109c;}},_0x36864a=this[_0x3bd04e(0x1c9)]({'eventType':_0x3bd04e(0x182),'outcome':_0x369f42,'durationMs':_0x19cbde['rKiQb'](Date['now'](),this[_0x3bd04e(0x19b)]),'metadata':_0x2dbf95});await this[_0x3bd04e(0x1b4)](_0x36864a),await this['flush']();}async[_0x301daf(0x18f)](_0x5c8526,_0x38a275){const _0x2e82de=_0x301daf,_0x3f3863={'HIvNl':'command_error','ZhjLM':function(_0x50c710,_0x20c6c8){return _0x50c710 instanceof _0x20c6c8;},'vbjCC':function(_0x281928,_0x3b8505){return _0x281928(_0x3b8505);},'tLhTa':'Unknown','tPCjR':function(_0x207014,_0x8caafd){return _0x207014-_0x8caafd;}},_0x5b7617=this[_0x2e82de(0x1c9)]({'eventType':_0x3f3863[_0x2e82de(0x195)],'errorMessage':truncate(_0x3f3863[_0x2e82de(0x1a6)](_0x5c8526,Error)?_0x5c8526['message']:_0x3f3863['vbjCC'](String,_0x5c8526),0x1f4),'errorType':_0x5c8526 instanceof Error?_0x5c8526['constructor'][_0x2e82de(0x180)]:_0x3f3863[_0x2e82de(0x184)],'durationMs':_0x3f3863[_0x2e82de(0x18d)](Date[_0x2e82de(0x1b1)](),this['commandStartTime']),'metadata':_0x38a275});await this['sendImmediate'](_0x5b7617),await this['flush']();}['trackPhaseStart'](_0x1ac90b,_0x5bf327){const _0xaa50b8=_0x301daf;this['phaseCounter']++,this['phaseStartTimes']['set'](_0x1ac90b,Date[_0xaa50b8(0x1b1)]());const _0x1c27b2=this['buildEvent']({'eventType':'phase_start','phase':_0x1ac90b,'phaseIndex':this['phaseCounter'],'metadata':_0x5bf327});this[_0xaa50b8(0x19d)][_0xaa50b8(0x183)](_0x1c27b2);}[_0x301daf(0x1c8)](_0x5278cd,_0x2767ff){const _0x572574=_0x301daf,_0x407cc6={'DkTMC':_0x572574(0x17d)},_0x545ed8=this[_0x572574(0x1c6)][_0x572574(0x1bb)](_0x5278cd),_0x241bfe=_0x545ed8?Date['now']()-_0x545ed8:undefined;this[_0x572574(0x1c6)][_0x572574(0x194)](_0x5278cd);const _0x3f30c6=this['buildEvent']({'eventType':_0x407cc6['DkTMC'],'phase':_0x5278cd,'durationMs':_0x241bfe,'metadata':_0x2767ff});this['buffer'][_0x572574(0x183)](_0x3f30c6),this[_0x572574(0x19d)][_0x572574(0x1b5)]>=0xa&&this[_0x572574(0x196)]();}async[_0x301daf(0x187)](_0x17a959,_0x421be5,_0x1b0c6c){const _0x5eee08=_0x301daf,_0x8519a3={'luFyo':function(_0x494622,_0x4853e5){return _0x494622-_0x4853e5;},'EVNIu':'phase_error','pkLWk':function(_0x4c104a,_0x3b6f92,_0x3a16f0){return _0x4c104a(_0x3b6f92,_0x3a16f0);},'OJPNN':function(_0x296c2e,_0x5767f9){return _0x296c2e instanceof _0x5767f9;}},_0xcc8dc0=this[_0x5eee08(0x1c6)]['get'](_0x17a959),_0x1c31d7=_0xcc8dc0?_0x8519a3[_0x5eee08(0x1c3)](Date[_0x5eee08(0x1b1)](),_0xcc8dc0):undefined;this['phaseStartTimes'][_0x5eee08(0x194)](_0x17a959);const _0x3b7756=this[_0x5eee08(0x1c9)]({'eventType':_0x8519a3['EVNIu'],'phase':_0x17a959,'durationMs':_0x1c31d7,'errorMessage':_0x8519a3['pkLWk'](truncate,_0x8519a3['OJPNN'](_0x421be5,Error)?_0x421be5[_0x5eee08(0x1b0)]:String(_0x421be5),0x1f4),'errorType':_0x421be5 instanceof Error?_0x421be5['constructor']['name']:'Unknown','metadata':_0x1b0c6c});await this['sendImmediate'](_0x3b7756);}async['flush'](){const _0x8d5134=_0x301daf;if(this['buffer']['length']===0x0)return;const _0x4e1d14=this[_0x8d5134(0x19d)]['splice'](0x0);try{await this['sendBatch'](_0x4e1d14);}catch{}}[_0x301daf(0x1c9)](_0x48b710){const _0x752c4=_0x301daf;return{'eventType':_0x48b710['eventType'],'command':this['command'],'commandId':this['commandId'],'deviceId':this[_0x752c4(0x1b8)],'timestamp':new Date()[_0x752c4(0x1b9)](),'durationMs':_0x48b710['durationMs'],'phase':_0x48b710[_0x752c4(0x1c1)],'phaseIndex':_0x48b710[_0x752c4(0x199)],'outcome':_0x48b710[_0x752c4(0x185)],'errorMessage':_0x48b710['errorMessage'],'errorType':_0x48b710[_0x752c4(0x17a)],'featureId':this[_0x752c4(0x1a2)],'checklistItemId':this['checklistItemId'],'browserSessionId':this['browserSessionId'],'transport':this['transport'],'evaluation':_0x48b710[_0x752c4(0x1ba)],'cliVersion':this[_0x752c4(0x181)],'nodeVersion':this['nodeVersion'],'platform':this['platform'],'cwd':process['cwd'](),'isTty':this['isTty'],'isCI':this['isCI'],'metadata':_0x48b710['metadata']};}async[_0x301daf(0x1b4)](_0x23a83b){try{await this['sendBatch']([_0x23a83b]);}catch{}}['flushAsync'](){const _0xc0f3c9=_0x301daf;if(this['flushing'])return;this['flushing']=this[_0xc0f3c9(0x1bf)]()[_0xc0f3c9(0x1bc)](()=>{const _0x49ebaa=_0xc0f3c9;this[_0x49ebaa(0x193)]=null;});}async['sendBatch'](_0x44ba63){const _0x5bd8a7=_0x301daf,_0x15d99b={'igDka':function(_0xe5e324){return _0xe5e324();},'ryNUv':_0x5bd8a7(0x1a0),'DMoyT':_0x5bd8a7(0x19a),'PECyY':function(_0xdaac16,_0x3999f3,_0x57f13c){return _0xdaac16(_0x3999f3,_0x57f13c);},'pYkSg':'POST'},_0xb65b0a=await _0x15d99b[_0x5bd8a7(0x198)](getToken)[_0x5bd8a7(0x18a)](()=>null),_0x17baa1=_0x15d99b['igDka'](getApiBaseUrl),_0x2c859b={'Content-Type':_0x15d99b[_0x5bd8a7(0x192)]};_0xb65b0a&&(_0x2c859b[_0x15d99b['DMoyT']]='Bearer\x20'+_0xb65b0a);const _0xb0245a={'events':_0x44ba63};process[_0x5bd8a7(0x1a3)][_0x5bd8a7(0x1ac)]&&console['error']('[telemetry]\x20Sending\x20'+_0x44ba63[_0x5bd8a7(0x1b5)]+'\x20event(s)\x20to\x20'+_0x17baa1+_0x5bd8a7(0x191));const _0x34f5c3=new AbortController(),_0x49450a=_0x15d99b['PECyY'](setTimeout,()=>_0x34f5c3[_0x5bd8a7(0x1ab)](),0x1388);try{await _0x15d99b['PECyY'](fetch,_0x17baa1+'/api/v1/mcp/cli-telemetry',{'method':_0x15d99b[_0x5bd8a7(0x18b)],'headers':_0x2c859b,'body':JSON['stringify'](_0xb0245a),'signal':_0x34f5c3['signal']});}finally{clearTimeout(_0x49450a);}}}let currentCollector=null;export function createTelemetryCollector(_0x3c6bee){return currentCollector=new TelemetryCollector(_0x3c6bee),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x491cae,_0x28c8d2,_0x13e6f1){const _0x5dfd26=_0x301daf,_0x1e8fda={'ukHtR':function(_0x233ef0,_0x257ef7){return _0x233ef0(_0x257ef7);},'NCGZl':function(_0x420f71,_0x1505cc){return _0x420f71(_0x1505cc);}},_0x435209=_0x1e8fda[_0x5dfd26(0x189)](createTelemetryCollector,_0x491cae);await _0x435209[_0x5dfd26(0x1a7)](_0x13e6f1);try{const _0x1325be=await _0x1e8fda[_0x5dfd26(0x1a1)](_0x28c8d2,_0x435209);return await _0x435209[_0x5dfd26(0x18e)](_0x5dfd26(0x1ad)),_0x1325be;}catch(_0x413c85){await _0x435209[_0x5dfd26(0x18f)](_0x413c85);throw _0x413c85;}finally{await _0x435209[_0x5dfd26(0x1bf)]();}}function truncate(_0x56a373,_0x465c1f){const _0x850f70=_0x301daf,_0x5490a8={'jWidj':function(_0xbce0c5,_0x4102d9){return _0xbce0c5>_0x4102d9;}};return _0x5490a8[_0x850f70(0x1b6)](_0x56a373[_0x850f70(0x1b5)],_0x465c1f)?_0x56a373['slice'](0x0,_0x465c1f)+'...':_0x56a373;}