opencode-collaboration 0.9.5 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/anchors.d.ts +33 -0
- package/dist/anchors.js +2 -0
- package/dist/commands.js +1 -1
- package/dist/config.js +1 -1
- package/dist/delivery.js +1 -1
- package/dist/feedback.js +1 -1
- package/dist/format.js +1 -1
- package/dist/gating.js +1 -1
- package/dist/index.js +1 -1
- package/dist/listener.js +1 -1
- package/dist/outbox.js +1 -1
- package/dist/permissions.js +1 -1
- package/dist/queue.js +1 -1
- package/dist/registry.d.ts +18 -1
- package/dist/registry.js +1 -1
- package/dist/sanitize.js +1 -1
- package/dist/scope.js +1 -1
- package/dist/sender.js +1 -1
- package/dist/session-runtime.d.ts +8 -0
- package/dist/session-runtime.js +1 -1
- package/dist/session-tracker.js +1 -1
- package/dist/stall-detector.js +1 -1
- package/dist/title-suffix.js +1 -1
- package/dist/tools/peers-tools.js +1 -1
- package/dist/transport.js +1 -1
- package/package.json +1 -1
package/dist/listener.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const _0x522627=_0x63f9;(function(stringArrayFunction,_0x3a4e83){const _0x16256c=_0x63f9,stringArray=stringArrayFunction();while(!![]){try{const _0xcc9870=-parseInt(_0x16256c(0x204))/0x1*(parseInt(_0x16256c(0x1ee))/0x2)+parseInt(_0x16256c(0x1c7))/0x3+parseInt(_0x16256c(0x205))/0x4*(-parseInt(_0x16256c(0x1fc))/0x5)+-parseInt(_0x16256c(0x1ec))/0x6*(parseInt(_0x16256c(0x1ba))/0x7)+parseInt(_0x16256c(0x1c5))/0x8*(parseInt(_0x16256c(0x1e8))/0x9)+parseInt(_0x16256c(0x1f2))/0xa+parseInt(_0x16256c(0x1db))/0xb;if(_0xcc9870===_0x3a4e83)break;else stringArray['push'](stringArray['shift']());}catch(_0x408de5){stringArray['push'](stringArray['shift']());}}}(_0xa6a3,0xdf165));import{chmod,lstat,mkdir,rm}from'node:fs/promises';import{createServer}from'node:http';import{connect}from'node:net';import{tmpdir}from'node:os';import{join}from'node:path';import{z}from'zod';const _0x5ea1c8=0x4,_0x2baafe=z[_0x522627(0x1ff)]({'instanceId':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'name':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'directory':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1)})[_0x522627(0x1e7)](),_0x3f3c57=z[_0x522627(0x1ff)]({'id':z['string']()['min'](0x1),'from':_0x2baafe,'text':z[_0x522627(0x1be)](),'via':z[_0x522627(0x1da)](z['string']())[_0x522627(0x1bf)](_0x5ea1c8),'sentAt':z[_0x522627(0x21a)]()[_0x522627(0x1d1)]()})[_0x522627(0x1e7)](),_0x30a493=z[_0x522627(0x1ff)]({'version':z[_0x522627(0x218)](0x2),'messageId':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'fromEndpointId':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'toEndpointId':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'from':_0x2baafe,'text':z['string'](),'via':z[_0x522627(0x1da)](z[_0x522627(0x1be)]())['max'](_0x5ea1c8),'sentAt':z[_0x522627(0x21a)]()[_0x522627(0x1d1)]()})[_0x522627(0x1e7)](),_0x2a46c8=z[_0x522627(0x1ff)]({'version':z[_0x522627(0x218)](0x2),'messageId':z[_0x522627(0x1be)]()[_0x522627(0x1eb)](0x1),'fromEndpointId':z[_0x522627(0x1be)]()['min'](0x1),'toEndpointId':z['string']()[_0x522627(0x1eb)](0x1),'status':z[_0x522627(0x1e6)]([_0x522627(0x225),_0x522627(0x1e4),_0x522627(0x211),_0x522627(0x22a),_0x522627(0x1fb)]),'acknowledgedAt':z[_0x522627(0x21a)]()[_0x522627(0x1d1)]()})['passthrough']();function _0x5b9850(_0xc668d3){const _0x41224b=_0x522627;switch(_0xc668d3){case _0x41224b(0x1e4):return 0x193;case _0x41224b(0x20d):return 0x1ad;default:return 0xca;}}function _0x63f9(_0xd96d10,_0x101c18){_0xd96d10=_0xd96d10-0x1b9;const _0xa6a3b4=_0xa6a3();let _0x63f9f7=_0xa6a3b4[_0xd96d10];if(_0x63f9['GfoprD']===undefined){var _0x214dbd=function(_0x34d1ac){const _0x37a6d7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5aabae='',_0x5ea1c8='';for(let _0x2baafe=0x0,_0x3f3c57,_0x30a493,_0x2a46c8=0x0;_0x30a493=_0x34d1ac['charAt'](_0x2a46c8++);~_0x30a493&&(_0x3f3c57=_0x2baafe%0x4?_0x3f3c57*0x40+_0x30a493:_0x30a493,_0x2baafe++%0x4)?_0x5aabae+=String['fromCharCode'](0xff&_0x3f3c57>>(-0x2*_0x2baafe&0x6)):0x0){_0x30a493=_0x37a6d7['indexOf'](_0x30a493);}for(let _0x5b9850=0x0,_0x291201=_0x5aabae['length'];_0x5b9850<_0x291201;_0x5b9850++){_0x5ea1c8+='%'+('00'+_0x5aabae['charCodeAt'](_0x5b9850)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ea1c8);};_0x63f9['gjffmU']=_0x214dbd,_0x63f9['tQMlJI']={},_0x63f9['GfoprD']=!![];}const _0x35eaf6=_0xa6a3b4[0x0];_0x63f9['LfPihF']!==_0x35eaf6&&(_0x63f9['tQMlJI']={},_0x63f9['LfPihF']=_0x35eaf6);const _0x55a2fb=_0x63f9['tQMlJI'][_0xd96d10];return _0x55a2fb===undefined?(_0x63f9f7=_0x63f9['gjffmU'](_0x63f9f7),_0x63f9['tQMlJI'][_0xd96d10]=_0x63f9f7):_0x63f9f7=_0x55a2fb,_0x63f9f7;}function _0x291201(_0x155ae8){const _0x3eab49=_0x522627;if(typeof _0x155ae8===_0x3eab49(0x1ff)&&_0x155ae8!==null&&_0x3eab49(0x1e5)in _0x155ae8&&_0x155ae8[_0x3eab49(0x1e5)]===0x2){const _0x532251=_0x30a493[_0x3eab49(0x216)](_0x155ae8);if(!_0x532251[_0x3eab49(0x1cc)])return null;const _0x45f543=_0x532251['data'];return{'message':{'id':_0x45f543[_0x3eab49(0x214)],'from':{'instanceId':_0x45f543[_0x3eab49(0x21f)],'name':_0x45f543[_0x3eab49(0x1cf)][_0x3eab49(0x220)],'directory':_0x45f543['from']['directory']},'text':_0x45f543[_0x3eab49(0x1dc)],'via':_0x45f543[_0x3eab49(0x222)],'sentAt':_0x45f543[_0x3eab49(0x1df)]},'route':{'version':0x2,'toEndpointId':_0x45f543[_0x3eab49(0x1f8)]}};}const _0xdb46d6=_0x3f3c57[_0x3eab49(0x216)](_0x155ae8);return _0xdb46d6[_0x3eab49(0x1cc)]?{'message':_0xdb46d6[_0x3eab49(0x1c6)],'route':{'version':0x1}}:null;}function _0xa6a3(){const _0x499acd=['BM93','nZy3nJa4sffoturz','Ahr0CcT1BML4oI8V','BwvZC2fNzsb0B28GBgfYz2u','AgvHzgvYC1nLBNq','nZu0mJbvAKXhD3y','qMvHCMvYia','Aw50zxjUywWGzxjYB3i','B25nzxnZywDLigHHBMrSzxiGzMfPBgvK','C3rHCNrPBMC','y29Kzq','Dg9fBMrWB2LUDeLK','l2fJAW','l2HLywX0Aa','zhvWBgLJyxrL','mJm1mevrq2j3tG','CgXHDgzVCM0','CNvUDgLTzurPCG','B2jQzwn0','BwfW','zgvZDhjVEq','CgfYC2u','Aw52ywXPzcbTzxnZywDLihnOyxbL','mMjyB0nhCa','mtm4mJrqzMnPs00','yxv0Ag9YAxPHDgLVBG','ChjVy2vZC0LK','C3rVChbPBMC','l21LC3nHz2u','D2LUmZi','CgLK','D3jPDgvizwfK','zNvSBa','B2zM','z2v0DwLK','DgnW','zxHWAxjLza','DxjS','BMv3','BwvZC2fNzuLK','BgLZDgvUzxiGzxjYB3i','C2fMzvbHCNnL','BgLZDgvU','BgL0zxjHBa','Bg9Nz2vY','BNvTyMvY','Dw5HDxrOB3jPEMvK','Bwf4twvZC2fNzufNzu1Z','zxjYB3i','CMvZB2X2zuvUzhbVAw50','zNjVBuvUzhbVAw50swq','BMfTzq','Dw5PEa','DMLH','zw5KCg9PBNqGBM90igzVDw5K','ywjZ','zgvSAxzLCMvK','BwvZC2fNzq','BM90igzVDw5K','BgLZDgvUzxiGy2fUBM90ihn0yxj0ihDOAwXLia','werhx1jvtLrjtuvFreLs','zhjVChbLza','AxntB2nRzxq','CNvUDgLTzsbZB2nRzxqGCgf0AcbJB2XSAxnPB246ia','C3rVChbLza','mtGYwhnbs1Hj','BgvUz3rO','ue9tva','ywrKCMvZCW','C3rYAw5N','Bwf4','y2XVC2u','ywnJzxb0zwq','B25nzxnZywDL','BgLZDgvUAw5N','yNL0zuXLBMD0Aa','mtK1mLzmy2rgra','zgf0yq','ndu5nduXnwT5DvH5wG','Bwv0Ag9K','yxbWBgLJyxrPB24VANnVBG','lNnVy2S','Dg9tDhjPBMC','C3vJy2vZCW','zw5K','ywXS','zNjVBq','B25by2TUB3DSzwrNzw1LBNq','zMLUAxrL','Ahr0CdOVlZeYnY4WlJaUmtO','C3rHBguGBwvZC2fNzq','Aw52ywXPzcbHy2TUB3DSzwrNzw1LBNqGC2HHCgu','C2v0vgLTzw91Da','zNvUy3rPB24','B2nWlq','B3bLBMnVzguTy29SBgfIB3jHDgLVBG','Aw52ywXPzcbQC29U','yxjYyxK','ntK2nJiWmNHqCePjEG','Dgv4Da','Cg9YDa','CNvUBMLUzW','C2vUDef0','B25Jzq','CM91Dgu','mti3lJaUmc4X','Bwf4qM9KEuj5DgvZ','CMvMDxnLza','DMvYC2LVBG','zw51Bq','CgfZC3rOCM91z2G','ndCZndbRAKnZEwq','ChvZAa','y2f0y2G','BwLU','mtm2ntzdwfDKsue'];_0xa6a3=function(){return _0x499acd;};return _0xa6a3();}export function defaultRuntimeDirectory(_0x17ac5c=process.env,_0x263817=typeof process[_0x522627(0x20f)]===_0x522627(0x1d6)?process[_0x522627(0x20f)]():0x0){const _0x5a06c8=_0x522627;return _0x17ac5c[_0x5a06c8(0x229)]?join(_0x17ac5c[_0x5a06c8(0x229)],_0x5a06c8(0x1d8)):join(tmpdir(),_0x5a06c8(0x1d7)+_0x263817);}export function InboxListener(_0x1ba964){let _0x197727=null,_0x11cfa5=null,_0x29eaa4=null,_0x376548='new';function _0x31a02a(_0x10ec2b){const _0x2d1c5e=_0x63f9;return _0x10ec2b===_0x2d1c5e(0x1f3)+_0x1ba964['token'];}async function _0xc66a6e(_0x4b86c2,_0x4db737){const _0x15ebf9=_0x63f9,_0x5def9d=(_0x5eefd5,_0x3315bf)=>{const _0x2e8c65=_0x63f9;_0x4db737[_0x2e8c65(0x20c)](_0x5eefd5,{'content-type':_0x2e8c65(0x1c9)}),_0x4db737['end'](JSON['stringify'](_0x3315bf));};if(!_0x31a02a(_0x4b86c2['headers'][_0x15ebf9(0x206)])){_0x5def9d(0x191,{'error':_0x15ebf9(0x21b)});return;}if(_0x4b86c2['method']==='GET'&&_0x4b86c2[_0x15ebf9(0x212)]===_0x15ebf9(0x1fa)){_0x5def9d(0xc8,{'ok':!![]});return;}if(_0x4b86c2[_0x15ebf9(0x1c8)]!==_0x15ebf9(0x1bc)||_0x4b86c2[_0x15ebf9(0x212)]!==_0x15ebf9(0x209)&&_0x4b86c2[_0x15ebf9(0x212)]!==_0x15ebf9(0x1f9)){_0x5def9d(0x194,{'error':_0x15ebf9(0x227)});return;}const _0x24115d=[];let _0x18da9c=0x0;for await(const _0x1c967f of _0x4b86c2){_0x18da9c+=_0x1c967f[_0x15ebf9(0x1bb)];if(_0x18da9c>_0x1ba964[_0x15ebf9(0x1e3)]){_0x5def9d(0x19d,{'error':_0x15ebf9(0x1f0)}),_0x4b86c2[_0x15ebf9(0x201)]();return;}_0x24115d[_0x15ebf9(0x1e9)](_0x1c967f);}let _0x49bba6;try{_0x49bba6=JSON[_0x15ebf9(0x202)](Buffer['concat'](_0x24115d)[_0x15ebf9(0x1cb)]('utf8'));}catch{_0x5def9d(0x190,{'error':_0x15ebf9(0x1d9)});return;}if(_0x4b86c2['url']===_0x15ebf9(0x1f9)){const _0x129597=_0x2a46c8[_0x15ebf9(0x216)](_0x49bba6);if(!_0x129597[_0x15ebf9(0x1cc)]){_0x5def9d(0x190,{'error':_0x15ebf9(0x1d4)});return;}await _0x1ba964[_0x15ebf9(0x1d0)]?.(_0x129597[_0x15ebf9(0x1c6)]),_0x5def9d(0xca,{'status':_0x15ebf9(0x1c1)});return;}const _0x287285=_0x291201(_0x49bba6);if(!_0x287285){_0x5def9d(0x190,{'error':_0x15ebf9(0x203)});return;}const _0xf0f4e6=_0x287285[_0x15ebf9(0x226)];if(Buffer[_0x15ebf9(0x1c4)](_0xf0f4e6[_0x15ebf9(0x1dc)],'utf8')>(_0x1ba964['maxMessageBytes']??0x2000)){_0x5def9d(0x19d,{'error':'message\x20too\x20large'});return;}if(Math[_0x15ebf9(0x224)](Date[_0x15ebf9(0x1ed)]()-_0xf0f4e6[_0x15ebf9(0x1df)])>(_0x1ba964[_0x15ebf9(0x21c)]??0x493e0)){_0x5def9d(0x190,{'error':_0x15ebf9(0x1d3)});return;}try{const _0x15cdda=await _0x1ba964[_0x15ebf9(0x21e)]?.(_0x287285[_0x15ebf9(0x1e1)]);if(_0x1ba964[_0x15ebf9(0x21e)]&&!_0x15cdda){_0x5def9d(0x194,{'error':_0x15ebf9(0x223)});return;}const _0x5c2d20=await _0x1ba964[_0x15ebf9(0x1c2)](_0xf0f4e6,_0x15cdda??_0x287285[_0x15ebf9(0x1e1)]['toEndpointId']);_0x5def9d(_0x5b9850(_0x5c2d20),{'status':_0x5c2d20});}catch(_0x8c4a2){await _0x1ba964[_0x15ebf9(0x219)](_0x15ebf9(0x21d),_0x15ebf9(0x1f5),{'error':String(_0x8c4a2)}),_0x5def9d(0x1f4,{'error':_0x15ebf9(0x1f4)});}}function _0x5071a2(){return createServer((_0x46906b,_0x6bfa65)=>{const _0x16ede8=_0x63f9;_0xc66a6e(_0x46906b,_0x6bfa65)[_0x16ede8(0x1ea)](_0x2e0822=>{const _0x2a61bb=_0x16ede8;void _0x1ba964[_0x2a61bb(0x219)](_0x2a61bb(0x21d),_0x2a61bb(0x215),{'error':String(_0x2e0822)});if(!_0x6bfa65[_0x2a61bb(0x1f1)])_0x6bfa65[_0x2a61bb(0x20c)](0x1f4)[_0x2a61bb(0x1cd)]();else _0x6bfa65[_0x2a61bb(0x1cd)]();});});}function _0x391e6b(_0x292460,_0x2c3274){return new Promise((_0xcf11fd,_0x552b5d)=>{const _0x2c76bc=_0x63f9,onError=_0x22f636=>{const _0x4071c8=_0x63f9;_0x292460[_0x4071c8(0x20e)](_0x4071c8(0x1c3),_0x19110c),_0x552b5d(_0x22f636);},_0x19110c=()=>{const _0xdae9e1=_0x63f9;_0x292460['off'](_0xdae9e1(0x21d),onError),_0xcf11fd();};_0x292460[_0x2c76bc(0x1e0)](_0x2c76bc(0x21d),onError),_0x292460[_0x2c76bc(0x1e0)](_0x2c76bc(0x1c3),_0x19110c),_0x292460[_0x2c76bc(0x217)](_0x2c3274);});}function _0x38fe4e(_0x454640){return new Promise((_0x253c56,_0x5f2aa6)=>{const _0x22b827=_0x63f9,onError=_0x3c963b=>{const _0x3ecfb8=_0x63f9;_0x454640['off'](_0x3ecfb8(0x1c3),_0x21f260),_0x5f2aa6(_0x3c963b);},_0x21f260=()=>{const _0x3db100=_0x63f9;_0x454640[_0x3db100(0x20e)](_0x3db100(0x21d),onError),_0x253c56(_0x454640[_0x3db100(0x1bd)]()[_0x3db100(0x1dd)]);};_0x454640['once'](_0x22b827(0x21d),onError),_0x454640[_0x22b827(0x1e0)](_0x22b827(0x1c3),_0x21f260),_0x454640[_0x22b827(0x217)](0x0,_0x22b827(0x1e2));});}function _0x1d53fb(_0x4faec7){return new Promise((_0x3f2c0f,_0x438ec3)=>{const _0x20a16e=_0x63f9;if(!_0x4faec7?.['listening']){_0x3f2c0f();return;}_0x4faec7[_0x20a16e(0x1c0)](_0x24fd13=>_0x24fd13?_0x438ec3(_0x24fd13):_0x3f2c0f());});}function _0x1a2693(_0x43d098){return new Promise((_0x164f26,_0x5c8c05)=>{const _0x1606bf=_0x63f9,_0x883f04=connect({'path':_0x43d098});let _0x183a05=![];const _0xb83b97=(_0x176c7b,_0x58c4f1)=>{const _0x44b5b1=_0x63f9;if(_0x183a05)return;_0x183a05=!![],_0x883f04[_0x44b5b1(0x201)]();if(_0x58c4f1)_0x5c8c05(_0x58c4f1);else _0x164f26(_0x176c7b);};_0x883f04[_0x1606bf(0x1e0)]('connect',()=>_0xb83b97(!![])),_0x883f04[_0x1606bf(0x1e0)](_0x1606bf(0x21d),_0x18f11c=>{const _0x192563=_0x1606bf;if(_0x18f11c[_0x192563(0x1f7)]==='ECONNREFUSED'||_0x18f11c['code']==='ENOENT')_0xb83b97(![]);else _0xb83b97(![],_0x18f11c);}),_0x883f04[_0x1606bf(0x1d5)](0x1f4,()=>_0xb83b97(!![]));});}async function _0x5cbb9a(_0x537ae5){const _0xb54334=_0x63f9;try{const _0x3f5e01=await lstat(_0x537ae5);if(!_0x3f5e01[_0xb54334(0x22b)]())throw new Error(_0xb54334(0x22c)+_0x537ae5);if(await _0x1a2693(_0x537ae5))throw new Error('runtime\x20socket\x20already\x20in\x20use:\x20'+_0x537ae5);await rm(_0x537ae5);}catch(_0x12675f){if(_0x12675f[_0xb54334(0x1f7)]!=='ENOENT')throw _0x12675f;}}return{async 'start'(){const _0x5b92a9=_0x63f9;if(_0x376548!==_0x5b92a9(0x213))throw new Error(_0x5b92a9(0x228)+_0x376548);_0x376548=_0x5b92a9(0x1f6);const _0x4503a6=_0x1ba964[_0x5b92a9(0x1fd)]??(_0x1ba964[_0x5b92a9(0x207)]?process[_0x5b92a9(0x1fd)]:_0x5b92a9(0x20a));if(_0x4503a6===_0x5b92a9(0x20a)){_0x197727=_0x5071a2();try{const _0x15024f=await _0x38fe4e(_0x197727);_0x376548=_0x5b92a9(0x1de);const _0x3ac0b0=_0x5b92a9(0x1d2)+_0x15024f;return{'port':_0x15024f,'url':_0x3ac0b0,'compatibilityUrl':_0x3ac0b0,'address':{'type':_0x5b92a9(0x210),'host':'127.0.0.1','port':_0x15024f}};}catch(_0x5303a9){await _0x1d53fb(_0x197727)['catch'](()=>{}),_0x197727=null,_0x376548=_0x5b92a9(0x1b9);throw _0x5303a9;}}const _0x139f5a=_0x1ba964[_0x5b92a9(0x1fe)]??defaultRuntimeDirectory(),_0x1a1883=join(_0x139f5a,(_0x1ba964[_0x5b92a9(0x207)]??process[_0x5b92a9(0x20b)])+_0x5b92a9(0x1ca));let _0x7b8daa=![];try{await mkdir(_0x139f5a,{'recursive':!![],'mode':0x1c0}),await chmod(_0x139f5a,0x1c0),await _0x5cbb9a(_0x1a1883),_0x197727=_0x5071a2(),await _0x391e6b(_0x197727,_0x1a1883),_0x7b8daa=!![],_0x29eaa4=_0x1a1883,await chmod(_0x1a1883,0x180),_0x11cfa5=_0x5071a2();const _0x5eedb4=await _0x38fe4e(_0x11cfa5);return _0x376548='running',{'port':_0x5eedb4,'url':_0x5b92a9(0x1ef)+encodeURIComponent(_0x1a1883),'compatibilityUrl':_0x5b92a9(0x1d2)+_0x5eedb4,'address':{'type':_0x5b92a9(0x221),'path':_0x1a1883}};}catch(_0x5ad5d4){await Promise[_0x5b92a9(0x1ce)]([_0x1d53fb(_0x11cfa5)['catch'](()=>{}),_0x1d53fb(_0x197727)['catch'](()=>{})]),_0x11cfa5=null,_0x197727=null;if(_0x7b8daa)await rm(_0x1a1883,{'force':!![]})[_0x5b92a9(0x1ea)](()=>{});_0x29eaa4=null,_0x376548=_0x5b92a9(0x1b9);throw _0x5ad5d4;}},async 'stop'(){const _0x534a84=_0x63f9;if(_0x376548===_0x534a84(0x1b9))return;_0x376548=_0x534a84(0x208);const _0x2fb6f5=_0x29eaa4,_0x12e7d4=[_0x11cfa5,_0x197727];_0x11cfa5=null,_0x197727=null,_0x29eaa4=null,await Promise[_0x534a84(0x1ce)](_0x12e7d4[_0x534a84(0x200)](_0x493de0=>_0x1d53fb(_0x493de0)));if(_0x2fb6f5)await rm(_0x2fb6f5,{'force':!![]});_0x376548=_0x534a84(0x1b9);}};}
|
|
1
|
+
const _0x18b82f=_0x4917;(function(stringArrayFunction,_0x48917a){const _0x3c58c3=_0x4917,stringArray=stringArrayFunction();while(!![]){try{const _0x2e4da5=parseInt(_0x3c58c3(0x9b))/0x1+parseInt(_0x3c58c3(0x9c))/0x2*(parseInt(_0x3c58c3(0x9d))/0x3)+-parseInt(_0x3c58c3(0xa0))/0x4*(-parseInt(_0x3c58c3(0xee))/0x5)+parseInt(_0x3c58c3(0xdd))/0x6*(-parseInt(_0x3c58c3(0xe7))/0x7)+parseInt(_0x3c58c3(0xe1))/0x8+-parseInt(_0x3c58c3(0xc3))/0x9+-parseInt(_0x3c58c3(0xc4))/0xa*(parseInt(_0x3c58c3(0xc0))/0xb);if(_0x2e4da5===_0x48917a)break;else stringArray['push'](stringArray['shift']());}catch(_0xd9695d){stringArray['push'](stringArray['shift']());}}}(_0x12ff,0x62830));import{chmod,lstat,mkdir,rm}from'node:fs/promises';import{createServer}from'node:http';import{connect}from'node:net';import{tmpdir}from'node:os';function _0x4917(_0x17c2c8,_0x4b2421){_0x17c2c8=_0x17c2c8-0x92;const _0x12ff04=_0x12ff();let _0x4917dd=_0x12ff04[_0x17c2c8];if(_0x4917['SAoNUX']===undefined){var _0x45b12e=function(_0x4d5152){const _0x9bec87='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x145221='',_0x10d18a='';for(let _0x7db5c7=0x0,_0x2856eb,_0x2d65b6,_0x5960a7=0x0;_0x2d65b6=_0x4d5152['charAt'](_0x5960a7++);~_0x2d65b6&&(_0x2856eb=_0x7db5c7%0x4?_0x2856eb*0x40+_0x2d65b6:_0x2d65b6,_0x7db5c7++%0x4)?_0x145221+=String['fromCharCode'](0xff&_0x2856eb>>(-0x2*_0x7db5c7&0x6)):0x0){_0x2d65b6=_0x9bec87['indexOf'](_0x2d65b6);}for(let _0x56c2ce=0x0,_0x3b3fa7=_0x145221['length'];_0x56c2ce<_0x3b3fa7;_0x56c2ce++){_0x10d18a+='%'+('00'+_0x145221['charCodeAt'](_0x56c2ce)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10d18a);};_0x4917['oSYlPv']=_0x45b12e,_0x4917['MfBRCi']={},_0x4917['SAoNUX']=!![];}const _0x4e009f=_0x12ff04[0x0];_0x4917['jezCGX']!==_0x4e009f&&(_0x4917['MfBRCi']={},_0x4917['jezCGX']=_0x4e009f);const _0x2e475a=_0x4917['MfBRCi'][_0x17c2c8];return _0x2e475a===undefined?(_0x4917dd=_0x4917['oSYlPv'](_0x4917dd),_0x4917['MfBRCi'][_0x17c2c8]=_0x4917dd):_0x4917dd=_0x2e475a,_0x4917dd;}import{join}from'node:path';function _0x12ff(){const _0x12b255=['qMvHCMvYia','DxjS','CNvUDgLTzsbZB2nRzxqGywXYzwfKEsbPBIb1C2u6ia','Bwf4qM9KEuj5DgvZ','BwfW','B3bLBMnVzguTy29SBgfIB3jHDgLVBG','DMLH','BMv3','y29UBMvJDa','B25nzxnZywDL','z2v0DwLK','zMLUAxrL','mtqZmZyWAuzsAMjr','mJCWmJzlvgXhtgK','mty1qMPwwfDb','CgXHDgzVCM0','BgLZDgvU','nfLRCgfcvG','zw5K','zNvUy3rPB24','Dgv4Da','Dg9Rzw4','l2fJAW','CgLK','C3rYAw5NAwz5','BgvUz3rO','C3rYAw5N','zgvZDhjVEq','zNjVBq','yxbWBgLJyxrPB24VANnVBG','C3rHCNrPBMC','zgvSAxzLCMvK','y2XVC2u','Aw50zxjUywWGzxjYB3i','B2zM','BwvZC2fNzq','C3vJy2vZCW','DxrMoa','Bwf4twvZC2fNzufNzu1Z','B25Jzq','y2f0y2G','BgLZDgvUzxiGzxjYB3i','BMfTzq','zhvWBgLJyxrL','CMvZB2X2zuvUzhbVAw50','CNvUDgLTzurPCG','Aw52ywXPzcbTzxnZywDLihnOyxbL','werhx1jvtLrjtuvFreLs','y29Kzq','mZnpwxLlsLO','zw5KCg9PBNqGBM90igzVDw5K','ywnJzxb0zwq','ntC4odu5m01nDM1zwa','mJG4nJK5mgfxCvzxrW','mti3lJaUmc4X','l2HLywX0Aa','CM91Dgu','zw51Bq','BM90igzVDw5K','Aw52ywXPzcbQC29U','C2v0vgLTzw91Da','zxHWAxjLza','CMvMDxnLza','BM93','D2LUmZi','ue9tva','yNL0zuXLBMD0Aa','BgLZDgvUAw5N','zxjYB3i','CgfZC3rOCM91z2G','Bwf4twvZC2fNzuj5DgvZ','zNjVBuvUzhbVAw50swq','B2nWlq','C3rVChbLza','Ahr0CdOVlZeYnY4WlJaUmtO','AgvHzgvYCW','Bwv0Ag9K','ru5pru5u','mtaWntbss0vnvNi','BwvZC2fNzuLK','CgfYC2u','BNvTyMvY','mZmXnJy1nKLpuursua','yxv0Ag9YAxPHDgLVBG','B25by2TUB3DSzwrNzw1LBNq','C3rVChbPBMC','ywjZ','zgf0yq','mJG3DgLewuDV','C2vUDef0','CNvUBMLUzW','BwvZC2fNzsb0B28GBgfYz2u','zgLYzwn0B3j5','B2jQzwn0','C2fMzvbHCNnL','mZqWmtq4meXTDejrBG','Dg9fBMrWB2LUDeLK','BwLU','BgL0zxjHBa','ChjVy2vZC0LK','DMvYC2LVBG','Bwf4','r0vu','AgvHzgvYC1nLBNq','Bg9Nz2vY','y29Uy2f0','yxjYyxK','C3rHBguGBwvZC2fNzq','BgLZDgvUzxiGy2fUBM90ihn0yxj0ihDOAwXLia','D3jPDgvizwfK'];_0x12ff=function(){return _0x12b255;};return _0x12ff();}import{z}from'zod';const _0x10d18a=0x4,_0x7db5c7=z['object']({'instanceId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'name':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'directory':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1)})[_0x18b82f(0xd4)](),_0x2856eb=z[_0x18b82f(0xec)]({'id':z[_0x18b82f(0xa9)]()['min'](0x1),'from':_0x7db5c7,'text':z['string'](),'via':z[_0x18b82f(0xf9)](z[_0x18b82f(0xa9)]())[_0x18b82f(0xf4)](_0x10d18a),'sentAt':z[_0x18b82f(0xe0)]()['finite']()})[_0x18b82f(0xd4)](),_0x2d65b6=z[_0x18b82f(0xec)]({'version':z['literal'](0x2),'messageId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'fromEndpointId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'toEndpointId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'from':_0x7db5c7,'text':z[_0x18b82f(0xa9)](),'via':z[_0x18b82f(0xf9)](z['string']())[_0x18b82f(0xf4)](_0x10d18a),'sentAt':z[_0x18b82f(0xe0)]()[_0x18b82f(0x9a)]()})[_0x18b82f(0xd4)](),_0x5960a7=z[_0x18b82f(0xec)]({'version':z[_0x18b82f(0xf1)](0x2),'messageId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'fromEndpointId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'toEndpointId':z[_0x18b82f(0xa9)]()[_0x18b82f(0xf0)](0x1),'status':z[_0x18b82f(0xc8)]([_0x18b82f(0xae),_0x18b82f(0xcd),_0x18b82f(0xcc),'dropped',_0x18b82f(0xba)]),'acknowledgedAt':z[_0x18b82f(0xe0)]()[_0x18b82f(0x9a)]()})[_0x18b82f(0xd4)]();function _0x56c2ce(_0x10f313){const _0x711e2f=_0x18b82f;switch(_0x10f313){case _0x711e2f(0xcd):return 0x193;case'full':return 0x1ad;default:return 0xca;}}function _0x3b3fa7(_0x447200){const _0x4b476b=_0x18b82f;if(typeof _0x447200===_0x4b476b(0xec)&&_0x447200!==null&&_0x4b476b(0xf3)in _0x447200&&_0x447200[_0x4b476b(0xf3)]===0x2){const _0xfa4430=_0x2d65b6[_0x4b476b(0xed)](_0x447200);if(!_0xfa4430['success'])return null;const _0x104afc=_0xfa4430[_0x4b476b(0xe6)];return{'message':{'id':_0x104afc[_0x4b476b(0xde)],'from':{'instanceId':_0x104afc[_0x4b476b(0xd6)],'name':_0x104afc[_0x4b476b(0xab)][_0x4b476b(0xb9)],'directory':_0x104afc['from'][_0x4b476b(0xeb)]},'text':_0x104afc['text'],'via':_0x104afc[_0x4b476b(0x95)],'sentAt':_0x104afc[_0x4b476b(0xe8)]},'route':{'version':0x2,'toEndpointId':_0x104afc['toEndpointId']}};}const _0x2b7237=_0x2856eb[_0x4b476b(0xed)](_0x447200);return _0x2b7237[_0x4b476b(0xb3)]?{'message':_0x2b7237['data'],'route':{'version':0x1}}:null;}export function defaultRuntimeDirectory(_0x3b8e38=process.env,_0x5b68d7=typeof process[_0x18b82f(0x99)]===_0x18b82f(0xa2)?process['getuid']():0x0){const _0x41df66=_0x18b82f;return _0x3b8e38[_0x41df66(0xbe)]?join(_0x3b8e38[_0x41df66(0xbe)],_0x41df66(0x94)):join(tmpdir(),_0x41df66(0xd7)+_0x5b68d7);}export function InboxListener(_0x549dce){const _0x5a2504=_0x18b82f;let _0x4ea275=null,_0x1e9b76=null,_0x1b84ee=null,_0x9fe62d=_0x5a2504(0x96);function _0x5a1069(_0x179aa0){const _0x363fd6=_0x5a2504;return _0x179aa0===_0x363fd6(0xfd)+_0x549dce[_0x363fd6(0xa4)];}async function _0x25e6cb(_0x17d1f3,_0x3f8466){const _0x31cd15=_0x5a2504,_0x4d298e=(_0x243bd5,_0x51c67a)=>{const _0x513ebd=_0x4917;_0x3f8466['writeHead'](_0x243bd5,{'content-type':_0x513ebd(0xac)}),_0x3f8466[_0x513ebd(0xa1)](JSON[_0x513ebd(0xa7)](_0x51c67a));};if(!_0x5a1069(_0x17d1f3[_0x31cd15(0xda)][_0x31cd15(0xe2)])){_0x4d298e(0x191,{'error':'unauthorized'});return;}if(_0x17d1f3[_0x31cd15(0xdb)]===_0x31cd15(0xf5)&&_0x17d1f3[_0x31cd15(0xfe)]===_0x31cd15(0xc6)){_0x4d298e(0xc8,{'ok':!![]});return;}if(_0x17d1f3['method']!==_0x31cd15(0xd0)||_0x17d1f3['url']!=='/message'&&_0x17d1f3[_0x31cd15(0xfe)]!==_0x31cd15(0xa5)){_0x4d298e(0x194,{'error':_0x31cd15(0xc9)});return;}const _0x50cfc8=[];let _0x6dbc32=0x0;for await(const _0x345494 of _0x17d1f3){_0x6dbc32+=_0x345494[_0x31cd15(0xa8)];if(_0x6dbc32>_0x549dce[_0x31cd15(0x92)]){_0x4d298e(0x19d,{'error':_0x31cd15(0xea)}),_0x17d1f3[_0x31cd15(0xaa)]();return;}_0x50cfc8['push'](_0x345494);}let _0x7fb4b6;try{_0x7fb4b6=JSON[_0x31cd15(0xdf)](Buffer[_0x31cd15(0xf8)](_0x50cfc8)['toString']('utf8'));}catch{_0x4d298e(0x190,{'error':_0x31cd15(0xca)});return;}if(_0x17d1f3[_0x31cd15(0xfe)]==='/ack'){const _0x474485=_0x5960a7[_0x31cd15(0xed)](_0x7fb4b6);if(!_0x474485[_0x31cd15(0xb3)]){_0x4d298e(0x190,{'error':'invalid\x20acknowledgement\x20shape'});return;}await _0x549dce[_0x31cd15(0xe3)]?.(_0x474485[_0x31cd15(0xe6)]),_0x4d298e(0xca,{'status':_0x31cd15(0xc2)});return;}const _0x3e7269=_0x3b3fa7(_0x7fb4b6);if(!_0x3e7269){_0x4d298e(0x190,{'error':_0x31cd15(0xbd)});return;}const _0x2bfc63=_0x3e7269[_0x31cd15(0xb2)];if(Buffer[_0x31cd15(0xd1)](_0x2bfc63[_0x31cd15(0xa3)],_0x31cd15(0xb4))>(_0x549dce[_0x31cd15(0xd5)]??0x2000)){_0x4d298e(0x19d,{'error':_0x31cd15(0xea)});return;}if(Math[_0x31cd15(0xe5)](Date[_0x31cd15(0xce)]()-_0x2bfc63[_0x31cd15(0xe8)])>(_0x549dce[_0x31cd15(0xb5)]??0x493e0)){_0x4d298e(0x190,{'error':_0x31cd15(0xfa)});return;}try{const _0xd7ff4c=await _0x549dce[_0x31cd15(0xbb)]?.(_0x3e7269[_0x31cd15(0xc7)]);if(_0x549dce[_0x31cd15(0xbb)]&&!_0xd7ff4c){_0x4d298e(0x194,{'error':_0x31cd15(0xc1)});return;}const _0xac24d4=await _0x549dce[_0x31cd15(0x98)](_0x2bfc63,_0xd7ff4c??_0x3e7269[_0x31cd15(0xc7)][_0x31cd15(0xef)]);_0x4d298e(_0x56c2ce(_0xac24d4),{'status':_0xac24d4});}catch(_0x512be5){await _0x549dce[_0x31cd15(0xf7)]('error','onMessage\x20handler\x20failed',{'error':String(_0x512be5)}),_0x4d298e(0x1f4,{'error':_0x31cd15(0xb0)});}}function _0x46658c(){return createServer((_0xcf5f20,_0x257f5f)=>{_0x25e6cb(_0xcf5f20,_0x257f5f)['catch'](_0x8646d=>{const _0x95c82b=_0x4917;void _0x549dce[_0x95c82b(0xf7)](_0x95c82b(0xd3),_0x95c82b(0xb8),{'error':String(_0x8646d)});if(!_0x257f5f[_0x95c82b(0xf6)])_0x257f5f[_0x95c82b(0xfc)](0x1f4)[_0x95c82b(0xa1)]();else _0x257f5f['end']();});});}function _0x1e7f44(_0x4b9cf6,_0xc81bf3){return new Promise((_0x590a67,_0x7ad0b3)=>{const _0xd4c221=_0x4917,onError=_0x2be121=>{const _0x4759f8=_0x4917;_0x4b9cf6[_0x4759f8(0xb1)](_0x4759f8(0xd2),_0x2ff2f3),_0x7ad0b3(_0x2be121);},_0x2ff2f3=()=>{_0x4b9cf6['off']('error',onError),_0x590a67();};_0x4b9cf6[_0xd4c221(0xb6)](_0xd4c221(0xd3),onError),_0x4b9cf6['once'](_0xd4c221(0xd2),_0x2ff2f3),_0x4b9cf6[_0xd4c221(0x9f)](_0xc81bf3);});}function _0x21750c(_0x45e290){return new Promise((_0x39ef38,_0x49919a)=>{const _0x2c6273=_0x4917,onError=_0xe73623=>{const _0x2d5434=_0x4917;_0x45e290[_0x2d5434(0xb1)](_0x2d5434(0xd2),_0x246d5b),_0x49919a(_0xe73623);},_0x246d5b=()=>{const _0x32db25=_0x4917;_0x45e290[_0x32db25(0xb1)]('error',onError),_0x39ef38(_0x45e290['address']()['port']);};_0x45e290[_0x2c6273(0xb6)](_0x2c6273(0xd3),onError),_0x45e290[_0x2c6273(0xb6)](_0x2c6273(0xd2),_0x246d5b),_0x45e290[_0x2c6273(0x9f)](0x0,_0x2c6273(0xc5));});}function _0x525708(_0x467257){return new Promise((_0x5e1fb3,_0x3d6a15)=>{const _0x27f815=_0x4917;if(!_0x467257?.[_0x27f815(0xd2)]){_0x5e1fb3();return;}_0x467257[_0x27f815(0xaf)](_0x4ea2d5=>_0x4ea2d5?_0x3d6a15(_0x4ea2d5):_0x5e1fb3());});}function _0x50a2d4(_0x4b6c56){return new Promise((_0x261aa3,_0x2c3bfc)=>{const _0x258eeb=_0x4917,_0xddec3=connect({'path':_0x4b6c56});let _0x1e17bc=![];const _0x466a4a=(_0x40309e,_0xa57091)=>{const _0x51bc22=_0x4917;if(_0x1e17bc)return;_0x1e17bc=!![],_0xddec3[_0x51bc22(0xaa)]();if(_0xa57091)_0x2c3bfc(_0xa57091);else _0x261aa3(_0x40309e);};_0xddec3[_0x258eeb(0xb6)](_0x258eeb(0x97),()=>_0x466a4a(!![])),_0xddec3[_0x258eeb(0xb6)](_0x258eeb(0xd3),_0x54bc12=>{const _0x5643fb=_0x258eeb;if(_0x54bc12[_0x5643fb(0xbf)]==='ECONNREFUSED'||_0x54bc12[_0x5643fb(0xbf)]===_0x5643fb(0xdc))_0x466a4a(![]);else _0x466a4a(![],_0x54bc12);}),_0xddec3[_0x258eeb(0xcb)](0x1f4,()=>_0x466a4a(!![]));});}async function _0x4fc956(_0x1b21ee){const _0x45ce1c=_0x5a2504;try{const _0xd06cbe=await lstat(_0x1b21ee);if(!_0xd06cbe['isSocket']())throw new Error('runtime\x20socket\x20path\x20collision:\x20'+_0x1b21ee);if(await _0x50a2d4(_0x1b21ee))throw new Error(_0x45ce1c(0xff)+_0x1b21ee);await rm(_0x1b21ee);}catch(_0x384443){if(_0x384443[_0x45ce1c(0xbf)]!==_0x45ce1c(0xdc))throw _0x384443;}}return{async 'start'(){const _0x3a9c2c=_0x5a2504;if(_0x9fe62d!==_0x3a9c2c(0x96))throw new Error(_0x3a9c2c(0xfb)+_0x9fe62d);_0x9fe62d=_0x3a9c2c(0xad);const _0x1f8840=_0x549dce[_0x3a9c2c(0x9e)]??(_0x549dce[_0x3a9c2c(0xf2)]?process[_0x3a9c2c(0x9e)]:_0x3a9c2c(0xcf));if(_0x1f8840===_0x3a9c2c(0xcf)){_0x4ea275=_0x46658c();try{const _0x530ba4=await _0x21750c(_0x4ea275);_0x9fe62d=_0x3a9c2c(0xe9);const _0xe03d36=_0x3a9c2c(0xd9)+_0x530ba4;return{'port':_0x530ba4,'url':_0xe03d36,'compatibilityUrl':_0xe03d36,'address':{'type':'tcp','host':_0x3a9c2c(0xc5),'port':_0x530ba4}};}catch(_0x31190c){await _0x525708(_0x4ea275)[_0x3a9c2c(0xb7)](()=>{}),_0x4ea275=null,_0x9fe62d='stopped';throw _0x31190c;}}const _0x5d5c89=_0x549dce[_0x3a9c2c(0xbc)]??defaultRuntimeDirectory(),_0x277572=join(_0x5d5c89,(_0x549dce[_0x3a9c2c(0xf2)]??process[_0x3a9c2c(0xa6)])+'.sock');let _0x81f8d2=![];try{await mkdir(_0x5d5c89,{'recursive':!![],'mode':0x1c0}),await chmod(_0x5d5c89,0x1c0),await _0x4fc956(_0x277572),_0x4ea275=_0x46658c(),await _0x1e7f44(_0x4ea275,_0x277572),_0x81f8d2=!![],_0x1b84ee=_0x277572,await chmod(_0x277572,0x180),_0x1e9b76=_0x46658c();const _0x5842ff=await _0x21750c(_0x1e9b76);return _0x9fe62d=_0x3a9c2c(0xe9),{'port':_0x5842ff,'url':'http+unix://'+encodeURIComponent(_0x277572),'compatibilityUrl':_0x3a9c2c(0xd9)+_0x5842ff,'address':{'type':'unix','path':_0x277572}};}catch(_0x54ceab){await Promise['all']([_0x525708(_0x1e9b76)[_0x3a9c2c(0xb7)](()=>{}),_0x525708(_0x4ea275)[_0x3a9c2c(0xb7)](()=>{})]),_0x1e9b76=null,_0x4ea275=null;if(_0x81f8d2)await rm(_0x277572,{'force':!![]})[_0x3a9c2c(0xb7)](()=>{});_0x1b84ee=null,_0x9fe62d=_0x3a9c2c(0xd8);throw _0x54ceab;}},async 'stop'(){const _0x48199d=_0x5a2504;if(_0x9fe62d===_0x48199d(0xd8))return;_0x9fe62d=_0x48199d(0xe4);const _0x16094d=_0x1b84ee,_0x501346=[_0x1e9b76,_0x4ea275];_0x1e9b76=null,_0x4ea275=null,_0x1b84ee=null,await Promise['all'](_0x501346[_0x48199d(0x93)](_0x27a4fc=>_0x525708(_0x27a4fc)));if(_0x16094d)await rm(_0x16094d,{'force':!![]});_0x9fe62d='stopped';}};}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/outbox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(stringArrayFunction,
|
|
1
|
+
(function(stringArrayFunction,_0x2c005b){const _0xbfb4=_0x5360,stringArray=stringArrayFunction();while(!![]){try{const _0x5ab7df=-parseInt(_0xbfb4(0xcf))/0x1+-parseInt(_0xbfb4(0xbc))/0x2+-parseInt(_0xbfb4(0xc2))/0x3*(-parseInt(_0xbfb4(0xbd))/0x4)+-parseInt(_0xbfb4(0xc3))/0x5*(-parseInt(_0xbfb4(0xc0))/0x6)+-parseInt(_0xbfb4(0xca))/0x7*(-parseInt(_0xbfb4(0xda))/0x8)+parseInt(_0xbfb4(0xdb))/0x9+-parseInt(_0xbfb4(0xc5))/0xa*(parseInt(_0xbfb4(0xc6))/0xb);if(_0x5ab7df===_0x2c005b)break;else stringArray['push'](stringArray['shift']());}catch(_0x341bd9){stringArray['push'](stringArray['shift']());}}}(_0x16ca,0x44d1f));function _0x16ca(){const _0x5292c6=['y3jLyxrLzef0','mtaWntK0nMjVAfbbuq','nfDSvfL0tW','zw5KC1DPDgG','BM93','nKD1BLzKtG','CgXHDgzVCM0','ndG4nJu1AKXUwLvb','ote3mdK1EKXmuuPM','zMLSDgvY','mtbnrMDby3K','mtqXody1oxrcqKjcyW','lMPZB24','Dg9fBMrWB2LUDeLK','C3rYAw5NAwz5','mteYBxffC2rH','DxrMoa','Agv4','BwvZC2fNzuLK','CgLK','nJy1mZr4wMDcChO','ywnRBM93BgvKz2vKqxq','zMXHDe1HCa','D2LUmZi','zNjVBuvUzhbVAw50swq','CgfYC2u','CMvWBgfJzq','C3rHDhvZ','Dgv4Da','B3v0yM94','DMvYC2LVBG','mJe2mJGWDgHgExrb','mtGXmZq5mvHyAMPQva','lNrTCa','Bg9JywXLq29TCgfYzq'];_0x16ca=function(){return _0x5292c6;};return _0x16ca();}import{randomBytes}from'node:crypto';import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,writeSync}from'node:fs';import{dirname,join}from'node:path';function _0x5360(_0x4ba28e,_0x32dca7){_0x4ba28e=_0x4ba28e-0xbc;const _0x16ca6f=_0x16ca();let _0x53605b=_0x16ca6f[_0x4ba28e];if(_0x5360['YbYjbm']===undefined){var _0x393580=function(_0x4b1a25){const _0x45dc70='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x384f79='',_0xbe8d37='';for(let _0x24f3ca=0x0,_0x25fade,_0x547876,_0x22305d=0x0;_0x547876=_0x4b1a25['charAt'](_0x22305d++);~_0x547876&&(_0x25fade=_0x24f3ca%0x4?_0x25fade*0x40+_0x547876:_0x547876,_0x24f3ca++%0x4)?_0x384f79+=String['fromCharCode'](0xff&_0x25fade>>(-0x2*_0x24f3ca&0x6)):0x0){_0x547876=_0x45dc70['indexOf'](_0x547876);}for(let _0x42f7af=0x0,_0x698518=_0x384f79['length'];_0x42f7af<_0x698518;_0x42f7af++){_0xbe8d37+='%'+('00'+_0x384f79['charCodeAt'](_0x42f7af)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbe8d37);};_0x5360['DcqhGf']=_0x393580,_0x5360['IQHMLY']={},_0x5360['YbYjbm']=!![];}const _0x12511b=_0x16ca6f[0x0];_0x5360['UiEbMt']!==_0x12511b&&(_0x5360['IQHMLY']={},_0x5360['UiEbMt']=_0x12511b);const _0x5ed0d8=_0x5360['IQHMLY'][_0x4ba28e];return _0x5ed0d8===undefined?(_0x53605b=_0x5360['DcqhGf'](_0x53605b),_0x5360['IQHMLY'][_0x4ba28e]=_0x53605b):_0x53605b=_0x5ed0d8,_0x53605b;}function _0xbe8d37(_0x24f3ca){const _0x2a9700=_0x5360;return _0x24f3ca[_0x2a9700(0xd5)](/[^a-zA-Z0-9_-]/g,'_');}export function Outbox(_0x25fade){const _0x1aa03b=_0x5360,_0x547876=join(_0x25fade['storageDir'],_0x1aa03b(0xd8));function _0x22305d(_0x3ff63c){mkdirSync(_0x3ff63c,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x3ff63c,0x1c0);}function _0x42f7af(_0x48b707,_0x506517){const _0x21c069=_0x1aa03b;return join(_0x547876,_0xbe8d37(_0x48b707),_0xbe8d37(_0x506517)+_0x21c069(0xc7));}function _0x698518(_0x5c1285,_0x3ef4ef){const _0x1be62f=_0x1aa03b;try{const _0x199f8f=JSON[_0x1be62f(0xd4)](readFileSync(_0x42f7af(_0x5c1285,_0x3ef4ef),_0x1be62f(0xcb)));return _0x199f8f[_0x1be62f(0xd9)]===0x1&&_0x199f8f[_0x1be62f(0xcd)]===_0x3ef4ef&&_0x199f8f[_0x1be62f(0xd3)]===_0x5c1285?_0x199f8f:null;}catch{return null;}}function _0x4b1454(_0x32e9e0){const _0x5ac1cc=_0x1aa03b,_0x5ece28=_0x42f7af(_0x32e9e0[_0x5ac1cc(0xd3)],_0x32e9e0[_0x5ac1cc(0xcd)]),_0x1df30e=dirname(_0x5ece28);_0x22305d(_0x547876),_0x22305d(_0x1df30e);const _0x16e386=join(_0x1df30e,'.'+process[_0x5ac1cc(0xce)]+'.'+randomBytes(0x8)['toString'](_0x5ac1cc(0xcc))+_0x5ac1cc(0xdc)),_0x4923e8=openSync(_0x16e386,'wx',0x180);try{writeSync(_0x4923e8,JSON[_0x5ac1cc(0xc9)](_0x32e9e0)),fsyncSync(_0x4923e8);}finally{closeSync(_0x4923e8);}chmodSync(_0x16e386,0x180),renameSync(_0x16e386,_0x5ece28);if(process[_0x5ac1cc(0xc1)]!==_0x5ac1cc(0xd2)){const _0x85c47b=openSync(_0x1df30e,'r');try{fsyncSync(_0x85c47b);}finally{closeSync(_0x85c47b);}}}function _0x51e26c(_0x153c46,_0x11c04d,_0x114e11){const _0x14bba1=_0x1aa03b,_0x57df67=_0x698518(_0x153c46,_0x11c04d);if(!_0x57df67)return null;const _0x3de134={..._0x57df67,..._0x114e11,'updatedAt':Date[_0x14bba1(0xbf)]()};return _0x4b1454(_0x3de134),_0x3de134;}return{async 'recordPending'(_0x3d8f65,_0x490dc1){const _0x1b42d5=_0x1aa03b,_0x566ff7=_0x698518(_0x3d8f65[_0x1b42d5(0xd3)],_0x3d8f65[_0x1b42d5(0xcd)]);if(_0x566ff7)return _0x566ff7;const _0x374fb5={'version':0x1,'messageId':_0x3d8f65[_0x1b42d5(0xcd)],'fromEndpointId':_0x3d8f65[_0x1b42d5(0xd3)],'toEndpointId':_0x3d8f65[_0x1b42d5(0xc8)],'toName':_0x490dc1,'text':_0x3d8f65[_0x1b42d5(0xd7)],'createdAt':Date[_0x1b42d5(0xbf)](),'updatedAt':Date[_0x1b42d5(0xbf)]()};return _0x4b1454(_0x374fb5),_0x374fb5;},async 'recordReceipt'(_0x41b8d8,fromEndpointId,_0x59733e){return _0x51e26c(fromEndpointId,_0x41b8d8,{'receiptStatus':_0x59733e,'error':undefined});},async 'recordFailure'(_0x112d30,fromEndpointId,_0x3d4ae2){return _0x51e26c(fromEndpointId,_0x112d30,{'error':_0x3d4ae2});},async 'applyAcknowledgement'(_0x435702){const _0xb06818=_0x1aa03b,_0x35ed06=_0x698518(_0x435702[_0xb06818(0xd3)],_0x435702[_0xb06818(0xcd)]);if(!_0x35ed06||_0x35ed06[_0xb06818(0xc8)]!==_0x435702['toEndpointId'])return![];return _0x51e26c(_0x435702[_0xb06818(0xd3)],_0x435702['messageId'],{'finalStatus':_0x435702[_0xb06818(0xd6)],'acknowledgedAt':_0x435702[_0xb06818(0xd0)],'error':undefined}),!![];},'get':_0x698518,'list'(fromEndpointId){const _0x503b81=_0x1aa03b,_0x5a657d=join(_0x547876,_0xbe8d37(fromEndpointId));if(!existsSync(_0x5a657d))return[];return readdirSync(_0x5a657d)[_0x503b81(0xc4)](_0x4ecc0c=>_0x4ecc0c[_0x503b81(0xbe)](_0x503b81(0xc7)))[_0x503b81(0xd1)](_0xd97bd0=>{const _0x56805a=_0x503b81;try{const _0x3e1f5f=JSON['parse'](readFileSync(join(_0x5a657d,_0xd97bd0),_0x56805a(0xcb)));return _0x3e1f5f[_0x56805a(0xd9)]===0x1&&_0x3e1f5f[_0x56805a(0xd3)]===fromEndpointId?[_0x3e1f5f]:[];}catch{return[];}})['sort']((_0x2f4ea7,_0x1943ab)=>_0x1943ab[_0x503b81(0xde)]-_0x2f4ea7[_0x503b81(0xde)]||_0x1943ab['messageId'][_0x503b81(0xdd)](_0x2f4ea7[_0x503b81(0xcd)]));}};}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/permissions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x3a46(){const _0x66d0d4=['DMfSDwu','zNvUy3rPB24','C2vZC2LVBG','DgvZDa','z2v0','mZaWmJK2vunYrxjg','Dg9mB3DLCKnHC2u','zgf0yq','C2v0','BwvZC2fNzq','CgvYBwLZC2LVBI52mI5HC2TLza','AxnqzwvY','Dg9VBa','zgvIDwC','ywXSB3C','ywn0Aw9U','B2jQzwn0','AxnbCNjHEq','ChvZAa','CgfYzw50suq','nZuZmZe1mhnPCfDpCG','CgvLCK1LC3nHz2u','ChjVCgvYDgLLCW','zMfPBgvKihrVigf1Dg8TCMvZB2X2zsbWzxjTAxnZAw9U','DMfSDwvZ','ntG2odaYzuHwvunm','CgvYBwLZC2LVBI5HC2TLza','mte4mtK2ruXvwNLW','BwvZC2fNzuLe','BMv4Da','ihbLCM1PC3nPB24GAw4GCgvLCI10CMLNz2vYzwqGDhvYBG','otfVEKHgDwW','CM9Szq','Aw5MBW','C291CMnL','DhLWzq','CgfYDhm','DgL0Bgu','mte3Bg9sq1Lw','yxnR','Cg9ZDfnLC3nPB25jzfbLCM1PC3nPB25ZugvYBwLZC2LVBKLK','Bg9Nz2vY','D2fYBG','DxnLCG','y2XPzw50','CMvQzwn0','mLfVDLvNrW','zgvSzxrL','A2v5CW','oteWnJqWDuv0Bvfd','zgvUEq','C2L6zq','B25Jzq','CgvYBwLZC2LVBG','Bwv0ywrHDge','yxv0BY0','AgfZ','mJi0mtqYANryq3vt','ndyZmdq3ELzOB0Hi','ywrK','CgvYBwLZC2LVBIbYzxbSEsbLBMrWB2LUDcb1BMf2ywLSywjSzsbPBIb0AgLZifnesW'];_0x3a46=function(){return _0x66d0d4;};return _0x3a46();}function _0x29bf(_0x165dcb,_0x195b60){_0x165dcb=_0x165dcb-0x1d8;const _0x3a46fd=_0x3a46();let _0x29bfbc=_0x3a46fd[_0x165dcb];if(_0x29bf['EIKoJq']===undefined){var _0x5e8254=function(_0x32c479){const _0x5ae12d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1486ff='',_0x15fea4='';for(let _0xc203c5=0x0,_0x35da33,_0x5e1d0a,_0x300a81=0x0;_0x5e1d0a=_0x32c479['charAt'](_0x300a81++);~_0x5e1d0a&&(_0x35da33=_0xc203c5%0x4?_0x35da33*0x40+_0x5e1d0a:_0x5e1d0a,_0xc203c5++%0x4)?_0x1486ff+=String['fromCharCode'](0xff&_0x35da33>>(-0x2*_0xc203c5&0x6)):0x0){_0x5e1d0a=_0x5ae12d['indexOf'](_0x5e1d0a);}for(let _0x2b3ba6=0x0,_0x143721=_0x1486ff['length'];_0x2b3ba6<_0x143721;_0x2b3ba6++){_0x15fea4+='%'+('00'+_0x1486ff['charCodeAt'](_0x2b3ba6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15fea4);};_0x29bf['PkXxEq']=_0x5e8254,_0x29bf['gfKmuF']={},_0x29bf['EIKoJq']=!![];}const _0x1eae0b=_0x3a46fd[0x0];_0x29bf['fwXwlT']!==_0x1eae0b&&(_0x29bf['gfKmuF']={},_0x29bf['fwXwlT']=_0x1eae0b);const _0x4f6d5b=_0x29bf['gfKmuF'][_0x165dcb];return _0x4f6d5b===undefined?(_0x29bfbc=_0x29bf['PkXxEq'](_0x29bfbc),_0x29bf['gfKmuF'][_0x165dcb]=_0x29bfbc):_0x29bfbc=_0x4f6d5b,_0x29bfbc;}(function(stringArrayFunction,_0x5388fd){const _0x2ed8ec=_0x29bf,stringArray=stringArrayFunction();while(!![]){try{const _0x1a430c=parseInt(_0x2ed8ec(0x204))/0x1+parseInt(_0x2ed8ec(0x1dc))/0x2*(-parseInt(_0x2ed8ec(0x1e8))/0x3)+-parseInt(_0x2ed8ec(0x206))/0x4+-parseInt(_0x2ed8ec(0x1df))/0x5+parseInt(_0x2ed8ec(0x1e7))/0x6*(parseInt(_0x2ed8ec(0x20a))/0x7)+-parseInt(_0x2ed8ec(0x1f0))/0x8*(-parseInt(_0x2ed8ec(0x211))/0x9)+-parseInt(_0x2ed8ec(0x1ff))/0xa;if(_0x1a430c===_0x5388fd)break;else stringArray['push'](stringArray['shift']());}catch(_0x2b0513){stringArray['push'](stringArray['shift']());}}}(_0x3a46,0x6bafb));const _0x15fea4=0xc8,_0xc203c5=0x4;function _0x35da33(_0x5e1d0a){const _0x76189d=_0x29bf,_0x300a81=[],_0x2b3ba6=(_0x143721,_0x6b2d05)=>{const _0x599078=_0x29bf;if(_0x6b2d05>0x3||_0x143721==null)return;if(typeof _0x143721==='string')_0x300a81[_0x599078(0x1fd)](_0x143721);else{if(Array[_0x599078(0x1fc)](_0x143721)){for(const _0x4760f1 of _0x143721)_0x2b3ba6(_0x4760f1,_0x6b2d05+0x1);}else{if(typeof _0x143721===_0x599078(0x1fb)){for(const _0x1632c3 of Object[_0x599078(0x203)](_0x143721))_0x2b3ba6(_0x1632c3,_0x6b2d05+0x1);}}}};return _0x2b3ba6(_0x5e1d0a,0x0),_0x300a81['join']('\x0a')[_0x76189d(0x1f1)]();}export function isProtectedPermission(_0x586d46){const _0x57969b=_0x29bf,_0x8db03=String(_0x586d46[_0x57969b(0x1e3)]??_0x586d46[_0x57969b(0x1fa)]??_0x586d46[_0x57969b(0x20e)]??'')[_0x57969b(0x1f1)](),_0x43d1d6=_0x35da33(_0x586d46);if(_0x8db03===_0x57969b(0x1e3)||/permission[ _.-]*(?:escalat|config|rule)/[_0x57969b(0x1ee)](_0x43d1d6))return!![];return/(?:^|[\\/\s])agents\.md(?:$|\s)/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|[\\/\s])(?:opencode(?:\.jsonc?)?|\.opencode)(?:$|[\\/\s])/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|[\\/\s])(?:\.env(?:\.[^\s\\/]*)?|credentials?|secrets?|\.npmrc|\.pypirc|\.netrc|\.gitconfig)(?:$|\s)/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|[\\/\s])(?:\.aws|\.ssh|\.gnupg|\.kube|\.docker)[\\/]/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|[\\/\s])(?:\.zshrc|\.zshenv|\.zprofile|\.bashrc|\.bash_profile|\.bash_login|\.profile|config\.fish)(?:$|\s)/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|[\\/\s])(?:launchagents|launchdaemons)[\\/]/i[_0x57969b(0x1ee)](_0x43d1d6)||/(?:^|\s)(?:crontab|visudo)(?:\s|$)/i['test'](_0x43d1d6)||/\/(?:etc|private\/etc)\/(?:sudoers|crontab|cron\.)/i[_0x57969b(0x1ee)](_0x43d1d6);}export function PeerPermissions(_0x587c3e){const _0x54d73a=new Map(),_0x43f813=new Set();async function fetchMessage(_0x261ae5,_0x2fa731){const _0x48a5cc=_0x29bf,_0xe8c704=await _0x587c3e[_0x48a5cc(0x1da)][_0x48a5cc(0x1ed)][_0x48a5cc(0x1f4)]({'path':{'id':_0x261ae5,'messageID':_0x2fa731}}),_0x32b728=_0xe8c704[_0x48a5cc(0x1f2)];if(!_0x32b728)return null;return{'role':_0x32b728[_0x48a5cc(0x20c)]?.[_0x48a5cc(0x20b)],'parentID':_0x32b728[_0x48a5cc(0x20c)]?.[_0x48a5cc(0x1fe)],'isPeer':Boolean(_0x32b728[_0x48a5cc(0x20f)]?.['some'](_0x48899b=>Boolean(_0x48899b[_0x48a5cc(0x1e4)]?.[_0x48a5cc(0x200)])))};}async function _0x1c9c95(_0x182a92,_0x14bd7d){const _0x2b27bd=_0x29bf,_0x517991=_0x182a92+':'+_0x14bd7d,_0xa71c8f=_0x54d73a[_0x2b27bd(0x1ef)](_0x517991);if(_0xa71c8f!==undefined)return _0xa71c8f;let _0xa150d6=![],_0x10e088=![];try{let _0x4cc74a=_0x14bd7d;for(let _0x552e4e=0x0;_0x4cc74a&&_0x552e4e<_0xc203c5;_0x552e4e++){const _0x409b2a=await fetchMessage(_0x182a92,_0x4cc74a);if(!_0x409b2a){_0x10e088=!![];break;}if(_0x409b2a[_0x2b27bd(0x1f6)]){_0xa150d6=!![];break;}if(_0x409b2a[_0x2b27bd(0x20b)]===_0x2b27bd(0x1d9)||!_0x409b2a[_0x2b27bd(0x1fe)])break;_0x4cc74a=_0x409b2a[_0x2b27bd(0x1fe)];}}catch(_0x1bbbc8){return await _0x587c3e[_0x2b27bd(0x214)](_0x2b27bd(0x1f8),'peer-message\x20lookup\x20failed;\x20leaving\x20permission\x20to\x20default',{'error':String(_0x1bbbc8),'sessionID':_0x182a92,'messageID':_0x14bd7d}),![];}if(_0x10e088)return![];if(_0x54d73a[_0x2b27bd(0x1e1)]>=_0x15fea4){const _0x2fb81d=_0x54d73a[_0x2b27bd(0x1de)]()[_0x2b27bd(0x208)]()[_0x2b27bd(0x1eb)];if(_0x2fb81d!==undefined)_0x54d73a[_0x2b27bd(0x1dd)](_0x2fb81d);}return _0x54d73a[_0x2b27bd(0x1f3)](_0x517991,_0xa150d6),_0xa150d6;}return{async 'handleEvent'(_0x107c11){const _0x403648=_0x29bf;if(_0x107c11['type']!==_0x403648(0x1f5)&&_0x107c11[_0x403648(0x20e)]!==_0x403648(0x205))return;const _0x525b15=_0x587c3e['mode']();if(_0x525b15===_0x403648(0x212))return;const _0x54c312=_0x107c11[_0x403648(0x201)]??{},_0x19dac1=_0x54c312['id'],_0x46caed=_0x54c312['sessionID'],_0x360587=_0x54c312[_0x403648(0x20d)],_0x28197e=_0x54c312[_0x403648(0x1f7)],_0x5a9a4d=_0x360587?.['messageID']??_0x28197e?.[_0x403648(0x207)]??_0x54c312[_0x403648(0x207)];if(!_0x19dac1||!_0x46caed||!_0x5a9a4d)return;if(_0x43f813[_0x403648(0x1e6)](_0x19dac1))return;if(!await _0x1c9c95(_0x46caed,_0x5a9a4d))return;if(_0x525b15===_0x403648(0x1f9)&&isProtectedPermission(_0x54c312)){await _0x587c3e[_0x403648(0x214)]('warn','protected\x20peer\x20permission\x20left\x20to\x20OpenCode\x20policy',{'permission':_0x54c312['permission']??_0x54c312['action']??_0x54c312[_0x403648(0x20e)],'sessionID':_0x46caed,'permissionID':_0x19dac1});return;}_0x43f813[_0x403648(0x1e9)](_0x19dac1);if(_0x43f813['size']>_0x15fea4){const _0x9ce60=_0x43f813[_0x403648(0x203)]()[_0x403648(0x208)]()[_0x403648(0x1eb)];if(_0x9ce60!==undefined)_0x43f813['delete'](_0x9ce60);}const _0x38e904=_0x525b15===_0x403648(0x1e0)?_0x403648(0x1db):_0x403648(0x1e2);try{const _0x6c72e2=_0x587c3e[_0x403648(0x1da)];if(typeof _0x6c72e2[_0x403648(0x213)]!==_0x403648(0x1ec)){await _0x587c3e[_0x403648(0x214)]('warn',_0x403648(0x1ea));return;}await _0x6c72e2[_0x403648(0x213)]({'path':{'id':_0x46caed,'permissionID':_0x19dac1},'body':{'response':_0x38e904},'query':{'directory':_0x587c3e['directory']}}),await _0x587c3e[_0x403648(0x214)](_0x403648(0x20c),_0x403648(0x1e5)+_0x525b15+_0x403648(0x209),{'permission':_0x54c312['action']??_0x54c312[_0x403648(0x20e)],'title':_0x54c312[_0x403648(0x210)],'sessionID':_0x46caed,'permissionID':_0x19dac1});}catch(_0x542fd8){_0x43f813['delete'](_0x19dac1),await _0x587c3e[_0x403648(0x214)](_0x403648(0x1d8),_0x403648(0x202),{'error':String(_0x542fd8),'sessionID':_0x46caed,'permissionID':_0x19dac1});}}};}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/queue.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(stringArrayFunction,_0x3144d5){const _0x23f986=_0xa85f,stringArray=stringArrayFunction();while(!![]){try{const _0x5b3ad7=-parseInt(_0x23f986(0x23f))/0x1+-parseInt(_0x23f986(0x23c))/0x2*(-parseInt(_0x23f986(0x214))/0x3)+parseInt(_0x23f986(0x208))/0x4+-parseInt(_0x23f986(0x247))/0x5+parseInt(_0x23f986(0x226))/0x6*(parseInt(_0x23f986(0x258))/0x7)+-parseInt(_0x23f986(0x217))/0x8*(parseInt(_0x23f986(0x218))/0x9)+parseInt(_0x23f986(0x22e))/0xa*(parseInt(_0x23f986(0x200))/0xb);if(_0x5b3ad7===_0x3144d5)break;else stringArray['push'](stringArray['shift']());}catch(_0x979e67){stringArray['push'](stringArray['shift']());}}}(_0x48c7,0x280ee));import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,statSync,unlinkSync,writeSync}from'node:fs';import{createHash,randomBytes}from'node:crypto';import{dirname,join,resolve}from'node:path';const _0x125ce5=0x5265c00,_0x5101e8=0x7530,_0x390509=0x1388,_0x554840=0xa;export function stableSpoolEndpointId(_0x3db9ff){const _0x456b4b=_0xa85f,_0xa4a9e=createHash(_0x456b4b(0x1fa))[_0x456b4b(0x1fd)](_0x456b4b(0x23b)+resolve(_0x3db9ff))[_0x456b4b(0x21e)](_0x456b4b(0x222));return _0x456b4b(0x210)+_0xa4a9e[_0x456b4b(0x1f6)](0x0,0x18);}export function stableSessionEndpointId(_0x299c86){const _0x1abf37=_0xa85f,_0x1f21f6=createHash('sha256')[_0x1abf37(0x1fd)](_0x1abf37(0x24b)+_0x299c86)[_0x1abf37(0x21e)](_0x1abf37(0x222));return _0x1abf37(0x1f8)+_0x1f21f6['slice'](0x0,0x18);}export function hasSpoolRecords(_0x22a07d,_0x9d1518){const _0x519b66=_0xa85f,_0x18814e=join(_0x22a07d[_0x519b66(0x260)],stableSessionEndpointId(_0x9d1518));for(const _0x2e3e5f of[_0x519b66(0x237),'held',_0x519b66(0x213),_0x519b66(0x1f3)]){try{if(readdirSync(join(_0x18814e,_0x2e3e5f))['some'](_0x39e177=>_0x39e177[_0x519b66(0x262)](_0x519b66(0x244))))return!![];}catch{}}return![];}function _0xa85f(_0x54758e,_0x5c6c52){_0x54758e=_0x54758e-0x1f1;const _0x48c715=_0x48c7();let _0xa85fe1=_0x48c715[_0x54758e];if(_0xa85f['TNyNHl']===undefined){var _0x36fa27=function(_0x36b6c1){const _0x1d40da='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a8cf6='',_0x125ce5='';for(let _0x5101e8=0x0,_0x390509,_0x554840,_0x4b25f8=0x0;_0x554840=_0x36b6c1['charAt'](_0x4b25f8++);~_0x554840&&(_0x390509=_0x5101e8%0x4?_0x390509*0x40+_0x554840:_0x554840,_0x5101e8++%0x4)?_0x2a8cf6+=String['fromCharCode'](0xff&_0x390509>>(-0x2*_0x5101e8&0x6)):0x0){_0x554840=_0x1d40da['indexOf'](_0x554840);}for(let _0x1c791d=0x0,_0x1cd0c8=_0x2a8cf6['length'];_0x1c791d<_0x1cd0c8;_0x1c791d++){_0x125ce5+='%'+('00'+_0x2a8cf6['charCodeAt'](_0x1c791d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x125ce5);};_0xa85f['qhPfjt']=_0x36fa27,_0xa85f['ZaSGgH']={},_0xa85f['TNyNHl']=!![];}const _0x3853db=_0x48c715[0x0];_0xa85f['SLCBQO']!==_0x3853db&&(_0xa85f['ZaSGgH']={},_0xa85f['SLCBQO']=_0x3853db);const _0x1f09ec=_0xa85f['ZaSGgH'][_0x54758e];return _0x1f09ec===undefined?(_0xa85fe1=_0xa85f['qhPfjt'](_0xa85fe1),_0xa85f['ZaSGgH'][_0x54758e]=_0xa85fe1):_0xa85fe1=_0x1f09ec,_0xa85fe1;}export function createSessionMessageQueue(_0x3520d4){const _0x4fb9af=_0xa85f;return MessageQueue({'endpointId':stableSessionEndpointId(_0x3520d4[_0x4fb9af(0x20c)]),'maxQueue':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x211)],'maxHeld':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x219)],'heldExpiryMs':_0x3520d4['config'][_0x4fb9af(0x242)],'inboxFile':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x231)],'logger':_0x3520d4[_0x4fb9af(0x204)]});}export function createProcessMessageQueue(_0x21a2ad){const _0x110518=_0xa85f;return MessageQueue({'endpointId':stableSpoolEndpointId(_0x21a2ad['directory']),'maxQueue':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x211)],'maxHeld':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x219)],'heldExpiryMs':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x242)],'inboxFile':_0x21a2ad[_0x110518(0x25b)]['inboxFile'],'logger':_0x21a2ad['logger']});}function _0x4b25f8(_0x13eb2a,_0x1f4c85){const _0x46b685=_0xa85f;try{return readdirSync(join(_0x13eb2a,_0x1f4c85))[_0x46b685(0x248)](_0x3d3d56=>_0x3d3d56[_0x46b685(0x262)](_0x46b685(0x244)))[_0x46b685(0x23e)]();}catch(_0x3bf1d2){if(_0x3bf1d2[_0x46b685(0x212)]===_0x46b685(0x23d))return[];throw _0x3bf1d2;}}function _0x1c791d(_0x3c9b64){const _0x25bccc=_0xa85f;if(process[_0x25bccc(0x22a)]===_0x25bccc(0x21f))return;const _0x52faaf=openSync(_0x3c9b64,'r');try{fsyncSync(_0x52faaf);}finally{closeSync(_0x52faaf);}}function _0x1cd0c8(_0x30715e){mkdirSync(_0x30715e,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x30715e,0x1c0);}function _0x382803(_0x91ec5c,_0x45e60f){const _0x2fd2bc=_0xa85f,_0x1639f5=dirname(_0x91ec5c);_0x1cd0c8(_0x1639f5);const _0x3560a4=join(_0x1639f5,'.'+process[_0x2fd2bc(0x1fb)]+'.'+randomBytes(0x8)[_0x2fd2bc(0x266)](_0x2fd2bc(0x222))+_0x2fd2bc(0x22f)),_0x2bd69e=openSync(_0x3560a4,'wx',0x180);try{writeSync(_0x2bd69e,JSON['stringify'](_0x45e60f)),fsyncSync(_0x2bd69e);}finally{closeSync(_0x2bd69e);}chmodSync(_0x3560a4,0x180),renameSync(_0x3560a4,_0x91ec5c),_0x1c791d(_0x1639f5);}function _0x2bc6bb(_0x2e425b){const _0x44f127=_0xa85f;try{const _0xa242d9=JSON[_0x44f127(0x224)](readFileSync(_0x2e425b,'utf8'));return typeof _0xa242d9[_0x44f127(0x256)]===_0x44f127(0x1f9)&&Number[_0x44f127(0x246)](_0xa242d9['value'])?_0xa242d9[_0x44f127(0x256)]:null;}catch(_0x126395){if(_0x126395[_0x44f127(0x212)]===_0x44f127(0x23d))return null;throw _0x126395;}}function _0x110b33(_0x23ce4f,_0x43c8e8){const _0x3aa5ec=_0xa85f;try{return readFileSync(_0x23ce4f,_0x3aa5ec(0x221))===readFileSync(_0x43c8e8,_0x3aa5ec(0x221));}catch{return![];}}export async function migrateWorkspaceSpool(_0x5be3b9){const _0x5254ab=_0xa85f,_0x33c5b0=stableSpoolEndpointId(_0x5be3b9[_0x5254ab(0x22c)]),_0x50953a=stableSessionEndpointId(_0x5be3b9[_0x5254ab(0x239)]),_0x163a9f={'migrated':0x0,'deduplicated':0x0,'quarantined':0x0,'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a};if(_0x33c5b0===_0x50953a)return _0x163a9f;const _0x1fb7ad=join(dirname(_0x5be3b9['config'][_0x5254ab(0x231)]),_0x5254ab(0x215),_0x33c5b0),_0x1cbe03=join(dirname(_0x5be3b9['config']['inboxFile']),_0x5254ab(0x215),_0x50953a);if(!existsSync(_0x1fb7ad))return _0x163a9f;const sourceHasState=[_0x5254ab(0x237),_0x5254ab(0x20d),'inflight','done'][_0x5254ab(0x201)](_0x58fe84=>_0x4b25f8(_0x1fb7ad,_0x58fe84)[_0x5254ab(0x216)]>0x0);if(!sourceHasState&&!existsSync(join(_0x1fb7ad,_0x5254ab(0x255))))return _0x163a9f;const _0x306d25={'maxQueue':_0x5be3b9[_0x5254ab(0x25b)]['maxQueue'],'maxHeld':_0x5be3b9['config'][_0x5254ab(0x219)],'heldExpiryMs':_0x5be3b9[_0x5254ab(0x25b)][_0x5254ab(0x242)],'inboxFile':_0x5be3b9[_0x5254ab(0x25b)][_0x5254ab(0x231)],'logger':_0x5be3b9[_0x5254ab(0x204)]},_0x562f23=new Map([[_0x33c5b0,MessageQueue({..._0x306d25,'endpointId':_0x33c5b0})],[_0x50953a,MessageQueue({..._0x306d25,'endpointId':_0x50953a})]]),[_0x39efa9,_0x2d9de1]=[_0x33c5b0,_0x50953a][_0x5254ab(0x23e)](),_0x30492e=[];_0x562f23[_0x5254ab(0x1f2)](_0x39efa9)[_0x5254ab(0x250)](()=>{const _0x3aae33=_0x5254ab;_0x562f23[_0x3aae33(0x1f2)](_0x2d9de1)[_0x3aae33(0x250)](()=>{const _0x28a964=_0x3aae33;for(const _0x57c6e1 of[_0x28a964(0x237),_0x28a964(0x20d),_0x28a964(0x213),_0x28a964(0x1f3)]){for(const _0x4912ab of _0x4b25f8(_0x1fb7ad,_0x57c6e1)){const _0x451bea=join(_0x1fb7ad,_0x57c6e1,_0x4912ab),_0x55eff0=[_0x28a964(0x237),'held',_0x28a964(0x213),'done']['map'](_0x53628e=>join(_0x1cbe03,_0x53628e,_0x4912ab))['filter'](_0x2539ca=>existsSync(_0x2539ca));if(_0x55eff0[_0x28a964(0x216)]===0x0){const _0x4ef0f7=join(_0x1cbe03,_0x57c6e1,_0x4912ab);renameSync(_0x451bea,_0x4ef0f7),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x1c791d(join(_0x1cbe03,_0x57c6e1)),_0x163a9f[_0x28a964(0x21b)]++;continue;}if(_0x55eff0[_0x28a964(0x216)]===0x1&&_0x55eff0[0x0]===join(_0x1cbe03,_0x57c6e1,_0x4912ab)&&_0x110b33(_0x451bea,_0x55eff0[0x0])){unlinkSync(_0x451bea),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x163a9f[_0x28a964(0x251)]++;continue;}const base=join(_0x1cbe03,_0x28a964(0x263),_0x33c5b0,_0x57c6e1);_0x1cd0c8(base);let _0x1d6abd=join(base,_0x4912ab);if(existsSync(_0x1d6abd)&&!_0x110b33(_0x451bea,_0x1d6abd)){const _0x31ccd0=createHash('sha256')[_0x28a964(0x1fd)](readFileSync(_0x451bea))[_0x28a964(0x21e)](_0x28a964(0x222))[_0x28a964(0x1f6)](0x0,0x10);_0x1d6abd=join(base,_0x4912ab[_0x28a964(0x1f6)](0x0,-0x5)+'.'+_0x31ccd0+_0x28a964(0x244));}existsSync(_0x1d6abd)&&_0x110b33(_0x451bea,_0x1d6abd)?unlinkSync(_0x451bea):(renameSync(_0x451bea,_0x1d6abd),_0x1c791d(base)),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x163a9f[_0x28a964(0x24f)]++,_0x30492e[_0x28a964(0x22d)]({'state':_0x57c6e1,'file':_0x4912ab,'quarantine':_0x1d6abd});}}const _0x5565c5=join(_0x1fb7ad,'sequence'),_0xc1a0ca=join(_0x1cbe03,'sequence'),_0x381d6f=_0x2bc6bb(_0x5565c5),_0x8844f6=_0x2bc6bb(_0xc1a0ca);if(_0x381d6f!==null){const _0x4c1e23=Math[_0x28a964(0x207)](_0x381d6f,_0x8844f6??0x0);if(_0x8844f6!==_0x4c1e23)_0x382803(_0xc1a0ca,{'value':_0x4c1e23});unlinkSync(_0x5565c5),_0x1c791d(_0x1fb7ad);}_0x382803(join(_0x1cbe03,_0x28a964(0x227),_0x33c5b0+'.json'),{'version':0x1,'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a,'completedAt':Date[_0x28a964(0x209)]()});});});for(const _0x447125 of _0x30492e){await _0x5be3b9[_0x5254ab(0x204)](_0x5254ab(0x24c),'workspace\x20spool\x20record\x20quarantined\x20during\x20session\x20migration',{'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a,'state':_0x447125[_0x5254ab(0x241)],'file':_0x447125[_0x5254ab(0x253)],'quarantine':_0x447125[_0x5254ab(0x24d)]});}return await _0x5be3b9['logger']('info',_0x5254ab(0x21d),{..._0x163a9f}),_0x163a9f;}export function MessageQueue(_0x146643){const _0x1905bc=_0xa85f;let _0x17bbf5=[],_0x24d189=[];const _0x10c0d1=join(dirname(_0x146643[_0x1905bc(0x231)]),_0x1905bc(0x215),_0x146643[_0x1905bc(0x202)]??_0x1905bc(0x1fc)),_0x1120aa=_0x146643[_0x1905bc(0x242)]??0x493e0,_0xf33c06=_0x146643[_0x1905bc(0x225)]??0x3e8,_0x525c00=new Map(),_0xec5d76=join(_0x10c0d1,_0x1905bc(0x22b)),_0x466095=join(_0x10c0d1,_0x1905bc(0x255));function _0x5ed2fc(){const _0x31f9ac=_0x1905bc;mkdirSync(_0x10c0d1,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x10c0d1,0x1c0);for(const _0xb779d9 of['queued',_0x31f9ac(0x20d),_0x31f9ac(0x213),_0x31f9ac(0x1f3)]){const _0x76d9c3=join(_0x10c0d1,_0xb779d9);mkdirSync(_0x76d9c3,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x76d9c3,0x1c0);}mkdirSync(_0xec5d76,{'recursive':!![],'mode':0x1c0}),chmodSync(_0xec5d76,0x1c0);}function _0x44f3dc(_0x3ff832){const _0x2abd96=_0x1905bc;try{unlinkSync(_0x3ff832),_0x223075(_0xec5d76);}catch(_0x1b0c6b){if(_0x1b0c6b[_0x2abd96(0x212)]!==_0x2abd96(0x23d))throw _0x1b0c6b;}}function _0x58c578(_0x1d45f2,_0xd33bf2){const _0x25c6eb=_0x1905bc,_0x16c51e=openSync(_0x1d45f2,'wx',0x180);try{writeSync(_0x16c51e,JSON[_0x25c6eb(0x24e)](_0xd33bf2)),fsyncSync(_0x16c51e);}catch(_0x550113){try{closeSync(_0x16c51e);}finally{_0x44f3dc(_0x1d45f2);}throw _0x550113;}try{closeSync(_0x16c51e),_0x223075(_0xec5d76);}catch(_0xe5e8f6){_0x44f3dc(_0x1d45f2);throw _0xe5e8f6;}}function _0x4b5400(){const _0x16478a=_0x1905bc;return readdirSync(_0xec5d76)['filter'](_0x3ced2e=>/^choosing-[a-f0-9]{32}\.json$/[_0x16478a(0x21c)](_0x3ced2e)||/^ticket-\d{16}-[a-f0-9]{32}\.json$/['test'](_0x3ced2e));}function _0x27eb41(){const _0x4ccbd5=_0x1905bc;for(const _0x5721d3 of _0x4b5400()){const _0x12817f=join(_0xec5d76,_0x5721d3);try{if(Date[_0x4ccbd5(0x209)]()-statSync(_0x12817f)[_0x4ccbd5(0x240)]>_0x5101e8)_0x44f3dc(_0x12817f);}catch(_0x2c8de0){if(_0x2c8de0[_0x4ccbd5(0x212)]!==_0x4ccbd5(0x23d))throw _0x2c8de0;}}}function ticketNumber(_0x12b745){const _0x2d0717=_0x1905bc,_0x1b2d25=/^ticket-(\d{16})-[a-f0-9]{32}\.json$/[_0x2d0717(0x20f)](_0x12b745);return _0x1b2d25?Number(_0x1b2d25[0x1]):null;}function _0x6738f8(_0x3d211c){const _0x533c9b=_0x1905bc,_0x49b7ca=randomBytes(0x10)[_0x533c9b(0x266)](_0x533c9b(0x222)),_0x357bc3=join(_0xec5d76,_0x533c9b(0x25e)+_0x49b7ca+_0x533c9b(0x244));let _0x5efbdc=null;_0x58c578(_0x357bc3,{'kind':_0x533c9b(0x235),'token':_0x49b7ca,'pid':process[_0x533c9b(0x1fb)],'createdAt':Date[_0x533c9b(0x209)]()});try{_0x27eb41();const _0x416d3e=_0x4b5400()['reduce']((_0x1595f4,_0x1cf225)=>Math[_0x533c9b(0x207)](_0x1595f4,ticketNumber(_0x1cf225)??0x0),0x0);if(Date[_0x533c9b(0x209)]()>=_0x3d211c)throw new Error(_0x533c9b(0x203)+_0xec5d76);const _0xb606df=_0x416d3e+0x1;_0x5efbdc=join(_0xec5d76,_0x533c9b(0x21a)+String(_0xb606df)[_0x533c9b(0x205)](0x10,'0')+'-'+_0x49b7ca+_0x533c9b(0x244)),_0x58c578(_0x5efbdc,{'kind':_0x533c9b(0x259),'ticket':_0xb606df,'token':_0x49b7ca,'pid':process[_0x533c9b(0x1fb)],'createdAt':Date['now']()});}finally{_0x44f3dc(_0x357bc3);}for(;;){_0x27eb41();if(!existsSync(_0x5efbdc))throw new Error(_0x533c9b(0x1f1)+_0x5efbdc);if(Date[_0x533c9b(0x209)]()>=_0x3d211c){_0x44f3dc(_0x5efbdc);throw new Error(_0x533c9b(0x203)+_0xec5d76);}const _0x5b10fb=_0x4b5400(),_0x4b6f27=_0x5b10fb[_0x533c9b(0x201)](_0x225dc1=>_0x225dc1[_0x533c9b(0x23a)](_0x533c9b(0x25e))),_0x1d57f4=_0x5b10fb[_0x533c9b(0x265)](_0x565c83=>{const _0x48aed7=ticketNumber(_0x565c83);return _0x48aed7===null?[]:[{'file':_0x565c83,'ticket':_0x48aed7}];})[_0x533c9b(0x23e)]((_0x15f8b5,_0xdf6e25)=>_0x15f8b5[_0x533c9b(0x259)]-_0xdf6e25['ticket']||(_0x15f8b5[_0x533c9b(0x253)]<_0xdf6e25[_0x533c9b(0x253)]?-0x1:_0x15f8b5[_0x533c9b(0x253)]>_0xdf6e25[_0x533c9b(0x253)]?0x1:0x0));if(!_0x4b6f27&&_0x1d57f4[0x0]?.[_0x533c9b(0x253)]===_0x5efbdc[_0x533c9b(0x1f6)](_0xec5d76[_0x533c9b(0x216)]+0x1))return _0x5efbdc;Atomics[_0x533c9b(0x25f)](new Int32Array(new SharedArrayBuffer(0x4)),0x0,0x0,_0x554840);}}function _0x526809(_0x504720){const _0x1426fd=_0x1905bc;_0x5ed2fc();const _0x3efde3=_0x6738f8(Date[_0x1426fd(0x209)]()+_0x390509);try{return _0x504720();}finally{_0x44f3dc(_0x3efde3);}}function _0x4096e3(_0x178b6b){const _0x354918=_0x1905bc;return _0x5920a0(_0x178b6b)[_0x354918(0x216)];}function _0x5920a0(_0x4f2d29){const _0x327d70=_0x1905bc,_0x48d370=join(_0x10c0d1,_0x4f2d29);let _0x251884=[];try{_0x251884=readdirSync(_0x48d370)[_0x327d70(0x248)](_0x34f784=>_0x34f784['endsWith'](_0x327d70(0x244)));}catch(_0x332be1){return _0x332be1[_0x327d70(0x212)]!==_0x327d70(0x23d)&&void _0x146643[_0x327d70(0x204)]('warn',_0x327d70(0x234),{'state':_0x4f2d29,'error':String(_0x332be1)}),[];}const _0x54dba5=[];for(const _0x1ac07e of _0x251884){try{const _0x163fa8=JSON['parse'](readFileSync(join(_0x48d370,_0x1ac07e),'utf8'));if(_0x163fa8?.[_0x327d70(0x236)]!==0x2||_0x163fa8[_0x327d70(0x241)]!==_0x4f2d29||!_0x163fa8[_0x327d70(0x1ff)]?.['id']||!_0x163fa8[_0x327d70(0x1ff)][_0x327d70(0x229)]?.[_0x327d70(0x254)]||!Number[_0x327d70(0x264)](_0x163fa8['message'][_0x327d70(0x25d)])||_0x4f2d29===_0x327d70(0x20d)&&!Number['isFinite'](_0x163fa8[_0x327d70(0x1ff)][_0x327d70(0x230)])||_0x4f2d29===_0x327d70(0x1f3)&&!_0x163fa8[_0x327d70(0x25a)])throw new Error('invalid\x20spool\x20record');_0x54dba5[_0x327d70(0x22d)](_0x163fa8);}catch(_0x598339){void _0x146643[_0x327d70(0x204)](_0x327d70(0x24c),_0x327d70(0x25c),{'state':_0x4f2d29,'file':_0x1ac07e,'error':String(_0x598339)});}}return _0x54dba5[_0x327d70(0x23e)]((_0x5bad89,_0x18d26e)=>{const _0x55c547=_0x327d70,_0x40043d=_0x5bad89[_0x55c547(0x255)]??_0x5bad89[_0x55c547(0x1f5)]??_0x5bad89['message'][_0x55c547(0x25d)],_0x2d9777=_0x18d26e[_0x55c547(0x255)]??_0x18d26e[_0x55c547(0x1f5)]??_0x18d26e[_0x55c547(0x1ff)]['sentAt'];return _0x40043d-_0x2d9777;});}function _0x46ec14(){const _0x1e7c7c=_0x1905bc;let _0x43f50f=0x0;try{const _0x585f75=JSON[_0x1e7c7c(0x224)](readFileSync(_0x466095,_0x1e7c7c(0x221)));if(typeof _0x585f75[_0x1e7c7c(0x256)]===_0x1e7c7c(0x1f9)&&Number[_0x1e7c7c(0x246)](_0x585f75['value']))_0x43f50f=_0x585f75[_0x1e7c7c(0x256)];}catch{}const _0x2349e1=_0x43f50f+0x1;return _0x6225c3(_0x466095,{'value':_0x2349e1}),_0x2349e1;}function _0x163d87(_0x106f36,_0x21e3e0){const _0x2e9d71=_0x1905bc;try{const _0x415d44=JSON[_0x2e9d71(0x224)](readFileSync(join(_0x10c0d1,_0x106f36,_0x3a92f0(_0x21e3e0)+_0x2e9d71(0x244)),_0x2e9d71(0x221)));if(_0x415d44?.[_0x2e9d71(0x236)]!==0x2||_0x415d44[_0x2e9d71(0x241)]!==_0x106f36||_0x415d44[_0x2e9d71(0x1ff)]?.['id']!==_0x21e3e0['id']||_0x415d44[_0x2e9d71(0x1ff)][_0x2e9d71(0x229)]?.[_0x2e9d71(0x254)]!==_0x21e3e0[_0x2e9d71(0x229)][_0x2e9d71(0x254)]||_0x106f36==='done'&&!_0x415d44[_0x2e9d71(0x25a)])return null;return _0x415d44;}catch{return null;}}function _0xabdc7f(){const _0x484338=_0x1905bc;_0x24d189=_0x5920a0(_0x484338(0x20d))['map'](_0x47cb6b=>_0x47cb6b[_0x484338(0x1ff)]);}function _0x2583be(){const _0x2d00aa=_0x1905bc;_0x17bbf5=_0x5920a0('queued')['map'](_0x1550cc=>_0x1550cc[_0x2d00aa(0x1ff)]);}function _0x3a92f0(_0x13d530){const _0x588a76=_0x1905bc;return createHash(_0x588a76(0x1fa))[_0x588a76(0x1fd)](_0x13d530[_0x588a76(0x229)][_0x588a76(0x254)]+'\x00'+_0x13d530['id'])[_0x588a76(0x21e)](_0x588a76(0x222));}function _0x17c1c0(_0x36ed3f){const _0x5d550a=_0x1905bc;return join(_0x10c0d1,_0x5d550a(0x237),_0x3a92f0(_0x36ed3f)+_0x5d550a(0x244));}function _0xe0fef2(_0x45d10b){const _0x214f6d=_0x1905bc;return join(_0x10c0d1,'inflight',_0x3a92f0(_0x45d10b)+_0x214f6d(0x244));}function _0x5db841(_0x826691){const _0x4f89df=_0x1905bc;return join(_0x10c0d1,_0x4f89df(0x20d),_0x3a92f0(_0x826691)+'.json');}function _0x31e723(_0x192ae5){const _0x4c66d6=_0x1905bc;return join(_0x10c0d1,'done',_0x3a92f0(_0x192ae5)+_0x4c66d6(0x244));}function _0x36a1fa(_0x5ad3c0){const _0x52e3e8=_0x1905bc;for(const _0x456e5f of['queued',_0x52e3e8(0x20d),_0x52e3e8(0x213),_0x52e3e8(0x1f3)]){if(_0x163d87(_0x456e5f,_0x5ad3c0))return _0x456e5f;}return null;}function _0x349f22(_0x4e09b6){const _0x135af7=_0x1905bc;return createHash(_0x135af7(0x1fa))[_0x135af7(0x1fd)](_0x4e09b6[_0x135af7(0x229)][_0x135af7(0x254)]+'\x00'+_0x4e09b6['text'])[_0x135af7(0x21e)](_0x135af7(0x222));}function _0x45aa9d(_0x1384dd){const _0x4e1b9a=_0x1905bc,_0x1dcf8f=_0x525c00[_0x4e1b9a(0x1f2)](_0x349f22(_0x1384dd));return typeof _0x1dcf8f===_0x4e1b9a(0x1f9)&&_0x1dcf8f>Date['now']()-_0xf33c06;}function _0x4961b8(_0x21eeeb){const _0xac0e9b=_0x1905bc;_0x525c00[_0xac0e9b(0x233)](_0x349f22(_0x21eeeb),Date[_0xac0e9b(0x209)]());}function _0x5dd440(_0x453ef1){const _0x3b926c=_0x1905bc,_0x526a97=Date[_0x3b926c(0x209)]()-_0xf33c06;for(const _0x439aad of[_0x3b926c(0x237),_0x3b926c(0x20d),'inflight',_0x3b926c(0x1f3)]){for(const _0x4a66b6 of _0x5920a0(_0x439aad)){const _0x4dc191=_0x4a66b6[_0x3b926c(0x1f5)]??_0x4a66b6[_0x3b926c(0x206)]??_0x4a66b6[_0x3b926c(0x1ff)][_0x3b926c(0x25d)];if(_0x4dc191>_0x526a97&&_0x4a66b6[_0x3b926c(0x1ff)]['id']!==_0x453ef1['id']&&_0x4a66b6['message']['from'][_0x3b926c(0x254)]===_0x453ef1[_0x3b926c(0x229)][_0x3b926c(0x254)]&&_0x4a66b6['message'][_0x3b926c(0x232)]===_0x453ef1[_0x3b926c(0x232)])return _0x4a66b6;}}return null;}function _0x1871e8(_0x5cbc2a){mkdirSync(_0x5cbc2a,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x10c0d1,0x1c0),chmodSync(_0x5cbc2a,0x1c0);}function _0x223075(_0x22c1ca){const _0x27bf49=_0x1905bc;if(process[_0x27bf49(0x22a)]===_0x27bf49(0x21f))return;const _0x3db1c4=openSync(_0x22c1ca,'r');try{fsyncSync(_0x3db1c4);}finally{closeSync(_0x3db1c4);}}function _0x6225c3(_0x333532,_0x57f5cc){const _0x223a20=_0x1905bc,_0xc1069=dirname(_0x333532);_0x1871e8(_0xc1069);const _0x36dee0=join(_0xc1069,'.'+process['pid']+'.'+Date[_0x223a20(0x209)]()+'.tmp'),_0x364aac=openSync(_0x36dee0,'w',0x180);try{writeSync(_0x364aac,JSON[_0x223a20(0x24e)](_0x57f5cc)),fsyncSync(_0x364aac);}finally{closeSync(_0x364aac);}chmodSync(_0x36dee0,0x180),renameSync(_0x36dee0,_0x333532),_0x223075(_0xc1069);}function _0x5177e0(_0x4c9db5){const _0xec90e8=_0x1905bc;_0x6225c3(_0x17c1c0(_0x4c9db5),{'version':0x2,'state':_0xec90e8(0x237),'message':_0x4c9db5,'acceptedAt':Date['now'](),'sequence':_0x46ec14()});}function _0x295191(_0x53b218,_0x4cbdea){const _0x533580=_0x1905bc;return{'version':0x2,'messageId':_0x53b218['id'],'fromEndpointId':_0x53b218[_0x533580(0x229)][_0x533580(0x254)],'toEndpointId':_0x146643['endpointId']??_0x533580(0x1fc),'status':_0x4cbdea,'acknowledgedAt':Date['now']()};}function _0x3b65ec(_0x5f469c,_0x18bf11,_0x29ddf8){const _0x1ae19d=_0x1905bc,_0x544356=_0x163d87(_0x18bf11,_0x5f469c);if(!_0x544356){const _0x2b47a7=_0x163d87(_0x1ae19d(0x1f3),_0x5f469c)?.[_0x1ae19d(0x25a)];if(_0x2b47a7)return _0x2b47a7;throw new Error(_0x1ae19d(0x220)+_0x18bf11+_0x1ae19d(0x20a)+_0x5f469c['id']);}const _0x2d5456=_0x295191(_0x5f469c,_0x29ddf8);_0x6225c3(_0x31e723(_0x5f469c),{..._0x544356,'state':_0x1ae19d(0x1f3),'message':_0x5f469c,'ack':_0x2d5456});const _0x3123e4=join(_0x10c0d1,_0x18bf11,_0x3a92f0(_0x5f469c)+_0x1ae19d(0x244));return unlinkSync(_0x3123e4),_0x223075(dirname(_0x3123e4)),_0x2d5456;}function _0x50ee53(_0x1e1059,_0x215ceb){const _0x58edef=_0x1905bc,_0x2334b1=_0x295191(_0x1e1059,_0x58edef(0x243));return _0x6225c3(_0x31e723(_0x1e1059),{'version':0x2,'state':_0x58edef(0x1f3),'message':_0x1e1059,'ack':_0x2334b1,'acceptedAt':Date[_0x58edef(0x209)](),'sequence':_0x46ec14(),'duplicateOfMessageId':_0x215ceb[_0x58edef(0x1ff)]['id']}),_0x2334b1;}function _0x184f1d(_0x238e62,_0x3c81e9=Infinity){const _0x5c0ee0=_0x1905bc;if(_0x3c81e9<=0x0)return[];if(_0x238e62===_0x5c0ee0(0x238)){const _0x33252a=_0x24d189[_0x5c0ee0(0x1f6)](0x0,_0x3c81e9);return _0x24d189=_0x24d189[_0x5c0ee0(0x1f6)](_0x33252a[_0x5c0ee0(0x216)]),_0x33252a;}const _0x59953b=_0x238e62-0x1;if(_0x59953b<0x0||_0x59953b>=_0x24d189['length'])return[];return _0x24d189[_0x5c0ee0(0x20e)](_0x59953b,0x1);}function _0x1a2345(){const _0x400934=_0x1905bc;_0xabdc7f();const _0x26f8be=Date[_0x400934(0x209)](),_0x5f55a4=_0x24d189[_0x400934(0x248)](_0x5012cf=>_0x5012cf['expiresAt']<=_0x26f8be);return _0x24d189=_0x24d189[_0x400934(0x248)](_0x4aa525=>_0x4aa525[_0x400934(0x230)]>_0x26f8be),_0x5f55a4[_0x400934(0x20b)](_0x4f1b56=>_0x3b65ec(_0x4f1b56,_0x400934(0x20d),_0x400934(0x245)));}async function _0x56ea3c(){return _0x526809(_0x1a2345);}const _0x55cafb={'enqueue'(_0x65af24){return _0x526809(()=>{const _0x253726=_0xa85f;if(_0x36a1fa(_0x65af24))return![];const _0xfc0628=_0x5dd440(_0x65af24);if(_0xfc0628||_0x45aa9d(_0x65af24))return _0x50ee53(_0x65af24,_0xfc0628??{'version':0x2,'state':_0x253726(0x237),'message':_0x65af24}),![];if(_0x4096e3(_0x253726(0x237))+_0x4096e3(_0x253726(0x213))>=_0x146643[_0x253726(0x211)])return![];return _0x5177e0(_0x65af24),_0x4961b8(_0x65af24),_0x17bbf5[_0x253726(0x22d)](_0x65af24),!![];});},'drain'(){return _0x526809(()=>{const _0x147283=_0xa85f,_0x58288a=_0x5920a0(_0x147283(0x237)),_0x23f7aa=_0x58288a[_0x147283(0x20b)](_0x41d481=>_0x41d481[_0x147283(0x1ff)]);for(const _0x5ed4f5 of _0x58288a){const _0x3261e9=_0x5ed4f5[_0x147283(0x1ff)];_0x6225c3(_0xe0fef2(_0x3261e9),{..._0x5ed4f5,'state':_0x147283(0x213),'message':_0x3261e9}),unlinkSync(_0x17c1c0(_0x3261e9)),_0x223075(dirname(_0x17c1c0(_0x3261e9)));}return _0x17bbf5=[],_0x23f7aa;});},async 'complete'(_0x3a6327){const _0x3a59e7=_0x1905bc;return _0x526809(()=>_0x3a6327[_0x3a59e7(0x20b)](_0xeac82d=>_0x3b65ec(_0xeac82d,_0x3a59e7(0x213),'delivered')));},async 'requeue'(_0x28ec0e){_0x526809(()=>{for(const _0x1bd827 of _0x28ec0e){const _0x48c65e=_0x163d87('inflight',_0x1bd827);if(!_0x48c65e)continue;_0x6225c3(_0x17c1c0(_0x1bd827),{..._0x48c65e,'state':'queued','message':_0x1bd827}),unlinkSync(_0xe0fef2(_0x1bd827)),_0x223075(dirname(_0xe0fef2(_0x1bd827)));}_0x2583be();});},'duplicateAcknowledgement'(_0x1d9c9c){const _0x3e86ed=_0x1905bc,_0x4cbed9=_0x163d87(_0x3e86ed(0x1f3),_0x1d9c9c);return _0x4cbed9?.['ack']?.[_0x3e86ed(0x249)]===_0x3e86ed(0x243)?_0x4cbed9[_0x3e86ed(0x25a)]:null;},'existingStatus'(_0x3e3ed0){const _0x1924bb=_0x1905bc;switch(_0x36a1fa(_0x3e3ed0)){case _0x1924bb(0x237):case _0x1924bb(0x213):return _0x1924bb(0x237);case'held':return _0x1924bb(0x20d);case _0x1924bb(0x1f3):{return _0x163d87(_0x1924bb(0x1f3),_0x3e3ed0)?.[_0x1924bb(0x25a)]?.[_0x1924bb(0x249)]??null;}default:return null;}},'isDebounced'(_0x5e0059){return _0x526809(()=>{const _0x3bfa87=_0xa85f;if(_0x36a1fa(_0x5e0059))return![];const _0x2f149c=_0x5dd440(_0x5e0059);if(!_0x2f149c&&!_0x45aa9d(_0x5e0059))return![];return _0x50ee53(_0x5e0059,_0x2f149c??{'version':0x2,'state':_0x3bfa87(0x237),'message':_0x5e0059}),!![];});},async 'refuse'(_0x1bb4ed){return _0x526809(()=>{const _0x9e3754=_0xa85f,_0x1e5b6b=_0x36a1fa(_0x1bb4ed);if(_0x1e5b6b===_0x9e3754(0x1f3))return _0x163d87(_0x9e3754(0x1f3),_0x1bb4ed)[_0x9e3754(0x25a)];if(_0x1e5b6b)return _0x295191(_0x1bb4ed,_0x9e3754(0x243));const _0x498d58=_0x295191(_0x1bb4ed,'refused');return _0x6225c3(_0x31e723(_0x1bb4ed),{'version':0x2,'state':_0x9e3754(0x1f3),'message':_0x1bb4ed,'ack':_0x498d58,'acceptedAt':Date[_0x9e3754(0x209)](),'sequence':_0x46ec14()}),_0x498d58;});},'pending'(){return[..._0x17bbf5];},'size'(){const _0x5b943c=_0x1905bc;return _0x17bbf5[_0x5b943c(0x216)];},async 'hold'(_0x34a329){return _0x526809(()=>{const _0x284cf2=_0xa85f;if(_0x36a1fa(_0x34a329))return![];const _0x1fe765=_0x5dd440(_0x34a329);if(_0x1fe765||_0x45aa9d(_0x34a329))return _0x50ee53(_0x34a329,_0x1fe765??{'version':0x2,'state':'held','message':_0x34a329}),![];if(_0x4096e3(_0x284cf2(0x20d))>=_0x146643[_0x284cf2(0x219)])return![];const _0x13bc7f=Date[_0x284cf2(0x209)](),_0x1397d5={..._0x34a329,'heldAt':_0x13bc7f,'expiresAt':_0x13bc7f+_0x1120aa};return _0x6225c3(_0x5db841(_0x34a329),{'version':0x2,'state':_0x284cf2(0x20d),'message':_0x1397d5,'heldAt':_0x13bc7f,'expiresAt':_0x1397d5['expiresAt'],'acceptedAt':_0x13bc7f,'sequence':_0x46ec14()}),_0x4961b8(_0x34a329),_0x24d189[_0x284cf2(0x22d)](_0x1397d5),!![];});},'held'(){return[..._0x24d189];},'expireHeld':_0x56ea3c,'pendingAcknowledgements'(){const _0x2243a3=_0x1905bc;return _0x526809(()=>_0x5920a0(_0x2243a3(0x1f3))['filter'](_0x2b89d9=>_0x2b89d9[_0x2243a3(0x25a)]&&!_0x2b89d9[_0x2243a3(0x252)])[_0x2243a3(0x20b)](_0x457683=>_0x457683[_0x2243a3(0x25a)]));},async 'markAcknowledgementSent'(_0x19b25c){_0x526809(()=>{const _0x18640a=_0xa85f,_0x2e0ae1=_0x5920a0(_0x18640a(0x1f3))[_0x18640a(0x228)](_0x1416e1=>_0x1416e1['ack']?.['messageId']===_0x19b25c[_0x18640a(0x1fe)]&&_0x1416e1['ack'][_0x18640a(0x1f4)]===_0x19b25c[_0x18640a(0x1f4)]&&_0x1416e1[_0x18640a(0x25a)][_0x18640a(0x261)]===_0x19b25c[_0x18640a(0x261)]);if(!_0x2e0ae1)return;_0x6225c3(_0x31e723(_0x2e0ae1[_0x18640a(0x1ff)]),{..._0x2e0ae1,'ackSentAt':Date[_0x18640a(0x209)]()});});},async 'acceptHeld'(_0x3c15cb){return _0x526809(()=>{const _0x313ba7=_0xa85f;_0x1a2345(),_0xabdc7f();const _0x2a739c=_0x4096e3(_0x313ba7(0x237))+_0x4096e3('inflight'),_0x2b641e=_0x184f1d(_0x3c15cb,Math['max'](0x0,_0x146643[_0x313ba7(0x211)]-_0x2a739c));for(const _0x131cc4 of _0x2b641e){const {heldAt:_0x342f15,expiresAt:_0x1dd04e,..._0x211884}=_0x131cc4,_0xc4b025=_0x163d87(_0x313ba7(0x20d),_0x131cc4);_0x6225c3(_0x17c1c0(_0x211884),{..._0xc4b025??{'version':0x2,'acceptedAt':Date[_0x313ba7(0x209)](),'sequence':_0x46ec14()},'state':_0x313ba7(0x237),'message':_0x211884,'heldAt':undefined,'expiresAt':undefined,'ack':undefined}),unlinkSync(_0x5db841(_0x131cc4)),_0x223075(dirname(_0x5db841(_0x131cc4)));}return _0x2583be(),_0xabdc7f(),_0x2b641e;});},async 'dropHeld'(_0x52b9d5){return _0x526809(()=>{const _0x3401f5=_0xa85f;_0x1a2345(),_0xabdc7f();const _0x5b74aa=_0x184f1d(_0x52b9d5);for(const _0xed2186 of _0x5b74aa)_0x3b65ec(_0xed2186,_0x3401f5(0x20d),_0x3401f5(0x257));return _0xabdc7f(),_0x5b74aa['length'];});},async 'loadHeld'(){_0x526809(()=>{const _0x1e593b=_0xa85f,_0x2e3c32=join(_0x10c0d1,'inflight');for(const _0x4949ad of _0x5920a0(_0x1e593b(0x213))){const _0x45bdf4=_0x4949ad[_0x1e593b(0x1ff)];!_0x163d87(_0x1e593b(0x1f3),_0x45bdf4)&&_0x6225c3(_0x17c1c0(_0x45bdf4),{..._0x4949ad,'state':_0x1e593b(0x237),'message':_0x45bdf4}),unlinkSync(_0xe0fef2(_0x45bdf4)),_0x223075(_0x2e3c32);}const _0x119ee4=Date['now']()-_0x125ce5;for(const _0x17f72b of _0x5920a0(_0x1e593b(0x1f3))){typeof _0x17f72b[_0x1e593b(0x25a)]?.[_0x1e593b(0x223)]===_0x1e593b(0x1f9)&&_0x17f72b['ack']['acknowledgedAt']<=_0x119ee4&&unlinkSync(_0x31e723(_0x17f72b[_0x1e593b(0x1ff)]));}_0x2583be(),_0xabdc7f();try{renameSync(_0x146643['inboxFile'],_0x146643[_0x1e593b(0x231)]+_0x1e593b(0x1f7)+Date[_0x1e593b(0x209)]());}catch(_0xb663b9){_0xb663b9[_0x1e593b(0x212)]!==_0x1e593b(0x23d)&&void _0x146643[_0x1e593b(0x204)](_0x1e593b(0x24c),_0x1e593b(0x24a),{'error':String(_0xb663b9)});}});},'withExclusiveLock'(_0x539e35){return _0x526809(_0x539e35);}};return _0x55cafb;}export function RateLimiter(_0xd9a61a){const _0x32ecfc=new Map();return _0x5e5f79=>{const _0x5bd624=_0xa85f,_0x424d2d=Date[_0x5bd624(0x209)](),_0x18b6fe=_0x424d2d-0xea60,_0x212ebd=(_0x32ecfc[_0x5bd624(0x1f2)](_0x5e5f79)??[])[_0x5bd624(0x248)](_0x560bef=>_0x560bef>_0x18b6fe);if(_0x212ebd['length']>=_0xd9a61a)return _0x32ecfc[_0x5bd624(0x233)](_0x5e5f79,_0x212ebd),![];return _0x212ebd[_0x5bd624(0x22d)](_0x424d2d),_0x32ecfc['set'](_0x5e5f79,_0x212ebd),!![];};}function _0x48c7(){const _0x457fb2=['D2fPDa','C3bVB2XeAxi','Dg9fBMrWB2LUDeLK','zw5KC1DPDgG','BwLNCMf0Aw9Ulxf1yxjHBNrPBMu','AxngAw5PDgu','zMXHDe1HCa','Dg9tDhjPBMC','BwvZC2fNzsbZCg9VBcbSB2nRignSywLTigv4CgLYzwqGyMvMB3jLigfKBwLZC2LVBJOG','z2v0','zg9Uzq','zNjVBuvUzhbVAw50swq','ywnJzxb0zwrbDa','C2XPy2u','lMXLz2fJEs0','C2vZC2LVBI0','BNvTyMvY','C2HHmJu2','CgLK','BgvNywn5','DxbKyxrL','BwvZC2fNzuLK','BwvZC2fNzq','ndrdwLDPEg4','C29Tzq','zw5KCg9PBNrjza','DgLTzwqGB3v0igfJCxvPCMLUzYbTzxnZywDLihnWB29SigXVy2S6ia','Bg9Nz2vY','CgfKu3rHCNq','AgvSzef0','Bwf4','ntm3nZG4vKTozfzq','BM93','ihnWB29SihjLy29YzcbMB3iGBwvZC2fNzsa','BwfW','C2vZC2LVBKLK','AgvSza','C3bSAwnL','zxHLyW','D29YA3nWywnLlq','Bwf4uxvLDwu','y29Kzq','Aw5MBgLNAhq','mte2mtC4Dvz6ELLl','C3bVB2W','BgvUz3rO','odi0wNHKzvze','mJu5mdjlyxPvAKy','Bwf4sgvSza','DgLJA2v0lq','BwLNCMf0zwq','DgvZDa','D29YA3nWywnLihnWB29Sig1Pz3jHDgLVBIbJB21WBgv0zwq','zgLNzxn0','D2LUmZi','BwLZC2LUzYa','DxrMoa','Agv4','ywnRBM93BgvKz2vKqxq','CgfYC2u','zgvIB3vUy2vnCW','otuYnJjkwxb0Duq','lM1Pz3jHDgLVBNm','zMLUza','zNjVBq','CgXHDgzVCM0','lMXVy2STDgLJA2v0CW','zgLYzwn0B3j5','ChvZAa','mZa5mJuWrhz0yvfT','lNrTCa','zxHWAxjLC0f0','Aw5IB3HgAwXL','Dgv4Da','C2v0','zMfPBgvKihrVihjLywqGBwvZC2fNzsbZCg9VBcbKAxjLy3rVCNK','y2HVB3nPBMC','DMvYC2LVBG','CxvLDwvK','ywXS','DgfYz2v0u2vZC2LVBKLK','C3rHCNrZv2L0Aa','D29YA3nWywnLlxyXaa','mtr3wu1eyMO','ru5pru5u','C29YDa','mJy1nduZDe9QDw94','BxrPBwvnCW','C3rHDgu','AgvSzev4CgLYEu1Z','zhvWBgLJyxrL','lMPZB24','zxHWAxjLza','AxntywzLsw50zwDLCG','mJa3mdK1D3vZr09t','zMLSDgvY','C3rHDhvZ','zMfPBgvKihrVigfYy2HPDMuGBgvNywn5igLUyM94','C2vZC2LVBI12mqa','D2fYBG','CxvHCMfUDgLUzq','C3rYAw5NAwz5','CxvHCMfUDgLUzwq','D2L0Aev4y2X1C2L2zuXVy2S','zgvKDxbSAwnHDgvK','ywnRu2vUDef0','zMLSzq','Aw5ZDgfUy2vjza','C2vXDwvUy2u','DMfSDwu','zhjVChbLza','mta1u0XNBgTT','DgLJA2v0','ywnR','y29UzMLN','C2TPChbPBMCGBwfSzM9YBwvKig1LC3nHz2uGC3bVB2WGCMvJB3jK','C2vUDef0','y2HVB3nPBMCT'];_0x48c7=function(){return _0x457fb2;};return _0x48c7();}
|
|
1
|
+
(function(stringArrayFunction,_0x4efb86){const _0x140110=_0x2eae,stringArray=stringArrayFunction();while(!![]){try{const _0x407b75=parseInt(_0x140110(0x19c))/0x1+-parseInt(_0x140110(0x16f))/0x2*(-parseInt(_0x140110(0x188))/0x3)+parseInt(_0x140110(0x149))/0x4*(parseInt(_0x140110(0x18f))/0x5)+parseInt(_0x140110(0x17f))/0x6*(parseInt(_0x140110(0x144))/0x7)+-parseInt(_0x140110(0x193))/0x8*(parseInt(_0x140110(0x14c))/0x9)+-parseInt(_0x140110(0x136))/0xa+-parseInt(_0x140110(0x139))/0xb*(parseInt(_0x140110(0x191))/0xc);if(_0x407b75===_0x4efb86)break;else stringArray['push'](stringArray['shift']());}catch(_0x4aa5f8){stringArray['push'](stringArray['shift']());}}}(_0x50e2,0x1c03b));function _0x50e2(){const _0x57d0d6=['C2vXDwvUy2u','C2vZC2LVBKLK','zgLNzxn0','AxntywzLsw50zwDLCG','y2HVB3nPBMC','CgLK','mtu2mtbuu1Hfvum','CgXHDgzVCM0','mta4A1HpCKTM','ChvZAa','mJiYodbVuNfiCeK','C2v0','C3rYAw5NAwz5','ywnR','zMLSDgvY','DMfSDwu','DgLJA2v0','ywnRu2vUDef0','ru5pru5u','odGXn0zws0HTtq','Aw5MBgLNAhq','zw5KCg9PBNrjza','D2L0Aev4y2X1C2L2zuXVy2S','zxHWAxjLC0f0','C2vZC2LVBI12mqa','zNjVBq','CxvLDwvK','Aw5ZDgfUy2vjza','D2LUmZi','CgfYC2u','mtiZnZuWug11rvLH','Aw5IB3HgAwXL','C29Tzq','mJaXmZiYsKHrEhPW','BM93','C3bVB2W','zNjVBuvUzhbVAw50swq','Agv4','AgvSza','C2HHmJu2','Dg9tDhjPBMC','DxrMoa','C29YDa','CgfKu3rHCNq','n3bhywDfsq','C3rHDgu','C3bSAwnL','BxrPBwvnCW','lNrTCa','mJmYq2HxAwLm','zMLUza','DgLTzwqGB3v0igfJCxvPCMLUzYbTzxnZywDLihnWB29SigXVy2S6ia','mZe1tgLjzwHj','BgvNywn5','lM1Pz3jHDgLVBNm','ywnJzxb0zwrbDa','y29UzMLN','C2vUDef0','C2TPChbPBMCGBwfSzM9YBwvKig1LC3nHz2uGC3bVB2WGCMvJB3jK','BNvTyMvY','D2fYBG','zw5KC1DPDgG','D29YA3nWywnLlxyXaa','AxngAw5PDgu','Bwf4uxvLDwu','CxvHCMfUDgLUzwq','C2XPy2u','zMfPBgvKihrVihjLywqGBwvZC2fNzsbZCg9VBcbKAxjLy3rVCNK','BgvUz3rO','Dgv4Da','y29Kzq','BwvZC2fNzuLK','DxbKyxrL','CxvHCMfUDgLUzq','C2vZC2LVBI0','C3rHCNrZv2L0Aa','zMLSzq','lMXVy2STDgLJA2v0CW','Aw52ywXPzcbZCg9VBcbYzwnVCMq','D2fPDa','BwvZC2fNzq','zgLYzwn0B3j5','Bg9Nz2vY','lMPZB24','CMvKDwnL','DgvZDa','BwfW','nJa5otHtDhfsDfi','AgvSzef0','zMfPBgvKihrVigfYy2HPDMuGBgvNywn5igLUyM94','DgfYz2v0u2vZC2LVBKLK','D29YA3nWywnLihnWB29Sig1Pz3jHDgLVBIbJB21WBgv0zwq','zg9Uzq','y2HVB3nPBMCT','z2v0','BwLZC2LUzYa','ywnRBM93BgvKz2vKqxq','DgLJA2v0lq','ihnWB29SihjLy29YzcbMB3iGBwvZC2fNzsa','D29YA3nWywnLlq','DMvYC2LVBG','CMvMDxnLza','C3rHDhvZ','mtaXmZuZofP2y2PTBW','zgvKDxbSAwnHDgvK','Bwf4sgvSza','Bwf4','zhvWBgLJyxrL','D29YA3nWywnLihnWB29SihjLy29YzcbXDwfYyw50Aw5LzcbKDxjPBMCGC2vZC2LVBIbTAwDYyxrPB24','BwvZC2fNzsbZCg9VBcbSB2nRignSywLTigv4CgLYzwqGyMvMB3jLigfKBwLZC2LVBJOG','AgvSzev4CgLYEu1Z','zxHWAxjLza','m1nfBK5xCW'];_0x50e2=function(){return _0x57d0d6;};return _0x50e2();}import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,statSync,unlinkSync,writeSync}from'node:fs';import{createHash,randomBytes}from'node:crypto';import{dirname,join,resolve}from'node:path';const _0x26478d=0x5265c00,_0x32dce0=0x7530,_0x4e7d07=0x1388,_0x26f4e1=0xa;export function stableSpoolEndpointId(_0x5b740f){const _0xb7afa7=_0x2eae,_0x639b25=createHash(_0xb7afa7(0x13f))[_0xb7afa7(0x160)](_0xb7afa7(0x156)+resolve(_0x5b740f))[_0xb7afa7(0x18b)](_0xb7afa7(0x13d));return _0xb7afa7(0x17b)+_0x639b25[_0xb7afa7(0x15a)](0x0,0x18);}export function stableSessionEndpointId(_0x22e739){const _0x26f1f5=_0x2eae,_0xec41af=createHash(_0x26f1f5(0x13f))[_0x26f1f5(0x160)](_0x26f1f5(0x130)+_0x22e739)[_0x26f1f5(0x18b)](_0x26f1f5(0x13d));return _0x26f1f5(0x162)+_0xec41af[_0x26f1f5(0x15a)](0x0,0x18);}export function hasSpoolRecords(_0x378322,_0x195c33){const _0x11caa4=_0x2eae,_0xbb2a0a=join(_0x378322['spoolDir'],stableSessionEndpointId(_0x195c33));for(const _0xed94a0 of['queued','held',_0x11caa4(0x19d),_0x11caa4(0x174)]){try{if(readdirSync(join(_0xbb2a0a,_0xed94a0))[_0x11caa4(0x138)](_0x58f4fc=>_0x58f4fc[_0x11caa4(0x155)](_0x11caa4(0x16b))))return!![];}catch{}}return![];}export function createSessionMessageQueue(_0x1bb9c7){const _0x5337b5=_0x2eae;return MessageQueue({'endpointId':stableSessionEndpointId(_0x1bb9c7[_0x5337b5(0x18a)]),'maxQueue':_0x1bb9c7[_0x5337b5(0x150)][_0x5337b5(0x158)],'maxHeld':_0x1bb9c7[_0x5337b5(0x150)][_0x5337b5(0x181)],'heldExpiryMs':_0x1bb9c7[_0x5337b5(0x150)]['heldExpiryMs'],'inboxFile':_0x1bb9c7[_0x5337b5(0x150)][_0x5337b5(0x137)],'logger':_0x1bb9c7['logger']});}export function createProcessMessageQueue(_0x5c898e){const _0x504a4a=_0x2eae;return MessageQueue({'endpointId':stableSpoolEndpointId(_0x5c898e[_0x504a4a(0x169)]),'maxQueue':_0x5c898e['config'][_0x504a4a(0x158)],'maxHeld':_0x5c898e[_0x504a4a(0x150)][_0x504a4a(0x181)],'heldExpiryMs':_0x5c898e[_0x504a4a(0x150)][_0x504a4a(0x186)],'inboxFile':_0x5c898e[_0x504a4a(0x150)][_0x504a4a(0x137)],'logger':_0x5c898e[_0x504a4a(0x16a)]});}function _0x299333(_0x4250fb,_0x3b10a8){const _0x3efe47=_0x2eae;try{return readdirSync(join(_0x4250fb,_0x3b10a8))[_0x3efe47(0x197)](_0x2479f6=>_0x2479f6['endsWith'](_0x3efe47(0x16b)))[_0x3efe47(0x142)]();}catch(_0x148368){if(_0x148368[_0x3efe47(0x15e)]==='ENOENT')return[];throw _0x148368;}}function _0x51beb4(_0x1b51f2){const _0x51148b=_0x2eae;if(process[_0x51148b(0x190)]===_0x51148b(0x134))return;const _0x35670a=openSync(_0x1b51f2,'r');try{fsyncSync(_0x35670a);}finally{closeSync(_0x35670a);}}function _0x589df4(_0x51b470){mkdirSync(_0x51b470,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x51b470,0x1c0);}function _0x426dd0(_0x3208b2,_0x5d7282){const _0x69523f=_0x2eae,_0x868885=dirname(_0x3208b2);_0x589df4(_0x868885);const _0x67b62=join(_0x868885,'.'+process[_0x69523f(0x18e)]+'.'+randomBytes(0x8)[_0x69523f(0x140)](_0x69523f(0x13d))+_0x69523f(0x148)),_0x24f253=openSync(_0x67b62,'wx',0x180);try{writeSync(_0x24f253,JSON['stringify'](_0x5d7282)),fsyncSync(_0x24f253);}finally{closeSync(_0x24f253);}chmodSync(_0x67b62,0x180),renameSync(_0x67b62,_0x3208b2),_0x51beb4(_0x868885);}function _0x56050c(_0xa6425){const _0x1ad318=_0x2eae;try{const _0x13cec5=JSON[_0x1ad318(0x135)](readFileSync(_0xa6425,_0x1ad318(0x141)));return typeof _0x13cec5[_0x1ad318(0x198)]==='number'&&Number[_0x1ad318(0x18c)](_0x13cec5[_0x1ad318(0x198)])?_0x13cec5[_0x1ad318(0x198)]:null;}catch(_0x21172b){if(_0x21172b['code']===_0x1ad318(0x19b))return null;throw _0x21172b;}}function _0x2d54c6(_0x323b0e,_0x5a5011){const _0x30448c=_0x2eae;try{return readFileSync(_0x323b0e,_0x30448c(0x141))===readFileSync(_0x5a5011,_0x30448c(0x141));}catch{return![];}}function _0x2eae(_0x2c185d,_0x190dda){_0x2c185d=_0x2c185d-0x12e;const _0x50e21e=_0x50e2();let _0x2eaea0=_0x50e21e[_0x2c185d];if(_0x2eae['uSpoxg']===undefined){var _0x499a10=function(_0x5a1d36){const _0x35280a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xeb6e0e='',_0x26478d='';for(let _0x32dce0=0x0,_0x4e7d07,_0x26f4e1,_0x299333=0x0;_0x26f4e1=_0x5a1d36['charAt'](_0x299333++);~_0x26f4e1&&(_0x4e7d07=_0x32dce0%0x4?_0x4e7d07*0x40+_0x26f4e1:_0x26f4e1,_0x32dce0++%0x4)?_0xeb6e0e+=String['fromCharCode'](0xff&_0x4e7d07>>(-0x2*_0x32dce0&0x6)):0x0){_0x26f4e1=_0x35280a['indexOf'](_0x26f4e1);}for(let _0x51beb4=0x0,_0x589df4=_0xeb6e0e['length'];_0x51beb4<_0x589df4;_0x51beb4++){_0x26478d+='%'+('00'+_0xeb6e0e['charCodeAt'](_0x51beb4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26478d);};_0x2eae['ClxTel']=_0x499a10,_0x2eae['KbPpDw']={},_0x2eae['uSpoxg']=!![];}const _0xed9983=_0x50e21e[0x0];_0x2eae['kNbNJl']!==_0xed9983&&(_0x2eae['KbPpDw']={},_0x2eae['kNbNJl']=_0xed9983);const _0x3c5dd4=_0x2eae['KbPpDw'][_0x2c185d];return _0x3c5dd4===undefined?(_0x2eaea0=_0x2eae['ClxTel'](_0x2eaea0),_0x2eae['KbPpDw'][_0x2c185d]=_0x2eaea0):_0x2eaea0=_0x3c5dd4,_0x2eaea0;}export async function migrateWorkspaceSpool(_0x1dcff0){const _0x4e25e3=_0x2eae,_0x50e0d8=stableSpoolEndpointId(_0x1dcff0[_0x4e25e3(0x169)]),_0x55770b=stableSessionEndpointId(_0x1dcff0[_0x4e25e3(0x172)]),_0x44455a={'migrated':0x0,'deduplicated':0x0,'quarantined':0x0,'sourceEndpointId':_0x50e0d8,'targetEndpointId':_0x55770b};if(_0x50e0d8===_0x55770b)return _0x44455a;const _0x441d70=join(dirname(_0x1dcff0[_0x4e25e3(0x150)][_0x4e25e3(0x137)]),_0x4e25e3(0x13b),_0x50e0d8),_0x912f4b=join(dirname(_0x1dcff0[_0x4e25e3(0x150)][_0x4e25e3(0x137)]),_0x4e25e3(0x13b),_0x55770b);if(!existsSync(_0x441d70))return _0x44455a;const sourceHasState=[_0x4e25e3(0x132),'held','inflight',_0x4e25e3(0x174)][_0x4e25e3(0x138)](_0x56b34d=>_0x299333(_0x441d70,_0x56b34d)[_0x4e25e3(0x15c)]>0x0);if(!sourceHasState&&!existsSync(join(_0x441d70,_0x4e25e3(0x189))))return _0x44455a;const _0x416502={'maxQueue':_0x1dcff0[_0x4e25e3(0x150)][_0x4e25e3(0x158)],'maxHeld':_0x1dcff0[_0x4e25e3(0x150)]['maxHeld'],'heldExpiryMs':_0x1dcff0['config']['heldExpiryMs'],'inboxFile':_0x1dcff0[_0x4e25e3(0x150)][_0x4e25e3(0x137)],'logger':_0x1dcff0[_0x4e25e3(0x16a)]},_0x4a8b4a=new Map([[_0x50e0d8,MessageQueue({..._0x416502,'endpointId':_0x50e0d8})],[_0x55770b,MessageQueue({..._0x416502,'endpointId':_0x55770b})]]),[_0x2e3b45,_0x3beef5]=[_0x50e0d8,_0x55770b][_0x4e25e3(0x142)](),_0x146bc4=[];_0x4a8b4a[_0x4e25e3(0x176)](_0x2e3b45)[_0x4e25e3(0x12e)](()=>{const _0x5c2988=_0x4e25e3;_0x4a8b4a[_0x5c2988(0x176)](_0x3beef5)[_0x5c2988(0x12e)](()=>{const _0x622da8=_0x5c2988;for(const _0x4e601c of[_0x622da8(0x132),_0x622da8(0x13e),_0x622da8(0x19d),_0x622da8(0x174)]){for(const _0x306c24 of _0x299333(_0x441d70,_0x4e601c)){const _0x3145fd=join(_0x441d70,_0x4e601c,_0x306c24),_0x4b375c=[_0x622da8(0x132),_0x622da8(0x13e),_0x622da8(0x19d),'done']['map'](_0x1e5cad=>join(_0x912f4b,_0x1e5cad,_0x306c24))[_0x622da8(0x197)](_0x4f23d9=>existsSync(_0x4f23d9));if(_0x4b375c[_0x622da8(0x15c)]===0x0){const _0x43089c=join(_0x912f4b,_0x4e601c,_0x306c24);renameSync(_0x3145fd,_0x43089c),_0x51beb4(join(_0x441d70,_0x4e601c)),_0x51beb4(join(_0x912f4b,_0x4e601c)),_0x44455a['migrated']++;continue;}if(_0x4b375c[_0x622da8(0x15c)]===0x1&&_0x4b375c[0x0]===join(_0x912f4b,_0x4e601c,_0x306c24)&&_0x2d54c6(_0x3145fd,_0x4b375c[0x0])){unlinkSync(_0x3145fd),_0x51beb4(join(_0x441d70,_0x4e601c)),_0x44455a[_0x622da8(0x180)]++;continue;}const base=join(_0x912f4b,'migration-quarantine',_0x50e0d8,_0x4e601c);_0x589df4(base);let _0x351230=join(base,_0x306c24);if(existsSync(_0x351230)&&!_0x2d54c6(_0x3145fd,_0x351230)){const _0x4d056c=createHash(_0x622da8(0x13f))[_0x622da8(0x160)](readFileSync(_0x3145fd))[_0x622da8(0x18b)]('hex')[_0x622da8(0x15a)](0x0,0x10);_0x351230=join(base,_0x306c24[_0x622da8(0x15a)](0x0,-0x5)+'.'+_0x4d056c+_0x622da8(0x16b));}existsSync(_0x351230)&&_0x2d54c6(_0x3145fd,_0x351230)?unlinkSync(_0x3145fd):(renameSync(_0x3145fd,_0x351230),_0x51beb4(base)),_0x51beb4(join(_0x441d70,_0x4e601c)),_0x44455a[_0x622da8(0x159)]++,_0x146bc4[_0x622da8(0x192)]({'state':_0x4e601c,'file':_0x306c24,'quarantine':_0x351230});}}const _0x574838=join(_0x441d70,_0x622da8(0x189)),_0x5c14f3=join(_0x912f4b,_0x622da8(0x189)),_0x2a4ec1=_0x56050c(_0x574838),_0x6d3a62=_0x56050c(_0x5c14f3);if(_0x2a4ec1!==null){const _0x338065=Math['max'](_0x2a4ec1,_0x6d3a62??0x0);if(_0x6d3a62!==_0x338065)_0x426dd0(_0x5c14f3,{'value':_0x338065});unlinkSync(_0x574838),_0x51beb4(_0x441d70);}_0x426dd0(join(_0x912f4b,_0x622da8(0x14e),_0x50e0d8+_0x622da8(0x16b)),{'version':0x1,'sourceEndpointId':_0x50e0d8,'targetEndpointId':_0x55770b,'completedAt':Date[_0x622da8(0x13a)]()});});});for(const _0x376145 of _0x146bc4){await _0x1dcff0[_0x4e25e3(0x16a)]('warn',_0x4e25e3(0x184),{'sourceEndpointId':_0x50e0d8,'targetEndpointId':_0x55770b,'state':_0x376145[_0x4e25e3(0x145)],'file':_0x376145[_0x4e25e3(0x164)],'quarantine':_0x376145[_0x4e25e3(0x161)]});}return await _0x1dcff0[_0x4e25e3(0x16a)]('info',_0x4e25e3(0x173),{..._0x44455a}),_0x44455a;}export function MessageQueue(_0x1167ec){const _0x256f8c=_0x2eae;let _0x3ac93b=[],_0x12033a=[];const _0x36b137=join(dirname(_0x1167ec[_0x256f8c(0x137)]),_0x256f8c(0x13b),_0x1167ec[_0x256f8c(0x19e)]??_0x256f8c(0x14d)),_0x2da1b3=_0x1167ec[_0x256f8c(0x186)]??0x493e0,_0x1d18bd=_0x1167ec['debounceMs']??0x3e8,_0x415df0=new Map(),_0x3b345a=join(_0x36b137,_0x256f8c(0x165)),_0xaee340=join(_0x36b137,_0x256f8c(0x189));function _0x10bb29(){const _0x2fd213=_0x256f8c;mkdirSync(_0x36b137,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x36b137,0x1c0);for(const _0x39a62d of[_0x2fd213(0x132),_0x2fd213(0x13e),_0x2fd213(0x19d),'done']){const _0x28258e=join(_0x36b137,_0x39a62d);mkdirSync(_0x28258e,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x28258e,0x1c0);}mkdirSync(_0x3b345a,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x3b345a,0x1c0);}function _0x57c5ba(_0xc2ec7){const _0x1ec193=_0x256f8c;try{unlinkSync(_0xc2ec7),_0x571ed1(_0x3b345a);}catch(_0x264c65){if(_0x264c65[_0x1ec193(0x15e)]!==_0x1ec193(0x19b))throw _0x264c65;}}function _0x5d24e2(_0x382814,_0xca8779){const _0x33bd2b=_0x256f8c,_0x47952b=openSync(_0x382814,'wx',0x180);try{writeSync(_0x47952b,JSON[_0x33bd2b(0x195)](_0xca8779)),fsyncSync(_0x47952b);}catch(_0x57afe9){try{closeSync(_0x47952b);}finally{_0x57c5ba(_0x382814);}throw _0x57afe9;}try{closeSync(_0x47952b),_0x571ed1(_0x3b345a);}catch(_0x56b571){_0x57c5ba(_0x382814);throw _0x56b571;}}function _0x389f31(){const _0x4cfd30=_0x256f8c;return readdirSync(_0x3b345a)[_0x4cfd30(0x197)](_0x327c70=>/^choosing-[a-f0-9]{32}\.json$/[_0x4cfd30(0x16d)](_0x327c70)||/^ticket-\d{16}-[a-f0-9]{32}\.json$/[_0x4cfd30(0x16d)](_0x327c70));}function _0x3fcbdd(){const _0x6de43e=_0x256f8c;for(const _0x41b3de of _0x389f31()){const _0x53b2da=join(_0x3b345a,_0x41b3de);try{if(Date[_0x6de43e(0x13a)]()-statSync(_0x53b2da)[_0x6de43e(0x147)]>_0x32dce0)_0x57c5ba(_0x53b2da);}catch(_0xa85462){if(_0xa85462[_0x6de43e(0x15e)]!==_0x6de43e(0x19b))throw _0xa85462;}}}function ticketNumber(_0x51afdb){const _0x3d9bbb=/^ticket-(\d{16})-[a-f0-9]{32}\.json$/['exec'](_0x51afdb);return _0x3d9bbb?Number(_0x3d9bbb[0x1]):null;}function _0x326280(_0x4d9e8b){const _0x298e81=_0x256f8c,_0x3ccb8c=randomBytes(0x10)[_0x298e81(0x140)](_0x298e81(0x13d)),_0x5e6e3b=join(_0x3b345a,_0x298e81(0x175)+_0x3ccb8c+_0x298e81(0x16b));let _0x13c72f=null;_0x5d24e2(_0x5e6e3b,{'kind':_0x298e81(0x18d),'token':_0x3ccb8c,'pid':process['pid'],'createdAt':Date['now']()});try{_0x3fcbdd();const _0x3b99ae=_0x389f31()[_0x298e81(0x16c)]((_0x3786ef,_0x141591)=>Math[_0x298e81(0x182)](_0x3786ef,ticketNumber(_0x141591)??0x0),0x0);if(Date[_0x298e81(0x13a)]()>=_0x4d9e8b)throw new Error(_0x298e81(0x14b)+_0x3b345a);const _0xdb2ae=_0x3b99ae+0x1;_0x13c72f=join(_0x3b345a,_0x298e81(0x179)+String(_0xdb2ae)[_0x298e81(0x143)](0x10,'0')+'-'+_0x3ccb8c+_0x298e81(0x16b)),_0x5d24e2(_0x13c72f,{'kind':_0x298e81(0x199),'ticket':_0xdb2ae,'token':_0x3ccb8c,'pid':process['pid'],'createdAt':Date[_0x298e81(0x13a)]()});}finally{_0x57c5ba(_0x5e6e3b);}for(;;){_0x3fcbdd();if(!existsSync(_0x13c72f))throw new Error(_0x298e81(0x185)+_0x13c72f);if(Date[_0x298e81(0x13a)]()>=_0x4d9e8b){_0x57c5ba(_0x13c72f);throw new Error(_0x298e81(0x14b)+_0x3b345a);}const _0x4c78f4=_0x389f31(),_0x52f15c=_0x4c78f4[_0x298e81(0x138)](_0x370476=>_0x370476[_0x298e81(0x163)]('choosing-')),_0x3bae02=_0x4c78f4['flatMap'](_0x17c3b8=>{const _0xab739c=ticketNumber(_0x17c3b8);return _0xab739c===null?[]:[{'file':_0x17c3b8,'ticket':_0xab739c}];})[_0x298e81(0x142)]((_0x884781,_0xc6dde9)=>_0x884781['ticket']-_0xc6dde9[_0x298e81(0x199)]||(_0x884781[_0x298e81(0x164)]<_0xc6dde9[_0x298e81(0x164)]?-0x1:_0x884781['file']>_0xc6dde9[_0x298e81(0x164)]?0x1:0x0));if(!_0x52f15c&&_0x3bae02[0x0]?.[_0x298e81(0x164)]===_0x13c72f[_0x298e81(0x15a)](_0x3b345a[_0x298e81(0x15c)]+0x1))return _0x13c72f;Atomics[_0x298e81(0x167)](new Int32Array(new SharedArrayBuffer(0x4)),0x0,0x0,_0x26f4e1);}}function _0x569a0f(_0x2955b8){const _0x446048=_0x256f8c;_0x10bb29();const _0xd6fda3=_0x326280(Date[_0x446048(0x13a)]()+_0x4e7d07);try{return _0x2955b8();}finally{_0x57c5ba(_0xd6fda3);}}function _0x37ceed(_0x48b7c9){const _0x19cf3c=_0x256f8c;return _0x5d867e(_0x48b7c9)[_0x19cf3c(0x15c)];}function _0x5d867e(_0x5d4bf0){const _0x3a93fd=_0x256f8c,_0x10222d=join(_0x36b137,_0x5d4bf0);let _0x223bba=[];try{_0x223bba=readdirSync(_0x10222d)[_0x3a93fd(0x197)](_0x24b66d=>_0x24b66d[_0x3a93fd(0x155)](_0x3a93fd(0x16b)));}catch(_0x4e16a7){return _0x4e16a7[_0x3a93fd(0x15e)]!==_0x3a93fd(0x19b)&&void _0x1167ec['logger'](_0x3a93fd(0x154),_0x3a93fd(0x15b),{'state':_0x5d4bf0,'error':String(_0x4e16a7)}),[];}const _0xa03b75=[];for(const _0x1f669c of _0x223bba){try{const _0x523882=JSON[_0x3a93fd(0x135)](readFileSync(join(_0x10222d,_0x1f669c),'utf8'));if(_0x523882?.['version']!==0x2||_0x523882[_0x3a93fd(0x145)]!==_0x5d4bf0||!_0x523882[_0x3a93fd(0x168)]?.['id']||!_0x523882[_0x3a93fd(0x168)][_0x3a93fd(0x131)]?.[_0x3a93fd(0x133)]||!Number[_0x3a93fd(0x157)](_0x523882[_0x3a93fd(0x168)]['sentAt'])||_0x5d4bf0===_0x3a93fd(0x13e)&&!Number['isFinite'](_0x523882[_0x3a93fd(0x168)][_0x3a93fd(0x12f)])||_0x5d4bf0===_0x3a93fd(0x174)&&!_0x523882[_0x3a93fd(0x196)])throw new Error(_0x3a93fd(0x166));_0xa03b75[_0x3a93fd(0x192)](_0x523882);}catch(_0x39f8a2){void _0x1167ec[_0x3a93fd(0x16a)](_0x3a93fd(0x154),_0x3a93fd(0x152),{'state':_0x5d4bf0,'file':_0x1f669c,'error':String(_0x39f8a2)});}}return _0xa03b75['sort']((_0x1ffe19,_0x2071c7)=>{const _0x1ac0a8=_0x3a93fd,_0x4af8b0=_0x1ffe19['sequence']??_0x1ffe19[_0x1ac0a8(0x14f)]??_0x1ffe19[_0x1ac0a8(0x168)][_0x1ac0a8(0x151)],_0x45efcd=_0x2071c7[_0x1ac0a8(0x189)]??_0x2071c7[_0x1ac0a8(0x14f)]??_0x2071c7[_0x1ac0a8(0x168)][_0x1ac0a8(0x151)];return _0x4af8b0-_0x45efcd;});}function _0xc14300(){const _0x1f9a3d=_0x256f8c;let _0x273b85=0x0;try{const _0x290b75=JSON[_0x1f9a3d(0x135)](readFileSync(_0xaee340,'utf8'));if(typeof _0x290b75[_0x1f9a3d(0x198)]===_0x1f9a3d(0x153)&&Number['isSafeInteger'](_0x290b75['value']))_0x273b85=_0x290b75[_0x1f9a3d(0x198)];}catch{}const _0x1119a9=_0x273b85+0x1;return _0x292684(_0xaee340,{'value':_0x1119a9}),_0x1119a9;}function _0x2ab452(_0x38ba50,_0x5a6966){const _0x246e7e=_0x256f8c;try{const _0x3a09d9=JSON[_0x246e7e(0x135)](readFileSync(join(_0x36b137,_0x38ba50,_0x36f2fe(_0x5a6966)+_0x246e7e(0x16b)),_0x246e7e(0x141)));if(_0x3a09d9?.[_0x246e7e(0x17c)]!==0x2||_0x3a09d9['state']!==_0x38ba50||_0x3a09d9[_0x246e7e(0x168)]?.['id']!==_0x5a6966['id']||_0x3a09d9['message'][_0x246e7e(0x131)]?.['instanceId']!==_0x5a6966[_0x246e7e(0x131)][_0x246e7e(0x133)]||_0x38ba50===_0x246e7e(0x174)&&!_0x3a09d9[_0x246e7e(0x196)])return null;return _0x3a09d9;}catch{return null;}}function _0x29d43f(){const _0x2f2e2d=_0x256f8c;_0x12033a=_0x5d867e(_0x2f2e2d(0x13e))[_0x2f2e2d(0x16e)](_0x555e49=>_0x555e49[_0x2f2e2d(0x168)]);}function _0x556029(){const _0x24ffb5=_0x256f8c;_0x3ac93b=_0x5d867e(_0x24ffb5(0x132))[_0x24ffb5(0x16e)](_0x697477=>_0x697477['message']);}function _0x36f2fe(_0x536d55){const _0x3052b6=_0x256f8c;return createHash(_0x3052b6(0x13f))[_0x3052b6(0x160)](_0x536d55[_0x3052b6(0x131)][_0x3052b6(0x133)]+'\x00'+_0x536d55['id'])[_0x3052b6(0x18b)](_0x3052b6(0x13d));}function _0x44164c(_0x5d54a2){const _0x2762b8=_0x256f8c;return join(_0x36b137,_0x2762b8(0x132),_0x36f2fe(_0x5d54a2)+'.json');}function _0x35c7e9(_0x961bf3){const _0x44eb2c=_0x256f8c;return join(_0x36b137,_0x44eb2c(0x19d),_0x36f2fe(_0x961bf3)+_0x44eb2c(0x16b));}function _0x2663dc(_0x4b28bc){const _0x4d4e9c=_0x256f8c;return join(_0x36b137,_0x4d4e9c(0x13e),_0x36f2fe(_0x4b28bc)+_0x4d4e9c(0x16b));}function _0x1730f8(_0x5d7420){const _0x56c606=_0x256f8c;return join(_0x36b137,_0x56c606(0x174),_0x36f2fe(_0x5d7420)+'.json');}function _0x1749e1(_0x175fd3){const _0x5874ce=_0x256f8c;for(const _0x7305de of[_0x5874ce(0x132),_0x5874ce(0x13e),'inflight',_0x5874ce(0x174)]){if(_0x2ab452(_0x7305de,_0x175fd3))return _0x7305de;}return null;}function _0x482158(_0x374bea){const _0x1ba886=_0x256f8c;return createHash('sha256')[_0x1ba886(0x160)](_0x374bea[_0x1ba886(0x131)][_0x1ba886(0x133)]+'\x00'+_0x374bea[_0x1ba886(0x15d)])[_0x1ba886(0x18b)]('hex');}function _0x203b44(_0x56f592){const _0x42a7aa=_0x256f8c,_0x1b683f=_0x415df0[_0x42a7aa(0x176)](_0x482158(_0x56f592));return typeof _0x1b683f===_0x42a7aa(0x153)&&_0x1b683f>Date['now']()-_0x1d18bd;}function _0x1b6a43(_0x30e55d){const _0x55e130=_0x256f8c;_0x415df0[_0x55e130(0x194)](_0x482158(_0x30e55d),Date[_0x55e130(0x13a)]());}function _0x503cfc(_0x60b033){const _0xe53e0f=_0x256f8c,_0x4fc07e=Date[_0xe53e0f(0x13a)]()-_0x1d18bd;for(const _0x4d35ae of[_0xe53e0f(0x132),_0xe53e0f(0x13e),_0xe53e0f(0x19d),_0xe53e0f(0x174)]){for(const _0x527603 of _0x5d867e(_0x4d35ae)){const _0x368fdc=_0x527603['acceptedAt']??_0x527603[_0xe53e0f(0x170)]??_0x527603[_0xe53e0f(0x168)]['sentAt'];if(_0x368fdc>_0x4fc07e&&_0x527603[_0xe53e0f(0x168)]['id']!==_0x60b033['id']&&_0x527603['message'][_0xe53e0f(0x131)][_0xe53e0f(0x133)]===_0x60b033['from'][_0xe53e0f(0x133)]&&_0x527603[_0xe53e0f(0x168)][_0xe53e0f(0x15d)]===_0x60b033[_0xe53e0f(0x15d)])return _0x527603;}}return null;}function _0x20017c(_0x235bcf){mkdirSync(_0x235bcf,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x36b137,0x1c0),chmodSync(_0x235bcf,0x1c0);}function _0x571ed1(_0x33de87){const _0x2bcb41=_0x256f8c;if(process[_0x2bcb41(0x190)]===_0x2bcb41(0x134))return;const _0x249749=openSync(_0x33de87,'r');try{fsyncSync(_0x249749);}finally{closeSync(_0x249749);}}function _0x292684(_0x4b6d2b,_0x8ca714){const _0x448e5c=_0x256f8c,_0x1cfe35=dirname(_0x4b6d2b);_0x20017c(_0x1cfe35);const _0x10fb9e=join(_0x1cfe35,'.'+process[_0x448e5c(0x18e)]+'.'+Date[_0x448e5c(0x13a)]()+_0x448e5c(0x148)),_0x224ad8=openSync(_0x10fb9e,'w',0x180);try{writeSync(_0x224ad8,JSON[_0x448e5c(0x195)](_0x8ca714)),fsyncSync(_0x224ad8);}finally{closeSync(_0x224ad8);}chmodSync(_0x10fb9e,0x180),renameSync(_0x10fb9e,_0x4b6d2b),_0x571ed1(_0x1cfe35);}function _0x51daff(_0x41e518){const _0x130899=_0x256f8c;_0x292684(_0x44164c(_0x41e518),{'version':0x2,'state':_0x130899(0x132),'message':_0x41e518,'acceptedAt':Date[_0x130899(0x13a)](),'sequence':_0xc14300()});}function _0x56cc6c(_0x3c9d7c,_0x4e7622){const _0x37795f=_0x256f8c;return{'version':0x2,'messageId':_0x3c9d7c['id'],'fromEndpointId':_0x3c9d7c['from'][_0x37795f(0x133)],'toEndpointId':_0x1167ec[_0x37795f(0x19e)]??_0x37795f(0x14d),'status':_0x4e7622,'acknowledgedAt':Date['now']()};}function _0x30f490(_0x1ff49e,_0x8779e4,_0x50ca76){const _0x11fe5d=_0x256f8c,_0x16997d=_0x2ab452(_0x8779e4,_0x1ff49e);if(!_0x16997d){const _0x2bd489=_0x2ab452('done',_0x1ff49e)?.[_0x11fe5d(0x196)];if(_0x2bd489)return _0x2bd489;throw new Error(_0x11fe5d(0x177)+_0x8779e4+_0x11fe5d(0x17a)+_0x1ff49e['id']);}const _0x591de6=_0x56cc6c(_0x1ff49e,_0x50ca76);_0x292684(_0x1730f8(_0x1ff49e),{..._0x16997d,'state':_0x11fe5d(0x174),'message':_0x1ff49e,'ack':_0x591de6});const _0x27f886=join(_0x36b137,_0x8779e4,_0x36f2fe(_0x1ff49e)+_0x11fe5d(0x16b));return unlinkSync(_0x27f886),_0x571ed1(dirname(_0x27f886)),_0x591de6;}function _0x5a8ccc(_0x4695a0,_0x567d84){const _0xf905c2=_0x256f8c,_0x4d4e1e=_0x56cc6c(_0x4695a0,_0xf905c2(0x183));return _0x292684(_0x1730f8(_0x4695a0),{'version':0x2,'state':_0xf905c2(0x174),'message':_0x4695a0,'ack':_0x4d4e1e,'acceptedAt':Date[_0xf905c2(0x13a)](),'sequence':_0xc14300(),'duplicateOfMessageId':_0x567d84[_0xf905c2(0x168)]['id']}),_0x4d4e1e;}function _0x3ac70(_0x1dbeca,_0x5ba37a=Infinity){const _0xef22cd=_0x256f8c;if(_0x5ba37a<=0x0)return[];if(_0x1dbeca==='all'){const _0x19c3c5=_0x12033a[_0xef22cd(0x15a)](0x0,_0x5ba37a);return _0x12033a=_0x12033a[_0xef22cd(0x15a)](_0x19c3c5[_0xef22cd(0x15c)]),_0x19c3c5;}const _0x56ecac=_0x1dbeca-0x1;if(_0x56ecac<0x0||_0x56ecac>=_0x12033a['length'])return[];return _0x12033a[_0xef22cd(0x146)](_0x56ecac,0x1);}function _0x42e731(){const _0x375f0c=_0x256f8c;_0x29d43f();const _0xd44271=Date[_0x375f0c(0x13a)](),_0x599862=_0x12033a[_0x375f0c(0x197)](_0x2cbf62=>_0x2cbf62[_0x375f0c(0x12f)]<=_0xd44271);return _0x12033a=_0x12033a[_0x375f0c(0x197)](_0x4646ed=>_0x4646ed[_0x375f0c(0x12f)]>_0xd44271),_0x599862[_0x375f0c(0x16e)](_0x2e6c77=>_0x30f490(_0x2e6c77,'held',_0x375f0c(0x187)));}async function _0x2d0fad(){return _0x569a0f(_0x42e731);}const _0xa9c327={'enqueue'(_0x2f5846){return _0x569a0f(()=>{const _0x2dc860=_0x2eae;if(_0x1749e1(_0x2f5846))return![];const _0x576377=_0x503cfc(_0x2f5846);if(_0x576377||_0x203b44(_0x2f5846))return _0x5a8ccc(_0x2f5846,_0x576377??{'version':0x2,'state':_0x2dc860(0x132),'message':_0x2f5846}),![];if(_0x37ceed(_0x2dc860(0x132))+_0x37ceed(_0x2dc860(0x19d))>=_0x1167ec[_0x2dc860(0x158)])return![];return _0x51daff(_0x2f5846),_0x1b6a43(_0x2f5846),_0x3ac93b[_0x2dc860(0x192)](_0x2f5846),!![];});},'drain'(){return _0x569a0f(()=>{const _0x556052=_0x2eae,_0x4987b8=_0x5d867e(_0x556052(0x132)),_0xa00c61=_0x4987b8[_0x556052(0x16e)](_0x495709=>_0x495709[_0x556052(0x168)]);for(const _0x35c450 of _0x4987b8){const _0x1548d8=_0x35c450[_0x556052(0x168)];_0x292684(_0x35c7e9(_0x1548d8),{..._0x35c450,'state':_0x556052(0x19d),'message':_0x1548d8}),unlinkSync(_0x44164c(_0x1548d8)),_0x571ed1(dirname(_0x44164c(_0x1548d8)));}return _0x3ac93b=[],_0xa00c61;});},async 'complete'(_0x1be3ae){const _0x534b82=_0x256f8c;return _0x569a0f(()=>_0x1be3ae[_0x534b82(0x16e)](_0x9c1567=>_0x30f490(_0x9c1567,'inflight','delivered')));},async 'requeue'(_0x4f98e2){_0x569a0f(()=>{const _0x2cecad=_0x2eae;for(const _0x5b515f of _0x4f98e2){const _0x6afcc5=_0x2ab452(_0x2cecad(0x19d),_0x5b515f);if(!_0x6afcc5)continue;_0x292684(_0x44164c(_0x5b515f),{..._0x6afcc5,'state':_0x2cecad(0x132),'message':_0x5b515f}),unlinkSync(_0x35c7e9(_0x5b515f)),_0x571ed1(dirname(_0x35c7e9(_0x5b515f)));}_0x556029();});},'duplicateAcknowledgement'(_0x1f2ed8){const _0xb6ae45=_0x256f8c,_0x17c946=_0x2ab452(_0xb6ae45(0x174),_0x1f2ed8);return _0x17c946?.[_0xb6ae45(0x196)]?.[_0xb6ae45(0x17e)]===_0xb6ae45(0x183)?_0x17c946[_0xb6ae45(0x196)]:null;},'existingStatus'(_0x271eec){const _0x29f75c=_0x256f8c;switch(_0x1749e1(_0x271eec)){case _0x29f75c(0x132):case _0x29f75c(0x19d):return _0x29f75c(0x132);case _0x29f75c(0x13e):return _0x29f75c(0x13e);case _0x29f75c(0x174):{return _0x2ab452(_0x29f75c(0x174),_0x271eec)?.[_0x29f75c(0x196)]?.[_0x29f75c(0x17e)]??null;}default:return null;}},'isDebounced'(_0x5ec389){return _0x569a0f(()=>{const _0x35c400=_0x2eae;if(_0x1749e1(_0x5ec389))return![];const _0x3a09da=_0x503cfc(_0x5ec389);if(!_0x3a09da&&!_0x203b44(_0x5ec389))return![];return _0x5a8ccc(_0x5ec389,_0x3a09da??{'version':0x2,'state':_0x35c400(0x132),'message':_0x5ec389}),!![];});},async 'refuse'(_0x44ab46){return _0x569a0f(()=>{const _0x547c1e=_0x2eae,_0x562d4d=_0x1749e1(_0x44ab46);if(_0x562d4d===_0x547c1e(0x174))return _0x2ab452(_0x547c1e(0x174),_0x44ab46)[_0x547c1e(0x196)];if(_0x562d4d)return _0x56cc6c(_0x44ab46,'duplicate');const _0x37e6ed=_0x56cc6c(_0x44ab46,_0x547c1e(0x17d));return _0x292684(_0x1730f8(_0x44ab46),{'version':0x2,'state':_0x547c1e(0x174),'message':_0x44ab46,'ack':_0x37e6ed,'acceptedAt':Date['now'](),'sequence':_0xc14300()}),_0x37e6ed;});},'pending'(){return[..._0x3ac93b];},'size'(){return _0x3ac93b['length'];},async 'hold'(_0x12a55f){return _0x569a0f(()=>{const _0x28ce65=_0x2eae;if(_0x1749e1(_0x12a55f))return![];const _0x287121=_0x503cfc(_0x12a55f);if(_0x287121||_0x203b44(_0x12a55f))return _0x5a8ccc(_0x12a55f,_0x287121??{'version':0x2,'state':_0x28ce65(0x13e),'message':_0x12a55f}),![];if(_0x37ceed(_0x28ce65(0x13e))>=_0x1167ec[_0x28ce65(0x181)])return![];const _0x46e19d=Date[_0x28ce65(0x13a)](),_0x4ddcb8={..._0x12a55f,'heldAt':_0x46e19d,'expiresAt':_0x46e19d+_0x2da1b3};return _0x292684(_0x2663dc(_0x12a55f),{'version':0x2,'state':_0x28ce65(0x13e),'message':_0x4ddcb8,'heldAt':_0x46e19d,'expiresAt':_0x4ddcb8[_0x28ce65(0x12f)],'acceptedAt':_0x46e19d,'sequence':_0xc14300()}),_0x1b6a43(_0x12a55f),_0x12033a[_0x28ce65(0x192)](_0x4ddcb8),!![];});},'held'(){return[..._0x12033a];},'expireHeld':_0x2d0fad,'pendingAcknowledgements'(){const _0x157708=_0x256f8c;return _0x569a0f(()=>_0x5d867e('done')[_0x157708(0x197)](_0x63847f=>_0x63847f[_0x157708(0x196)]&&!_0x63847f[_0x157708(0x19a)])[_0x157708(0x16e)](_0x1e8ea0=>_0x1e8ea0[_0x157708(0x196)]));},async 'markAcknowledgementSent'(_0x31bffe){_0x569a0f(()=>{const _0x54193a=_0x2eae,_0x285433=_0x5d867e(_0x54193a(0x174))[_0x54193a(0x14a)](_0x4ed639=>_0x4ed639['ack']?.[_0x54193a(0x15f)]===_0x31bffe['messageId']&&_0x4ed639[_0x54193a(0x196)][_0x54193a(0x13c)]===_0x31bffe[_0x54193a(0x13c)]&&_0x4ed639[_0x54193a(0x196)]['toEndpointId']===_0x31bffe['toEndpointId']);if(!_0x285433)return;_0x292684(_0x1730f8(_0x285433['message']),{..._0x285433,'ackSentAt':Date[_0x54193a(0x13a)]()});});},async 'acceptHeld'(_0x71e30f){return _0x569a0f(()=>{const _0x5769ba=_0x2eae;_0x42e731(),_0x29d43f();const _0x19d9b7=_0x37ceed(_0x5769ba(0x132))+_0x37ceed('inflight'),_0x50905e=_0x3ac70(_0x71e30f,Math[_0x5769ba(0x182)](0x0,_0x1167ec['maxQueue']-_0x19d9b7));for(const _0x27bbd4 of _0x50905e){const {heldAt:_0x5a7531,expiresAt:_0x3a2158,..._0x42b42a}=_0x27bbd4,_0x5db16f=_0x2ab452(_0x5769ba(0x13e),_0x27bbd4);_0x292684(_0x44164c(_0x42b42a),{..._0x5db16f??{'version':0x2,'acceptedAt':Date[_0x5769ba(0x13a)](),'sequence':_0xc14300()},'state':_0x5769ba(0x132),'message':_0x42b42a,'heldAt':undefined,'expiresAt':undefined,'ack':undefined}),unlinkSync(_0x2663dc(_0x27bbd4)),_0x571ed1(dirname(_0x2663dc(_0x27bbd4)));}return _0x556029(),_0x29d43f(),_0x50905e;});},async 'dropHeld'(_0x53af03){return _0x569a0f(()=>{const _0x4d2ccd=_0x2eae;_0x42e731(),_0x29d43f();const _0x1afd04=_0x3ac70(_0x53af03);for(const _0x2b07f7 of _0x1afd04)_0x30f490(_0x2b07f7,_0x4d2ccd(0x13e),'dropped');return _0x29d43f(),_0x1afd04['length'];});},async 'loadHeld'(){_0x569a0f(()=>{const _0x8e1463=_0x2eae,_0x12e11e=join(_0x36b137,_0x8e1463(0x19d));for(const _0x16ab0e of _0x5d867e(_0x8e1463(0x19d))){const _0x4829c7=_0x16ab0e[_0x8e1463(0x168)];!_0x2ab452(_0x8e1463(0x174),_0x4829c7)&&_0x292684(_0x44164c(_0x4829c7),{..._0x16ab0e,'state':_0x8e1463(0x132),'message':_0x4829c7}),unlinkSync(_0x35c7e9(_0x4829c7)),_0x571ed1(_0x12e11e);}const _0x5c2809=Date[_0x8e1463(0x13a)]()-_0x26478d;for(const _0x201add of _0x5d867e(_0x8e1463(0x174))){typeof _0x201add['ack']?.[_0x8e1463(0x178)]===_0x8e1463(0x153)&&_0x201add[_0x8e1463(0x196)][_0x8e1463(0x178)]<=_0x5c2809&&unlinkSync(_0x1730f8(_0x201add['message']));}_0x556029(),_0x29d43f();try{renameSync(_0x1167ec[_0x8e1463(0x137)],_0x1167ec['inboxFile']+'.legacy-'+Date[_0x8e1463(0x13a)]());}catch(_0x456141){_0x456141[_0x8e1463(0x15e)]!==_0x8e1463(0x19b)&&void _0x1167ec['logger'](_0x8e1463(0x154),_0x8e1463(0x171),{'error':String(_0x456141)});}});},'withExclusiveLock'(_0x12bab7){return _0x569a0f(_0x12bab7);}};return _0xa9c327;}export function RateLimiter(_0x1167b3){const _0x21b152=new Map();return _0x35a1e3=>{const _0x484b29=_0x2eae,_0x4329cc=Date[_0x484b29(0x13a)](),_0x4a7053=_0x4329cc-0xea60,_0x32ac6f=(_0x21b152[_0x484b29(0x176)](_0x35a1e3)??[])[_0x484b29(0x197)](_0x35ef4d=>_0x35ef4d>_0x4a7053);if(_0x32ac6f[_0x484b29(0x15c)]>=_0x1167b3)return _0x21b152[_0x484b29(0x194)](_0x35a1e3,_0x32ac6f),![];return _0x32ac6f[_0x484b29(0x192)](_0x4329cc),_0x21b152[_0x484b29(0x194)](_0x35a1e3,_0x32ac6f),!![];};}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/registry.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export interface RegistryEndpoint {
|
|
|
11
11
|
name: string;
|
|
12
12
|
directory: string;
|
|
13
13
|
status: SessionEndpointStatus;
|
|
14
|
-
startedAt: number;
|
|
15
14
|
updatedAt: number;
|
|
16
15
|
queuedCount: number;
|
|
17
16
|
}
|
|
@@ -63,6 +62,24 @@ export interface RegistryInstance {
|
|
|
63
62
|
selfFile: string;
|
|
64
63
|
}
|
|
65
64
|
export declare function Registry(opts: RegistryOptions): RegistryInstance;
|
|
65
|
+
/**
|
|
66
|
+
* Whether a registry entry belongs to THIS process, for self-exclusion in
|
|
67
|
+
* /peers and list_agents. The key is process identity: a v2 entry is mine iff
|
|
68
|
+
* its processId matches, a v1 entry iff its instanceId matches. Comparing the
|
|
69
|
+
* session-derived endpointId alone is wrong — another process can publish an
|
|
70
|
+
* entry that carries my session's endpointId (e.g. it adopted my session as its
|
|
71
|
+
* representative), and I would then filter a real peer as "myself". The
|
|
72
|
+
* endpointId is only a fallback for malformed entries that lack a processId.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isSelfEntry(entry: PeerRegistryEntry, selfInstanceId: string, selfEndpointId?: string | null): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Whether this entry is the CALLER'S OWN endpoint (process id AND endpoint id
|
|
77
|
+
* both match). Used by send_message to prevent messaging yourself; unlike
|
|
78
|
+
* isSelfEntry it does not treat sibling sessions of the same process as self,
|
|
79
|
+
* and it is immune to a foreign process publishing an entry with my
|
|
80
|
+
* endpointId.
|
|
81
|
+
*/
|
|
82
|
+
export declare function isOwnEndpoint(entry: PeerRegistryEntry, selfInstanceId: string, selfEndpointId?: string | null): boolean;
|
|
66
83
|
/** Pick a unique name among alive peers, appending -2, -3, ... on conflict. */
|
|
67
84
|
export declare function uniqueName(desired: string, peers: ListedPeer[]): {
|
|
68
85
|
name: string;
|
package/dist/registry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(stringArrayFunction,_0x385794){const _0x5bf737=_0x2ed6,stringArray=stringArrayFunction();while(!![]){try{const _0x199700=-parseInt(_0x5bf737(0x113))/0x1*(-parseInt(_0x5bf737(0x127))/0x2)+-parseInt(_0x5bf737(0xfa))/0x3*(parseInt(_0x5bf737(0x146))/0x4)+-parseInt(_0x5bf737(0x133))/0x5*(parseInt(_0x5bf737(0x114))/0x6)+parseInt(_0x5bf737(0x104))/0x7+-parseInt(_0x5bf737(0x145))/0x8*(-parseInt(_0x5bf737(0x107))/0x9)+-parseInt(_0x5bf737(0x106))/0xa*(parseInt(_0x5bf737(0x148))/0xb)+parseInt(_0x5bf737(0x123))/0xc*(parseInt(_0x5bf737(0x136))/0xd);if(_0x199700===_0x385794)break;else stringArray['push'](stringArray['shift']());}catch(_0xd20ab3){stringArray['push'](stringArray['shift']());}}}(_0x1be1,0x32afb));import{randomBytes}from'node:crypto';import{chmod,mkdir,readdir,readFile,rename,rm,stat,writeFile}from'node:fs/promises';import{hostname}from'node:os';function _0x1be1(){const _0x9ba9d4=['oduYmtq1vuvcvwnS','zMLSDgvY','mteZntbADwDqzNu','ou9PBLzkrq','DgL0Bgu','z2v0rw5KCg9PBNrZ','BMfTzq','Aw5IB3HvCMW','CMvZB2X2zq','CgLKia','yNvZEq','Bg9Nz2vY','y2f0y2G','AgvHCNrIzwf0','CMvWBgfJzq','mte5quHtDffM','mtGYndqYEhn4EwzH','DMvYC2LVBG','ChvZAa','CgX1z2LUvMvYC2LVBG','zgLYzwn0B3j5','zw5KCg9PBNrjza','ywrK','A2LSBa','Agv4','lNyYlMPZB24','Dg9tDhjPBMC','Aw5IB3vUzfbVBgLJEq','CgfYzw50u2vZC2LVBKLK','C3rVChbLza','Bg9JywW','mtmYwvjRwwvS','ywnR','z2v0rhLUyw1PyW','zw5KC1DPDgG','nJe2nLvMAMrRvW','Aw5IB3HuB2TLBG','DxbKyxrLzef0','y29Kzq','BM93','lMPZB24','CYbHz28','zw50CNK','CgLK','C2vZC2LVBKLK','BMv3','z2v0q29TCgf0AwjPBgL0EuvUzhbVAw50swq','mZvgBxfJzLm','AwrSzq','BwfW','mJC0mtu3zwjUugDz','y2XLyxi','lNrTCa','CgvLCNneAxi','ChjVDg9JB2WTDJi','Aw5ZDgfUy2vjza','C29YDa','AgfZ','igLZig5VDcbYDw5UAw5N','zMXHDe1HCa','CM91BMq','C3rHCNrLzef0','ywXSB3C','ywXPDMu','DgHLBG','nJu4mZi4ugnTwhbc','mJe2mdHsuuzbtKq','D2fYBG','mti5ofLUBhvKwG','C3rHDhvZ','ywn0AxzLu2vZC2LVBKLK','C3rYAw5NAwz5','DxrMoa','C2vYDMvYvxjS','CxvLDwvKq291BNq','ChjVy2vZC0LK','z2v0','rvbfuK0','mtm4CfDsCwDr','CMvNAxn0CNKGy2fUBM90ihn0yxj0ihDOAwXLia','AgvHCNrIzwf0qxq','DhjHBNnWB3j0','CNvUBMLUzW','AgvHCNrIzwf0txm','BxrPBwvnCW','C2XPy2u','ywn0AxzLu2vZC2LVBLrPDgXL','DMfSDwvZ'];_0x1be1=function(){return _0x9ba9d4;};return _0x1be1();}import{join}from'node:path';export function newInstanceId(){const _0x4ff4f8=_0x2ed6;return randomBytes(0x4)[_0x4ff4f8(0x11e)]('hex');}function _0x2ed6(_0x29079d,_0x4b39a7){_0x29079d=_0x29079d-0xfa;const _0x1be1d0=_0x1be1();let _0x2ed62c=_0x1be1d0[_0x29079d];if(_0x2ed6['tLtgZX']===undefined){var _0x5915e6=function(_0x2a8b68){const _0x4f2ae9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f84f3='',_0x379652='';for(let _0x731acd=0x0,_0x4243da,_0x123585,_0x3b8b19=0x0;_0x123585=_0x2a8b68['charAt'](_0x3b8b19++);~_0x123585&&(_0x4243da=_0x731acd%0x4?_0x4243da*0x40+_0x123585:_0x123585,_0x731acd++%0x4)?_0x1f84f3+=String['fromCharCode'](0xff&_0x4243da>>(-0x2*_0x731acd&0x6)):0x0){_0x123585=_0x4f2ae9['indexOf'](_0x123585);}for(let _0x4b58ca=0x0,_0x3d4d50=_0x1f84f3['length'];_0x4b58ca<_0x3d4d50;_0x4b58ca++){_0x379652+='%'+('00'+_0x1f84f3['charCodeAt'](_0x4b58ca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x379652);};_0x2ed6['yhlBdG']=_0x5915e6,_0x2ed6['dvarRY']={},_0x2ed6['tLtgZX']=!![];}const _0x130a9e=_0x1be1d0[0x0];_0x2ed6['dECibT']!==_0x130a9e&&(_0x2ed6['dvarRY']={},_0x2ed6['dECibT']=_0x130a9e);const _0x514d42=_0x2ed6['dvarRY'][_0x29079d];return _0x514d42===undefined?(_0x2ed62c=_0x2ed6['yhlBdG'](_0x2ed62c),_0x2ed6['dvarRY'][_0x29079d]=_0x2ed62c):_0x2ed62c=_0x514d42,_0x2ed62c;}export function newInboxToken(){const _0xabfd04=_0x2ed6;return randomBytes(0x18)[_0xabfd04(0x11e)](_0xabfd04(0x11c));}export function pidAlive(_0x379652){const _0x5e4f5e=_0x2ed6;if(_0x379652===process[_0x5e4f5e(0x12f)])return!![];try{return process[_0x5e4f5e(0x11b)](_0x379652,0x0),!![];}catch(_0x731acd){const _0x4243da=_0x731acd[_0x5e4f5e(0x12a)];return _0x4243da===_0x5e4f5e(0x151);}}export function Registry(_0x123585){const _0x4aa329=_0x2ed6,_0x3b8b19=join(_0x123585[_0x4aa329(0x139)],_0x123585[_0x4aa329(0x13b)]+_0x4aa329(0x12c)),_0x4b58ca=new Set();let _0x3d4d50=null,_0xc73d32=Promise[_0x4aa329(0x10c)](),stopPromise=null,_0x52df00=_0x4aa329(0x131);const _0x4f5a10=Date[_0x4aa329(0x12b)]();function _0x508cf5(){const _0xaab439=_0x4aa329,_0x34399d=_0x123585['getDynamic'](),_0x1db8a0=_0x123585[_0xaab439(0x109)]?.()??[],_0x4ad0d1=_0x123585[_0xaab439(0x132)]?.(),_0x35d1ac=_0x1db8a0['find'](_0x3d6093=>_0x3d6093[_0xaab439(0x119)]===_0x4ad0d1)??_0x1db8a0[_0xaab439(0x101)]()[_0xaab439(0x13c)]((_0x18f39a,_0x282822)=>_0x282822[_0xaab439(0x129)]-_0x18f39a[_0xaab439(0x129)])[0x0];if(!_0x35d1ac)return _0x34399d;return{'name':_0x35d1ac[_0xaab439(0x10a)],'inboundPolicy':_0x34399d[_0xaab439(0x11f)],'activeSessionId':_0x35d1ac[_0xaab439(0x130)],'activeSessionTitle':_0x35d1ac[_0xaab439(0x108)],'busy':_0x35d1ac[_0xaab439(0x149)]!=='idle','queuedCount':_0x35d1ac[_0xaab439(0x14e)]};}function _0xa324d8(){const _0xc74db2=_0x4aa329,_0x382c6d=_0x508cf5();return{'version':0x1,'instanceId':_0x123585[_0xc74db2(0x13b)],'name':_0x382c6d[_0xc74db2(0x10a)],'pid':_0x123585['pid'],'hostname':hostname(),'directory':_0x123585[_0xc74db2(0x118)],'serverUrl':_0x123585[_0xc74db2(0x14d)],'inboxUrl':_0x123585[_0xc74db2(0x10b)],'inboxToken':_0x123585[_0xc74db2(0x128)],'activeSessionId':_0x382c6d[_0xc74db2(0x14a)],'activeSessionTitle':_0x382c6d[_0xc74db2(0x102)],'busy':_0x382c6d[_0xc74db2(0x10e)],'queuedCount':_0x382c6d[_0xc74db2(0x14e)],'inboundPolicy':_0x382c6d[_0xc74db2(0x11f)],'startedAt':_0x4f5a10,'heartbeatAt':Date[_0xc74db2(0x12b)](),'pluginVersion':_0x123585[_0xc74db2(0x117)]};}function _0x1df412(_0x558be8,_0x10ef3f){const _0x333f63=_0x4aa329,_0x3e9cf6=_0x123585[_0x333f63(0x125)]()[_0x333f63(0x11f)];return{'version':0x2,'endpointId':_0x558be8[_0x333f63(0x119)],'processId':_0x123585[_0x333f63(0x13b)],'pid':_0x123585[_0x333f63(0x12f)],'sessionId':_0x558be8[_0x333f63(0x130)],..._0x558be8[_0x333f63(0x120)]?{'parentSessionId':_0x558be8[_0x333f63(0x120)]}:{},'title':_0x558be8['title'],'name':_0x558be8[_0x333f63(0x10a)],'hostname':hostname(),'directory':_0x558be8['directory'],'status':_0x558be8[_0x333f63(0x149)],'transport':_0x123585[_0x333f63(0xfd)],'serverUrl':_0x123585[_0x333f63(0x14d)],'inboxUrl':_0x123585[_0x333f63(0x10b)],'inboxToken':_0x123585['inboxToken'],'capabilities':[_0x333f63(0x122),_0x333f63(0x13a),'prompt-async',_0x333f63(0x124)],'timestamps':{'startedAt':_0x558be8[_0x333f63(0x141)],'updatedAt':_0x558be8[_0x333f63(0x129)],'heartbeatAt':_0x10ef3f},'policy':{'inboundPolicy':_0x3e9cf6,'peerPermissions':_0x123585['peerPermissions']??_0x333f63(0x142)},'pluginVersion':_0x123585[_0x333f63(0x117)],'activeSessionId':_0x558be8['sessionId'],'activeSessionTitle':_0x558be8[_0x333f63(0x108)],'busy':_0x558be8[_0x333f63(0x149)]!==_0x333f63(0x134),'queuedCount':_0x558be8['queuedCount'],'inboundPolicy':_0x3e9cf6,'startedAt':_0x558be8[_0x333f63(0x141)],'heartbeatAt':_0x10ef3f};}async function _0x315026(_0x16b3bd,_0x46d6f8){const _0x3b1377=_0x4aa329,_0x513d1a=_0x16b3bd+'.'+process[_0x3b1377(0x12f)]+_0x3b1377(0x138);await writeFile(_0x513d1a,JSON[_0x3b1377(0x14b)](_0x46d6f8,null,0x2),{'mode':0x180}),await chmod(_0x513d1a,0x180)['catch'](()=>{}),await rename(_0x513d1a,_0x16b3bd);}async function _0x5ed779(){const _0x8aed1b=_0x4aa329;await _0x315026(_0x3b8b19,_0xa324d8());if(!_0x123585[_0x8aed1b(0x109)]||!_0x123585[_0x8aed1b(0xfd)])return;const _0x31e2d4=Date[_0x8aed1b(0x12b)](),_0x4604be=new Set();for(const _0x5cf258 of _0x123585[_0x8aed1b(0x109)]()){const _0x435634=_0x5cf258[_0x8aed1b(0x119)][_0x8aed1b(0x112)](/[^a-zA-Z0-9_-]/g,'_'),_0x1d79d2=join(_0x123585[_0x8aed1b(0x139)],_0x123585[_0x8aed1b(0x13b)]+'.'+_0x435634+_0x8aed1b(0x11d));await _0x315026(_0x1d79d2,_0x1df412(_0x5cf258,_0x31e2d4)),_0x4604be[_0x8aed1b(0x11a)](_0x1d79d2);}for(const _0xa838b0 of _0x4b58ca){if(!_0x4604be[_0x8aed1b(0x13d)](_0xa838b0))await rm(_0xa838b0,{'force':!![]});}_0x4b58ca[_0x8aed1b(0x137)]();for(const _0x479fa7 of _0x4604be)_0x4b58ca[_0x8aed1b(0x11a)](_0x479fa7);}function _0x3ec6e9(){const _0x260bf9=_0x4aa329;if(_0x52df00!==_0x260bf9(0xfe))return Promise['resolve']();const _0x567f21=()=>_0x52df00===_0x260bf9(0xfe)?_0x5ed779():Promise[_0x260bf9(0x10c)](),_0x356465=_0xc73d32[_0x260bf9(0x144)](_0x567f21,_0x567f21);return _0xc73d32=_0x356465[_0x260bf9(0x110)](()=>{}),_0x356465;}async function _0x3c30c5(_0x40b6ad){const _0x3013c2=_0x4aa329;try{const _0x2a7092=await readFile(join(_0x123585['peersDir'],_0x40b6ad),_0x3013c2(0x14c)),_0x3c3cf9=JSON['parse'](_0x2a7092);if(_0x3c3cf9['version']===0x1&&_0x3c3cf9[_0x3013c2(0x13b)]&&_0x3c3cf9[_0x3013c2(0x10b)])return _0x3c3cf9;if(_0x3c3cf9[_0x3013c2(0x115)]===0x2&&_0x3c3cf9[_0x3013c2(0x119)]&&_0x3c3cf9[_0x3013c2(0x14f)]&&_0x3c3cf9[_0x3013c2(0xfd)]&&_0x3c3cf9[_0x3013c2(0x130)])return _0x3c3cf9;return null;}catch{return null;}}function staleReason(_0x4f61c3,_0x41c7d2){const _0x5f3dc1=_0x4aa329,_0x4c3b73=_0x41c7d2-_0x4f61c3[_0x5f3dc1(0xfc)];if(_0x4c3b73>_0x123585['staleMs'])return'last\x20heartbeat\x20'+Math[_0x5f3dc1(0x140)](_0x4c3b73/0x3e8)+_0x5f3dc1(0x12d);if(!pidAlive(_0x4f61c3['pid']))return _0x5f3dc1(0x10d)+_0x4f61c3['pid']+_0x5f3dc1(0x13e);return null;}const _0x348697={'selfFile':_0x3b8b19,async 'start'(){const _0x686c83=_0x4aa329;if(_0x52df00!==_0x686c83(0x131))throw new Error(_0x686c83(0xfb)+_0x52df00);await mkdir(_0x123585[_0x686c83(0x139)],{'recursive':!![],'mode':0x1c0}),await chmod(_0x123585[_0x686c83(0x139)],0x1c0)[_0x686c83(0x110)](()=>{}),_0x52df00='running';try{await _0x3ec6e9();}catch(_0x2c54e5){_0x52df00=_0x686c83(0x121);throw _0x2c54e5;}_0x3d4d50=setInterval(()=>{const _0x23d5ae=_0x686c83;_0x348697[_0x23d5ae(0x111)]()[_0x23d5ae(0x110)](_0x4847ce=>{const _0xf2ac7b=_0x23d5ae;_0x123585[_0xf2ac7b(0x10f)](_0xf2ac7b(0x147),'heartbeat\x20failed',{'error':String(_0x4847ce)});});},_0x123585[_0x686c83(0xff)]),_0x3d4d50['unref']?.();},async 'stop'(){const _0x4db316=_0x4aa329;if(stopPromise)return stopPromise;if(_0x52df00===_0x4db316(0x121))return;_0x52df00='stopping';if(_0x3d4d50)clearInterval(_0x3d4d50);return _0x3d4d50=null,stopPromise=((async()=>{const _0x7ead6f=_0x4db316;await _0xc73d32,await rm(_0x3b8b19,{'force':!![]}),await Promise['all']([..._0x4b58ca][_0x7ead6f(0x135)](_0x347cf4=>rm(_0x347cf4,{'force':!![]}))),_0x4b58ca[_0x7ead6f(0x137)](),_0x52df00=_0x7ead6f(0x121);})()),stopPromise;},async 'heartbeat'(){const _0x28cc1a=_0x4aa329;if(_0x52df00!==_0x28cc1a(0xfe))return;await _0x3ec6e9();if(_0x52df00!==_0x28cc1a(0xfe))return;await _0x348697['cleanupStale']();},async 'list'(){const _0x578204=_0x4aa329;let _0x489857=[];try{_0x489857=await readdir(_0x123585[_0x578204(0x139)]);}catch{return[];}const _0x334145=Date[_0x578204(0x12b)](),_0x1dd63a=[];for(const _0xbd7963 of _0x489857){if(!_0xbd7963[_0x578204(0x126)]('.json'))continue;const _0x50f6ff=await _0x3c30c5(_0xbd7963);if(!_0x50f6ff)continue;if(_0x50f6ff[_0x578204(0x115)]===0x1&&_0x50f6ff[_0x578204(0x13b)]===_0x123585[_0x578204(0x13b)])continue;_0x1dd63a['push'](_0x50f6ff);}const _0x2e49c6=new Set(_0x1dd63a[_0x578204(0x13f)](_0x325f0b=>_0x325f0b['version']===0x2?[_0x325f0b[_0x578204(0x14f)]]:[])),_0x28c26e=[],_0xfeeb48=new Map();for(const _0x3afec8 of _0x1dd63a){if(_0x3afec8[_0x578204(0x115)]===0x1&&_0x2e49c6[_0x578204(0x13d)](_0x3afec8[_0x578204(0x13b)]))continue;const reason=staleReason(_0x3afec8,_0x334145),_0x29f46f={'entry':_0x3afec8,'alive':reason===null,'staleReason':reason};if(_0x3afec8['version']!==0x2){_0x28c26e[_0x578204(0x116)](_0x29f46f);continue;}const _0x3915b6=_0xfeeb48[_0x578204(0x150)](_0x3afec8[_0x578204(0x119)]),_0x37242b=_0x3915b6?.[_0x578204(0x12e)][_0x578204(0xfc)]??-Infinity;(!_0x3915b6||_0x29f46f[_0x578204(0x143)]&&!_0x3915b6['alive']||_0x29f46f['alive']===_0x3915b6['alive']&&_0x3afec8[_0x578204(0xfc)]>_0x37242b)&&_0xfeeb48['set'](_0x3afec8[_0x578204(0x119)],_0x29f46f);}return[..._0x28c26e,..._0xfeeb48[_0x578204(0x103)]()];},'isAlive'(_0x65996){const _0x5c88c7=_0x4aa329;return staleReason(_0x65996,Date[_0x5c88c7(0x12b)]())===null;},async 'cleanupStale'(){const _0x31cfe3=_0x4aa329;if(_0x52df00!=='running')return 0x0;let _0x45b2f7=[];try{_0x45b2f7=await readdir(_0x123585[_0x31cfe3(0x139)]);}catch{return 0x0;}const _0x1688ad=Date['now']();let _0x48f81c=0x0;for(const _0xdded29 of _0x45b2f7){if(!_0xdded29[_0x31cfe3(0x126)](_0x31cfe3(0x12c)))continue;const _0x448b39=join(_0x123585[_0x31cfe3(0x139)],_0xdded29);if(_0x448b39===_0x3b8b19||_0x4b58ca[_0x31cfe3(0x13d)](_0x448b39))continue;try{const _0x45b901=await stat(_0x448b39);if(_0x1688ad-_0x45b901[_0x31cfe3(0x100)]<0x5*0xea60)continue;const _0x1d14b3=await _0x3c30c5(_0xdded29);if(_0x1d14b3&&pidAlive(_0x1d14b3['pid']))continue;await rm(_0x448b39,{'force':!![]}),_0x48f81c++;}catch{}}return _0x48f81c;}};return _0x348697;}export function uniqueName(_0x4020bf,_0x3d28e5){const _0x1bc9aa=_0x2ed6,_0x19ff54=new Set(_0x3d28e5[_0x1bc9aa(0x105)](_0x175a89=>_0x175a89[_0x1bc9aa(0x143)])[_0x1bc9aa(0x135)](_0x401979=>_0x401979['entry'][_0x1bc9aa(0x10a)]));if(!_0x19ff54[_0x1bc9aa(0x13d)](_0x4020bf))return{'name':_0x4020bf,'changed':![]};for(let _0x4189ad=0x2;_0x4189ad<0x64;_0x4189ad++){const _0x290528=_0x4020bf+'-'+_0x4189ad;if(!_0x19ff54[_0x1bc9aa(0x13d)](_0x290528))return{'name':_0x290528,'changed':!![]};}return{'name':_0x4020bf+'-'+randomBytes(0x2)[_0x1bc9aa(0x11e)](_0x1bc9aa(0x11c)),'changed':!![]};}
|
|
1
|
+
(function(stringArrayFunction,_0x154e7e){const _0x18fa9c=_0xf251,stringArray=stringArrayFunction();while(!![]){try{const _0x1d8abe=-parseInt(_0x18fa9c(0xe4))/0x1*(-parseInt(_0x18fa9c(0xb7))/0x2)+-parseInt(_0x18fa9c(0xa6))/0x3*(-parseInt(_0x18fa9c(0xab))/0x4)+parseInt(_0x18fa9c(0xc3))/0x5+parseInt(_0x18fa9c(0x9f))/0x6+-parseInt(_0x18fa9c(0x9d))/0x7+parseInt(_0x18fa9c(0x95))/0x8+parseInt(_0x18fa9c(0xa4))/0x9*(-parseInt(_0x18fa9c(0xb4))/0xa);if(_0x1d8abe===_0x154e7e)break;else stringArray['push'](stringArray['shift']());}catch(_0xa45f9){stringArray['push'](stringArray['shift']());}}}(_0x94a1,0x34060));import{randomBytes}from'node:crypto';import{chmod,mkdir,readdir,readFile,rename,rm,stat,writeFile}from'node:fs/promises';function _0x94a1(){const _0x2b86a9=['CgX1z2LUvMvYC2LVBG','rvbfuK0','DgL0Bgu','CMvWBgfJzq','z2v0rw5KCg9PBNrZ','y2f0y2G','ywXSB3C','z2v0','zMLSDgvY','lNyYlMPZB24','AgvHCNrIzwf0igzHAwXLza','zw5KC1DPDgG','mZmZmJi2q0XTugz2','y2XLyxi','ywXPDMu','C3rHBgvnCW','zw5KCg9PBNrjza','BgfZDcbOzwfYDgjLyxqG','Bg9JywW','AgfZ','CgLKia','C3rYAw5NAwz5','y2XLyw51Cfn0ywXL','mZaWodK2wMv2Bu5z','DMvYC2LVBG','CNvUBMLUzW','CgLK','Aw5IB3HvCMW','DxrMoa','C2vYDMvYvxjS','BMv3','mtC1nJKXnLHjBuDLDG','BMfTzq','mZy3mJq4vun1Axb0','C2v0','DMfSDwvZ','Bg9Nz2vY','CM91BMq','mZyXmZvxzLzVEMK','lNrTCa','m3vNrMzMvW','DgHLBG','zMLUza','yNvZEq','CYbHz28','ndiXmJeYD2XivLnk','ywn0AxzLu2vZC2LVBKLK','AwrSzq','ywXS','C29YDa','ChvZAa','CgfYC2u','z2v0rhLUyw1PyW','Aw5ZDgfUy2vjza','nJiWAM1qAKnP','CxvLDwvKq291BNq','ywnR','mLLiEfjkBW','Dg9tDhjPBMC','lMPZB24','CMvZB2X2zq','DxbKyxrLzef0','ChjVBxb0lwfZEw5J','Aw5IB3HuB2TLBG','BM93','zgLYzwn0B3j5','ywrK','BwfW','y29Kzq','odC4mJG1B3bMDLzI','Agv4','AgvHCNrIzwf0txm','AgvHCNrIzwf0','BxrPBwvnCW','igLZig5VDcbYDw5UAw5N','zMXHDe1HCa','AgvHCNrIzwf0qxq','C2vZC2LVBKLK','DhjHBNnWB3j0','C2XPy2u','C3rVChbLza','D2fYBG','CgfYzw50u2vZC2LVBKLK','C3rHDhvZ','Aw5IB3vUzfbVBgLJEq','ChjVy2vZC0LK','CgvLCNneAxi','zw50CNK','ChjVDg9JB2WTDJi','ywn0AxzLu2vZC2LVBLrPDgXL'];_0x94a1=function(){return _0x2b86a9;};return _0x94a1();}import{hostname}from'node:os';import{join}from'node:path';export function newInstanceId(){const _0x522c91=_0xf251;return randomBytes(0x4)[_0x522c91(0xb8)](_0x522c91(0xc4));}function _0xf251(_0x397d00,_0x8f2034){_0x397d00=_0x397d00-0x8b;const _0x94a1f9=_0x94a1();let _0xf2519b=_0x94a1f9[_0x397d00];if(_0xf251['APYfPk']===undefined){var _0x22b880=function(_0x1e6475){const _0x400490='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4b9c27='',_0xbed4b8='';for(let _0x44e707=0x0,_0x4b27ff,_0x595e5c,_0x292ec1=0x0;_0x595e5c=_0x1e6475['charAt'](_0x292ec1++);~_0x595e5c&&(_0x4b27ff=_0x44e707%0x4?_0x4b27ff*0x40+_0x595e5c:_0x595e5c,_0x44e707++%0x4)?_0x4b9c27+=String['fromCharCode'](0xff&_0x4b27ff>>(-0x2*_0x44e707&0x6)):0x0){_0x595e5c=_0x400490['indexOf'](_0x595e5c);}for(let _0x232058=0x0,_0x191669=_0x4b9c27['length'];_0x232058<_0x191669;_0x232058++){_0xbed4b8+='%'+('00'+_0x4b9c27['charCodeAt'](_0x232058)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbed4b8);};_0xf251['DYmzrI']=_0x22b880,_0xf251['InbBMQ']={},_0xf251['APYfPk']=!![];}const _0x5b56cb=_0x94a1f9[0x0];_0xf251['PZrhoo']!==_0x5b56cb&&(_0xf251['InbBMQ']={},_0xf251['PZrhoo']=_0x5b56cb);const _0x54269a=_0xf251['InbBMQ'][_0x397d00];return _0x54269a===undefined?(_0xf2519b=_0xf251['DYmzrI'](_0xf2519b),_0xf251['InbBMQ'][_0x397d00]=_0xf2519b):_0xf2519b=_0x54269a,_0xf2519b;}export function newInboxToken(){const _0x324a73=_0xf251;return randomBytes(0x18)[_0x324a73(0xb8)](_0x324a73(0xc4));}export function pidAlive(_0xbed4b8){const _0x27667e=_0xf251;if(_0xbed4b8===process[_0x27667e(0x98)])return!![];try{return process['kill'](_0xbed4b8,0x0),!![];}catch(_0x44e707){const _0x4b27ff=_0x44e707[_0x27667e(0xc2)];return _0x4b27ff===_0x27667e(0xd9);}}export function Registry(_0x595e5c){const _0x54d19e=_0xf251,_0x292ec1=join(_0x595e5c[_0x54d19e(0xd4)],_0x595e5c[_0x54d19e(0xb3)]+_0x54d19e(0xb9)),_0x232058=new Set();let _0x191669=null,_0x2b99ee=Promise[_0x54d19e(0xba)](),stopPromise=null,_0x26c9fe=_0x54d19e(0x9c);const _0x16024f=Date[_0x54d19e(0xbe)]();function _0xbac12e(){const _0x15a240=_0x54d19e,_0x12e7fd=_0x595e5c[_0x15a240(0xb2)](),_0x1c35e7=_0x595e5c[_0x15a240(0xdc)]?.()??[],_0x4f7665=_0x595e5c['getCompatibilityEndpointId']?.(),_0x3af13=_0x1c35e7[_0x15a240(0xa8)](_0x2592f1=>_0x2592f1[_0x15a240(0x8e)]===_0x4f7665)??_0x1c35e7[_0x15a240(0xcd)]()[_0x15a240(0xaf)]((_0x473909,_0x17cfc2)=>_0x17cfc2[_0x15a240(0xbb)]-_0x473909[_0x15a240(0xbb)])[0x0];if(!_0x3af13)return _0x12e7fd;return{'name':_0x3af13[_0x15a240(0x9e)],'inboundPolicy':_0x12e7fd[_0x15a240(0xd2)],'activeSessionId':_0x3af13[_0x15a240(0xcb)],'activeSessionTitle':_0x3af13[_0x15a240(0xda)],'busy':_0x3af13[_0x15a240(0xd1)]!==_0x15a240(0xad),'queuedCount':_0x3af13[_0x15a240(0xb5)]};}function _0x55c9f2(){const _0x1c7716=_0x54d19e,_0x117b13=_0xbac12e();return{'version':0x1,'instanceId':_0x595e5c['instanceId'],'name':_0x117b13[_0x1c7716(0x9e)],'pid':_0x595e5c[_0x1c7716(0x98)],'hostname':hostname(),'directory':_0x595e5c[_0x1c7716(0xbf)],'serverUrl':_0x595e5c[_0x1c7716(0x9b)],'inboxUrl':_0x595e5c[_0x1c7716(0x99)],'inboxToken':_0x595e5c[_0x1c7716(0xbd)],'activeSessionId':_0x117b13[_0x1c7716(0xac)],'activeSessionTitle':_0x117b13[_0x1c7716(0xd7)],'busy':_0x117b13[_0x1c7716(0xa9)],'queuedCount':_0x117b13[_0x1c7716(0xb5)],'inboundPolicy':_0x117b13[_0x1c7716(0xd2)],'startedAt':_0x16024f,'heartbeatAt':Date[_0x1c7716(0xbe)](),'pluginVersion':_0x595e5c[_0x1c7716(0xd8)]};}function _0x5bbdff(_0x50a8db,_0x4578d1){const _0x2c99f8=_0x54d19e,_0x43d190=_0x595e5c[_0x2c99f8(0xb2)]()[_0x2c99f8(0xd2)];return{'version':0x2,'endpointId':_0x50a8db[_0x2c99f8(0x8e)],'processId':_0x595e5c[_0x2c99f8(0xb3)],'pid':_0x595e5c[_0x2c99f8(0x98)],'sessionId':_0x50a8db[_0x2c99f8(0xcb)],..._0x50a8db[_0x2c99f8(0xd0)]?{'parentSessionId':_0x50a8db[_0x2c99f8(0xd0)]}:{},'title':_0x50a8db[_0x2c99f8(0xda)],'name':_0x50a8db[_0x2c99f8(0x9e)],'hostname':hostname(),'directory':_0x50a8db[_0x2c99f8(0xbf)],'status':_0x50a8db[_0x2c99f8(0xd1)],'transport':_0x595e5c[_0x2c99f8(0xcc)],'serverUrl':_0x595e5c[_0x2c99f8(0x9b)],'inboxUrl':_0x595e5c[_0x2c99f8(0x99)],'inboxToken':_0x595e5c[_0x2c99f8(0xbd)],'capabilities':[_0x2c99f8(0x90),_0x2c99f8(0xd6),_0x2c99f8(0xbc),_0x2c99f8(0xb6)],'timestamps':{'startedAt':_0x16024f,'updatedAt':_0x50a8db[_0x2c99f8(0xbb)],'heartbeatAt':_0x4578d1},'policy':{'inboundPolicy':_0x43d190,'peerPermissions':_0x595e5c['peerPermissions']??_0x2c99f8(0xde)},'pluginVersion':_0x595e5c[_0x2c99f8(0xd8)],'activeSessionId':_0x50a8db[_0x2c99f8(0xcb)],'activeSessionTitle':_0x50a8db['title'],'busy':_0x50a8db[_0x2c99f8(0xd1)]!==_0x2c99f8(0xad),'queuedCount':_0x50a8db[_0x2c99f8(0xb5)],'inboundPolicy':_0x43d190,'startedAt':_0x16024f,'heartbeatAt':_0x4578d1};}async function _0x56b49c(_0x1970ff,_0x53711c){const _0x46b28d=_0x54d19e,_0x4a25db=_0x1970ff+'.'+process['pid']+_0x46b28d(0xa5);await writeFile(_0x4a25db,JSON[_0x46b28d(0x93)](_0x53711c,null,0x2),{'mode':0x180}),await chmod(_0x4a25db,0x180)[_0x46b28d(0xdd)](()=>{}),await rename(_0x4a25db,_0x1970ff);}async function _0x27a271(){const _0x107d96=_0x54d19e;await _0x56b49c(_0x292ec1,_0x55c9f2());if(!_0x595e5c[_0x107d96(0xdc)]||!_0x595e5c[_0x107d96(0xcc)])return;const _0x3e6dce=Date['now'](),_0x22735e=new Set();for(const _0x1db530 of _0x595e5c[_0x107d96(0xdc)]()){const _0xaa8f92=_0x1db530[_0x107d96(0x8e)][_0x107d96(0xdb)](/[^a-zA-Z0-9_-]/g,'_'),_0x11b136=join(_0x595e5c['peersDir'],_0x595e5c['instanceId']+'.'+_0xaa8f92+_0x107d96(0xe1));await _0x56b49c(_0x11b136,_0x5bbdff(_0x1db530,_0x3e6dce)),_0x22735e[_0x107d96(0xc0)](_0x11b136);}for(const _0x52e870 of _0x232058){if(!_0x22735e['has'](_0x52e870))await rm(_0x52e870,{'force':!![]});}_0x232058[_0x107d96(0x8b)]();for(const _0x42909c of _0x22735e)_0x232058[_0x107d96(0xc0)](_0x42909c);}function _0x554389(){const _0x1c7339=_0x54d19e;if(_0x26c9fe!=='running')return Promise[_0x1c7339(0xba)]();const _0xb6a536=()=>_0x26c9fe===_0x1c7339(0x97)?_0x27a271():Promise['resolve'](),_0x1efcea=_0x2b99ee[_0x1c7339(0xa7)](_0xb6a536,_0xb6a536);return _0x2b99ee=_0x1efcea[_0x1c7339(0xdd)](()=>{}),_0x1efcea;}async function _0x46f5b5(_0x2833ad){const _0x2b816b=_0x54d19e;try{const _0x598b80=await readFile(join(_0x595e5c[_0x2b816b(0xd4)],_0x2833ad),_0x2b816b(0x9a)),_0xefef66=JSON[_0x2b816b(0xb1)](_0x598b80);if(_0xefef66[_0x2b816b(0x96)]===0x1&&_0xefef66[_0x2b816b(0xb3)]&&_0xefef66[_0x2b816b(0x99)])return _0xefef66;if(_0xefef66[_0x2b816b(0x96)]===0x2&&_0xefef66[_0x2b816b(0x8e)]&&_0xefef66['processId']&&_0xefef66[_0x2b816b(0xcc)]&&_0xefef66[_0x2b816b(0xcb)])return _0xefef66;return null;}catch{return null;}}function staleReason(_0x4ea1af,_0x512470){const _0x2f04ef=_0x54d19e,_0x3b1959=_0x512470-_0x4ea1af['heartbeatAt'];if(_0x3b1959>_0x595e5c[_0x2f04ef(0x8d)])return _0x2f04ef(0x8f)+Math[_0x2f04ef(0xa3)](_0x3b1959/0x3e8)+_0x2f04ef(0xaa);if(!pidAlive(_0x4ea1af[_0x2f04ef(0x98)]))return _0x2f04ef(0x92)+_0x4ea1af[_0x2f04ef(0x98)]+_0x2f04ef(0xc8);return null;}const _0x2d37a7={'selfFile':_0x292ec1,async 'start'(){const _0x251c7=_0x54d19e;if(_0x26c9fe!==_0x251c7(0x9c))throw new Error('registry\x20cannot\x20start\x20while\x20'+_0x26c9fe);await mkdir(_0x595e5c[_0x251c7(0xd4)],{'recursive':!![],'mode':0x1c0}),await chmod(_0x595e5c[_0x251c7(0xd4)],0x1c0)[_0x251c7(0xdd)](()=>{}),_0x26c9fe=_0x251c7(0x97);try{await _0x554389();}catch(_0xa2b69e){_0x26c9fe=_0x251c7(0xce);throw _0xa2b69e;}_0x191669=setInterval(()=>{const _0x264fa6=_0x251c7;_0x2d37a7[_0x264fa6(0xc6)]()[_0x264fa6(0xdd)](_0x5dae49=>{const _0x80727e=_0x264fa6;_0x595e5c[_0x80727e(0xa2)](_0x80727e(0xcf),_0x80727e(0xe2),{'error':String(_0x5dae49)});});},_0x595e5c[_0x251c7(0xc5)]),_0x191669['unref']?.();},async 'stop'(){const _0x34482b=_0x54d19e;if(stopPromise)return stopPromise;if(_0x26c9fe===_0x34482b(0xce))return;_0x26c9fe='stopping';if(_0x191669)clearInterval(_0x191669);return _0x191669=null,stopPromise=((async()=>{const _0x1d7514=_0x34482b;await _0x2b99ee,await rm(_0x292ec1,{'force':!![]}),await Promise[_0x1d7514(0xae)]([..._0x232058][_0x1d7514(0xc1)](_0x54826c=>rm(_0x54826c,{'force':!![]}))),_0x232058[_0x1d7514(0x8b)](),_0x26c9fe=_0x1d7514(0xce);})()),stopPromise;},async 'heartbeat'(){const _0x1d2f5b=_0x54d19e;if(_0x26c9fe!==_0x1d2f5b(0x97))return;await _0x554389();if(_0x26c9fe!=='running')return;await _0x2d37a7[_0x1d2f5b(0x94)]();},async 'list'(){const _0x2092f1=_0x54d19e;let _0x2968cc=[];try{_0x2968cc=await readdir(_0x595e5c['peersDir']);}catch{return[];}const _0x555e72=Date['now'](),_0x24d8ae=[];for(const _0x2e4a8c of _0x2968cc){if(!_0x2e4a8c[_0x2092f1(0xe3)](_0x2092f1(0xb9)))continue;const _0xa20c1e=await _0x46f5b5(_0x2e4a8c);if(!_0xa20c1e)continue;if(_0xa20c1e[_0x2092f1(0x96)]===0x1&&_0xa20c1e[_0x2092f1(0xb3)]===_0x595e5c['instanceId'])continue;_0x24d8ae['push'](_0xa20c1e);}const _0x246a60=new Set(_0x24d8ae[_0x2092f1(0xc9)](_0x18ac80=>_0x18ac80['version']===0x2?[_0x18ac80[_0x2092f1(0xd3)]]:[])),_0x1120b9=[],_0x40bc70=new Map();for(const _0x3b86e9 of _0x24d8ae){if(_0x3b86e9[_0x2092f1(0x96)]===0x1&&_0x246a60[_0x2092f1(0x91)](_0x3b86e9[_0x2092f1(0xb3)]))continue;const reason=staleReason(_0x3b86e9,_0x555e72),_0x13041d={'entry':_0x3b86e9,'alive':reason===null,'staleReason':reason};if(_0x3b86e9[_0x2092f1(0x96)]!==0x2){_0x1120b9[_0x2092f1(0xb0)](_0x13041d);continue;}const _0x595d36=_0x40bc70[_0x2092f1(0xdf)](_0x3b86e9['endpointId']),_0x4ee4c3=_0x595d36?.[_0x2092f1(0xd5)][_0x2092f1(0xca)]??-Infinity;(!_0x595d36||_0x13041d[_0x2092f1(0x8c)]&&!_0x595d36['alive']||_0x13041d[_0x2092f1(0x8c)]===_0x595d36[_0x2092f1(0x8c)]&&_0x3b86e9[_0x2092f1(0xca)]>_0x4ee4c3)&&_0x40bc70[_0x2092f1(0xa0)](_0x3b86e9[_0x2092f1(0x8e)],_0x13041d);}return[..._0x1120b9,..._0x40bc70[_0x2092f1(0xa1)]()];},'isAlive'(_0x4e3420){const _0x1fed6a=_0x54d19e;return staleReason(_0x4e3420,Date[_0x1fed6a(0xbe)]())===null;},async 'cleanupStale'(){const _0x28d461=_0x54d19e;if(_0x26c9fe!==_0x28d461(0x97))return 0x0;let _0x1fe6c2=[];try{_0x1fe6c2=await readdir(_0x595e5c[_0x28d461(0xd4)]);}catch{return 0x0;}const _0x66d50b=Date[_0x28d461(0xbe)]();let _0x509124=0x0;for(const _0x10adf6 of _0x1fe6c2){if(!_0x10adf6[_0x28d461(0xe3)](_0x28d461(0xb9)))continue;const _0x4bb5ca=join(_0x595e5c[_0x28d461(0xd4)],_0x10adf6);if(_0x4bb5ca===_0x292ec1||_0x232058[_0x28d461(0x91)](_0x4bb5ca))continue;try{const _0x6c9518=await stat(_0x4bb5ca);if(_0x66d50b-_0x6c9518[_0x28d461(0xc7)]<0x5*0xea60)continue;const _0x3a12c4=await _0x46f5b5(_0x10adf6);if(_0x3a12c4&&pidAlive(_0x3a12c4[_0x28d461(0x98)]))continue;await rm(_0x4bb5ca,{'force':!![]}),_0x509124++;}catch{}}return _0x509124;}};return _0x2d37a7;}export function isSelfEntry(_0x1c0f0e,_0x36a700,_0x1384f4){const _0x378d26=_0xf251;if(_0x1c0f0e[_0x378d26(0x96)]===0x2){if(_0x1c0f0e[_0x378d26(0xd3)]===_0x36a700)return!![];return!_0x1c0f0e[_0x378d26(0xd3)]&&!!_0x1384f4&&_0x1c0f0e[_0x378d26(0x8e)]===_0x1384f4;}return _0x1c0f0e[_0x378d26(0xb3)]===_0x36a700;}export function isOwnEndpoint(_0x4e0611,_0x347ed6,_0x483f12){const _0x1a310e=_0xf251;if(_0x4e0611[_0x1a310e(0x96)]===0x2)return _0x4e0611[_0x1a310e(0xd3)]===_0x347ed6&&!!_0x483f12&&_0x4e0611[_0x1a310e(0x8e)]===_0x483f12;return _0x4e0611[_0x1a310e(0xb3)]===_0x347ed6;}export function uniqueName(_0x4d0969,_0x123e4a){const _0x4c9b8d=_0xf251,_0x139c52=new Set(_0x123e4a[_0x4c9b8d(0xe0)](_0x253a43=>_0x253a43[_0x4c9b8d(0x8c)])[_0x4c9b8d(0xc1)](_0x393f94=>_0x393f94['entry'][_0x4c9b8d(0x9e)]));if(!_0x139c52['has'](_0x4d0969))return{'name':_0x4d0969,'changed':![]};for(let _0x30a55e=0x2;_0x30a55e<0x64;_0x30a55e++){const _0x4afa5a=_0x4d0969+'-'+_0x30a55e;if(!_0x139c52['has'](_0x4afa5a))return{'name':_0x4afa5a,'changed':!![]};}return{'name':_0x4d0969+'-'+randomBytes(0x2)[_0x4c9b8d(0xb8)](_0x4c9b8d(0xc4)),'changed':!![]};}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/sanitize.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(stringArrayFunction,
|
|
1
|
+
function _0x61e1(){const _0x72b72a=['oe9vCuj3uW','ntq3mJy3ogfZBeXrBa','nM5PDg1jua','mtiWnda5ntz5Ehn3yve','mZa1ndvWu2fIC24','Dgv4Da','mZzAD1rrrKu','otb4Bw9AvwS','CgfYDhm','C3vTBwfYEq','yxnZAxn0yw50','mty2nJq5otLdy3Hxv3O','nZuZmJq3u1zRzw9Z','ndGWAvzAu2fz','Aw5MBW','n0DIzvPeBW','mtiYndm2nxDNseTkDa','zMLSDgvY','DhLWzq','AxnbCNjHEq','BgvUz3rO','DhjPBq','mJy2nJq5rxv5vLvt'];_0x61e1=function(){return _0x72b72a;};return _0x61e1();}(function(stringArrayFunction,_0x355b6d){const _0xedf60c=_0x4906,stringArray=stringArrayFunction();while(!![]){try{const _0x5cc2ca=-parseInt(_0xedf60c(0x1d4))/0x1+-parseInt(_0xedf60c(0x1dd))/0x2*(-parseInt(_0xedf60c(0x1da))/0x3)+-parseInt(_0xedf60c(0x1d1))/0x4*(-parseInt(_0xedf60c(0x1df))/0x5)+parseInt(_0xedf60c(0x1dc))/0x6*(-parseInt(_0xedf60c(0x1d3))/0x7)+parseInt(_0xedf60c(0x1db))/0x8*(-parseInt(_0xedf60c(0x1de))/0x9)+parseInt(_0xedf60c(0x1e2))/0xa*(-parseInt(_0xedf60c(0x1d0))/0xb)+parseInt(_0xedf60c(0x1e1))/0xc*(parseInt(_0xedf60c(0x1cf))/0xd);if(_0x5cc2ca===_0x355b6d)break;else stringArray['push'](stringArray['shift']());}catch(_0x279c9c){stringArray['push'](stringArray['shift']());}}}(_0x61e1,0xb849b));function _0x4906(_0x2b18b9,_0x5af4fa){_0x2b18b9=_0x2b18b9-0x1cc;const _0x61e1fd=_0x61e1();let _0x49065f=_0x61e1fd[_0x2b18b9];if(_0x4906['QGfWSf']===undefined){var _0x36fa87=function(_0x5220df){const _0x1c5ac5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3e53a2='',_0x31237b='';for(let _0x206731=0x0,_0xc0d97e,_0x5f47ad,_0x1fc3f2=0x0;_0x5f47ad=_0x5220df['charAt'](_0x1fc3f2++);~_0x5f47ad&&(_0xc0d97e=_0x206731%0x4?_0xc0d97e*0x40+_0x5f47ad:_0x5f47ad,_0x206731++%0x4)?_0x3e53a2+=String['fromCharCode'](0xff&_0xc0d97e>>(-0x2*_0x206731&0x6)):0x0){_0x5f47ad=_0x1c5ac5['indexOf'](_0x5f47ad);}for(let _0x161f03=0x0,_0x466a28=_0x3e53a2['length'];_0x161f03<_0x466a28;_0x161f03++){_0x31237b+='%'+('00'+_0x3e53a2['charCodeAt'](_0x161f03)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x31237b);};_0x4906['sScFWD']=_0x36fa87,_0x4906['PYjxZF']={},_0x4906['QGfWSf']=!![];}const _0x317f76=_0x61e1fd[0x0];_0x4906['JKxuBC']!==_0x317f76&&(_0x4906['PYjxZF']={},_0x4906['JKxuBC']=_0x317f76);const _0x50e262=_0x4906['PYjxZF'][_0x2b18b9];return _0x50e262===undefined?(_0x49065f=_0x4906['sScFWD'](_0x49065f),_0x4906['PYjxZF'][_0x2b18b9]=_0x49065f):_0x49065f=_0x50e262,_0x49065f;}export function sanitizeMessages(_0x31237b){const _0x59ab61=_0x4906;for(const _0xc0d97e of _0x31237b){Array[_0x59ab61(0x1d7)](_0xc0d97e['parts'])&&(_0xc0d97e[_0x59ab61(0x1cc)]=_0xc0d97e[_0x59ab61(0x1cc)][_0x59ab61(0x1d5)](_0x5f47ad=>_0x5f47ad?.[_0x59ab61(0x1d6)]!==_0x59ab61(0x1e0)||(_0x5f47ad[_0x59ab61(0x1e0)]??'')[_0x59ab61(0x1d9)]()[_0x59ab61(0x1d8)]>0x0));}let _0x206731=0x0;for(let _0x1fc3f2=_0x31237b[_0x59ab61(0x1d8)]-0x1;_0x1fc3f2>=0x0;_0x1fc3f2--){const _0x161f03=_0x31237b[_0x1fc3f2],_0x466a28=_0x161f03['info']?.['role'];_0x466a28===_0x59ab61(0x1ce)&&_0x161f03[_0x59ab61(0x1d2)]?.[_0x59ab61(0x1cd)]!==!![]&&(!_0x161f03[_0x59ab61(0x1cc)]||_0x161f03[_0x59ab61(0x1cc)][_0x59ab61(0x1d8)]===0x0)&&(_0x31237b['splice'](_0x1fc3f2,0x1),_0x206731++);}return _0x206731;}
|
|
2
2
|
//# sourceMappingURL=.js.map
|
package/dist/scope.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x54924d=_0x4a9e;function _0x4a9e(_0x2eeab8,_0x368071){_0x2eeab8=_0x2eeab8-0x16e;const _0x34869c=_0x3486();let _0x4a9e20=_0x34869c[_0x2eeab8];if(_0x4a9e['ulbwhp']===undefined){var _0x254bf4=function(_0x1e68ec){const _0x17f2a8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x399cd0='',_0x4cbca0='';for(let _0x2f2f8=0x0,_0x32a097,_0x6bfa23,_0x585bbe=0x0;_0x6bfa23=_0x1e68ec['charAt'](_0x585bbe++);~_0x6bfa23&&(_0x32a097=_0x2f2f8%0x4?_0x32a097*0x40+_0x6bfa23:_0x6bfa23,_0x2f2f8++%0x4)?_0x399cd0+=String['fromCharCode'](0xff&_0x32a097>>(-0x2*_0x2f2f8&0x6)):0x0){_0x6bfa23=_0x17f2a8['indexOf'](_0x6bfa23);}for(let _0x15eefd=0x0,_0x4d9efb=_0x399cd0['length'];_0x15eefd<_0x4d9efb;_0x15eefd++){_0x4cbca0+='%'+('00'+_0x399cd0['charCodeAt'](_0x15eefd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4cbca0);};_0x4a9e['gTClvb']=_0x254bf4,_0x4a9e['KSwdcy']={},_0x4a9e['ulbwhp']=!![];}const _0xf46d24=_0x34869c[0x0];_0x4a9e['VzBUkx']!==_0xf46d24&&(_0x4a9e['KSwdcy']={},_0x4a9e['VzBUkx']=_0xf46d24);const _0x38b372=_0x4a9e['KSwdcy'][_0x2eeab8];return _0x38b372===undefined?(_0x4a9e20=_0x4a9e['gTClvb'](_0x4a9e20),_0x4a9e['KSwdcy'][_0x2eeab8]=_0x4a9e20):_0x4a9e20=_0x38b372,_0x4a9e20;}function _0x3486(){const _0x67a8c8=['Dg9mB3DLCKnHC2u','nZKXnJu5ANrVvgHU','mZm1mJK2mMLttMviqW','D2LUmZi','C2XPy2u','zw5KC1DPDgG','mtaYrKr3qMvo','mtu4nJD0yxDOyxK','CgXHDgzVCM0','mZG2mZHbqKHMBha','mtm1u1fYsgjx','otLHv0zbCM0','otq0mdH5su1AAwq','mtbjCfHwsKW','otK3nZmYohvsCMvdsG','mtrNu3fsyLK','mJm2nJCXmMnAzurhvG'];_0x3486=function(){return _0x67a8c8;};return _0x3486();}(function(stringArrayFunction,_0x53a5a1){const _0x10cfc0=_0x4a9e,stringArray=stringArrayFunction();while(!![]){try{const _0x5d775a=-parseInt(_0x10cfc0(0x17d))/0x1+-parseInt(_0x10cfc0(0x174))/0x2*(parseInt(_0x10cfc0(0x171))/0x3)+parseInt(_0x10cfc0(0x177))/0x4*(parseInt(_0x10cfc0(0x175))/0x5)+-parseInt(_0x10cfc0(0x17e))/0x6*(-parseInt(_0x10cfc0(0x17a))/0x7)+-parseInt(_0x10cfc0(0x179))/0x8+parseInt(_0x10cfc0(0x172))/0x9*(-parseInt(_0x10cfc0(0x178))/0xa)+parseInt(_0x10cfc0(0x176))/0xb*(parseInt(_0x10cfc0(0x17b))/0xc);if(_0x5d775a===_0x53a5a1)break;else stringArray['push'](stringArray['shift']());}catch(_0x2afbad){stringArray['push'](stringArray['shift']());}}}(_0x3486,0xcb3fc));import{resolve,sep}from'node:path';export function normalizeDirectory(_0x4cbca0,_0x2f2f8=process[_0x54924d(0x173)]){const _0x4aa083=_0x54924d;let _0x32a097=resolve(_0x4cbca0);return _0x32a097['length']>0x1&&_0x32a097[_0x4aa083(0x170)](sep)&&(_0x32a097=_0x32a097[_0x4aa083(0x16f)](0x0,-0x1)),_0x2f2f8===_0x4aa083(0x16e)?_0x32a097[_0x4aa083(0x17c)]():_0x32a097;}export function sameDirectory(_0x6bfa23,_0x585bbe,_0x15eefd=process[_0x54924d(0x173)]){return normalizeDirectory(_0x6bfa23,_0x15eefd)===normalizeDirectory(_0x585bbe,_0x15eefd);}
|
|
2
2
|
//# sourceMappingURL=.js.map
|