Built motion from commit f1f5024.|1.0.16
[motion.git] / server / api / voice_queue / voice_queue.socket.js
1 var _0xa018=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\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","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\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","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x6C\x65\x61\x76\x65","\x76\x6F\x69\x63\x65\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","\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","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xa018[0];var VoiceQueueEvents=require(_0xa018[1]);var VoiceQueue=require(_0xa018[3])[_0xa018[2]];var User=require(_0xa018[3])[_0xa018[4]];var Util=require(_0xa018[5]);var _=require(_0xa018[6]);var Promise=require(_0xa018[7]);var events=[_0xa018[8],_0xa018[9]];exports[_0xa018[10]]= function(_0x31f4x8){for(var _0x31f4x9=0,_0x31f4xa=events[_0xa018[11]];_0x31f4x9< _0x31f4xa;_0x31f4x9++){var _0x31f4xb=events[_0x31f4x9];var _0x31f4xc=createListener(_0xa018[12]+ _0x31f4xb,_0x31f4x8);VoiceQueueEvents[_0xa018[13]](_0x31f4xb,_0x31f4xc);_0x31f4x8[_0xa018[13]](_0xa018[14],removeListener(_0x31f4xb,_0x31f4xc))}};function createListener(_0x31f4xb,_0x31f4x8){return function(_0x31f4xe){switch(_0x31f4xb){case _0xa018[20]:if(_0x31f4x8[_0xa018[15]]=== _0xa018[16]){_0x31f4x8[_0xa018[18]](_0x31f4xe[_0xa018[17]]);_0x31f4x8[_0xa018[19]](_0x31f4xb,_0x31f4xe)};break;case _0xa018[27]:return Promise[_0xa018[26]]()[_0xa018[25]](getVoiceQueues(_0x31f4x8))[_0xa018[25]](function(_0x31f4x10){if(_[_0xa018[24]](_0x31f4x10,_0x31f4xe[_0xa018[17]])){_0x31f4x8[_0xa018[19]](_0x31f4xb,_0x31f4xe)}})[_0xa018[23]](function(_0x31f4xf){console[_0xa018[22]](_0xa018[21],_0x31f4xf)});break;case _0xa018[29]:_0x31f4x8[_0xa018[28]](_0x31f4xe[_0xa018[17]]);_0x31f4x8[_0xa018[19]](_0x31f4xb,_0x31f4xe);break;default:}}}function removeListener(_0x31f4xb,_0x31f4xc){return function(){VoiceQueueEvents[_0xa018[30]](_0x31f4xb,_0x31f4xc)}}function getVoiceQueues(_0x31f4x13){return function(){switch(_0x31f4x13[_0xa018[15]]){case _0xa018[37]:return User[_0xa018[36]](_0x31f4x13[_0xa018[34]],{attributes:[_0xa018[35]]})[_0xa018[25]](Util[_0xa018[33]]())[_0xa018[25]](function(_0x31f4x10){return _[_0xa018[32]](_0x31f4x10[_0xa018[31]],_0xa018[17])});case _0xa018[16]:return VoiceQueue[_0xa018[38]]()[_0xa018[25]](function(_0x31f4x14){return {rows:_0x31f4x14}})[_0xa018[25]](function(_0x31f4x10){return _[_0xa018[32]](_0x31f4x10[_0xa018[31]],_0xa018[17])});default:return []}}}