Built motion from commit ec3309576.|1.0.33
[motion.git] / server / config / routing / agent.js
index 8926cef..4070826 100644 (file)
@@ -1 +1 @@
-var _0xb3b5=["\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","\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","\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","\x74\x68\x65\x6E","\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","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\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","\x6F\x6E\x6C\x69\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb3b5[0];const _=require(_0xb3b5[1]);const config=require(_0xb3b5[2]);const structure=require(_0xb3b5[3]);const cp=require(_0xb3b5[4]);const util=require(_0xb3b5[5]);const moment=require(_0xb3b5[6]);const User=require(_0xb3b5[8])[_0xb3b5[7]];function Agent(_0x8c6ex9,_0x8c6exa,_0x8c6exb){this[_0xb3b5[9]]= _0x8c6ex9;this[_0xb3b5[10]]= _0x8c6exa;this[_0xb3b5[11]]= [];this[_0xb3b5[12]]= [];this[_0xb3b5[13]]= _0x8c6exb}Agent[_0xb3b5[15]][_0xb3b5[14]]= function init(){var _0x8c6exd=this;var _0x8c6exe={where:{id:_0x8c6exd[_0xb3b5[9]][_0xb3b5[16]],online:true},include:[]};_0x8c6exe[_0xb3b5[20]][structure[_0xb3b5[19]][_0xb3b5[18]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]]]= false;_0x8c6exe[_0xb3b5[25]][_0xb3b5[24]]({model:structure[_0xb3b5[22]][_0xb3b5[21]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]],attributes:[_0xb3b5[23]]});return User[_0xb3b5[42]](_0x8c6exe)[_0xb3b5[41]](function(_0x8c6exf){_0x8c6exd[_0xb3b5[26]]= _0x8c6exf;console[_0xb3b5[33]](_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]][_0xb3b5[27]](),_0xb3b5[28],_0x8c6exd[_0xb3b5[10]][_0xb3b5[29]],_0xb3b5[30],_0x8c6exd[_0xb3b5[9]][_0xb3b5[31]],_0xb3b5[32]);if(_0x8c6exd[_0xb3b5[26]][_0xb3b5[34]]&& available(_0x8c6exd[_0xb3b5[26]][0],_0x8c6exd[_0xb3b5[26]][0][structure[_0xb3b5[19]][_0xb3b5[18]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]]],_[_0xb3b5[36]](_0x8c6exd[_0xb3b5[26]][0][structure[_0xb3b5[19]][_0xb3b5[21]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]]],{status:_0xb3b5[35]}),_0x8c6exd[_0xb3b5[26]][0][structure[_0xb3b5[19]][_0xb3b5[37]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]]])){_0x8c6exd[_0xb3b5[38]]();_0x8c6exd[_0xb3b5[31]]= setTimeout(function(){_0x8c6exd[_0xb3b5[13]]()},_0x8c6exd[_0xb3b5[9]][_0xb3b5[31]]* 1000)}else {console[_0xb3b5[33]](_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]][_0xb3b5[27]](),_0xb3b5[39],_0x8c6exd[_0xb3b5[10]][_0xb3b5[40]]);_0x8c6exd[_0xb3b5[13]]()}})};Agent[_0xb3b5[15]][_0xb3b5[38]]= function writeReport(){var _0x8c6exd=this;var _0x8c6ex11=_[_0xb3b5[48]](_0x8c6exd._agents,function(_0x8c6ex12){return _[_0xb3b5[47]](_0x8c6exd[_0xb3b5[10]],{timeslot:_0x8c6exd[_0xb3b5[9]][_0xb3b5[31]],application:_0xb3b5[43],membername:_0x8c6ex12[_0xb3b5[44]],memberid:_0x8c6ex12[_0xb3b5[23]],calledAt:moment()[_0xb3b5[46]](_0xb3b5[45]),joinAt:moment()[_0xb3b5[46]](_0xb3b5[45])})});return structure[_0xb3b5[22]][_0xb3b5[53]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]][_0xb3b5[51]](_0x8c6ex11,{individualHooks:true})[_0xb3b5[41]](function(){return structure[_0xb3b5[22]][_0xb3b5[52]][_0x8c6exd[_0xb3b5[10]][_0xb3b5[17]]][_0xb3b5[51]](_0x8c6ex11,{individualHooks:true})})[_0xb3b5[50]](function(_0x8c6ex13){console[_0xb3b5[49]](_0x8c6ex13)})};function available(_0x8c6ex12,_0x8c6ex15,_0x8c6ex16,_0x8c6ex17){return _0x8c6ex12[_0xb3b5[54]]&& !_0x8c6ex15&& ((_0x8c6ex16[_0xb3b5[34]]< _0x8c6ex17)|| _0x8c6ex17=== 0)}module[_0xb3b5[55]]= Agent
\ No newline at end of file
+var _0x6acf=["\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","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\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"];_0x6acf[0];const _=require(_0x6acf[1]);const config=require(_0x6acf[2]);const structure=require(_0x6acf[3]);const cp=require(_0x6acf[4]);const util=require(_0x6acf[5]);const moment=require(_0x6acf[6]);const User=require(_0x6acf[8])[_0x6acf[7]];function Agent(_0x5069x9,_0x5069xa,_0x5069xb){this[_0x6acf[9]]= _0x5069x9;this[_0x6acf[10]]= _0x5069xa;this[_0x6acf[11]]= [];this[_0x6acf[12]]= [];this[_0x6acf[13]]= _0x5069xb}Agent[_0x6acf[15]][_0x6acf[14]]= function init(){var _0x5069xd=this;var _0x5069xe={where:{id:_0x5069xd[_0x6acf[9]][_0x6acf[16]],online:true},include:[]};_0x5069xe[_0x6acf[20]][structure[_0x6acf[19]][_0x6acf[18]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]]]= false;_0x5069xe[_0x6acf[25]][_0x6acf[24]]({model:structure[_0x6acf[22]][_0x6acf[21]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]],attributes:[_0x6acf[23]]});return User[_0x6acf[49]](_0x5069xe)[_0x6acf[30]](function(_0x5069x10){_0x5069xd[_0x6acf[33]]= _0x5069x10;console[_0x6acf[40]](_0x5069xd[_0x6acf[10]][_0x6acf[17]][_0x6acf[34]](),_0x6acf[35],_0x5069xd[_0x6acf[10]][_0x6acf[36]],_0x6acf[37],_0x5069xd[_0x6acf[9]][_0x6acf[38]],_0x6acf[39]);if(_0x5069xd[_0x6acf[33]][_0x6acf[41]]&& available(_0x5069xd[_0x6acf[33]][0][_0x6acf[42]],_0x5069xd[_0x6acf[33]][0][structure[_0x6acf[19]][_0x6acf[18]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]]],_[_0x6acf[44]](_0x5069xd[_0x6acf[33]][0][structure[_0x6acf[19]][_0x6acf[21]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]]],{status:_0x6acf[43]}),_0x5069xd[_0x6acf[33]][0][structure[_0x6acf[19]][_0x6acf[45]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]]])){_0x5069xd[_0x6acf[46]]();_0x5069xd[_0x6acf[38]]= setTimeout(function(){_0x5069xd[_0x6acf[13]]()},_0x5069xd[_0x6acf[9]][_0x6acf[38]]* 1000)}else {console[_0x6acf[40]](_0x5069xd[_0x6acf[10]][_0x6acf[17]][_0x6acf[34]](),_0x6acf[47],_0x5069xd[_0x6acf[10]][_0x6acf[48]]);_0x5069xd[_0x6acf[13]]()}})[_0x6acf[30]](function(){return structure[_0x6acf[22]][_0x6acf[21]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]][_0x6acf[32]]({waiting:true},{where:{id:_0x5069xd[_0x6acf[10]][_0x6acf[31]]},individualHooks:true})[_0x6acf[30]](function(){console[_0x6acf[29]](_0x6acf[28])})[_0x6acf[27]](function(_0x5069xf){console[_0x6acf[26]]()})})};Agent[_0x6acf[15]][_0x6acf[46]]= function writeReport(){var _0x5069xd=this;var _0x5069x12=_[_0x6acf[55]](_0x5069xd._agents,function(_0x5069x13){return _[_0x6acf[54]](_0x5069xd[_0x6acf[10]],{timeslot:_0x5069xd[_0x6acf[9]][_0x6acf[38]],application:_0x6acf[50],membername:_0x5069x13[_0x6acf[51]],memberid:_0x5069x13[_0x6acf[23]],calledAt:moment()[_0x6acf[53]](_0x6acf[52]),joinAt:moment()[_0x6acf[53]](_0x6acf[52])})});return structure[_0x6acf[22]][_0x6acf[58]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]][_0x6acf[56]](_0x5069x12,{individualHooks:true})[_0x6acf[30]](function(){return structure[_0x6acf[22]][_0x6acf[57]][_0x5069xd[_0x6acf[10]][_0x6acf[17]]][_0x6acf[56]](_0x5069x12,{individualHooks:true})})[_0x6acf[27]](function(_0x5069xf){console[_0x6acf[26]](_0x5069xf)})};function available(_0x5069x15,_0x5069x16,_0x5069x17,_0x5069x18){return _0x5069x15&&  !_0x5069x16&& ((_0x5069x17[_0x6acf[41]]< _0x5069x18)|| _0x5069x18=== 0)}module[_0x6acf[59]]= Agent
\ No newline at end of file