7f9115f71b744ac24c26bc01543c666da4534c28
[motion.git] / server / api / report_queue / report_queue.controller.js
1 var _0xab52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\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","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x54\x6F","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x54\x6F","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x54\x6F","\x6C\x6F\x67","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64","\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73","\x66\x6F\x72\x45\x61\x63\x68","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x54\x6F","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x54\x6F","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x54\x6F","\x72\x65\x64\x75\x63\x65","\x66\x69\x6C\x74\x65\x72","\x5F\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x73\x6C\x69\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x30\x30\x3A\x30\x30\x3A\x30\x30","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x6A\x6F\x69\x6E","\x27\x29\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x71\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x61\x63\x74\x69\x76\x65","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x46\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73"];_0xab52[0];var _=require(_0xab52[1]);var sequelize=require(_0xab52[3])[_0xab52[2]];var Agent=require(_0xab52[3])[_0xab52[4]];var ReportQueue=require(_0xab52[3])[_0xab52[5]];var VoiceQueue=require(_0xab52[3])[_0xab52[6]];var ReportQueueHistory=require(_0xab52[3])[_0xab52[8]][_0xab52[7]];var Util=require(_0xab52[9]);var Promise=require(_0xab52[10]);exports[_0xab52[11]]= function(_0x32e6x9,_0x32e6xa,_0x32e6xb){return ReportQueue[_0xab52[18]](Util[_0xab52[17]](_0x32e6x9[_0xab52[16]]))[_0xab52[15]](function(_0x32e6xd){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]](_0x32e6xd)})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[19]]= function(_0x32e6x9,_0x32e6xa){return ReportQueueHistory[_0xab52[19]]()[_0xab52[15]](function(_0x32e6xe){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]](_0x32e6xe)})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[20]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[21]]({where:{queuecallerleaveAt:null,queue:_0x32e6x10}})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};function getVoiceQueues(_0x32e6x12){return function(){switch(_0x32e6x12[_0xab52[33]]){case _0xab52[22]:return Agent[_0xab52[29]](_0x32e6x12[_0xab52[28]],{attributes:[_0xab52[28]]})[_0xab52[15]](Util[_0xab52[27]]())[_0xab52[15]](function(_0x32e6x10){return _[_0xab52[26]](_0x32e6x10[_0xab52[24]],_0xab52[25])});case _0xab52[31]:return Agent[_0xab52[29]](_0x32e6x12[_0xab52[28]])[_0xab52[15]](function(_0x32e6x13){return _0x32e6x13[_0xab52[30]]({attributes:[_0xab52[25]]})})[_0xab52[15]](function(_0x32e6x10){return _[_0xab52[26]](_0x32e6x10[_0xab52[24]],_0xab52[25])});default:return VoiceQueue[_0xab52[32]]()[_0xab52[15]](function(_0x32e6x14){return {rows:_0x32e6x14}})[_0xab52[15]](function(_0x32e6x10){return _[_0xab52[26]](_0x32e6x10[_0xab52[24]],_0xab52[25])})}}}exports[_0xab52[34]]= function(_0x32e6x9,_0x32e6xa){var _0x32e6x15={_limit:_0x32e6x9[_0xab52[16]][_0xab52[35]]?_0x32e6x9[_0xab52[16]][_0xab52[35]]:null,_offset:_0x32e6x9[_0xab52[16]][_0xab52[36]]?_0x32e6x9[_0xab52[16]][_0xab52[36]]:0,_answeredFrom:_0x32e6x9[_0xab52[16]][_0xab52[37]]|| _0x32e6x9[_0xab52[16]][_0xab52[37]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[37]]:undefined,_answeredTo:_0x32e6x9[_0xab52[16]][_0xab52[38]]|| _0x32e6x9[_0xab52[16]][_0xab52[38]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[38]]:undefined,_abandonedFrom:_0x32e6x9[_0xab52[16]][_0xab52[39]]|| _0x32e6x9[_0xab52[16]][_0xab52[39]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[39]]:undefined,_abandonedTo:_0x32e6x9[_0xab52[16]][_0xab52[40]]|| _0x32e6x9[_0xab52[16]][_0xab52[40]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[40]]:undefined,_unmanagedFrom:_0x32e6x9[_0xab52[16]][_0xab52[41]]|| _0x32e6x9[_0xab52[16]][_0xab52[41]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[41]]:undefined,_unmanagedTo:_0x32e6x9[_0xab52[16]][_0xab52[42]]|| _0x32e6x9[_0xab52[16]][_0xab52[42]]=== 0?_0x32e6x9[_0xab52[16]][_0xab52[42]]:undefined};var _0x32e6x16,_0x32e6x17,_0x32e6x18,_0x32e6x19;delete _0x32e6x9[_0xab52[16]][_0xab52[35]];delete _0x32e6x9[_0xab52[16]][_0xab52[36]];delete _0x32e6x9[_0xab52[16]][_0xab52[37]];delete _0x32e6x9[_0xab52[16]][_0xab52[38]];delete _0x32e6x9[_0xab52[16]][_0xab52[39]];delete _0x32e6x9[_0xab52[16]][_0xab52[40]];delete _0x32e6x9[_0xab52[16]][_0xab52[41]];delete _0x32e6x9[_0xab52[16]][_0xab52[42]];return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){_0x32e6x17= _0x32e6x10;_0x32e6x16= _[_0xab52[26]](_0x32e6x10,function(_0x32e6x1d){return {name:_0x32e6x1d}});return ReportQueue[_0xab52[32]]({where:{queuecallerleaveAt:null,queue:_0x32e6x17},group:_0xab52[76],attributes:[[_0xab52[76],_0xab52[25]],[sequelize[_0xab52[79]](_0xab52[77],sequelize[_0xab52[78]](_0xab52[28])),_0xab52[20]]]})})[_0xab52[15]](function(_0x32e6x2e){_0x32e6x2e= _[_0xab52[26]](_0x32e6x2e,_0xab52[74]);_0x32e6x16[_0xab52[47]](function(_0x32e6x1d,_0x32e6x2f){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x2e,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[20]]= _0x32e6x1e?_0x32e6x1e[_0xab52[20]]:0});return ReportQueue[_0xab52[32]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x32e6x17},group:_0xab52[76],attributes:[[_0xab52[76],_0xab52[25]],[sequelize[_0xab52[79]](_0xab52[77],sequelize[_0xab52[78]](_0xab52[28])),_0xab52[80]]]})})[_0xab52[15]](function(_0x32e6x2d){_0x32e6x2d= _[_0xab52[26]](_0x32e6x2d,_0xab52[74]);_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x2d,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[80]]= _0x32e6x1e?_0x32e6x1e[_0xab52[80]]:0});return ReportQueue[_0xab52[32]]({where:{queuecallercomplete:true,queue:_0x32e6x17},group:_0xab52[76],attributes:[[_0xab52[76],_0xab52[25]],[sequelize[_0xab52[79]](_0xab52[77],sequelize[_0xab52[78]](_0xab52[28])),_0xab52[49]]]})})[_0xab52[15]](function(_0x32e6x2c){_0x32e6x2c= _[_0xab52[26]](_0x32e6x2c,_0xab52[74]);_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x2c,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[49]]= _0x32e6x1e?_0x32e6x1e[_0xab52[49]]:0});return ReportQueue[_0xab52[32]]({where:{queuecallerabandon:true,queue:_0x32e6x17},group:_0xab52[76],attributes:[[_0xab52[76],_0xab52[25]],[sequelize[_0xab52[79]](_0xab52[77],sequelize[_0xab52[78]](_0xab52[28])),_0xab52[52]]]})})[_0xab52[15]](function(_0x32e6x2b){_0x32e6x2b= _[_0xab52[26]](_0x32e6x2b,_0xab52[74]);_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x2b,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[52]]= _0x32e6x1e?_0x32e6x1e[_0xab52[52]]:0});return ReportQueue[_0xab52[32]]({where:{queuecallerexit:true,queue:_0x32e6x17},group:_0xab52[76],attributes:[[_0xab52[76],_0xab52[25]],[sequelize[_0xab52[79]](_0xab52[77],sequelize[_0xab52[78]](_0xab52[28])),_0xab52[55]]]})})[_0xab52[15]](function(_0x32e6x2a){_0x32e6x2a= _[_0xab52[26]](_0x32e6x2a,_0xab52[74]);_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x2a,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[55]]= _0x32e6x1e?_0x32e6x1e[_0xab52[55]]:0});return sequelize[_0xab52[16]](_0xab52[75]+ _0x32e6x17[_0xab52[68]](_0xab52[67])+ _0xab52[69],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6x29){_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x29,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[72]]= _0x32e6x1e?_0x32e6x1e[_0xab52[72]]:_0xab52[65]});return sequelize[_0xab52[16]](_0xab52[73]+ _0x32e6x17[_0xab52[68]](_0xab52[67])+ _0xab52[69],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6x28){_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x28,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[64]]= _0x32e6x1e?_0x32e6x1e[_0xab52[64]]:_0xab52[65]});return sequelize[_0xab52[16]](_0xab52[66]+ _0x32e6x17[_0xab52[68]](_0xab52[67])+ _0xab52[69],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6x1c){_0x32e6x16[_0xab52[47]](function(_0x32e6x1d){var _0x32e6x1e=_[_0xab52[45]](_0x32e6x1c,{name:_0x32e6x1d[_0xab52[25]]});_0x32e6x1d[_0xab52[46]]= _0x32e6x1e?_0x32e6x1e[_0xab52[46]]:0});var _0x32e6x1f=_(_[_0xab52[58]](_0x32e6x16,function(_0x32e6x1d){var _0x32e6x20=_0x32e6x15[_0xab52[48]]?(_0x32e6x1d[_0xab52[49]]>= Number(_0x32e6x15._answeredFrom)):true;var _0x32e6x21=_0x32e6x15[_0xab52[50]]?(_0x32e6x1d[_0xab52[49]]<= Number(_0x32e6x15._answeredTo)):true;var _0x32e6x22=_0x32e6x15[_0xab52[51]]?(_0x32e6x1d[_0xab52[52]]>= Number(_0x32e6x15._abandonedFrom)):true;var _0x32e6x23=_0x32e6x15[_0xab52[53]]?(_0x32e6x1d[_0xab52[52]]>= Number(_0x32e6x15._abandonedTo)):true;var _0x32e6x24=_0x32e6x15[_0xab52[54]]?(_0x32e6x1d[_0xab52[55]]>= Number(_0x32e6x15._unmanagedFrom)):true;var _0x32e6x25=_0x32e6x15[_0xab52[56]]?(_0x32e6x1d[_0xab52[55]]<= Number(_0x32e6x15._unmanagedTo)):true;return _[_0xab52[57]]([_0x32e6x20,_0x32e6x21,_0x32e6x22,_0x32e6x23,_0x32e6x24,_0x32e6x25],function(_0x32e6x26,_0x32e6x27){return _0x32e6x26&& _0x32e6x27})}));if(_0x32e6x15[_0xab52[59]]){_0x32e6x1f= _0x32e6x1f[_0xab52[62]](_0x32e6x15._offset)[_0xab52[61]](_0x32e6x15._limit)[_0xab52[60]]()};return [_0x32e6x16[_0xab52[63]],_0x32e6x1f]})[_0xab52[44]](function(_0x32e6x1a,_0x32e6x1b){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({rows:_0x32e6x1b,count:_0x32e6x1a})})[_0xab52[12]](function(_0x32e6xc){console[_0xab52[43]](_0x32e6xc);return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[81]]= function(_0x32e6x9,_0x32e6xa){var _0x32e6x30={};if(_0x32e6x9[_0xab52[22]][_0xab52[33]]=== _0xab52[31]){_0x32e6x30[_0xab52[82]]= _0x32e6x9[_0xab52[22]][_0xab52[83]]};return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[85]](_0xab52[20],{method:[_0xab52[84],_0x32e6x10]})[_0xab52[32]](Util[_0xab52[17]](_0x32e6x9[_0xab52[16]],_0x32e6x30))})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({rows:_0x32e6xf,count:_0x32e6xf[_0xab52[63]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[80]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[21]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x32e6x10}})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[49]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[21]]({where:{queuecallercomplete:true,queue:_0x32e6x10}})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[52]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[21]]({where:{queuecallerabandon:true,queue:_0x32e6x10}})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[86]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return sequelize[_0xab52[16]](_0xab52[87]+ _0x32e6x10[_0xab52[68]](_0xab52[67])+ _0xab52[88],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf[0][_0xab52[60]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[89]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return sequelize[_0xab52[16]](_0xab52[90]+ _0x32e6x10[_0xab52[68]](_0xab52[67])+ _0xab52[88],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf[0][_0xab52[60]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[91]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return sequelize[_0xab52[16]](_0xab52[92]+ _0x32e6x10[_0xab52[68]](_0xab52[67])+ _0xab52[88],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf[0][_0xab52[60]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[93]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return sequelize[_0xab52[16]](_0xab52[94]+ _0x32e6x10[_0xab52[68]](_0xab52[67])+ _0xab52[88],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf[0][_0xab52[60]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[95]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return sequelize[_0xab52[16]](_0xab52[96]+ _0x32e6x10[_0xab52[68]](_0xab52[67])+ _0xab52[88],{type:sequelize[_0xab52[71]][_0xab52[70]]})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf[0][_0xab52[60]]})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[55]]= function(_0x32e6x9,_0x32e6xa){return Promise[_0xab52[23]]([])[_0xab52[15]](getVoiceQueues(_0x32e6x9[_0xab52[22]]))[_0xab52[15]](function(_0x32e6x10){return ReportQueue[_0xab52[21]]({where:{queuecallerexit:true,queue:_0x32e6x10}})})[_0xab52[15]](function(_0x32e6xf){return _0x32e6xa[_0xab52[14]](200)[_0xab52[13]]({value:_0x32e6xf})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};exports[_0xab52[97]]= function(_0x32e6x9,_0x32e6xa){return ReportQueue[_0xab52[32]]({where:{queue:_0x32e6x9[_0xab52[99]][_0xab52[76]]}})[_0xab52[15]](function(_0x32e6x31){if(!_0x32e6x31){return _0x32e6xa[_0xab52[98]](404)};return _0x32e6xa[_0xab52[13]]({count:_0x32e6x31[_0xab52[63]],rows:_0x32e6x31})})[_0xab52[12]](function(_0x32e6xc){return handleError(_0x32e6xa,_0x32e6xc)})};function handleError(_0x32e6xa,_0x32e6xc){return _0x32e6xa[_0xab52[14]](500)[_0xab52[13]](_0x32e6xc)}