-var _0x4744=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x6F\x70\x65\x6E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x75\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6C\x6F\x73\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x4744[0];var _=require(_0x4744[1]);var ReportChatSession=require(_0x4744[3])[_0x4744[2]];var User=require(_0x4744[3])[_0x4744[4]];var ReportChatSessionHistory=require(_0x4744[3])[_0x4744[6]][_0x4744[5]];var Promise=require(_0x4744[7]);var Util=require(_0x4744[8]);var moment=require(_0x4744[9]);var logger=require(_0x4744[11])(_0x4744[10]);exports[_0x4744[12]]= function(_0x1c41x9,_0x1c41xa,_0x1c41xb){return ReportChatSession[_0x4744[19]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]]))[_0x4744[16]](function(_0x1c41xd){_0x1c41xa[_0x4744[15]](200)[_0x4744[14]](_0x1c41xd)})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[20]]= function(_0x1c41x9,_0x1c41xa){return ReportChatSessionHistory[_0x4744[20]]()[_0x4744[16]](function(_0x1c41xe){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]](_0x1c41xe)})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};function getChatQueues(_0x1c41x10){return function(){switch(_0x1c41x10[_0x4744[31]]){case _0x4744[28]:return User[_0x4744[27]](_0x1c41x10[_0x4744[21]],{attributes:[_0x4744[21]]})[_0x4744[16]](Util[_0x4744[26]]({},{attributes:[_0x4744[21]],include:[{raw:true,model:User,attributes:[_0x4744[21]]}]}))[_0x4744[16]](function(_0x1c41x11){var _0x1c41x12=[];_0x1c41x11[_0x4744[25]][_0x4744[24]](function(_0x1c41x13){_0x1c41x12= _[_0x4744[23]](_0x1c41x12,_[_0x4744[22]](_0x1c41x13.Users,_0x4744[21]))});return {$or:{queue:_[_0x4744[22]](_0x1c41x11[_0x4744[25]],_0x4744[21]),memberid:_0x1c41x12}}});case _0x4744[30]:return User[_0x4744[27]](_0x1c41x10[_0x4744[21]],{attributes:[_0x4744[21]]})[_0x4744[16]](function(_0x1c41x14){return _0x1c41x14[_0x4744[29]]({attributes:[_0x4744[21]]})})[_0x4744[16]](function(_0x1c41x11){return {$or:{queue:_[_0x4744[22]](_0x1c41x11,_0x4744[21]),memberid:_0x1c41x10[_0x4744[21]]}}});default:return {}}}}exports[_0x4744[32]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[34]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({leaveAt:null},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({rows:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[36]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[39]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null,createdAt:{$gte:moment()[_0x4744[38]](_0x4744[37])}},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({value:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[40]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[39]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({leaveAt:null,createdAt:{$gte:moment()[_0x4744[38]](_0x4744[37])}},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({value:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[41]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[39]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({complete:true,createdAt:{$gte:moment()[_0x4744[38]](_0x4744[37])}},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({value:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[42]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[39]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({timeout:true,createdAt:{$gte:moment()[_0x4744[38]](_0x4744[37])}},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({value:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};exports[_0x4744[43]]= function(_0x1c41x9,_0x1c41xa){return Promise[_0x4744[35]]([])[_0x4744[16]](getChatQueues(_0x1c41x9[_0x4744[28]]))[_0x4744[16]](function(_0x1c41x16){return ReportChatSession[_0x4744[39]](Util[_0x4744[18]](_0x1c41x9[_0x4744[17]],_[_0x4744[33]]({abandon:true,createdAt:{$gte:moment()[_0x4744[38]](_0x4744[37])}},_0x1c41x16)))})[_0x4744[16]](function(_0x1c41x15){return _0x1c41xa[_0x4744[15]](200)[_0x4744[14]]({value:_0x1c41x15})})[_0x4744[13]](function(_0x1c41xc){return handleError(_0x1c41xa,_0x1c41xc)})};function handleError(_0x1c41xa,_0x1c41xc){logger[_0x4744[45]](_0x1c41xc[_0x4744[44]]);return _0x1c41xa[_0x4744[15]](500)[_0x4744[14]](_0x1c41xc)}
\ No newline at end of file
+var _0x3d80=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x6F\x70\x65\x6E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x75\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6C\x6F\x73\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x3d80[0];var _=require(_0x3d80[1]);var ReportChatSession=require(_0x3d80[3])[_0x3d80[2]];var User=require(_0x3d80[3])[_0x3d80[4]];var ReportChatSessionHistory=require(_0x3d80[3])[_0x3d80[6]][_0x3d80[5]];var Promise=require(_0x3d80[7]);var Util=require(_0x3d80[8]);var moment=require(_0x3d80[9]);var logger=require(_0x3d80[11])(_0x3d80[10]);exports[_0x3d80[12]]= function(_0xea7ex9,_0xea7exa,_0xea7exb){return ReportChatSession[_0x3d80[19]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]]))[_0x3d80[16]](function(_0xea7exd){_0xea7exa[_0x3d80[15]](200)[_0x3d80[14]](_0xea7exd)})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[20]]= function(_0xea7ex9,_0xea7exa){return ReportChatSessionHistory[_0x3d80[20]]()[_0x3d80[16]](function(_0xea7exe){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]](_0xea7exe)})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};function getChatQueues(_0xea7ex10){return function(){switch(_0xea7ex10[_0x3d80[31]]){case _0x3d80[28]:return User[_0x3d80[27]](_0xea7ex10[_0x3d80[21]],{attributes:[_0x3d80[21]]})[_0x3d80[16]](Util[_0x3d80[26]]({},{attributes:[_0x3d80[21]],include:[{raw:true,model:User,attributes:[_0x3d80[21]]}]}))[_0x3d80[16]](function(_0xea7ex11){var _0xea7ex12=[];_0xea7ex11[_0x3d80[25]][_0x3d80[24]](function(_0xea7ex13){_0xea7ex12= _[_0x3d80[23]](_0xea7ex12,_[_0x3d80[22]](_0xea7ex13.Users,_0x3d80[21]))});return {$or:{queue:_[_0x3d80[22]](_0xea7ex11[_0x3d80[25]],_0x3d80[21]),memberid:_0xea7ex12}}});case _0x3d80[30]:return User[_0x3d80[27]](_0xea7ex10[_0x3d80[21]],{attributes:[_0x3d80[21]]})[_0x3d80[16]](function(_0xea7ex14){return _0xea7ex14[_0x3d80[29]]({attributes:[_0x3d80[21]]})})[_0x3d80[16]](function(_0xea7ex11){return {$or:{queue:_[_0x3d80[22]](_0xea7ex11,_0x3d80[21]),memberid:_0xea7ex10[_0x3d80[21]]}}});default:return {}}}}exports[_0x3d80[32]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[34]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({leaveAt:null},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({rows:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[36]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[39]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({value:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[40]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[39]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({leaveAt:null,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({value:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[41]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[39]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({complete:true,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({value:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[42]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[39]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({timeout:true,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({value:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[43]]= function(_0xea7ex9,_0xea7exa){return Promise[_0x3d80[35]]([])[_0x3d80[16]](getChatQueues(_0xea7ex9[_0x3d80[28]]))[_0x3d80[16]](function(_0xea7ex16){return ReportChatSession[_0x3d80[39]](Util[_0x3d80[18]](_0xea7ex9[_0x3d80[17]],_[_0x3d80[33]]({abandon:true,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}},_0xea7ex16)))})[_0x3d80[16]](function(_0xea7ex15){return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]]({value:_0xea7ex15})})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};exports[_0x3d80[44]]= function(_0xea7ex9,_0xea7exa){var _0xea7ex17={timeout:0,waiting:0};return ReportChatSession[_0x3d80[39]]({where:{leaveAt:null,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}}})[_0x3d80[16]](function(_0xea7exd){if(_0xea7exd){_0xea7ex17[_0x3d80[40]]= _0xea7exd};return ReportChatSession[_0x3d80[39]]({where:{timeout:true,createdAt:{$gte:moment()[_0x3d80[38]](_0x3d80[37])}}})})[_0x3d80[16]](function(_0xea7exd){if(_0xea7exd){_0xea7ex17[_0x3d80[42]]= _0xea7exd};return _0xea7exa[_0x3d80[15]](200)[_0x3d80[14]](_0xea7ex17)})[_0x3d80[13]](function(_0xea7exc){return handleError(_0xea7exa,_0xea7exc)})};function handleError(_0xea7exa,_0xea7exc){logger[_0x3d80[46]](_0xea7exc[_0x3d80[45]]);return _0xea7exa[_0x3d80[15]](500)[_0x3d80[14]](_0xea7exc)}
\ No newline at end of file