Built motion from commit c36c9c6.|1.0.17
[motion.git] / server / api / voice_queue / voice_queue.controller.js
index 0c0cc0f..5c52e5f 100644 (file)
@@ -1 +1 @@
-var _0xd25c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\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\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xd25c[0];var _=require(_0xd25c[1]);var util=require(_0xd25c[2]);var Util=require(_0xd25c[3]);var sequelize=require(_0xd25c[5])[_0xd25c[4]];var User=require(_0xd25c[5])[_0xd25c[6]];var VoiceQueue=require(_0xd25c[5])[_0xd25c[7]];var UserHasVoiceQueue=require(_0xd25c[5])[_0xd25c[8]];var VoiceExtension=require(_0xd25c[5])[_0xd25c[9]];exports[_0xd25c[10]]= function(_0xcfe3x9,_0xcfe3xa){switch(_0xcfe3x9[_0xd25c[18]][_0xd25c[23]]){case _0xd25c[18]:return User[_0xd25c[19]](_0xcfe3x9[_0xd25c[18]][_0xd25c[17]],{attributes:[_0xd25c[17]]})[_0xd25c[14]](Util[_0xd25c[16]](_0xcfe3x9[_0xd25c[15]]))[_0xd25c[14]](function(_0xcfe3xc){_0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]](_0xcfe3xc)})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)});default:return VoiceQueue[_0xd25c[22]](Util[_0xd25c[21]](_0xcfe3x9[_0xd25c[15]]))[_0xd25c[14]](function(_0xcfe3xc){_0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]](_0xcfe3xc)})[_0xd25c[11]](function(_0xcfe3xb){console[_0xd25c[20]](_0xcfe3xb);return handleError(_0xcfe3xa,_0xcfe3xb)})}};exports[_0xd25c[24]]= function(_0xcfe3x9,_0xcfe3xa,_0xcfe3xd){switch(_0xcfe3x9[_0xd25c[18]][_0xd25c[23]]){case _0xd25c[18]:var _0xcfe3xe=[];return User[_0xd25c[19]](_0xcfe3x9[_0xd25c[18]][_0xd25c[17]],{attributes:[_0xd25c[17]]})[_0xd25c[14]](Util[_0xd25c[16]]({},{attributes:[_0xd25c[26]],include:[{raw:true,model:User,attributes:[_0xd25c[17]]}]}))[_0xd25c[14]](function(_0xcfe3xf){var _0xcfe3x10=_[_0xd25c[27]](_0xcfe3xf[_0xd25c[25]],_0xd25c[26]);_0xcfe3xf[_0xd25c[25]][_0xd25c[29]](function(_0xcfe3x11){_0xcfe3xe= _[_0xd25c[28]](_0xcfe3xe,_[_0xd25c[27]](_0xcfe3x11.Users,_0xd25c[17]))});return VoiceQueue[_0xd25c[22]](_[_0xd25c[30]](Util[_0xd25c[21]](_0xcfe3x9[_0xd25c[15]],{name:_0xcfe3x10}),{include:[{model:User,where:{id:_0xcfe3xe},required:false}]}))})[_0xd25c[14]](function(_0xcfe3xc){return _0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]](_0xcfe3xc)})[_0xd25c[11]](function(_0xcfe3xb){console[_0xd25c[20]](_0xcfe3xb);return handleError(_0xcfe3xa,_0xcfe3xb)});default:return VoiceQueue[_0xd25c[22]](_[_0xd25c[30]](Util[_0xd25c[21]](_0xcfe3x9[_0xd25c[15]]),{include:[{model:User,required:false}]}))[_0xd25c[14]](function(_0xcfe3xc){return _0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]](_0xcfe3xc)})[_0xd25c[11]](function(_0xcfe3xb){console[_0xd25c[20]](_0xcfe3xb);return handleError(_0xcfe3xa,_0xcfe3xb)})}};exports[_0xd25c[31]]= function(_0xcfe3x9,_0xcfe3xa){return VoiceQueue[_0xd25c[19]](_0xcfe3x9[_0xd25c[33]][_0xd25c[26]])[_0xd25c[14]](function(_0xcfe3x12){if(!_0xcfe3x12){return _0xcfe3xa[_0xd25c[32]](404)};return _0xcfe3xa[_0xd25c[12]](_0xcfe3x12)})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)})};exports[_0xd25c[34]]= function(_0xcfe3x9,_0xcfe3xa){return VoiceQueue[_0xd25c[19]](_0xcfe3x9[_0xd25c[33]][_0xd25c[26]])[_0xd25c[14]](function(_0xcfe3x11){if(!_0xcfe3x11){return _0xcfe3xa[_0xd25c[32]](404)};return _0xcfe3x11[_0xd25c[39]]({where:{role:_0xd25c[36]},attributes:[_0xd25c[17],_0xd25c[26],_0xd25c[37],_0xd25c[38]]})})[_0xd25c[14]](function(_0xcfe3xe){return _0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]]({rows:_0xcfe3xe,count:_0xcfe3xe[_0xd25c[35]]})})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)})};exports[_0xd25c[40]]= function(_0xcfe3x9,_0xcfe3xa){return VoiceQueue[_0xd25c[40]](_0xcfe3x9[_0xd25c[50]])[_0xd25c[14]](function(_0xcfe3x12){return _0xcfe3xa[_0xd25c[13]](201)[_0xd25c[12]](_0xcfe3x12)})[_0xd25c[11]](sequelize.UniqueConstraintError,function(_0xcfe3xb){var _0xcfe3x13=[];_0xcfe3xb[_0xd25c[44]][_0xd25c[29]](function(_0xcfe3x14){switch(_0xcfe3x14[_0xd25c[43]]){case _0xd25c[42]:_0xcfe3x13[_0xd25c[41]](_0xd25c[26]);break;default:_0xcfe3x13[_0xd25c[41]](_0xcfe3x14[_0xd25c[43]])}});_0xcfe3x13[_0xd25c[41]](_0xd25c[45]);_0xcfe3xb[_0xd25c[46]]= _0xcfe3x13[_0xd25c[47]]();_0xcfe3xb[_0xd25c[48]]= _0xd25c[49];return _0xcfe3xa[_0xd25c[13]](500)[_0xd25c[12]](_0xcfe3xb)})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)})};exports[_0xd25c[51]]= function(_0xcfe3x9,_0xcfe3xa){if(_0xcfe3x9[_0xd25c[50]][_0xd25c[26]]){delete _0xcfe3x9[_0xd25c[50]][_0xd25c[26]]};return VoiceQueue[_0xd25c[19]](_0xcfe3x9[_0xd25c[33]][_0xd25c[26]])[_0xd25c[14]](function(_0xcfe3x12){if(!_0xcfe3x12){return _0xcfe3xa[_0xd25c[32]](404)};var _0xcfe3x15=_[_0xd25c[30]](_0xcfe3x12,_0xcfe3x9[_0xd25c[50]]);return _0xcfe3x15[_0xd25c[52]]()})[_0xd25c[14]](function(_0xcfe3x12){return _0xcfe3xa[_0xd25c[13]](200)[_0xd25c[12]](_0xcfe3x12)})[_0xd25c[11]](function(_0xcfe3xb){console[_0xd25c[20]](_0xcfe3xb);return handleError(_0xcfe3xa,_0xcfe3xb)})};exports[_0xd25c[53]]= function(_0xcfe3x9,_0xcfe3xa,_0xcfe3xd){return User[_0xd25c[59]]({where:{id:{$in:_0xcfe3x9[_0xd25c[50]][_0xd25c[58]]}}})[_0xd25c[14]](function(_0xcfe3x16){var _0xcfe3x17=_[_0xd25c[27]](_0xcfe3x16,function(_0xcfe3x18){return {queue:_0xcfe3x9[_0xd25c[33]][_0xd25c[26]],location:util[_0xd25c[55]](_0xd25c[54],_0xcfe3x18[_0xd25c[26]]),membername:_0xcfe3x18[_0xd25c[26]],UserId:_0xcfe3x18[_0xd25c[17]],penalty:_0xcfe3x9[_0xd25c[50]][_0xd25c[56]]}});return UserHasVoiceQueue[_0xd25c[57]](_0xcfe3x17,{individualHooks:true})})[_0xd25c[14]](function(){return _0xcfe3xa[_0xd25c[32]](200)})[_0xd25c[11]](function(_0xcfe3xb){console[_0xd25c[20]](_0xcfe3xb);return _0xcfe3xd(_0xcfe3xb)})};exports[_0xd25c[60]]= function(_0xcfe3x9,_0xcfe3xa,_0xcfe3xd){return UserHasVoiceQueue[_0xd25c[61]]({where:{UserId:_0xcfe3x9[_0xd25c[15]][_0xd25c[58]],queue:_0xcfe3x9[_0xd25c[33]][_0xd25c[26]]},individualHooks:true})[_0xd25c[14]](function(){return _0xcfe3xa[_0xd25c[32]](202)})[_0xd25c[11]](function(_0xcfe3xb){return _0xcfe3xd(_0xcfe3xb)})};exports[_0xd25c[61]]= function(_0xcfe3x9,_0xcfe3xa){return VoiceQueue[_0xd25c[61]]({where:{name:_0xcfe3x9[_0xd25c[33]][_0xd25c[26]]},individualHooks:true})[_0xd25c[14]](function(){return _0xcfe3xa[_0xd25c[32]](204)})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)})};exports[_0xd25c[62]]= function(_0xcfe3x9,_0xcfe3xa){return VoiceQueue[_0xd25c[61]]({where:{name:_0xcfe3x9[_0xd25c[15]][_0xd25c[63]]},individualHooks:true})[_0xd25c[14]](function(){return _0xcfe3xa[_0xd25c[32]](204)})[_0xd25c[11]](function(_0xcfe3xb){return handleError(_0xcfe3xa,_0xcfe3xb)})};function handleError(_0xcfe3xa,_0xcfe3xb){return _0xcfe3xa[_0xd25c[13]](500)[_0xd25c[12]](_0xcfe3xb)}
\ No newline at end of file
+var _0x414b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\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\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x414b[0];var _=require(_0x414b[1]);var util=require(_0x414b[2]);var Util=require(_0x414b[3]);var sequelize=require(_0x414b[5])[_0x414b[4]];var User=require(_0x414b[5])[_0x414b[6]];var VoiceQueue=require(_0x414b[5])[_0x414b[7]];var UserHasVoiceQueue=require(_0x414b[5])[_0x414b[8]];var VoiceExtension=require(_0x414b[5])[_0x414b[9]];exports[_0x414b[10]]= function(_0x5f90x9,_0x5f90xa){switch(_0x5f90x9[_0x414b[18]][_0x414b[23]]){case _0x414b[18]:return User[_0x414b[19]](_0x5f90x9[_0x414b[18]][_0x414b[17]],{attributes:[_0x414b[17]]})[_0x414b[14]](Util[_0x414b[16]](_0x5f90x9[_0x414b[15]]))[_0x414b[14]](function(_0x5f90xc){_0x5f90xa[_0x414b[13]](200)[_0x414b[12]](_0x5f90xc)})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)});default:return VoiceQueue[_0x414b[22]](Util[_0x414b[21]](_0x5f90x9[_0x414b[15]]))[_0x414b[14]](function(_0x5f90xc){_0x5f90xa[_0x414b[13]](200)[_0x414b[12]](_0x5f90xc)})[_0x414b[11]](function(_0x5f90xb){console[_0x414b[20]](_0x5f90xb);return handleError(_0x5f90xa,_0x5f90xb)})}};exports[_0x414b[24]]= function(_0x5f90x9,_0x5f90xa,_0x5f90xd){var _0x5f90xe;switch(_0x5f90x9[_0x414b[18]][_0x414b[23]]){case _0x414b[18]:var _0x5f90xf=[];return User[_0x414b[19]](_0x5f90x9[_0x414b[18]][_0x414b[17]],{attributes:[_0x414b[17]]})[_0x414b[14]](Util[_0x414b[16]]({},{attributes:[_0x414b[30]],include:[{raw:true,model:User,attributes:[_0x414b[17]]}]}))[_0x414b[14]](function(_0x5f90x10){_0x5f90xe= _[_0x414b[31]](_0x5f90x10[_0x414b[29]],_0x414b[30]);_0x5f90x10[_0x414b[29]][_0x414b[33]](function(_0x5f90x11){_0x5f90xf= _[_0x414b[32]](_0x5f90xf,_[_0x414b[31]](_0x5f90x11.Users,_0x414b[17]))});return VoiceQueue[_0x414b[22]](_[_0x414b[34]](Util[_0x414b[21]](_0x5f90x9[_0x414b[15]],{name:_0x5f90xe}),{include:[{model:User,where:{id:_0x5f90xf},required:false}]}))})[_0x414b[14]](function(_0x5f90xc){_0x5f90x9[_0x414b[28]][_0x414b[27]][_0x414b[26]][_0x414b[12]]({message:_0x414b[25],queues:_0x5f90xe});return _0x5f90xa[_0x414b[13]](200)[_0x414b[12]](_0x5f90xc)})[_0x414b[11]](function(_0x5f90xb){console[_0x414b[20]](_0x5f90xb);return handleError(_0x5f90xa,_0x5f90xb)});default:return VoiceQueue[_0x414b[22]](_[_0x414b[34]](Util[_0x414b[21]](_0x5f90x9[_0x414b[15]]),{include:[{model:User,required:false}]}))[_0x414b[14]](function(_0x5f90xc){_0x5f90xe= _[_0x414b[31]](_0x5f90xc[_0x414b[29]],_0x414b[30]);_0x5f90x9[_0x414b[28]][_0x414b[27]][_0x414b[26]][_0x414b[12]]({message:_0x414b[25],queues:_0x5f90xe});return _0x5f90xa[_0x414b[13]](200)[_0x414b[12]](_0x5f90xc)})[_0x414b[11]](function(_0x5f90xb){console[_0x414b[20]](_0x5f90xb);return handleError(_0x5f90xa,_0x5f90xb)})}};exports[_0x414b[35]]= function(_0x5f90x9,_0x5f90xa){return VoiceQueue[_0x414b[19]](_0x5f90x9[_0x414b[37]][_0x414b[30]])[_0x414b[14]](function(_0x5f90x12){if(!_0x5f90x12){return _0x5f90xa[_0x414b[36]](404)};return _0x5f90xa[_0x414b[12]](_0x5f90x12)})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)})};exports[_0x414b[38]]= function(_0x5f90x9,_0x5f90xa){return VoiceQueue[_0x414b[19]](_0x5f90x9[_0x414b[37]][_0x414b[30]])[_0x414b[14]](function(_0x5f90x11){if(!_0x5f90x11){return _0x5f90xa[_0x414b[36]](404)};return _0x5f90x11[_0x414b[41]]({where:{role:_0x414b[40]}})})[_0x414b[14]](function(_0x5f90xf){return _0x5f90xa[_0x414b[13]](200)[_0x414b[12]]({rows:_0x5f90xf,count:_0x5f90xf[_0x414b[39]]})})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)})};exports[_0x414b[42]]= function(_0x5f90x9,_0x5f90xa){var _0x5f90x13;return VoiceQueue[_0x414b[42]](_0x5f90x9[_0x414b[52]])[_0x414b[14]](function(_0x5f90x12){_0x5f90x13= _0x5f90x12})[_0x414b[14]](addAgents(_0x5f90x9,_0x5f90x9[_0x414b[52]][_0x414b[30]]))[_0x414b[14]](function(){return _0x5f90xa[_0x414b[13]](201)[_0x414b[12]](_0x5f90x13)})[_0x414b[11]](sequelize.UniqueConstraintError,function(_0x5f90xb){var _0x5f90x14=[];_0x5f90xb[_0x414b[46]][_0x414b[33]](function(_0x5f90x15){switch(_0x5f90x15[_0x414b[45]]){case _0x414b[44]:_0x5f90x14[_0x414b[43]](_0x414b[30]);break;default:_0x5f90x14[_0x414b[43]](_0x5f90x15[_0x414b[45]])}});_0x5f90x14[_0x414b[43]](_0x414b[47]);_0x5f90xb[_0x414b[48]]= _0x5f90x14[_0x414b[49]]();_0x5f90xb[_0x414b[50]]= _0x414b[51];return _0x5f90xa[_0x414b[13]](500)[_0x414b[12]](_0x5f90xb)})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)})};exports[_0x414b[53]]= function(_0x5f90x9,_0x5f90xa){if(_0x5f90x9[_0x414b[52]][_0x414b[30]]){delete _0x5f90x9[_0x414b[52]][_0x414b[30]]};return VoiceQueue[_0x414b[19]](_0x5f90x9[_0x414b[37]][_0x414b[30]])[_0x414b[14]](function(_0x5f90x12){if(!_0x5f90x12){return _0x5f90xa[_0x414b[36]](404)};var _0x5f90x16=_[_0x414b[34]](_0x5f90x12,_0x5f90x9[_0x414b[52]]);return _0x5f90x16[_0x414b[54]]()})[_0x414b[14]](function(_0x5f90x12){return _0x5f90xa[_0x414b[13]](200)[_0x414b[12]](_0x5f90x12)})[_0x414b[11]](function(_0x5f90xb){console[_0x414b[20]](_0x5f90xb);return handleError(_0x5f90xa,_0x5f90xb)})};function addAgents(_0x5f90x9,_0x5f90x11){return function(){return User[_0x414b[60]]({where:{id:_0x5f90x9[_0x414b[52]][_0x414b[59]]},raw:true})[_0x414b[14]](function(_0x5f90x18){var _0x5f90x19=_[_0x414b[31]](_0x5f90x18,function(_0x5f90x1a){return {queue:_0x5f90x11,interface:util[_0x414b[56]](_0x414b[55],_0x5f90x1a[_0x414b[30]]),stateinterface:util[_0x414b[56]](_0x414b[55],_0x5f90x1a[_0x414b[30]]),membername:_0x5f90x1a[_0x414b[30]],UserId:_0x5f90x1a[_0x414b[17]],penalty:_0x5f90x9[_0x414b[52]][_0x414b[57]]}});return UserHasVoiceQueue[_0x414b[58]](_0x5f90x19,{individualHooks:true})})}}exports[_0x414b[61]]= function(_0x5f90x9,_0x5f90xa,_0x5f90xd){return Promise[_0x414b[62]]([])[_0x414b[14]](addAgents(_0x5f90x9,_0x5f90x9[_0x414b[37]][_0x414b[30]]))[_0x414b[14]](function(){return _0x5f90xa[_0x414b[36]](200)})[_0x414b[11]](function(_0x5f90xb){console[_0x414b[20]](_0x5f90xb);return _0x5f90xd(_0x5f90xb)})};exports[_0x414b[63]]= function(_0x5f90x9,_0x5f90xa,_0x5f90xd){return UserHasVoiceQueue[_0x414b[64]]({where:{UserId:_0x5f90x9[_0x414b[15]][_0x414b[59]],queue:_0x5f90x9[_0x414b[37]][_0x414b[30]]},individualHooks:true})[_0x414b[14]](function(){return _0x5f90xa[_0x414b[36]](202)})[_0x414b[11]](function(_0x5f90xb){return _0x5f90xd(_0x5f90xb)})};exports[_0x414b[64]]= function(_0x5f90x9,_0x5f90xa){return VoiceQueue[_0x414b[64]]({where:{name:_0x5f90x9[_0x414b[37]][_0x414b[30]]},individualHooks:true})[_0x414b[14]](function(){return _0x5f90xa[_0x414b[36]](204)})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)})};exports[_0x414b[65]]= function(_0x5f90x9,_0x5f90xa){return VoiceQueue[_0x414b[64]]({where:{name:_0x5f90x9[_0x414b[15]][_0x414b[66]]},individualHooks:true})[_0x414b[14]](function(){return _0x5f90xa[_0x414b[36]](204)})[_0x414b[11]](function(_0x5f90xb){return handleError(_0x5f90xa,_0x5f90xb)})};function handleError(_0x5f90xa,_0x5f90xb){return _0x5f90xa[_0x414b[13]](500)[_0x414b[12]](_0x5f90xb)}
\ No newline at end of file