43311c5e17aafb69ef2659a0fe794b04ff39a364
[motion.git] / server / api / report_queue / report_queue.socket.js
1 var _0xab23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\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","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65"];_0xab23[0];const ReportQueueEvents=require(_0xab23[1]);const VoiceQueue=require(_0xab23[3])[_0xab23[2]];const User=require(_0xab23[3])[_0xab23[4]];const Util=require(_0xab23[5]);const _=require(_0xab23[6]);const Promise=require(_0xab23[7]);var events=[_0xab23[8],_0xab23[9],_0xab23[10]];exports[_0xab23[11]]= function(_0xc5ccx8){for(var _0xc5ccx9=0,_0xc5ccxa=events[_0xab23[12]];_0xc5ccx9< _0xc5ccxa;_0xc5ccx9++){var _0xc5ccxb=events[_0xc5ccx9];var _0xc5ccxc=createListener(_0xab23[13]+ _0xc5ccxb,_0xc5ccx8);ReportQueueEvents[_0xab23[14]](_0xc5ccxb,_0xc5ccxc);_0xc5ccx8[_0xab23[14]](_0xab23[15],removeListener(_0xc5ccxb,_0xc5ccxc))}};function createListener(_0xc5ccxb,_0xc5ccx8){return function(_0xc5ccxe){switch(_0xc5ccxb){case _0xab23[16]:;case _0xab23[25]:return Promise[_0xab23[24]]([])[_0xab23[23]](getVoiceQueues(_0xc5ccx8))[_0xab23[23]](function(_0xc5ccx10){if(_[_0xab23[21]](_0xc5ccx10,_0xc5ccxe[_0xab23[20]])){_0xc5ccx8[_0xab23[22]](_0xc5ccxb,_0xc5ccxe)}})[_0xab23[19]](function(_0xc5ccxf){console[_0xab23[18]](_0xab23[17],_0xc5ccxf)});case _0xab23[26]:_0xc5ccx8[_0xab23[22]](_0xc5ccxb,_0xc5ccxe);break;default:}}}function removeListener(_0xc5ccxb,_0xc5ccxc){return function(){ReportQueueEvents[_0xab23[27]](_0xc5ccxb,_0xc5ccxc)}}function getVoiceQueues(_0xc5ccx13){return function(){switch(_0xc5ccx13[_0xab23[40]]){case _0xab23[35]:return User[_0xab23[34]](_0xc5ccx13[_0xab23[32]],{attributes:[_0xab23[33]]})[_0xab23[23]](Util[_0xab23[31]]())[_0xab23[23]](function(_0xc5ccx10){return _[_0xab23[30]](_0xc5ccx10[_0xab23[28]],_0xab23[29])});case _0xab23[37]:return User[_0xab23[38]](_0xab23[37])[_0xab23[34]](_0xc5ccx13[_0xab23[32]])[_0xab23[23]](function(_0xc5ccx15){return _0xc5ccx15[_0xab23[36]]({attributes:[_0xab23[29]]})})[_0xab23[23]](function(_0xc5ccx14){return _[_0xab23[30]](_0xc5ccx14,_0xab23[29])});default:return VoiceQueue[_0xab23[39]]()[_0xab23[23]](function(_0xc5ccx10){return _[_0xab23[30]](_0xc5ccx10,_0xab23[29])})}}}