1 var _0xcefe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x20\x2D\x20\x64\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x76\x69\x63\x65","\x6C\x6F\x67","\x74\x68\x65\x6E","\x73\x74\x61\x74\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","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x75\x70\x64\x61\x74\x65","\x55\x73\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65","\x55\x73\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x55\x73\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x55\x73\x65\x72\x20\x2D\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x55\x73\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x55\x73\x65\x72\x20\x2D\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x70\x61\x75\x73\x65\x64","\x55\x73\x65\x72\x20\x2D\x20\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x72\x65\x61\x73\x6F\x6E","\x72\x65\x73\x6F\x6C\x76\x65"];_0xcefe[0];var moment=require(_0xcefe[1]);var BPromise=require(_0xcefe[2]);var User=require(_0xcefe[4])[_0xcefe[3]];module[_0xcefe[5]]= function(){return {devicestatechange:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({status:_0x2912x4[_0xcefe[12]],statusAt:moment()[_0xcefe[14]](_0xcefe[13])},{where:{name:_0x2912x4[_0xcefe[9]][_0xcefe[17]](_0xcefe[15],_0xcefe[16])},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[6],_0x2912x4[_0xcefe[9]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[6],_0x2912x6)})}},agentcalled:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[21],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13]),lastQueue:_0x2912x4[_0xcefe[22]]},{where:{name:_0x2912x4[_0xcefe[20]]},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[19],_0x2912x4[_0xcefe[20]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[19],_0x2912x6)})}},agentcomplete:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[24],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13]),lastQueue:_0x2912x4[_0xcefe[22]]},{where:{name:_0x2912x4[_0xcefe[20]]},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[23],_0x2912x4[_0xcefe[20]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[23],_0x2912x6)})}},agentconnect:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[26],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13]),lastQueue:_0x2912x4[_0xcefe[22]]},{where:{name:_0x2912x4[_0xcefe[20]]},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[25],_0x2912x4[_0xcefe[20]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[25],_0x2912x6)})}},answered_elsewhere:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[24],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13])},{where:{lastQueue:_0x2912x4[_0xcefe[22]],name:{$ne:_0x2912x4[_0xcefe[20]]}},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[27],_0x2912x4[_0xcefe[20]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[27],_0x2912x6)})}},agentringnoanswer:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[24],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13]),lastQueue:_0x2912x4[_0xcefe[22]]},{where:{name:_0x2912x4[_0xcefe[20]]},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[28],_0x2912x4[_0xcefe[20]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[28],_0x2912x6)})}},queuecallerabandon:function(_0x2912x4){return function(_0x2912x5){return User[_0xcefe[18]]({queueStatus:_0xcefe[24],queueStatusAt:moment()[_0xcefe[14]](_0xcefe[13]),lastQueue:_0x2912x4[_0xcefe[22]]},{where:{lastQueue:_0x2912x4[_0xcefe[22]]},individualHooks:true,raw:true})[_0xcefe[11]](function(){console[_0xcefe[10]](_0xcefe[29],_0x2912x4[_0xcefe[22]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[29],_0x2912x6)})}},queuememberpause:function(_0x2912x4){return function(_0x2912x5){if(parseInt(_0x2912x4[_0xcefe[30]],10)){return User[_0xcefe[18]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0x2912x4[_0xcefe[32]],lastPauseAt:moment()[_0xcefe[14]](_0xcefe[13])},{where:{name:_0x2912x4[_0xcefe[20]]},individualHooks:true,raw:true})[_0xcefe[11]](function(_0x2912x7){console[_0xcefe[10]](_0xcefe[31],_0x2912x4[_0xcefe[22]])})[_0xcefe[8]](function(_0x2912x6){console[_0xcefe[7]](_0xcefe[31],_0x2912x6)})};return BPromise[_0xcefe[33]]()}}}}