Built motion from commit 712a57186.|1.0.37
[motion.git] / server / api / agent / agent.controller.js
index f43597f..09eb3ec 100644 (file)
@@ -1 +1 @@
-var _0x33e2=["\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","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\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\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x76\x61\x6C\x75\x65\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x33e2[0];var _=require(_0x33e2[1]);var sequelize=require(_0x33e2[3])[_0x33e2[2]];var BPromise=require(_0x33e2[4]);var util=require(_0x33e2[5]);var Util=require(_0x33e2[6]);var userTools=require(_0x33e2[7]);var logger=require(_0x33e2[9])(_0x33e2[8]);var OpenchannelQueue=require(_0x33e2[3])[_0x33e2[10]];var VoiceQueue=require(_0x33e2[3])[_0x33e2[11]];var ChatQueue=require(_0x33e2[3])[_0x33e2[12]];var MailQueue=require(_0x33e2[3])[_0x33e2[13]];var FaxQueue=require(_0x33e2[3])[_0x33e2[14]];var SmsQueue=require(_0x33e2[3])[_0x33e2[15]];var MailRoom=require(_0x33e2[3])[_0x33e2[16]];var Setting=require(_0x33e2[3])[_0x33e2[17]];var Agent=require(_0x33e2[3])[_0x33e2[18]];var User=require(_0x33e2[3])[_0x33e2[18]];var Team=require(_0x33e2[3])[_0x33e2[19]];var List=require(_0x33e2[3])[_0x33e2[20]];exports[_0x33e2[21]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[27]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[36]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){return Agent[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]],{attributes:[_0x33e2[28],_0x33e2[41]]})[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](401)};switch(_0x9bc2x14[_0x33e2[61]][_0x33e2[60]]){case _0x33e2[45]:return _0x9bc2x1a[_0x33e2[44]](_0x9bc2x14[_0x33e2[39]][_0x33e2[38]],{interface:util[_0x33e2[42]](_0x33e2[40],_0x9bc2x1a[_0x33e2[41]]),stateinterface:util[_0x33e2[42]](_0x33e2[40],_0x9bc2x1a[_0x33e2[41]]),membername:_0x9bc2x1a[_0x33e2[41]],UserId:_0x9bc2x1a[_0x33e2[28]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]});case _0x33e2[51]:return ChatQueue[_0x33e2[50]]({where:{id:_0x9bc2x14[_0x33e2[39]][_0x33e2[38]]},attributes:[_0x33e2[28],_0x33e2[41]],raw:true})[_0x33e2[25]](function(_0x9bc2x19){if(_0x9bc2x19){var _0x9bc2x1b=[];_[_0x33e2[48]](_0x9bc2x19,function(_0x9bc2x1c){_0x9bc2x1b[_0x33e2[47]](_0x9bc2x1a[_0x33e2[46]](_0x9bc2x1c[_0x33e2[28]],{queue:_0x9bc2x1c[_0x33e2[41]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]}))});return BPromise[_0x33e2[49]](_0x9bc2x1b)}});case _0x33e2[53]:return MailQueue[_0x33e2[50]]({where:{id:_0x9bc2x14[_0x33e2[39]][_0x33e2[38]]},attributes:[_0x33e2[28],_0x33e2[41]],raw:true})[_0x33e2[25]](function(_0x9bc2x19){if(_0x9bc2x19){var _0x9bc2x1b=[];_[_0x33e2[48]](_0x9bc2x19,function(_0x9bc2x1c){_0x9bc2x1b[_0x33e2[47]](_0x9bc2x1a[_0x33e2[52]](_0x9bc2x1c[_0x33e2[28]],{queue:_0x9bc2x1c[_0x33e2[41]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]}))});return BPromise[_0x33e2[49]](_0x9bc2x1b)}});case _0x33e2[55]:return FaxQueue[_0x33e2[50]]({where:{id:_0x9bc2x14[_0x33e2[39]][_0x33e2[38]]},attributes:[_0x33e2[28],_0x33e2[41]],raw:true})[_0x33e2[25]](function(_0x9bc2x19){if(_0x9bc2x19){var _0x9bc2x1b=[];_[_0x33e2[48]](_0x9bc2x19,function(_0x9bc2x1c){_0x9bc2x1b[_0x33e2[47]](_0x9bc2x1a[_0x33e2[54]](_0x9bc2x1c[_0x33e2[28]],{queue:_0x9bc2x1c[_0x33e2[41]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]}))});return BPromise[_0x33e2[49]](_0x9bc2x1b)}});case _0x33e2[57]:return SmsQueue[_0x33e2[50]]({where:{id:_0x9bc2x14[_0x33e2[39]][_0x33e2[38]]},attributes:[_0x33e2[28],_0x33e2[41]],raw:true})[_0x33e2[25]](function(_0x9bc2x19){if(_0x9bc2x19){var _0x9bc2x1b=[];_[_0x33e2[48]](_0x9bc2x19,function(_0x9bc2x1c){_0x9bc2x1b[_0x33e2[47]](_0x9bc2x1a[_0x33e2[56]](_0x9bc2x1c[_0x33e2[28]],{queue:_0x9bc2x1c[_0x33e2[41]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]}))});return BPromise[_0x33e2[49]](_0x9bc2x1b)}});case _0x33e2[59]:return OpenchannelQueue[_0x33e2[50]]({where:{id:_0x9bc2x14[_0x33e2[39]][_0x33e2[38]]},attributes:[_0x33e2[28],_0x33e2[41]],raw:true})[_0x33e2[25]](function(_0x9bc2x19){if(_0x9bc2x19){var _0x9bc2x1b=[];_[_0x33e2[48]](_0x9bc2x19,function(_0x9bc2x1c){_0x9bc2x1b[_0x33e2[47]](_0x9bc2x1a[_0x33e2[58]](_0x9bc2x1c[_0x33e2[28]],{queue:_0x9bc2x1c[_0x33e2[41]],penalty:_0x9bc2x14[_0x33e2[39]][_0x33e2[43]]}))});return BPromise[_0x33e2[49]](_0x9bc2x1b)}});default:return null}})[_0x33e2[25]](function(_0x9bc2x19){return _0x9bc2x15[_0x33e2[37]](_0x9bc2x19?200:401)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[62]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){return Agent[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](401)};switch(_0x9bc2x14[_0x33e2[61]][_0x33e2[60]]){case _0x33e2[45]:return _0x9bc2x1a[_0x33e2[64]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);case _0x33e2[51]:return _0x9bc2x1a[_0x33e2[65]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);case _0x33e2[53]:return _0x9bc2x1a[_0x33e2[66]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);case _0x33e2[57]:return _0x9bc2x1a[_0x33e2[67]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);case _0x33e2[55]:return _0x9bc2x1a[_0x33e2[68]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);case _0x33e2[59]:return _0x9bc2x1a[_0x33e2[69]](_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]);default:return null}})[_0x33e2[25]](function(_0x9bc2x19){return _0x9bc2x15[_0x33e2[37]](_0x9bc2x19?200:401)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[70]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[27]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[75]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[80]]({},{attributes:[_0x33e2[41]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x1e=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[41]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x9bc2x1e}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[81]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[82]]({},{attributes:[_0x33e2[28]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x1f=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[28]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:ChatQueue,where:{id:{$in:_0x9bc2x1f}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]},_0x33e2[83])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[84]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[85]]({},{attributes:[_0x33e2[28]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x20=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[28]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:MailQueue,where:{id:{$in:_0x9bc2x20}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]},_0x33e2[83])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[86]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[87]]({},{attributes:[_0x33e2[28]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x21=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[28]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:FaxQueue,where:{id:{$in:_0x9bc2x21}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]},_0x33e2[83])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[88]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[89]]({},{attributes:[_0x33e2[28]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x22=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[28]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:SmsQueue,where:{id:{$in:_0x9bc2x22}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]},_0x33e2[83])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[90]]= function(_0x9bc2x14,_0x9bc2x15,_0x9bc2x16){switch(_0x9bc2x14[_0x33e2[29]][_0x33e2[35]]){case _0x33e2[29]:var _0x9bc2x1d=[];return User[_0x33e2[30]](_0x9bc2x14[_0x33e2[29]][_0x33e2[28]],{attributes:[_0x33e2[28]]})[_0x33e2[25]](Util[_0x33e2[91]]({},{attributes:[_0x33e2[28]],include:[{raw:true,model:User,attributes:[_0x33e2[28]]}]}))[_0x33e2[25]](function(_0x9bc2x19){var _0x9bc2x23=_[_0x33e2[77]](_0x9bc2x19[_0x33e2[76]],_0x33e2[28]);_0x9bc2x19[_0x33e2[76]][_0x33e2[48]](function(_0x9bc2x1c){_0x9bc2x1d= _[_0x33e2[78]](_0x9bc2x1d,_[_0x33e2[77]](_0x9bc2x1c.Users,_0x33e2[28]))});return User[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]})[_0x33e2[32]](_[_0x33e2[79]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]],{id:{$in:_0x9bc2x1d}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x9bc2x23}},required:false}]}))})[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)});default:return Agent[_0x33e2[34]](_0x33e2[33],{method:[_0x33e2[71],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[72],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[73],_0x9bc2x14[_0x33e2[26]]]},{method:[_0x33e2[74],_0x9bc2x14[_0x33e2[26]]]},_0x33e2[83])[_0x33e2[32]](Util[_0x33e2[31]](_0x9bc2x14[_0x33e2[26]]))[_0x33e2[25]](function(_0x9bc2x18){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x18)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})}};exports[_0x33e2[92]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x15[_0x33e2[23]](_0x9bc2x1a)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[93]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[95]]({attributes:[_0x33e2[41]]})})[_0x33e2[25]](function(_0x9bc2x1e){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x1e[_0x33e2[94]],rows:_0x9bc2x1e})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[96]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[97]]({attributes:[_0x33e2[28]]})})[_0x33e2[25]](function(_0x9bc2x1f){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x1f[_0x33e2[94]],rows:_0x9bc2x1f})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[98]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[99]]({attributes:[_0x33e2[28]]})})[_0x33e2[25]](function(_0x9bc2x20){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x20[_0x33e2[94]],rows:_0x9bc2x20})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[100]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[101]]({attributes:[_0x33e2[28]]})})[_0x33e2[25]](function(_0x9bc2x21){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x21[_0x33e2[94]],rows:_0x9bc2x21})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[102]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[103]]({attributes:[_0x33e2[28]]})})[_0x33e2[25]](function(_0x9bc2x22){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x22[_0x33e2[94]],rows:_0x9bc2x22})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[104]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[105]]({attributes:[_0x33e2[28]]})})[_0x33e2[25]](function(_0x9bc2x24){return _0x9bc2x15[_0x33e2[23]]({count:_0x9bc2x24[_0x33e2[94]],rows:_0x9bc2x24})})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[106]]= function(_0x9bc2x14,_0x9bc2x15){var _0x9bc2x25;_0x9bc2x14[_0x33e2[39]][_0x33e2[35]]= _0x33e2[33];return sequelize[_0x33e2[116]](function(_0x9bc2x26){return Setting[_0x33e2[30]](1)[_0x33e2[25]](function(_0x9bc2x28){var _0x9bc2x29=String(_0x9bc2x14[_0x33e2[39]][_0x33e2[112]]);var _0x9bc2x2a=_0x9bc2x28[_0x33e2[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0x9bc2x2a[_0x33e2[114]](_0x9bc2x29)){throw  new Error(_0x33e2[115])};return Agent[_0x33e2[34]](_0x33e2[33])[_0x33e2[106]](_0x9bc2x14[_0x33e2[39]],{transaction:_0x9bc2x26})})[_0x33e2[25]](userTools[_0x33e2[111]]({transaction:_0x9bc2x26}))[_0x33e2[25]](function(_0x9bc2x1a){_0x9bc2x25= _0x9bc2x1a;return Team[_0x33e2[110]]({where:{defaultEntry:true}})})[_0x33e2[25]](function(_0x9bc2x27){return _0x9bc2x27[_0x33e2[109]](_0x9bc2x25[_0x33e2[28]],{transaction:_0x9bc2x26})})})[_0x33e2[25]](function(){return _0x9bc2x15[_0x33e2[24]](201)[_0x33e2[23]](_0x9bc2x25)})[_0x33e2[22]](sequelize.UniqueConstraintError,function(_0x9bc2x17){return Util[_0x33e2[108]][_0x33e2[107]](_0x9bc2x15,_0x9bc2x17)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[117]]= function(_0x9bc2x14,_0x9bc2x15){var _0x9bc2x2b;var _0x9bc2x2c;var _0x9bc2x2d=[];var _0x9bc2x29=String(_0x9bc2x14[_0x33e2[39]][_0x33e2[112]]);return sequelize[_0x33e2[116]](function(_0x9bc2x26){return Setting[_0x33e2[30]](1)[_0x33e2[25]](function(_0x9bc2x28){_0x9bc2x2c= _0x9bc2x28;var _0x9bc2x2a=_0x9bc2x2c[_0x33e2[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x9bc2x2a[_0x33e2[114]](_0x9bc2x29)){throw  new Error(_0x33e2[119])};var _0x9bc2x2e=0;if(_0x9bc2x14[_0x33e2[39]][_0x33e2[121]](_0x33e2[120])&& _[_0x33e2[122]](_0x9bc2x14[_0x33e2[39]][_0x33e2[120]])&& _0x9bc2x14[_0x33e2[39]][_0x33e2[120]]>= 0){_0x9bc2x2e= _0x9bc2x14[_0x33e2[39]][_0x33e2[120]];delete _0x9bc2x14[_0x33e2[39]][_0x33e2[120]]};var _0x9bc2x2f=_0x9bc2x14[_0x33e2[39]][_0x33e2[123]];delete _0x9bc2x14[_0x33e2[39]][_0x33e2[123]];if(_0x9bc2x14[_0x33e2[39]][_0x33e2[124]]){_0x9bc2x14[_0x33e2[39]][_0x33e2[35]]= _0x33e2[33];for(var _0x9bc2x30=_0x9bc2x2e;_0x9bc2x30< _0x9bc2x14[_0x33e2[39]][_0x33e2[124]]+ _0x9bc2x2e;_0x9bc2x30++,_0x9bc2x2f++){var _0x9bc2x31=_[_0x33e2[125]](_0x9bc2x14[_0x33e2[39]]);_0x9bc2x31[_0x33e2[126]]= _0x9bc2x2f;_0x9bc2x31[_0x33e2[41]]= _0x9bc2x31[_0x33e2[41]]+ _0x9bc2x30;_0x9bc2x31[_0x33e2[127]]= _0x9bc2x31[_0x33e2[127]]+ _0x9bc2x30;_0x9bc2x31[_0x33e2[128]]= _0x9bc2x31[_0x33e2[128]][_0x33e2[130]](_0x33e2[129])[0]+ _0x9bc2x30+ _0x33e2[129]+ _0x9bc2x31[_0x33e2[128]][_0x33e2[130]](_0x33e2[129])[1];_0x9bc2x2d[_0x33e2[47]](_0x9bc2x31)}}else {throw  new Error(_0x33e2[131])};return Agent[_0x33e2[117]](_0x9bc2x2d,{transaction:_0x9bc2x26,individualHooks:true})})[_0x33e2[25]](function(_0x9bc2x1d){_0x9bc2x2b= _0x9bc2x1d;return Team[_0x33e2[110]]({where:{defaultEntry:true}})})[_0x33e2[25]](function(_0x9bc2x27){return _0x9bc2x27[_0x33e2[118]](_[_0x33e2[77]](_0x9bc2x2b,_0x33e2[28]),{transaction:_0x9bc2x26})})})[_0x33e2[25]](function(){return _0x9bc2x15[_0x33e2[37]](201)})[_0x33e2[22]](sequelize.UniqueConstraintError,function(_0x9bc2x17){return Util[_0x33e2[108]][_0x33e2[107]](_0x9bc2x15,_0x9bc2x17)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[132]]= function(_0x9bc2x14,_0x9bc2x15){if(_0x9bc2x14[_0x33e2[39]][_0x33e2[28]]){delete _0x9bc2x14[_0x33e2[39]][_0x33e2[28]]};delete _0x9bc2x14[_0x33e2[39]][_0x33e2[126]];delete _0x9bc2x14[_0x33e2[39]][_0x33e2[35]];delete _0x9bc2x14[_0x33e2[39]][_0x33e2[41]];delete _0x9bc2x14[_0x33e2[39]][_0x33e2[112]];var _0x9bc2x25;return sequelize[_0x33e2[116]](function(_0x9bc2x26){return Agent[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};var _0x9bc2x32=_[_0x33e2[79]](_0x9bc2x1a,_0x9bc2x14[_0x33e2[39]]);return _0x9bc2x32[_0x33e2[134]]({transaction:_0x9bc2x26})})[_0x33e2[25]](function(_0x9bc2x1a){_0x9bc2x25= _0x9bc2x1a;return _0x9bc2x1a})[_0x33e2[25]](userTools[_0x33e2[133]]({transaction:_0x9bc2x26}))[_0x33e2[25]](function(){return _0x9bc2x15[_0x33e2[24]](200)[_0x33e2[23]](_0x9bc2x25)})})[_0x33e2[22]](sequelize.UniqueConstraintError,function(_0x9bc2x17){return Util[_0x33e2[108]][_0x33e2[107]](_0x9bc2x15,_0x9bc2x17)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[135]]= function(_0x9bc2x14,_0x9bc2x15){var _0x9bc2x25;return Agent[_0x33e2[30]](_0x9bc2x14[_0x33e2[61]][_0x33e2[28]])[_0x33e2[25]](function(_0x9bc2x1a){_0x9bc2x25= _0x9bc2x1a;if(!_0x9bc2x1a){return _0x9bc2x15[_0x33e2[37]](404)};return _0x9bc2x1a[_0x33e2[135]]()})[_0x33e2[25]](function(){return _0x9bc2x15[_0x33e2[37]](204)})[_0x33e2[22]](sequelize.ForeignKeyConstraintError,function(_0x9bc2x17){return Util[_0x33e2[108]][_0x33e2[136]](_0x9bc2x15,_0x33e2[33],_0x9bc2x25[_0x33e2[41]],_0x9bc2x17)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};exports[_0x33e2[137]]= function(_0x9bc2x14,_0x9bc2x15){return Agent[_0x33e2[135]]({where:{id:_0x9bc2x14[_0x33e2[26]][_0x33e2[63]]},individualHooks:true})[_0x33e2[25]](function(){return _0x9bc2x15[_0x33e2[37]](204)})[_0x33e2[22]](function(_0x9bc2x17){return handleError(_0x9bc2x15,_0x9bc2x17)})};function handleError(_0x9bc2x15,_0x9bc2x17){logger[_0x33e2[139]](_0x9bc2x17[_0x33e2[138]]);return _0x9bc2x15[_0x33e2[24]](500)[_0x33e2[23]](_0x9bc2x17)}
\ No newline at end of file
+var _0x4f60=["\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","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\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\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x76\x61\x6C\x75\x65\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x4f60[0];var _=require(_0x4f60[1]);var sequelize=require(_0x4f60[3])[_0x4f60[2]];var BPromise=require(_0x4f60[4]);var util=require(_0x4f60[5]);var Util=require(_0x4f60[6]);var userTools=require(_0x4f60[7]);var logger=require(_0x4f60[9])(_0x4f60[8]);var OpenchannelQueue=require(_0x4f60[3])[_0x4f60[10]];var VoiceQueue=require(_0x4f60[3])[_0x4f60[11]];var ChatQueue=require(_0x4f60[3])[_0x4f60[12]];var MailQueue=require(_0x4f60[3])[_0x4f60[13]];var FaxQueue=require(_0x4f60[3])[_0x4f60[14]];var SmsQueue=require(_0x4f60[3])[_0x4f60[15]];var MailRoom=require(_0x4f60[3])[_0x4f60[16]];var Setting=require(_0x4f60[3])[_0x4f60[17]];var Agent=require(_0x4f60[3])[_0x4f60[18]];var User=require(_0x4f60[3])[_0x4f60[18]];var Team=require(_0x4f60[3])[_0x4f60[19]];var List=require(_0x4f60[3])[_0x4f60[20]];exports[_0x4f60[21]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[27]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[36]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){return Agent[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]],{attributes:[_0x4f60[28],_0x4f60[41]]})[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](401)};switch(_0xc4f8x14[_0x4f60[61]][_0x4f60[60]]){case _0x4f60[45]:return _0xc4f8x1a[_0x4f60[44]](_0xc4f8x14[_0x4f60[39]][_0x4f60[38]],{interface:util[_0x4f60[42]](_0x4f60[40],_0xc4f8x1a[_0x4f60[41]]),stateinterface:util[_0x4f60[42]](_0x4f60[40],_0xc4f8x1a[_0x4f60[41]]),membername:_0xc4f8x1a[_0x4f60[41]],UserId:_0xc4f8x1a[_0x4f60[28]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]});case _0x4f60[51]:return ChatQueue[_0x4f60[50]]({where:{id:_0xc4f8x14[_0x4f60[39]][_0x4f60[38]]},attributes:[_0x4f60[28],_0x4f60[41]],raw:true})[_0x4f60[25]](function(_0xc4f8x19){if(_0xc4f8x19){var _0xc4f8x1b=[];_[_0x4f60[48]](_0xc4f8x19,function(_0xc4f8x1c){_0xc4f8x1b[_0x4f60[47]](_0xc4f8x1a[_0x4f60[46]](_0xc4f8x1c[_0x4f60[28]],{queue:_0xc4f8x1c[_0x4f60[41]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]}))});return BPromise[_0x4f60[49]](_0xc4f8x1b)}});case _0x4f60[53]:return MailQueue[_0x4f60[50]]({where:{id:_0xc4f8x14[_0x4f60[39]][_0x4f60[38]]},attributes:[_0x4f60[28],_0x4f60[41]],raw:true})[_0x4f60[25]](function(_0xc4f8x19){if(_0xc4f8x19){var _0xc4f8x1b=[];_[_0x4f60[48]](_0xc4f8x19,function(_0xc4f8x1c){_0xc4f8x1b[_0x4f60[47]](_0xc4f8x1a[_0x4f60[52]](_0xc4f8x1c[_0x4f60[28]],{queue:_0xc4f8x1c[_0x4f60[41]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]}))});return BPromise[_0x4f60[49]](_0xc4f8x1b)}});case _0x4f60[55]:return FaxQueue[_0x4f60[50]]({where:{id:_0xc4f8x14[_0x4f60[39]][_0x4f60[38]]},attributes:[_0x4f60[28],_0x4f60[41]],raw:true})[_0x4f60[25]](function(_0xc4f8x19){if(_0xc4f8x19){var _0xc4f8x1b=[];_[_0x4f60[48]](_0xc4f8x19,function(_0xc4f8x1c){_0xc4f8x1b[_0x4f60[47]](_0xc4f8x1a[_0x4f60[54]](_0xc4f8x1c[_0x4f60[28]],{queue:_0xc4f8x1c[_0x4f60[41]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]}))});return BPromise[_0x4f60[49]](_0xc4f8x1b)}});case _0x4f60[57]:return SmsQueue[_0x4f60[50]]({where:{id:_0xc4f8x14[_0x4f60[39]][_0x4f60[38]]},attributes:[_0x4f60[28],_0x4f60[41]],raw:true})[_0x4f60[25]](function(_0xc4f8x19){if(_0xc4f8x19){var _0xc4f8x1b=[];_[_0x4f60[48]](_0xc4f8x19,function(_0xc4f8x1c){_0xc4f8x1b[_0x4f60[47]](_0xc4f8x1a[_0x4f60[56]](_0xc4f8x1c[_0x4f60[28]],{queue:_0xc4f8x1c[_0x4f60[41]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]}))});return BPromise[_0x4f60[49]](_0xc4f8x1b)}});case _0x4f60[59]:return OpenchannelQueue[_0x4f60[50]]({where:{id:_0xc4f8x14[_0x4f60[39]][_0x4f60[38]]},attributes:[_0x4f60[28],_0x4f60[41]],raw:true})[_0x4f60[25]](function(_0xc4f8x19){if(_0xc4f8x19){var _0xc4f8x1b=[];_[_0x4f60[48]](_0xc4f8x19,function(_0xc4f8x1c){_0xc4f8x1b[_0x4f60[47]](_0xc4f8x1a[_0x4f60[58]](_0xc4f8x1c[_0x4f60[28]],{queue:_0xc4f8x1c[_0x4f60[41]],penalty:_0xc4f8x14[_0x4f60[39]][_0x4f60[43]]}))});return BPromise[_0x4f60[49]](_0xc4f8x1b)}});default:return null}})[_0x4f60[25]](function(_0xc4f8x19){return _0xc4f8x15[_0x4f60[37]](_0xc4f8x19?200:401)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[62]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){return Agent[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](401)};switch(_0xc4f8x14[_0x4f60[61]][_0x4f60[60]]){case _0x4f60[45]:return _0xc4f8x1a[_0x4f60[64]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);case _0x4f60[51]:return _0xc4f8x1a[_0x4f60[65]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);case _0x4f60[53]:return _0xc4f8x1a[_0x4f60[66]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);case _0x4f60[57]:return _0xc4f8x1a[_0x4f60[67]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);case _0x4f60[55]:return _0xc4f8x1a[_0x4f60[68]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);case _0x4f60[59]:return _0xc4f8x1a[_0x4f60[69]](_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]);default:return null}})[_0x4f60[25]](function(_0xc4f8x19){return _0xc4f8x15[_0x4f60[37]](_0xc4f8x19?200:401)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[70]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[27]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[75]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[80]]({},{attributes:[_0x4f60[41]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x1e=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[41]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xc4f8x1e}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[81]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[82]]({},{attributes:[_0x4f60[28]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x1f=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[28]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:ChatQueue,where:{id:{$in:_0xc4f8x1f}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]},_0x4f60[83])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[84]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[85]]({},{attributes:[_0x4f60[28]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x20=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[28]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:MailQueue,where:{id:{$in:_0xc4f8x20}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]},_0x4f60[83])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[86]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[87]]({},{attributes:[_0x4f60[28]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x21=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[28]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:FaxQueue,where:{id:{$in:_0xc4f8x21}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]},_0x4f60[83])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[88]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[89]]({},{attributes:[_0x4f60[28]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x22=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[28]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:SmsQueue,where:{id:{$in:_0xc4f8x22}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]},_0x4f60[83])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[90]]= function(_0xc4f8x14,_0xc4f8x15,_0xc4f8x16){switch(_0xc4f8x14[_0x4f60[29]][_0x4f60[35]]){case _0x4f60[29]:var _0xc4f8x1d=[];return User[_0x4f60[30]](_0xc4f8x14[_0x4f60[29]][_0x4f60[28]],{attributes:[_0x4f60[28]]})[_0x4f60[25]](Util[_0x4f60[91]]({},{attributes:[_0x4f60[28]],include:[{raw:true,model:User,attributes:[_0x4f60[28]]}]}))[_0x4f60[25]](function(_0xc4f8x19){var _0xc4f8x23=_[_0x4f60[77]](_0xc4f8x19[_0x4f60[76]],_0x4f60[28]);_0xc4f8x19[_0x4f60[76]][_0x4f60[48]](function(_0xc4f8x1c){_0xc4f8x1d= _[_0x4f60[78]](_0xc4f8x1d,_[_0x4f60[77]](_0xc4f8x1c.Users,_0x4f60[28]))});return User[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]})[_0x4f60[32]](_[_0x4f60[79]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]],{id:{$in:_0xc4f8x1d}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0xc4f8x23}},required:false}]}))})[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)});default:return Agent[_0x4f60[34]](_0x4f60[33],{method:[_0x4f60[71],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[72],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[73],_0xc4f8x14[_0x4f60[26]]]},{method:[_0x4f60[74],_0xc4f8x14[_0x4f60[26]]]},_0x4f60[83])[_0x4f60[32]](Util[_0x4f60[31]](_0xc4f8x14[_0x4f60[26]]))[_0x4f60[25]](function(_0xc4f8x18){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x18)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})}};exports[_0x4f60[92]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x15[_0x4f60[23]](_0xc4f8x1a)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[93]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[95]]({attributes:[_0x4f60[41]]})})[_0x4f60[25]](function(_0xc4f8x1e){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x1e[_0x4f60[94]],rows:_0xc4f8x1e})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[96]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[97]]({attributes:[_0x4f60[28]]})})[_0x4f60[25]](function(_0xc4f8x1f){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x1f[_0x4f60[94]],rows:_0xc4f8x1f})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[98]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[99]]({attributes:[_0x4f60[28]]})})[_0x4f60[25]](function(_0xc4f8x20){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x20[_0x4f60[94]],rows:_0xc4f8x20})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[100]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[101]]({attributes:[_0x4f60[28]]})})[_0x4f60[25]](function(_0xc4f8x21){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x21[_0x4f60[94]],rows:_0xc4f8x21})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[102]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[103]]({attributes:[_0x4f60[28]]})})[_0x4f60[25]](function(_0xc4f8x22){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x22[_0x4f60[94]],rows:_0xc4f8x22})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[104]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[105]]({attributes:[_0x4f60[28]]})})[_0x4f60[25]](function(_0xc4f8x24){return _0xc4f8x15[_0x4f60[23]]({count:_0xc4f8x24[_0x4f60[94]],rows:_0xc4f8x24})})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[106]]= function(_0xc4f8x14,_0xc4f8x15){var _0xc4f8x25;_0xc4f8x14[_0x4f60[39]][_0x4f60[35]]= _0x4f60[33];return sequelize[_0x4f60[116]](function(_0xc4f8x26){return Setting[_0x4f60[30]](1)[_0x4f60[25]](function(_0xc4f8x28){var _0xc4f8x29=String(_0xc4f8x14[_0x4f60[39]][_0x4f60[112]]);var _0xc4f8x2a=_0xc4f8x28[_0x4f60[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0xc4f8x2a[_0x4f60[114]](_0xc4f8x29)){throw  new Error(_0x4f60[115])};return Agent[_0x4f60[34]](_0x4f60[33])[_0x4f60[106]](_0xc4f8x14[_0x4f60[39]],{transaction:_0xc4f8x26})})[_0x4f60[25]](userTools[_0x4f60[111]]({transaction:_0xc4f8x26}))[_0x4f60[25]](function(_0xc4f8x1a){_0xc4f8x25= _0xc4f8x1a;return Team[_0x4f60[110]]({where:{defaultEntry:true}})})[_0x4f60[25]](function(_0xc4f8x27){return _0xc4f8x27[_0x4f60[109]](_0xc4f8x25[_0x4f60[28]],{transaction:_0xc4f8x26})})})[_0x4f60[25]](function(){return _0xc4f8x15[_0x4f60[24]](201)[_0x4f60[23]](_0xc4f8x25)})[_0x4f60[22]](sequelize.UniqueConstraintError,function(_0xc4f8x17){return Util[_0x4f60[108]][_0x4f60[107]](_0xc4f8x15,_0xc4f8x17)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[117]]= function(_0xc4f8x14,_0xc4f8x15){var _0xc4f8x2b;var _0xc4f8x2c;var _0xc4f8x2d=[];var _0xc4f8x29=String(_0xc4f8x14[_0x4f60[39]][_0x4f60[112]]);return sequelize[_0x4f60[116]](function(_0xc4f8x26){return Setting[_0x4f60[30]](1)[_0x4f60[25]](function(_0xc4f8x28){_0xc4f8x2c= _0xc4f8x28;var _0xc4f8x2a=_0xc4f8x2c[_0x4f60[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xc4f8x2a[_0x4f60[114]](_0xc4f8x29)){throw  new Error(_0x4f60[119])};var _0xc4f8x2e=0;if(_0xc4f8x14[_0x4f60[39]][_0x4f60[121]](_0x4f60[120])&& _[_0x4f60[122]](_0xc4f8x14[_0x4f60[39]][_0x4f60[120]])&& _0xc4f8x14[_0x4f60[39]][_0x4f60[120]]>= 0){_0xc4f8x2e= _0xc4f8x14[_0x4f60[39]][_0x4f60[120]];delete _0xc4f8x14[_0x4f60[39]][_0x4f60[120]]};var _0xc4f8x2f=_0xc4f8x14[_0x4f60[39]][_0x4f60[123]];delete _0xc4f8x14[_0x4f60[39]][_0x4f60[123]];if(_0xc4f8x14[_0x4f60[39]][_0x4f60[124]]){_0xc4f8x14[_0x4f60[39]][_0x4f60[35]]= _0x4f60[33];for(var _0xc4f8x30=_0xc4f8x2e;_0xc4f8x30< _0xc4f8x14[_0x4f60[39]][_0x4f60[124]]+ _0xc4f8x2e;_0xc4f8x30++,_0xc4f8x2f++){var _0xc4f8x31=_[_0x4f60[125]](_0xc4f8x14[_0x4f60[39]]);_0xc4f8x31[_0x4f60[126]]= _0xc4f8x2f;_0xc4f8x31[_0x4f60[41]]= _0xc4f8x31[_0x4f60[41]]+ _0xc4f8x30;_0xc4f8x31[_0x4f60[127]]= _0xc4f8x31[_0x4f60[127]]+ _0xc4f8x30;_0xc4f8x31[_0x4f60[128]]= _0xc4f8x31[_0x4f60[128]][_0x4f60[130]](_0x4f60[129])[0]+ _0xc4f8x30+ _0x4f60[129]+ _0xc4f8x31[_0x4f60[128]][_0x4f60[130]](_0x4f60[129])[1];_0xc4f8x2d[_0x4f60[47]](_0xc4f8x31)}}else {throw  new Error(_0x4f60[131])};return Agent[_0x4f60[117]](_0xc4f8x2d,{transaction:_0xc4f8x26,individualHooks:true})})[_0x4f60[25]](function(_0xc4f8x1d){_0xc4f8x2b= _0xc4f8x1d;return Team[_0x4f60[110]]({where:{defaultEntry:true}})})[_0x4f60[25]](function(_0xc4f8x27){return _0xc4f8x27[_0x4f60[118]](_[_0x4f60[77]](_0xc4f8x2b,_0x4f60[28]),{transaction:_0xc4f8x26})})})[_0x4f60[25]](function(){return _0xc4f8x15[_0x4f60[37]](201)})[_0x4f60[22]](sequelize.UniqueConstraintError,function(_0xc4f8x17){return Util[_0x4f60[108]][_0x4f60[107]](_0xc4f8x15,_0xc4f8x17)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[132]]= function(_0xc4f8x14,_0xc4f8x15){if(_0xc4f8x14[_0x4f60[39]][_0x4f60[28]]){delete _0xc4f8x14[_0x4f60[39]][_0x4f60[28]]};delete _0xc4f8x14[_0x4f60[39]][_0x4f60[126]];delete _0xc4f8x14[_0x4f60[39]][_0x4f60[35]];delete _0xc4f8x14[_0x4f60[39]][_0x4f60[41]];delete _0xc4f8x14[_0x4f60[39]][_0x4f60[112]];var _0xc4f8x25;return sequelize[_0x4f60[116]](function(_0xc4f8x26){return Agent[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};var _0xc4f8x32=_[_0x4f60[79]](_0xc4f8x1a,_0xc4f8x14[_0x4f60[39]]);return _0xc4f8x32[_0x4f60[134]]({transaction:_0xc4f8x26})})[_0x4f60[25]](function(_0xc4f8x1a){_0xc4f8x25= _0xc4f8x1a;return _0xc4f8x1a})[_0x4f60[25]](userTools[_0x4f60[133]]({transaction:_0xc4f8x26}))[_0x4f60[25]](function(){return _0xc4f8x15[_0x4f60[24]](200)[_0x4f60[23]](_0xc4f8x25)})})[_0x4f60[22]](sequelize.UniqueConstraintError,function(_0xc4f8x17){return Util[_0x4f60[108]][_0x4f60[107]](_0xc4f8x15,_0xc4f8x17)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[135]]= function(_0xc4f8x14,_0xc4f8x15){var _0xc4f8x25;return Agent[_0x4f60[30]](_0xc4f8x14[_0x4f60[61]][_0x4f60[28]])[_0x4f60[25]](function(_0xc4f8x1a){_0xc4f8x25= _0xc4f8x1a;if(!_0xc4f8x1a){return _0xc4f8x15[_0x4f60[37]](404)};return _0xc4f8x1a[_0x4f60[135]]()})[_0x4f60[25]](function(){return _0xc4f8x15[_0x4f60[37]](204)})[_0x4f60[22]](sequelize.ForeignKeyConstraintError,function(_0xc4f8x17){return Util[_0x4f60[108]][_0x4f60[136]](_0xc4f8x15,_0x4f60[33],_0xc4f8x25[_0x4f60[41]],_0xc4f8x17)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};exports[_0x4f60[137]]= function(_0xc4f8x14,_0xc4f8x15){return Agent[_0x4f60[135]]({where:{id:_0xc4f8x14[_0x4f60[26]][_0x4f60[63]]},individualHooks:true})[_0x4f60[25]](function(){return _0xc4f8x15[_0x4f60[37]](204)})[_0x4f60[22]](function(_0xc4f8x17){return handleError(_0xc4f8x15,_0xc4f8x17)})};function handleError(_0xc4f8x15,_0xc4f8x17){logger[_0x4f60[139]](_0xc4f8x17[_0x4f60[138]]);return _0xc4f8x15[_0x4f60[24]](500)[_0x4f60[23]](_0xc4f8x17)}
\ No newline at end of file