Built motion from commit d13e3c905.|1.0.24
[motion.git] / server / config / forked_routing / chat / queue.js
1 var _0x8cbc=["\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","\x63\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6C\x69\x65\x6E\x74","\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","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\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\x63\x68\x61\x74\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","\x63\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\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\x43\x68\x61\x74","\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","\x6B\x65\x79\x42\x79","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x61\x73\x20\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x41\x53\x20\x63\x61\x70\x61\x63\x69\x74\x79\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x20\x57\x48\x45\x52\x45\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\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","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\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","\x61\x6C\x6C","\x73\x68\x6F\x77","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\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","\x63\x68\x61\x74\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"];_0x8cbc[0];var _=require(_0x8cbc[1]);var util=require(_0x8cbc[2]);var moment=require(_0x8cbc[3]);var logger=require(_0x8cbc[5])(_0x8cbc[4]);var rpcClient=require(_0x8cbc[6]);module[_0x8cbc[7]]= function(_0xf146x6,_0xf146x7,_0xf146x8,_0xf146x9){var _0xf146xa=[];var _0xf146xb;var _0xf146xc;var _0xf146xd;var _0xf146xe=0;process[_0x8cbc[25]](_0x8cbc[8],function(_0xf146xf){switch(_0xf146xf[_0x8cbc[24]]){case _0x8cbc[23]:logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[17],_0xf146xf[_0x8cbc[18]],_0x8cbc[19]);_0xf146xa[_0x8cbc[22]]({id:_0xf146xf[_0x8cbc[21]]});break;default:}});function _0xf146x10(_0xf146x11){var _0xf146x12=_[_0x8cbc[26]](_0xf146xa,{id:_0xf146x11[_0x8cbc[21]]});return _0xf146x12?true:false}function _0xf146x13(){var _0xf146x14=((_0xf146x6[_0x8cbc[27]]- _0xf146xe)> _0xf146xd[_0x8cbc[27]])?_0xf146xd[_0x8cbc[27]]:(_0xf146x6[_0x8cbc[27]]- _0xf146xe);var _0xf146x15;if(_0xf146x14> 0){if(_0xf146xc[_0x8cbc[28]]){var _0xf146x16={where:{id:{$in:_[_0x8cbc[29]](_0xf146xc,_0x8cbc[21])},online:true,chatPause:false},include:[{model:_0x8cbc[30],attributes:[_0x8cbc[21]],raw:true}],attributes:[_0x8cbc[21],_0x8cbc[12],_0x8cbc[31],_0x8cbc[32],_0x8cbc[33],_0x8cbc[34]],order:[[{raw:util[_0x8cbc[37]](_0x8cbc[35],_[_0x8cbc[29]](_0xf146xc,_0x8cbc[21])[_0x8cbc[36]]())}]]};return rpcClient[_0x8cbc[58]](_0x8cbc[63],[_0x8cbc[64]])[_0x8cbc[41]](function(_0xf146x7){_0xf146x15= _[_0x8cbc[60]](_0xf146x7,_0x8cbc[21]);return rpcClient[_0x8cbc[58]](_0x8cbc[61],[_0x8cbc[62],_0xf146x16])})[_0x8cbc[41]](function(_0xf146x19){if(_0xf146x19[_0x8cbc[28]]){var _0xf146x1a;for(var _0xf146x1b=0;_0xf146x1b< _0xf146x19[_0x8cbc[28]];_0xf146x1b++){var _0xf146x11=_0xf146x19[_0xf146x1b];var _0xf146x1c=false;if(_0xf146x11[_0x8cbc[34]]> 0){if(_0xf146x15[_0xf146x11[_0x8cbc[21]]]&& _0xf146x15[_0xf146x11[_0x8cbc[21]]][_0x8cbc[48]](_0x8cbc[47])&& _0xf146x15[_0xf146x11[_0x8cbc[21]]][_0x8cbc[47]]>= _0xf146x11[_0x8cbc[34]]){_0xf146x1c= true}};if(!_0xf146x10(_0xf146x11)&&  !_0xf146x1c){_0xf146x1a= _0xf146x11;break}};if(_0xf146x1a){logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[49],_0xf146x1a[_0x8cbc[21]],_0xf146x1a[_0x8cbc[12]]);var _0xf146x1d=_[_0x8cbc[50]](_0xf146xc,{"\x69\x64":_0xf146x1a[_0x8cbc[21]]});if(_0xf146x1d>= 0){var _0xf146x1e=_0xf146xc[_0x8cbc[51]](_0xf146x1d,1);if(_0xf146x1e&& _0xf146x1e[_0x8cbc[28]]){_0xf146xc[_0x8cbc[22]](_[_0x8cbc[52]](_0xf146x1e))}};return rpcClient[_0x8cbc[58]](_0x8cbc[53],[_0x8cbc[54],_[_0x8cbc[57]](_0xf146x7,{timeslot:_0xf146x14,application:_0x8cbc[55],membername:_0xf146x1a[_0x8cbc[12]],memberid:_0xf146x1a[_0x8cbc[21]],queue:_0xf146xd[_0x8cbc[21]],queuename:_0xf146xd[_0x8cbc[12]],calledAt:moment()[_0x8cbc[37]](_0x8cbc[56])})])};logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59]);return}else {logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59]);return}})[_0x8cbc[41]](function(_0xf146x18){if(_0xf146x18){_0xf146x8[_0x8cbc[46]](util[_0x8cbc[37]](_0x8cbc[44],_0xf146x18[_0x8cbc[45]]))[_0x8cbc[43]](_0x8cbc[42],_0xf146x18)}})[_0x8cbc[41]](function(){_0xf146xb= setTimeout(function(){_0xf146xe+= _0xf146xd[_0x8cbc[27]];_0xf146x13()},_0xf146x14* 1000)})[_0x8cbc[40]](function(_0xf146x17){logger[_0x8cbc[39]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[38]);_0xf146x9(_0xf146x17)})}else {logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59]);_0xf146xb= setTimeout(function(){_0xf146xe+= _0xf146xd[_0x8cbc[27]];_0xf146x13()},_0xf146x14* 1000)}}else {return rpcClient[_0x8cbc[58]](_0x8cbc[69],[_0x8cbc[70],{leaveAt:moment()[_0x8cbc[37]](_0x8cbc[56]),timeout:true},{where:{uniqueid:_0xf146x7[_0x8cbc[16]],leaveAt:null},individualHooks:true}])[_0x8cbc[41]](function(_0xf146x1f){if(_0xf146x1f&& _0xf146x1f[_0x8cbc[28]]&& _0xf146x1f[1][_0x8cbc[28]]){for(var _0xf146x1b=0;_0xf146x1b< _0xf146x1f[1][_0x8cbc[28]];_0xf146x1b++){var _0xf146x20=_0xf146x1f[1][_0xf146x1b];_0xf146x8[_0x8cbc[46]](_0x8cbc[67])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20);_0xf146x8[_0x8cbc[46]](_0x8cbc[68])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20)}}})[_0x8cbc[41]](function(){logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[65]);clearTimeout(_0xf146xb);_0xf146x9()})[_0x8cbc[40]](function(_0xf146x17){logger[_0x8cbc[39]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[38]);_0xf146x9(_0xf146x17)})}}function _0xf146x21(){var _0xf146x14=((_0xf146x6[_0x8cbc[27]]- _0xf146xe)> _0xf146xd[_0x8cbc[27]])?_0xf146xd[_0x8cbc[27]]:(_0xf146x6[_0x8cbc[27]]- _0xf146xe);if(_0xf146x14> 0){var _0xf146x15;return rpcClient[_0x8cbc[58]](_0x8cbc[63],[_0x8cbc[64]])[_0x8cbc[41]](function(_0xf146x7){_0xf146x15= _[_0x8cbc[60]](_0xf146x7,_0x8cbc[21]);return rpcClient[_0x8cbc[58]](_0x8cbc[77],[_0x8cbc[78],{where:{id:_0xf146x6[_0x8cbc[79]]},attributes:[_0x8cbc[21],_0x8cbc[12],_0x8cbc[27],_0x8cbc[14],_0x8cbc[80]],include:[{model:_0x8cbc[62],where:{online:true,chatPause:false},attributes:[_0x8cbc[21],_0x8cbc[12],_0x8cbc[31],_0x8cbc[32],_0x8cbc[33],_0x8cbc[34]],raw:true}]}])})[_0x8cbc[41]](function(_0xf146x23){if(_0xf146x23){var _0xf146x24=_[_0x8cbc[73]](_[_0x8cbc[72]](_0xf146x23.Users,_0x8cbc[71]));if(_0xf146x24&& _0xf146x24[_0x8cbc[28]]){var _0xf146x25;for(var _0xf146x1b=0;_0xf146x1b< _0xf146x24[_0x8cbc[28]];_0xf146x1b++){_[_0x8cbc[74]](_0xf146x24[_0xf146x1b],function(_0xf146x11){var _0xf146x1c=false;if(_0xf146x11[_0x8cbc[34]]> 0){if(_0xf146x15[_0xf146x11[_0x8cbc[21]]]&& _0xf146x15[_0xf146x11[_0x8cbc[21]]][_0x8cbc[48]](_0x8cbc[47])&& _0xf146x15[_0xf146x11[_0x8cbc[21]]][_0x8cbc[47]]>= _0xf146x11[_0x8cbc[34]]){_0xf146x1c= true}};return _0xf146x10(_0xf146x11)|| _0xf146x1c});if(_0xf146x24[_0xf146x1b][_0x8cbc[28]]){_0xf146x25= _0xf146x24[_0xf146x1b];break}};if(_0xf146x25&& _0xf146x25[_0x8cbc[28]]){var _0xf146x26=_[_0x8cbc[29]](_0xf146x25,function(_0xf146x11){return _[_0x8cbc[75]](_[_0x8cbc[57]](_0xf146x7,{timeslot:_0xf146x14,application:_0x8cbc[55],membername:_0xf146x11[_0x8cbc[12]],memberid:_0xf146x11[_0x8cbc[21]],queue:_0xf146xd[_0x8cbc[21]],queuename:_0xf146xd[_0x8cbc[12]],calledAt:moment()[_0x8cbc[37]](_0x8cbc[56])}))});var _0xf146x27=[];for(var _0xf146x28=0;_0xf146x28< _0xf146x26[_0x8cbc[28]];_0xf146x28++){_0xf146x27[_0x8cbc[22]](rpcClient[_0x8cbc[58]](_0x8cbc[53],[_0x8cbc[54],_0xf146x26[_0xf146x28]]))};return Promise[_0x8cbc[76]](_0xf146x27)}else {logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59])}}else {logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59])}}else {logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[59])}})[_0x8cbc[41]](function(_0xf146x22){if(_0xf146x22&& _0xf146x22[_0x8cbc[28]]){for(var _0xf146x1b=0;_0xf146x1b< _0xf146x22[_0x8cbc[28]];_0xf146x1b++){var _0xf146x18=_0xf146x22[_0xf146x1b];_0xf146x8[_0x8cbc[46]](util[_0x8cbc[37]](_0x8cbc[44],_0xf146x18[_0x8cbc[45]]))[_0x8cbc[43]](_0x8cbc[42],_0xf146x18)}};_0xf146xb= setTimeout(function(){_0xf146xe+= _0xf146xd[_0x8cbc[27]];_0xf146x21()},_0xf146x14* 1000)})[_0x8cbc[40]](function(_0xf146x17){logger[_0x8cbc[39]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[38]);_0xf146x9(_0xf146x17)})}else {return rpcClient[_0x8cbc[58]](_0x8cbc[69],[_0x8cbc[70],{leaveAt:moment()[_0x8cbc[37]](_0x8cbc[56]),timeout:true},{where:{uniqueid:_0xf146x7[_0x8cbc[16]],leaveAt:null},individualHooks:true}])[_0x8cbc[41]](function(_0xf146x1f){if(_0xf146x1f&& _0xf146x1f[_0x8cbc[28]]&& _0xf146x1f[1][_0x8cbc[28]]){for(var _0xf146x1b=0;_0xf146x1b< _0xf146x1f[1][_0x8cbc[28]];_0xf146x1b++){var _0xf146x20=_0xf146x1f[1][_0xf146x1b];_0xf146x8[_0x8cbc[46]](_0x8cbc[67])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20);_0xf146x8[_0x8cbc[46]](_0x8cbc[68])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20)}};logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[65]);clearTimeout(_0xf146xb);_0xf146x9();return Promise[_0x8cbc[81]]()})[_0x8cbc[40]](function(_0xf146x17){logger[_0x8cbc[39]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[38]);_0xf146x9(_0xf146x17);return Promise[_0x8cbc[23]](_0xf146x17)})}}return rpcClient[_0x8cbc[58]](_0x8cbc[77],[_0x8cbc[78],{where:{id:_0xf146x6[_0x8cbc[79]]},attributes:[_0x8cbc[21],_0x8cbc[12],_0x8cbc[27],_0x8cbc[14],_0x8cbc[80]],include:[{model:_0x8cbc[62],attributes:[_0x8cbc[21]]}]}])[_0x8cbc[41]](function(_0xf146x23){_0xf146xd= _0xf146x23;logger[_0x8cbc[20]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[90],_0xf146x6[_0x8cbc[27]],_0x8cbc[91]);return rpcClient[_0x8cbc[58]](_0x8cbc[53],[_0x8cbc[70],_[_0x8cbc[57]](_0xf146x7,{timeslot:_0xf146x6[_0x8cbc[27]],application:_0x8cbc[55],queue:_0xf146x23[_0x8cbc[21]],queuename:_0xf146x23[_0x8cbc[12]],calledAt:moment()[_0x8cbc[37]](_0x8cbc[56]),joinAt:moment()[_0x8cbc[37]](_0x8cbc[56]),membername:null,memberid:null})])})[_0x8cbc[41]](function(_0xf146x20){_0xf146x8[_0x8cbc[46]](_0x8cbc[67])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20);_0xf146x8[_0x8cbc[46]](_0x8cbc[68])[_0x8cbc[43]](_0x8cbc[66],_0xf146x20);return rpcClient[_0x8cbc[58]](_0x8cbc[69],[_0x8cbc[30],{waiting:true},{where:{id:_0xf146x7[_0x8cbc[89]]}}])})[_0x8cbc[41]](function(_0xf146x29){if(_0xf146x29){_0xf146x8[_0x8cbc[43]](_0x8cbc[88],_0xf146x29)}})[_0x8cbc[41]](function(_0xf146x29){switch(_0xf146xd[_0x8cbc[14]]){case _0x8cbc[82]:_0xf146x21();break;case _0x8cbc[86]:_0xf146xc= _[_0x8cbc[85]](_0xf146xd.Users,[function(_0xf146x2a){return _0xf146x2a[_0x8cbc[84]][_0x8cbc[83]]|| 0}]);_0xf146x13();break;case _0x8cbc[87]:_0xf146xc= _[_0x8cbc[85]](_0xf146xd.Users,[function(_0xf146x2a){return _0xf146x2a[_0x8cbc[84]][_0x8cbc[83]]|| 0}]);_0xf146x13();break;default:};return Promise[_0x8cbc[81]]()})[_0x8cbc[40]](function(_0xf146x17){logger[_0x8cbc[39]](_0xf146x7[_0x8cbc[10]][_0x8cbc[9]](),_0x8cbc[11],_0xf146xd[_0x8cbc[12]][_0x8cbc[9]](),_0x8cbc[13],_0xf146xd[_0x8cbc[14]],_0x8cbc[15],_0xf146x7[_0x8cbc[16]],_0x8cbc[38]);logger[_0x8cbc[39]](_0xf146x17);_0xf146x9(_0xf146x17)})}