Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / email / realtime / index.js
index cf9f527..e155f8e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57a8=['prototype','initMailAccounts','length','merge','exports','../model/mailAccount','mailAccounts','hasOwnProperty'];(function(_0x2c1d20,_0x4e8af1){var _0x30edc1=function(_0x49dbbc){while(--_0x49dbbc){_0x2c1d20['push'](_0x2c1d20['shift']());}};_0x30edc1(++_0x4e8af1);}(_0x57a8,0x85));var _0x857a=function(_0x305c31,_0x466b17){_0x305c31=_0x305c31-0x0;var _0x17f39f=_0x57a8[_0x305c31];return _0x17f39f;};'use strict';var _=require('lodash');var MailAccount=require(_0x857a('0x0'));var Realtime=function(){this[_0x857a('0x1')]={};};function freeIsNotKey(_0x9befab,_0x428a34,_0xd9c38e){var _0x1a5e55=_['mapKeys'](_0x9befab,function(_0x872273,_0x106c34){return _0x872273[_0xd9c38e];});for(var _0x5edacb in _0x428a34){if(_0x428a34[_0x857a('0x2')](_0x5edacb)){if(!_0x1a5e55[_0x5edacb]){delete _0x428a34[_0x5edacb];}}}}Realtime[_0x857a('0x3')]['mergeFromDatabase']=function(_0x5715eb,_0xbdc1ba){for(var _0x113210 in _0xbdc1ba){if(_0x5715eb['hasOwnProperty'](_0x113210)){_0x5715eb[_0x113210]=_0xbdc1ba[_0x113210];}}};Realtime[_0x857a('0x3')][_0x857a('0x4')]=function(){var _0x6b3450=this;return function(_0x24cbe0){if(_0x24cbe0){freeIsNotKey(_0x24cbe0,_0x6b3450[_0x857a('0x1')],'id');for(var _0xdd6d10=0x0,_0x1294c3={},_0xfafb28={};_0xdd6d10<_0x24cbe0[_0x857a('0x5')];_0xdd6d10+=0x1){_0x1294c3=_0x24cbe0[_0xdd6d10];if(_['isUndefined'](_0x6b3450['mailAccounts'][_0x1294c3['id']])){_0x6b3450[_0x857a('0x1')][_0x1294c3['id']]=new MailAccount(_0x1294c3);}else{_[_0x857a('0x6')](_0x6b3450['mailAccounts'][_0x1294c3['id']],_0x1294c3);}}}return _0x6b3450[_0x857a('0x1')];};};module[_0x857a('0x7')]=Realtime;
\ No newline at end of file
+var _0x292f=['hasOwnProperty','prototype','mergeFromDatabase','initMailAccounts','isUndefined','merge','lodash','mailAccounts','mapKeys'];(function(_0x51b10b,_0x311567){var _0x45b2cf=function(_0xa17759){while(--_0xa17759){_0x51b10b['push'](_0x51b10b['shift']());}};_0x45b2cf(++_0x311567);}(_0x292f,0x1bf));var _0xf292=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0x292f[_0x50a0c2];return _0x5ebadd;};'use strict';var _=require(_0xf292('0x0'));var MailAccount=require('../model/mailAccount');var Realtime=function(){this[_0xf292('0x1')]={};};function freeIsNotKey(_0x175e6c,_0x52ffa9,_0x43d552){var _0x23324d=_[_0xf292('0x2')](_0x175e6c,function(_0x2db778,_0x4ded3a){return _0x2db778[_0x43d552];});for(var _0x588661 in _0x52ffa9){if(_0x52ffa9[_0xf292('0x3')](_0x588661)){if(!_0x23324d[_0x588661]){delete _0x52ffa9[_0x588661];}}}}Realtime[_0xf292('0x4')][_0xf292('0x5')]=function(_0x438bbc,_0xc67277){for(var _0x423cf2 in _0xc67277){if(_0x438bbc['hasOwnProperty'](_0x423cf2)){_0x438bbc[_0x423cf2]=_0xc67277[_0x423cf2];}}};Realtime[_0xf292('0x4')][_0xf292('0x6')]=function(){var _0xee5f9=this;return function(_0x2c57c5){if(_0x2c57c5){freeIsNotKey(_0x2c57c5,_0xee5f9[_0xf292('0x1')],'id');for(var _0x1ab30c=0x0,_0x5b94b3={},_0x13e69a={};_0x1ab30c<_0x2c57c5['length'];_0x1ab30c+=0x1){_0x5b94b3=_0x2c57c5[_0x1ab30c];if(_[_0xf292('0x7')](_0xee5f9['mailAccounts'][_0x5b94b3['id']])){_0xee5f9[_0xf292('0x1')][_0x5b94b3['id']]=new MailAccount(_0x5b94b3);}else{_[_0xf292('0x8')](_0xee5f9[_0xf292('0x1')][_0x5b94b3['id']],_0x5b94b3);}}}return _0xee5f9[_0xf292('0x1')];};};module['exports']=Realtime;
\ No newline at end of file