Built motion from commit 943eae279.|1.0.24
[motion.git] / server / config / forked_routing / mail / queue.js
index b9d8165..b9bbab2 100644 (file)
@@ -1 +1 @@
-var _0x6b28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x72\x65\x71\x75\x65\x73\x74","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0x6b28[0];var _=require(_0x6b28[1]);var util=require(_0x6b28[2]);var moment=require(_0x6b28[3]);var logger=require(_0x6b28[5])(_0x6b28[4]);module[_0x6b28[6]]= function(_0x11cdx5,_0x11cdx6,_0x11cdx7,_0x11cdx8,_0x11cdx9,_0x11cdxa){var _0x11cdxb=[];var _0x11cdxc;var _0x11cdxd;var _0x11cdxe;var _0x11cdxf=0;process[_0x6b28[24]](_0x6b28[7],function(_0x11cdx7){switch(_0x11cdx7[_0x6b28[23]]){case _0x6b28[22]:logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[16],_0x11cdx7[_0x6b28[17]],_0x6b28[18]);_0x11cdxb[_0x6b28[21]]({id:_0x11cdx7[_0x6b28[20]]});break;default:}});function _0x11cdx10(_0x11cdx11){var _0x11cdx12=_[_0x6b28[25]](_0x11cdxb,{id:_0x11cdx11[_0x6b28[20]]});return _0x11cdx12?true:false}function _0x11cdx13(){var _0x11cdx14=((_0x11cdx5[_0x6b28[26]]- _0x11cdxf)> _0x11cdxe[_0x6b28[26]])?_0x11cdxe[_0x6b28[26]]:(_0x11cdx5[_0x6b28[26]]- _0x11cdxf);if(_0x11cdx14> 0){if(_0x11cdxd[_0x6b28[27]]){var _0x11cdx15={where:{id:{$in:_[_0x6b28[28]](_0x11cdxd,_0x6b28[20])},online:true,mailPause:false},include:[{model:_0x6b28[29],attributes:[_0x6b28[20]],raw:true}],attributes:[_0x6b28[20],_0x6b28[11],_0x6b28[30],_0x6b28[31],_0x6b28[32]],order:[[{raw:util[_0x6b28[35]](_0x6b28[33],_[_0x6b28[28]](_0x11cdxd,_0x6b28[20])[_0x6b28[34]]())}]]};return _0x11cdx9[_0x6b28[54]](_0x6b28[56],[_0x6b28[57],_0x11cdx15])[_0x6b28[39]](function(_0x11cdx18){if(_0x11cdx18[_0x6b28[27]]){var _0x11cdx19;for(var _0x11cdx1a=0;_0x11cdx1a< _0x11cdx18[_0x6b28[27]];_0x11cdx1a++){var _0x11cdx11=_0x11cdx18[_0x11cdx1a];if(!_0x11cdx10(_0x11cdx11)){_0x11cdx19= _0x11cdx11;break}};if(_0x11cdx19){logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[45],_0x11cdx19[_0x6b28[20]],_0x11cdx19[_0x6b28[11]]);var _0x11cdx1b=_[_0x6b28[46]](_0x11cdxd,{"\x69\x64":_0x11cdx19[_0x6b28[20]]});if(_0x11cdx1b>= 0){var _0x11cdx1c=_0x11cdxd[_0x6b28[47]](_0x11cdx1b,1);if(_0x11cdx1c&& _0x11cdx1c[_0x6b28[27]]){_0x11cdxd[_0x6b28[21]](_[_0x6b28[48]](_0x11cdx1c))}};return _0x11cdx9[_0x6b28[54]](_0x6b28[49],[_0x6b28[50],_[_0x6b28[53]](_0x11cdx6,{timeslot:_0x11cdx14,application:_0x6b28[51],membername:_0x11cdx19[_0x6b28[11]],memberid:_0x11cdx19[_0x6b28[20]],queue:_0x11cdxe[_0x6b28[20]],queuename:_0x11cdxe[_0x6b28[11]],calledAt:moment()[_0x6b28[35]](_0x6b28[52])})])};logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55]);return}else {logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55]);return}})[_0x6b28[39]](function(_0x11cdx17){if(_0x11cdx17){_0x11cdx8[_0x6b28[44]](util[_0x6b28[35]](_0x6b28[42],_0x11cdx17[_0x6b28[43]]))[_0x6b28[41]](_0x6b28[40],_0x11cdx17)}})[_0x6b28[39]](function(){_0x11cdxc= setTimeout(function(){_0x11cdxf+= _0x11cdxe[_0x6b28[26]];_0x11cdx13()},_0x11cdx14* 1000)})[_0x6b28[38]](function(_0x11cdx16){logger[_0x6b28[37]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[36]);_0x11cdxa(_0x11cdx16)})}else {logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55]);_0x11cdxc= setTimeout(function(){_0x11cdxf+= _0x11cdxe[_0x6b28[26]];_0x11cdx13()},_0x11cdx14* 1000)}}else {return _0x11cdx9[_0x6b28[54]](_0x6b28[62],[_0x6b28[63],{leaveAt:moment()[_0x6b28[35]](_0x6b28[52]),timeout:true},{where:{uniqueid:_0x11cdx6[_0x6b28[15]],leaveAt:null},individualHooks:true}])[_0x6b28[39]](function(_0x11cdx1d){if(_0x11cdx1d){_0x11cdx8[_0x6b28[44]](_0x6b28[59])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d);_0x11cdx8[_0x6b28[44]](_0x6b28[60])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d)};logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[61]);clearTimeout(_0x11cdxc);_0x11cdxa()})[_0x6b28[38]](function(_0x11cdx16){logger[_0x6b28[37]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[36]);_0x11cdxa(_0x11cdx16)})}}function _0x11cdx1e(){var _0x11cdx14=((_0x11cdx5[_0x6b28[26]]- _0x11cdxf)> _0x11cdxe[_0x6b28[26]])?_0x11cdxe[_0x6b28[26]]:(_0x11cdx5[_0x6b28[26]]- _0x11cdxf);if(_0x11cdx14> 0){return _0x11cdx9[_0x6b28[54]](_0x6b28[70],[_0x6b28[71],{where:{id:_0x11cdx5[_0x6b28[72]]},attributes:[_0x6b28[20],_0x6b28[11],_0x6b28[26],_0x6b28[13],_0x6b28[73]],include:[{model:_0x6b28[57],where:{online:true,mailPause:false},attributes:[_0x6b28[20],_0x6b28[11],_0x6b28[30],_0x6b28[31],_0x6b28[32]],raw:true}]}])[_0x6b28[39]](function(_0x11cdx20){if(_0x11cdx20){var _0x11cdx18=_[_0x6b28[66]](_[_0x6b28[65]](_0x11cdx20.Users,_0x6b28[64]));if(_0x11cdx18&& _0x11cdx18[_0x6b28[27]]){var _0x11cdx21;for(var _0x11cdx1a=0;_0x11cdx1a< _0x11cdx18[_0x6b28[27]];_0x11cdx1a++){_[_0x6b28[67]](_0x11cdx18[_0x11cdx1a],function(_0x11cdx11){return _0x11cdx10(_0x11cdx11)});if(_0x11cdx18[_0x11cdx1a][_0x6b28[27]]){_0x11cdx21= _0x11cdx18[_0x11cdx1a];break}};if(_0x11cdx21&& _0x11cdx21[_0x6b28[27]]){var _0x11cdx22=_[_0x6b28[28]](_0x11cdx21,function(_0x11cdx11){return _[_0x6b28[68]](_[_0x6b28[53]](_0x11cdx6,{timeslot:_0x11cdx14,application:_0x6b28[51],membername:_0x11cdx11[_0x6b28[11]],memberid:_0x11cdx11[_0x6b28[20]],queue:_0x11cdxe[_0x6b28[20]],queuename:_0x11cdxe[_0x6b28[11]],calledAt:moment()[_0x6b28[35]](_0x6b28[52])}))});return _0x11cdx9[_0x6b28[54]](_0x6b28[69],[_0x6b28[50],_0x11cdx22,{individualHooks:true}])}else {logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55])}}else {logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55])}}else {logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[55])}})[_0x6b28[39]](function(_0x11cdx1f){if(_0x11cdx1f&& _0x11cdx1f[_0x6b28[27]]){for(var _0x11cdx1a=0;_0x11cdx1a< _0x11cdx1f[_0x6b28[27]];_0x11cdx1a++){var _0x11cdx17=_0x11cdx1f[_0x11cdx1a];_0x11cdx8[_0x6b28[44]](util[_0x6b28[35]](_0x6b28[42],_0x11cdx17[_0x6b28[43]]))[_0x6b28[41]](_0x6b28[40],_0x11cdx17)}};_0x11cdxc= setTimeout(function(){_0x11cdxf+= _0x11cdxe[_0x6b28[26]];_0x11cdx1e()},_0x11cdx14* 1000)})[_0x6b28[38]](function(_0x11cdx16){logger[_0x6b28[37]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[36]);_0x11cdxa(_0x11cdx16)})}else {return _0x11cdx9[_0x6b28[54]](_0x6b28[62],[_0x6b28[63],{leaveAt:moment()[_0x6b28[35]](_0x6b28[52]),timeout:true},{where:{uniqueid:_0x11cdx6[_0x6b28[15]],leaveAt:null},individualHooks:true}])[_0x6b28[39]](function(_0x11cdx1d){if(_0x11cdx1d){_0x11cdx8[_0x6b28[44]](_0x6b28[59])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d);_0x11cdx8[_0x6b28[44]](_0x6b28[60])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d)};logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[61]);clearTimeout(_0x11cdxc);_0x11cdxa()})[_0x6b28[38]](function(_0x11cdx16){logger[_0x6b28[37]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[36]);_0x11cdxa(_0x11cdx16)})}}return _0x11cdx9[_0x6b28[54]](_0x6b28[70],[_0x6b28[71],{where:{id:_0x11cdx5[_0x6b28[72]]},attributes:[_0x6b28[20],_0x6b28[11],_0x6b28[26],_0x6b28[13],_0x6b28[73]],include:[{model:_0x6b28[57],attributes:[_0x6b28[20]]}]}])[_0x6b28[39]](function(_0x11cdx20){_0x11cdxe= _0x11cdx20;logger[_0x6b28[19]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[83],_0x11cdx5[_0x6b28[26]],_0x6b28[84]);return _0x11cdx9[_0x6b28[54]](_0x6b28[49],[_0x6b28[63],_[_0x6b28[53]](_0x11cdx6,{timeslot:_0x11cdx5[_0x6b28[26]],application:_0x6b28[51],queue:_0x11cdx20[_0x6b28[20]],queuename:_0x11cdx20[_0x6b28[11]],calledAt:moment()[_0x6b28[35]](_0x6b28[52]),joinAt:moment()[_0x6b28[35]](_0x6b28[52]),membername:null,memberid:null})])})[_0x6b28[39]](function(_0x11cdx1d){_0x11cdx8[_0x6b28[44]](_0x6b28[59])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d);_0x11cdx8[_0x6b28[44]](_0x6b28[60])[_0x6b28[41]](_0x6b28[58],_0x11cdx1d);return _0x11cdx9[_0x6b28[54]](_0x6b28[62],[_0x6b28[29],{waiting:true},{id:_0x11cdx6[_0x6b28[82]]}])})[_0x6b28[39]](function(_0x11cdx23){if(_0x11cdx23){_0x11cdx8[_0x6b28[41]](_0x6b28[81],_0x11cdx23)}})[_0x6b28[39]](function(_0x11cdx23){switch(_0x11cdxe[_0x6b28[13]]){case _0x6b28[74]:_0x11cdx1e();break;case _0x6b28[78]:_0x11cdxd= _[_0x6b28[77]](_0x11cdxe.Users,[function(_0x11cdx24){return _0x11cdx24[_0x6b28[76]][_0x6b28[75]]|| 0}]);_0x11cdx13();break;case _0x6b28[79]:_0x11cdxd= _[_0x6b28[77]](_0x11cdxe.Users,[function(_0x11cdx24){return _0x11cdx24[_0x6b28[76]][_0x6b28[75]]|| 0}]);_0x11cdx13();break;default:};return Promise[_0x6b28[80]]()})[_0x6b28[38]](function(_0x11cdx16){logger[_0x6b28[37]](_0x11cdx6[_0x6b28[9]][_0x6b28[8]](),_0x6b28[10],_0x11cdxe[_0x6b28[11]][_0x6b28[8]](),_0x6b28[12],_0x11cdxe[_0x6b28[13]],_0x6b28[14],_0x11cdx6[_0x6b28[15]],_0x6b28[36]);logger[_0x6b28[37]](_0x11cdx16);_0x11cdxa(_0x11cdx16)})}
\ No newline at end of file
+var _0x5f3b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x72\x65\x71\x75\x65\x73\x74","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0x5f3b[0];var _=require(_0x5f3b[1]);var util=require(_0x5f3b[2]);var moment=require(_0x5f3b[3]);var logger=require(_0x5f3b[5])(_0x5f3b[4]);module[_0x5f3b[6]]= function(_0x1f75x5,_0x1f75x6,_0x1f75x7,_0x1f75x8,_0x1f75x9,_0x1f75xa){var _0x1f75xb=[];var _0x1f75xc;var _0x1f75xd;var _0x1f75xe;var _0x1f75xf=0;process[_0x5f3b[24]](_0x5f3b[7],function(_0x1f75x7){switch(_0x1f75x7[_0x5f3b[23]]){case _0x5f3b[22]:logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[16],_0x1f75x7[_0x5f3b[17]],_0x5f3b[18]);_0x1f75xb[_0x5f3b[21]]({id:_0x1f75x7[_0x5f3b[20]]});break;default:}});function _0x1f75x10(_0x1f75x11){var _0x1f75x12=_[_0x5f3b[25]](_0x1f75xb,{id:_0x1f75x11[_0x5f3b[20]]});return _0x1f75x12?true:false}function _0x1f75x13(){var _0x1f75x14=((_0x1f75x5[_0x5f3b[26]]- _0x1f75xf)> _0x1f75xe[_0x5f3b[26]])?_0x1f75xe[_0x5f3b[26]]:(_0x1f75x5[_0x5f3b[26]]- _0x1f75xf);if(_0x1f75x14> 0){if(_0x1f75xd[_0x5f3b[27]]){var _0x1f75x15={where:{id:{$in:_[_0x5f3b[28]](_0x1f75xd,_0x5f3b[20])},online:true,mailPause:false},include:[{model:_0x5f3b[29],attributes:[_0x5f3b[20]],raw:true}],attributes:[_0x5f3b[20],_0x5f3b[11],_0x5f3b[30],_0x5f3b[31],_0x5f3b[32]],order:[[{raw:util[_0x5f3b[35]](_0x5f3b[33],_[_0x5f3b[28]](_0x1f75xd,_0x5f3b[20])[_0x5f3b[34]]())}]]};return _0x1f75x9[_0x5f3b[54]](_0x5f3b[56],[_0x5f3b[57],_0x1f75x15])[_0x5f3b[39]](function(_0x1f75x18){if(_0x1f75x18[_0x5f3b[27]]){var _0x1f75x19;for(var _0x1f75x1a=0;_0x1f75x1a< _0x1f75x18[_0x5f3b[27]];_0x1f75x1a++){var _0x1f75x11=_0x1f75x18[_0x1f75x1a];if(!_0x1f75x10(_0x1f75x11)){_0x1f75x19= _0x1f75x11;break}};if(_0x1f75x19){logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[45],_0x1f75x19[_0x5f3b[20]],_0x1f75x19[_0x5f3b[11]]);var _0x1f75x1b=_[_0x5f3b[46]](_0x1f75xd,{"\x69\x64":_0x1f75x19[_0x5f3b[20]]});if(_0x1f75x1b>= 0){var _0x1f75x1c=_0x1f75xd[_0x5f3b[47]](_0x1f75x1b,1);if(_0x1f75x1c&& _0x1f75x1c[_0x5f3b[27]]){_0x1f75xd[_0x5f3b[21]](_[_0x5f3b[48]](_0x1f75x1c))}};return _0x1f75x9[_0x5f3b[54]](_0x5f3b[49],[_0x5f3b[50],_[_0x5f3b[53]](_0x1f75x6,{timeslot:_0x1f75x14,application:_0x5f3b[51],membername:_0x1f75x19[_0x5f3b[11]],memberid:_0x1f75x19[_0x5f3b[20]],queue:_0x1f75xe[_0x5f3b[20]],queuename:_0x1f75xe[_0x5f3b[11]],calledAt:moment()[_0x5f3b[35]](_0x5f3b[52])})])};logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55]);return}else {logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55]);return}})[_0x5f3b[39]](function(_0x1f75x17){if(_0x1f75x17){_0x1f75x8[_0x5f3b[44]](util[_0x5f3b[35]](_0x5f3b[42],_0x1f75x17[_0x5f3b[43]]))[_0x5f3b[41]](_0x5f3b[40],_0x1f75x17)}})[_0x5f3b[39]](function(){_0x1f75xc= setTimeout(function(){_0x1f75xf+= _0x1f75xe[_0x5f3b[26]];_0x1f75x13()},_0x1f75x14* 1000)})[_0x5f3b[38]](function(_0x1f75x16){logger[_0x5f3b[37]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[36]);_0x1f75xa(_0x1f75x16)})}else {logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55]);_0x1f75xc= setTimeout(function(){_0x1f75xf+= _0x1f75xe[_0x5f3b[26]];_0x1f75x13()},_0x1f75x14* 1000)}}else {return _0x1f75x9[_0x5f3b[54]](_0x5f3b[62],[_0x5f3b[63],{leaveAt:moment()[_0x5f3b[35]](_0x5f3b[52]),timeout:true},{where:{uniqueid:_0x1f75x6[_0x5f3b[15]],leaveAt:null},individualHooks:true}])[_0x5f3b[39]](function(_0x1f75x1d){if(_0x1f75x1d){_0x1f75x8[_0x5f3b[44]](_0x5f3b[59])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d);_0x1f75x8[_0x5f3b[44]](_0x5f3b[60])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d)};logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[61]);clearTimeout(_0x1f75xc);_0x1f75xa()})[_0x5f3b[38]](function(_0x1f75x16){logger[_0x5f3b[37]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[36]);_0x1f75xa(_0x1f75x16)})}}function _0x1f75x1e(){var _0x1f75x14=((_0x1f75x5[_0x5f3b[26]]- _0x1f75xf)> _0x1f75xe[_0x5f3b[26]])?_0x1f75xe[_0x5f3b[26]]:(_0x1f75x5[_0x5f3b[26]]- _0x1f75xf);if(_0x1f75x14> 0){return _0x1f75x9[_0x5f3b[54]](_0x5f3b[70],[_0x5f3b[71],{where:{id:_0x1f75x5[_0x5f3b[72]]},attributes:[_0x5f3b[20],_0x5f3b[11],_0x5f3b[26],_0x5f3b[13],_0x5f3b[73]],include:[{model:_0x5f3b[57],where:{online:true,mailPause:false},attributes:[_0x5f3b[20],_0x5f3b[11],_0x5f3b[30],_0x5f3b[31],_0x5f3b[32]],raw:true}]}])[_0x5f3b[39]](function(_0x1f75x20){if(_0x1f75x20){var _0x1f75x18=_[_0x5f3b[66]](_[_0x5f3b[65]](_0x1f75x20.Users,_0x5f3b[64]));if(_0x1f75x18&& _0x1f75x18[_0x5f3b[27]]){var _0x1f75x21;for(var _0x1f75x1a=0;_0x1f75x1a< _0x1f75x18[_0x5f3b[27]];_0x1f75x1a++){_[_0x5f3b[67]](_0x1f75x18[_0x1f75x1a],function(_0x1f75x11){return _0x1f75x10(_0x1f75x11)});if(_0x1f75x18[_0x1f75x1a][_0x5f3b[27]]){_0x1f75x21= _0x1f75x18[_0x1f75x1a];break}};if(_0x1f75x21&& _0x1f75x21[_0x5f3b[27]]){var _0x1f75x22=_[_0x5f3b[28]](_0x1f75x21,function(_0x1f75x11){return _[_0x5f3b[68]](_[_0x5f3b[53]](_0x1f75x6,{timeslot:_0x1f75x14,application:_0x5f3b[51],membername:_0x1f75x11[_0x5f3b[11]],memberid:_0x1f75x11[_0x5f3b[20]],queue:_0x1f75xe[_0x5f3b[20]],queuename:_0x1f75xe[_0x5f3b[11]],calledAt:moment()[_0x5f3b[35]](_0x5f3b[52])}))});return _0x1f75x9[_0x5f3b[54]](_0x5f3b[69],[_0x5f3b[50],_0x1f75x22,{individualHooks:true}])}else {logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55])}}else {logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55])}}else {logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[55])}})[_0x5f3b[39]](function(_0x1f75x1f){if(_0x1f75x1f&& _0x1f75x1f[_0x5f3b[27]]){for(var _0x1f75x1a=0;_0x1f75x1a< _0x1f75x1f[_0x5f3b[27]];_0x1f75x1a++){var _0x1f75x17=_0x1f75x1f[_0x1f75x1a];_0x1f75x8[_0x5f3b[44]](util[_0x5f3b[35]](_0x5f3b[42],_0x1f75x17[_0x5f3b[43]]))[_0x5f3b[41]](_0x5f3b[40],_0x1f75x17)}};_0x1f75xc= setTimeout(function(){_0x1f75xf+= _0x1f75xe[_0x5f3b[26]];_0x1f75x1e()},_0x1f75x14* 1000)})[_0x5f3b[38]](function(_0x1f75x16){logger[_0x5f3b[37]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[36]);_0x1f75xa(_0x1f75x16)})}else {return _0x1f75x9[_0x5f3b[54]](_0x5f3b[62],[_0x5f3b[63],{leaveAt:moment()[_0x5f3b[35]](_0x5f3b[52]),timeout:true},{where:{uniqueid:_0x1f75x6[_0x5f3b[15]],leaveAt:null},individualHooks:true}])[_0x5f3b[39]](function(_0x1f75x1d){if(_0x1f75x1d){_0x1f75x8[_0x5f3b[44]](_0x5f3b[59])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d);_0x1f75x8[_0x5f3b[44]](_0x5f3b[60])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d)};logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[61]);clearTimeout(_0x1f75xc);_0x1f75xa()})[_0x5f3b[38]](function(_0x1f75x16){logger[_0x5f3b[37]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[36]);_0x1f75xa(_0x1f75x16)})}}return _0x1f75x9[_0x5f3b[54]](_0x5f3b[70],[_0x5f3b[71],{where:{id:_0x1f75x5[_0x5f3b[72]]},attributes:[_0x5f3b[20],_0x5f3b[11],_0x5f3b[26],_0x5f3b[13],_0x5f3b[73]],include:[{model:_0x5f3b[57],attributes:[_0x5f3b[20]]}]}])[_0x5f3b[39]](function(_0x1f75x20){_0x1f75xe= _0x1f75x20;logger[_0x5f3b[19]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[83],_0x1f75x5[_0x5f3b[26]],_0x5f3b[84]);return _0x1f75x9[_0x5f3b[54]](_0x5f3b[49],[_0x5f3b[63],_[_0x5f3b[53]](_0x1f75x6,{timeslot:_0x1f75x5[_0x5f3b[26]],application:_0x5f3b[51],queue:_0x1f75x20[_0x5f3b[20]],queuename:_0x1f75x20[_0x5f3b[11]],calledAt:moment()[_0x5f3b[35]](_0x5f3b[52]),joinAt:moment()[_0x5f3b[35]](_0x5f3b[52]),membername:null,memberid:null})])})[_0x5f3b[39]](function(_0x1f75x1d){_0x1f75x8[_0x5f3b[44]](_0x5f3b[59])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d);_0x1f75x8[_0x5f3b[44]](_0x5f3b[60])[_0x5f3b[41]](_0x5f3b[58],_0x1f75x1d);return _0x1f75x9[_0x5f3b[54]](_0x5f3b[62],[_0x5f3b[29],{waiting:true},{id:_0x1f75x6[_0x5f3b[82]]}])})[_0x5f3b[39]](function(_0x1f75x23){if(_0x1f75x23){_0x1f75x8[_0x5f3b[41]](_0x5f3b[81],_0x1f75x23)}})[_0x5f3b[39]](function(_0x1f75x23){switch(_0x1f75xe[_0x5f3b[13]]){case _0x5f3b[74]:_0x1f75x1e();break;case _0x5f3b[78]:_0x1f75xd= _[_0x5f3b[77]](_0x1f75xe.Users,[function(_0x1f75x24){return _0x1f75x24[_0x5f3b[76]][_0x5f3b[75]]|| 0}]);_0x1f75x13();break;case _0x5f3b[79]:_0x1f75xd= _[_0x5f3b[77]](_0x1f75xe.Users,[function(_0x1f75x24){return _0x1f75x24[_0x5f3b[76]][_0x5f3b[75]]|| 0}]);_0x1f75x13();break;default:};return Promise[_0x5f3b[80]]()})[_0x5f3b[38]](function(_0x1f75x16){logger[_0x5f3b[37]](_0x1f75x6[_0x5f3b[9]][_0x5f3b[8]](),_0x5f3b[10],_0x1f75xe[_0x5f3b[11]][_0x5f3b[8]](),_0x5f3b[12],_0x1f75xe[_0x5f3b[13]],_0x5f3b[14],_0x1f75x6[_0x5f3b[15]],_0x5f3b[36]);logger[_0x5f3b[37]](_0x1f75x16);_0x1f75xa(_0x1f75x16)})}
\ No newline at end of file