1 var _0x7bb6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x55\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x65\x6D\x69\x74","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x4E\x45\x57","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67"];_0x7bb6[0];var sequelize=require(_0x7bb6[2])[_0x7bb6[1]];var models=require(_0x7bb6[2]);var Util=require(_0x7bb6[3]);var _=require(_0x7bb6[4]);var moment=require(_0x7bb6[5]);var Promise=require(_0x7bb6[6]);exports[_0x7bb6[7]]= function(_0xf58cx7){models[_0x7bb6[9]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cx9(_0xf58cx8)});models[_0x7bb6[9]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cx9(_0xf58cx8)});models[_0x7bb6[11]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cx9(_0xf58cx8)});models[_0x7bb6[11]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cx9(_0xf58cx8)});function _0xf58cx9(_0xf58cx8){onNewMail(_0xf58cx7,_0xf58cx8);onOpenMail(_0xf58cx7,_0xf58cx8);onClosedMail(_0xf58cx7,_0xf58cx8);onTimeoutMail(_0xf58cx7,_0xf58cx8);onPendingMail(_0xf58cx7,_0xf58cx8);onWaitingMail(_0xf58cx7,_0xf58cx8)}models[_0x7bb6[12]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxa(_0xf58cx8)});models[_0x7bb6[12]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxa(_0xf58cx8)});models[_0x7bb6[13]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxa(_0xf58cx8)});models[_0x7bb6[13]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxa(_0xf58cx8)});function _0xf58cxa(_0xf58cx8){onNewChat(_0xf58cx7,_0xf58cx8);onOpenChat(_0xf58cx7,_0xf58cx8);onClosedChat(_0xf58cx7,_0xf58cx8);onTimeoutChat(_0xf58cx7,_0xf58cx8);onAbandonedChat(_0xf58cx7,_0xf58cx8);onUnmanagedChat(_0xf58cx7,_0xf58cx8)}models[_0x7bb6[14]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxb(_0xf58cx8)});models[_0x7bb6[14]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxb(_0xf58cx8)});models[_0x7bb6[15]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxb(_0xf58cx8)});models[_0x7bb6[15]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxb(_0xf58cx8)});function _0xf58cxb(_0xf58cx8){onNewFax(_0xf58cx7,_0xf58cx8);onOpenFax(_0xf58cx7,_0xf58cx8);onClosedFax(_0xf58cx7,_0xf58cx8);onTimeoutFax(_0xf58cx7,_0xf58cx8);onPendingFax(_0xf58cx7,_0xf58cx8);onWaitingFax(_0xf58cx7,_0xf58cx8)}models[_0x7bb6[16]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxc(_0xf58cx8)});models[_0x7bb6[16]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxc(_0xf58cx8)});models[_0x7bb6[17]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxc(_0xf58cx8)});models[_0x7bb6[17]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxc(_0xf58cx8)});function _0xf58cxc(_0xf58cx8){onNewSms(_0xf58cx7,_0xf58cx8);onOpenSms(_0xf58cx7,_0xf58cx8);onClosedSms(_0xf58cx7,_0xf58cx8);onTimeoutSms(_0xf58cx7,_0xf58cx8);onPendingSms(_0xf58cx7,_0xf58cx8);onWaitingSms(_0xf58cx7,_0xf58cx8)}models[_0x7bb6[18]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxd(_0xf58cx8)});models[_0x7bb6[18]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxd(_0xf58cx8)});models[_0x7bb6[19]][_0x7bb6[8]](function(_0xf58cx8){_0xf58cxd(_0xf58cx8)});models[_0x7bb6[19]][_0x7bb6[10]](function(_0xf58cx8){_0xf58cxd(_0xf58cx8)});function _0xf58cxd(_0xf58cx8){onNewOpenchannel(_0xf58cx7,_0xf58cx8);onOpenOpenchannel(_0xf58cx7,_0xf58cx8);onClosedOpenchannel(_0xf58cx7,_0xf58cx8);onTimeoutOpenchannel(_0xf58cx7,_0xf58cx8);onPendingOpenchannel(_0xf58cx7,_0xf58cx8);onWaitingOpenchannel(_0xf58cx7,_0xf58cx8)}};function getMailQueues(_0xf58cxf,_0xf58cx10){return function(){switch(_0xf58cxf[_0x7bb6[36]]){case _0x7bb6[33]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](Util[_0x7bb6[30]]({},{attributes:[_0x7bb6[23]],include:[{raw:true,model:models[_0x7bb6[29]],attributes:[_0x7bb6[23]]}]}))[_0x7bb6[28]](function(_0xf58cx11){if(_0xf58cx10){return {include:{model:models[_0x7bb6[20]],include:{model:models[_0x7bb6[21]],include:{model:models[_0x7bb6[22]],where:{id:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23])}}}}}}else {var _0xf58cx12=[];_0xf58cx11[_0x7bb6[27]][_0x7bb6[26]](function(_0xf58cx13){_0xf58cx12= _[_0x7bb6[25]](_0xf58cx12,_[_0x7bb6[24]](_0xf58cx13.Users,_0x7bb6[23]))});return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11[_0x7bb6[27]],_0x7bb6[23]),memberid:_0xf58cx12}}}}});case _0x7bb6[35]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](function(_0xf58cx14){return _0xf58cx14[_0x7bb6[34]]({attributes:[_0x7bb6[23]]})})[_0x7bb6[28]](function(_0xf58cx11){return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23]),memberid:_0xf58cxf[_0x7bb6[31]]}}}});default:return {}}}}function getChatQueues(_0xf58cxf,_0xf58cx10){return function(){switch(_0xf58cxf[_0x7bb6[36]]){case _0x7bb6[33]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](Util[_0x7bb6[40]]({},{attributes:[_0x7bb6[23]],include:[{raw:true,model:models[_0x7bb6[29]],attributes:[_0x7bb6[23]]}]}))[_0x7bb6[28]](function(_0xf58cx11){if(_0xf58cx10){return {include:{model:models[_0x7bb6[37]],include:{model:models[_0x7bb6[38]],include:{model:models[_0x7bb6[39]],where:{id:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23])}}}}}}else {var _0xf58cx12=[];_0xf58cx11[_0x7bb6[27]][_0x7bb6[26]](function(_0xf58cx13){_0xf58cx12= _[_0x7bb6[25]](_0xf58cx12,_[_0x7bb6[24]](_0xf58cx13.Users,_0x7bb6[23]))});return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11[_0x7bb6[27]],_0x7bb6[23]),memberid:_0xf58cx12}}}}});case _0x7bb6[35]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](function(_0xf58cx14){return _0xf58cx14[_0x7bb6[41]]({attributes:[_0x7bb6[23]]})})[_0x7bb6[28]](function(_0xf58cx11){return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23]),memberid:_0xf58cxf[_0x7bb6[31]]}}}});default:return {}}}}function getFaxQueues(_0xf58cxf,_0xf58cx10){return function(){switch(_0xf58cxf[_0x7bb6[36]]){case _0x7bb6[33]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](Util[_0x7bb6[45]]({},{attributes:[_0x7bb6[23]],include:[{raw:true,model:models[_0x7bb6[29]],attributes:[_0x7bb6[23]]}]}))[_0x7bb6[28]](function(_0xf58cx11){if(_0xf58cx10){return {include:{model:models[_0x7bb6[42]],include:{model:models[_0x7bb6[43]],include:{model:models[_0x7bb6[44]],where:{id:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23])}}}}}}else {var _0xf58cx12=[];_0xf58cx11[_0x7bb6[27]][_0x7bb6[26]](function(_0xf58cx13){_0xf58cx12= _[_0x7bb6[25]](_0xf58cx12,_[_0x7bb6[24]](_0xf58cx13.Users,_0x7bb6[23]))});return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11[_0x7bb6[27]],_0x7bb6[23]),memberid:_0xf58cx12}}}}});case _0x7bb6[35]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](function(_0xf58cx14){return _0xf58cx14[_0x7bb6[46]]({attributes:[_0x7bb6[23]]})})[_0x7bb6[28]](function(_0xf58cx11){return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23]),memberid:_0xf58cxf[_0x7bb6[31]]}}}});default:return {}}}}function getSmsQueues(_0xf58cxf,_0xf58cx10){return function(){switch(_0xf58cxf[_0x7bb6[36]]){case _0x7bb6[33]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](Util[_0x7bb6[50]]({},{attributes:[_0x7bb6[23]],include:[{raw:true,model:models[_0x7bb6[29]],attributes:[_0x7bb6[23]]}]}))[_0x7bb6[28]](function(_0xf58cx11){if(_0xf58cx10){return {include:{model:models[_0x7bb6[47]],include:{model:models[_0x7bb6[48]],include:{model:models[_0x7bb6[49]],where:{id:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23])}}}}}}else {var _0xf58cx12=[];_0xf58cx11[_0x7bb6[27]][_0x7bb6[26]](function(_0xf58cx13){_0xf58cx12= _[_0x7bb6[25]](_0xf58cx12,_[_0x7bb6[24]](_0xf58cx13.Users,_0x7bb6[23]))});return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11[_0x7bb6[27]],_0x7bb6[23]),memberid:_0xf58cx12}}}}});case _0x7bb6[35]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](function(_0xf58cx14){return _0xf58cx14[_0x7bb6[51]]({attributes:[_0x7bb6[23]]})})[_0x7bb6[28]](function(_0xf58cx11){return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23]),memberid:_0xf58cxf[_0x7bb6[31]]}}}});default:return {}}}}function getOpenchannelQueues(_0xf58cxf,_0xf58cx10){return function(){switch(_0xf58cxf[_0x7bb6[36]]){case _0x7bb6[33]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](Util[_0x7bb6[55]]({},{attributes:[_0x7bb6[23]],include:[{raw:true,model:models[_0x7bb6[29]],attributes:[_0x7bb6[23]]}]}))[_0x7bb6[28]](function(_0xf58cx11){if(_0xf58cx10){return {include:{model:models[_0x7bb6[52]],include:{model:models[_0x7bb6[53]],include:{model:models[_0x7bb6[54]],where:{id:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23])}}}}}}else {var _0xf58cx12=[];_0xf58cx11[_0x7bb6[27]][_0x7bb6[26]](function(_0xf58cx13){_0xf58cx12= _[_0x7bb6[25]](_0xf58cx12,_[_0x7bb6[24]](_0xf58cx13.Users,_0x7bb6[23]))});return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11[_0x7bb6[27]],_0x7bb6[23]),memberid:_0xf58cx12}}}}});case _0x7bb6[35]:return models[_0x7bb6[29]][_0x7bb6[32]](_0xf58cxf[_0x7bb6[31]],{attributes:[_0x7bb6[23]]})[_0x7bb6[28]](function(_0xf58cx14){return _0xf58cx14[_0x7bb6[56]]({attributes:[_0x7bb6[23]]})})[_0x7bb6[28]](function(_0xf58cx11){return {where:{$or:{queue:_[_0x7bb6[24]](_0xf58cx11,_0x7bb6[23]),memberid:_0xf58cxf[_0x7bb6[31]]}}}});default:return {}}}}function onOpenMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[11]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[61],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[59],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onClosedMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[11]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[68],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[67],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onNewMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[11]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[70],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[69],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onWaitingMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[9]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:null}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[71],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onTimeoutMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[9]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{timeout:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[72],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onPendingMail(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getMailQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[11]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[74],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[73],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onOpenChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[12]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[75],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onClosedChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[12]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{complete:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[76],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onNewChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[12]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:null}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[77],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onTimeoutChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[12]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{timeout:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[78],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onAbandonedChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[12]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{abandon:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[79],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onUnmanagedChat(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getChatQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[13]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[81],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[80],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onOpenFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[15]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[61],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[82],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onClosedFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[15]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[68],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[83],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onNewFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[15]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[70],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[84],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onTimeoutFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[14]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{timeout:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[85],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onPendingFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[15]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[74],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[86],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onWaitingFax(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getFaxQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[14]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[87],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onOpenSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[17]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[61],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[88],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onClosedSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[17]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[68],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[89],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onNewSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[17]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[70],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[90],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onTimeoutSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[16]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{timeout:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[91],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onPendingSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[17]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[74],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[92],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onWaitingSms(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getSmsQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[16]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:null}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[92],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onOpenOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[19]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[61],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[93],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onClosedOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[19]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[68],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[94],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onNewOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[19]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[70],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[95],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onTimeoutOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[18]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{timeout:true}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[96],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onPendingOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7,true))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[19]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{status:_0x7bb6[74],updatedAt:{$gte:moment()[_0x7bb6[63]](_0x7bb6[62])}}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[97],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}function onWaitingOpenchannel(_0xf58cx7,_0xf58cx8){return Promise[_0x7bb6[66]]([])[_0x7bb6[28]](getOpenchannelQueues(_0xf58cx7))[_0x7bb6[28]](function(_0xf58cx1c){return models[_0x7bb6[18]][_0x7bb6[65]](_[_0x7bb6[64]]({where:{leaveAt:null}},_0xf58cx1c))})[_0x7bb6[28]](function(_0xf58cx1b){_0xf58cx7[_0x7bb6[60]](_0x7bb6[97],{value:_0xf58cx1b})})[_0x7bb6[58]](function(_0xf58cx1a){console[_0x7bb6[57]](_0xf58cx1a)})}