@ranger-testing/ranger-cli 2.5.4-alpha.1d983c3-19 → 2.5.4-alpha.2709b75-22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -0
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/package.json +1 -1
@@ -1 +1 @@
1
- const _0x55fdc5=_0xd17b;function _0xd17b(_0x1a867f,_0x29f554){_0x1a867f=_0x1a867f-0xc6;const _0x97478d=_0x9747();let _0xd17bdd=_0x97478d[_0x1a867f];return _0xd17bdd;}(function(_0x589f49,_0x308b92){const _0x11e6a6=_0xd17b,_0x4a7eee=_0x589f49();while(!![]){try{const _0x3c6359=parseInt(_0x11e6a6(0xd9))/0x1+-parseInt(_0x11e6a6(0xe5))/0x2+parseInt(_0x11e6a6(0xec))/0x3+parseInt(_0x11e6a6(0xc8))/0x4*(-parseInt(_0x11e6a6(0xf2))/0x5)+-parseInt(_0x11e6a6(0xeb))/0x6*(parseInt(_0x11e6a6(0xf7))/0x7)+parseInt(_0x11e6a6(0xcc))/0x8*(parseInt(_0x11e6a6(0xcb))/0x9)+-parseInt(_0x11e6a6(0xca))/0xa*(-parseInt(_0x11e6a6(0xd5))/0xb);if(_0x3c6359===_0x308b92)break;else _0x4a7eee['push'](_0x4a7eee['shift']());}catch(_0x47fd16){_0x4a7eee['push'](_0x4a7eee['shift']());}}}(_0x9747,0x90179));import{createHash}from'crypto';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';export function isInteractive(_0x51baf9=process['env'],_0x1ac128={'stdin':process[_0x55fdc5(0xce)],'stdout':process[_0x55fdc5(0xe1)]}){const _0x2b4124=_0x55fdc5,_0x172f5f={'HCYCM':function(_0x207ca8,_0x17a227){return _0x207ca8(_0x17a227);}};if(_0x51baf9['CI'])return![];return _0x172f5f['HCYCM'](Boolean,_0x1ac128[_0x2b4124(0xce)][_0x2b4124(0xde)])&&Boolean(_0x1ac128['stdout'][_0x2b4124(0xde)]);}export const DEFAULT_INVALIDATE_ON=[];export function sessionCacheHash(_0x39bf35){const _0x2a21d5=_0x55fdc5,_0x4f6d66={'yNNUY':'port','QTwGH':function(_0xa925c7,_0x3bb826){return _0xa925c7(_0x3bb826);},'DIqmw':_0x2a21d5(0xd1),'ReVSC':function(_0x4e3adc,_0x55cbef){return _0x4e3adc!==_0x55cbef;},'SmnTW':'clientIp','ImJtD':_0x2a21d5(0xe2)},_0x1c5628=new Set(_0x39bf35[_0x2a21d5(0xf4)]??DEFAULT_INVALIDATE_ON),_0x4d2897={'orgId':_0x39bf35['orgId'],'profileName':_0x39bf35[_0x2a21d5(0xc9)]};return _0x1c5628['has']('baseUrl')&&(_0x4d2897['effectiveBaseUrl']=_0x39bf35[_0x2a21d5(0xd0)]),_0x1c5628['has'](_0x2a21d5(0xc7))&&(_0x4d2897[_0x2a21d5(0xc7)]=_0x39bf35[_0x2a21d5(0xc7)]?sortObjectKeys(_0x39bf35['setupHeaders']):_0x39bf35['setupHeaders']),_0x1c5628[_0x2a21d5(0xf0)](_0x4f6d66['yNNUY'])&&(_0x4d2897['port']=_0x4f6d66['QTwGH'](extractPort,_0x39bf35['effectiveBaseUrl'])),_0x1c5628[_0x2a21d5(0xf0)](_0x4f6d66[_0x2a21d5(0xd3)])&&_0x4f6d66['ReVSC'](_0x39bf35[_0x2a21d5(0xd1)],undefined)&&(_0x4d2897['userAgent']=_0x39bf35[_0x2a21d5(0xd1)]),_0x1c5628['has'](_0x4f6d66[_0x2a21d5(0xd7)])&&_0x4f6d66[_0x2a21d5(0xe3)](_0x39bf35['clientIp'],undefined)&&(_0x4d2897[_0x2a21d5(0xf5)]=_0x39bf35[_0x2a21d5(0xf5)]),createHash(_0x4f6d66[_0x2a21d5(0xd8)])[_0x2a21d5(0xc6)](JSON[_0x2a21d5(0xe7)](_0x4d2897))['digest'](_0x2a21d5(0xdf))[_0x2a21d5(0xf1)](0x0,0xc);}function extractPort(_0x2a2f70){try{return new URL(_0x2a2f70)['port'];}catch{return'';}}function sortObjectKeys(_0xdfeaea){const _0x55383c=_0x55fdc5,_0x5e003c={};for(const _0x1e5163 of Object['keys'](_0xdfeaea)[_0x55383c(0xed)]()){_0x5e003c[_0x1e5163]=_0xdfeaea[_0x1e5163];}return _0x5e003c;}export function getSessionCachePath(_0x2240b0,_0x24a1b3){const _0x16e2fe=_0x55fdc5,_0xe5bbc={'XbhHs':'auth'};return join(getRangerHomeDir(),_0xe5bbc['XbhHs'],_0x2240b0+'-'+_0x24a1b3+_0x16e2fe(0xd6));}export function getStorageStatePath(_0x3085c6){const _0x8954c6=_0x55fdc5;return _0x3085c6[_0x8954c6(0xdb)](/\.json$/,'.storageState.json');}export function needsTunnel(_0x4c4f90){const _0x437302=_0x55fdc5,_0xb6eeb={'EXguJ':'127.0.0.1','dAxwj':'.localhost','PTfin':'localhost.'};let _0x55a842;try{_0x55a842=new URL(_0x4c4f90)['hostname'];}catch{return![];}if(_0x55a842==='localhost'||_0x55a842===_0xb6eeb[_0x437302(0xf3)])return!![];if(_0x55a842['endsWith'](_0xb6eeb['dAxwj']))return!![];if(_0x55a842[_0x437302(0xe4)](_0xb6eeb[_0x437302(0xe0)]))return!![];return![];}export function hostnameOf(_0x35b23f){const _0x360b82=_0x55fdc5;return new URL(_0x35b23f)[_0x360b82(0xcf)];}function _0x9747(){const _0x1e4a55=['update','setupHeaders','4SWaYFZ','profileName','4240520SZGtAE','18yiGdXC','3372136WwEEPi','test','stdin','hostname','effectiveBaseUrl','userAgent','goto','DIqmw','push','11eobSsm','.json','SmnTW','ImJtD','869583HJXaKf','toString','replace','domain','ZQMVF','isTTY','hex','PTfin','stdout','sha256','ReVSC','includes','486828nszhva','length','stringify','close','catch','url','24mLbXiH','1322445jzmXvD','sort','domcontentloaded','launchBrowser','has','slice','3005445sOcIXb','EXguJ','invalidateOn','clientIp','defaultEnvironmentKey','1999865ctEJHU'];_0x9747=function(){return _0x1e4a55;};return _0x9747();}export function duplicateCookiesForDomains(_0x477884,_0x1fe92d){const _0x4bcaed=_0x55fdc5,_0xd26810=[..._0x477884],_0x3d4d78=new Set(_0x477884['map'](_0x3552ac=>_0x3552ac[_0x4bcaed(0xdc)]));for(const _0x1d549d of _0x1fe92d){let _0x3d3c49;try{_0x3d3c49=hostnameOf(_0x1d549d);}catch{continue;}if(!_0x3d3c49)continue;const _0x30466a=_0x3d3c49['startsWith']('.')?_0x3d3c49:'.'+_0x3d3c49;if(_0x3d4d78[_0x4bcaed(0xf0)](_0x3d3c49)||_0x3d4d78[_0x4bcaed(0xf0)](_0x30466a))continue;for(const _0x4f80a6 of _0x477884){_0xd26810[_0x4bcaed(0xd4)]({..._0x4f80a6,'domain':_0x30466a});}_0x3d4d78['add'](_0x30466a);}return _0xd26810;}export function resolveAuthEnvironmentLocally(_0x5bfaeb,_0x23992a){const _0x38dc49=_0x55fdc5,_0x18c2eb={'rWloL':function(_0x4d5611,_0x46c706){return _0x4d5611===_0x46c706;}},_0x741073=_0x5bfaeb['environments'];if(_0x23992a){const _0x3aef87=_0x741073[_0x23992a];if(!_0x3aef87)return null;return{'key':_0x23992a,..._0x3aef87};}if(_0x5bfaeb['defaultEnvironmentKey']){const _0x532f3d=_0x741073[_0x5bfaeb[_0x38dc49(0xf6)]];if(!_0x532f3d)return null;return{'key':_0x5bfaeb[_0x38dc49(0xf6)],..._0x532f3d};}const _0x2c129a=Object['keys'](_0x741073);if(_0x18c2eb['rWloL'](_0x2c129a[_0x38dc49(0xe6)],0x1)){const _0x6b887d=_0x2c129a[0x0];return{'key':_0x6b887d,..._0x741073[_0x6b887d]};}return null;}const LOGIN_URL_PATTERN=/(?:^|\/)(login|signin|sign-in|sso|auth\/login)(?:[/?#]|$)/i;export function buildSessionCheckUrl(_0xfe5f81,_0x4fb3fc){const _0x5cc099=_0x55fdc5;try{if(_0x4fb3fc)return new URL(_0x4fb3fc,_0xfe5f81)[_0x5cc099(0xda)]();return new URL(_0xfe5f81)[_0x5cc099(0xda)]();}catch{return null;}}export function looksLikeLoginUrl(_0x800fe1){const _0x131418=_0x55fdc5;try{const _0x5a343b=new URL(_0x800fe1);return LOGIN_URL_PATTERN[_0x131418(0xcd)](_0x5a343b['pathname']);}catch{return LOGIN_URL_PATTERN[_0x131418(0xcd)](_0x800fe1);}}export async function isCachedSessionLive(_0x34b22d,_0x1727bd,_0x16af49={},_0x5b3ff4={}){const _0x2607e8=_0x55fdc5,_0x116e25={'ZQMVF':function(_0x523715,_0x261c46,_0x31dd45){return _0x523715(_0x261c46,_0x31dd45);},'jIAWO':function(_0x480b7a,_0x36b04b){return _0x480b7a===_0x36b04b;}},_0x57b9b4=_0x116e25[_0x2607e8(0xdd)](buildSessionCheckUrl,_0x1727bd,_0x16af49['sessionCheckPath']);if(!_0x57b9b4)return!![];if(!_0x5b3ff4[_0x2607e8(0xef)])return!![];let _0xa3c384=null;try{_0xa3c384=await _0x5b3ff4['launchBrowser']();const _0xdd349c=await _0xa3c384['newContext']({'storageState':_0x34b22d,'ignoreHTTPSErrors':!![],..._0x16af49['setupHeaders']?{'extraHTTPHeaders':_0x16af49['setupHeaders']}:{}}),_0x154958=await _0xdd349c['newPage'](),_0xdf36c8=await _0x154958[_0x2607e8(0xd2)](_0x57b9b4,{'waitUntil':_0x2607e8(0xee),'timeout':0x3a98}),_0x4c474e=_0xdf36c8?.['status']();if(_0x4c474e===0x191||_0x116e25['jIAWO'](_0x4c474e,0x193))return![];const _0x90fcc3=_0x154958[_0x2607e8(0xea)]();if(looksLikeLoginUrl(_0x90fcc3))return![];return!![];}catch{return![];}finally{if(_0xa3c384)await _0xa3c384[_0x2607e8(0xe8)]()[_0x2607e8(0xe9)](()=>{});}}
1
+ const _0x1ee99e=_0x48ec;(function(_0x12ca5c,_0x521e2d){const _0x325a60=_0x48ec,_0x183452=_0x12ca5c();while(!![]){try{const _0x1d51bf=parseInt(_0x325a60(0xb5))/0x1+-parseInt(_0x325a60(0xaf))/0x2*(parseInt(_0x325a60(0xc3))/0x3)+parseInt(_0x325a60(0xc2))/0x4*(-parseInt(_0x325a60(0xa1))/0x5)+-parseInt(_0x325a60(0xa6))/0x6*(-parseInt(_0x325a60(0xba))/0x7)+-parseInt(_0x325a60(0xbb))/0x8+parseInt(_0x325a60(0xc7))/0x9+-parseInt(_0x325a60(0xab))/0xa;if(_0x1d51bf===_0x521e2d)break;else _0x183452['push'](_0x183452['shift']());}catch(_0x5efb85){_0x183452['push'](_0x183452['shift']());}}}(_0x333d,0x4157b));import{createHash}from'crypto';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';export function isInteractive(_0x1eab93=process[_0x1ee99e(0xc9)],_0xc1c986={'stdin':process[_0x1ee99e(0xb8)],'stdout':process['stdout']}){const _0x1896c7=_0x1ee99e,_0x16190d={'WYCjt':function(_0x4c5b2c,_0x547c45){return _0x4c5b2c(_0x547c45);}};if(_0x1eab93['CI'])return![];return Boolean(_0xc1c986['stdin'][_0x1896c7(0xbc)])&&_0x16190d['WYCjt'](Boolean,_0xc1c986[_0x1896c7(0xac)][_0x1896c7(0xbc)]);}export const DEFAULT_INVALIDATE_ON=[];function _0x333d(){const _0x178c23=['url','6KyexXs','replace','toString','sha256','profileName','2506650czUBoz','stdout','domcontentloaded','stringify','14CZMapL','.json','oTQBs','EYIHF','.localhost','digest','514661sDrHzk','Ajnsh','goto','stdin','defaultEnvironmentKey','2371761nRnsuV','2939448AYTZjm','isTTY','orgId','setupHeaders','localhost.','hex','environments','4bAWzOA','61878oZZOIH','pathname','hostname','domain','2652840nWynpq','newContext','env','port','127.0.0.1','close','zuoPc','userAgent','clientIp','has','length','catch','launchBrowser','status','TkwER','sort','590615NgxnpY','tkrAI','baseUrl','keys'];_0x333d=function(){return _0x178c23;};return _0x333d();}export function sessionCacheHash(_0x4a56bd){const _0x3eeb03=_0x1ee99e,_0x2a2978={'qaVgA':_0x3eeb03(0xca),'rVaha':'userAgent','TkwER':function(_0x589f22,_0x1e5d0f){return _0x589f22!==_0x1e5d0f;},'tkrAI':'clientIp','EYIHF':_0x3eeb03(0xa9)},_0x41fe38=new Set(_0x4a56bd['invalidateOn']??DEFAULT_INVALIDATE_ON),_0x136582={'orgId':_0x4a56bd[_0x3eeb03(0xbd)],'profileName':_0x4a56bd[_0x3eeb03(0xaa)]};return _0x41fe38[_0x3eeb03(0xd0)](_0x3eeb03(0xa3))&&(_0x136582['effectiveBaseUrl']=_0x4a56bd['effectiveBaseUrl']),_0x41fe38[_0x3eeb03(0xd0)]('setupHeaders')&&(_0x136582['setupHeaders']=_0x4a56bd['setupHeaders']?sortObjectKeys(_0x4a56bd[_0x3eeb03(0xbe)]):_0x4a56bd['setupHeaders']),_0x41fe38['has'](_0x2a2978['qaVgA'])&&(_0x136582['port']=extractPort(_0x4a56bd['effectiveBaseUrl'])),_0x41fe38['has'](_0x2a2978['rVaha'])&&_0x2a2978[_0x3eeb03(0x9f)](_0x4a56bd[_0x3eeb03(0xce)],undefined)&&(_0x136582[_0x3eeb03(0xce)]=_0x4a56bd[_0x3eeb03(0xce)]),_0x41fe38['has'](_0x2a2978[_0x3eeb03(0xa2)])&&_0x4a56bd[_0x3eeb03(0xcf)]!==undefined&&(_0x136582['clientIp']=_0x4a56bd['clientIp']),createHash(_0x2a2978[_0x3eeb03(0xb2)])['update'](JSON[_0x3eeb03(0xae)](_0x136582))[_0x3eeb03(0xb4)](_0x3eeb03(0xc0))['slice'](0x0,0xc);}function extractPort(_0x1c94f3){const _0x5686bb=_0x1ee99e;try{return new URL(_0x1c94f3)[_0x5686bb(0xca)];}catch{return'';}}function sortObjectKeys(_0x586f66){const _0x3747bd=_0x1ee99e,_0x40fe01={};for(const _0x3ab3a5 of Object[_0x3747bd(0xa4)](_0x586f66)[_0x3747bd(0xa0)]()){_0x40fe01[_0x3ab3a5]=_0x586f66[_0x3ab3a5];}return _0x40fe01;}export function getSessionCachePath(_0x4b0921,_0x290274){const _0x12bfa7=_0x1ee99e,_0x20a940={'zuoPc':function(_0x3cf336){return _0x3cf336();}};return join(_0x20a940[_0x12bfa7(0xcd)](getRangerHomeDir),'auth',_0x4b0921+'-'+_0x290274+_0x12bfa7(0xb0));}export function getStorageStatePath(_0x4d470c){const _0x31d0a4=_0x1ee99e;return _0x4d470c[_0x31d0a4(0xa7)](/\.json$/,'.storageState.json');}export function needsTunnel(_0x4dce00){const _0x356067=_0x1ee99e,_0xfc6c8b={'hdgyz':'localhost','VeBzX':_0x356067(0xb3),'Ajnsh':_0x356067(0xbf)};let _0x2b1d9e;try{_0x2b1d9e=new URL(_0x4dce00)['hostname'];}catch{return![];}if(_0x2b1d9e===_0xfc6c8b['hdgyz']||_0x2b1d9e===_0x356067(0xcb))return!![];if(_0x2b1d9e['endsWith'](_0xfc6c8b['VeBzX']))return!![];if(_0x2b1d9e['includes'](_0xfc6c8b[_0x356067(0xb6)]))return!![];return![];}export function hostnameOf(_0x1da2c3){const _0x276bfb=_0x1ee99e;return new URL(_0x1da2c3)[_0x276bfb(0xc5)];}export function duplicateCookiesForDomains(_0x472e78,_0x4595d5){const _0xa84d18=_0x1ee99e,_0x33475b=[..._0x472e78],_0x5eb12f=new Set(_0x472e78['map'](_0x45b5df=>_0x45b5df[_0xa84d18(0xc6)]));for(const _0x108358 of _0x4595d5){let _0x4facfc;try{_0x4facfc=hostnameOf(_0x108358);}catch{continue;}if(!_0x4facfc)continue;const _0x41131d=_0x4facfc['startsWith']('.')?_0x4facfc:'.'+_0x4facfc;if(_0x5eb12f[_0xa84d18(0xd0)](_0x4facfc)||_0x5eb12f['has'](_0x41131d))continue;for(const _0xce63a2 of _0x472e78){_0x33475b['push']({..._0xce63a2,'domain':_0x41131d});}_0x5eb12f['add'](_0x41131d);}return _0x33475b;}export function resolveAuthEnvironmentLocally(_0x296ed4,_0x486985){const _0x1f1aad=_0x1ee99e,_0x39de2e={'oTQBs':function(_0x5ef2b7,_0x239e9a){return _0x5ef2b7===_0x239e9a;}},_0x120779=_0x296ed4[_0x1f1aad(0xc1)];if(_0x486985){const _0x1088a7=_0x120779[_0x486985];if(!_0x1088a7)return null;return{'key':_0x486985,..._0x1088a7};}if(_0x296ed4[_0x1f1aad(0xb9)]){const _0x48e18a=_0x120779[_0x296ed4['defaultEnvironmentKey']];if(!_0x48e18a)return null;return{'key':_0x296ed4[_0x1f1aad(0xb9)],..._0x48e18a};}const _0x2bdfc6=Object['keys'](_0x120779);if(_0x39de2e[_0x1f1aad(0xb1)](_0x2bdfc6[_0x1f1aad(0xd1)],0x1)){const _0x5e308a=_0x2bdfc6[0x0];return{'key':_0x5e308a,..._0x120779[_0x5e308a]};}return null;}const LOGIN_URL_PATTERN=/(?:^|\/)(login|signin|sign-in|sso|auth\/login)(?:[/?#]|$)/i;function _0x48ec(_0x46febd,_0x538691){_0x46febd=_0x46febd-0x9c;const _0x333d93=_0x333d();let _0x48ecef=_0x333d93[_0x46febd];return _0x48ecef;}export function buildSessionCheckUrl(_0x5726b2,_0x39074b){const _0x32ec4c=_0x1ee99e;try{if(_0x39074b)return new URL(_0x39074b,_0x5726b2)[_0x32ec4c(0xa8)]();return new URL(_0x5726b2)[_0x32ec4c(0xa8)]();}catch{return null;}}export function looksLikeLoginUrl(_0x1cdc9d){const _0x143fc1=_0x1ee99e;try{const _0x3ac319=new URL(_0x1cdc9d);return LOGIN_URL_PATTERN['test'](_0x3ac319[_0x143fc1(0xc4)]);}catch{return LOGIN_URL_PATTERN['test'](_0x1cdc9d);}}export async function isCachedSessionLive(_0x535e32,_0x53e74d,_0x5d23a1={},_0x1a0359={}){const _0x3ea0bd=_0x1ee99e,_0x2300cf={'gNVeW':_0x3ea0bd(0xad),'CfFIQ':function(_0x51c3a2,_0x1271de){return _0x51c3a2===_0x1271de;},'HvrMm':function(_0x14cbad,_0x4d3bdd){return _0x14cbad(_0x4d3bdd);}},_0x2b56f7=buildSessionCheckUrl(_0x53e74d,_0x5d23a1['sessionCheckPath']);if(!_0x2b56f7)return!![];if(!_0x1a0359[_0x3ea0bd(0x9d)])return!![];let _0x48be0d=null;try{_0x48be0d=await _0x1a0359[_0x3ea0bd(0x9d)]();const _0x4643c7=await _0x48be0d[_0x3ea0bd(0xc8)]({'storageState':_0x535e32,'ignoreHTTPSErrors':!![],..._0x5d23a1[_0x3ea0bd(0xbe)]?{'extraHTTPHeaders':_0x5d23a1['setupHeaders']}:{}}),_0xab4d91=await _0x4643c7['newPage'](),_0x77f073=await _0xab4d91[_0x3ea0bd(0xb7)](_0x2b56f7,{'waitUntil':_0x2300cf['gNVeW'],'timeout':0x3a98}),_0x3be41b=_0x77f073?.[_0x3ea0bd(0x9e)]();if(_0x3be41b===0x191||_0x2300cf['CfFIQ'](_0x3be41b,0x193))return![];const _0x3d95c2=_0xab4d91[_0x3ea0bd(0xa5)]();if(_0x2300cf['HvrMm'](looksLikeLoginUrl,_0x3d95c2))return![];return!![];}catch{return![];}finally{if(_0x48be0d)await _0x48be0d[_0x3ea0bd(0xcc)]()[_0x3ea0bd(0x9c)](()=>{});}}
@@ -1 +1 @@
1
- (function(_0x326ea8,_0x394e8a){const _0x5ba167=_0x4391,_0x5310d7=_0x326ea8();while(!![]){try{const _0x1d194e=parseInt(_0x5ba167(0x12d))/0x1+parseInt(_0x5ba167(0x12c))/0x2*(-parseInt(_0x5ba167(0x125))/0x3)+parseInt(_0x5ba167(0x12f))/0x4+-parseInt(_0x5ba167(0x130))/0x5+parseInt(_0x5ba167(0x123))/0x6+-parseInt(_0x5ba167(0x126))/0x7+parseInt(_0x5ba167(0x122))/0x8*(-parseInt(_0x5ba167(0x131))/0x9);if(_0x1d194e===_0x394e8a)break;else _0x5310d7['push'](_0x5310d7['shift']());}catch(_0x528363){_0x5310d7['push'](_0x5310d7['shift']());}}}(_0x4b45,0x23749));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x4391(_0x420c53,_0x3b2681){_0x420c53=_0x420c53-0x122;const _0x4b452a=_0x4b45();let _0x439132=_0x4b452a[_0x420c53];return _0x439132;}export function deriveKey(_0x9d6664){const _0x53890b=_0x4391;return pbkdf2Sync(_0x9d6664,SALT,0x186a0,KEY_LENGTH,_0x53890b(0x128));}export function encrypt(_0x14b309,_0x174a0b){const _0x3cd826=_0x4391,_0x3f1028={'phxSy':function(_0x2a8ac4,_0x1bf0eb){return _0x2a8ac4(_0x1bf0eb);},'Voytv':function(_0x425e04,_0x1c8e1e){return _0x425e04(_0x1c8e1e);},'tCQnr':function(_0x3d5a19,_0x1294a1,_0x3b3bb4,_0x442787){return _0x3d5a19(_0x1294a1,_0x3b3bb4,_0x442787);}},_0x2738c2=_0x3f1028['phxSy'](deriveKey,_0x174a0b),_0x53f661=_0x3f1028['Voytv'](randomBytes,IV_LENGTH),_0x5bc14c=_0x3f1028[_0x3cd826(0x129)](createCipheriv,ALGORITHM,_0x2738c2,_0x53f661),_0x58dcd2=Buffer['concat']([_0x5bc14c['update'](_0x14b309,_0x3cd826(0x12b)),_0x5bc14c['final']()]),_0xa49f82=_0x5bc14c['getAuthTag']();return Buffer['concat']([_0x53f661,_0xa49f82,_0x58dcd2]);}function _0x4b45(){const _0x460d04=['50781vxznKS','295785FlkwKM','update','sha256','tCQnr','wAoON','utf8','2eIevvy','107403FPifTR','VEcZK','534896iSjUeo','779305yYYakF','297IZCjbU','9552KtNHUR','951258cnXdnc','subarray'];_0x4b45=function(){return _0x460d04;};return _0x4b45();}export function decrypt(_0x19617c,_0x3245d2){const _0xd128e4=_0x4391,_0x4a27f9={'VEcZK':function(_0x149891,_0x30bdb1){return _0x149891+_0x30bdb1;},'wAoON':'utf8'},_0x5ae40d=deriveKey(_0x3245d2),_0x4693d6=_0x19617c[_0xd128e4(0x124)](0x0,IV_LENGTH),_0x26d3dd=_0x19617c[_0xd128e4(0x124)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x147165=_0x19617c[_0xd128e4(0x124)](_0x4a27f9[_0xd128e4(0x12e)](IV_LENGTH,TAG_LENGTH)),_0x1c2904=createDecipheriv(ALGORITHM,_0x5ae40d,_0x4693d6);return _0x1c2904['setAuthTag'](_0x26d3dd),_0x4a27f9['VEcZK'](_0x1c2904[_0xd128e4(0x127)](_0x147165),_0x1c2904['final'](_0x4a27f9[_0xd128e4(0x12a)]));}
1
+ const _0x2ab61d=_0x5c7b;(function(_0x4915f3,_0x3aee87){const _0x1aa596=_0x5c7b,_0x215801=_0x4915f3();while(!![]){try{const _0x242cbf=-parseInt(_0x1aa596(0x1a8))/0x1*(-parseInt(_0x1aa596(0x195))/0x2)+-parseInt(_0x1aa596(0x1a3))/0x3+-parseInt(_0x1aa596(0x1a5))/0x4+parseInt(_0x1aa596(0x197))/0x5*(parseInt(_0x1aa596(0x198))/0x6)+-parseInt(_0x1aa596(0x194))/0x7*(parseInt(_0x1aa596(0x1a1))/0x8)+-parseInt(_0x1aa596(0x193))/0x9*(parseInt(_0x1aa596(0x1a4))/0xa)+-parseInt(_0x1aa596(0x196))/0xb*(-parseInt(_0x1aa596(0x19e))/0xc);if(_0x242cbf===_0x3aee87)break;else _0x215801['push'](_0x215801['shift']());}catch(_0x4f6cf1){_0x215801['push'](_0x215801['shift']());}}}(_0x3936,0x261ce));function _0x5c7b(_0x327745,_0x909414){_0x327745=_0x327745-0x193;const _0x393643=_0x3936();let _0x5c7b55=_0x393643[_0x327745];return _0x5c7b55;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x2ab61d(0x19d),SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x72c07e){const _0x1e5be8=_0x2ab61d,_0x467881={'uODyu':_0x1e5be8(0x1a2)};return pbkdf2Sync(_0x72c07e,SALT,0x186a0,KEY_LENGTH,_0x467881[_0x1e5be8(0x19f)]);}export function encrypt(_0x5e76c7,_0x7fe488){const _0x221277=_0x2ab61d,_0x49c857={'bivsW':function(_0x12b4fd,_0x2fe6bc){return _0x12b4fd(_0x2fe6bc);},'KKABB':function(_0xd21723,_0x366225,_0x4f7b5e,_0x2ba921){return _0xd21723(_0x366225,_0x4f7b5e,_0x2ba921);},'uuAJG':'utf8'},_0xe39fb0=_0x49c857[_0x221277(0x19a)](deriveKey,_0x7fe488),_0x5d8d5f=randomBytes(IV_LENGTH),_0x399302=_0x49c857['KKABB'](createCipheriv,ALGORITHM,_0xe39fb0,_0x5d8d5f),_0x322145=Buffer['concat']([_0x399302[_0x221277(0x199)](_0x5e76c7,_0x49c857['uuAJG']),_0x399302[_0x221277(0x19b)]()]),_0x55cc66=_0x399302['getAuthTag']();return Buffer['concat']([_0x5d8d5f,_0x55cc66,_0x322145]);}export function decrypt(_0x3ab7b1,_0x22584f){const _0x1c208c=_0x2ab61d,_0x377965={'DeJpe':function(_0x4dfbcd,_0xc82b77){return _0x4dfbcd(_0xc82b77);},'Bdxvw':function(_0x3e6c33,_0x20a69e){return _0x3e6c33+_0x20a69e;},'SDgif':function(_0x5b2e09,_0x3335c3,_0x49747b,_0x3b7ae9){return _0x5b2e09(_0x3335c3,_0x49747b,_0x3b7ae9);},'EReri':function(_0x4307f9,_0x5f39c4){return _0x4307f9+_0x5f39c4;},'qJXSg':'utf8'},_0x7d6d9d=_0x377965[_0x1c208c(0x1a7)](deriveKey,_0x22584f),_0x5c182c=_0x3ab7b1[_0x1c208c(0x19c)](0x0,IV_LENGTH),_0x5f22a5=_0x3ab7b1['subarray'](IV_LENGTH,_0x377965['Bdxvw'](IV_LENGTH,TAG_LENGTH)),_0x5785a0=_0x3ab7b1['subarray'](IV_LENGTH+TAG_LENGTH),_0x3e31bd=_0x377965['SDgif'](createDecipheriv,ALGORITHM,_0x7d6d9d,_0x5c182c);return _0x3e31bd[_0x1c208c(0x1a6)](_0x5f22a5),_0x377965[_0x1c208c(0x1a0)](_0x3e31bd['update'](_0x5785a0),_0x3e31bd['final'](_0x377965['qJXSg']));}function _0x3936(){const _0x373e97=['373200PGGyTu','18610ZHKVfA','371956NWFjal','setAuthTag','DeJpe','5BIwiAP','909yntgHT','7ftFgzr','114326fFiesd','440957CqeRqO','8665JjiLTL','894iPuLnU','update','bivsW','final','subarray','aes-256-gcm','24Vkobfb','uODyu','EReri','501968jPgrtp','sha256'];_0x3936=function(){return _0x373e97;};return _0x3936();}
@@ -1 +1 @@
1
- const _0xf84058=_0x57c0;(function(_0x2d1d37,_0xc116b3){const _0x75da7c=_0x57c0,_0x547c9e=_0x2d1d37();while(!![]){try{const _0x57ee0b=parseInt(_0x75da7c(0x99))/0x1*(parseInt(_0x75da7c(0x91))/0x2)+parseInt(_0x75da7c(0x90))/0x3+-parseInt(_0x75da7c(0x9f))/0x4+-parseInt(_0x75da7c(0x87))/0x5*(-parseInt(_0x75da7c(0xa5))/0x6)+parseInt(_0x75da7c(0x85))/0x7*(parseInt(_0x75da7c(0x9d))/0x8)+-parseInt(_0x75da7c(0x9b))/0x9+-parseInt(_0x75da7c(0x8a))/0xa;if(_0x57ee0b===_0xc116b3)break;else _0x547c9e['push'](_0x547c9e['shift']());}catch(_0x5948fc){_0x547c9e['push'](_0x547c9e['shift']());}}}(_0x57f1,0x297ea));import{getToken}from'./keychain.js';function _0x57f1(){const _0x5926b0=['--cookie','27792yIuymt','push','111248vqccqq','QgIjo','slice','ogEUg','metadata','KjVhW','679410cvTsYL','Unknown\x20argument','application/json','--authorization','--password','env','--header','Invalid\x20values','startsWith','KJmRw','some','includes','357GUjkEx','join','15uDYfPO','=[REDACTED]','errorType','3820900AMvwZW','--api-key','syntax_error','[desire-path]\x20Sending\x20log\x20to\x20','LXJHz','length','754323ENJdZs','130kaLxDr','--secret','/api/v1/mcp/desire-path-logs','RnWUW','toLowerCase','YWzoZ','POST','invalid_option_value','2223tdtWFn','NoBBX','2996559GDyBTT'];_0x57f1=function(){return _0x5926b0;};return _0x57f1();}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t',_0xf84058(0x92),_0xf84058(0x8b),'--apikey','--key',_0xf84058(0x7d),'--pass','--auth',_0xf84058(0xa8),_0xf84058(0x7f),_0xf84058(0x9c),'--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x2ef939){const _0x380158=_0xf84058;return TOKEN_PATTERNS[_0x380158(0x83)](_0x3f6a4a=>_0x3f6a4a['test'](_0x2ef939));}function _0x57c0(_0x4d0fbc,_0x2172d4){_0x4d0fbc=_0x4d0fbc-0x7d;const _0x57f1e0=_0x57f1();let _0x57c077=_0x57f1e0[_0x4d0fbc];return _0x57c077;}export function sanitizeArgs(_0x5146b1){const _0x2a2c74=_0xf84058,_0x10e1a7={'KjVhW':function(_0x100516,_0x1344fa){return _0x100516(_0x1344fa);},'kCHVV':'[REDACTED]'},_0x33c5ae=[];let _0x2dfd14=![];for(let _0x315e20=0x0;_0x315e20<_0x5146b1[_0x2a2c74(0x8f)];_0x315e20++){const _0x404d0e=_0x5146b1[_0x315e20];if(_0x2dfd14){_0x33c5ae[_0x2a2c74(0x9e)]('[REDACTED]'),_0x2dfd14=![];continue;}if(_0x404d0e['startsWith']('--')||_0x404d0e[_0x2a2c74(0x81)]('-')){const _0x93645c=_0x404d0e['indexOf']('=');if(_0x93645c!==-0x1){const _0x382440=_0x404d0e[_0x2a2c74(0xa1)](0x0,_0x93645c)[_0x2a2c74(0x95)]();if(SENSITIVE_FLAGS['has'](_0x382440)){_0x33c5ae['push'](_0x404d0e[_0x2a2c74(0xa1)](0x0,_0x93645c)+_0x2a2c74(0x88));continue;}}else{const _0x247588=_0x404d0e[_0x2a2c74(0x95)]();SENSITIVE_FLAGS['has'](_0x247588)&&(_0x2dfd14=!![]);}_0x33c5ae[_0x2a2c74(0x9e)](_0x404d0e);}else _0x10e1a7[_0x2a2c74(0xa4)](looksLikeToken,_0x404d0e)?_0x33c5ae[_0x2a2c74(0x9e)](_0x10e1a7['kCHVV']):_0x33c5ae[_0x2a2c74(0x9e)](_0x404d0e);}return _0x33c5ae[_0x2a2c74(0x86)]('\x20');}export async function logDesirePath(_0x182eb5){const _0x39bcdc=_0xf84058,_0x1b8394={'LXJHz':function(_0x3bb8f5){return _0x3bb8f5();},'qXxxr':'has_token','ogEUg':_0x39bcdc(0xa7),'QgIjo':function(_0x2a2c47,_0x5c9def,_0x26b766){return _0x2a2c47(_0x5c9def,_0x26b766);},'gdvuA':_0x39bcdc(0x97)};try{const _0x5dfc02=await getToken()['catch'](()=>null),_0x1c87b9=_0x1b8394[_0x39bcdc(0x8e)](getApiBaseUrl),_0x28ccb4=getCurrentVersion(),_0x5c96f8=_0x5dfc02?_0x1b8394['qXxxr']:'no_token',_0x78c154={..._0x182eb5[_0x39bcdc(0xa3)],'authStatus':_0x5c96f8,'isTty':process['stdout']['isTTY']??![]},_0x593459={'Content-Type':_0x1b8394[_0x39bcdc(0xa2)]};_0x5dfc02&&(_0x593459['Authorization']='Bearer\x20'+_0x5dfc02);const _0x47d976={'rawCommand':_0x182eb5['rawCommand'],'errorMessage':_0x182eb5['errorMessage'],'errorType':_0x182eb5[_0x39bcdc(0x89)],'featureId':_0x182eb5['featureId'],'sessionId':_0x182eb5['sessionId'],'metadata':_0x78c154,'cliVersion':_0x28ccb4};process[_0x39bcdc(0x7e)]['DEBUG']&&(console['error'](_0x39bcdc(0x8d)+_0x1c87b9+'/api/v1/mcp/desire-path-logs'),console['error']('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x47d976,null,0x2))),await _0x1b8394[_0x39bcdc(0xa0)](fetch,_0x1c87b9+_0x39bcdc(0x93),{'method':_0x1b8394['gdvuA'],'headers':_0x593459,'body':JSON['stringify'](_0x47d976)});}catch(_0x22fabc){process[_0x39bcdc(0x7e)]['DEBUG']&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x22fabc);}}export function getErrorType(_0x2f662a,_0xf2b18){const _0x1ae1a6=_0xf84058,_0x3ab666={'fHJif':'runtime_error','YWzoZ':'Unknown\x20command','KJmRw':_0x1ae1a6(0xa6),'NoBBX':_0x1ae1a6(0x98),'ONZlo':'missing_option','RnWUW':_0x1ae1a6(0x8c)};if(_0xf2b18)return _0x3ab666['fHJif'];if(!_0x2f662a)return'unknown';if(_0x2f662a[_0x1ae1a6(0x84)](_0x3ab666[_0x1ae1a6(0x96)]))return'unknown_command';if(_0x2f662a['includes'](_0x3ab666[_0x1ae1a6(0x82)]))return'unknown_argument';if(_0x2f662a['includes']('Not\x20enough\x20non-option\x20arguments'))return'missing_required_argument';if(_0x2f662a['includes'](_0x1ae1a6(0x80)))return _0x3ab666[_0x1ae1a6(0x9a)];if(_0x2f662a[_0x1ae1a6(0x84)]('Missing\x20required\x20argument'))return _0x3ab666['ONZlo'];return _0x3ab666[_0x1ae1a6(0x94)];}
1
+ const _0x53c7c4=_0x53cc;function _0x1309(){const _0x160978=['runtime_error','4|1|5|6|7|0|3|2','env','push','errorType','722344eaVlct','startsWith','length','--header','Bearer\x20','sessionId','includes','DEBUG','WGAvf','151204FAtHoa','has','missing_required_argument','errorMessage','591017cInTlf','Missing\x20required\x20argument','1841502hgQWcC','1360466ZYUttk','153ysDqQP','ImiQH','--secret','KBQwZ','[desire-path]\x20Payload:\x20','POST','892998KlyoSg','IuUlx','45xHhvOB','catch','iRMrU','featureId','application/json','Invalid\x20values','slice','428859EaDGVy','--authorization','hIARi','--token'];_0x1309=function(){return _0x160978;};return _0x1309();}(function(_0x51550e,_0x52a139){const _0xcd2366=_0x53cc,_0x5cfe20=_0x51550e();while(!![]){try{const _0x31464e=-parseInt(_0xcd2366(0x1b8))/0x1+-parseInt(_0xcd2366(0x1a8))/0x2+parseInt(_0xcd2366(0x1af))/0x3+parseInt(_0xcd2366(0x1a1))/0x4*(-parseInt(_0xcd2366(0x1b1))/0x5)+parseInt(_0xcd2366(0x1a7))/0x6+-parseInt(_0xcd2366(0x1a5))/0x7+parseInt(_0xcd2366(0x1c1))/0x8*(parseInt(_0xcd2366(0x1a9))/0x9);if(_0x31464e===_0x52a139)break;else _0x5cfe20['push'](_0x5cfe20['shift']());}catch(_0x49685c){_0x5cfe20['push'](_0x5cfe20['shift']());}}}(_0x1309,0x93e88));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x53cc(_0x16ab42,_0x1262a8){_0x16ab42=_0x16ab42-0x19a;const _0x13099e=_0x1309();let _0x53cc1a=_0x13099e[_0x16ab42];return _0x53cc1a;}const SENSITIVE_FLAGS=new Set([_0x53c7c4(0x1bb),'-t',_0x53c7c4(0x1ab),'--api-key','--apikey','--key','--password','--pass','--auth',_0x53c7c4(0x1b9),_0x53c7c4(0x19b),'--cookie','--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x5bfb9d){return TOKEN_PATTERNS['some'](_0x3bde8b=>_0x3bde8b['test'](_0x5bfb9d));}export function sanitizeArgs(_0x5c060a){const _0x182743=_0x53c7c4,_0x314d56={'ImiQH':'[REDACTED]','iRMrU':function(_0x5c268b,_0x2e4355){return _0x5c268b!==_0x2e4355;}},_0x2b1961=[];let _0x2c30e2=![];for(let _0x3a02f2=0x0;_0x3a02f2<_0x5c060a[_0x182743(0x19a)];_0x3a02f2++){const _0x35c796=_0x5c060a[_0x3a02f2];if(_0x2c30e2){_0x2b1961[_0x182743(0x1bf)](_0x314d56[_0x182743(0x1aa)]),_0x2c30e2=![];continue;}if(_0x35c796['startsWith']('--')||_0x35c796[_0x182743(0x1c2)]('-')){const _0x468a9f=_0x35c796['indexOf']('=');if(_0x314d56[_0x182743(0x1b3)](_0x468a9f,-0x1)){const _0x430fef=_0x35c796[_0x182743(0x1b7)](0x0,_0x468a9f)['toLowerCase']();if(SENSITIVE_FLAGS[_0x182743(0x1a2)](_0x430fef)){_0x2b1961[_0x182743(0x1bf)](_0x35c796['slice'](0x0,_0x468a9f)+'=[REDACTED]');continue;}}else{const _0x4adc2b=_0x35c796['toLowerCase']();SENSITIVE_FLAGS[_0x182743(0x1a2)](_0x4adc2b)&&(_0x2c30e2=!![]);}_0x2b1961[_0x182743(0x1bf)](_0x35c796);}else looksLikeToken(_0x35c796)?_0x2b1961[_0x182743(0x1bf)](_0x314d56['ImiQH']):_0x2b1961[_0x182743(0x1bf)](_0x35c796);}return _0x2b1961['join']('\x20');}export async function logDesirePath(_0x491555){const _0x5366fe=_0x53c7c4,_0x445519={'sSlgy':function(_0x24f039){return _0x24f039();},'KBQwZ':'no_token','hIARi':_0x5366fe(0x1b5)};try{const _0x226aa9=await _0x445519['sSlgy'](getToken)[_0x5366fe(0x1b2)](()=>null),_0x4f2813=getApiBaseUrl(),_0x4cfff9=_0x445519['sSlgy'](getCurrentVersion),_0x4085c5=_0x226aa9?'has_token':_0x445519[_0x5366fe(0x1ac)],_0x7de522={..._0x491555['metadata'],'authStatus':_0x4085c5,'isTty':process['stdout']['isTTY']??![]},_0x2a981b={'Content-Type':_0x445519[_0x5366fe(0x1ba)]};_0x226aa9&&(_0x2a981b['Authorization']=_0x5366fe(0x19c)+_0x226aa9);const _0x4c60cb={'rawCommand':_0x491555['rawCommand'],'errorMessage':_0x491555[_0x5366fe(0x1a4)],'errorType':_0x491555[_0x5366fe(0x1c0)],'featureId':_0x491555[_0x5366fe(0x1b4)],'sessionId':_0x491555[_0x5366fe(0x19d)],'metadata':_0x7de522,'cliVersion':_0x4cfff9};process['env'][_0x5366fe(0x19f)]&&(console['error']('[desire-path]\x20Sending\x20log\x20to\x20'+_0x4f2813+'/api/v1/mcp/desire-path-logs'),console['error'](_0x5366fe(0x1ad)+JSON['stringify'](_0x4c60cb,null,0x2))),await fetch(_0x4f2813+'/api/v1/mcp/desire-path-logs',{'method':_0x5366fe(0x1ae),'headers':_0x2a981b,'body':JSON['stringify'](_0x4c60cb)});}catch(_0xf0e70b){process[_0x5366fe(0x1be)][_0x5366fe(0x19f)]&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0xf0e70b);}}export function getErrorType(_0x130b81,_0x2ac08e){const _0x14105f=_0x53c7c4,_0x32aae4={'WGAvf':'invalid_option_value','IuUlx':_0x14105f(0x1a6),'XAqGO':'Unknown\x20command','WLXrC':'unknown_command'},_0x1572a4=_0x14105f(0x1bd)['split']('|');let _0x8c0a9d=0x0;while(!![]){switch(_0x1572a4[_0x8c0a9d++]){case'0':if(_0x130b81['includes'](_0x14105f(0x1b6)))return _0x32aae4[_0x14105f(0x1a0)];continue;case'1':if(!_0x130b81)return'unknown';continue;case'2':return'syntax_error';case'3':if(_0x130b81['includes'](_0x32aae4[_0x14105f(0x1b0)]))return'missing_option';continue;case'4':if(_0x2ac08e)return _0x14105f(0x1bc);continue;case'5':if(_0x130b81['includes'](_0x32aae4['XAqGO']))return _0x32aae4['WLXrC'];continue;case'6':if(_0x130b81[_0x14105f(0x19e)]('Unknown\x20argument'))return'unknown_argument';continue;case'7':if(_0x130b81[_0x14105f(0x19e)]('Not\x20enough\x20non-option\x20arguments'))return _0x14105f(0x1a3);continue;}break;}}
@@ -1 +1 @@
1
- (function(_0x2db3ba,_0x482fbe){const _0x57dc55=_0x4199,_0x1771a1=_0x2db3ba();while(!![]){try{const _0xcbbc76=-parseInt(_0x57dc55(0x21d))/0x1*(parseInt(_0x57dc55(0x1dd))/0x2)+-parseInt(_0x57dc55(0x1d9))/0x3+parseInt(_0x57dc55(0x1f3))/0x4*(-parseInt(_0x57dc55(0x1ed))/0x5)+-parseInt(_0x57dc55(0x1f9))/0x6*(-parseInt(_0x57dc55(0x21c))/0x7)+-parseInt(_0x57dc55(0x203))/0x8*(parseInt(_0x57dc55(0x1e8))/0x9)+parseInt(_0x57dc55(0x212))/0xa*(-parseInt(_0x57dc55(0x1fc))/0xb)+parseInt(_0x57dc55(0x21e))/0xc;if(_0xcbbc76===_0x482fbe)break;else _0x1771a1['push'](_0x1771a1['shift']());}catch(_0x508b09){_0x1771a1['push'](_0x1771a1['shift']());}}}(_0x12f6,0x3ed92));import{spawn}from'child_process';import _0x580a78 from'inquirer';function _0x4199(_0x3dbe08,_0x2e7295){_0x3dbe08=_0x3dbe08-0x1d5;const _0x12f6db=_0x12f6();let _0x41996f=_0x12f6db[_0x3dbe08];return _0x41996f;}import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL='https://api.workos.com/user_management/authorize/device',WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';export async function requestDeviceCode(_0x460bc9){const _0x20b1f9=_0x4199,_0x2a75f8={'tLuhG':function(_0x57aafb,_0x4d3bed,_0x3d6faa){return _0x57aafb(_0x4d3bed,_0x3d6faa);},'QCgwp':_0x20b1f9(0x1ea)},_0x3c5370=await _0x2a75f8['tLuhG'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':_0x2a75f8[_0x20b1f9(0x1f5)],'headers':{'Content-Type':_0x20b1f9(0x1d7)},'body':new URLSearchParams({'client_id':_0x460bc9})});if(!_0x3c5370['ok']){const _0x7fbba1=await _0x3c5370['text']();throw new Error(_0x20b1f9(0x1eb)+_0x3c5370[_0x20b1f9(0x1d8)]+'\x20'+_0x7fbba1);}return _0x3c5370['json']();}export async function pollForTokens(_0x56ffb1,_0x195755,_0x150652,_0x34fbe0){const _0x4c9a62=_0x4199,_0x294b2c={'egbnI':function(_0xe96fcb,_0x3f52a5){return _0xe96fcb+_0x3f52a5;},'SaavV':function(_0x23dce1,_0x1c0d3d){return _0x23dce1<_0x1c0d3d;},'VSjeT':function(_0x5c37f4,_0x1f5987){return _0x5c37f4(_0x1f5987);},'gFvqX':function(_0x18dbeb,_0x344c07,_0x11cf2a){return _0x18dbeb(_0x344c07,_0x11cf2a);},'QeUGz':_0x4c9a62(0x1d7),'jlulR':function(_0x190457,_0x49276f){return _0x190457===_0x49276f;},'xAHxo':'authorization_pending','RuOgX':'slow_down','MEurB':'Authentication\x20failed'},_0x34f977=_0x294b2c[_0x4c9a62(0x224)](Date[_0x4c9a62(0x1e0)](),_0x34fbe0*0x3e8);let _0x56c96c=_0x150652*0x3e8;while(_0x294b2c[_0x4c9a62(0x1e5)](Date['now'](),_0x34f977)){await _0x294b2c['VSjeT'](sleep,_0x56c96c);const _0x1070c0=await _0x294b2c['gFvqX'](fetch,WORKOS_TOKEN_URL,{'method':_0x4c9a62(0x1ea),'headers':{'Content-Type':_0x294b2c[_0x4c9a62(0x225)]},'body':new URLSearchParams({'client_id':_0x56ffb1,'device_code':_0x195755,'grant_type':_0x4c9a62(0x1fa)})});if(_0x1070c0['ok'])return _0x1070c0['json']();const _0x2525f7=await _0x1070c0['json']();if(_0x294b2c['jlulR'](_0x2525f7['error'],_0x294b2c[_0x4c9a62(0x204)]))continue;if(_0x294b2c[_0x4c9a62(0x221)](_0x2525f7['error'],_0x294b2c[_0x4c9a62(0x1ec)])){_0x56c96c+=0x3e8;continue;}throw new Error(_0x2525f7[_0x4c9a62(0x222)]||_0x2525f7[_0x4c9a62(0x201)]||_0x294b2c[_0x4c9a62(0x226)]);}throw new Error(_0x4c9a62(0x1e9));}async function fetchUserProfile(_0x304a5a){const _0x4f1d9b=_0x4199,_0x40f00d={'AzEtv':function(_0x3604e0,_0x5f328e,_0x412795){return _0x3604e0(_0x5f328e,_0x412795);}},_0x281b6a=getApiBaseUrl();try{const _0xfd52a4=await _0x40f00d[_0x4f1d9b(0x1e3)](fetch,_0x281b6a+_0x4f1d9b(0x1e4),{'method':_0x4f1d9b(0x217),'headers':{'workos-token':_0x304a5a}});if(_0xfd52a4['ok'])return _0xfd52a4['json']();}catch{}return null;}function buildKeyName(_0x16754e,_0x2783bc){const _0x2e04e1=_0x4199,_0x1771db=_0x2783bc['filter'](_0x2c1314=>_0x2c1314[_0x2e04e1(0x1ee)]===_0x16754e||_0x2c1314['name']['startsWith'](_0x16754e+'\x20('));if(_0x1771db['length']===0x0)return _0x16754e;return _0x16754e+'\x20('+(_0x1771db[_0x2e04e1(0x1f7)]+0x1)+')';}export async function provisionApiKey(_0x178559){const _0x264e94=_0x4199,_0x371750={'gHaAb':function(_0xcc6823){return _0xcc6823();},'JqXCd':'CLI\x20Key','dgreU':function(_0x59663a,_0x39049d,_0x3fb516){return _0x59663a(_0x39049d,_0x3fb516);}},_0x30d94a=_0x371750['gHaAb'](getApiBaseUrl),_0x5e0cf1={'Content-Type':_0x264e94(0x1fb),'workos-token':_0x178559},_0x3a5592=await fetchUserProfile(_0x178559),_0x258736=_0x3a5592?.['firstName']||_0x3a5592?.[_0x264e94(0x1e2)]?.['split']('@')[0x0],_0x5605b0=_0x258736?_0x258736+'\x27s\x20CLI\x20Key':_0x371750['JqXCd'];let _0x89faee=[];try{const _0x1c8788=await fetch(_0x30d94a+'/api-keys',{'method':'GET','headers':_0x5e0cf1});if(_0x1c8788['ok']){const _0xa8bcc3=await _0x1c8788[_0x264e94(0x1f8)]();_0x89faee=_0xa8bcc3[_0x264e94(0x218)];}}catch{}const _0x5a97a4=buildKeyName(_0x5605b0,_0x89faee),_0x4d0d83=await _0x371750[_0x264e94(0x1d5)](fetch,_0x30d94a+_0x264e94(0x220),{'method':'POST','headers':_0x5e0cf1,'body':JSON['stringify']({'name':_0x5a97a4,'scope':_0x264e94(0x1db)})});if(!_0x4d0d83['ok']){const _0x53edc4=await _0x4d0d83[_0x264e94(0x206)]();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x4d0d83['status']+'\x20'+_0x53edc4);}const _0x2e7c15=await _0x4d0d83['json']();return _0x2e7c15['apiKey']['token'];}function _0x12f6(){const _0x3c5baa=['platform','list','zurIM','Setting\x20up\x20your\x20organization...','QeERV','Failed\x20to\x20provision\x20CLI\x20token:\x20','write','BwSzp','stdin','win32','10NDWCyf','Using\x20organization:\x20','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','token','kKong','GET','apiKeys','log','toString','darwin','12201gfkmRS','37booBYt','14168820YdDrFW','lwuOe','/api-keys','jlulR','error_description','xgNCG','egbnI','QeUGz','MEurB','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','dgreU','stdout','application/x-www-form-urlencoded','status','645900iXwqvu','base64url','mcp:write','PgzHq','5578UAMAyJ','user_code','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','now','memberships','email','AzEtv','/organization/me','SaavV','utf-8','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','165591FoQilR','Device\x20authorization\x20timed\x20out','POST','Failed\x20to\x20request\x20device\x20code:\x20','RuOgX','426260VYAkBa','name','Invalid\x20JWT\x20format','fRGfR','refresh_token','org_id','16JULYav','unref','QCgwp','ZjLJR','length','json','822sPUEkH','urn:ietf:params:oauth:grant-type:device_code','application/json','3099921UeiRqt','map','open','verification_uri_complete','kAdmt','error','yspvA','96xSZAna','xAHxo','expires_in','text','isTTY'];_0x12f6=function(){return _0x3c5baa;};return _0x12f6();}export function openBrowser(_0x51fc52){const _0x3334aa=_0x4199,_0x1d27de={'zurIM':_0x3334aa(0x211),'QeERV':function(_0x36c190,_0x1fe1d1,_0x1205ef,_0x9c36e2){return _0x36c190(_0x1fe1d1,_0x1205ef,_0x9c36e2);},'PgzHq':'ignore','aVBBV':function(_0x245949,_0x4ff16f){return _0x245949===_0x4ff16f;},'gnKwX':_0x3334aa(0x21b),'FFhSu':function(_0x410841,_0x245104,_0x4cc820,_0x50f08b){return _0x410841(_0x245104,_0x4cc820,_0x50f08b);}};try{if(process['platform']===_0x1d27de[_0x3334aa(0x20a)]){const _0x5ce1bd=_0x1d27de[_0x3334aa(0x20c)](spawn,'cmd',['/c','start','',_0x51fc52],{'detached':!![],'stdio':_0x1d27de[_0x3334aa(0x1dc)],'windowsHide':!![]});_0x5ce1bd['unref']();return;}const _0x141013=_0x1d27de['aVBBV'](process[_0x3334aa(0x208)],_0x1d27de['gnKwX'])?_0x3334aa(0x1fe):'xdg-open',_0x57b11e=_0x1d27de['FFhSu'](spawn,_0x141013,[_0x51fc52],{'detached':!![],'stdio':_0x1d27de['PgzHq']});_0x57b11e[_0x3334aa(0x1f4)]();}catch{}}function decodeJwtPayload(_0x50ec2b){const _0x3759d1=_0x4199,_0x34fa87={'xgNCG':_0x3759d1(0x1e6)},_0x46fcb4=_0x50ec2b['split']('.');if(_0x46fcb4['length']!==0x3)throw new Error(_0x3759d1(0x1ef));const _0x216bb0=Buffer['from'](_0x46fcb4[0x1],_0x3759d1(0x1da))[_0x3759d1(0x21a)](_0x34fa87[_0x3759d1(0x223)]);return JSON['parse'](_0x216bb0);}async function selfServeSignup(_0x1e697c){const _0x2e7438=_0x4199,_0xf667b3={'kKong':function(_0x5ee0c1){return _0x5ee0c1();},'RdOoK':'POST'},_0x554a6e=_0xf667b3[_0x2e7438(0x216)](getApiBaseUrl),_0x13a04d=await fetch(_0x554a6e+'/organization/self-serve-signup',{'method':_0xf667b3['RdOoK'],'headers':{'Content-Type':'application/json','workos-token':_0x1e697c}});if(!_0x13a04d['ok']){const _0x92fd0b=await _0x13a04d['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x13a04d[_0x2e7438(0x1d8)]+'\x20'+_0x92fd0b);}return _0x13a04d[_0x2e7438(0x1f8)]();}async function fetchMyMemberships(_0x23f18d){const _0x479b1a=_0x4199,_0x31c810={'nZwmb':function(_0x2a88d8,_0x11d1d9,_0x395fe6){return _0x2a88d8(_0x11d1d9,_0x395fe6);}},_0x1e0b0e=getApiBaseUrl(),_0x504650=await _0x31c810['nZwmb'](fetch,_0x1e0b0e+'/organization/my-memberships',{'method':'GET','headers':{'workos-token':_0x23f18d}});if(!_0x504650['ok']){const _0x22fe31=await _0x504650[_0x479b1a(0x206)]();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x504650['status']+'\x20'+_0x22fe31);}const _0x3f2490=await _0x504650['json']();return _0x3f2490[_0x479b1a(0x1e1)];}async function refreshTokenWithOrg(_0x74e821,_0x15ce98,_0x9d7930){const _0x59a40e=_0x4199,_0xda6d8e={'BQRSs':function(_0xb10839,_0x4cf067,_0x3aa03f){return _0xb10839(_0x4cf067,_0x3aa03f);},'kAdmt':_0x59a40e(0x1ea),'lwuOe':'application/x-www-form-urlencoded','WORqO':_0x59a40e(0x1f1)},_0x501e3c=await _0xda6d8e['BQRSs'](fetch,WORKOS_TOKEN_URL,{'method':_0xda6d8e[_0x59a40e(0x200)],'headers':{'Content-Type':_0xda6d8e[_0x59a40e(0x21f)]},'body':new URLSearchParams({'client_id':_0x74e821,'grant_type':_0xda6d8e['WORqO'],'refresh_token':_0x15ce98,'organization_id':_0x9d7930})});if(!_0x501e3c['ok']){const _0x49dff8=await _0x501e3c['text']();throw new Error(_0x59a40e(0x1df)+_0x501e3c[_0x59a40e(0x1d8)]+'\x20'+_0x49dff8);}return _0x501e3c['json']();}async function provisionCliToken(_0xf348dd){const _0x36b1a2=_0x4199,_0x29bcc6={'RpypU':'POST','IfRms':'application/json'},_0x539c75=getApiBaseUrl(),_0x549563=await fetch(_0x539c75+'/cli-auth/token',{'method':_0x29bcc6['RpypU'],'headers':{'Content-Type':_0x29bcc6['IfRms'],'workos-token':_0xf348dd}});if(!_0x549563['ok']){const _0x5a1933=await _0x549563['text']();throw new Error(_0x36b1a2(0x20d)+_0x549563[_0x36b1a2(0x1d8)]+'\x20'+_0x5a1933);}return _0x549563['json']();}export async function runDeviceAuthFlow(){const _0x398fd1=_0x4199,_0x573f39={'hXHdH':function(_0x4efacf){return _0x4efacf();},'IjepU':_0x398fd1(0x1e7),'fRGfR':function(_0x1736b7,_0x8c36af){return _0x1736b7(_0x8c36af);},'nXLTl':function(_0x5b1abc,_0x18feaf,_0x5b749e,_0x2369d3,_0x65531c){return _0x5b1abc(_0x18feaf,_0x5b749e,_0x2369d3,_0x65531c);},'yspvA':function(_0x1ea50c,_0x12d6c6){return _0x1ea50c(_0x12d6c6);},'tSRmM':_0x398fd1(0x20b),'BwSzp':'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','uYOUp':function(_0x1f7fa0,_0xdf1857,_0x3247dd,_0x2b3eec){return _0x1f7fa0(_0xdf1857,_0x3247dd,_0x2b3eec);},'ZjLJR':'Provisioning\x20CLI\x20token...'},_0x585df8=_0x573f39['hXHdH'](getCurrentEnvironment),_0x3c0135=ENVIRONMENT_CONFIGS[_0x585df8]['workosClientId'],_0x4c02c9=await requestDeviceCode(_0x3c0135);console['log'](_0x573f39['IjepU']),console[_0x398fd1(0x219)]('\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a'),_0x573f39['fRGfR'](openBrowser,_0x4c02c9[_0x398fd1(0x1ff)]),console[_0x398fd1(0x219)](_0x398fd1(0x227)+_0x4c02c9[_0x398fd1(0x1ff)]),console['log']('Code:\x20'+_0x4c02c9[_0x398fd1(0x1de)]+'\x0a'),process['stdout']['write']('Waiting\x20for\x20authentication...');let _0x22ec68=await _0x573f39['nXLTl'](pollForTokens,_0x3c0135,_0x4c02c9['device_code'],_0x4c02c9['interval'],_0x4c02c9[_0x398fd1(0x205)]);console['log']('\x20✓');const _0xfe5bb4=decodeJwtPayload(_0x22ec68['access_token']);if(!_0xfe5bb4[_0x398fd1(0x1f2)]){const _0x56a99c=await _0x573f39[_0x398fd1(0x202)](fetchMyMemberships,_0x22ec68['access_token']);let _0x672866;if(_0x56a99c[_0x398fd1(0x1f7)]===0x0){process['stdout'][_0x398fd1(0x20e)](_0x573f39['tSRmM']);const _0x991586=await _0x573f39[_0x398fd1(0x1f0)](selfServeSignup,_0x22ec68['access_token']);_0x672866=_0x991586['organizationId'],console[_0x398fd1(0x219)]('\x20✓');}else{if(_0x56a99c[_0x398fd1(0x1f7)]===0x1)_0x672866=_0x56a99c[0x0]['organizationId'],console[_0x398fd1(0x219)](_0x398fd1(0x213)+_0x56a99c[0x0]['name']);else{const _0x124862=process[_0x398fd1(0x210)][_0x398fd1(0x207)]&&process[_0x398fd1(0x1d6)][_0x398fd1(0x207)];if(!_0x124862)throw new Error(_0x398fd1(0x214)+_0x573f39[_0x398fd1(0x20f)]);const {selected:_0x51998a}=await _0x580a78['prompt']([{'type':_0x398fd1(0x209),'name':'selected','message':'Select\x20an\x20organization:','choices':_0x56a99c[_0x398fd1(0x1fd)](_0x11835c=>({'name':_0x11835c['name'],'value':_0x11835c['organizationId']}))}]);_0x672866=_0x51998a;}}_0x22ec68=await _0x573f39['uYOUp'](refreshTokenWithOrg,_0x3c0135,_0x22ec68[_0x398fd1(0x1f1)],_0x672866);}process['stdout'][_0x398fd1(0x20e)](_0x573f39[_0x398fd1(0x1f6)]);const _0x495682=await provisionCliToken(_0x22ec68['access_token']);return console[_0x398fd1(0x219)]('\x20✓'),await _0x573f39['fRGfR'](storeToken,_0x495682[_0x398fd1(0x215)]),_0x22ec68['refresh_token']&&await storeRefreshToken(_0x22ec68['refresh_token']),_0x495682['token'];}function sleep(_0x2070d1){return new Promise(_0x5addda=>setTimeout(_0x5addda,_0x2070d1));}
1
+ const _0x52237a=_0x5040;(function(_0x410486,_0x2b1055){const _0x46fa80=_0x5040,_0x194f82=_0x410486();while(!![]){try{const _0x505999=-parseInt(_0x46fa80(0x176))/0x1+parseInt(_0x46fa80(0x15a))/0x2*(parseInt(_0x46fa80(0x17e))/0x3)+-parseInt(_0x46fa80(0x19b))/0x4+parseInt(_0x46fa80(0x151))/0x5*(parseInt(_0x46fa80(0x155))/0x6)+-parseInt(_0x46fa80(0x160))/0x7+parseInt(_0x46fa80(0x18d))/0x8*(parseInt(_0x46fa80(0x16f))/0x9)+parseInt(_0x46fa80(0x163))/0xa*(parseInt(_0x46fa80(0x16a))/0xb);if(_0x505999===_0x2b1055)break;else _0x194f82['push'](_0x194f82['shift']());}catch(_0x31a349){_0x194f82['push'](_0x194f82['shift']());}}}(_0xc8b7,0x422e8));import{spawn}from'child_process';function _0xc8b7(){const _0x476984=['DKtZU','split','Setting\x20up\x20your\x20organization...','250755FTufoT','XhrXg','Rqblj','token','platform','isTTY','length','lwyKx','3AMnIaV','startsWith','log','CLI\x20Key','Failed\x20to\x20request\x20device\x20code:\x20','stdout','workosClientId','verification_uri_complete','lBgob','POST','VGKQO','Dmzee','status','text','application/x-www-form-urlencoded','24RGypYA','organizationId','apiKeys','https://api.workos.com/user_management/authorize/device','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','mcp:write','aOAjc','firstName','Provisioning\x20CLI\x20token...','urn:ietf:params:oauth:grant-type:device_code','zbGzi','GET','mfPDf','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','1684184WebQIy','list','xtDTo','access_token','QHpHZ','open','185835OHmLaq','JvtSz','https://api.workos.com/user_management/authenticate','prompt','18vWCeto','FaJDP','json','KvpPl','stdin','991114DLwbLc','refresh_token','write','stringify','/api-keys','ignore','1414140scTZJq','application/json','Select\x20an\x20organization:','10ZljEMQ','LuoEk','\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','FkRNw','error','expires_in','HjygM','571956cgqimJ','ZkkwE','NsPcm','Authentication\x20failed','now','1457541RvSVRj','apiKey','Code:\x20','Device\x20authorization\x20timed\x20out'];_0xc8b7=function(){return _0x476984;};return _0xc8b7();}import _0x734651 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x52237a(0x190),WORKOS_TOKEN_URL=_0x52237a(0x153);export async function requestDeviceCode(_0x199edf){const _0x424a4a=_0x52237a,_0x12c51c={'pCyBb':'application/x-www-form-urlencoded'},_0x469c8e=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':_0x12c51c['pCyBb']},'body':new URLSearchParams({'client_id':_0x199edf})});if(!_0x469c8e['ok']){const _0x3b958e=await _0x469c8e['text']();throw new Error(_0x424a4a(0x182)+_0x469c8e['status']+'\x20'+_0x3b958e);}return _0x469c8e[_0x424a4a(0x157)]();}export async function pollForTokens(_0x1ae48c,_0x3e49d1,_0x3c9848,_0x4023c4){const _0x41ebc1=_0x52237a,_0x1fafe2={'XhXLk':_0x41ebc1(0x18c),'LuoEk':function(_0x21fb94,_0x190f95){return _0x21fb94===_0x190f95;},'ZkkwE':'slow_down'},_0x2addfe=Date[_0x41ebc1(0x16e)]()+_0x4023c4*0x3e8;let _0x3ce7ed=_0x3c9848*0x3e8;while(Date[_0x41ebc1(0x16e)]()<_0x2addfe){await sleep(_0x3ce7ed);const _0x3ee58f=await fetch(WORKOS_TOKEN_URL,{'method':_0x41ebc1(0x187),'headers':{'Content-Type':_0x1fafe2['XhXLk']},'body':new URLSearchParams({'client_id':_0x1ae48c,'device_code':_0x3e49d1,'grant_type':_0x41ebc1(0x196)})});if(_0x3ee58f['ok'])return _0x3ee58f['json']();const _0x315c42=await _0x3ee58f['json']();if(_0x1fafe2[_0x41ebc1(0x164)](_0x315c42[_0x41ebc1(0x167)],'authorization_pending'))continue;if(_0x315c42[_0x41ebc1(0x167)]===_0x1fafe2[_0x41ebc1(0x16b)]){_0x3ce7ed+=0x3e8;continue;}throw new Error(_0x315c42['error_description']||_0x315c42[_0x41ebc1(0x167)]||_0x41ebc1(0x16d));}throw new Error(_0x41ebc1(0x172));}async function fetchUserProfile(_0x591bff){const _0x36fdc1=_0x52237a,_0x32e9b4={'sfckI':function(_0x1687bc){return _0x1687bc();},'zbGzi':function(_0x10b619,_0x68f7f1,_0x63aa22){return _0x10b619(_0x68f7f1,_0x63aa22);},'FaJDP':_0x36fdc1(0x198)},_0x2ac91e=_0x32e9b4['sfckI'](getApiBaseUrl);try{const _0x3cbbc8=await _0x32e9b4[_0x36fdc1(0x197)](fetch,_0x2ac91e+'/organization/me',{'method':_0x32e9b4[_0x36fdc1(0x156)],'headers':{'workos-token':_0x591bff}});if(_0x3cbbc8['ok'])return _0x3cbbc8[_0x36fdc1(0x157)]();}catch{}return null;}function _0x5040(_0xf4329,_0x1f9ca3){_0xf4329=_0xf4329-0x14f;const _0xc8b7dd=_0xc8b7();let _0x5040c9=_0xc8b7dd[_0xf4329];return _0x5040c9;}function buildKeyName(_0x14d312,_0x54b98c){const _0x28f86d=_0x52237a,_0x38f289={'FkRNw':function(_0x3832ad,_0x1d202){return _0x3832ad===_0x1d202;},'JXuTn':function(_0x6e162f,_0x5c5f32){return _0x6e162f+_0x5c5f32;}},_0x360d0b=_0x54b98c['filter'](_0x37fc70=>_0x37fc70['name']===_0x14d312||_0x37fc70['name'][_0x28f86d(0x17f)](_0x14d312+'\x20('));if(_0x38f289[_0x28f86d(0x166)](_0x360d0b['length'],0x0))return _0x14d312;return _0x14d312+'\x20('+_0x38f289['JXuTn'](_0x360d0b['length'],0x1)+')';}export async function provisionApiKey(_0x71dd1e){const _0x1c5322=_0x52237a,_0x3d6469={'VGKQO':function(_0x47491a){return _0x47491a();},'qaRfx':_0x1c5322(0x161),'zCBfL':_0x1c5322(0x181),'HjygM':function(_0x63ec8b,_0xe012e0,_0x2a8ad5){return _0x63ec8b(_0xe012e0,_0x2a8ad5);},'mfPDf':_0x1c5322(0x192)},_0x129c2e=_0x3d6469[_0x1c5322(0x188)](getApiBaseUrl),_0x4d4353={'Content-Type':_0x3d6469['qaRfx'],'workos-token':_0x71dd1e},_0x4d6e6c=await fetchUserProfile(_0x71dd1e),_0x7db45e=_0x4d6e6c?.[_0x1c5322(0x194)]||_0x4d6e6c?.['email']?.['split']('@')[0x0],_0x283d43=_0x7db45e?_0x7db45e+'\x27s\x20CLI\x20Key':_0x3d6469['zCBfL'];let _0x4fbe25=[];try{const _0x489bf1=await _0x3d6469[_0x1c5322(0x169)](fetch,_0x129c2e+_0x1c5322(0x15e),{'method':'GET','headers':_0x4d4353});if(_0x489bf1['ok']){const _0x967c47=await _0x489bf1['json']();_0x4fbe25=_0x967c47[_0x1c5322(0x18f)];}}catch{}const _0x387b0=buildKeyName(_0x283d43,_0x4fbe25),_0x27108d=await fetch(_0x129c2e+_0x1c5322(0x15e),{'method':_0x1c5322(0x187),'headers':_0x4d4353,'body':JSON[_0x1c5322(0x15d)]({'name':_0x387b0,'scope':_0x3d6469[_0x1c5322(0x199)]})});if(!_0x27108d['ok']){const _0x3eeab6=await _0x27108d[_0x1c5322(0x18b)]();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x27108d[_0x1c5322(0x18a)]+'\x20'+_0x3eeab6);}const _0x47da85=await _0x27108d[_0x1c5322(0x157)]();return _0x47da85[_0x1c5322(0x170)]['token'];}export function openBrowser(_0x4326b2){const _0x26b74c=_0x52237a,_0x44531b={'KvpPl':'win32','lBgob':function(_0xa1fd5c,_0xfa6d9f,_0x3f5a24,_0x175c83){return _0xa1fd5c(_0xfa6d9f,_0x3f5a24,_0x175c83);},'QHpHZ':'cmd','hhlTh':'start','BXgNJ':_0x26b74c(0x15f),'Rqblj':'xdg-open'};try{if(process['platform']===_0x44531b[_0x26b74c(0x158)]){const _0x1ed353=_0x44531b[_0x26b74c(0x186)](spawn,_0x44531b[_0x26b74c(0x14f)],['/c',_0x44531b['hhlTh'],'',_0x4326b2],{'detached':!![],'stdio':_0x44531b['BXgNJ'],'windowsHide':!![]});_0x1ed353['unref']();return;}const _0x2bb280=process[_0x26b74c(0x17a)]==='darwin'?_0x26b74c(0x150):_0x44531b[_0x26b74c(0x178)],_0x1ba363=spawn(_0x2bb280,[_0x4326b2],{'detached':!![],'stdio':_0x26b74c(0x15f)});_0x1ba363['unref']();}catch{}}function decodeJwtPayload(_0x37dea2){const _0x460040=_0x52237a,_0x13526e={'OXbRf':'Invalid\x20JWT\x20format','BSaGq':'base64url','gZvny':'utf-8'},_0x3d0865=_0x37dea2[_0x460040(0x174)]('.');if(_0x3d0865[_0x460040(0x17c)]!==0x3)throw new Error(_0x13526e['OXbRf']);const _0x19750b=Buffer['from'](_0x3d0865[0x1],_0x13526e['BSaGq'])['toString'](_0x13526e['gZvny']);return JSON['parse'](_0x19750b);}async function selfServeSignup(_0x1c86b2){const _0x32c1d9=_0x52237a,_0x468622={'OhtAt':function(_0x3f7834){return _0x3f7834();},'Dmzee':function(_0x3e82f7,_0xd7bd0f,_0x5ab28a){return _0x3e82f7(_0xd7bd0f,_0x5ab28a);},'oklTB':_0x32c1d9(0x161)},_0x459d35=_0x468622['OhtAt'](getApiBaseUrl),_0x237d20=await _0x468622[_0x32c1d9(0x189)](fetch,_0x459d35+'/organization/self-serve-signup',{'method':_0x32c1d9(0x187),'headers':{'Content-Type':_0x468622['oklTB'],'workos-token':_0x1c86b2}});if(!_0x237d20['ok']){const _0x479faf=await _0x237d20[_0x32c1d9(0x18b)]();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x237d20[_0x32c1d9(0x18a)]+'\x20'+_0x479faf);}return _0x237d20['json']();}async function fetchMyMemberships(_0x3f2819){const _0xbddd30=_0x52237a,_0x5befd4={'nILOD':function(_0x10c73f,_0x4547dc,_0x19735f){return _0x10c73f(_0x4547dc,_0x19735f);}},_0x281b78=getApiBaseUrl(),_0x53b87e=await _0x5befd4['nILOD'](fetch,_0x281b78+'/organization/my-memberships',{'method':_0xbddd30(0x198),'headers':{'workos-token':_0x3f2819}});if(!_0x53b87e['ok']){const _0x875dc3=await _0x53b87e['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x53b87e['status']+'\x20'+_0x875dc3);}const _0x1a8eeb=await _0x53b87e[_0xbddd30(0x157)]();return _0x1a8eeb['memberships'];}async function refreshTokenWithOrg(_0x4491b3,_0x5da4c4,_0x333471){const _0x54baf9=_0x52237a,_0x3884af={'ivlDH':function(_0x1c6bd3,_0x2afe91,_0x3b3756){return _0x1c6bd3(_0x2afe91,_0x3b3756);}},_0x535094=await _0x3884af['ivlDH'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x4491b3,'grant_type':_0x54baf9(0x15b),'refresh_token':_0x5da4c4,'organization_id':_0x333471})});if(!_0x535094['ok']){const _0x2e331e=await _0x535094[_0x54baf9(0x18b)]();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x535094['status']+'\x20'+_0x2e331e);}return _0x535094[_0x54baf9(0x157)]();}async function provisionCliToken(_0xb49f60){const _0x573454=_0x52237a,_0x52360b={'aOAjc':_0x573454(0x161)},_0x476b3e=getApiBaseUrl(),_0x554fb6=await fetch(_0x476b3e+'/cli-auth/token',{'method':'POST','headers':{'Content-Type':_0x52360b[_0x573454(0x193)],'workos-token':_0xb49f60}});if(!_0x554fb6['ok']){const _0x44a31f=await _0x554fb6['text']();throw new Error('Failed\x20to\x20provision\x20CLI\x20token:\x20'+_0x554fb6['status']+'\x20'+_0x44a31f);}return _0x554fb6[_0x573454(0x157)]();}export async function runDeviceAuthFlow(){const _0x25aba7=_0x52237a,_0xbe5fbf={'lwyKx':function(_0x3c1194){return _0x3c1194();},'NjkUV':function(_0x2d7d73,_0x2785de){return _0x2d7d73(_0x2785de);},'JvtSz':_0x25aba7(0x165),'XhrXg':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','tFLAm':function(_0x2326a6,_0x8d5d23){return _0x2326a6(_0x8d5d23);},'KibZN':function(_0x53da6b,_0x4e6847,_0x8c3180,_0x5b0447,_0x14b65b){return _0x53da6b(_0x4e6847,_0x8c3180,_0x5b0447,_0x14b65b);},'PGNyI':function(_0xea695e,_0x408efb){return _0xea695e(_0x408efb);},'xtDTo':function(_0x4dc519,_0x471ec9){return _0x4dc519+_0x471ec9;},'NFjja':'Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','DKtZU':_0x25aba7(0x19a),'NsPcm':'selected','boFGU':_0x25aba7(0x195),'nXjUy':function(_0x2d113b,_0x11460b){return _0x2d113b(_0x11460b);},'Ubifg':function(_0x25cebf,_0x5e0fb4){return _0x25cebf(_0x5e0fb4);}},_0x251335=_0xbe5fbf[_0x25aba7(0x17d)](getCurrentEnvironment),_0x2c7e15=ENVIRONMENT_CONFIGS[_0x251335][_0x25aba7(0x184)],_0x14cce2=await _0xbe5fbf['NjkUV'](requestDeviceCode,_0x2c7e15);console[_0x25aba7(0x180)](_0xbe5fbf[_0x25aba7(0x152)]),console[_0x25aba7(0x180)](_0xbe5fbf[_0x25aba7(0x177)]),_0xbe5fbf['tFLAm'](openBrowser,_0x14cce2['verification_uri_complete']),console['log'](_0x25aba7(0x191)+_0x14cce2[_0x25aba7(0x185)]),console['log'](_0x25aba7(0x171)+_0x14cce2['user_code']+'\x0a'),process[_0x25aba7(0x183)][_0x25aba7(0x15c)]('Waiting\x20for\x20authentication...');let _0x234c27=await _0xbe5fbf['KibZN'](pollForTokens,_0x2c7e15,_0x14cce2['device_code'],_0x14cce2['interval'],_0x14cce2[_0x25aba7(0x168)]);console[_0x25aba7(0x180)]('\x20✓');const _0x2c6af3=_0xbe5fbf['NjkUV'](decodeJwtPayload,_0x234c27['access_token']);if(!_0x2c6af3['org_id']){const _0x1db225=await fetchMyMemberships(_0x234c27[_0x25aba7(0x19e)]);let _0x24e5ec;if(_0x1db225['length']===0x0){process[_0x25aba7(0x183)][_0x25aba7(0x15c)](_0x25aba7(0x175));const _0x39a21e=await _0xbe5fbf['PGNyI'](selfServeSignup,_0x234c27['access_token']);_0x24e5ec=_0x39a21e[_0x25aba7(0x18e)],console['log']('\x20✓');}else{if(_0x1db225['length']===0x1)_0x24e5ec=_0x1db225[0x0]['organizationId'],console[_0x25aba7(0x180)]('Using\x20organization:\x20'+_0x1db225[0x0]['name']);else{const _0x4d3102=process[_0x25aba7(0x159)][_0x25aba7(0x17b)]&&process['stdout']['isTTY'];if(!_0x4d3102)throw new Error(_0xbe5fbf[_0x25aba7(0x19d)](_0xbe5fbf['NFjja'],_0xbe5fbf[_0x25aba7(0x173)]));const {selected:_0x44b190}=await _0x734651[_0x25aba7(0x154)]([{'type':_0x25aba7(0x19c),'name':_0xbe5fbf[_0x25aba7(0x16c)],'message':_0x25aba7(0x162),'choices':_0x1db225['map'](_0x2a721f=>({'name':_0x2a721f['name'],'value':_0x2a721f['organizationId']}))}]);_0x24e5ec=_0x44b190;}}_0x234c27=await refreshTokenWithOrg(_0x2c7e15,_0x234c27['refresh_token'],_0x24e5ec);}process[_0x25aba7(0x183)][_0x25aba7(0x15c)](_0xbe5fbf['boFGU']);const _0x4794d9=await _0xbe5fbf['nXjUy'](provisionCliToken,_0x234c27['access_token']);return console[_0x25aba7(0x180)]('\x20✓'),await _0xbe5fbf['PGNyI'](storeToken,_0x4794d9['token']),_0x234c27[_0x25aba7(0x15b)]&&await _0xbe5fbf['Ubifg'](storeRefreshToken,_0x234c27[_0x25aba7(0x15b)]),_0x4794d9[_0x25aba7(0x179)];}function sleep(_0xe7a283){return new Promise(_0x173c50=>setTimeout(_0x173c50,_0xe7a283));}
@@ -1 +1 @@
1
- function _0x4d77(){const _0x1e4736=['https://mcp-auth.ranger.net/mcp','7938230bIQaYH','https://api.staging.ranger.net','40MMxJkN','14kqJOYW','2267368RLOAih','apiBaseUrl','https://ai-proxy-716115358910.us-central1.run.app','env','IBYLr','true','6652068fdWbXC','11VVLfgO','http://localhost:8080/mcp','DGiyt','LeEar','2682885SBzzAo','17909juXAQB','359322yGQceE','client_01J9CBYM7M5ZETCF7G6614DXR2','https://mcp-auth.staging.ranger.net/mcp','70PQufOp','staging','local','9802116ozZLEB'];_0x4d77=function(){return _0x1e4736;};return _0x4d77();}const _0x343642=_0x16a3;function _0x16a3(_0x14547b,_0x147d8d){_0x14547b=_0x14547b-0xb8;const _0x4d7734=_0x4d77();let _0x16a3ab=_0x4d7734[_0x14547b];return _0x16a3ab;}(function(_0x57f489,_0x400959){const _0x471566=_0x16a3,_0x42d400=_0x57f489();while(!![]){try{const _0x51daba=-parseInt(_0x471566(0xc0))/0x1*(parseInt(_0x471566(0xc4))/0x2)+-parseInt(_0x471566(0xc1))/0x3*(-parseInt(_0x471566(0xcb))/0x4)+parseInt(_0x471566(0xbf))/0x5+parseInt(_0x471566(0xba))/0x6+-parseInt(_0x471566(0xcc))/0x7*(-parseInt(_0x471566(0xcd))/0x8)+-parseInt(_0x471566(0xc7))/0x9+-parseInt(_0x471566(0xc9))/0xa*(parseInt(_0x471566(0xbb))/0xb);if(_0x51daba===_0x400959)break;else _0x42d400['push'](_0x42d400['shift']());}catch(_0x192423){_0x42d400['push'](_0x42d400['shift']());}}}(_0x4d77,0xdbbeb));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':_0x343642(0xc2),'aiProxyUrl':_0x343642(0xcf),'mcpAuthUrl':_0x343642(0xc8)},'staging':{'apiBaseUrl':_0x343642(0xca),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app','mcpAuthUrl':_0x343642(0xc3)},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':'http://localhost:8090','mcpAuthUrl':_0x343642(0xbc)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x1fc28e){const _0x3b095d=_0x343642,_0x2476aa={'jJqQT':'prod','NypkG':function(_0x1f816e,_0x52f01b){return _0x1f816e===_0x52f01b;}};return _0x1fc28e===_0x2476aa['jJqQT']||_0x1fc28e===_0x3b095d(0xc5)||_0x2476aa['NypkG'](_0x1fc28e,_0x3b095d(0xc6));}export function getCurrentEnvironment(){const _0x48320a=_0x343642,_0x1b7ada=process[_0x48320a(0xd0)]['RANGER_CLI_ENV'];if(_0x1b7ada&&isValidEnvironment(_0x1b7ada))return _0x1b7ada;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x30d7bd=_0x343642,_0x315e71={'JsIqu':function(_0x23000e){return _0x23000e();}};return ENVIRONMENT_CONFIGS[_0x315e71['JsIqu'](getCurrentEnvironment)][_0x30d7bd(0xce)];}export function getAiProxyUrl(){const _0x53a9b8={'RkLFw':function(_0x348c4){return _0x348c4();}};return ENVIRONMENT_CONFIGS[_0x53a9b8['RkLFw'](getCurrentEnvironment)]['aiProxyUrl'];}export function getMcpAuthUrl(){const _0x2c510f=_0x343642,_0x344217={'DGiyt':function(_0xef2ad9){return _0xef2ad9();}};return process[_0x2c510f(0xd0)]['RANGER_MCP_AUTH_URL']??ENVIRONMENT_CONFIGS[_0x344217[_0x2c510f(0xbd)](getCurrentEnvironment)]['mcpAuthUrl'];}export function isByokEnabled(){const _0x4117c3=_0x343642,_0x39873e={'IBYLr':function(_0x1e3a30,_0x5a4abb){return _0x1e3a30===_0x5a4abb;},'ghmHU':'true'};return _0x39873e[_0x4117c3(0xb8)](process['env']['RANGER_BYOK'],_0x39873e['ghmHU']);}export function isMcpDisabled(){const _0x505282=_0x343642,_0x5dd485={'LeEar':_0x505282(0xb9)};return process['env']['RANGER_DISABLE_MCP']===_0x5dd485[_0x505282(0xbe)];}export function getVerificationTransport(){const _0x2b706c={'PKBEb':'playwright-cli'};return isMcpDisabled()?_0x2b706c['PKBEb']:'mcp';}
1
+ const _0x463a4b=_0x3108;(function(_0x131fb2,_0xddd1a1){const _0x1734a0=_0x3108,_0x3e890e=_0x131fb2();while(!![]){try{const _0x17a025=parseInt(_0x1734a0(0x177))/0x1+parseInt(_0x1734a0(0x181))/0x2*(-parseInt(_0x1734a0(0x178))/0x3)+parseInt(_0x1734a0(0x16c))/0x4*(-parseInt(_0x1734a0(0x17d))/0x5)+parseInt(_0x1734a0(0x16a))/0x6*(-parseInt(_0x1734a0(0x17e))/0x7)+parseInt(_0x1734a0(0x180))/0x8*(parseInt(_0x1734a0(0x17b))/0x9)+parseInt(_0x1734a0(0x170))/0xa+parseInt(_0x1734a0(0x16b))/0xb*(parseInt(_0x1734a0(0x186))/0xc);if(_0x17a025===_0xddd1a1)break;else _0x3e890e['push'](_0x3e890e['shift']());}catch(_0x5bd036){_0x3e890e['push'](_0x3e890e['shift']());}}}(_0x8daf,0xa201d));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':_0x463a4b(0x188),'workosClientId':'client_01J9CBYM7M5ZETCF7G6614DXR2','aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app','mcpAuthUrl':'https://mcp-auth.ranger.net/mcp'},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x463a4b(0x169),'aiProxyUrl':_0x463a4b(0x16f),'mcpAuthUrl':_0x463a4b(0x172)},'local':{'apiBaseUrl':_0x463a4b(0x185),'workosClientId':_0x463a4b(0x169),'aiProxyUrl':_0x463a4b(0x184),'mcpAuthUrl':'http://localhost:8080/mcp'}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x31ddde){const _0x32074b=_0x463a4b,_0x3a671a={'hFGll':function(_0x345b9,_0x5d238f){return _0x345b9===_0x5d238f;},'QPHUL':'prod','iiyzX':function(_0x138053,_0x5f2542){return _0x138053===_0x5f2542;},'KzMwi':_0x32074b(0x183)};return _0x3a671a[_0x32074b(0x175)](_0x31ddde,_0x3a671a[_0x32074b(0x179)])||_0x3a671a[_0x32074b(0x176)](_0x31ddde,'staging')||_0x31ddde===_0x3a671a[_0x32074b(0x187)];}function _0x3108(_0x30ded3,_0x105307){_0x30ded3=_0x30ded3-0x169;const _0x8daf21=_0x8daf();let _0x3108d7=_0x8daf21[_0x30ded3];return _0x3108d7;}export function getCurrentEnvironment(){const _0x419df2=_0x463a4b,_0x365983=process[_0x419df2(0x16e)][_0x419df2(0x174)];if(_0x365983&&isValidEnvironment(_0x365983))return _0x365983;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x4e7efb={'QhQDt':function(_0x50e2f1){return _0x50e2f1();}};return ENVIRONMENT_CONFIGS[_0x4e7efb['QhQDt'](getCurrentEnvironment)]['apiBaseUrl'];}export function getAiProxyUrl(){const _0x48c382=_0x463a4b;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x48c382(0x182)];}function _0x8daf(){const _0x27276c=['11cHDgbZ','3263444JQFfUs','RANGER_DISABLE_MCP','env','https://ai-proxy-301751771437.us-central1.run.app','9212860vDSRlb','mcp','https://mcp-auth.staging.ranger.net/mcp','RANGER_MCP_AUTH_URL','RANGER_CLI_ENV','hFGll','iiyzX','214781lYtmWt','3545922cIrkOy','QPHUL','true','72dySOOk','ryUSC','5NSLLzI','889aBpvIq','mcpAuthUrl','763968XXQCbP','2UAHZIP','aiProxyUrl','local','http://localhost:8090','http://localhost:8080','11965116NTVsaD','KzMwi','https://api.ranger.net','client_01J9CBYM2DKWV9HM17D95Z540K','11136sMQkbw'];_0x8daf=function(){return _0x27276c;};return _0x8daf();}export function getMcpAuthUrl(){const _0x37cf2e=_0x463a4b;return process[_0x37cf2e(0x16e)][_0x37cf2e(0x173)]??ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x37cf2e(0x17f)];}export function isByokEnabled(){const _0xebd5d7=_0x463a4b,_0x210640={'jJOVD':function(_0x79d5ad,_0x3bd9c1){return _0x79d5ad===_0x3bd9c1;},'JcceL':_0xebd5d7(0x17a)};return _0x210640['jJOVD'](process['env']['RANGER_BYOK'],_0x210640['JcceL']);}export function isMcpDisabled(){const _0x2ab544=_0x463a4b,_0x4bd0cb={'qKMUI':'true'};return process[_0x2ab544(0x16e)][_0x2ab544(0x16d)]===_0x4bd0cb['qKMUI'];}export function getVerificationTransport(){const _0x55b3fe=_0x463a4b,_0xebcceb={'YiKzC':function(_0x2f2757){return _0x2f2757();},'lcOoi':'playwright-cli','ryUSC':_0x55b3fe(0x171)};return _0xebcceb['YiKzC'](isMcpDisabled)?_0xebcceb['lcOoi']:_0xebcceb[_0x55b3fe(0x17c)];}
@@ -1 +1 @@
1
- (function(_0x7b3a63,_0x5b1158){const _0x36946c=_0x2a4f,_0x3435cb=_0x7b3a63();while(!![]){try{const _0x5802e7=-parseInt(_0x36946c(0x214))/0x1+-parseInt(_0x36946c(0x21f))/0x2*(parseInt(_0x36946c(0x20e))/0x3)+parseInt(_0x36946c(0x231))/0x4*(parseInt(_0x36946c(0x208))/0x5)+-parseInt(_0x36946c(0x211))/0x6+parseInt(_0x36946c(0x217))/0x7+parseInt(_0x36946c(0x212))/0x8+-parseInt(_0x36946c(0x1f8))/0x9;if(_0x5802e7===_0x5b1158)break;else _0x3435cb['push'](_0x3435cb['shift']());}catch(_0x35d492){_0x3435cb['push'](_0x3435cb['shift']());}}}(_0x1ff8,0x20a25));function _0x1ff8(){const _0x2907a9=['979965RBeKXI','sessionId','bUSeT','TSgHd','GET','nBmxs','AJPtV','JhTsJ','set','SYIFD','xOShk','text','/report/markdown','ynDqz','DHtUu','/checklist-items/','73130JADiDt','Failed\x20to\x20list\x20sessions:\x20','style','stringify','Failed\x20to\x20update\x20feature\x20review:\x20','llFgf','4749Hxoxtv','luGxn','Bearer\x20','744714loRUvK','1664016TmqlPw','Failed\x20to\x20get\x20action\x20items:\x20','11983gkrTtT','/sessions','CVlOd','362257LYVpyE','PATCH','hlpVR','bQYoy','ujzvP','/checklist/','join','vwkuO','90KupmVR','GqSQe','MVWrX','VxzXA','aRKyu','gitBranch','status','gitRepoUrl','/api/v1/mcp/features/','POST','application/json','Failed\x20to\x20delete\x20feature\x20review:\x20','UDIkY','https://dashboard.ranger.net/billing','JyCQy','includeDeleted','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','billingUrl','52TqHgQV','qrByu','/checklist','json','/api/v1/mcp/features','AGRZw','mNvDa','toString','limit','itemIds','Failed\x20to\x20update\x20scenario:\x20'];_0x1ff8=function(){return _0x2907a9;};return _0x1ff8();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0xdd7dfa){const _0x51727a=_0x2a4f,_0x425c3c={'VxzXA':function(_0x2d7f50){return _0x2d7f50();}},_0x31c816=await getToken();if(!_0x31c816)throw new Error(_0x51727a(0x22f));const _0x16ff59=_0x425c3c[_0x51727a(0x222)](getApiBaseUrl),_0x4548f7=await fetch(_0x16ff59+_0x51727a(0x235),{'method':_0x51727a(0x228),'headers':{'Authorization':_0x51727a(0x210)+_0x31c816,'Content-Type':_0x51727a(0x229)},'body':JSON['stringify'](_0xdd7dfa)});if(!_0x4548f7['ok']){if(_0x4548f7[_0x51727a(0x225)]===0x192){const _0x244cd6=await _0x4548f7[_0x51727a(0x234)](),_0x2bf9d1=_0x244cd6[_0x51727a(0x230)]||_0x51727a(0x22c);throw new Error((_0x244cd6['message']||'Feature\x20limit\x20exceeded')+'\x0a\x0aUpgrade\x20your\x20plan:\x20'+_0x2bf9d1);}const _0x242274=await _0x4548f7[_0x51727a(0x203)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x242274);}return _0x4548f7[_0x51727a(0x234)]();}export async function listFeatures(_0x3d7b06){const _0x3c6791=_0x2a4f,_0x1d3144={'WFYpe':function(_0x39e7d3){return _0x39e7d3();},'NSWXL':'gitBranch','aRKyu':'offset','HvRHe':'includeDeleted','UDIkY':function(_0x109151,_0x5eeec7,_0x29d68d){return _0x109151(_0x5eeec7,_0x29d68d);}},_0x230796=await _0x1d3144['WFYpe'](getToken);if(!_0x230796)throw new Error(_0x3c6791(0x22f));const _0x4b6e72=getApiBaseUrl(),_0x483460=new URLSearchParams();if(_0x3d7b06?.[_0x3c6791(0x226)])_0x483460['set'](_0x3c6791(0x226),_0x3d7b06[_0x3c6791(0x226)]);if(_0x3d7b06?.['gitBranch'])_0x483460['set'](_0x1d3144['NSWXL'],_0x3d7b06[_0x3c6791(0x224)]);if(_0x3d7b06?.[_0x3c6791(0x1f5)])_0x483460[_0x3c6791(0x200)](_0x3c6791(0x1f5),_0x3d7b06[_0x3c6791(0x1f5)][_0x3c6791(0x1f4)]());if(_0x3d7b06?.['offset'])_0x483460['set'](_0x1d3144[_0x3c6791(0x223)],_0x3d7b06['offset']['toString']());if(_0x3d7b06?.[_0x3c6791(0x22e)])_0x483460[_0x3c6791(0x200)](_0x1d3144['HvRHe'],'true');const _0x151d62=_0x4b6e72+'/api/v1/mcp/features'+(_0x483460[_0x3c6791(0x1f4)]()?'?'+_0x483460['toString']():''),_0x7c2f4c=await _0x1d3144[_0x3c6791(0x22b)](fetch,_0x151d62,{'method':_0x3c6791(0x1fc),'headers':{'Authorization':'Bearer\x20'+_0x230796}});if(!_0x7c2f4c['ok']){const _0xbfb4f3=await _0x7c2f4c[_0x3c6791(0x203)]();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0xbfb4f3);}return _0x7c2f4c['json']();}export async function getFeature(_0x5bbeb5){const _0x40b241=_0x2a4f,_0x13fcd3={'nBmxs':function(_0x3add1b){return _0x3add1b();},'RQDpy':_0x40b241(0x22f),'AJPtV':function(_0x5c4240,_0x198512,_0x40371f){return _0x5c4240(_0x198512,_0x40371f);},'TSgHd':'GET'},_0x5997dd=await _0x13fcd3[_0x40b241(0x1fd)](getToken);if(!_0x5997dd)throw new Error(_0x13fcd3['RQDpy']);const _0x1e5cf5=_0x13fcd3['nBmxs'](getApiBaseUrl),_0x1b72c9=await _0x13fcd3[_0x40b241(0x1fe)](fetch,_0x1e5cf5+_0x40b241(0x227)+_0x5bbeb5,{'method':_0x13fcd3[_0x40b241(0x1fb)],'headers':{'Authorization':'Bearer\x20'+_0x5997dd}});if(!_0x1b72c9['ok']){const _0x4e17eb=await _0x1b72c9[_0x40b241(0x203)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x4e17eb);}return _0x1b72c9['json']();}export async function updateFeature(_0x1293a2,_0x360063){const _0x42ab8a=_0x2a4f,_0x44b0cb={'luGxn':_0x42ab8a(0x218),'JyCQy':_0x42ab8a(0x229)},_0x90bb06=await getToken();if(!_0x90bb06)throw new Error(_0x42ab8a(0x22f));const _0x5821c6=getApiBaseUrl(),_0x11b103=await fetch(_0x5821c6+_0x42ab8a(0x227)+_0x1293a2,{'method':_0x44b0cb[_0x42ab8a(0x20f)],'headers':{'Authorization':'Bearer\x20'+_0x90bb06,'Content-Type':_0x44b0cb[_0x42ab8a(0x22d)]},'body':JSON['stringify'](_0x360063)});if(!_0x11b103['ok']){const _0x4834df=await _0x11b103[_0x42ab8a(0x203)]();throw new Error(_0x42ab8a(0x20c)+_0x4834df);}return _0x11b103[_0x42ab8a(0x234)]();}function _0x2a4f(_0x1456d8,_0x511adf){_0x1456d8=_0x1456d8-0x1f3;const _0x1ff8e8=_0x1ff8();let _0x2a4f04=_0x1ff8e8[_0x1456d8];return _0x2a4f04;}export async function createChecklistItem(_0x5f542a,_0x355a07,_0x4adb0a){const _0x4d3a07=_0x2a4f,_0x1cb033={'GqSQe':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','DHtUu':function(_0x389c4d){return _0x389c4d();},'ynDqz':_0x4d3a07(0x228),'fatMd':_0x4d3a07(0x229)},_0x2e0abf=await getToken();if(!_0x2e0abf)throw new Error(_0x1cb033[_0x4d3a07(0x220)]);const _0x3f71c9=_0x1cb033[_0x4d3a07(0x206)](getApiBaseUrl),_0x4a0146=await fetch(_0x3f71c9+'/api/v1/mcp/features/'+_0x5f542a+_0x4d3a07(0x233),{'method':_0x1cb033[_0x4d3a07(0x205)],'headers':{'Authorization':'Bearer\x20'+_0x2e0abf,'Content-Type':_0x1cb033['fatMd']},'body':JSON[_0x4d3a07(0x20b)]({'description':_0x355a07,'position':_0x4adb0a})});if(!_0x4a0146['ok']){const _0x498029=await _0x4a0146['text']();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x498029);}return _0x4a0146[_0x4d3a07(0x234)]();}export async function updateChecklistItem(_0x5e9d42,_0x449851,_0x5aabfb){const _0x12f9ef=_0x2a4f,_0x1417c1={'MVWrX':function(_0x51efa1,_0x18ebac,_0x262384){return _0x51efa1(_0x18ebac,_0x262384);},'bQYoy':function(_0x4c184e,_0x364cbe,_0x1a79da){return _0x4c184e(_0x364cbe,_0x1a79da);},'SYIFD':'updateChecklistItem'};return _0x1417c1[_0x12f9ef(0x21a)](withRetry,async()=>{const _0xa1be56=_0x12f9ef,_0x7cf193=await getToken();if(!_0x7cf193)throw new Error(_0xa1be56(0x22f));const _0x57d56b=getApiBaseUrl(),_0x3122d6=await _0x1417c1[_0xa1be56(0x221)](fetch,_0x57d56b+_0xa1be56(0x227)+_0x5e9d42+_0xa1be56(0x21c)+_0x449851,{'method':'PATCH','headers':{'Authorization':_0xa1be56(0x210)+_0x7cf193,'Content-Type':_0xa1be56(0x229)},'body':JSON['stringify'](_0x5aabfb)});if(!_0x3122d6['ok']){const _0xc0a30=await _0x3122d6['text']();throw new Error(_0xa1be56(0x1f7)+_0xc0a30);}return _0x3122d6[_0xa1be56(0x234)]();},{'label':_0x1417c1[_0x12f9ef(0x201)]});}export async function getFeatureReport(_0x511f8b){const _0x1bd145=_0x2a4f,_0x398580={'YyRRa':function(_0x3f1b48){return _0x3f1b48();},'JhTsJ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','grlBr':_0x1bd145(0x1fc)},_0x40239a=await _0x398580['YyRRa'](getToken);if(!_0x40239a)throw new Error(_0x398580[_0x1bd145(0x1ff)]);const _0x4e683b=getApiBaseUrl(),_0x32e914=await fetch(_0x4e683b+_0x1bd145(0x227)+_0x511f8b+'/report',{'method':_0x398580['grlBr'],'headers':{'Authorization':_0x1bd145(0x210)+_0x40239a}});if(!_0x32e914['ok']){const _0x1ca044=await _0x32e914['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x1ca044);}return _0x32e914[_0x1bd145(0x234)]();}export async function getFeatureReportMarkdown(_0x4dd530,_0x1557e6){const _0x323158=_0x2a4f,_0x26a57c={'hlpVR':function(_0x5d39e2,_0x45de90){return _0x5d39e2>_0x45de90;},'MIsFN':'itemIds','ZIJoe':'style','CCZOd':function(_0x4c70fc,_0x20b0ff,_0x49e848){return _0x4c70fc(_0x20b0ff,_0x49e848);}},_0x10f744=await getToken();if(!_0x10f744)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x7a4ceb=getApiBaseUrl(),_0x179270=new URLSearchParams(),_0xa28957=_0x26a57c[_0x323158(0x219)](_0x1557e6?.[_0x323158(0x1f6)]?.['length']??0x0,0x0),_0x2e9e6d=Boolean(_0x1557e6?.[_0x323158(0x1f9)]);_0xa28957&&_0x1557e6?.[_0x323158(0x1f6)]&&_0x179270['set'](_0x26a57c['MIsFN'],_0x1557e6['itemIds'][_0x323158(0x21d)](','));_0x2e9e6d&&_0x1557e6?.['sessionId']&&_0x179270['set']('sessionId',_0x1557e6[_0x323158(0x1f9)]);!_0xa28957&&!_0x2e9e6d&&_0x1557e6?.[_0x323158(0x20a)]&&_0x179270[_0x323158(0x200)](_0x26a57c['ZIJoe'],_0x1557e6[_0x323158(0x20a)]);const _0x42ca02=_0x7a4ceb+'/api/v1/mcp/features/'+_0x4dd530+_0x323158(0x204),_0x3bae56=''+_0x42ca02+(_0x179270[_0x323158(0x1f4)]()?'?'+_0x179270['toString']():''),_0x276b01=await _0x26a57c['CCZOd'](fetch,_0x3bae56,{'method':_0x323158(0x1fc),'headers':{'Authorization':_0x323158(0x210)+_0x10f744}});if(!_0x276b01['ok']){const _0x3d0a6e=await _0x276b01['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x3d0a6e);}return _0x276b01[_0x323158(0x203)]();}export async function listFeatureSessions(_0x1b8a6f){const _0x5554fd=_0x2a4f,_0x117529={'Dimyc':function(_0x66c23f){return _0x66c23f();},'ujzvP':function(_0x2e0892,_0x2c2ae0,_0x4f68e0){return _0x2e0892(_0x2c2ae0,_0x4f68e0);}},_0x118de5=await getToken();if(!_0x118de5)throw new Error(_0x5554fd(0x22f));const _0xe92d39=_0x117529['Dimyc'](getApiBaseUrl),_0x348a71=await _0x117529[_0x5554fd(0x21b)](fetch,_0xe92d39+'/api/v1/mcp/features/'+_0x1b8a6f+_0x5554fd(0x215),{'method':_0x5554fd(0x1fc),'headers':{'Authorization':'Bearer\x20'+_0x118de5}});if(!_0x348a71['ok']){const _0x10306c=await _0x348a71[_0x5554fd(0x203)]();throw new Error(_0x5554fd(0x209)+_0x10306c);}return _0x348a71['json']();}export async function startSession(_0x2303ca,_0x41f3f1){const _0x3bc638=_0x2a4f,_0x4c32b0={'xOShk':function(_0x555482){return _0x555482();},'lXXpF':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','qsXZk':'POST'},_0x2fadbf=await _0x4c32b0[_0x3bc638(0x202)](getToken);if(!_0x2fadbf)throw new Error(_0x4c32b0['lXXpF']);const _0x504720=getApiBaseUrl(),_0x51e5fc=await fetch(_0x504720+_0x3bc638(0x227)+_0x2303ca+'/sessions/'+_0x41f3f1+'/start',{'method':_0x4c32b0['qsXZk'],'headers':{'Authorization':_0x3bc638(0x210)+_0x2fadbf}});if(!_0x51e5fc['ok']){const _0x367410=await _0x51e5fc['text']();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x367410);}return _0x51e5fc['json']();}export async function concludeSession(_0x4c9eff,_0x29bed3){const _0x6c8899=_0x2a4f,_0x10a4a8={'vrknZ':function(_0x2c6a44){return _0x2c6a44();},'QKEHI':_0x6c8899(0x22f),'nXfoE':function(_0x5ce556,_0x3e6287,_0x5463d9){return _0x5ce556(_0x3e6287,_0x5463d9);}},_0x2d1273=await _0x10a4a8['vrknZ'](getToken);if(!_0x2d1273)throw new Error(_0x10a4a8['QKEHI']);const _0x520f9c=getApiBaseUrl(),_0x57ca78=await _0x10a4a8['nXfoE'](fetch,_0x520f9c+'/api/v1/mcp/features/'+_0x4c9eff+'/sessions/'+_0x29bed3+'/conclude',{'method':_0x6c8899(0x228),'headers':{'Authorization':'Bearer\x20'+_0x2d1273}});if(!_0x57ca78['ok']){const _0x30e39d=await _0x57ca78[_0x6c8899(0x203)]();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x30e39d);}return _0x57ca78[_0x6c8899(0x234)]();}export async function getActionItems(_0x1a4b70){const _0x177f14=_0x2a4f,_0x3255f5={'nULbj':function(_0x14a83f){return _0x14a83f();},'mNvDa':_0x177f14(0x22f)},_0x1bbe64=await _0x3255f5['nULbj'](getToken);if(!_0x1bbe64)throw new Error(_0x3255f5[_0x177f14(0x1f3)]);const _0x2badf9=getApiBaseUrl(),_0x268833=await fetch(_0x2badf9+_0x177f14(0x227)+_0x1a4b70+'/action-items',{'method':'GET','headers':{'Authorization':_0x177f14(0x210)+_0x1bbe64}});if(!_0x268833['ok']){const _0x67029d=await _0x268833['text']();throw new Error(_0x177f14(0x213)+_0x67029d);}return _0x268833[_0x177f14(0x234)]();}export async function getItemFeedback(_0x1736d1,_0xbf3bd9){const _0x53a9ad=_0x2a4f,_0x86ce7b={'ptnrp':function(_0x4fb3ed){return _0x4fb3ed();},'EGsCF':function(_0x3dfcb1,_0x33e9b6,_0x370a6a){return _0x3dfcb1(_0x33e9b6,_0x370a6a);},'bUSeT':'GET'},_0xa21cab=await _0x86ce7b['ptnrp'](getToken);if(!_0xa21cab)throw new Error(_0x53a9ad(0x22f));const _0x1f3bb8=getApiBaseUrl(),_0x5d48c3=await _0x86ce7b['EGsCF'](fetch,_0x1f3bb8+'/api/v1/mcp/features/'+_0x1736d1+_0x53a9ad(0x207)+_0xbf3bd9+'/feedback',{'method':_0x86ce7b[_0x53a9ad(0x1fa)],'headers':{'Authorization':_0x53a9ad(0x210)+_0xa21cab}});if(!_0x5d48c3['ok']){const _0x3f6337=await _0x5d48c3[_0x53a9ad(0x203)]();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x3f6337);}return _0x5d48c3['json']();}export async function markCommentsAddressed(_0x3470a3,_0x527b70,_0x1a634d){const _0x4043a2=_0x2a4f,_0xf6070e={'CVlOd':_0x4043a2(0x22f),'kkNlw':function(_0x96c39d){return _0x96c39d();},'YNMev':'application/json'},_0x28ca64=await getToken();if(!_0x28ca64)throw new Error(_0xf6070e[_0x4043a2(0x216)]);const _0x32d3bd=_0xf6070e['kkNlw'](getApiBaseUrl),_0x52c384=await fetch(_0x32d3bd+_0x4043a2(0x227)+_0x3470a3+'/comments/address',{'method':'POST','headers':{'Authorization':_0x4043a2(0x210)+_0x28ca64,'Content-Type':_0xf6070e['YNMev']},'body':JSON['stringify']({'checklistItemId':_0x527b70,'commentIds':_0x1a634d})});if(!_0x52c384['ok']){const _0x59b6c6=await _0x52c384[_0x4043a2(0x203)]();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0x59b6c6);}}export async function softDeleteFeature(_0x25b1c7){const _0x228b66=_0x2a4f,_0x2eace1={'AGRZw':function(_0x51c9ad){return _0x51c9ad();},'KrTLH':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','llFgf':function(_0x4f2351,_0x3a1ae9,_0x11cddd){return _0x4f2351(_0x3a1ae9,_0x11cddd);}},_0x7fb276=await _0x2eace1[_0x228b66(0x236)](getToken);if(!_0x7fb276)throw new Error(_0x2eace1['KrTLH']);const _0x11c73e=_0x2eace1[_0x228b66(0x236)](getApiBaseUrl),_0xf5a2b7=await _0x2eace1[_0x228b66(0x20d)](fetch,_0x11c73e+_0x228b66(0x227)+_0x25b1c7,{'method':'DELETE','headers':{'Authorization':_0x228b66(0x210)+_0x7fb276}});if(!_0xf5a2b7['ok']){const _0x32e4fa=await _0xf5a2b7[_0x228b66(0x203)]();throw new Error(_0x228b66(0x22a)+_0x32e4fa);}}export async function restoreFeature(_0x3eddda){const _0x495a80=_0x2a4f,_0x19d084={'qrByu':function(_0x19494e){return _0x19494e();},'vwkuO':'POST'},_0x29b764=await _0x19d084['qrByu'](getToken);if(!_0x29b764)throw new Error(_0x495a80(0x22f));const _0x4391a1=_0x19d084[_0x495a80(0x232)](getApiBaseUrl),_0x3bbff8=await fetch(_0x4391a1+'/api/v1/mcp/features/'+_0x3eddda+'/restore',{'method':_0x19d084[_0x495a80(0x21e)],'headers':{'Authorization':'Bearer\x20'+_0x29b764}});if(!_0x3bbff8['ok']){const _0x58ca5f=await _0x3bbff8[_0x495a80(0x203)]();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x58ca5f);}}
1
+ (function(_0x4a48a9,_0x1fd040){const _0xdd475b=_0x21b4,_0x4ae001=_0x4a48a9();while(!![]){try{const _0x56e54b=parseInt(_0xdd475b(0xa3))/0x1*(parseInt(_0xdd475b(0xa8))/0x2)+parseInt(_0xdd475b(0x72))/0x3+-parseInt(_0xdd475b(0x8b))/0x4*(-parseInt(_0xdd475b(0x77))/0x5)+parseInt(_0xdd475b(0x88))/0x6*(-parseInt(_0xdd475b(0xa9))/0x7)+parseInt(_0xdd475b(0xac))/0x8+-parseInt(_0xdd475b(0xae))/0x9+parseInt(_0xdd475b(0x7b))/0xa*(-parseInt(_0xdd475b(0x92))/0xb);if(_0x56e54b===_0x1fd040)break;else _0x4ae001['push'](_0x4ae001['shift']());}catch(_0x27aee1){_0x4ae001['push'](_0x4ae001['shift']());}}}(_0x5743,0x60430));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0xa9de8){const _0x177381=_0x21b4,_0xa54cd7={'bioVY':function(_0x25ef9f){return _0x25ef9f();},'NcLlg':_0x177381(0x89),'UGlak':_0x177381(0x6d),'OPmkY':function(_0x399d7c,_0x4ad2eb){return _0x399d7c===_0x4ad2eb;}},_0x194aa2=await _0xa54cd7['bioVY'](getToken);if(!_0x194aa2)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2dc5a2=getApiBaseUrl(),_0x4c96bd=await fetch(_0x2dc5a2+'/api/v1/mcp/features',{'method':_0xa54cd7[_0x177381(0x7f)],'headers':{'Authorization':_0x177381(0x6b)+_0x194aa2,'Content-Type':_0xa54cd7[_0x177381(0x80)]},'body':JSON[_0x177381(0x67)](_0xa9de8)});if(!_0x4c96bd['ok']){if(_0xa54cd7[_0x177381(0x66)](_0x4c96bd['status'],0x192)){const _0x149eb8=await _0x4c96bd['json'](),_0x16dc49=_0x149eb8[_0x177381(0x6e)]||_0x177381(0x9a);throw new Error((_0x149eb8['message']||_0x177381(0x97))+_0x177381(0x87)+_0x16dc49);}const _0xd37ab2=await _0x4c96bd['text']();throw new Error(_0x177381(0x86)+_0xd37ab2);}return _0x4c96bd[_0x177381(0x9d)]();}export async function listFeatures(_0x3fc7ad){const _0x5eaed9=_0x21b4,_0xa1229={'RfVLL':function(_0x19d582){return _0x19d582();},'RbFIC':function(_0x4a17ee){return _0x4a17ee();},'ICvUi':_0x5eaed9(0xa4),'FCHol':_0x5eaed9(0xab),'acAmz':function(_0x4b5d5a,_0xa27d4d,_0x583669){return _0x4b5d5a(_0xa27d4d,_0x583669);}},_0x4500b1=await _0xa1229['RfVLL'](getToken);if(!_0x4500b1)throw new Error(_0x5eaed9(0xa2));const _0x45374d=_0xa1229[_0x5eaed9(0x76)](getApiBaseUrl),_0x51d531=new URLSearchParams();if(_0x3fc7ad?.[_0x5eaed9(0x7c)])_0x51d531['set']('gitRepoUrl',_0x3fc7ad[_0x5eaed9(0x7c)]);if(_0x3fc7ad?.[_0x5eaed9(0x6a)])_0x51d531[_0x5eaed9(0x90)](_0x5eaed9(0x6a),_0x3fc7ad[_0x5eaed9(0x6a)]);if(_0x3fc7ad?.['limit'])_0x51d531['set']('limit',_0x3fc7ad[_0x5eaed9(0x91)]['toString']());if(_0x3fc7ad?.['offset'])_0x51d531['set'](_0xa1229[_0x5eaed9(0x69)],_0x3fc7ad['offset'][_0x5eaed9(0x8d)]());if(_0x3fc7ad?.[_0x5eaed9(0x68)])_0x51d531['set']('includeDeleted',_0xa1229['FCHol']);const _0x59e35f=_0x45374d+'/api/v1/mcp/features'+(_0x51d531[_0x5eaed9(0x8d)]()?'?'+_0x51d531['toString']():''),_0x1cb5f6=await _0xa1229[_0x5eaed9(0x9b)](fetch,_0x59e35f,{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x4500b1}});if(!_0x1cb5f6['ok']){const _0x48b6fa=await _0x1cb5f6['text']();throw new Error(_0x5eaed9(0x93)+_0x48b6fa);}return _0x1cb5f6[_0x5eaed9(0x9d)]();}export async function getFeature(_0x388eae){const _0x3fee2f=_0x21b4,_0x5d71da={'wtcYF':function(_0xa93b2d){return _0xa93b2d();},'wasAV':_0x3fee2f(0xa2),'oNfxv':_0x3fee2f(0xaa)},_0x12616c=await _0x5d71da[_0x3fee2f(0x64)](getToken);if(!_0x12616c)throw new Error(_0x5d71da['wasAV']);const _0x595319=getApiBaseUrl(),_0x5626e5=await fetch(_0x595319+_0x3fee2f(0x7e)+_0x388eae,{'method':_0x5d71da['oNfxv'],'headers':{'Authorization':'Bearer\x20'+_0x12616c}});if(!_0x5626e5['ok']){const _0x1f2f10=await _0x5626e5['text']();throw new Error(_0x3fee2f(0x79)+_0x1f2f10);}return _0x5626e5['json']();}export async function updateFeature(_0x30a517,_0x20a9cc){const _0x5332ca=_0x21b4,_0x1ac167={'FVfVy':function(_0x7f114d){return _0x7f114d();},'cCizg':function(_0x3f583e){return _0x3f583e();},'fOjgX':'PATCH'},_0x308e97=await _0x1ac167['FVfVy'](getToken);if(!_0x308e97)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x385c2c=_0x1ac167['cCizg'](getApiBaseUrl),_0x13394b=await fetch(_0x385c2c+'/api/v1/mcp/features/'+_0x30a517,{'method':_0x1ac167['fOjgX'],'headers':{'Authorization':'Bearer\x20'+_0x308e97,'Content-Type':'application/json'},'body':JSON['stringify'](_0x20a9cc)});if(!_0x13394b['ok']){const _0xfc1e3c=await _0x13394b[_0x5332ca(0xa0)]();throw new Error(_0x5332ca(0x84)+_0xfc1e3c);}return _0x13394b['json']();}export async function createChecklistItem(_0x344254,_0x5f485c,_0x44c54e){const _0x9d0558=_0x21b4,_0x3efd91={'wMkOy':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','MJQJx':function(_0x5b3c0a,_0x21918f,_0x2e1a27){return _0x5b3c0a(_0x21918f,_0x2e1a27);},'coqMz':_0x9d0558(0x89),'QLXZq':_0x9d0558(0x6d)},_0x572a8e=await getToken();if(!_0x572a8e)throw new Error(_0x3efd91[_0x9d0558(0x75)]);const _0x48353a=getApiBaseUrl(),_0x2e358f=await _0x3efd91[_0x9d0558(0x9c)](fetch,_0x48353a+'/api/v1/mcp/features/'+_0x344254+'/checklist',{'method':_0x3efd91['coqMz'],'headers':{'Authorization':_0x9d0558(0x6b)+_0x572a8e,'Content-Type':_0x3efd91['QLXZq']},'body':JSON[_0x9d0558(0x67)]({'description':_0x5f485c,'position':_0x44c54e})});if(!_0x2e358f['ok']){const _0x34dc0a=await _0x2e358f[_0x9d0558(0xa0)]();throw new Error('Failed\x20to\x20create\x20scenario:\x20'+_0x34dc0a);}return _0x2e358f[_0x9d0558(0x9d)]();}export async function updateChecklistItem(_0x5d76ab,_0x4e0d44,_0x5574ac){const _0x38942e=_0x21b4,_0x4eafbb={'qzrLB':function(_0x3cb1eb,_0x373340,_0x398391){return _0x3cb1eb(_0x373340,_0x398391);},'zDzde':_0x38942e(0x7d)};return withRetry(async()=>{const _0x4e58b1=_0x38942e,_0x13c683=await getToken();if(!_0x13c683)throw new Error(_0x4e58b1(0xa2));const _0x2be168=getApiBaseUrl(),_0x4f6bcb=await _0x4eafbb['qzrLB'](fetch,_0x2be168+_0x4e58b1(0x7e)+_0x5d76ab+_0x4e58b1(0x83)+_0x4e0d44,{'method':_0x4e58b1(0xb0),'headers':{'Authorization':_0x4e58b1(0x6b)+_0x13c683,'Content-Type':'application/json'},'body':JSON[_0x4e58b1(0x67)](_0x5574ac)});if(!_0x4f6bcb['ok']){const _0x34b657=await _0x4f6bcb[_0x4e58b1(0xa0)]();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x34b657);}return _0x4f6bcb[_0x4e58b1(0x9d)]();},{'label':_0x4eafbb['zDzde']});}function _0x21b4(_0x1b6c02,_0x2512e9){_0x1b6c02=_0x1b6c02-0x64;const _0x57432e=_0x5743();let _0x21b413=_0x57432e[_0x1b6c02];return _0x21b413;}export async function getFeatureReport(_0x36dda8){const _0x546e4b=_0x21b4,_0x534a27={'DMiUG':function(_0x97b246){return _0x97b246();},'rHpqv':_0x546e4b(0xa2),'RXTBo':function(_0x318b54,_0x4775aa,_0x3269c7){return _0x318b54(_0x4775aa,_0x3269c7);},'Mzzfc':_0x546e4b(0xaa)},_0x4acf35=await _0x534a27[_0x546e4b(0xa1)](getToken);if(!_0x4acf35)throw new Error(_0x534a27['rHpqv']);const _0x50f9ee=getApiBaseUrl(),_0x3154b6=await _0x534a27['RXTBo'](fetch,_0x50f9ee+_0x546e4b(0x7e)+_0x36dda8+'/report',{'method':_0x534a27[_0x546e4b(0x96)],'headers':{'Authorization':_0x546e4b(0x6b)+_0x4acf35}});if(!_0x3154b6['ok']){const _0x248920=await _0x3154b6['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x248920);}return _0x3154b6[_0x546e4b(0x9d)]();}function _0x5743(){const _0x4c8bbb=['Feature\x20limit\x20exceeded','xzlmm','GFNAI','https://dashboard.ranger.net/billing','acAmz','MJQJx','json','rGyNS','eiRuC','text','DMiUG','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','5jbvrbp','offset','Failed\x20to\x20get\x20item\x20feedback:\x20','/comments/address','/sessions/','313430bWoUwO','28KedvRf','GET','true','2280200aqcTeo','itemIds','5420268PfotmT','/action-items','PATCH','wtcYF','/checklist-items/','OPmkY','stringify','includeDeleted','ICvUi','gitBranch','Bearer\x20','Failed\x20to\x20conclude\x20session:\x20','application/json','billingUrl','Failed\x20to\x20delete\x20feature\x20review:\x20','TNohd','YJwox','636039iRaCcR','xWMcM','Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20','wMkOy','RbFIC','5qOgSwB','nODYS','Failed\x20to\x20get\x20feature\x20review:\x20','AMFxC','6740MKcBno','gitRepoUrl','updateChecklistItem','/api/v1/mcp/features/','NcLlg','UGlak','ccACI','LLdSd','/checklist/','Failed\x20to\x20update\x20feature\x20review:\x20','MvHNS','Failed\x20to\x20create\x20feature\x20review:\x20','\x0a\x0aUpgrade\x20your\x20plan:\x20','1004082RrCYcY','POST','sessionId','1889044qittgx','length','toString','HZJCN','/start','set','limit','1419oKCwnf','Failed\x20to\x20list\x20feature\x20reviews:\x20','wZuGO','Failed\x20to\x20get\x20action\x20items:\x20','Mzzfc'];_0x5743=function(){return _0x4c8bbb;};return _0x5743();}export async function getFeatureReportMarkdown(_0x328528,_0x254aa1){const _0x27042a=_0x21b4,_0x55eee8={'AMFxC':_0x27042a(0xa2),'wQDqi':function(_0x4a05cb){return _0x4a05cb();},'oGEVa':_0x27042a(0x8a),'RFYWE':function(_0x425c27,_0x23f95a){return _0x425c27&&_0x23f95a;},'eiRuC':function(_0x26a9c9,_0x17a10c,_0x17be0d){return _0x26a9c9(_0x17a10c,_0x17be0d);}},_0x2233d6=await getToken();if(!_0x2233d6)throw new Error(_0x55eee8[_0x27042a(0x7a)]);const _0x538d73=_0x55eee8['wQDqi'](getApiBaseUrl),_0x38cd72=new URLSearchParams(),_0x1e6b3a=(_0x254aa1?.['itemIds']?.[_0x27042a(0x8c)]??0x0)>0x0,_0x4ddcf0=Boolean(_0x254aa1?.['sessionId']);_0x1e6b3a&&_0x254aa1?.[_0x27042a(0xad)]&&_0x38cd72['set'](_0x27042a(0xad),_0x254aa1['itemIds']['join'](','));_0x4ddcf0&&_0x254aa1?.['sessionId']&&_0x38cd72['set'](_0x55eee8['oGEVa'],_0x254aa1[_0x27042a(0x8a)]);_0x55eee8['RFYWE'](!_0x1e6b3a,!_0x4ddcf0)&&_0x254aa1?.['style']&&_0x38cd72['set']('style',_0x254aa1['style']);const _0x4444f2=_0x538d73+'/api/v1/mcp/features/'+_0x328528+'/report/markdown',_0x230661=''+_0x4444f2+(_0x38cd72[_0x27042a(0x8d)]()?'?'+_0x38cd72[_0x27042a(0x8d)]():''),_0x74a215=await _0x55eee8[_0x27042a(0x9f)](fetch,_0x230661,{'method':_0x27042a(0xaa),'headers':{'Authorization':_0x27042a(0x6b)+_0x2233d6}});if(!_0x74a215['ok']){const _0x2e0a45=await _0x74a215['text']();throw new Error(_0x27042a(0x74)+_0x2e0a45);}return _0x74a215['text']();}export async function listFeatureSessions(_0x3b4998){const _0x1e9367=_0x21b4,_0x2aadb2={'MvHNS':function(_0x1f6e23){return _0x1f6e23();},'HZJCN':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','EkYvu':_0x1e9367(0xaa)},_0x43491c=await _0x2aadb2[_0x1e9367(0x85)](getToken);if(!_0x43491c)throw new Error(_0x2aadb2[_0x1e9367(0x8e)]);const _0x465551=_0x2aadb2['MvHNS'](getApiBaseUrl),_0x4bd115=await fetch(_0x465551+'/api/v1/mcp/features/'+_0x3b4998+'/sessions',{'method':_0x2aadb2['EkYvu'],'headers':{'Authorization':'Bearer\x20'+_0x43491c}});if(!_0x4bd115['ok']){const _0x330a9b=await _0x4bd115[_0x1e9367(0xa0)]();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x330a9b);}return _0x4bd115[_0x1e9367(0x9d)]();}export async function startSession(_0x5482cd,_0xcca3b1){const _0x32ea5a=_0x21b4,_0x420406={'LzzAO':function(_0x5cee5c){return _0x5cee5c();},'nODYS':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','wZuGO':function(_0x3d2ec3,_0x3cd63b,_0x2b8c47){return _0x3d2ec3(_0x3cd63b,_0x2b8c47);},'ogZib':'POST'},_0x516f34=await _0x420406['LzzAO'](getToken);if(!_0x516f34)throw new Error(_0x420406[_0x32ea5a(0x78)]);const _0x5e1c13=getApiBaseUrl(),_0x4f2e96=await _0x420406[_0x32ea5a(0x94)](fetch,_0x5e1c13+_0x32ea5a(0x7e)+_0x5482cd+_0x32ea5a(0xa7)+_0xcca3b1+_0x32ea5a(0x8f),{'method':_0x420406['ogZib'],'headers':{'Authorization':'Bearer\x20'+_0x516f34}});if(!_0x4f2e96['ok']){const _0xc6624=await _0x4f2e96['text']();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0xc6624);}return _0x4f2e96[_0x32ea5a(0x9d)]();}export async function concludeSession(_0x39c4a2,_0x45e389){const _0x630219=_0x21b4,_0x7f0bea={'unJIB':function(_0x5cf4e5){return _0x5cf4e5();},'xHeJL':function(_0x550c20,_0xadd89d,_0x3b9fb5){return _0x550c20(_0xadd89d,_0x3b9fb5);},'GFNAI':_0x630219(0x89)},_0x2cef72=await _0x7f0bea['unJIB'](getToken);if(!_0x2cef72)throw new Error(_0x630219(0xa2));const _0x547c3e=getApiBaseUrl(),_0x4eda49=await _0x7f0bea['xHeJL'](fetch,_0x547c3e+_0x630219(0x7e)+_0x39c4a2+'/sessions/'+_0x45e389+'/conclude',{'method':_0x7f0bea[_0x630219(0x99)],'headers':{'Authorization':'Bearer\x20'+_0x2cef72}});if(!_0x4eda49['ok']){const _0x59c7b8=await _0x4eda49['text']();throw new Error(_0x630219(0x6c)+_0x59c7b8);}return _0x4eda49[_0x630219(0x9d)]();}export async function getActionItems(_0x4be22d){const _0x4fa04a=_0x21b4,_0x5246bd={'xWMcM':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','LLdSd':function(_0x42244b){return _0x42244b();},'ajGzT':function(_0x32fcd1,_0x4df8d5,_0x2a0652){return _0x32fcd1(_0x4df8d5,_0x2a0652);}},_0x28b75e=await getToken();if(!_0x28b75e)throw new Error(_0x5246bd[_0x4fa04a(0x73)]);const _0x52aed8=_0x5246bd[_0x4fa04a(0x82)](getApiBaseUrl),_0x45b246=await _0x5246bd['ajGzT'](fetch,_0x52aed8+_0x4fa04a(0x7e)+_0x4be22d+_0x4fa04a(0xaf),{'method':'GET','headers':{'Authorization':_0x4fa04a(0x6b)+_0x28b75e}});if(!_0x45b246['ok']){const _0x47d69e=await _0x45b246['text']();throw new Error(_0x4fa04a(0x95)+_0x47d69e);}return _0x45b246[_0x4fa04a(0x9d)]();}export async function getItemFeedback(_0x51c413,_0x215cc9){const _0x383e82=_0x21b4,_0x39c0b4={'JEFZk':_0x383e82(0xaa)},_0x53c567=await getToken();if(!_0x53c567)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x8178ec=getApiBaseUrl(),_0x1739e5=await fetch(_0x8178ec+_0x383e82(0x7e)+_0x51c413+_0x383e82(0x65)+_0x215cc9+'/feedback',{'method':_0x39c0b4['JEFZk'],'headers':{'Authorization':'Bearer\x20'+_0x53c567}});if(!_0x1739e5['ok']){const _0x2d480a=await _0x1739e5['text']();throw new Error(_0x383e82(0xa5)+_0x2d480a);}return _0x1739e5['json']();}export async function markCommentsAddressed(_0x37a943,_0x1b6c14,_0x384688){const _0xe4c582=_0x21b4,_0x4c13ae={'WOFnA':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','oywrE':function(_0x955e33){return _0x955e33();},'uUOjX':function(_0x10275b,_0x4422f0,_0x31cf3f){return _0x10275b(_0x4422f0,_0x31cf3f);},'HntLp':_0xe4c582(0x89)},_0x2ff2cf=await getToken();if(!_0x2ff2cf)throw new Error(_0x4c13ae['WOFnA']);const _0x2f2489=_0x4c13ae['oywrE'](getApiBaseUrl),_0x519381=await _0x4c13ae['uUOjX'](fetch,_0x2f2489+'/api/v1/mcp/features/'+_0x37a943+_0xe4c582(0xa6),{'method':_0x4c13ae['HntLp'],'headers':{'Authorization':'Bearer\x20'+_0x2ff2cf,'Content-Type':_0xe4c582(0x6d)},'body':JSON[_0xe4c582(0x67)]({'checklistItemId':_0x1b6c14,'commentIds':_0x384688})});if(!_0x519381['ok']){const _0x55efe9=await _0x519381[_0xe4c582(0xa0)]();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0x55efe9);}}export async function softDeleteFeature(_0xc933f1){const _0x14a74b=_0x21b4,_0x15ba12={'TNohd':function(_0x18b4dd){return _0x18b4dd();},'oJQUf':function(_0x3927f5,_0x13abb4,_0xd72bbf){return _0x3927f5(_0x13abb4,_0xd72bbf);},'YJwox':'DELETE'},_0x11ec0f=await getToken();if(!_0x11ec0f)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1ff6ea=_0x15ba12[_0x14a74b(0x70)](getApiBaseUrl),_0x250dd9=await _0x15ba12['oJQUf'](fetch,_0x1ff6ea+'/api/v1/mcp/features/'+_0xc933f1,{'method':_0x15ba12[_0x14a74b(0x71)],'headers':{'Authorization':'Bearer\x20'+_0x11ec0f}});if(!_0x250dd9['ok']){const _0x5cb5a3=await _0x250dd9[_0x14a74b(0xa0)]();throw new Error(_0x14a74b(0x6f)+_0x5cb5a3);}}export async function restoreFeature(_0x10f0b9){const _0x4e4d09=_0x21b4,_0x3c4417={'rGyNS':function(_0xc70b67){return _0xc70b67();},'xzlmm':_0x4e4d09(0xa2),'gHPSD':function(_0x202f71,_0x315a8a,_0x38c8ba){return _0x202f71(_0x315a8a,_0x38c8ba);},'ccACI':'POST'},_0x4d2e4c=await _0x3c4417[_0x4e4d09(0x9e)](getToken);if(!_0x4d2e4c)throw new Error(_0x3c4417[_0x4e4d09(0x98)]);const _0xea2c5a=_0x3c4417[_0x4e4d09(0x9e)](getApiBaseUrl),_0xe5f2f4=await _0x3c4417['gHPSD'](fetch,_0xea2c5a+'/api/v1/mcp/features/'+_0x10f0b9+'/restore',{'method':_0x3c4417[_0x4e4d09(0x81)],'headers':{'Authorization':_0x4e4d09(0x6b)+_0x4d2e4c}});if(!_0xe5f2f4['ok']){const _0x8a588=await _0xe5f2f4[_0x4e4d09(0xa0)]();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x8a588);}}
@@ -1 +1 @@
1
- const _0x4359d2=_0x5748;(function(_0x3e81c7,_0x3892ae){const _0x2330c3=_0x5748,_0x4ebd4d=_0x3e81c7();while(!![]){try{const _0x481ea6=parseInt(_0x2330c3(0xd7))/0x1+-parseInt(_0x2330c3(0xd1))/0x2+-parseInt(_0x2330c3(0xf6))/0x3+-parseInt(_0x2330c3(0xf5))/0x4+-parseInt(_0x2330c3(0x10f))/0x5*(-parseInt(_0x2330c3(0xfb))/0x6)+-parseInt(_0x2330c3(0x103))/0x7*(parseInt(_0x2330c3(0x10e))/0x8)+-parseInt(_0x2330c3(0x104))/0x9;if(_0x481ea6===_0x3892ae)break;else _0x4ebd4d['push'](_0x4ebd4d['shift']());}catch(_0x5db186){_0x4ebd4d['push'](_0x4ebd4d['shift']());}}}(_0x3d08,0xb32ec));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(_0x25432d,_0x506aab){const _0x4cddd5=_0x5748,_0x5bafb0={'briyW':function(_0x92b9ae,_0x137f4f){return _0x92b9ae>=_0x137f4f;},'xLhBM':function(_0x440680,_0x3db06e){return _0x440680>_0x3db06e;},'NqEyV':function(_0xd1f79e,_0x4ff722){return _0xd1f79e+_0x4ff722;},'FhDxZ':function(_0x3f6357,_0x155ad7){return _0x3f6357&_0x155ad7;},'zKPkE':function(_0x2a8cb9,_0x55643b){return _0x2a8cb9-_0x55643b;}};if(_0x5bafb0['briyW'](_0x506aab,_0x25432d[_0x4cddd5(0xd3)]))return[0x0,0x0];const _0x32fae2=_0x25432d[_0x506aab];let _0x597541=0x1,_0xab8453=0x80;while(_0x597541<=0x8&&!(_0x32fae2&_0xab8453)){_0x597541++,_0xab8453>>=0x1;}if(_0x5bafb0[_0x4cddd5(0x100)](_0x5bafb0[_0x4cddd5(0xf4)](_0x506aab,_0x597541),_0x25432d['length']))return[0x0,0x0];let _0x1b71ed=_0x5bafb0['FhDxZ'](_0x32fae2,_0x5bafb0['zKPkE'](_0xab8453,0x1));for(let _0x330cdd=0x1;_0x330cdd<_0x597541;_0x330cdd++){_0x1b71ed=_0x1b71ed*0x100+_0x25432d[_0x5bafb0[_0x4cddd5(0xf4)](_0x506aab,_0x330cdd)];}return[_0x1b71ed,_0x597541];}function readId(_0x562c33,_0x5c31f3){const _0x7236b4=_0x5748,_0x35c9ce={'LpOav':function(_0x274a22,_0x83783d){return _0x274a22>=_0x83783d;},'itbiH':function(_0x1a9f0d,_0x1ee0d9){return _0x1a9f0d>_0x1ee0d9;},'wFiaG':function(_0x572cf7,_0x1eea1b){return _0x572cf7+_0x1eea1b;},'rqbYC':function(_0x1ecee7,_0x65fa1c){return _0x1ecee7+_0x65fa1c;},'DcTbL':function(_0x4684bd,_0x2acb43){return _0x4684bd*_0x2acb43;}};if(_0x5c31f3>=_0x562c33[_0x7236b4(0xd3)])return[0x0,0x0];const _0x4e4bfc=_0x562c33[_0x5c31f3];let _0x5af146;if(_0x4e4bfc>=0x80)_0x5af146=0x1;else{if(_0x35c9ce[_0x7236b4(0xe2)](_0x4e4bfc,0x40))_0x5af146=0x2;else{if(_0x35c9ce['LpOav'](_0x4e4bfc,0x20))_0x5af146=0x3;else{if(_0x4e4bfc>=0x10)_0x5af146=0x4;else return[_0x4e4bfc,0x1];}}}if(_0x35c9ce['itbiH'](_0x35c9ce[_0x7236b4(0xe8)](_0x5c31f3,_0x5af146),_0x562c33[_0x7236b4(0xd3)]))return[0x0,0x0];let _0x2676fa=0x0;for(let _0x5d17be=0x0;_0x5d17be<_0x5af146;_0x5d17be++){_0x2676fa=_0x35c9ce['rqbYC'](_0x35c9ce[_0x7236b4(0x107)](_0x2676fa,0x100),_0x562c33[_0x35c9ce[_0x7236b4(0xcf)](_0x5c31f3,_0x5d17be)]);}return[_0x2676fa,_0x5af146];}function readUint(_0x33c340,_0x89a8e2,_0x57b5a1){const _0x7d4fcc={'rFnuD':function(_0x55bc02,_0x38b2ab){return _0x55bc02<_0x38b2ab;}};let _0x468fce=0x0;for(let _0x2fbbbf=0x0;_0x7d4fcc['rFnuD'](_0x2fbbbf,_0x57b5a1);_0x2fbbbf++){_0x468fce=_0x468fce*0x100+_0x33c340[_0x89a8e2+_0x2fbbbf];}return _0x468fce;}function isUnknownSize(_0x309519,_0x324eaa){const _0x1bbdc1=_0x5748,_0x5dfc78={'zhgvn':function(_0x5c2d0f,_0x527e7c){return _0x5c2d0f===_0x527e7c;},'wNMju':function(_0x26ebfc,_0x5ecacc){return _0x26ebfc-_0x5ecacc;},'bGAzw':function(_0x55d03f,_0x3ba17c){return _0x55d03f*_0x3ba17c;}};return _0x5dfc78[_0x1bbdc1(0xe3)](_0x309519,_0x5dfc78['wNMju'](Math['pow'](0x2,_0x5dfc78['bGAzw'](0x7,_0x324eaa)),0x1));}function writeId(_0x2b0e00){const _0x1c554f=_0x5748,_0x24b3bf={'lEFaZ':function(_0x18e0a4,_0x12ed33){return _0x18e0a4<=_0x12ed33;},'IdXWc':function(_0x3293c5,_0x42a9b5){return _0x3293c5<=_0x42a9b5;},'cPJhG':function(_0x4b7d1f,_0x2e58a8){return _0x4b7d1f>>_0x2e58a8;},'nArkN':function(_0x12cd56,_0x24cc8f){return _0x12cd56&_0x24cc8f;}};if(_0x24b3bf[_0x1c554f(0xcd)](_0x2b0e00,0xff))return Buffer['from']([_0x2b0e00]);if(_0x24b3bf[_0x1c554f(0xf1)](_0x2b0e00,0xffff))return Buffer[_0x1c554f(0xdf)]([_0x24b3bf['cPJhG'](_0x2b0e00,0x8)&0xff,_0x24b3bf['nArkN'](_0x2b0e00,0xff)]);if(_0x2b0e00<=0xffffff)return Buffer['from']([_0x24b3bf['nArkN'](_0x2b0e00>>0x10,0xff),_0x24b3bf[_0x1c554f(0xeb)](_0x2b0e00,0x8)&0xff,_0x24b3bf[_0x1c554f(0xea)](_0x2b0e00,0xff)]);return Buffer['from']([_0x2b0e00>>0x18&0xff,_0x24b3bf['nArkN'](_0x2b0e00>>0x10,0xff),_0x24b3bf[_0x1c554f(0xeb)](_0x2b0e00,0x8)&0xff,_0x24b3bf['nArkN'](_0x2b0e00,0xff)]);}function writeVint(_0x1cce71,_0x87652a){const _0x41629f=_0x5748,_0x34dbd1={'qvHil':function(_0x44ca43,_0x412f88){return _0x44ca43||_0x412f88;},'CGdFl':function(_0x3cb225,_0x30a296){return _0x3cb225-_0x30a296;},'BXeNz':function(_0x2c82f8,_0x2f871b){return _0x2c82f8*_0x2f871b;},'mLrGH':function(_0x243af8,_0x10725c){return _0x243af8>=_0x10725c;},'KRheY':function(_0x592d6d,_0xc56c0c){return _0x592d6d&_0xc56c0c;}};let _0x1f071=_0x34dbd1['qvHil'](_0x87652a,0x1);while(_0x34dbd1['CGdFl'](Math['pow'](0x2,_0x34dbd1['BXeNz'](0x7,_0x1f071)),0x2)<_0x1cce71)_0x1f071++;const _0xcbe62a=Buffer[_0x41629f(0x102)](_0x1f071);for(let _0xc5ce13=_0x1f071-0x1;_0x34dbd1['mLrGH'](_0xc5ce13,0x0);_0xc5ce13--){_0xcbe62a[_0xc5ce13]=_0x34dbd1['KRheY'](_0x1cce71,0xff),_0x1cce71=Math['floor'](_0x1cce71/0x100);}return _0xcbe62a[0x0]|=0x1<<_0x34dbd1[_0x41629f(0x10b)](0x8,_0x1f071),_0xcbe62a;}function writeFloat64(_0x57bc9e){const _0x1cc40b=Buffer['alloc'](0x8);return _0x1cc40b['writeDoubleBE'](_0x57bc9e,0x0),_0x1cc40b;}function _0x3d08(){const _0x570943=['error','DcTbL','exit','EXejQ','djAFY','CGdFl','XEKcC','RJVwT','62824vhMotD','10uaxJfA','utpxc','dataOffset','lEFaZ','Fixed:\x20','rqbYC','fixWebmDuration.js','30036mzPcap','hEpHW','length','Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment','Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>','idLen','1305944lUNNvp','zBMwr','iiOZJ','concat','endsWith','TCUwB','EiSDp','nAdkP','from','offset','EvefU','LpOav','zhgvn','log','FDYDH','QJDJN','pow','wFiaG','ocOeN','nArkN','cPJhG','NLyrJ','slice','KwMqn','readInt16BE','SfsmM','IdXWc','xtHTF','jXfOs','NqEyV','3759124MFellh','977622BTfwgc','yGlOe','sizeLen','yizbC','EHxGo','2536014EXVLCP','BHouC','JHhYX','Zzftp','dataSize','xLhBM','zWIFh','alloc','21ZPNkwc','1018062mMOINo','ixOUW'];_0x3d08=function(){return _0x570943;};return _0x3d08();}function writeVoid(_0x3ddc1f){const _0x423cf3=_0x5748,_0x38438f={'HEuqS':function(_0x115306,_0x28e410){return _0x115306<=_0x28e410;},'OLcfu':function(_0x450578,_0x1e55c0){return _0x450578-_0x1e55c0;},'dLKBs':function(_0x204dd1,_0x44ba7e){return _0x204dd1*_0x44ba7e;}};for(let _0x2b1803=0x1;_0x2b1803<=0x8;_0x2b1803++){const _0x4f3f82=_0x3ddc1f-0x1-_0x2b1803;if(_0x4f3f82>=0x0&&_0x38438f['HEuqS'](_0x4f3f82,_0x38438f['OLcfu'](Math[_0x423cf3(0xe7)](0x2,_0x38438f['dLKBs'](0x7,_0x2b1803)),0x2)))return Buffer[_0x423cf3(0xda)]([Buffer['from']([ID_VOID]),writeVint(_0x4f3f82,_0x2b1803),Buffer[_0x423cf3(0x102)](_0x4f3f82)]);}return Buffer['alloc'](0x0);}function findElement(_0x4e9bdc,_0x3807d4,_0x35287e,_0x2fee1a){const _0x3cfad1=_0x5748,_0x7df3fa={'InWEZ':function(_0x1c0464,_0x496124){return _0x1c0464<_0x496124;},'RJVwT':function(_0x32cf67,_0xe522cf){return _0x32cf67+_0xe522cf;},'sNSRW':function(_0x259afa,_0xe7ba91,_0x7f35c7){return _0x259afa(_0xe7ba91,_0x7f35c7);}};let _0x1f5337=_0x3807d4;while(_0x7df3fa['InWEZ'](_0x1f5337,_0x35287e)){const [_0x52007c,_0x66ee3f]=readId(_0x4e9bdc,_0x1f5337),[_0x2a5818,_0x2229e6]=readVint(_0x4e9bdc,_0x7df3fa[_0x3cfad1(0x10d)](_0x1f5337,_0x66ee3f));if(_0x52007c===_0x2fee1a)return{'offset':_0x1f5337,'idLen':_0x66ee3f,'sizeLen':_0x2229e6,'dataSize':_0x2a5818,'dataOffset':_0x7df3fa[_0x3cfad1(0x10d)](_0x7df3fa[_0x3cfad1(0x10d)](_0x1f5337,_0x66ee3f),_0x2229e6)};if(_0x7df3fa['sNSRW'](isUnknownSize,_0x2a5818,_0x2229e6))break;_0x1f5337+=_0x7df3fa[_0x3cfad1(0x10d)](_0x66ee3f,_0x2229e6)+_0x2a5818;}return null;}function computeDurationMs(_0x35644e,_0x4a1f45){const _0x2e397d=_0x5748,_0x194e44={'FDYDH':function(_0x519e0d,_0x15c1dc){return _0x519e0d===_0x15c1dc;},'iiOZJ':function(_0x269720,_0x26814c){return _0x269720<_0x26814c;},'SfsmM':function(_0x369eda,_0x222ed9){return _0x369eda!==_0x222ed9;},'EiSDp':function(_0x5ea831,_0x15a06e){return _0x5ea831+_0x15a06e;},'KwMqn':function(_0x2d5f86,_0x5dc70d){return _0x2d5f86-_0x5dc70d;},'zBMwr':function(_0x10914f,_0x37828a,_0x3392af){return _0x10914f(_0x37828a,_0x3392af);},'EXejQ':function(_0x4005d4,_0x5f288e){return _0x4005d4+_0x5f288e;},'NFIpe':function(_0x54d138,_0x596b5b){return _0x54d138+_0x596b5b;},'hEpHW':function(_0x592103,_0x528b0b,_0x4b5d8f){return _0x592103(_0x528b0b,_0x4b5d8f);},'TCUwB':function(_0x338555,_0x4bb864){return _0x338555/_0x4bb864;},'pHYQU':function(_0x140d24,_0x57d9da){return _0x140d24+_0x57d9da;},'PpgEz':function(_0x200c90,_0x56035a){return _0x200c90>_0x56035a;},'MwrOR':function(_0x318bda,_0x2119fd,_0x2d5e72){return _0x318bda(_0x2119fd,_0x2d5e72);}};let _0x47228b=0x0;const _0x1b2c9e=Buffer[_0x2e397d(0xdf)]([0x1f,0x43,0xb6,0x75]);let _0x21f759=_0x35644e['indexOf'](_0x1b2c9e);if(_0x194e44['FDYDH'](_0x21f759,-0x1))return 0x0;while(_0x194e44['iiOZJ'](_0x21f759,_0x35644e[_0x2e397d(0xd3)])){const [_0x4df4f2,_0x2bf47d]=readId(_0x35644e,_0x21f759);if(_0x194e44[_0x2e397d(0xf0)](_0x4df4f2,ID_CLUSTER))break;const [_0x194645,_0x45274a]=readVint(_0x35644e,_0x21f759+_0x2bf47d),_0x520584=_0x194e44[_0x2e397d(0xdd)](_0x21f759+_0x2bf47d,_0x45274a),_0x45e931=isUnknownSize(_0x194645,_0x45274a);let _0x23212c;if(_0x45e931){let _0x30162b=_0x520584;while(_0x30162b<_0x194e44[_0x2e397d(0xee)](_0x35644e[_0x2e397d(0xd3)],0x4)){const [_0x5bb3c0,_0x5bfd15]=readId(_0x35644e,_0x30162b);if(_0x5bb3c0===ID_CLUSTER){_0x23212c=_0x30162b;break;}const [_0xbee32,_0x3fa68f]=_0x194e44[_0x2e397d(0xd8)](readVint,_0x35644e,_0x30162b+_0x5bfd15);if(isUnknownSize(_0xbee32,_0x3fa68f)){_0x23212c=_0x35644e['length'];break;}_0x30162b+=_0x5bfd15+_0x3fa68f+_0xbee32;}_0x23212c??=_0x35644e[_0x2e397d(0xd3)];}else _0x23212c=_0x194e44[_0x2e397d(0xdd)](_0x520584,_0x194645);let _0x286fcf=0x0,_0x2abfcf=_0x520584;while(_0x194e44[_0x2e397d(0xd9)](_0x2abfcf,_0x23212c)){const [_0x158e5d,_0x1312f7]=readId(_0x35644e,_0x2abfcf),[_0x587a5e,_0x31b594]=_0x194e44[_0x2e397d(0xd8)](readVint,_0x35644e,_0x2abfcf+_0x1312f7);if(_0x194e44[_0x2e397d(0xe5)](_0x158e5d,ID_TIMESTAMP))_0x286fcf=readUint(_0x35644e,_0x194e44[_0x2e397d(0x109)](_0x194e44[_0x2e397d(0x109)](_0x2abfcf,_0x1312f7),_0x31b594),_0x587a5e);else{if(_0x158e5d===ID_SIMPLE_BLOCK&&_0x587a5e>=0x4){const _0x4cb12a=_0x194e44['EXejQ'](_0x194e44['NFIpe'](_0x2abfcf,_0x1312f7),_0x31b594),[,_0x3b575c]=_0x194e44[_0x2e397d(0xd2)](readVint,_0x35644e,_0x4cb12a),_0x4bd9b6=_0x35644e[_0x2e397d(0xef)](_0x4cb12a+_0x3b575c),_0x3e370b=_0x194e44[_0x2e397d(0xdc)](_0x194e44['pHYQU'](_0x286fcf,_0x4bd9b6)*_0x4a1f45,0xf4240);_0x194e44['PpgEz'](_0x3e370b,_0x47228b)&&(_0x47228b=_0x3e370b);}else{if(_0x158e5d===ID_CLUSTER)break;}}if(_0x194e44['MwrOR'](isUnknownSize,_0x587a5e,_0x31b594))break;_0x2abfcf+=_0x194e44[_0x2e397d(0x109)](_0x1312f7,_0x31b594)+_0x587a5e;}_0x21f759=_0x23212c;}return _0x47228b;}function _0x5748(_0x3ec22b,_0x1b9d5d){_0x3ec22b=_0x3ec22b-0xcb;const _0x3d0808=_0x3d08();let _0x5748ce=_0x3d0808[_0x3ec22b];return _0x5748ce;}export function fixWebmDuration(_0xd52e43,_0x16c503){const _0x194367=_0x5748,_0x177c90={'xtHTF':function(_0xc21d64,_0x26b213){return _0xc21d64(_0x26b213);},'XEKcC':function(_0x2217b7,_0x30f0a3,_0x442c9e){return _0x2217b7(_0x30f0a3,_0x442c9e);},'BHouC':function(_0x4e504b,_0x1501c3){return _0x4e504b+_0x1501c3;},'nAdkP':function(_0x296bdb,_0x4fd8ea,_0x5d9df4){return _0x296bdb(_0x4fd8ea,_0x5d9df4);},'yizbC':_0x194367(0xd4),'Zzftp':function(_0x13394c,_0x51627a,_0x45c7a9){return _0x13394c(_0x51627a,_0x45c7a9);},'ixOUW':function(_0x31185e,_0x3cd624){return _0x31185e+_0x3cd624;},'TTZfO':function(_0x376b94,_0x479691){return _0x376b94<_0x479691;},'jXfOs':function(_0x47ce45,_0x459227,_0x341d44){return _0x47ce45(_0x459227,_0x341d44);},'yRxGY':function(_0x559310,_0x10a780){return _0x559310===_0x10a780;},'NLyrJ':function(_0x570f9a,_0x399474,_0x3a821a,_0x271ebe,_0x4071f3){return _0x570f9a(_0x399474,_0x3a821a,_0x271ebe,_0x4071f3);},'ocOeN':function(_0x313fbf,_0xdde4b0){return _0x313fbf+_0xdde4b0;},'kWHbz':function(_0x368665,_0xedaadc){return _0x368665<=_0xedaadc;},'djAFY':'Could\x20not\x20compute\x20duration','utpxc':function(_0x445c1d,_0x2862aa){return _0x445c1d*_0x2862aa;},'eyBpt':function(_0x20f7db,_0x369a86){return _0x20f7db<_0x369a86;},'KjHIc':function(_0x4475cf,_0x205948){return _0x4475cf+_0x205948;},'JHhYX':function(_0x10d3a3,_0x58f048){return _0x10d3a3<_0x58f048;},'ZVlRj':function(_0x4e5646,_0x4d9c75,_0x4c9f3a,_0x2ad4c6,_0x4210d8,_0x57e942,_0x3cb08f){return _0x4e5646(_0x4d9c75,_0x4c9f3a,_0x2ad4c6,_0x4210d8,_0x57e942,_0x3cb08f);},'EHxGo':function(_0x19c02a,_0x160102){return _0x19c02a+_0x160102;},'zWIFh':function(_0x1e825c,_0x2ff4bb,_0x51ba94,_0x591435,_0x1997ec,_0x88d95a,_0x5d0e01){return _0x1e825c(_0x2ff4bb,_0x51ba94,_0x591435,_0x1997ec,_0x88d95a,_0x5d0e01);}},_0xa789fa=_0x177c90[_0x194367(0xf2)](readFileSync,_0xd52e43);let _0x450630=0x0;const [_0xc51a8c,_0x537159]=_0x177c90[_0x194367(0x10c)](readId,_0xa789fa,_0x450630),[_0x3ac44d,_0x9798b]=_0x177c90['XEKcC'](readVint,_0xa789fa,_0x177c90['BHouC'](_0x450630,_0x537159));_0x450630+=_0x177c90['BHouC'](_0x537159,_0x9798b)+_0x3ac44d;const [_0x5dd2e3,_0x4d52a9]=_0x177c90[_0x194367(0xde)](readId,_0xa789fa,_0x450630);if(_0x5dd2e3!==ID_SEGMENT)return console[_0x194367(0x106)](_0x177c90[_0x194367(0xf9)]),![];const [,_0x55749a]=_0x177c90[_0x194367(0xfe)](readVint,_0xa789fa,_0x450630+_0x4d52a9),_0x4caac1=_0x177c90[_0x194367(0xfc)](_0x177c90['ixOUW'](_0x450630,_0x4d52a9),_0x55749a);let _0x3acdbe=_0x4caac1;const _0x235c5b=Math['min'](_0xa789fa['length'],_0x4caac1+0x2710);let _0x2b0f7b=null,_0x10a588=null;while(_0x177c90['TTZfO'](_0x3acdbe,_0x235c5b)){const [_0x5a5732,_0x482567]=readId(_0xa789fa,_0x3acdbe),[_0x3eb485,_0x35ff79]=_0x177c90[_0x194367(0xf3)](readVint,_0xa789fa,_0x177c90[_0x194367(0x105)](_0x3acdbe,_0x482567));_0x5a5732===ID_VOID&&!_0x2b0f7b&&(_0x2b0f7b={'offset':_0x3acdbe,'idLen':_0x482567,'sizeLen':_0x35ff79,'dataSize':_0x3eb485,'dataOffset':_0x177c90[_0x194367(0x105)](_0x3acdbe+_0x482567,_0x35ff79)});if(_0x177c90['yRxGY'](_0x5a5732,ID_INFO)){_0x10a588={'offset':_0x3acdbe,'idLen':_0x482567,'sizeLen':_0x35ff79,'dataSize':_0x3eb485,'dataOffset':_0x3acdbe+_0x482567+_0x35ff79};break;}if(_0x177c90['yRxGY'](_0x5a5732,ID_CLUSTER))break;if(isUnknownSize(_0x3eb485,_0x35ff79))break;_0x3acdbe+=_0x177c90[_0x194367(0x105)](_0x482567+_0x35ff79,_0x3eb485);}if(!_0x10a588)return console[_0x194367(0x106)]('Could\x20not\x20find\x20Info\x20element'),![];const _0x10a0ae=_0x177c90[_0x194367(0xec)](findElement,_0xa789fa,_0x10a588[_0x194367(0xcc)],_0x177c90['ocOeN'](_0x10a588[_0x194367(0xcc)],_0x10a588['dataSize']),ID_DURATION);if(_0x10a0ae)return![];const _0x33bc36=findElement(_0xa789fa,_0x10a588[_0x194367(0xcc)],_0x10a588[_0x194367(0xcc)]+_0x10a588['dataSize'],ID_TIMESTAMP_SCALE);let _0x1ae92b=0xf4240;_0x33bc36&&(_0x1ae92b=readUint(_0xa789fa,_0x33bc36[_0x194367(0xcc)],_0x33bc36[_0x194367(0xff)]));const _0x39908f=computeDurationMs(_0xa789fa,_0x1ae92b);if(_0x177c90['kWHbz'](_0x39908f,0x0))return console['error'](_0x177c90[_0x194367(0x10a)]),![];const _0x1b3b74=_0x177c90[_0x194367(0xcb)](_0x39908f,0xf4240)/_0x1ae92b,_0x5a0648=Buffer[_0x194367(0xda)]([_0x177c90['xtHTF'](writeId,ID_DURATION),_0x177c90[_0x194367(0xf2)](writeVint,0x8),writeFloat64(_0x1b3b74)]),_0x410013=_0x5a0648['length'];if(!_0x2b0f7b||_0x177c90['eyBpt'](_0x2b0f7b['offset'],_0x10a588['offset'])){if(_0x2b0f7b){const _0x1f34fd=_0x177c90[_0x194367(0xe9)](_0x177c90['KjHIc'](_0x2b0f7b[_0x194367(0xd6)],_0x2b0f7b[_0x194367(0xf8)]),_0x2b0f7b['dataSize']),_0x4d5722=_0x1f34fd-_0x410013;if(_0x177c90[_0x194367(0xfd)](_0x4d5722,0x2))return _0x177c90['ZVlRj'](rewriteFile,_0xa789fa,_0x10a588,_0x5a0648,_0x1ae92b,_0x39908f,_0x16c503);const _0x1831b6=_0x177c90[_0x194367(0xfa)](_0x10a588[_0x194367(0xff)],_0x410013),_0x38b2b0=Buffer['concat']([writeId(ID_INFO),_0x177c90['jXfOs'](writeVint,_0x1831b6,_0x10a588['sizeLen'])]),_0x4734da=_0xa789fa['slice'](_0x10a588[_0x194367(0xcc)],_0x10a588['dataOffset']+_0x10a588[_0x194367(0xff)]),_0x1f8eeb=writeVoid(_0x4d5722),_0x22f359=_0xa789fa['slice'](0x0,_0x2b0f7b[_0x194367(0xe0)]),_0x3d4a4c=_0xa789fa[_0x194367(0xed)](_0x177c90[_0x194367(0xe9)](_0x10a588[_0x194367(0xcc)],_0x10a588[_0x194367(0xff)]));return writeFileSync(_0x16c503,Buffer[_0x194367(0xda)]([_0x22f359,_0x1f8eeb,_0x38b2b0,_0x4734da,_0x5a0648,_0x3d4a4c])),!![];}}return _0x177c90[_0x194367(0x101)](rewriteFile,_0xa789fa,_0x10a588,_0x5a0648,_0x1ae92b,_0x39908f,_0x16c503);}function rewriteFile(_0x4cfa62,_0x2c2cf9,_0x5730ef,_0x3e0627,_0x21f2f9,_0x3919a1){const _0x423a01=_0x5748,_0x12526e={'QJDJN':function(_0x3be58f,_0x1484a8){return _0x3be58f(_0x1484a8);},'EvefU':function(_0x414560,_0x29f93a){return _0x414560+_0x29f93a;},'UxEKr':function(_0x19dde2,_0x575f5a){return _0x19dde2+_0x575f5a;},'yGlOe':function(_0x1fc7da,_0x1ad466,_0x5dbc6c){return _0x1fc7da(_0x1ad466,_0x5dbc6c);}},_0x542457=_0x2c2cf9['dataSize']+_0x5730ef['length'],_0x2d5304=Buffer[_0x423a01(0xda)]([writeId(ID_INFO),_0x12526e[_0x423a01(0xe6)](writeVint,_0x542457)]),_0x55c8d8=_0x2c2cf9[_0x423a01(0xd6)]+_0x2c2cf9['sizeLen'],_0x28a44d=_0x4cfa62['slice'](0x0,_0x2c2cf9['offset']),_0x525948=_0x4cfa62[_0x423a01(0xed)](_0x2c2cf9['dataOffset'],_0x12526e[_0x423a01(0xe1)](_0x2c2cf9[_0x423a01(0xcc)],_0x2c2cf9[_0x423a01(0xff)])),_0xce523e=_0x4cfa62[_0x423a01(0xed)](_0x12526e['UxEKr'](_0x12526e['UxEKr'](_0x2c2cf9[_0x423a01(0xe0)],_0x55c8d8),_0x2c2cf9['dataSize']));return _0x12526e[_0x423a01(0xf7)](writeFileSync,_0x3919a1,Buffer[_0x423a01(0xda)]([_0x28a44d,_0x2d5304,_0x525948,_0x5730ef,_0xce523e])),!![];}if(process['argv'][0x1]?.[_0x4359d2(0xdb)]('fixWebmDuration.ts')||process['argv'][0x1]?.['endsWith'](_0x4359d2(0xd0))){const input=process['argv'][0x2],output=process['argv'][0x3];(!input||!output)&&(console[_0x4359d2(0x106)](_0x4359d2(0xd5)),process[_0x4359d2(0x108)](0x1));const fixed=fixWebmDuration(input,output);fixed?console[_0x4359d2(0xe4)](_0x4359d2(0xce)+output):console[_0x4359d2(0xe4)]('File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.');}
1
+ const _0x2785bc=_0x2575;(function(_0x1a72a1,_0x4e6eea){const _0x4bd2e5=_0x2575,_0x468dfc=_0x1a72a1();while(!![]){try{const _0x38b0c6=parseInt(_0x4bd2e5(0xbd))/0x1+parseInt(_0x4bd2e5(0xeb))/0x2*(-parseInt(_0x4bd2e5(0xc8))/0x3)+-parseInt(_0x4bd2e5(0xef))/0x4+-parseInt(_0x4bd2e5(0xbf))/0x5*(parseInt(_0x4bd2e5(0xea))/0x6)+-parseInt(_0x4bd2e5(0xc2))/0x7+-parseInt(_0x4bd2e5(0xba))/0x8+parseInt(_0x4bd2e5(0xdb))/0x9;if(_0x38b0c6===_0x4e6eea)break;else _0x468dfc['push'](_0x468dfc['shift']());}catch(_0x4b69a2){_0x468dfc['push'](_0x468dfc['shift']());}}}(_0x2e5f,0x35712));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(_0x5f6f6c,_0x21d722){const _0x19f906=_0x2575,_0x4850aa={'IuUve':function(_0x50ca41,_0x52de3d){return _0x50ca41<=_0x52de3d;},'UUgwF':function(_0x1a2375,_0x2c91aa){return _0x1a2375>_0x2c91aa;},'PiVRx':function(_0x3dbce3,_0x2485c3){return _0x3dbce3<_0x2485c3;},'wuTZB':function(_0x1cbac7,_0x1213c1){return _0x1cbac7*_0x1213c1;},'FNItJ':function(_0xa05527,_0x589191){return _0xa05527+_0x589191;}};if(_0x21d722>=_0x5f6f6c['length'])return[0x0,0x0];const _0x3676c6=_0x5f6f6c[_0x21d722];let _0xabc86c=0x1,_0x1c28c7=0x80;while(_0x4850aa['IuUve'](_0xabc86c,0x8)&&!(_0x3676c6&_0x1c28c7)){_0xabc86c++,_0x1c28c7>>=0x1;}if(_0x4850aa[_0x19f906(0xee)](_0x21d722+_0xabc86c,_0x5f6f6c[_0x19f906(0xd9)]))return[0x0,0x0];let _0xe6630=_0x3676c6&_0x1c28c7-0x1;for(let _0x211b8d=0x1;_0x4850aa[_0x19f906(0xe7)](_0x211b8d,_0xabc86c);_0x211b8d++){_0xe6630=_0x4850aa['wuTZB'](_0xe6630,0x100)+_0x5f6f6c[_0x4850aa['FNItJ'](_0x21d722,_0x211b8d)];}return[_0xe6630,_0xabc86c];}function readId(_0x4d6e99,_0x58ac20){const _0x240bc9=_0x2575,_0x26a155={'cUHKy':function(_0x18a8c6,_0xe27e44){return _0x18a8c6>=_0xe27e44;},'GFhAu':function(_0x129147,_0x1e8575){return _0x129147>_0x1e8575;},'ATmIE':function(_0x4f16e7,_0x44801d){return _0x4f16e7<_0x44801d;},'OJCxE':function(_0x2e1f51,_0x39295c){return _0x2e1f51+_0x39295c;}};if(_0x58ac20>=_0x4d6e99[_0x240bc9(0xd9)])return[0x0,0x0];const _0x352a5b=_0x4d6e99[_0x58ac20];let _0x538636;if(_0x352a5b>=0x80)_0x538636=0x1;else{if(_0x352a5b>=0x40)_0x538636=0x2;else{if(_0x26a155['cUHKy'](_0x352a5b,0x20))_0x538636=0x3;else{if(_0x352a5b>=0x10)_0x538636=0x4;else return[_0x352a5b,0x1];}}}if(_0x26a155[_0x240bc9(0xe4)](_0x58ac20+_0x538636,_0x4d6e99['length']))return[0x0,0x0];let _0x255c8c=0x0;for(let _0x23f9bb=0x0;_0x26a155['ATmIE'](_0x23f9bb,_0x538636);_0x23f9bb++){_0x255c8c=_0x255c8c*0x100+_0x4d6e99[_0x26a155[_0x240bc9(0xd8)](_0x58ac20,_0x23f9bb)];}return[_0x255c8c,_0x538636];}function _0x2575(_0x2a5798,_0x35feaf){_0x2a5798=_0x2a5798-0xb2;const _0x2e5ff9=_0x2e5f();let _0x2575e2=_0x2e5ff9[_0x2a5798];return _0x2575e2;}function readUint(_0x219985,_0x182d21,_0x41cc00){const _0x6ca91e=_0x2575,_0x50c446={'QTGim':function(_0x570c79,_0x9b0f16){return _0x570c79+_0x9b0f16;}};let _0x58344c=0x0;for(let _0x461cd2=0x0;_0x461cd2<_0x41cc00;_0x461cd2++){_0x58344c=_0x58344c*0x100+_0x219985[_0x50c446[_0x6ca91e(0xf8)](_0x182d21,_0x461cd2)];}return _0x58344c;}function isUnknownSize(_0x355617,_0x143ce9){const _0x10f36a=_0x2575,_0x53b3b2={'VfXjr':function(_0x159e20,_0x4ba6e6){return _0x159e20-_0x4ba6e6;},'BkSEk':function(_0x42b7a2,_0x14bc9d){return _0x42b7a2*_0x14bc9d;}};return _0x355617===_0x53b3b2[_0x10f36a(0xe0)](Math['pow'](0x2,_0x53b3b2['BkSEk'](0x7,_0x143ce9)),0x1);}function writeId(_0x53643e){const _0x152696=_0x2575,_0x3b81b7={'aSlGX':function(_0x339695,_0xcead2e){return _0x339695&_0xcead2e;},'XlVaF':function(_0x13951f,_0x35bb14){return _0x13951f>>_0x35bb14;},'mdJfs':function(_0x2ae3c4,_0x474850){return _0x2ae3c4&_0x474850;},'VLAoM':function(_0x534483,_0x40106c){return _0x534483>>_0x40106c;},'JmbGh':function(_0x2179e5,_0x529415){return _0x2179e5&_0x529415;},'bWbBF':function(_0x41a56a,_0x5138a5){return _0x41a56a&_0x5138a5;}};if(_0x53643e<=0xff)return Buffer['from']([_0x53643e]);if(_0x53643e<=0xffff)return Buffer[_0x152696(0xbe)]([_0x3b81b7[_0x152696(0xc9)](_0x3b81b7[_0x152696(0xfa)](_0x53643e,0x8),0xff),_0x3b81b7[_0x152696(0xfc)](_0x53643e,0xff)]);if(_0x53643e<=0xffffff)return Buffer['from']([_0x3b81b7['aSlGX'](_0x3b81b7['VLAoM'](_0x53643e,0x10),0xff),_0x3b81b7['JmbGh'](_0x53643e>>0x8,0xff),_0x53643e&0xff]);return Buffer[_0x152696(0xbe)]([_0x3b81b7[_0x152696(0xc9)](_0x53643e>>0x18,0xff),_0x3b81b7[_0x152696(0xd4)](_0x53643e>>0x10,0xff),_0x53643e>>0x8&0xff,_0x3b81b7[_0x152696(0xd4)](_0x53643e,0xff)]);}function writeVint(_0x4e824d,_0x14fa1e){const _0x3735b2=_0x2575,_0x1d10ba={'lurjf':function(_0x1e3ddb,_0x121042){return _0x1e3ddb||_0x121042;},'NnUUx':function(_0x54ffe4,_0x2026af){return _0x54ffe4<_0x2026af;},'pdjJu':function(_0x50fc48,_0x45db3d){return _0x50fc48*_0x45db3d;},'MGEHq':function(_0x52bec7,_0xfaa1c3){return _0x52bec7>=_0xfaa1c3;},'NgbTL':function(_0x25174e,_0x218c33){return _0x25174e&_0x218c33;},'GoBcb':function(_0x49d65b,_0x43f84c){return _0x49d65b/_0x43f84c;}};let _0x6e7f88=_0x1d10ba[_0x3735b2(0xd7)](_0x14fa1e,0x1);while(_0x1d10ba['NnUUx'](Math['pow'](0x2,_0x1d10ba['pdjJu'](0x7,_0x6e7f88))-0x2,_0x4e824d))_0x6e7f88++;const _0x218857=Buffer[_0x3735b2(0xe3)](_0x6e7f88);for(let _0x1c7912=_0x6e7f88-0x1;_0x1d10ba[_0x3735b2(0xd1)](_0x1c7912,0x0);_0x1c7912--){_0x218857[_0x1c7912]=_0x1d10ba[_0x3735b2(0xf9)](_0x4e824d,0xff),_0x4e824d=Math['floor'](_0x1d10ba['GoBcb'](_0x4e824d,0x100));}return _0x218857[0x0]|=0x1<<0x8-_0x6e7f88,_0x218857;}function writeFloat64(_0x49315a){const _0x479518=Buffer['alloc'](0x8);return _0x479518['writeDoubleBE'](_0x49315a,0x0),_0x479518;}function writeVoid(_0x4eb3b9){const _0x16a483=_0x2575,_0x325234={'nHIrE':function(_0x2bbf91,_0x22a6f0){return _0x2bbf91<=_0x22a6f0;},'ioRTJ':function(_0x49867c,_0x239758){return _0x49867c>=_0x239758;},'Uxfiu':function(_0x3c208d,_0x21437c,_0x635784){return _0x3c208d(_0x21437c,_0x635784);}};for(let _0x4ab220=0x1;_0x325234[_0x16a483(0xc6)](_0x4ab220,0x8);_0x4ab220++){const _0x1b54e8=_0x4eb3b9-0x1-_0x4ab220;if(_0x325234[_0x16a483(0xde)](_0x1b54e8,0x0)&&_0x325234['nHIrE'](_0x1b54e8,Math[_0x16a483(0xfb)](0x2,0x7*_0x4ab220)-0x2))return Buffer[_0x16a483(0xc5)]([Buffer[_0x16a483(0xbe)]([ID_VOID]),_0x325234[_0x16a483(0xc0)](writeVint,_0x1b54e8,_0x4ab220),Buffer['alloc'](_0x1b54e8)]);}return Buffer['alloc'](0x0);}function findElement(_0x434479,_0xb13e56,_0x550d7a,_0x42cfe1){const _0x2e8471=_0x2575,_0x2f9626={'ujups':function(_0x4483c9,_0x4a4606){return _0x4483c9===_0x4a4606;},'gDFbH':function(_0x55b8e1,_0x3cdfe5){return _0x55b8e1+_0x3cdfe5;},'mdTwv':function(_0x56f66c,_0x129641,_0x22002b){return _0x56f66c(_0x129641,_0x22002b);}};let _0x4506da=_0xb13e56;while(_0x4506da<_0x550d7a){const [_0x39ff3c,_0x320e30]=readId(_0x434479,_0x4506da),[_0x176ae5,_0x370f1d]=readVint(_0x434479,_0x4506da+_0x320e30);if(_0x2f9626[_0x2e8471(0xcb)](_0x39ff3c,_0x42cfe1))return{'offset':_0x4506da,'idLen':_0x320e30,'sizeLen':_0x370f1d,'dataSize':_0x176ae5,'dataOffset':_0x2f9626['gDFbH'](_0x4506da,_0x320e30)+_0x370f1d};if(_0x2f9626[_0x2e8471(0xd2)](isUnknownSize,_0x176ae5,_0x370f1d))break;_0x4506da+=_0x2f9626[_0x2e8471(0xf6)](_0x320e30,_0x370f1d)+_0x176ae5;}return null;}function _0x2e5f(){const _0x5e18f8=['ujups','readInt16BE','zyOIz','xPxMh','PLJCN','error','MGEHq','mdTwv','idLen','bWbBF','Could\x20not\x20find\x20Info\x20element','UAsHx','lurjf','OJCxE','length','qbytb','11885085ijOCBO','ADuia','NDarz','ioRTJ','sizeLen','VfXjr','indexOf','CuwPk','alloc','GFhAu','qubfE','fixWebmDuration.ts','PiVRx','fixWebmDuration.js','File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.','102eBkyMa','52pvimVy','qvsTn','ZaWtG','UUgwF','1621144LaMbLy','nUbkO','LCPoA','UERDn','CXpsF','dataSize','hLMwJ','gDFbH','endsWith','QTGim','NgbTL','XlVaF','pow','mdJfs','ZWuch','gvkVa','offset','LzSwz','slice','aaLAj','argv','uptYD','1924312ziVBln','YyYXo','PWuSA','372634XSMxQO','from','83095lwKprx','Uxfiu','IkEKn','2817213iPCxKW','dataOffset','jRDBS','concat','nHIrE','Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>','16557TdYPyN','aSlGX','kVApS'];_0x2e5f=function(){return _0x5e18f8;};return _0x2e5f();}function computeDurationMs(_0x682530,_0x8b4754){const _0x5f2ba0=_0x2575,_0x453243={'nUbkO':function(_0x3acf57,_0x2f4c68){return _0x3acf57===_0x2f4c68;},'zyOIz':function(_0x4d4344,_0x4c187c,_0x23f681){return _0x4d4344(_0x4c187c,_0x23f681);},'UAsHx':function(_0x35cbed,_0x3985c5){return _0x35cbed+_0x3985c5;},'ADuia':function(_0x39d2d8,_0x4756b0){return _0x39d2d8+_0x4756b0;},'ckHSv':function(_0x594dc7,_0x4673fc,_0x5d3445){return _0x594dc7(_0x4673fc,_0x5d3445);},'qbytb':function(_0x28e493,_0x20e75c){return _0x28e493<_0x20e75c;},'NDarz':function(_0x2337f8,_0x207750){return _0x2337f8-_0x207750;},'YyYXo':function(_0x3d8076,_0x23142d){return _0x3d8076+_0x23142d;},'guHbR':function(_0x410129,_0x50e8c6,_0x24936a){return _0x410129(_0x50e8c6,_0x24936a);},'xPxMh':function(_0x26be71,_0x1ece0e,_0x45a664,_0x1c8d65){return _0x26be71(_0x1ece0e,_0x45a664,_0x1c8d65);},'tjhFF':function(_0x4de956,_0x5ea99f){return _0x4de956>=_0x5ea99f;},'ycPsi':function(_0x213354,_0x8e31de){return _0x213354+_0x8e31de;},'UERDn':function(_0xc2e03a,_0x17bcf1,_0x1a0186){return _0xc2e03a(_0x17bcf1,_0x1a0186);},'PLJCN':function(_0x53eb97,_0x4e8c58){return _0x53eb97+_0x4e8c58;},'CXpsF':function(_0x461c3c,_0x15f1db){return _0x461c3c+_0x15f1db;},'Zddpf':function(_0x3331f7,_0x28897a){return _0x3331f7>_0x28897a;}};let _0x1c82e5=0x0;const _0x4e65c1=Buffer[_0x5f2ba0(0xbe)]([0x1f,0x43,0xb6,0x75]);let _0x1fe3c5=_0x682530[_0x5f2ba0(0xe1)](_0x4e65c1);if(_0x453243['nUbkO'](_0x1fe3c5,-0x1))return 0x0;while(_0x1fe3c5<_0x682530['length']){const [_0x2ade99,_0x5968f4]=_0x453243[_0x5f2ba0(0xcd)](readId,_0x682530,_0x1fe3c5);if(_0x2ade99!==ID_CLUSTER)break;const [_0x596707,_0x521ab9]=readVint(_0x682530,_0x453243['UAsHx'](_0x1fe3c5,_0x5968f4)),_0x4b6d56=_0x453243[_0x5f2ba0(0xdc)](_0x1fe3c5,_0x5968f4)+_0x521ab9,_0x3690fd=_0x453243['ckHSv'](isUnknownSize,_0x596707,_0x521ab9);let _0x3a71b5;if(_0x3690fd){let _0x174d68=_0x4b6d56;while(_0x453243[_0x5f2ba0(0xda)](_0x174d68,_0x453243[_0x5f2ba0(0xdd)](_0x682530[_0x5f2ba0(0xd9)],0x4))){const [_0x33fcea,_0x3da9a9]=_0x453243['ckHSv'](readId,_0x682530,_0x174d68);if(_0x33fcea===ID_CLUSTER){_0x3a71b5=_0x174d68;break;}const [_0x4b7f6f,_0x16058e]=readVint(_0x682530,_0x174d68+_0x3da9a9);if(_0x453243[_0x5f2ba0(0xcd)](isUnknownSize,_0x4b7f6f,_0x16058e)){_0x3a71b5=_0x682530['length'];break;}_0x174d68+=_0x453243[_0x5f2ba0(0xbb)](_0x3da9a9,_0x16058e)+_0x4b7f6f;}_0x3a71b5??=_0x682530['length'];}else _0x3a71b5=_0x4b6d56+_0x596707;let _0x225c77=0x0,_0x295e70=_0x4b6d56;while(_0x295e70<_0x3a71b5){const [_0xa0f249,_0x1ad579]=_0x453243['guHbR'](readId,_0x682530,_0x295e70),[_0x4e2919,_0xeeb9ff]=readVint(_0x682530,_0x295e70+_0x1ad579);if(_0x453243[_0x5f2ba0(0xf0)](_0xa0f249,ID_TIMESTAMP))_0x225c77=_0x453243[_0x5f2ba0(0xce)](readUint,_0x682530,_0x453243['UAsHx'](_0x295e70,_0x1ad579)+_0xeeb9ff,_0x4e2919);else{if(_0x453243[_0x5f2ba0(0xf0)](_0xa0f249,ID_SIMPLE_BLOCK)&&_0x453243['tjhFF'](_0x4e2919,0x4)){const _0x3578fe=_0x453243['ycPsi'](_0x295e70,_0x1ad579)+_0xeeb9ff,[,_0x52bb5a]=_0x453243[_0x5f2ba0(0xf2)](readVint,_0x682530,_0x3578fe),_0x394463=_0x682530[_0x5f2ba0(0xcc)](_0x453243[_0x5f2ba0(0xcf)](_0x3578fe,_0x52bb5a)),_0xc6e776=_0x453243[_0x5f2ba0(0xf3)](_0x225c77,_0x394463)*_0x8b4754/0xf4240;_0x453243['Zddpf'](_0xc6e776,_0x1c82e5)&&(_0x1c82e5=_0xc6e776);}else{if(_0xa0f249===ID_CLUSTER)break;}}if(isUnknownSize(_0x4e2919,_0xeeb9ff))break;_0x295e70+=_0x453243[_0x5f2ba0(0xd6)](_0x1ad579,_0xeeb9ff)+_0x4e2919;}_0x1fe3c5=_0x3a71b5;}return _0x1c82e5;}export function fixWebmDuration(_0x2dcce5,_0x4f7e36){const _0x4a6afe=_0x2575,_0x374aa5={'ZWuch':function(_0x5e22e0,_0x3c5730){return _0x5e22e0(_0x3c5730);},'aaLAj':function(_0x15418f,_0x18c9da,_0x219391){return _0x15418f(_0x18c9da,_0x219391);},'LCPoA':function(_0x5857b4,_0x448571){return _0x5857b4+_0x448571;},'CuwPk':function(_0x5d47ff,_0x395fb6){return _0x5d47ff+_0x395fb6;},'IcKGL':function(_0x3f5c53,_0x103649,_0x5e206f){return _0x3f5c53(_0x103649,_0x5e206f);},'bbzrq':function(_0x2fec0b,_0x399fc3){return _0x2fec0b+_0x399fc3;},'LzSwz':function(_0x341cad,_0x339a23){return _0x341cad+_0x339a23;},'gvkVa':function(_0x153f80,_0x1d72f4){return _0x153f80===_0x1d72f4;},'qubfE':function(_0x2cf09b,_0x541003){return _0x2cf09b+_0x541003;},'XVOyX':function(_0x6999f9,_0x51f938,_0x11810b){return _0x6999f9(_0x51f938,_0x11810b);},'jRDBS':_0x4a6afe(0xd5),'IkEKn':function(_0xf9db9a,_0x4b6b7b){return _0xf9db9a+_0x4b6b7b;},'nUOJE':function(_0x54fddc,_0x5e51b4,_0x5ebb87){return _0x54fddc(_0x5e51b4,_0x5ebb87);},'uptYD':function(_0x5a1fc2,_0xe8760a){return _0x5a1fc2*_0xe8760a;},'ihBPs':function(_0x3f2389,_0x3073a0){return _0x3f2389(_0x3073a0);},'DVmQq':function(_0x42bf68,_0x1d6618){return _0x42bf68(_0x1d6618);},'PWuSA':function(_0x13b3c7,_0x101bc3){return _0x13b3c7-_0x101bc3;},'lFWXx':function(_0x21ba87,_0xa26bfd){return _0x21ba87<_0xa26bfd;},'kVApS':function(_0x1e0805,_0x52f159){return _0x1e0805+_0x52f159;}},_0x2ea2da=_0x374aa5[_0x4a6afe(0xb2)](readFileSync,_0x2dcce5);let _0x9b6395=0x0;const [_0x5280a9,_0x26ad6b]=_0x374aa5[_0x4a6afe(0xb7)](readId,_0x2ea2da,_0x9b6395),[_0x9810b4,_0xe58ebd]=_0x374aa5[_0x4a6afe(0xb7)](readVint,_0x2ea2da,_0x374aa5['LCPoA'](_0x9b6395,_0x26ad6b));_0x9b6395+=_0x374aa5[_0x4a6afe(0xe2)](_0x374aa5[_0x4a6afe(0xf1)](_0x26ad6b,_0xe58ebd),_0x9810b4);const [_0x263459,_0x36ee3f]=_0x374aa5['IcKGL'](readId,_0x2ea2da,_0x9b6395);if(_0x263459!==ID_SEGMENT)return console[_0x4a6afe(0xd0)]('Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment'),![];const [,_0x2c4967]=readVint(_0x2ea2da,_0x9b6395+_0x36ee3f),_0x17ea98=_0x374aa5['bbzrq'](_0x374aa5['CuwPk'](_0x9b6395,_0x36ee3f),_0x2c4967);let _0x1b7a9b=_0x17ea98;const _0x47e60c=Math['min'](_0x2ea2da['length'],_0x17ea98+0x2710);let _0xf63d69=null,_0x3c3b30=null;while(_0x1b7a9b<_0x47e60c){const [_0x3dd060,_0x4a4578]=readId(_0x2ea2da,_0x1b7a9b),[_0x337a09,_0x2abfca]=readVint(_0x2ea2da,_0x374aa5[_0x4a6afe(0xb5)](_0x1b7a9b,_0x4a4578));_0x374aa5[_0x4a6afe(0xb3)](_0x3dd060,ID_VOID)&&!_0xf63d69&&(_0xf63d69={'offset':_0x1b7a9b,'idLen':_0x4a4578,'sizeLen':_0x2abfca,'dataSize':_0x337a09,'dataOffset':_0x374aa5['LzSwz'](_0x1b7a9b+_0x4a4578,_0x2abfca)});if(_0x3dd060===ID_INFO){_0x3c3b30={'offset':_0x1b7a9b,'idLen':_0x4a4578,'sizeLen':_0x2abfca,'dataSize':_0x337a09,'dataOffset':_0x374aa5[_0x4a6afe(0xe5)](_0x1b7a9b,_0x4a4578)+_0x2abfca};break;}if(_0x3dd060===ID_CLUSTER)break;if(_0x374aa5['XVOyX'](isUnknownSize,_0x337a09,_0x2abfca))break;_0x1b7a9b+=_0x374aa5['LCPoA'](_0x4a4578+_0x2abfca,_0x337a09);}if(!_0x3c3b30)return console[_0x4a6afe(0xd0)](_0x374aa5[_0x4a6afe(0xc4)]),![];const _0x10f707=findElement(_0x2ea2da,_0x3c3b30[_0x4a6afe(0xc3)],_0x374aa5['LzSwz'](_0x3c3b30[_0x4a6afe(0xc3)],_0x3c3b30['dataSize']),ID_DURATION);if(_0x10f707)return![];const _0x2ec243=findElement(_0x2ea2da,_0x3c3b30['dataOffset'],_0x374aa5['IkEKn'](_0x3c3b30['dataOffset'],_0x3c3b30['dataSize']),ID_TIMESTAMP_SCALE);let _0xb53e2f=0xf4240;_0x2ec243&&(_0xb53e2f=readUint(_0x2ea2da,_0x2ec243[_0x4a6afe(0xc3)],_0x2ec243['dataSize']));const _0xe12940=_0x374aa5['nUOJE'](computeDurationMs,_0x2ea2da,_0xb53e2f);if(_0xe12940<=0x0)return console[_0x4a6afe(0xd0)]('Could\x20not\x20compute\x20duration'),![];const _0x4c992f=_0x374aa5[_0x4a6afe(0xb9)](_0xe12940,0xf4240)/_0xb53e2f,_0x4b24d1=Buffer[_0x4a6afe(0xc5)]([_0x374aa5['ihBPs'](writeId,ID_DURATION),writeVint(0x8),_0x374aa5['DVmQq'](writeFloat64,_0x4c992f)]),_0x583225=_0x4b24d1['length'];if(!_0xf63d69||_0xf63d69[_0x4a6afe(0xb4)]<_0x3c3b30[_0x4a6afe(0xb4)]){if(_0xf63d69){const _0x175266=_0x374aa5[_0x4a6afe(0xe2)](_0x374aa5[_0x4a6afe(0xc1)](_0xf63d69[_0x4a6afe(0xd3)],_0xf63d69['sizeLen']),_0xf63d69['dataSize']),_0x241d86=_0x374aa5[_0x4a6afe(0xbc)](_0x175266,_0x583225);if(_0x374aa5['lFWXx'](_0x241d86,0x2))return rewriteFile(_0x2ea2da,_0x3c3b30,_0x4b24d1,_0xb53e2f,_0xe12940,_0x4f7e36);const _0x2e1dbd=_0x3c3b30[_0x4a6afe(0xf4)]+_0x583225,_0x124ddf=Buffer[_0x4a6afe(0xc5)]([writeId(ID_INFO),_0x374aa5['aaLAj'](writeVint,_0x2e1dbd,_0x3c3b30['sizeLen'])]),_0x2333aa=_0x2ea2da[_0x4a6afe(0xb6)](_0x3c3b30['dataOffset'],_0x374aa5[_0x4a6afe(0xca)](_0x3c3b30[_0x4a6afe(0xc3)],_0x3c3b30['dataSize'])),_0xec508e=writeVoid(_0x241d86),_0x5be1b2=_0x2ea2da[_0x4a6afe(0xb6)](0x0,_0xf63d69['offset']),_0x79ee9b=_0x2ea2da['slice'](_0x3c3b30[_0x4a6afe(0xc3)]+_0x3c3b30['dataSize']);return writeFileSync(_0x4f7e36,Buffer['concat']([_0x5be1b2,_0xec508e,_0x124ddf,_0x2333aa,_0x4b24d1,_0x79ee9b])),!![];}}return rewriteFile(_0x2ea2da,_0x3c3b30,_0x4b24d1,_0xb53e2f,_0xe12940,_0x4f7e36);}function rewriteFile(_0x4d5f05,_0xef5656,_0x1f1b3f,_0x4e63fb,_0x492088,_0x22774f){const _0x465a28=_0x2575,_0x161372={'zarKU':function(_0x3f2ef4,_0x1a18ff){return _0x3f2ef4+_0x1a18ff;},'XjMZe':function(_0x4c5f1e,_0x59153b){return _0x4c5f1e(_0x59153b);},'hLMwJ':function(_0x28b1d7,_0x3fd4ee){return _0x28b1d7+_0x3fd4ee;},'qvsTn':function(_0xe0fc,_0x5dbe0f){return _0xe0fc+_0x5dbe0f;},'ZaWtG':function(_0x5ce944,_0x3b2c56,_0x56b54b){return _0x5ce944(_0x3b2c56,_0x56b54b);}},_0x55b5b3=_0x161372['zarKU'](_0xef5656[_0x465a28(0xf4)],_0x1f1b3f[_0x465a28(0xd9)]),_0x3efbcc=Buffer[_0x465a28(0xc5)]([_0x161372['XjMZe'](writeId,ID_INFO),writeVint(_0x55b5b3)]),_0x2b42b1=_0x161372[_0x465a28(0xf5)](_0xef5656[_0x465a28(0xd3)],_0xef5656[_0x465a28(0xdf)]),_0x3d5538=_0x4d5f05['slice'](0x0,_0xef5656[_0x465a28(0xb4)]),_0x22c2c3=_0x4d5f05[_0x465a28(0xb6)](_0xef5656[_0x465a28(0xc3)],_0x161372[_0x465a28(0xec)](_0xef5656['dataOffset'],_0xef5656[_0x465a28(0xf4)])),_0x1e904e=_0x4d5f05[_0x465a28(0xb6)](_0x161372['qvsTn'](_0x161372['zarKU'](_0xef5656[_0x465a28(0xb4)],_0x2b42b1),_0xef5656['dataSize']));return _0x161372[_0x465a28(0xed)](writeFileSync,_0x22774f,Buffer[_0x465a28(0xc5)]([_0x3d5538,_0x3efbcc,_0x22c2c3,_0x1f1b3f,_0x1e904e])),!![];}if(process[_0x2785bc(0xb8)][0x1]?.['endsWith'](_0x2785bc(0xe6))||process['argv'][0x1]?.[_0x2785bc(0xf7)](_0x2785bc(0xe8))){const input=process['argv'][0x2],output=process['argv'][0x3];(!input||!output)&&(console['error'](_0x2785bc(0xc7)),process['exit'](0x1));const fixed=fixWebmDuration(input,output);fixed?console['log']('Fixed:\x20'+output):console['log'](_0x2785bc(0xe9));}
@@ -1 +1 @@
1
- (function(_0x3b4bca,_0x47a6ac){const _0x3090f9=_0x39b9,_0x3fb8bd=_0x3b4bca();while(!![]){try{const _0x90cde9=parseInt(_0x3090f9(0x183))/0x1*(parseInt(_0x3090f9(0x186))/0x2)+-parseInt(_0x3090f9(0x185))/0x3+parseInt(_0x3090f9(0x18c))/0x4*(parseInt(_0x3090f9(0x18a))/0x5)+parseInt(_0x3090f9(0x188))/0x6+-parseInt(_0x3090f9(0x18e))/0x7*(parseInt(_0x3090f9(0x189))/0x8)+-parseInt(_0x3090f9(0x18f))/0x9*(parseInt(_0x3090f9(0x184))/0xa)+parseInt(_0x3090f9(0x187))/0xb;if(_0x90cde9===_0x47a6ac)break;else _0x3fb8bd['push'](_0x3fb8bd['shift']());}catch(_0x1fed2c){_0x3fb8bd['push'](_0x3fb8bd['shift']());}}}(_0x2cc8,0xc0e83));function _0x2cc8(){const _0x4cc4d6=['721976OpzxIy','5AbcHDM','ls-files','640556kgYPQG','git','119IPgklu','1043937FJNzQf','997081tthgar','70YcCEaA','1814892iwqREh','2utPfrC','15823478OMkbEJ','6873258UuTwtP'];_0x2cc8=function(){return _0x4cc4d6;};return _0x2cc8();}function _0x39b9(_0x5eccea,_0x5c45c1){_0x5eccea=_0x5eccea-0x183;const _0x2cc89d=_0x2cc8();let _0x39b957=_0x2cc89d[_0x5eccea];return _0x39b957;}import{execFile as _0x3a69fa}from'child_process';import{promisify}from'util';const execFile=promisify(_0x3a69fa);export async function isPathGitTracked(_0x1af888){const _0x1de501=_0x39b9,_0x25f5d1={'pSSqI':_0x1de501(0x18b),'dPofO':'--error-unmatch'};try{return await execFile(_0x1de501(0x18d),[_0x25f5d1['pSSqI'],_0x25f5d1['dPofO'],_0x1af888],{'cwd':process['cwd']()}),!![];}catch{return![];}}
1
+ function _0x1fe3(_0x15a12a,_0x20ca93){_0x15a12a=_0x15a12a-0x10b;const _0x55a713=_0x55a7();let _0x1fe3da=_0x55a713[_0x15a12a];return _0x1fe3da;}(function(_0xb2a68e,_0x5f528b){const _0x33bbbb=_0x1fe3,_0x27a344=_0xb2a68e();while(!![]){try{const _0x52b093=parseInt(_0x33bbbb(0x116))/0x1*(-parseInt(_0x33bbbb(0x10b))/0x2)+parseInt(_0x33bbbb(0x10d))/0x3+-parseInt(_0x33bbbb(0x10c))/0x4+parseInt(_0x33bbbb(0x111))/0x5+-parseInt(_0x33bbbb(0x10f))/0x6*(-parseInt(_0x33bbbb(0x113))/0x7)+-parseInt(_0x33bbbb(0x112))/0x8*(parseInt(_0x33bbbb(0x10e))/0x9)+parseInt(_0x33bbbb(0x115))/0xa*(parseInt(_0x33bbbb(0x110))/0xb);if(_0x52b093===_0x5f528b)break;else _0x27a344['push'](_0x27a344['shift']());}catch(_0xd35558){_0x27a344['push'](_0x27a344['shift']());}}}(_0x55a7,0xe997e));function _0x55a7(){const _0x4d1bc0=['1243449wvuJwB','2063652yAbYVX','165HRHIJR','3761370bnnixY','104frLFJC','14ilDxFi','ls-files','1169030eJpBOm','2113qLBcuT','888JkkjIP','2526916occtwl','3387267rnFFdo'];_0x55a7=function(){return _0x4d1bc0;};return _0x55a7();}import{execFile as _0x12b453}from'child_process';import{promisify}from'util';const execFile=promisify(_0x12b453);export async function isPathGitTracked(_0x3787cf){const _0x3e59a1=_0x1fe3,_0x4b0dde={'YGCBU':function(_0x42ebaf,_0x2732b0,_0x3ea41e,_0x265451){return _0x42ebaf(_0x2732b0,_0x3ea41e,_0x265451);},'vAWDY':'git'};try{return await _0x4b0dde['YGCBU'](execFile,_0x4b0dde['vAWDY'],[_0x3e59a1(0x114),'--error-unmatch',_0x3787cf],{'cwd':process['cwd']()}),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function _0x3e7c(){const _0x536c7a=['ze5dyLi','Cvb4shq','CML3AMq','Bwr5Ewm','tePLCeq','vgj6uuu','wwnHyu0','r0Lusfvcx0vovG','BgL6uM8','u1rgEuy','kcGOlISPkYKRksSK','EuzlvfG','mJGWrvzvtNvy','zw52','mti3ndC0CvbpwxbV','lI4VBwnWqM9VDhn0CMfWlMPZ','u1jKruS','Ahvbshu','CMvMCMvZAc50Ehq','DwLcrKC','weXVqui','AKPgA0S','lI90B2TLBLjLzNjLC2GUANm','B25sywO','qxPfzKq','tLvOr1i','Bg9N','svvVy0O','uKfor0vsx01duf9ut0TftG','rvDRDfG','C2LNBMfS','r0vu','mJaYmZy5m0LYBNjSuq','Cvrhyu0','BLPpuKm','ExfyAuG','ANrWCNu','uKPbD20','vufpzKm','mLLyu3vsDa','wu94v00','ugXnyLm','Dg9tDhjPBMC','wNrfrLy','q1LZEhu','uMuTyxv0Ag9YAxPLihrOzsbsyw5NzxiGtunqignVBM5Ly3rPB24SihrOzw4GCMv0CNKU','Cg52rKS','mtm1mNzbEgXdva','DMHwzgW','BwvZC2fNzq','ExjkuLG','tvPVENm','oda0DuHcr0ry','y29UC3rYDwn0B3i','DxrMltG','sLrxvMS','ww1ksha','Cxzvu3i','C2vHCMnO','s1fHwKC','ww91CIbZzxnZAw9UigHHCYbLEhbPCMvKlIbqBgvHC2uGCNvUigbYyw5NzxiGBg9NAw5GihrVihjLlwf1DgHLBNrPy2f0zs4','CLPXuLC','EKforu4','DhjPBq','mta0mJa3mgDquvzbCa','s3fgze8','yxbWBhK','EuDtAeq','rKHIvLG','u2vZC2LVBIbLEhbPCMvKlIbszs1HDxrOzw50AwnHDgLUzYb2AweGtunqigjVB3rZDhjHCc4UlG','BevWDwy','mtmYotaYBKDhAwfQ','nK1NCLDiqW','ywjVCNq','tNfSAKW','qMvHCMvYia','mtaYotiWmhbMreDgCq','wxDqsgG','te1MvvK','zgz2Afm','mZyWmJuZoeDKrwT5wa','Dxfqu3e','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG'];_0x3e7c=function(){return _0x536c7a;};return _0x3e7c();}const _0x30d12c=_0x337c;function _0x337c(_0x509b5b,_0x393aa1){_0x509b5b=_0x509b5b-0x19e;const _0x14aad5=_0x3e7c();let _0x523d5e=_0x14aad5[_0x509b5b];if(_0x337c['fpQuPH']===undefined){var _0x25ed50=function(_0x4bfe66){const _0x4fcc5a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34269d='',_0x695734='',_0x1697e6=_0x34269d+_0x25ed50;for(let _0x1b5540=0x0,_0x2f9e99,_0x28335d,_0x55950a=0x0;_0x28335d=_0x4bfe66['charAt'](_0x55950a++);~_0x28335d&&(_0x2f9e99=_0x1b5540%0x4?_0x2f9e99*0x40+_0x28335d:_0x28335d,_0x1b5540++%0x4)?_0x34269d+=_0x1697e6['charCodeAt'](_0x55950a+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2f9e99>>(-0x2*_0x1b5540&0x6)):_0x1b5540:0x0){_0x28335d=_0x4fcc5a['indexOf'](_0x28335d);}for(let _0x300c81=0x0,_0x509322=_0x34269d['length'];_0x300c81<_0x509322;_0x300c81++){_0x695734+='%'+('00'+_0x34269d['charCodeAt'](_0x300c81)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x695734);};_0x337c['zWehHt']=_0x25ed50,_0x337c['wNPlOY']={},_0x337c['fpQuPH']=!![];}const _0x3e7c21=_0x14aad5[0x0],_0x337c39=_0x509b5b+_0x3e7c21,_0x45fec3=_0x337c['wNPlOY'][_0x337c39];if(!_0x45fec3){const _0x25c06b=function(_0x49f70c){this['LEFabC']=_0x49f70c,this['epEUqk']=[0x1,0x0,0x0],this['zlXslK']=function(){return'newState';},this['wNtTxf']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['VAicig']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x25c06b['prototype']['voGClU']=function(){const _0x3f1833=new RegExp(this['wNtTxf']+this['VAicig']),_0xe917c4=_0x3f1833['test'](this['zlXslK']['toString']())?--this['epEUqk'][0x1]:--this['epEUqk'][0x0];return this['tuvRtl'](_0xe917c4);},_0x25c06b['prototype']['tuvRtl']=function(_0x577d46){if(!Boolean(~_0x577d46))return _0x577d46;return this['SZLqmX'](this['LEFabC']);},_0x25c06b['prototype']['SZLqmX']=function(_0x241b26){for(let _0x51c349=0x0,_0x4493d8=this['epEUqk']['length'];_0x51c349<_0x4493d8;_0x51c349++){this['epEUqk']['push'](Math['round'](Math['random']())),_0x4493d8=this['epEUqk']['length'];}return _0x241b26(this['epEUqk'][0x0]);},new _0x25c06b(_0x337c)['voGClU'](),_0x523d5e=_0x337c['zWehHt'](_0x523d5e),_0x337c['wNPlOY'][_0x337c39]=_0x523d5e;}else _0x523d5e=_0x45fec3;return _0x523d5e;}(function(_0x3ff968,_0x1037f5){const _0xe97834=_0x337c,_0x4b2c9c=_0x3ff968();while(!![]){try{const _0x7c1674=-parseInt(_0xe97834(0x1b6))/0x1*(-parseInt(_0xe97834(0x1cf))/0x2)+parseInt(_0xe97834(0x1dc))/0x3*(parseInt(_0xe97834(0x1d7))/0x4)+parseInt(_0xe97834(0x1e8))/0x5*(parseInt(_0xe97834(0x1f0))/0x6)+-parseInt(_0xe97834(0x1c8))/0x7+parseInt(_0xe97834(0x1a1))/0x8+-parseInt(_0xe97834(0x1a5))/0x9+parseInt(_0xe97834(0x1b4))/0xa*(parseInt(_0xe97834(0x1ef))/0xb);if(_0x7c1674===_0x1037f5)break;else _0x4b2c9c['push'](_0x4b2c9c['shift']());}catch(_0x1a2d61){_0x4b2c9c['push'](_0x4b2c9c['shift']());}}}(_0x3e7c,0x31d05));const _0x25ed50=(function(){let _0x37a240=!![];return function(_0x361d80,_0x220cb9){const _0x2f220d=_0x37a240?function(){const _0xa608ef=_0x337c;if(_0x220cb9){const _0x562af9=_0x220cb9[_0xa608ef(0x1ea)](_0x361d80,arguments);return _0x220cb9=null,_0x562af9;}}:function(){};return _0x37a240=![],_0x2f220d;};}()),_0x523d5e=_0x25ed50(this,function(){const _0x3760cf=_0x337c,_0x501c71={'LMfUY':'(((.+)+)+)+$'};return _0x523d5e['toString']()[_0x3760cf(0x1e2)](_0x501c71[_0x3760cf(0x1a3)])['toString']()['constructor'](_0x523d5e)['search'](_0x501c71[_0x3760cf(0x1a3)]);});_0x523d5e();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN='RANGER_CLI_TOKEN',ENV_TOKEN_LEGACY=_0x30d12c(0x1c4),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,'cli.txt'),REFRESH_TOKEN_PATH=join(TOKEN_DIR,_0x30d12c(0x1ba));function isGitHubCI(){const _0x48015c=_0x30d12c;return!!process['env'][_0x48015c(0x1af)];}async function writeToGitHubEnv(_0x3b91b0,_0x17d8a7){const _0x24c8b3=_0x30d12c,_0x12252d={'vhVdl':function(_0xf32667,_0x5c1554,_0x49a1ad){return _0xf32667(_0x5c1554,_0x49a1ad);}},_0x12a87a=process[_0x24c8b3(0x1b5)][_0x24c8b3(0x1af)];_0x12a87a&&await _0x12252d[_0x24c8b3(0x1d8)](appendFile,_0x12a87a,_0x3b91b0+'='+_0x17d8a7+'\x0a');}export async function storeToken(_0xc07205){const _0xf8c13c=_0x30d12c,_0x4f55cf={'riwjd':function(_0xd61101){return _0xd61101();},'XLoAB':function(_0x1e0aaa,_0x2e5c50,_0x3fead7){return _0x1e0aaa(_0x2e5c50,_0x3fead7);},'pnvFK':function(_0x313960,_0x54bc18){return _0x313960!==_0x54bc18;},'YOxWM':_0xf8c13c(0x1ad),'qvUSr':_0xf8c13c(0x1ec),'lizRo':function(_0x5ce8ef,_0x268bd0,_0x52441a){return _0x5ce8ef(_0x268bd0,_0x52441a);},'mdyyc':function(_0x125a6b,_0x363b0e,_0x4c30f7,_0x206dbb){return _0x125a6b(_0x363b0e,_0x4c30f7,_0x206dbb);}};if(_0x4f55cf[_0xf8c13c(0x1aa)](isGitHubCI))await _0x4f55cf[_0xf8c13c(0x1bc)](writeToGitHubEnv,ENV_TOKEN,_0xc07205);else{if(_0x4f55cf[_0xf8c13c(0x1d6)](_0x4f55cf[_0xf8c13c(0x1d0)],_0x4f55cf[_0xf8c13c(0x1e1)]))await _0x4f55cf[_0xf8c13c(0x1b0)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x4f55cf[_0xf8c13c(0x1ab)](writeFile,TOKEN_PATH,_0xc07205,{'mode':0x180});else return _0x3f64c8[_0xf8c13c(0x1b5)][_0x54a87f];}}export async function getToken(){const _0x2f01a9=_0x30d12c,_0x22ee02={'ZtEFV':function(_0x407a23,_0x1a834a){return _0x407a23(_0x1a834a);},'jJFkK':function(_0x473a62,_0x2118dd){return _0x473a62+_0x2118dd;},'NUhGR':function(_0x2bc113,_0x56bb62,_0x293c5f){return _0x2bc113(_0x56bb62,_0x293c5f);},'lEpuf':_0x2f01a9(0x1de),'YcaaM':function(_0x41899e,_0x1e55db){return _0x41899e(_0x1e55db);},'AzEfD':_0x2f01a9(0x1b7),'onRaj':function(_0x37b9fb){return _0x37b9fb();},'LJepD':_0x2f01a9(0x1e5),'dfvhS':_0x2f01a9(0x1df),'yFKTX':function(_0x3be960){return _0x3be960();},'CYsxu':function(_0x5450f3){return _0x5450f3();},'NqljL':function(_0x4b288c,_0xd05f69){return _0x4b288c instanceof _0xd05f69;},'nZORC':_0x2f01a9(0x1e4)};if(process[_0x2f01a9(0x1b5)][ENV_TOKEN])return process['env'][ENV_TOKEN];if(process['env'][ENV_TOKEN_LEGACY])return process[_0x2f01a9(0x1b5)][ENV_TOKEN_LEGACY];let _0x5d2247=null;try{_0x5d2247=(await _0x22ee02[_0x2f01a9(0x1c1)](readFile,TOKEN_PATH,_0x22ee02[_0x2f01a9(0x1ee)]))['trim']()||null;}catch{const _0x411e9c=await tryRefreshToken();return _0x411e9c;}if(!_0x5d2247)return null;const _0x5c036e=await _0x22ee02[_0x2f01a9(0x1d3)](checkTokenValid,_0x5d2247);if(_0x5c036e)return _0x5d2247;const _0x10550b=await _0x22ee02['YcaaM'](tryPromoteRefreshToken,_0x5d2247);if(_0x10550b)return _0x10550b;const _0x547c6c=await tryRefreshToken();if(_0x547c6c)return _0x547c6c;const {getMcpAuthOrigin:_0xd81180,mcpBootstrap:_0x47c870}=await import(_0x22ee02[_0x2f01a9(0x1c0)]),_0x275c8b=await _0x22ee02[_0x2f01a9(0x1bf)](_0xd81180);if(_0x275c8b)try{if(_0x22ee02[_0x2f01a9(0x1ac)]!==_0x22ee02[_0x2f01a9(0x1a4)]){console[_0x2f01a9(0x1c2)](_0x2f01a9(0x1ed)),await _0x22ee02[_0x2f01a9(0x1b3)](_0x47c870);const _0x472844=await _0x22ee02[_0x2f01a9(0x1d4)](tryRefreshToken);if(_0x472844)return _0x472844;}else{const _0x4c22ee=_0x537327 instanceof _0xce52fd?_0x59fde6[_0x2f01a9(0x1d9)]:_0x22ee02['ZtEFV'](_0x1d857a,_0x1386c7);throw new _0x5e3794(_0x22ee02[_0x2f01a9(0x1bd)]('MCP\x20re-authentication\x20failed:\x20'+_0x4c22ee+'\x0a',_0x2f01a9(0x1d5)));}}catch(_0x104f20){const _0x258c14=_0x22ee02[_0x2f01a9(0x19f)](_0x104f20,Error)?_0x104f20['message']:_0x22ee02[_0x2f01a9(0x1ae)](String,_0x104f20);throw new Error(_0x22ee02[_0x2f01a9(0x1bd)](_0x2f01a9(0x1a7)+_0x258c14+'\x0a',_0x2f01a9(0x1d5)));}throw new Error(_0x22ee02[_0x2f01a9(0x1ca)]);}async function checkTokenValid(_0x33a327){const _0x1e633b=_0x30d12c,_0x266418={'MZozs':function(_0x3c21b1,_0x6bf8b6,_0x57614f){return _0x3c21b1(_0x6bf8b6,_0x57614f);},'jtpru':'./environment.js','PlMbS':function(_0x31baa4){return _0x31baa4();},'LSmyV':function(_0x49675d,_0x5d8169,_0xc96056){return _0x49675d(_0x5d8169,_0xc96056);},'dNCbR':_0x1e633b(0x1c7),'KQaZG':function(_0x4ebb8b,_0xe6ee7e){return _0x4ebb8b(_0xe6ee7e);}},_0x2d0355=new AbortController(),_0x26667f=_0x266418[_0x1e633b(0x1db)](setTimeout,()=>_0x2d0355[_0x1e633b(0x19e)](),0x1388);try{const {getApiBaseUrl:_0x373aeb}=await import(_0x266418[_0x1e633b(0x1cc)]),_0x2b7f54=_0x266418[_0x1e633b(0x1d1)](_0x373aeb),_0x432c9f=await _0x266418['LSmyV'](fetch,_0x2b7f54+'/api/v1/mcp/me',{'method':_0x266418[_0x1e633b(0x1a8)],'headers':{'Authorization':_0x1e633b(0x1a0)+_0x33a327},'signal':_0x2d0355[_0x1e633b(0x1c6)]});return _0x432c9f['ok'];}catch{return!![];}finally{_0x266418[_0x1e633b(0x1e3)](clearTimeout,_0x26667f);}}async function tryRefreshToken(){const _0x174b1a=_0x30d12c,_0x5dbc83={'STFyF':_0x174b1a(0x1be)},{refreshCliToken:_0x3f5cad}=await import(_0x5dbc83[_0x174b1a(0x1b1)]);return _0x3f5cad();}async function tryPromoteRefreshToken(_0x123120){const _0x166ce6=_0x30d12c,_0x460eb1={'uqPSq':_0x166ce6(0x1be),'qTGaM':function(_0xffe8e0,_0x12ffec,_0x4cda47){return _0xffe8e0(_0x12ffec,_0x4cda47);}},{refreshPartnerCliToken:_0x11da95}=await import(_0x460eb1[_0x166ce6(0x1a6)]);return _0x460eb1[_0x166ce6(0x1c9)](_0x11da95,_0x123120,{'persistRefreshToken':!![]});}export async function deleteToken(){const _0x3038a0=_0x30d12c,_0x2402e3={'YmJHp':_0x3038a0(0x1b2),'RJAwm':function(_0x24981a,_0x2811f0){return _0x24981a(_0x2811f0);},'IUocJ':function(_0x243860,_0x3d2ea3){return _0x243860===_0x3d2ea3;},'huAHu':_0x3038a0(0x1e6)};try{return await _0x2402e3[_0x3038a0(0x1cd)](unlink,TOKEN_PATH),!![];}catch{return _0x2402e3[_0x3038a0(0x1c3)](_0x2402e3[_0x3038a0(0x1b9)],_0x2402e3['huAHu'])?![]:_0x1e6bf0[_0x3038a0(0x1d2)]()[_0x3038a0(0x1e2)](nMGGwv[_0x3038a0(0x1e0)])[_0x3038a0(0x1d2)]()[_0x3038a0(0x1dd)](_0x5f2c32)[_0x3038a0(0x1e2)](nMGGwv[_0x3038a0(0x1e0)]);}}export async function storeRefreshToken(_0x57bb57){const _0x81f0d5=_0x30d12c,_0x7296c6={'UAOfC':function(_0x26eed9,_0x3d0d18,_0x20e5cd,_0x1b76ff){return _0x26eed9(_0x3d0d18,_0x20e5cd,_0x1b76ff);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x7296c6[_0x81f0d5(0x1ce)](writeFile,REFRESH_TOKEN_PATH,_0x57bb57,{'mode':0x180});}export async function getRefreshToken(){const _0x3e9887=_0x30d12c,_0x26cdbf={'EWktX':'FaOYH','qPxHt':_0x3e9887(0x1a2),'SRdEK':function(_0x357dc4,_0xb427d1,_0x368ad4){return _0x357dc4(_0xb427d1,_0x368ad4);}};try{if(_0x26cdbf[_0x3e9887(0x1c5)]===_0x26cdbf[_0x3e9887(0x1a9)])return!![];else{const _0x5d6fda=await _0x26cdbf[_0x3e9887(0x1b8)](readFile,REFRESH_TOKEN_PATH,'utf-8');return _0x5d6fda[_0x3e9887(0x1e7)]()||null;}}catch{return null;}}export async function deleteRefreshToken(){const _0x5424b9=_0x30d12c,_0x4e5bc2={'KqFdO':function(_0x350fb1,_0x135e35){return _0x350fb1(_0x135e35);},'BXILa':function(_0x2e1dfd,_0x4ef5c9){return _0x2e1dfd!==_0x4ef5c9;},'yrJRX':_0x5424b9(0x1bb),'yGShD':'XxYbe'};try{return await _0x4e5bc2[_0x5424b9(0x1e9)](unlink,REFRESH_TOKEN_PATH),!![];}catch{return _0x4e5bc2['BXILa'](_0x4e5bc2[_0x5424b9(0x1da)],_0x4e5bc2[_0x5424b9(0x1eb)])?![]:![];}}export async function deleteAllCredentials(){const _0x22b80e=_0x30d12c,_0x57c117={'yqXiH':function(_0xb7bfc7){return _0xb7bfc7();}};await deleteToken(),await _0x57c117[_0x22b80e(0x1cb)](deleteRefreshToken);}
1
+ const _0x5767e0=_0x597e;(function(_0x19d5f8,_0x5f2d9a){const _0x13ae58=_0x597e,_0x19a4c0=_0x19d5f8();while(!![]){try{const _0x2020bf=parseInt(_0x13ae58(0x16f))/0x1*(-parseInt(_0x13ae58(0x184))/0x2)+-parseInt(_0x13ae58(0x15c))/0x3+-parseInt(_0x13ae58(0x19b))/0x4*(-parseInt(_0x13ae58(0x155))/0x5)+-parseInt(_0x13ae58(0x185))/0x6*(parseInt(_0x13ae58(0x15d))/0x7)+-parseInt(_0x13ae58(0x17d))/0x8*(parseInt(_0x13ae58(0x170))/0x9)+parseInt(_0x13ae58(0x169))/0xa+parseInt(_0x13ae58(0x17e))/0xb;if(_0x2020bf===_0x5f2d9a)break;else _0x19a4c0['push'](_0x19a4c0['shift']());}catch(_0x4d0b92){_0x19a4c0['push'](_0x19a4c0['shift']());}}}(_0x202c,0x55ad2));const _0x1b3ab5=(function(){const _0x5a1981=_0x597e,_0x3d8bba={'iSnuc':function(_0x1ca242,_0x3a0fb6){return _0x1ca242!==_0x3a0fb6;},'zNyfH':_0x5a1981(0x177),'Hswsw':'FcWRy','UFfQw':_0x5a1981(0x189)};let _0x2e8c8b=!![];return function(_0x57f28a,_0x40443f){const _0x377317=_0x5a1981,_0x268683={'QZkAb':function(_0x27c43a,_0x3fbe29){const _0x41781c=_0x597e;return _0x3d8bba[_0x41781c(0x153)](_0x27c43a,_0x3fbe29);},'waIrn':_0x3d8bba[_0x377317(0x16a)],'xWqah':_0x3d8bba[_0x377317(0x19e)],'HihKt':_0x3d8bba[_0x377317(0x171)]},_0x5c4bfd=_0x2e8c8b?function(){const _0x58b5bc=_0x377317;if(_0x268683['QZkAb'](_0x268683[_0x58b5bc(0x176)],_0x268683[_0x58b5bc(0x176)])){if(_0x5d98e5){const _0x45b1b7=_0x217303[_0x58b5bc(0x165)](_0x528fdc,arguments);return _0x3bfa2=null,_0x45b1b7;}}else{if(_0x40443f){if(_0x268683['QZkAb'](_0x268683[_0x58b5bc(0x197)],_0x268683[_0x58b5bc(0x16d)])){const _0x89b023=_0x40443f[_0x58b5bc(0x165)](_0x57f28a,arguments);return _0x40443f=null,_0x89b023;}else return![];}}}:function(){};return _0x2e8c8b=![],_0x5c4bfd;};}()),_0x5a1f34=_0x1b3ab5(this,function(){const _0x21d125=_0x597e,_0x322fda={'dzZRa':_0x21d125(0x15f)};return _0x5a1f34[_0x21d125(0x156)]()[_0x21d125(0x15a)](_0x322fda[_0x21d125(0x18a)])[_0x21d125(0x156)]()[_0x21d125(0x15b)](_0x5a1f34)['search'](_0x322fda[_0x21d125(0x18a)]);});_0x5a1f34();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';function _0x202c(){const _0x4bba4e=['vNLlu1e','lI9LBNzPCM9UBwvUDc5QCW','uKfor0vsx01duf9ut0TftG','CKDOsKm','nJqXotHkAKDgvhi','mtjMEgXWtgG','CMvMCMvZAc50Ehq','zgvUrwu','yLDXAKW','AMfvz0q','zhPAuMe','CxvgC04','qKH4tgy','ruPnAvG','ywjVCNq','q2zothu','z21lt0O','q1PjwMO','qKnJr1y','ru5ptMu','Bg9N','r0vu','CwziDMO','EfDXywG','DMvXtgS','y0L0vLy','tunqihjLlwf1DgHLBNrPy2f0Aw9UigzHAwXLzdOG','mJaYmJm4mevgzvb0Ea','u2vZC2LVBIbLEhbPCMvKlIbszs1HDxrOzw50AwnHDgLUzYb2AweGtunqigjVB3rZDhjHCc4UlG','zw52','shn3C3C','rgLPrfK','tvnWzKG','AvnUDwm','uxjPsLe','nuLpu2nWEG','Dg9tDhjPBMC','BffyvxC','ufbkCMG','r0Lusfvcx0vovG','C2vHCMnO','y29UC3rYDwn0B3i','mtq1nJy3nhnzzhv4vW','otq3mdy1z0vHrLDl','l2fWAs92ms9Ty3aVBwu','kcGOlISPkYKRksSK','lI90B2TLBLjLzNjLC2GUANm','CKDxq3u','AKXwveO','wNHUqNK','EgHZEeC','yxbWBhK','t21wDK0','uKfor0vsx0nmsv9ut0TftG','uNfnrKm','ndi1nJK3mejfyKPmrG','EK55zKG','wxLWtNm','Bwfyy20','sgLOs3q','tNzvz2W','m1frzvnOrG','mJDctu1sAuu','vuzMuxC','DhjPBq','vuHmqKO','revQENi','qMvHCMvYia','D2fjCM4','C2HMBgS','y2jvrva','C2LNBMfS','txfXwve','ww91CIbZzxnZAw9UigHHCYbLEhbPCMvKlIbqBgvHC2uGCNvUigbYyw5NzxiGBg9NAw5GihrVihjLlwf1DgHLBNrPy2f0zs4','DxrMltG','otyYmZG0rxnIy21n','nJK2mJC0n21MDezTCG','uMuTyxv0Ag9YAxPLihrOzsbsyw5NzxiGtunqignVBM5Ly3rPB24SihrOzw4GCMv0CNKU'];_0x202c=function(){return _0x4bba4e;};return _0x202c();}const ENV_TOKEN=_0x5767e0(0x167),ENV_TOKEN_LEGACY=_0x5767e0(0x182),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,'cli.txt'),REFRESH_TOKEN_PATH=join(TOKEN_DIR,_0x5767e0(0x186));function isGitHubCI(){return!!process['env']['GITHUB_ENV'];}async function writeToGitHubEnv(_0x28297a,_0x5e94e2){const _0x5195ec=_0x5767e0,_0x188291={'DiiDY':function(_0x3fb3dd,_0x2c36da,_0x24ac94){return _0x3fb3dd(_0x2c36da,_0x24ac94);}},_0x124405=process[_0x5195ec(0x19d)][_0x5195ec(0x159)];_0x124405&&await _0x188291[_0x5195ec(0x151)](appendFile,_0x124405,_0x28297a+'='+_0x5e94e2+'\x0a');}export async function storeToken(_0x24f569){const _0x213677=_0x5767e0,_0x19fe7a={'jLVTJ':function(_0x1bc765){return _0x1bc765();},'maXcm':function(_0x81bbd3,_0x547319){return _0x81bbd3===_0x547319;},'zZKOE':_0x213677(0x163),'cItVV':function(_0x505832,_0x4a1e8c,_0x274975){return _0x505832(_0x4a1e8c,_0x274975);}};if(_0x19fe7a[_0x213677(0x162)](isGitHubCI))await writeToGitHubEnv(ENV_TOKEN,_0x24f569);else{if(_0x19fe7a[_0x213677(0x16c)](_0x213677(0x163),_0x19fe7a['zZKOE']))await _0x19fe7a[_0x213677(0x199)](mkdir,TOKEN_DIR,{'recursive':!![]}),await writeFile(TOKEN_PATH,_0x24f569,{'mode':0x180});else{const _0x407f6b=_0x215568[_0x213677(0x165)](_0x69adfd,arguments);return _0x5f41a6=null,_0x407f6b;}}}export async function getToken(){const _0x1220c9=_0x5767e0,_0x293f5a={'QGCeA':_0x1220c9(0x15f),'MFkbq':function(_0x23a068,_0x1b650d,_0x560e32){return _0x23a068(_0x1b650d,_0x560e32);},'NvUgl':'utf-8','CfNLu':function(_0x2a6484,_0x3293e1){return _0x2a6484!==_0x3293e1;},'EJMiX':_0x1220c9(0x152),'ENONe':function(_0x5c5091,_0x48f244){return _0x5c5091(_0x48f244);},'BCcGV':function(_0x153fd3,_0xea43a4){return _0x153fd3(_0xea43a4);},'cbUEP':function(_0x12f614){return _0x12f614();},'gmKOJ':'../mcpBootstrap.js','DEjzr':function(_0x556dde,_0xaac93){return _0x556dde===_0xaac93;},'VyKSQ':_0x1220c9(0x191),'quFsN':_0x1220c9(0x19c),'denEe':function(_0x38492b){return _0x38492b();},'bWqjL':function(_0x5163ef,_0x3bb989){return _0x5163ef+_0x3bb989;},'MqqYQ':_0x1220c9(0x17f)};if(process['env'][ENV_TOKEN])return process[_0x1220c9(0x19d)][ENV_TOKEN];if(process[_0x1220c9(0x19d)][ENV_TOKEN_LEGACY])return process[_0x1220c9(0x19d)][ENV_TOKEN_LEGACY];let _0xce58d4=null;try{_0xce58d4=(await _0x293f5a['MFkbq'](readFile,TOKEN_PATH,_0x293f5a[_0x1220c9(0x16e)]))['trim']()||null;}catch{if(_0x293f5a[_0x1220c9(0x18f)](_0x293f5a['EJMiX'],_0x293f5a[_0x1220c9(0x18d)]))return _0x25ca7a[_0x1220c9(0x19d)][_0x5c33f4];else{const _0x27ac8d=await tryRefreshToken();return _0x27ac8d;}}if(!_0xce58d4)return null;const _0x1fce57=await _0x293f5a[_0x1220c9(0x193)](checkTokenValid,_0xce58d4);if(_0x1fce57)return _0xce58d4;const _0x5dd519=await _0x293f5a[_0x1220c9(0x192)](tryPromoteRefreshToken,_0xce58d4);if(_0x5dd519)return _0x5dd519;const _0x1db105=await _0x293f5a['cbUEP'](tryRefreshToken);if(_0x1db105)return _0x1db105;const {getMcpAuthOrigin:_0x4082a9,mcpBootstrap:_0x12f8df}=await import(_0x293f5a[_0x1220c9(0x190)]),_0x576ef7=await _0x4082a9();if(_0x576ef7)try{if(_0x293f5a[_0x1220c9(0x174)](_0x293f5a[_0x1220c9(0x180)],_0x293f5a[_0x1220c9(0x180)])){console[_0x1220c9(0x194)](_0x293f5a[_0x1220c9(0x18b)]),await _0x293f5a[_0x1220c9(0x187)](_0x12f8df);const _0x4c9689=await _0x293f5a[_0x1220c9(0x178)](tryRefreshToken);if(_0x4c9689)return _0x4c9689;}else return _0x570a66[_0x1220c9(0x156)]()[_0x1220c9(0x15a)](_0x1220c9(0x15f))['toString']()['constructor'](_0x4ad98c)['search'](gFFjfj['QGCeA']);}catch(_0x56c6d1){const _0x33618c=_0x56c6d1 instanceof Error?_0x56c6d1['message']:_0x293f5a[_0x1220c9(0x192)](String,_0x56c6d1);throw new Error(_0x293f5a[_0x1220c9(0x188)](_0x1220c9(0x19a)+_0x33618c+'\x0a',_0x293f5a[_0x1220c9(0x17a)]));}throw new Error(_0x1220c9(0x17b));}async function checkTokenValid(_0x17327b){const _0x505884=_0x5767e0,_0x6ec777={'rGhJC':function(_0x3056d0,_0x255a99,_0x4c82b7){return _0x3056d0(_0x255a99,_0x4c82b7);},'xhsxG':_0x505884(0x181),'RqMFC':function(_0x42b2b1){return _0x42b2b1();},'qfHvj':_0x505884(0x195),'PmTUI':function(_0x2aee8f,_0x17c4a9){return _0x2aee8f!==_0x17c4a9;},'OmVvM':'SxQCi','JsfcL':'dsurE'},_0x26a2f=new AbortController(),_0x161de9=_0x6ec777[_0x505884(0x183)](setTimeout,()=>_0x26a2f[_0x505884(0x18e)](),0x1388);try{const {getApiBaseUrl:_0x3721a5}=await import(_0x6ec777[_0x505884(0x164)]),_0x247d5c=_0x6ec777[_0x505884(0x168)](_0x3721a5),_0x161b91=await fetch(_0x247d5c+_0x505884(0x15e),{'method':_0x6ec777[_0x505884(0x196)],'headers':{'Authorization':_0x505884(0x175)+_0x17327b},'signal':_0x26a2f[_0x505884(0x179)]});return _0x161b91['ok'];}catch{return _0x6ec777['PmTUI'](_0x6ec777[_0x505884(0x166)],_0x6ec777['JsfcL'])?!![]:null;}finally{clearTimeout(_0x161de9);}}async function tryRefreshToken(){const _0x2e651a=_0x5767e0,_0x146c6a={'YypNs':function(_0x57b27c){return _0x57b27c();}},{refreshCliToken:_0x32fa80}=await import(_0x2e651a(0x160));return _0x146c6a[_0x2e651a(0x16b)](_0x32fa80);}async function tryPromoteRefreshToken(_0x3b1e92){const _0x5c5a1a=_0x5767e0,_0x9525e0={'BHxLf':_0x5c5a1a(0x160)},{refreshPartnerCliToken:_0x341ce3}=await import(_0x9525e0[_0x5c5a1a(0x18c)]);return _0x341ce3(_0x3b1e92,{'persistRefreshToken':!![]});}function _0x597e(_0x8ade4,_0x47cd9c){_0x8ade4=_0x8ade4-0x151;const _0x37ddc8=_0x202c();let _0x5a1f34=_0x37ddc8[_0x8ade4];if(_0x597e['WAQuQl']===undefined){var _0x1b3ab5=function(_0xb369c1){const _0x3b82de='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5974cc='',_0x4c5327='',_0x5a1e4f=_0x5974cc+_0x1b3ab5;for(let _0x59c55d=0x0,_0x35d0e3,_0xf4ca06,_0x2e4c7a=0x0;_0xf4ca06=_0xb369c1['charAt'](_0x2e4c7a++);~_0xf4ca06&&(_0x35d0e3=_0x59c55d%0x4?_0x35d0e3*0x40+_0xf4ca06:_0xf4ca06,_0x59c55d++%0x4)?_0x5974cc+=_0x5a1e4f['charCodeAt'](_0x2e4c7a+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x35d0e3>>(-0x2*_0x59c55d&0x6)):_0x59c55d:0x0){_0xf4ca06=_0x3b82de['indexOf'](_0xf4ca06);}for(let _0x4f5b9c=0x0,_0x1b4035=_0x5974cc['length'];_0x4f5b9c<_0x1b4035;_0x4f5b9c++){_0x4c5327+='%'+('00'+_0x5974cc['charCodeAt'](_0x4f5b9c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c5327);};_0x597e['ORNuFS']=_0x1b3ab5,_0x597e['BaEtYJ']={},_0x597e['WAQuQl']=!![];}const _0x202ccc=_0x37ddc8[0x0],_0x597e22=_0x8ade4+_0x202ccc,_0x15a7ab=_0x597e['BaEtYJ'][_0x597e22];if(!_0x15a7ab){const _0x5cbced=function(_0x29c1fc){this['QGCMCo']=_0x29c1fc,this['KKxLnQ']=[0x1,0x0,0x0],this['pWInzw']=function(){return'newState';},this['ZWZGeb']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['uOeRBZ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5cbced['prototype']['FQFTHS']=function(){const _0x13b9e9=new RegExp(this['ZWZGeb']+this['uOeRBZ']),_0x341a0f=_0x13b9e9['test'](this['pWInzw']['toString']())?--this['KKxLnQ'][0x1]:--this['KKxLnQ'][0x0];return this['aACQJe'](_0x341a0f);},_0x5cbced['prototype']['aACQJe']=function(_0x47a1cd){if(!Boolean(~_0x47a1cd))return _0x47a1cd;return this['cVdQrT'](this['QGCMCo']);},_0x5cbced['prototype']['cVdQrT']=function(_0x440b6e){for(let _0xddbab2=0x0,_0x1c676b=this['KKxLnQ']['length'];_0xddbab2<_0x1c676b;_0xddbab2++){this['KKxLnQ']['push'](Math['round'](Math['random']())),_0x1c676b=this['KKxLnQ']['length'];}return _0x440b6e(this['KKxLnQ'][0x0]);},new _0x5cbced(_0x597e)['FQFTHS'](),_0x5a1f34=_0x597e['ORNuFS'](_0x5a1f34),_0x597e['BaEtYJ'][_0x597e22]=_0x5a1f34;}else _0x5a1f34=_0x15a7ab;return _0x5a1f34;}export async function deleteToken(){const _0x38e69e={'KBUYX':function(_0x566a48,_0x1694e7){return _0x566a48(_0x1694e7);}};try{return await _0x38e69e['KBUYX'](unlink,TOKEN_PATH),!![];}catch{return![];}}export async function storeRefreshToken(_0x5f367e){const _0x9ef421={'PLtYn':function(_0x7d1d29,_0x558aee,_0x5793ff,_0x1fbe29){return _0x7d1d29(_0x558aee,_0x5793ff,_0x1fbe29);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x9ef421['PLtYn'](writeFile,REFRESH_TOKEN_PATH,_0x5f367e,{'mode':0x180});}export async function getRefreshToken(){const _0x1dc4c5=_0x5767e0;try{const _0x5c7602=await readFile(REFRESH_TOKEN_PATH,_0x1dc4c5(0x17c));return _0x5c7602[_0x1dc4c5(0x172)]()||null;}catch{return null;}}export async function deleteRefreshToken(){const _0x4f0070=_0x5767e0,_0x2f9395={'PPJrh':function(_0x42f157,_0x3fe89f){return _0x42f157===_0x3fe89f;},'rGWCu':_0x4f0070(0x154),'PaSgR':'XbZCu','lQXUw':function(_0x287152,_0x270bea){return _0x287152(_0x270bea);}};try{return _0x2f9395[_0x4f0070(0x158)](_0x2f9395[_0x4f0070(0x161)],_0x2f9395['PaSgR'])?!!_0x116317[_0x4f0070(0x19d)][_0x4f0070(0x159)]:(await _0x2f9395[_0x4f0070(0x157)](unlink,REFRESH_TOKEN_PATH),!![]);}catch{return![];}}export async function deleteAllCredentials(){const _0xd9765a=_0x5767e0,_0x13a20b={'veqLk':function(_0x54fccf){return _0x54fccf();},'UHLBJ':function(_0x3022a1){return _0x3022a1();}};await _0x13a20b[_0xd9765a(0x198)](deleteToken),await _0x13a20b[_0xd9765a(0x173)](deleteRefreshToken);}
@@ -1 +1 @@
1
- const _0x12daf8=_0x502f;(function(_0x371f19,_0x205017){const _0x447864=_0x502f,_0x56c5c7=_0x371f19();while(!![]){try{const _0x245f94=parseInt(_0x447864(0x1cc))/0x1*(parseInt(_0x447864(0x1d7))/0x2)+-parseInt(_0x447864(0x1c8))/0x3+parseInt(_0x447864(0x1d3))/0x4+-parseInt(_0x447864(0x1d6))/0x5+-parseInt(_0x447864(0x1d1))/0x6+-parseInt(_0x447864(0x1d5))/0x7*(parseInt(_0x447864(0x1d2))/0x8)+-parseInt(_0x447864(0x1c6))/0x9*(-parseInt(_0x447864(0x1d9))/0xa);if(_0x245f94===_0x205017)break;else _0x56c5c7['push'](_0x56c5c7['shift']());}catch(_0x14fd59){_0x56c5c7['push'](_0x56c5c7['shift']());}}}(_0x6297,0x4edeb));import{existsSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function detectLegacyPaths(){const _0x22dfd5=_0x502f,_0x46c357={'yyOUn':function(_0x4fa8f1){return _0x4fa8f1();},'wEKXN':_0x22dfd5(0x1cb),'eymhv':'active-profile.txt'},_0x599709=_0x46c357[_0x22dfd5(0x1c5)](getRangerDir),_0xfd0350=_0x46c357[_0x22dfd5(0x1c5)](getRangerHomeDir);return[join(_0x599709,_0x22dfd5(0x1cb)),join(_0x599709,'ci'),join(_0xfd0350,_0x46c357[_0x22dfd5(0x1db)]),join(_0x599709,_0x46c357['eymhv'])][_0x22dfd5(0x1da)](_0x575e29=>existsSync(_0x575e29));}function flagFilePath(){const _0x2f9a27={'fklke':function(_0xf7e277){return _0xf7e277();}},_0x17aed9=new Date()['toISOString']()['slice'](0x0,0xa);return join(_0x2f9a27['fklke'](getRangerHomeDir),'.legacy-warning-'+_0x17aed9);}function _0x6297(){const _0x29ca55=['--help','local','255435FXVWIs','length','setup-ci','\x20\x20\x20\x20\x20','setup','3195150bcktcJ','211168qyTGbq','476000ZLhibv','MbHuM','140apAYpN','1787980cBNsTF','4IoTINw','dGdic','97390qtCkOX','filter','wEKXN','INzAF','yyOUn','1035RuFrWa','\x20\x20\x20For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','26289fwlVzs','start'];_0x6297=function(){return _0x29ca55;};return _0x6297();}function _0x502f(_0x51ef99,_0x397832){_0x51ef99=_0x51ef99-0x1c5;const _0x62976d=_0x6297();let _0x502f8e=_0x62976d[_0x51ef99];return _0x502f8e;}export function showLegacyDeprecationWarning(){const _0x8f7292=_0x502f,_0x4e55de={'MbHuM':function(_0x5251ec,_0x26a14f){return _0x5251ec===_0x26a14f;},'dGdic':function(_0x2a81c6){return _0x2a81c6();},'GZwrc':'\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20<name>','INzAF':'\x20\x20\x20\x20\x20https://docs.ranger.net/main/concepts/profiles','IHJxz':function(_0x2af5e4,_0x5202aa){return _0x2af5e4+_0x5202aa;},'oLQVA':function(_0x7b066c,_0x373940,_0xb89142){return _0x7b066c(_0x373940,_0xb89142);}},_0x25ceed=detectLegacyPaths();if(_0x4e55de[_0x8f7292(0x1d4)](_0x25ceed[_0x8f7292(0x1cd)],0x0))return;const _0x26685d=_0x4e55de['dGdic'](flagFilePath);if(existsSync(_0x26685d))return;const _0x427d9b=['','⚠\x20\x20Legacy\x20Ranger\x20paths\x20detected\x20(read-only):',..._0x25ceed['map'](_0x402559=>_0x8f7292(0x1cf)+_0x402559),'','\x20\x20\x20Ranger\x20no\x20longer\x20writes\x20to\x20these\x20paths.\x20Existing\x20sessions\x20there\x20still\x20work','\x20\x20\x20as\x20a\x20fallback.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:','',_0x4e55de['GZwrc'],'',_0x8f7292(0x1c7),_0x4e55de[_0x8f7292(0x1dc)],'','\x20\x20\x20Delete\x20these\x20paths\x20after\x20you\x20have\x20re-auth-ed.',''];process['stderr']['write'](_0x4e55de['IHJxz'](_0x427d9b['join']('\x0a'),'\x0a'));try{_0x4e55de['oLQVA'](mkdirSync,_0x4e55de[_0x8f7292(0x1d8)](getRangerHomeDir),{'recursive':!![]}),writeFileSync(_0x26685d,'',{'mode':0x180});}catch{}}const PROFILE_TOUCHING_COMMANDS=new Set(['go','verify','verify-feature','profile','profiles',_0x12daf8(0x1d0),_0x12daf8(0x1ce),_0x12daf8(0x1c9),'use']);export function shouldShowLegacyWarning(_0x9890d4){const _0xc87d1f=_0x12daf8,_0x357ee9={'BBycA':function(_0x14fc1c,_0x36ea1a){return _0x14fc1c<_0x36ea1a;},'ePIBO':function(_0x338e5a,_0x48569c){return _0x338e5a===_0x48569c;}},_0x3cd280=_0x9890d4[0x2];if(!_0x3cd280)return![];if(_0x3cd280['startsWith']('-'))return![];if(!PROFILE_TOUCHING_COMMANDS['has'](_0x3cd280))return![];for(let _0x2cdb9e=0x3;_0x357ee9['BBycA'](_0x2cdb9e,_0x9890d4[_0xc87d1f(0x1cd)]);_0x2cdb9e++){if(_0x9890d4[_0x2cdb9e]===_0xc87d1f(0x1ca)||_0x357ee9['ePIBO'](_0x9890d4[_0x2cdb9e],'-h'))return![];}return!![];}
1
+ const _0x1ea2f7=_0xd8bc;(function(_0x3b3268,_0x575970){const _0x91f308=_0xd8bc,_0xc886d9=_0x3b3268();while(!![]){try{const _0x2c8667=parseInt(_0x91f308(0x8b))/0x1*(-parseInt(_0x91f308(0x76))/0x2)+-parseInt(_0x91f308(0x7e))/0x3+parseInt(_0x91f308(0x85))/0x4+-parseInt(_0x91f308(0x92))/0x5*(-parseInt(_0x91f308(0x88))/0x6)+-parseInt(_0x91f308(0x94))/0x7*(-parseInt(_0x91f308(0x78))/0x8)+parseInt(_0x91f308(0x89))/0x9*(parseInt(_0x91f308(0x72))/0xa)+-parseInt(_0x91f308(0x8c))/0xb;if(_0x2c8667===_0x575970)break;else _0xc886d9['push'](_0xc886d9['shift']());}catch(_0x50a064){_0xc886d9['push'](_0xc886d9['shift']());}}}(_0x5efa,0xdad8a));import{existsSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function detectLegacyPaths(){const _0x103985=_0xd8bc,_0x7a01b9={'Thvic':function(_0xd91ef1){return _0xd91ef1();},'clJGH':function(_0x52d904){return _0x52d904();},'kmywl':function(_0x54d76d,_0x5f1231,_0x29ca0f){return _0x54d76d(_0x5f1231,_0x29ca0f);},'hrJyb':'local'},_0x888e35=_0x7a01b9[_0x103985(0x95)](getRangerDir),_0x34ce29=_0x7a01b9[_0x103985(0x75)](getRangerHomeDir);return[_0x7a01b9[_0x103985(0x79)](join,_0x888e35,_0x7a01b9['hrJyb']),join(_0x888e35,'ci'),join(_0x34ce29,'local'),_0x7a01b9['kmywl'](join,_0x888e35,_0x103985(0x83))]['filter'](_0x22d760=>existsSync(_0x22d760));}function _0xd8bc(_0x1a8970,_0x274951){_0x1a8970=_0x1a8970-0x72;const _0x5efa22=_0x5efa();let _0xd8bcc8=_0x5efa22[_0x1a8970];return _0xd8bcc8;}function flagFilePath(){const _0x537b37=_0xd8bc,_0x47bad1=new Date()[_0x537b37(0x7c)]()['slice'](0x0,0xa);return join(getRangerHomeDir(),_0x537b37(0x90)+_0x47bad1);}function _0x5efa(){const _0x16e079=['write','active-profile.txt','setup','3282388VrIDlQ','IoKjA','verify','137652huZjTz','9nJSqfc','\x20\x20\x20\x20\x20','459SGrrvH','28801135Wgrvsh','vkSOu','otHCW','stderr','.legacy-warning-','start','230mAAvgp','startsWith','701869uoavZZ','Thvic','cVBnP','16774810DTACIa','\x20\x20\x20\x20\x20https://docs.ranger.net/main/concepts/profiles','setup-ci','clJGH','3450sAkSdT','\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20<name>','88qsimHC','kmywl','\x20\x20\x20For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','length','toISOString','use','1049679LeunJs','--help','\x20\x20\x20as\x20a\x20fallback.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:','TXEcx'];_0x5efa=function(){return _0x16e079;};return _0x5efa();}export function showLegacyDeprecationWarning(){const _0x526304=_0xd8bc,_0x110dce={'cVBnP':function(_0x29d714,_0x37b7af){return _0x29d714(_0x37b7af);},'TXEcx':'⚠\x20\x20Legacy\x20Ranger\x20paths\x20detected\x20(read-only):','IoKjA':_0x526304(0x80),'otHCW':_0x526304(0x73),'MEcAO':function(_0x2e1b9e,_0x29a824,_0x4248a2,_0x257bcd){return _0x2e1b9e(_0x29a824,_0x4248a2,_0x257bcd);}},_0x394443=detectLegacyPaths();if(_0x394443[_0x526304(0x7b)]===0x0)return;const _0x11411c=flagFilePath();if(_0x110dce[_0x526304(0x96)](existsSync,_0x11411c))return;const _0x2b881e=['',_0x110dce[_0x526304(0x81)],..._0x394443['map'](_0x30c4f6=>_0x526304(0x8a)+_0x30c4f6),'','\x20\x20\x20Ranger\x20no\x20longer\x20writes\x20to\x20these\x20paths.\x20Existing\x20sessions\x20there\x20still\x20work',_0x110dce[_0x526304(0x86)],'',_0x526304(0x77),'',_0x526304(0x7a),_0x110dce[_0x526304(0x8e)],'','\x20\x20\x20Delete\x20these\x20paths\x20after\x20you\x20have\x20re-auth-ed.',''];process[_0x526304(0x8f)][_0x526304(0x82)](_0x2b881e['join']('\x0a')+'\x0a');try{mkdirSync(getRangerHomeDir(),{'recursive':!![]}),_0x110dce['MEcAO'](writeFileSync,_0x11411c,'',{'mode':0x180});}catch{}}const PROFILE_TOUCHING_COMMANDS=new Set(['go',_0x1ea2f7(0x87),'verify-feature','profile','profiles',_0x1ea2f7(0x84),_0x1ea2f7(0x74),_0x1ea2f7(0x91),_0x1ea2f7(0x7d)]);export function shouldShowLegacyWarning(_0x127638){const _0x487a97=_0x1ea2f7,_0x4f4a27={'cHyCx':function(_0x4374ab,_0x562932){return _0x4374ab<_0x562932;},'npISL':_0x487a97(0x7f),'vkSOu':function(_0x327eff,_0x2a0f46){return _0x327eff===_0x2a0f46;}},_0x45b621=_0x127638[0x2];if(!_0x45b621)return![];if(_0x45b621[_0x487a97(0x93)]('-'))return![];if(!PROFILE_TOUCHING_COMMANDS['has'](_0x45b621))return![];for(let _0xaac86c=0x3;_0x4f4a27['cHyCx'](_0xaac86c,_0x127638[_0x487a97(0x7b)]);_0xaac86c++){if(_0x127638[_0xaac86c]===_0x4f4a27['npISL']||_0x4f4a27[_0x487a97(0x8d)](_0x127638[_0xaac86c],'-h'))return![];}return!![];}