Built motion from commit ec3ecc5.|1.0.2
[motion.git] / server / api / agent / agent.controller.js
index 420375e..3802236 100644 (file)
@@ -1 +1 @@
-var _0x7b49=["\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","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x65\x72\x72\x6F\x72","\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","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\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\x73","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\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","\x6C\x6F\x67","\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","\x71\x75\x65\x75\x65\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","\x66\x6F\x72\x45\x61\x63\x68","\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","\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","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x64\x64\x55\x73\x65\x72\x73","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\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","\x70\x75\x73\x68","\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","\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","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0x7b49[0];var _=require(_0x7b49[1]);var sequelize=require(_0x7b49[3])[_0x7b49[2]];var util=require(_0x7b49[4]);var Util=require(_0x7b49[5]);var OpenchannelQueue=require(_0x7b49[3])[_0x7b49[6]];var VoiceQueue=require(_0x7b49[3])[_0x7b49[7]];var ChatQueue=require(_0x7b49[3])[_0x7b49[8]];var MailQueue=require(_0x7b49[3])[_0x7b49[9]];var FaxQueue=require(_0x7b49[3])[_0x7b49[10]];var SmsQueue=require(_0x7b49[3])[_0x7b49[11]];var MailRoom=require(_0x7b49[3])[_0x7b49[12]];var Setting=require(_0x7b49[3])[_0x7b49[13]];var Agent=require(_0x7b49[3])[_0x7b49[14]];var User=require(_0x7b49[3])[_0x7b49[14]];var Team=require(_0x7b49[3])[_0x7b49[15]];var List=require(_0x7b49[3])[_0x7b49[16]];exports[_0x7b49[17]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[24]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[18]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[33]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){return Agent[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]],{attributes:[_0x7b49[25],_0x7b49[37]]})[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](401)};switch(_0x82d0x11[_0x7b49[52]][_0x7b49[51]]){case _0x7b49[40]:return _0x82d0x17[_0x7b49[39]](_0x82d0x11[_0x7b49[35]],{interface:util[_0x7b49[38]](_0x7b49[36],_0x82d0x17[_0x7b49[37]]),stateinterface:util[_0x7b49[38]](_0x7b49[36],_0x82d0x17[_0x7b49[37]]),membername:_0x82d0x17[_0x7b49[37]],UserId:_0x82d0x17[_0x7b49[25]]});case _0x7b49[42]:return _0x82d0x17[_0x7b49[41]](_0x82d0x11[_0x7b49[35]]);case _0x7b49[44]:return _0x82d0x17[_0x7b49[43]](_0x82d0x11[_0x7b49[35]]);case _0x7b49[46]:return _0x82d0x17[_0x7b49[45]](_0x82d0x11[_0x7b49[35]]);case _0x7b49[48]:return _0x82d0x17[_0x7b49[47]](_0x82d0x11[_0x7b49[35]]);case _0x7b49[50]:return _0x82d0x17[_0x7b49[49]](_0x82d0x11[_0x7b49[35]]);default:return null}})[_0x7b49[22]](function(_0x82d0x16){return _0x82d0x12[_0x7b49[34]](_0x82d0x16?200:401)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[18]](_0x82d0x14)})};exports[_0x7b49[53]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){return Agent[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](401)};switch(_0x82d0x11[_0x7b49[52]][_0x7b49[51]]){case _0x7b49[40]:return _0x82d0x17[_0x7b49[55]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);case _0x7b49[42]:return _0x82d0x17[_0x7b49[56]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);case _0x7b49[44]:return _0x82d0x17[_0x7b49[57]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);case _0x7b49[48]:return _0x82d0x17[_0x7b49[58]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);case _0x7b49[46]:return _0x82d0x17[_0x7b49[59]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);case _0x7b49[50]:return _0x82d0x17[_0x7b49[60]](_0x82d0x11[_0x7b49[23]][_0x7b49[54]]);default:return null}})[_0x7b49[22]](function(_0x82d0x16){return _0x82d0x12[_0x7b49[34]](_0x82d0x16?200:401)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[18]](_0x82d0x14)})};exports[_0x7b49[61]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[24]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[68]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[74]]({},{attributes:[_0x7b49[37]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x19=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[37]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x82d0x19}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[75]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[76]]({},{attributes:[_0x7b49[25]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x1b=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[25]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:ChatQueue,where:{id:{$in:_0x82d0x1b}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[77]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[78]]({},{attributes:[_0x7b49[25]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x1c=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[25]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:MailQueue,where:{id:{$in:_0x82d0x1c}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[79]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[80]]({},{attributes:[_0x7b49[25]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x1d=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[25]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:FaxQueue,where:{id:{$in:_0x82d0x1d}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[81]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[82]]({},{attributes:[_0x7b49[25]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x1e=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[25]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:SmsQueue,where:{id:{$in:_0x82d0x1e}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[83]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){switch(_0x82d0x11[_0x7b49[26]][_0x7b49[32]]){case _0x7b49[26]:var _0x82d0x18=[];return User[_0x7b49[27]](_0x82d0x11[_0x7b49[26]][_0x7b49[25]],{attributes:[_0x7b49[25]]})[_0x7b49[22]](Util[_0x7b49[84]]({},{attributes:[_0x7b49[25]],include:[{raw:true,model:User,attributes:[_0x7b49[25]]}]}))[_0x7b49[22]](function(_0x82d0x16){var _0x82d0x1f=_[_0x7b49[70]](_0x82d0x16[_0x7b49[69]],_0x7b49[25]);_0x82d0x16[_0x7b49[69]][_0x7b49[72]](function(_0x82d0x1a){_0x82d0x18= _[_0x7b49[71]](_0x82d0x18,_[_0x7b49[70]](_0x82d0x1a.Users,_0x7b49[25]))});return User[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]})[_0x7b49[29]](_[_0x7b49[73]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]],{id:{$in:_0x82d0x18}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x82d0x1f}},required:false}]}))})[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)});default:return Agent[_0x7b49[31]](_0x7b49[30],{method:[_0x7b49[63],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[64],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[65],_0x82d0x11[_0x7b49[23]]]},{method:[_0x7b49[66],_0x82d0x11[_0x7b49[23]]]},_0x7b49[67])[_0x7b49[29]](Util[_0x7b49[28]](_0x82d0x11[_0x7b49[23]]))[_0x7b49[22]](function(_0x82d0x15){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x15)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})}};exports[_0x7b49[85]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x12[_0x7b49[20]](_0x82d0x17)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[86]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[88]]({attributes:[_0x7b49[37]]})})[_0x7b49[22]](function(_0x82d0x19){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x19[_0x7b49[87]],rows:_0x82d0x19})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[89]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[90]]({attributes:[_0x7b49[25]]})})[_0x7b49[22]](function(_0x82d0x1b){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x1b[_0x7b49[87]],rows:_0x82d0x1b})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[91]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[92]]({attributes:[_0x7b49[25]]})})[_0x7b49[22]](function(_0x82d0x1c){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x1c[_0x7b49[87]],rows:_0x82d0x1c})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[93]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[94]]({attributes:[_0x7b49[25]]})})[_0x7b49[22]](function(_0x82d0x1d){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x1d[_0x7b49[87]],rows:_0x82d0x1d})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[95]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[96]]({attributes:[_0x7b49[25]]})})[_0x7b49[22]](function(_0x82d0x1e){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x1e[_0x7b49[87]],rows:_0x82d0x1e})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[97]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[98]]({attributes:[_0x7b49[25]]})})[_0x7b49[22]](function(_0x82d0x20){return _0x82d0x12[_0x7b49[20]]({count:_0x82d0x20[_0x7b49[87]],rows:_0x82d0x20})})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[99]]= function(_0x82d0x11,_0x82d0x12){var _0x82d0x21;_0x82d0x11[_0x7b49[35]][_0x7b49[32]]= _0x7b49[30];return sequelize[_0x7b49[105]](function(_0x82d0x22){return Agent[_0x7b49[31]](_0x7b49[30])[_0x7b49[99]](_0x82d0x11[_0x7b49[35]],{transaction:_0x82d0x22})[_0x7b49[22]](function(_0x82d0x17){_0x82d0x21= _0x82d0x17;return Team[_0x7b49[104]]({where:{defaultEntry:true}})})[_0x7b49[22]](function(_0x82d0x24){return _0x82d0x24[_0x7b49[103]](_0x82d0x21[_0x7b49[25]],{transaction:_0x82d0x22})})[_0x7b49[22]](function(){return List[_0x7b49[104]]({where:{defaultEntry:true}})})[_0x7b49[22]](function(_0x82d0x23){return _0x82d0x23[_0x7b49[103]](_0x82d0x21[_0x7b49[25]],{transaction:_0x82d0x22})})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[40]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[40]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[39]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[40]][_0x7b49[67]],{interface:util[_0x7b49[38]](_0x7b49[36],_0x82d0x21[_0x7b49[37]]),stateinterface:util[_0x7b49[38]](_0x7b49[36],_0x82d0x21[_0x7b49[37]]),membername:_0x82d0x21[_0x7b49[37]],UserId:_0x82d0x21[_0x7b49[25]],transaction:_0x82d0x22})}})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[42]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[42]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[41]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[42]][_0x7b49[67]],{transaction:_0x82d0x22})}})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[44]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[44]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[43]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[44]][_0x7b49[67]],{transaction:_0x82d0x22})}})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[48]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[48]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[47]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[48]][_0x7b49[67]],{transaction:_0x82d0x22})}})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[46]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[46]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[45]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[46]][_0x7b49[67]],{transaction:_0x82d0x22})}})[_0x7b49[22]](function(){if(_0x82d0x11[_0x7b49[35]][_0x7b49[102]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[50]]&& _0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[50]][_0x7b49[67]]){return _0x82d0x21[_0x7b49[49]](_0x82d0x11[_0x7b49[35]][_0x7b49[102]][_0x7b49[50]][_0x7b49[67]],{transaction:_0x82d0x22})}})})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[21]](201)[_0x7b49[20]](_0x82d0x21)})[_0x7b49[19]](sequelize.UniqueConstraintError,function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return Util[_0x7b49[101]][_0x7b49[100]](_0x82d0x12,_0x82d0x14)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[106]]= function(_0x82d0x11,_0x82d0x12){var _0x82d0x25;var _0x82d0x26;var _0x82d0x27=[];var _0x82d0x28=String(_0x82d0x11[_0x7b49[35]][_0x7b49[107]]);return sequelize[_0x7b49[105]](function(_0x82d0x22){return Setting[_0x7b49[27]](1)[_0x7b49[22]](function(_0x82d0x29){_0x82d0x26= _0x82d0x29;var _0x82d0x2a=_0x82d0x26[_0x7b49[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x82d0x2a[_0x7b49[110]](_0x82d0x28)){throw  new Error(_0x7b49[111])};var _0x82d0x2b=0;if(_0x82d0x11[_0x7b49[35]][_0x7b49[113]](_0x7b49[112])&& _[_0x7b49[114]](_0x82d0x11[_0x7b49[35]][_0x7b49[112]])&& _0x82d0x11[_0x7b49[35]][_0x7b49[112]]>= 0){_0x82d0x2b= _0x82d0x11[_0x7b49[35]][_0x7b49[112]];delete _0x82d0x11[_0x7b49[35]][_0x7b49[112]]};var _0x82d0x2c=_0x82d0x11[_0x7b49[35]][_0x7b49[115]];delete _0x82d0x11[_0x7b49[35]][_0x7b49[115]];if(_0x82d0x11[_0x7b49[35]][_0x7b49[116]]){_0x82d0x11[_0x7b49[35]][_0x7b49[32]]= _0x7b49[30];for(var _0x82d0x2d=_0x82d0x2b;_0x82d0x2d< _0x82d0x11[_0x7b49[35]][_0x7b49[116]]+ _0x82d0x2b;_0x82d0x2d++,_0x82d0x2c++){var _0x82d0x2e=_[_0x7b49[117]](_0x82d0x11[_0x7b49[35]]);_0x82d0x2e[_0x7b49[118]]= _0x82d0x2c;_0x82d0x2e[_0x7b49[37]]= _0x82d0x2e[_0x7b49[37]]+ _0x82d0x2d;_0x82d0x2e[_0x7b49[119]]= _0x82d0x2e[_0x7b49[119]]+ _0x82d0x2d;_0x82d0x2e[_0x7b49[120]]= _0x82d0x2e[_0x7b49[120]][_0x7b49[122]](_0x7b49[121])[0]+ _0x82d0x2d+ _0x7b49[121]+ _0x82d0x2e[_0x7b49[120]][_0x7b49[122]](_0x7b49[121])[1];_0x82d0x27[_0x7b49[123]](_0x82d0x2e)}}else {throw  new Error(_0x7b49[124])};return Agent[_0x7b49[106]](_0x82d0x27,{transaction:_0x82d0x22,individualHooks:true})})[_0x7b49[22]](function(_0x82d0x18){_0x82d0x25= _0x82d0x18;return Team[_0x7b49[104]]({where:{defaultEntry:true}})})[_0x7b49[22]](function(_0x82d0x24){return _0x82d0x24[_0x7b49[108]](_[_0x7b49[70]](_0x82d0x25,_0x7b49[25]),{transaction:_0x82d0x22})})})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[34]](201)})[_0x7b49[19]](sequelize.UniqueConstraintError,function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return Util[_0x7b49[101]][_0x7b49[100]](_0x82d0x12,_0x82d0x14)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[125]]= function(_0x82d0x11,_0x82d0x12){if(_0x82d0x11[_0x7b49[35]][_0x7b49[25]]){delete _0x82d0x11[_0x7b49[35]][_0x7b49[25]]};delete _0x82d0x11[_0x7b49[35]][_0x7b49[32]];delete _0x82d0x11[_0x7b49[35]][_0x7b49[37]];delete _0x82d0x11[_0x7b49[35]][_0x7b49[107]];return sequelize[_0x7b49[105]](function(_0x82d0x22){return Agent[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};var _0x82d0x2f=_[_0x7b49[73]](_0x82d0x17,_0x82d0x11[_0x7b49[35]]);return _0x82d0x2f[_0x7b49[126]]({transaction:_0x82d0x22})})[_0x7b49[22]](function(_0x82d0x17){return _0x82d0x12[_0x7b49[21]](200)[_0x7b49[20]](_0x82d0x17)})})[_0x7b49[19]](sequelize.UniqueConstraintError,function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return Util[_0x7b49[101]][_0x7b49[100]](_0x82d0x12,_0x82d0x14)})[_0x7b49[19]](function(_0x82d0x14){console[_0x7b49[62]](_0x82d0x14);return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[127]]= function(_0x82d0x11,_0x82d0x12){var _0x82d0x21;return Agent[_0x7b49[27]](_0x82d0x11[_0x7b49[52]][_0x7b49[25]])[_0x7b49[22]](function(_0x82d0x17){_0x82d0x21= _0x82d0x17;if(!_0x82d0x17){return _0x82d0x12[_0x7b49[34]](404)};return _0x82d0x17[_0x7b49[127]]()})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[34]](204)})[_0x7b49[19]](sequelize.ForeignKeyConstraintError,function(_0x82d0x14){return Util[_0x7b49[101]][_0x7b49[128]](_0x82d0x12,_0x7b49[30],_0x82d0x21[_0x7b49[37]],_0x82d0x14)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[129]]= function(_0x82d0x11,_0x82d0x12){return Agent[_0x7b49[127]]({where:{id:_0x82d0x11[_0x7b49[23]][_0x7b49[54]]},individualHooks:true})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[34]](204)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[130]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){var _0x82d0x26;var _0x82d0x30=_0x82d0x11[_0x7b49[26]][_0x7b49[25]];var _0x82d0x31=String(_0x82d0x11[_0x7b49[35]][_0x7b49[131]]);var _0x82d0x32=String(_0x82d0x11[_0x7b49[35]][_0x7b49[132]]);return Setting[_0x7b49[27]](1)[_0x7b49[22]](function(_0x82d0x29){_0x82d0x26= _0x82d0x29;return Agent[_0x7b49[27]](_0x82d0x30)})[_0x7b49[22]](function(_0x82d0x33){var _0x82d0x2a=_0x82d0x26[_0x7b49[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x82d0x2a[_0x7b49[110]](_0x82d0x32)){throw  new Error(_0x7b49[111])};if(_0x82d0x33[_0x7b49[133]](_0x82d0x31)){_0x82d0x33[_0x7b49[107]]= _0x82d0x32;return _0x82d0x33[_0x7b49[126]]()}else {return _0x82d0x12[_0x7b49[34]](403)}})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[34]](200)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};exports[_0x7b49[134]]= function(_0x82d0x11,_0x82d0x12,_0x82d0x13){var _0x82d0x26;var _0x82d0x30=_0x82d0x11[_0x7b49[52]][_0x7b49[25]];var _0x82d0x32=String(_0x82d0x11[_0x7b49[35]][_0x7b49[132]]);return Setting[_0x7b49[27]](1)[_0x7b49[22]](function(_0x82d0x29){_0x82d0x26= _0x82d0x29;return Agent[_0x7b49[27]](_0x82d0x30)})[_0x7b49[22]](function(_0x82d0x33){var _0x82d0x2a=_0x82d0x26[_0x7b49[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x82d0x2a[_0x7b49[110]](_0x82d0x32)){throw  new Error(_0x7b49[111])};_0x82d0x33[_0x7b49[107]]= _0x82d0x32;return _0x82d0x33[_0x7b49[126]]()})[_0x7b49[22]](function(){return _0x82d0x12[_0x7b49[34]](200)})[_0x7b49[19]](function(_0x82d0x14){return handleError(_0x82d0x12,_0x82d0x14)})};function handleError(_0x82d0x12,_0x82d0x14){return _0x82d0x12[_0x7b49[21]](500)[_0x7b49[20]](_0x82d0x14)}
\ No newline at end of file
+var _0x2328=["\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","\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","\x65\x72\x72\x6F\x72","\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","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\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"];_0x2328[0];var _=require(_0x2328[1]);var sequelize=require(_0x2328[3])[_0x2328[2]];var BPromise=require(_0x2328[4]);var util=require(_0x2328[5]);var Util=require(_0x2328[6]);var userTools=require(_0x2328[7]);var OpenchannelQueue=require(_0x2328[3])[_0x2328[8]];var VoiceQueue=require(_0x2328[3])[_0x2328[9]];var ChatQueue=require(_0x2328[3])[_0x2328[10]];var MailQueue=require(_0x2328[3])[_0x2328[11]];var FaxQueue=require(_0x2328[3])[_0x2328[12]];var SmsQueue=require(_0x2328[3])[_0x2328[13]];var MailRoom=require(_0x2328[3])[_0x2328[14]];var Setting=require(_0x2328[3])[_0x2328[15]];var Agent=require(_0x2328[3])[_0x2328[16]];var User=require(_0x2328[3])[_0x2328[16]];var Team=require(_0x2328[3])[_0x2328[17]];var List=require(_0x2328[3])[_0x2328[18]];exports[_0x2328[19]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[26]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[35]]= function(_0x508fx13,_0x508fx14,_0x508fx15){return Agent[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]],{attributes:[_0x2328[27],_0x2328[39]]})[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](401)};switch(_0x508fx13[_0x2328[58]][_0x2328[57]]){case _0x2328[42]:return _0x508fx19[_0x2328[41]](_0x508fx13[_0x2328[37]],{interface:util[_0x2328[40]](_0x2328[38],_0x508fx19[_0x2328[39]]),stateinterface:util[_0x2328[40]](_0x2328[38],_0x508fx19[_0x2328[39]]),membername:_0x508fx19[_0x2328[39]],UserId:_0x508fx19[_0x2328[27]]});case _0x2328[48]:return ChatQueue[_0x2328[47]]({where:{id:_0x508fx13[_0x2328[37]]},attributes:[_0x2328[27],_0x2328[39]],raw:true})[_0x2328[24]](function(_0x508fx18){if(_0x508fx18){var _0x508fx1a=[];_[_0x2328[45]](_0x508fx18,function(_0x508fx1b){_0x508fx1a[_0x2328[44]](_0x508fx19[_0x2328[43]](_0x508fx1b[_0x2328[27]],{queue:_0x508fx1b[_0x2328[39]]}))});return BPromise[_0x2328[46]](_0x508fx1a)}});case _0x2328[50]:return MailQueue[_0x2328[47]]({where:{id:_0x508fx13[_0x2328[37]]},attributes:[_0x2328[27],_0x2328[39]],raw:true})[_0x2328[24]](function(_0x508fx18){if(_0x508fx18){var _0x508fx1a=[];_[_0x2328[45]](_0x508fx18,function(_0x508fx1b){_0x508fx1a[_0x2328[44]](_0x508fx19[_0x2328[49]](_0x508fx1b[_0x2328[27]],{queue:_0x508fx1b[_0x2328[39]]}))});return BPromise[_0x2328[46]](_0x508fx1a)}});case _0x2328[52]:return FaxQueue[_0x2328[47]]({where:{id:_0x508fx13[_0x2328[37]]},attributes:[_0x2328[27],_0x2328[39]],raw:true})[_0x2328[24]](function(_0x508fx18){if(_0x508fx18){var _0x508fx1a=[];_[_0x2328[45]](_0x508fx18,function(_0x508fx1b){_0x508fx1a[_0x2328[44]](_0x508fx19[_0x2328[51]](_0x508fx1b[_0x2328[27]],{queue:_0x508fx1b[_0x2328[39]]}))});return BPromise[_0x2328[46]](_0x508fx1a)}});case _0x2328[54]:return SmsQueue[_0x2328[47]]({where:{id:_0x508fx13[_0x2328[37]]},attributes:[_0x2328[27],_0x2328[39]],raw:true})[_0x2328[24]](function(_0x508fx18){if(_0x508fx18){var _0x508fx1a=[];_[_0x2328[45]](_0x508fx18,function(_0x508fx1b){_0x508fx1a[_0x2328[44]](_0x508fx19[_0x2328[53]](_0x508fx1b[_0x2328[27]],{queue:_0x508fx1b[_0x2328[39]]}))});return BPromise[_0x2328[46]](_0x508fx1a)}});case _0x2328[56]:return OpenchannelQueue[_0x2328[47]]({where:{id:_0x508fx13[_0x2328[37]]},attributes:[_0x2328[27],_0x2328[39]],raw:true})[_0x2328[24]](function(_0x508fx18){if(_0x508fx18){var _0x508fx1a=[];_[_0x2328[45]](_0x508fx18,function(_0x508fx1b){_0x508fx1a[_0x2328[44]](_0x508fx19[_0x2328[55]](_0x508fx1b[_0x2328[27]],{queue:_0x508fx1b[_0x2328[39]]}))});return BPromise[_0x2328[46]](_0x508fx1a)}});default:return null}})[_0x2328[24]](function(_0x508fx18){return _0x508fx14[_0x2328[36]](_0x508fx18?200:401)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16)})};exports[_0x2328[59]]= function(_0x508fx13,_0x508fx14,_0x508fx15){return Agent[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](401)};switch(_0x508fx13[_0x2328[58]][_0x2328[57]]){case _0x2328[42]:return _0x508fx19[_0x2328[61]](_0x508fx13[_0x2328[25]][_0x2328[60]]);case _0x2328[48]:return _0x508fx19[_0x2328[62]](_0x508fx13[_0x2328[25]][_0x2328[60]]);case _0x2328[50]:return _0x508fx19[_0x2328[63]](_0x508fx13[_0x2328[25]][_0x2328[60]]);case _0x2328[54]:return _0x508fx19[_0x2328[64]](_0x508fx13[_0x2328[25]][_0x2328[60]]);case _0x2328[52]:return _0x508fx19[_0x2328[65]](_0x508fx13[_0x2328[25]][_0x2328[60]]);case _0x2328[56]:return _0x508fx19[_0x2328[66]](_0x508fx13[_0x2328[25]][_0x2328[60]]);default:return null}})[_0x2328[24]](function(_0x508fx18){return _0x508fx14[_0x2328[36]](_0x508fx18?200:401)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16)})};exports[_0x2328[67]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[26]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[72]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[77]]({},{attributes:[_0x2328[39]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx1d=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[39]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x508fx1d}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[78]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[79]]({},{attributes:[_0x2328[27]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx1e=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[27]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:ChatQueue,where:{id:{$in:_0x508fx1e}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]},_0x2328[80])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[81]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[82]]({},{attributes:[_0x2328[27]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx1f=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[27]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:MailQueue,where:{id:{$in:_0x508fx1f}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]},_0x2328[80])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[83]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[84]]({},{attributes:[_0x2328[27]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx20=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[27]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:FaxQueue,where:{id:{$in:_0x508fx20}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]},_0x2328[80])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[85]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[86]]({},{attributes:[_0x2328[27]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx21=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[27]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:SmsQueue,where:{id:{$in:_0x508fx21}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]},_0x2328[80])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[87]]= function(_0x508fx13,_0x508fx14,_0x508fx15){switch(_0x508fx13[_0x2328[28]][_0x2328[34]]){case _0x2328[28]:var _0x508fx1c=[];return User[_0x2328[29]](_0x508fx13[_0x2328[28]][_0x2328[27]],{attributes:[_0x2328[27]]})[_0x2328[24]](Util[_0x2328[88]]({},{attributes:[_0x2328[27]],include:[{raw:true,model:User,attributes:[_0x2328[27]]}]}))[_0x2328[24]](function(_0x508fx18){var _0x508fx22=_[_0x2328[74]](_0x508fx18[_0x2328[73]],_0x2328[27]);_0x508fx18[_0x2328[73]][_0x2328[45]](function(_0x508fx1b){_0x508fx1c= _[_0x2328[75]](_0x508fx1c,_[_0x2328[74]](_0x508fx1b.Users,_0x2328[27]))});return User[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]})[_0x2328[31]](_[_0x2328[76]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]],{id:{$in:_0x508fx1c}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x508fx22}},required:false}]}))})[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)});default:return Agent[_0x2328[33]](_0x2328[32],{method:[_0x2328[68],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[69],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[70],_0x508fx13[_0x2328[25]]]},{method:[_0x2328[71],_0x508fx13[_0x2328[25]]]},_0x2328[80])[_0x2328[31]](Util[_0x2328[30]](_0x508fx13[_0x2328[25]]))[_0x2328[24]](function(_0x508fx17){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx17)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})}};exports[_0x2328[89]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx14[_0x2328[22]](_0x508fx19)})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[90]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[92]]({attributes:[_0x2328[39]]})})[_0x2328[24]](function(_0x508fx1d){return _0x508fx14[_0x2328[22]]({count:_0x508fx1d[_0x2328[91]],rows:_0x508fx1d})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[93]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[94]]({attributes:[_0x2328[27]]})})[_0x2328[24]](function(_0x508fx1e){return _0x508fx14[_0x2328[22]]({count:_0x508fx1e[_0x2328[91]],rows:_0x508fx1e})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[95]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[96]]({attributes:[_0x2328[27]]})})[_0x2328[24]](function(_0x508fx1f){return _0x508fx14[_0x2328[22]]({count:_0x508fx1f[_0x2328[91]],rows:_0x508fx1f})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[97]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[98]]({attributes:[_0x2328[27]]})})[_0x2328[24]](function(_0x508fx20){return _0x508fx14[_0x2328[22]]({count:_0x508fx20[_0x2328[91]],rows:_0x508fx20})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[99]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[100]]({attributes:[_0x2328[27]]})})[_0x2328[24]](function(_0x508fx21){return _0x508fx14[_0x2328[22]]({count:_0x508fx21[_0x2328[91]],rows:_0x508fx21})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[101]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[33]](_0x2328[32])[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[102]]({attributes:[_0x2328[27]]})})[_0x2328[24]](function(_0x508fx23){return _0x508fx14[_0x2328[22]]({count:_0x508fx23[_0x2328[91]],rows:_0x508fx23})})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[103]]= function(_0x508fx13,_0x508fx14){var _0x508fx24;_0x508fx13[_0x2328[37]][_0x2328[34]]= _0x2328[32];return sequelize[_0x2328[113]](function(_0x508fx25){return Setting[_0x2328[29]](1)[_0x2328[24]](function(_0x508fx28){var _0x508fx29=String(_0x508fx13[_0x2328[37]][_0x2328[109]]);var _0x508fx2a=_0x508fx28[_0x2328[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9~!@#$%^&\-_=+\[\{\]\}.]{6,}$/;if(!_0x508fx2a[_0x2328[111]](_0x508fx29)){throw  new Error(_0x2328[112])};return Agent[_0x2328[33]](_0x2328[32])[_0x2328[103]](_0x508fx13[_0x2328[37]],{transaction:_0x508fx25})})[_0x2328[24]](userTools[_0x2328[108]]({transaction:_0x508fx25}))[_0x2328[24]](function(_0x508fx19){_0x508fx24= _0x508fx19;return Team[_0x2328[107]]({where:{defaultEntry:true}})})[_0x2328[24]](function(_0x508fx27){return _0x508fx27[_0x2328[106]](_0x508fx24[_0x2328[27]],{transaction:_0x508fx25})})[_0x2328[24]](function(){return List[_0x2328[107]]({where:{defaultEntry:true}})})[_0x2328[24]](function(_0x508fx26){return _0x508fx26[_0x2328[106]](_0x508fx24[_0x2328[27]],{transaction:_0x508fx25})})})[_0x2328[24]](function(){return _0x508fx14[_0x2328[23]](201)[_0x2328[22]](_0x508fx24)})[_0x2328[21]](sequelize.UniqueConstraintError,function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return Util[_0x2328[105]][_0x2328[104]](_0x508fx14,_0x508fx16)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[114]]= function(_0x508fx13,_0x508fx14){var _0x508fx2b;var _0x508fx2c;var _0x508fx2d=[];var _0x508fx29=String(_0x508fx13[_0x2328[37]][_0x2328[109]]);return sequelize[_0x2328[113]](function(_0x508fx25){return Setting[_0x2328[29]](1)[_0x2328[24]](function(_0x508fx28){_0x508fx2c= _0x508fx28;var _0x508fx2a=_0x508fx2c[_0x2328[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x508fx2a[_0x2328[111]](_0x508fx29)){throw  new Error(_0x2328[116])};var _0x508fx2e=0;if(_0x508fx13[_0x2328[37]][_0x2328[118]](_0x2328[117])&& _[_0x2328[119]](_0x508fx13[_0x2328[37]][_0x2328[117]])&& _0x508fx13[_0x2328[37]][_0x2328[117]]>= 0){_0x508fx2e= _0x508fx13[_0x2328[37]][_0x2328[117]];delete _0x508fx13[_0x2328[37]][_0x2328[117]]};var _0x508fx2f=_0x508fx13[_0x2328[37]][_0x2328[120]];delete _0x508fx13[_0x2328[37]][_0x2328[120]];if(_0x508fx13[_0x2328[37]][_0x2328[121]]){_0x508fx13[_0x2328[37]][_0x2328[34]]= _0x2328[32];for(var _0x508fx30=_0x508fx2e;_0x508fx30< _0x508fx13[_0x2328[37]][_0x2328[121]]+ _0x508fx2e;_0x508fx30++,_0x508fx2f++){var _0x508fx31=_[_0x2328[122]](_0x508fx13[_0x2328[37]]);_0x508fx31[_0x2328[123]]= _0x508fx2f;_0x508fx31[_0x2328[39]]= _0x508fx31[_0x2328[39]]+ _0x508fx30;_0x508fx31[_0x2328[124]]= _0x508fx31[_0x2328[124]]+ _0x508fx30;_0x508fx31[_0x2328[125]]= _0x508fx31[_0x2328[125]][_0x2328[127]](_0x2328[126])[0]+ _0x508fx30+ _0x2328[126]+ _0x508fx31[_0x2328[125]][_0x2328[127]](_0x2328[126])[1];_0x508fx2d[_0x2328[44]](_0x508fx31)}}else {throw  new Error(_0x2328[128])};return Agent[_0x2328[114]](_0x508fx2d,{transaction:_0x508fx25,individualHooks:true})})[_0x2328[24]](function(_0x508fx1c){_0x508fx2b= _0x508fx1c;return Team[_0x2328[107]]({where:{defaultEntry:true}})})[_0x2328[24]](function(_0x508fx27){return _0x508fx27[_0x2328[115]](_[_0x2328[74]](_0x508fx2b,_0x2328[27]),{transaction:_0x508fx25})})})[_0x2328[24]](function(){return _0x508fx14[_0x2328[36]](201)})[_0x2328[21]](sequelize.UniqueConstraintError,function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return Util[_0x2328[105]][_0x2328[104]](_0x508fx14,_0x508fx16)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[129]]= function(_0x508fx13,_0x508fx14){if(_0x508fx13[_0x2328[37]][_0x2328[27]]){delete _0x508fx13[_0x2328[37]][_0x2328[27]]};delete _0x508fx13[_0x2328[37]][_0x2328[123]];delete _0x508fx13[_0x2328[37]][_0x2328[34]];delete _0x508fx13[_0x2328[37]][_0x2328[39]];delete _0x508fx13[_0x2328[37]][_0x2328[109]];var _0x508fx24;return sequelize[_0x2328[113]](function(_0x508fx25){return Agent[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};var _0x508fx32=_[_0x2328[76]](_0x508fx19,_0x508fx13[_0x2328[37]]);return _0x508fx32[_0x2328[131]]({transaction:_0x508fx25})})[_0x2328[24]](function(_0x508fx19){_0x508fx24= _0x508fx19;return _0x508fx19})[_0x2328[24]](userTools[_0x2328[130]]({transaction:_0x508fx25}))[_0x2328[24]](function(){return _0x508fx14[_0x2328[23]](200)[_0x2328[22]](_0x508fx24)})})[_0x2328[21]](sequelize.UniqueConstraintError,function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return Util[_0x2328[105]][_0x2328[104]](_0x508fx14,_0x508fx16)})[_0x2328[21]](function(_0x508fx16){console[_0x2328[20]](_0x508fx16);return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[132]]= function(_0x508fx13,_0x508fx14){var _0x508fx24;return Agent[_0x2328[29]](_0x508fx13[_0x2328[58]][_0x2328[27]])[_0x2328[24]](function(_0x508fx19){_0x508fx24= _0x508fx19;if(!_0x508fx19){return _0x508fx14[_0x2328[36]](404)};return _0x508fx19[_0x2328[132]]()})[_0x2328[24]](function(){return _0x508fx14[_0x2328[36]](204)})[_0x2328[21]](sequelize.ForeignKeyConstraintError,function(_0x508fx16){return Util[_0x2328[105]][_0x2328[133]](_0x508fx14,_0x2328[32],_0x508fx24[_0x2328[39]],_0x508fx16)})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};exports[_0x2328[134]]= function(_0x508fx13,_0x508fx14){return Agent[_0x2328[132]]({where:{id:_0x508fx13[_0x2328[25]][_0x2328[60]]},individualHooks:true})[_0x2328[24]](function(){return _0x508fx14[_0x2328[36]](204)})[_0x2328[21]](function(_0x508fx16){return handleError(_0x508fx14,_0x508fx16)})};function handleError(_0x508fx14,_0x508fx16){return _0x508fx14[_0x2328[23]](500)[_0x2328[22]](_0x508fx16)}
\ No newline at end of file