@brown-ds/distribution 0.2.23 → 0.2.25

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.
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g.js');function gossip(_0x2e8714){const _0x7e53d4={};_0x7e53d4['gid']=_0x2e8714['gid']||'all',_0x7e53d4['subset']=_0x2e8714['subset']||function(_0x20afd8){return Math['ceil'](Math['log'](_0x20afd8['length']));};function _0xd2ee67(_0x5e6e2c,_0x2583fb,_0x260c70){log('[gossip]\x20s'+'end:\x20'+JSON['stringify'](_0x5e6e2c)+'\x20to\x20'+JSON['stringify'](_0x2583fb)),globalThis['distributi'+'on']['local']['groups']['get'](_0x7e53d4['gid'],(_0x40ec02,_0x254654)=>{if(_0x254654===null){_0x260c70(_0x40ec02);return;}const _0x31f282=_0x7e53d4['subset'](Object['keys'](_0x254654)),_0x35c471=function(_0x24343d){const _0x2c0088={};while(Object['keys'](_0x2c0088)['length']<_0x31f282){const _0x416c36=Math['floor'](Math['random']()*_0x24343d['length']);_0x2c0088[_0x24343d[_0x416c36]]=!![];}return _0x2c0088;},_0x58ba0f=_0x35c471(Object['keys'](_0x254654));log('[gossip]\x20g'+'ossipNodes'+':\x20'+JSON['stringify'](Object['keys'](_0x58ba0f))+'\x20length:\x20'+Object['keys'](_0x58ba0f)['length']);const _0xdb8b6d={},_0x257fd6={};let _0xad14ff=0x11fc+0x1419+-0x2615;if(_0x5e6e2c['mid']&&_0x5e6e2c['gid']){}else _0x5e6e2c={'message':_0x5e6e2c,'remote':_0x2583fb,'mid':globalThis['distributi'+'on']['util']['id']['getMID'](_0x5e6e2c),'gid':_0x7e53d4['gid']};for(const _0x4d1cb2 of Object['keys'](_0x58ba0f)){const _0x3c96d0=_0x254654[_0x4d1cb2];log('[gossip]\x20s'+'end\x20to\x20nod'+'e:\x20'+JSON['stringify'](_0x3c96d0));const _0x2257f8={'node':{'ip':_0x3c96d0['ip'],'port':_0x3c96d0['port']},'service':'gossip','method':'recv'};globalThis['distributi'+'on']['local']['comm']['send']([_0x5e6e2c],_0x2257f8,(_0x22d19f,_0x3a5b9a)=>{_0x22d19f?_0x257fd6[_0x4d1cb2]=_0x22d19f:_0xdb8b6d[_0x4d1cb2]=_0x3a5b9a;_0xad14ff+=-0x574+-0x13*0x13f+0x1d22;if(_0xad14ff===_0x31f282){if(_0x260c70)return _0x260c70(_0x257fd6,_0xdb8b6d);}});}});}function _0x2bbb66(_0xd34712,_0x2b936b,_0x5ed2b4){const _0x59e8c4=setInterval(_0x2b936b,_0xd34712);if(_0x5ed2b4)return _0x5ed2b4(null,_0x59e8c4);}function _0x2abdd4(_0x9fd6bc,_0x4d2bc2){clearInterval(_0x9fd6bc);if(_0x4d2bc2)return _0x4d2bc2(null,_0x9fd6bc);}return{'send':_0xd2ee67,'at':_0x2bbb66,'del':_0x2abdd4};}module['exports']=gossip;
9
+ const log=require('../util/lo'+'g.js');function gossip(_0xed951e){const _0x262117={};_0x262117['gid']=_0xed951e['gid']||'all',_0x262117['subset']=_0xed951e['subset']||function(_0x421417){return Math['ceil'](Math['log'](_0x421417['length']));};function _0x45f6a8(_0x3b4d96,_0x361731,_0x35002c){log('[gossip]\x20s'+'end:\x20'+JSON['stringify'](_0x3b4d96)+'\x20to\x20'+JSON['stringify'](_0x361731)),globalThis['distributi'+'on']['local']['groups']['get'](_0x262117['gid'],(_0x1bf167,_0x1c7539)=>{if(_0x1c7539===null){_0x35002c(_0x1bf167);return;}const _0x543e8d=_0x262117['subset'](Object['keys'](_0x1c7539)),_0x3fe720=function(_0x3731f8){const _0x4ead01={};while(Object['keys'](_0x4ead01)['length']<_0x543e8d){const _0x124bd3=Math['floor'](Math['random']()*_0x3731f8['length']);_0x4ead01[_0x3731f8[_0x124bd3]]=!![];}return _0x4ead01;},_0x11ed49=_0x3fe720(Object['keys'](_0x1c7539));log('[gossip]\x20g'+'ossipNodes'+':\x20'+JSON['stringify'](Object['keys'](_0x11ed49))+'\x20length:\x20'+Object['keys'](_0x11ed49)['length']);const _0x275d7f={},_0x35b0f8={};let _0x19a08e=0xc11*0x3+0x1ba6*-0x1+-0xc7*0xb;if(_0x3b4d96['mid']&&_0x3b4d96['gid']){}else _0x3b4d96={'message':_0x3b4d96,'remote':_0x361731,'mid':globalThis['distributi'+'on']['util']['id']['getMID'](_0x3b4d96),'gid':_0x262117['gid']};for(const _0x5b53a1 of Object['keys'](_0x11ed49)){const _0x250d27=_0x1c7539[_0x5b53a1];log('[gossip]\x20s'+'end\x20to\x20nod'+'e:\x20'+JSON['stringify'](_0x250d27));const _0x4a59c1={'node':{'ip':_0x250d27['ip'],'port':_0x250d27['port']},'service':'gossip','method':'recv'};globalThis['distributi'+'on']['local']['comm']['send']([_0x3b4d96],_0x4a59c1,(_0x64cec7,_0x7c8a60)=>{_0x64cec7?_0x35b0f8[_0x5b53a1]=_0x64cec7:_0x275d7f[_0x5b53a1]=_0x7c8a60;_0x19a08e+=0x7ae+-0xfc3*-0x1+0xc*-0x1f4;if(_0x19a08e===_0x543e8d){if(_0x35002c)return _0x35002c(_0x35b0f8,_0x275d7f);}});}});return;return _0x35002c(new Error('gossip.sen'+'d\x20not\x20impl'+'emented'));}function _0xc3c863(_0x4a3ce7,_0x45358e,_0x1d123d){const _0x38d87c=setInterval(_0x45358e,_0x4a3ce7);if(_0x1d123d)return _0x1d123d(null,_0x38d87c);return;return _0x1d123d(new Error('gossip.at\x20'+'not\x20implem'+'ented'));}function _0x59cfa1(_0xbdbec1,_0x1ed85f){clearInterval(_0xbdbec1);if(_0x1ed85f)return _0x1ed85f(null,_0xbdbec1);return;return _0x1ed85f(new Error('gossip.del'+'\x20not\x20imple'+'mented'));}return{'send':_0x45f6a8,'at':_0xc3c863,'del':_0x59cfa1};}module['exports']=gossip;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- function groups(_0x56f623){const _0x1e2557={'gid':_0x56f623['gid']||'all'};function _0x58d492(_0x16d1c7,_0x256730,_0x702a44){globalThis['distributi'+'on'][_0x1e2557['gid']]['comm']['send']([_0x16d1c7,_0x256730],{'service':'groups','method':'put'},_0x702a44);}function _0x217abb(_0x484944,_0x3477a6){globalThis['distributi'+'on'][_0x1e2557['gid']]['comm']['send']([_0x484944],{'service':'groups','method':'del'},_0x3477a6);}function _0x29759b(_0x1a8c92,_0xe15ee){globalThis['distributi'+'on'][_0x1e2557['gid']]['comm']['send']([_0x1a8c92],{'service':'groups','method':'get'},_0xe15ee);}function _0x57983c(_0x4b1b7c,_0x3ad8e7,_0x151be6){globalThis['distributi'+'on'][_0x1e2557['gid']]['comm']['send']([_0x4b1b7c,_0x3ad8e7],{'service':'groups','method':'add'},_0x151be6);}function _0x598c1c(_0x1770db,_0x29cbfe,_0x341c6c){globalThis['distributi'+'on'][_0x1e2557['gid']]['comm']['send']([_0x1770db,_0x29cbfe],{'service':'groups','method':'rem'},_0x341c6c);}return{'put':_0x58d492,'del':_0x217abb,'get':_0x29759b,'add':_0x57983c,'rem':_0x598c1c};}module['exports']=groups;
9
+ function groups(_0x13afa7){const _0x2d32dd={'gid':_0x13afa7['gid']||'all'};function _0x175869(_0x1baf1c,_0x49e936,_0x371df3){globalThis['distributi'+'on'][_0x2d32dd['gid']]['comm']['send']([_0x1baf1c,_0x49e936],{'service':'groups','method':'put'},_0x371df3);return;return _0x371df3(new Error('groups.put'+'\x20not\x20imple'+'mented'));}function _0x2348c5(_0x4b4cf4,_0x3f1660){globalThis['distributi'+'on'][_0x2d32dd['gid']]['comm']['send']([_0x4b4cf4],{'service':'groups','method':'del'},_0x3f1660);return;return _0x3f1660(new Error('groups.del'+'\x20not\x20imple'+'mented'));}function _0x476441(_0x465ba2,_0x2b551e){globalThis['distributi'+'on'][_0x2d32dd['gid']]['comm']['send']([_0x465ba2],{'service':'groups','method':'get'},_0x2b551e);return;return _0x2b551e(new Error('groups.get'+'\x20not\x20imple'+'mented'));}function _0x1cb83f(_0x2c8b39,_0x19947a,_0x7d4d45){globalThis['distributi'+'on'][_0x2d32dd['gid']]['comm']['send']([_0x2c8b39,_0x19947a],{'service':'groups','method':'add'},_0x7d4d45);return;return _0x7d4d45(new Error('groups.add'+'\x20not\x20imple'+'mented'));}function _0x48706(_0x223cb9,_0x5a7d85,_0x30965c){globalThis['distributi'+'on'][_0x2d32dd['gid']]['comm']['send']([_0x223cb9,_0x5a7d85],{'service':'groups','method':'rem'},_0x30965c);return;return _0x30965c(new Error('groups.rem'+'\x20not\x20imple'+'mented'));}return{'put':_0x175869,'del':_0x2348c5,'get':_0x476441,'add':_0x1cb83f,'rem':_0x48706};}module['exports']=groups;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g.js');function normalize(_0x560984,_0x5cacc3){if(_0x560984===null)return{'key':null,'gid':_0x5cacc3,'action':'put'};else return typeof _0x560984==='string'?{'key':_0x560984,'gid':_0x5cacc3,'action':'put'}:_0x560984;}function mem(_0x5840f0){const _0x34312a={};_0x34312a['gid']=_0x5840f0['gid']||'all',_0x34312a['hash']=_0x5840f0['hash']||globalThis['distributi'+'on']['util']['id']['naiveHash'];function _0x2be59e(_0x2039c8,_0x347ba2){log('[all.mem.g'+'et]\x20config'+'uration:\x20'+JSON['stringify'](_0x2039c8)+'\x20context:\x20'+JSON['stringify'](_0x34312a)),_0x2039c8=normalize(_0x2039c8,_0x34312a['gid']),_0x2039c8['gid']=_0x2039c8['gid']||_0x34312a['gid'];const _0x28bf53={'service':'mem','method':'get'},_0x2e7334=[_0x2039c8];if(!_0x2039c8['key']){globalThis['distributi'+'on'][_0x34312a['gid']]['comm']['send'](_0x2e7334,_0x28bf53,(_0x348596,_0x5e2f1f)=>{const _0x127db8=Object['values'](_0x5e2f1f)['reduce']((_0xddd93,_0x17700f)=>_0xddd93['concat'](_0x17700f),[]);_0x347ba2(_0x348596,_0x127db8);});return;}const _0x5015ea=_0x2039c8['key'];if(_0x5015ea===null){_0x347ba2(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x2e7334,_0x28bf53,{'key':_0x5015ea},_0x34312a,_0x347ba2);}function _0x523325(_0x3f107f,_0x323cc5,_0x227bac){log('[all.mem.p'+'ut]\x20state:'+'\x20'+JSON['stringify'](_0x3f107f)+('\x20configura'+'tion:\x20')+JSON['stringify'](_0x323cc5)),_0x323cc5=_0x323cc5||globalThis['distributi'+'on']['util']['id']['getID'](_0x3f107f),_0x323cc5=normalize(_0x323cc5,_0x34312a['gid']),_0x323cc5['gid']=_0x323cc5['gid']||_0x34312a['gid'];const _0x25ae8a={'service':'mem','method':'put'},_0x4e373e=[_0x3f107f,_0x323cc5],_0x336792=_0x323cc5['key'];if(_0x336792===null){_0x227bac(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x4e373e,_0x25ae8a,{'key':_0x336792},_0x34312a,_0x227bac);}function _0x3ba487(_0x5e9fea,_0x272b53){log('[all.mem.d'+'el]\x20config'+'uration:\x20'+JSON['stringify'](_0x5e9fea)),_0x5e9fea=normalize(_0x5e9fea,_0x34312a['gid']),_0x5e9fea['gid']=_0x5e9fea['gid']||_0x34312a['gid'];const _0x3614bd={'service':'mem','method':'del'},_0x65432c=[_0x5e9fea],_0x3b7baf=_0x5e9fea['key'];if(_0x3b7baf===null){_0x272b53(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x65432c,_0x3614bd,{'key':_0x3b7baf},_0x34312a,_0x272b53);}function _0x465dd2(_0x2d4472,_0x12289b){log('[mem.recon'+'f]\x20configu'+'ration:\x20'+JSON['stringify'](_0x2d4472)+'\x20gid:\x20'+_0x34312a['gid']),globalThis['distributi'+'on']['local']['groups']['get'](_0x34312a['gid'],(_0x554c1e,_0x1831bb)=>{if(!_0x1831bb){_0x12289b(_0x554c1e);return;}globalThis['distributi'+'on']['local']['groups']['put'](_0x34312a['gid'],_0x2d4472,(_0x4821fe,_0x44d12c)=>{globalThis['distributi'+'on'][_0x34312a['gid']]['mem']['get'](null,(_0x56ff65,_0x347fde)=>{globalThis['distributi'+'on']['local']['groups']['put'](_0x34312a['gid'],_0x1831bb,(_0x5d891d,_0x5de5f6)=>{globalThis['distributi'+'on'][_0x34312a['gid']]['status']['get']('nid',(_0x3e4d48,_0x33f368)=>{const _0x5069ff=Object['values'](_0x33f368),_0x1122aa=Object['values'](_0x2d4472)['map'](_0x1dd7d4=>globalThis['distributi'+'on']['util']['id']['getNID'](_0x1dd7d4));log('[mem.recon'+'f\x20received'+'\x20'+_0x347fde['length']+('\x20keys\x20from'+'\x20')+_0x33f368['length']+'\x20nodes');let _0x4e8293=-0xa8e*-0x3+0x454+-0x23fe;const _0x3d4b05=()=>{if(_0x4e8293===_0x347fde['length'])return _0x12289b(null);};if(_0x347fde['length']===-0x13*0x27+0x277*-0x2+0x7d3)return _0x12289b(null);for(const _0x222073 of _0x347fde){const _0x194011=globalThis['distributi'+'on']['util']['id']['getID'](_0x222073),_0x10d4c1=_0x34312a['hash'](_0x194011,_0x1122aa),_0x6e7bcd=_0x34312a['hash'](_0x194011,_0x5069ff);log('[mem.recon'+'f]\x20old\x20nid'+':\x20'+_0x10d4c1+'\x20new\x20nid:\x20'+_0x6e7bcd);if(_0x10d4c1===_0x6e7bcd){_0x4e8293++,_0x3d4b05();continue;}const _0x4aecac=_0x2d4472[_0x10d4c1['substring'](-0x7bb*-0x3+-0x7b2+-0xf7f,0x534*-0x6+-0xaab+0x29e8)],_0x514569=[{'key':_0x222073,'gid':_0x34312a['gid']}],_0x50f474={'service':'mem','method':'del','node':_0x4aecac};log('[mem.recon'+'f]\x20deletin'+'g\x20key\x20'+_0x222073+'\x20from\x20'+JSON['stringify'](_0x50f474)),globalThis['distributi'+'on']['local']['comm']['send'](_0x514569,_0x50f474,(_0x3bff3d,_0x38fb08)=>{globalThis['distributi'+'on'][_0x34312a['gid']]['mem']['put'](_0x38fb08,_0x222073,(_0x534572,_0x35f75c)=>{_0x4e8293++,_0x3d4b05();});});}});});});});});}return{'get':_0x2be59e,'put':_0x523325,'del':_0x3ba487,'reconf':_0x465dd2};}module['exports']=mem;
9
+ const log=require('../util/lo'+'g.js');function normalize(_0x13affd,_0x76bd10){if(_0x13affd===null)return{'key':null,'gid':_0x76bd10,'action':'put'};else return typeof _0x13affd==='string'?{'key':_0x13affd,'gid':_0x76bd10,'action':'put'}:_0x13affd;}function mem(_0x1024b5){const _0x4f5929={};_0x4f5929['gid']=_0x1024b5['gid']||'all',_0x4f5929['hash']=_0x1024b5['hash']||globalThis['distributi'+'on']['util']['id']['naiveHash'];function _0x392d50(_0xf82396,_0x435aa6){log('[all.mem.g'+'et]\x20config'+'uration:\x20'+JSON['stringify'](_0xf82396)+'\x20context:\x20'+JSON['stringify'](_0x4f5929)),_0xf82396=normalize(_0xf82396,_0x4f5929['gid']),_0xf82396['gid']=_0xf82396['gid']||_0x4f5929['gid'];const _0x2beeb9={'service':'mem','method':'get'},_0x472a67=[_0xf82396];if(!_0xf82396['key']){globalThis['distributi'+'on'][_0x4f5929['gid']]['comm']['send'](_0x472a67,_0x2beeb9,(_0x4c4b39,_0xcc78f3)=>{const _0x4b25de=Object['values'](_0xcc78f3)['reduce']((_0x31bcd7,_0x4023ad)=>_0x31bcd7['concat'](_0x4023ad),[]);_0x435aa6(_0x4c4b39,_0x4b25de);});return;}const _0x143d73=_0xf82396['key'];if(_0x143d73===null){_0x435aa6(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x472a67,_0x2beeb9,{'key':_0x143d73},_0x4f5929,_0x435aa6);return;return _0x435aa6(new Error('mem.get\x20no'+'t\x20implemen'+'ted'));}function _0x3039da(_0x2ebf20,_0x59fc6d,_0x1ab067){log('[all.mem.p'+'ut]\x20state:'+'\x20'+JSON['stringify'](_0x2ebf20)+('\x20configura'+'tion:\x20')+JSON['stringify'](_0x59fc6d)),_0x59fc6d=_0x59fc6d||globalThis['distributi'+'on']['util']['id']['getID'](_0x2ebf20),_0x59fc6d=normalize(_0x59fc6d,_0x4f5929['gid']),_0x59fc6d['gid']=_0x59fc6d['gid']||_0x4f5929['gid'];const _0x91dcde={'service':'mem','method':'put'},_0x2c698e=[_0x2ebf20,_0x59fc6d],_0x3eb079=_0x59fc6d['key'];if(_0x3eb079===null){_0x1ab067(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x2c698e,_0x91dcde,{'key':_0x3eb079},_0x4f5929,_0x1ab067);return;return _0x1ab067(new Error('mem.put\x20no'+'t\x20implemen'+'ted'));}function _0x551bbe(_0x1ebde5,_0x2cd4b9){log('[all.mem.d'+'el]\x20config'+'uration:\x20'+JSON['stringify'](_0x1ebde5)),_0x1ebde5=normalize(_0x1ebde5,_0x4f5929['gid']),_0x1ebde5['gid']=_0x1ebde5['gid']||_0x4f5929['gid'];const _0x5318ba={'service':'mem','method':'del'},_0x429048=[_0x1ebde5],_0xe59d5a=_0x1ebde5['key'];if(_0xe59d5a===null){_0x2cd4b9(new TypeError('Configurat'+'ion\x20is\x20nul'+'l'));return;}globalThis['distributi'+'on']['util']['wire']['dispatchMe'+'ssage'](_0x429048,_0x5318ba,{'key':_0xe59d5a},_0x4f5929,_0x2cd4b9);return;return _0x2cd4b9(new Error('mem.del\x20no'+'t\x20implemen'+'ted'));}function _0x3b6520(_0x4a2e20,_0x12aca9){log('[mem.recon'+'f]\x20configu'+'ration:\x20'+JSON['stringify'](_0x4a2e20)+'\x20gid:\x20'+_0x4f5929['gid']),globalThis['distributi'+'on']['local']['groups']['get'](_0x4f5929['gid'],(_0x384dc1,_0x2fb2b1)=>{if(!_0x2fb2b1){_0x12aca9(_0x384dc1);return;}globalThis['distributi'+'on']['local']['groups']['put'](_0x4f5929['gid'],_0x4a2e20,(_0x1e18f9,_0x614b96)=>{globalThis['distributi'+'on'][_0x4f5929['gid']]['mem']['get'](null,(_0xd487e9,_0x4887fa)=>{globalThis['distributi'+'on']['local']['groups']['put'](_0x4f5929['gid'],_0x2fb2b1,(_0x35b12a,_0x55d9ff)=>{globalThis['distributi'+'on'][_0x4f5929['gid']]['status']['get']('nid',(_0x54a0e1,_0x116ebb)=>{const _0x37158c=Object['values'](_0x116ebb),_0x5bb94d=Object['values'](_0x4a2e20)['map'](_0x2024f8=>globalThis['distributi'+'on']['util']['id']['getNID'](_0x2024f8));log('[mem.recon'+'f\x20received'+'\x20'+_0x4887fa['length']+('\x20keys\x20from'+'\x20')+_0x116ebb['length']+'\x20nodes');let _0x34e63f=0x1511+-0x1fb0+0xa9f;const _0x1636ec=()=>{if(_0x34e63f===_0x4887fa['length'])return _0x12aca9(null);};if(_0x4887fa['length']===0x1292+0x17c+-0x140e)return _0x12aca9(null);for(const _0x16b1d3 of _0x4887fa){const _0x5c23ce=globalThis['distributi'+'on']['util']['id']['getID'](_0x16b1d3),_0x25777d=_0x4f5929['hash'](_0x5c23ce,_0x5bb94d),_0x43d56e=_0x4f5929['hash'](_0x5c23ce,_0x37158c);log('[mem.recon'+'f]\x20old\x20nid'+':\x20'+_0x25777d+'\x20new\x20nid:\x20'+_0x43d56e);if(_0x25777d===_0x43d56e){_0x34e63f++,_0x1636ec();continue;}const _0x3774b9=_0x4a2e20[_0x25777d['substring'](0x17b*-0x11+0x1682+0x2a9*0x1,-0x5db*0x3+-0x23+0xd*0x15d)],_0x1c033e=[{'key':_0x16b1d3,'gid':_0x4f5929['gid']}],_0x56647e={'service':'mem','method':'del','node':_0x3774b9};log('[mem.recon'+'f]\x20deletin'+'g\x20key\x20'+_0x16b1d3+'\x20from\x20'+JSON['stringify'](_0x56647e)),globalThis['distributi'+'on']['local']['comm']['send'](_0x1c033e,_0x56647e,(_0x5a6b59,_0x4742a3)=>{globalThis['distributi'+'on'][_0x4f5929['gid']]['mem']['put'](_0x4742a3,_0x16b1d3,(_0x508f81,_0x29859e)=>{_0x34e63f++,_0x1636ec();});});}});});});});});return;return _0x12aca9(new Error('mem.reconf'+'\x20not\x20imple'+'mented'));}return{'get':_0x392d50,'put':_0x3039da,'del':_0x551bbe,'reconf':_0x3b6520};}module['exports']=mem;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const distribution=globalThis['distributi'+'on'],id=distribution['util']['id'];function mr(_0xf4cbb9){const _0x707940={'gid':_0xf4cbb9['gid']||'all'};function _0x270ccb(_0x2ad961,_0x56453d){const _0x2358ea=id['getID'](_0x2ad961),_0x302c1f={'mapper':_0x2ad961['map'],'reducer':_0x2ad961['reduce'],'map':function(_0x2c273e,_0x4724c8,_0x15a73e,_0x109504){if(_0x2c273e['length']==0x185b+0xd99+-0x1*0x25f4){_0x109504(null,[]);return;}else{const _0x1df933=[];let _0xef08f0=-0x1*-0x14bf+0x15a6+-0x2a65;_0x2c273e['forEach'](_0x5c82d2=>{globalThis['distributi'+'on'][_0x4724c8]['store']['get'](_0x5c82d2,(_0x344efc,_0x527f89)=>{_0xef08f0++;const _0xe5371e=this['mapper'](_0x5c82d2,_0x527f89);Array['isArray'](_0xe5371e)?_0x1df933['push'](..._0xe5371e):_0x1df933['push'](_0xe5371e),_0xef08f0==_0x2c273e['length']&&distribution['local']['store']['put'](_0x1df933,_0x15a73e+'_map',(_0x1d3f23,_0x2ef5a7)=>{_0x109504(_0x1d3f23,_0x1df933);});});});}},'shuffle':function(_0x52b2b6,_0x30e894,_0x52ec8f){distribution['local']['store']['get'](_0x30e894+'_map',(_0x5bfdcd,_0x1c98c7)=>{if(!_0x5bfdcd){let _0xfa8489=-0x2472*-0x1+0x25c+0x1367*-0x2;_0x1c98c7['forEach'](_0xd51477=>{const [_0x336acc]=Object['keys'](_0xd51477);distribution[_0x52b2b6]['mem']['put'](_0xd51477[_0x336acc],{'key':_0x336acc,'action':'append','gid':_0x52b2b6},(_0x4073b0,_0x159ae0)=>{_0xfa8489++;if(_0xfa8489==_0x1c98c7['length'])return _0x52ec8f(null,_0x1c98c7);});});}else return _0x52ec8f(_0x5bfdcd,{});});},'reduce':function(_0x49655b,_0x34b3ac,_0x3d0b83){distribution['local']['mem']['get']({'key':null,'gid':_0x49655b},(_0x429ace,_0x532376)=>{let _0x20d7dd=[],_0xce52=0x206b*0x1+-0x15c+-0x1f0f;if(_0x532376['length']==-0xc9c+0x1*-0x1107+0x1da3)return _0x3d0b83(null,null);_0x532376['forEach'](_0x269e79=>distribution['local']['mem']['get']({'key':_0x269e79,'gid':_0x49655b},(_0x44780d,_0x2f72cc)=>{const _0x1e3f1f=this['reducer'](_0x269e79,_0x2f72cc);_0x20d7dd=_0x20d7dd['concat'](_0x1e3f1f),_0xce52++;if(_0xce52==_0x532376['length'])return _0x3d0b83(null,_0x20d7dd);}));});}},_0x375723=function(_0x18ac26,_0x228163){const _0x57b67c={};return Object['keys'](_0x228163)['forEach'](_0x37e364=>{_0x57b67c[_0x37e364]=[];}),_0x18ac26['forEach'](_0x278e6c=>{const _0x483b40=id['getID'](_0x278e6c),_0x233b95=id['naiveHash'](_0x483b40,Object['keys'](_0x228163));_0x57b67c[_0x233b95]['push'](_0x278e6c);}),_0x57b67c;};distribution[_0x707940['gid']]['routes']['put'](_0x302c1f,'mr-'+_0x2358ea,(_0x48d608,_0xf9afc9)=>{distribution['local']['groups']['get'](_0x707940['gid'],(_0x283c57,_0x31d1ce)=>{if(!_0x31d1ce){_0x56453d(_0x283c57);return;}const _0x88a35e=_0x375723(_0x2ad961['keys'],_0x31d1ce);let _0x25a06e=-0xeaa+-0x24cb+0x3375*0x1;const _0xdd60e1=Object['keys'](_0x31d1ce)['length'],_0x99ab6e={'service':'mr-'+_0x2358ea,'method':'map'};for(const _0xf9a29e in _0x31d1ce){const _0x58617b=[_0x88a35e[_0xf9a29e],_0x707940['gid'],_0x2358ea];distribution['local']['comm']['send'](_0x58617b,{'node':_0x31d1ce[_0xf9a29e],..._0x99ab6e},(_0xb945ed,_0x4124a2)=>{++_0x25a06e;if(_0x25a06e==_0xdd60e1){const _0x5620b6={'service':'mr-'+_0x2358ea,'method':'shuffle'};distribution[_0x707940['gid']]['comm']['send']([_0x707940['gid'],_0x2358ea],_0x5620b6,(_0x3c6981,_0x546c28)=>{const _0xe0f533={'service':'mr-'+_0x2358ea,'method':'reduce'};distribution[_0x707940['gid']]['comm']['send']([_0x707940['gid'],_0x2358ea],_0xe0f533,(_0x2fd6f4,_0x15805c)=>{let _0x1b85c8=[];for(const _0x247847 of Object['values'](_0x15805c)){_0x247847!==null&&(_0x1b85c8=_0x1b85c8['concat'](_0x247847));}_0x56453d(null,_0x1b85c8);return;});});}});}});});}return{'exec':_0x270ccb};}module['exports']=mr;
9
+ const distribution=globalThis['distributi'+'on'],id=distribution['util']['id'];function mr(_0x53fdf5){const _0x2e073b={'gid':_0x53fdf5['gid']||'all'};function _0x375dd2(_0x30fe58,_0x7c6412){const _0x473fd1=id['getID'](_0x30fe58),_0x206bce={'mapper':_0x30fe58['map'],'reducer':_0x30fe58['reduce'],'map':function(_0x3eb462,_0x1415c3,_0x353967,_0x1c23bc){if(_0x3eb462['length']==0x2*-0x9a7+0x24c7*-0x1+0x3815){_0x1c23bc(null,[]);return;}else{const _0x1a43f3=[];let _0xea1278=0x2683+0x121f*0x1+-0x38a2;_0x3eb462['forEach'](_0x3f391b=>{globalThis['distributi'+'on'][_0x1415c3]['store']['get'](_0x3f391b,(_0x50f109,_0x3e0495)=>{_0xea1278++;const _0x487f72=this['mapper'](_0x3f391b,_0x3e0495);Array['isArray'](_0x487f72)?_0x1a43f3['push'](..._0x487f72):_0x1a43f3['push'](_0x487f72),_0xea1278==_0x3eb462['length']&&distribution['local']['store']['put'](_0x1a43f3,_0x353967+'_map',(_0x4f0612,_0x408d9e)=>{_0x1c23bc(_0x4f0612,_0x1a43f3);});});});}},'shuffle':function(_0x5ece1e,_0x5a807d,_0x2c21ec){distribution['local']['store']['get'](_0x5a807d+'_map',(_0x114763,_0x48df1d)=>{if(!_0x114763){let _0x3b9810=0x19d+-0x5*-0x665+-0x599*0x6;_0x48df1d['forEach'](_0x46ed8a=>{const [_0x37e90a]=Object['keys'](_0x46ed8a);distribution[_0x5ece1e]['mem']['put'](_0x46ed8a[_0x37e90a],{'key':_0x37e90a,'action':'append','gid':_0x5ece1e},(_0x90ca69,_0x381c37)=>{_0x3b9810++;if(_0x3b9810==_0x48df1d['length'])return _0x2c21ec(null,_0x48df1d);});});}else return _0x2c21ec(_0x114763,{});});},'reduce':function(_0x182b15,_0x335121,_0x276198){distribution['local']['mem']['get']({'key':null,'gid':_0x182b15},(_0xb17b97,_0x2241f2)=>{let _0x2318d2=[],_0x201040=-0x1*-0x6a2+-0xb6*-0x3+-0xc*0xbb;if(_0x2241f2['length']==0xcd9+0xecf*0x1+-0x1ba8)return _0x276198(null,null);_0x2241f2['forEach'](_0x1b9a85=>distribution['local']['mem']['get']({'key':_0x1b9a85,'gid':_0x182b15},(_0x596ee6,_0x5b2ed0)=>{const _0xa81146=this['reducer'](_0x1b9a85,_0x5b2ed0);_0x2318d2=_0x2318d2['concat'](_0xa81146),_0x201040++;if(_0x201040==_0x2241f2['length'])return _0x276198(null,_0x2318d2);}));});}},_0x27b4a0=function(_0x567508,_0x4cc380){const _0x25d09a={};return Object['keys'](_0x4cc380)['forEach'](_0xd9cab7=>{_0x25d09a[_0xd9cab7]=[];}),_0x567508['forEach'](_0x53bf95=>{const _0xdc1fea=id['getID'](_0x53bf95),_0x3c31aa=id['naiveHash'](_0xdc1fea,Object['keys'](_0x4cc380));_0x25d09a[_0x3c31aa]['push'](_0x53bf95);}),_0x25d09a;};distribution[_0x2e073b['gid']]['routes']['put'](_0x206bce,'mr-'+_0x473fd1,(_0x228736,_0x84eff2)=>{distribution['local']['groups']['get'](_0x2e073b['gid'],(_0x2f9687,_0x50a215)=>{if(!_0x50a215){_0x7c6412(_0x2f9687);return;}const _0x1ea321=_0x27b4a0(_0x30fe58['keys'],_0x50a215);let _0x843e6a=0xc8c+-0xe*-0x14+-0xda4;const _0x13e409=Object['keys'](_0x50a215)['length'],_0x411548={'service':'mr-'+_0x473fd1,'method':'map'};for(const _0x537e81 in _0x50a215){const _0x4193bb=[_0x1ea321[_0x537e81],_0x2e073b['gid'],_0x473fd1];distribution['local']['comm']['send'](_0x4193bb,{'node':_0x50a215[_0x537e81],..._0x411548},(_0x12bf09,_0x2d9be3)=>{++_0x843e6a;if(_0x843e6a==_0x13e409){const _0x56f58c={'service':'mr-'+_0x473fd1,'method':'shuffle'};distribution[_0x2e073b['gid']]['comm']['send']([_0x2e073b['gid'],_0x473fd1],_0x56f58c,(_0x20c2dc,_0x2b7b57)=>{const _0x3cc6ef={'service':'mr-'+_0x473fd1,'method':'reduce'};distribution[_0x2e073b['gid']]['comm']['send']([_0x2e073b['gid'],_0x473fd1],_0x3cc6ef,(_0x5b4cd1,_0x4772d8)=>{let _0x195e5a=[];for(const _0x2bf2eb of Object['values'](_0x4772d8)){_0x2bf2eb!==null&&(_0x195e5a=_0x195e5a['concat'](_0x2bf2eb));}_0x7c6412(null,_0x195e5a);return;});});}});}});});return;return _0x7c6412(new Error('mr.exec\x20no'+'t\x20implemen'+'ted'));}return{'exec':_0x375dd2};}module['exports']=mr;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- function routes(_0x513848){const _0x4603d3={};_0x4603d3['gid']=_0x513848['gid']||'all';function _0x2afdbd(_0x109390,_0x50e101,_0x45a542){globalThis['distributi'+'on'][_0x4603d3['gid']]['comm']['send']([_0x109390,_0x50e101],{'service':'routes','method':'put'},_0x45a542);}function _0x22234e(_0x5744d0,_0xc676ed){globalThis['distributi'+'on'][_0x4603d3['gid']]['comm']['send']([_0x5744d0],{'service':'routes','method':'rem'},_0xc676ed);}return{'put':_0x2afdbd,'rem':_0x22234e};}module['exports']=routes;
9
+ function routes(_0xd22c){const _0x2fce7e={};_0x2fce7e['gid']=_0xd22c['gid']||'all';function _0x2a4c53(_0x4bb287,_0x4c200e,_0x68c2e2){globalThis['distributi'+'on'][_0x2fce7e['gid']]['comm']['send']([_0x4bb287,_0x4c200e],{'service':'routes','method':'put'},_0x68c2e2);return;return _0x68c2e2(new Error('routes.put'+'\x20not\x20imple'+'mented'));}function _0x81ab89(_0xd0a584,_0x3bcf62){globalThis['distributi'+'on'][_0x2fce7e['gid']]['comm']['send']([_0xd0a584],{'service':'routes','method':'rem'},_0x3bcf62);return;return _0x3bcf62(new Error('routes.rem'+'\x20not\x20imple'+'mented'));}return{'put':_0x2a4c53,'rem':_0x81ab89};}module['exports']=routes;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g.js');function getNode(_0x45a080,_0x4b8540,_0x679cda){const _0x59d3db=_0x4b8540&&typeof _0x4b8540==='object'?_0x4b8540['key']:_0x4b8540;globalThis['distributi'+'on'][_0x45a080['gid']]['status']['get']('nid',(_0x14eec2,_0x2061c3)=>{const _0x5eee70=Object['values'](_0x2061c3),_0x14e92a=globalThis['distributi'+'on']['util']['id']['getID'](_0x59d3db),_0x1c4735=_0x45a080['hash'](_0x14e92a,_0x5eee70),_0x3effa9=_0x1c4735['substring'](-0xe7e+-0x1a3c+0x28ba,0x4a3*0x4+0x1*-0x4f3+-0xd94);globalThis['distributi'+'on']['local']['groups']['get'](_0x45a080['gid'],(_0x514532,_0x5e180c)=>{if(!_0x5e180c)return _0x679cda(_0x514532);else{const _0x2794e1=_0x5e180c[_0x3effa9];return log('[store\x20(ge'+'tNode)]\x20co'+'nfiguratio'+'n:\x20'+JSON['stringify'](_0x4b8540)+'group:\x20'+JSON['stringify'](_0x5e180c)+'\x20node:\x20'+JSON['stringify'](_0x2794e1)+'nid:\x20'+JSON['stringify'](_0x1c4735)+'\x20sid:\x20'+JSON['stringify'](_0x3effa9)),_0x679cda(null,_0x2794e1);}});});}function normalize(_0x2d26dc,_0x23b192){if(_0x2d26dc===null)return{'key':null,'gid':_0x23b192,'action':'put'};else return typeof _0x2d26dc==='string'?{'key':_0x2d26dc,'gid':_0x23b192,'action':'put'}:_0x2d26dc;}function store(_0x2a6966){const _0x13beb6={'gid':_0x2a6966['gid']||'all','hash':_0x2a6966['hash']||globalThis['distributi'+'on']['util']['id']['naiveHash'],'subset':_0x2a6966['subset']};function _0xa7d797(_0x29d2cc,_0x2ac71c){if(!_0x29d2cc){const _0x2d2e8f=[{'key':null,'gid':_0x13beb6['gid']}];globalThis['distributi'+'on'][_0x13beb6['gid']]['comm']['send'](_0x2d2e8f,{'service':'store','method':'get'},(_0x2948b2,_0x2f9d59)=>{const _0x5b44bc=Object['values'](_0x2f9d59)['reduce']((_0x50bde0,_0x13f996)=>_0x50bde0['concat'](_0x13f996),[]);_0x2ac71c(_0x2948b2,_0x5b44bc);});return;}_0x29d2cc=normalize(_0x29d2cc,_0x13beb6['gid']),getNode(_0x13beb6,_0x29d2cc,(_0x5f08f7,_0x2f16f5)=>{if(!_0x2f16f5){_0x2ac71c(_0x5f08f7);return;}const _0x1897fe=[_0x29d2cc],_0x1b1e30={'service':'store','method':'get','node':_0x2f16f5};log('[all.store'+'.get]confi'+'guration:\x20'+JSON['stringify'](_0x29d2cc)+'node:\x20'+JSON['stringify'](globalThis['distributi'+'on']['node']['config'])+('\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x2f16f5)),globalThis['distributi'+'on']['local']['comm']['send'](_0x1897fe,_0x1b1e30,_0x2ac71c);});}function _0x41f07b(_0x59a77e,_0xc4037a,_0x413b5d){_0xc4037a=_0xc4037a||globalThis['distributi'+'on']['util']['id']['getID'](_0x59a77e),_0xc4037a=normalize(_0xc4037a,_0x13beb6['gid']),getNode(_0x13beb6,_0xc4037a,(_0x4a3677,_0x38a38b)=>{if(!_0x38a38b){_0x413b5d(_0x4a3677);return;}const _0x236507=[_0x59a77e,_0xc4037a],_0xd3748f={'service':'store','method':'put','node':_0x38a38b};log('[all.store'+'.put]\x20stat'+'e:\x20'+JSON['stringify'](_0x59a77e)+('configurat'+'ion:\x20')+JSON['stringify'](_0xc4037a)+('target\x20nod'+'e:\x20')+JSON['stringify'](_0x38a38b)),globalThis['distributi'+'on']['local']['comm']['send'](_0x236507,_0xd3748f,_0x413b5d);});}function _0x5d86ab(_0x81cc33,_0x49d6b4){getNode(_0x13beb6,_0x81cc33,(_0x195a8d,_0x509531)=>{if(!_0x509531){_0x49d6b4(_0x195a8d);return;}const _0x1bb2dd=[{'key':_0x81cc33,'gid':_0x13beb6['gid']}],_0x4302f2={'service':'store','method':'del','node':_0x509531};globalThis['distributi'+'on']['local']['comm']['send'](_0x1bb2dd,_0x4302f2,_0x49d6b4);});}function _0x41570a(_0x13a663,_0x573112){log('[store.rec'+'onf]\x20confi'+'guration:\x20'+JSON['stringify'](_0x13a663)+'\x20gid:\x20'+_0x13beb6['gid']),globalThis['distributi'+'on']['local']['groups']['get'](_0x13beb6['gid'],(_0x5528cf,_0x43cd94)=>{if(!_0x43cd94){_0x573112(_0x5528cf);return;}globalThis['distributi'+'on']['local']['groups']['put'](_0x13beb6['gid'],_0x13a663,(_0x3b433a,_0x4aded7)=>{globalThis['distributi'+'on'][_0x13beb6['gid']]['store']['get'](null,(_0x5883a8,_0x56e84b)=>{globalThis['distributi'+'on']['local']['groups']['put'](_0x13beb6['gid'],_0x43cd94,(_0x4b0b93,_0x9a8c93)=>{globalThis['distributi'+'on'][_0x13beb6['gid']]['status']['get']('nid',(_0x31db8f,_0x4220de)=>{const _0xd024de=Object['values'](_0x4220de),_0x3a9de0=Object['values'](_0x13a663)['map'](_0x21d93e=>globalThis['distributi'+'on']['util']['id']['getNID'](_0x21d93e));log('[store.rec'+'onf\x20receiv'+'ed\x20'+_0x56e84b['length']+('\x20keys\x20from'+'\x20')+_0x4220de['length']+'\x20nodes');let _0x3730c1=-0x164d+-0x9f5+-0x2*-0x1021;const _0x562304=()=>{if(_0x3730c1===_0x56e84b['length'])return _0x573112(null);};if(_0x56e84b['length']===0x2659*0x1+0x2*0x9e7+-0x1*0x3a27)return _0x573112(null);for(const _0x2a2454 of _0x56e84b){const _0x5cf915=globalThis['distributi'+'on']['util']['id']['getID'](_0x2a2454),_0x1ee6e2=_0x13beb6['hash'](_0x5cf915,_0x3a9de0),_0x1100c6=_0x13beb6['hash'](_0x5cf915,_0xd024de);log('[store.rec'+'onf]\x20old\x20n'+'id:\x20'+_0x1ee6e2+'\x20new\x20nid:\x20'+_0x1100c6);if(_0x1ee6e2===_0x1100c6){_0x3730c1++,_0x562304();continue;}const _0x14c6ac=_0x13a663[_0x1ee6e2['substring'](0x8ef*-0x2+-0x449+-0x1627*-0x1,-0x2384+-0x1*0x43e+0x27c7)],_0x4457c7=[{'key':_0x2a2454,'gid':_0x13beb6['gid']}],_0xf232d1={'service':'store','method':'del','node':_0x14c6ac};log('[store.rec'+'onf]\x20delet'+'ing\x20key\x20'+_0x2a2454+'\x20from\x20'+JSON['stringify'](_0xf232d1)),globalThis['distributi'+'on']['local']['comm']['send'](_0x4457c7,_0xf232d1,(_0x916e59,_0x5432db)=>{globalThis['distributi'+'on'][_0x13beb6['gid']]['store']['put'](_0x5432db,_0x2a2454,(_0x316148,_0x14d5d5)=>{_0x3730c1++,_0x562304();});});}});});});});});}return{'get':_0xa7d797,'put':_0x41f07b,'del':_0x5d86ab,'reconf':_0x41570a};}module['exports']=store;
9
+ const log=require('../util/lo'+'g.js');function getNode(_0x1de661,_0x24d5f0,_0x28af9d){const _0x15363d=_0x24d5f0&&typeof _0x24d5f0==='object'?_0x24d5f0['key']:_0x24d5f0;globalThis['distributi'+'on'][_0x1de661['gid']]['status']['get']('nid',(_0x3dd193,_0x1b7cfb)=>{const _0x285dc5=Object['values'](_0x1b7cfb),_0x453505=globalThis['distributi'+'on']['util']['id']['getID'](_0x15363d),_0x1d2a3f=_0x1de661['hash'](_0x453505,_0x285dc5),_0x1a412c=_0x1d2a3f['substring'](0x46*-0xe+-0xa*-0xc4+-0x3d4,-0x1ef7+-0x1fd5+-0x3ed1*-0x1);globalThis['distributi'+'on']['local']['groups']['get'](_0x1de661['gid'],(_0x187315,_0x580f04)=>{if(!_0x580f04)return _0x28af9d(_0x187315);else{const _0x5e76ae=_0x580f04[_0x1a412c];return log('[store\x20(ge'+'tNode)]\x20co'+'nfiguratio'+'n:\x20'+JSON['stringify'](_0x24d5f0)+'group:\x20'+JSON['stringify'](_0x580f04)+'\x20node:\x20'+JSON['stringify'](_0x5e76ae)+'nid:\x20'+JSON['stringify'](_0x1d2a3f)+'\x20sid:\x20'+JSON['stringify'](_0x1a412c)),_0x28af9d(null,_0x5e76ae);}});});}function normalize(_0x163895,_0x3c4f62){if(_0x163895===null)return{'key':null,'gid':_0x3c4f62,'action':'put'};else return typeof _0x163895==='string'?{'key':_0x163895,'gid':_0x3c4f62,'action':'put'}:_0x163895;}function store(_0x167984){const _0x16f33e={'gid':_0x167984['gid']||'all','hash':_0x167984['hash']||globalThis['distributi'+'on']['util']['id']['naiveHash'],'subset':_0x167984['subset']};function _0x10eab0(_0x2ef6b7,_0x38ef93){if(!_0x2ef6b7){const _0x17ea1c=[{'key':null,'gid':_0x16f33e['gid']}];globalThis['distributi'+'on'][_0x16f33e['gid']]['comm']['send'](_0x17ea1c,{'service':'store','method':'get'},(_0x4a2e4d,_0x178482)=>{const _0x29f2dc=Object['values'](_0x178482)['reduce']((_0x24e18b,_0x2b1ab4)=>_0x24e18b['concat'](_0x2b1ab4),[]);_0x38ef93(_0x4a2e4d,_0x29f2dc);});return;}_0x2ef6b7=normalize(_0x2ef6b7,_0x16f33e['gid']),getNode(_0x16f33e,_0x2ef6b7,(_0x2fa49e,_0x175203)=>{if(!_0x175203){_0x38ef93(_0x2fa49e);return;}const _0x307ff0=[_0x2ef6b7],_0x39c751={'service':'store','method':'get','node':_0x175203};log('[all.store'+'.get]confi'+'guration:\x20'+JSON['stringify'](_0x2ef6b7)+'node:\x20'+JSON['stringify'](globalThis['distributi'+'on']['node']['config'])+('\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x175203)),globalThis['distributi'+'on']['local']['comm']['send'](_0x307ff0,_0x39c751,_0x38ef93);});return;return _0x38ef93(new Error('store.get\x20'+'not\x20implem'+'ented'));}function _0xb8a2c2(_0x46c1d8,_0x3db568,_0x2fc7d4){_0x3db568=_0x3db568||globalThis['distributi'+'on']['util']['id']['getID'](_0x46c1d8),_0x3db568=normalize(_0x3db568,_0x16f33e['gid']),getNode(_0x16f33e,_0x3db568,(_0x57a329,_0x4cfaf5)=>{if(!_0x4cfaf5){_0x2fc7d4(_0x57a329);return;}const _0x36a221=[_0x46c1d8,_0x3db568],_0x27fa35={'service':'store','method':'put','node':_0x4cfaf5};log('[all.store'+'.put]\x20stat'+'e:\x20'+JSON['stringify'](_0x46c1d8)+('configurat'+'ion:\x20')+JSON['stringify'](_0x3db568)+('target\x20nod'+'e:\x20')+JSON['stringify'](_0x4cfaf5)),globalThis['distributi'+'on']['local']['comm']['send'](_0x36a221,_0x27fa35,_0x2fc7d4);});return;return _0x2fc7d4(new Error('store.put\x20'+'not\x20implem'+'ented'));}function _0x35f63d(_0x251e9e,_0x310679){getNode(_0x16f33e,_0x251e9e,(_0x100c81,_0x2bfec2)=>{if(!_0x2bfec2){_0x310679(_0x100c81);return;}const _0x3b78c7=[{'key':_0x251e9e,'gid':_0x16f33e['gid']}],_0x59b50f={'service':'store','method':'del','node':_0x2bfec2};globalThis['distributi'+'on']['local']['comm']['send'](_0x3b78c7,_0x59b50f,_0x310679);});return;return _0x310679(new Error('store.del\x20'+'not\x20implem'+'ented'));}function _0x319cf7(_0x3b9ecb,_0x38b6e8){log('[store.rec'+'onf]\x20confi'+'guration:\x20'+JSON['stringify'](_0x3b9ecb)+'\x20gid:\x20'+_0x16f33e['gid']),globalThis['distributi'+'on']['local']['groups']['get'](_0x16f33e['gid'],(_0xb5991f,_0x31995e)=>{if(!_0x31995e){_0x38b6e8(_0xb5991f);return;}globalThis['distributi'+'on']['local']['groups']['put'](_0x16f33e['gid'],_0x3b9ecb,(_0xa9fad1,_0x359f20)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['store']['get'](null,(_0x59ad7f,_0x461adf)=>{globalThis['distributi'+'on']['local']['groups']['put'](_0x16f33e['gid'],_0x31995e,(_0x3a7608,_0x392309)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['status']['get']('nid',(_0x413fe7,_0x1b3c9d)=>{const _0x4c3b12=Object['values'](_0x1b3c9d),_0x43ddad=Object['values'](_0x3b9ecb)['map'](_0x34d599=>globalThis['distributi'+'on']['util']['id']['getNID'](_0x34d599));log('[store.rec'+'onf\x20receiv'+'ed\x20'+_0x461adf['length']+('\x20keys\x20from'+'\x20')+_0x1b3c9d['length']+'\x20nodes');let _0x5a990f=-0x35e+0x53*-0x17+0xad3;const _0xfcd7de=()=>{if(_0x5a990f===_0x461adf['length'])return _0x38b6e8(null);};if(_0x461adf['length']===-0x1f29+-0x8*-0x11f+0x1631)return _0x38b6e8(null);for(const _0x2e69f4 of _0x461adf){const _0x2c2a50=globalThis['distributi'+'on']['util']['id']['getID'](_0x2e69f4),_0x543052=_0x16f33e['hash'](_0x2c2a50,_0x43ddad),_0x268cd0=_0x16f33e['hash'](_0x2c2a50,_0x4c3b12);log('[store.rec'+'onf]\x20old\x20n'+'id:\x20'+_0x543052+'\x20new\x20nid:\x20'+_0x268cd0);if(_0x543052===_0x268cd0){_0x5a990f++,_0xfcd7de();continue;}const _0x23d5c7=_0x3b9ecb[_0x543052['substring'](-0x1*-0xa7b+-0xf53*-0x1+-0xce7*0x2,0x2083+0x16f7+0x1*-0x3775)],_0x21600b=[{'key':_0x2e69f4,'gid':_0x16f33e['gid']}],_0x6f378e={'service':'store','method':'del','node':_0x23d5c7};log('[store.rec'+'onf]\x20delet'+'ing\x20key\x20'+_0x2e69f4+'\x20from\x20'+JSON['stringify'](_0x6f378e)),globalThis['distributi'+'on']['local']['comm']['send'](_0x21600b,_0x6f378e,(_0x4f778a,_0x11da82)=>{globalThis['distributi'+'on'][_0x16f33e['gid']]['store']['put'](_0x11da82,_0x2e69f4,(_0x23ad1a,_0x12dab4)=>{_0x5a990f++,_0xfcd7de();});});}});});});});});return;return _0x38b6e8(new Error('store.reco'+'nf\x20not\x20imp'+'lemented'));}return{'get':_0x10eab0,'put':_0xb8a2c2,'del':_0x35f63d,'reconf':_0x319cf7};}module['exports']=store;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const http=require('node:http'),log=require('../util/lo'+'g.js');function createGuardedCallback(_0x28a30d){let _0x6436f4=0x692+-0x210c+0x1a7a;function _0x5b1792(_0x27b8d8,_0x4b8275){_0x6436f4+=-0x223*0xd+0x1d74+-0x1ac;if(_0x6436f4>0x16d2+-0x165c+-0x75){log('Warning:\x20C'+'allback\x20fu'+'nction\x20cal'+'led\x20'+_0x6436f4+'\x20times');return;}if(_0x28a30d!==undefined){_0x28a30d(_0x27b8d8,_0x4b8275);return;}}return _0x5b1792;}function send(_0x408349,_0x1edc84,_0x543a04){_0x543a04=createGuardedCallback(_0x543a04);if(_0x1edc84===undefined){_0x543a04(new Error('Remote\x20is\x20'+'required'));return;}if(_0x1edc84?.['node']?.['ip']===undefined||_0x1edc84?.['node']?.['port']===undefined){_0x543a04(new Error('Remote\x20nod'+'e\x20IP\x20and\x20p'+'ort\x20requir'+'ed'));return;}if(_0x1edc84?.['service']===undefined){_0x543a04(new Error('Remote\x20ser'+'vice\x20is\x20re'+'quired'));return;}if(_0x1edc84?.['method']===undefined){_0x543a04(new Error('Remote\x20met'+'hod\x20is\x20req'+'uired'));return;}if(!(_0x408349 instanceof Array)){_0x543a04(new Error('Message\x20mu'+'st\x20be\x20an\x20a'+'rray\x20of\x20ar'+'guments'));return;}const _0x26dd72=_0x1edc84['node'],_0x23eff8=_0x1edc84['service'],_0x5d4911=_0x1edc84['method'],_0x433a42=_0x1edc84['gid']||'local';log('[comm.send'+']:\x20Sending'+'\x20'+JSON['stringify'](_0x408349)+'\x20to\x20'+_0x1edc84['service']+':'+_0x1edc84['method']+'\x20on\x20'+_0x1edc84['node']['ip']+':'+_0x1edc84['node']['port']);const _0x28523a=globalThis['distributi'+'on']['util']['serialize'](_0x408349),_0x34c38d={'hostname':_0x26dd72['ip'],'port':_0x26dd72['port'],'path':'/'+_0x433a42+'/'+_0x23eff8+'/'+_0x5d4911,'method':'PUT','headers':{'Content-Type':'applicatio'+'n/json','Content-Length':Buffer['byteLength'](_0x28523a)}},_0x273854=http['request'](_0x34c38d,_0x1c1358=>{let _0x20394f='';_0x1c1358['on']('data',function(_0x1b730d){_0x20394f+=_0x1b730d;}),_0x1c1358['on']('end',function(){let _0x2c38c5=undefined,_0x1a3a93=undefined;try{const _0x5b7551=globalThis['distributi'+'on']['util']['deserializ'+'e'](_0x20394f);_0x2c38c5=_0x5b7551[-0x2c1+-0x2496+0x2757],_0x1a3a93=_0x5b7551[-0x1*-0x2465+0x4f0*-0x4+0x10a4*-0x1];}catch(_0x1fed1c){let _0xa55726=_0x20394f['slice'](-0x1bb*-0x16+0x1010+-0x3622,0x1a*0x35+-0x1e9d+-0x1d23*-0x1);_0x20394f['length']>-0x1975+-0xabe+-0x281b*-0x1&&(_0xa55726+='...');_0x543a04(new Error('Failed\x20to\x20'+'deserializ'+'e\x20HTTP\x20res'+'ponse:\x20'+_0xa55726));return;}_0x543a04(_0x2c38c5,_0x1a3a93);return;}),_0x1c1358['on']('error',_0x31ad54=>{_0x543a04(new Error('HTTP\x20respo'+'nse\x20error:'+'\x20'+_0x31ad54?.['message']));return;});});_0x273854['on']('error',_0x183288=>{_0x543a04(new Error('HTTP\x20reque'+'st\x20error:\x20'+_0x183288?.['message']));return;}),_0x273854['write'](_0x28523a),_0x273854['end']();}module['exports']={'send':send};
9
+ const http=require('node:http'),log=require('../util/lo'+'g.js');function createGuardedCallback(_0x2b0d0a){let _0x4d4299=-0x2*-0x70a+-0x278*-0xb+-0x293c;function _0x257e21(_0x49d050,_0x592541){_0x4d4299+=0x26b7+0x5*0x4b5+-0x1*0x3e3f;if(_0x4d4299>-0x11*0x149+0x6f*0x1+0x156b){log('Warning:\x20C'+'allback\x20fu'+'nction\x20cal'+'led\x20'+_0x4d4299+'\x20times');return;}if(_0x2b0d0a!==undefined){_0x2b0d0a(_0x49d050,_0x592541);return;}}return _0x257e21;}function send(_0x4f68b0,_0x51eca9,_0x403dbc){_0x403dbc=createGuardedCallback(_0x403dbc);if(_0x51eca9===undefined){_0x403dbc(new Error('Remote\x20is\x20'+'required'));return;}if(_0x51eca9?.['node']?.['ip']===undefined||_0x51eca9?.['node']?.['port']===undefined){_0x403dbc(new Error('Remote\x20nod'+'e\x20IP\x20and\x20p'+'ort\x20requir'+'ed'));return;}if(_0x51eca9?.['service']===undefined){_0x403dbc(new Error('Remote\x20ser'+'vice\x20is\x20re'+'quired'));return;}if(_0x51eca9?.['method']===undefined){_0x403dbc(new Error('Remote\x20met'+'hod\x20is\x20req'+'uired'));return;}if(!(_0x4f68b0 instanceof Array)){_0x403dbc(new Error('Message\x20mu'+'st\x20be\x20an\x20a'+'rray\x20of\x20ar'+'guments'));return;}const _0x3e15cb=_0x51eca9['node'],_0x54402a=_0x51eca9['service'],_0xea0f43=_0x51eca9['method'],_0x119530=_0x51eca9['gid']||'local';log('[comm.send'+']:\x20Sending'+'\x20'+JSON['stringify'](_0x4f68b0)+'\x20to\x20'+_0x51eca9['service']+':'+_0x51eca9['method']+'\x20on\x20'+_0x51eca9['node']['ip']+':'+_0x51eca9['node']['port']);const _0x453a77=globalThis['distributi'+'on']['util']['serialize'](_0x4f68b0),_0x37c092={'hostname':_0x3e15cb['ip'],'port':_0x3e15cb['port'],'path':'/'+_0x119530+'/'+_0x54402a+'/'+_0xea0f43,'method':'PUT','headers':{'Content-Type':'applicatio'+'n/json','Content-Length':Buffer['byteLength'](_0x453a77)}},_0x4045c9=http['request'](_0x37c092,_0x50b48f=>{let _0x5cbef9='';_0x50b48f['on']('data',function(_0x550a00){_0x5cbef9+=_0x550a00;}),_0x50b48f['on']('end',function(){let _0xd40dff=undefined,_0x17f3ca=undefined;try{const _0x4409a1=globalThis['distributi'+'on']['util']['deserializ'+'e'](_0x5cbef9);_0xd40dff=_0x4409a1[0xb0a+-0x3b9*0x3+-0x1*-0x21],_0x17f3ca=_0x4409a1[0x1eb6+-0x1e0e+-0xa7*0x1];}catch(_0x28a0eb){let _0x21ae3b=_0x5cbef9['slice'](0x12*0x1cd+0x819+-0x2883,-0x267b+0x7*0x2fb+-0x2*-0xac3);_0x5cbef9['length']>0x442+0x1322+-0x137c&&(_0x21ae3b+='...');_0x403dbc(new Error('Failed\x20to\x20'+'deserializ'+'e\x20HTTP\x20res'+'ponse:\x20'+_0x21ae3b));return;}_0x403dbc(_0xd40dff,_0x17f3ca);return;}),_0x50b48f['on']('error',_0x2688c0=>{_0x403dbc(new Error('HTTP\x20respo'+'nse\x20error:'+'\x20'+_0x2688c0?.['message']));return;});});_0x4045c9['on']('error',_0x42ae41=>{_0x403dbc(new Error('HTTP\x20reque'+'st\x20error:\x20'+_0x42ae41?.['message']));return;}),_0x4045c9['write'](_0x453a77),_0x4045c9['end']();return;return _0x403dbc(new Error('comm.send\x20'+'not\x20implem'+'ented'));}module['exports']={'send':send};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const N=0x2672+-0xcc5+-0x19a3,messageStore={'messages':[],'push'(_0xb574c0){this['messages']['push'](_0xb574c0),this['messages']['length']>N&&this['messages']['shift']();},'has'(_0x491b55){return this['messages']['includes'](_0x491b55);}};function recv(_0x363e49,_0x4b6303){const {message:_0x3d09d8,remote:_0x51ca33,mid:_0x546912,gid:_0x645713}=_0x363e49;if(messageStore['has'](_0x546912)){_0x4b6303(new Error('Message\x20al'+'ready\x20rece'+'ived'));return;}globalThis['distributi'+'on'][_0x645713]['gossip']['send'](_0x363e49,_0x51ca33,()=>{}),messageStore['push'](_0x546912),_0x51ca33['node']={'ip':globalThis['distributi'+'on']['node']['config']['ip'],'port':globalThis['distributi'+'on']['node']['config']['port']},globalThis['distributi'+'on']['local']['comm']['send'](_0x3d09d8,_0x51ca33,(_0x3b9595,_0x41bc38)=>{_0x4b6303(_0x3b9595,_0x41bc38);});}module['exports']={'recv':recv};
9
+ const N=0x1d02+-0xce5*-0x2+-0x36c2,messageStore={'messages':[],'push'(_0x5d4445){this['messages']['push'](_0x5d4445),this['messages']['length']>N&&this['messages']['shift']();},'has'(_0x266857){return this['messages']['includes'](_0x266857);}};function recv(_0x1d6d7b,_0x37cee1){const {message:_0x26cf48,remote:_0x473923,mid:_0x2ceb5d,gid:_0x3053dc}=_0x1d6d7b;if(messageStore['has'](_0x2ceb5d)){_0x37cee1(new Error('Message\x20al'+'ready\x20rece'+'ived'));return;}globalThis['distributi'+'on'][_0x3053dc]['gossip']['send'](_0x1d6d7b,_0x473923,()=>{}),messageStore['push'](_0x2ceb5d),_0x473923['node']={'ip':globalThis['distributi'+'on']['node']['config']['ip'],'port':globalThis['distributi'+'on']['node']['config']['port']},globalThis['distributi'+'on']['local']['comm']['send'](_0x26cf48,_0x473923,(_0x14b840,_0x4f9710)=>{_0x37cee1(_0x14b840,_0x4f9710);});return;return _0x37cee1(new Error('gossip.rec'+'v\x20not\x20impl'+'emented'));}module['exports']={'recv':recv};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),groupsStore={};groupsStore['all']={},groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config'])]=globalThis['distributi'+'on']['node']['config'];function get(_0x3727ef,_0x42b552){return _0x3727ef in groupsStore?_0x42b552(null,groupsStore[_0x3727ef]):_0x42b552(new Error('Group\x20'+_0x3727ef+'\x20not\x20found'),null);}function put(_0x1dc776,_0x14ae76,_0x4990b2){log('groups.put'+':\x20config:\x20'+JSON['stringify'](_0x1dc776)+'\x20group:\x20'+JSON['stringify'](_0x14ae76)),_0x14ae76=_0x14ae76||{};typeof _0x1dc776==='string'&&(_0x1dc776={'gid':_0x1dc776});if(!_0x1dc776['gid'])return _0x4990b2(Error('Config\x20gid'+'\x20was\x20null'),null);groupsStore[_0x1dc776['gid']]=_0x14ae76,Object['values'](_0x14ae76)['forEach'](_0x29e4d3=>{groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0x29e4d3)]=_0x29e4d3;});const {setup:_0x2cac1a}=require('../../dist'+'ribution/a'+'ll/all.js');return globalThis['distributi'+'on'][_0x1dc776['gid']]=_0x2cac1a(_0x1dc776),_0x4990b2(null,_0x14ae76);}function del(_0x5de672,_0x29cc22){if(_0x5de672 in groupsStore){const _0x2d3b80=groupsStore[_0x5de672];return delete groupsStore[_0x5de672],globalThis['distributi'+'on'][_0x5de672]&&delete globalThis['distributi'+'on'][_0x5de672],_0x29cc22(null,_0x2d3b80);}else return _0x29cc22(new Error('Group\x20'+_0x5de672+'\x20not\x20found'));}function add(_0x4c8a17,_0x2f1765,_0x3c843d){log('[all.group'+'s.add]\x20gro'+'up\x20name:\x20'+_0x4c8a17+'\x20node:\x20'+JSON['stringify'](_0x2f1765));if(_0x4c8a17 in groupsStore){!groupsStore[_0x4c8a17]&&(groupsStore[_0x4c8a17]={});groupsStore[_0x4c8a17][globalThis['distributi'+'on']['util']['id']['getSID'](_0x2f1765)]=_0x2f1765,groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0x2f1765)]=_0x2f1765;if(_0x3c843d)return _0x3c843d(null,groupsStore[_0x4c8a17]);}else{if(_0x3c843d)return _0x3c843d(new Error('Group\x20'+_0x4c8a17+'\x20not\x20found'));}};function rem(_0x1c371c,_0xe5da82,_0x19f1ed){return log('[all.group'+'s.rem]\x20nam'+'e:\x20'+_0x1c371c+'\x20node:\x20'+_0xe5da82),_0x1c371c in groupsStore?(delete groupsStore[_0x1c371c][_0xe5da82],delete groupsStore['all'][_0xe5da82],_0x19f1ed(null,groupsStore[_0x1c371c])):_0x19f1ed(new Error('Group\x20'+_0x1c371c+'\x20not\x20found'));};module['exports']={'get':get,'put':put,'del':del,'add':add,'rem':rem};
9
+ const log=require('../util/lo'+'g'),groupsStore={};groupsStore['all']={},groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config'])]=globalThis['distributi'+'on']['node']['config'];function get(_0x5748d0,_0x5b311d){return _0x5748d0 in groupsStore?_0x5b311d(null,groupsStore[_0x5748d0]):_0x5b311d(new Error('Group\x20'+_0x5748d0+'\x20not\x20found'),null);return _0x5b311d(new Error('groups.get'+'\x20not\x20imple'+'mented'));}function put(_0xcee79c,_0x51fd4c,_0x4b2b48){log('groups.put'+':\x20config:\x20'+JSON['stringify'](_0xcee79c)+'\x20group:\x20'+JSON['stringify'](_0x51fd4c)),_0x51fd4c=_0x51fd4c||{};typeof _0xcee79c==='string'&&(_0xcee79c={'gid':_0xcee79c});if(!_0xcee79c['gid'])return _0x4b2b48(Error('Config\x20gid'+'\x20was\x20null'),null);groupsStore[_0xcee79c['gid']]=_0x51fd4c,Object['values'](_0x51fd4c)['forEach'](_0xfc3f1b=>{groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0xfc3f1b)]=_0xfc3f1b;});const {setup:_0x18b3ee}=require('../../dist'+'ribution/a'+'ll/all.js');globalThis['distributi'+'on'][_0xcee79c['gid']]=_0x18b3ee(_0xcee79c);return _0x4b2b48(null,_0x51fd4c);return _0x4b2b48(new Error('groups.put'+'\x20not\x20imple'+'mented'));}function del(_0x382b9b,_0x364ed3){if(_0x382b9b in groupsStore){const _0x2a528f=groupsStore[_0x382b9b];return delete groupsStore[_0x382b9b],globalThis['distributi'+'on'][_0x382b9b]&&delete globalThis['distributi'+'on'][_0x382b9b],_0x364ed3(null,_0x2a528f);}else return _0x364ed3(new Error('Group\x20'+_0x382b9b+'\x20not\x20found'));return _0x364ed3(new Error('groups.del'+'\x20not\x20imple'+'mented'));}function add(_0x149d92,_0x5165ee,_0x443236){log('[all.group'+'s.add]\x20gro'+'up\x20name:\x20'+_0x149d92+'\x20node:\x20'+JSON['stringify'](_0x5165ee));if(_0x149d92 in groupsStore){!groupsStore[_0x149d92]&&(groupsStore[_0x149d92]={});groupsStore[_0x149d92][globalThis['distributi'+'on']['util']['id']['getSID'](_0x5165ee)]=_0x5165ee,groupsStore['all'][globalThis['distributi'+'on']['util']['id']['getSID'](_0x5165ee)]=_0x5165ee;if(_0x443236)return _0x443236(null,groupsStore[_0x149d92]);}else{if(_0x443236)return _0x443236(new Error('Group\x20'+_0x149d92+'\x20not\x20found'));}return;return _0x443236(new Error('groups.add'+'\x20not\x20imple'+'mented'));};function rem(_0x421508,_0x363eca,_0x20828b){log('[all.group'+'s.rem]\x20nam'+'e:\x20'+_0x421508+'\x20node:\x20'+_0x363eca);return _0x421508 in groupsStore?(delete groupsStore[_0x421508][_0x363eca],delete groupsStore['all'][_0x363eca],_0x20828b(null,groupsStore[_0x421508])):_0x20828b(new Error('Group\x20'+_0x421508+'\x20not\x20found'));return _0x20828b(new Error('groups.rem'+'\x20not\x20imple'+'mented'));};module['exports']={'get':get,'put':put,'del':del,'add':add,'rem':rem};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),kvStore={'store':{},'get'(_0x31ff7c){if(!this['store'][_0x31ff7c['gid']])return undefined;return this['store'][_0x31ff7c['gid']][_0x31ff7c['key']];},'put'(_0x2669f8,_0x2ae2fb){!this['store'][_0x2669f8['gid']]&&(this['store'][_0x2669f8['gid']]={}),this['store'][_0x2669f8['gid']][_0x2669f8['key']]=_0x2ae2fb;},'append'(_0x86e50c,_0xf3a07f){!this['get'](_0x86e50c)&&this['put'](_0x86e50c,[]),!Array['isArray'](this['get'](_0x86e50c))&&this['put'](_0x86e50c,[this['get'](_0x86e50c)]),Array['isArray'](_0xf3a07f)?this['put'](_0x86e50c,this['get'](_0x86e50c)['concat'](_0xf3a07f)):this['store'][_0x86e50c['gid']][_0x86e50c['key']]['push'](_0xf3a07f);},'del'(_0x260b35){if(!this['store'][_0x260b35['gid']])return undefined;const _0x3ab912=this['store'][_0x260b35['gid']][_0x260b35['key']];return delete this['store'][_0x260b35['gid']][_0x260b35['key']],_0x3ab912;},'toString'(){let _0x55985a='';for(const _0x32d025 in this['store']){_0x55985a+=_0x32d025+':\x20'+JSON['stringify'](this['store'][_0x32d025]);}return _0x55985a;}};function normalize(_0x524e74){if(_0x524e74===null)return{'key':null,'gid':null,'action':null};else return typeof _0x524e74==='string'?{'key':_0x524e74,'gid':null,'action':null}:_0x524e74;};function put(_0x58c889,_0x10fa8e,_0x52de98){log('[mem.put]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x10fa8e)+'\x20state:\x20'+JSON['stringify'](_0x58c889)+'\x20store:\x20'+kvStore['toString']());let {key:_0x5689bc,gid:_0x27cb95,action:_0x2aef1c}=normalize(_0x10fa8e);_0x5689bc=_0x5689bc||globalThis['distributi'+'on']['util']['id']['getID'](_0x58c889),_0x27cb95=_0x27cb95||'local',_0x2aef1c=_0x2aef1c||'put',kvStore[_0x2aef1c]({'key':_0x5689bc,'gid':_0x27cb95},_0x58c889),log('[mem.put]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']());if(_0x52de98)return _0x52de98(null,_0x58c889);};function get(_0x580a28,_0x4b9fa2){log('[mem.get]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x580a28)+'\x20store:\x20'+kvStore['toString']());let {key:_0x54f1bd,gid:_0x469b6d}=normalize(_0x580a28);_0x469b6d=_0x469b6d||'local';if(_0x54f1bd){const _0x46632b=kvStore['get']({'key':_0x54f1bd,'gid':_0x469b6d});return _0x46632b?_0x4b9fa2(null,_0x46632b):_0x4b9fa2(new Error('Memory\x20key'+'\x20\x22'+_0x54f1bd+('\x22\x20not\x20foun'+'d\x20for\x20')+_0x469b6d+'\x27s\x20store'));}else{let _0x421980=kvStore['store'][_0x469b6d]||{};return _0x421980=Object['keys'](_0x421980),_0x4b9fa2(null,_0x421980);}}function del(_0x44fdcd,_0x125c27){log('[mem.del]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x44fdcd)+'\x20store:\x20'+kvStore['toString']());let {key:_0x3e94bc,gid:_0xacd8d4}=normalize(_0x44fdcd);_0xacd8d4=_0xacd8d4||'local';const _0x4142d3=kvStore['del']({'key':_0x3e94bc,'gid':_0xacd8d4});return log('[mem.del]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']()),_0x4142d3?_0x125c27(null,_0x4142d3):_0x125c27(new Error('Memory\x20key'+'\x20\x22'+_0x3e94bc+('\x22\x20not\x20foun'+'d\x20for\x20')+_0xacd8d4+'\x27s\x20store'));};module['exports']={'put':put,'get':get,'del':del};
9
+ const log=require('../util/lo'+'g'),kvStore={'store':{},'get'(_0x5aa73a){if(!this['store'][_0x5aa73a['gid']])return undefined;return this['store'][_0x5aa73a['gid']][_0x5aa73a['key']];},'put'(_0xf5d67f,_0x2895ce){!this['store'][_0xf5d67f['gid']]&&(this['store'][_0xf5d67f['gid']]={}),this['store'][_0xf5d67f['gid']][_0xf5d67f['key']]=_0x2895ce;},'append'(_0x32e330,_0x3055e7){!this['get'](_0x32e330)&&this['put'](_0x32e330,[]),!Array['isArray'](this['get'](_0x32e330))&&this['put'](_0x32e330,[this['get'](_0x32e330)]),Array['isArray'](_0x3055e7)?this['put'](_0x32e330,this['get'](_0x32e330)['concat'](_0x3055e7)):this['store'][_0x32e330['gid']][_0x32e330['key']]['push'](_0x3055e7);},'del'(_0x86ae5d){if(!this['store'][_0x86ae5d['gid']])return undefined;const _0x635988=this['store'][_0x86ae5d['gid']][_0x86ae5d['key']];return delete this['store'][_0x86ae5d['gid']][_0x86ae5d['key']],_0x635988;},'toString'(){let _0x4229f4='';for(const _0x5d498c in this['store']){_0x4229f4+=_0x5d498c+':\x20'+JSON['stringify'](this['store'][_0x5d498c]);}return _0x4229f4;}};function normalize(_0x57caaa){if(_0x57caaa===null)return{'key':null,'gid':null,'action':null};else return typeof _0x57caaa==='string'?{'key':_0x57caaa,'gid':null,'action':null}:_0x57caaa;};function put(_0x15cbdd,_0x53d7ff,_0x500cc5){log('[mem.put]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x53d7ff)+'\x20state:\x20'+JSON['stringify'](_0x15cbdd)+'\x20store:\x20'+kvStore['toString']());let {key:_0x2d9e3a,gid:_0x25df00,action:_0xb8954a}=normalize(_0x53d7ff);_0x2d9e3a=_0x2d9e3a||globalThis['distributi'+'on']['util']['id']['getID'](_0x15cbdd),_0x25df00=_0x25df00||'local',_0xb8954a=_0xb8954a||'put',kvStore[_0xb8954a]({'key':_0x2d9e3a,'gid':_0x25df00},_0x15cbdd),log('[mem.put]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']());if(_0x500cc5)return _0x500cc5(null,_0x15cbdd);return;return _0x500cc5(new Error('mem.put\x20no'+'t\x20implemen'+'ted'));};function get(_0x2355f1,_0x18fbe7){log('[mem.get]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x2355f1)+'\x20store:\x20'+kvStore['toString']());let {key:_0x40f2d1,gid:_0x2c958b}=normalize(_0x2355f1);_0x2c958b=_0x2c958b||'local';if(_0x40f2d1){const _0x5ba27a=kvStore['get']({'key':_0x40f2d1,'gid':_0x2c958b});return _0x5ba27a?_0x18fbe7(null,_0x5ba27a):_0x18fbe7(new Error('Memory\x20key'+'\x20\x22'+_0x40f2d1+('\x22\x20not\x20foun'+'d\x20for\x20')+_0x2c958b+'\x27s\x20store'));}else{let _0x2d5b05=kvStore['store'][_0x2c958b]||{};return _0x2d5b05=Object['keys'](_0x2d5b05),_0x18fbe7(null,_0x2d5b05);}return;return _0x18fbe7(new Error('mem.get\x20no'+'t\x20implemen'+'ted'));}function del(_0x29ca8e,_0x33fa07){log('[mem.del]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x29ca8e)+'\x20store:\x20'+kvStore['toString']());let {key:_0x5dc147,gid:_0x5caab1}=normalize(_0x29ca8e);_0x5caab1=_0x5caab1||'local';const _0x466918=kvStore['del']({'key':_0x5dc147,'gid':_0x5caab1});log('[mem.del]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']());return _0x466918?_0x33fa07(null,_0x466918):_0x33fa07(new Error('Memory\x20key'+'\x20\x22'+_0x5dc147+('\x22\x20not\x20foun'+'d\x20for\x20')+_0x5caab1+'\x27s\x20store'));return;return _0x33fa07(new Error('mem.del\x20no'+'t\x20implemen'+'ted'));};module['exports']={'put':put,'get':get,'del':del};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),routesStore=new Map();function get(_0x3b8f9b,_0xd999cf){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+JSON['stringify'](_0x3b8f9b));if(!_0x3b8f9b)return _0xd999cf(new Error('No\x20configu'+'ration\x20pro'+'vided!'));typeof _0x3b8f9b==='string'&&(_0x3b8f9b={'service':_0x3b8f9b});const _0x261a09=_0x3b8f9b['service'],_0x5a7a79=_0x3b8f9b['gid'];if(_0x5a7a79&&_0x5a7a79!=='local')return log('[routes.ge'+'t]\x20Found\x20d'+'istributed'+'\x20service:\x20'+_0x261a09),_0xd999cf(null,globalThis['distributi'+'on'][_0x5a7a79][_0x261a09]);else{const _0x2a941b=routesStore['get'](_0x261a09);if(_0x2a941b)return log('[routes.ge'+'t]\x20Found\x20l'+'ocal\x20servi'+'ce:\x20'+_0x261a09),_0xd999cf(null,_0x2a941b);else{const _0x7718e2=globalThis['toLocal']['get'](_0x261a09);return _0x7718e2?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x261a09),_0xd999cf(null,{'call':_0x7718e2})):_0xd999cf(new Error('Service\x20'+_0x261a09+('\x20not\x20found'+'\x20in\x20routes')));}}}function put(_0x2a5b78,_0x187cc1,_0x49386c){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x187cc1),routesStore['set'](_0x187cc1,_0x2a5b78);if(_0x49386c)return _0x49386c(null,_0x187cc1);}function rem(_0x3c28d1,_0x2f32b8){const _0x4533ce=routesStore['get'](_0x3c28d1);return routesStore['delete'](_0x3c28d1),_0x2f32b8(null,_0x4533ce);}module['exports']={'get':get,'put':put,'rem':rem};
9
+ const log=require('../util/lo'+'g'),routesStore=new Map();function get(_0x3c878b,_0x2d8a42){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+JSON['stringify'](_0x3c878b));if(!_0x3c878b)return _0x2d8a42(new Error('No\x20configu'+'ration\x20pro'+'vided!'));typeof _0x3c878b==='string'&&(_0x3c878b={'service':_0x3c878b});const _0x7cc0c2=_0x3c878b['service'],_0x1d7c39=_0x3c878b['gid'];if(_0x1d7c39&&_0x1d7c39!=='local')return log('[routes.ge'+'t]\x20Found\x20d'+'istributed'+'\x20service:\x20'+_0x7cc0c2),_0x2d8a42(null,globalThis['distributi'+'on'][_0x1d7c39][_0x7cc0c2]);else{const _0x33155b=routesStore['get'](_0x7cc0c2);if(_0x33155b)return log('[routes.ge'+'t]\x20Found\x20l'+'ocal\x20servi'+'ce:\x20'+_0x7cc0c2),_0x2d8a42(null,_0x33155b);else{const _0x2f3260=globalThis['toLocal']['get'](_0x7cc0c2);return _0x2f3260?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x7cc0c2),_0x2d8a42(null,{'call':_0x2f3260})):_0x2d8a42(new Error('Service\x20'+_0x7cc0c2+('\x20not\x20found'+'\x20in\x20routes')));}}return _0x2d8a42(new Error('routes.get'+'\x20not\x20imple'+'mented'));}function put(_0xf948d0,_0x194d97,_0xa8d9f8){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x194d97),routesStore['set'](_0x194d97,_0xf948d0);return _0xa8d9f8(null,_0x194d97);return _0xa8d9f8(new Error('routes.put'+'\x20not\x20imple'+'mented'));}function rem(_0x485265,_0x567b0f){const _0xd2df8c=routesStore['get'](_0x485265);routesStore['delete'](_0x485265);return _0x567b0f(null,_0xd2df8c);return _0x567b0f(new Error('routes.rem'+'\x20not\x20imple'+'mented'));}module['exports']={'get':get,'put':put,'rem':rem};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),counts=-0x188f*-0x1+-0x137*-0x2+0x149*-0x15;function get(_0x4b68f9,_0x42b109){if(_0x4b68f9 in globalThis['distributi'+'on']['node']['config']){_0x42b109(null,globalThis['distributi'+'on']['node']['config'][_0x4b68f9]);return;}if(_0x4b68f9==='sid'){_0x42b109(null,globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x4b68f9==='nid'){_0x42b109(null,globalThis['distributi'+'on']['util']['id']['getNID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x4b68f9==='counts'){_0x42b109(null,counts);return;}if(_0x4b68f9==='heapTotal'){_0x42b109(null,process['memoryUsag'+'e']()['heapTotal']);return;}if(_0x4b68f9==='heapUsed'){_0x42b109(null,process['memoryUsag'+'e']()['heapUsed']);return;}_0x42b109(new Error('Status\x20key'+'\x20not\x20found'));};const fs=require('fs'),path=require('path'),proc=require('node:child'+'_process');function getDistribution(){let _0x2e7ee8='';try{const _0x411384=proc['execSync']('git\x20rev-pa'+'rse\x20--show'+'-toplevel',{'encoding':'utf8'})['trim']();_0x2e7ee8=path['join'](_0x411384,'distributi'+'on.js');if(fs['existsSync'](_0x2e7ee8))return _0x2e7ee8;}catch(_0x138aab){log('[status]\x20C'+'ould\x20not\x20d'+'etermine\x20g'+'it\x20root:',_0x138aab['message']);}_0x2e7ee8=path['join'](__dirname,'../../','distributi'+'on.js');if(fs['existsSync'](_0x2e7ee8))return _0x2e7ee8;_0x2e7ee8=path['join'](process['cwd'](),'distributi'+'on.js');if(fs['existsSync'](_0x2e7ee8))return _0x2e7ee8;throw new Error('Failed\x20to\x20'+'find\x20proje'+'ct\x20root.');}function createOnStart(_0x52611c,_0x50c272){const _0x360948='\x0a\x20\x20\x20\x20retur'+'n\x20function'+'(e)\x20{\x0a\x20\x20\x20\x20'+'\x20\x20let\x20onSt'+'art\x20=\x20'+_0x52611c['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20le'+'t\x20callback'+'RPC\x20=\x20')+globalThis['distributi'+'on']['util']['wire']['createRPC'](globalThis['distributi'+'on']['util']['wire']['toAsync'](_0x50c272))['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20if'+'\x20(e)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ackRPC(e,\x20'+'null,\x20()\x20='+'>\x20{});\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20retur'+'n;\x0a\x20\x20\x20\x20\x20\x20}'+'\x0a\x20\x20\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.distr'+'ibution.no'+'de.config,'+'\x20()\x20=>\x20{})'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'catch(e)\x20{'+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20c'+'allbackRPC'+'(e,\x20null,\x20'+'()\x20=>\x20{});'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20};\x0a\x20\x20');return new Function(_0x360948)();}function spawn(_0xd12eab,_0x49efb8){const _0x3a1d88=_0xd12eab;_0x3a1d88['onStart']=_0x3a1d88['onStart']||function(){};if(!_0x3a1d88['port']||!_0x3a1d88['ip']){_0x49efb8(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x3a1d88));const _0x528e0b=(_0x5ce705,_0x2107da)=>{if(_0x5ce705){_0x49efb8(_0x5ce705);return;}globalThis['distributi'+'on']['local']['groups']['add']('all',_0x2107da,()=>{_0x49efb8(_0x5ce705,_0x2107da);});};_0x3a1d88['onStart']=createOnStart(_0x3a1d88['onStart'],_0x528e0b);const _0xdc46a9=getDistribution(),_0x3911d1=proc['spawn']('node',[_0xdc46a9,'--config',globalThis['distributi'+'on']['util']['serialize'](_0x3a1d88)],{'detached':!![],'stdio':'inherit'});_0x3911d1;return;_0x49efb8(new Error('status.spa'+'wn\x20not\x20imp'+'lemented'));}function stop(_0x1450bd){log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),globalThis['distributi'+'on']['node']['server']['close'](),process['nextTick'](()=>process['exit'](0x182a+0x2407+-0x13*0x32b));return _0x1450bd(null,globalThis['distributi'+'on']['node']['config']);_0x1450bd(new Error('status.sto'+'p\x20not\x20impl'+'emented'));}module['exports']={'get':get,'spawn':spawn,'stop':stop};
9
+ const log=require('../util/lo'+'g'),counts=0x8a8*-0x1+0x2537+-0x985*0x3;function get(_0x1a50b3,_0x30db05){if(_0x1a50b3 in globalThis['distributi'+'on']['node']['config']){_0x30db05(null,globalThis['distributi'+'on']['node']['config'][_0x1a50b3]);return;}if(_0x1a50b3==='sid'){_0x30db05(null,globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x1a50b3==='nid'){_0x30db05(null,globalThis['distributi'+'on']['util']['id']['getNID'](globalThis['distributi'+'on']['node']['config']));return;}if(_0x1a50b3==='counts'){_0x30db05(null,counts);return;}if(_0x1a50b3==='heapTotal'){_0x30db05(null,process['memoryUsag'+'e']()['heapTotal']);return;}if(_0x1a50b3==='heapUsed'){_0x30db05(null,process['memoryUsag'+'e']()['heapUsed']);return;}return _0x30db05(new Error('Status\x20key'+'\x20not\x20found'));return _0x30db05(new Error('status.get'+'\x20not\x20imple'+'mented'));};const fs=require('fs'),path=require('path'),proc=require('node:child'+'_process');function getDistribution(){let _0x1136ce='';try{const _0x5ef89a=proc['execSync']('git\x20rev-pa'+'rse\x20--show'+'-toplevel',{'encoding':'utf8'})['trim']();_0x1136ce=path['join'](_0x5ef89a,'distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;}catch(_0xdddb85){log('[status]\x20C'+'ould\x20not\x20d'+'etermine\x20g'+'it\x20root:',_0xdddb85['message']);}_0x1136ce=path['join'](__dirname,'../../','distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;_0x1136ce=path['join'](process['cwd'](),'distributi'+'on.js');if(fs['existsSync'](_0x1136ce))return _0x1136ce;throw new Error('Failed\x20to\x20'+'find\x20proje'+'ct\x20root.');}function createOnStart(_0x15e5ae,_0x5d1f67){const _0x525c88='\x0a\x20\x20\x20\x20retur'+'n\x20function'+'(e)\x20{\x0a\x20\x20\x20\x20'+'\x20\x20let\x20onSt'+'art\x20=\x20'+_0x15e5ae['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20le'+'t\x20callback'+'RPC\x20=\x20')+globalThis['distributi'+'on']['util']['wire']['createRPC'](globalThis['distributi'+'on']['util']['wire']['toAsync'](_0x5d1f67))['toString']()+(';\x0a\x20\x20\x20\x20\x20\x20if'+'\x20(e)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ackRPC(e,\x20'+'null,\x20()\x20='+'>\x20{});\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20retur'+'n;\x0a\x20\x20\x20\x20\x20\x20}'+'\x0a\x20\x20\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.distr'+'ibution.no'+'de.config,'+'\x20()\x20=>\x20{})'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'catch(e)\x20{'+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20c'+'allbackRPC'+'(e,\x20null,\x20'+'()\x20=>\x20{});'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20};\x0a\x20\x20');return new Function(_0x525c88)();}function spawn(_0x1e1257,_0x427366){const _0x549ffe=_0x1e1257;_0x549ffe['onStart']=_0x549ffe['onStart']||function(){};if(!_0x549ffe['port']||!_0x549ffe['ip']){_0x427366(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x549ffe));const _0x189e4c=(_0x3a9f27,_0xfc46c8)=>{if(_0x3a9f27){_0x427366(_0x3a9f27);return;}globalThis['distributi'+'on']['local']['groups']['add']('all',_0xfc46c8,()=>{_0x427366(_0x3a9f27,_0xfc46c8);});};_0x549ffe['onStart']=createOnStart(_0x549ffe['onStart'],_0x189e4c);const _0x199ff3=getDistribution();log('[status.sp'+'awn]\x20Using'+'\x20distribut'+'ion\x20path:\x20'+_0x199ff3);const _0x1f1f23=proc['spawn']('node',[_0x199ff3,'--config',globalThis['distributi'+'on']['util']['serialize'](_0x549ffe)],{'detached':!![],'stdio':'inherit'});_0x1f1f23;return;_0x427366(new Error('status.spa'+'wn\x20not\x20imp'+'lemented'));}function stop(_0x46a0a8){log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),globalThis['distributi'+'on']['node']['server']['close'](),process['nextTick'](()=>process['exit'](-0x16eb*0x1+-0x2*0xc6e+0x2fc7));return _0x46a0a8(null,globalThis['distributi'+'on']['node']['config']);_0x46a0a8(new Error('status.sto'+'p\x20not\x20impl'+'emented'));}module['exports']={'get':get,'spawn':spawn,'stop':stop};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const fs=require('fs'),path=require('path'),log=require('../util/lo'+'g'),baseFolder=path['join'](__dirname,'../../stor'+'e');!fs['existsSync'](baseFolder)&&fs['mkdirSync'](baseFolder);const nodeFolder=path['join'](baseFolder,'s-'+globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config']));!fs['existsSync'](nodeFolder)&&fs['mkdirSync'](nodeFolder);function normalize(_0x13584e){if(_0x13584e===null)return{'key':null,'gid':null,'action':'put'};else return typeof _0x13584e==='string'?{'key':_0x13584e,'gid':null,'action':'put'}:_0x13584e;}function put(_0x2d3094,_0x417f9d,_0x225eb2){log('[store.put'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x417f9d)+'\x20state:\x20'+JSON['stringify'](_0x2d3094)),_0x417f9d=normalize(_0x417f9d),_0x417f9d['key']=_0x417f9d['key']||globalThis['distributi'+'on']['util']['id']['getID'](_0x2d3094),_0x417f9d['gid']=_0x417f9d['gid']||'local';const _0xf73df0=globalThis['distributi'+'on']['util']['serialize'](_0x2d3094),_0x1a5c65=Buffer['from'](_0x417f9d['key'])['toString']('base64'),_0x15df32=path['join'](nodeFolder,_0x417f9d['gid']+'-'+_0x1a5c65);fs['writeFile'](_0x15df32,_0xf73df0,_0x505dc7=>{return _0x505dc7?_0x225eb2(_0x505dc7):_0x225eb2(null,_0x2d3094);});}function get(_0x1bdb0c,_0x1a1526){log('[store.get'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x1bdb0c)),_0x1bdb0c=normalize(_0x1bdb0c),_0x1bdb0c['gid']=_0x1bdb0c['gid']||'local';if(!_0x1bdb0c['key']){fs['readdir'](nodeFolder,(_0x2e23aa,_0x3b8b2a)=>{if(_0x2e23aa)return _0x1a1526(_0x2e23aa);const _0x1949b1=[];for(let _0x1e79bb=0x1*-0xe2c+0x84f+0x13*0x4f;_0x1e79bb<_0x3b8b2a['length'];_0x1e79bb++){const _0x43672b=_0x3b8b2a[_0x1e79bb]['split']('-'),_0x214097=_0x43672b[-0xd1*0x13+-0x1015+0x3*0xa88];if(_0x214097!==_0x1bdb0c['gid'])continue;const _0x57f0ff=_0x43672b[_0x43672b['length']-(-0x123+-0xefa*0x1+0x101e)];_0x1949b1['push'](Buffer['from'](_0x57f0ff,'base64')['toString']());}return _0x1a1526(null,_0x1949b1);});return;}const _0xdb74fa=Buffer['from'](_0x1bdb0c['key'])['toString']('base64'),_0x202499=path['join'](nodeFolder,_0x1bdb0c['gid']+'-'+_0xdb74fa);fs['readFile'](_0x202499,(_0x59d1bb,_0x168127)=>{return _0x59d1bb?_0x59d1bb['code']==='ENOENT'?_0x1a1526(new Error('File\x20'+_0x202499+('\x20(from\x20key'+'\x20\x27')+_0x1bdb0c['key']+('\x27)\x20not\x20fou'+'nd\x20for\x20gro'+'up\x20')+_0x1bdb0c['gid'])):_0x1a1526(_0x59d1bb):_0x1a1526(null,globalThis['distributi'+'on']['util']['deserializ'+'e'](_0x168127['toString']()));});}function del(_0x4fde27,_0x19d6a5){log('[store.del'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x4fde27)),_0x4fde27=normalize(_0x4fde27),_0x4fde27['gid']=_0x4fde27['gid']||'local';const _0x5ec45b=Buffer['from'](_0x4fde27['key'])['toString']('base64'),_0x214bf8=path['join'](nodeFolder,_0x4fde27['gid']+'-'+_0x5ec45b);get(_0x4fde27,(_0x2bce8e,_0x4a2f9e)=>{if(_0x2bce8e)return _0x19d6a5(_0x2bce8e);fs['rm'](_0x214bf8,_0x50dca6=>{return _0x50dca6?_0x19d6a5(_0x50dca6):_0x19d6a5(null,_0x4a2f9e);});});}module['exports']={'put':put,'get':get,'del':del};
9
+ const fs=require('fs'),path=require('path'),log=require('../util/lo'+'g'),baseFolder=path['join'](__dirname,'../../stor'+'e');!fs['existsSync'](baseFolder)&&fs['mkdirSync'](baseFolder);const nodeFolder=path['join'](baseFolder,'s-'+globalThis['distributi'+'on']['util']['id']['getSID'](globalThis['distributi'+'on']['node']['config']));!fs['existsSync'](nodeFolder)&&fs['mkdirSync'](nodeFolder);function normalize(_0x2e334a){if(_0x2e334a===null)return{'key':null,'gid':null,'action':'put'};else return typeof _0x2e334a==='string'?{'key':_0x2e334a,'gid':null,'action':'put'}:_0x2e334a;}function put(_0x4ec3e5,_0x550b25,_0x4f84e5){log('[store.put'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x550b25)+'\x20state:\x20'+JSON['stringify'](_0x4ec3e5)),_0x550b25=normalize(_0x550b25),_0x550b25['key']=_0x550b25['key']||globalThis['distributi'+'on']['util']['id']['getID'](_0x4ec3e5),_0x550b25['gid']=_0x550b25['gid']||'local';const _0x11c45f=globalThis['distributi'+'on']['util']['serialize'](_0x4ec3e5),_0x5e766c=Buffer['from'](_0x550b25['key'])['toString']('base64'),_0x4f4ec0=path['join'](nodeFolder,_0x550b25['gid']+'-'+_0x5e766c);fs['writeFile'](_0x4f4ec0,_0x11c45f,_0x4f7adb=>{return _0x4f7adb?_0x4f84e5(_0x4f7adb):_0x4f84e5(null,_0x4ec3e5);});return;return _0x4f84e5(new Error('store.put\x20'+'not\x20implem'+'ented'));}function get(_0x1014f3,_0x423047){log('[store.get'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x1014f3)),_0x1014f3=normalize(_0x1014f3),_0x1014f3['gid']=_0x1014f3['gid']||'local';if(!_0x1014f3['key']){fs['readdir'](nodeFolder,(_0x422361,_0x4b570e)=>{if(_0x422361)return _0x423047(_0x422361);const _0x16120c=[];for(let _0x4d414c=0x1f2d*0x1+0x193d+0x6*-0x967;_0x4d414c<_0x4b570e['length'];_0x4d414c++){const _0x5ce055=_0x4b570e[_0x4d414c]['split']('-'),_0x237633=_0x5ce055[-0x1244+0x1f+0x5*0x3a1];if(_0x237633!==_0x1014f3['gid'])continue;const _0x341e7c=_0x5ce055[_0x5ce055['length']-(0x63*-0x23+-0x15e2+0x236c)];_0x16120c['push'](Buffer['from'](_0x341e7c,'base64')['toString']());}return _0x423047(null,_0x16120c);});return;}const _0x50d4d6=Buffer['from'](_0x1014f3['key'])['toString']('base64'),_0x3c02a1=path['join'](nodeFolder,_0x1014f3['gid']+'-'+_0x50d4d6);fs['readFile'](_0x3c02a1,(_0x54785b,_0x529a35)=>{return _0x54785b?_0x54785b['code']==='ENOENT'?_0x423047(new Error('File\x20'+_0x3c02a1+('\x20(from\x20key'+'\x20\x27')+_0x1014f3['key']+('\x27)\x20not\x20fou'+'nd\x20for\x20gro'+'up\x20')+_0x1014f3['gid'])):_0x423047(_0x54785b):_0x423047(null,globalThis['distributi'+'on']['util']['deserializ'+'e'](_0x529a35['toString']()));});return;return _0x423047(new Error('store.get\x20'+'not\x20implem'+'ented'));}function del(_0x3ba923,_0x45a8ea){log('[store.del'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x3ba923)),_0x3ba923=normalize(_0x3ba923),_0x3ba923['gid']=_0x3ba923['gid']||'local';const _0x2fea1a=Buffer['from'](_0x3ba923['key'])['toString']('base64'),_0x213b6a=path['join'](nodeFolder,_0x3ba923['gid']+'-'+_0x2fea1a);get(_0x3ba923,(_0x220f79,_0x1fb5ce)=>{if(_0x220f79)return _0x45a8ea(_0x220f79);fs['rm'](_0x213b6a,_0x25358d=>{return _0x25358d?_0x45a8ea(_0x25358d):_0x45a8ea(null,_0x1fb5ce);});});return;return _0x45a8ea(new Error('store.del\x20'+'not\x20implem'+'ented'));}module['exports']={'put':put,'get':get,'del':del};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const assert=require('assert'),crypto=require('crypto');function getID(_0x1d946c){const _0x2be2a4=crypto['createHash']('sha256');return _0x2be2a4['update'](JSON['stringify'](_0x1d946c)),_0x2be2a4['digest']('hex');}function getNID(_0x536ef2){return _0x536ef2={'ip':_0x536ef2['ip'],'port':_0x536ef2['port']},getID(_0x536ef2);}function getSID(_0x12e3d7){return getNID(_0x12e3d7)['substring'](-0x1*0x1431+-0x17b*0x3+0x18a2*0x1,-0xb6b+-0x1bdc*0x1+0x274c);}function getMID(_0x1928c8){const _0x1c4e2f={};return _0x1c4e2f['date']=new Date()['getTime'](),_0x1c4e2f['mss']=_0x1928c8,getID(_0x1c4e2f);}function idToNum(_0x21a12b){assert(typeof _0x21a12b==='string','idToNum:\x20i'+'d\x20is\x20not\x20i'+'n\x20KID\x20form'+'!');const _0x199e5b=_0x21a12b['startsWith']('0x')?_0x21a12b['slice'](0x2*-0x4ef+-0xd6*0x22+0xcc4*0x3):_0x21a12b;if(/^[0-9a-fA-F]+$/['test'](_0x199e5b))return BigInt('0x'+_0x199e5b);return BigInt(_0x21a12b);}const naiveHash=(_0x26b108,_0x300027)=>{_0x300027['sort']();const _0x30639f=Number(idToNum(_0x26b108)%BigInt(_0x300027['length']));return _0x300027[_0x30639f];},consistentHash=(_0x62cad7,_0x4440e1)=>{const _0x1fc965=idToNum(_0x62cad7),_0x69a163=_0x4440e1['map'](_0x5160bf=>({'id':_0x5160bf,'hash':idToNum(_0x5160bf)}));_0x69a163['sort']((_0x2f08e0,_0x23ed1b)=>{if(_0x2f08e0['hash']<_0x23ed1b['hash'])return-(0x7*0x355+0x1f36*-0x1+-0x14*-0x65);if(_0x2f08e0['hash']>_0x23ed1b['hash'])return-0x1*0x26b4+-0x171b+0x3dd0;return-0x3f4+0x2643+-0x224f;});for(const _0x44479b of _0x69a163){if(_0x1fc965<=_0x44479b['hash'])return _0x44479b['id'];}return _0x69a163[0x10*-0xf5+-0x1539*0x1+-0x2f*-0xc7]['id'];},rendezvousHash=(_0x426513,_0x3c9ebe)=>{let _0x4a6064=null,_0x2e1425=null;for(const _0x343537 of _0x3c9ebe){const _0x1d9a92=getID(_0x426513+_0x343537),_0x6913d5=idToNum(_0x1d9a92);(_0x4a6064===null||_0x6913d5>_0x4a6064)&&(_0x4a6064=_0x6913d5,_0x2e1425=_0x343537);}if(_0x2e1425===null)throw Error('maxNID\x20is\x20'+'null.\x20nids'+'\x20is\x20likely'+'\x20an\x20empty\x20'+'list');else return _0x2e1425;};module['exports']={'getID':getID,'getNID':getNID,'getSID':getSID,'getMID':getMID,'naiveHash':naiveHash,'consistentHash':consistentHash,'rendezvousHash':rendezvousHash};
9
+ const assert=require('assert'),crypto=require('crypto');function getID(_0x4782ce){const _0x201020=crypto['createHash']('sha256');return _0x201020['update'](JSON['stringify'](_0x4782ce)),_0x201020['digest']('hex');}function getNID(_0x2d8636){return _0x2d8636={'ip':_0x2d8636['ip'],'port':_0x2d8636['port']},getID(_0x2d8636);}function getSID(_0x33ed95){return getNID(_0x33ed95)['substring'](-0x2*0xe05+-0x5d4+-0x6*-0x5a5,-0x1cc0+0x1030+-0xc95*-0x1);}function getMID(_0xee8490){const _0x41d748={};return _0x41d748['date']=new Date()['getTime'](),_0x41d748['mss']=_0xee8490,getID(_0x41d748);}function idToNum(_0x359a0e){assert(typeof _0x359a0e==='string','idToNum:\x20i'+'d\x20is\x20not\x20i'+'n\x20KID\x20form'+'!');const _0x521aa2=_0x359a0e['startsWith']('0x')?_0x359a0e['slice'](-0x12fb*-0x2+0x22ad+-0x48a1):_0x359a0e;if(/^[0-9a-fA-F]+$/['test'](_0x521aa2))return BigInt('0x'+_0x521aa2);return BigInt(_0x359a0e);}const naiveHash=(_0x1c8137,_0x28ed80)=>{_0x28ed80['sort']();const _0x148019=Number(idToNum(_0x1c8137)%BigInt(_0x28ed80['length']));return _0x28ed80[_0x148019];},consistentHash=(_0x61260a,_0x2a45c1)=>{const _0x62fa12=idToNum(_0x61260a),_0x575565=_0x2a45c1['map'](_0x48adc3=>({'id':_0x48adc3,'hash':idToNum(_0x48adc3)}));_0x575565['sort']((_0x38f1a1,_0x187a05)=>{if(_0x38f1a1['hash']<_0x187a05['hash'])return-(-0x4*0x4fd+-0x3e*-0x86+-0xc7f*0x1);if(_0x38f1a1['hash']>_0x187a05['hash'])return-0xdab+-0x1ac9+0x2875;return 0x157b+0x2487+-0x3a02;});for(const _0x14855b of _0x575565){if(_0x62fa12<=_0x14855b['hash'])return _0x14855b['id'];}return _0x575565[0x10*0x3b+-0x18d0+0x1520]['id'];},rendezvousHash=(_0x3db221,_0x4b615b)=>{let _0x41b857=null,_0x41639e=null;for(const _0x15b2ca of _0x4b615b){const _0x5e0fce=getID(_0x3db221+_0x15b2ca),_0x584d14=idToNum(_0x5e0fce);(_0x41b857===null||_0x584d14>_0x41b857)&&(_0x41b857=_0x584d14,_0x41639e=_0x15b2ca);}if(_0x41639e===null)throw Error('maxNID\x20is\x20'+'null.\x20nids'+'\x20is\x20likely'+'\x20an\x20empty\x20'+'list');else return _0x41639e;};module['exports']={'getID':getID,'getNID':getNID,'getSID':getSID,'getMID':getMID,'naiveHash':naiveHash,'consistentHash':consistentHash,'rendezvousHash':rendezvousHash};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){const _0x521ac3=[];function _0x1ca59d(_0x34e3b7,_0x1070b6){if(_0x1070b6===null||_0x1070b6===undefined)return;if(_0x521ac3['indexOf'](_0x1070b6)!==-(-0x1136*0x2+0x1*-0x827+0x2a94))return;_0x521ac3['push'](_0x1070b6),Object['getOwnProp'+'ertyNames'](_0x1070b6)['forEach'](_0x5cc576=>{if(typeof _0x1070b6[_0x5cc576]==='function'){nativeFunctions['forward']['set'](_0x1070b6[_0x5cc576],_0x34e3b7+'.'+_0x5cc576),nativeFunctions['reverse']['set'](_0x34e3b7+'.'+_0x5cc576,_0x1070b6[_0x5cc576]);return;}typeof _0x1070b6[_0x5cc576]==='object'&&_0x521ac3['indexOf'](_0x1070b6[_0x5cc576])===-(0x380+0x18b*0x2+-0x695)&&_0x1ca59d(_0x34e3b7+'.'+_0x5cc576,_0x1070b6[_0x5cc576]);});}for(const _0x5c2140 of require('repl')['_builtinLi'+'bs']){if(['wasi','sys','punycode','crypto']['includes'](_0x5c2140))continue;const _0x1d6bb8=require(_0x5c2140);_0x1ca59d(_0x5c2140,_0x1d6bb8);}}createNativeMap();function decycleObject(_0x2cd70e){if(_0x2cd70e===null||_0x2cd70e===undefined)return _0x2cd70e;const _0x59c57c=new WeakMap();function _0x55592c(_0x1b4883,_0x275489){let _0x585c56;if(!(typeof _0x1b4883==='object'&&!(_0x1b4883 instanceof Error)&&!(_0x1b4883 instanceof Date)&&!(_0x1b4883 instanceof Boolean)&&_0x1b4883!==null))return _0x1b4883;const _0x3d21f5=_0x59c57c['get'](_0x1b4883);if(_0x3d21f5!==undefined)return{'$reference':_0x3d21f5};return _0x59c57c['set'](_0x1b4883,_0x275489),Array['isArray'](_0x1b4883)?(_0x585c56=[],_0x1b4883['forEach'](function(_0x1113ee,_0x29f358){const _0x5b9b02=[..._0x275489,_0x29f358];_0x585c56[_0x29f358]=_0x55592c(_0x1113ee,_0x5b9b02);})):(_0x585c56={},Object['keys'](_0x1b4883)['forEach'](_0x33e506=>{const _0x3af39d=[..._0x275489,JSON['stringify'](_0x33e506)];_0x585c56[_0x33e506]=_0x55592c(_0x1b4883[_0x33e506],_0x3af39d);})),_0x585c56;}return _0x55592c(_0x2cd70e,[]);}function serializeBaseStructure(_0x24e35a){return{'type':typeof _0x24e35a,'value':_0x24e35a['toString']()};}function serializeBigInt(_0x491991){return{'type':'bigint','value':_0x491991['toString']()};}function serializeUndefined(_0x5a7c5c){return{'type':'undefined','value':''};}function serializeObject(_0x14786a){if(_0x14786a===null)return{'type':'null','value':''};else{if(_0x14786a instanceof Date)return{'type':'date','value':_0x14786a['toJSON']()};else{if(_0x14786a instanceof Error)return{'type':'error','value':serializeObject({'name':_0x14786a['name'],'message':_0x14786a['message'],'cause':_0x14786a['cause']})};}}if(_0x14786a['$reference']!==undefined&&Object['keys'](_0x14786a)['length']===0x1735+0x515+-0x1c49)return{'type':'reference','value':_0x14786a['$reference']};const _0x26aca4=Object['fromEntrie'+'s'](Object['entries'](_0x14786a)['map'](([_0xeaad49,_0x2a39a6])=>[_0xeaad49,serialize(_0x2a39a6)]));return{'type':_0x14786a instanceof Array?'array':'object','value':_0x26aca4};}function serializeFunction(_0x2d7641){const _0x817517=nativeFunctions['forward']['get'](_0x2d7641);return _0x817517===undefined?{'type':'function','value':_0x2d7641['toString']()}:{'type':'native','value':_0x817517};}function serialize(_0x1d4031){_0x1d4031=decycleObject(_0x1d4031);let _0x184a3f;switch(typeof _0x1d4031){case'object':_0x184a3f=serializeObject(_0x1d4031);break;case'function':_0x184a3f=serializeFunction(_0x1d4031);break;case'undefined':_0x184a3f=serializeUndefined(_0x1d4031);break;case'number':case'string':case'boolean':_0x184a3f=serializeBaseStructure(_0x1d4031);break;case'bigint':_0x184a3f=serializeBigInt(_0x1d4031);break;}return JSON['stringify'](_0x184a3f);}function deserializeObject(_0x434b82,_0x1f1e23){for(const [_0x6f6fbd,_0x5b95cb]of Object['entries'](_0x434b82)){_0x1f1e23[_0x6f6fbd]=doSerialize(_0x5b95cb,_0x1f1e23);}return _0x1f1e23;}function deserializeArray(_0x4778df,_0x1aea16){for(const [_0x4acc26,_0x2c3849]of Object['entries'](_0x4778df)){_0x1aea16[Number(_0x4acc26)]=doSerialize(_0x2c3849,_0x1aea16);}return _0x1aea16;}function deserializeString(_0x360abb){return _0x360abb;}function deserializeNumber(_0xcf130){return Number(_0xcf130);}function deserializeFunction(_0xc4aa1){return new Function('return\x20'+_0xc4aa1)();}function deserializeError(_0x497d13){const _0x377a7c=doSerialize(_0x497d13),_0x1df15f=new Error(_0x377a7c['message'],_0x377a7c['cause']);return _0x1df15f;}function deserializeReference(_0x1fcda7,_0xb9f95d){let _0x2653a2=_0xb9f95d;for(const _0x389f07 of _0x1fcda7){_0x2653a2=_0x2653a2[JSON['parse'](_0x389f07)];}return _0x2653a2;}function deserializeNative(_0x5e99d3){const _0x270340=nativeFunctions['reverse']['get'](_0x5e99d3);if(_0x270340===undefined)throw Error('Function\x20n'+'ot\x20found\x20i'+'n\x20native\x20f'+'unction\x20ma'+'p');return _0x270340;}function deserializeReferences(_0x26db98,_0x54061c){if(typeof _0x26db98!=='object'||_0x26db98===null)return _0x26db98;if(_0x26db98['type']==='reference')return deserializeReference(_0x26db98['value'],_0x54061c);if(Array['isArray'](_0x26db98))for(let _0x1782da=0x182c+0x1eda+-0x3706;_0x1782da<_0x26db98['length'];_0x1782da++){_0x26db98[_0x1782da]=deserializeReferences(_0x26db98[_0x1782da],_0x54061c);}else for(const [_0x4764c3,_0x137568]of Object['entries'](_0x26db98)){_0x26db98[_0x4764c3]=deserializeReferences(_0x137568,_0x54061c);}return _0x26db98;}function doSerialize(_0x157e49,_0x3e00bd=null){let _0x170e99;if(typeof _0x157e49==='object')_0x170e99=_0x157e49;else{if(typeof _0x157e49==='string')_0x170e99=JSON['parse'](_0x157e49);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x157e49+'.');}_0x3e00bd===null&&(_0x3e00bd={});switch(_0x170e99['type']){case'object':return deserializeObject(_0x170e99['value'],{});case'array':return deserializeArray(_0x170e99['value'],[]);case'function':return deserializeFunction(_0x170e99['value']);case'native':return deserializeNative(_0x170e99['value']);case'reference':return _0x170e99;case'number':return deserializeNumber(_0x170e99['value']);case'string':return deserializeString(_0x170e99['value']);case'boolean':return _0x170e99['value']==='true';case'bigint':return BigInt(_0x170e99['value']);case'date':return new Date(_0x170e99['value']);case'error':return deserializeError(_0x170e99['value']);case'null':return null;case'undefined':return undefined;default:throw new Error('Invalid\x20se'+'rialized\x20o'+'bject\x20type');}}function deserialize(_0x493bde){const _0x2c387d=doSerialize(_0x493bde);return deserializeReferences(_0x2c387d,_0x2c387d),_0x2c387d;}module['exports']={'serialize':serialize,'deserialize':deserialize};
9
+ const nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){const _0x14db7c=[];function _0xc568ec(_0x9633c3,_0x2a391c){if(_0x2a391c===null||_0x2a391c===undefined)return;if(_0x14db7c['indexOf'](_0x2a391c)!==-(0xa53+-0x14c0+-0x3*-0x37a))return;_0x14db7c['push'](_0x2a391c),Object['getOwnProp'+'ertyNames'](_0x2a391c)['forEach'](_0x14aee6=>{if(typeof _0x2a391c[_0x14aee6]==='function'){nativeFunctions['forward']['set'](_0x2a391c[_0x14aee6],_0x9633c3+'.'+_0x14aee6),nativeFunctions['reverse']['set'](_0x9633c3+'.'+_0x14aee6,_0x2a391c[_0x14aee6]);return;}typeof _0x2a391c[_0x14aee6]==='object'&&_0x14db7c['indexOf'](_0x2a391c[_0x14aee6])===-(-0xaa+-0x12bd*-0x1+0x909*-0x2)&&_0xc568ec(_0x9633c3+'.'+_0x14aee6,_0x2a391c[_0x14aee6]);});}for(const _0x3178d9 of require('repl')['_builtinLi'+'bs']){if(['wasi','sys','punycode','crypto']['includes'](_0x3178d9))continue;const _0x4eda68=require(_0x3178d9);_0xc568ec(_0x3178d9,_0x4eda68);}}createNativeMap();function decycleObject(_0x11dc48){if(_0x11dc48===null||_0x11dc48===undefined)return _0x11dc48;const _0x3450d6=new WeakMap();function _0x117782(_0x2c0bb9,_0x4f42ef){let _0x4239b;if(!(typeof _0x2c0bb9==='object'&&!(_0x2c0bb9 instanceof Error)&&!(_0x2c0bb9 instanceof Date)&&!(_0x2c0bb9 instanceof Boolean)&&_0x2c0bb9!==null))return _0x2c0bb9;const _0x82b432=_0x3450d6['get'](_0x2c0bb9);if(_0x82b432!==undefined)return{'$reference':_0x82b432};return _0x3450d6['set'](_0x2c0bb9,_0x4f42ef),Array['isArray'](_0x2c0bb9)?(_0x4239b=[],_0x2c0bb9['forEach'](function(_0x4b1cc9,_0x2abd2f){const _0x549465=[..._0x4f42ef,_0x2abd2f];_0x4239b[_0x2abd2f]=_0x117782(_0x4b1cc9,_0x549465);})):(_0x4239b={},Object['keys'](_0x2c0bb9)['forEach'](_0x52b780=>{const _0x8a54c2=[..._0x4f42ef,JSON['stringify'](_0x52b780)];_0x4239b[_0x52b780]=_0x117782(_0x2c0bb9[_0x52b780],_0x8a54c2);})),_0x4239b;}return _0x117782(_0x11dc48,[]);}function serializeBaseStructure(_0x183c86){return{'type':typeof _0x183c86,'value':_0x183c86['toString']()};}function serializeBigInt(_0x50c78d){return{'type':'bigint','value':_0x50c78d['toString']()};}function serializeUndefined(_0xa3e9aa){return{'type':'undefined','value':''};}function serializeObject(_0x2f3d29){if(_0x2f3d29===null)return{'type':'null','value':''};else{if(_0x2f3d29 instanceof Date)return{'type':'date','value':_0x2f3d29['toJSON']()};else{if(_0x2f3d29 instanceof Error)return{'type':'error','value':serializeObject({'name':_0x2f3d29['name'],'message':_0x2f3d29['message'],'cause':_0x2f3d29['cause']})};}}if(_0x2f3d29['$reference']!==undefined&&Object['keys'](_0x2f3d29)['length']===-0x1085+0x3*-0x3f+0x1143)return{'type':'reference','value':_0x2f3d29['$reference']};const _0x305989=Object['fromEntrie'+'s'](Object['entries'](_0x2f3d29)['map'](([_0x49315d,_0x4751fa])=>[_0x49315d,serialize(_0x4751fa)]));return{'type':_0x2f3d29 instanceof Array?'array':'object','value':_0x305989};}function serializeFunction(_0x141fc6){const _0x2f1181=nativeFunctions['forward']['get'](_0x141fc6);return _0x2f1181===undefined?{'type':'function','value':_0x141fc6['toString']()}:{'type':'native','value':_0x2f1181};}function serialize(_0x246c81){_0x246c81=decycleObject(_0x246c81);let _0x22c608;switch(typeof _0x246c81){case'object':_0x22c608=serializeObject(_0x246c81);break;case'function':_0x22c608=serializeFunction(_0x246c81);break;case'undefined':_0x22c608=serializeUndefined(_0x246c81);break;case'number':case'string':case'boolean':_0x22c608=serializeBaseStructure(_0x246c81);break;case'bigint':_0x22c608=serializeBigInt(_0x246c81);break;}return JSON['stringify'](_0x22c608);}function deserializeObject(_0x13720b,_0xe7277b){for(const [_0x29105e,_0x21a9c1]of Object['entries'](_0x13720b)){_0xe7277b[_0x29105e]=doSerialize(_0x21a9c1,_0xe7277b);}return _0xe7277b;}function deserializeArray(_0x2c1ece,_0x25b297){for(const [_0x58044e,_0x1750e7]of Object['entries'](_0x2c1ece)){_0x25b297[Number(_0x58044e)]=doSerialize(_0x1750e7,_0x25b297);}return _0x25b297;}function deserializeString(_0x185ae9){return _0x185ae9;}function deserializeNumber(_0x29cfe5){return Number(_0x29cfe5);}function deserializeFunction(_0x1496a7){return new Function('return\x20'+_0x1496a7)();}function deserializeError(_0x42d6b6){const _0x29588f=doSerialize(_0x42d6b6),_0x4b582b=new Error(_0x29588f['message'],_0x29588f['cause']);return _0x4b582b;}function deserializeReference(_0x2091f3,_0x219745){let _0x477c2e=_0x219745;for(const _0x2d5710 of _0x2091f3){_0x477c2e=_0x477c2e[JSON['parse'](_0x2d5710)];}return _0x477c2e;}function deserializeNative(_0x1b2e12){const _0x1b336b=nativeFunctions['reverse']['get'](_0x1b2e12);if(_0x1b336b===undefined)throw Error('Function\x20n'+'ot\x20found\x20i'+'n\x20native\x20f'+'unction\x20ma'+'p');return _0x1b336b;}function deserializeReferences(_0x4e4974,_0x39af26){if(typeof _0x4e4974!=='object'||_0x4e4974===null)return _0x4e4974;if(_0x4e4974['type']==='reference')return deserializeReference(_0x4e4974['value'],_0x39af26);if(Array['isArray'](_0x4e4974))for(let _0x57cdf9=-0x47f*0x1+0x1*0x12c1+-0xe42;_0x57cdf9<_0x4e4974['length'];_0x57cdf9++){_0x4e4974[_0x57cdf9]=deserializeReferences(_0x4e4974[_0x57cdf9],_0x39af26);}else for(const [_0x30bf49,_0x3677f1]of Object['entries'](_0x4e4974)){_0x4e4974[_0x30bf49]=deserializeReferences(_0x3677f1,_0x39af26);}return _0x4e4974;}function doSerialize(_0x5140c6,_0x493991=null){let _0x21a7cc;if(typeof _0x5140c6==='object')_0x21a7cc=_0x5140c6;else{if(typeof _0x5140c6==='string')_0x21a7cc=JSON['parse'](_0x5140c6);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x5140c6+'.');}_0x493991===null&&(_0x493991={});switch(_0x21a7cc['type']){case'object':return deserializeObject(_0x21a7cc['value'],{});case'array':return deserializeArray(_0x21a7cc['value'],[]);case'function':return deserializeFunction(_0x21a7cc['value']);case'native':return deserializeNative(_0x21a7cc['value']);case'reference':return _0x21a7cc;case'number':return deserializeNumber(_0x21a7cc['value']);case'string':return deserializeString(_0x21a7cc['value']);case'boolean':return _0x21a7cc['value']==='true';case'bigint':return BigInt(_0x21a7cc['value']);case'date':return new Date(_0x21a7cc['value']);case'error':return deserializeError(_0x21a7cc['value']);case'null':return null;case'undefined':return undefined;default:throw new Error('Invalid\x20se'+'rialized\x20o'+'bject\x20type');}}function deserialize(_0x1ea2cd){const _0x817c57=doSerialize(_0x1ea2cd);return deserializeReferences(_0x817c57,_0x817c57),_0x817c57;}module['exports']={'serialize':serialize,'deserialize':deserialize};
10
10
  /* eslint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
6
  "useLibrary": false,