@myagentroam/node 0.9.36 → 0.9.38

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.
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- (function(_0x15786c,_0x1c8b86){const _0x27c443=_0x5867,_0x189afc=_0x15786c();while(!![]){try{const _0x237620=-parseInt(_0x27c443(0x1ef))/(-0xf73+-0x247*-0x2+0xae6)+parseInt(_0x27c443(0x1d7))/(0x2*-0xda3+0x1*-0xda9+0x28f1)*(-parseInt(_0x27c443(0x241))/(0x1bc4*0x1+0x13c5+-0x2f86))+parseInt(_0x27c443(0x1c4))/(-0x6a6+0x2fa+0x1d8*0x2)+-parseInt(_0x27c443(0x1c7))/(-0x250a+0x1507*0x1+0x1008)*(-parseInt(_0x27c443(0x1f8))/(0x6d*-0x1d+0x3*0x232+0x5c9))+-parseInt(_0x27c443(0x204))/(0x134a+-0xdac+0x35*-0x1b)+parseInt(_0x27c443(0x21d))/(-0xb0b*-0x3+-0x1c62+-0x4b7)+parseInt(_0x27c443(0x227))/(0x1d1*-0x13+0x1*-0x10a6+0x3332)*(parseInt(_0x27c443(0x1f7))/(0xe82*-0x2+-0x194b+0x3659));if(_0x237620===_0x1c8b86)break;else _0x189afc['push'](_0x189afc['shift']());}catch(_0x2116fc){_0x189afc['push'](_0x189afc['shift']());}}}(_0x3bda,0x54751+0x413ff+0x37*-0xe03));import{createHash}from'node:crypto';import{fileURLToPath}from'node:url';import{stripClaudePlanTag}from'../runner-command-engine.js';import{stripMissionStartPrompt}from'../service/mission-runtime.js';import{parseCodexComposerImageMarkers}from'../runner/codex/composer-image-markers.js';import{normalizeCodexTool}from'../runner/codex/tool-normalizer.js';import{normalizeClaudeTool}from'../runner/claude/tool-normalizer.js';import{compactRunnerText,isPlainRecord,nativePageEnd}from'./node-operation-parsers.js';export function extractId(_0x546b4e,_0x49656e){const _0x2cf9b1=_0x5867;if(typeof _0x546b4e===_0x2cf9b1(0x209)&&_0x546b4e!==null&&_0x49656e in _0x546b4e&&typeof _0x546b4e[_0x49656e]===_0x2cf9b1(0x209)&&_0x546b4e[_0x49656e]!==null&&typeof _0x546b4e[_0x49656e]['id']===_0x2cf9b1(0x212))return _0x546b4e[_0x49656e]['id'];throw new Error(_0x2cf9b1(0x1cf)+_0x49656e[_0x2cf9b1(0x1d6)]()+_0x2cf9b1(0x1fa));}export async function settleWithin(_0x27edce,_0x3f227a){const _0x83bbc4=_0x5867;let _0x139c02;try{return await Promise[_0x83bbc4(0x1bf)]([_0x27edce,new Promise(_0x3b5d3a=>{const _0x186de4=_0x83bbc4;_0x139c02=setTimeout(()=>_0x3b5d3a(undefined),_0x3f227a),_0x139c02[_0x186de4(0x1e4)]();})]);}finally{if(_0x139c02!==undefined)clearTimeout(_0x139c02);}}export function extractCodexThreads(_0x10d17c){const _0x55bbd5=_0x5867;if(typeof _0x10d17c!==_0x55bbd5(0x209)||_0x10d17c===null||!(_0x55bbd5(0x203)in _0x10d17c))return[];const _0x245778=_0x10d17c[_0x55bbd5(0x203)];if(!Array[_0x55bbd5(0x23f)](_0x245778))return[];return _0x245778[_0x55bbd5(0x1ce)](_0x436e9d=>{const _0x5856cf=_0x55bbd5;if(typeof _0x436e9d!==_0x5856cf(0x209)||_0x436e9d===null)return[];const _0x32428b=_0x436e9d;if(typeof _0x32428b['id']!==_0x5856cf(0x212))return[];const _0xdca072=typeof _0x32428b[_0x5856cf(0x1f6)]===_0x5856cf(0x212)?_0x32428b[_0x5856cf(0x1f6)]:typeof _0x32428b[_0x5856cf(0x222)]===_0x5856cf(0x212)?_0x32428b[_0x5856cf(0x222)]:typeof _0x32428b[_0x5856cf(0x222)]===_0x5856cf(0x209)&&_0x32428b[_0x5856cf(0x222)]!==null&&typeof _0x32428b[_0x5856cf(0x222)][_0x5856cf(0x1f2)]===_0x5856cf(0x212)?_0x32428b[_0x5856cf(0x222)][_0x5856cf(0x1f2)]:undefined,_0x53a142=isPlainRecord(_0x32428b[_0x5856cf(0x222)])?_0x32428b[_0x5856cf(0x222)]:undefined,_0xb48520=_0xdca072===_0x5856cf(0x1e6)||_0x53a142?.[_0x5856cf(0x1f2)]===_0x5856cf(0x1e6)||isPlainRecord(_0x53a142?.[_0x5856cf(0x1e6)])||isPlainRecord(_0x53a142?.[_0x5856cf(0x225)]),_0x5a502e=typeof _0x32428b[_0x5856cf(0x22d)]===_0x5856cf(0x212)&&_0x32428b[_0x5856cf(0x22d)][_0x5856cf(0x206)]()[_0x5856cf(0x219)]>0x1824+0x641+-0xfb*0x1f?_0x32428b[_0x5856cf(0x22d)][_0x5856cf(0x206)]():typeof _0x32428b[_0x5856cf(0x1e8)]===_0x5856cf(0x212)&&_0x32428b[_0x5856cf(0x1e8)][_0x5856cf(0x206)]()[_0x5856cf(0x219)]>0x59*-0x35+0x1273*-0x1+0x8*0x49c?_0x32428b[_0x5856cf(0x1e8)][_0x5856cf(0x206)]():undefined;return[{'id':_0x32428b['id'],'source':_0xdca072,'derived':_0xb48520,'cwd':_0x32428b[_0x5856cf(0x1b5)],'title':_0x5a502e}];});}export function codexThreadCwd(_0x2c4f91){const _0x44bf52=_0x5867;if(typeof _0x2c4f91!==_0x44bf52(0x212)||_0x2c4f91[_0x44bf52(0x219)]===0x7*-0x517+-0x1*-0xaf+-0x1*-0x22f2)throw new Error(_0x44bf52(0x239));if(!_0x2c4f91[_0x44bf52(0x233)](_0x44bf52(0x1de)))return _0x2c4f91;try{return fileURLToPath(_0x2c4f91);}catch{throw new Error(_0x44bf52(0x239));}}export function isWithinWorkspace(_0x58f095,_0x3e043c){const _0x4c5a73=_0x5867,_0x4bbd90=_0x2db6fd=>{const _0x3e2bf6=_0x5867,_0x544a42=_0x2db6fd[_0x3e2bf6(0x221)](/[\\/]+/g,'/')[_0x3e2bf6(0x221)](/\/$/,'');return process[_0x3e2bf6(0x1ec)]===_0x3e2bf6(0x237)?_0x544a42[_0x3e2bf6(0x214)]():_0x544a42;},_0x13221b=_0x4bbd90(_0x58f095),_0x36b00a=_0x4bbd90(_0x3e043c);if(_0x13221b===_0x36b00a)return!![];return _0x13221b[_0x4c5a73(0x233)](_0x36b00a+'/');}export function claudeDiscoveredSession(_0x1228cc,_0x2003d8){const _0xd712b=_0x5867;if(typeof _0x1228cc!==_0xd712b(0x209)||_0x1228cc===null)return undefined;const _0x3dc6b4=_0x1228cc;if(_0x3dc6b4[_0xd712b(0x22a)]===!![])return undefined;const _0x51797e=typeof _0x3dc6b4[_0xd712b(0x1d3)]===_0xd712b(0x212)?_0x3dc6b4[_0xd712b(0x1d3)]:typeof _0x3dc6b4['id']===_0xd712b(0x212)?_0x3dc6b4['id']:undefined;if(_0x51797e===undefined||_0x51797e[_0xd712b(0x219)]===-0x2190+-0x1933*0x1+0x865*0x7)return undefined;const _0x2b07ec=typeof _0x3dc6b4[_0xd712b(0x1bb)]===_0xd712b(0x212)?_0x3dc6b4[_0xd712b(0x1bb)]:typeof _0x3dc6b4[_0xd712b(0x1d9)]===_0xd712b(0x212)?_0x3dc6b4[_0xd712b(0x1d9)]:undefined,_0x54e36a=typeof _0x3dc6b4[_0xd712b(0x1b5)]===_0xd712b(0x212)&&_0x3dc6b4[_0xd712b(0x1b5)][_0xd712b(0x219)]>0x1*-0x253d+-0x15ef+-0x874*-0x7?_0x3dc6b4[_0xd712b(0x1b5)]:_0x2003d8;return{'externalSessionId':_0x51797e,'cwd':_0x54e36a,..._0x2b07ec===undefined?{}:{'title':_0x2b07ec[_0xd712b(0x1c2)](0x750+0x1926+-0x2076,0x1*0x769+-0x2111*-0x1+-0x282a)}};}export function latestNativeActivity(_0x289dd0){const _0x5fa6eb=_0x5867;return _0x289dd0[_0x5fa6eb(0x23d)];}export function sameContextUsage(_0x24d5f7,_0x3c6cac){const _0x4adc6d=_0x5867;return _0x24d5f7[_0x4adc6d(0x217)]===_0x3c6cac[_0x4adc6d(0x217)]&&_0x24d5f7[_0x4adc6d(0x1ff)]===_0x3c6cac[_0x4adc6d(0x1ff)]&&_0x24d5f7[_0x4adc6d(0x205)]===_0x3c6cac[_0x4adc6d(0x205)];}function _0x5867(_0x3a834c,_0x46b1ba){_0x3a834c=_0x3a834c-(0x1724*-0x1+0x1c19*0x1+-0x340);const _0x561f29=_0x3bda();let _0x4a3e7b=_0x561f29[_0x3a834c];if(_0x5867['CXTDfJ']===undefined){var _0x588dce=function(_0x34bb89){const _0x43ee75='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4ba8fa='',_0x89b234='';for(let _0x46f8e1=0xe5*-0xa+-0x1*0x2126+0x2a18,_0x8b8a3a,_0x5490a8,_0x58907d=0x1e80+-0x13d6+0xb6*-0xf;_0x5490a8=_0x34bb89['charAt'](_0x58907d++);~_0x5490a8&&(_0x8b8a3a=_0x46f8e1%(0x1*0x1d0e+0x16aa+0xced*-0x4)?_0x8b8a3a*(0xbef+-0x1*-0x1852+-0x2401)+_0x5490a8:_0x5490a8,_0x46f8e1++%(-0x1933*0x1+0x6f4*-0x5+0x3bfb))?_0x4ba8fa+=String['fromCharCode'](-0x15ef*0x1+-0xd5*-0xd+0x1bb*0x7&_0x8b8a3a>>(-(-0x866+0x242*-0x1+0x1*0xaaa)*_0x46f8e1&0x1d47+-0x7*0x556+0x819)):-0x2*-0xfb+0xcc4+-0xeba){_0x5490a8=_0x43ee75['indexOf'](_0x5490a8);}for(let _0x86f7ec=0x1a68+-0x2f*-0x68+-0x68*0x70,_0x34367f=_0x4ba8fa['length'];_0x86f7ec<_0x34367f;_0x86f7ec++){_0x89b234+='%'+('00'+_0x4ba8fa['charCodeAt'](_0x86f7ec)['toString'](0x1e08+-0x125b+-0xb9d))['slice'](-(0x289*-0x1+0x21ed*-0x1+0x2478));}return decodeURIComponent(_0x89b234);};_0x5867['olNuKR']=_0x588dce,_0x5867['DtQqbO']={},_0x5867['CXTDfJ']=!![];}const _0x5373cb=_0x561f29[-0x488+0x83*0x49+-0x20d3];_0x5867['cIuSRR']!==_0x5373cb&&(_0x5867['DtQqbO']={},_0x5867['cIuSRR']=_0x5373cb);const _0x2308d1=_0x5867['DtQqbO'][_0x3a834c];return _0x2308d1===undefined?(_0x4a3e7b=_0x5867['olNuKR'](_0x4a3e7b),_0x5867['DtQqbO'][_0x3a834c]=_0x4a3e7b):_0x4a3e7b=_0x2308d1,_0x4a3e7b;}export function isNativeHistory(_0x285a69){const _0xa6c037=_0x5867;return typeof _0x285a69===_0xa6c037(0x209)&&_0x285a69!==null&&Array[_0xa6c037(0x23f)](_0x285a69[_0xa6c037(0x23b)]);}export function deduplicateDirectSessions(_0x322687){const _0x41e068=_0x5867,_0x31831b=new Map();for(const _0x3d7437 of _0x322687){const _0x596a79=_0x31831b[_0x41e068(0x20c)](_0x3d7437['id']);if(_0x596a79===undefined||_0x596a79[_0x41e068(0x23d)]<_0x3d7437[_0x41e068(0x23d)])_0x31831b[_0x41e068(0x208)](_0x3d7437['id'],_0x3d7437);}return[..._0x31831b[_0x41e068(0x1f0)]()][_0x41e068(0x1f3)]((_0x2c8bfb,_0x265c55)=>_0x265c55[_0x41e068(0x23d)]-_0x2c8bfb[_0x41e068(0x23d)]);}export function nativeConversationPage(_0x2cb19b,_0x5c40c0,_0x10661a,_0x50f20a=[],_0x5b35b8=()=>[]){const _0x2e89e8=_0x5867,_0x3b54af=Math[_0x2e89e8(0x20d)](Math[_0x2e89e8(0x1d5)](_0x10661a[_0x2e89e8(0x1f5)]??0x22e+0xe*-0xf2+-0x16*-0x82,0x3b*-0x63+-0xd3e+-0x10*-0x241),-0x10*-0x83+-0x1377+0xd3b),_0x40232c=_0x5c40c0[_0x2e89e8(0x1c0)]===!![]?undefined:_0x10661a[_0x2e89e8(0x1f1)],_0x41c815=nativeTranscriptTurns(_0x5c40c0[_0x2e89e8(0x23b)]),_0x5d6ec5=nativeTranscriptTurnIds(_0x2cb19b['id'],_0x41c815),_0x15fb64=nativePageEnd(_0x40232c,_0x2cb19b['id'],_0x41c815[_0x2e89e8(0x219)]),_0x5ceb7d=Math[_0x2e89e8(0x1d5)](-0xdf2+0x289*-0x1+0x107b*0x1,_0x15fb64-_0x3b54af),_0x1cde99=_0x41c815[_0x2e89e8(0x1c2)](_0x5ceb7d,_0x15fb64)[_0x2e89e8(0x1b7)]((_0x19e3ec,_0x10f077)=>{const _0x23a3b3=_0x2e89e8,_0x3936f2=_0x19e3ec[_0x23a3b3(0x1c9)](({entry:_0x24c72b})=>_0x24c72b[_0x23a3b3(0x1f2)]===_0x23a3b3(0x235)&&_0x24c72b[_0x23a3b3(0x224)]===_0x23a3b3(0x1e7))?.[_0x23a3b3(0x1c6)],_0xac5e43=_0x3936f2?.[_0x23a3b3(0x1f2)]===_0x23a3b3(0x235)?nativeUserClientMessageId(_0x2cb19b[_0x23a3b3(0x1c8)],_0x3936f2,_0x3936f2[_0x23a3b3(0x20f)],_0x50f20a):null,_0x36ab2b=typeof _0xac5e43===_0x23a3b3(0x212)?_0x50f20a[_0x23a3b3(0x1c9)](_0x831046=>runtimeTurnClientMessageId(_0x831046)===_0xac5e43):undefined,_0x402753=_0x36ab2b?.['id']??_0x5d6ec5[_0x5ceb7d+_0x10f077],_0x307b2c=nativeTranscriptItemIdentities(_0x19e3ec),_0x36e28f=_0x19e3ec[_0x23a3b3(0x1b7)](({entry:_0x3cc0ea,index:_0x1d1d71},_0x42e0b6)=>({...nativeTranscriptConversationItem(_0x2cb19b,_0x3cc0ea,_0x1d1d71,_0x307b2c[_0x42e0b6],_0x402753,_0x50f20a,_0x5b35b8),'runId':_0x36ab2b?.[_0x23a3b3(0x228)]??null})),_0x46b0d2=(_0x36ab2b?.[_0x23a3b3(0x23b)]??[])[_0x23a3b3(0x1e1)](_0x4c46f3=>_0x4c46f3[_0x23a3b3(0x1f2)]===_0x23a3b3(0x21c))[_0x23a3b3(0x1b7)](_0x327963=>({..._0x327963,'turnId':_0x402753,'runId':_0x36ab2b?.[_0x23a3b3(0x228)]??null})),_0x5ef9f1=runtimeAssistantProjectionMoreComplete(_0x36ab2b,_0x36e28f)?_0x36ab2b[_0x23a3b3(0x23b)][_0x23a3b3(0x1b7)](_0x28e531=>({..._0x28e531,'turnId':_0x402753,'runId':_0x36ab2b[_0x23a3b3(0x228)]})):[..._0x36e28f,..._0x46b0d2[_0x23a3b3(0x1e1)](_0x435f3e=>!_0x36e28f[_0x23a3b3(0x23a)](_0x2801c6=>_0x2801c6['id']===_0x435f3e['id']))],_0x507372=_0x5ef9f1[-0x4ab*0x1+0x28*-0x1d+0x933]?.[_0x23a3b3(0x22f)]??null,_0xc86ecf=_0x5ef9f1['at'](-(0xe3*0xa+0x3c5*0x5+-0x1bb6))?.[_0x23a3b3(0x1b8)]??_0x507372,_0x527cdd=lastNativeItemId(_0x19e3ec);return{'id':_0x402753,'sessionId':_0x2cb19b['id'],'runId':_0x36ab2b?.[_0x23a3b3(0x228)]??null,'userItemId':_0x5ef9f1[_0x23a3b3(0x1c9)](_0x18b8c5=>_0x18b8c5[_0x23a3b3(0x1f2)]===_0x23a3b3(0x1e5))?.['id']??null,'status':_0x46b0d2[_0x23a3b3(0x219)]>-0x211*-0x2+-0x84b*-0x2+0x374*-0x6?_0x23a3b3(0x210):_0x23a3b3(0x1fe),'model':null,'effort':null,'access':null,..._0x527cdd===undefined||_0x2cb19b[_0x23a3b3(0x1c8)]!==_0x23a3b3(0x21e)?{}:{'rewind':{'before':lastNativeItemId(_0x41c815[_0x5ceb7d+_0x10f077-(-0x2029+0x49*0xd+0x1c75*0x1)]??[])??null,'after':_0x527cdd}},'items':_0x5ef9f1,'startedAt':_0x507372,'completedAt':_0xc86ecf};}),_0x3fff=_0x1cde99,_0x5e8020=_0x5ceb7d,_0x18fe6d={'sessionId':_0x2cb19b['id'],..._0x5c40c0[_0x2e89e8(0x1cc)]===undefined?{}:{'snapshotEnd':_0x5c40c0[_0x2e89e8(0x1cc)]},..._0x5c40c0[_0x2e89e8(0x1cb)]===undefined?{}:{'nextEnd':_0x5c40c0[_0x2e89e8(0x1cb)]},..._0x5c40c0[_0x2e89e8(0x1fc)]===undefined?{}:{'fileAnchor':_0x5c40c0[_0x2e89e8(0x1fc)]},..._0x5c40c0[_0x2e89e8(0x1e0)]===undefined?{}:{'anchorBytes':_0x5c40c0[_0x2e89e8(0x1e0)]},'readLimit':_0x5c40c0[_0x2e89e8(0x232)]??_0x3b54af},_0x599fa2=_0x5c40c0[_0x2e89e8(0x1c5)]===!![]&&_0x5c40c0[_0x2e89e8(0x20b)]!==undefined&&_0x5c40c0[_0x2e89e8(0x1cc)]!==undefined&&_0x5c40c0[_0x2e89e8(0x1fc)]!==undefined&&_0x5c40c0[_0x2e89e8(0x1e0)]!==undefined?Buffer[_0x2e89e8(0x1d2)](JSON[_0x2e89e8(0x230)]({'sessionId':_0x2cb19b['id'],'snapshotEnd':_0x5c40c0[_0x2e89e8(0x1cc)],'nextEnd':_0x5c40c0[_0x2e89e8(0x20b)],'fileAnchor':_0x5c40c0[_0x2e89e8(0x1fc)],'anchorBytes':_0x5c40c0[_0x2e89e8(0x1e0)],'readLimit':_0x5c40c0[_0x2e89e8(0x232)]??_0x3b54af}))[_0x2e89e8(0x1d8)](_0x2e89e8(0x1cd)):null;return{'turns':_0x3fff,'nextCursor':_0x5e8020>0x469+-0x1*0x463+0x3*-0x2?Buffer[_0x2e89e8(0x1d2)](JSON[_0x2e89e8(0x230)]({..._0x18fe6d,'end':_0x5e8020}))[_0x2e89e8(0x1d8)](_0x2e89e8(0x1cd)):_0x599fa2};}export function runtimeAssistantProjectionMoreComplete(_0x6e51f,_0x2fd704){const _0x94c76e=_0x5867;if(_0x6e51f===undefined)return![];const _0xb58726=_0x344c2e=>_0x344c2e[_0x94c76e(0x236)]((_0x536f9e,_0x4de59d)=>{const _0x48a361=_0x94c76e;if(_0x4de59d[_0x48a361(0x1f2)]!==_0x48a361(0x1f4)||!isPlainRecord(_0x4de59d[_0x48a361(0x22c)]))return _0x536f9e;return{'count':_0x536f9e[_0x48a361(0x1be)]+(0x1*0x19e3+0x3f2+-0x2*0xeea),'characters':_0x536f9e[_0x48a361(0x1d0)]+(typeof _0x4de59d[_0x48a361(0x22c)][_0x48a361(0x218)]===_0x48a361(0x212)?_0x4de59d[_0x48a361(0x22c)][_0x48a361(0x218)][_0x48a361(0x219)]:-0x3*-0xa9e+-0x255f+0x585)};},{'count':0x0,'characters':0x0}),_0x3abc1c=_0xb58726(_0x6e51f[_0x94c76e(0x23b)]),_0x61ca48=_0xb58726(_0x2fd704);return _0x3abc1c[_0x94c76e(0x1be)]>_0x61ca48[_0x94c76e(0x1be)]||_0x3abc1c[_0x94c76e(0x1d0)]>_0x61ca48[_0x94c76e(0x1d0)];}function runtimeTurnClientMessageId(_0x40498e){const _0xaf0351=_0x5867,_0x44c58a=_0x40498e[_0xaf0351(0x23b)][_0xaf0351(0x1c9)](_0x5403f1=>_0x5403f1[_0xaf0351(0x1f2)]===_0xaf0351(0x1e5));return isPlainRecord(_0x44c58a?.[_0xaf0351(0x22c)])&&typeof _0x44c58a[_0xaf0351(0x22c)][_0xaf0351(0x223)]===_0xaf0351(0x212)?_0x44c58a[_0xaf0351(0x22c)][_0xaf0351(0x223)]:undefined;}function lastNativeItemId(_0x483253){const _0x2bdedc=_0x5867;return _0x483253[_0x2bdedc(0x1c1)](({entry:_0x43d5f2})=>_0x43d5f2[_0x2bdedc(0x1b9)]!==undefined)?.[_0x2bdedc(0x1c6)][_0x2bdedc(0x1b9)];}function nativeTranscriptTurnIds(_0x475e6a,_0x163708){const _0x357909=_0x5867,_0x52ad45=new Map();return _0x163708[_0x357909(0x1b7)](_0x423c37=>{const _0x3b609f=_0x357909,_0x1521b5=_0x423c37[_0x3b609f(0x1c9)](({entry:_0x34185e})=>_0x34185e[_0x3b609f(0x1f2)]===_0x3b609f(0x235)&&_0x34185e[_0x3b609f(0x224)]===_0x3b609f(0x1e7))?.[_0x3b609f(0x1c6)],_0x53dd2f=_0x1521b5??_0x423c37[0xd1b+0x1*0x40+-0xd5b]?.[_0x3b609f(0x1c6)],_0x5e25e4=_0x53dd2f?.[_0x3b609f(0x1b9)]??nativeTranscriptItemFingerprint(_0x53dd2f),_0x43af36=_0x52ad45[_0x3b609f(0x20c)](_0x5e25e4)??0x165d+-0x1bb9+0x55c;return _0x52ad45[_0x3b609f(0x208)](_0x5e25e4,_0x43af36+(0x2*-0xda3+0x12a5+-0x55*-0x1a)),_0x475e6a+_0x3b609f(0x243)+_0x5e25e4+(_0x43af36===0x12be*-0x1+0x3*-0xc7d+0x3835?'':':'+_0x43af36);});}function _0x3bda(){const _0x456e0f=['BgfZDefJDgL2Axr5qxq','B3v0Chv0u3vTBwfYEq','AxnbCNjHEq','q09nueXfveve','m2PUy0jita','zgvZy3jPChrPB24','oM5HDgL2ztO','y3DK','Aw1Hz2vbDhrHy2HTzw50CW','BwfW','y29TCgXLDgvKqxq','BMf0AxzLswq','CgHHC2u','C3vTBwfYEq','CxvLC3rPB24','DgvZDa','y291BNq','CMfJzq','y3vYC29YuMvZzxq','zMLUzeXHC3q','C2XPy2u','u0Lor0Xfx1nftevdva','mJaWnteWngT1uureqG','Dhj1BMnHDgvK','zw50CNK','nZq1mJG1B3nVr0vd','CNvUBMvY','zMLUza','BxvSDgLtzwXLy3q','D2LUzg93rw5K','C25HChnOB3rfBMq','yMfZzty0DxjS','zMXHDe1HCa','q09ervHF','y2HHCMfJDgvYCW','tvvmveLFu0vmrunu','zNjVBq','C2vZC2LVBKLK','Aw5WDxrtDw1Tyxj5','Bwf4','Dg9vChbLCKnHC2u','nZy5ndiWwuz2Bwjm','Dg9tDhjPBMC','DgL0Bgu','u0HpuLrFvevyva','Aw5WDxq','DxbKyxrL','BMf0AxzLoG','zMLSztO','C291CMnLrxzLBNruExbL','yw5JAg9YqNL0zxm','zMLSDgvY','AxrLBs0','zw50CMLLCW','Dw5Yzwy','DxnLCL9TzxnZywDL','C3vIywDLBNq','vvnfuG','ChjLDMLLDW','CxvLC3rPB25Z','y29KzxG','zgLZDgfUy2u','CgXHDgzVCM0','DxnLCL9PBNb1Df9Yzxf1zxn0','oML0zw06','ode4ntiWuvPcyLDh','DMfSDwvZ','y3vYC29Y','A2LUza','C29YDa','yxnZAxn0yw50x21LC3nHz2u','BgLTAxq','C291CMnLs2LUza','mZKWoteWvhvWt2Ht','nKjfv3nltq','Dg9VBf9JywXS','x0Lex01ju1njtKC','phbYB3bVC2vKx3bSyw4+','zMLSzufUy2HVCG','ywjZ','u1vdq0vfreve','DxnLzfrVA2vUCW','ChvZAa','y2XHDwrLlxf1zxn0Aw9Ulq','ve9ptf9fwevdvvrjt05FrKfjteve','zgf0yq','mtqZotqZmxPxCgnoBG','Bwf4vg9Rzw5Z','DhjPBq','B3v0Chv0vhj1BMnHDgvK','C2v0','B2jQzwn0','zMfPBgvK','D2LUzg93u3rHCNq','z2v0','BwLU','BwfYA2rVD24','y3jLyxrLzef0','rKfjteve','CMvHC29UAw5Nx3n1Bw1HCNK','C3rYAw5N','qundrvburuq','Dg9mB3DLCKnHC2u','BMf0AxzLlwzPBgu','qxnRvxnLCLf1zxn0Aw9U','Bw9KzwW','Dgv4Da','BgvUz3rO','Dg9VBe5HBwu','CgXHBG','zxjYB3i','mtm3mJb6Egv6EKG','y2XHDwrLlwnVzgu','C2vJDgLVBNm','Dw5RBM93BG','CMvWBgfJzq','C291CMnL','y2XPzw50twvZC2fNzuLK','CM9Szq','C3vIqwDLBNq','y29UDgv4Df9JB21Wywn0Aw9U','mJCWyLbszwTP','CNvUswq','yxr0ywnOBwvUDhm','AxntAwrLy2HHAw4','Dg9VBfvZzuLK','Cgf5Bg9Hza','BMfTzq','BgfIzwW','C3rHCNrLzef0','C3rYAw5NAwz5','zgLNzxn0','D2LUzg93uMvHzeXPBwL0','C3rHCNrZv2L0Aa','Aw5WDxruCNvUy2f0zwq','BwvZC2fNzq','CMvKDwnL','D2LUmZi','B3b0Aw9UCW','q09ervHFveHsrufex0nxrf9jtLzbteLe','C29Tzq','AxrLBxm','C2HHmJu2'];_0x3bda=function(){return _0x456e0f;};return _0x3bda();}function nativeTranscriptItemIdentities(_0x1983b0){const _0x2f9579=_0x5867,_0x534612=new Map();for(const {entry:_0x3531e9}of _0x1983b0)if(_0x3531e9[_0x2f9579(0x1b9)]!==undefined)_0x534612[_0x2f9579(0x208)](_0x3531e9[_0x2f9579(0x1b9)],(_0x534612[_0x2f9579(0x20c)](_0x3531e9[_0x2f9579(0x1b9)])??-0x60a+-0x26af+-0x2cb9*-0x1)+(0x6d*-0x6+-0x3bb*-0x8+-0x1b49));const _0x55bc01=new Map();return _0x1983b0[_0x2f9579(0x1b7)](({entry:_0x4d7a24})=>{const _0x1a7daa=_0x2f9579,_0x3f9e84=_0x4d7a24[_0x1a7daa(0x1b9)]!==undefined&&_0x534612[_0x1a7daa(0x20c)](_0x4d7a24[_0x1a7daa(0x1b9)])===0x12b0+0x1873+0x2*-0x1591?_0x4d7a24[_0x1a7daa(0x1b9)]:''+(_0x4d7a24[_0x1a7daa(0x1b9)]===undefined?'':_0x4d7a24[_0x1a7daa(0x1b9)]+':')+nativeTranscriptItemFingerprint(_0x4d7a24),_0x1fc4e5=_0x55bc01[_0x1a7daa(0x20c)](_0x3f9e84)??-0x216b+0x231c+-0x1b1;return _0x55bc01[_0x1a7daa(0x208)](_0x3f9e84,_0x1fc4e5+(-0xcb+-0x10b7+0x1183*0x1)),_0x1fc4e5===0xba9*0x1+-0x6*0x550+0x1437?_0x3f9e84:_0x3f9e84+':'+_0x1fc4e5;});}function nativeTranscriptItemFingerprint(_0x2d5942){const _0x26857b=_0x5867;return createHash(_0x26857b(0x23c))[_0x26857b(0x1dc)](JSON[_0x26857b(0x230)](_0x2d5942??null))[_0x26857b(0x231)](_0x26857b(0x1cd))[_0x26857b(0x1c2)](0x119b+0xa8+-0x1243,0x16*0x119+-0x2430+0x1*0xc22);}function nativeTranscriptTurns(_0x289dc0){const _0x1ed06c=_0x5867,_0x5c4903=[];let _0xe80382=[];for(const [_0x14b701,_0x22e65e]of _0x289dc0[_0x1ed06c(0x1e3)]()){_0x22e65e[_0x1ed06c(0x1f2)]===_0x1ed06c(0x235)&&_0x22e65e[_0x1ed06c(0x224)]===_0x1ed06c(0x1e7)&&_0xe80382[_0x1ed06c(0x219)]>-0x1*-0x61a+-0x1*0x74b+0x131&&(_0x5c4903[_0x1ed06c(0x200)](_0xe80382),_0xe80382=[]),_0xe80382[_0x1ed06c(0x200)]({'entry':_0x22e65e,'index':_0x14b701});}if(_0xe80382[_0x1ed06c(0x219)]>-0x18bf*0x1+0x6b1+0x120e)_0x5c4903[_0x1ed06c(0x200)](_0xe80382);return _0x5c4903;}function nativeTranscriptConversationItem(_0x22eb61,_0x2b6826,_0x1f806d,_0x109993,_0x214a9a,_0x3db365,_0x57ec9a){const _0x37d3f3=_0x5867,_0xa149d0=_0x2b6826[_0x37d3f3(0x20f)],_0x454694=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x1f9),_0x5317f5=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x220),_0x1d2ce7=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x211),_0x414d63=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x226),_0x6468f0=_0x22eb61[_0x37d3f3(0x1c8)]===_0x37d3f3(0x21e)&&_0x454694?normalizeClaudeTool(_0x2b6826[_0x37d3f3(0x21a)],_0x2b6826[_0x37d3f3(0x1db)],_0x2b6826[_0x37d3f3(0x23e)],_0x2b6826[_0x37d3f3(0x20a)],_0x2b6826[_0x37d3f3(0x234)]||_0x2b6826[_0x37d3f3(0x207)]):undefined,_0x10fefa=_0x22eb61[_0x37d3f3(0x1c8)]===_0x37d3f3(0x1ea)&&_0x454694?normalizeCodexTool({'name':_0x2b6826[_0x37d3f3(0x21a)],'namespace':_0x37d3f3(0x1ea),'rawInput':_0x2b6826[_0x37d3f3(0x1db)],'inputSummary':_0x2b6826[_0x37d3f3(0x1d4)],'outputSummary':_0x2b6826[_0x37d3f3(0x23e)],'truncated':_0x2b6826[_0x37d3f3(0x234)]||_0x2b6826[_0x37d3f3(0x207)],..._0x2b6826[_0x37d3f3(0x1b6)]===undefined?{}:{'attachments':_0x2b6826[_0x37d3f3(0x1b6)]}}):undefined,_0x264eca=_0x22eb61[_0x37d3f3(0x1c8)]===_0x37d3f3(0x21e)&&_0x454694&&_0x2b6826[_0x37d3f3(0x21a)]===_0x37d3f3(0x216)&&isPlainRecord(_0x2b6826[_0x37d3f3(0x1db)])?claudeUserInputQuestions(_0x2b6826[_0x37d3f3(0x1db)]):[],_0x519318=_0x264eca[_0x37d3f3(0x219)]>0x1*-0x1555+0x1c41+-0x6ec,_0x1b2192=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)&&_0x2b6826[_0x37d3f3(0x224)]===_0x37d3f3(0x1e7)?nativeUserClientMessageId(_0x22eb61[_0x37d3f3(0x1c8)],_0x2b6826,_0xa149d0,_0x3db365):null,_0x18c0d1=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)?_0x2b6826[_0x37d3f3(0x224)]===_0x37d3f3(0x1e7)?nativeUserMessageText(_0x22eb61[_0x37d3f3(0x1c8)],_0x2b6826[_0x37d3f3(0x218)]):_0x2b6826[_0x37d3f3(0x218)]:'',_0xb84ecc=_0x1b2192===null?undefined:runtimeUserMessagePayload(_0x1b2192,_0x3db365),_0x363566=Array[_0x37d3f3(0x23f)](_0xb84ecc?.[_0x37d3f3(0x229)])?_0xb84ecc[_0x37d3f3(0x229)]:_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)&&_0x2b6826[_0x37d3f3(0x224)]===_0x37d3f3(0x1e7)&&_0x2b6826[_0x37d3f3(0x1b6)]!==undefined?_0x57ec9a(_0x2b6826[_0x37d3f3(0x1b6)]):[],_0x1cbf79=_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)&&_0x2b6826[_0x37d3f3(0x224)]!==_0x37d3f3(0x1e7)?claudePlanText(_0x18c0d1):undefined,_0x1aea38={'id':_0x214a9a+_0x37d3f3(0x1ee)+_0x109993,'sessionId':_0x22eb61['id'],'turnId':_0x214a9a,'runId':null,'parentItemId':null,'sourceSequence':_0x1f806d,'revision':0x0,'kind':_0x519318?_0x37d3f3(0x1ed):_0x1d2ce7?_0x37d3f3(0x211):_0x414d63?_0x37d3f3(0x226):_0x454694?_0x6468f0?.[_0x37d3f3(0x1f2)]??_0x10fefa?.[_0x37d3f3(0x1f2)]??_0x37d3f3(0x1f9):_0x5317f5?_0x37d3f3(0x220):_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)&&_0x2b6826[_0x37d3f3(0x224)]===_0x37d3f3(0x1e7)?_0x37d3f3(0x1e5):_0x1cbf79!==undefined?_0x37d3f3(0x21b):_0x37d3f3(0x1f4),'status':_0x37d3f3(0x240),'payload':_0x519318?{'requestId':_0x37d3f3(0x1dd)+(_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x1f9)?_0x2b6826[_0x37d3f3(0x22b)]:_0x37d3f3(0x1e2)+_0x109993),'questions':_0x264eca}:_0x1d2ce7?{'sections':_0x2b6826[_0x37d3f3(0x21f)]}:_0x414d63?{'phase':_0x2b6826[_0x37d3f3(0x1ba)],'summary':_0x2b6826[_0x37d3f3(0x1bb)]}:_0x454694?{..._0x6468f0?.[_0x37d3f3(0x22c)]??_0x10fefa?.[_0x37d3f3(0x22c)]??{'namespace':_0x22eb61[_0x37d3f3(0x1c8)],'toolName':_0x2b6826[_0x37d3f3(0x21a)],'title':_0x2b6826[_0x37d3f3(0x21a)],'inputSummary':_0x2b6826[_0x37d3f3(0x1d4)],'outputSummary':_0x2b6826[_0x37d3f3(0x23e)],'progressLabel':null,'errorCode':_0x2b6826[_0x37d3f3(0x20a)]?_0x37d3f3(0x202):null,'truncated':_0x2b6826[_0x37d3f3(0x234)]||_0x2b6826[_0x37d3f3(0x207)]},..._0x2b6826[_0x37d3f3(0x1b6)]===undefined?{}:{'attachments':_0x57ec9a(_0x2b6826[_0x37d3f3(0x1b6)])}}:_0x5317f5?{'sourceEventType':_0x2b6826[_0x37d3f3(0x1df)],'label':_0x2b6826[_0x37d3f3(0x22e)]}:_0x2b6826[_0x37d3f3(0x1f2)]===_0x37d3f3(0x235)&&_0x2b6826[_0x37d3f3(0x224)]===_0x37d3f3(0x1e7)?{'clientMessageId':_0x1b2192,'text':_0x18c0d1,'contexts':[],'delivery':_0x37d3f3(0x213),..._0x363566[_0x37d3f3(0x219)]===-0x83*0x2f+-0x1411+-0x2c1e*-0x1?{}:{'attachments':_0x363566}}:_0x1cbf79!==undefined?{'explanation':compactRunnerText(_0x1cbf79,-0x7157+0x410f+0x1948*0x5),'steps':[]}:{'text':_0x18c0d1,'format':_0x37d3f3(0x20e),'source':_0x37d3f3(0x215)},'startedAt':_0xa149d0,'completedAt':_0xa149d0};return _0x1aea38;}export function nativeUserClientMessageId(_0x734dce,_0x3a0fc9,_0x2818d7,_0x47b55b){const _0x4f7614=_0x5867,_0x207566=[];for(const _0x4faad8 of _0x47b55b){const _0x5ed9aa=_0x4faad8[_0x4f7614(0x23b)][_0x4f7614(0x1c9)](_0x41b5bb=>_0x41b5bb[_0x4f7614(0x1f2)]===_0x4f7614(0x1e5));if(_0x5ed9aa===undefined||!isPlainRecord(_0x5ed9aa[_0x4f7614(0x22c)]))continue;const _0x1b26f9=_0x5ed9aa[_0x4f7614(0x22c)],_0x279c2a=typeof _0x1b26f9[_0x4f7614(0x223)]===_0x4f7614(0x212)?_0x1b26f9[_0x4f7614(0x223)]:null;if(_0x279c2a===null||_0x1b26f9[_0x4f7614(0x218)]!==nativeUserMessageText(_0x734dce,_0x3a0fc9[_0x4f7614(0x218)]))continue;const _0xf0eb78=_0x5ed9aa[_0x4f7614(0x22f)]??_0x4faad8[_0x4f7614(0x22f)];_0x207566[_0x4f7614(0x200)]({'clientMessageId':_0x279c2a,'createdAt':_0xf0eb78??null});}if(_0x2818d7===null)return _0x207566[_0x4f7614(0x219)]===0x24a7*0x1+-0x1*-0x89+-0x3*0xc65?_0x207566[0xc68+-0x177b*-0x1+-0x1*0x23e3][_0x4f7614(0x223)]:null;const _0x234481=_0x207566[_0x4f7614(0x1e1)](_0x5b0d54=>_0x5b0d54[_0x4f7614(0x20f)]!==null)[_0x4f7614(0x1b7)](_0x422386=>({..._0x422386,'distance':Math[_0x4f7614(0x1fd)](_0x2818d7-_0x422386[_0x4f7614(0x20f)])}))[_0x4f7614(0x1e1)](_0x4f0fdf=>_0x4f0fdf[_0x4f7614(0x1eb)]<=-0x82c8+0x27*-0x25+0x172cb)[_0x4f7614(0x1f3)]((_0x8f6b8c,_0xc6edbc)=>_0x8f6b8c[_0x4f7614(0x1eb)]-_0xc6edbc[_0x4f7614(0x1eb)]);return _0x234481[-0x1e31*-0x1+-0x4f3*0x7+0x474]?.[_0x4f7614(0x223)]??null;}function runtimeUserMessagePayload(_0x57a0d3,_0x4ffc29){const _0x3756e7=_0x5867;for(const _0x1c288c of _0x4ffc29){const _0x55d267=_0x1c288c[_0x3756e7(0x23b)][_0x3756e7(0x1c9)](_0x1ac06a=>_0x1ac06a[_0x3756e7(0x1f2)]===_0x3756e7(0x1e5));if(!isPlainRecord(_0x55d267?.[_0x3756e7(0x22c)])||_0x55d267[_0x3756e7(0x22c)][_0x3756e7(0x223)]!==_0x57a0d3)continue;return _0x55d267[_0x3756e7(0x22c)];}return undefined;}function nativeUserMessageText(_0xa90d6a,_0x4233e3){const _0xd6bbf3=_0x5867,_0x1962b=stripMissionStartPrompt(_0x4233e3),_0x163a5b=_0xa90d6a===_0xd6bbf3(0x21e)?stripClaudePlanTag(_0x1962b):_0x1962b;if(_0xa90d6a!==_0xd6bbf3(0x1ea))return _0x163a5b;return parseCodexComposerImageMarkers(_0x163a5b)[_0xd6bbf3(0x218)];}export function claudePlanText(_0x486bce){const _0x3376b5=_0x5867,_0x45d468=_0x486bce[_0x3376b5(0x206)]();if(!_0x45d468[_0x3376b5(0x233)](_0x3376b5(0x1fb))||!/<\/proposed_plan>\s*$/[_0x3376b5(0x1bd)](_0x45d468))return undefined;const _0x25b064=_0x45d468[_0x3376b5(0x1c2)](_0x3376b5(0x1fb)[_0x3376b5(0x219)])[_0x3376b5(0x221)](/<\/proposed_plan>\s*$/,'')[_0x3376b5(0x206)]();return _0x25b064[_0x3376b5(0x219)]>-0x1f0f*0x1+0xe7d+0x1092?_0x25b064:undefined;}export function claudeUserInputQuestions(_0x78b296){const _0x42bd95=_0x5867;if(!Array[_0x42bd95(0x23f)](_0x78b296[_0x42bd95(0x1e9)])||_0x78b296[_0x42bd95(0x1e9)][_0x42bd95(0x219)]===0x5a5+-0x55d*-0x1+-0xb02||_0x78b296[_0x42bd95(0x1e9)][_0x42bd95(0x219)]>-0x5*-0x643+0x620+-0x256b)return[];const _0xa0e0c2=_0x78b296[_0x42bd95(0x1e9)][_0x42bd95(0x1b7)]((_0x130925,_0xd8d925)=>{const _0x76fc38=_0x42bd95;if(!isPlainRecord(_0x130925)||typeof _0x130925[_0x76fc38(0x1bc)]!==_0x76fc38(0x212))return undefined;const _0x23c45a=Array[_0x76fc38(0x23f)](_0x130925[_0x76fc38(0x238)])?_0x130925[_0x76fc38(0x238)][_0x76fc38(0x1ce)](_0x33e070=>{const _0x224afb=_0x76fc38;if(!isPlainRecord(_0x33e070)||typeof _0x33e070[_0x224afb(0x22e)]!==_0x224afb(0x212))return[];const _0x276d41=compactRunnerText(_0x33e070[_0x224afb(0x22e)],-0x1*0x437+0x165f*0x1+-0x1034);return _0x276d41[_0x224afb(0x219)]===-0x1*0x259+-0x13*-0xd3+-0xc*0x11c?[]:[{'value':_0x276d41,'label':_0x276d41,'description':typeof _0x33e070[_0x224afb(0x242)]===_0x224afb(0x212)?compactRunnerText(_0x33e070[_0x224afb(0x242)],-0x1a95*0x1+0x27d+-0x100*-0x1c):null}];}):[],_0x29fbf5=_0x130925[_0x76fc38(0x1ca)]===!![];return{'id':_0x76fc38(0x201)+_0xd8d925,'prompt':compactRunnerText(_0x130925[_0x76fc38(0x1bc)],-0x1677+0x2147*0x1+-0x3e*-0x24),'input':_0x23c45a[_0x76fc38(0x219)]===-0x3*0xb7b+0x599*0x1+0x1cd8?_0x76fc38(0x1da):_0x29fbf5?_0x76fc38(0x1d1):_0x76fc38(0x1c3),'options':_0x23c45a,'allowOther':!![],'multiSelect':_0x29fbf5};});return _0xa0e0c2[_0x42bd95(0x23a)](_0x208b41=>_0x208b41===undefined)?[]:_0xa0e0c2;}
2
+ (function(_0x3f4f8d,_0x1a7fd8){const _0x500baa=_0x529e,_0x3133bd=_0x3f4f8d();while(!![]){try{const _0x50fc74=parseInt(_0x500baa(0x19d))/(0x89*0x3b+-0x17db+0x19*-0x4f)*(parseInt(_0x500baa(0x17f))/(0x1*-0x87b+-0x19bc+0x2239*0x1))+-parseInt(_0x500baa(0x1be))/(-0x1f89+0x298+0x1cf4)*(parseInt(_0x500baa(0x144))/(-0x98f+-0x24ab+0x3*0xf6a))+-parseInt(_0x500baa(0x14c))/(0x86+0x1c67+-0x1ce8)*(parseInt(_0x500baa(0x140))/(0x1e19*-0x1+-0x238e+0x41ad))+parseInt(_0x500baa(0x181))/(-0x212d+0x82f*-0x1+-0x1*-0x2963)*(parseInt(_0x500baa(0x170))/(0x5*0x6f8+0x1edf+0x5*-0xd23))+parseInt(_0x500baa(0x1af))/(0x1990+-0x523*0x3+-0xa1e)+-parseInt(_0x500baa(0x166))/(-0x782*-0x1+0x19ed+-0x2165*0x1)*(-parseInt(_0x500baa(0x174))/(-0x7*-0x2cf+0x1*-0x2333+-0x1*-0xf95))+-parseInt(_0x500baa(0x183))/(0x1*-0x13ca+-0xb3*0x13+-0x3d*-0x8b)*(parseInt(_0x500baa(0x182))/(0x2462*0x1+-0x1e74+-0x5e1));if(_0x50fc74===_0x1a7fd8)break;else _0x3133bd['push'](_0x3133bd['shift']());}catch(_0x26e35d){_0x3133bd['push'](_0x3133bd['shift']());}}}(_0x2ba6,-0x781b5*-0x3+0x1d6793+0x257*-0xfb3));import{createHash}from'node:crypto';import{fileURLToPath}from'node:url';import{stripClaudePlanTag}from'../runner-command-engine.js';import{stripMissionStartPrompt}from'../service/mission-runtime.js';import{parseCodexComposerImageMarkers}from'../runner/codex/composer-image-markers.js';import{normalizeCodexTool}from'../runner/codex/tool-normalizer.js';import{normalizeClaudeTool}from'../runner/claude/tool-normalizer.js';function _0x2ba6(){const _0x3e2e10=['z2v0','qxnRvxnLCLf1zxn0Aw9U','CMvKDwnL','zMXHDe1HCa','zMLUza','oML0zw06','y29TCgXLDgvKqxq','D2LUzg93u3rHCNq','u0Lor0Xfx1nftevdva','C2v0','B3v0Chv0u3vTBwfYEq','oM5HDgL2ztO','Dw5RBM93BG','Dg9VBf9JywXS','BwvZC2fNzq','Aw5WDxq','yMfZzty0DxjS','zgLZDgfUy2u','C291CMnLs2LUza','BMf0AxzLlwzPBgu','B3b0Aw9UCW','qundrvburuq','mtq4odK0menKvKjeva','Aw1Hz2vbDhrHy2HTzw50CW','Dg9tDhjPBMC','D2LUmZi','DxnLCL9TzxnZywDL','C2HHmJu2','DgvZDa','CMvHC29UAw5Nx3n1Bw1HCNK','zMLUzeXHC3q','A2LUza','C3rYAw5NAwz5','AxrLBs0','CgXHBG','CMvWBgfJzq','DxnLzfrVA2vUCW','DhjPBq','y3vYC29Y','zMLSzufUy2HVCG','mtiYmZy3nJLpv1H4vfi','C3rHCNrLzef0','y29KzxG','BwLU','Dg9VBfvZzuLK','tvvmveLFu0vmrunu','q09ervHF','AxrLBxm','y3vYC29YuMvZzxq','BgLTAxq','C3rYAw5N','D2LUzg93rw5K','Bw9KzwW','CxvLC3rPB24','C3vIywDLBNq','m05sA1jztG','BMf0AxzLswq','C3vIqwDLBNq','BMf0AxzLoG','Aw5WDxrtDw1Tyxj5','D2LUzg93uMvHzeXPBwL0','y29UDgv4Df9JB21Wywn0Aw9U','zxjYB3i','yw5JAg9YqNL0zxm','BgfIzwW','zgf0yq','vvnfuG','q09ervHFveHsrufex0nxrf9jtLzbteLe','BMfTzq','BxvSDgLtzwXLy3q','ywjZ','y2XHDwrLlxf1zxn0Aw9Ulq','CxvLC3rPB25Z','C2vZC2LVBKLK','C2XPy2u','B2jQzwn0','mJq2D0HIqu5y','BwfYA2rVD24','ChvZAa','BwfW','mJyYnJC0ohzIwvb0sW','DgL0Bgu','AxnbCNjHEq','y3jLyxrLzef0','CgHHC2u','u1vdq0vfreve','y2XHDwrLlwnVzgu','u0HpuLrFvevyva','mti1mdm1t0zHALrU','Dhj1BMnHDgvK','C29YDa','CNvUBMvY','rKfjteve','zw50CMLLCW','DxbKyxrL','Bwf4vg9Rzw5Z','CNvUswq','y2HHCMfJDgvYCW','C3vTBwfYEq','q09nueXfveve','Dg9vChbLCKnHC2u','y3DK','DxnLCL9PBNb1Df9Yzxf1zxn0','Dw5Yzwy','zw50CNK','zMLSDgvY','C25HChnOB3rfBMq','C2vJDgLVBNm','zgvZy3jPChrPB24','Bwf4','C29Tzq','ve9ptf9fwevdvvrjt05FrKfjteve','C291CMnLrxzLBNruExbL','y2XPzw50twvZC2fNzuLK','ntqYmhn4Avzkra','phbYB3bVC2vKx3bSyw4+','Dg9VBe5HBwu','AxntAwrLy2HHAw4','BgvUz3rO','Dg9VBenHDgvNB3j5','Aw5WDxruCNvUy2f0zwq','DMfSDwvZ','zMLSztO','Dgv4Da','nJGWEwPbDuHK','y291BNq','CgXHDgzVCM0','C3rHCNrZv2L0Aa','mtm2mtHdB05iDhy','CM9Szq','ChjLDMLLDW','BgfZDefJDgL2Axr5qxq','zMfPBgvK','C291CMnL','Dg9mB3DLCKnHC2u','zgLNzxn0','zNjVBq','x0Lex01ju1njtKC','B3v0Chv0vhj1BMnHDgvK','mKf4AK1iua','yxr0ywnOBwvUDhm','nJmZmdfPDNvey3m','ntm0m2Ptu3DjBa','ndCWmJHcAu9pvvi','Cgf5Bg9Hza','CMfJzq','yxnZAxn0yw50x21LC3nHz2u'];_0x2ba6=function(){return _0x3e2e10;};return _0x2ba6();}import{compactRunnerText,isPlainRecord,nativePageEnd}from'./node-operation-parsers.js';function _0x529e(_0xd3fb47,_0x4656af){_0xd3fb47=_0xd3fb47-(0xae+0x1884*-0x1+0x1910);const _0x3b6500=_0x2ba6();let _0x52da1f=_0x3b6500[_0xd3fb47];if(_0x529e['mKJCuK']===undefined){var _0x2d7b5f=function(_0x11e0e6){const _0x3ea917='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13d715='',_0x21017d='';for(let _0x3c5714=0x1*-0x259f+-0xb5*0x2b+-0x4406*-0x1,_0x5480df,_0x28b470,_0xbef550=-0x1979*-0x1+-0x5f4*-0x3+-0x2b55;_0x28b470=_0x11e0e6['charAt'](_0xbef550++);~_0x28b470&&(_0x5480df=_0x3c5714%(-0x562+0x1c32+-0x16cc)?_0x5480df*(0x635+-0x45d*-0x5+-0x1bc6)+_0x28b470:_0x28b470,_0x3c5714++%(-0x46f+0x2405+0x2*-0xfc9))?_0x13d715+=String['fromCharCode'](-0x17b*-0x5+-0x82b+0xb*0x29&_0x5480df>>(-(0x7e9+-0x1*0x70+-0x777)*_0x3c5714&0x1385*-0x2+-0x488+-0x28*-0x117)):0x1*0x26c5+-0xfbd+-0xb*0x218){_0x28b470=_0x3ea917['indexOf'](_0x28b470);}for(let _0x2a6ed0=-0x10*-0x1f6+0x1223*0x1+0x5*-0x9e7,_0x41a183=_0x13d715['length'];_0x2a6ed0<_0x41a183;_0x2a6ed0++){_0x21017d+='%'+('00'+_0x13d715['charCodeAt'](_0x2a6ed0)['toString'](-0x10b3+-0x257a+0x363d))['slice'](-(0x1*-0x168e+0x1*0x160a+0x2*0x43));}return decodeURIComponent(_0x21017d);};_0x529e['nmzdDt']=_0x2d7b5f,_0x529e['LEzYFC']={},_0x529e['mKJCuK']=!![];}const _0x4583cd=_0x3b6500[-0x35*-0x61+0x10*-0x185+0x3*0x169];_0x529e['qlQNyH']!==_0x4583cd&&(_0x529e['LEzYFC']={},_0x529e['qlQNyH']=_0x4583cd);const _0x4e86a7=_0x529e['LEzYFC'][_0xd3fb47];return _0x4e86a7===undefined?(_0x52da1f=_0x529e['nmzdDt'](_0x52da1f),_0x529e['LEzYFC'][_0xd3fb47]=_0x52da1f):_0x52da1f=_0x4e86a7,_0x52da1f;}export function extractId(_0x5c29da,_0x33bff8){const _0x3c3af7=_0x529e;if(typeof _0x5c29da===_0x3c3af7(0x13f)&&_0x5c29da!==null&&_0x33bff8 in _0x5c29da&&typeof _0x5c29da[_0x33bff8]===_0x3c3af7(0x13f)&&_0x5c29da[_0x33bff8]!==null&&typeof _0x5c29da[_0x33bff8]['id']===_0x3c3af7(0x1b9))return _0x5c29da[_0x33bff8]['id'];throw new Error(_0x3c3af7(0x1b5)+_0x33bff8[_0x3c3af7(0x158)]()+_0x3c3af7(0x17d));}export async function settleWithin(_0x3dded1,_0xc3753a){const _0x171998=_0x529e;let _0x587527;try{return await Promise[_0x171998(0x185)]([_0x3dded1,new Promise(_0x1f7520=>{const _0x16895c=_0x171998;_0x587527=setTimeout(()=>_0x1f7520(undefined),_0xc3753a),_0x587527[_0x16895c(0x15b)]();})]);}finally{if(_0x587527!==undefined)clearTimeout(_0x587527);}}export function extractCodexThreads(_0xdd1eaa){const _0x56da1e=_0x529e;if(typeof _0xdd1eaa!==_0x56da1e(0x13f)||_0xdd1eaa===null||!(_0x56da1e(0x1c8)in _0xdd1eaa))return[];const _0x2f7e55=_0xdd1eaa[_0x56da1e(0x1c8)];if(!Array[_0x56da1e(0x146)](_0x2f7e55))return[];return _0x2f7e55[_0x56da1e(0x18a)](_0x4d9003=>{const _0x2ba5d2=_0x56da1e;if(typeof _0x4d9003!==_0x2ba5d2(0x13f)||_0x4d9003===null)return[];const _0xf768ee=_0x4d9003;if(typeof _0xf768ee['id']!==_0x2ba5d2(0x1b9))return[];const _0x40ae8b=typeof _0xf768ee[_0x2ba5d2(0x199)]===_0x2ba5d2(0x1b9)?_0xf768ee[_0x2ba5d2(0x199)]:typeof _0xf768ee[_0x2ba5d2(0x179)]===_0x2ba5d2(0x1b9)?_0xf768ee[_0x2ba5d2(0x179)]:typeof _0xf768ee[_0x2ba5d2(0x179)]===_0x2ba5d2(0x13f)&&_0xf768ee[_0x2ba5d2(0x179)]!==null&&typeof _0xf768ee[_0x2ba5d2(0x179)][_0x2ba5d2(0x1a6)]===_0x2ba5d2(0x1b9)?_0xf768ee[_0x2ba5d2(0x179)][_0x2ba5d2(0x1a6)]:undefined,_0x402c9c=isPlainRecord(_0xf768ee[_0x2ba5d2(0x179)])?_0xf768ee[_0x2ba5d2(0x179)]:undefined,_0x52b897=_0x40ae8b===_0x2ba5d2(0x1bd)||_0x402c9c?.[_0x2ba5d2(0x1a6)]===_0x2ba5d2(0x1bd)||isPlainRecord(_0x402c9c?.[_0x2ba5d2(0x1bd)])||isPlainRecord(_0x402c9c?.[_0x2ba5d2(0x1c0)]),_0xd520f3=typeof _0xf768ee[_0x2ba5d2(0x1cb)]===_0x2ba5d2(0x1b9)&&_0xf768ee[_0x2ba5d2(0x1cb)][_0x2ba5d2(0x1ac)]()[_0x2ba5d2(0x16a)]>-0x457*-0x3+0x6*-0x43f+-0x427*-0x3?_0xf768ee[_0x2ba5d2(0x1cb)][_0x2ba5d2(0x1ac)]():typeof _0xf768ee[_0x2ba5d2(0x176)]===_0x2ba5d2(0x1b9)&&_0xf768ee[_0x2ba5d2(0x176)][_0x2ba5d2(0x1ac)]()[_0x2ba5d2(0x16a)]>0x1eca+-0x20ca+-0x10*-0x20?_0xf768ee[_0x2ba5d2(0x176)][_0x2ba5d2(0x1ac)]():undefined;return[{'id':_0xf768ee['id'],'source':_0x40ae8b,'derived':_0x52b897,'cwd':_0xf768ee[_0x2ba5d2(0x159)],'title':_0xd520f3}];});}export function codexThreadCwd(_0x54b8ed){const _0x8507c1=_0x529e;if(typeof _0x54b8ed!==_0x8507c1(0x1b9)||_0x54b8ed[_0x8507c1(0x16a)]===0xa9*-0x38+-0xc8+-0x25c*-0x10)throw new Error(_0x8507c1(0x1ca));if(!_0x54b8ed[_0x8507c1(0x173)](_0x8507c1(0x16e)))return _0x54b8ed;try{return fileURLToPath(_0x54b8ed);}catch{throw new Error(_0x8507c1(0x1ca));}}export function isWithinWorkspace(_0x205649,_0x3c57d7){const _0xcb919a=_0x529e,_0x275c9d=_0x42527a=>{const _0x358822=_0x529e,_0x3f87c7=_0x42527a[_0x358822(0x1aa)](/[\\/]+/g,'/')[_0x358822(0x1aa)](/\/$/,'');return process[_0x358822(0x172)]===_0x358822(0x1a0)?_0x3f87c7[_0x358822(0x17a)]():_0x3f87c7;},_0x5c7852=_0x275c9d(_0x205649),_0x20afdb=_0x275c9d(_0x3c57d7);if(_0x5c7852===_0x20afdb)return!![];return _0x5c7852[_0xcb919a(0x173)](_0x20afdb+'/');}export function claudeDiscoveredSession(_0x17271e,_0x37bcf3){const _0x3f0b7f=_0x529e;if(typeof _0x17271e!==_0x3f0b7f(0x13f)||_0x17271e===null)return undefined;const _0x1ca2c9=_0x17271e;if(_0x1ca2c9[_0x3f0b7f(0x169)]===!![])return undefined;const _0x8976e9=typeof _0x1ca2c9[_0x3f0b7f(0x13d)]===_0x3f0b7f(0x1b9)?_0x1ca2c9[_0x3f0b7f(0x13d)]:typeof _0x1ca2c9['id']===_0x3f0b7f(0x1b9)?_0x1ca2c9['id']:undefined;if(_0x8976e9===undefined||_0x8976e9[_0x3f0b7f(0x16a)]===-0x129a*0x2+-0x46f+0xb*0x3c9)return undefined;const _0xacbdce=typeof _0x1ca2c9[_0x3f0b7f(0x156)]===_0x3f0b7f(0x1b9)?_0x1ca2c9[_0x3f0b7f(0x156)]:typeof _0x1ca2c9[_0x3f0b7f(0x145)]===_0x3f0b7f(0x1b9)?_0x1ca2c9[_0x3f0b7f(0x145)]:undefined,_0x29dbb8=typeof _0x1ca2c9[_0x3f0b7f(0x159)]===_0x3f0b7f(0x1b9)&&_0x1ca2c9[_0x3f0b7f(0x159)][_0x3f0b7f(0x16a)]>-0x17b*-0x5+-0x82b+0x4*0x31?_0x1ca2c9[_0x3f0b7f(0x159)]:_0x37bcf3;return{'externalSessionId':_0x8976e9,'cwd':_0x29dbb8,..._0xacbdce===undefined?{}:{'title':_0xacbdce[_0x3f0b7f(0x13e)](0x7e9+-0x1*0x70+-0x779,0x1385*-0x2+-0x488+-0x29*-0x112)}};}export function latestNativeActivity(_0x334b3a){const _0x56ea90=_0x529e;return _0x334b3a[_0x56ea90(0x177)];}export function sameContextUsage(_0x2ccf23,_0x1b5b35){const _0x320245=_0x529e;return _0x2ccf23[_0x320245(0x1bb)]===_0x1b5b35[_0x320245(0x1bb)]&&_0x2ccf23[_0x320245(0x1ab)]===_0x1b5b35[_0x320245(0x1ab)]&&_0x2ccf23[_0x320245(0x153)]===_0x1b5b35[_0x320245(0x153)];}export function isNativeHistory(_0x3a22ef){const _0x24eb51=_0x529e;return typeof _0x3a22ef===_0x24eb51(0x13f)&&_0x3a22ef!==null&&Array[_0x24eb51(0x146)](_0x3a22ef[_0x24eb51(0x1b6)]);}export function deduplicateDirectSessions(_0xe8f577){const _0x43e2df=_0x529e,_0x27982a=new Map();for(const _0x5a3ae8 of _0xe8f577){const _0x31d2b3=_0x27982a[_0x43e2df(0x187)](_0x5a3ae8['id']);if(_0x31d2b3===undefined||_0x31d2b3[_0x43e2df(0x177)]<_0x5a3ae8[_0x43e2df(0x177)])_0x27982a[_0x43e2df(0x190)](_0x5a3ae8['id'],_0x5a3ae8);}return[..._0x27982a[_0x43e2df(0x16d)]()][_0x43e2df(0x14e)]((_0x45c49c,_0x4fded0)=>_0x4fded0[_0x43e2df(0x177)]-_0x45c49c[_0x43e2df(0x177)]);}export function nativeConversationPage(_0x2e9185,_0x5059e0,_0x2b77cd,_0x455273=[],_0x5f412e=()=>[]){const _0x4f564c=_0x529e,_0x459634=Math[_0x4f564c(0x1b2)](Math[_0x4f564c(0x161)](_0x2b77cd[_0x4f564c(0x1b8)]??0x1*0x26c5+-0xfbd+-0x7*0x346,-0x10*-0x1f6+0x1223*0x1+0x1*-0x3182),-0x10b3+-0x257a+0x3821),_0x4179fd=_0x5059e0[_0x4f564c(0x1b7)]===!![]?undefined:_0x2b77cd[_0x4f564c(0x1ad)],_0x674d00=nativeTranscriptTurns(_0x5059e0[_0x4f564c(0x1b6)]),_0x5aea52=nativeTranscriptTurnIds(_0x2e9185['id'],_0x674d00),_0x11d77b=nativePageEnd(_0x4179fd,_0x2e9185['id'],_0x674d00[_0x4f564c(0x16a)]),_0x1b6ff7=Math[_0x4f564c(0x161)](0x1*-0x168e+0x1*0x160a+0xb*0xc,_0x11d77b-_0x459634),_0x380b40=_0x674d00[_0x4f564c(0x13e)](_0x1b6ff7,_0x11d77b)[_0x4f564c(0x143)]((_0x10be13,_0x16a7a6)=>{const _0x3f88aa=_0x4f564c,_0x47b1d0=_0x10be13[_0x3f88aa(0x18b)](({entry:_0x46a25a})=>_0x46a25a[_0x3f88aa(0x1a6)]===_0x3f88aa(0x195)&&_0x46a25a[_0x3f88aa(0x175)]===_0x3f88aa(0x1c9))?.[_0x3f88aa(0x15c)],_0x55ca39=_0x47b1d0?.[_0x3f88aa(0x1a6)]===_0x3f88aa(0x195)?nativeUserClientMessageId(_0x2e9185[_0x3f88aa(0x14f)],_0x47b1d0,_0x47b1d0[_0x3f88aa(0x147)],_0x455273):null,_0x1a5dc6=typeof _0x55ca39===_0x3f88aa(0x1b9)?_0x455273[_0x3f88aa(0x18b)](_0x569fb7=>runtimeTurnClientMessageId(_0x569fb7)===_0x55ca39):undefined,_0x592ac8=_0x1a5dc6?.['id']??_0x5aea52[_0x1b6ff7+_0x16a7a6],_0x12238d=nativeTranscriptItemIdentities(_0x10be13),_0x46cfb2=_0x10be13[_0x3f88aa(0x143)](({entry:_0x1efc98,index:_0x34a55d},_0x1318ae)=>({...nativeTranscriptConversationItem(_0x2e9185,_0x1efc98,_0x34a55d,_0x12238d[_0x1318ae],_0x592ac8,_0x455273,_0x5f412e),'runId':_0x1a5dc6?.[_0x3f88aa(0x154)]??null})),_0x558b00=(_0x1a5dc6?.[_0x3f88aa(0x1b6)]??[])[_0x3f88aa(0x15d)](_0xef6697=>_0xef6697[_0x3f88aa(0x1a6)]===_0x3f88aa(0x1c5))[_0x3f88aa(0x143)](_0x388ca0=>({..._0x388ca0,'turnId':_0x592ac8,'runId':_0x1a5dc6?.[_0x3f88aa(0x154)]??null})),_0x45dca9=runtimeAssistantProjectionMoreComplete(_0x1a5dc6,_0x46cfb2)?_0x1a5dc6[_0x3f88aa(0x1b6)][_0x3f88aa(0x143)](_0x5322ec=>({..._0x5322ec,'turnId':_0x592ac8,'runId':_0x1a5dc6[_0x3f88aa(0x154)]})):[..._0x46cfb2,..._0x558b00[_0x3f88aa(0x15d)](_0x31bfd7=>!_0x46cfb2[_0x3f88aa(0x162)](_0x22c4c4=>_0x22c4c4['id']===_0x31bfd7['id']))],_0x2d6721=_0x45dca9[-0x35*-0x61+0x10*-0x185+0x3*0x169]?.[_0x3f88aa(0x1b0)]??null,_0x580bd3=_0x45dca9['at'](-(0x204*-0xe+0x128f+0x4d5*0x2))?.[_0x3f88aa(0x18d)]??_0x2d6721,_0x4dc1e5=lastNativeItemId(_0x10be13);return{'id':_0x592ac8,'sessionId':_0x2e9185['id'],'runId':_0x1a5dc6?.[_0x3f88aa(0x154)]??null,'userItemId':_0x45dca9[_0x3f88aa(0x18b)](_0x438a6f=>_0x438a6f[_0x3f88aa(0x1a6)]===_0x3f88aa(0x1a1))?.['id']??null,'status':_0x558b00[_0x3f88aa(0x16a)]>-0x186d+0xc44+0xc29*0x1?_0x3f88aa(0x150):_0x3f88aa(0x149),'model':null,'effort':null,'access':null,..._0x4dc1e5===undefined||_0x2e9185[_0x3f88aa(0x14f)]!==_0x3f88aa(0x14a)?{}:{'rewind':{'before':lastNativeItemId(_0x674d00[_0x1b6ff7+_0x16a7a6-(-0x5b9+0x1*-0x1d4b+0xb*0x32f)]??[])??null,'after':_0x4dc1e5}},'items':_0x45dca9,'startedAt':_0x2d6721,'completedAt':_0x580bd3};}),_0x3d8d5b=_0x380b40,_0x2a546b=_0x1b6ff7,_0x33ed2e={'sessionId':_0x2e9185['id'],..._0x5059e0[_0x4f564c(0x15e)]===undefined?{}:{'snapshotEnd':_0x5059e0[_0x4f564c(0x15e)]},..._0x5059e0[_0x4f564c(0x1ba)]===undefined?{}:{'nextEnd':_0x5059e0[_0x4f564c(0x1ba)]},..._0x5059e0[_0x4f564c(0x1ae)]===undefined?{}:{'fileAnchor':_0x5059e0[_0x4f564c(0x1ae)]},..._0x5059e0[_0x4f564c(0x1c6)]===undefined?{}:{'anchorBytes':_0x5059e0[_0x4f564c(0x1c6)]},'readLimit':_0x5059e0[_0x4f564c(0x1c3)]??_0x459634},_0x50ea44=_0x5059e0[_0x4f564c(0x14d)]===!![]&&_0x5059e0[_0x4f564c(0x18e)]!==undefined&&_0x5059e0[_0x4f564c(0x15e)]!==undefined&&_0x5059e0[_0x4f564c(0x1ae)]!==undefined&&_0x5059e0[_0x4f564c(0x1c6)]!==undefined?Buffer[_0x4f564c(0x17c)](JSON[_0x4f564c(0x1a7)]({'sessionId':_0x2e9185['id'],'snapshotEnd':_0x5059e0[_0x4f564c(0x15e)],'nextEnd':_0x5059e0[_0x4f564c(0x18e)],'fileAnchor':_0x5059e0[_0x4f564c(0x1ae)],'anchorBytes':_0x5059e0[_0x4f564c(0x1c6)],'readLimit':_0x5059e0[_0x4f564c(0x1c3)]??_0x459634}))[_0x4f564c(0x19f)](_0x4f564c(0x197)):null;return{'turns':_0x3d8d5b,'nextCursor':_0x2a546b>0x2*-0xdf7+0x11*0x183+-0x1*-0x23b?Buffer[_0x4f564c(0x17c)](JSON[_0x4f564c(0x1a7)]({..._0x33ed2e,'end':_0x2a546b}))[_0x4f564c(0x19f)](_0x4f564c(0x197)):_0x50ea44};}export function runtimeAssistantProjectionMoreComplete(_0x5f44da,_0x1c2772){const _0x2a42aa=_0x529e;if(_0x5f44da===undefined)return![];const _0xf303ba=_0x221ef0=>_0x221ef0[_0x2a42aa(0x189)]((_0x3bae90,_0xcdadab)=>{const _0xf2e965=_0x2a42aa;if(_0xcdadab[_0xf2e965(0x1a6)]!==_0xf2e965(0x186)||!isPlainRecord(_0xcdadab[_0xf2e965(0x184)]))return _0x3bae90;return{'count':_0x3bae90[_0xf2e965(0x171)]+(0xd81*0x1+-0x11fb*0x2+0x1676),'characters':_0x3bae90[_0xf2e965(0x155)]+(typeof _0xcdadab[_0xf2e965(0x184)][_0xf2e965(0x16f)]===_0xf2e965(0x1b9)?_0xcdadab[_0xf2e965(0x184)][_0xf2e965(0x16f)][_0xf2e965(0x16a)]:-0x1*-0x219d+0x24f5*0x1+0x1786*-0x3)};},{'count':0x0,'characters':0x0}),_0x2fd6b1=_0xf303ba(_0x5f44da[_0x2a42aa(0x1b6)]),_0x5cdad3=_0xf303ba(_0x1c2772);return _0x2fd6b1[_0x2a42aa(0x171)]>_0x5cdad3[_0x2a42aa(0x171)]||_0x2fd6b1[_0x2a42aa(0x155)]>_0x5cdad3[_0x2a42aa(0x155)];}function runtimeTurnClientMessageId(_0x27a4aa){const _0x309d60=_0x529e,_0x427a7d=_0x27a4aa[_0x309d60(0x1b6)][_0x309d60(0x18b)](_0x21502f=>_0x21502f[_0x309d60(0x1a6)]===_0x309d60(0x1a1));return isPlainRecord(_0x427a7d?.[_0x309d60(0x184)])&&typeof _0x427a7d[_0x309d60(0x184)][_0x309d60(0x165)]===_0x309d60(0x1b9)?_0x427a7d[_0x309d60(0x184)][_0x309d60(0x165)]:undefined;}function lastNativeItemId(_0x4895fd){const _0x2b6e85=_0x529e;return _0x4895fd[_0x2b6e85(0x1a5)](({entry:_0x378454})=>_0x378454[_0x2b6e85(0x1bf)]!==undefined)?.[_0x2b6e85(0x15c)][_0x2b6e85(0x1bf)];}function nativeTranscriptTurnIds(_0x2f2ff1,_0x146964){const _0x14eeb5=_0x529e,_0x2f0c4e=new Map();return _0x146964[_0x14eeb5(0x143)](_0x160fcc=>{const _0x11dafc=_0x14eeb5,_0x358aa4=_0x160fcc[_0x11dafc(0x18b)](({entry:_0x2fc343})=>_0x2fc343[_0x11dafc(0x1a6)]===_0x11dafc(0x195)&&_0x2fc343[_0x11dafc(0x175)]===_0x11dafc(0x1c9))?.[_0x11dafc(0x15c)],_0x32e406=_0x358aa4??_0x160fcc[-0x15e+-0x151d+-0x167b*-0x1]?.[_0x11dafc(0x15c)],_0x2432a8=_0x32e406?.[_0x11dafc(0x1bf)]??nativeTranscriptItemFingerprint(_0x32e406),_0xb4e567=_0x2f0c4e[_0x11dafc(0x187)](_0x2432a8)??-0xed*-0x1+-0x5*-0x607+0x470*-0x7;return _0x2f0c4e[_0x11dafc(0x190)](_0x2432a8,_0xb4e567+(-0x94e+0x76a+0x1e5)),_0x2f2ff1+_0x11dafc(0x192)+_0x2432a8+(_0xb4e567===-0x18c7*0x1+-0x9af+0x2276?'':':'+_0xb4e567);});}function nativeTranscriptItemIdentities(_0x54015f){const _0x2b2010=_0x529e,_0x11922f=new Map();for(const {entry:_0x5dbbb8}of _0x54015f)if(_0x5dbbb8[_0x2b2010(0x1bf)]!==undefined)_0x11922f[_0x2b2010(0x190)](_0x5dbbb8[_0x2b2010(0x1bf)],(_0x11922f[_0x2b2010(0x187)](_0x5dbbb8[_0x2b2010(0x1bf)])??0xfd7+0x58d+-0x1564)+(0x26f8+0x1ce9*-0x1+0x63*-0x1a));const _0x559461=new Map();return _0x54015f[_0x2b2010(0x143)](({entry:_0x3233c6})=>{const _0x35967f=_0x2b2010,_0x4b934c=_0x3233c6[_0x35967f(0x1bf)]!==undefined&&_0x11922f[_0x35967f(0x187)](_0x3233c6[_0x35967f(0x1bf)])===-0x1731+-0x4e3+0x1*0x1c15?_0x3233c6[_0x35967f(0x1bf)]:''+(_0x3233c6[_0x35967f(0x1bf)]===undefined?'':_0x3233c6[_0x35967f(0x1bf)]+':')+nativeTranscriptItemFingerprint(_0x3233c6),_0x5b0283=_0x559461[_0x35967f(0x187)](_0x4b934c)??-0x56d*-0x5+0xe*0x181+-0x1*0x302f;return _0x559461[_0x35967f(0x190)](_0x4b934c,_0x5b0283+(0xa*-0x140+0x234e+-0x16cd)),_0x5b0283===0x19cf*0x1+0xd34+-0x1*0x2703?_0x4b934c:_0x4b934c+':'+_0x5b0283;});}function nativeTranscriptItemFingerprint(_0x24b13f){const _0x260d02=_0x529e;return createHash(_0x260d02(0x1a2))[_0x260d02(0x152)](JSON[_0x260d02(0x1a7)](_0x24b13f??null))[_0x260d02(0x17b)](_0x260d02(0x197))[_0x260d02(0x13e)](-0x1*-0x99f+0xb11+-0x14b0,-0x450+0xa82+-0x61a);}function nativeTranscriptTurns(_0x56a1e3){const _0xf6077c=_0x529e,_0x4e35f7=[];let _0x5bdfdb=[];for(const [_0x2f94ed,_0x45b241]of _0x56a1e3[_0xf6077c(0x151)]()){_0x45b241[_0xf6077c(0x1a6)]===_0xf6077c(0x195)&&_0x45b241[_0xf6077c(0x175)]===_0xf6077c(0x1c9)&&_0x5bdfdb[_0xf6077c(0x16a)]>-0xacb+-0x4b7*0x1+0xf82&&(_0x4e35f7[_0xf6077c(0x142)](_0x5bdfdb),_0x5bdfdb=[]),_0x5bdfdb[_0xf6077c(0x142)]({'entry':_0x45b241,'index':_0x2f94ed});}if(_0x5bdfdb[_0xf6077c(0x16a)]>-0x29f*0x6+0x179b*0x1+-0x1*0x7e1)_0x4e35f7[_0xf6077c(0x142)](_0x5bdfdb);return _0x4e35f7;}function nativeTranscriptConversationItem(_0x54d90e,_0x5e632c,_0x570b9a,_0x3b8163,_0x28b173,_0x1d723a,_0x27b4f9){const _0x5d1ecb=_0x529e,_0x420a42=_0x5e632c[_0x5d1ecb(0x147)],_0x51e7bb=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x194),_0x24e3a4=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x193),_0x127761=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x1a4),_0x1cd6a5=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x1c4),_0x30ee34=_0x54d90e[_0x5d1ecb(0x14f)]===_0x5d1ecb(0x14a)&&_0x51e7bb?normalizeClaudeTool(_0x5e632c[_0x5d1ecb(0x168)],_0x5e632c[_0x5d1ecb(0x196)],_0x5e632c[_0x5d1ecb(0x191)],_0x5e632c[_0x5d1ecb(0x178)],_0x5e632c[_0x5d1ecb(0x16c)]||_0x5e632c[_0x5d1ecb(0x17e)]):undefined,_0x38e3d1=_0x54d90e[_0x5d1ecb(0x14f)]===_0x5d1ecb(0x1b1)&&_0x51e7bb?normalizeCodexTool({'name':_0x5e632c[_0x5d1ecb(0x168)],'namespace':_0x5d1ecb(0x1b1),'rawInput':_0x5e632c[_0x5d1ecb(0x196)],'inputSummary':_0x5e632c[_0x5d1ecb(0x1c2)],'outputSummary':_0x5e632c[_0x5d1ecb(0x191)],'truncated':_0x5e632c[_0x5d1ecb(0x16c)]||_0x5e632c[_0x5d1ecb(0x17e)],..._0x5e632c[_0x5d1ecb(0x19e)]===undefined?{}:{'attachments':_0x5e632c[_0x5d1ecb(0x19e)]}}):undefined,_0x18b8aa=_0x54d90e[_0x5d1ecb(0x14f)]===_0x5d1ecb(0x14a)&&_0x51e7bb&&_0x5e632c[_0x5d1ecb(0x168)]===_0x5d1ecb(0x188)&&isPlainRecord(_0x5e632c[_0x5d1ecb(0x196)])?claudeUserInputQuestions(_0x5e632c[_0x5d1ecb(0x196)]):[],_0x48fefa=_0x18b8aa[_0x5d1ecb(0x16a)]>0xe3*-0x19+-0x63d+-0x6*-0x4bc,_0xf1f5cc=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)&&_0x5e632c[_0x5d1ecb(0x175)]===_0x5d1ecb(0x1c9)?nativeUserClientMessageId(_0x54d90e[_0x5d1ecb(0x14f)],_0x5e632c,_0x420a42,_0x1d723a):null,_0x1b645d=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)?_0x5e632c[_0x5d1ecb(0x175)]===_0x5d1ecb(0x1c9)?nativeUserMessageText(_0x54d90e[_0x5d1ecb(0x14f)],_0x5e632c[_0x5d1ecb(0x16f)]):_0x5e632c[_0x5d1ecb(0x16f)]:'',_0x1765e8=_0xf1f5cc===null?undefined:runtimeUserMessagePayload(_0xf1f5cc,_0x1d723a),_0x7f400e=Array[_0x5d1ecb(0x146)](_0x1765e8?.[_0x5d1ecb(0x180)])?_0x1765e8[_0x5d1ecb(0x180)]:_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)&&_0x5e632c[_0x5d1ecb(0x175)]===_0x5d1ecb(0x1c9)&&_0x5e632c[_0x5d1ecb(0x19e)]!==undefined?_0x27b4f9(_0x5e632c[_0x5d1ecb(0x19e)]):[],_0x3f22dd=_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)&&_0x5e632c[_0x5d1ecb(0x175)]!==_0x5d1ecb(0x1c9)?claudePlanText(_0x1b645d):undefined,_0x50e5ca={'id':_0x28b173+_0x5d1ecb(0x18c)+_0x3b8163,'sessionId':_0x54d90e['id'],'turnId':_0x28b173,'runId':null,'parentItemId':null,'sourceSequence':_0x570b9a,'revision':0x0,'kind':_0x48fefa?_0x5d1ecb(0x15a):_0x127761?_0x5d1ecb(0x1a4):_0x1cd6a5?_0x5d1ecb(0x1c4):_0x51e7bb?_0x30ee34?.[_0x5d1ecb(0x1a6)]??_0x38e3d1?.[_0x5d1ecb(0x1a6)]??_0x5d1ecb(0x194):_0x24e3a4?_0x5d1ecb(0x193):_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)&&_0x5e632c[_0x5d1ecb(0x175)]===_0x5d1ecb(0x1c9)?_0x5d1ecb(0x1a1):_0x3f22dd!==undefined?_0x5d1ecb(0x1a9):_0x5d1ecb(0x186),'status':_0x5d1ecb(0x157),'payload':_0x48fefa?{'requestId':_0x5d1ecb(0x1c1)+(_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x194)?_0x5e632c[_0x5d1ecb(0x1b3)]:_0x5d1ecb(0x1a8)+_0x3b8163),'questions':_0x18b8aa}:_0x127761?{'sections':_0x5e632c[_0x5d1ecb(0x15f)]}:_0x1cd6a5?{'phase':_0x5e632c[_0x5d1ecb(0x148)],'summary':_0x5e632c[_0x5d1ecb(0x156)]}:_0x51e7bb?{..._0x30ee34?.[_0x5d1ecb(0x184)]??_0x38e3d1?.[_0x5d1ecb(0x184)]??{'namespace':_0x54d90e[_0x5d1ecb(0x14f)],'toolName':_0x5e632c[_0x5d1ecb(0x168)],'title':_0x5e632c[_0x5d1ecb(0x168)],'inputSummary':_0x5e632c[_0x5d1ecb(0x1c2)],'outputSummary':_0x5e632c[_0x5d1ecb(0x191)],'progressLabel':null,'errorCode':_0x5e632c[_0x5d1ecb(0x178)]?_0x5d1ecb(0x163):null,'truncated':_0x5e632c[_0x5d1ecb(0x16c)]||_0x5e632c[_0x5d1ecb(0x17e)]},..._0x5e632c[_0x5d1ecb(0x16b)]===undefined?{}:{'toolCategory':_0x5e632c[_0x5d1ecb(0x16b)]},..._0x5e632c[_0x5d1ecb(0x19e)]===undefined?{}:{'attachments':_0x27b4f9(_0x5e632c[_0x5d1ecb(0x19e)])}}:_0x24e3a4?{'sourceEventType':_0x5e632c[_0x5d1ecb(0x164)],'label':_0x5e632c[_0x5d1ecb(0x1c7)]}:_0x5e632c[_0x5d1ecb(0x1a6)]===_0x5d1ecb(0x195)&&_0x5e632c[_0x5d1ecb(0x175)]===_0x5d1ecb(0x1c9)?{'clientMessageId':_0xf1f5cc,'text':_0x1b645d,'contexts':[],'delivery':_0x5d1ecb(0x19c),..._0x7f400e[_0x5d1ecb(0x16a)]===0x155f*0x1+-0x133*-0x4+0x57*-0x4d?{}:{'attachments':_0x7f400e}}:_0x3f22dd!==undefined?{'explanation':compactRunnerText(_0x3f22dd,-0x9473+0x67e7+0x7aac),'steps':[]}:{'text':_0x1b645d,'format':_0x5d1ecb(0x141),'source':_0x5d1ecb(0x19a)},'startedAt':_0x420a42,'completedAt':_0x420a42};return _0x50e5ca;}export function nativeUserClientMessageId(_0x2959fe,_0x4961cb,_0x14acc2,_0x39411c){const _0x582467=_0x529e,_0x12a3e8=[];for(const _0x23ebf3 of _0x39411c){const _0x436696=_0x23ebf3[_0x582467(0x1b6)][_0x582467(0x18b)](_0x229b8a=>_0x229b8a[_0x582467(0x1a6)]===_0x582467(0x1a1));if(_0x436696===undefined||!isPlainRecord(_0x436696[_0x582467(0x184)]))continue;const _0x542ab5=_0x436696[_0x582467(0x184)],_0x13c47d=typeof _0x542ab5[_0x582467(0x165)]===_0x582467(0x1b9)?_0x542ab5[_0x582467(0x165)]:null;if(_0x13c47d===null||_0x542ab5[_0x582467(0x16f)]!==nativeUserMessageText(_0x2959fe,_0x4961cb[_0x582467(0x16f)]))continue;const _0xb0e243=_0x436696[_0x582467(0x1b0)]??_0x23ebf3[_0x582467(0x1b0)];_0x12a3e8[_0x582467(0x142)]({'clientMessageId':_0x13c47d,'createdAt':_0xb0e243??null});}if(_0x14acc2===null)return _0x12a3e8[_0x582467(0x16a)]===-0x1b07+0x476*0x8+-0x8a8?_0x12a3e8[0xdb3+-0x2*0xc62+0xb11][_0x582467(0x165)]:null;const _0xef993b=_0x12a3e8[_0x582467(0x15d)](_0x59352f=>_0x59352f[_0x582467(0x147)]!==null)[_0x582467(0x143)](_0x38eb26=>({..._0x38eb26,'distance':Math[_0x582467(0x13a)](_0x14acc2-_0x38eb26[_0x582467(0x147)])}))[_0x582467(0x15d)](_0x3bf1d3=>_0x3bf1d3[_0x582467(0x198)]<=-0x17c*-0xfd+0x148fd+-0x1d629)[_0x582467(0x14e)]((_0x24a0d7,_0x5c2783)=>_0x24a0d7[_0x582467(0x198)]-_0x5c2783[_0x582467(0x198)]);return _0xef993b[0x1ecb+0x1054+0x3*-0xfb5]?.[_0x582467(0x165)]??null;}function runtimeUserMessagePayload(_0x23d3b4,_0x5b1fa4){const _0x1f49f4=_0x529e;for(const _0x50a372 of _0x5b1fa4){const _0x1e41ab=_0x50a372[_0x1f49f4(0x1b6)][_0x1f49f4(0x18b)](_0x2a8d90=>_0x2a8d90[_0x1f49f4(0x1a6)]===_0x1f49f4(0x1a1));if(!isPlainRecord(_0x1e41ab?.[_0x1f49f4(0x184)])||_0x1e41ab[_0x1f49f4(0x184)][_0x1f49f4(0x165)]!==_0x23d3b4)continue;return _0x1e41ab[_0x1f49f4(0x184)];}return undefined;}function nativeUserMessageText(_0x2d3d40,_0x3c8150){const _0x3aa01b=_0x529e,_0x5ba817=stripMissionStartPrompt(_0x3c8150),_0x147b50=_0x2d3d40===_0x3aa01b(0x14a)?stripClaudePlanTag(_0x5ba817):_0x5ba817;if(_0x2d3d40!==_0x3aa01b(0x1b1))return _0x147b50;return parseCodexComposerImageMarkers(_0x147b50)[_0x3aa01b(0x16f)];}export function claudePlanText(_0x4590c6){const _0x103fab=_0x529e,_0x4dd769=_0x4590c6[_0x103fab(0x1ac)]();if(!_0x4dd769[_0x103fab(0x173)](_0x103fab(0x167))||!/<\/proposed_plan>\s*$/[_0x103fab(0x1a3)](_0x4dd769))return undefined;const _0x4eb973=_0x4dd769[_0x103fab(0x13e)](_0x103fab(0x167)[_0x103fab(0x16a)])[_0x103fab(0x1aa)](/<\/proposed_plan>\s*$/,'')[_0x103fab(0x1ac)]();return _0x4eb973[_0x103fab(0x16a)]>0x14d*-0x17+-0x30a*0x3+0x2709?_0x4eb973:undefined;}export function claudeUserInputQuestions(_0x18a78c){const _0x5709a0=_0x529e;if(!Array[_0x5709a0(0x146)](_0x18a78c[_0x5709a0(0x13c)])||_0x18a78c[_0x5709a0(0x13c)][_0x5709a0(0x16a)]===0x112d+-0x106b+-0x61*0x2||_0x18a78c[_0x5709a0(0x13c)][_0x5709a0(0x16a)]>0x6*0x52+0x15f6+-0x263*0xa)return[];const _0x2c9c85=_0x18a78c[_0x5709a0(0x13c)][_0x5709a0(0x143)]((_0x5d4106,_0x2740a5)=>{const _0x36cb34=_0x5709a0;if(!isPlainRecord(_0x5d4106)||typeof _0x5d4106[_0x36cb34(0x1bc)]!==_0x36cb34(0x1b9))return undefined;const _0x302f1c=Array[_0x36cb34(0x146)](_0x5d4106[_0x36cb34(0x19b)])?_0x5d4106[_0x36cb34(0x19b)][_0x36cb34(0x18a)](_0x41bdb7=>{const _0x2d7985=_0x36cb34;if(!isPlainRecord(_0x41bdb7)||typeof _0x41bdb7[_0x2d7985(0x1c7)]!==_0x2d7985(0x1b9))return[];const _0x394906=compactRunnerText(_0x41bdb7[_0x2d7985(0x1c7)],-0x979+0x112e+-0x5c1);return _0x394906[_0x2d7985(0x16a)]===-0x228f+-0x1843*0x1+0x3ad2?[]:[{'value':_0x394906,'label':_0x394906,'description':typeof _0x41bdb7[_0x2d7985(0x160)]===_0x2d7985(0x1b9)?compactRunnerText(_0x41bdb7[_0x2d7985(0x160)],-0x1*0x18d+-0x3*0xec+0x839):null}];}):[],_0x334787=_0x5d4106[_0x36cb34(0x1cc)]===!![];return{'id':_0x36cb34(0x13b)+_0x2740a5,'prompt':compactRunnerText(_0x5d4106[_0x36cb34(0x1bc)],-0x3*-0x5c7+-0x2d3+-0x2*-0x283),'input':_0x302f1c[_0x36cb34(0x16a)]===0x227*0x5+0x6f8+-0x11bb?_0x36cb34(0x14b):_0x334787?_0x36cb34(0x1b4):_0x36cb34(0x18f),'options':_0x302f1c,'allowOther':!![],'multiSelect':_0x334787};});return _0x2c9c85[_0x5709a0(0x162)](_0x5e7931=>_0x5e7931===undefined)?[]:_0x2c9c85;}
package/dist/workspace.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x67518d=_0x4bb8;(function(_0x1ddb7f,_0x301f4f){const _0xc2fb41=_0x4bb8,_0x56e49c=_0x1ddb7f();while(!![]){try{const _0x3217c0=-parseInt(_0xc2fb41(0x2b7))/(-0x158*0x7+0x13*-0x41+0xe3c)+parseInt(_0xc2fb41(0x201))/(-0xe*-0xb+0x26b7+0x274f*-0x1)*(-parseInt(_0xc2fb41(0x24f))/(0x812*0x2+0x18b9*-0x1+0x898))+-parseInt(_0xc2fb41(0x246))/(0x15*0x12a+-0x72e*0x4+0x44a)+-parseInt(_0xc2fb41(0x1b6))/(0x2*-0x959+0x1785+0xf*-0x52)*(parseInt(_0xc2fb41(0x233))/(0x3*0xa2a+-0xc89*0x3+0x3*0x261))+-parseInt(_0xc2fb41(0x1f3))/(0x53b+0x1*-0x20de+0x1baa)+-parseInt(_0xc2fb41(0x20f))/(0xafd+-0x10*-0x7e+-0x1*0x12d5)+parseInt(_0xc2fb41(0x1c5))/(0x1a4d*0x1+-0x66+0xe*-0x1d9);if(_0x3217c0===_0x301f4f)break;else _0x56e49c['push'](_0x56e49c['shift']());}catch(_0x10781f){_0x56e49c['push'](_0x56e49c['shift']());}}}(_0x537c,-0x25*0x297f+-0x9a6ba+-0x1*-0x15dc8b));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0x498f63}from'node:os';import{dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';import{terminateProcessTree}from'./process-tree.js';const GIT_TIMEOUT_MS=0x1*0x281+0x4be*-0x1+-0x1*-0x15c5,GIT_STATUS_TIMEOUT_MS=0x1*-0x76d8+0x947f+0x5789,GIT_HISTORY_TIMEOUT_MS=0xb3*-0x5f+-0x729e+-0xd*-0x126f,GIT_OUTPUT_LIMIT=(0x1588+0x3*0x95b+-0x2f99)*(0x573*-0x5+0x1595+0x9aa),GIT_LARGE_OUTPUT_LIMIT=(0x202+-0x243f+-0x1f*-0x11b)*(0xfa+-0x11*0x183+0x1cb9)*(-0x859*0x3+0x1bc7+0x36*0x6),FILE_READ_LIMIT=(-0x97*0x1+0x12cf+-0x1038)*(-0x31*-0x6e+-0x3*0x2ea+-0x1*0x850),DIRECTORY_PAGE_LIMIT=0x685*-0x3+0x7f4+0x1*0xc63,DIRECTORY_PICKER_LIMIT=-0x1904*0x1+-0x2*0x1161+0x3c8e,SEARCH_RESULT_LIMIT=0x21e9*0x1+0x99*-0x15+0x36e*-0x6,FILE_INDEX_IDLE_TTL_MS=(-0xc62+-0x1606+-0x6*-0x5c6)*(0x99d+0x154d*-0x1+0xbec)*(0x1937*0x1+0x9be+-0x1*0x1f0d),FILE_INDEX_FRESHNESS_TTL_MS=-0x50bc+0xd32c+0x2*-0x6a0,FILE_INDEX_ENTRY_LIMIT=0xaa86+0xfc7+0x1*0xcc53,FILE_INDEX_METADATA_CONCURRENCY=-0x502*0x5+-0x1181+0x2aab,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x67518d(0x216),_0x67518d(0x28c),_0x67518d(0x236),_0x67518d(0x1c3),_0x67518d(0x2ab),_0x67518d(0x2a3),_0x67518d(0x211),_0x67518d(0x24d),_0x67518d(0x28d),_0x67518d(0x23b),_0x67518d(0x1c9),_0x67518d(0x1b1),_0x67518d(0x29e),_0x67518d(0x1df),_0x67518d(0x276),_0x67518d(0x2b3),_0x67518d(0x1d3),_0x67518d(0x208),_0x67518d(0x1db),_0x67518d(0x2b1),_0x67518d(0x228),_0x67518d(0x2b4),_0x67518d(0x2c2),_0x67518d(0x27a),_0x67518d(0x1e5)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x30c560,_0x5b52c7,_0x44db62){const _0x5292ea=_0x67518d,_0xccd06c=_0x5b52c7[_0x5292ea(0x25d)]();if(_0xccd06c[_0x5292ea(0x1c6)]===0xb5*0xd+0x1f8c+-0x28bd||_0xccd06c[_0x5292ea(0x1c6)]>-0x4be+0x1*0x272+0x34b||_0xccd06c==='.'||_0xccd06c==='..'||_0xccd06c[_0x5292ea(0x1ef)]('/')||_0xccd06c[_0x5292ea(0x1ef)]('\x5c')||_0xccd06c[_0x5292ea(0x1ef)]('\x00'))throw new Error(_0x5292ea(0x274));const _0x490e29=await Promise[_0x5292ea(0x269)](_0x44db62[_0x5292ea(0x275)](_0x4a12aa=>realpath(_0x4a12aa))),_0x11c93d=await realpath(_0x30c560)[_0x5292ea(0x221)](()=>{const _0x11eb1b=_0x5292ea;throw new Error(_0x11eb1b(0x2b8));}),_0x223779=await stat(_0x11c93d)[_0x5292ea(0x221)](()=>undefined);if(_0x223779?.[_0x5292ea(0x1cd)]()!==!![]||!isWithinAllowedRoot(_0x11c93d,_0x490e29))throw new Error(_0x5292ea(0x2b8));const _0xd47d1=resolve(_0x11c93d,_0xccd06c);if(dirname(_0xd47d1)!==_0x11c93d||!isWithinAllowedRoot(_0xd47d1,_0x490e29))throw new Error(_0x5292ea(0x274));try{await mkdir(_0xd47d1);}catch(_0x15dfc3){if(_0x15dfc3[_0x5292ea(0x1e3)]===_0x5292ea(0x249))throw new Error(_0x5292ea(0x264));throw _0x15dfc3;}return _0xd47d1;}export class WorkspaceFileIndex{[_0x67518d(0x2c0)];[_0x67518d(0x2a5)];[_0x67518d(0x1bd)]=[];[_0x67518d(0x23e)]=![];[_0x67518d(0x241)];[_0x67518d(0x1fe)];[_0x67518d(0x22f)]=!![];[_0x67518d(0x238)];[_0x67518d(0x1d8)]=0x1867*-0x1+-0xb39*0x3+0x1*0x3a12;[_0x67518d(0x229)]=-0x4*0x34d+-0xe3+-0x1*-0xe17;constructor(_0x112096,_0x1398ec={}){const _0x4aa397=_0x67518d;this[_0x4aa397(0x2c0)]=_0x112096,this[_0x4aa397(0x2a5)]=_0x1398ec;}async[_0x67518d(0x2a2)](){const _0x18e222=_0x67518d;return await this[_0x18e222(0x207)](),this[_0x18e222(0x2c4)](),{'entries':this[_0x18e222(0x1bd)][_0x18e222(0x20b)](_0x4dd1ac=>_0x4dd1ac[_0x18e222(0x1f8)]===_0x18e222(0x1ac)),'truncated':this[_0x18e222(0x23e)]};}[_0x67518d(0x1c0)](){const _0x1cd88b=_0x67518d;if(this[_0x1cd88b(0x238)]!==undefined)clearTimeout(this[_0x1cd88b(0x238)]);this[_0x1cd88b(0x238)]=undefined,this[_0x1cd88b(0x1bd)]=[],this[_0x1cd88b(0x23e)]=![],this[_0x1cd88b(0x22f)]=!![],this[_0x1cd88b(0x1d8)]=-0x1a75+-0x13*-0x13+0x190c,this[_0x1cd88b(0x229)]=0x1a01+0x8f9*-0x1+0x1108*-0x1;}async[_0x67518d(0x278)](_0x459957,_0x12389c,_0x360533=SEARCH_RESULT_LIMIT,_0x192904=![]){const _0x49d1fd=_0x67518d;if(_0x459957[_0x49d1fd(0x25d)]()[_0x49d1fd(0x1c6)]===0x856+-0x1ac9+0x1273||_0x459957[_0x49d1fd(0x1c6)]>-0x4*-0x873+0x23ea*-0x1+0x31e||!Number[_0x49d1fd(0x24c)](_0x360533)||_0x360533<0x1378+0xb*-0x1d9+0xdc||_0x360533>SEARCH_RESULT_LIMIT)throw new Error(_0x49d1fd(0x2bb));await this[_0x49d1fd(0x207)](),this[_0x49d1fd(0x2c4)]();const _0x3990a8=decodeSearchCursor(_0x12389c,_0x459957),_0x113ea9=_0x3990a8===undefined?undefined:this[_0x49d1fd(0x1bd)][_0x49d1fd(0x1ea)](_0x3c5e4d=>_0x3c5e4d[_0x49d1fd(0x21a)]===_0x3990a8&&(_0x192904||_0x3c5e4d[_0x49d1fd(0x1f8)]===_0x49d1fd(0x1ac))),_0x10e3be=_0x113ea9===undefined?-(-0x7*0x2a5+-0x6*0x37f+-0x2a2*-0xf):fuzzyPathScore(_0x113ea9[_0x49d1fd(0x21a)],_0x459957),_0x5e1e5=_0x113ea9===undefined||_0x10e3be<0xe49+-0x14+-0xe35?undefined:{'entry':_0x113ea9,'score':_0x10e3be},_0x4bd712=new RankedCandidateHeap(_0x360533+(-0x108+-0x166c+0x1775));for(const _0x1dcfa1 of this[_0x49d1fd(0x1bd)]){if(!_0x192904&&_0x1dcfa1[_0x49d1fd(0x1f8)]!==_0x49d1fd(0x1ac))continue;const _0x4d708f=fuzzyPathScore(_0x1dcfa1[_0x49d1fd(0x21a)],_0x459957);if(_0x4d708f<0x1*0xce2+0x22b1+-0x2f93)continue;const _0x5e6f75={'entry':_0x1dcfa1,'score':_0x4d708f};if(_0x5e1e5!==undefined&&compareRankedCandidate(_0x5e6f75,_0x5e1e5)<=0x21e5+-0x26ef+0x56*0xf)continue;_0x4bd712[_0x49d1fd(0x261)](_0x5e6f75);}const _0x1e44ad=_0x4bd712[_0x49d1fd(0x20a)](),_0xe7b211=_0x1e44ad[_0x49d1fd(0x23f)](-0x40*-0x3e+0x2*0x11ba+-0x32f4,_0x360533)[_0x49d1fd(0x275)](_0x34b376=>_0x34b376[_0x49d1fd(0x1f7)]),_0x5a27ee=_0x1e44ad[_0x360533]?.[_0x49d1fd(0x1f7)][_0x49d1fd(0x21a)];return{'entries':_0xe7b211,'nextCursor':_0x5a27ee===undefined?null:encodeSearchCursor(_0x459957,_0xe7b211['at'](-(0x2597*-0x1+0x1c2*0xd+0xebe))?.[_0x49d1fd(0x21a)]??_0x3990a8??''),'truncated':_0x5a27ee!==undefined||this[_0x49d1fd(0x23e)]};}async[_0x67518d(0x207)](){const _0x975cc8=_0x67518d;if(!this[_0x975cc8(0x22f)]&&this[_0x975cc8(0x241)]!==undefined){if(Date[_0x975cc8(0x27b)]()-this[_0x975cc8(0x229)]>=(this[_0x975cc8(0x2a5)][_0x975cc8(0x242)]??FILE_INDEX_FRESHNESS_TTL_MS))this[_0x975cc8(0x28a)]();return;}this[_0x975cc8(0x1fe)]===undefined&&(this[_0x975cc8(0x1fe)]=this[_0x975cc8(0x2c5)]()[_0x975cc8(0x224)](()=>{const _0x5bda84=_0x975cc8;this[_0x5bda84(0x1fe)]=undefined;})),await this[_0x975cc8(0x1fe)];}[_0x67518d(0x2c4)](){const _0x7f2a38=_0x67518d;if(this[_0x7f2a38(0x238)]!==undefined)clearTimeout(this[_0x7f2a38(0x238)]);this[_0x7f2a38(0x238)]=setTimeout(()=>this[_0x7f2a38(0x1c0)](),this[_0x7f2a38(0x2a5)][_0x7f2a38(0x1f5)]??FILE_INDEX_IDLE_TTL_MS),this[_0x7f2a38(0x238)][_0x7f2a38(0x28b)]();}async[_0x67518d(0x2c5)](){const _0x294607=_0x67518d,_0x1679f=await resolveRegisteredWorkspaceRoot(this[_0x294607(0x2c0)]),_0x37c960=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x1679f)],_0x4df07a=[],_0x1da8ed=this[_0x294607(0x2a5)][_0x294607(0x266)]??FILE_INDEX_ENTRY_LIMIT;let _0x27a798=![];const _0x577654=['.'];let _0x3327a8=-0x57*-0x6d+-0x2*-0xec+-0x26e3;while(_0x3327a8<_0x577654[_0x294607(0x1c6)]&&!_0x27a798){const _0x511c59=_0x577654[_0x3327a8];_0x3327a8+=0x5ab*0x4+-0x1fad+-0x2*-0x481;const _0x58026f=await resolveWorkspaceEntryFromCanonicalRoot(_0x1679f,_0x511c59,!![])[_0x294607(0x221)](()=>undefined);if(_0x58026f===undefined)continue;const _0x31d457=await opendir(_0x58026f)[_0x294607(0x221)](()=>undefined);if(_0x31d457===undefined)continue;let _0x39f9bb=[];const _0x873d3e=async()=>{const _0x357fba=_0x294607,_0x18bc93=await Promise[_0x357fba(0x269)](_0x39f9bb);_0x39f9bb=[];for(const _0x510ffa of _0x18bc93){if(_0x510ffa===undefined)continue;if(_0x510ffa[_0x357fba(0x21a)]===_0x357fba(0x2a6)||_0x510ffa[_0x357fba(0x21a)][_0x357fba(0x1b9)](_0x357fba(0x234))||isExcluded(_0x510ffa[_0x357fba(0x21a)],_0x37c960))continue;if(_0x510ffa[_0x357fba(0x1f8)]===_0x357fba(0x298))_0x577654[_0x357fba(0x1f6)](_0x510ffa[_0x357fba(0x21a)]);_0x4df07a[_0x357fba(0x1f6)](_0x510ffa);if(_0x4df07a[_0x357fba(0x1c6)]>=_0x1da8ed){_0x27a798=!![];break;}}};for await(const _0x36e336 of _0x31d457){const _0x2f53fc=_0x511c59==='.'?_0x36e336[_0x294607(0x209)]:posix[_0x294607(0x223)](_0x511c59[_0x294607(0x254)]('\x5c','/'),_0x36e336[_0x294607(0x209)]);if(_0x2f53fc===_0x294607(0x2a6)||_0x2f53fc[_0x294607(0x1b9)](_0x294607(0x234))||isExcluded(_0x2f53fc,_0x37c960))continue;_0x39f9bb[_0x294607(0x1f6)](inspectWorkspaceIndexEntry(_0x1679f,_0x2f53fc,_0x36e336[_0x294607(0x209)]));if(_0x39f9bb[_0x294607(0x1c6)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x873d3e();if(_0x27a798)break;}if(!_0x27a798&&_0x39f9bb[_0x294607(0x1c6)]>-0x2034+0x20a1*0x1+-0x6d)await _0x873d3e();}this[_0x294607(0x241)]=_0x1679f,this[_0x294607(0x1bd)]=_0x4df07a,this[_0x294607(0x23e)]=_0x27a798,this[_0x294607(0x22f)]=![],this[_0x294607(0x1d8)]=Date[_0x294607(0x27b)](),this[_0x294607(0x229)]=this[_0x294607(0x1d8)];}[_0x67518d(0x28a)](){const _0x2bbf79=_0x67518d;if(this[_0x2bbf79(0x1fe)]!==undefined)return;this[_0x2bbf79(0x229)]=Date[_0x2bbf79(0x27b)](),this[_0x2bbf79(0x1fe)]=this[_0x2bbf79(0x2c5)]()[_0x2bbf79(0x221)](()=>undefined)[_0x2bbf79(0x224)](()=>{const _0x8e0365=_0x2bbf79;this[_0x8e0365(0x1fe)]=undefined;});}}async function workspaceExcludePatterns(_0x5a31e3){const _0x5b06f3=_0x67518d,_0x1bb543=resolve(_0x5a31e3,_0x5b06f3(0x22c)),_0x136748=await readFile(_0x1bb543,_0x5b06f3(0x2be))[_0x5b06f3(0x24a)](JSON[_0x5b06f3(0x283)])[_0x5b06f3(0x221)](()=>undefined);if(typeof _0x136748!==_0x5b06f3(0x1ec)||_0x136748===null)return[];return[_0x5b06f3(0x1cf),_0x5b06f3(0x1de)][_0x5b06f3(0x2b0)](_0x2fda09=>{const _0x5d683a=_0x5b06f3,_0x4427b2=_0x136748[_0x2fda09];return typeof _0x4427b2===_0x5d683a(0x1ec)&&_0x4427b2!==null?Object[_0x5d683a(0x1bd)](_0x4427b2)[_0x5d683a(0x2b0)](([_0x4b5119,_0x19100c])=>_0x19100c===!![]?[_0x4b5119]:[]):[];});}function isExcluded(_0x20c9e6,_0x595e94){const _0x14c423=_0x67518d;return _0x595e94[_0x14c423(0x252)](_0x449799=>minimatch(_0x20c9e6,_0x449799,{'dot':!![],'nocase':_0x498f63()!==_0x14c423(0x2a7)})||minimatch(_0x20c9e6+'/',_0x449799,{'dot':!![],'nocase':_0x498f63()!==_0x14c423(0x2a7)}));}function compareRankedCandidate(_0x1a7848,_0x11d25d){const _0x331ebc=_0x67518d;return _0x11d25d[_0x331ebc(0x231)]-_0x1a7848[_0x331ebc(0x231)]||_0x1a7848[_0x331ebc(0x1f7)][_0x331ebc(0x21a)][_0x331ebc(0x1f9)](_0x11d25d[_0x331ebc(0x1f7)][_0x331ebc(0x21a)]);}class RankedCandidateHeap{[_0x67518d(0x1af)];[_0x67518d(0x1a8)]=[];constructor(_0x9d114d){const _0x183283=_0x67518d;this[_0x183283(0x1af)]=_0x9d114d;}[_0x67518d(0x261)](_0x2da816){const _0x8528a0=_0x67518d;if(this[_0x8528a0(0x1a8)][_0x8528a0(0x1c6)]<this[_0x8528a0(0x1af)]){this[_0x8528a0(0x1a8)][_0x8528a0(0x1f6)](_0x2da816),this[_0x8528a0(0x268)](this[_0x8528a0(0x1a8)][_0x8528a0(0x1c6)]-(-0x687*0x2+0xfc5+-0x2b6));return;}if(compareRankedCandidate(_0x2da816,this[_0x8528a0(0x1a8)][0x1*-0x36a+0x1*-0x35b+0x6c5])>=-0x9*-0x3d1+0x74f+-0x29a8)return;this[_0x8528a0(0x1a8)][-0x10d*-0x5+-0xeba+-0x979*-0x1]=_0x2da816,this[_0x8528a0(0x277)](-0xd9*-0x7+-0x756+0x167);}[_0x67518d(0x20a)](){const _0x5c59c9=_0x67518d;return[...this[_0x5c59c9(0x1a8)]][_0x5c59c9(0x2c8)](compareRankedCandidate);}[_0x67518d(0x268)](_0x4deaff){const _0x5a46ef=_0x67518d;let _0x571be2=_0x4deaff;while(_0x571be2>-0x16cf+-0x1*-0x713+0xfbc){const _0x1e8bb3=Math[_0x5a46ef(0x267)]((_0x571be2-(-0x1488+-0xc6a*0x1+0x20f3))/(0x1*0x1aa+0x25*-0x13+0x117));if(compareRankedCandidate(this[_0x5a46ef(0x1a8)][_0x571be2],this[_0x5a46ef(0x1a8)][_0x1e8bb3])<=0x1dee+0x1*-0x329+-0x1ac5)break;[this[_0x5a46ef(0x1a8)][_0x571be2],this[_0x5a46ef(0x1a8)][_0x1e8bb3]]=[this[_0x5a46ef(0x1a8)][_0x1e8bb3],this[_0x5a46ef(0x1a8)][_0x571be2]],_0x571be2=_0x1e8bb3;}}[_0x67518d(0x277)](_0xc7cd36){const _0x580a29=_0x67518d;let _0x425a69=_0xc7cd36;while(!![]){const _0x5a4fb7=_0x425a69*(-0x1c4c+0x595+0x7*0x33f)+(-0x1c56+-0x1eda+-0x13bb*-0x3);if(_0x5a4fb7>=this[_0x580a29(0x1a8)][_0x580a29(0x1c6)])return;const _0x272a16=_0x5a4fb7+(-0x101*0x16+-0x25ba*0x1+0x3bd1),_0x5ea4e4=_0x272a16<this[_0x580a29(0x1a8)][_0x580a29(0x1c6)]&&compareRankedCandidate(this[_0x580a29(0x1a8)][_0x272a16],this[_0x580a29(0x1a8)][_0x5a4fb7])>-0x16e*0x11+-0x24c3+0x3*0x145b?_0x272a16:_0x5a4fb7;if(compareRankedCandidate(this[_0x580a29(0x1a8)][_0x5ea4e4],this[_0x580a29(0x1a8)][_0x425a69])<=-0x1fc0+-0x2b6*-0x1+-0x3f*-0x76)return;[this[_0x580a29(0x1a8)][_0x425a69],this[_0x580a29(0x1a8)][_0x5ea4e4]]=[this[_0x580a29(0x1a8)][_0x5ea4e4],this[_0x580a29(0x1a8)][_0x425a69]],_0x425a69=_0x5ea4e4;}}}function fuzzyPathScore(_0x32efd0,_0x4b52d9){const _0x53c4fb=_0x67518d,_0x4a54ec=_0x32efd0[_0x53c4fb(0x284)](),_0x425073=_0x4b52d9[_0x53c4fb(0x25d)]()[_0x53c4fb(0x284)]();let _0x220202=-0xc1*0x23+-0x1e7e*-0x1+-0x41b*0x1,_0x2da85e=0x832+0x138b+-0x9*0x315,_0x2024e0=-(0x6b8+0x1*-0x1f61+-0x5*-0x4ef);for(const _0x5c66b3 of _0x425073){const _0x4e819f=_0x4a54ec[_0x53c4fb(0x292)](_0x5c66b3,_0x220202);if(_0x4e819f===-(0x25*0x1c+0x5*-0x389+-0xda2*-0x1))return-(-0xf37*0x2+-0x7d8+0x2647);_0x2da85e+=_0x4e819f===_0x2024e0+(-0x851+0x1*-0x1483+-0x79*-0x3d)?0x1fa2+0x1be*0xa+-0x3102:0xb61+-0x24*-0x7e+-0x1d18;if(_0x4e819f===-0x133f+-0x3f3+0xb99*0x2||_0x53c4fb(0x25e)[_0x53c4fb(0x1ef)](_0x4a54ec[_0x4e819f-(0x8*-0x2bf+0x2663+-0x16*0xbf)]??''))_0x2da85e+=0x18a0+0x1707+-0x2f9f;_0x2024e0=_0x4e819f,_0x220202=_0x4e819f+(0x1c55+0x1e*-0x9c+0x283*-0x4);}const _0x595d14=_0x32efd0[_0x53c4fb(0x23f)](_0x32efd0[_0x53c4fb(0x271)]('/')+(-0x3*0x696+0xa*0x291+-0x5e7))[_0x53c4fb(0x284)]();if(_0x595d14[_0x53c4fb(0x1ef)](_0x425073))_0x2da85e+=0xc5f*0x1+0x1115+-0x753*0x4;else{if(_0x4a54ec[_0x53c4fb(0x1ef)](_0x425073))_0x2da85e+=-0x25*0x101+-0x1e36+0x436b;}return _0x2da85e-_0x32efd0[_0x53c4fb(0x1c6)]/(0x3c7+-0x1*-0x188f+-0x186e);}export async function listWorkspaceDirectories(_0x48992c,_0x3e1b9e,_0x4043f0=homedir()){const _0x1bb0c2=_0x67518d,_0x5595dd=await realpath(_0x4043f0),_0x5ddd4d=await Promise[_0x1bb0c2(0x269)](_0x3e1b9e[_0x1bb0c2(0x275)](_0x553e88=>realpath(_0x553e88))),_0x1caff8=[...new Set([_0x5595dd,..._0x5ddd4d])],_0x3d7d10=_0x48992c===undefined?_0x5ddd4d[-0x109b*0x1+-0x11fb*0x2+0x3491*0x1]??_0x5595dd:await realpath(_0x48992c),_0x50fcab=await stat(_0x3d7d10);if(!_0x50fcab[_0x1bb0c2(0x1cd)]()||!isWithinAllowedRoot(_0x3d7d10,_0x1caff8))throw new Error(_0x1bb0c2(0x2b8));const _0xb8127c=await readdir(_0x3d7d10,{'withFileTypes':!![]}),_0x4c7457=[];for(const _0x33b62c of _0xb8127c[_0x1bb0c2(0x2c8)]((_0x45a279,_0x526ff8)=>_0x45a279[_0x1bb0c2(0x209)][_0x1bb0c2(0x1f9)](_0x526ff8[_0x1bb0c2(0x209)]))){if(!_0x33b62c[_0x1bb0c2(0x1cd)]()&&!_0x33b62c[_0x1bb0c2(0x1f0)]())continue;const _0x388008=await realpath(resolve(_0x3d7d10,_0x33b62c[_0x1bb0c2(0x209)]))[_0x1bb0c2(0x221)](()=>undefined);if(_0x388008===undefined||!isWithinAllowedRoot(_0x388008,_0x1caff8))continue;const _0x37edf5=await stat(_0x388008)[_0x1bb0c2(0x221)](()=>undefined);if(_0x37edf5===undefined||!_0x37edf5[_0x1bb0c2(0x1cd)]())continue;_0x4c7457[_0x1bb0c2(0x1f6)]({'path':_0x388008,'name':_0x33b62c[_0x1bb0c2(0x209)],'selectable':isWithinAllowedRoot(_0x388008,_0x5ddd4d)});if(_0x4c7457[_0x1bb0c2(0x1c6)]>DIRECTORY_PICKER_LIMIT)break;}const _0x1e80bf=dirname(_0x3d7d10);return{'homePath':_0x5595dd,'currentPath':_0x3d7d10,'parentPath':_0x1e80bf===_0x3d7d10||!isWithinAllowedRoot(_0x1e80bf,_0x1caff8)?null:_0x1e80bf,'browseRoots':_0x5ddd4d,'selectable':isWithinAllowedRoot(_0x3d7d10,_0x5ddd4d),'entries':_0x4c7457[_0x1bb0c2(0x23f)](-0x1549+0x1*-0x25bf+0x8*0x761,DIRECTORY_PICKER_LIMIT),'truncated':_0x4c7457[_0x1bb0c2(0x1c6)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x26bfd1,_0x201467='.',_0x4f27b1,_0x3b0da6=DIRECTORY_PAGE_LIMIT){const _0x3b0306=_0x67518d;if(!Number[_0x3b0306(0x24c)](_0x3b0da6)||_0x3b0da6<-0x1be7+0x8*-0x4a8+-0x18*-0x2b7||_0x3b0da6>DIRECTORY_PAGE_LIMIT)throw new Error(_0x3b0306(0x1bc));const _0x4bc497=await resolveRegisteredWorkspaceRoot(_0x26bfd1),_0x3ac98e=await resolveWorkspaceEntryFromCanonicalRoot(_0x4bc497,_0x201467,!![]),_0x11e037=await readdir(_0x3ac98e,{'withFileTypes':!![]}),_0x55562c=decodeDirectoryCursor(_0x4f27b1,_0x201467),_0x343356=_0x11e037[_0x3b0306(0x20b)](_0x2744da=>_0x2744da[_0x3b0306(0x209)]!==_0x3b0306(0x2a6)&&!isWorkspaceUploadTemporaryName(_0x2744da[_0x3b0306(0x209)]))[_0x3b0306(0x275)](_0x43fba7=>_0x43fba7[_0x3b0306(0x209)])[_0x3b0306(0x2c8)]((_0x45d2f6,_0x12849d)=>_0x45d2f6[_0x3b0306(0x1f9)](_0x12849d)),_0x3ea5c7=_0x55562c===undefined?-0x2*-0x1074+0x819+0x2901*-0x1:_0x343356[_0x3b0306(0x280)](_0xab3ccb=>_0xab3ccb>_0x55562c);if(_0x55562c!==undefined&&_0x3ea5c7===-(0x1*0xa36+0x2078+-0x2aad))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x5b00e3=_0x343356[_0x3b0306(0x23f)](_0x3ea5c7,_0x3ea5c7+_0x3b0da6),_0x23480c=[];for(const _0x326faa of _0x5b00e3){const _0x4ee114=await resolveWorkspaceEntry(_0x4bc497,relative(_0x4bc497,resolve(_0x3ac98e,_0x326faa)),![])[_0x3b0306(0x221)](_0x1e9b3b=>{if(isSkippableWorkspaceEntryError(_0x1e9b3b))return undefined;throw _0x1e9b3b;});if(_0x4ee114===undefined)continue;const _0x18f6dd=await lstat(_0x4ee114)[_0x3b0306(0x221)](_0x167620=>{const _0x3b1040=_0x3b0306;if(_0x167620[_0x3b1040(0x1e3)]===_0x3b1040(0x260))return undefined;throw _0x167620;});if(_0x18f6dd===undefined||!_0x18f6dd[_0x3b0306(0x1bf)]()&&!_0x18f6dd[_0x3b0306(0x1cd)]())continue;_0x23480c[_0x3b0306(0x1f6)]({'path':relative(_0x4bc497,_0x4ee114)[_0x3b0306(0x1eb)](sep)[_0x3b0306(0x223)]('/'),'name':_0x326faa,'kind':_0x18f6dd[_0x3b0306(0x1cd)]()?_0x3b0306(0x298):_0x3b0306(0x1ac),'size':_0x18f6dd[_0x3b0306(0x1bf)]()?_0x18f6dd[_0x3b0306(0x21c)]:null,'modifiedAt':_0x18f6dd[_0x3b0306(0x1e2)]});}const _0x6abd05=_0x343356[_0x3ea5c7+_0x5b00e3[_0x3b0306(0x1c6)]];return{'entries':_0x23480c,'nextCursor':_0x6abd05===undefined||_0x5b00e3[_0x3b0306(0x1c6)]===0x1*-0x1cce+0x1a95+0x239*0x1?null:encodeDirectoryCursor(_0x201467,_0x5b00e3[_0x5b00e3[_0x3b0306(0x1c6)]-(-0x1980+-0x1*0x419+-0x6*-0x4ef)]),'truncated':_0x6abd05!==undefined};}export async function mutateWorkspaceFile(_0x2a2263,_0x3cc229){const _0x33a474=_0x67518d,_0x4823f4=await resolveRegisteredWorkspaceRoot(_0x2a2263);if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1e6)||_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1b8)){const _0x42cddb=await resolveNewWorkspaceEntry(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1e6))await writeFile(_0x42cddb,'',{'flag':'wx'});else await mkdir(_0x42cddb);return{'path':workspaceRelativePath(_0x4823f4,_0x42cddb)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);const _0x51a2c6=await resolveWorkspaceEntryMetadata(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);if(workspaceRelativePath(_0x4823f4,_0x51a2c6[_0x33a474(0x21a)])==='.')throw new Error(_0x33a474(0x27e));if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x253))return await rm(_0x51a2c6[_0x33a474(0x21a)],{'recursive':_0x51a2c6[_0x33a474(0x2b5)][_0x33a474(0x1cd)](),'force':![]}),{'deleted':!![]};const _0x5d5dc4=await resolveNewWorkspaceEntry(_0x4823f4,_0x3cc229[_0x33a474(0x29f)]);if(_0x51a2c6[_0x33a474(0x2b5)][_0x33a474(0x1cd)]()){const _0x1cfc40=relative(_0x51a2c6[_0x33a474(0x21a)],_0x5d5dc4);if(_0x1cfc40===''||!isAbsolute(_0x1cfc40)&&_0x1cfc40!=='..'&&!_0x1cfc40[_0x33a474(0x1b9)]('..'+sep))throw new Error(_0x33a474(0x1ad));}return await rename(_0x51a2c6[_0x33a474(0x21a)],_0x5d5dc4),{'path':workspaceRelativePath(_0x4823f4,_0x5d5dc4)};}async function resolveNewWorkspaceEntry(_0xcf16d7,_0x165934){const _0x459e4c=_0x67518d,_0x546c4c=_0x165934[_0x459e4c(0x254)]('\x5c','/'),_0x3998d7=_0x546c4c[_0x459e4c(0x1eb)]('/'),_0x525525=_0x3998d7['at'](-(0xfaa+-0xc2+-0xee7));if(_0x165934[_0x459e4c(0x1ef)]('\x00')||_0x546c4c[_0x459e4c(0x1b9)]('/')||isAbsolute(_0x165934)||win32[_0x459e4c(0x25c)](_0x546c4c)||_0x525525===undefined||_0x525525[_0x459e4c(0x1c6)]===-0x805+-0x1*0x1325+0x487*0x6||_0x3998d7[_0x459e4c(0x252)](invalidWorkspaceMutationSegment))throw new Error(_0x459e4c(0x1cb));const _0x5531a7=_0x3998d7[_0x459e4c(0x1c6)]===-0x98d+0x1a49+0x10bb*-0x1?'.':_0x3998d7[_0x459e4c(0x23f)](0x20b*0xf+0xae+-0x1f53,-(-0x878*0x1+0x115a*0x2+0x11*-0x18b))[_0x459e4c(0x223)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0xcf16d7,_0x5531a7);const _0x347530=await resolveWorkspaceEntryFromCanonicalRoot(_0xcf16d7,_0x5531a7,!![]),_0x798d86=resolve(_0x347530,_0x525525);try{await lstat(_0x798d86);throw new Error(_0x459e4c(0x1d1));}catch(_0x4cf743){if(_0x4cf743[_0x459e4c(0x1e3)]!==_0x459e4c(0x260))throw _0x4cf743;}return _0x798d86;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x2b9123,_0x31994b){const _0x24859a=_0x67518d,_0x2e64e0=_0x31994b[_0x24859a(0x254)]('\x5c','/');if(_0x2e64e0==='.')return;const _0x2e9871=_0x2e64e0[_0x24859a(0x1eb)]('/');if(_0x31994b[_0x24859a(0x1ef)]('\x00')||_0x2e64e0[_0x24859a(0x1b9)]('/')||isAbsolute(_0x31994b)||win32[_0x24859a(0x25c)](_0x2e64e0)||_0x2e9871[_0x24859a(0x252)](invalidWorkspaceMutationSegment))throw new Error(_0x24859a(0x1cb));let _0x5831dc=_0x2b9123;for(const _0x1a2d5c of _0x2e9871){_0x5831dc=resolve(_0x5831dc,_0x1a2d5c);const _0x387d2b=await lstat(_0x5831dc)[_0x24859a(0x221)](_0x5b3f53=>{const _0x3dff96=_0x24859a;if(_0x5b3f53[_0x3dff96(0x1e3)]===_0x3dff96(0x260))throw new Error(_0x3dff96(0x29d));throw _0x5b3f53;});if(_0x387d2b[_0x24859a(0x1f0)]())throw new Error(_0x24859a(0x1cb));}}function invalidWorkspaceMutationSegment(_0x272ce4){const _0x2c35af=_0x67518d;if(_0x272ce4[_0x2c35af(0x1c6)]===-0x353*-0x6+-0xb9*-0x13+-0x1*0x21ad||_0x272ce4==='.'||_0x272ce4==='..'||_0x272ce4===_0x2c35af(0x2a6))return!![];if(_0x498f63()!==_0x2c35af(0x2c6))return![];const _0x466a6a=_0x272ce4[_0x2c35af(0x1d2)](/[. ]+$/u,'')[_0x2c35af(0x290)]();return/[<>:"|?*]/u[_0x2c35af(0x27d)](_0x272ce4)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x2c35af(0x27d)](_0x466a6a);}function workspaceRelativePath(_0x4d536d,_0x1ad92a){const _0x350e38=_0x67518d,_0x236d80=relative(_0x4d536d,_0x1ad92a)[_0x350e38(0x1eb)](sep)[_0x350e38(0x223)]('/');return _0x236d80[_0x350e38(0x1c6)]===0x49f*0x3+0x2347+-0x2e4*0x11?'.':_0x236d80;}function isSkippableWorkspaceEntryError(_0x48f114){const _0x536a37=_0x67518d;return _0x48f114 instanceof Error&&(_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x1cb)||_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x29d)||_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x1aa));}export async function preflightWorkspaceUpload(_0xcb574f,_0x42d575,_0x59fca6){const _0x41218b=_0x67518d;if(_0x59fca6[_0x41218b(0x1c6)]===-0x1*0x1834+-0x673+0x1ea7||_0x59fca6==='.'||_0x59fca6==='..'||_0x59fca6[_0x41218b(0x1ef)]('\x00')||_0x59fca6[_0x41218b(0x1ef)]('/')||_0x59fca6[_0x41218b(0x1ef)]('\x5c')||isWorkspaceUploadTemporaryName(_0x59fca6))return{'path':'','absolutePath':'','status':_0x41218b(0x1b4)};const _0x2ec258=await resolveRegisteredWorkspaceRoot(_0xcb574f),_0x5bcfad=await resolveWorkspaceEntry(_0x2ec258,_0x42d575,!![]),_0x3db892=resolve(_0x5bcfad,_0x59fca6);if(dirname(_0x3db892)!==_0x5bcfad)throw new Error(_0x41218b(0x1cb));const _0x43c713=relative(_0x2ec258,_0x3db892)[_0x41218b(0x1eb)](sep)[_0x41218b(0x223)]('/'),_0x519e98=await lstat(_0x3db892)[_0x41218b(0x221)](_0x5bf436=>{const _0x30ee25=_0x41218b;if(_0x5bf436[_0x30ee25(0x1e3)]===_0x30ee25(0x260))return undefined;throw _0x5bf436;});if(_0x519e98===undefined)return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x1fd)};if(_0x519e98[_0x41218b(0x1f0)]())throw new Error(_0x41218b(0x1cb));if(_0x519e98[_0x41218b(0x1bf)]())return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x25a)};return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x1f1)};}export function workspaceUploadTemporaryName(_0x310fc1){const _0x376011=_0x67518d;return _0x376011(0x25f)+_0x310fc1+_0x376011(0x1b5);}function isWorkspaceUploadTemporaryName(_0x1b5a44){const _0x14f497=_0x67518d;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0x14f497(0x27d)](_0x1b5a44)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0x14f497(0x27d)](_0x1b5a44);}export async function readWorkspaceTextFile(_0x79817a,_0x539ea8,_0x2ecfc9=-0x15b0+-0x1*-0xc51+0x95f,_0x4be821=FILE_READ_LIMIT){const _0x24c90a=_0x67518d;if(!Number[_0x24c90a(0x24c)](_0x2ecfc9)||_0x2ecfc9<-0x5e6+-0x456+0x2*0x51e||!Number[_0x24c90a(0x24c)](_0x4be821)||_0x4be821<0x1f80+0x1cab+-0x1*0x3c2a||_0x4be821>FILE_READ_LIMIT)throw new Error(_0x24c90a(0x1a4));const _0x420df1=await resolveRegisteredWorkspaceRoot(_0x79817a),_0x1502ce=await resolveWorkspaceEntry(_0x420df1,_0x539ea8,![]),_0x3aa644=await lstat(_0x1502ce);if(!_0x3aa644[_0x24c90a(0x1bf)]())throw new Error(_0x24c90a(0x1aa));if(_0x3aa644[_0x24c90a(0x21c)]>FILE_READ_LIMIT*(0x1683+0x2531+-0x2b6*0x16))throw new Error(_0x24c90a(0x273));const _0x55018d=await readFile(_0x1502ce),_0x39c391=createHash(_0x24c90a(0x2a9))[_0x24c90a(0x200)](_0x55018d)[_0x24c90a(0x214)](_0x24c90a(0x26f)),_0x10389b=_0x55018d[_0x24c90a(0x1ef)](0xb9*-0x6+-0x42*0x89+-0x11a*-0x24)||!isValidUtf8(_0x55018d);if(_0x10389b){const _0x27ac7b=Math[_0x24c90a(0x1d6)](_0x55018d[_0x24c90a(0x1c6)],_0x2ecfc9+_0x4be821),_0x4787f3=_0x55018d[_0x24c90a(0x227)](_0x2ecfc9,_0x27ac7b);return{'path':relative(_0x420df1,_0x1502ce)[_0x24c90a(0x1eb)](sep)[_0x24c90a(0x223)]('/'),'encoding':_0x24c90a(0x287),'size':_0x55018d[_0x24c90a(0x1c6)],'content':_0x4787f3[_0x24c90a(0x1dd)](_0x24c90a(0x287)),'truncated':_0x27ac7b<_0x55018d[_0x24c90a(0x1c6)],'nextOffset':_0x27ac7b<_0x55018d[_0x24c90a(0x1c6)]?_0x27ac7b:null,'revision':_0x39c391};}if(_0x2ecfc9>0x1*-0x674+0x255d*0x1+0x1ee9*-0x1&&_0x2ecfc9<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x2ecfc9]))throw new Error(_0x24c90a(0x1a4));let _0x4add7a=Math[_0x24c90a(0x1d6)](_0x55018d[_0x24c90a(0x1c6)],_0x2ecfc9+_0x4be821);if(_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x4add7a])){while(_0x4add7a>_0x2ecfc9&&isUtf8ContinuationByte(_0x55018d[_0x4add7a]))_0x4add7a-=-0x1208+0x10*-0x6a+-0x3b*-0x6b;if(_0x4add7a===_0x2ecfc9){_0x4add7a+=0x1269+0x140c+-0x2674;while(_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x4add7a]))_0x4add7a+=-0x2*0xaa2+0xfe5+0x560;}}const _0x10fa50=_0x55018d[_0x24c90a(0x227)](_0x2ecfc9,_0x4add7a),_0x586828=new TextDecoder(_0x24c90a(0x203),{'fatal':!![]})[_0x24c90a(0x230)](_0x10fa50),_0x272911=_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]?_0x4add7a:null;return{'path':relative(_0x420df1,_0x1502ce)[_0x24c90a(0x1eb)](sep)[_0x24c90a(0x223)]('/'),'encoding':_0x24c90a(0x203),'size':_0x55018d[_0x24c90a(0x1c6)],'content':_0x586828,'truncated':_0x272911!==null,'nextOffset':_0x272911,'revision':_0x39c391};}export async function writeWorkspaceTextFile(_0x1c541a,_0x56c6ca,_0x373234,_0x383287){const _0x51bb5f=_0x67518d;if(!/^[0-9a-f]{64}$/u[_0x51bb5f(0x27d)](_0x383287))throw new Error(_0x51bb5f(0x23d));const _0x3062f0=Buffer[_0x51bb5f(0x29a)](_0x373234,_0x51bb5f(0x2be));if(_0x3062f0[_0x51bb5f(0x1c6)]>FILE_READ_LIMIT*(0x10*0x7f+-0x1fb1+-0x43*-0x5b))throw new Error(_0x51bb5f(0x273));if(_0x3062f0[_0x51bb5f(0x1ef)](-0x1*-0x1949+0x2f*-0xd2+0x1*0xd45))throw new Error(_0x51bb5f(0x294));const _0x536faa=await resolveRegisteredWorkspaceRoot(_0x1c541a);await assertWorkspaceMutationPathHasNoSymlinks(_0x536faa,_0x56c6ca);const _0x3fc3c6=await resolveWorkspaceEntry(_0x536faa,_0x56c6ca,![]),_0xbb0bd6=await lstat(_0x3fc3c6);if(!_0xbb0bd6[_0x51bb5f(0x1bf)]())throw new Error(_0x51bb5f(0x1aa));const _0x116f80=await readFile(_0x3fc3c6);if(_0x116f80[_0x51bb5f(0x1ef)](-0x1487+0x1*0x1cc3+-0x83c)||!isValidUtf8(_0x116f80))throw new Error(_0x51bb5f(0x294));const _0x3b5526=createHash(_0x51bb5f(0x2a9))[_0x51bb5f(0x200)](_0x116f80)[_0x51bb5f(0x214)](_0x51bb5f(0x26f));if(_0x3b5526!==_0x383287)throw new Error(_0x51bb5f(0x1b3));const _0x597df4=createHash(_0x51bb5f(0x2a9))[_0x51bb5f(0x200)](_0x3062f0)[_0x51bb5f(0x214)](_0x51bb5f(0x26f)),_0x5ee790=resolve(dirname(_0x3fc3c6),_0x51bb5f(0x26d)+randomUUID()+_0x51bb5f(0x1b5));try{await writeFile(_0x5ee790,_0x3062f0,{'flag':'wx','mode':_0xbb0bd6[_0x51bb5f(0x212)]}),await rename(_0x5ee790,_0x3fc3c6);}finally{await rm(_0x5ee790,{'force':!![]})[_0x51bb5f(0x221)](()=>undefined);}return{'path':workspaceRelativePath(_0x536faa,_0x3fc3c6),'revision':_0x597df4,'size':_0x3062f0[_0x51bb5f(0x1c6)]};}export async function readWorkspaceFileContentRange(_0x4136fd,_0x3953b7,_0xc31e8b=0x98b*0x1+-0x9*-0x89+0x72e*-0x2,_0x4369e9=FILE_READ_LIMIT){const _0x2770f4=_0x67518d;if(!Number[_0x2770f4(0x24c)](_0xc31e8b)||_0xc31e8b<0x949*-0x3+-0x1*-0x121f+0x4de*0x2||!Number[_0x2770f4(0x24c)](_0x4369e9)||_0x4369e9<0xa9b*-0x1+-0x8d*-0x1e+-0x2f5*0x2||_0x4369e9>FILE_READ_LIMIT)throw new Error(_0x2770f4(0x1a4));const _0x39d4f1=await resolveRegisteredWorkspaceRoot(_0x4136fd),_0x544f61=await resolveWorkspaceEntry(_0x39d4f1,_0x3953b7,![]),_0x12448d=await lstat(_0x544f61);if(!_0x12448d[_0x2770f4(0x1bf)]())throw new Error(_0x2770f4(0x1aa));if(_0xc31e8b>_0x12448d[_0x2770f4(0x21c)])throw new Error(_0x2770f4(0x1a4));const _0x3fcf3a=Math[_0x2770f4(0x1d6)](_0x4369e9,_0x12448d[_0x2770f4(0x21c)]-_0xc31e8b),_0x544575=Buffer[_0x2770f4(0x213)](_0x3fcf3a),_0x2df91c=await open(_0x544f61,'r');try{const {bytesRead:_0x285875}=await _0x2df91c[_0x2770f4(0x1ff)](_0x544575,0x4f5*-0x6+-0x1*0x1075+0x2e33,_0x3fcf3a,_0xc31e8b),_0x48f266=_0xc31e8b+_0x285875;return{'path':relative(_0x39d4f1,_0x544f61)[_0x2770f4(0x1eb)](sep)[_0x2770f4(0x223)]('/'),'size':_0x12448d[_0x2770f4(0x21c)],'offset':_0xc31e8b,'contentBase64':_0x544575[_0x2770f4(0x227)](0x8*-0x2dd+0xe3a+0x16*0x65,_0x285875)[_0x2770f4(0x1dd)](_0x2770f4(0x287)),'nextOffset':_0x48f266<_0x12448d[_0x2770f4(0x21c)]?_0x48f266:null};}finally{await _0x2df91c[_0x2770f4(0x232)]();}}export async function readAllowedFileContentRange(_0x4b091c,_0x4a7853,_0x5267e5=0x3*-0xc4c+0x258a+-0xa6*0x1,_0x1b8f6a=FILE_READ_LIMIT){const _0x3a6028=_0x67518d;if(!Number[_0x3a6028(0x24c)](_0x5267e5)||_0x5267e5<0x1*-0xe5a+-0x9b+0xef5||!Number[_0x3a6028(0x24c)](_0x1b8f6a)||_0x1b8f6a<0x158b+-0x85b+0x2d*-0x4b||_0x1b8f6a>FILE_READ_LIMIT)throw new Error(_0x3a6028(0x1a4));const {file:_0x194e7a,metadata:_0x102b50}=await resolveAllowedFile(_0x4b091c,_0x4a7853);if(_0x5267e5>_0x102b50[_0x3a6028(0x21c)])throw new Error(_0x3a6028(0x1a4));const _0xd36e40=Math[_0x3a6028(0x1d6)](_0x1b8f6a,_0x102b50[_0x3a6028(0x21c)]-_0x5267e5),_0x48777e=Buffer[_0x3a6028(0x213)](_0xd36e40),_0x5f51ae=await open(_0x194e7a,'r');try{const {bytesRead:_0x25ba6c}=await _0x5f51ae[_0x3a6028(0x1ff)](_0x48777e,0x1521*0x1+-0x3a*0xa9+-0x1129*-0x1,_0xd36e40,_0x5267e5),_0x20ad36=_0x5267e5+_0x25ba6c;return{'path':_0x194e7a,'size':_0x102b50[_0x3a6028(0x21c)],'offset':_0x5267e5,'contentBase64':_0x48777e[_0x3a6028(0x227)](0x1fe5+-0x21e0+0x1fb,_0x25ba6c)[_0x3a6028(0x1dd)](_0x3a6028(0x287)),'nextOffset':_0x20ad36<_0x102b50[_0x3a6028(0x21c)]?_0x20ad36:null};}finally{await _0x5f51ae[_0x3a6028(0x232)]();}}export async function readAllowedTextFile(_0x192c99,_0x7f4193,_0x514492=-0x17f*-0x2+0x517*0x3+-0x5*0x3a7,_0x253a58=FILE_READ_LIMIT){const _0x3ebecf=_0x67518d,{file:_0x1466ae,metadata:_0x2f096f}=await resolveAllowedFile(_0x192c99,_0x7f4193);if(_0x2f096f[_0x3ebecf(0x21c)]>FILE_READ_LIMIT*(0x49*0x4f+-0x722+-0xf55))throw new Error(_0x3ebecf(0x273));if(!Number[_0x3ebecf(0x24c)](_0x514492)||_0x514492<0x1f2*0x5+0x1a54+-0x163*0x1a||!Number[_0x3ebecf(0x24c)](_0x253a58)||_0x253a58<-0x6c*-0x7+-0x134d+-0x2e*-0x5b||_0x253a58>FILE_READ_LIMIT)throw new Error(_0x3ebecf(0x1a4));const _0x35ed75=await readFile(_0x1466ae),_0x42d51c=_0x35ed75[_0x3ebecf(0x1ef)](-0x2*0x11f+0x5ae*0x2+-0x91e)||!isValidUtf8(_0x35ed75),_0x9552a4=Math[_0x3ebecf(0x1d6)](_0x35ed75[_0x3ebecf(0x1c6)],_0x514492+_0x253a58);if(_0x42d51c){const _0x5af87f=_0x35ed75[_0x3ebecf(0x227)](_0x514492,_0x9552a4);return{'path':_0x1466ae,'encoding':_0x3ebecf(0x287),'size':_0x35ed75[_0x3ebecf(0x1c6)],'content':_0x5af87f[_0x3ebecf(0x1dd)](_0x3ebecf(0x287)),'truncated':_0x9552a4<_0x35ed75[_0x3ebecf(0x1c6)],'nextOffset':_0x9552a4<_0x35ed75[_0x3ebecf(0x1c6)]?_0x9552a4:null};}if(_0x514492>-0xaf1+-0xce*-0x16+0x241*-0x3&&_0x514492<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x514492]))throw new Error(_0x3ebecf(0x1a4));let _0x506567=_0x9552a4;if(_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x506567])){while(_0x506567>_0x514492&&isUtf8ContinuationByte(_0x35ed75[_0x506567]))_0x506567-=0x1a1*0x9+-0x788+-0x4*0x1c8;if(_0x506567===_0x514492){_0x506567+=-0x1fed+0x1*-0xa22+-0x542*-0x8;while(_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x506567]))_0x506567+=0x1*0xf21+0x1*0x12b9+0x21d9*-0x1;}}const _0x334627=_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]?_0x506567:null;return{'path':_0x1466ae,'encoding':_0x3ebecf(0x203),'size':_0x35ed75[_0x3ebecf(0x1c6)],'content':new TextDecoder(_0x3ebecf(0x203),{'fatal':!![]})[_0x3ebecf(0x230)](_0x35ed75[_0x3ebecf(0x227)](_0x514492,_0x506567)),'truncated':_0x334627!==null,'nextOffset':_0x334627};}export function normalizeFilePreviewPath(_0x293246){const _0x18eb8d=_0x67518d;if(!/^sandbox:/iu[_0x18eb8d(0x27d)](_0x293246))return _0x293246;let _0x218fd2;try{_0x218fd2=decodeURIComponent(_0x293246[_0x18eb8d(0x23f)](_0x293246[_0x18eb8d(0x292)](':')+(0x35e*0x7+-0xb63+-0xc2e)));}catch{throw new Error(_0x18eb8d(0x1cb));}const _0x4fb340=_0x218fd2[_0x18eb8d(0x1d2)](/^\/([a-z]:[\\/])/iu,'$1');if(_0x4fb340[_0x18eb8d(0x1c6)]===0x1d*0xd7+-0x3*-0x1fd+-0x1e52||/^[\\/]{2,}[?.](?:[\\/]|$)/u[_0x18eb8d(0x27d)](_0x218fd2)||!isAbsolute(_0x4fb340)&&!win32[_0x18eb8d(0x25c)](_0x4fb340)||_0x4fb340[_0x18eb8d(0x1ef)]('\x00')||_0x4fb340[_0x18eb8d(0x1ef)]('?')||_0x4fb340[_0x18eb8d(0x1ef)]('#'))throw new Error(_0x18eb8d(0x1cb));return _0x4fb340;}async function resolveAllowedFile(_0x757e5b,_0x5f58ea){const _0x3420f7=_0x67518d;if(!isAbsolute(_0x757e5b))throw new Error(_0x3420f7(0x1cb));const _0x2a15ec=await realpath(_0x757e5b)[_0x3420f7(0x221)](_0x183a69=>{const _0x43f0da=_0x3420f7;if(_0x183a69[_0x43f0da(0x1e3)]===_0x43f0da(0x260))throw new Error(_0x43f0da(0x29d));throw _0x183a69;}),_0x40455b=await Promise[_0x3420f7(0x269)](_0x5f58ea[_0x3420f7(0x275)](_0x419775=>realpath(_0x419775)));if(!isWithinAllowedRoot(_0x2a15ec,_0x40455b))throw new Error(_0x3420f7(0x1cb));const _0x2f07b0=await lstat(_0x2a15ec);if(!_0x2f07b0[_0x3420f7(0x1bf)]())throw new Error(_0x3420f7(0x1aa));return{'file':_0x2a15ec,'metadata':_0x2f07b0};}function isValidUtf8(_0x9a8fa9){const _0x1d2b6=_0x67518d;try{return new TextDecoder(_0x1d2b6(0x203),{'fatal':!![]})[_0x1d2b6(0x230)](_0x9a8fa9),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x4f6e58){return(_0x4f6e58&-0x10f1*-0x2+-0xb50+-0x26*0x93)===-0xb08+0x36+-0xa1*-0x12;}export async function searchWorkspaceFiles(_0x3bb75e,_0xeec753,_0x397e5e,_0x317d8b=SEARCH_RESULT_LIMIT,_0x2c41fa=![]){const _0xec686=_0x67518d,_0x194aaa=new WorkspaceFileIndex(_0x3bb75e);try{return await _0x194aaa[_0xec686(0x278)](_0xeec753,_0x397e5e,_0x317d8b,_0x2c41fa);}finally{_0x194aaa[_0xec686(0x1c0)]();}}async function resolveRegisteredWorkspaceRoot(_0x3e3c78){const _0x2a841e=_0x67518d,_0x1c7932=await realpath(_0x3e3c78);if(normalizeWorkspacePath(_0x1c7932)!==normalizeWorkspacePath(_0x3e3c78))throw new Error(_0x2a841e(0x1e9));return _0x1c7932;}async function resolveWorkspaceEntry(_0x2c3cbb,_0x7f59f0,_0x8c6669){const _0x4a00d4=await resolveRegisteredWorkspaceRoot(_0x2c3cbb);return resolveWorkspaceEntryFromCanonicalRoot(_0x4a00d4,_0x7f59f0,_0x8c6669);}function _0x4bb8(_0x4eb3cc,_0x4ed1f5){_0x4eb3cc=_0x4eb3cc-(-0xc5*-0x1+-0x223+0x4d*0xa);const _0x591490=_0x537c();let _0x4ec3b3=_0x591490[_0x4eb3cc];if(_0x4bb8['ecaKKI']===undefined){var _0x4d0195=function(_0x14ce7f){const _0xc7071a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ae36c='',_0x389563='';for(let _0x1d2319=0x1*-0x21a7+0x963+0x2*0xc22,_0x3b6c41,_0x15b0ff,_0x29110d=-0x1*-0xd06+0x2423+0x347*-0xf;_0x15b0ff=_0x14ce7f['charAt'](_0x29110d++);~_0x15b0ff&&(_0x3b6c41=_0x1d2319%(0x12d+-0x1378+0x124f)?_0x3b6c41*(0x10be+-0x1*-0x1462+0x24e*-0x10)+_0x15b0ff:_0x15b0ff,_0x1d2319++%(-0x1*0x508+0x1416+0x785*-0x2))?_0x1ae36c+=String['fromCharCode'](0x2256+-0x1867*0x1+-0x8f0&_0x3b6c41>>(-(-0x398+-0x21d7*-0x1+-0x1e3d)*_0x1d2319&0x15ef+-0xc29+0x34*-0x30)):0x17f5*-0x1+-0x5bf+0x1*0x1db4){_0x15b0ff=_0xc7071a['indexOf'](_0x15b0ff);}for(let _0x4f75df=-0x1bc5+-0x2*0xcbf+-0x2d*-0x12f,_0x5a58b2=_0x1ae36c['length'];_0x4f75df<_0x5a58b2;_0x4f75df++){_0x389563+='%'+('00'+_0x1ae36c['charCodeAt'](_0x4f75df)['toString'](-0x1*-0x1841+-0xe2d+0x4*-0x281))['slice'](-(0x4*0x5b0+-0x1b95+0x4d7));}return decodeURIComponent(_0x389563);};_0x4bb8['YkgbPQ']=_0x4d0195,_0x4bb8['tvBYGw']={},_0x4bb8['ecaKKI']=!![];}const _0x4e769d=_0x591490[-0x3*-0xa1b+-0x25e5+-0x5*-0x184];_0x4bb8['EkcmCC']!==_0x4e769d&&(_0x4bb8['tvBYGw']={},_0x4bb8['EkcmCC']=_0x4e769d);const _0x20929a=_0x4bb8['tvBYGw'][_0x4eb3cc];return _0x20929a===undefined?(_0x4ec3b3=_0x4bb8['YkgbPQ'](_0x4ec3b3),_0x4bb8['tvBYGw'][_0x4eb3cc]=_0x4ec3b3):_0x4ec3b3=_0x20929a,_0x4ec3b3;}async function resolveWorkspaceEntryFromCanonicalRoot(_0x3c18d2,_0x36fbbf,_0xa992f7){const _0x490418=_0x67518d,_0x202efa=await resolveWorkspaceEntryMetadata(_0x3c18d2,_0x36fbbf);if(_0xa992f7?!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1cd)]():!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1bf)]()&&!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1cd)]())throw new Error(_0xa992f7?_0x490418(0x1fa):_0x490418(0x1aa));return _0x202efa[_0x490418(0x21a)];}async function resolveWorkspaceEntryMetadata(_0x25b3bc,_0x55c0fd){const _0x42b9ff=_0x67518d;if(_0x55c0fd[_0x42b9ff(0x1ef)]('\x00')||_0x55c0fd[_0x42b9ff(0x1c6)]===-0x1a5*-0x7+-0x2f*-0xc7+-0x6*0x802||_0x55c0fd[_0x42b9ff(0x1b9)]('/')||_0x55c0fd[_0x42b9ff(0x1b9)]('\x5c'))throw new Error(_0x42b9ff(0x1cb));const _0xfbc209=_0x55c0fd[_0x42b9ff(0x254)]('\x5c','/');if(_0xfbc209[_0x42b9ff(0x1eb)]('/')[_0x42b9ff(0x252)](_0x3e3c54=>_0x3e3c54==='..'||_0x3e3c54===_0x42b9ff(0x2a6)))throw new Error(_0x42b9ff(0x1cb));let _0xcced74;try{_0xcced74=await realpath(resolve(_0x25b3bc,_0xfbc209));}catch(_0x485a92){if(_0x485a92[_0x42b9ff(0x1e3)]===_0x42b9ff(0x260))throw new Error(_0x42b9ff(0x29d));throw _0x485a92;}const _0x13c4e4=relative(_0x25b3bc,_0xcced74);if(isAbsolute(_0x13c4e4)||_0x13c4e4[_0x42b9ff(0x1b9)]('..')||_0x13c4e4==='..'||_0x13c4e4[_0x42b9ff(0x1b9)]('..'+sep))throw new Error(_0x42b9ff(0x1cb));const _0x2b40ef=await lstat(_0xcced74);return{'path':_0xcced74,'metadata':_0x2b40ef};}async function inspectWorkspaceIndexEntry(_0x2a1d96,_0x35f69e,_0xf958f5){const _0x42618a=_0x67518d;try{const _0x2a5743=await resolveWorkspaceEntryMetadata(_0x2a1d96,_0x35f69e);if(!_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1bf)]()&&!_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1cd)]())return undefined;const _0xd77873=relative(_0x2a1d96,_0x2a5743[_0x42618a(0x21a)])[_0x42618a(0x1eb)](sep)[_0x42618a(0x223)]('/');return _0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1cd)]()?{'path':_0xd77873,'name':_0xf958f5,'kind':_0x42618a(0x298),'size':null,'modifiedAt':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1e2)]}:{'path':_0xd77873,'name':_0xf958f5,'kind':_0x42618a(0x1ac),'size':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x21c)],'modifiedAt':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1e2)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x196062,_0x383f7d){const _0x36d621=_0x67518d;return Buffer[_0x36d621(0x29a)](JSON[_0x36d621(0x1a9)]({'path':_0x196062,'name':_0x383f7d}))[_0x36d621(0x1dd)](_0x36d621(0x288));}function decodeDirectoryCursor(_0x45371e,_0xa4e593){const _0x114a20=_0x67518d;if(_0x45371e===undefined)return undefined;try{const _0x123567=JSON[_0x114a20(0x283)](Buffer[_0x114a20(0x29a)](_0x45371e,_0x114a20(0x288))[_0x114a20(0x1dd)](_0x114a20(0x2be)));if(typeof _0x123567!==_0x114a20(0x1ec)||_0x123567===null||_0x123567[_0x114a20(0x21a)]!==_0xa4e593||typeof _0x123567[_0x114a20(0x209)]!==_0x114a20(0x1f4))throw new Error();return _0x123567[_0x114a20(0x209)];}catch{throw new Error(_0x114a20(0x1bc));}}function encodeSearchCursor(_0x4504ef,_0x4305b0){const _0x2c24f2=_0x67518d;return Buffer[_0x2c24f2(0x29a)](JSON[_0x2c24f2(0x1a9)]({'query':_0x4504ef,'path':_0x4305b0}))[_0x2c24f2(0x1dd)](_0x2c24f2(0x288));}function decodeSearchCursor(_0x24ce8f,_0x574477){const _0x8b4542=_0x67518d;if(_0x24ce8f===undefined)return undefined;try{const _0x1b8ea5=JSON[_0x8b4542(0x283)](Buffer[_0x8b4542(0x29a)](_0x24ce8f,_0x8b4542(0x288))[_0x8b4542(0x1dd)](_0x8b4542(0x2be)));if(typeof _0x1b8ea5!==_0x8b4542(0x1ec)||_0x1b8ea5===null||_0x1b8ea5[_0x8b4542(0x251)]!==_0x574477||typeof _0x1b8ea5[_0x8b4542(0x21a)]!==_0x8b4542(0x1f4))throw new Error();return _0x1b8ea5[_0x8b4542(0x21a)];}catch{throw new Error(_0x8b4542(0x1bc));}}export function normalizeWorkspacePath(_0x170cfd,_0x2d182b=_0x498f63()){const _0x237c64=_0x67518d;if(_0x170cfd[_0x237c64(0x1c6)]===-0x4ec+0xda*-0x1e+0x2*0xf3c||_0x170cfd[_0x237c64(0x1ef)]('\u0000'))throw new Error(_0x237c64(0x1a5));if(_0x2d182b===_0x237c64(0x2c6)){if(/^\\\\[?.]/[_0x237c64(0x27d)](_0x170cfd))throw new Error(_0x237c64(0x28f));const _0x40d8d6=win32[_0x237c64(0x285)](_0x170cfd[_0x237c64(0x254)]('/','\x5c'));if(!win32[_0x237c64(0x25c)](_0x40d8d6))throw new Error(_0x237c64(0x1ce));return _0x40d8d6[_0x237c64(0x1d2)](/\\+$/,'')[_0x237c64(0x1a7)]();}if(_0x2d182b!==_0x237c64(0x2a7))throw new Error(_0x237c64(0x27f));const _0x538449=posix[_0x237c64(0x285)](_0x170cfd);if(!posix[_0x237c64(0x25c)](_0x538449))throw new Error(_0x237c64(0x1ce));return _0x538449==='/'?_0x538449:_0x538449[_0x237c64(0x1d2)](/\/+$/,'');}export function isWithinAllowedRoot(_0x1a29cd,_0x97f32b,_0x140ae2=_0x498f63()){const _0x2a8134=_0x67518d,_0x5405ea=normalizeWorkspacePath(_0x1a29cd,_0x140ae2),_0xdad8d3=_0x140ae2===_0x2a8134(0x2c6)?win32:posix;return _0x97f32b[_0x2a8134(0x252)](_0x375c02=>{const _0x368a0c=_0x2a8134,_0x2dc824=normalizeWorkspacePath(_0x375c02,_0x140ae2),_0x5835be=_0xdad8d3[_0x368a0c(0x2aa)](_0x2dc824,_0x5405ea);return _0x5835be===''||!_0x5835be[_0x368a0c(0x1b9)]('..')&&!_0xdad8d3[_0x368a0c(0x25c)](_0x5835be);});}export async function inspectWorkspace(_0x3a05cb,_0x8242ff){const _0x1c7358=_0x67518d,_0x361fb5=await realpath(_0x3a05cb),_0x18c5e5=await Promise[_0x1c7358(0x269)](_0x8242ff[_0x1c7358(0x275)](_0x51cb92=>realpath(_0x51cb92))),_0x4f75ae=await stat(_0x361fb5);if(!_0x4f75ae[_0x1c7358(0x1cd)]()||!isWithinAllowedRoot(_0x361fb5,_0x18c5e5))throw new Error(_0x1c7358(0x1e9));try{const _0x58168e=await readGitSummary(_0x361fb5);return{'path':_0x361fb5,'kind':_0x1c7358(0x215),'gitSummary':_0x58168e};}catch(_0xd1249a){if(_0xd1249a instanceof GitCommandError&&_0xd1249a[_0x1c7358(0x1e3)]===-0xe*0xef+-0xe5c+0x11e*0x19||isGitUnavailable(_0xd1249a))return{'path':_0x361fb5,'kind':_0x1c7358(0x298)};throw _0xd1249a;}}export async function readGitSummary(_0x5e4c72){const _0x402ee2=_0x67518d,_0x3e6882=(await runReadOnlyGit(_0x5e4c72,[_0x402ee2(0x240),_0x402ee2(0x1b2)]))[_0x402ee2(0x247)][_0x402ee2(0x25d)](),_0x3b76ed=await runReadOnlyGitAllowFailure(_0x5e4c72,[_0x402ee2(0x240),_0x402ee2(0x235),_0x402ee2(0x1c1)]),_0x11662d=await runReadOnlyGitAllowFailure(_0x5e4c72,[_0x402ee2(0x22d),_0x402ee2(0x22a),_0x402ee2(0x250),_0x402ee2(0x1c1)]),_0x4ee619={'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT},_0x3b523a=await runReadOnlyGit(_0x5e4c72,[_0x402ee2(0x220),_0x402ee2(0x2a8)],_0x4ee619);return{'commonDir':_0x3e6882,'head':_0x3b76ed[_0x402ee2(0x1e3)]===-0x1e29*0x1+-0x98+0x1ec1?_0x3b76ed[_0x402ee2(0x247)][_0x402ee2(0x25d)]():'','branch':_0x11662d[_0x402ee2(0x1e3)]===-0xc61*0x1+0xa8*0x3b+0x1*-0x1a57?_0x11662d[_0x402ee2(0x247)][_0x402ee2(0x25d)]():null,'dirty':_0x3b523a[_0x402ee2(0x2a4)][_0x402ee2(0x1c6)]>-0x1*0x110b+0x507*-0x7+0x343c,'snapshot':summarizeText(_0x3b523a[_0x402ee2(0x247)])};}export function assertSafeGitRef(_0xd18e54){const _0x30ddb0=_0x67518d;if(!REF_PATTERN[_0x30ddb0(0x27d)](_0xd18e54))throw new Error(_0x30ddb0(0x1fb));}export async function readRestrictedDiff(_0x1f24fe,_0x5f0f24,_0x50c3b7){const _0x169b2e=_0x67518d;assertSafeGitRef(_0x5f0f24),assertSafeGitRef(_0x50c3b7);const _0x2d232e=await runReadOnlyGit(_0x1f24fe,[_0x169b2e(0x20c),_0x169b2e(0x1c8),_0x169b2e(0x20d),_0x5f0f24,_0x50c3b7]),_0x36a70f=_0x2d232e[_0x169b2e(0x2a4)][_0x169b2e(0x1ef)](0x1*0xa2b+-0x734*0x1+-0x2f7)||_0x2d232e[_0x169b2e(0x247)][_0x169b2e(0x1ef)](_0x169b2e(0x226));if(_0x36a70f)return{'binary':!![],'summary':_0x169b2e(0x1e4)+createHash(_0x169b2e(0x2a9))[_0x169b2e(0x200)](_0x2d232e[_0x169b2e(0x2a4)])[_0x169b2e(0x214)](_0x169b2e(0x26f))+_0x169b2e(0x282)+_0x2d232e[_0x169b2e(0x2a4)][_0x169b2e(0x1c6)],'truncated':_0x2d232e[_0x169b2e(0x23e)]};return{'binary':![],'text':_0x2d232e[_0x169b2e(0x247)],'truncated':_0x2d232e[_0x169b2e(0x23e)]};}function currentBranchFromStatusHeader(_0x11975b){const _0x5ab548=_0x67518d,_0x3fb951=_0x11975b[_0x5ab548(0x23f)](-0xb74+0x203c+-0x14c5);if(_0x3fb951[_0x5ab548(0x1b9)](_0x5ab548(0x1be)))return null;const _0x396f2c=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x5ab548(0x22e)](_0x3fb951);if(_0x396f2c!==null)return _0x396f2c[-0x2*0xc38+0x7*-0x18b+0x233e]??null;return _0x3fb951[_0x5ab548(0x1eb)](_0x5ab548(0x245))[-0x2d*0xbf+0x2*-0x83+0x2299]?.[_0x5ab548(0x1eb)]('\x20')[-0x1*-0x96d+0x1*0x2668+-0x4f*0x9b]??null;}export async function readCurrentChangesSummary(_0x2aa641){const _0x205e84=_0x67518d,_0x2a92a4=await runReadOnlyGit(_0x2aa641,[_0x205e84(0x220),_0x205e84(0x2a8),'-z',_0x205e84(0x26b),_0x205e84(0x248)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x2abd80=_0x2a92a4[_0x205e84(0x247)][_0x205e84(0x1eb)]('\x00'),_0x1ad2e7=_0x2abd80[_0x205e84(0x23c)]()??'',_0x2859c5=[];for(let _0xb96f22=0x30b*-0x3+-0x161e+-0x1f3f*-0x1;_0xb96f22<_0x2abd80[_0x205e84(0x1c6)];_0xb96f22+=-0x1947*-0x1+0x1*0x1982+-0x32c8){const _0x20391b=_0x2abd80[_0xb96f22];if(_0x20391b[_0x205e84(0x1c6)]<0x1dc5+0x1327+-0x30e8)continue;const _0x31ae38=_0x20391b[-0x1070+0x2c*0x3d+-0x7f*-0xc],_0x3993b0=_0x20391b[0x1e7d*0x1+-0x22d*-0x7+-0x2db7],_0x1759d3=_0x20391b[_0x205e84(0x23f)](-0x3d*-0x14+-0x7*-0x2fb+-0x199e);if(_0x31ae38==='?'&&_0x3993b0==='?'){_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x29b),'change':_0x205e84(0x297)});continue;}_0x31ae38!=='\x20'&&_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x20e),'change':gitChange(_0x31ae38)});_0x3993b0!=='\x20'&&_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x26c),'change':gitChange(_0x3993b0)});if(_0x31ae38==='R'||_0x31ae38==='C'||_0x3993b0==='R'||_0x3993b0==='C')_0xb96f22+=-0x26a6+0x78e+0x1f19*0x1;}return{'branch':_0x1ad2e7[_0x205e84(0x1b9)](_0x205e84(0x2a0))?currentBranchFromStatusHeader(_0x1ad2e7):null,'changes':_0x2859c5};}export async function listInitializedSubmodulePaths(_0x24f712){const _0x441019=_0x67518d,_0x4de737=await runReadOnlyGit(_0x24f712,[_0x441019(0x1d0),_0x441019(0x220),_0x441019(0x219)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x4de737[_0x441019(0x247)][_0x441019(0x1eb)](/\r?\n/)[_0x441019(0x2b0)](_0x3dbf67=>{const _0xcdb049=_0x441019;if(_0x3dbf67[_0xcdb049(0x1c6)]<-0x3a*0x85+-0x1a48*0x1+0x354*0x11)return[];const _0x46c8f1=_0x3dbf67[0x114+-0x43*-0x43+-0x129d];if(_0x46c8f1==='-')return[];const _0x1b898c=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0xcdb049(0x22e)](_0x3dbf67),_0x474f07=_0x1b898c?.[0xd*0xf8+0x1540+-0x21d7]?.[_0xcdb049(0x254)]('\x5c','/');return _0x474f07===undefined||_0x474f07[_0xcdb049(0x1c6)]===0x3b*-0x9f+-0x22af+0x4754*0x1?[]:[_0x474f07];})[_0x441019(0x2c8)]((_0x3e70ba,_0x4a371b)=>_0x3e70ba[_0x441019(0x1f9)](_0x4a371b));}export async function resolveGitRepository(_0x4e5e23,_0x18d397,_0x3dce04){const _0x259fd1=_0x67518d,_0x55e69e=await realpath(_0x4e5e23);if(_0x18d397[_0x259fd1(0x1c6)]===0x1*0x1e19+-0x236c+0x553)return _0x55e69e;if(_0x18d397[_0x259fd1(0x1ef)]('\x00')||_0x18d397[_0x259fd1(0x1b9)]('/')||_0x18d397[_0x259fd1(0x1b9)]('\x5c')||_0x18d397[_0x259fd1(0x1eb)]('/')[_0x259fd1(0x252)](_0x1039e0=>_0x1039e0[_0x259fd1(0x1c6)]===-0x2*0x7ce+-0x4*0x243+0x18a8||_0x1039e0==='.'||_0x1039e0==='..'))throw new Error(_0x259fd1(0x218));try{const _0x3fe054=resolve(_0x55e69e,_0x18d397),_0x32541c=await realpath(_0x3fe054);if(normalizeWorkspacePath(_0x3fe054)!==normalizeWorkspacePath(_0x32541c)||!isWithinAllowedRoot(_0x32541c,[_0x55e69e]))throw new Error(_0x259fd1(0x2b6));if(_0x3dce04!==undefined){if(!_0x3dce04[_0x259fd1(0x1ef)](_0x18d397))throw new Error(_0x259fd1(0x2b6));return _0x32541c;}return await assertGitSuperprojectChain(_0x55e69e,_0x32541c),_0x32541c;}catch{throw new Error(_0x259fd1(0x218));}}async function assertGitSuperprojectChain(_0x649d3a,_0x49cc22){const _0xcbc349=_0x67518d,_0x5267a2=normalizeWorkspacePath(_0x649d3a);let _0x1ae0f5=_0x49cc22;const _0x274645=new Set();for(let _0x95888c=-0x20e8+-0x165a*0x1+0x3742;_0x95888c<-0xd92+-0xbf1*0x3+0x31a5;_0x95888c+=0x20e+0xe7c+0x33*-0x53){const _0x59b2a8=normalizeWorkspacePath(_0x1ae0f5);if(_0x59b2a8===_0x5267a2)return;if(_0x274645[_0xcbc349(0x205)](_0x59b2a8))throw new Error(_0xcbc349(0x2b6));_0x274645[_0xcbc349(0x261)](_0x59b2a8);const _0x5d5bf3=await runReadOnlyGit(_0x1ae0f5,[_0xcbc349(0x240),_0xcbc349(0x279),_0xcbc349(0x1da)]),[_0x293760,_0x10e9d9]=_0x5d5bf3[_0xcbc349(0x247)][_0xcbc349(0x1eb)](/\r?\n/);if(_0x293760===undefined||_0x10e9d9===undefined||_0x10e9d9[_0xcbc349(0x1c6)]===0x119*0xa+0x1c09*0x1+0x2703*-0x1)throw new Error(_0xcbc349(0x2b6));const _0x560888=await realpath(_0x293760),_0x480729=await realpath(_0x10e9d9);if(normalizeWorkspacePath(_0x560888)!==_0x59b2a8||normalizeWorkspacePath(_0x480729)===_0x59b2a8||!isWithinAllowedRoot(_0x480729,[_0x649d3a])||!isWithinAllowedRoot(_0x1ae0f5,[_0x480729]))throw new Error(_0xcbc349(0x2b6));_0x1ae0f5=_0x480729;}throw new Error(_0xcbc349(0x2b6));}export async function listGitHistoryRefs(_0x5768db){const _0x2c749f=_0x67518d,_0x41231b=await runReadOnlyGit(_0x5768db,[_0x2c749f(0x299),_0x2c749f(0x289),_0x2c749f(0x29c),_0x2c749f(0x222)],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x41231b[_0x2c749f(0x247)][_0x2c749f(0x1eb)](/\r?\n/)[_0x2c749f(0x2b0)](_0x3c0c0f=>{const _0xd733eb=_0x2c749f,[_0x3389f6,_0x48aad8,_0x3d8a28,_0x129f9d,_0x5386d2]=_0x3c0c0f[_0xd733eb(0x1eb)]('\x09');if(_0x3389f6===undefined||_0x48aad8===undefined||_0x3d8a28===undefined||_0x5386d2===undefined||_0x5386d2[_0xd733eb(0x1c6)]>-0x8*-0x3f2+0x252+0x2*-0x10f1||!/^[0-9a-f]{40,64}$/[_0xd733eb(0x27d)](_0x3d8a28))return[];const _0x3ef399=_0x3389f6[_0xd733eb(0x1b9)](_0xd733eb(0x258))?_0xd733eb(0x204):_0x3389f6[_0xd733eb(0x1b9)](_0xd733eb(0x2ad))?_0xd733eb(0x24b):undefined;return _0x3ef399===undefined?[]:[{'name':_0x3389f6,'displayName':_0x48aad8,'kind':_0x3ef399,'hash':_0x3d8a28,'current':_0x129f9d==='*'}];})[_0x2c749f(0x2c8)]((_0x59e8a1,_0x412b1a)=>_0x59e8a1[_0x2c749f(0x1f8)][_0x2c749f(0x1f9)](_0x412b1a[_0x2c749f(0x1f8)])||_0x59e8a1[_0x2c749f(0x281)][_0x2c749f(0x1f9)](_0x412b1a[_0x2c749f(0x281)]));}function selectedHistoryRefs(_0xa0b927,_0x3f1e1b){const _0x377dbf=_0x67518d;if(_0x3f1e1b===undefined||_0x3f1e1b[_0x377dbf(0x1c6)]===-0x1*0x1199+-0x25a0+0x1*0x3739)return _0xa0b927;const _0xfff8a4=[...new Set(_0x3f1e1b)],_0x37b18a=_0xfff8a4[_0x377dbf(0x275)](_0xee1e93=>_0xa0b927[_0x377dbf(0x1ea)](_0x47e4cc=>_0x47e4cc[_0x377dbf(0x209)]===_0xee1e93));if(_0x37b18a[_0x377dbf(0x252)](_0x4adaf9=>_0x4adaf9===undefined))throw new Error(_0x377dbf(0x1d5));return _0x37b18a;}function historyCursor(_0xc20a4c,_0x182600){const _0x2d3026=_0x67518d;return Buffer[_0x2d3026(0x29a)](JSON[_0x2d3026(0x1a9)]({'offset':_0xc20a4c,'fingerprint':_0x182600}))[_0x2d3026(0x1dd)](_0x2d3026(0x288));}function parseHistoryCursor(_0xf99dc3,_0x39051f){const _0x250379=_0x67518d;if(_0xf99dc3===undefined)return-0x1872+0x7f7*-0x2+0x2860;try{const _0x51f751=JSON[_0x250379(0x283)](Buffer[_0x250379(0x29a)](_0xf99dc3,_0x250379(0x288))[_0x250379(0x1dd)](_0x250379(0x2be)));if(!Number[_0x250379(0x259)](_0x51f751[_0x250379(0x1f2)])||_0x51f751[_0x250379(0x1f2)]<-0xccf+-0x1d6b+0x2a3a||_0x51f751[_0x250379(0x2b2)]!==_0x39051f)throw new Error(_0x250379(0x2b6));return _0x51f751[_0x250379(0x1f2)];}catch{throw new Error(_0x250379(0x1c4));}}export async function readGitHistory(_0x2e217e,_0x503de7){const _0x509e6a=_0x67518d,_0x4248f9=await listGitHistoryRefs(_0x2e217e),_0x741b0e=selectedHistoryRefs(_0x4248f9,_0x503de7[_0x509e6a(0x239)]);if(_0x741b0e[_0x509e6a(0x1c6)]===-0x1*-0x1b9b+-0x1*0x17ef+-0x3ac)return{'commits':[],'nextCursor':null};const _0x4154c3=_0x503de7[_0x509e6a(0x1b7)]??-0x891+-0x177+0xa3a;if(!Number[_0x509e6a(0x259)](_0x4154c3)||_0x4154c3<-0x85+0x1ea2+-0x29*0xbc||_0x4154c3>0x1691*-0x1+-0x153*-0x5+0x1056)throw new Error(_0x509e6a(0x1dc));const _0xfbb0e9=_0x741b0e[_0x509e6a(0x275)](_0x5b1c41=>_0x5b1c41[_0x509e6a(0x209)])[_0x509e6a(0x2c8)](),_0x340274=_0x503de7[_0x509e6a(0x239)]===undefined||_0x503de7[_0x509e6a(0x239)][_0x509e6a(0x1c6)]===-0x1488+-0xd4d+0x21d5||_0x741b0e[_0x509e6a(0x1c6)]===_0x4248f9[_0x509e6a(0x1c6)]&&_0x741b0e[_0x509e6a(0x293)](_0x441fcd=>_0x4248f9[_0x509e6a(0x252)](_0x2def2f=>_0x2def2f[_0x509e6a(0x209)]===_0x441fcd[_0x509e6a(0x209)])),_0x501ef6=_0x340274?[_0x509e6a(0x2bc),_0x509e6a(0x210)]:_0xfbb0e9,_0x2be41e=createHash(_0x509e6a(0x2a9))[_0x509e6a(0x200)](_0x741b0e[_0x509e6a(0x275)](_0x2469cb=>_0x2469cb[_0x509e6a(0x209)]+'\x00'+_0x2469cb[_0x509e6a(0x1c2)])[_0x509e6a(0x2c8)]()[_0x509e6a(0x223)]('\x00'))[_0x509e6a(0x214)](_0x509e6a(0x26f)),_0x150331=parseHistoryCursor(_0x503de7[_0x509e6a(0x2c3)],_0x2be41e),_0x37967f=await runReadOnlyGit(_0x2e217e,[_0x509e6a(0x225),_0x509e6a(0x2ba),_0x509e6a(0x2ae),_0x509e6a(0x1bb)+_0x150331,_0x509e6a(0x1e0)+(_0x4154c3+(-0x19a0+0x29f+-0x1f*-0xbe)),'-z',_0x509e6a(0x2c1),..._0x501ef6,'--'],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS}),_0x92751=new Map();for(const _0x19cc42 of _0x4248f9){const _0x1400ee=_0x92751[_0x509e6a(0x244)](_0x19cc42[_0x509e6a(0x1c2)])??[];_0x1400ee[_0x509e6a(0x1f6)](_0x19cc42[_0x509e6a(0x281)]),_0x92751[_0x509e6a(0x1b0)](_0x19cc42[_0x509e6a(0x1c2)],_0x1400ee);}const _0x452de7=_0x37967f[_0x509e6a(0x247)][_0x509e6a(0x1eb)]('\x00'),_0x5d6de6=[];for(let _0x1426a9=0x499*-0x7+-0x837*0x3+0x38d4;_0x1426a9+(-0x2*-0x73a+-0x1*-0x1312+-0x2181)<_0x452de7[_0x509e6a(0x1c6)];_0x1426a9+=0x4*0x8ea+-0x2681+0xf*0x31){const [_0x3b9f0a,_0x47e154='',_0x44e730='',_0x1bee6f='',_0xde271a='0',_0x2a53c1='']=_0x452de7[_0x509e6a(0x23f)](_0x1426a9,_0x1426a9+(0x2*-0x3e1+0x1810+-0x1048));if(_0x3b9f0a===undefined||!/^[0-9a-f]{40,64}$/[_0x509e6a(0x27d)](_0x3b9f0a))continue;_0x5d6de6[_0x509e6a(0x1f6)]({'hash':_0x3b9f0a,'parents':_0x47e154[_0x509e6a(0x1c6)]===-0x26b6+-0x19f8+0x22*0x1e7?[]:_0x47e154[_0x509e6a(0x1eb)]('\x20'),'authorName':_0x44e730,'authorEmail':_0x1bee6f,'committedAt':Number(_0xde271a)*(-0x25+0x1545+-0x1138),'subject':_0x2a53c1,'refs':_0x92751[_0x509e6a(0x244)](_0x3b9f0a)??[]});}const _0x5a3159=_0x5d6de6[_0x509e6a(0x1c6)]>_0x4154c3;return{'commits':_0x5d6de6[_0x509e6a(0x23f)](-0x1c9*0x7+0x3*0xb67+-0x15b6,_0x4154c3),'nextCursor':_0x5a3159?historyCursor(_0x150331+_0x4154c3,_0x2be41e):null};}async function assertHistoryCommitReachable(_0x206caf,_0x60b35c,_0x531174){const _0x662538=_0x67518d;if(!/^[0-9a-f]{40,64}$/[_0x662538(0x27d)](_0x60b35c))throw new Error(_0x662538(0x1e1));const _0x10c2d2=selectedHistoryRefs(await listGitHistoryRefs(_0x206caf),_0x531174);for(const _0x3cbd8f of _0x10c2d2){const _0x4b69b1=await runReadOnlyGitAllowFailure(_0x206caf,[_0x662538(0x270),_0x662538(0x21d),_0x60b35c,_0x3cbd8f[_0x662538(0x209)]]);if(_0x4b69b1[_0x662538(0x1e3)]===0x24ca+0x359+0x1*-0x2823)return;}throw new Error(_0x662538(0x1e1));}export async function readGitHistoryFiles(_0x18a4df,_0xe5d54a,_0x1765c3){const _0x22be58=_0x67518d;await assertHistoryCommitReachable(_0x18a4df,_0xe5d54a,_0x1765c3);const _0x548a20=await runReadOnlyGit(_0x18a4df,[_0x22be58(0x1ba),_0x22be58(0x1ee),_0x22be58(0x217),_0x22be58(0x255),'-r','-z','-M','-C',_0x22be58(0x243),_0xe5d54a],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x5035aa=_0x548a20[_0x22be58(0x247)][_0x22be58(0x1eb)]('\x00'),_0x282ec5=[];for(let _0x1abcb9=-0x291*0x9+-0x111d*-0x2+-0xb21*0x1;_0x1abcb9<_0x5035aa[_0x22be58(0x1c6)];_0x1abcb9+=-0x1*0x18ad+0x2d+0x11*0x171){const _0x309a67=_0x5035aa[_0x1abcb9];if(_0x309a67===undefined||_0x309a67[_0x22be58(0x1c6)]===-0xedb*0x2+0x1c1b*-0x1+0x39d1)continue;const _0x3a847e=_0x309a67[-0x1*-0x1d1d+0x6*-0x1e1+0x1*-0x11d7]??'M';if(_0x3a847e==='R'||_0x3a847e==='C'){const _0x26411c=_0x5035aa[_0x1abcb9+(-0x1*0x1897+0x2*0x90f+0x33d*0x2)],_0x4aba5a=_0x5035aa[_0x1abcb9+(0xf*-0x1+0x2701+-0x26f0)];if(_0x26411c!==undefined&&_0x4aba5a!==undefined)_0x282ec5[_0x22be58(0x1f6)]({'path':_0x4aba5a,'previousPath':_0x26411c,'change':gitChange(_0x3a847e)});_0x1abcb9+=0x13f6+0x10*-0xb4+-0x8b4;}else{const _0x57376f=_0x5035aa[_0x1abcb9+(0x1483+0x149*0x1c+-0x387e)];if(_0x57376f!==undefined)_0x282ec5[_0x22be58(0x1f6)]({'path':_0x57376f,'change':gitChange(_0x3a847e)});_0x1abcb9+=0x157*-0x4+-0x12e7+0x1844;}}return _0x282ec5;}export async function readGitHistoryFileDiff(_0x1a96fb,_0x2e289c,_0x2ebf56,_0x54dc6c,_0x2c6ab6){const _0x13cfd6=_0x67518d;await assertHistoryCommitReachable(_0x1a96fb,_0x2e289c,_0x54dc6c);const _0x30ef1a=safeGitWorkspacePath(_0x2ebf56),_0x342522=_0x2c6ab6===undefined?undefined:safeGitWorkspacePath(_0x2c6ab6),_0x6d9967=await runReadOnlyGit(_0x1a96fb,[_0x13cfd6(0x25b),_0x13cfd6(0x21f),_0x13cfd6(0x217),_0x13cfd6(0x1c8),_0x13cfd6(0x20d),_0x2e289c,'--',_0x13cfd6(0x262)+_0x30ef1a,..._0x342522===undefined||_0x342522===_0x30ef1a?[]:[_0x13cfd6(0x262)+_0x342522]]),_0x3c880d=_0x6d9967[_0x13cfd6(0x2a4)][_0x13cfd6(0x1ef)](0x1838+0x13*-0x3+-0x17ff)||_0x6d9967[_0x13cfd6(0x247)][_0x13cfd6(0x1ef)](_0x13cfd6(0x226));if(_0x3c880d)return{'binary':!![],'summary':_0x13cfd6(0x1e4)+createHash(_0x13cfd6(0x2a9))[_0x13cfd6(0x200)](_0x6d9967[_0x13cfd6(0x2a4)])[_0x13cfd6(0x214)](_0x13cfd6(0x26f))+_0x13cfd6(0x282)+_0x6d9967[_0x13cfd6(0x2a4)][_0x13cfd6(0x1c6)],'truncated':_0x6d9967[_0x13cfd6(0x23e)]};return{'binary':![],'text':_0x6d9967[_0x13cfd6(0x247)],'truncated':_0x6d9967[_0x13cfd6(0x23e)]};}export async function readGitHistoryFileContentRange(_0x17440e,_0x511951,_0x579a2a,_0x487d47,_0x3d61d5,_0x40320b){const _0x521e53=_0x67518d;if(!Number[_0x521e53(0x24c)](_0x487d47)||_0x487d47<-0x11b*-0x1f+0x20ea+-0x75*0x93||!Number[_0x521e53(0x24c)](_0x3d61d5)||_0x3d61d5<0x1b6e+-0x186f+-0x2fe||_0x3d61d5>(-0x1142*0x1+-0xc3*-0x2d+-0x10f1)*(0x3*-0xada+0x14*0x116+0x3*0x4f2)*(-0x1ae8+0x19b5+0x533)||_0x487d47+_0x3d61d5>(0xe57+0x1afd+-0x2940)*(-0x170c+-0x74a+0x2256)*(-0x1*-0xd91+-0x1fbd*0x1+0x2*0xb16))throw new Error(_0x521e53(0x1a4));await assertHistoryCommitReachable(_0x17440e,_0x511951,_0x40320b);const _0xb65682=safeGitWorkspacePath(_0x579a2a),_0x553234=_0x511951+':'+_0xb65682,_0x1d32a3=await runReadOnlyGit(_0x17440e,[_0x521e53(0x206),'-s',_0x553234]),_0x149243=Number(_0x1d32a3[_0x521e53(0x247)][_0x521e53(0x25d)]());if(!Number[_0x521e53(0x24c)](_0x149243)||_0x149243<0xc90*-0x1+-0x1b9c+0x6b2*0x6||_0x487d47>_0x149243)throw new Error(_0x521e53(0x1a4));if(_0x487d47===_0x149243)return{'path':_0xb65682,'size':_0x149243,'offset':_0x487d47,'contentBase64':'','nextOffset':null};const _0x29bbaa=await runReadOnlyGitAllowFailure(_0x17440e,[_0x521e53(0x206),_0x521e53(0x2a1),_0x553234],{'outputLimit':_0x487d47+_0x3d61d5,'timeoutMs':GIT_HISTORY_TIMEOUT_MS});if(_0x29bbaa[_0x521e53(0x1e3)]!==-0x2*0x1072+0xfb6+0x112e)throw new GitCommandError(_0x29bbaa[_0x521e53(0x1e3)],_0x29bbaa[_0x521e53(0x1d7)]);const _0x4c2634=_0x29bbaa[_0x521e53(0x2a4)][_0x521e53(0x227)](_0x487d47,Math[_0x521e53(0x1d6)](_0x149243,_0x487d47+_0x3d61d5)),_0x2be114=_0x487d47+_0x4c2634[_0x521e53(0x1c6)];return{'path':_0xb65682,'size':_0x149243,'offset':_0x487d47,'contentBase64':_0x4c2634[_0x521e53(0x1dd)](_0x521e53(0x287)),'nextOffset':_0x2be114<_0x149243?_0x2be114:null};}export async function readCurrentChanges(_0x1fe211){const _0x1f1fec=_0x67518d;return(await readCurrentChangesSummary(_0x1fe211))[_0x1f1fec(0x1d4)];}export async function readCurrentChangeDiff(_0x1f0022,_0x4c9a57){const _0x124335=_0x67518d,_0x10f0d4=safeGitWorkspacePath(_0x4c9a57);await assertCurrentChangePathAccessible(_0x1f0022,_0x10f0d4);const _0x40b14f=await readCurrentChangeGitDiff(_0x1f0022,_0x10f0d4),_0x1cea65=await readWorkingTreeText(_0x1f0022,_0x10f0d4),_0x44f935=_0x40b14f[_0x124335(0x2a4)][_0x124335(0x1ef)](-0x103f+0x2263+-0x1224)||_0x40b14f[_0x124335(0x247)][_0x124335(0x1ef)](_0x124335(0x226))||_0x1cea65?.[_0x124335(0x265)]===!![];if(_0x44f935)return{'binary':!![],'summary':_0x124335(0x1e4)+createHash(_0x124335(0x2a9))[_0x124335(0x200)](_0x40b14f[_0x124335(0x2a4)])[_0x124335(0x214)](_0x124335(0x26f))+_0x124335(0x282)+_0x40b14f[_0x124335(0x2a4)][_0x124335(0x1c6)],'truncated':_0x40b14f[_0x124335(0x23e)]||_0x1cea65?.[_0x124335(0x23e)]===!![]};return{'binary':![],'text':_0x40b14f[_0x124335(0x247)],'truncated':_0x40b14f[_0x124335(0x23e)]||_0x1cea65?.[_0x124335(0x23e)]===!![],'afterText':_0x1cea65?.[_0x124335(0x247)]??'',..._0x1cea65===undefined?{}:{'afterTruncated':_0x1cea65[_0x124335(0x23e)]}};}async function readCurrentChangeGitDiff(_0xc2cae4,_0x46a47c){const _0x2d4950=_0x67518d,_0x41978b=await runReadOnlyGit(_0xc2cae4,[_0x2d4950(0x1d9),_0x2d4950(0x2ac),_0x2d4950(0x1cc),'-z','--',_0x2d4950(0x262)+_0x46a47c]);if(_0x41978b[_0x2d4950(0x247)][_0x2d4950(0x1eb)]('\x00')[_0x2d4950(0x1ef)](_0x46a47c)){const _0x12f8e4=await runReadOnlyGitAllowFailure(_0xc2cae4,[_0x2d4950(0x20c),_0x2d4950(0x296),_0x2d4950(0x1c8),_0x2d4950(0x20d),'--',_0x2d4950(0x1c7),_0x46a47c]);if(_0x12f8e4[_0x2d4950(0x1e3)]!==0x1657+-0x49*0x62+0x59b&&_0x12f8e4[_0x2d4950(0x1e3)]!==0x22d5+-0x21fc+-0xd8)throw new GitCommandError(_0x12f8e4[_0x2d4950(0x1e3)],_0x12f8e4[_0x2d4950(0x1d7)]);return _0x12f8e4;}return runReadOnlyGit(_0xc2cae4,[_0x2d4950(0x20c),_0x2d4950(0x1c8),_0x2d4950(0x20d),_0x2d4950(0x1c1),'--',_0x2d4950(0x262)+_0x46a47c]);}export async function isWorkspaceChangeVisible(_0x487893,_0x3676fd){const _0x11a7fa=_0x67518d;try{return await assertCurrentChangePathAccessible(_0x487893,safeGitWorkspacePath(_0x3676fd)),!![];}catch(_0x5e49d9){if(_0x5e49d9 instanceof Error&&(_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x1cb)||_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x29d)||_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x1aa)))return![];throw _0x5e49d9;}}async function assertCurrentChangePathAccessible(_0x3e3b64,_0x13fe90){const _0x3500dc=_0x67518d,_0x209817=await realpath(_0x3e3b64),_0x26fb07=resolve(_0x209817,_0x13fe90),_0x52253a=await lstat(_0x26fb07)[_0x3500dc(0x221)](_0x1f114f=>{const _0x5c2cec=_0x3500dc;if(_0x1f114f[_0x5c2cec(0x1e3)]===_0x5c2cec(0x260))return undefined;throw _0x1f114f;});if(_0x52253a===undefined)return;await resolveWorkspaceEntry(_0x209817,_0x13fe90,![]);}async function readWorkingTreeText(_0x5564fe,_0x221146){const _0x12739f=_0x67518d,_0x194455=await realpath(_0x5564fe);let _0x2baab3;try{_0x2baab3=await resolveWorkspaceEntry(_0x194455,_0x221146,![]);}catch(_0x3b78e0){if(_0x3b78e0 instanceof Error&&_0x3b78e0[_0x12739f(0x26a)]===_0x12739f(0x29d))return undefined;throw _0x3b78e0;}const _0x27513a=await lstat(_0x2baab3);if(!_0x27513a[_0x12739f(0x1bf)]())return undefined;const _0x4d6b4f=await readFile(_0x2baab3);return diffTextFromBuffer(_0x4d6b4f,_0x4d6b4f[_0x12739f(0x1c6)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x36445e,_0x14eb25){const _0x263870=_0x67518d;if(_0x36445e[_0x263870(0x1ef)](0x2392+-0x2706+0x374)||!isValidUtf8(_0x36445e))return{'binary':!![],'truncated':_0x14eb25};let _0x3bf7b7=Math[_0x263870(0x1d6)](_0x36445e[_0x263870(0x1c6)],GIT_OUTPUT_LIMIT);while(_0x3bf7b7>0x3*-0x89b+0x708+0x2af*0x7&&_0x3bf7b7<_0x36445e[_0x263870(0x1c6)]&&isUtf8ContinuationByte(_0x36445e[_0x3bf7b7]))_0x3bf7b7-=-0x1dd2+0x662+0x1771;return{'binary':![],'text':_0x36445e[_0x263870(0x227)](-0xadc+-0x1*-0x5e9+0x4f3,_0x3bf7b7)[_0x263870(0x1dd)](_0x263870(0x2be)),'truncated':_0x14eb25};}function _0x537c(){const _0x359b6c=['lM1HCI1LzgL0lq','A2LSBa','Agv4','BwvYz2uTyMfZzq','BgfZDeLUzgv4t2y','uKvoqu1fra','rKLmrv9ut09Ftefsr0u','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','BwfW','kIOVlM51EhqVkIO','C2LUA0rVD24','C2vHCMnO','ls1ZAg93lxrVCgXLDMvS','kIOVlNzLBNyVkIO','BM93','r0Lux0nptu1btKrFrKfjteve','DgvZDa','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','zMLUzeLUzgv4','zgLZCgXHEu5HBwu','igj5DgvZpq','CgfYC2u','Dg9mB2nHBgvmB3DLCKnHC2u','BM9YBwfSAxPL','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','yMfZzty0','yMfZzty0DxjS','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','CMvMCMvZAeLUqMfJA2DYB3vUza','Dw5Yzwy','kIOVBM9Kzv9TB2r1BgvZlYOQ','kIOVzgLZDc8QkG','q09qsuve','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','Dg9vChbLCKnHC2u','Bwf4','Aw5KzxHpzG','zxzLCNK','rKLmrv9ot1rFvevyva','pZ8G','ls1UBY1PBMrLEa','qureruq','reLsrunut1jz','zM9YlwvHy2GTCMvM','zNjVBq','vu5uuKfds0ve','CMvMCY9OzwfKCW','rKLmrv9ot1rFrK9vtKq','kIOVDgvZDc9YDw5ZlYOQ','zgvZDgLUyxrPB24','iYmG','yMXVyG','y29UDgvUDenHBMrPzgf0zxm','kIOVlMnHy2HLlYOQ','B3v0Chv0','BgLTAxrZ','lMDPDa','BgLUDxG','ls1WB3jJzwXHAw49DJe','C2HHmJu2','CMvSyxrPDMu','kIOVlNLHCM4VkIO','ls1VDgHLCNm','CMvMCY9Yzw1VDgvZlW','ls1KyxrLlw9YzgvY','ls13B3jRDhjLzq','zMXHDe1HCa','kIOVyMLUlYOQ','zMLUz2vYChjPBNq','kIOVlNn2zwX0zs1RAxqVkIO','kIOVDMvUzg9YlYOQ','Bwv0ywrHDge','Aw52ywXPza','nJaXndKYzfzVyxDu','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','y29Uy2f0','ls10B3bVlw9YzgvY','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','ls1ICMfUy2HLCW','tu9esuzjruq','DxrMoa','zxjYB3i','D29YA3nWywnLuM9VDa','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','kIOVx19WEwnHy2HLx18VkIO','y3vYC29Y','Dg91y2G','CMvIDwLSza','D2LUmZi','yNL0zuXLBMD0Aa','C29YDa','rKLmrv9squ5hrv9jtLzbteLe','v09ss1nqqunfx1bbveHFsu5wquXjra','revmrvrfra','Dg9mB3DLCKnHC2u','DMfSDwvZ','C3rYAw5NAwz5','rKLmrv9ot1rFuKvhvuXbuG','B25Jzq','rKLmrq','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','C3rKB3v0','y2fWywnPDhK','C2v0','kIOVy292zxjHz2uVkIO','ls1NAxqTy29TBw9UlwrPCG','rKLmrv9xuKLurv9dt05gteLdva','su5wquXjrf9oqu1f','lNbHCNq','mti1ntyWEejWBxzN','BgLTAxq','q1jfqvrfx0rjuKvdve9swq','C3rHCNrZv2L0Aa','zgLMzI10CMvL','ls1ZA2LWpq','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','zw50CMLLCW','sevbrca','AxngAwXL','zgLZCg9Zzq','sevbra','AgfZAa','kIOVlNbUCg0VkIO','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','mtK2otyWodznrNLNv1O','BgvUz3rO','l2rLDI9UDwXS','ls1UBY1LEhqTzgLMzG','kIOVB3v0lYOQ','ywn0Aw9U','rKLmrv9qqvrix0vtq0fqrq','ls1LEgnSDwrLlxn0yw5KyxjK','AxneAxjLy3rVCNK','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','zMLSzxmUzxHJBhvKzq','C3vIBw9KDwXL','rKLmrv9btfjfqurzx0vysvnuuW','CMvWBgfJzq','kIOVlMfUz3vSyxiVkIO','y2HHBMDLCW','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','BwLU','C3rKzxjY','CMvMCMvZAgvKqxq','BhmTzMLSzxm','ls1ZAg93lxn1CgvYChjVAMvJDc13B3jRAw5NlxrYzwu','kIOVlMDYywrSzs8QkG','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','Dg9tDhjPBMC','C2vHCMnOlMv4y2X1zgu','kIOVlM5LEhqVkIO','ls1TyxGTy291BNq9','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','BxrPBwvnCW','y29Kzq','yMLUyxj5igrPzMyGC2HHmJu2pq','kIOVDMvUDI8QkG','q1jfqvrfx0zjteu','zgf0yq','AwDUB3jL','v09ss1nqqunfx05pvf9bteXpv0ve','zMLUza','C3bSAxq','B2jQzwn0','ls1ZDgfNzwq','ls1YB290','Aw5JBhvKzxm','AxntEw1IB2XPy0XPBMS','rvHju1rtx0rjuKvdve9swq','B2zMC2v0','mZyWmduZnfHAsxvJua','C3rYAw5N','AwrSzvr0Be1Z','ChvZAa','zw50CNK','A2LUza','Bg9JywXLq29TCgfYzq','rKLmrv9ot1rFreLsrunut1jz','r0Lux1jfrL9jtLzbteLe','CMvZDg9Yzq','uKvbrfK','Bg9HzgLUzW','CMvHza','DxbKyxrL','mJe4nMHmuLzzrq','CgLWzq','DxrMltG','te9dquW','AgfZ','y2f0lwzPBgu','zw5ZDxjLtg9HzgvK','kIOVDgfYz2v0lYOQ','BMfTzq','C29YDgvK','zMLSDgvY','zgLMzG','ls1UBY10zxH0y29UDG','u1rbr0ve','mtC4mZyWAK9fz0f5','ls1Yzw1VDgvZ','kIOVlNbHCMnLBc1JywnOzs8QkG','Bw9Kzq','ywXSB2nvBNnHzMu','zgLNzxn0','r0Lux1DpuKTtuefdrq','kIOVlMDPDc8QkG','ls1MAxjZDc1WyxjLBNq','r0Lux1jfue9tsvrpuLLFsu5wquXjra','ls1Yzwn1CNnPDMu','Cgf0Aa','DgLTzw91De1Z','C2L6zq','ls1PCY1HBMnLC3rVCG','z2L0','ls1MB3jTyxq9','C3rHDhvZ','y2f0y2G','CMvMCY9Yzw1VDgvZ','AM9PBG','zMLUywXSEq','Bg9N','qMLUyxj5igzPBgvZia','C3vIyxjYyxK','kIOVB2jQlYOQ','CMvMCMvZAef0DgvTChrLzef0','ls1XDwLLDa','B3v0Chv0tgLTAxq','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','C3LTyM9SAwmTCMvM','zxHLyW','C3rHBgu','zgvJB2rL','C2nVCMu','y2XVC2u','mJrXtxrVCwe','lMDPDc8','ls12zxjPzNK','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','u0Lhs0Lmta','zxHWAxj5vgLTzxi','CMvMCW','CMvHze9UBhK','kIOVyNvPBgqVkIO','C2HPzNq','rKLmrv9srvzju0LptL9jtLzbteLe','Dhj1BMnHDgvK','C2XPy2u','CMv2lxbHCNnL','CM9VDa','zNjLC2HUzxnZvhrStxm','ls1Uyw1Llxn0yxr1CW','z2v0','lI4U','odaYmZyWBfHgteHg','Dgv4Da','ls11BNrYywnRzwqTzMLSzxm9ywXS','ruvysvnu','DgHLBG','uKvnt1rf','AxntywzLsw50zwDLCG','kIOVlNr1CMjVlYOQ','CgXHDgzVCM0','otm5sxHtCeXT','ls1ZAg9YDa','CxvLCNK','C29Tzq','revmrvrf','CMvWBgfJzufSBa','ls1UBY1JB21TAxqTAwq','ls1ZB3vYy2u9sevbra','vfLqrv9dsefor0ve','CMvMCY9OzwfKCY8','AxnjBNrLz2vY','rvHju1rtx0zjteu','C2HVDW','AxnbyNnVBhv0zq','DhjPBq','lY5Flq','lM1HCI11CgXVywqT','ru5pru5u','ywrK','oIHSAxrLCMfSkq','CgLK','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','yMLUyxj5','zw50CNLmAw1PDa','zMXVB3i','yNvIyMXLvxa','ywXS','BwvZC2fNzq','ls1ICMfUy2G','vu5tvefhruq'];_0x537c=function(){return _0x359b6c;};return _0x537c();}export async function restoreCurrentChange(_0x4354b7,_0x57224d,_0x15abd3){const _0x350950=_0x67518d,_0x16112e=safeGitWorkspacePath(_0x57224d),_0x2104fa=_0x350950(0x262)+_0x16112e;if(_0x15abd3===_0x350950(0x29b)){const _0x167d34=await runReadOnlyGit(_0x4354b7,[_0x350950(0x220),_0x350950(0x2a8),'-z',_0x350950(0x248),'--',_0x2104fa]);if(!_0x167d34[_0x350950(0x247)][_0x350950(0x1eb)]('\x00')[_0x350950(0x252)](_0x219642=>_0x219642[_0x350950(0x1b9)](_0x350950(0x295))&&_0x219642[_0x350950(0x23f)](0xa24+-0x5*-0x3c7+0x6*-0x4d6)===_0x16112e))throw new Error(_0x350950(0x286));const _0x5e6bd9=await realpath(_0x4354b7),_0x34b273=resolve(_0x5e6bd9,_0x16112e),_0xe3a551=await lstat(_0x34b273);if(!_0xe3a551[_0x350950(0x1bf)]()||_0xe3a551[_0x350950(0x1f0)]())throw new Error(_0x350950(0x286));await unlink(_0x34b273);return;}if(_0x15abd3===_0x350950(0x26c)){await runGit(_0x4354b7,[_0x350950(0x1fc),_0x350950(0x2af),'--',_0x2104fa]);return;}await runGit(_0x4354b7,[_0x350950(0x1fc),_0x350950(0x256),_0x350950(0x1ed),_0x350950(0x2af),'--',_0x2104fa]);}function safeGitWorkspacePath(_0x2cbbe6){const _0x3d4487=_0x67518d;if(_0x2cbbe6[_0x3d4487(0x1c6)]===0xd96+-0x2593+-0x17*-0x10b||_0x2cbbe6[_0x3d4487(0x1ef)]('\x00')||_0x2cbbe6[_0x3d4487(0x1b9)]('/')||_0x2cbbe6[_0x3d4487(0x1b9)]('\x5c'))throw new Error(_0x3d4487(0x1cb));const _0x1da11a=_0x2cbbe6[_0x3d4487(0x254)]('\x5c','/');if(_0x1da11a[_0x3d4487(0x1eb)]('/')[_0x3d4487(0x252)](_0x5d0034=>_0x5d0034===''||_0x5d0034==='..'||_0x5d0034===_0x3d4487(0x2a6)))throw new Error(_0x3d4487(0x1cb));return _0x1da11a;}function gitChange(_0xa3c581){const _0x1e0ea4=_0x67518d;if(_0xa3c581==='A')return _0x1e0ea4(0x297);if(_0xa3c581==='D')return _0x1e0ea4(0x1a6);if(_0xa3c581==='R')return _0x1e0ea4(0x272);if(_0xa3c581==='C')return _0x1e0ea4(0x28e);if(_0xa3c581==='T')return _0x1e0ea4(0x257);return _0x1e0ea4(0x2bd);}export class GitCommandError extends Error{[_0x67518d(0x1e3)];[_0x67518d(0x1d7)];constructor(_0x1b3f03,_0x3057a5){const _0x22d70a=_0x67518d;super(_0x22d70a(0x27c)),this[_0x22d70a(0x1e3)]=_0x1b3f03,this[_0x22d70a(0x1d7)]=_0x3057a5;}}async function runReadOnlyGit(_0x55852b,_0x544600,_0x7c20dc={}){return runGit(_0x55852b,_0x544600,{..._0x7c20dc,'readOnly':!![]});}async function runReadOnlyGitAllowFailure(_0x246ee3,_0x1df834,_0x137c4d={}){return runGitAllowFailure(_0x246ee3,_0x1df834,{..._0x137c4d,'readOnly':!![]});}async function runGit(_0x2c357d,_0x349d66,_0x19c82f={}){const _0x25eb60=_0x67518d,_0xfa907a=await runGitAllowFailure(_0x2c357d,_0x349d66,_0x19c82f);if(_0xfa907a[_0x25eb60(0x1e3)]!==-0x20a3+-0x1c8+-0x10b*-0x21)throw new GitCommandError(_0xfa907a[_0x25eb60(0x1e3)],_0xfa907a[_0x25eb60(0x1d7)]);return _0xfa907a;}async function runGitAllowFailure(_0x51f12b,_0x4d60bb,_0x290819={}){return new Promise((_0x3df2aa,_0x1811c8)=>{const _0x167660=_0x4bb8,_0x823980=_0x290819[_0x167660(0x22b)]??GIT_OUTPUT_LIMIT,_0x567e4b=spawn(_0x167660(0x21e),[..._0x4d60bb],{'cwd':_0x51f12b,'shell':![],'windowsHide':!![],'stdio':[_0x167660(0x1e8),_0x167660(0x202),_0x167660(0x202)],..._0x290819[_0x167660(0x23a)]===!![]?{'env':{...process.env,'GIT_OPTIONAL_LOCKS':'0'}}:{}}),_0x5850ce=[],_0x4d1ded=[];let _0x1c2e36=-0x2667+0xaa+0x25bd,_0x35061c=0x2667+-0x5*0x2dd+-0x1816,_0x41a043=![];const _0x3307a3=setTimeout(()=>{const _0x1e649c=_0x167660;if(process[_0x1e649c(0x24e)]===_0x1e649c(0x2c6)){const _0x5a439a=_0x567e4b[_0x1e649c(0x263)];if(_0x5a439a===undefined){_0x567e4b[_0x1e649c(0x26e)](_0x1e649c(0x237));return;}void terminateProcessTree({'pid':_0x5a439a,'kill':_0x4d951f=>_0x567e4b[_0x1e649c(0x26e)](_0x4d951f)},_0x1e649c(0x2c6))[_0x1e649c(0x221)](()=>{const _0x12a71b=_0x1e649c;try{_0x567e4b[_0x12a71b(0x26e)](_0x12a71b(0x237));}catch{}});return;}_0x567e4b[_0x1e649c(0x26e)](_0x1e649c(0x237));},_0x290819[_0x167660(0x21b)]??GIT_TIMEOUT_MS);_0x567e4b[_0x167660(0x1ae)]['on'](_0x167660(0x1e7),_0x59a6f6=>{const _0xf82826=_0x167660,_0x106f1f=Math[_0xf82826(0x291)](-0x2f*-0xb5+-0xd10+-0x3*0x6b9,_0x823980-_0x1c2e36);if(_0x106f1f>0x249b*-0x1+0x204*0xc+0xc6b){const _0x3333f7=_0x59a6f6[_0xf82826(0x227)](-0xb*-0x251+-0x3*0x9cc+0x3e9,_0x106f1f);_0x5850ce[_0xf82826(0x1f6)](_0x3333f7),_0x1c2e36+=_0x3333f7[_0xf82826(0x1c6)];}_0x41a043||=_0x59a6f6[_0xf82826(0x1c6)]>_0x106f1f;}),_0x567e4b[_0x167660(0x1d7)]['on'](_0x167660(0x1e7),_0xac25cf=>{const _0x378788=_0x167660,_0x48635b=Math[_0x378788(0x291)](-0x5*-0xd4+0x6*-0x4b+0x3d*-0xa,0x890+-0x83a+0xfaa-_0x35061c);if(_0x48635b===-0x23db+-0x15d*-0x5+0x213*0xe)return;const _0x4b1ac2=_0xac25cf[_0x378788(0x227)](-0x59+-0x1693+0x7a4*0x3,_0x48635b);_0x4d1ded[_0x378788(0x1f6)](_0x4b1ac2),_0x35061c+=_0x4b1ac2[_0x378788(0x1c6)];}),_0x567e4b[_0x167660(0x1ab)](_0x167660(0x2bf),_0x4ed517=>{clearTimeout(_0x3307a3),_0x1811c8(_0x4ed517);}),_0x567e4b[_0x167660(0x1ab)](_0x167660(0x232),_0x59b83=>{const _0x3e1cd0=_0x167660;clearTimeout(_0x3307a3);const _0x5e5393=Buffer[_0x3e1cd0(0x2b9)](_0x5850ce);_0x3df2aa({'code':_0x59b83??-0x1d78+-0x18ac+-0x53*-0xa7,'output':_0x5e5393,'text':_0x5e5393[_0x3e1cd0(0x1dd)](_0x3e1cd0(0x2be)),'stderr':Buffer[_0x3e1cd0(0x2b9)](_0x4d1ded)[_0x3e1cd0(0x1dd)](_0x3e1cd0(0x2be)),'truncated':_0x41a043});});});}function isGitUnavailable(_0x2d31fc){const _0x499600=_0x67518d;return _0x2d31fc instanceof Error&&_0x499600(0x1e3)in _0x2d31fc&&_0x2d31fc[_0x499600(0x1e3)]===_0x499600(0x260);}function summarizeText(_0xf1ccf7){const _0x5cf2f6=_0x67518d;return JSON[_0x5cf2f6(0x1a9)]({'sha256':createHash(_0x5cf2f6(0x2a9))[_0x5cf2f6(0x200)](_0xf1ccf7)[_0x5cf2f6(0x214)](_0x5cf2f6(0x26f)),'bytes':Buffer[_0x5cf2f6(0x2c7)](_0xf1ccf7)});}
2
+ const _0x29cc70=_0x28d1;(function(_0x5a11fb,_0x44a7a5){const _0x5a6df0=_0x28d1,_0x48528c=_0x5a11fb();while(!![]){try{const _0x221623=-parseInt(_0x5a6df0(0x287))/(-0x7d7*-0x1+-0x1b41*0x1+0x136b)+parseInt(_0x5a6df0(0x25b))/(-0x1f*-0x7d+0xd*0x125+-0x1e02)+parseInt(_0x5a6df0(0x1bb))/(0x180f+0x5*-0x39a+-0x1*0x60a)+-parseInt(_0x5a6df0(0x206))/(0x1ffd+-0x691*-0x2+-0xf09*0x3)+parseInt(_0x5a6df0(0x1c2))/(-0x117*0x1d+-0x1ce5+0x3c85)+parseInt(_0x5a6df0(0x2a4))/(0xfe+-0x1*-0x1d29+-0x3*0xa0b)+-parseInt(_0x5a6df0(0x29c))/(0x124d+-0x19b*-0xd+-0x2725);if(_0x221623===_0x44a7a5)break;else _0x48528c['push'](_0x48528c['shift']());}catch(_0x4aa98f){_0x48528c['push'](_0x48528c['shift']());}}}(_0x2e1c,-0x1*-0x2c693+0x4e8f4+0x173c8));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0x292b67}from'node:os';import{basename,dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';import{terminateProcessTree}from'./process-tree.js';const GIT_TIMEOUT_MS=-0x1*-0x26ef+-0x1*0xe1a+0x3b*-0x17,GIT_STATUS_TIMEOUT_MS=-0x1*0x3047+0xd211+-0x1*0x2c9a,GIT_HISTORY_TIMEOUT_MS=0xdfb*0x2+0x21c4+0x2*-0x191,GIT_OUTPUT_LIMIT=(0xfd4*0x2+0x86a+-0x2612)*(0x1*0x11e9+-0xe38+0x4f*0x1),GIT_LARGE_OUTPUT_LIMIT=(-0x1f4*0xe+-0x24c7+-0x1*-0x4027)*(-0x13bb+-0x8b*0x43+0x3c1c)*(-0x25f1+-0x6bd+0x1857*0x2),FILE_READ_LIMIT=(0x167*-0x3+-0x3c6+0x1*0x9fb)*(-0x126*-0xa+0x3e8*-0x4+0x412*0x2),DIRECTORY_PAGE_LIMIT=-0x36*-0x50+-0x1850+0x107*0x8,DIRECTORY_PICKER_LIMIT=0xb27+0x3*-0xc01+-0x19a4*-0x1,SEARCH_RESULT_LIMIT=0x71*0x5+0x1*0x171+0x2de*-0x1,GIT_WORKTREE_LIST_LIMIT=-0x1f3f+-0x25c2*0x1+0x4581,FILE_INDEX_IDLE_TTL_MS=(-0x18c1*-0x1+0x1*-0x1869+0x2*-0xe)*(0x242b+-0x18e5+-0x3ae*0x3)*(0x1753+0x53d+-0x18a8),FILE_INDEX_FRESHNESS_TTL_MS=-0x3*-0x4a65+-0x12a*0x20+-0x44bf,FILE_INDEX_ENTRY_LIMIT=0x1*0x24f2b+0x13a6*-0x22+0x1d381,FILE_INDEX_METADATA_CONCURRENCY=0x2*0x3ee+-0x137+-0x1*0x685,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x29cc70(0x1bd),_0x29cc70(0x1cd),_0x29cc70(0x26c),_0x29cc70(0x204),_0x29cc70(0x280),_0x29cc70(0x1c7),_0x29cc70(0x27c),_0x29cc70(0x269),_0x29cc70(0x21c),_0x29cc70(0x28d),_0x29cc70(0x2b4),_0x29cc70(0x25e),_0x29cc70(0x295),_0x29cc70(0x235),_0x29cc70(0x277),_0x29cc70(0x1ff),_0x29cc70(0x21d),_0x29cc70(0x1f5),_0x29cc70(0x254),_0x29cc70(0x2b1),_0x29cc70(0x258),_0x29cc70(0x207),_0x29cc70(0x2b8),_0x29cc70(0x291),_0x29cc70(0x1c8)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x5ac3bb,_0x1802d0,_0x45be31){const _0x5c3d11=_0x29cc70,_0x34512d=_0x1802d0[_0x5c3d11(0x22b)]();if(_0x34512d[_0x5c3d11(0x1c3)]===-0x1667+0xb3d+0xb2a||_0x34512d[_0x5c3d11(0x1c3)]>0xac2+0x47*-0x17+0x362*-0x1||_0x34512d==='.'||_0x34512d==='..'||_0x34512d[_0x5c3d11(0x262)]('/')||_0x34512d[_0x5c3d11(0x262)]('\x5c')||_0x34512d[_0x5c3d11(0x262)]('\x00'))throw new Error(_0x5c3d11(0x20e));const _0x3b0dd0=await Promise[_0x5c3d11(0x191)](_0x45be31[_0x5c3d11(0x1f1)](_0x22bcac=>realpath(_0x22bcac))),_0x2a9e18=await realpath(_0x5ac3bb)[_0x5c3d11(0x19c)](()=>{const _0xc7f35=_0x5c3d11;throw new Error(_0xc7f35(0x2a3));}),_0x4d5868=await stat(_0x2a9e18)[_0x5c3d11(0x19c)](()=>undefined);if(_0x4d5868?.[_0x5c3d11(0x265)]()!==!![]||!isWithinAllowedRoot(_0x2a9e18,_0x3b0dd0))throw new Error(_0x5c3d11(0x2a3));const _0x48a22f=resolve(_0x2a9e18,_0x34512d);if(dirname(_0x48a22f)!==_0x2a9e18||!isWithinAllowedRoot(_0x48a22f,_0x3b0dd0))throw new Error(_0x5c3d11(0x20e));try{await mkdir(_0x48a22f);}catch(_0x3910be){if(_0x3910be[_0x5c3d11(0x28f)]===_0x5c3d11(0x225))throw new Error(_0x5c3d11(0x290));throw _0x3910be;}return _0x48a22f;}export class WorkspaceFileIndex{[_0x29cc70(0x1cb)];[_0x29cc70(0x1fd)];[_0x29cc70(0x27d)]=[];[_0x29cc70(0x253)]=![];[_0x29cc70(0x270)];[_0x29cc70(0x2b9)];[_0x29cc70(0x222)]=!![];[_0x29cc70(0x282)];[_0x29cc70(0x1de)]=-0x22*-0x2d+0xce0+-0x12da;[_0x29cc70(0x236)]=0x220f*-0x1+-0xc88+0x2e97;constructor(_0x1f713b,_0x507420={}){const _0x33fd3c=_0x29cc70;this[_0x33fd3c(0x1cb)]=_0x1f713b,this[_0x33fd3c(0x1fd)]=_0x507420;}async[_0x29cc70(0x29d)](){const _0x18386e=_0x29cc70;return await this[_0x18386e(0x192)](),this[_0x18386e(0x1ba)](),{'entries':this[_0x18386e(0x27d)][_0x18386e(0x1fb)](_0x454283=>_0x454283[_0x18386e(0x232)]===_0x18386e(0x2a0)),'truncated':this[_0x18386e(0x253)]};}[_0x29cc70(0x20f)](){const _0x409d7b=_0x29cc70;if(this[_0x409d7b(0x282)]!==undefined)clearTimeout(this[_0x409d7b(0x282)]);this[_0x409d7b(0x282)]=undefined,this[_0x409d7b(0x27d)]=[],this[_0x409d7b(0x253)]=![],this[_0x409d7b(0x222)]=!![],this[_0x409d7b(0x1de)]=0x1*0xa59+-0x9ce+-0x8b,this[_0x409d7b(0x236)]=-0x10+0x14b3*-0x1+-0x1*-0x14c3;}async[_0x29cc70(0x1a8)](_0x8bcf08,_0x4ffb2c,_0x200a10=SEARCH_RESULT_LIMIT,_0x15c743=![]){const _0x12930f=_0x29cc70;if(_0x8bcf08[_0x12930f(0x22b)]()[_0x12930f(0x1c3)]===-0x56d*0x7+-0x16a6+-0x583*-0xb||_0x8bcf08[_0x12930f(0x1c3)]>-0x6b1+-0x3d*-0x5b+-0xdfe||!Number[_0x12930f(0x1eb)](_0x200a10)||_0x200a10<0xae*0x3+0xd*0x1a3+-0x1750||_0x200a10>SEARCH_RESULT_LIMIT)throw new Error(_0x12930f(0x239));await this[_0x12930f(0x192)](),this[_0x12930f(0x1ba)]();const _0x1879a4=decodeSearchCursor(_0x4ffb2c,_0x8bcf08),_0x7df633=_0x1879a4===undefined?undefined:this[_0x12930f(0x27d)][_0x12930f(0x1a5)](_0xa9e42a=>_0xa9e42a[_0x12930f(0x2a2)]===_0x1879a4&&(_0x15c743||_0xa9e42a[_0x12930f(0x232)]===_0x12930f(0x2a0))),_0x686276=_0x7df633===undefined?-(-0x94f*-0x2+-0x305*-0x9+-0x2dca*0x1):fuzzyPathScore(_0x7df633[_0x12930f(0x2a2)],_0x8bcf08),_0x288f7f=_0x7df633===undefined||_0x686276<-0x486*0x5+-0x1*-0x1ab1+-0x413?undefined:{'entry':_0x7df633,'score':_0x686276},_0x4cd7d4=new RankedCandidateHeap(_0x200a10+(-0x1*0x13c2+0x80c+0xbb7));for(const _0x3ab722 of this[_0x12930f(0x27d)]){if(!_0x15c743&&_0x3ab722[_0x12930f(0x232)]!==_0x12930f(0x2a0))continue;const _0x5ec82c=fuzzyPathScore(_0x3ab722[_0x12930f(0x2a2)],_0x8bcf08);if(_0x5ec82c<0x1ec3+0x3a5+-0x2268)continue;const _0x48c727={'entry':_0x3ab722,'score':_0x5ec82c};if(_0x288f7f!==undefined&&compareRankedCandidate(_0x48c727,_0x288f7f)<=0x1353+0x1c32+-0x2f85)continue;_0x4cd7d4[_0x12930f(0x1c0)](_0x48c727);}const _0x40ec77=_0x4cd7d4[_0x12930f(0x1cf)](),_0x26f946=_0x40ec77[_0x12930f(0x190)](0x520+-0xe0a+0x8ea,_0x200a10)[_0x12930f(0x1f1)](_0x2abcb5=>_0x2abcb5[_0x12930f(0x1ac)]),_0x5bb4bf=_0x40ec77[_0x200a10]?.[_0x12930f(0x1ac)][_0x12930f(0x2a2)];return{'entries':_0x26f946,'nextCursor':_0x5bb4bf===undefined?null:encodeSearchCursor(_0x8bcf08,_0x26f946['at'](-(0x9d*0x2b+0x241a*-0x1+0x9bc))?.[_0x12930f(0x2a2)]??_0x1879a4??''),'truncated':_0x5bb4bf!==undefined||this[_0x12930f(0x253)]};}async[_0x29cc70(0x192)](){const _0x57add3=_0x29cc70;if(!this[_0x57add3(0x222)]&&this[_0x57add3(0x270)]!==undefined){if(Date[_0x57add3(0x20c)]()-this[_0x57add3(0x236)]>=(this[_0x57add3(0x1fd)][_0x57add3(0x1c9)]??FILE_INDEX_FRESHNESS_TTL_MS))this[_0x57add3(0x2a9)]();return;}this[_0x57add3(0x2b9)]===undefined&&(this[_0x57add3(0x2b9)]=this[_0x57add3(0x28b)]()[_0x57add3(0x233)](()=>{const _0x481bfe=_0x57add3;this[_0x481bfe(0x2b9)]=undefined;})),await this[_0x57add3(0x2b9)];}[_0x29cc70(0x1ba)](){const _0x1b707f=_0x29cc70;if(this[_0x1b707f(0x282)]!==undefined)clearTimeout(this[_0x1b707f(0x282)]);this[_0x1b707f(0x282)]=setTimeout(()=>this[_0x1b707f(0x20f)](),this[_0x1b707f(0x1fd)][_0x1b707f(0x1dd)]??FILE_INDEX_IDLE_TTL_MS),this[_0x1b707f(0x282)][_0x1b707f(0x21f)]();}async[_0x29cc70(0x28b)](){const _0x480ada=_0x29cc70,_0x3055cc=await resolveRegisteredWorkspaceRoot(this[_0x480ada(0x1cb)]),_0x45db4a=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x3055cc)],_0x420058=[],_0x5439d5=this[_0x480ada(0x1fd)][_0x480ada(0x24b)]??FILE_INDEX_ENTRY_LIMIT;let _0x2a82de=![];const _0x46bb69=['.'];let _0x2677c6=-0x42f*0x4+-0x3bd+0x1479*0x1;while(_0x2677c6<_0x46bb69[_0x480ada(0x1c3)]&&!_0x2a82de){const _0x2d1bc3=_0x46bb69[_0x2677c6];_0x2677c6+=-0xd32+-0x2*-0x70a+-0xe1;const _0x14f685=await resolveWorkspaceEntryFromCanonicalRoot(_0x3055cc,_0x2d1bc3,!![])[_0x480ada(0x19c)](()=>undefined);if(_0x14f685===undefined)continue;const _0x4e2e48=await opendir(_0x14f685)[_0x480ada(0x19c)](()=>undefined);if(_0x4e2e48===undefined)continue;let _0x441868=[];const _0x3cbb8e=async()=>{const _0x1b688d=_0x480ada,_0x14d3b7=await Promise[_0x1b688d(0x191)](_0x441868);_0x441868=[];for(const _0x52fcac of _0x14d3b7){if(_0x52fcac===undefined)continue;if(_0x52fcac[_0x1b688d(0x2a2)]===_0x1b688d(0x1ef)||_0x52fcac[_0x1b688d(0x2a2)][_0x1b688d(0x28c)](_0x1b688d(0x261))||isExcluded(_0x52fcac[_0x1b688d(0x2a2)],_0x45db4a))continue;if(_0x52fcac[_0x1b688d(0x232)]===_0x1b688d(0x217))_0x46bb69[_0x1b688d(0x21a)](_0x52fcac[_0x1b688d(0x2a2)]);_0x420058[_0x1b688d(0x21a)](_0x52fcac);if(_0x420058[_0x1b688d(0x1c3)]>=_0x5439d5){_0x2a82de=!![];break;}}};for await(const _0x2ea07c of _0x4e2e48){const _0x5f45a5=_0x2d1bc3==='.'?_0x2ea07c[_0x480ada(0x1db)]:posix[_0x480ada(0x24f)](_0x2d1bc3[_0x480ada(0x278)]('\x5c','/'),_0x2ea07c[_0x480ada(0x1db)]);if(_0x5f45a5===_0x480ada(0x1ef)||_0x5f45a5[_0x480ada(0x28c)](_0x480ada(0x261))||isExcluded(_0x5f45a5,_0x45db4a))continue;_0x441868[_0x480ada(0x21a)](inspectWorkspaceIndexEntry(_0x3055cc,_0x5f45a5,_0x2ea07c[_0x480ada(0x1db)]));if(_0x441868[_0x480ada(0x1c3)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x3cbb8e();if(_0x2a82de)break;}if(!_0x2a82de&&_0x441868[_0x480ada(0x1c3)]>-0x1*-0x679+-0x2*-0xaee+-0x1c55)await _0x3cbb8e();}this[_0x480ada(0x270)]=_0x3055cc,this[_0x480ada(0x27d)]=_0x420058,this[_0x480ada(0x253)]=_0x2a82de,this[_0x480ada(0x222)]=![],this[_0x480ada(0x1de)]=Date[_0x480ada(0x20c)](),this[_0x480ada(0x236)]=this[_0x480ada(0x1de)];}[_0x29cc70(0x2a9)](){const _0x26d09f=_0x29cc70;if(this[_0x26d09f(0x2b9)]!==undefined)return;this[_0x26d09f(0x236)]=Date[_0x26d09f(0x20c)](),this[_0x26d09f(0x2b9)]=this[_0x26d09f(0x28b)]()[_0x26d09f(0x19c)](()=>undefined)[_0x26d09f(0x233)](()=>{const _0x227535=_0x26d09f;this[_0x227535(0x2b9)]=undefined;});}}async function workspaceExcludePatterns(_0x4c24e6){const _0xb456b3=_0x29cc70,_0x244774=resolve(_0x4c24e6,_0xb456b3(0x220)),_0x2afc93=await readFile(_0x244774,_0xb456b3(0x288))[_0xb456b3(0x246)](JSON[_0xb456b3(0x250)])[_0xb456b3(0x19c)](()=>undefined);if(typeof _0x2afc93!==_0xb456b3(0x227)||_0x2afc93===null)return[];return[_0xb456b3(0x1f8),_0xb456b3(0x1a3)][_0xb456b3(0x256)](_0x55ec0e=>{const _0x5d5796=_0xb456b3,_0x3b08a6=_0x2afc93[_0x55ec0e];return typeof _0x3b08a6===_0x5d5796(0x227)&&_0x3b08a6!==null?Object[_0x5d5796(0x27d)](_0x3b08a6)[_0x5d5796(0x256)](([_0x2ce70d,_0x30b970])=>_0x30b970===!![]?[_0x2ce70d]:[]):[];});}function isExcluded(_0x3accc6,_0x14d9a2){const _0x1c9b15=_0x29cc70;return _0x14d9a2[_0x1c9b15(0x1fe)](_0x54ff36=>minimatch(_0x3accc6,_0x54ff36,{'dot':!![],'nocase':_0x292b67()!==_0x1c9b15(0x223)})||minimatch(_0x3accc6+'/',_0x54ff36,{'dot':!![],'nocase':_0x292b67()!==_0x1c9b15(0x223)}));}function compareRankedCandidate(_0x238c6d,_0x49b102){const _0x431218=_0x29cc70;return _0x49b102[_0x431218(0x275)]-_0x238c6d[_0x431218(0x275)]||_0x238c6d[_0x431218(0x1ac)][_0x431218(0x2a2)][_0x431218(0x1ce)](_0x49b102[_0x431218(0x1ac)][_0x431218(0x2a2)]);}class RankedCandidateHeap{[_0x29cc70(0x19f)];[_0x29cc70(0x1df)]=[];constructor(_0x5ca896){const _0x5dee8c=_0x29cc70;this[_0x5dee8c(0x19f)]=_0x5ca896;}[_0x29cc70(0x1c0)](_0x165b3e){const _0x3167a2=_0x29cc70;if(this[_0x3167a2(0x1df)][_0x3167a2(0x1c3)]<this[_0x3167a2(0x19f)]){this[_0x3167a2(0x1df)][_0x3167a2(0x21a)](_0x165b3e),this[_0x3167a2(0x2af)](this[_0x3167a2(0x1df)][_0x3167a2(0x1c3)]-(0x1*0x2395+-0x1455+0x3*-0x515));return;}if(compareRankedCandidate(_0x165b3e,this[_0x3167a2(0x1df)][-0x14*-0x2d+-0x6e2+-0x35e*-0x1])>=-0x11e1*0x1+-0x88+0x1269)return;this[_0x3167a2(0x1df)][0x622+-0x4*0x43f+-0xada*-0x1]=_0x165b3e,this[_0x3167a2(0x2b2)](-0x11d*-0x1c+0x1471+-0x339d*0x1);}[_0x29cc70(0x1cf)](){const _0x20aecd=_0x29cc70;return[...this[_0x20aecd(0x1df)]][_0x20aecd(0x24a)](compareRankedCandidate);}[_0x29cc70(0x2af)](_0x48f688){const _0xcd2f3=_0x29cc70;let _0x4562d9=_0x48f688;while(_0x4562d9>-0x1*0x136b+0x1*0xded+0x57e){const _0x23f10a=Math[_0xcd2f3(0x1f2)]((_0x4562d9-(-0x2182+-0x1*0x1bd9+0x3d5c))/(-0x14e9+0x1*0x1cf4+-0x809));if(compareRankedCandidate(this[_0xcd2f3(0x1df)][_0x4562d9],this[_0xcd2f3(0x1df)][_0x23f10a])<=-0xf*0xe9+-0x1e7a+0x2c21)break;[this[_0xcd2f3(0x1df)][_0x4562d9],this[_0xcd2f3(0x1df)][_0x23f10a]]=[this[_0xcd2f3(0x1df)][_0x23f10a],this[_0xcd2f3(0x1df)][_0x4562d9]],_0x4562d9=_0x23f10a;}}[_0x29cc70(0x2b2)](_0x20e345){const _0x177324=_0x29cc70;let _0x5b012e=_0x20e345;while(!![]){const _0x35d9ae=_0x5b012e*(-0xf58+-0x52*-0x3d+0x2*-0x218)+(-0x10b3+-0x4f*-0x6f+-0x1*0x118d);if(_0x35d9ae>=this[_0x177324(0x1df)][_0x177324(0x1c3)])return;const _0x330740=_0x35d9ae+(-0x47e+0x11*0x105+0x2*-0x66b),_0x2b42c4=_0x330740<this[_0x177324(0x1df)][_0x177324(0x1c3)]&&compareRankedCandidate(this[_0x177324(0x1df)][_0x330740],this[_0x177324(0x1df)][_0x35d9ae])>-0x323+0x4f*0x6+0x149?_0x330740:_0x35d9ae;if(compareRankedCandidate(this[_0x177324(0x1df)][_0x2b42c4],this[_0x177324(0x1df)][_0x5b012e])<=0x1a3c+0x1283+-0x1*0x2cbf)return;[this[_0x177324(0x1df)][_0x5b012e],this[_0x177324(0x1df)][_0x2b42c4]]=[this[_0x177324(0x1df)][_0x2b42c4],this[_0x177324(0x1df)][_0x5b012e]],_0x5b012e=_0x2b42c4;}}}function _0x28d1(_0x3261d1,_0x31720e){_0x3261d1=_0x3261d1-(-0xf98+0x1dc3+-0xc9c);const _0x54cc97=_0x2e1c();let _0x4952a0=_0x54cc97[_0x3261d1];if(_0x28d1['mgQWTb']===undefined){var _0x53e0c3=function(_0x5484f7){const _0x98d848='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19b3ac='',_0x7d6c91='';for(let _0x4560df=-0x14ba+-0xbc2+0x207c,_0x11d910,_0x2070c6,_0x4de6a9=-0x1*-0x26ef+-0x1*0xe1a+0xa3*-0x27;_0x2070c6=_0x5484f7['charAt'](_0x4de6a9++);~_0x2070c6&&(_0x11d910=_0x4560df%(-0x1*0x80c+0x2303+-0x1*0x1af3)?_0x11d910*(0x952*0x1+0xb41+0xb*-0x1d9)+_0x2070c6:_0x2070c6,_0x4560df++%(0xfd4*0x2+0x86a+-0x280e))?_0x19b3ac+=String['fromCharCode'](0x1*0x11e9+-0xe38+0xe6*-0x3&_0x11d910>>(-(-0x1f4*0xe+-0x24c7+-0x1*-0x4021)*_0x4560df&-0x13bb+-0x8b*0x43+0x3822)):-0x25f1+-0x6bd+0x1657*0x2){_0x2070c6=_0x98d848['indexOf'](_0x2070c6);}for(let _0x11e4a2=0x167*-0x3+-0x3c6+0x1*0x7fb,_0x333953=_0x19b3ac['length'];_0x11e4a2<_0x333953;_0x11e4a2++){_0x7d6c91+='%'+('00'+_0x19b3ac['charCodeAt'](_0x11e4a2)['toString'](-0x126*-0xa+0x3e8*-0x4+0x21a*0x2))['slice'](-(-0x36*-0x50+-0x1850+0x3b9*0x2));}return decodeURIComponent(_0x7d6c91);};_0x28d1['TcXnUr']=_0x53e0c3,_0x28d1['NXAZPo']={},_0x28d1['mgQWTb']=!![];}const _0x30d6d2=_0x54cc97[0xb27+0x3*-0xc01+-0x18dc*-0x1];_0x28d1['SHvEav']!==_0x30d6d2&&(_0x28d1['NXAZPo']={},_0x28d1['SHvEav']=_0x30d6d2);const _0x50f449=_0x28d1['NXAZPo'][_0x3261d1];return _0x50f449===undefined?(_0x4952a0=_0x28d1['TcXnUr'](_0x4952a0),_0x28d1['NXAZPo'][_0x3261d1]=_0x4952a0):_0x4952a0=_0x50f449,_0x4952a0;}function fuzzyPathScore(_0x5ad7c3,_0x5fe928){const _0x5e2e56=_0x29cc70,_0x407971=_0x5ad7c3[_0x5e2e56(0x28e)](),_0x8673ba=_0x5fe928[_0x5e2e56(0x22b)]()[_0x5e2e56(0x28e)]();let _0x214d0a=0xf2f+0x1b01+0xf0*-0x2d,_0x50014a=0x349*0xa+0x9cd+-0x2aa7,_0x2f0a2f=-(-0x2*0xe1b+0x116b+0x1*0xacd);for(const _0x2ce5ff of _0x8673ba){const _0x16f3a5=_0x407971[_0x5e2e56(0x1fc)](_0x2ce5ff,_0x214d0a);if(_0x16f3a5===-(0x98d+0x167b*-0x1+-0x2b*-0x4d))return-(0x159a+-0xdd8+-0x7c1);_0x50014a+=_0x16f3a5===_0x2f0a2f+(0x1*-0x212b+0x8c5*0x1+0x1867)?0x1*-0x1511+-0x1256+0x1*0x2773:0x1d3*0x14+0x7*0xa0+0x28db*-0x1;if(_0x16f3a5===0x154f+0x1*-0xaf6+0xa59*-0x1||_0x5e2e56(0x1d0)[_0x5e2e56(0x262)](_0x407971[_0x16f3a5-(0x1193+-0xa97*-0x2+-0x26c0)]??''))_0x50014a+=-0x9*-0x27+0x18a+-0x2e1;_0x2f0a2f=_0x16f3a5,_0x214d0a=_0x16f3a5+(0xb35+0x2f*0x6b+-0x1ed9);}const _0x7b7add=_0x5ad7c3[_0x5e2e56(0x190)](_0x5ad7c3[_0x5e2e56(0x19a)]('/')+(0x2*0x1229+-0x25b4+-0x163*-0x1))[_0x5e2e56(0x28e)]();if(_0x7b7add[_0x5e2e56(0x262)](_0x8673ba))_0x50014a+=0x1c26+0x1*-0x1d7b+-0x17d*-0x1;else{if(_0x407971[_0x5e2e56(0x262)](_0x8673ba))_0x50014a+=0xcd0+0x1*0x21e5+0x1*-0x2ea5;}return _0x50014a-_0x5ad7c3[_0x5e2e56(0x1c3)]/(-0xd*-0x2cc+-0x22d5*-0x1+-0x4349);}export async function listWorkspaceDirectories(_0x359b73,_0x2fa026,_0x4de58e=homedir()){const _0x326fa2=_0x29cc70,_0x784bd3=await realpath(_0x4de58e),_0x388e9b=await Promise[_0x326fa2(0x191)](_0x2fa026[_0x326fa2(0x1f1)](_0x13dcf5=>realpath(_0x13dcf5))),_0x1c86c5=[...new Set([_0x784bd3,..._0x388e9b])],_0x4de2bf=_0x359b73===undefined?_0x388e9b[-0x2203+0xb7f*0x1+0x1684]??_0x784bd3:await realpath(_0x359b73),_0x1f380a=await stat(_0x4de2bf);if(!_0x1f380a[_0x326fa2(0x265)]()||!isWithinAllowedRoot(_0x4de2bf,_0x1c86c5))throw new Error(_0x326fa2(0x2a3));const _0x2af6c0=await readdir(_0x4de2bf,{'withFileTypes':!![]}),_0x20213d=[];for(const _0x20d75e of _0x2af6c0[_0x326fa2(0x24a)]((_0x96110c,_0x2859ec)=>_0x96110c[_0x326fa2(0x1db)][_0x326fa2(0x1ce)](_0x2859ec[_0x326fa2(0x1db)]))){if(!_0x20d75e[_0x326fa2(0x265)]()&&!_0x20d75e[_0x326fa2(0x1b8)]())continue;const _0x4c134a=await realpath(resolve(_0x4de2bf,_0x20d75e[_0x326fa2(0x1db)]))[_0x326fa2(0x19c)](()=>undefined);if(_0x4c134a===undefined||!isWithinAllowedRoot(_0x4c134a,_0x1c86c5))continue;const _0x1745ee=await stat(_0x4c134a)[_0x326fa2(0x19c)](()=>undefined);if(_0x1745ee===undefined||!_0x1745ee[_0x326fa2(0x265)]())continue;_0x20213d[_0x326fa2(0x21a)]({'path':_0x4c134a,'name':_0x20d75e[_0x326fa2(0x1db)],'selectable':isWithinAllowedRoot(_0x4c134a,_0x388e9b)});if(_0x20213d[_0x326fa2(0x1c3)]>DIRECTORY_PICKER_LIMIT)break;}const _0x3ecfaf=dirname(_0x4de2bf);return{'homePath':_0x784bd3,'currentPath':_0x4de2bf,'parentPath':_0x3ecfaf===_0x4de2bf||!isWithinAllowedRoot(_0x3ecfaf,_0x1c86c5)?null:_0x3ecfaf,'browseRoots':_0x388e9b,'selectable':isWithinAllowedRoot(_0x4de2bf,_0x388e9b),'entries':_0x20213d[_0x326fa2(0x190)](0x1*0xf76+0xf*-0xaf+-0x535*0x1,DIRECTORY_PICKER_LIMIT),'truncated':_0x20213d[_0x326fa2(0x1c3)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x5be896,_0x814eda='.',_0x288a2d,_0x4a1378=DIRECTORY_PAGE_LIMIT){const _0x4fb4bf=_0x29cc70;if(!Number[_0x4fb4bf(0x1eb)](_0x4a1378)||_0x4a1378<0x1*0xf8c+-0x1*0x20cf+0x1144||_0x4a1378>DIRECTORY_PAGE_LIMIT)throw new Error(_0x4fb4bf(0x266));const _0x53467b=await resolveRegisteredWorkspaceRoot(_0x5be896),_0x51b639=await resolveWorkspaceEntryFromCanonicalRoot(_0x53467b,_0x814eda,!![]),_0x5c4b7d=await readdir(_0x51b639,{'withFileTypes':!![]}),_0x3ab1e6=decodeDirectoryCursor(_0x288a2d,_0x814eda),_0xf9af7c=_0x5c4b7d[_0x4fb4bf(0x1fb)](_0x26fcd5=>_0x26fcd5[_0x4fb4bf(0x1db)]!==_0x4fb4bf(0x1ef)&&!isWorkspaceUploadTemporaryName(_0x26fcd5[_0x4fb4bf(0x1db)]))[_0x4fb4bf(0x1f1)](_0x5a229b=>_0x5a229b[_0x4fb4bf(0x1db)])[_0x4fb4bf(0x24a)]((_0x502d96,_0x5ae9e8)=>_0x502d96[_0x4fb4bf(0x1ce)](_0x5ae9e8)),_0x2d3a00=_0x3ab1e6===undefined?-0xe70+0x286*-0xa+0x4*0x9eb:_0xf9af7c[_0x4fb4bf(0x210)](_0x3a41d0=>_0x3a41d0>_0x3ab1e6);if(_0x3ab1e6!==undefined&&_0x2d3a00===-(0x2*0x819+-0xfa1*0x2+0xf11))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x3ad3d2=_0xf9af7c[_0x4fb4bf(0x190)](_0x2d3a00,_0x2d3a00+_0x4a1378),_0x7ebd76=[];for(const _0x5f15e5 of _0x3ad3d2){const _0x1034a0=await resolveWorkspaceEntry(_0x53467b,relative(_0x53467b,resolve(_0x51b639,_0x5f15e5)),![])[_0x4fb4bf(0x19c)](_0x58e7ff=>{if(isSkippableWorkspaceEntryError(_0x58e7ff))return undefined;throw _0x58e7ff;});if(_0x1034a0===undefined)continue;const _0x488df8=await lstat(_0x1034a0)[_0x4fb4bf(0x19c)](_0x1f902f=>{const _0x1b1d1a=_0x4fb4bf;if(_0x1f902f[_0x1b1d1a(0x28f)]===_0x1b1d1a(0x231))return undefined;throw _0x1f902f;});if(_0x488df8===undefined||!_0x488df8[_0x4fb4bf(0x257)]()&&!_0x488df8[_0x4fb4bf(0x265)]())continue;_0x7ebd76[_0x4fb4bf(0x21a)]({'path':relative(_0x53467b,_0x1034a0)[_0x4fb4bf(0x1f4)](sep)[_0x4fb4bf(0x24f)]('/'),'name':_0x5f15e5,'kind':_0x488df8[_0x4fb4bf(0x265)]()?_0x4fb4bf(0x217):_0x4fb4bf(0x2a0),'size':_0x488df8[_0x4fb4bf(0x257)]()?_0x488df8[_0x4fb4bf(0x281)]:null,'modifiedAt':_0x488df8[_0x4fb4bf(0x211)]});}const _0x310825=_0xf9af7c[_0x2d3a00+_0x3ad3d2[_0x4fb4bf(0x1c3)]];return{'entries':_0x7ebd76,'nextCursor':_0x310825===undefined||_0x3ad3d2[_0x4fb4bf(0x1c3)]===-0x83e*0x3+-0x2*0x127d+0x3db4?null:encodeDirectoryCursor(_0x814eda,_0x3ad3d2[_0x3ad3d2[_0x4fb4bf(0x1c3)]-(0x1a19+0x9f0+-0x8*0x481)]),'truncated':_0x310825!==undefined};}export async function mutateWorkspaceFile(_0xc1d377,_0x1f46f7){const _0xe20a79=_0x29cc70,_0x15adb9=await resolveRegisteredWorkspaceRoot(_0xc1d377);if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x294)||_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x22a)){const _0x5aacd5=await resolveNewWorkspaceEntry(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x294))await writeFile(_0x5aacd5,'',{'flag':'wx'});else await mkdir(_0x5aacd5);return{'path':workspaceRelativePath(_0x15adb9,_0x5aacd5)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);const _0x38f8f4=await resolveWorkspaceEntryMetadata(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);if(workspaceRelativePath(_0x15adb9,_0x38f8f4[_0xe20a79(0x2a2)])==='.')throw new Error(_0xe20a79(0x199));if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x1f9))return await rm(_0x38f8f4[_0xe20a79(0x2a2)],{'recursive':_0x38f8f4[_0xe20a79(0x23a)][_0xe20a79(0x265)](),'force':![]}),{'deleted':!![]};const _0x1774da=await resolveNewWorkspaceEntry(_0x15adb9,_0x1f46f7[_0xe20a79(0x285)]);if(_0x38f8f4[_0xe20a79(0x23a)][_0xe20a79(0x265)]()){const _0x367049=relative(_0x38f8f4[_0xe20a79(0x2a2)],_0x1774da);if(_0x367049===''||!isAbsolute(_0x367049)&&_0x367049!=='..'&&!_0x367049[_0xe20a79(0x28c)]('..'+sep))throw new Error(_0xe20a79(0x1bc));}return await rename(_0x38f8f4[_0xe20a79(0x2a2)],_0x1774da),{'path':workspaceRelativePath(_0x15adb9,_0x1774da)};}function _0x2e1c(){const _0x4b6952=['Aw5KzxHpzG','BgLTAxrZ','C29Tzq','kIOVlNn2zwX0zs1RAxqVkIO','su5wquXjrf9oqu1f','Chj1BMfIBguG','C3rYAw5NAwz5','ls1XDwLLDa','kIOVlNbUCg0VkIO','ls10B3bVlw9YzgvY','ntuWodyWq3PHBNDm','kIOVDMvUzg9YlYOQ','rKLmrv9ot1rFvevyva','v09ss1nqqunfx1bbveHFsu5wquXjra','Dg9tDhjPBMC','Dgv4Da','BM93','CMvZDg9Yzq','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','zgLZCg9Zzq','zMLUzeLUzgv4','BxrPBwvnCW','r0Lux1jfrL9jtLzbteLe','D2LUmZi','CMvSyxrPDMu','u1rbr0ve','lNbHCNq','reLsrunut1jz','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','A2LSBa','ChvZAa','yNL0zuXLBMD0Aa','kIOVzgLZDc8QkG','kIOVlMfUz3vSyxiVkIO','BwvYz2uTyMfZzq','Dw5Yzwy','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','r0Lux1DpuKTtuefdrq','C3rHBgu','BgLUDxG','Dg9mB3DLCKnHC2u','ruvysvnu','ywn0Aw9U','B2jQzwn0','yMfZzty0','C2HPzNq','q1jfqvrfx0rjuKvdve9swq','DhjPBq','Chj1BMfIBgu','CgLK','sevbrca','AgfZAa','ls1LEgnSDwrLlxn0yw5KyxjK','ru5pru5u','A2LUza','zMLUywXSEq','rvHju1rtx0rjuKvdve9swq','kIOVlM5LEhqVkIO','CMvMCMvZAef0DgvTChrLzef0','qureruq','r0Lux1DpuKTuuKvfx0Xju1rFsu5wquXjra','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','Bwv0ywrHDge','CxvLCNK','B2zMC2v0','DxbKyxrL','zgLMzG','DgLTzw91De1Z','B25Jzq','B3v0Chv0tgLTAxq','oIHSAxrLCMfSkq','zgLNzxn0','Bg9N','rKLmrv9ot1rFreLsrunut1jz','DgHLBG','ls13B3jRDhjLzq','ls1ZDgfNzwq','tu9esuzjruq','C29YDa','zw50CNLmAw1PDa','ls1UBY10zxH0y29UDG','yMLUyxj5igrPzMyGC2HHmJu2pq','CMvMCY9OzwfKCW','AM9PBG','CgfYC2u','ls1ICMfUy2G','CMvHza','Dhj1BMnHDgvK','kIOVlMDYywrSzs8QkG','BM9YBwfSAxPL','zMXHDe1HCa','AxngAwXL','kIOVB2jQlYOQ','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','ls1UBY1PBMrLEa','mtG2odi5nK5NBvjWEa','uKvbrfK','Bg9JA2vK','kIOVy292zxjHz2uVkIO','B3v0Chv0','DxrMltG','lMDPDc8','Aw5JBhvKzxm','DgvZDa','zNjVBq','AxneAxjLy3rVCNK','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','CMvMCW','uKvoqu1fra','kIOVlNr1CMjVlYOQ','lM1HCI11CgXVywqT','zxHLyW','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','lI4U','C2HHmJu2','CM9VDa','y3vYC29Y','BgLZDa','ls1Uyw1Llxn0yxr1CW','CMvMCY9OzwfKCY8','C2nVCMu','r0Lux1jfue9tsvrpuLLFsu5wquXjra','kIOVlM51EhqVkIO','CMvWBgfJzufSBa','rKLmrv9xuKLurv9dt05gteLdva','rKLmrv9ut09Ftefsr0u','q09qsuve','kIOVlNbHCMnLBc1JywnOzs8QkG','zw50CMLLCW','C3rYAw5N','rKLmrv9srvzju0LptL9jtLzbteLe','kIOVlNLHCM4VkIO','C2L6zq','zxHWAxj5vgLTzxi','zxjYB3i','ls1ZA2LWpq','zgvZDgLUyxrPB24','AwDUB3jL','nJK1mtuXse9rEhL1','DxrMoa','y2HHBMDLCW','yMfYzq','CMvIDwLSza','C3rHCNrZv2L0Aa','kIOVyNvPBgqVkIO','Dg9mB2nHBgvmB3DLCKnHC2u','y29Kzq','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','kIOVlNzLBNyVkIO','C3LTyM9SAwmTCMvM','BwvZC2fNzq','q1jfqvrfx0zjteu','kIOVDgvZDc9YDw5ZlYOQ','C2v0','yMLUyxj5','lM1HCI1LzgL0lq','l2rLDI9UDwXS','CMvMCY9Yzw1VDgvZlW','BgLTAxq','mteXmJq1nJfTwvL2Afa','y29UDgvUDenHBMrPzgf0zxm','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','Bw9Kzq','rKLmrq','rKLmrv9ot1rFrK9vtKq','Cgf0Aa','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','nta0odu1mgTrANvAvG','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','C3vIBw9KDwXL','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','vu5tvefhruq','CMvMCMvZAeLUqMfJA2DYB3vUza','ls1WB3jJzwXHAw49DJe','uKvnt1rf','ls1KyxrLlw9YzgvY','zxzLCNK','Dg9vChbLCKnHC2u','yNvIyMXLvxa','CMvHze9UBhK','kIOVyMLUlYOQ','C2LUA0rVD24','BhmTzMLSzxm','kIOVB3v0lYOQ','ls1UBY1JB21TAxqTAwq','y2XVC2u','ls1WB3jJzwXHAw4','kIOVx19WEwnHy2HLx18VkIO','Bg9HzgLUzW','pZ8G','rKLmrv9ot1rFuKvhvuXbuG','z2L0','ls1ICMfUy2HLCW','C2XPy2u','ywXS','zw5ZDxjLtg9HzgvK','ls11BNrYywnRzwqTzMLSzxm9ywXS','y29Uy2f0','rvHju1rtx0zjteu','Agv4','Bg9JA2vKia','z2v0','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','BgfZDeLUzgv4t2y','CgXHDgzVCM0','y2f0y2G','ls1YB290','te9dquW','y2fWywnPDhK','CgLWzq','yNjHBMnOia','C3rKB3v0','C2vHCMnOlMv4y2X1zgu','AxnjBNrLz2vY','zMLUza','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','ls1Yzw1VDgvZ','C2vHCMnO','ls1Yzwn1CNnPDMu','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','yMXVyG','zw50CNK','zM9YlwvHy2GTCMvM','ls1ZB3vYy2u9sevbra','vfLqrv9dsefor0ve','C3rHDhvZ','y2f0lwzPBgu','ls1UBY1LEhqTzgLMzG','u0Lhs0Lmta','yMfZzty0DxjS','rKLmrv9squ5hrv9jtLzbteLe','CMvMCY9Yzw1VDgvZ','C2HVDW','AxntEw1IB2XPy0XPBMS','vu5uuKfds0ve','Dg91y2G','mtaWnJqZmw9zC09yDq','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','kIOVlMDPDc8QkG','igj5DgvZpq','ls1MB3jTyxq9','ywrK','C3rKzxjY','ndu0otuXmeLttKrozq','BgvUz3rO','sevbra','revmrvrfra','ls1ZAg9YDa','kIOVlMnHy2HLlYOQ','kIOVDMvUDI8QkG','zNjLC2HUzxnZvhrStxm','zgf0yq','D29YA3nWywnLuM9VDa','ls12zxjPzNK','kIOVBM9Kzv9TB2r1BgvZlYOQ','Bg9JywXLq29TCgfYzq','C29YDgvK','lY5Flq','iYmG','ls1ZAg93lxrVCgXLDMvS','v09ss1nqqunfx05pvf9bteXpv0ve','Bwf4','AxnbyNnVBhv0zq','Aw52ywXPza','r0Lux0nptu1btKrFrKfjteve','rKLmrv9qqvrix0vtq0fqrq','D29YA3rYzwu','ls1VDgHLCNm','BMfTzq','BwLU','AwrSzvr0Be1Z','CMvMCMvZAgvKqxq','DMfSDwvZ','zMLUz2vYChjPBNq','ls1ZAg93lxn1CgvYChjVAMvJDc13B3jRAw5NlxrYzwu','ls1MAxjZDc1WyxjLBNq','zgLMzI10CMvL','qMLUyxj5igzPBgvZia','zgvJB2rL','C3vIyxjYyxK','ls1PCY1HBMnLC3rVCG','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','ls1TyxGTy291BNq9','ywXSB2nvBNnHzMu','AxntywzLsw50zwDLCG','CMv2lxbHCNnL','D29YA3rYzwuG','AgfZ','lMDPDa','CMvWBgfJzq','BwfW','zMXVB3i','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','C3bSAxq','kIOVDgfYz2v0lYOQ','rKLmrv9btfjfqurzx0vysvnuuW','ls1NAxqTy29TBw9UlwrPCG','zMLSzxmUzxHJBhvKzq','revmrvrf','zgLZCgXHEu5HBwu','zMLSDgvY'];_0x2e1c=function(){return _0x4b6952;};return _0x2e1c();}async function resolveNewWorkspaceEntry(_0x9eebd4,_0x2b9415){const _0x1e0ac1=_0x29cc70,_0x3b71e9=_0x2b9415[_0x1e0ac1(0x278)]('\x5c','/'),_0x2c6846=_0x3b71e9[_0x1e0ac1(0x1f4)]('/'),_0x461f41=_0x2c6846['at'](-(-0x2*-0x115a+-0xfe0+-0x12d3));if(_0x2b9415[_0x1e0ac1(0x262)]('\x00')||_0x3b71e9[_0x1e0ac1(0x28c)]('/')||isAbsolute(_0x2b9415)||win32[_0x1e0ac1(0x1d5)](_0x3b71e9)||_0x461f41===undefined||_0x461f41[_0x1e0ac1(0x1c3)]===-0x1*0x10d2+0x5f0*0x4+0x2*-0x377||_0x2c6846[_0x1e0ac1(0x1fe)](invalidWorkspaceMutationSegment))throw new Error(_0x1e0ac1(0x1d8));const _0x596962=_0x2c6846[_0x1e0ac1(0x1c3)]===0x1775+-0xb10+0x34*-0x3d?'.':_0x2c6846[_0x1e0ac1(0x190)](0x1869+0x77a+-0x1fe3,-(-0x1d78+-0xd7a+0x2af3))[_0x1e0ac1(0x24f)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0x9eebd4,_0x596962);const _0x22c352=await resolveWorkspaceEntryFromCanonicalRoot(_0x9eebd4,_0x596962,!![]),_0x535187=resolve(_0x22c352,_0x461f41);try{await lstat(_0x535187);throw new Error(_0x1e0ac1(0x1f6));}catch(_0x1ba871){if(_0x1ba871[_0x1e0ac1(0x28f)]!==_0x1e0ac1(0x231))throw _0x1ba871;}return _0x535187;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x43c72f,_0x7a77a1){const _0x4a104a=_0x29cc70,_0x5e4ae1=_0x7a77a1[_0x4a104a(0x278)]('\x5c','/');if(_0x5e4ae1==='.')return;const _0x13d1e7=_0x5e4ae1[_0x4a104a(0x1f4)]('/');if(_0x7a77a1[_0x4a104a(0x262)]('\x00')||_0x5e4ae1[_0x4a104a(0x28c)]('/')||isAbsolute(_0x7a77a1)||win32[_0x4a104a(0x1d5)](_0x5e4ae1)||_0x13d1e7[_0x4a104a(0x1fe)](invalidWorkspaceMutationSegment))throw new Error(_0x4a104a(0x1d8));let _0x205c39=_0x43c72f;for(const _0x48b3f7 of _0x13d1e7){_0x205c39=resolve(_0x205c39,_0x48b3f7);const _0x4ac267=await lstat(_0x205c39)[_0x4a104a(0x19c)](_0x31e72d=>{const _0xa65c09=_0x4a104a;if(_0x31e72d[_0xa65c09(0x28f)]===_0xa65c09(0x231))throw new Error(_0xa65c09(0x2a1));throw _0x31e72d;});if(_0x4ac267[_0x4a104a(0x1b8)]())throw new Error(_0x4a104a(0x1d8));}}function invalidWorkspaceMutationSegment(_0x58f994){const _0x3e6bbb=_0x29cc70;if(_0x58f994[_0x3e6bbb(0x1c3)]===-0x26*-0x35+-0x178e+0xfb0||_0x58f994==='.'||_0x58f994==='..'||_0x58f994===_0x3e6bbb(0x1ef))return!![];if(_0x292b67()!==_0x3e6bbb(0x213))return![];const _0x5bd459=_0x58f994[_0x3e6bbb(0x1f0)](/[. ]+$/u,'')[_0x3e6bbb(0x2ae)]();return/[<>:"|?*]/u[_0x3e6bbb(0x263)](_0x58f994)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x3e6bbb(0x263)](_0x5bd459);}function workspaceRelativePath(_0x44a18e,_0x31be67){const _0x3d8567=_0x29cc70,_0x55c9a5=relative(_0x44a18e,_0x31be67)[_0x3d8567(0x1f4)](sep)[_0x3d8567(0x24f)]('/');return _0x55c9a5[_0x3d8567(0x1c3)]===-0x2b*0xd3+0x1486*-0x1+0x37f7?'.':_0x55c9a5;}function isSkippableWorkspaceEntryError(_0xabd4f5){const _0x54c8b9=_0x29cc70;return _0xabd4f5 instanceof Error&&(_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x1d8)||_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x2a1)||_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x2bb));}export async function preflightWorkspaceUpload(_0x2eb45d,_0x796e9c,_0x1fb8a8){const _0x388eb9=_0x29cc70;if(_0x1fb8a8[_0x388eb9(0x1c3)]===-0xef*0x11+-0x167b*0x1+0x1*0x265a||_0x1fb8a8==='.'||_0x1fb8a8==='..'||_0x1fb8a8[_0x388eb9(0x262)]('\x00')||_0x1fb8a8[_0x388eb9(0x262)]('/')||_0x1fb8a8[_0x388eb9(0x262)]('\x5c')||isWorkspaceUploadTemporaryName(_0x1fb8a8))return{'path':'','absolutePath':'','status':_0x388eb9(0x200)};const _0x181d3d=await resolveRegisteredWorkspaceRoot(_0x2eb45d),_0x5395e7=await resolveWorkspaceEntry(_0x181d3d,_0x796e9c,!![]),_0x36d2a2=resolve(_0x5395e7,_0x1fb8a8);if(dirname(_0x36d2a2)!==_0x5395e7)throw new Error(_0x388eb9(0x1d8));const _0x1ea53e=relative(_0x181d3d,_0x36d2a2)[_0x388eb9(0x1f4)](sep)[_0x388eb9(0x24f)]('/'),_0x277708=await lstat(_0x36d2a2)[_0x388eb9(0x19c)](_0x5cbe69=>{const _0x6394b0=_0x388eb9;if(_0x5cbe69[_0x6394b0(0x28f)]===_0x6394b0(0x231))return undefined;throw _0x5cbe69;});if(_0x277708===undefined)return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x25c)};if(_0x277708[_0x388eb9(0x1b8)]())throw new Error(_0x388eb9(0x1d8));if(_0x277708[_0x388eb9(0x257)]())return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x195)};return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x234)};}export function workspaceUploadTemporaryName(_0x121bfe){const _0xde5648=_0x29cc70;return _0xde5648(0x26a)+_0x121bfe+_0xde5648(0x216);}function isWorkspaceUploadTemporaryName(_0x2271af){const _0x3de270=_0x29cc70;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0x3de270(0x263)](_0x2271af)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0x3de270(0x263)](_0x2271af);}export async function readWorkspaceTextFile(_0x3da08b,_0x166b7c,_0x53de70=0xd1f*-0x1+0x39a+0x985,_0xfb331=FILE_READ_LIMIT){const _0x1c740e=_0x29cc70;if(!Number[_0x1c740e(0x1eb)](_0x53de70)||_0x53de70<0x1c81+-0x25c7+-0x2*-0x4a3||!Number[_0x1c740e(0x1eb)](_0xfb331)||_0xfb331<-0x4*0x178+-0x5af+0xb90||_0xfb331>FILE_READ_LIMIT)throw new Error(_0x1c740e(0x1b5));const _0x14c1f0=await resolveRegisteredWorkspaceRoot(_0x3da08b),_0xf697c6=await resolveWorkspaceEntry(_0x14c1f0,_0x166b7c,![]),_0x1390f7=await lstat(_0xf697c6);if(!_0x1390f7[_0x1c740e(0x257)]())throw new Error(_0x1c740e(0x2bb));if(_0x1390f7[_0x1c740e(0x281)]>FILE_READ_LIMIT*(0x2b7*-0x2+0x1b8*-0x8+-0x6*-0x335))throw new Error(_0x1c740e(0x27a));const _0x3051ac=await readFile(_0xf697c6),_0x484054=createHash(_0x1c740e(0x26f))[_0x1c740e(0x23d)](_0x3051ac)[_0x1c740e(0x243)](_0x1c740e(0x196)),_0x21b174=_0x3051ac[_0x1c740e(0x262)](0x1f99+0x1c94*0x1+-0x4f*0xc3)||!isValidUtf8(_0x3051ac);if(_0x21b174){const _0x2b1df5=Math[_0x1c740e(0x1dc)](_0x3051ac[_0x1c740e(0x1c3)],_0x53de70+_0xfb331),_0x4f789b=_0x3051ac[_0x1c740e(0x1e6)](_0x53de70,_0x2b1df5);return{'path':relative(_0x14c1f0,_0xf697c6)[_0x1c740e(0x1f4)](sep)[_0x1c740e(0x24f)]('/'),'encoding':_0x1c740e(0x228),'size':_0x3051ac[_0x1c740e(0x1c3)],'content':_0x4f789b[_0x1c740e(0x20a)](_0x1c740e(0x228)),'truncated':_0x2b1df5<_0x3051ac[_0x1c740e(0x1c3)],'nextOffset':_0x2b1df5<_0x3051ac[_0x1c740e(0x1c3)]?_0x2b1df5:null,'revision':_0x484054};}if(_0x53de70>-0xc97+0xe*-0x1cf+0x25e9&&_0x53de70<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x53de70]))throw new Error(_0x1c740e(0x1b5));let _0x4694bc=Math[_0x1c740e(0x1dc)](_0x3051ac[_0x1c740e(0x1c3)],_0x53de70+_0xfb331);if(_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc])){while(_0x4694bc>_0x53de70&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc]))_0x4694bc-=0x7ec+-0x417+-0x2*0x1ea;if(_0x4694bc===_0x53de70){_0x4694bc+=-0x13b9+-0xce5*0x3+-0x313*-0x13;while(_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc]))_0x4694bc+=-0x19c6+-0x214f+0x1d8b*0x2;}}const _0x1dc1b3=_0x3051ac[_0x1c740e(0x1e6)](_0x53de70,_0x4694bc),_0x468bef=new TextDecoder(_0x1c740e(0x260),{'fatal':!![]})[_0x1c740e(0x1e5)](_0x1dc1b3),_0x110230=_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]?_0x4694bc:null;return{'path':relative(_0x14c1f0,_0xf697c6)[_0x1c740e(0x1f4)](sep)[_0x1c740e(0x24f)]('/'),'encoding':_0x1c740e(0x260),'size':_0x3051ac[_0x1c740e(0x1c3)],'content':_0x468bef,'truncated':_0x110230!==null,'nextOffset':_0x110230,'revision':_0x484054};}export async function writeWorkspaceTextFile(_0xc28e0,_0x13597d,_0x1d3b00,_0x371833){const _0x146615=_0x29cc70;if(!/^[0-9a-f]{64}$/u[_0x146615(0x263)](_0x371833))throw new Error(_0x146615(0x27f));const _0x5ed862=Buffer[_0x146615(0x264)](_0x1d3b00,_0x146615(0x288));if(_0x5ed862[_0x146615(0x1c3)]>FILE_READ_LIMIT*(0x3*-0x125+-0x1478*-0x1+0x18b*-0xb))throw new Error(_0x146615(0x27a));if(_0x5ed862[_0x146615(0x262)](0x3a1*0x8+0x1883+0x5f3*-0x9))throw new Error(_0x146615(0x208));const _0x3196ef=await resolveRegisteredWorkspaceRoot(_0xc28e0);await assertWorkspaceMutationPathHasNoSymlinks(_0x3196ef,_0x13597d);const _0x1c22a8=await resolveWorkspaceEntry(_0x3196ef,_0x13597d,![]),_0x551e40=await lstat(_0x1c22a8);if(!_0x551e40[_0x146615(0x257)]())throw new Error(_0x146615(0x2bb));const _0x52ae27=await readFile(_0x1c22a8);if(_0x52ae27[_0x146615(0x262)](-0x171d+-0x20e1+-0x955*-0x6)||!isValidUtf8(_0x52ae27))throw new Error(_0x146615(0x208));const _0x19c27a=createHash(_0x146615(0x26f))[_0x146615(0x23d)](_0x52ae27)[_0x146615(0x243)](_0x146615(0x196));if(_0x19c27a!==_0x371833)throw new Error(_0x146615(0x279));const _0x3b2cd7=createHash(_0x146615(0x26f))[_0x146615(0x23d)](_0x5ed862)[_0x146615(0x243)](_0x146615(0x196)),_0xb6ab47=resolve(dirname(_0x1c22a8),_0x146615(0x298)+randomUUID()+_0x146615(0x216));try{await writeFile(_0xb6ab47,_0x5ed862,{'flag':'wx','mode':_0x551e40[_0x146615(0x29f)]}),await rename(_0xb6ab47,_0x1c22a8);}finally{await rm(_0xb6ab47,{'force':!![]})[_0x146615(0x19c)](()=>undefined);}return{'path':workspaceRelativePath(_0x3196ef,_0x1c22a8),'revision':_0x3b2cd7,'size':_0x5ed862[_0x146615(0x1c3)]};}export async function readWorkspaceFileContentRange(_0x1b3675,_0x10dfe8,_0x247b86=-0x883+-0x10f9+0x4*0x65f,_0x5e89a0=FILE_READ_LIMIT){const _0x1d2099=_0x29cc70;if(!Number[_0x1d2099(0x1eb)](_0x247b86)||_0x247b86<0xad0*0x2+-0x10df+0x4c1*-0x1||!Number[_0x1d2099(0x1eb)](_0x5e89a0)||_0x5e89a0<0x19a5+-0x5f+0x1*-0x1945||_0x5e89a0>FILE_READ_LIMIT)throw new Error(_0x1d2099(0x1b5));const _0x38bfc7=await resolveRegisteredWorkspaceRoot(_0x1b3675),_0x1a4ab4=await resolveWorkspaceEntry(_0x38bfc7,_0x10dfe8,![]),_0x16b742=await lstat(_0x1a4ab4);if(!_0x16b742[_0x1d2099(0x257)]())throw new Error(_0x1d2099(0x2bb));if(_0x247b86>_0x16b742[_0x1d2099(0x281)])throw new Error(_0x1d2099(0x1b5));const _0x98f29d=Math[_0x1d2099(0x1dc)](_0x5e89a0,_0x16b742[_0x1d2099(0x281)]-_0x247b86),_0x1623d2=Buffer[_0x1d2099(0x1ea)](_0x98f29d),_0xacee63=await open(_0x1a4ab4,'r');try{const {bytesRead:_0x2dbdcd}=await _0xacee63[_0x1d2099(0x252)](_0x1623d2,-0xe1c+-0x980+0x179c,_0x98f29d,_0x247b86),_0x447781=_0x247b86+_0x2dbdcd;return{'path':relative(_0x38bfc7,_0x1a4ab4)[_0x1d2099(0x1f4)](sep)[_0x1d2099(0x24f)]('/'),'size':_0x16b742[_0x1d2099(0x281)],'offset':_0x247b86,'contentBase64':_0x1623d2[_0x1d2099(0x1e6)](-0xf9e+-0xb07+-0x13*-0x167,_0x2dbdcd)[_0x1d2099(0x20a)](_0x1d2099(0x228)),'nextOffset':_0x447781<_0x16b742[_0x1d2099(0x281)]?_0x447781:null};}finally{await _0xacee63[_0x1d2099(0x2b6)]();}}export async function readAllowedFileContentRange(_0x482836,_0x6530e5,_0x597f38=0x21b7+0x94d+-0x2b04,_0x2d9d27=FILE_READ_LIMIT){const _0x4cf5d4=_0x29cc70;if(!Number[_0x4cf5d4(0x1eb)](_0x597f38)||_0x597f38<0x10a9+-0x6c7*-0x2+0x5*-0x60b||!Number[_0x4cf5d4(0x1eb)](_0x2d9d27)||_0x2d9d27<0x8*-0x1d8+0x1663+0x1*-0x7a2||_0x2d9d27>FILE_READ_LIMIT)throw new Error(_0x4cf5d4(0x1b5));const {file:_0x24c6ba,metadata:_0x3fb09a}=await resolveAllowedFile(_0x482836,_0x6530e5);if(_0x597f38>_0x3fb09a[_0x4cf5d4(0x281)])throw new Error(_0x4cf5d4(0x1b5));const _0x42027c=Math[_0x4cf5d4(0x1dc)](_0x2d9d27,_0x3fb09a[_0x4cf5d4(0x281)]-_0x597f38),_0x3ef541=Buffer[_0x4cf5d4(0x1ea)](_0x42027c),_0x445a60=await open(_0x24c6ba,'r');try{const {bytesRead:_0x5515c2}=await _0x445a60[_0x4cf5d4(0x252)](_0x3ef541,0x9b3+0x1c0a+-0x25bd*0x1,_0x42027c,_0x597f38),_0x434ac3=_0x597f38+_0x5515c2;return{'path':_0x24c6ba,'size':_0x3fb09a[_0x4cf5d4(0x281)],'offset':_0x597f38,'contentBase64':_0x3ef541[_0x4cf5d4(0x1e6)](0xcdc*-0x3+0x7*0xe1+0x206d,_0x5515c2)[_0x4cf5d4(0x20a)](_0x4cf5d4(0x228)),'nextOffset':_0x434ac3<_0x3fb09a[_0x4cf5d4(0x281)]?_0x434ac3:null};}finally{await _0x445a60[_0x4cf5d4(0x2b6)]();}}export async function readAllowedTextFile(_0x2dc23f,_0x3f8479,_0x95b23d=0x1*-0xcc7+0x1d4c+-0x1085,_0x4b1b36=FILE_READ_LIMIT){const _0x5abfb0=_0x29cc70,{file:_0x5f0a93,metadata:_0x2a8f18}=await resolveAllowedFile(_0x2dc23f,_0x3f8479);if(_0x2a8f18[_0x5abfb0(0x281)]>FILE_READ_LIMIT*(0x34*-0xa+0x907*-0x2+0x1426))throw new Error(_0x5abfb0(0x27a));if(!Number[_0x5abfb0(0x1eb)](_0x95b23d)||_0x95b23d<0x94*0x20+0xd*0x1b7+-0x28cb||!Number[_0x5abfb0(0x1eb)](_0x4b1b36)||_0x4b1b36<-0x1551+-0x1*0x1764+0x76*0x61||_0x4b1b36>FILE_READ_LIMIT)throw new Error(_0x5abfb0(0x1b5));const _0x32316e=await readFile(_0x5f0a93),_0x32d02c=_0x32316e[_0x5abfb0(0x262)](-0x2053+-0xf18+0x2f6b)||!isValidUtf8(_0x32316e),_0x42f46e=Math[_0x5abfb0(0x1dc)](_0x32316e[_0x5abfb0(0x1c3)],_0x95b23d+_0x4b1b36);if(_0x32d02c){const _0x26407f=_0x32316e[_0x5abfb0(0x1e6)](_0x95b23d,_0x42f46e);return{'path':_0x5f0a93,'encoding':_0x5abfb0(0x228),'size':_0x32316e[_0x5abfb0(0x1c3)],'content':_0x26407f[_0x5abfb0(0x20a)](_0x5abfb0(0x228)),'truncated':_0x42f46e<_0x32316e[_0x5abfb0(0x1c3)],'nextOffset':_0x42f46e<_0x32316e[_0x5abfb0(0x1c3)]?_0x42f46e:null};}if(_0x95b23d>0x1ce7+0x1919+0x3*-0x1200&&_0x95b23d<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x95b23d]))throw new Error(_0x5abfb0(0x1b5));let _0x3ea016=_0x42f46e;if(_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x3ea016])){while(_0x3ea016>_0x95b23d&&isUtf8ContinuationByte(_0x32316e[_0x3ea016]))_0x3ea016-=0x1ea0+-0x25f*-0x7+0x4*-0xbce;if(_0x3ea016===_0x95b23d){_0x3ea016+=-0x70*-0x18+-0x26ff+-0x1c80*-0x1;while(_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x3ea016]))_0x3ea016+=0xb*-0x1c4+0x1*-0x559+0x18c6;}}const _0x48dbfa=_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]?_0x3ea016:null;return{'path':_0x5f0a93,'encoding':_0x5abfb0(0x260),'size':_0x32316e[_0x5abfb0(0x1c3)],'content':new TextDecoder(_0x5abfb0(0x260),{'fatal':!![]})[_0x5abfb0(0x1e5)](_0x32316e[_0x5abfb0(0x1e6)](_0x95b23d,_0x3ea016)),'truncated':_0x48dbfa!==null,'nextOffset':_0x48dbfa};}export function normalizeFilePreviewPath(_0x30076b){const _0x3925f5=_0x29cc70;if(!/^sandbox:/iu[_0x3925f5(0x263)](_0x30076b))return _0x30076b;let _0x1770cb;try{_0x1770cb=decodeURIComponent(_0x30076b[_0x3925f5(0x190)](_0x30076b[_0x3925f5(0x1fc)](':')+(-0x2060+0x1e95*0x1+0x73*0x4)));}catch{throw new Error(_0x3925f5(0x1d8));}const _0x137a65=_0x1770cb[_0x3925f5(0x1f0)](/^\/([a-z]:[\\/])/iu,'$1');if(_0x137a65[_0x3925f5(0x1c3)]===0x2f5+0x7*0x2e6+-0x173f||/^[\\/]{2,}[?.](?:[\\/]|$)/u[_0x3925f5(0x263)](_0x1770cb)||!isAbsolute(_0x137a65)&&!win32[_0x3925f5(0x1d5)](_0x137a65)||_0x137a65[_0x3925f5(0x262)]('\x00')||_0x137a65[_0x3925f5(0x262)]('?')||_0x137a65[_0x3925f5(0x262)]('#'))throw new Error(_0x3925f5(0x1d8));return _0x137a65;}async function resolveAllowedFile(_0x23a5fc,_0x189758){const _0x572955=_0x29cc70;if(!isAbsolute(_0x23a5fc))throw new Error(_0x572955(0x1d8));const _0x4329da=await realpath(_0x23a5fc)[_0x572955(0x19c)](_0xe683e2=>{const _0x18b4d6=_0x572955;if(_0xe683e2[_0x18b4d6(0x28f)]===_0x18b4d6(0x231))throw new Error(_0x18b4d6(0x2a1));throw _0xe683e2;}),_0x45a4e1=await Promise[_0x572955(0x191)](_0x189758[_0x572955(0x1f1)](_0x59e490=>realpath(_0x59e490)));if(!isWithinAllowedRoot(_0x4329da,_0x45a4e1))throw new Error(_0x572955(0x1d8));const _0x2762f5=await lstat(_0x4329da);if(!_0x2762f5[_0x572955(0x257)]())throw new Error(_0x572955(0x2bb));return{'file':_0x4329da,'metadata':_0x2762f5};}function isValidUtf8(_0x3a60be){const _0x1aad94=_0x29cc70;try{return new TextDecoder(_0x1aad94(0x260),{'fatal':!![]})[_0x1aad94(0x1e5)](_0x3a60be),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x1ddd3d){return(_0x1ddd3d&0x214e+-0x1fcd+0x1*-0xc1)===0xb68+-0x752+-0x396;}export async function searchWorkspaceFiles(_0x3f3d4e,_0x4583da,_0x201c3b,_0x27097d=SEARCH_RESULT_LIMIT,_0x1a030a=![]){const _0x42e229=_0x29cc70,_0x23e5f1=new WorkspaceFileIndex(_0x3f3d4e);try{return await _0x23e5f1[_0x42e229(0x1a8)](_0x4583da,_0x201c3b,_0x27097d,_0x1a030a);}finally{_0x23e5f1[_0x42e229(0x20f)]();}}async function resolveRegisteredWorkspaceRoot(_0x1b20af){const _0x54dbcd=_0x29cc70,_0x5f5b04=await realpath(_0x1b20af);if(normalizeWorkspacePath(_0x5f5b04)!==normalizeWorkspacePath(_0x1b20af))throw new Error(_0x54dbcd(0x1d3));return _0x5f5b04;}async function resolveWorkspaceEntry(_0x3fe028,_0x38a347,_0x183e36){const _0x5a8993=await resolveRegisteredWorkspaceRoot(_0x3fe028);return resolveWorkspaceEntryFromCanonicalRoot(_0x5a8993,_0x38a347,_0x183e36);}async function resolveWorkspaceEntryFromCanonicalRoot(_0x1cfa46,_0x445455,_0x19d908){const _0x59cad4=_0x29cc70,_0x63c43a=await resolveWorkspaceEntryMetadata(_0x1cfa46,_0x445455);if(_0x19d908?!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x265)]():!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x257)]()&&!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x265)]())throw new Error(_0x19d908?_0x59cad4(0x245):_0x59cad4(0x2bb));return _0x63c43a[_0x59cad4(0x2a2)];}async function resolveWorkspaceEntryMetadata(_0x5e7805,_0x2f57c8){const _0x2ff857=_0x29cc70;if(_0x2f57c8[_0x2ff857(0x262)]('\x00')||_0x2f57c8[_0x2ff857(0x1c3)]===-0x81+0x10*-0x1fb+0x1*0x2031||_0x2f57c8[_0x2ff857(0x28c)]('/')||_0x2f57c8[_0x2ff857(0x28c)]('\x5c'))throw new Error(_0x2ff857(0x1d8));const _0x34d7f1=_0x2f57c8[_0x2ff857(0x278)]('\x5c','/');if(_0x34d7f1[_0x2ff857(0x1f4)]('/')[_0x2ff857(0x1fe)](_0x1e3fe7=>_0x1e3fe7==='..'||_0x1e3fe7===_0x2ff857(0x1ef)))throw new Error(_0x2ff857(0x1d8));let _0x4c9fe5;try{_0x4c9fe5=await realpath(resolve(_0x5e7805,_0x34d7f1));}catch(_0x594e02){if(_0x594e02[_0x2ff857(0x28f)]===_0x2ff857(0x231))throw new Error(_0x2ff857(0x2a1));throw _0x594e02;}const _0x7c6eca=relative(_0x5e7805,_0x4c9fe5);if(isAbsolute(_0x7c6eca)||_0x7c6eca[_0x2ff857(0x28c)]('..')||_0x7c6eca==='..'||_0x7c6eca[_0x2ff857(0x28c)]('..'+sep))throw new Error(_0x2ff857(0x1d8));const _0x4c91b9=await lstat(_0x4c9fe5);return{'path':_0x4c9fe5,'metadata':_0x4c91b9};}async function inspectWorkspaceIndexEntry(_0x201612,_0x1f6130,_0x3cdcd2){const _0x5aa83c=_0x29cc70;try{const _0x2355e1=await resolveWorkspaceEntryMetadata(_0x201612,_0x1f6130);if(!_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x257)]()&&!_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x265)]())return undefined;const _0x3228b1=relative(_0x201612,_0x2355e1[_0x5aa83c(0x2a2)])[_0x5aa83c(0x1f4)](sep)[_0x5aa83c(0x24f)]('/');return _0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x265)]()?{'path':_0x3228b1,'name':_0x3cdcd2,'kind':_0x5aa83c(0x217),'size':null,'modifiedAt':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x211)]}:{'path':_0x3228b1,'name':_0x3cdcd2,'kind':_0x5aa83c(0x2a0),'size':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x281)],'modifiedAt':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x211)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x337d1d,_0x581337){const _0x55f65a=_0x29cc70;return Buffer[_0x55f65a(0x264)](JSON[_0x55f65a(0x202)]({'path':_0x337d1d,'name':_0x581337}))[_0x55f65a(0x20a)](_0x55f65a(0x1b4));}function decodeDirectoryCursor(_0x2253ef,_0x3a7201){const _0x29d81e=_0x29cc70;if(_0x2253ef===undefined)return undefined;try{const _0x157c95=JSON[_0x29d81e(0x250)](Buffer[_0x29d81e(0x264)](_0x2253ef,_0x29d81e(0x1b4))[_0x29d81e(0x20a)](_0x29d81e(0x288)));if(typeof _0x157c95!==_0x29d81e(0x227)||_0x157c95===null||_0x157c95[_0x29d81e(0x2a2)]!==_0x3a7201||typeof _0x157c95[_0x29d81e(0x1db)]!==_0x29d81e(0x27e))throw new Error();return _0x157c95[_0x29d81e(0x1db)];}catch{throw new Error(_0x29d81e(0x266));}}function encodeSearchCursor(_0x4597f4,_0x55419f){const _0x4ee3f4=_0x29cc70;return Buffer[_0x4ee3f4(0x264)](JSON[_0x4ee3f4(0x202)]({'query':_0x4597f4,'path':_0x55419f}))[_0x4ee3f4(0x20a)](_0x4ee3f4(0x1b4));}function decodeSearchCursor(_0x561a18,_0x18c410){const _0xdc69a0=_0x29cc70;if(_0x561a18===undefined)return undefined;try{const _0x4353f8=JSON[_0xdc69a0(0x250)](Buffer[_0xdc69a0(0x264)](_0x561a18,_0xdc69a0(0x1b4))[_0xdc69a0(0x20a)](_0xdc69a0(0x288)));if(typeof _0x4353f8!==_0xdc69a0(0x227)||_0x4353f8===null||_0x4353f8[_0xdc69a0(0x23b)]!==_0x18c410||typeof _0x4353f8[_0xdc69a0(0x2a2)]!==_0xdc69a0(0x27e))throw new Error();return _0x4353f8[_0xdc69a0(0x2a2)];}catch{throw new Error(_0xdc69a0(0x266));}}export function normalizeWorkspacePath(_0x521c6e,_0xa7ceb0=_0x292b67()){const _0x3ed668=_0x29cc70;if(_0x521c6e[_0x3ed668(0x1c3)]===0x7*0x4ae+0x233*0x5+-0x2bc1||_0x521c6e[_0x3ed668(0x262)]('\u0000'))throw new Error(_0x3ed668(0x209));if(_0xa7ceb0===_0x3ed668(0x213)){if(/^\\\\[?.]/[_0x3ed668(0x263)](_0x521c6e))throw new Error(_0x3ed668(0x218));const _0x29ec33=win32[_0x3ed668(0x255)](_0x521c6e[_0x3ed668(0x278)]('/','\x5c'));if(!win32[_0x3ed668(0x1d5)](_0x29ec33))throw new Error(_0x3ed668(0x2a7));return _0x29ec33[_0x3ed668(0x1f0)](/\\+$/,'')[_0x3ed668(0x224)]();}if(_0xa7ceb0!==_0x3ed668(0x223))throw new Error(_0x3ed668(0x2a5));const _0x2cb9c7=posix[_0x3ed668(0x255)](_0x521c6e);if(!posix[_0x3ed668(0x1d5)](_0x2cb9c7))throw new Error(_0x3ed668(0x2a7));return _0x2cb9c7==='/'?_0x2cb9c7:_0x2cb9c7[_0x3ed668(0x1f0)](/\/+$/,'');}export function isWithinAllowedRoot(_0x4d3693,_0x9c3383,_0x5b1a34=_0x292b67()){const _0x1081d0=_0x29cc70,_0x5b0b99=normalizeWorkspacePath(_0x4d3693,_0x5b1a34),_0x196902=_0x5b1a34===_0x1081d0(0x213)?win32:posix;return _0x9c3383[_0x1081d0(0x1fe)](_0x377d8f=>{const _0x36eeb2=_0x1081d0,_0x8b176=normalizeWorkspacePath(_0x377d8f,_0x5b1a34),_0x27d064=_0x196902[_0x36eeb2(0x214)](_0x8b176,_0x5b0b99);return _0x27d064===''||!_0x27d064[_0x36eeb2(0x28c)]('..')&&!_0x196902[_0x36eeb2(0x1d5)](_0x27d064);});}export async function inspectWorkspace(_0xb0b5e1,_0x13b318){const _0xfe146e=_0x29cc70,_0x57a625=await realpath(_0xb0b5e1),_0x300914=await Promise[_0xfe146e(0x191)](_0x13b318[_0xfe146e(0x1f1)](_0x166775=>realpath(_0x166775))),_0x1a4b4e=await stat(_0x57a625);if(!_0x1a4b4e[_0xfe146e(0x265)]()||!isWithinAllowedRoot(_0x57a625,_0x300914))throw new Error(_0xfe146e(0x1d3));try{const _0x509a58=await readGitSummary(_0x57a625);return{'path':_0x57a625,'kind':_0xfe146e(0x221),'gitSummary':_0x509a58};}catch(_0x43053f){if(_0x43053f instanceof GitCommandError&&_0x43053f[_0xfe146e(0x28f)]===-0xdb+-0x38*0x7+0x2e3||isGitUnavailable(_0x43053f))return{'path':_0x57a625,'kind':_0xfe146e(0x217)};throw _0x43053f;}}export async function readGitSummary(_0x1dc27f){const _0x184975=_0x29cc70,_0x4b5e2d=(await runReadOnlyGit(_0x1dc27f,[_0x184975(0x1ec),_0x184975(0x1f7)]))[_0x184975(0x20b)][_0x184975(0x22b)](),_0x1dfcee=await runReadOnlyGitAllowFailure(_0x1dc27f,[_0x184975(0x1ec),_0x184975(0x1cc),_0x184975(0x1c4)]),_0x47643f=await runReadOnlyGitAllowFailure(_0x1dc27f,[_0x184975(0x292),_0x184975(0x203),_0x184975(0x1c6),_0x184975(0x1c4)]),_0x44874f={'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT},_0xac54a8=await runReadOnlyGit(_0x1dc27f,[_0x184975(0x1b0),_0x184975(0x2aa)],_0x44874f);return{'commonDir':_0x4b5e2d,'head':_0x1dfcee[_0x184975(0x28f)]===-0x10*-0x53+0x8*0x173+-0x2cc*0x6?_0x1dfcee[_0x184975(0x20b)][_0x184975(0x22b)]():'','branch':_0x47643f[_0x184975(0x28f)]===0x18fe*-0x1+0xdde+0xb20?_0x47643f[_0x184975(0x20b)][_0x184975(0x22b)]():null,'dirty':_0xac54a8[_0x184975(0x25f)][_0x184975(0x1c3)]>0x58c+0x100d+-0x1599,'snapshot':summarizeText(_0xac54a8[_0x184975(0x20b)])};}export function assertSafeGitRef(_0x4d4f23){const _0x535f7c=_0x29cc70;if(!REF_PATTERN[_0x535f7c(0x263)](_0x4d4f23))throw new Error(_0x535f7c(0x212));}export async function readRestrictedDiff(_0x270768,_0x193b4d,_0x214d11){const _0x446b38=_0x29cc70;assertSafeGitRef(_0x193b4d),assertSafeGitRef(_0x214d11);const _0x410b19=await runReadOnlyGit(_0x270768,[_0x446b38(0x23e),_0x446b38(0x1b2),_0x446b38(0x24c),_0x193b4d,_0x214d11]),_0xde80f9=_0x410b19[_0x446b38(0x25f)][_0x446b38(0x262)](-0x1*0x1f33+-0x7c*-0x11+0x16f7)||_0x410b19[_0x446b38(0x20b)][_0x446b38(0x262)](_0x446b38(0x1e4));if(_0xde80f9)return{'binary':!![],'summary':_0x446b38(0x24d)+createHash(_0x446b38(0x26f))[_0x446b38(0x23d)](_0x410b19[_0x446b38(0x25f)])[_0x446b38(0x243)](_0x446b38(0x196))+_0x446b38(0x1be)+_0x410b19[_0x446b38(0x25f)][_0x446b38(0x1c3)],'truncated':_0x410b19[_0x446b38(0x253)]};return{'binary':![],'text':_0x410b19[_0x446b38(0x20b)],'truncated':_0x410b19[_0x446b38(0x253)]};}function currentBranchFromStatusHeader(_0x239f42){const _0x6e6bf5=_0x29cc70,_0x440bd8=_0x239f42[_0x6e6bf5(0x190)](0x23c6*-0x1+0xc7*-0xd+0x2de4);if(_0x440bd8[_0x6e6bf5(0x28c)](_0x6e6bf5(0x22e)))return null;const _0x2a305a=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x6e6bf5(0x26b)](_0x440bd8);if(_0x2a305a!==null)return _0x2a305a[0x2383+0xb*-0x168+-0x156*0xf]??null;return _0x440bd8[_0x6e6bf5(0x1f4)](_0x6e6bf5(0x26e))[-0x53*0x53+0x137*0x13+-0xa*-0x62]?.[_0x6e6bf5(0x1f4)]('\x20')[-0x66d+0x1d*0x99+-0xae8]??null;}export async function listGitWorktrees(_0x4ab771){const _0x6c9f32=_0x29cc70,_0x3e0b46=await runReadOnlyGit(_0x4ab771,[_0x6c9f32(0x1d9),_0x6c9f32(0x272),_0x6c9f32(0x2b7),'-z'],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x3e1ad3=normalizeWorkspacePath(await realpath(_0x4ab771)),_0x5df003=[];let _0x4ae625=_0x3e0b46[_0x6c9f32(0x253)];for(const _0x20ac18 of _0x3e0b46[_0x6c9f32(0x20b)][_0x6c9f32(0x1f4)]('\x00\x00')){if(_0x20ac18[_0x6c9f32(0x1c3)]===-0x23d8+0xcb1+0x1727)continue;if(_0x5df003[_0x6c9f32(0x1c3)]>=GIT_WORKTREE_LIST_LIMIT){_0x4ae625=!![];break;}const _0x38d57a=_0x20ac18[_0x6c9f32(0x1f4)]('\x00')[_0x6c9f32(0x1fb)](_0x314bcf=>_0x314bcf[_0x6c9f32(0x1c3)]>0xcae+0x13ca+-0x2*0x103c);if(_0x38d57a[_0x6c9f32(0x1fe)](_0x1275c1=>_0x1275c1===_0x6c9f32(0x28a)))continue;const _0x4e1269=_0x38d57a[_0x6c9f32(0x1a5)](_0x1b16f1=>_0x1b16f1[_0x6c9f32(0x28c)](_0x6c9f32(0x1ed))),_0x486a44=_0x38d57a[_0x6c9f32(0x1a5)](_0x10b0dc=>_0x10b0dc[_0x6c9f32(0x28c)](_0x6c9f32(0x22e))),_0x45f1ac=_0x4e1269?.[_0x6c9f32(0x190)](_0x6c9f32(0x1ed)[_0x6c9f32(0x1c3)]),_0x45eb82=_0x486a44?.[_0x6c9f32(0x190)](_0x6c9f32(0x22e)[_0x6c9f32(0x1c3)]);if(_0x45f1ac===undefined||_0x45f1ac[_0x6c9f32(0x1c3)]===-0xeef*0x1+-0x1ac7+-0x14db*-0x2||_0x45eb82===undefined||!/^[0-9a-f]{40,64}$/u[_0x6c9f32(0x263)](_0x45eb82)){if(_0x3e0b46[_0x6c9f32(0x253)]){_0x4ae625=!![];continue;}throw new Error(_0x6c9f32(0x238));}const _0x61f556=_0x38d57a[_0x6c9f32(0x1a5)](_0x441df1=>_0x441df1[_0x6c9f32(0x28c)](_0x6c9f32(0x1a1))),_0x1b7889=_0x61f556?.[_0x6c9f32(0x190)](_0x6c9f32(0x1a1)[_0x6c9f32(0x1c3)]),_0x44f9f1=_0x1b7889===undefined?null:_0x1b7889[_0x6c9f32(0x28c)](_0x6c9f32(0x274))?_0x1b7889[_0x6c9f32(0x190)](_0x6c9f32(0x274)[_0x6c9f32(0x1c3)]):_0x1b7889,_0x50ab8d=(basename(_0x45f1ac)[_0x6c9f32(0x22b)]()||_0x44f9f1||_0x45eb82[_0x6c9f32(0x190)](0x6d0*-0x1+0xf*-0x9e+0x2*0x809,-0x27b+-0x1*-0x11c3+-0xf3c))[_0x6c9f32(0x190)](0x1c38+0x3*-0x8ac+-0x234,-0x1127*-0x1+-0xd91+-0x196);_0x5df003[_0x6c9f32(0x21a)]({'path':_0x45f1ac,'directoryName':_0x50ab8d,'branch':_0x44f9f1,'head':_0x45eb82,'current':normalizeWorkspacePath(_0x45f1ac)===_0x3e1ad3,'locked':_0x38d57a[_0x6c9f32(0x1fe)](_0x27ae9f=>_0x27ae9f===_0x6c9f32(0x25d)||_0x27ae9f[_0x6c9f32(0x28c)](_0x6c9f32(0x197))),'prunable':_0x38d57a[_0x6c9f32(0x1fe)](_0x2f49f5=>_0x2f49f5===_0x6c9f32(0x22c)||_0x2f49f5[_0x6c9f32(0x28c)](_0x6c9f32(0x201)))});}return{'entries':_0x5df003,'truncated':_0x4ae625};}export async function readCurrentChangesSummary(_0x5cabad){const _0x22426b=_0x29cc70,_0x557fdf=await runReadOnlyGit(_0x5cabad,[_0x22426b(0x1b0),_0x22426b(0x2aa),'-z',_0x22426b(0x251),_0x22426b(0x193)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x16f326=_0x557fdf[_0x22426b(0x20b)][_0x22426b(0x1f4)]('\x00'),_0xf921e5=_0x16f326[_0x22426b(0x229)]()??'',_0x1c6f03=[];for(let _0x209009=-0xb2+0x1161+-0x10af;_0x209009<_0x16f326[_0x22426b(0x1c3)];_0x209009+=0xfee+-0x1*-0x1846+-0x2833*0x1){const _0x4ce20f=_0x16f326[_0x209009];if(_0x4ce20f[_0x22426b(0x1c3)]<0x1*-0x2467+0x1*-0xb47+0x2fb2)continue;const _0x5e49a7=_0x4ce20f[-0x1*0x13+0x1*-0x1f6f+-0x4a*-0x6d],_0x458446=_0x4ce20f[-0x311*0xc+-0x220e+-0x1*-0x46db],_0xc73dbf=_0x4ce20f[_0x22426b(0x190)](0x423*0x2+0x2*0x10db+0x29f9*-0x1);if(_0x5e49a7==='?'&&_0x458446==='?'){_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x1b9),'change':_0x22426b(0x237)});continue;}_0x5e49a7!=='\x20'&&_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x215),'change':gitChange(_0x5e49a7)});_0x458446!=='\x20'&&_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x2a8),'change':gitChange(_0x458446)});if(_0x5e49a7==='R'||_0x5e49a7==='C'||_0x458446==='R'||_0x458446==='C')_0x209009+=0x4b6+0x1eff+0x2*-0x11da;}return{'branch':_0xf921e5[_0x22426b(0x28c)](_0x22426b(0x1d1))?currentBranchFromStatusHeader(_0xf921e5):null,'changes':_0x1c6f03};}export async function listInitializedSubmodulePaths(_0x2ebb61){const _0x18f31f=_0x29cc70,_0x4be35f=await runReadOnlyGit(_0x2ebb61,[_0x18f31f(0x2a6),_0x18f31f(0x1b0),_0x18f31f(0x1a9)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x4be35f[_0x18f31f(0x20b)][_0x18f31f(0x1f4)](/\r?\n/)[_0x18f31f(0x256)](_0x5c6e3b=>{const _0x440ef7=_0x18f31f;if(_0x5c6e3b[_0x440ef7(0x1c3)]<-0x204d*-0x1+-0x9f1*0x1+-0x1*0x1632)return[];const _0x359c44=_0x5c6e3b[0x1dd3+0x4a6+-0x2279];if(_0x359c44==='-')return[];const _0x5e8f4e=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0x440ef7(0x26b)](_0x5c6e3b),_0x35ee52=_0x5e8f4e?.[-0x24bb*0x1+-0x5b*-0x45+-0x19*-0x7d]?.[_0x440ef7(0x278)]('\x5c','/');return _0x35ee52===undefined||_0x35ee52[_0x440ef7(0x1c3)]===0x1*-0xecf+0x8b3+0x61c?[]:[_0x35ee52];})[_0x18f31f(0x24a)]((_0x43df5d,_0x264cb6)=>_0x43df5d[_0x18f31f(0x1ce)](_0x264cb6));}export async function resolveGitRepository(_0x3d54a0,_0x573b8d,_0xc58968){const _0xc67b66=_0x29cc70,_0x3fd2ad=await realpath(_0x3d54a0);if(_0x573b8d[_0xc67b66(0x1c3)]===0x13a6+-0x1*-0x7a2+-0x12*0x184)return _0x3fd2ad;if(_0x573b8d[_0xc67b66(0x262)]('\x00')||_0x573b8d[_0xc67b66(0x28c)]('/')||_0x573b8d[_0xc67b66(0x28c)]('\x5c')||_0x573b8d[_0xc67b66(0x1f4)]('/')[_0xc67b66(0x1fe)](_0x112c8c=>_0x112c8c[_0xc67b66(0x1c3)]===-0x11ae+0x89e*0x2+-0x2*-0x39||_0x112c8c==='.'||_0x112c8c==='..'))throw new Error(_0xc67b66(0x276));try{const _0x56d8ef=resolve(_0x3fd2ad,_0x573b8d),_0x2a79b6=await realpath(_0x56d8ef);if(normalizeWorkspacePath(_0x56d8ef)!==normalizeWorkspacePath(_0x2a79b6)||!isWithinAllowedRoot(_0x2a79b6,[_0x3fd2ad]))throw new Error(_0xc67b66(0x1d6));if(_0xc58968!==undefined){if(!_0xc58968[_0xc67b66(0x262)](_0x573b8d))throw new Error(_0xc67b66(0x1d6));return _0x2a79b6;}return await assertGitSuperprojectChain(_0x3fd2ad,_0x2a79b6),_0x2a79b6;}catch{throw new Error(_0xc67b66(0x276));}}async function assertGitSuperprojectChain(_0x1de492,_0xab1640){const _0x1a7c8a=_0x29cc70,_0x44088c=normalizeWorkspacePath(_0x1de492);let _0x2f3c76=_0xab1640;const _0x283a04=new Set();for(let _0x58d8f1=-0x25df+0x1109+0x1*0x14d6;_0x58d8f1<-0x23d1+0x9d+0x2374;_0x58d8f1+=-0x1*0x1409+-0x5ba*-0x4+-0x16f*0x2){const _0x5beed9=normalizeWorkspacePath(_0x2f3c76);if(_0x5beed9===_0x44088c)return;if(_0x283a04[_0x1a7c8a(0x1ee)](_0x5beed9))throw new Error(_0x1a7c8a(0x1d6));_0x283a04[_0x1a7c8a(0x1c0)](_0x5beed9);const _0x4421ce=await runReadOnlyGit(_0x2f3c76,[_0x1a7c8a(0x1ec),_0x1a7c8a(0x1d2),_0x1a7c8a(0x1e1)]),[_0x3499d1,_0x49b3dd]=_0x4421ce[_0x1a7c8a(0x20b)][_0x1a7c8a(0x1f4)](/\r?\n/);if(_0x3499d1===undefined||_0x49b3dd===undefined||_0x49b3dd[_0x1a7c8a(0x1c3)]===-0x2577+-0x4f*-0x65+-0x64c*-0x1)throw new Error(_0x1a7c8a(0x1d6));const _0x513d31=await realpath(_0x3499d1),_0x4e0e77=await realpath(_0x49b3dd);if(normalizeWorkspacePath(_0x513d31)!==_0x5beed9||normalizeWorkspacePath(_0x4e0e77)===_0x5beed9||!isWithinAllowedRoot(_0x4e0e77,[_0x1de492])||!isWithinAllowedRoot(_0x2f3c76,[_0x4e0e77]))throw new Error(_0x1a7c8a(0x1d6));_0x2f3c76=_0x4e0e77;}throw new Error(_0x1a7c8a(0x1d6));}export async function listGitHistoryRefs(_0x258bf8){const _0x45306a=_0x29cc70,_0x259ff9=await runReadOnlyGit(_0x258bf8,[_0x45306a(0x1ad),_0x45306a(0x1e8),_0x45306a(0x24e),_0x45306a(0x1b6)],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x259ff9[_0x45306a(0x20b)][_0x45306a(0x1f4)](/\r?\n/)[_0x45306a(0x256)](_0x3d5f63=>{const _0xac7bde=_0x45306a,[_0x43ddee,_0x29ca3a,_0x425f41,_0x55ff78,_0x1910ff]=_0x3d5f63[_0xac7bde(0x1f4)]('\x09');if(_0x43ddee===undefined||_0x29ca3a===undefined||_0x425f41===undefined||_0x1910ff===undefined||_0x1910ff[_0xac7bde(0x1c3)]>0x532+0x1d49+-0x227b||!/^[0-9a-f]{40,64}$/[_0xac7bde(0x263)](_0x425f41))return[];const _0x8e44f3=_0x43ddee[_0xac7bde(0x28c)](_0xac7bde(0x274))?_0xac7bde(0x19e):_0x43ddee[_0xac7bde(0x28c)](_0xac7bde(0x29a))?_0xac7bde(0x2ab):undefined;return _0x8e44f3===undefined?[]:[{'name':_0x43ddee,'displayName':_0x29ca3a,'kind':_0x8e44f3,'hash':_0x425f41,'current':_0x55ff78==='*'}];})[_0x45306a(0x24a)]((_0x4b7be0,_0xbb70f8)=>_0x4b7be0[_0x45306a(0x232)][_0x45306a(0x1ce)](_0xbb70f8[_0x45306a(0x232)])||_0x4b7be0[_0x45306a(0x1fa)][_0x45306a(0x1ce)](_0xbb70f8[_0x45306a(0x1fa)]));}function selectedHistoryRefs(_0x18a292,_0x20e7bc){const _0x143285=_0x29cc70;if(_0x20e7bc===undefined||_0x20e7bc[_0x143285(0x1c3)]===-0x12a7+-0x125*0x3+0x1616)return _0x18a292;const _0x319a43=[...new Set(_0x20e7bc)],_0x34c7b0=_0x319a43[_0x143285(0x1f1)](_0x562708=>_0x18a292[_0x143285(0x1a5)](_0x46ca4f=>_0x46ca4f[_0x143285(0x1db)]===_0x562708));if(_0x34c7b0[_0x143285(0x1fe)](_0x2bf1c1=>_0x2bf1c1===undefined))throw new Error(_0x143285(0x26d));return _0x34c7b0;}function historyCursor(_0x2be18b,_0x24e3dc){const _0x157046=_0x29cc70;return Buffer[_0x157046(0x264)](JSON[_0x157046(0x202)]({'offset':_0x2be18b,'fingerprint':_0x24e3dc}))[_0x157046(0x20a)](_0x157046(0x1b4));}function parseHistoryCursor(_0x3e320b,_0x2cda88){const _0x4d8b45=_0x29cc70;if(_0x3e320b===undefined)return 0x145*0xe+-0x1bb*0x11+0xba5;try{const _0x227e6a=JSON[_0x4d8b45(0x250)](Buffer[_0x4d8b45(0x264)](_0x3e320b,_0x4d8b45(0x1b4))[_0x4d8b45(0x20a)](_0x4d8b45(0x288)));if(!Number[_0x4d8b45(0x1a4)](_0x227e6a[_0x4d8b45(0x23c)])||_0x227e6a[_0x4d8b45(0x23c)]<-0xa98*-0x3+-0x4*0x6bc+0x1f*-0x28||_0x227e6a[_0x4d8b45(0x1e0)]!==_0x2cda88)throw new Error(_0x4d8b45(0x1d6));return _0x227e6a[_0x4d8b45(0x23c)];}catch{throw new Error(_0x4d8b45(0x1a6));}}export async function readGitHistory(_0x41d765,_0x386b35){const _0x1758f0=_0x29cc70,_0x4979c3=await listGitHistoryRefs(_0x41d765),_0x3b8524=selectedHistoryRefs(_0x4979c3,_0x386b35[_0x1758f0(0x267)]);if(_0x3b8524[_0x1758f0(0x1c3)]===0x1c3f+-0x1c1*0x5+0x67e*-0x3)return{'commits':[],'nextCursor':null};const _0x362736=_0x386b35[_0x1758f0(0x29b)]??0x23af+0x1adb+-0x3e58;if(!Number[_0x1758f0(0x1a4)](_0x362736)||_0x362736<0xb7*0x25+-0x10ca+-0x135*0x8||_0x362736>0x220e+-0x124*0x2+-0x1f62)throw new Error(_0x1758f0(0x259));const _0x5e94e=_0x3b8524[_0x1758f0(0x1f1)](_0xd9eda=>_0xd9eda[_0x1758f0(0x1db)])[_0x1758f0(0x24a)](),_0xe0faf6=_0x386b35[_0x1758f0(0x267)]===undefined||_0x386b35[_0x1758f0(0x267)][_0x1758f0(0x1c3)]===-0x17b5+-0x1*-0x1901+-0x14c*0x1||_0x3b8524[_0x1758f0(0x1c3)]===_0x4979c3[_0x1758f0(0x1c3)]&&_0x3b8524[_0x1758f0(0x2ad)](_0x1e54c8=>_0x4979c3[_0x1758f0(0x1fe)](_0x28a2e6=>_0x28a2e6[_0x1758f0(0x1db)]===_0x1e54c8[_0x1758f0(0x1db)])),_0x91fa46=_0xe0faf6?[_0x1758f0(0x18f),_0x1758f0(0x1a7)]:_0x5e94e,_0x5f2477=createHash(_0x1758f0(0x26f))[_0x1758f0(0x23d)](_0x3b8524[_0x1758f0(0x1f1)](_0x511c40=>_0x511c40[_0x1758f0(0x1db)]+'\x00'+_0x511c40[_0x1758f0(0x22f)])[_0x1758f0(0x24a)]()[_0x1758f0(0x24f)]('\x00'))[_0x1758f0(0x243)](_0x1758f0(0x196)),_0xf466cd=parseHistoryCursor(_0x386b35[_0x1758f0(0x271)],_0x5f2477),_0x47dff1=await runReadOnlyGit(_0x41d765,[_0x1758f0(0x244),_0x1758f0(0x205),_0x1758f0(0x2ac),_0x1758f0(0x284)+_0xf466cd,_0x1758f0(0x1e9)+(_0x362736+(0x146*0x4+0x1*-0x18bd+0x9d3*0x2)),'-z',_0x1758f0(0x1f3),..._0x91fa46,'--'],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS}),_0x5a40b1=new Map();for(const _0x599c74 of _0x4979c3){const _0x19d19e=_0x5a40b1[_0x1758f0(0x198)](_0x599c74[_0x1758f0(0x22f)])??[];_0x19d19e[_0x1758f0(0x21a)](_0x599c74[_0x1758f0(0x1fa)]),_0x5a40b1[_0x1758f0(0x296)](_0x599c74[_0x1758f0(0x22f)],_0x19d19e);}const _0xe9b361=_0x47dff1[_0x1758f0(0x20b)][_0x1758f0(0x1f4)]('\x00'),_0xe22a16=[];for(let _0x5831a1=0x4*-0x715+0x3*0xb65+0x1*-0x5db;_0x5831a1+(-0x21f3+0x443+0x1db5)<_0xe9b361[_0x1758f0(0x1c3)];_0x5831a1+=0x4*-0x26e+-0x251d+0x2edb){const [_0x88a298,_0x1178dd='',_0x3572f1='',_0x137d7a='',_0x11b8fd='0',_0x598530='']=_0xe9b361[_0x1758f0(0x190)](_0x5831a1,_0x5831a1+(-0x1*0x33+-0x7*-0x45d+-0xf29*0x2));if(_0x88a298===undefined||!/^[0-9a-f]{40,64}$/[_0x1758f0(0x263)](_0x88a298))continue;_0xe22a16[_0x1758f0(0x21a)]({'hash':_0x88a298,'parents':_0x1178dd[_0x1758f0(0x1c3)]===-0xb*-0x327+0xe*0x6b+-0x2887?[]:_0x1178dd[_0x1758f0(0x1f4)]('\x20'),'authorName':_0x3572f1,'authorEmail':_0x137d7a,'committedAt':Number(_0x11b8fd)*(0x11dc+0x185a*-0x1+0xa66),'subject':_0x598530,'refs':_0x5a40b1[_0x1758f0(0x198)](_0x88a298)??[]});}const _0x57f22d=_0xe22a16[_0x1758f0(0x1c3)]>_0x362736;return{'commits':_0xe22a16[_0x1758f0(0x190)](0x902+0x2591+-0x2e93,_0x362736),'nextCursor':_0x57f22d?historyCursor(_0xf466cd+_0x362736,_0x5f2477):null};}async function assertHistoryCommitReachable(_0x29678a,_0x4207d4,_0x4ece85){const _0x2d9827=_0x29cc70;if(!/^[0-9a-f]{40,64}$/[_0x2d9827(0x263)](_0x4207d4))throw new Error(_0x2d9827(0x1aa));const _0x41db3e=selectedHistoryRefs(await listGitHistoryRefs(_0x29678a),_0x4ece85);for(const _0x533449 of _0x41db3e){const _0x30de8a=await runReadOnlyGitAllowFailure(_0x29678a,[_0x2d9827(0x21e),_0x2d9827(0x1e7),_0x4207d4,_0x533449[_0x2d9827(0x1db)]]);if(_0x30de8a[_0x2d9827(0x28f)]===0x2289+0x1d*-0x9d+-0x10c0)return;}throw new Error(_0x2d9827(0x1aa));}export async function readGitHistoryFiles(_0x1090d6,_0x11b0c0,_0xec45c9){const _0x50bffb=_0x29cc70;await assertHistoryCommitReachable(_0x1090d6,_0x11b0c0,_0xec45c9);const _0x2d2c7c=await runReadOnlyGit(_0x1090d6,[_0x50bffb(0x1e3),_0x50bffb(0x19d),_0x50bffb(0x1e2),_0x50bffb(0x2b5),'-r','-z','-M','-C',_0x50bffb(0x273),_0x11b0c0],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x4f1787=_0x2d2c7c[_0x50bffb(0x20b)][_0x50bffb(0x1f4)]('\x00'),_0x44ca5c=[];for(let _0x4a55ec=0x14*-0x10+0x9d0+-0x224*0x4;_0x4a55ec<_0x4f1787[_0x50bffb(0x1c3)];_0x4a55ec+=-0x71*0x37+-0xe24+0x266c){const _0x3339e4=_0x4f1787[_0x4a55ec];if(_0x3339e4===undefined||_0x3339e4[_0x50bffb(0x1c3)]===-0x1b94+-0x1bc+0x430*0x7)continue;const _0x3f4768=_0x3339e4[-0x2ac+-0x26e3+0x298f]??'M';if(_0x3f4768==='R'||_0x3f4768==='C'){const _0xa5aa4c=_0x4f1787[_0x4a55ec+(0x117f+0x2603+-0xd*0x445)],_0x569036=_0x4f1787[_0x4a55ec+(-0x75c+0x10db+-0x97d)];if(_0xa5aa4c!==undefined&&_0x569036!==undefined)_0x44ca5c[_0x50bffb(0x21a)]({'path':_0x569036,'previousPath':_0xa5aa4c,'change':gitChange(_0x3f4768)});_0x4a55ec+=0x1af+0x5ff*-0x5+0x1c4e;}else{const _0x559194=_0x4f1787[_0x4a55ec+(-0x398+0x2106+-0x1d6d)];if(_0x559194!==undefined)_0x44ca5c[_0x50bffb(0x21a)]({'path':_0x559194,'change':gitChange(_0x3f4768)});_0x4a55ec+=0x151d*0x1+0x326*-0x8+-0x4*-0x105;}}return _0x44ca5c;}export async function readGitHistoryFileDiff(_0x12a268,_0x2bed90,_0x23c471,_0x256b1b,_0x3c7323){const _0x303ae7=_0x29cc70;await assertHistoryCommitReachable(_0x12a268,_0x2bed90,_0x256b1b);const _0x2f51e7=safeGitWorkspacePath(_0x23c471),_0x41a1dd=_0x3c7323===undefined?undefined:safeGitWorkspacePath(_0x3c7323),_0x1f210a=await runReadOnlyGit(_0x12a268,[_0x303ae7(0x1b7),_0x303ae7(0x1bf),_0x303ae7(0x1e2),_0x303ae7(0x1b2),_0x303ae7(0x24c),_0x2bed90,'--',_0x303ae7(0x242)+_0x2f51e7,..._0x41a1dd===undefined||_0x41a1dd===_0x2f51e7?[]:[_0x303ae7(0x242)+_0x41a1dd]]),_0x482adc=_0x1f210a[_0x303ae7(0x25f)][_0x303ae7(0x262)](-0x23b+0x233e*-0x1+0x2579)||_0x1f210a[_0x303ae7(0x20b)][_0x303ae7(0x262)](_0x303ae7(0x1e4));if(_0x482adc)return{'binary':!![],'summary':_0x303ae7(0x24d)+createHash(_0x303ae7(0x26f))[_0x303ae7(0x23d)](_0x1f210a[_0x303ae7(0x25f)])[_0x303ae7(0x243)](_0x303ae7(0x196))+_0x303ae7(0x1be)+_0x1f210a[_0x303ae7(0x25f)][_0x303ae7(0x1c3)],'truncated':_0x1f210a[_0x303ae7(0x253)]};return{'binary':![],'text':_0x1f210a[_0x303ae7(0x20b)],'truncated':_0x1f210a[_0x303ae7(0x253)]};}export async function readGitHistoryFileContentRange(_0x1c23ed,_0x51e1a1,_0x17ca47,_0x2cfb39,_0x347be5,_0x1eca91){const _0x2960a8=_0x29cc70;if(!Number[_0x2960a8(0x1eb)](_0x2cfb39)||_0x2cfb39<-0xbe0+-0xb*0xb9+0x5*0x3f7||!Number[_0x2960a8(0x1eb)](_0x347be5)||_0x347be5<0x49*0x5+-0x13*-0x25+-0x42b||_0x347be5>(0xfc7+-0x89e+-0x103*0x7)*(-0x1565+0x1f2e+-0x5c9)*(0x163*-0x8+0x18*-0x89+0x1bf0)||_0x2cfb39+_0x347be5>(-0x113*-0x3+0x128*-0x3+-0x1*-0x53)*(-0x897+0xc42+0x55)*(-0x22f+-0xc9*-0x2+0x49d))throw new Error(_0x2960a8(0x1b5));await assertHistoryCommitReachable(_0x1c23ed,_0x51e1a1,_0x1eca91);const _0xa2af49=safeGitWorkspacePath(_0x17ca47),_0x26b60e=_0x51e1a1+':'+_0xa2af49,_0x355d73=await runReadOnlyGit(_0x1c23ed,[_0x2960a8(0x1b1),'-s',_0x26b60e]),_0x3f6cac=Number(_0x355d73[_0x2960a8(0x20b)][_0x2960a8(0x22b)]());if(!Number[_0x2960a8(0x1eb)](_0x3f6cac)||_0x3f6cac<-0x1*0x4bb+0x177b+-0x1e0*0xa||_0x2cfb39>_0x3f6cac)throw new Error(_0x2960a8(0x1b5));if(_0x2cfb39===_0x3f6cac)return{'path':_0xa2af49,'size':_0x3f6cac,'offset':_0x2cfb39,'contentBase64':'','nextOffset':null};const _0x5bbfac=await runReadOnlyGitAllowFailure(_0x1c23ed,[_0x2960a8(0x1b1),_0x2960a8(0x1ab),_0x26b60e],{'outputLimit':_0x2cfb39+_0x347be5,'timeoutMs':GIT_HISTORY_TIMEOUT_MS});if(_0x5bbfac[_0x2960a8(0x28f)]!==-0x94*-0x43+-0x11d9+-0x14e3)throw new GitCommandError(_0x5bbfac[_0x2960a8(0x28f)],_0x5bbfac[_0x2960a8(0x1c1)]);const _0x3fe50a=_0x5bbfac[_0x2960a8(0x25f)][_0x2960a8(0x1e6)](_0x2cfb39,Math[_0x2960a8(0x1dc)](_0x3f6cac,_0x2cfb39+_0x347be5)),_0x30dc7a=_0x2cfb39+_0x3fe50a[_0x2960a8(0x1c3)];return{'path':_0xa2af49,'size':_0x3f6cac,'offset':_0x2cfb39,'contentBase64':_0x3fe50a[_0x2960a8(0x20a)](_0x2960a8(0x228)),'nextOffset':_0x30dc7a<_0x3f6cac?_0x30dc7a:null};}export async function readCurrentChanges(_0xdf9e8c){const _0x5497da=_0x29cc70;return(await readCurrentChangesSummary(_0xdf9e8c))[_0x5497da(0x289)];}export async function readCurrentChangeDiff(_0x4e7e9f,_0x4cc932){const _0x20b560=_0x29cc70,_0x1fa052=safeGitWorkspacePath(_0x4cc932);await assertCurrentChangePathAccessible(_0x4e7e9f,_0x1fa052);const _0x12127d=await readCurrentChangeGitDiff(_0x4e7e9f,_0x1fa052),_0x17f223=await readWorkingTreeText(_0x4e7e9f,_0x1fa052),_0xf9fd92=_0x12127d[_0x20b560(0x25f)][_0x20b560(0x262)](0x1*0x337+0x228c+0x565*-0x7)||_0x12127d[_0x20b560(0x20b)][_0x20b560(0x262)](_0x20b560(0x1e4))||_0x17f223?.[_0x20b560(0x297)]===!![];if(_0xf9fd92)return{'binary':!![],'summary':_0x20b560(0x24d)+createHash(_0x20b560(0x26f))[_0x20b560(0x23d)](_0x12127d[_0x20b560(0x25f)])[_0x20b560(0x243)](_0x20b560(0x196))+_0x20b560(0x1be)+_0x12127d[_0x20b560(0x25f)][_0x20b560(0x1c3)],'truncated':_0x12127d[_0x20b560(0x253)]||_0x17f223?.[_0x20b560(0x253)]===!![]};return{'binary':![],'text':_0x12127d[_0x20b560(0x20b)],'truncated':_0x12127d[_0x20b560(0x253)]||_0x17f223?.[_0x20b560(0x253)]===!![],'afterText':_0x17f223?.[_0x20b560(0x20b)]??'',..._0x17f223===undefined?{}:{'afterTruncated':_0x17f223[_0x20b560(0x253)]}};}async function readCurrentChangeGitDiff(_0x1bbe51,_0x2f9dc7){const _0x17d999=_0x29cc70,_0x547b22=await runReadOnlyGit(_0x1bbe51,[_0x17d999(0x2b3),_0x17d999(0x1da),_0x17d999(0x230),'-z','--',_0x17d999(0x242)+_0x2f9dc7]);if(_0x547b22[_0x17d999(0x20b)][_0x17d999(0x1f4)]('\x00')[_0x17d999(0x262)](_0x2f9dc7)){const _0x2b8bef=await runReadOnlyGitAllowFailure(_0x1bbe51,[_0x17d999(0x23e),_0x17d999(0x25a),_0x17d999(0x1b2),_0x17d999(0x24c),'--',_0x17d999(0x299),_0x2f9dc7]);if(_0x2b8bef[_0x17d999(0x28f)]!==-0xe85+0x11c*-0x1e+0x2fcd&&_0x2b8bef[_0x17d999(0x28f)]!==-0x2326+-0x11b7+-0x43*-0xca)throw new GitCommandError(_0x2b8bef[_0x17d999(0x28f)],_0x2b8bef[_0x17d999(0x1c1)]);return _0x2b8bef;}return runReadOnlyGit(_0x1bbe51,[_0x17d999(0x23e),_0x17d999(0x1b2),_0x17d999(0x24c),_0x17d999(0x1c4),'--',_0x17d999(0x242)+_0x2f9dc7]);}export async function isWorkspaceChangeVisible(_0x58bbf,_0x3c0fbf){const _0x3f558e=_0x29cc70;try{return await assertCurrentChangePathAccessible(_0x58bbf,safeGitWorkspacePath(_0x3c0fbf)),!![];}catch(_0x236540){if(_0x236540 instanceof Error&&(_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x1d8)||_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x2a1)||_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x2bb)))return![];throw _0x236540;}}async function assertCurrentChangePathAccessible(_0x52f60c,_0x2664eb){const _0x419c45=_0x29cc70,_0x298393=await realpath(_0x52f60c),_0x30fd72=resolve(_0x298393,_0x2664eb),_0x4c5647=await lstat(_0x30fd72)[_0x419c45(0x19c)](_0x376d23=>{const _0x52b9aa=_0x419c45;if(_0x376d23[_0x52b9aa(0x28f)]===_0x52b9aa(0x231))return undefined;throw _0x376d23;});if(_0x4c5647===undefined)return;await resolveWorkspaceEntry(_0x298393,_0x2664eb,![]);}async function readWorkingTreeText(_0x121534,_0x59cb1b){const _0x4a11a4=_0x29cc70,_0x3fdc4f=await realpath(_0x121534);let _0x11cccd;try{_0x11cccd=await resolveWorkspaceEntry(_0x3fdc4f,_0x59cb1b,![]);}catch(_0x13145f){if(_0x13145f instanceof Error&&_0x13145f[_0x4a11a4(0x293)]===_0x4a11a4(0x2a1))return undefined;throw _0x13145f;}const _0x4c6fad=await lstat(_0x11cccd);if(!_0x4c6fad[_0x4a11a4(0x257)]())return undefined;const _0x30ea13=await readFile(_0x11cccd);return diffTextFromBuffer(_0x30ea13,_0x30ea13[_0x4a11a4(0x1c3)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x294b19,_0x16f42f){const _0x11c5b9=_0x29cc70;if(_0x294b19[_0x11c5b9(0x262)](-0x744+0xf85*0x2+-0x17c6)||!isValidUtf8(_0x294b19))return{'binary':!![],'truncated':_0x16f42f};let _0x18640f=Math[_0x11c5b9(0x1dc)](_0x294b19[_0x11c5b9(0x1c3)],GIT_OUTPUT_LIMIT);while(_0x18640f>-0xd*0x1bb+0x2e6*-0x1+0x1965&&_0x18640f<_0x294b19[_0x11c5b9(0x1c3)]&&isUtf8ContinuationByte(_0x294b19[_0x18640f]))_0x18640f-=0x1*-0xabe+0x2*-0x1188+0x2dcf*0x1;return{'binary':![],'text':_0x294b19[_0x11c5b9(0x1e6)](-0x23fb+-0x3*-0x6dd+-0x3d9*-0x4,_0x18640f)[_0x11c5b9(0x20a)](_0x11c5b9(0x288)),'truncated':_0x16f42f};}export async function restoreCurrentChange(_0x2f1422,_0x27cc45,_0x4e5571){const _0x9eae50=_0x29cc70,_0x5a77e2=safeGitWorkspacePath(_0x27cc45),_0x34cff7=_0x9eae50(0x242)+_0x5a77e2;if(_0x4e5571===_0x9eae50(0x1b9)){const _0x3e7b61=await runReadOnlyGit(_0x2f1422,[_0x9eae50(0x1b0),_0x9eae50(0x2aa),'-z',_0x9eae50(0x193),'--',_0x34cff7]);if(!_0x3e7b61[_0x9eae50(0x20b)][_0x9eae50(0x1f4)]('\x00')[_0x9eae50(0x1fe)](_0x2713cb=>_0x2713cb[_0x9eae50(0x28c)](_0x9eae50(0x2ba))&&_0x2713cb[_0x9eae50(0x190)](0x14e*0x15+0x1333*0x1+-0x174b*0x2)===_0x5a77e2))throw new Error(_0x9eae50(0x29e));const _0x454615=await realpath(_0x2f1422),_0x4d21bd=resolve(_0x454615,_0x5a77e2),_0x4d30d0=await lstat(_0x4d21bd);if(!_0x4d30d0[_0x9eae50(0x257)]()||_0x4d30d0[_0x9eae50(0x1b8)]())throw new Error(_0x9eae50(0x29e));await unlink(_0x4d21bd);return;}if(_0x4e5571===_0x9eae50(0x2a8)){await runGit(_0x2f1422,[_0x9eae50(0x20d),_0x9eae50(0x247),'--',_0x34cff7]);return;}await runGit(_0x2f1422,[_0x9eae50(0x20d),_0x9eae50(0x1ae),_0x9eae50(0x248),_0x9eae50(0x247),'--',_0x34cff7]);}function safeGitWorkspacePath(_0x54edea){const _0x4e1ca8=_0x29cc70;if(_0x54edea[_0x4e1ca8(0x1c3)]===-0x263a+-0x7*-0x203+0x1825||_0x54edea[_0x4e1ca8(0x262)]('\x00')||_0x54edea[_0x4e1ca8(0x28c)]('/')||_0x54edea[_0x4e1ca8(0x28c)]('\x5c'))throw new Error(_0x4e1ca8(0x1d8));const _0x4c3e16=_0x54edea[_0x4e1ca8(0x278)]('\x5c','/');if(_0x4c3e16[_0x4e1ca8(0x1f4)]('/')[_0x4e1ca8(0x1fe)](_0x47df77=>_0x47df77===''||_0x47df77==='..'||_0x47df77===_0x4e1ca8(0x1ef)))throw new Error(_0x4e1ca8(0x1d8));return _0x4c3e16;}function gitChange(_0x32c58c){const _0xd8eb43=_0x29cc70;if(_0x32c58c==='A')return _0xd8eb43(0x237);if(_0x32c58c==='D')return _0xd8eb43(0x1c5);if(_0x32c58c==='R')return _0xd8eb43(0x268);if(_0x32c58c==='C')return _0xd8eb43(0x27b);if(_0x32c58c==='T')return _0xd8eb43(0x1af);return _0xd8eb43(0x249);}export class GitCommandError extends Error{[_0x29cc70(0x28f)];[_0x29cc70(0x1c1)];constructor(_0x49e359,_0x24c448){const _0x248d23=_0x29cc70;super(_0x248d23(0x1d7)),this[_0x248d23(0x28f)]=_0x49e359,this[_0x248d23(0x1c1)]=_0x24c448;}}async function runReadOnlyGit(_0x541112,_0x23e96c,_0x4a56d2={}){return runGit(_0x541112,_0x23e96c,{..._0x4a56d2,'readOnly':!![]});}async function runReadOnlyGitAllowFailure(_0x41b508,_0x4ca134,_0x187f2b={}){return runGitAllowFailure(_0x41b508,_0x4ca134,{..._0x187f2b,'readOnly':!![]});}async function runGit(_0x3b19a8,_0x3225fc,_0x1d773b={}){const _0xefb73c=_0x29cc70,_0x4b44a0=await runGitAllowFailure(_0x3b19a8,_0x3225fc,_0x1d773b);if(_0x4b44a0[_0xefb73c(0x28f)]!==0x962+0x1*-0x1b84+0x1222)throw new GitCommandError(_0x4b44a0[_0xefb73c(0x28f)],_0x4b44a0[_0xefb73c(0x1c1)]);return _0x4b44a0;}async function runGitAllowFailure(_0x49239f,_0x1e3774,_0xb0884={}){return new Promise((_0x37dcf3,_0x23e22d)=>{const _0x401d91=_0x28d1,_0x42fe6e=_0xb0884[_0x401d91(0x241)]??GIT_OUTPUT_LIMIT,_0x461b01=spawn(_0x401d91(0x2bc),[..._0x1e3774],{'cwd':_0x49239f,'shell':![],'windowsHide':!![],'stdio':[_0x401d91(0x286),_0x401d91(0x1a0),_0x401d91(0x1a0)],..._0xb0884[_0x401d91(0x2b0)]===!![]?{'env':{...process.env,'GIT_OPTIONAL_LOCKS':'0'}}:{}}),_0xdb327d=[],_0x468d34=[];let _0x25207f=0xa9*-0x1b+-0x10a6*0x2+0x1*0x331f,_0x5421eb=-0x91e*0x3+0x5de+0x19*0xdc,_0x24132c=![];const _0x1b6915=setTimeout(()=>{const _0x38eb1b=_0x401d91;if(process[_0x38eb1b(0x19b)]===_0x38eb1b(0x213)){const _0x4e901f=_0x461b01[_0x38eb1b(0x22d)];if(_0x4e901f===undefined){_0x461b01[_0x38eb1b(0x219)](_0x38eb1b(0x1b3));return;}void terminateProcessTree({'pid':_0x4e901f,'kill':_0x186d65=>_0x461b01[_0x38eb1b(0x219)](_0x186d65)},_0x38eb1b(0x213))[_0x38eb1b(0x19c)](()=>{const _0x57e46d=_0x38eb1b;try{_0x461b01[_0x57e46d(0x219)](_0x57e46d(0x1b3));}catch{}});return;}_0x461b01[_0x38eb1b(0x219)](_0x38eb1b(0x1b3));},_0xb0884[_0x401d91(0x23f)]??GIT_TIMEOUT_MS);_0x461b01[_0x401d91(0x1a2)]['on'](_0x401d91(0x1ca),_0x1fbaf9=>{const _0x6fc7e1=_0x401d91,_0x502425=Math[_0x6fc7e1(0x1d4)](0x1f2f+-0xb*-0x203+-0x1aa8*0x2,_0x42fe6e-_0x25207f);if(_0x502425>0x2*0x311+0xd*-0x10d+0x787*0x1){const _0x5f042d=_0x1fbaf9[_0x6fc7e1(0x1e6)](-0x15a9+-0x22eb+0x4*0xe25,_0x502425);_0xdb327d[_0x6fc7e1(0x21a)](_0x5f042d),_0x25207f+=_0x5f042d[_0x6fc7e1(0x1c3)];}_0x24132c||=_0x1fbaf9[_0x6fc7e1(0x1c3)]>_0x502425;}),_0x461b01[_0x401d91(0x1c1)]['on'](_0x401d91(0x1ca),_0x5bf6d2=>{const _0x195aca=_0x401d91,_0x4117c9=Math[_0x195aca(0x1d4)](-0x2*0xc5f+-0x95*0x2e+0x6*0x896,-0xde9+0x1*0x1f9d+-0x1b4-_0x5421eb);if(_0x4117c9===-0x1bcb+-0x307+0x1ed2)return;const _0x11fa8f=_0x5bf6d2[_0x195aca(0x1e6)](0x1*-0x167d+0x3d*0x91+0x10*-0xc1,_0x4117c9);_0x468d34[_0x195aca(0x21a)](_0x11fa8f),_0x5421eb+=_0x11fa8f[_0x195aca(0x1c3)];}),_0x461b01[_0x401d91(0x240)](_0x401d91(0x283),_0x16d7b0=>{clearTimeout(_0x1b6915),_0x23e22d(_0x16d7b0);}),_0x461b01[_0x401d91(0x240)](_0x401d91(0x2b6),_0x3bf4bc=>{const _0x4a46f3=_0x401d91;clearTimeout(_0x1b6915);const _0x155684=Buffer[_0x4a46f3(0x194)](_0xdb327d);_0x37dcf3({'code':_0x3bf4bc??0x86d+-0x23cf+0x1b63,'output':_0x155684,'text':_0x155684[_0x4a46f3(0x20a)](_0x4a46f3(0x288)),'stderr':Buffer[_0x4a46f3(0x194)](_0x468d34)[_0x4a46f3(0x20a)](_0x4a46f3(0x288)),'truncated':_0x24132c});});});}function isGitUnavailable(_0x396394){const _0x5ecd0f=_0x29cc70;return _0x396394 instanceof Error&&_0x5ecd0f(0x28f)in _0x396394&&_0x396394[_0x5ecd0f(0x28f)]===_0x5ecd0f(0x231);}function summarizeText(_0xa3830f){const _0x211103=_0x29cc70;return JSON[_0x211103(0x202)]({'sha256':createHash(_0x211103(0x26f))[_0x211103(0x23d)](_0xa3830f)[_0x211103(0x243)](_0x211103(0x196)),'bytes':Buffer[_0x211103(0x21b)](_0xa3830f)});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.9.36",
3
+ "version": "0.9.38",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "node-pty": "1.1.0",
26
26
  "ws": "^8.21.3",
27
27
  "zod": "4.4.3",
28
- "@myagentroam/agent": "^0.9.36",
29
- "@myagentroam/protocol": "^0.9.36"
28
+ "@myagentroam/agent": "^0.9.38",
29
+ "@myagentroam/protocol": "^0.9.38"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ws": "^8.18.1"