Built motion from commit b51cdcb3f2cb46634587ce1d55ea1b8f32dacea6. Version 3.0.0...
[motion-next.git] / server / services / email / realtime / index.js
1 const a1156_0x5c38=['undefined','merge','exports','../model/mailAccount','prototype','initMailAccounts','mailAccounts','length','mergeFromDatabase'];(function(_0x19f54b,_0x5c38c5){const _0x21532f=function(_0x9bda75){while(--_0x9bda75){_0x19f54b['push'](_0x19f54b['shift']());}};_0x21532f(++_0x5c38c5);}(a1156_0x5c38,0x9b));const a1156_0x2153=function(_0x19f54b,_0x5c38c5){_0x19f54b=_0x19f54b-0x0;let _0x21532f=a1156_0x5c38[_0x19f54b];return _0x21532f;};const _0x433df1=a1156_0x2153;'use strict';const _=require('lodash'),MailAccount=require(_0x433df1('0x1')),Realtime=function(){this['mailAccounts']={};};function freeIsNotKey(_0x9bda75,_0x449578,_0x1b0ab1){const _0x4deb92=_0x433df1,_0x54549b=_['mapKeys'](_0x9bda75,function(_0x44e52d){return _0x44e52d[_0x1b0ab1];});for(const _0x340994 in _0x449578){typeof _0x449578[_0x340994]!==_0x4deb92('0x7')&&(!_0x54549b[_0x340994]&&delete _0x449578[_0x340994]);}}Realtime[_0x433df1('0x2')][_0x433df1('0x6')]=function(_0x4c06ce,_0x1c2d08){for(const _0x5a2589 in _0x1c2d08){typeof _0x4c06ce[_0x5a2589]!=='undefined'&&(_0x4c06ce[_0x5a2589]=_0x1c2d08[_0x5a2589]);}},Realtime[_0x433df1('0x2')][_0x433df1('0x3')]=function(){const _0x185168=this;return function(_0x4e2e3b){const _0x147ca0=a1156_0x2153;if(_0x4e2e3b){freeIsNotKey(_0x4e2e3b,_0x185168[_0x147ca0('0x4')],'id');for(let _0x296b3d=0x0,_0x4af004={};_0x296b3d<_0x4e2e3b[_0x147ca0('0x5')];_0x296b3d+=0x1){_0x4af004=_0x4e2e3b[_0x296b3d],_['isUndefined'](_0x185168[_0x147ca0('0x4')][_0x4af004['id']])?_0x185168[_0x147ca0('0x4')][_0x4af004['id']]=new MailAccount(_0x4af004):_[_0x147ca0('0x8')](_0x185168['mailAccounts'][_0x4af004['id']],_0x4af004);}}return _0x185168['mailAccounts'];};},module[_0x433df1('0x0')]=Realtime;