@ranger-testing/ranger-cli 2.5.4-alpha.5f9facb-17 → 2.5.4-alpha.816b7e2-24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -0
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x51941b=_0x275c;(function(_0x58abbd,_0xf6e501){const _0x4ee81a=_0x275c,_0x53a7a5=_0x58abbd();while(!![]){try{const _0x46a06b=parseInt(_0x4ee81a(0x124))/0x1*(parseInt(_0x4ee81a(0x12e))/0x2)+-parseInt(_0x4ee81a(0x12f))/0x3*(-parseInt(_0x4ee81a(0x133))/0x4)+parseInt(_0x4ee81a(0x121))/0x5+parseInt(_0x4ee81a(0x131))/0x6+-parseInt(_0x4ee81a(0x137))/0x7+-parseInt(_0x4ee81a(0x128))/0x8*(-parseInt(_0x4ee81a(0x12b))/0x9)+-parseInt(_0x4ee81a(0x12d))/0xa;if(_0x46a06b===_0xf6e501)break;else _0x53a7a5['push'](_0x53a7a5['shift']());}catch(_0x31d165){_0x53a7a5['push'](_0x53a7a5['shift']());}}}(_0x490e,0x78ea6));function _0x490e(){const _0x138749=['https://mcp-auth.staging.ranger.net/mcp','zdjFo','184502TjCBok','ojnSS','env','local','7445992Driooz','http://localhost:8080/mcp','RANGER_DISABLE_MCP','9cLNavQ','true','25760730mxhhlB','8DWzxsK','102FPrSyK','mcpAuthUrl','3175932vpioms','https://api.staging.ranger.net','83464duABMt','pCeKO','http://localhost:8080','RANGER_MCP_AUTH_URL','3013178tDusbl','RANGER_BYOK','staging','AxXqN','client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl','https://ai-proxy-716115358910.us-central1.run.app','apiBaseUrl','2971370oLuFBq'];_0x490e=function(){return _0x138749;};return _0x490e();}export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':_0x51941b(0x11f),'mcpAuthUrl':'https://mcp-auth.ranger.net/mcp'},'staging':{'apiBaseUrl':_0x51941b(0x132),'workosClientId':_0x51941b(0x11d),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app','mcpAuthUrl':_0x51941b(0x122)},'local':{'apiBaseUrl':_0x51941b(0x135),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':'http://localhost:8090','mcpAuthUrl':_0x51941b(0x129)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x5708a2){const _0x499952=_0x51941b,_0xb887c8={'kpGkm':function(_0x48ac84,_0xc8d6c3){return _0x48ac84===_0xc8d6c3;},'hfaVa':'prod','zdjFo':function(_0x3308e4,_0x179629){return _0x3308e4===_0x179629;},'tiNvX':_0x499952(0x139),'AxXqN':_0x499952(0x127)};return _0xb887c8['kpGkm'](_0x5708a2,_0xb887c8['hfaVa'])||_0xb887c8[_0x499952(0x123)](_0x5708a2,_0xb887c8['tiNvX'])||_0x5708a2===_0xb887c8[_0x499952(0x13a)];}function _0x275c(_0x55771c,_0x1c3822){_0x55771c=_0x55771c-0x11d;const _0x490ed2=_0x490e();let _0x275cb6=_0x490ed2[_0x55771c];return _0x275cb6;}export function getCurrentEnvironment(){const _0x53b472=_0x51941b,_0x1101a9={'woYkS':function(_0x146ea0,_0x2b3cce){return _0x146ea0(_0x2b3cce);}},_0xc5a219=process[_0x53b472(0x126)]['RANGER_CLI_ENV'];if(_0xc5a219&&_0x1101a9['woYkS'](isValidEnvironment,_0xc5a219))return _0xc5a219;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0xb488e7=_0x51941b,_0x2054b5={'QpOgO':function(_0x50dca2){return _0x50dca2();}};return ENVIRONMENT_CONFIGS[_0x2054b5['QpOgO'](getCurrentEnvironment)][_0xb488e7(0x120)];}export function getAiProxyUrl(){const _0x1a1362=_0x51941b;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x1a1362(0x11e)];}export function getMcpAuthUrl(){const _0x3115f1=_0x51941b;return process[_0x3115f1(0x126)][_0x3115f1(0x136)]??ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x3115f1(0x130)];}export function isByokEnabled(){const _0x4cb64c=_0x51941b,_0x11ab95={'ojnSS':function(_0x185399,_0x474866){return _0x185399===_0x474866;}};return _0x11ab95[_0x4cb64c(0x125)](process['env'][_0x4cb64c(0x138)],_0x4cb64c(0x12c));}export function isMcpDisabled(){const _0x4db3ea=_0x51941b;return process[_0x4db3ea(0x126)][_0x4db3ea(0x12a)]===_0x4db3ea(0x12c);}export function getVerificationTransport(){const _0x21df38=_0x51941b,_0x3b7c58={'pCeKO':'playwright-cli','DFXXA':'mcp'};return isMcpDisabled()?_0x3b7c58[_0x21df38(0x134)]:_0x3b7c58['DFXXA'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x412dd5,_0xd2b514){const _0x4b05cf=_0x1318,_0xde79c6=_0x412dd5();while(!![]){try{const _0x24b0c8=parseInt(_0x4b05cf(0x16d))/0x1*(-parseInt(_0x4b05cf(0x167))/0x2)+-parseInt(_0x4b05cf(0x14c))/0x3*(parseInt(_0x4b05cf(0x16a))/0x4)+parseInt(_0x4b05cf(0x144))/0x5*(parseInt(_0x4b05cf(0x163))/0x6)+-parseInt(_0x4b05cf(0x158))/0x7+parseInt(_0x4b05cf(0x17b))/0x8+parseInt(_0x4b05cf(0x153))/0x9*(-parseInt(_0x4b05cf(0x13a))/0xa)+-parseInt(_0x4b05cf(0x170))/0xb*(-parseInt(_0x4b05cf(0x147))/0xc);if(_0x24b0c8===_0xd2b514)break;else _0xde79c6['push'](_0xde79c6['shift']());}catch(_0x254974){_0xde79c6['push'](_0xde79c6['shift']());}}}(_0x5622,0xb91f2));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x5e1490){const _0x23fcf6=_0x1318,_0x31bddb={'nNfam':function(_0x4a2927,_0x3edd05,_0x29afbf){return _0x4a2927(_0x3edd05,_0x29afbf);},'nPCFb':'POST','DUeFc':function(_0x348b67,_0xa70bf4){return _0x348b67===_0xa70bf4;},'roPuo':_0x23fcf6(0x13f)},_0x3fbcb6=await getToken();if(!_0x3fbcb6)throw new Error(_0x23fcf6(0x174));const _0x444ed4=getApiBaseUrl(),_0x17e6e2=await _0x31bddb[_0x23fcf6(0x175)](fetch,_0x444ed4+'/api/v1/mcp/features',{'method':_0x31bddb['nPCFb'],'headers':{'Authorization':'Bearer\x20'+_0x3fbcb6,'Content-Type':_0x23fcf6(0x159)},'body':JSON['stringify'](_0x5e1490)});if(!_0x17e6e2['ok']){if(_0x31bddb[_0x23fcf6(0x161)](_0x17e6e2['status'],0x192)){const _0x5a8017=await _0x17e6e2['json'](),_0x211c16=_0x5a8017['billingUrl']||'https://dashboard.ranger.net/billing';throw new Error((_0x5a8017['message']||_0x31bddb[_0x23fcf6(0x160)])+'\x0a\x0aUpgrade\x20your\x20plan:\x20'+_0x211c16);}const _0x20b26c=await _0x17e6e2['text']();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x20b26c);}return _0x17e6e2['json']();}export async function listFeatures(_0x17a0f5){const _0x2fef5f=_0x1318,_0x2d93c0={'bmSuA':function(_0x1c3006){return _0x1c3006();},'ZSfeU':'gitBranch','AdfPy':_0x2fef5f(0x168),'yNHaz':_0x2fef5f(0x151),'zjvkc':_0x2fef5f(0x14e),'mMblU':'GET'},_0x58dcad=await _0x2d93c0['bmSuA'](getToken);if(!_0x58dcad)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x8d05b9=getApiBaseUrl(),_0x181cf3=new URLSearchParams();if(_0x17a0f5?.['gitRepoUrl'])_0x181cf3['set']('gitRepoUrl',_0x17a0f5[_0x2fef5f(0x138)]);if(_0x17a0f5?.[_0x2fef5f(0x16e)])_0x181cf3[_0x2fef5f(0x171)](_0x2d93c0[_0x2fef5f(0x148)],_0x17a0f5['gitBranch']);if(_0x17a0f5?.[_0x2fef5f(0x168)])_0x181cf3[_0x2fef5f(0x171)](_0x2d93c0[_0x2fef5f(0x15e)],_0x17a0f5['limit']['toString']());if(_0x17a0f5?.['offset'])_0x181cf3['set'](_0x2fef5f(0x156),_0x17a0f5['offset'][_0x2fef5f(0x14a)]());if(_0x17a0f5?.['includeDeleted'])_0x181cf3[_0x2fef5f(0x171)](_0x2d93c0[_0x2fef5f(0x16b)],_0x2d93c0['zjvkc']);const _0x389082=_0x8d05b9+_0x2fef5f(0x136)+(_0x181cf3[_0x2fef5f(0x14a)]()?'?'+_0x181cf3['toString']():''),_0x114b48=await fetch(_0x389082,{'method':_0x2d93c0['mMblU'],'headers':{'Authorization':'Bearer\x20'+_0x58dcad}});if(!_0x114b48['ok']){const _0x4b96d3=await _0x114b48['text']();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x4b96d3);}return _0x114b48[_0x2fef5f(0x17d)]();}export async function getFeature(_0x34e2f6){const _0x3a96dd=_0x1318,_0x52c6fd={'Pywcb':function(_0x4446a9){return _0x4446a9();},'OVScS':function(_0x234c50,_0x40da43,_0x25be8a){return _0x234c50(_0x40da43,_0x25be8a);}},_0x3912af=await getToken();if(!_0x3912af)throw new Error(_0x3a96dd(0x174));const _0x7d858=_0x52c6fd['Pywcb'](getApiBaseUrl),_0x83834c=await _0x52c6fd['OVScS'](fetch,_0x7d858+_0x3a96dd(0x173)+_0x34e2f6,{'method':_0x3a96dd(0x142),'headers':{'Authorization':_0x3a96dd(0x14f)+_0x3912af}});if(!_0x83834c['ok']){const _0x429f0d=await _0x83834c['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x429f0d);}return _0x83834c[_0x3a96dd(0x17d)]();}export async function updateFeature(_0x577f16,_0x156bbb){const _0x534aad=_0x1318,_0x121cf9={'wVJPb':_0x534aad(0x174),'yTGYb':function(_0x499b02,_0x3f7bac,_0xa2e5ca){return _0x499b02(_0x3f7bac,_0xa2e5ca);},'fHsoj':_0x534aad(0x159)},_0x25960f=await getToken();if(!_0x25960f)throw new Error(_0x121cf9['wVJPb']);const _0x3f3289=getApiBaseUrl(),_0x4e0080=await _0x121cf9[_0x534aad(0x139)](fetch,_0x3f3289+'/api/v1/mcp/features/'+_0x577f16,{'method':_0x534aad(0x17a),'headers':{'Authorization':_0x534aad(0x14f)+_0x25960f,'Content-Type':_0x121cf9['fHsoj']},'body':JSON['stringify'](_0x156bbb)});if(!_0x4e0080['ok']){const _0x424f6f=await _0x4e0080['text']();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x424f6f);}return _0x4e0080['json']();}export async function createChecklistItem(_0x422b98,_0x329553,_0x413753){const _0x38d526=_0x1318,_0x350321={'vVGOw':function(_0x5beb16){return _0x5beb16();},'sSVLx':'POST'},_0x515de7=await _0x350321[_0x38d526(0x14b)](getToken);if(!_0x515de7)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x493dc2=getApiBaseUrl(),_0x4851f7=await fetch(_0x493dc2+_0x38d526(0x173)+_0x422b98+_0x38d526(0x157),{'method':_0x350321['sSVLx'],'headers':{'Authorization':_0x38d526(0x14f)+_0x515de7,'Content-Type':'application/json'},'body':JSON['stringify']({'description':_0x329553,'position':_0x413753})});if(!_0x4851f7['ok']){const _0x1fa37e=await _0x4851f7[_0x38d526(0x141)]();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x1fa37e);}return _0x4851f7[_0x38d526(0x17d)]();}export async function updateChecklistItem(_0x5177d4,_0x57aeb9,_0x4b9d10){const _0x1195a1={'LPMGp':function(_0x4dc5a5){return _0x4dc5a5();},'ilUUx':function(_0x2c39ee,_0x5bd9e9,_0x2309ac){return _0x2c39ee(_0x5bd9e9,_0x2309ac);},'wIRKa':'application/json'};return withRetry(async()=>{const _0x325d88=_0x1318,_0x4135cc=await _0x1195a1[_0x325d88(0x150)](getToken);if(!_0x4135cc)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x21299d=getApiBaseUrl(),_0x19ea29=await _0x1195a1['ilUUx'](fetch,_0x21299d+'/api/v1/mcp/features/'+_0x5177d4+_0x325d88(0x13d)+_0x57aeb9,{'method':'PATCH','headers':{'Authorization':_0x325d88(0x14f)+_0x4135cc,'Content-Type':_0x1195a1['wIRKa']},'body':JSON['stringify'](_0x4b9d10)});if(!_0x19ea29['ok']){const _0xdf034b=await _0x19ea29['text']();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0xdf034b);}return _0x19ea29[_0x325d88(0x17d)]();},{'label':'updateChecklistItem'});}function _0x1318(_0x4c640d,_0x2c9445){_0x4c640d=_0x4c640d-0x136;const _0x56229d=_0x5622();let _0x131845=_0x56229d[_0x4c640d];return _0x131845;}export async function getFeatureReport(_0x39eafa){const _0x37da79=_0x1318,_0x27292e={'eQkXR':function(_0x383566){return _0x383566();},'lGOVC':_0x37da79(0x142)},_0x379be7=await getToken();if(!_0x379be7)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1efd9f=_0x27292e[_0x37da79(0x149)](getApiBaseUrl),_0x181d82=await fetch(_0x1efd9f+'/api/v1/mcp/features/'+_0x39eafa+'/report',{'method':_0x27292e['lGOVC'],'headers':{'Authorization':_0x37da79(0x14f)+_0x379be7}});if(!_0x181d82['ok']){const _0xefa3da=await _0x181d82['text']();throw new Error(_0x37da79(0x13e)+_0xefa3da);}return _0x181d82['json']();}export async function getFeatureReportMarkdown(_0x125b36,_0x54d8e9){const _0x47874f=_0x1318,_0x4a72cc={'AolWl':function(_0x226128){return _0x226128();},'dCGMY':_0x47874f(0x174),'dqmPG':function(_0x1926b6){return _0x1926b6();},'WDvbQ':function(_0x1db26a,_0x59de27){return _0x1db26a(_0x59de27);},'gTSFg':function(_0x66fc75,_0x1cb637){return _0x66fc75&&_0x1cb637;},'QkkUa':function(_0x246de1,_0x1bda44,_0x5c275a){return _0x246de1(_0x1bda44,_0x5c275a);}},_0x3888fa=await _0x4a72cc[_0x47874f(0x13b)](getToken);if(!_0x3888fa)throw new Error(_0x4a72cc[_0x47874f(0x15f)]);const _0x50dedb=_0x4a72cc[_0x47874f(0x162)](getApiBaseUrl),_0x505ea5=new URLSearchParams(),_0x112fd3=(_0x54d8e9?.[_0x47874f(0x143)]?.[_0x47874f(0x140)]??0x0)>0x0,_0x27fa1b=_0x4a72cc['WDvbQ'](Boolean,_0x54d8e9?.[_0x47874f(0x178)]);_0x112fd3&&_0x54d8e9?.['itemIds']&&_0x505ea5[_0x47874f(0x171)](_0x47874f(0x143),_0x54d8e9[_0x47874f(0x143)][_0x47874f(0x137)](','));_0x27fa1b&&_0x54d8e9?.['sessionId']&&_0x505ea5['set']('sessionId',_0x54d8e9[_0x47874f(0x178)]);_0x4a72cc[_0x47874f(0x146)](!_0x112fd3,!_0x27fa1b)&&_0x54d8e9?.[_0x47874f(0x16f)]&&_0x505ea5[_0x47874f(0x171)]('style',_0x54d8e9['style']);const _0x5005b9=_0x50dedb+'/api/v1/mcp/features/'+_0x125b36+_0x47874f(0x15a),_0x2c00c5=''+_0x5005b9+(_0x505ea5['toString']()?'?'+_0x505ea5['toString']():''),_0x4bdd93=await _0x4a72cc['QkkUa'](fetch,_0x2c00c5,{'method':'GET','headers':{'Authorization':_0x47874f(0x14f)+_0x3888fa}});if(!_0x4bdd93['ok']){const _0x165bc0=await _0x4bdd93['text']();throw new Error(_0x47874f(0x172)+_0x165bc0);}return _0x4bdd93[_0x47874f(0x141)]();}export async function listFeatureSessions(_0x3dfab9){const _0x4a0763=_0x1318,_0x387209={'iYYth':function(_0x38502a){return _0x38502a();},'dsnfo':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x5e3d1f=await _0x387209['iYYth'](getToken);if(!_0x5e3d1f)throw new Error(_0x387209['dsnfo']);const _0x113679=getApiBaseUrl(),_0xfa5a0d=await fetch(_0x113679+_0x4a0763(0x173)+_0x3dfab9+'/sessions',{'method':_0x4a0763(0x142),'headers':{'Authorization':_0x4a0763(0x14f)+_0x5e3d1f}});if(!_0xfa5a0d['ok']){const _0x1b9f6c=await _0xfa5a0d[_0x4a0763(0x141)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x1b9f6c);}return _0xfa5a0d['json']();}export async function startSession(_0x11442d,_0x57585f){const _0x2c4413=_0x1318,_0x239287={'CUBGX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ySIuE':function(_0x3c9776,_0x346f1e,_0xd9f029){return _0x3c9776(_0x346f1e,_0xd9f029);}},_0x519c29=await getToken();if(!_0x519c29)throw new Error(_0x239287[_0x2c4413(0x169)]);const _0x93a7d3=getApiBaseUrl(),_0x1d0097=await _0x239287['ySIuE'](fetch,_0x93a7d3+_0x2c4413(0x173)+_0x11442d+_0x2c4413(0x145)+_0x57585f+_0x2c4413(0x17c),{'method':_0x2c4413(0x13c),'headers':{'Authorization':_0x2c4413(0x14f)+_0x519c29}});if(!_0x1d0097['ok']){const _0x55deb2=await _0x1d0097['text']();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x55deb2);}return _0x1d0097['json']();}export async function concludeSession(_0x5c717,_0x3d6cc1){const _0x234fad=_0x1318,_0x29ad2c={'IVJux':_0x234fad(0x174),'NvvGJ':function(_0x1a792f){return _0x1a792f();},'WdyYd':_0x234fad(0x13c)},_0x2f7873=await getToken();if(!_0x2f7873)throw new Error(_0x29ad2c['IVJux']);const _0xe01dd3=_0x29ad2c[_0x234fad(0x15d)](getApiBaseUrl),_0x10aa84=await fetch(_0xe01dd3+_0x234fad(0x173)+_0x5c717+'/sessions/'+_0x3d6cc1+'/conclude',{'method':_0x29ad2c['WdyYd'],'headers':{'Authorization':'Bearer\x20'+_0x2f7873}});if(!_0x10aa84['ok']){const _0x50409f=await _0x10aa84['text']();throw new Error(_0x234fad(0x165)+_0x50409f);}return _0x10aa84[_0x234fad(0x17d)]();}export async function getActionItems(_0xa462d1){const _0xa43d44=_0x1318,_0x44f080={'WssPp':_0xa43d44(0x174)},_0x1df8b5=await getToken();if(!_0x1df8b5)throw new Error(_0x44f080[_0xa43d44(0x16c)]);const _0x47bc17=getApiBaseUrl(),_0x1267d7=await fetch(_0x47bc17+_0xa43d44(0x173)+_0xa462d1+'/action-items',{'method':'GET','headers':{'Authorization':_0xa43d44(0x14f)+_0x1df8b5}});if(!_0x1267d7['ok']){const _0x3d986f=await _0x1267d7['text']();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x3d986f);}return _0x1267d7[_0xa43d44(0x17d)]();}export async function getItemFeedback(_0x201085,_0x343ff5){const _0x2d07ea=_0x1318,_0x48dc3f={'OuSmV':function(_0x5c5ec0){return _0x5c5ec0();},'ISxgZ':function(_0xfc74d6,_0x5029d9,_0x38590e){return _0xfc74d6(_0x5029d9,_0x38590e);},'cKhDS':'GET'},_0x1dcf4b=await getToken();if(!_0x1dcf4b)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1be878=_0x48dc3f[_0x2d07ea(0x15c)](getApiBaseUrl),_0x261e45=await _0x48dc3f['ISxgZ'](fetch,_0x1be878+'/api/v1/mcp/features/'+_0x201085+_0x2d07ea(0x15b)+_0x343ff5+'/feedback',{'method':_0x48dc3f['cKhDS'],'headers':{'Authorization':'Bearer\x20'+_0x1dcf4b}});if(!_0x261e45['ok']){const _0x46b663=await _0x261e45['text']();throw new Error(_0x2d07ea(0x164)+_0x46b663);}return _0x261e45['json']();}export async function markCommentsAddressed(_0x483b82,_0x2cc4c3,_0x481d0f){const _0x48b276=_0x1318,_0x4792e7={'aeZqN':function(_0x5e631d){return _0x5e631d();},'Xmaak':'POST'},_0x3f1de8=await _0x4792e7[_0x48b276(0x154)](getToken);if(!_0x3f1de8)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x35f42d=getApiBaseUrl(),_0x3fafe0=await fetch(_0x35f42d+_0x48b276(0x173)+_0x483b82+_0x48b276(0x176),{'method':_0x4792e7[_0x48b276(0x14d)],'headers':{'Authorization':_0x48b276(0x14f)+_0x3f1de8,'Content-Type':'application/json'},'body':JSON['stringify']({'checklistItemId':_0x2cc4c3,'commentIds':_0x481d0f})});if(!_0x3fafe0['ok']){const _0x13141f=await _0x3fafe0[_0x48b276(0x141)]();throw new Error(_0x48b276(0x152)+_0x13141f);}}export async function softDeleteFeature(_0x5be1a4){const _0x9a7ea8=_0x1318,_0x181071={'dpKNt':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','UGxtC':function(_0x2259ad,_0xcf4635,_0x54a1a7){return _0x2259ad(_0xcf4635,_0x54a1a7);},'XKmYN':'DELETE'},_0x177d0c=await getToken();if(!_0x177d0c)throw new Error(_0x181071['dpKNt']);const _0x223dbd=getApiBaseUrl(),_0x5cf8dd=await _0x181071[_0x9a7ea8(0x177)](fetch,_0x223dbd+'/api/v1/mcp/features/'+_0x5be1a4,{'method':_0x181071['XKmYN'],'headers':{'Authorization':'Bearer\x20'+_0x177d0c}});if(!_0x5cf8dd['ok']){const _0xe6fb92=await _0x5cf8dd[_0x9a7ea8(0x141)]();throw new Error(_0x9a7ea8(0x166)+_0xe6fb92);}}export async function restoreFeature(_0x351797){const _0x4a2602=_0x1318,_0x29d4c2={'fbjLA':function(_0x446197){return _0x446197();},'LOPMG':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x15a459=await _0x29d4c2['fbjLA'](getToken);if(!_0x15a459)throw new Error(_0x29d4c2[_0x4a2602(0x179)]);const _0x500c09=getApiBaseUrl(),_0x50c24c=await fetch(_0x500c09+'/api/v1/mcp/features/'+_0x351797+'/restore',{'method':_0x4a2602(0x13c),'headers':{'Authorization':_0x4a2602(0x14f)+_0x15a459}});if(!_0x50c24c['ok']){const _0x3e9a4d=await _0x50c24c['text']();throw new Error(_0x4a2602(0x155)+_0x3e9a4d);}}function _0x5622(){const _0x349d34=['UGxtC','sessionId','LOPMG','PATCH','8442304UJuNIN','/start','json','/api/v1/mcp/features','join','gitRepoUrl','yTGYb','1310dwLkzi','AolWl','POST','/checklist/','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','Feature\x20limit\x20exceeded','length','text','GET','itemIds','868280inoqXz','/sessions/','gTSFg','12308316SnFWYQ','ZSfeU','eQkXR','toString','vVGOw','3603OtVetz','Xmaak','true','Bearer\x20','LPMGp','includeDeleted','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','52137tEJgOX','aeZqN','Failed\x20to\x20restore\x20feature\x20review:\x20','offset','/checklist','7305893baELtK','application/json','/report/markdown','/checklist-items/','OuSmV','NvvGJ','AdfPy','dCGMY','roPuo','DUeFc','dqmPG','6IhwRRk','Failed\x20to\x20get\x20item\x20feedback:\x20','Failed\x20to\x20conclude\x20session:\x20','Failed\x20to\x20delete\x20feature\x20review:\x20','771172uPoNoN','limit','CUBGX','3244FgyHtX','yNHaz','WssPp','2DEfAgc','gitBranch','style','33hhkmIX','set','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','/api/v1/mcp/features/','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','nNfam','/comments/address'];_0x5622=function(){return _0x349d34;};return _0x5622();}
|
|
1
|
+
(function(_0x2b7f87,_0x1a531d){const _0x4a9a81=_0x4bed,_0x13f421=_0x2b7f87();while(!![]){try{const _0x225ae0=-parseInt(_0x4a9a81(0x1ff))/0x1*(parseInt(_0x4a9a81(0x1ed))/0x2)+-parseInt(_0x4a9a81(0x228))/0x3*(-parseInt(_0x4a9a81(0x20e))/0x4)+parseInt(_0x4a9a81(0x1fd))/0x5+parseInt(_0x4a9a81(0x221))/0x6+-parseInt(_0x4a9a81(0x20c))/0x7*(parseInt(_0x4a9a81(0x205))/0x8)+parseInt(_0x4a9a81(0x22a))/0x9+-parseInt(_0x4a9a81(0x220))/0xa;if(_0x225ae0===_0x1a531d)break;else _0x13f421['push'](_0x13f421['shift']());}catch(_0x32f580){_0x13f421['push'](_0x13f421['shift']());}}}(_0x3c29,0xb3137));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x1caff3){const _0xd2eec3=_0x4bed,_0x75f403={'vufuR':_0xd2eec3(0x1fe),'VnXAN':function(_0xe97d0b){return _0xe97d0b();},'GbVtK':_0xd2eec3(0x211),'uBPQe':_0xd2eec3(0x212)},_0x46aa11=await getToken();if(!_0x46aa11)throw new Error(_0x75f403['vufuR']);const _0x1f03bc=_0x75f403[_0xd2eec3(0x214)](getApiBaseUrl),_0x2046cd=await fetch(_0x1f03bc+'/api/v1/mcp/features',{'method':_0x75f403[_0xd2eec3(0x222)],'headers':{'Authorization':_0xd2eec3(0x1fa)+_0x46aa11,'Content-Type':_0x75f403[_0xd2eec3(0x202)]},'body':JSON['stringify'](_0x1caff3)});if(!_0x2046cd['ok']){if(_0x2046cd[_0xd2eec3(0x21f)]===0x192){const _0x295ade=await _0x2046cd['json'](),_0x2a2ef9=_0x295ade['billingUrl']||'https://dashboard.ranger.net/billing';throw new Error((_0x295ade[_0xd2eec3(0x1ef)]||'Feature\x20limit\x20exceeded')+'\x0a\x0aUpgrade\x20your\x20plan:\x20'+_0x2a2ef9);}const _0x340a4a=await _0x2046cd['text']();throw new Error(_0xd2eec3(0x213)+_0x340a4a);}return _0x2046cd['json']();}export async function listFeatures(_0x2a4154){const _0x394081=_0x4bed,_0x559b1f={'TMtmi':function(_0xd62583){return _0xd62583();},'RQwdt':'gitRepoUrl','NYAOj':_0x394081(0x230),'UFWki':'offset','vZMpM':'GET'},_0x5b4ea8=await getToken();if(!_0x5b4ea8)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3226ea=_0x559b1f[_0x394081(0x1f0)](getApiBaseUrl),_0xa8b788=new URLSearchParams();if(_0x2a4154?.[_0x394081(0x203)])_0xa8b788['set'](_0x559b1f[_0x394081(0x204)],_0x2a4154['gitRepoUrl']);if(_0x2a4154?.['gitBranch'])_0xa8b788['set'](_0x559b1f[_0x394081(0x1f1)],_0x2a4154['gitBranch']);if(_0x2a4154?.[_0x394081(0x234)])_0xa8b788['set']('limit',_0x2a4154[_0x394081(0x234)][_0x394081(0x21b)]());if(_0x2a4154?.[_0x394081(0x235)])_0xa8b788['set'](_0x559b1f['UFWki'],_0x2a4154['offset']['toString']());if(_0x2a4154?.['includeDeleted'])_0xa8b788[_0x394081(0x209)]('includeDeleted','true');const _0x3dc32c=_0x3226ea+'/api/v1/mcp/features'+(_0xa8b788[_0x394081(0x21b)]()?'?'+_0xa8b788['toString']():''),_0x232da0=await fetch(_0x3dc32c,{'method':_0x559b1f[_0x394081(0x1f5)],'headers':{'Authorization':_0x394081(0x1fa)+_0x5b4ea8}});if(!_0x232da0['ok']){const _0x21f330=await _0x232da0[_0x394081(0x218)]();throw new Error(_0x394081(0x20f)+_0x21f330);}return _0x232da0[_0x394081(0x21c)]();}export async function getFeature(_0x5161d3){const _0x48e618=_0x4bed,_0x2aff76={'cVLWm':function(_0x504b35){return _0x504b35();},'hXUVb':'GET'},_0x11592c=await _0x2aff76['cVLWm'](getToken);if(!_0x11592c)throw new Error(_0x48e618(0x1fe));const _0x3e35af=getApiBaseUrl(),_0x36404a=await fetch(_0x3e35af+_0x48e618(0x21e)+_0x5161d3,{'method':_0x2aff76['hXUVb'],'headers':{'Authorization':'Bearer\x20'+_0x11592c}});if(!_0x36404a['ok']){const _0x347f4f=await _0x36404a[_0x48e618(0x218)]();throw new Error(_0x48e618(0x223)+_0x347f4f);}return _0x36404a[_0x48e618(0x21c)]();}export async function updateFeature(_0x1bff27,_0x1e01ba){const _0x568fd7=_0x4bed,_0x518818={'DZTtS':function(_0x249950){return _0x249950();},'QUptQ':_0x568fd7(0x215)},_0x1e49f0=await getToken();if(!_0x1e49f0)throw new Error(_0x568fd7(0x1fe));const _0x41abc1=_0x518818['DZTtS'](getApiBaseUrl),_0x24516b=await fetch(_0x41abc1+'/api/v1/mcp/features/'+_0x1bff27,{'method':_0x518818['QUptQ'],'headers':{'Authorization':'Bearer\x20'+_0x1e49f0,'Content-Type':_0x568fd7(0x212)},'body':JSON[_0x568fd7(0x22e)](_0x1e01ba)});if(!_0x24516b['ok']){const _0x47025d=await _0x24516b[_0x568fd7(0x218)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x47025d);}return _0x24516b['json']();}export async function createChecklistItem(_0x528bfd,_0x5dcade,_0x28846e){const _0x39ef2f=_0x4bed,_0x47d0be={'SeMNc':_0x39ef2f(0x1fe)},_0x2d9b34=await getToken();if(!_0x2d9b34)throw new Error(_0x47d0be[_0x39ef2f(0x200)]);const _0x19ae8e=getApiBaseUrl(),_0xec3f1f=await fetch(_0x19ae8e+_0x39ef2f(0x21e)+_0x528bfd+_0x39ef2f(0x233),{'method':_0x39ef2f(0x211),'headers':{'Authorization':'Bearer\x20'+_0x2d9b34,'Content-Type':_0x39ef2f(0x212)},'body':JSON['stringify']({'description':_0x5dcade,'position':_0x28846e})});if(!_0xec3f1f['ok']){const _0x4a573d=await _0xec3f1f['text']();throw new Error(_0x39ef2f(0x1f8)+_0x4a573d);}return _0xec3f1f['json']();}export async function updateChecklistItem(_0x266b63,_0x27f23f,_0x1e9c4f){const _0x13d11a=_0x4bed,_0x57d6da={'uURin':function(_0x25cf7f){return _0x25cf7f();},'XSBLV':_0x13d11a(0x1fe),'PDHcN':function(_0xce87f2){return _0xce87f2();},'bHxIO':'application/json','SVwfe':function(_0x3a6d35,_0x55c52b,_0xc0f3bf){return _0x3a6d35(_0x55c52b,_0xc0f3bf);}};return _0x57d6da['SVwfe'](withRetry,async()=>{const _0x415ae2=_0x13d11a,_0x2634ac=await _0x57d6da['uURin'](getToken);if(!_0x2634ac)throw new Error(_0x57d6da[_0x415ae2(0x1f3)]);const _0x342802=_0x57d6da['PDHcN'](getApiBaseUrl),_0x1d8278=await fetch(_0x342802+'/api/v1/mcp/features/'+_0x266b63+_0x415ae2(0x1f2)+_0x27f23f,{'method':_0x415ae2(0x215),'headers':{'Authorization':'Bearer\x20'+_0x2634ac,'Content-Type':_0x57d6da[_0x415ae2(0x1f7)]},'body':JSON[_0x415ae2(0x22e)](_0x1e9c4f)});if(!_0x1d8278['ok']){const _0x51c5ca=await _0x1d8278['text']();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x51c5ca);}return _0x1d8278[_0x415ae2(0x21c)]();},{'label':_0x13d11a(0x231)});}export async function getFeatureReport(_0x2e8501){const _0x426880=_0x4bed,_0x59a88c={'XJLkz':function(_0x1f474b){return _0x1f474b();},'HTavr':function(_0x4759a8,_0x422b86,_0x8838f6){return _0x4759a8(_0x422b86,_0x8838f6);},'nMwuO':_0x426880(0x208)},_0x402c58=await _0x59a88c['XJLkz'](getToken);if(!_0x402c58)throw new Error(_0x426880(0x1fe));const _0x1f2c10=getApiBaseUrl(),_0x2b2741=await _0x59a88c['HTavr'](fetch,_0x1f2c10+'/api/v1/mcp/features/'+_0x2e8501+'/report',{'method':_0x59a88c['nMwuO'],'headers':{'Authorization':'Bearer\x20'+_0x402c58}});if(!_0x2b2741['ok']){const _0x550561=await _0x2b2741['text']();throw new Error(_0x426880(0x22f)+_0x550561);}return _0x2b2741[_0x426880(0x21c)]();}export async function getFeatureReportMarkdown(_0x60cd44,_0x135145){const _0xf180d1=_0x4bed,_0x1f522e={'JuopZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','MBtKZ':function(_0x1781af,_0x4a341e){return _0x1781af>_0x4a341e;},'fkbQn':function(_0x1f96db,_0x3cbd03){return _0x1f96db(_0x3cbd03);},'eUwgr':'itemIds','FrhFr':function(_0x1c9630,_0x520750){return _0x1c9630&&_0x520750;},'HOAfZ':_0xf180d1(0x1fb),'yMqTe':function(_0x1305cc,_0x362b38,_0x367dec){return _0x1305cc(_0x362b38,_0x367dec);},'YNGBi':_0xf180d1(0x208)},_0x27ccc6=await getToken();if(!_0x27ccc6)throw new Error(_0x1f522e[_0xf180d1(0x216)]);const _0x386e1a=getApiBaseUrl(),_0x11bfd4=new URLSearchParams(),_0x3ea418=_0x1f522e[_0xf180d1(0x225)](_0x135145?.['itemIds']?.[_0xf180d1(0x1f9)]??0x0,0x0),_0x5ef66f=_0x1f522e['fkbQn'](Boolean,_0x135145?.[_0xf180d1(0x21a)]);_0x3ea418&&_0x135145?.['itemIds']&&_0x11bfd4[_0xf180d1(0x209)](_0x1f522e['eUwgr'],_0x135145['itemIds']['join'](','));_0x5ef66f&&_0x135145?.[_0xf180d1(0x21a)]&&_0x11bfd4['set']('sessionId',_0x135145[_0xf180d1(0x21a)]);_0x1f522e[_0xf180d1(0x226)](!_0x3ea418,!_0x5ef66f)&&_0x135145?.['style']&&_0x11bfd4[_0xf180d1(0x209)](_0x1f522e[_0xf180d1(0x229)],_0x135145['style']);const _0x54736e=_0x386e1a+'/api/v1/mcp/features/'+_0x60cd44+'/report/markdown',_0xa2d260=''+_0x54736e+(_0x11bfd4[_0xf180d1(0x21b)]()?'?'+_0x11bfd4[_0xf180d1(0x21b)]():''),_0x23ac25=await _0x1f522e['yMqTe'](fetch,_0xa2d260,{'method':_0x1f522e[_0xf180d1(0x227)],'headers':{'Authorization':_0xf180d1(0x1fa)+_0x27ccc6}});if(!_0x23ac25['ok']){const _0x3b93ee=await _0x23ac25['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x3b93ee);}return _0x23ac25[_0xf180d1(0x218)]();}export async function listFeatureSessions(_0x8bb440){const _0x439867=_0x4bed,_0x3f4ad3={'RMAhs':function(_0x272979){return _0x272979();},'CkwuA':function(_0x377991){return _0x377991();},'GmgHJ':function(_0x44ceb9,_0x1ead82,_0x1b9c73){return _0x44ceb9(_0x1ead82,_0x1b9c73);},'XgXET':_0x439867(0x208)},_0x169d5b=await _0x3f4ad3[_0x439867(0x210)](getToken);if(!_0x169d5b)throw new Error(_0x439867(0x1fe));const _0x22a8ac=_0x3f4ad3[_0x439867(0x232)](getApiBaseUrl),_0x285734=await _0x3f4ad3['GmgHJ'](fetch,_0x22a8ac+_0x439867(0x21e)+_0x8bb440+_0x439867(0x217),{'method':_0x3f4ad3['XgXET'],'headers':{'Authorization':'Bearer\x20'+_0x169d5b}});if(!_0x285734['ok']){const _0x2bc903=await _0x285734['text']();throw new Error(_0x439867(0x20a)+_0x2bc903);}return _0x285734['json']();}function _0x4bed(_0x24bc4d,_0x26551b){_0x24bc4d=_0x24bc4d-0x1ed;const _0x3c2952=_0x3c29();let _0x4bedf6=_0x3c2952[_0x24bc4d];return _0x4bedf6;}export async function startSession(_0x1379e8,_0x205067){const _0x2ea89b=_0x4bed,_0x3cbe8f={'USPEY':function(_0x1cd02b){return _0x1cd02b();},'dTDid':_0x2ea89b(0x1fe),'XvoPd':function(_0x182b01){return _0x182b01();}},_0x4acc50=await _0x3cbe8f['USPEY'](getToken);if(!_0x4acc50)throw new Error(_0x3cbe8f['dTDid']);const _0x1ce278=_0x3cbe8f['XvoPd'](getApiBaseUrl),_0x40a878=await fetch(_0x1ce278+_0x2ea89b(0x21e)+_0x1379e8+'/sessions/'+_0x205067+_0x2ea89b(0x1fc),{'method':_0x2ea89b(0x211),'headers':{'Authorization':'Bearer\x20'+_0x4acc50}});if(!_0x40a878['ok']){const _0x2cccca=await _0x40a878[_0x2ea89b(0x218)]();throw new Error(_0x2ea89b(0x22d)+_0x2cccca);}return _0x40a878['json']();}export async function concludeSession(_0x48c3a6,_0x162d48){const _0x509227=_0x4bed,_0x33c00e={'qhMZk':function(_0x80f02){return _0x80f02();},'rubsY':function(_0x3110e4,_0xd139ac,_0x2d8c5c){return _0x3110e4(_0xd139ac,_0x2d8c5c);},'JVVuX':'POST'},_0x3f0e87=await _0x33c00e['qhMZk'](getToken);if(!_0x3f0e87)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5ebaee=getApiBaseUrl(),_0x22ba6a=await _0x33c00e['rubsY'](fetch,_0x5ebaee+'/api/v1/mcp/features/'+_0x48c3a6+_0x509227(0x1f4)+_0x162d48+_0x509227(0x20d),{'method':_0x33c00e[_0x509227(0x20b)],'headers':{'Authorization':'Bearer\x20'+_0x3f0e87}});if(!_0x22ba6a['ok']){const _0x1305d9=await _0x22ba6a['text']();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x1305d9);}return _0x22ba6a[_0x509227(0x21c)]();}export async function getActionItems(_0x2ba25e){const _0x107c27=_0x4bed,_0x5e004f={'vNnDU':function(_0x714f8b){return _0x714f8b();},'xNjRl':function(_0x2c526c,_0x384537,_0x43dc96){return _0x2c526c(_0x384537,_0x43dc96);}},_0x14ca6d=await _0x5e004f['vNnDU'](getToken);if(!_0x14ca6d)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0xdcded1=getApiBaseUrl(),_0x2396ab=await _0x5e004f[_0x107c27(0x201)](fetch,_0xdcded1+'/api/v1/mcp/features/'+_0x2ba25e+'/action-items',{'method':_0x107c27(0x208),'headers':{'Authorization':'Bearer\x20'+_0x14ca6d}});if(!_0x2396ab['ok']){const _0x5f1541=await _0x2396ab[_0x107c27(0x218)]();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x5f1541);}return _0x2396ab['json']();}function _0x3c29(){const _0x2d93ea=['8iYJZVw','iuQrc','message','TMtmi','NYAOj','/checklist/','XSBLV','/sessions/','vZMpM','KWmDH','bHxIO','Failed\x20to\x20create\x20scenario:\x20','length','Bearer\x20','style','/start','797525dLlQfD','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','348367XXQqOw','SeMNc','xNjRl','uBPQe','gitRepoUrl','RQwdt','1864nbMosa','lwmhs','XXOPB','GET','set','Failed\x20to\x20list\x20sessions:\x20','JVVuX','37114raDLyA','/conclude','4746936zBckyv','Failed\x20to\x20list\x20feature\x20reviews:\x20','RMAhs','POST','application/json','Failed\x20to\x20create\x20feature\x20review:\x20','VnXAN','PATCH','JuopZ','/sessions','text','DELETE','sessionId','toString','json','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','/api/v1/mcp/features/','status','4457670zSgFyz','7033830oASpVJ','GbVtK','Failed\x20to\x20get\x20feature\x20review:\x20','RbhDE','MBtKZ','FrhFr','YNGBi','3lJmXPd','HOAfZ','11605968UvwgOJ','pyRaN','QORyS','Failed\x20to\x20start\x20session:\x20','stringify','Failed\x20to\x20get\x20feature\x20review\x20report:\x20','gitBranch','updateChecklistItem','CkwuA','/checklist','limit','offset'];_0x3c29=function(){return _0x2d93ea;};return _0x3c29();}export async function getItemFeedback(_0x5b6476,_0x370dd1){const _0x18f19f=_0x4bed,_0x2b822c={'ARSwJ':_0x18f19f(0x1fe),'lwmhs':function(_0x377bc4){return _0x377bc4();},'RbhDE':function(_0x9ab934,_0xa86eb5,_0x5c9c68){return _0x9ab934(_0xa86eb5,_0x5c9c68);},'KWmDH':'GET'},_0x4877ae=await getToken();if(!_0x4877ae)throw new Error(_0x2b822c['ARSwJ']);const _0x2e8ffc=_0x2b822c[_0x18f19f(0x206)](getApiBaseUrl),_0x63b0a=await _0x2b822c[_0x18f19f(0x224)](fetch,_0x2e8ffc+_0x18f19f(0x21e)+_0x5b6476+'/checklist-items/'+_0x370dd1+'/feedback',{'method':_0x2b822c[_0x18f19f(0x1f6)],'headers':{'Authorization':_0x18f19f(0x1fa)+_0x4877ae}});if(!_0x63b0a['ok']){const _0x553b73=await _0x63b0a['text']();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x553b73);}return _0x63b0a['json']();}export async function markCommentsAddressed(_0x312284,_0x2e9d34,_0x4c2d94){const _0x36fc77=_0x4bed,_0x292693={'iuQrc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','GZmud':function(_0x4882fa){return _0x4882fa();}},_0x205059=await getToken();if(!_0x205059)throw new Error(_0x292693[_0x36fc77(0x1ee)]);const _0x19fea5=_0x292693['GZmud'](getApiBaseUrl),_0x509ad5=await fetch(_0x19fea5+_0x36fc77(0x21e)+_0x312284+'/comments/address',{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x205059,'Content-Type':_0x36fc77(0x212)},'body':JSON[_0x36fc77(0x22e)]({'checklistItemId':_0x2e9d34,'commentIds':_0x4c2d94})});if(!_0x509ad5['ok']){const _0xfe7cc2=await _0x509ad5['text']();throw new Error(_0x36fc77(0x21d)+_0xfe7cc2);}}export async function softDeleteFeature(_0x1f223e){const _0x3d796c=_0x4bed,_0xf7fc25={'XXOPB':function(_0x817de5){return _0x817de5();},'eMDwi':function(_0x4db693,_0x4f9227,_0x141956){return _0x4db693(_0x4f9227,_0x141956);}},_0x5ba123=await _0xf7fc25[_0x3d796c(0x207)](getToken);if(!_0x5ba123)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3c39ef=getApiBaseUrl(),_0x20836c=await _0xf7fc25['eMDwi'](fetch,_0x3c39ef+_0x3d796c(0x21e)+_0x1f223e,{'method':_0x3d796c(0x219),'headers':{'Authorization':'Bearer\x20'+_0x5ba123}});if(!_0x20836c['ok']){const _0x39793e=await _0x20836c[_0x3d796c(0x218)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x39793e);}}export async function restoreFeature(_0x99cb78){const _0x28c13d=_0x4bed,_0x23b1a5={'QORyS':function(_0xc91bc9){return _0xc91bc9();},'XEIKT':_0x28c13d(0x1fe),'pyRaN':function(_0x3ab9fb,_0x104463,_0x54d881){return _0x3ab9fb(_0x104463,_0x54d881);},'udDEg':_0x28c13d(0x211)},_0x86c2f0=await _0x23b1a5[_0x28c13d(0x22c)](getToken);if(!_0x86c2f0)throw new Error(_0x23b1a5['XEIKT']);const _0x8c463f=getApiBaseUrl(),_0x1c8c75=await _0x23b1a5[_0x28c13d(0x22b)](fetch,_0x8c463f+_0x28c13d(0x21e)+_0x99cb78+'/restore',{'method':_0x23b1a5['udDEg'],'headers':{'Authorization':_0x28c13d(0x1fa)+_0x86c2f0}});if(!_0x1c8c75['ok']){const _0x27fdff=await _0x1c8c75[_0x28c13d(0x218)]();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x27fdff);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8d32da=_0x206b;function _0x206b(_0x51e971,_0x25e7b9){_0x51e971=_0x51e971-0xb7;const _0x1b06f3=_0x1b06();let _0x206b9f=_0x1b06f3[_0x51e971];return _0x206b9f;}(function(_0x5073bc,_0x1e8508){const _0x374034=_0x206b,_0x47e9ad=_0x5073bc();while(!![]){try{const _0x2db330=parseInt(_0x374034(0xe2))/0x1+parseInt(_0x374034(0xfc))/0x2+parseInt(_0x374034(0xe8))/0x3*(parseInt(_0x374034(0xd5))/0x4)+-parseInt(_0x374034(0xcf))/0x5+parseInt(_0x374034(0xda))/0x6+-parseInt(_0x374034(0xc1))/0x7*(parseInt(_0x374034(0xc5))/0x8)+parseInt(_0x374034(0xf7))/0x9*(-parseInt(_0x374034(0xdb))/0xa);if(_0x2db330===_0x1e8508)break;else _0x47e9ad['push'](_0x47e9ad['shift']());}catch(_0x2e6e69){_0x47e9ad['push'](_0x47e9ad['shift']());}}}(_0x1b06,0xece5f));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_DURATION=0x4489,ID_VOID=0xec,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_SIMPLE_BLOCK=0xa3;function readVint(_0xafb0e8,_0x3d3829){const _0x31a80f=_0x206b,_0x46f3b8={'BdRZy':function(_0x25f7e1,_0x3a28f0){return _0x25f7e1&_0x3a28f0;},'NcRjV':function(_0x2e6285,_0x372485){return _0x2e6285>_0x372485;},'WufPP':function(_0x567836,_0x1f580b){return _0x567836+_0x1f580b;},'UCgwZ':function(_0x477112,_0x41f095){return _0x477112&_0x41f095;},'nMQIn':function(_0x20ed46,_0x16481c){return _0x20ed46-_0x16481c;},'EZOYa':function(_0x235281,_0x47b137){return _0x235281<_0x47b137;}};if(_0x3d3829>=_0xafb0e8[_0x31a80f(0xbc)])return[0x0,0x0];const _0x9d8f79=_0xafb0e8[_0x3d3829];let _0x4a05fe=0x1,_0x22404b=0x80;while(_0x4a05fe<=0x8&&!_0x46f3b8[_0x31a80f(0xc9)](_0x9d8f79,_0x22404b)){_0x4a05fe++,_0x22404b>>=0x1;}if(_0x46f3b8['NcRjV'](_0x46f3b8[_0x31a80f(0xf2)](_0x3d3829,_0x4a05fe),_0xafb0e8['length']))return[0x0,0x0];let _0x4f1185=_0x46f3b8['UCgwZ'](_0x9d8f79,_0x46f3b8['nMQIn'](_0x22404b,0x1));for(let _0x44b672=0x1;_0x46f3b8[_0x31a80f(0xbe)](_0x44b672,_0x4a05fe);_0x44b672++){_0x4f1185=_0x4f1185*0x100+_0xafb0e8[_0x46f3b8[_0x31a80f(0xf2)](_0x3d3829,_0x44b672)];}return[_0x4f1185,_0x4a05fe];}function readId(_0x6fad36,_0x3d38c6){const _0x4922d1=_0x206b,_0x363ccf={'qufHh':function(_0x14fccf,_0xc3ce56){return _0x14fccf>=_0xc3ce56;},'nJijN':function(_0x4127e7,_0x4c60fe){return _0x4127e7>=_0x4c60fe;},'GNiLU':function(_0x14d398,_0x38c521){return _0x14d398>=_0x38c521;},'FhpSN':function(_0xec3853,_0x6b90ed){return _0xec3853>_0x6b90ed;},'BGYEY':function(_0x5d6542,_0x42f365){return _0x5d6542+_0x42f365;},'ujgon':function(_0x298412,_0x29a68a){return _0x298412*_0x29a68a;}};if(_0x3d38c6>=_0x6fad36[_0x4922d1(0xbc)])return[0x0,0x0];const _0x7d9c7e=_0x6fad36[_0x3d38c6];let _0x1ebcde;if(_0x363ccf[_0x4922d1(0xf6)](_0x7d9c7e,0x80))_0x1ebcde=0x1;else{if(_0x7d9c7e>=0x40)_0x1ebcde=0x2;else{if(_0x363ccf[_0x4922d1(0xe6)](_0x7d9c7e,0x20))_0x1ebcde=0x3;else{if(_0x363ccf[_0x4922d1(0xe3)](_0x7d9c7e,0x10))_0x1ebcde=0x4;else return[_0x7d9c7e,0x1];}}}if(_0x363ccf['FhpSN'](_0x363ccf['BGYEY'](_0x3d38c6,_0x1ebcde),_0x6fad36['length']))return[0x0,0x0];let _0x499774=0x0;for(let _0xfc1c3d=0x0;_0xfc1c3d<_0x1ebcde;_0xfc1c3d++){_0x499774=_0x363ccf[_0x4922d1(0xfa)](_0x363ccf[_0x4922d1(0xef)](_0x499774,0x100),_0x6fad36[_0x3d38c6+_0xfc1c3d]);}return[_0x499774,_0x1ebcde];}function readUint(_0x26f6c7,_0x354aa0,_0x2838b4){const _0x2e437d=_0x206b,_0x33eb83={'epLdx':function(_0x2807a2,_0x50f8ab){return _0x2807a2+_0x50f8ab;},'fRCBu':function(_0x147582,_0x5c38f8){return _0x147582*_0x5c38f8;},'FEtQA':function(_0x3bfbfa,_0x5161e9){return _0x3bfbfa+_0x5161e9;}};let _0xa49876=0x0;for(let _0x394ee2=0x0;_0x394ee2<_0x2838b4;_0x394ee2++){_0xa49876=_0x33eb83[_0x2e437d(0xbf)](_0x33eb83['fRCBu'](_0xa49876,0x100),_0x26f6c7[_0x33eb83[_0x2e437d(0xed)](_0x354aa0,_0x394ee2)]);}return _0xa49876;}function isUnknownSize(_0x460cc4,_0x5d8147){const _0x45fbf2=_0x206b,_0x495faf={'ABEUw':function(_0x192ade,_0x3eef8c){return _0x192ade*_0x3eef8c;}};return _0x460cc4===Math[_0x45fbf2(0xf4)](0x2,_0x495faf[_0x45fbf2(0xd6)](0x7,_0x5d8147))-0x1;}function writeId(_0x4eade8){const _0x93a2dd=_0x206b,_0x57e7f4={'CyDBt':function(_0xc984f9,_0x1bcd59){return _0xc984f9<=_0x1bcd59;},'IEOay':function(_0x14f16e,_0x19b42f){return _0x14f16e&_0x19b42f;},'grzqG':function(_0x4a21f5,_0x3d7024){return _0x4a21f5>>_0x3d7024;},'XeTAl':function(_0x5d592e,_0x3f7f9b){return _0x5d592e>>_0x3f7f9b;},'FcMwc':function(_0x10d90a,_0x218070){return _0x10d90a&_0x218070;}};if(_0x4eade8<=0xff)return Buffer[_0x93a2dd(0xcb)]([_0x4eade8]);if(_0x57e7f4[_0x93a2dd(0xd7)](_0x4eade8,0xffff))return Buffer['from']([_0x4eade8>>0x8&0xff,_0x4eade8&0xff]);if(_0x4eade8<=0xffffff)return Buffer['from']([_0x57e7f4[_0x93a2dd(0xc2)](_0x57e7f4['grzqG'](_0x4eade8,0x10),0xff),_0x57e7f4[_0x93a2dd(0xc2)](_0x4eade8>>0x8,0xff),_0x57e7f4[_0x93a2dd(0xc2)](_0x4eade8,0xff)]);return Buffer[_0x93a2dd(0xcb)]([_0x4eade8>>0x18&0xff,_0x57e7f4[_0x93a2dd(0xfb)](_0x4eade8,0x10)&0xff,_0x57e7f4[_0x93a2dd(0xce)](_0x4eade8,0x8)&0xff,_0x57e7f4['FcMwc'](_0x4eade8,0xff)]);}function writeVint(_0x356baa,_0x436e46){const _0x47a185=_0x206b,_0x937e74={'PQmyS':function(_0x2a0435,_0x5ebf0d){return _0x2a0435||_0x5ebf0d;},'QjDTx':function(_0x25ea14,_0x569dd3){return _0x25ea14<_0x569dd3;},'gqNJD':function(_0x1c3134,_0x58f173){return _0x1c3134-_0x58f173;},'Mkuky':function(_0xc8ab86,_0x4fbf0a){return _0xc8ab86*_0x4fbf0a;},'wDnDH':function(_0x5ba9a6,_0xaa96){return _0x5ba9a6&_0xaa96;},'wUXkV':function(_0x2aef6b,_0x23c5c3){return _0x2aef6b/_0x23c5c3;},'hsFAw':function(_0x5ebfa2,_0x51199e){return _0x5ebfa2-_0x51199e;}};let _0x5cd55f=_0x937e74['PQmyS'](_0x436e46,0x1);while(_0x937e74[_0x47a185(0xc6)](_0x937e74['gqNJD'](Math['pow'](0x2,_0x937e74['Mkuky'](0x7,_0x5cd55f)),0x2),_0x356baa))_0x5cd55f++;const _0x328508=Buffer['alloc'](_0x5cd55f);for(let _0x47115=_0x5cd55f-0x1;_0x47115>=0x0;_0x47115--){_0x328508[_0x47115]=_0x937e74[_0x47a185(0xd1)](_0x356baa,0xff),_0x356baa=Math['floor'](_0x937e74[_0x47a185(0xf9)](_0x356baa,0x100));}return _0x328508[0x0]|=0x1<<_0x937e74[_0x47a185(0xea)](0x8,_0x5cd55f),_0x328508;}function writeFloat64(_0x351b14){const _0x185a29=_0x206b,_0x55f51e=Buffer[_0x185a29(0xb8)](0x8);return _0x55f51e['writeDoubleBE'](_0x351b14,0x0),_0x55f51e;}function _0x1b06(){const _0x25a384=['argv','763KYOgVt','IEOay','fixWebmDuration.js','indexOf','77416ynXlqW','QjDTx','dataOffset','slice','BdRZy','yqVsm','from','CWhuO','dataSize','grzqG','1139590swmwvY','CzOVx','wDnDH','readInt16BE','Could\x20not\x20find\x20Info\x20element','zZIjG','882568lwkqiN','ABEUw','CyDBt','joBBh','concat','9181464HdEeoO','11946390UHnilN','log','Could\x20not\x20compute\x20duration','jOoLQ','exit','vUjMY','offset','920344mzbeWa','GNiLU','PYobu','IGQGh','nJijN','idLen','21pOLMDp','HSTJj','hsFAw','VVvvS','sizeLen','FEtQA','VlRKZ','ujgon','nOauS','HmTwt','WufPP','IjxzG','pow','Fixed:\x20','qufHh','27EKEQJz','DJJZm','wUXkV','BGYEY','XeTAl','3683762guEjzJ','jTrrx','alloc','sQDmd','cirTB','RVUdo','length','sFGWc','EZOYa','epLdx'];_0x1b06=function(){return _0x25a384;};return _0x1b06();}function writeVoid(_0x37e858){const _0x36b76a=_0x206b,_0x43eae6={'eLIUy':function(_0x2ba510,_0xb9f266){return _0x2ba510<=_0xb9f266;},'lsyMj':function(_0x148e56,_0x501a79){return _0x148e56-_0x501a79;},'oTdaT':function(_0x52f64e,_0x4c28ca){return _0x52f64e-_0x4c28ca;},'HmTwt':function(_0x1c72a0,_0x2968e5){return _0x1c72a0*_0x2968e5;},'vUjMY':function(_0x59c1ed,_0x2ae130,_0x273930){return _0x59c1ed(_0x2ae130,_0x273930);}};for(let _0x18d4a7=0x1;_0x43eae6['eLIUy'](_0x18d4a7,0x8);_0x18d4a7++){const _0x2ee0a5=_0x43eae6['lsyMj'](_0x43eae6['oTdaT'](_0x37e858,0x1),_0x18d4a7);if(_0x2ee0a5>=0x0&&_0x2ee0a5<=Math[_0x36b76a(0xf4)](0x2,_0x43eae6[_0x36b76a(0xf1)](0x7,_0x18d4a7))-0x2)return Buffer['concat']([Buffer[_0x36b76a(0xcb)]([ID_VOID]),_0x43eae6[_0x36b76a(0xe0)](writeVint,_0x2ee0a5,_0x18d4a7),Buffer[_0x36b76a(0xb8)](_0x2ee0a5)]);}return Buffer[_0x36b76a(0xb8)](0x0);}function findElement(_0xbf6862,_0x118412,_0xa90351,_0x21e8ca){const _0x558139=_0x206b,_0x30562b={'bgXtQ':function(_0x347ee6,_0x374ef8,_0x34318c){return _0x347ee6(_0x374ef8,_0x34318c);},'xVAQM':function(_0x3d3b5c,_0x5203bb,_0x1063b5){return _0x3d3b5c(_0x5203bb,_0x1063b5);},'yqVsm':function(_0x1457e6,_0x2eea0f){return _0x1457e6+_0x2eea0f;},'IjxzG':function(_0x5ddc33,_0x301dcc){return _0x5ddc33+_0x301dcc;},'HSTJj':function(_0x5ca2ac,_0x59a0c6,_0x271fae){return _0x5ca2ac(_0x59a0c6,_0x271fae);}};let _0x2503f0=_0x118412;while(_0x2503f0<_0xa90351){const [_0x4623da,_0xdfc815]=_0x30562b['bgXtQ'](readId,_0xbf6862,_0x2503f0),[_0x540f6e,_0x306a0c]=_0x30562b['xVAQM'](readVint,_0xbf6862,_0x30562b[_0x558139(0xca)](_0x2503f0,_0xdfc815));if(_0x4623da===_0x21e8ca)return{'offset':_0x2503f0,'idLen':_0xdfc815,'sizeLen':_0x306a0c,'dataSize':_0x540f6e,'dataOffset':_0x30562b[_0x558139(0xf3)](_0x30562b['IjxzG'](_0x2503f0,_0xdfc815),_0x306a0c)};if(_0x30562b[_0x558139(0xe9)](isUnknownSize,_0x540f6e,_0x306a0c))break;_0x2503f0+=_0xdfc815+_0x306a0c+_0x540f6e;}return null;}function computeDurationMs(_0x36491a,_0x36c67c){const _0x282dcf=_0x206b,_0x33ab03={'GGyWq':function(_0x2f5831,_0x25fd4a){return _0x2f5831===_0x25fd4a;},'IGQGh':function(_0x56ff16,_0x3f8db6){return _0x56ff16<_0x3f8db6;},'zZIjG':function(_0x3b25fd,_0x100415,_0x4b3695){return _0x3b25fd(_0x100415,_0x4b3695);},'YMCYj':function(_0xc275a2,_0x25df15){return _0xc275a2!==_0x25df15;},'cirTB':function(_0x4b513b,_0x20a4f4,_0x535d9b){return _0x4b513b(_0x20a4f4,_0x535d9b);},'eAKop':function(_0x9bb9ef,_0x5ead9f){return _0x9bb9ef<_0x5ead9f;},'CWhuO':function(_0x5aaea7,_0x3b5e02){return _0x5aaea7-_0x3b5e02;},'HipDT':function(_0x279dc2,_0x20ae2e){return _0x279dc2===_0x20ae2e;},'wzrid':function(_0x51f7c1,_0xe2f0df,_0x70df9e){return _0x51f7c1(_0xe2f0df,_0x70df9e);},'sFGWc':function(_0x30c74a,_0x2b23c3,_0x149541,_0x4b995c){return _0x30c74a(_0x2b23c3,_0x149541,_0x4b995c);},'FCqQt':function(_0x5aae95,_0x5ec837){return _0x5aae95+_0x5ec837;},'DJJZm':function(_0x568353,_0x10f1c1){return _0x568353*_0x10f1c1;},'xQCpj':function(_0xd2e96,_0x576aa6){return _0xd2e96+_0x576aa6;}};let _0x1d07eb=0x0;const _0x59bc82=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x447eb8=_0x36491a[_0x282dcf(0xc4)](_0x59bc82);if(_0x33ab03['GGyWq'](_0x447eb8,-0x1))return 0x0;while(_0x33ab03[_0x282dcf(0xe5)](_0x447eb8,_0x36491a['length'])){const [_0x5013ca,_0x27da5e]=_0x33ab03[_0x282dcf(0xd4)](readId,_0x36491a,_0x447eb8);if(_0x33ab03['YMCYj'](_0x5013ca,ID_CLUSTER))break;const [_0xe810c2,_0x3bfe1e]=_0x33ab03['cirTB'](readVint,_0x36491a,_0x447eb8+_0x27da5e),_0x2b13ed=_0x447eb8+_0x27da5e+_0x3bfe1e,_0x11a7c6=isUnknownSize(_0xe810c2,_0x3bfe1e);let _0x4959b0;if(_0x11a7c6){let _0x830efb=_0x2b13ed;while(_0x33ab03['eAKop'](_0x830efb,_0x33ab03[_0x282dcf(0xcc)](_0x36491a['length'],0x4))){const [_0x20eab4,_0x56bcdc]=readId(_0x36491a,_0x830efb);if(_0x33ab03['HipDT'](_0x20eab4,ID_CLUSTER)){_0x4959b0=_0x830efb;break;}const [_0x494fcd,_0x3277de]=readVint(_0x36491a,_0x830efb+_0x56bcdc);if(_0x33ab03['wzrid'](isUnknownSize,_0x494fcd,_0x3277de)){_0x4959b0=_0x36491a[_0x282dcf(0xbc)];break;}_0x830efb+=_0x56bcdc+_0x3277de+_0x494fcd;}_0x4959b0??=_0x36491a['length'];}else _0x4959b0=_0x2b13ed+_0xe810c2;let _0x3dd735=0x0,_0xd5f08d=_0x2b13ed;while(_0xd5f08d<_0x4959b0){const [_0x1545ca,_0x4b3ea0]=readId(_0x36491a,_0xd5f08d),[_0x5cf81f,_0x595952]=readVint(_0x36491a,_0xd5f08d+_0x4b3ea0);if(_0x1545ca===ID_TIMESTAMP)_0x3dd735=_0x33ab03[_0x282dcf(0xbd)](readUint,_0x36491a,_0xd5f08d+_0x4b3ea0+_0x595952,_0x5cf81f);else{if(_0x1545ca===ID_SIMPLE_BLOCK&&_0x5cf81f>=0x4){const _0xdf7b3f=_0xd5f08d+_0x4b3ea0+_0x595952,[,_0x2f353e]=_0x33ab03[_0x282dcf(0xba)](readVint,_0x36491a,_0xdf7b3f),_0x2a2cba=_0x36491a[_0x282dcf(0xd2)](_0x33ab03['FCqQt'](_0xdf7b3f,_0x2f353e)),_0xc8dc81=_0x33ab03[_0x282dcf(0xf8)](_0x3dd735+_0x2a2cba,_0x36c67c)/0xf4240;_0xc8dc81>_0x1d07eb&&(_0x1d07eb=_0xc8dc81);}else{if(_0x1545ca===ID_CLUSTER)break;}}if(_0x33ab03[_0x282dcf(0xba)](isUnknownSize,_0x5cf81f,_0x595952))break;_0xd5f08d+=_0x33ab03['xQCpj'](_0x4b3ea0,_0x595952)+_0x5cf81f;}_0x447eb8=_0x4959b0;}return _0x1d07eb;}export function fixWebmDuration(_0x5eaaf7,_0x432746){const _0x2418b9=_0x206b,_0x16473a={'CzOVx':function(_0x52bc5d,_0x5b5d69){return _0x52bc5d(_0x5b5d69);},'PYobu':function(_0x1568e9,_0x2bca40,_0x3032cd){return _0x1568e9(_0x2bca40,_0x3032cd);},'sJWLS':function(_0x36149a,_0x19ff85){return _0x36149a+_0x19ff85;},'zuVNq':function(_0x2d52c4,_0x53a02b){return _0x2d52c4!==_0x53a02b;},'ltFiF':function(_0x393dfa,_0x4e1317){return _0x393dfa+_0x4e1317;},'cyMmS':function(_0x68eaf0,_0xd97b){return _0x68eaf0+_0xd97b;},'VJWrj':function(_0x3c16de,_0x1fecf0,_0x43a92a){return _0x3c16de(_0x1fecf0,_0x43a92a);},'sQDmd':function(_0x40fd4f,_0x3c6b9e){return _0x40fd4f+_0x3c6b9e;},'jTrrx':function(_0xfbe05e,_0xfbd164){return _0xfbe05e===_0xfbd164;},'HKKYQ':function(_0x4d93a4,_0x138d68){return _0x4d93a4+_0x138d68;},'qzXbf':function(_0x5c9716,_0x3aaa90){return _0x5c9716===_0x3aaa90;},'VVvvS':function(_0xdee167,_0x154682,_0x377754,_0x466cb0,_0x6e5df8){return _0xdee167(_0x154682,_0x377754,_0x466cb0,_0x6e5df8);},'joBBh':function(_0x41b643,_0x5a430a){return _0x41b643+_0x5a430a;},'RVUdo':function(_0x4d3fbe,_0x1f3ea0){return _0x4d3fbe<=_0x1f3ea0;},'MPotn':_0x2418b9(0xdd),'jOoLQ':function(_0x53aa04,_0x337a7a){return _0x53aa04/_0x337a7a;},'rDSYe':function(_0x434e62,_0x189fb1){return _0x434e62*_0x189fb1;},'kUEbj':function(_0x2044bb,_0x2b3154){return _0x2044bb<_0x2b3154;},'YYkax':function(_0x1927de,_0x288384){return _0x1927de+_0x288384;},'TvHBA':function(_0x4f441a,_0x21daac){return _0x4f441a+_0x21daac;},'nOauS':function(_0x26d7ac,_0x46b1f0){return _0x26d7ac+_0x46b1f0;},'VlRKZ':function(_0x3f692e,_0x21e9b2,_0x2286e7,_0x57f55a,_0x510525,_0x5ce192,_0x3a73c6){return _0x3f692e(_0x21e9b2,_0x2286e7,_0x57f55a,_0x510525,_0x5ce192,_0x3a73c6);}},_0x54d213=_0x16473a[_0x2418b9(0xd0)](readFileSync,_0x5eaaf7);let _0x5805be=0x0;const [_0x155073,_0x490b3c]=_0x16473a[_0x2418b9(0xe4)](readId,_0x54d213,_0x5805be),[_0x44d502,_0x4ee4bd]=readVint(_0x54d213,_0x5805be+_0x490b3c);_0x5805be+=_0x16473a['sJWLS'](_0x490b3c+_0x4ee4bd,_0x44d502);const [_0x43d56e,_0x53166b]=readId(_0x54d213,_0x5805be);if(_0x16473a['zuVNq'](_0x43d56e,ID_SEGMENT))return console['error']('Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment'),![];const [,_0x5ab5db]=readVint(_0x54d213,_0x5805be+_0x53166b),_0x35566f=_0x16473a['sJWLS'](_0x16473a['ltFiF'](_0x5805be,_0x53166b),_0x5ab5db);let _0x13692b=_0x35566f;const _0x412078=Math['min'](_0x54d213[_0x2418b9(0xbc)],_0x16473a['cyMmS'](_0x35566f,0x2710));let _0x5aba53=null,_0x3b70c4=null;while(_0x13692b<_0x412078){const [_0x12bd79,_0x354fdb]=readId(_0x54d213,_0x13692b),[_0xf7c51e,_0x6885c8]=_0x16473a['VJWrj'](readVint,_0x54d213,_0x16473a[_0x2418b9(0xb9)](_0x13692b,_0x354fdb));_0x16473a[_0x2418b9(0xb7)](_0x12bd79,ID_VOID)&&!_0x5aba53&&(_0x5aba53={'offset':_0x13692b,'idLen':_0x354fdb,'sizeLen':_0x6885c8,'dataSize':_0xf7c51e,'dataOffset':_0x16473a['HKKYQ'](_0x13692b+_0x354fdb,_0x6885c8)});if(_0x16473a['qzXbf'](_0x12bd79,ID_INFO)){_0x3b70c4={'offset':_0x13692b,'idLen':_0x354fdb,'sizeLen':_0x6885c8,'dataSize':_0xf7c51e,'dataOffset':_0x16473a['sQDmd'](_0x13692b+_0x354fdb,_0x6885c8)};break;}if(_0x12bd79===ID_CLUSTER)break;if(_0x16473a['PYobu'](isUnknownSize,_0xf7c51e,_0x6885c8))break;_0x13692b+=_0x354fdb+_0x6885c8+_0xf7c51e;}if(!_0x3b70c4)return console['error'](_0x2418b9(0xd3)),![];const _0x46a8d8=findElement(_0x54d213,_0x3b70c4['dataOffset'],_0x3b70c4['dataOffset']+_0x3b70c4[_0x2418b9(0xcd)],ID_DURATION);if(_0x46a8d8)return![];const _0x40fa5f=_0x16473a[_0x2418b9(0xeb)](findElement,_0x54d213,_0x3b70c4['dataOffset'],_0x16473a[_0x2418b9(0xd8)](_0x3b70c4[_0x2418b9(0xc7)],_0x3b70c4[_0x2418b9(0xcd)]),ID_TIMESTAMP_SCALE);let _0x2760c1=0xf4240;_0x40fa5f&&(_0x2760c1=readUint(_0x54d213,_0x40fa5f[_0x2418b9(0xc7)],_0x40fa5f['dataSize']));const _0x1d96e7=_0x16473a['VJWrj'](computeDurationMs,_0x54d213,_0x2760c1);if(_0x16473a[_0x2418b9(0xbb)](_0x1d96e7,0x0))return console['error'](_0x16473a['MPotn']),![];const _0x3579db=_0x16473a[_0x2418b9(0xde)](_0x16473a['rDSYe'](_0x1d96e7,0xf4240),_0x2760c1),_0x800ca4=Buffer['concat']([writeId(ID_DURATION),_0x16473a[_0x2418b9(0xd0)](writeVint,0x8),writeFloat64(_0x3579db)]),_0x1c38a5=_0x800ca4['length'];if(!_0x5aba53||_0x16473a['kUEbj'](_0x5aba53['offset'],_0x3b70c4['offset'])){if(_0x5aba53){const _0x56fc39=_0x16473a['YYkax'](_0x16473a['TvHBA'](_0x5aba53[_0x2418b9(0xe7)],_0x5aba53['sizeLen']),_0x5aba53[_0x2418b9(0xcd)]),_0x331c83=_0x56fc39-_0x1c38a5;if(_0x331c83<0x2)return rewriteFile(_0x54d213,_0x3b70c4,_0x800ca4,_0x2760c1,_0x1d96e7,_0x432746);const _0x3d503b=_0x3b70c4['dataSize']+_0x1c38a5,_0x4d0078=Buffer[_0x2418b9(0xd9)]([_0x16473a[_0x2418b9(0xd0)](writeId,ID_INFO),writeVint(_0x3d503b,_0x3b70c4[_0x2418b9(0xec)])]),_0xbdbd60=_0x54d213['slice'](_0x3b70c4['dataOffset'],_0x3b70c4[_0x2418b9(0xc7)]+_0x3b70c4['dataSize']),_0x76c2f5=writeVoid(_0x331c83),_0x5485f3=_0x54d213[_0x2418b9(0xc8)](0x0,_0x5aba53[_0x2418b9(0xe1)]),_0x278476=_0x54d213['slice'](_0x16473a[_0x2418b9(0xf0)](_0x3b70c4['dataOffset'],_0x3b70c4[_0x2418b9(0xcd)]));return writeFileSync(_0x432746,Buffer['concat']([_0x5485f3,_0x76c2f5,_0x4d0078,_0xbdbd60,_0x800ca4,_0x278476])),!![];}}return _0x16473a[_0x2418b9(0xee)](rewriteFile,_0x54d213,_0x3b70c4,_0x800ca4,_0x2760c1,_0x1d96e7,_0x432746);}function rewriteFile(_0x5bd809,_0x3651f5,_0x2a1f32,_0x46359b,_0x1b77b1,_0x2e0912){const _0x72f317=_0x206b,_0x44f2a1={'QXPEo':function(_0x1c0169,_0x41456a){return _0x1c0169+_0x41456a;},'hFVpI':function(_0x1c98be,_0xe8def5){return _0x1c98be+_0xe8def5;}},_0x5d7241=_0x44f2a1['QXPEo'](_0x3651f5['dataSize'],_0x2a1f32[_0x72f317(0xbc)]),_0x26ed4f=Buffer['concat']([writeId(ID_INFO),writeVint(_0x5d7241)]),_0x595ecc=_0x3651f5['idLen']+_0x3651f5['sizeLen'],_0x473f05=_0x5bd809['slice'](0x0,_0x3651f5[_0x72f317(0xe1)]),_0x892ca6=_0x5bd809['slice'](_0x3651f5[_0x72f317(0xc7)],_0x44f2a1['hFVpI'](_0x3651f5['dataOffset'],_0x3651f5['dataSize'])),_0x1394c8=_0x5bd809[_0x72f317(0xc8)](_0x44f2a1['QXPEo'](_0x3651f5['offset'],_0x595ecc)+_0x3651f5['dataSize']);return writeFileSync(_0x2e0912,Buffer['concat']([_0x473f05,_0x26ed4f,_0x892ca6,_0x2a1f32,_0x1394c8])),!![];}if(process['argv'][0x1]?.['endsWith']('fixWebmDuration.ts')||process['argv'][0x1]?.['endsWith'](_0x8d32da(0xc3))){const input=process[_0x8d32da(0xc0)][0x2],output=process[_0x8d32da(0xc0)][0x3];(!input||!output)&&(console['error']('Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>'),process[_0x8d32da(0xdf)](0x1));const fixed=fixWebmDuration(input,output);fixed?console[_0x8d32da(0xdc)](_0x8d32da(0xf5)+output):console[_0x8d32da(0xdc)]('File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.');}
|
|
1
|
+
const _0xfb0d33=_0x404e;(function(_0x267d02,_0x291f24){const _0x146f93=_0x404e,_0x156a9f=_0x267d02();while(!![]){try{const _0x325f0a=-parseInt(_0x146f93(0x1b1))/0x1+parseInt(_0x146f93(0x195))/0x2+-parseInt(_0x146f93(0x18b))/0x3+-parseInt(_0x146f93(0x1b6))/0x4+parseInt(_0x146f93(0x1b8))/0x5+-parseInt(_0x146f93(0x1a6))/0x6*(parseInt(_0x146f93(0x1c6))/0x7)+parseInt(_0x146f93(0x1bf))/0x8;if(_0x325f0a===_0x291f24)break;else _0x156a9f['push'](_0x156a9f['shift']());}catch(_0x349c99){_0x156a9f['push'](_0x156a9f['shift']());}}}(_0x5949,0x36fb2));function _0x404e(_0xec5c24,_0x53b545){_0xec5c24=_0xec5c24-0x185;const _0x594925=_0x5949();let _0x404e29=_0x594925[_0xec5c24];return _0x404e29;}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_DURATION=0x4489,ID_VOID=0xec,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x35fde2,_0x4069ba){const _0x1c2196=_0x404e,_0x4723d7={'UNNIR':function(_0x2d9584,_0x5dfe15){return _0x2d9584>=_0x5dfe15;},'RyZYj':function(_0x4ada85,_0x3473ff){return _0x4ada85<=_0x3473ff;},'CQKGE':function(_0x191972,_0x385a7b){return _0x191972&_0x385a7b;},'CrgYh':function(_0x108bfb,_0x21fa09){return _0x108bfb-_0x21fa09;},'fzPOs':function(_0x34029a,_0x3fac70){return _0x34029a*_0x3fac70;},'xFgKy':function(_0x3271cc,_0x201eba){return _0x3271cc+_0x201eba;}};if(_0x4723d7['UNNIR'](_0x4069ba,_0x35fde2['length']))return[0x0,0x0];const _0x20a2fb=_0x35fde2[_0x4069ba];let _0x21ad12=0x1,_0x504750=0x80;while(_0x4723d7[_0x1c2196(0x18a)](_0x21ad12,0x8)&&!(_0x20a2fb&_0x504750)){_0x21ad12++,_0x504750>>=0x1;}if(_0x4069ba+_0x21ad12>_0x35fde2['length'])return[0x0,0x0];let _0x25683d=_0x4723d7[_0x1c2196(0x1ab)](_0x20a2fb,_0x4723d7[_0x1c2196(0x196)](_0x504750,0x1));for(let _0x34e3fd=0x1;_0x34e3fd<_0x21ad12;_0x34e3fd++){_0x25683d=_0x4723d7['fzPOs'](_0x25683d,0x100)+_0x35fde2[_0x4723d7['xFgKy'](_0x4069ba,_0x34e3fd)];}return[_0x25683d,_0x21ad12];}function readId(_0x5ed34a,_0x52f87b){const _0x16ae67=_0x404e,_0x998d30={'pCCEP':function(_0x317e29,_0x27d3a5){return _0x317e29>=_0x27d3a5;},'zJsOZ':function(_0x504b27,_0x24476d){return _0x504b27>_0x24476d;},'aQHpk':function(_0x43abcf,_0x9c6280){return _0x43abcf+_0x9c6280;},'ohsPB':function(_0x34fb97,_0x5853f4){return _0x34fb97<_0x5853f4;},'MlUCt':function(_0x4e9349,_0x469bdd){return _0x4e9349*_0x469bdd;}};if(_0x998d30[_0x16ae67(0x1a3)](_0x52f87b,_0x5ed34a['length']))return[0x0,0x0];const _0x325183=_0x5ed34a[_0x52f87b];let _0x19215e;if(_0x998d30['pCCEP'](_0x325183,0x80))_0x19215e=0x1;else{if(_0x325183>=0x40)_0x19215e=0x2;else{if(_0x325183>=0x20)_0x19215e=0x3;else{if(_0x998d30['pCCEP'](_0x325183,0x10))_0x19215e=0x4;else return[_0x325183,0x1];}}}if(_0x998d30['zJsOZ'](_0x998d30[_0x16ae67(0x185)](_0x52f87b,_0x19215e),_0x5ed34a['length']))return[0x0,0x0];let _0x1bd0b2=0x0;for(let _0x250c4b=0x0;_0x998d30[_0x16ae67(0x1c4)](_0x250c4b,_0x19215e);_0x250c4b++){_0x1bd0b2=_0x998d30['MlUCt'](_0x1bd0b2,0x100)+_0x5ed34a[_0x52f87b+_0x250c4b];}return[_0x1bd0b2,_0x19215e];}function _0x5949(){const _0x424b15=['SiaxP','6175776zBMKvb','argv','icziE','HasiC','pow','ohsPB','JgYUS','959ykMKxF','aQHpk','LgHRy','HwpzU','Could\x20not\x20find\x20Info\x20element','Could\x20not\x20compute\x20duration','RyZYj','866319BGQQGe','FXqWY','UODrm','offset','uHlQR','from','caAqN','CUzGG','mXLHK','dataSize','811570JlFPHR','CrgYh','QlWXN','Bfqeg','kOdCT','gbIdr','dataOffset','slice','Guhcj','pmzpC','length','fixWebmDuration.js','alloc','fixWebmDuration.ts','pCCEP','fyBXS','Lmjnd','13866KvGZNu','Fixed:\x20','DziiD','gLYBJ','log','CQKGE','KQVTa','exit','XBGBH','Yvoif','VRilJ','216552dkVdoL','QBhis','yABcB','DSqOk','DzXvE','1620196qOfSVs','iguuX','1372130BZJNsM','Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>','UwGQA','pFhoO','concat','File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.'];_0x5949=function(){return _0x424b15;};return _0x5949();}function readUint(_0x5977b3,_0x39eda9,_0x5202aa){const _0x55cdee={'OsDre':function(_0x56f2cc,_0x49c51c){return _0x56f2cc*_0x49c51c;},'tEVJp':function(_0x561654,_0x3344d9){return _0x561654+_0x3344d9;}};let _0x97d293=0x0;for(let _0x46edfd=0x0;_0x46edfd<_0x5202aa;_0x46edfd++){_0x97d293=_0x55cdee['OsDre'](_0x97d293,0x100)+_0x5977b3[_0x55cdee['tEVJp'](_0x39eda9,_0x46edfd)];}return _0x97d293;}function isUnknownSize(_0x506174,_0x388f96){const _0x254d86=_0x404e,_0x44e4b6={'bADSM':function(_0x559758,_0x3129a9){return _0x559758===_0x3129a9;},'uaWUG':function(_0x55ca21,_0x201836){return _0x55ca21*_0x201836;}};return _0x44e4b6['bADSM'](_0x506174,Math[_0x254d86(0x1c3)](0x2,_0x44e4b6['uaWUG'](0x7,_0x388f96))-0x1);}function writeId(_0x58d8ae){const _0x3cd76f=_0x404e,_0x4fbe80={'gLYBJ':function(_0x2a5c63,_0x463201){return _0x2a5c63<=_0x463201;},'Qrtbe':function(_0x47ccbb,_0x5cfcc4){return _0x47ccbb<=_0x5cfcc4;},'hLGnY':function(_0x58030f,_0x3e5e35){return _0x58030f&_0x3e5e35;},'DSqOk':function(_0x58ca04,_0x5bc165){return _0x58ca04>>_0x5bc165;},'Bfqeg':function(_0x530a29,_0x4954d4){return _0x530a29&_0x4954d4;},'uHlQR':function(_0x5e3e2f,_0x25c084){return _0x5e3e2f>>_0x25c084;}};if(_0x4fbe80[_0x3cd76f(0x1a9)](_0x58d8ae,0xff))return Buffer[_0x3cd76f(0x190)]([_0x58d8ae]);if(_0x4fbe80['Qrtbe'](_0x58d8ae,0xffff))return Buffer['from']([_0x4fbe80['hLGnY'](_0x4fbe80[_0x3cd76f(0x1b4)](_0x58d8ae,0x8),0xff),_0x58d8ae&0xff]);if(_0x58d8ae<=0xffffff)return Buffer[_0x3cd76f(0x190)]([_0x4fbe80['Bfqeg'](_0x58d8ae>>0x10,0xff),_0x4fbe80[_0x3cd76f(0x1b4)](_0x58d8ae,0x8)&0xff,_0x4fbe80[_0x3cd76f(0x198)](_0x58d8ae,0xff)]);return Buffer[_0x3cd76f(0x190)]([_0x4fbe80[_0x3cd76f(0x18f)](_0x58d8ae,0x18)&0xff,_0x4fbe80['Bfqeg'](_0x58d8ae>>0x10,0xff),_0x58d8ae>>0x8&0xff,_0x58d8ae&0xff]);}function writeVint(_0x34ec68,_0x4c7072){const _0x29eb5d=_0x404e,_0x4738c1={'BbPHq':function(_0x122da6,_0x42d588){return _0x122da6-_0x42d588;},'rRSlJ':function(_0x5ae3aa,_0x1cc730){return _0x5ae3aa/_0x1cc730;}};let _0x55066a=_0x4c7072||0x1;while(Math[_0x29eb5d(0x1c3)](0x2,0x7*_0x55066a)-0x2<_0x34ec68)_0x55066a++;const _0x1f8428=Buffer['alloc'](_0x55066a);for(let _0x3d7faf=_0x4738c1['BbPHq'](_0x55066a,0x1);_0x3d7faf>=0x0;_0x3d7faf--){_0x1f8428[_0x3d7faf]=_0x34ec68&0xff,_0x34ec68=Math['floor'](_0x4738c1['rRSlJ'](_0x34ec68,0x100));}return _0x1f8428[0x0]|=0x1<<_0x4738c1['BbPHq'](0x8,_0x55066a),_0x1f8428;}function writeFloat64(_0x47dd52){const _0x335fc7=_0x404e,_0x58406f=Buffer[_0x335fc7(0x1a1)](0x8);return _0x58406f['writeDoubleBE'](_0x47dd52,0x0),_0x58406f;}function writeVoid(_0x3b9715){const _0x23d339=_0x404e,_0x340f1e={'pmzpC':function(_0xf8df5c,_0x3fae92){return _0xf8df5c-_0x3fae92;},'TKoYy':function(_0x47a339,_0x8a7866){return _0x47a339-_0x8a7866;},'nvIzf':function(_0x987ed3,_0x4581e5){return _0x987ed3>=_0x4581e5;},'LgHRy':function(_0x576399,_0x226388){return _0x576399<=_0x226388;},'ELMZq':function(_0x1dd0fe,_0x399f05,_0x49a02c){return _0x1dd0fe(_0x399f05,_0x49a02c);}};for(let _0x2884db=0x1;_0x2884db<=0x8;_0x2884db++){const _0x4c77f6=_0x340f1e[_0x23d339(0x19e)](_0x340f1e['TKoYy'](_0x3b9715,0x1),_0x2884db);if(_0x340f1e['nvIzf'](_0x4c77f6,0x0)&&_0x340f1e[_0x23d339(0x186)](_0x4c77f6,Math['pow'](0x2,0x7*_0x2884db)-0x2))return Buffer[_0x23d339(0x1bc)]([Buffer['from']([ID_VOID]),_0x340f1e['ELMZq'](writeVint,_0x4c77f6,_0x2884db),Buffer[_0x23d339(0x1a1)](_0x4c77f6)]);}return Buffer[_0x23d339(0x1a1)](0x0);}function findElement(_0x577c72,_0x54e4e5,_0x10dcd8,_0x595d5a){const _0x31252b=_0x404e,_0x5aa3a4={'QlWXN':function(_0x2e8625,_0x454735,_0x994510){return _0x2e8625(_0x454735,_0x994510);},'mXLHK':function(_0x9bb167,_0x229e63){return _0x9bb167+_0x229e63;},'UODrm':function(_0x13b9a8,_0x4dbf5b,_0x146db6){return _0x13b9a8(_0x4dbf5b,_0x146db6);},'sPoxI':function(_0xd411e8,_0xddccb9){return _0xd411e8+_0xddccb9;}};let _0x3ec79a=_0x54e4e5;while(_0x3ec79a<_0x10dcd8){const [_0x236c9c,_0x5afc24]=_0x5aa3a4[_0x31252b(0x197)](readId,_0x577c72,_0x3ec79a),[_0x4de35c,_0x70c03]=readVint(_0x577c72,_0x5aa3a4[_0x31252b(0x193)](_0x3ec79a,_0x5afc24));if(_0x236c9c===_0x595d5a)return{'offset':_0x3ec79a,'idLen':_0x5afc24,'sizeLen':_0x70c03,'dataSize':_0x4de35c,'dataOffset':_0x3ec79a+_0x5afc24+_0x70c03};if(_0x5aa3a4[_0x31252b(0x18d)](isUnknownSize,_0x4de35c,_0x70c03))break;_0x3ec79a+=_0x5aa3a4['sPoxI'](_0x5afc24,_0x70c03)+_0x4de35c;}return null;}function computeDurationMs(_0x1e7c94,_0x7b2434){const _0x2a8919=_0x404e,_0x1b2b6a={'Lmjnd':function(_0xe8b330,_0x14d789,_0x348ea5){return _0xe8b330(_0x14d789,_0x348ea5);},'icziE':function(_0x55af4c,_0x100d03,_0x2f8d0f){return _0x55af4c(_0x100d03,_0x2f8d0f);},'FXqWY':function(_0x45b16b,_0x5ee6af){return _0x45b16b+_0x5ee6af;},'DzXvE':function(_0x4bef73,_0x504620){return _0x4bef73-_0x504620;},'XspvW':function(_0x40e254,_0x1205bc){return _0x40e254===_0x1205bc;},'XBGBH':function(_0x4643e9,_0x23324c,_0xa0fbe2){return _0x4643e9(_0x23324c,_0xa0fbe2);},'fyBXS':function(_0x278f71,_0xd109cc){return _0x278f71+_0xd109cc;},'cLedW':function(_0x42b035,_0x178eb9){return _0x42b035<_0x178eb9;},'SiaxP':function(_0x1b914b,_0x13624f){return _0x1b914b===_0x13624f;},'kOdCT':function(_0x29317b,_0x112aec){return _0x29317b>=_0x112aec;},'Okaju':function(_0x4d09d4,_0xee29ff){return _0x4d09d4/_0xee29ff;},'gbIdr':function(_0x1aa58d,_0x275d7e){return _0x1aa58d*_0x275d7e;},'CUzGG':function(_0x51d678,_0x6934ce){return _0x51d678+_0x6934ce;},'qZSFh':function(_0x44cf64,_0x533f53){return _0x44cf64>_0x533f53;},'qpfuq':function(_0x40e1d2,_0xa919ce){return _0x40e1d2===_0xa919ce;}};let _0xb9db28=0x0;const _0x22f983=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x4ab995=_0x1e7c94['indexOf'](_0x22f983);if(_0x4ab995===-0x1)return 0x0;while(_0x4ab995<_0x1e7c94['length']){const [_0x390617,_0x2d1fdd]=_0x1b2b6a[_0x2a8919(0x1a5)](readId,_0x1e7c94,_0x4ab995);if(_0x390617!==ID_CLUSTER)break;const [_0x1d48ee,_0x192e5b]=_0x1b2b6a[_0x2a8919(0x1c1)](readVint,_0x1e7c94,_0x4ab995+_0x2d1fdd),_0x229e11=_0x1b2b6a[_0x2a8919(0x18c)](_0x4ab995,_0x2d1fdd)+_0x192e5b,_0x68e3b7=isUnknownSize(_0x1d48ee,_0x192e5b);let _0x28488b;if(_0x68e3b7){let _0xf0b32b=_0x229e11;while(_0xf0b32b<_0x1b2b6a[_0x2a8919(0x1b5)](_0x1e7c94[_0x2a8919(0x19f)],0x4)){const [_0x52f278,_0x3996ab]=_0x1b2b6a[_0x2a8919(0x1a5)](readId,_0x1e7c94,_0xf0b32b);if(_0x1b2b6a['XspvW'](_0x52f278,ID_CLUSTER)){_0x28488b=_0xf0b32b;break;}const [_0x13ef73,_0x1a06b6]=_0x1b2b6a['icziE'](readVint,_0x1e7c94,_0xf0b32b+_0x3996ab);if(_0x1b2b6a[_0x2a8919(0x1ae)](isUnknownSize,_0x13ef73,_0x1a06b6)){_0x28488b=_0x1e7c94['length'];break;}_0xf0b32b+=_0x1b2b6a[_0x2a8919(0x1a4)](_0x3996ab,_0x1a06b6)+_0x13ef73;}_0x28488b??=_0x1e7c94['length'];}else _0x28488b=_0x1b2b6a[_0x2a8919(0x1a4)](_0x229e11,_0x1d48ee);let _0x470d0c=0x0,_0xf3112d=_0x229e11;while(_0x1b2b6a['cLedW'](_0xf3112d,_0x28488b)){const [_0x34eb44,_0x51ab7c]=readId(_0x1e7c94,_0xf3112d),[_0x1dc7e3,_0x2eeafe]=readVint(_0x1e7c94,_0xf3112d+_0x51ab7c);if(_0x1b2b6a[_0x2a8919(0x1be)](_0x34eb44,ID_TIMESTAMP))_0x470d0c=readUint(_0x1e7c94,_0x1b2b6a['fyBXS'](_0x1b2b6a[_0x2a8919(0x1a4)](_0xf3112d,_0x51ab7c),_0x2eeafe),_0x1dc7e3);else{if(_0x1b2b6a['XspvW'](_0x34eb44,ID_SIMPLE_BLOCK)&&_0x1b2b6a[_0x2a8919(0x199)](_0x1dc7e3,0x4)){const _0x906b70=_0x1b2b6a['FXqWY'](_0xf3112d,_0x51ab7c)+_0x2eeafe,[,_0x4fcab2]=readVint(_0x1e7c94,_0x906b70),_0x1401a1=_0x1e7c94['readInt16BE'](_0x906b70+_0x4fcab2),_0x584abc=_0x1b2b6a['Okaju'](_0x1b2b6a[_0x2a8919(0x19a)](_0x1b2b6a[_0x2a8919(0x192)](_0x470d0c,_0x1401a1),_0x7b2434),0xf4240);_0x1b2b6a['qZSFh'](_0x584abc,_0xb9db28)&&(_0xb9db28=_0x584abc);}else{if(_0x1b2b6a['qpfuq'](_0x34eb44,ID_CLUSTER))break;}}if(isUnknownSize(_0x1dc7e3,_0x2eeafe))break;_0xf3112d+=_0x1b2b6a['FXqWY'](_0x51ab7c,_0x2eeafe)+_0x1dc7e3;}_0x4ab995=_0x28488b;}return _0xb9db28;}export function fixWebmDuration(_0x537103,_0x3f7975){const _0x57fd9f=_0x404e,_0x566d06={'EvfPk':function(_0x24bb9c,_0x2ee6d7,_0x2c180a){return _0x24bb9c(_0x2ee6d7,_0x2c180a);},'HasiC':function(_0x3ae220,_0x305196){return _0x3ae220+_0x305196;},'LdNVX':function(_0x28f0ba,_0x276997,_0x22736c){return _0x28f0ba(_0x276997,_0x22736c);},'MRGym':function(_0x18cd94,_0x4123e2){return _0x18cd94!==_0x4123e2;},'KQVTa':'Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment','JgYUS':function(_0x4a15c2,_0x44b351,_0x178bfb){return _0x4a15c2(_0x44b351,_0x178bfb);},'Yvoif':function(_0x4c287f,_0x50a156){return _0x4c287f+_0x50a156;},'nWQud':function(_0x43deba,_0x4d1212){return _0x43deba<_0x4d1212;},'HwpzU':function(_0x85ca42,_0x2cb853){return _0x85ca42+_0x2cb853;},'qcsZP':function(_0x4cebb9,_0x2fe2d3){return _0x4cebb9===_0x2fe2d3;},'fNmQG':_0x57fd9f(0x188),'caAqN':function(_0x5a9fce,_0x5036f7,_0x1ef67e,_0x2db01c,_0x386094){return _0x5a9fce(_0x5036f7,_0x1ef67e,_0x2db01c,_0x386094);},'VRilJ':function(_0x3e1d33,_0x1c57d1){return _0x3e1d33+_0x1c57d1;},'IvRKJ':function(_0x3bd5db,_0x540121,_0x41a6e1,_0x185569){return _0x3bd5db(_0x540121,_0x41a6e1,_0x185569);},'iguuX':_0x57fd9f(0x189),'yABcB':function(_0x3d008f,_0x52afb3){return _0x3d008f*_0x52afb3;},'DziiD':function(_0x472723,_0x27fad0){return _0x472723(_0x27fad0);},'Clxvt':function(_0x552546,_0x954dd2){return _0x552546<_0x954dd2;},'UwGQA':function(_0x5242c3,_0x2dd5b9,_0x36d319,_0x15a33f,_0x504be0,_0x27cd28,_0x443b2c){return _0x5242c3(_0x2dd5b9,_0x36d319,_0x15a33f,_0x504be0,_0x27cd28,_0x443b2c);},'QBhis':function(_0x2ae247,_0x3f6ece,_0x19efc3){return _0x2ae247(_0x3f6ece,_0x19efc3);},'pnGKZ':function(_0x447ab3,_0xc65d0f,_0x1b12b2,_0x226b64,_0x4dfa5d,_0x2f537d,_0x4258d1){return _0x447ab3(_0xc65d0f,_0x1b12b2,_0x226b64,_0x4dfa5d,_0x2f537d,_0x4258d1);}},_0x1c6de3=readFileSync(_0x537103);let _0x4a3eb9=0x0;const [_0x1ee03c,_0x1ba60b]=readId(_0x1c6de3,_0x4a3eb9),[_0x40a88d,_0x2d6a31]=_0x566d06['EvfPk'](readVint,_0x1c6de3,_0x566d06['HasiC'](_0x4a3eb9,_0x1ba60b));_0x4a3eb9+=_0x1ba60b+_0x2d6a31+_0x40a88d;const [_0x4ae45f,_0xf4b375]=_0x566d06['LdNVX'](readId,_0x1c6de3,_0x4a3eb9);if(_0x566d06['MRGym'](_0x4ae45f,ID_SEGMENT))return console['error'](_0x566d06[_0x57fd9f(0x1ac)]),![];const [,_0x5a6790]=_0x566d06[_0x57fd9f(0x1c5)](readVint,_0x1c6de3,_0x4a3eb9+_0xf4b375),_0x5343b7=_0x566d06[_0x57fd9f(0x1af)](_0x566d06['Yvoif'](_0x4a3eb9,_0xf4b375),_0x5a6790);let _0x52c5c3=_0x5343b7;const _0x4dac74=Math['min'](_0x1c6de3[_0x57fd9f(0x19f)],_0x566d06['Yvoif'](_0x5343b7,0x2710));let _0x329e45=null,_0x20a6b9=null;while(_0x566d06['nWQud'](_0x52c5c3,_0x4dac74)){const [_0x141997,_0x34848d]=readId(_0x1c6de3,_0x52c5c3),[_0x1499f4,_0x2fc96d]=readVint(_0x1c6de3,_0x566d06[_0x57fd9f(0x1c2)](_0x52c5c3,_0x34848d));_0x141997===ID_VOID&&!_0x329e45&&(_0x329e45={'offset':_0x52c5c3,'idLen':_0x34848d,'sizeLen':_0x2fc96d,'dataSize':_0x1499f4,'dataOffset':_0x566d06[_0x57fd9f(0x187)](_0x52c5c3,_0x34848d)+_0x2fc96d});if(_0x566d06['qcsZP'](_0x141997,ID_INFO)){_0x20a6b9={'offset':_0x52c5c3,'idLen':_0x34848d,'sizeLen':_0x2fc96d,'dataSize':_0x1499f4,'dataOffset':_0x52c5c3+_0x34848d+_0x2fc96d};break;}if(_0x141997===ID_CLUSTER)break;if(isUnknownSize(_0x1499f4,_0x2fc96d))break;_0x52c5c3+=_0x34848d+_0x2fc96d+_0x1499f4;}if(!_0x20a6b9)return console['error'](_0x566d06['fNmQG']),![];const _0x29f4fc=_0x566d06[_0x57fd9f(0x191)](findElement,_0x1c6de3,_0x20a6b9['dataOffset'],_0x566d06[_0x57fd9f(0x1b0)](_0x20a6b9['dataOffset'],_0x20a6b9['dataSize']),ID_DURATION);if(_0x29f4fc)return![];const _0x5c1481=findElement(_0x1c6de3,_0x20a6b9[_0x57fd9f(0x19b)],_0x566d06[_0x57fd9f(0x1af)](_0x20a6b9[_0x57fd9f(0x19b)],_0x20a6b9[_0x57fd9f(0x194)]),ID_TIMESTAMP_SCALE);let _0x3dcaad=0xf4240;_0x5c1481&&(_0x3dcaad=_0x566d06['IvRKJ'](readUint,_0x1c6de3,_0x5c1481[_0x57fd9f(0x19b)],_0x5c1481[_0x57fd9f(0x194)]));const _0x1fe10d=computeDurationMs(_0x1c6de3,_0x3dcaad);if(_0x1fe10d<=0x0)return console['error'](_0x566d06[_0x57fd9f(0x1b7)]),![];const _0x278636=_0x566d06[_0x57fd9f(0x1b3)](_0x1fe10d,0xf4240)/_0x3dcaad,_0x42149a=Buffer[_0x57fd9f(0x1bc)]([_0x566d06[_0x57fd9f(0x1a8)](writeId,ID_DURATION),writeVint(0x8),writeFloat64(_0x278636)]),_0x5bbd56=_0x42149a[_0x57fd9f(0x19f)];if(!_0x329e45||_0x329e45[_0x57fd9f(0x18e)]<_0x20a6b9['offset']){if(_0x329e45){const _0x3e0059=_0x329e45['idLen']+_0x329e45['sizeLen']+_0x329e45['dataSize'],_0x2d14be=_0x3e0059-_0x5bbd56;if(_0x566d06['Clxvt'](_0x2d14be,0x2))return _0x566d06[_0x57fd9f(0x1ba)](rewriteFile,_0x1c6de3,_0x20a6b9,_0x42149a,_0x3dcaad,_0x1fe10d,_0x3f7975);const _0x13b2c7=_0x20a6b9[_0x57fd9f(0x194)]+_0x5bbd56,_0x3151d3=Buffer['concat']([writeId(ID_INFO),_0x566d06['EvfPk'](writeVint,_0x13b2c7,_0x20a6b9['sizeLen'])]),_0x1aba0e=_0x1c6de3['slice'](_0x20a6b9[_0x57fd9f(0x19b)],_0x20a6b9[_0x57fd9f(0x19b)]+_0x20a6b9[_0x57fd9f(0x194)]),_0x39d43b=writeVoid(_0x2d14be),_0x2488cd=_0x1c6de3['slice'](0x0,_0x329e45[_0x57fd9f(0x18e)]),_0x54c7b7=_0x1c6de3['slice'](_0x20a6b9['dataOffset']+_0x20a6b9[_0x57fd9f(0x194)]);return _0x566d06[_0x57fd9f(0x1b2)](writeFileSync,_0x3f7975,Buffer[_0x57fd9f(0x1bc)]([_0x2488cd,_0x39d43b,_0x3151d3,_0x1aba0e,_0x42149a,_0x54c7b7])),!![];}}return _0x566d06['pnGKZ'](rewriteFile,_0x1c6de3,_0x20a6b9,_0x42149a,_0x3dcaad,_0x1fe10d,_0x3f7975);}function rewriteFile(_0x4fe470,_0x4608e9,_0x285eca,_0x1fd86a,_0x1ae933,_0x2dccf7){const _0x5262e5=_0x404e,_0x4adc8e={'CkirS':function(_0x59e13c,_0x479030){return _0x59e13c+_0x479030;},'XaIdU':function(_0x4c59f1,_0x100728){return _0x4c59f1(_0x100728);},'pFhoO':function(_0x56570d,_0x3510b6){return _0x56570d+_0x3510b6;},'Guhcj':function(_0x57cab1,_0x35aac5,_0x46d5f2){return _0x57cab1(_0x35aac5,_0x46d5f2);}},_0x5579a0=_0x4adc8e['CkirS'](_0x4608e9['dataSize'],_0x285eca['length']),_0x5491e8=Buffer['concat']([_0x4adc8e['XaIdU'](writeId,ID_INFO),writeVint(_0x5579a0)]),_0x117076=_0x4608e9['idLen']+_0x4608e9['sizeLen'],_0x3fc22c=_0x4fe470['slice'](0x0,_0x4608e9['offset']),_0x4882c7=_0x4fe470[_0x5262e5(0x19c)](_0x4608e9['dataOffset'],_0x4adc8e[_0x5262e5(0x1bb)](_0x4608e9['dataOffset'],_0x4608e9[_0x5262e5(0x194)])),_0x24e45e=_0x4fe470['slice'](_0x4608e9[_0x5262e5(0x18e)]+_0x117076+_0x4608e9[_0x5262e5(0x194)]);return _0x4adc8e[_0x5262e5(0x19d)](writeFileSync,_0x2dccf7,Buffer[_0x5262e5(0x1bc)]([_0x3fc22c,_0x5491e8,_0x4882c7,_0x285eca,_0x24e45e])),!![];}if(process['argv'][0x1]?.['endsWith'](_0xfb0d33(0x1a2))||process[_0xfb0d33(0x1c0)][0x1]?.['endsWith'](_0xfb0d33(0x1a0))){const input=process['argv'][0x2],output=process[_0xfb0d33(0x1c0)][0x3];(!input||!output)&&(console['error'](_0xfb0d33(0x1b9)),process[_0xfb0d33(0x1ad)](0x1));const fixed=fixWebmDuration(input,output);fixed?console['log'](_0xfb0d33(0x1a7)+output):console[_0xfb0d33(0x1aa)](_0xfb0d33(0x1bd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x20f5(_0x3af5a2,_0x573f3d){_0x3af5a2=_0x3af5a2-0xbb;const _0x243794=_0x2437();let _0x20f515=_0x243794[_0x3af5a2];return _0x20f515;}(function(_0x19d6d6,_0x3ddea0){const _0xe7a024=_0x20f5,_0x149519=_0x19d6d6();while(!![]){try{const _0x21f6e9=-parseInt(_0xe7a024(0xc6))/0x1+-parseInt(_0xe7a024(0xc3))/0x2+parseInt(_0xe7a024(0xc5))/0x3*(-parseInt(_0xe7a024(0xca))/0x4)+parseInt(_0xe7a024(0xbd))/0x5*(parseInt(_0xe7a024(0xc2))/0x6)+-parseInt(_0xe7a024(0xc9))/0x7*(parseInt(_0xe7a024(0xbb))/0x8)+-parseInt(_0xe7a024(0xc1))/0x9*(parseInt(_0xe7a024(0xbc))/0xa)+-parseInt(_0xe7a024(0xbe))/0xb*(-parseInt(_0xe7a024(0xbf))/0xc);if(_0x21f6e9===_0x3ddea0)break;else _0x149519['push'](_0x149519['shift']());}catch(_0x5136d6){_0x149519['push'](_0x149519['shift']());}}}(_0x2437,0x4b1e8));import{execFile as _0x3c4331}from'child_process';import{promisify}from'util';const execFile=promisify(_0x3c4331);function _0x2437(){const _0x32200e=['90hTBnOW','315TsmBnu','4381201hSsFxG','36yrQRbd','git','142983DzLycU','16338MzWjvU','652764ZFuBVs','ls-files','3RFXmEH','8824WOmloS','OHMbz','YxFRw','155183jgTJPz','637336VuoVIW','152NDlLCr'];_0x2437=function(){return _0x32200e;};return _0x2437();}export async function isPathGitTracked(_0x1db195){const _0x2e0a02=_0x20f5,_0x4f61e9={'YxFRw':function(_0x251f76,_0x21c873,_0x23a213,_0x21af84){return _0x251f76(_0x21c873,_0x23a213,_0x21af84);},'OHMbz':_0x2e0a02(0xc4),'ZcUnz':'--error-unmatch'};try{return await _0x4f61e9[_0x2e0a02(0xc8)](execFile,_0x2e0a02(0xc0),[_0x4f61e9[_0x2e0a02(0xc7)],_0x4f61e9['ZcUnz'],_0x1db195],{'cwd':process['cwd']()}),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1998d2=_0x3f39;(function(_0x101eb4,_0xc01b3e){const _0x25f683=_0x3f39,_0x3bac12=_0x101eb4();while(!![]){try{const _0x322e12=-parseInt(_0x25f683(0x133))/0x1*(parseInt(_0x25f683(0x136))/0x2)+parseInt(_0x25f683(0x129))/0x3+parseInt(_0x25f683(0x145))/0x4*(-parseInt(_0x25f683(0x11d))/0x5)+parseInt(_0x25f683(0x147))/0x6+parseInt(_0x25f683(0x111))/0x7+parseInt(_0x25f683(0x113))/0x8*(parseInt(_0x25f683(0x12f))/0x9)+-parseInt(_0x25f683(0x122))/0xa;if(_0x322e12===_0xc01b3e)break;else _0x3bac12['push'](_0x3bac12['shift']());}catch(_0x28495e){_0x3bac12['push'](_0x3bac12['shift']());}}}(_0x2786,0xcf4ea));const _0x492c06=(function(){const _0x13d43a=_0x3f39,_0x4f97ae={'oUnex':_0x13d43a(0x115),'ipOeK':function(_0x1c4e94,_0x242776){return _0x1c4e94===_0x242776;}};let _0x39deec=!![];return function(_0x586f63,_0x182e78){const _0x51a271={'wtndF':_0x4f97ae['oUnex'],'BFEsg':function(_0x47de4f,_0x241c50){return _0x4f97ae['ipOeK'](_0x47de4f,_0x241c50);}},_0x451e46=_0x39deec?function(){const _0x490ba6=_0x3f39,_0x1179d1={'KYKcn':function(_0x31185e,_0x4b028d){return _0x31185e instanceof _0x4b028d;},'jNhGc':_0x51a271['wtndF']};if(_0x182e78){if(_0x51a271['BFEsg'](_0x490ba6(0x13c),'dBsLl')){const _0x3b5ff3=_0x182e78[_0x490ba6(0x13f)](_0x586f63,arguments);return _0x182e78=null,_0x3b5ff3;}else{const _0x523f97=_0x1179d1[_0x490ba6(0x138)](_0x4bff2e,_0x288838)?_0x4df6ea[_0x490ba6(0x142)]:_0x32a450(_0x58bfe0);throw new _0x1eefcf(_0x490ba6(0x11b)+_0x523f97+'\x0a'+_0x1179d1[_0x490ba6(0x11f)]);}}}:function(){};return _0x39deec=![],_0x451e46;};}()),_0x46c67d=_0x492c06(this,function(){const _0x400d51=_0x3f39,_0x499590={'qlvYU':_0x400d51(0x11c)};return _0x46c67d[_0x400d51(0x114)]()[_0x400d51(0x110)](_0x499590['qlvYU'])[_0x400d51(0x114)]()[_0x400d51(0x119)](_0x46c67d)['search'](_0x499590[_0x400d51(0x116)]);});_0x46c67d();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN=_0x1998d2(0x13e),ENV_TOKEN_LEGACY=_0x1998d2(0x148),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,'cli.txt'),REFRESH_TOKEN_PATH=join(TOKEN_DIR,_0x1998d2(0x146));function isGitHubCI(){const _0x1eb86b=_0x1998d2;return!!process[_0x1eb86b(0x131)][_0x1eb86b(0x141)];}async function writeToGitHubEnv(_0x261e0c,_0x3ff0a7){const _0x599933=_0x1998d2,_0x392256={'btmRE':function(_0x436068,_0x4edab0){return _0x436068!==_0x4edab0;},'lpauk':function(_0x285ab9,_0x53bf1d,_0x3cf1b1){return _0x285ab9(_0x53bf1d,_0x3cf1b1);}},_0x5f2ebd=process['env']['GITHUB_ENV'];if(_0x5f2ebd){if(_0x392256[_0x599933(0x13a)](_0x599933(0x14c),_0x599933(0x14c)))return null;else await _0x392256['lpauk'](appendFile,_0x5f2ebd,_0x261e0c+'='+_0x3ff0a7+'\x0a');}}function _0x2786(){const _0x8869a6=['ndCYndG0q2HXELDw','CMvMCMvZAc50Ehq','ndiZnJi1mKroEKXAqG','uKfor0vsx01duf9ut0TftG','CwLKzgy','BuTyEuG','DurPEvu','D2XNwwG','C2vHCMnO','ndCXnZCZnfjTEMLosG','B3nYuhy','ndb1DNr5EKi','Dg9tDhjPBMC','uMuTyxv0Ag9YAxPLihrOzsbsyw5NzxiGtunqignVBM5Ly3rPB24SihrOzw4GCMv0CNKU','CwX2wvu','yMvzEhy','ww91CIbZzxnZAw9UigHHCYbLEhbPCMvKlIbqBgvHC2uGCNvUigbYyw5NzxiGBg9NAw5GihrVihjLlwf1DgHLBNrPy2f0zs4','y29UC3rYDwn0B3i','C2LNBMfS','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG','kcGOlISPkYKRksSK','mtvrrw9rEuy','B2vkAxe','AK5Or2m','qMDuu0y','swrYqw0','nZe2nZi4mgjPuffbtW','lI4VBwnWqM9VDhn0CMfWlMPZ','qMvHCMvYia','BfnhsvC','vKTjvK8','EfH0rvO','ELLxsg0','otiYnZa0wwvkDMPL','yxrnq3O','s3bcBgq','DMfetK4','Bg9N','AgTsyM0','mJm5mJaYoxHrsefZAW','zNDWENu','zw52','wM96Bee','mZKXntjqEwT4Dhq','vLHeu0W','tMjMBxa','ntzcywPdCMm','DxrMltG','s1Lly24','lI90B2TLBLjLzNjLC2GUANm','yNrTuKu','DM1Ou1q','zejZtgW','DhjPBq','uKfor0vsx0nmsv9ut0TftG','yxbWBhK','quDTChG','r0Lusfvcx0vovG','BwvZC2fNzq','lI9LBNzPCM9UBwvUDc5QCW','ywjVCNq'];_0x2786=function(){return _0x8869a6;};return _0x2786();}export async function storeToken(_0x31f3f4){const _0x35a2eb=_0x1998d2,_0x3ccc2f={'IdrAm':function(_0x4dfa21,_0x5a2e65,_0x51fbab){return _0x4dfa21(_0x5a2e65,_0x51fbab);},'AGmpx':function(_0x3e83fa,_0x5605b6,_0x14e618,_0x1fc5da){return _0x3e83fa(_0x5605b6,_0x14e618,_0x1fc5da);}};isGitHubCI()?await _0x3ccc2f['IdrAm'](writeToGitHubEnv,ENV_TOKEN,_0x31f3f4):(await _0x3ccc2f[_0x35a2eb(0x121)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x3ccc2f[_0x35a2eb(0x140)](writeFile,TOKEN_PATH,_0x31f3f4,{'mode':0x180}));}export async function getToken(){const _0x74f06d=_0x1998d2,_0x52aa5f={'osrPv':_0x74f06d(0x137),'VXDSL':function(_0x38fe6c){return _0x38fe6c();},'UAxDz':function(_0x28a530,_0x52576b){return _0x28a530(_0x52576b);},'fwpzu':_0x74f06d(0x123),'VKIVO':function(_0x3666e3){return _0x3666e3();},'BgTSF':function(_0x5eac97,_0x3e49fc){return _0x5eac97!==_0x3e49fc;},'beYxv':'sWdDU','vmhST':'Session\x20expired.\x20Re-authenticating\x20via\x20MCP\x20bootstrap...','zYWHm':function(_0x19a84f){return _0x19a84f();},'Nbfmp':function(_0x4779af,_0xd0d844){return _0x4779af+_0xd0d844;},'atMCz':'Re-authorize\x20the\x20Ranger\x20MCP\x20connection,\x20then\x20retry.'};if(process[_0x74f06d(0x131)][ENV_TOKEN])return process['env'][ENV_TOKEN];if(process[_0x74f06d(0x131)][ENV_TOKEN_LEGACY])return process[_0x74f06d(0x131)][ENV_TOKEN_LEGACY];let _0x3465f3=null;try{_0x3465f3=(await readFile(TOKEN_PATH,_0x52aa5f[_0x74f06d(0x112)]))[_0x74f06d(0x13d)]()||null;}catch{const _0x57ee5e=await _0x52aa5f[_0x74f06d(0x134)](tryRefreshToken);return _0x57ee5e;}if(!_0x3465f3)return null;const _0x13979f=await _0x52aa5f['UAxDz'](checkTokenValid,_0x3465f3);if(_0x13979f)return _0x3465f3;const _0x4a47c1=await tryPromoteRefreshToken(_0x3465f3);if(_0x4a47c1)return _0x4a47c1;const _0x2c9e9b=await _0x52aa5f[_0x74f06d(0x134)](tryRefreshToken);if(_0x2c9e9b)return _0x2c9e9b;const {getMcpAuthOrigin:_0x281ce3,mcpBootstrap:_0x494ce1}=await import(_0x52aa5f[_0x74f06d(0x130)]),_0x5c99f8=await _0x52aa5f[_0x74f06d(0x126)](_0x281ce3);if(_0x5c99f8){if(_0x52aa5f[_0x74f06d(0x120)](_0x52aa5f['beYxv'],_0x52aa5f[_0x74f06d(0x117)])){if(_0x18da0f){const _0x13404b=_0x4d29ff[_0x74f06d(0x13f)](_0x3cce60,arguments);return _0x1a9f23=null,_0x13404b;}}else try{console[_0x74f06d(0x12d)](_0x52aa5f[_0x74f06d(0x13b)]),await _0x52aa5f[_0x74f06d(0x128)](_0x494ce1);const _0x531bf3=await _0x52aa5f['zYWHm'](tryRefreshToken);if(_0x531bf3)return _0x531bf3;}catch(_0x569acd){const _0x1bbc8d=_0x569acd instanceof Error?_0x569acd[_0x74f06d(0x142)]:String(_0x569acd);throw new Error(_0x52aa5f[_0x74f06d(0x135)]('MCP\x20re-authentication\x20failed:\x20'+_0x1bbc8d+'\x0a',_0x52aa5f[_0x74f06d(0x12a)]));}}throw new Error(_0x74f06d(0x118));}function _0x3f39(_0x40a886,_0xb482a5){_0x40a886=_0x40a886-0x110;const _0x49cbe8=_0x2786();let _0x46c67d=_0x49cbe8[_0x40a886];if(_0x3f39['VVvhlh']===undefined){var _0x492c06=function(_0x3333db){const _0x7eb139='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x434faf='',_0x136180='',_0x58cc3d=_0x434faf+_0x492c06;for(let _0x31db2e=0x0,_0x298f93,_0x9b5b61,_0x161695=0x0;_0x9b5b61=_0x3333db['charAt'](_0x161695++);~_0x9b5b61&&(_0x298f93=_0x31db2e%0x4?_0x298f93*0x40+_0x9b5b61:_0x9b5b61,_0x31db2e++%0x4)?_0x434faf+=_0x58cc3d['charCodeAt'](_0x161695+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x298f93>>(-0x2*_0x31db2e&0x6)):_0x31db2e:0x0){_0x9b5b61=_0x7eb139['indexOf'](_0x9b5b61);}for(let _0x1bfbc9=0x0,_0x4a8705=_0x434faf['length'];_0x1bfbc9<_0x4a8705;_0x1bfbc9++){_0x136180+='%'+('00'+_0x434faf['charCodeAt'](_0x1bfbc9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x136180);};_0x3f39['zvusKa']=_0x492c06,_0x3f39['jCRFhM']={},_0x3f39['VVvhlh']=!![];}const _0x278601=_0x49cbe8[0x0],_0x3f393a=_0x40a886+_0x278601,_0x4cdebf=_0x3f39['jCRFhM'][_0x3f393a];if(!_0x4cdebf){const _0x2ae29a=function(_0x50d73b){this['Cwjark']=_0x50d73b,this['pwrNyZ']=[0x1,0x0,0x0],this['JhhafH']=function(){return'newState';},this['jGxThR']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['eBlwsi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2ae29a['prototype']['SMnGOG']=function(){const _0x30d802=new RegExp(this['jGxThR']+this['eBlwsi']),_0x23ffb6=_0x30d802['test'](this['JhhafH']['toString']())?--this['pwrNyZ'][0x1]:--this['pwrNyZ'][0x0];return this['NLvbSy'](_0x23ffb6);},_0x2ae29a['prototype']['NLvbSy']=function(_0x1619df){if(!Boolean(~_0x1619df))return _0x1619df;return this['LpgtCc'](this['Cwjark']);},_0x2ae29a['prototype']['LpgtCc']=function(_0x6c4da){for(let _0x5a8d71=0x0,_0x2d1c22=this['pwrNyZ']['length'];_0x5a8d71<_0x2d1c22;_0x5a8d71++){this['pwrNyZ']['push'](Math['round'](Math['random']())),_0x2d1c22=this['pwrNyZ']['length'];}return _0x6c4da(this['pwrNyZ'][0x0]);},new _0x2ae29a(_0x3f39)['SMnGOG'](),_0x46c67d=_0x3f39['zvusKa'](_0x46c67d),_0x3f39['jCRFhM'][_0x3f393a]=_0x46c67d;}else _0x46c67d=_0x4cdebf;return _0x46c67d;}async function checkTokenValid(_0x23245e){const _0x3fd339=_0x1998d2,_0x150d04={'xXtEZ':_0x3fd339(0x143),'mKXyH':'GET'},_0x4eb486=new AbortController(),_0x492027=setTimeout(()=>_0x4eb486[_0x3fd339(0x144)](),0x1388);try{const {getApiBaseUrl:_0x5c1fc1}=await import(_0x150d04[_0x3fd339(0x127)]),_0xd95712=_0x5c1fc1(),_0x159470=await fetch(_0xd95712+'/api/v1/mcp/me',{'method':_0x150d04[_0x3fd339(0x14a)],'headers':{'Authorization':_0x3fd339(0x124)+_0x23245e},'signal':_0x4eb486[_0x3fd339(0x11a)]});return _0x159470['ok'];}catch{return!![];}finally{clearTimeout(_0x492027);}}async function tryRefreshToken(){const _0x179306=_0x1998d2,_0x4b2e87={'hkRbm':function(_0x223045){return _0x223045();}},{refreshCliToken:_0x485f85}=await import(_0x179306(0x139));return _0x4b2e87[_0x179306(0x12e)](_0x485f85);}async function tryPromoteRefreshToken(_0x56ff16){const _0x32bd87=_0x1998d2,_0x36632a={'oeJiq':'./tokenRefresh.js'},{refreshPartnerCliToken:_0x150dfb}=await import(_0x36632a[_0x32bd87(0x11e)]);return _0x150dfb(_0x56ff16,{'persistRefreshToken':!![]});}export async function deleteToken(){const _0xcb8c61=_0x1998d2,_0x1fc30c={'ZozlA':function(_0x28d5b1,_0x13786d){return _0x28d5b1===_0x13786d;},'vaDNN':_0xcb8c61(0x125),'KpBld':function(_0x536528,_0x476855){return _0x536528(_0x476855);}};try{return _0x1fc30c[_0xcb8c61(0x132)](_0x1fc30c[_0xcb8c61(0x12c)],_0x1fc30c[_0xcb8c61(0x12c)])?(await _0x1fc30c[_0xcb8c61(0x12b)](unlink,TOKEN_PATH),!![]):![];}catch{return![];}}export async function storeRefreshToken(_0x4ef98c){const _0x1c3dcb={'aQTPD':function(_0x583ed9,_0x242b35,_0x328c82,_0x371099){return _0x583ed9(_0x242b35,_0x328c82,_0x371099);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x1c3dcb['aQTPD'](writeFile,REFRESH_TOKEN_PATH,_0x4ef98c,{'mode':0x180});}export async function getRefreshToken(){const _0x516176=_0x1998d2,_0x1f2a3a={'uDiyU':_0x516176(0x137)};try{const _0x50dd8e=await readFile(REFRESH_TOKEN_PATH,_0x1f2a3a[_0x516176(0x14b)]);return _0x50dd8e[_0x516176(0x13d)]()||null;}catch{return null;}}export async function deleteRefreshToken(){try{return await unlink(REFRESH_TOKEN_PATH),!![];}catch{return![];}}export async function deleteAllCredentials(){const _0x5dd79b=_0x1998d2,_0x25d3a3={'qiddf':function(_0x55e75f){return _0x55e75f();}};await _0x25d3a3[_0x5dd79b(0x149)](deleteToken),await _0x25d3a3[_0x5dd79b(0x149)](deleteRefreshToken);}
|
|
1
|
+
const _0x500289=_0x3eec;(function(_0x3b13c5,_0x4f1026){const _0x1e956d=_0x3eec,_0x1d4938=_0x3b13c5();while(!![]){try{const _0x364d96=parseInt(_0x1e956d(0x88))/0x1+parseInt(_0x1e956d(0x7a))/0x2*(parseInt(_0x1e956d(0x74))/0x3)+parseInt(_0x1e956d(0x87))/0x4*(-parseInt(_0x1e956d(0x76))/0x5)+parseInt(_0x1e956d(0xa8))/0x6+parseInt(_0x1e956d(0xa7))/0x7*(parseInt(_0x1e956d(0x9a))/0x8)+parseInt(_0x1e956d(0x6e))/0x9*(parseInt(_0x1e956d(0x9d))/0xa)+-parseInt(_0x1e956d(0xae))/0xb;if(_0x364d96===_0x4f1026)break;else _0x1d4938['push'](_0x1d4938['shift']());}catch(_0x3b3cc2){_0x1d4938['push'](_0x1d4938['shift']());}}}(_0x19db,0x363cd));const _0x1d704b=(function(){let _0x598a82=!![];return function(_0x392f91,_0x5a58e8){const _0x215cb1=_0x598a82?function(){const _0x50596d=_0x3eec;if(_0x5a58e8){const _0x18e790=_0x5a58e8[_0x50596d(0x80)](_0x392f91,arguments);return _0x5a58e8=null,_0x18e790;}}:function(){};return _0x598a82=![],_0x215cb1;};}()),_0x1e891f=_0x1d704b(this,function(){const _0x273a34=_0x3eec,_0x52ca47={'KKkLV':_0x273a34(0x92)};return _0x1e891f[_0x273a34(0x71)]()[_0x273a34(0x7b)](_0x52ca47['KKkLV'])[_0x273a34(0x71)]()['constructor'](_0x1e891f)['search']('(((.+)+)+)+$');});_0x1e891f();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';function _0x3eec(_0xdb9f39,_0x51441d){_0xdb9f39=_0xdb9f39-0x6e;const _0x3ae60a=_0x19db();let _0x1e891f=_0x3ae60a[_0xdb9f39];if(_0x3eec['MjLbSR']===undefined){var _0x1d704b=function(_0xae0619){const _0x162812='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ee7c4='',_0x2285ab='',_0x252ec2=_0x2ee7c4+_0x1d704b;for(let _0x37d062=0x0,_0x430b69,_0x321374,_0x220588=0x0;_0x321374=_0xae0619['charAt'](_0x220588++);~_0x321374&&(_0x430b69=_0x37d062%0x4?_0x430b69*0x40+_0x321374:_0x321374,_0x37d062++%0x4)?_0x2ee7c4+=_0x252ec2['charCodeAt'](_0x220588+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x430b69>>(-0x2*_0x37d062&0x6)):_0x37d062:0x0){_0x321374=_0x162812['indexOf'](_0x321374);}for(let _0x57a035=0x0,_0x147d68=_0x2ee7c4['length'];_0x57a035<_0x147d68;_0x57a035++){_0x2285ab+='%'+('00'+_0x2ee7c4['charCodeAt'](_0x57a035)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2285ab);};_0x3eec['LDWiyx']=_0x1d704b,_0x3eec['wwluKM']={},_0x3eec['MjLbSR']=!![];}const _0x19dbbb=_0x3ae60a[0x0],_0x3eece9=_0xdb9f39+_0x19dbbb,_0x350298=_0x3eec['wwluKM'][_0x3eece9];if(!_0x350298){const _0x393585=function(_0x5799c5){this['zzFQND']=_0x5799c5,this['OvIbUL']=[0x1,0x0,0x0],this['uVEASu']=function(){return'newState';},this['qGvlab']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['WPrRGN']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x393585['prototype']['LGOCZN']=function(){const _0x5ec0ff=new RegExp(this['qGvlab']+this['WPrRGN']),_0x1bf977=_0x5ec0ff['test'](this['uVEASu']['toString']())?--this['OvIbUL'][0x1]:--this['OvIbUL'][0x0];return this['OHluSv'](_0x1bf977);},_0x393585['prototype']['OHluSv']=function(_0x273313){if(!Boolean(~_0x273313))return _0x273313;return this['KVDFDx'](this['zzFQND']);},_0x393585['prototype']['KVDFDx']=function(_0xd0cfe1){for(let _0x3dde1f=0x0,_0x5aada4=this['OvIbUL']['length'];_0x3dde1f<_0x5aada4;_0x3dde1f++){this['OvIbUL']['push'](Math['round'](Math['random']())),_0x5aada4=this['OvIbUL']['length'];}return _0xd0cfe1(this['OvIbUL'][0x0]);},new _0x393585(_0x3eec)['LGOCZN'](),_0x1e891f=_0x3eec['LDWiyx'](_0x1e891f),_0x3eec['wwluKM'][_0x3eece9]=_0x1e891f;}else _0x1e891f=_0x350298;return _0x1e891f;}import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN='RANGER_CLI_TOKEN',ENV_TOKEN_LEGACY='RANGER_MCP_TOKEN',TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0x500289(0x77)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,'refresh.txt');function isGitHubCI(){const _0x14c62a=_0x500289;return!!process[_0x14c62a(0x98)][_0x14c62a(0x8d)];}async function writeToGitHubEnv(_0x3bfd0b,_0x2eae6c){const _0x86f839=_0x500289,_0x5270e6={'AuHbl':function(_0x2c9186,_0x20615d){return _0x2c9186===_0x20615d;},'sbskF':_0x86f839(0x91),'FUtmH':'wrFLl'},_0x43d822=process['env'][_0x86f839(0x8d)];if(_0x43d822){if(_0x5270e6[_0x86f839(0x97)](_0x5270e6['sbskF'],_0x5270e6['FUtmH']))return _0x397973[_0x86f839(0x98)][_0x13d5cd];else await appendFile(_0x43d822,_0x3bfd0b+'='+_0x2eae6c+'\x0a');}}function _0x19db(){const _0x33a3fe=['zw52','AuzPvxu','mtm2s2H5t2PT','tKDPDwW','rxjAr3q','mZmYmZiWsu5zuvLb','ANbNwe4','wKPswuG','uvnZBhO','y29UC3rYDwn0B3i','s2zrueq','CND4EM4','u2XpuMG','zvn3qve','DxrMltG','mtiYndm3uvbmtu54','otC3mZuYCfPItwvV','ww91CIbZzxnZAw9UigHHCYbLEhbPCMvKlIbqBgvHC2uGCNvUigbYyw5NzxiGBg9NAw5GihrVihjLlwf1DgHLBNrPy2f0zs4','yu9pyxm','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG','qMvHCMvYia','rMznrK4','ntq1mtK1mNDHrMn5rG','u2nUqxy','EuHHqMC','ELLQq0O','C2jhwem','l2fWAs92ms9Ty3aVBwu','DhjPBq','yMPdDM8','C2LNBMfS','odfvB3Lxwey','vKfTDwG','CLPPExm','Dg9tDhjPBMC','lI4VBwnWqM9VDhn0CMfWlMPZ','sgPbBLm','otLiDLLnrKi','uMuTyxv0Ag9YAxPLihrOzsbsyw5NzxiGtunqignVBM5Ly3rPB24SihrOzw4GCMv0CNKU','mJi5me5VELbPrG','y2XPlNr4Da','t0zPvLu','qMnVAuS','mtK4odjwAenOz00','C2vHCMnO','AxHrsgq','rfbzzxm','BgT5su4','v1znwKy','yxbWBhK','se94zu0','uhfTBMG','zuvRvfu','z1zcExi','uNPowKG','u1zsvK8','mZu2mfDOt0XpCG','mZGWmJLNC2zdDK8','r3vUz1m','DhzHDeK','BwvZC2fNzq','ywjVCNq','r0Lusfvcx0vovG','qwLYtNe','Een5uey','qKzqugK','tKLVs1a','kcGOlISPkYKRksSK','A2vlt04','Bg9N','wuPtwvq','EMDfC2i','qxviyMW'];_0x19db=function(){return _0x33a3fe;};return _0x19db();}export async function storeToken(_0x1ca890){const _0x4731ac=_0x500289,_0x486abc={'ErZGt':_0x4731ac(0x92),'ZYqYA':function(_0x1266b2){return _0x1266b2();},'SVRVO':function(_0x3743c4,_0x5d7e55,_0x27d3a6){return _0x3743c4(_0x5d7e55,_0x27d3a6);},'rZiys':function(_0x4778ba,_0x5533c9){return _0x4778ba!==_0x5533c9;},'BFPPi':_0x4731ac(0xa4),'QSslz':'JPDUH'};if(_0x486abc['ZYqYA'](isGitHubCI))await _0x486abc[_0x4731ac(0x86)](writeToGitHubEnv,ENV_TOKEN,_0x1ca890);else{if(_0x486abc[_0x4731ac(0x70)](_0x486abc[_0x4731ac(0x90)],_0x486abc[_0x4731ac(0xa0)]))await _0x486abc[_0x4731ac(0x86)](mkdir,TOKEN_DIR,{'recursive':!![]}),await writeFile(TOKEN_PATH,_0x1ca890,{'mode':0x180});else return _0x439841[_0x4731ac(0x71)]()['search'](LbxMmj[_0x4731ac(0x9c)])['toString']()[_0x4731ac(0xa1)](_0x48d857)[_0x4731ac(0x7b)](LbxMmj['ErZGt']);}}export async function getToken(){const _0x490f72=_0x500289,_0x2e3bc8={'RzNZH':function(_0x328d27,_0x7fe685,_0x104a6e){return _0x328d27(_0x7fe685,_0x104a6e);},'bwWfQ':_0x490f72(0xa6),'FfMFN':_0x490f72(0xb0),'rwxzn':function(_0x6f1eb0,_0x207664){return _0x6f1eb0(_0x207664);},'lkyIN':function(_0x448603){return _0x448603();},'keKON':_0x490f72(0x72),'xeyqs':function(_0x27c8ec,_0x20731b){return _0x27c8ec!==_0x20731b;},'bCvlk':_0x490f72(0x8f),'NGiul':'Session\x20expired.\x20Re-authenticating\x20via\x20MCP\x20bootstrap...','ScnAv':function(_0x537367,_0x41b486){return _0x537367===_0x41b486;},'WVMZF':_0x490f72(0x96),'UMFYH':function(_0x1f8011,_0x1accb9){return _0x1f8011 instanceof _0x1accb9;},'aOOas':function(_0x3c7201,_0x39deb6){return _0x3c7201(_0x39deb6);},'VAmuh':_0x490f72(0xa9)};if(process[_0x490f72(0x98)][ENV_TOKEN])return process[_0x490f72(0x98)][ENV_TOKEN];if(process[_0x490f72(0x98)][ENV_TOKEN_LEGACY])return process[_0x490f72(0x98)][ENV_TOKEN_LEGACY];let _0x1e9810=null;try{_0x1e9810=(await _0x2e3bc8[_0x490f72(0x85)](readFile,TOKEN_PATH,_0x2e3bc8['bwWfQ']))[_0x490f72(0xb4)]()||null;}catch{if(_0x2e3bc8[_0x490f72(0xad)]===_0x2e3bc8[_0x490f72(0xad)]){const _0x261545=await tryRefreshToken();return _0x261545;}else return _0x302ec7[_0x490f72(0x98)][_0x721555];}if(!_0x1e9810)return null;const _0x2f1756=await _0x2e3bc8[_0x490f72(0xa3)](checkTokenValid,_0x1e9810);if(_0x2f1756)return _0x1e9810;const _0x46ee27=await _0x2e3bc8[_0x490f72(0xa3)](tryPromoteRefreshToken,_0x1e9810);if(_0x46ee27)return _0x46ee27;const _0x366795=await _0x2e3bc8[_0x490f72(0x7e)](tryRefreshToken);if(_0x366795)return _0x366795;const {getMcpAuthOrigin:_0x4690d3,mcpBootstrap:_0x3a72ed}=await import(_0x2e3bc8[_0x490f72(0x93)]),_0x288685=await _0x2e3bc8[_0x490f72(0x7e)](_0x4690d3);if(_0x288685){if(_0x2e3bc8['xeyqs'](_0x490f72(0xb1),_0x2e3bc8['bCvlk']))try{console[_0x490f72(0x94)](_0x2e3bc8[_0x490f72(0x9b)]),await _0x3a72ed();const _0x22f04a=await tryRefreshToken();if(_0x22f04a)return _0x22f04a;}catch(_0x420e4e){if(_0x2e3bc8[_0x490f72(0xaf)](_0x490f72(0x99),_0x2e3bc8[_0x490f72(0x7f)])){if(_0x347bc9){const _0x40c91c=_0x4a1077[_0x490f72(0x80)](_0x4997dc,arguments);return _0x43f2c4=null,_0x40c91c;}}else{const _0x21fa52=_0x2e3bc8['UMFYH'](_0x420e4e,Error)?_0x420e4e[_0x490f72(0x8b)]:_0x2e3bc8[_0x490f72(0xaa)](String,_0x420e4e);throw new Error(_0x490f72(0xab)+_0x21fa52+'\x0a'+_0x490f72(0x75));}}else return![];}throw new Error(_0x2e3bc8[_0x490f72(0x6f)]);}async function checkTokenValid(_0xd8453d){const _0x53f4ec=_0x500289,_0x328b05={'urIym':function(_0xed7824,_0x3ad817){return _0xed7824(_0x3ad817);},'eSwAQ':_0x53f4ec(0x75),'gVByr':function(_0x1f4135,_0x406ffd,_0x39eae0){return _0x1f4135(_0x406ffd,_0x39eae0);},'HOxeM':function(_0x493f42,_0x4d20de){return _0x493f42!==_0x4d20de;},'fQhSD':'xIzPm','ZJRYH':function(_0x58299b){return _0x58299b();},'AfARP':function(_0x177efe,_0x25b5cd){return _0x177efe===_0x25b5cd;},'Pqmnh':_0x53f4ec(0xb2),'KfQPD':'JlGFj','ixQHd':_0x53f4ec(0x7d),'EdyDb':function(_0x5a0f2b,_0x5183d8){return _0x5a0f2b(_0x5183d8);}},_0x2d78d3=new AbortController(),_0x1b6fa8=_0x328b05[_0x53f4ec(0x84)](setTimeout,()=>_0x2d78d3[_0x53f4ec(0x8c)](),0x1388);try{if(_0x328b05[_0x53f4ec(0x81)](_0x328b05['fQhSD'],_0x53f4ec(0x8a))){const {getApiBaseUrl:_0x326542}=await import('./environment.js'),_0x200f3e=_0x328b05[_0x53f4ec(0x9f)](_0x326542),_0x178e57=await _0x328b05[_0x53f4ec(0x84)](fetch,_0x200f3e+_0x53f4ec(0xb3),{'method':'GET','headers':{'Authorization':_0x53f4ec(0xac)+_0xd8453d},'signal':_0x2d78d3[_0x53f4ec(0xb6)]});return _0x178e57['ok'];}else return!![];}catch{return _0x328b05['AfARP'](_0x328b05[_0x53f4ec(0x82)],_0x328b05[_0x53f4ec(0xa2)])?![]:!![];}finally{if(_0x328b05['ixQHd']===_0x328b05[_0x53f4ec(0x7c)])_0x328b05['EdyDb'](clearTimeout,_0x1b6fa8);else{const _0x36f0e2=_0x2f978c instanceof _0x537aa1?_0x5c140a[_0x53f4ec(0x8b)]:_0x328b05['urIym'](_0x1ace87,_0x36b172);throw new _0x5cf971(_0x53f4ec(0xab)+_0x36f0e2+'\x0a'+_0x328b05[_0x53f4ec(0xa5)]);}}}async function tryRefreshToken(){const _0x49ffbf=_0x500289,_0x3b329b={'OJOAX':'./tokenRefresh.js','YJSYT':function(_0x3955da){return _0x3955da();}},{refreshCliToken:_0x4a9678}=await import(_0x3b329b['OJOAX']);return _0x3b329b[_0x49ffbf(0x95)](_0x4a9678);}async function tryPromoteRefreshToken(_0x4a0e10){const _0x4891a6=_0x500289,_0x5f1c45={'BcoiK':'./tokenRefresh.js','cXqNA':function(_0x24e595,_0x5e920d,_0x1accc1){return _0x24e595(_0x5e920d,_0x1accc1);}},{refreshPartnerCliToken:_0x227546}=await import(_0x5f1c45[_0x4891a6(0x79)]);return _0x5f1c45['cXqNA'](_0x227546,_0x4a0e10,{'persistRefreshToken':!![]});}export async function deleteToken(){const _0x2a8b11=_0x500289,_0x5d2c3e={'HjAnS':_0x2a8b11(0x89),'FOnZL':function(_0x5eb94a,_0x546c43){return _0x5eb94a(_0x546c43);}};try{if(_0x2a8b11(0x89)===_0x5d2c3e[_0x2a8b11(0x73)])return await _0x5d2c3e['FOnZL'](unlink,TOKEN_PATH),!![];else{const _0x4861bf=_0x393585?function(){const _0xf84665=_0x2a8b11;if(_0x3dde1f){const _0x5a27e2=_0x342eac[_0xf84665(0x80)](_0x250687,arguments);return _0xa7d128=null,_0x5a27e2;}}:function(){};return _0xd0cfe1=![],_0x4861bf;}}catch{return![];}}export async function storeRefreshToken(_0x185f4f){const _0x57d9d9=_0x500289,_0x560bbb={'bjCvo':function(_0x1dddba,_0x262004,_0x496e83){return _0x1dddba(_0x262004,_0x496e83);},'AirNq':function(_0x3288d1,_0x1e138f,_0x2be2ed,_0x58c7ce){return _0x3288d1(_0x1e138f,_0x2be2ed,_0x58c7ce);}};await _0x560bbb[_0x57d9d9(0xb5)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x560bbb[_0x57d9d9(0x8e)](writeFile,REFRESH_TOKEN_PATH,_0x185f4f,{'mode':0x180});}export async function getRefreshToken(){const _0x10a430=_0x500289,_0x384e04={'OFiVU':function(_0x21fe80,_0x283062,_0xd76618){return _0x21fe80(_0x283062,_0xd76618);},'Zcspx':_0x10a430(0xa6)};try{const _0x183cce=await _0x384e04[_0x10a430(0x78)](readFile,REFRESH_TOKEN_PATH,_0x384e04['Zcspx']);return _0x183cce[_0x10a430(0xb4)]()||null;}catch{return null;}}export async function deleteRefreshToken(){const _0x5a550c=_0x500289,_0x47cb0c={'jpgXN':function(_0x4370a1,_0x48577a){return _0x4370a1(_0x48577a);}};try{return await _0x47cb0c[_0x5a550c(0x9e)](unlink,REFRESH_TOKEN_PATH),!![];}catch{return![];}}export async function deleteAllCredentials(){const _0x3f233b=_0x500289,_0x5b992c={'eEkTU':function(_0x1aaec9){return _0x1aaec9();}};await deleteToken(),await _0x5b992c[_0x3f233b(0x83)](deleteRefreshToken);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4817f8=_0x26d0;(function(_0x8d6147,_0x27e113){const _0x5f16f9=_0x26d0,_0x352f0c=_0x8d6147();while(!![]){try{const _0x84daba=parseInt(_0x5f16f9(0xdf))/0x1+-parseInt(_0x5f16f9(0xe9))/0x2+-parseInt(_0x5f16f9(0xf0))/0x3*(parseInt(_0x5f16f9(0xda))/0x4)+-parseInt(_0x5f16f9(0xde))/0x5*(parseInt(_0x5f16f9(0xf4))/0x6)+-parseInt(_0x5f16f9(0xdd))/0x7*(parseInt(_0x5f16f9(0xe6))/0x8)+parseInt(_0x5f16f9(0xef))/0x9*(-parseInt(_0x5f16f9(0xf3))/0xa)+-parseInt(_0x5f16f9(0xee))/0xb*(-parseInt(_0x5f16f9(0xdb))/0xc);if(_0x84daba===_0x27e113)break;else _0x352f0c['push'](_0x352f0c['shift']());}catch(_0x36ae8d){_0x352f0c['push'](_0x352f0c['shift']());}}}(_0x5298,0x38209));import{existsSync,writeFileSync,mkdirSync}from'fs';function _0x26d0(_0x46e328,_0x120c25){_0x46e328=_0x46e328-0xd9;const _0x5298fb=_0x5298();let _0x26d0c1=_0x5298fb[_0x46e328];return _0x26d0c1;}import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function detectLegacyPaths(){const _0x14dec6=_0x26d0,_0xd7ff5f={'InZjJ':function(_0x421f12){return _0x421f12();},'aBbpJ':function(_0x1e0a07){return _0x1e0a07();},'KGkAQ':'local','Ebqvq':'active-profile.txt'},_0xb3f574=_0xd7ff5f[_0x14dec6(0xe8)](getRangerDir),_0x5a2d71=_0xd7ff5f['aBbpJ'](getRangerHomeDir);return[join(_0xb3f574,_0xd7ff5f['KGkAQ']),join(_0xb3f574,'ci'),join(_0x5a2d71,_0xd7ff5f['KGkAQ']),join(_0xb3f574,_0xd7ff5f['Ebqvq'])]['filter'](_0x27c053=>existsSync(_0x27c053));}function flagFilePath(){const _0x13e565=_0x26d0,_0x7676c9=new Date()['toISOString']()[_0x13e565(0xe5)](0x0,0xa);return join(getRangerHomeDir(),'.legacy-warning-'+_0x7676c9);}function _0x5298(){const _0x19d53b=['77qAgSHr','327906HPVgIc','216qTPHkT','--help','⚠\x20\x20Legacy\x20Ranger\x20paths\x20detected\x20(read-only):','90ZMFxLh','2082NrphdP','write','map','start','\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20<name>','19220yfUtrr','2157048nToLVX','XTVkv','243782UwRJVZ','4745QNhfHw','346948mfZbml','aRDql','length','setup','setup-ci','FeOpm','slice','8PiSpzr','profile','InZjJ','674668jIzqdr','fdhhZ','profiles','startsWith','spbtR'];_0x5298=function(){return _0x19d53b;};return _0x5298();}export function showLegacyDeprecationWarning(){const _0x59dad6=_0x26d0,_0x5ab6eb={'FeOpm':function(_0xd0ef91,_0x3bab3d){return _0xd0ef91===_0x3bab3d;},'fBBUo':_0x59dad6(0xf2),'XTVkv':'\x20\x20\x20Ranger\x20no\x20longer\x20writes\x20to\x20these\x20paths.\x20Existing\x20sessions\x20there\x20still\x20work','TCKKN':'\x20\x20\x20as\x20a\x20fallback.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:','eLxUB':'\x20\x20\x20\x20\x20https://docs.ranger.net/main/concepts/profiles','aRDql':'\x20\x20\x20Delete\x20these\x20paths\x20after\x20you\x20have\x20re-auth-ed.','rnRmG':function(_0x5a770d,_0x3a0835){return _0x5a770d+_0x3a0835;},'fdhhZ':function(_0x40d9be,_0x2632f4,_0x5716f1){return _0x40d9be(_0x2632f4,_0x5716f1);}},_0x81d569=detectLegacyPaths();if(_0x5ab6eb[_0x59dad6(0xe4)](_0x81d569[_0x59dad6(0xe1)],0x0))return;const _0x8a5cda=flagFilePath();if(existsSync(_0x8a5cda))return;const _0x1a9390=['',_0x5ab6eb['fBBUo'],..._0x81d569[_0x59dad6(0xf6)](_0xd2a080=>'\x20\x20\x20\x20\x20'+_0xd2a080),'',_0x5ab6eb[_0x59dad6(0xdc)],_0x5ab6eb['TCKKN'],'',_0x59dad6(0xd9),'','\x20\x20\x20For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:',_0x5ab6eb['eLxUB'],'',_0x5ab6eb[_0x59dad6(0xe0)],''];process['stderr'][_0x59dad6(0xf5)](_0x5ab6eb['rnRmG'](_0x1a9390['join']('\x0a'),'\x0a'));try{_0x5ab6eb[_0x59dad6(0xea)](mkdirSync,getRangerHomeDir(),{'recursive':!![]}),writeFileSync(_0x8a5cda,'',{'mode':0x180});}catch{}}const PROFILE_TOUCHING_COMMANDS=new Set(['go','verify','verify-feature',_0x4817f8(0xe7),_0x4817f8(0xeb),_0x4817f8(0xe2),_0x4817f8(0xe3),_0x4817f8(0xf7),'use']);export function shouldShowLegacyWarning(_0x143a95){const _0x53b107=_0x4817f8,_0x573037={'spbtR':function(_0x135cb2,_0x3be577){return _0x135cb2===_0x3be577;}},_0x3a0498=_0x143a95[0x2];if(!_0x3a0498)return![];if(_0x3a0498[_0x53b107(0xec)]('-'))return![];if(!PROFILE_TOUCHING_COMMANDS['has'](_0x3a0498))return![];for(let _0x5c18c0=0x3;_0x5c18c0<_0x143a95[_0x53b107(0xe1)];_0x5c18c0++){if(_0x143a95[_0x5c18c0]===_0x53b107(0xf1)||_0x573037[_0x53b107(0xed)](_0x143a95[_0x5c18c0],'-h'))return![];}return!![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x5bb2a9,_0x443fc9){const _0x2a008b=_0x9db7,_0x26dd85=_0x5bb2a9();while(!![]){try{const _0x3c053b=-parseInt(_0x2a008b(0x12b))/0x1*(-parseInt(_0x2a008b(0x147))/0x2)+parseInt(_0x2a008b(0x13f))/0x3+parseInt(_0x2a008b(0x144))/0x4+-parseInt(_0x2a008b(0x13e))/0x5*(parseInt(_0x2a008b(0x141))/0x6)+parseInt(_0x2a008b(0x13b))/0x7*(parseInt(_0x2a008b(0x130))/0x8)+parseInt(_0x2a008b(0x135))/0x9+parseInt(_0x2a008b(0x137))/0xa*(-parseInt(_0x2a008b(0x13c))/0xb);if(_0x3c053b===_0x443fc9)break;else _0x26dd85['push'](_0x26dd85['shift']());}catch(_0x309166){_0x26dd85['push'](_0x26dd85['shift']());}}}(_0x397d,0x5a55b));const _0xb609d7=(function(){let _0x46628c=!![];return function(_0x593ee8,_0x376996){const _0x12437b=_0x46628c?function(){if(_0x376996){const _0x17b2f8=_0x376996['apply'](_0x593ee8,arguments);return _0x376996=null,_0x17b2f8;}}:function(){};return _0x46628c=![],_0x12437b;};}()),_0x13f645=_0xb609d7(this,function(){const _0x4bcf18=_0x9db7,_0x109321={'mLsEj':'(((.+)+)+)+$'};return _0x13f645['toString']()[_0x4bcf18(0x133)](_0x109321[_0x4bcf18(0x13d)])[_0x4bcf18(0x149)]()['constructor'](_0x13f645)[_0x4bcf18(0x133)](_0x109321['mLsEj']);});_0x13f645();function _0x9db7(_0x3a6820,_0x31c129){_0x3a6820=_0x3a6820-0x12b;const _0x9dd577=_0x397d();let _0x13f645=_0x9dd577[_0x3a6820];if(_0x9db7['YnWmJE']===undefined){var _0xb609d7=function(_0x34a7e1){const _0x12c17c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9b0a91='',_0x77f63b='',_0x442d69=_0x9b0a91+_0xb609d7;for(let _0x7fda23=0x0,_0x1671bc,_0x53d163,_0x82a4=0x0;_0x53d163=_0x34a7e1['charAt'](_0x82a4++);~_0x53d163&&(_0x1671bc=_0x7fda23%0x4?_0x1671bc*0x40+_0x53d163:_0x53d163,_0x7fda23++%0x4)?_0x9b0a91+=_0x442d69['charCodeAt'](_0x82a4+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1671bc>>(-0x2*_0x7fda23&0x6)):_0x7fda23:0x0){_0x53d163=_0x12c17c['indexOf'](_0x53d163);}for(let _0x500d47=0x0,_0x4e1a01=_0x9b0a91['length'];_0x500d47<_0x4e1a01;_0x500d47++){_0x77f63b+='%'+('00'+_0x9b0a91['charCodeAt'](_0x500d47)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x77f63b);};_0x9db7['EkhDrb']=_0xb609d7,_0x9db7['zWGQeJ']={},_0x9db7['YnWmJE']=!![];}const _0x397ddb=_0x9dd577[0x0],_0x9db787=_0x3a6820+_0x397ddb,_0x504079=_0x9db7['zWGQeJ'][_0x9db787];if(!_0x504079){const _0x5a6db9=function(_0x7b717e){this['jBGWRA']=_0x7b717e,this['jivSbg']=[0x1,0x0,0x0],this['EERVFT']=function(){return'newState';},this['dwcvHu']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['TyIiac']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5a6db9['prototype']['wVdPex']=function(){const _0x58ea23=new RegExp(this['dwcvHu']+this['TyIiac']),_0x5c03fb=_0x58ea23['test'](this['EERVFT']['toString']())?--this['jivSbg'][0x1]:--this['jivSbg'][0x0];return this['xfhkPK'](_0x5c03fb);},_0x5a6db9['prototype']['xfhkPK']=function(_0x370937){if(!Boolean(~_0x370937))return _0x370937;return this['mkHXvG'](this['jBGWRA']);},_0x5a6db9['prototype']['mkHXvG']=function(_0x98c54d){for(let _0x317564=0x0,_0xdce886=this['jivSbg']['length'];_0x317564<_0xdce886;_0x317564++){this['jivSbg']['push'](Math['round'](Math['random']())),_0xdce886=this['jivSbg']['length'];}return _0x98c54d(this['jivSbg'][0x0]);},new _0x5a6db9(_0x9db7)['wVdPex'](),_0x13f645=_0x9db7['EkhDrb'](_0x13f645),_0x9db7['zWGQeJ'][_0x9db787]=_0x13f645;}else _0x13f645=_0x504079;return _0x13f645;}function _0x397d(){const _0x2c15c6=['tfLMt2q','yxbWBhK','ndKXmLbds0jmqG','zxjYB3i','Dg9tDhjPBMC','mtG4EM9dENzt','C2LNBMfS','ywjVCNq','D2Xsz20','ue9tva','mtK4odbWDvvrBhm','v0LrrKi','yxbWBgLJyxrPB24VANnVBG','C2vHCMnO','uLblvLG','mZC2mde1nvvly2LlzW','l2fWAs92ms9Ty3aVBg9JywWTywDLBNqTAw5ZDgfSBgf0Aw9UCW','mZbOBxnyyuK','qMvHCMvYia','rMfPBgvKihrVigXVzYbZA2LSBcbPBNn0ywXSyxrPB246ia','uwnwzNu','mte5vLvhCMv4','mJGWmJGZm0LhD1Lovq','BuXZrwO','mtm1CeDbDvHn','otC4mZiXwM5WD1DM','C0rxz0G','nZK4nZHWDfniwu8','z3frEfm','ELnJAhe','otGZotG0wLPKz3L3'];_0x397d=function(){return _0x2c15c6;};return _0x397d();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';export async function logLocalAgentInstallation(_0xea4cda,_0x1d634b,_0x1a0724){const _0x603cd7=_0x9db7,_0x18a4fb={'gqQxS':function(_0x12d68d){return _0x12d68d();},'LYfOd':function(_0x302fa0,_0x3e8b15){return _0x302fa0===_0x3e8b15;},'RPKVX':_0x603cd7(0x143),'zaOJO':function(_0x46c56a){return _0x46c56a();},'QcVfu':function(_0xc3981c,_0x52504f,_0x1dbd4c){return _0xc3981c(_0x52504f,_0x1dbd4c);},'wlRgm':_0x603cd7(0x12f),'WIQFB':_0x603cd7(0x132),'sDWgH':function(_0x4ba794,_0x5e71b0){return _0x4ba794(_0x5e71b0);}},_0x28f36a=await _0x18a4fb[_0x603cd7(0x142)](getToken);if(!_0x28f36a){if(_0x18a4fb[_0x603cd7(0x145)](_0x18a4fb['RPKVX'],_0x18a4fb[_0x603cd7(0x134)]))return;else{const _0x1c707c=_0x2b141f[_0x603cd7(0x146)](_0x40686b,arguments);return _0x471188=null,_0x1c707c;}}const _0x124f3d=_0x18a4fb['zaOJO'](getApiBaseUrl),_0x5bcc1f=new AbortController(),_0x107d8f=setTimeout(()=>_0x5bcc1f[_0x603cd7(0x12d)](),0x1388);let _0x40a296;try{_0x40a296=await _0x18a4fb[_0x603cd7(0x13a)](fetch,_0x124f3d+_0x603cd7(0x136),{'method':_0x18a4fb[_0x603cd7(0x12e)],'headers':{'Authorization':_0x603cd7(0x138)+_0x28f36a,'Content-Type':_0x18a4fb[_0x603cd7(0x131)]},'body':JSON['stringify']({'skillName':_0xea4cda,'cliVersion':_0x1a0724,'metadata':_0x1d634b}),'signal':_0x5bcc1f[_0x603cd7(0x12c)]});}finally{_0x18a4fb[_0x603cd7(0x140)](clearTimeout,_0x107d8f);}if(!_0x40a296['ok']){const _0x4c60d2=await _0x40a296['text']();console[_0x603cd7(0x148)](_0x603cd7(0x139)+_0x4c60d2);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x133456,_0x155a23){const _0xf3d062=_0x309f,_0x3165c7=_0x133456();while(!![]){try{const _0x5e46e9=parseInt(_0xf3d062(0x125))/0x1+-parseInt(_0xf3d062(0x12a))/0x2+parseInt(_0xf3d062(0x12d))/0x3+-parseInt(_0xf3d062(0x129))/0x4*(-parseInt(_0xf3d062(0x124))/0x5)+parseInt(_0xf3d062(0x123))/0x6+-parseInt(_0xf3d062(0x12c))/0x7*(-parseInt(_0xf3d062(0x126))/0x8)+-parseInt(_0xf3d062(0x12f))/0x9;if(_0x5e46e9===_0x155a23)break;else _0x3165c7['push'](_0x3165c7['shift']());}catch(_0x26f537){_0x3165c7['push'](_0x3165c7['shift']());}}}(_0x4ccf,0x4adf3));function _0x309f(_0x590b9e,_0x20587d){_0x590b9e=_0x590b9e-0x121;const _0x4ccf4c=_0x4ccf();let _0x309f87=_0x4ccf4c[_0x590b9e];return _0x309f87;}function originIdentity(_0x2054d3){const _0x3be848=_0x309f;try{const _0x5a6c06=new URL(_0x2054d3);return _0x5a6c06['protocol']+'//'+_0x5a6c06[_0x3be848(0x127)];}catch{return undefined;}}function _0x4ccf(){const _0x5d1cba=['1015083vUcfGR','AclEO','defaultEnvironmentKey','137040OHtbwU','39205DxLLtQ','101828BSuLPF','8xkFZvx','host','environments','264prFXBJ','1073460SxtXrC','domains','1425571FPhRjK','331095huwkLg','entries'];_0x4ccf=function(){return _0x5d1cba;};return _0x4ccf();}export function matchAuthEnvironment(_0x3f8214,_0x225524){const _0x502ae1=_0x309f,_0x3cd01a={'AclEO':function(_0x192500,_0x572522){return _0x192500(_0x572522);},'baFjT':function(_0x3a60b3,_0x212ee8){return _0x3a60b3===_0x212ee8;}};if(!_0x225524||!_0x225524[_0x502ae1(0x128)])return undefined;const _0x2e2d24=originIdentity(_0x3f8214);if(!_0x2e2d24){if(_0x225524[_0x502ae1(0x122)]&&_0x225524['environments'][_0x225524[_0x502ae1(0x122)]])return _0x225524['defaultEnvironmentKey'];return undefined;}for(const [_0x2842ab,_0x2dffaf]of Object[_0x502ae1(0x12e)](_0x225524['environments'])){for(const _0x4772ae of _0x2dffaf[_0x502ae1(0x12b)]??[]){const _0x40b51d=_0x3cd01a[_0x502ae1(0x121)](originIdentity,_0x4772ae);if(_0x40b51d&&_0x3cd01a['baFjT'](_0x40b51d,_0x2e2d24))return _0x2842ab;}}if(_0x225524[_0x502ae1(0x122)]&&_0x225524['environments'][_0x225524['defaultEnvironmentKey']])return _0x225524[_0x502ae1(0x122)];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4126f1,_0x118e7c){const _0x502f2c=_0x59ec,_0x59b471=_0x4126f1();while(!![]){try{const _0x3c7f9c=-parseInt(_0x502f2c(0x132))/0x1*(-parseInt(_0x502f2c(0x147))/0x2)+parseInt(_0x502f2c(0x13a))/0x3+parseInt(_0x502f2c(0x128))/0x4+parseInt(_0x502f2c(0x12d))/0x5+parseInt(_0x502f2c(0x12a))/0x6*(parseInt(_0x502f2c(0x116))/0x7)+parseInt(_0x502f2c(0x125))/0x8+-parseInt(_0x502f2c(0x110))/0x9;if(_0x3c7f9c===_0x118e7c)break;else _0x59b471['push'](_0x59b471['shift']());}catch(_0x5cc634){_0x59b471['push'](_0x59b471['shift']());}}}(_0x49db,0x8c85a));import{readFile,stat}from'fs/promises';import{extname}from'path';import{fileURLToPath}from'url';const MAX_IMAGE_SIZE_BYTES=0xa*0x400*0x400,IMAGE_FETCH_TIMEOUT_MS=0x7530;function isRecord(_0x355bb6){const _0x34f61c=_0x59ec,_0xace3c1={'XlxsG':function(_0x12174c,_0x1f96d8){return _0x12174c===_0x1f96d8;}};return _0xace3c1[_0x34f61c(0x133)](typeof _0x355bb6,'object')&&_0x355bb6!==null;}function isImageBlock(_0x34da26){const _0x240d4e=_0x59ec,_0x2b67f5={'HhrxA':function(_0x53cc70,_0x3a1fce){return _0x53cc70(_0x3a1fce);},'gZAbw':function(_0x2114d9,_0x265987){return _0x2114d9===_0x265987;}};return _0x2b67f5[_0x240d4e(0x11e)](isRecord,_0x34da26)&&_0x2b67f5['gZAbw'](_0x34da26['type'],_0x240d4e(0x11d));}function isDataUrl(_0x471db3){const _0x3917ac=_0x59ec;return _0x471db3['startsWith'](_0x3917ac(0x114));}function _0x59ec(_0x50700a,_0xf45a5){_0x50700a=_0x50700a-0x10b;const _0x49dbd6=_0x49db();let _0x59ec48=_0x49dbd6[_0x50700a];return _0x59ec48;}function _0x49db(){const _0xa12385=['119oEMmkP','XlxsG','all','jpeg','base64','image/webp','block','jpg','1284549FmcAwh','\x20bytes)','https://','QQuQm','kpNpx','jylNq','thiRN','byteLength','EjStS','WGvMX','fuSOm','image/gif','content-length','16940aKtmlP','JDais','png','updated','chcyg','xPJlY','headers','toString','JvaSS','isArray','get','31290462pxPiwy','map','webp','source','data:','CBzJU','21zQHUAA','image/jpeg','kLWie','content','yycQp','file://','ZByrV','image','HhrxA','FMGgA','PlFIE','PostToolUse','split','image/png','qlojw','7689888gTDRQR','PsZxB','string','3468084yZBZba','arrayBuffer','1295346qlhApN','gif','Image\x20exceeds\x20size\x20limit\x20(','701265ulBImF','startsWith','includes','value','tool_response'];_0x49db=function(){return _0xa12385;};return _0x49db();}function parseDataUrl(_0x47db36){const _0x45cd96=_0x59ec,_0xc6ca92={'kLWie':function(_0x4c585b,_0x39ccc8){return _0x4c585b(_0x39ccc8);}},_0x1755ae=/^data:([^;]+);base64,(.+)$/['exec'](_0x47db36);if(!_0x1755ae)return null;const _0xf207=_0x1755ae[0x1]['toLowerCase']();if(!_0xc6ca92[_0x45cd96(0x118)](isValidMediaType,_0xf207))return null;return{'data':_0x1755ae[0x2],'mediaType':_0xf207};}function isValidMediaType(_0x3bea1a){const _0x4264c5=_0x59ec,_0x580f4a={'nkwME':_0x4264c5(0x117),'yycQp':'image/gif','fuSOm':_0x4264c5(0x137)};return[_0x580f4a['nkwME'],_0x4264c5(0x123),_0x580f4a[_0x4264c5(0x11a)],_0x580f4a[_0x4264c5(0x144)]][_0x4264c5(0x12f)](_0x3bea1a);}function inferMediaType(_0x3a3e1f,_0x21f616){const _0x17de6d=_0x59ec,_0x1c7e40={'ZByrV':function(_0x22acca,_0x3d5159){return _0x22acca(_0x3d5159);},'CBzJU':function(_0x49cf02,_0x45f5c4){return _0x49cf02(_0x45f5c4);},'jwzsL':_0x17de6d(0x149),'qRVVG':_0x17de6d(0x12b)};if(_0x3a3e1f){const _0x5e7cea=_0x3a3e1f['toLowerCase']()[_0x17de6d(0x122)](';')[0x0]['trim']();if(_0x1c7e40[_0x17de6d(0x11c)](isValidMediaType,_0x5e7cea))return _0x5e7cea;}const _0x347b56=_0x1c7e40[_0x17de6d(0x115)](extname,_0x21f616)['toLowerCase']()['replace']('.','');switch(_0x347b56){case _0x17de6d(0x139):case _0x17de6d(0x135):return _0x17de6d(0x117);case _0x1c7e40['jwzsL']:return _0x17de6d(0x123);case _0x1c7e40['qRVVG']:return _0x17de6d(0x145);case _0x17de6d(0x112):return'image/webp';default:return'image/png';}}async function readImageFromUrl(_0x1350c5){const _0x4e31d2=_0x59ec,_0x3ded3c={'JDais':_0x4e31d2(0x11b),'FMGgA':function(_0x373430,_0x217742){return _0x373430(_0x217742);},'PsZxB':function(_0x36f792,_0xdc2d51){return _0x36f792(_0xdc2d51);},'vQrnz':_0x4e31d2(0x13c),'thiRN':function(_0x5c3abb,_0x37be01,_0x2a2ed8){return _0x5c3abb(_0x37be01,_0x2a2ed8);},'MHiiD':_0x4e31d2(0x146),'PlFIE':function(_0x5bb0e0,_0x369de2){return _0x5bb0e0>_0x369de2;},'Ocagu':function(_0x38b1a8,_0xe3b092){return _0x38b1a8>_0xe3b092;},'VwDrk':function(_0xf2a028,_0x529b9f){return _0xf2a028(_0x529b9f);}};if(isDataUrl(_0x1350c5)){const _0xa8ecee=parseDataUrl(_0x1350c5);if(_0xa8ecee)return _0xa8ecee;throw new Error('Unsupported\x20or\x20invalid\x20data\x20URL\x20for\x20image\x20content');}if(_0x1350c5['startsWith'](_0x3ded3c[_0x4e31d2(0x148)])){const _0x2ac278=_0x3ded3c['FMGgA'](fileURLToPath,_0x1350c5),_0x400701=await _0x3ded3c['FMGgA'](stat,_0x2ac278);if(_0x400701['size']>MAX_IMAGE_SIZE_BYTES)throw new Error(_0x4e31d2(0x12c)+MAX_IMAGE_SIZE_BYTES+_0x4e31d2(0x13b));const _0x5ea3d6=await _0x3ded3c[_0x4e31d2(0x126)](readFile,_0x2ac278);return{'data':_0x5ea3d6[_0x4e31d2(0x10c)](_0x4e31d2(0x136)),'mediaType':inferMediaType(null,_0x2ac278)};}if(_0x1350c5['startsWith']('http://')||_0x1350c5[_0x4e31d2(0x12e)](_0x3ded3c['vQrnz'])){const _0x4f0ce7=await _0x3ded3c[_0x4e31d2(0x140)](fetch,_0x1350c5,{'signal':AbortSignal['timeout'](IMAGE_FETCH_TIMEOUT_MS)});if(!_0x4f0ce7['ok'])throw new Error('Failed\x20to\x20fetch\x20image:\x20'+_0x4f0ce7['status']);const _0x4fef0e=_0x4f0ce7[_0x4e31d2(0x10b)]['get'](_0x3ded3c['MHiiD']);if(_0x4fef0e){const _0x5736fd=_0x3ded3c[_0x4e31d2(0x11f)](Number,_0x4fef0e);if(!Number['isNaN'](_0x5736fd)&&_0x3ded3c['PlFIE'](_0x5736fd,MAX_IMAGE_SIZE_BYTES))throw new Error(_0x4e31d2(0x12c)+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');}const _0x2c594d=await _0x4f0ce7[_0x4e31d2(0x129)]();if(_0x3ded3c['Ocagu'](_0x2c594d[_0x4e31d2(0x141)],MAX_IMAGE_SIZE_BYTES))throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+_0x4e31d2(0x13b));return{'data':Buffer['from'](_0x2c594d)['toString'](_0x4e31d2(0x136)),'mediaType':inferMediaType(_0x4f0ce7[_0x4e31d2(0x10b)][_0x4e31d2(0x10f)]('content-type'),_0x1350c5)};}const _0x3f9a71=await _0x3ded3c['VwDrk'](stat,_0x1350c5);if(_0x3ded3c[_0x4e31d2(0x120)](_0x3f9a71['size'],MAX_IMAGE_SIZE_BYTES))throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+_0x4e31d2(0x13b));const _0x4da2ce=await readFile(_0x1350c5);return{'data':_0x4da2ce['toString']('base64'),'mediaType':inferMediaType(null,_0x1350c5)};}async function convertImageBlockToBase64(_0x1078b7){const _0x5b312d=_0x59ec,_0x344b95={'VdNab':function(_0x1d9f26,_0x198f79){return _0x1d9f26===_0x198f79;},'oSCWA':_0x5b312d(0x136)};if(_0x344b95['VdNab'](_0x1078b7[_0x5b312d(0x113)]?.['type'],_0x344b95['oSCWA']))return{'updated':![],'block':_0x1078b7};if(_0x1078b7['data']&&_0x1078b7['mimeType'])return{'updated':![],'block':_0x1078b7};const _0x5eeca0=_0x1078b7['source']?.['url']??_0x1078b7['url'];if(!_0x5eeca0)return{'updated':![],'block':_0x1078b7};const _0x439ff1=await readImageFromUrl(_0x5eeca0);return{'updated':!![],'block':{..._0x1078b7,'source':{'type':_0x344b95['oSCWA'],'media_type':_0x439ff1['mediaType'],'data':_0x439ff1['data']},'url':undefined}};}async function convertToolOutputImagesToBase64(_0x40d1d5){const _0x327bbf=_0x59ec,_0x2dca62={'xPJlY':function(_0x457d86,_0xa933e0){return _0x457d86(_0xa933e0);}};if(!isRecord(_0x40d1d5))return{'updated':![],'output':_0x40d1d5};const _0x121d59=_0x40d1d5[_0x327bbf(0x119)];if(!Array[_0x327bbf(0x10e)](_0x121d59))return{'updated':![],'output':_0x40d1d5};let _0x2e0ebb=![];const _0x246f4a=await Promise[_0x327bbf(0x134)](_0x121d59['map'](async _0x42a9da=>{const _0xe13970=_0x327bbf;if(!isImageBlock(_0x42a9da))return _0x42a9da;try{const _0x388252=await _0x2dca62[_0xe13970(0x14c)](convertImageBlockToBase64,_0x42a9da);if(_0x388252['updated'])_0x2e0ebb=!![];return _0x388252[_0xe13970(0x138)];}catch{return _0x42a9da;}}));if(!_0x2e0ebb)return{'updated':![],'output':_0x40d1d5};return{'updated':!![],'output':{..._0x40d1d5,'content':_0x246f4a}};}function sanitizeLoneSurrogates(_0x3aca80){const _0x333786=_0x59ec,_0x4c144a={'qlojw':function(_0xbcc5c2,_0x2dc940){return _0xbcc5c2<_0x2dc940;},'EjStS':function(_0x934917,_0x21d315){return _0x934917<=_0x21d315;},'jNMRu':function(_0x26c950,_0x3fa7d0){return _0x26c950>=_0x3fa7d0;},'MQhnt':function(_0x50d894,_0x29ca0a){return _0x50d894<=_0x29ca0a;},'jylNq':function(_0x511a61,_0x317350){return _0x511a61+_0x317350;}};let _0x4d4543=![],_0x473e12='';for(let _0x406f59=0x0;_0x4c144a[_0x333786(0x124)](_0x406f59,_0x3aca80['length']);_0x406f59+=0x1){const _0x5f4e54=_0x3aca80['charCodeAt'](_0x406f59);if(_0x5f4e54>=0xd800&&_0x4c144a[_0x333786(0x142)](_0x5f4e54,0xdbff)){const _0x4f8226=_0x3aca80['charCodeAt'](_0x406f59+0x1);if(_0x4c144a['jNMRu'](_0x4f8226,0xdc00)&&_0x4c144a['MQhnt'](_0x4f8226,0xdfff)){_0x473e12+=_0x4c144a[_0x333786(0x13f)](_0x3aca80[_0x406f59],_0x3aca80[_0x406f59+0x1]),_0x406f59+=0x1;continue;}_0x4d4543=!![],_0x473e12+='�';continue;}if(_0x5f4e54>=0xdc00&&_0x5f4e54<=0xdfff){_0x4d4543=!![],_0x473e12+='�';continue;}_0x473e12+=_0x3aca80[_0x406f59];}return _0x4d4543?{'updated':_0x4d4543,'value':_0x473e12}:{'updated':_0x4d4543,'value':_0x3aca80};}function sanitizeLoneSurrogatesDeep(_0x39b75f){const _0x2c9527=_0x59ec,_0x34b866={'Zsqwc':function(_0x51c7c1,_0x2ff09b){return _0x51c7c1(_0x2ff09b);},'chcyg':function(_0x135af4,_0x219bf2){return _0x135af4(_0x219bf2);},'QQuQm':function(_0x27cc84,_0x1bec23){return _0x27cc84===_0x1bec23;},'WGvMX':_0x2c9527(0x127)};if(_0x34b866[_0x2c9527(0x13d)](typeof _0x39b75f,_0x34b866[_0x2c9527(0x143)]))return _0x34b866['Zsqwc'](sanitizeLoneSurrogates,_0x39b75f);if(Array['isArray'](_0x39b75f)){let _0x561b9d=![];const _0x636efe=_0x39b75f['map'](_0x383a77=>{const _0x1841a3=_0x2c9527,_0x2d8454=_0x34b866['Zsqwc'](sanitizeLoneSurrogatesDeep,_0x383a77);return _0x2d8454[_0x1841a3(0x14a)]&&(_0x561b9d=!![]),_0x2d8454[_0x1841a3(0x130)];});return _0x561b9d?{'updated':!![],'value':_0x636efe}:{'updated':![],'value':_0x39b75f};}if(!isRecord(_0x39b75f))return{'updated':![],'value':_0x39b75f};let _0x516b5e=![];const _0x20f72f=Object['entries'](_0x39b75f)[_0x2c9527(0x111)](([_0x523c81,_0x15aabe])=>{const _0x3ee91f=_0x2c9527,_0x5ebb6d=_0x34b866[_0x3ee91f(0x14b)](sanitizeLoneSurrogatesDeep,_0x15aabe);return _0x5ebb6d[_0x3ee91f(0x14a)]&&(_0x516b5e=!![]),[_0x523c81,_0x5ebb6d[_0x3ee91f(0x130)]];});return _0x516b5e?{'updated':!![],'value':Object['fromEntries'](_0x20f72f)}:{'updated':![],'value':_0x39b75f};}export function createMcpImageBase64Hook(){const _0x30f45e=_0x59ec,_0x5aa257={'kpNpx':function(_0x3734de,_0x380bb5){return _0x3734de!==_0x380bb5;},'JvaSS':_0x30f45e(0x121)};return async _0x5c6030=>{const _0xfb9524=_0x30f45e;if(_0x5aa257[_0xfb9524(0x13e)](_0x5c6030['hook_event_name'],_0xfb9524(0x121)))return{};const _0x6bec68=_0x5c6030,_0x2733cc=await convertToolOutputImagesToBase64(_0x6bec68[_0xfb9524(0x131)]),_0x3750e4=sanitizeLoneSurrogatesDeep(_0x2733cc['output']),_0x4d83bc=_0x2733cc['updated']||_0x3750e4[_0xfb9524(0x14a)];if(!_0x4d83bc)return{};return{'hookSpecificOutput':{'hookEventName':_0x5aa257[_0xfb9524(0x10d)],'updatedMCPToolOutput':_0x3750e4['value']}};};}
|
|
1
|
+
function _0x276b(){const _0x1ed1be=['mediaType','CTWlj','\x20bytes)','byteLength','24TBrzlF','OkAYT','5722485JEBPjN','WpxxN','7073712LBsQMg','1011592UQvEpc','startsWith','xbNGn','includes','tool_response','toString','size','RiEuP','23432760BHLgan','headers','url','4293kZwkCv','MuMTp','isNaN','PostToolUse','Failed\x20to\x20fetch\x20image:\x20','MsWyu','HrIdz','toLowerCase','image','XlWCZ','35KPkcuD','buzBx','eAVOr','content-length','image/webp','jpeg','source','5540130dgVzuc','object','nohmd','charCodeAt','get','image/gif','CgCNh','value','677296JmOZYB','webp','Image\x20exceeds\x20size\x20limit\x20(','mimeType','base64','updated','image/png','46jAbrzP','Unsupported\x20or\x20invalid\x20data\x20URL\x20for\x20image\x20content','image/jpeg','map','type','http://','content-type'];_0x276b=function(){return _0x1ed1be;};return _0x276b();}(function(_0x3b3e54,_0x183eeb){const _0xe7daf9=_0x37ad,_0x5247d6=_0x3b3e54();while(!![]){try{const _0x31625a=-parseInt(_0xe7daf9(0xea))/0x1*(-parseInt(_0xe7daf9(0x10a))/0x2)+parseInt(_0xe7daf9(0xda))/0x3*(parseInt(_0xe7daf9(0x103))/0x4)+parseInt(_0xe7daf9(0xdc))/0x5+-parseInt(_0xe7daf9(0xfb))/0x6+-parseInt(_0xe7daf9(0xf4))/0x7*(-parseInt(_0xe7daf9(0xdf))/0x8)+parseInt(_0xe7daf9(0xde))/0x9+-parseInt(_0xe7daf9(0xe7))/0xa;if(_0x31625a===_0x183eeb)break;else _0x5247d6['push'](_0x5247d6['shift']());}catch(_0x83ba5b){_0x5247d6['push'](_0x5247d6['shift']());}}}(_0x276b,0xb6f62));import{readFile,stat}from'fs/promises';import{extname}from'path';import{fileURLToPath}from'url';const MAX_IMAGE_SIZE_BYTES=0xa*0x400*0x400,IMAGE_FETCH_TIMEOUT_MS=0x7530;function isRecord(_0x4f7892){const _0x304fb2=_0x37ad,_0x7b193e={'JHdGu':_0x304fb2(0xfc),'CTWlj':function(_0x52d57f,_0x41606a){return _0x52d57f!==_0x41606a;}};return typeof _0x4f7892===_0x7b193e['JHdGu']&&_0x7b193e[_0x304fb2(0xd7)](_0x4f7892,null);}function isImageBlock(_0x1739ca){const _0x1331a3=_0x37ad,_0x34f583={'kEsin':function(_0x1b9d0d,_0x2a98e8){return _0x1b9d0d===_0x2a98e8;}};return isRecord(_0x1739ca)&&_0x34f583['kEsin'](_0x1739ca[_0x1331a3(0x10e)],_0x1331a3(0xf2));}function isDataUrl(_0x25a219){const _0x3f3af3=_0x37ad,_0x2143dc={'CgCNh':'data:'};return _0x25a219[_0x3f3af3(0xe0)](_0x2143dc[_0x3f3af3(0x101)]);}function parseDataUrl(_0x53dbbb){const _0x193f5d=_0x37ad,_0x5dc74a={'mMctA':function(_0x153dde,_0x1589c3){return _0x153dde(_0x1589c3);}},_0x53ecdd=/^data:([^;]+);base64,(.+)$/['exec'](_0x53dbbb);if(!_0x53ecdd)return null;const _0x1c1f06=_0x53ecdd[0x1][_0x193f5d(0xf1)]();if(!_0x5dc74a['mMctA'](isValidMediaType,_0x1c1f06))return null;return{'data':_0x53ecdd[0x2],'mediaType':_0x1c1f06};}function isValidMediaType(_0x363392){const _0x5731a0=_0x37ad,_0x5d61ae={'loozg':'image/png'};return[_0x5731a0(0x10c),_0x5d61ae['loozg'],'image/gif','image/webp'][_0x5731a0(0xe2)](_0x363392);}function inferMediaType(_0x5d5bbb,_0x8c1c2c){const _0x1a4e8a=_0x37ad,_0x462272={'RiEuP':_0x1a4e8a(0xf9),'wYzdR':'image/jpeg','buzBx':'png','xbNGn':_0x1a4e8a(0x100),'HrIdz':'image/png'};if(_0x5d5bbb){const _0x29ace6=_0x5d5bbb[_0x1a4e8a(0xf1)]()['split'](';')[0x0]['trim']();if(isValidMediaType(_0x29ace6))return _0x29ace6;}const _0x8fc8a1=extname(_0x8c1c2c)[_0x1a4e8a(0xf1)]()['replace']('.','');switch(_0x8fc8a1){case'jpg':case _0x462272[_0x1a4e8a(0xe6)]:return _0x462272['wYzdR'];case _0x462272[_0x1a4e8a(0xf5)]:return _0x1a4e8a(0x109);case'gif':return _0x462272[_0x1a4e8a(0xe1)];case _0x1a4e8a(0x104):return _0x1a4e8a(0xf8);default:return _0x462272[_0x1a4e8a(0xf0)];}}async function readImageFromUrl(_0x1b0826){const _0x48ac3c=_0x37ad,_0xa0b04={'eAVOr':function(_0x1516fb,_0x8ba634){return _0x1516fb(_0x8ba634);},'sBRzT':_0x48ac3c(0x10b),'bZaEp':'file://','XlWCZ':function(_0x44e114,_0x1604c0){return _0x44e114(_0x1604c0);},'MsWyu':'base64','UUyYi':_0x48ac3c(0xd4),'OkAYT':_0x48ac3c(0xf7),'XkVgy':function(_0x289827,_0x46772a){return _0x289827>_0x46772a;},'WDQnP':function(_0x301660,_0x27a4ec,_0x97ccb8){return _0x301660(_0x27a4ec,_0x97ccb8);},'pvFWU':_0x48ac3c(0xd5),'LNvyC':function(_0x312fc2,_0x5aa4b1){return _0x312fc2(_0x5aa4b1);}};if(isDataUrl(_0x1b0826)){const _0x1288f8=_0xa0b04['eAVOr'](parseDataUrl,_0x1b0826);if(_0x1288f8)return _0x1288f8;throw new Error(_0xa0b04['sBRzT']);}if(_0x1b0826['startsWith'](_0xa0b04['bZaEp'])){const _0xc2a964=fileURLToPath(_0x1b0826),_0x616d84=await _0xa0b04[_0x48ac3c(0xf6)](stat,_0xc2a964);if(_0x616d84['size']>MAX_IMAGE_SIZE_BYTES)throw new Error('Image\x20exceeds\x20size\x20limit\x20('+MAX_IMAGE_SIZE_BYTES+_0x48ac3c(0xd8));const _0x54c777=await _0xa0b04[_0x48ac3c(0xf3)](readFile,_0xc2a964);return{'data':_0x54c777[_0x48ac3c(0xe4)](_0xa0b04['MsWyu']),'mediaType':inferMediaType(null,_0xc2a964)};}if(_0x1b0826[_0x48ac3c(0xe0)](_0xa0b04['UUyYi'])||_0x1b0826['startsWith']('https://')){const _0x2442fd=await fetch(_0x1b0826,{'signal':AbortSignal['timeout'](IMAGE_FETCH_TIMEOUT_MS)});if(!_0x2442fd['ok'])throw new Error(_0x48ac3c(0xee)+_0x2442fd['status']);const _0x4ff3fc=_0x2442fd['headers'][_0x48ac3c(0xff)](_0xa0b04[_0x48ac3c(0xdb)]);if(_0x4ff3fc){const _0x2be476=Number(_0x4ff3fc);if(!Number[_0x48ac3c(0xec)](_0x2be476)&&_0xa0b04['XkVgy'](_0x2be476,MAX_IMAGE_SIZE_BYTES))throw new Error(_0x48ac3c(0x105)+MAX_IMAGE_SIZE_BYTES+_0x48ac3c(0xd8));}const _0x16a96c=await _0x2442fd['arrayBuffer']();if(_0xa0b04['XkVgy'](_0x16a96c[_0x48ac3c(0xd9)],MAX_IMAGE_SIZE_BYTES))throw new Error(_0x48ac3c(0x105)+MAX_IMAGE_SIZE_BYTES+'\x20bytes)');return{'data':Buffer['from'](_0x16a96c)[_0x48ac3c(0xe4)](_0xa0b04[_0x48ac3c(0xef)]),'mediaType':_0xa0b04['WDQnP'](inferMediaType,_0x2442fd[_0x48ac3c(0xe8)]['get'](_0xa0b04['pvFWU']),_0x1b0826)};}const _0x1051fd=await _0xa0b04['LNvyC'](stat,_0x1b0826);if(_0x1051fd[_0x48ac3c(0xe5)]>MAX_IMAGE_SIZE_BYTES)throw new Error(_0x48ac3c(0x105)+MAX_IMAGE_SIZE_BYTES+_0x48ac3c(0xd8));const _0x3b00e0=await readFile(_0x1b0826);return{'data':_0x3b00e0['toString']('base64'),'mediaType':_0xa0b04['WDQnP'](inferMediaType,null,_0x1b0826)};}function _0x37ad(_0x289303,_0x30d034){_0x289303=_0x289303-0xd4;const _0x276b4d=_0x276b();let _0x37ad4b=_0x276b4d[_0x289303];return _0x37ad4b;}async function convertImageBlockToBase64(_0x8fee71){const _0x579476=_0x37ad,_0x33b28e={'OdZlN':function(_0x1e64f1,_0x457ff6){return _0x1e64f1===_0x457ff6;}};if(_0x33b28e['OdZlN'](_0x8fee71['source']?.[_0x579476(0x10e)],'base64'))return{'updated':![],'block':_0x8fee71};if(_0x8fee71['data']&&_0x8fee71[_0x579476(0x106)])return{'updated':![],'block':_0x8fee71};const _0xfbd681=_0x8fee71[_0x579476(0xfa)]?.[_0x579476(0xe9)]??_0x8fee71[_0x579476(0xe9)];if(!_0xfbd681)return{'updated':![],'block':_0x8fee71};const _0x50d3cb=await readImageFromUrl(_0xfbd681);return{'updated':!![],'block':{..._0x8fee71,'source':{'type':_0x579476(0x107),'media_type':_0x50d3cb[_0x579476(0xd6)],'data':_0x50d3cb['data']},'url':undefined}};}async function convertToolOutputImagesToBase64(_0x2da7e1){const _0x5246ab=_0x37ad,_0x20f9dd={'MuMTp':function(_0x462f53,_0x3109db){return _0x462f53(_0x3109db);}};if(!_0x20f9dd['MuMTp'](isRecord,_0x2da7e1))return{'updated':![],'output':_0x2da7e1};const _0x4ff858=_0x2da7e1['content'];if(!Array['isArray'](_0x4ff858))return{'updated':![],'output':_0x2da7e1};let _0x379bda=![];const _0x3f553c=await Promise['all'](_0x4ff858[_0x5246ab(0x10d)](async _0x1febfa=>{const _0x54da09=_0x5246ab;if(!_0x20f9dd[_0x54da09(0xeb)](isImageBlock,_0x1febfa))return _0x1febfa;try{const _0x52b43c=await convertImageBlockToBase64(_0x1febfa);if(_0x52b43c[_0x54da09(0x108)])_0x379bda=!![];return _0x52b43c['block'];}catch{return _0x1febfa;}}));if(!_0x379bda)return{'updated':![],'output':_0x2da7e1};return{'updated':!![],'output':{..._0x2da7e1,'content':_0x3f553c}};}function sanitizeLoneSurrogates(_0x12f053){const _0x2d4b33=_0x37ad,_0x6dd16e={'WpxxN':function(_0x343e4c,_0x4e2439){return _0x343e4c<=_0x4e2439;},'blEui':function(_0x3c393e,_0x3847ec){return _0x3c393e+_0x3847ec;}};let _0x14a228=![],_0xfc1dc5='';for(let _0x21413a=0x0;_0x21413a<_0x12f053['length'];_0x21413a+=0x1){const _0x316996=_0x12f053[_0x2d4b33(0xfe)](_0x21413a);if(_0x316996>=0xd800&&_0x6dd16e[_0x2d4b33(0xdd)](_0x316996,0xdbff)){const _0x3899be=_0x12f053[_0x2d4b33(0xfe)](_0x21413a+0x1);if(_0x3899be>=0xdc00&&_0x3899be<=0xdfff){_0xfc1dc5+=_0x12f053[_0x21413a]+_0x12f053[_0x6dd16e['blEui'](_0x21413a,0x1)],_0x21413a+=0x1;continue;}_0x14a228=!![],_0xfc1dc5+='�';continue;}if(_0x316996>=0xdc00&&_0x316996<=0xdfff){_0x14a228=!![],_0xfc1dc5+='�';continue;}_0xfc1dc5+=_0x12f053[_0x21413a];}return _0x14a228?{'updated':_0x14a228,'value':_0xfc1dc5}:{'updated':_0x14a228,'value':_0x12f053};}function sanitizeLoneSurrogatesDeep(_0x461349){const _0x5e7e1a=_0x37ad,_0x1c200e={'nohmd':function(_0x2d9a8f,_0x11878a){return _0x2d9a8f(_0x11878a);},'ThMIx':function(_0x3ad08b,_0x1dffbc){return _0x3ad08b(_0x1dffbc);}};if(typeof _0x461349==='string')return sanitizeLoneSurrogates(_0x461349);if(Array['isArray'](_0x461349)){let _0x222639=![];const _0x29ccbd=_0x461349[_0x5e7e1a(0x10d)](_0x57e041=>{const _0x22e2b7=_0x5e7e1a,_0x277d9d=_0x1c200e[_0x22e2b7(0xfd)](sanitizeLoneSurrogatesDeep,_0x57e041);return _0x277d9d[_0x22e2b7(0x108)]&&(_0x222639=!![]),_0x277d9d['value'];});return _0x222639?{'updated':!![],'value':_0x29ccbd}:{'updated':![],'value':_0x461349};}if(!_0x1c200e[_0x5e7e1a(0xfd)](isRecord,_0x461349))return{'updated':![],'value':_0x461349};let _0x40d721=![];const _0x52bae0=Object['entries'](_0x461349)[_0x5e7e1a(0x10d)](([_0x18700e,_0xf52e2d])=>{const _0x469c16=_0x5e7e1a,_0x198c66=_0x1c200e['ThMIx'](sanitizeLoneSurrogatesDeep,_0xf52e2d);return _0x198c66['updated']&&(_0x40d721=!![]),[_0x18700e,_0x198c66[_0x469c16(0x102)]];});return _0x40d721?{'updated':!![],'value':Object['fromEntries'](_0x52bae0)}:{'updated':![],'value':_0x461349};}export function createMcpImageBase64Hook(){return async _0x5a12ad=>{const _0xf93c7c=_0x37ad;if(_0x5a12ad['hook_event_name']!==_0xf93c7c(0xed))return{};const _0x465085=_0x5a12ad,_0x4f2796=await convertToolOutputImagesToBase64(_0x465085[_0xf93c7c(0xe3)]),_0x2b4718=sanitizeLoneSurrogatesDeep(_0x4f2796['output']),_0x1f2043=_0x4f2796['updated']||_0x2b4718['updated'];if(!_0x1f2043)return{};return{'hookSpecificOutput':{'hookEventName':_0xf93c7c(0xed),'updatedMCPToolOutput':_0x2b4718['value']}};};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x14d5e5=_0x2b56;(function(_0x207ba6,_0x44529d){const _0x26966f=_0x2b56,_0x5cfd7a=_0x207ba6();while(!![]){try{const _0x3d56bc=parseInt(_0x26966f(0x77))/0x1*(-parseInt(_0x26966f(0x7b))/0x2)+-parseInt(_0x26966f(0x7e))/0x3+parseInt(_0x26966f(0x7a))/0x4+parseInt(_0x26966f(0x80))/0x5+parseInt(_0x26966f(0x7f))/0x6*(-parseInt(_0x26966f(0x7c))/0x7)+-parseInt(_0x26966f(0x79))/0x8+parseInt(_0x26966f(0x82))/0x9*(parseInt(_0x26966f(0x7d))/0xa);if(_0x3d56bc===_0x44529d)break;else _0x5cfd7a['push'](_0x5cfd7a['shift']());}catch(_0x45b231){_0x5cfd7a['push'](_0x5cfd7a['shift']());}}}(_0x200a,0xa8ae5));function _0x2b56(_0x25f2e9,_0x1828ac){_0x25f2e9=_0x25f2e9-0x77;const _0x200a49=_0x200a();let _0x2b5617=_0x200a49[_0x25f2e9];return _0x2b5617;}const VERIFY_MODEL_ALIASES={'opus':_0x14d5e5(0x78),'sonnet':_0x14d5e5(0x83)};export const DEFAULT_VERIFY_MODEL=_0x14d5e5(0x83);export function resolveVerifyModel(_0x53963a){const _0x11d883=_0x14d5e5,_0x28f8b7={'Aejmg':function(_0xd8ffbb,_0xac610a){return _0xd8ffbb??_0xac610a;}};if(!_0x53963a)return undefined;const _0xec7ee4=_0x53963a['trim']();if(!_0xec7ee4)return undefined;const _0x2c1337=VERIFY_MODEL_ALIASES[_0xec7ee4[_0x11d883(0x81)]()];return _0x28f8b7['Aejmg'](_0x2c1337,_0xec7ee4);}function _0x200a(){const _0x599f97=['claude-opus-4-6','7772064fcJqoP','736132dKwsQO','10rGGJLa','59773ArGxww','4318830QqCsYx','2002410aPcPBs','354odTXVw','2220525gVxBjU','toLowerCase','54AxjzLj','claude-sonnet-4-6','77148bMPuPg'];_0x200a=function(){return _0x599f97;};return _0x200a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x450cbd,_0x47eb37){var _0x5ca63a=_0x127f,_0x5dcc9f=_0x450cbd();while(!![]){try{var _0x3cc49f=parseInt(_0x5ca63a(0x1af))/0x1+-parseInt(_0x5ca63a(0x1b2))/0x2*(parseInt(_0x5ca63a(0x1b3))/0x3)+-parseInt(_0x5ca63a(0x1b5))/0x4*(parseInt(_0x5ca63a(0x1ae))/0x5)+parseInt(_0x5ca63a(0x1b9))/0x6*(-parseInt(_0x5ca63a(0x1b1))/0x7)+-parseInt(_0x5ca63a(0x1bf))/0x8*(parseInt(_0x5ca63a(0x1be))/0x9)+-parseInt(_0x5ca63a(0x1bd))/0xa+parseInt(_0x5ca63a(0x1c0))/0xb*(parseInt(_0x5ca63a(0x1bc))/0xc);if(_0x3cc49f===_0x47eb37)break;else _0x5dcc9f['push'](_0x5dcc9f['shift']());}catch(_0x562986){_0x5dcc9f['push'](_0x5dcc9f['shift']());}}}(_0x324a,0x4a8ed));import{homedir}from'os';import{join}from'path';import{getProjectRoot}from'./claudeConfig.js';function _0x127f(_0x170ba0,_0xcc649){_0x170ba0=_0x170ba0-0x1ae;var _0x324a82=_0x324a();var _0x127ff3=_0x324a82[_0x170ba0];return _0x127ff3;}export function getOpencodeConfigDir(_0x42b8eb){var _0xea44ba=_0x127f,_0x2242e4={'hnBbe':function(_0x5da56f,_0x5ae6d7){return _0x5da56f===_0x5ae6d7;},'mZTYO':'user','zVKIV':'opencode','dmUiY':function(_0x54d119,_0x98a8c5,_0x28552a,_0x4484df){return _0x54d119(_0x98a8c5,_0x28552a,_0x4484df);},'rLurP':function(_0x54ff27){return _0x54ff27();}};if(process[_0xea44ba(0x1b7)]['OPENCODE_CONFIG_DIR'])return process[_0xea44ba(0x1b7)][_0xea44ba(0x1b0)];if(_0x2242e4[_0xea44ba(0x1ba)](_0x42b8eb,_0x2242e4[_0xea44ba(0x1b8)])){if(process[_0xea44ba(0x1b7)][_0xea44ba(0x1b4)])return join(process['env'][_0xea44ba(0x1b4)],_0x2242e4['zVKIV']);return _0x2242e4['dmUiY'](join,_0x2242e4[_0xea44ba(0x1c1)](homedir),_0xea44ba(0x1bb),_0x2242e4['zVKIV']);}return join(_0x2242e4[_0xea44ba(0x1c1)](getProjectRoot),'.opencode');}function _0x324a(){var _0x5b56e3=['mZTYO','6aGCUCe','hnBbe','.config','32532PKiwLZ','4348960GOLgSw','1773cwwobc','17456wuWrbo','6589BHcxHW','rLurP','150505vSCWqO','75116LajaxI','OPENCODE_CONFIG_DIR','879347PmmMxm','4LgYCIO','559716nDNeSJ','XDG_CONFIG_HOME','4jueETH','xUMpU','env'];_0x324a=function(){return _0x5b56e3;};return _0x324a();}export function getOpencodeSkillsDir(_0x45043f){var _0x598c57=_0x127f,_0x17fa0={'xUMpU':'skills'};return join(getOpencodeConfigDir(_0x45043f),_0x17fa0[_0x598c57(0x1b6)]);}
|