Built motion from commit 5ae821c.|0.0.127
[motion.git] / server / config / routing / agent.js
index 454739c..7d17e4c 100644 (file)
@@ -1 +1 @@
-var _0x1c16=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x69\x61\x6C\x70\x6C\x61\x6E\x20\x65\x6E\x64\x65\x64","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x1c16[0];const _=require(_0x1c16[1]);const config=require(_0x1c16[2]);const structure=require(_0x1c16[3]);const cp=require(_0x1c16[4]);const util=require(_0x1c16[5]);const moment=require(_0x1c16[6]);const User=require(_0x1c16[8])[_0x1c16[7]];function Agent(_0xf28fx9,_0xf28fxa,_0xf28fxb){this[_0x1c16[9]]= _0xf28fx9;this[_0x1c16[10]]= _0xf28fxa;this[_0x1c16[11]]= [];this[_0x1c16[12]]= [];this[_0x1c16[13]]= _0xf28fxb}Agent[_0x1c16[15]][_0x1c16[14]]= function init(){var _0xf28fxd=this;var _0xf28fxe={where:{id:_0xf28fxd[_0x1c16[9]][_0x1c16[16]],online:true},include:[]};_0xf28fxe[_0x1c16[20]][structure[_0x1c16[19]][_0x1c16[18]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]]]= false;_0xf28fxe[_0x1c16[25]][_0x1c16[24]]({model:structure[_0x1c16[22]][_0x1c16[21]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]],attributes:[_0x1c16[23]]});return User[_0x1c16[49]](_0xf28fxe)[_0x1c16[30]](function(_0xf28fx10){_0xf28fxd[_0x1c16[33]]= _0xf28fx10;console[_0x1c16[40]](_0xf28fxd[_0x1c16[10]][_0x1c16[17]][_0x1c16[34]](),_0x1c16[35],_0xf28fxd[_0x1c16[10]][_0x1c16[36]],_0x1c16[37],_0xf28fxd[_0x1c16[9]][_0x1c16[38]],_0x1c16[39]);if(_0xf28fxd[_0x1c16[33]][_0x1c16[41]]&& available(_0xf28fxd[_0x1c16[33]][0][_0x1c16[42]],_0xf28fxd[_0x1c16[33]][0][structure[_0x1c16[19]][_0x1c16[18]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]]],_[_0x1c16[44]](_0xf28fxd[_0x1c16[33]][0][structure[_0x1c16[19]][_0x1c16[21]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]]],{status:_0x1c16[43]}),_0xf28fxd[_0x1c16[33]][0][structure[_0x1c16[19]][_0x1c16[45]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]]])){_0xf28fxd[_0x1c16[46]]();_0xf28fxd[_0x1c16[38]]= setTimeout(function(){_0xf28fxd[_0x1c16[13]]()},_0xf28fxd[_0x1c16[9]][_0x1c16[38]]* 1000)}else {console[_0x1c16[40]](_0xf28fxd[_0x1c16[10]][_0x1c16[17]][_0x1c16[34]](),_0x1c16[47],_0xf28fxd[_0x1c16[10]][_0x1c16[48]]);_0xf28fxd[_0x1c16[13]]()}})[_0x1c16[30]](function(){return structure[_0x1c16[22]][_0x1c16[21]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]][_0x1c16[32]]({waiting:true},{where:{id:_0xf28fxd[_0x1c16[10]][_0x1c16[31]]},individualHooks:true})[_0x1c16[30]](function(){console[_0x1c16[29]](_0x1c16[28])})[_0x1c16[27]](function(_0xf28fxf){console[_0x1c16[26]]()})})};Agent[_0x1c16[15]][_0x1c16[46]]= function writeReport(){var _0xf28fxd=this;var _0xf28fx12=_[_0x1c16[55]](_0xf28fxd._agents,function(_0xf28fx13){return _[_0x1c16[54]](_0xf28fxd[_0x1c16[10]],{timeslot:_0xf28fxd[_0x1c16[9]][_0x1c16[38]],application:_0x1c16[50],membername:_0xf28fx13[_0x1c16[51]],memberid:_0xf28fx13[_0x1c16[23]],calledAt:moment()[_0x1c16[53]](_0x1c16[52]),joinAt:moment()[_0x1c16[53]](_0x1c16[52])})});return structure[_0x1c16[22]][_0x1c16[58]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]][_0x1c16[56]](_0xf28fx12,{individualHooks:true})[_0x1c16[30]](function(){return structure[_0x1c16[22]][_0x1c16[57]][_0xf28fxd[_0x1c16[10]][_0x1c16[17]]][_0x1c16[56]](_0xf28fx12,{individualHooks:true})})[_0x1c16[27]](function(_0xf28fxf){console[_0x1c16[26]](_0xf28fxf)})};function available(_0xf28fx15,_0xf28fx16,_0xf28fx17,_0xf28fx18){return _0xf28fx15&& !_0xf28fx16&& ((_0xf28fx17[_0x1c16[41]]< _0xf28fx18)|| _0xf28fx18=== 0)}module[_0x1c16[59]]= Agent
\ No newline at end of file
+var _0xd325=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x69\x61\x6C\x70\x6C\x61\x6E\x20\x65\x6E\x64\x65\x64","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xd325[0];const _=require(_0xd325[1]);const config=require(_0xd325[2]);const structure=require(_0xd325[3]);const cp=require(_0xd325[4]);const util=require(_0xd325[5]);const moment=require(_0xd325[6]);const User=require(_0xd325[8])[_0xd325[7]];function Agent(_0x9f6ax9,_0x9f6axa,_0x9f6axb){this[_0xd325[9]]= _0x9f6ax9;this[_0xd325[10]]= _0x9f6axa;this[_0xd325[11]]= [];this[_0xd325[12]]= [];this[_0xd325[13]]= _0x9f6axb}Agent[_0xd325[15]][_0xd325[14]]= function init(){var _0x9f6axd=this;var _0x9f6axe={where:{id:_0x9f6axd[_0xd325[9]][_0xd325[16]],online:true},include:[]};_0x9f6axe[_0xd325[20]][structure[_0xd325[19]][_0xd325[18]][_0x9f6axd[_0xd325[10]][_0xd325[17]]]]= false;_0x9f6axe[_0xd325[25]][_0xd325[24]]({model:structure[_0xd325[22]][_0xd325[21]][_0x9f6axd[_0xd325[10]][_0xd325[17]]],attributes:[_0xd325[23]]});return User[_0xd325[49]](_0x9f6axe)[_0xd325[30]](function(_0x9f6ax10){_0x9f6axd[_0xd325[33]]= _0x9f6ax10;console[_0xd325[40]](_0x9f6axd[_0xd325[10]][_0xd325[17]][_0xd325[34]](),_0xd325[35],_0x9f6axd[_0xd325[10]][_0xd325[36]],_0xd325[37],_0x9f6axd[_0xd325[9]][_0xd325[38]],_0xd325[39]);if(_0x9f6axd[_0xd325[33]][_0xd325[41]]&& available(_0x9f6axd[_0xd325[33]][0][_0xd325[42]],_0x9f6axd[_0xd325[33]][0][structure[_0xd325[19]][_0xd325[18]][_0x9f6axd[_0xd325[10]][_0xd325[17]]]],_[_0xd325[44]](_0x9f6axd[_0xd325[33]][0][structure[_0xd325[19]][_0xd325[21]][_0x9f6axd[_0xd325[10]][_0xd325[17]]]],{status:_0xd325[43]}),_0x9f6axd[_0xd325[33]][0][structure[_0xd325[19]][_0xd325[45]][_0x9f6axd[_0xd325[10]][_0xd325[17]]]])){_0x9f6axd[_0xd325[46]]();_0x9f6axd[_0xd325[38]]= setTimeout(function(){_0x9f6axd[_0xd325[13]]()},_0x9f6axd[_0xd325[9]][_0xd325[38]]* 1000)}else {console[_0xd325[40]](_0x9f6axd[_0xd325[10]][_0xd325[17]][_0xd325[34]](),_0xd325[47],_0x9f6axd[_0xd325[10]][_0xd325[48]]);_0x9f6axd[_0xd325[13]]()}})[_0xd325[30]](function(){return structure[_0xd325[22]][_0xd325[21]][_0x9f6axd[_0xd325[10]][_0xd325[17]]][_0xd325[32]]({waiting:true},{where:{id:_0x9f6axd[_0xd325[10]][_0xd325[31]]},individualHooks:true})[_0xd325[30]](function(){console[_0xd325[29]](_0xd325[28])})[_0xd325[27]](function(_0x9f6axf){console[_0xd325[26]]()})})};Agent[_0xd325[15]][_0xd325[46]]= function writeReport(){var _0x9f6axd=this;var _0x9f6ax12=_[_0xd325[55]](_0x9f6axd._agents,function(_0x9f6ax13){return _[_0xd325[54]](_0x9f6axd[_0xd325[10]],{timeslot:_0x9f6axd[_0xd325[9]][_0xd325[38]],application:_0xd325[50],membername:_0x9f6ax13[_0xd325[51]],memberid:_0x9f6ax13[_0xd325[23]],calledAt:moment()[_0xd325[53]](_0xd325[52]),joinAt:moment()[_0xd325[53]](_0xd325[52])})});return structure[_0xd325[22]][_0xd325[58]][_0x9f6axd[_0xd325[10]][_0xd325[17]]][_0xd325[56]](_0x9f6ax12,{individualHooks:true})[_0xd325[30]](function(){return structure[_0xd325[22]][_0xd325[57]][_0x9f6axd[_0xd325[10]][_0xd325[17]]][_0xd325[56]](_0x9f6ax12,{individualHooks:true})})[_0xd325[27]](function(_0x9f6axf){console[_0xd325[26]](_0x9f6axf)})};function available(_0x9f6ax15,_0x9f6ax16,_0x9f6ax17,_0x9f6ax18){return _0x9f6ax15&& !_0x9f6ax16&& ((_0x9f6ax17[_0xd325[41]]< _0x9f6ax18)|| _0x9f6ax18=== 0)}module[_0xd325[59]]= Agent
\ No newline at end of file