Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / api / agent / agent.controller.js
index 89158f6..adaedc0 100644 (file)
@@ -1 +1 @@
-var _0xe407=["\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\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","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\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","\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","\x6E\x61\x6D\x65","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\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","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\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","\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","\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","\x69\x64\x73","\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","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0xe407[0];var _=require(_0xe407[1]);var sequelize=require(_0xe407[3])[_0xe407[2]];var Util=require(_0xe407[4]);var Agent=require(_0xe407[3])[_0xe407[5]];var VoiceQueue=require(_0xe407[3])[_0xe407[6]];var ChatQueue=require(_0xe407[3])[_0xe407[7]];var MailQueue=require(_0xe407[3])[_0xe407[8]];var FaxQueue=require(_0xe407[3])[_0xe407[9]];var SmsQueue=require(_0xe407[3])[_0xe407[10]];var User=require(_0xe407[3])[_0xe407[5]];var Team=require(_0xe407[3])[_0xe407[11]];var MailRoom=require(_0xe407[3])[_0xe407[12]];var List=require(_0xe407[3])[_0xe407[13]];exports[_0xe407[14]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[21]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[15]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[30]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[21]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[37]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:var _0xcf58x13=[];return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[44]]({},{attributes:[_0xe407[39]],include:[{raw:true,model:User,attributes:[_0xe407[22]]}]}))[_0xe407[19]](function(_0xcf58x14){var _0xcf58x15=_[_0xe407[40]](_0xcf58x14[_0xe407[38]],_0xe407[39]);_0xcf58x14[_0xe407[38]][_0xe407[42]](function(_0xcf58x16){_0xcf58x13=_[_0xe407[41]](_0xcf58x13,_[_0xe407[40]](_0xcf58x16.Users,_0xe407[22]))});return User[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]})[_0xe407[26]](_[_0xe407[43]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]],{id:{$in:_0xcf58x13}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xcf58x15}},required:false}]}))})[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[45]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:var _0xcf58x13=[];return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[46]]({},{attributes:[_0xe407[22]],include:[{raw:true,model:User,attributes:[_0xe407[22]]}]}))[_0xe407[19]](function(_0xcf58x14){var _0xcf58x17=_[_0xe407[40]](_0xcf58x14[_0xe407[38]],_0xe407[22]);_0xcf58x14[_0xe407[38]][_0xe407[42]](function(_0xcf58x16){_0xcf58x13=_[_0xe407[41]](_0xcf58x13,_[_0xe407[40]](_0xcf58x16.Users,_0xe407[22]))});return User[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]})[_0xe407[26]](_[_0xe407[43]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]],{id:{$in:_0xcf58x13}}),{include:[{model:ChatQueue,where:{id:{$in:_0xcf58x17}},required:false}]}))})[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[47]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:var _0xcf58x13=[];return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[48]]({},{attributes:[_0xe407[22]],include:[{raw:true,model:User,attributes:[_0xe407[22]]}]}))[_0xe407[19]](function(_0xcf58x14){var _0xcf58x18=_[_0xe407[40]](_0xcf58x14[_0xe407[38]],_0xe407[22]);_0xcf58x14[_0xe407[38]][_0xe407[42]](function(_0xcf58x16){_0xcf58x13=_[_0xe407[41]](_0xcf58x13,_[_0xe407[40]](_0xcf58x16.Users,_0xe407[22]))});return User[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]})[_0xe407[26]](_[_0xe407[43]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]],{id:{$in:_0xcf58x13}}),{include:[{model:MailQueue,where:{id:{$in:_0xcf58x18}},required:false}]}))})[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[49]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:var _0xcf58x13=[];return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[50]]({},{attributes:[_0xe407[22]],include:[{raw:true,model:User,attributes:[_0xe407[22]]}]}))[_0xe407[19]](function(_0xcf58x14){var _0xcf58x19=_[_0xe407[40]](_0xcf58x14[_0xe407[38]],_0xe407[22]);_0xcf58x14[_0xe407[38]][_0xe407[42]](function(_0xcf58x16){_0xcf58x13=_[_0xe407[41]](_0xcf58x13,_[_0xe407[40]](_0xcf58x16.Users,_0xe407[22]))});return User[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]})[_0xe407[26]](_[_0xe407[43]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]],{id:{$in:_0xcf58x13}}),{include:[{model:FaxQueue,where:{id:{$in:_0xcf58x19}},required:false}]}))})[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[51]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){switch(_0xcf58xe[_0xe407[23]][_0xe407[29]]){case _0xe407[23]:var _0xcf58x13=[];return User[_0xe407[24]](_0xcf58xe[_0xe407[23]][_0xe407[22]],{attributes:[_0xe407[22]]})[_0xe407[19]](Util[_0xe407[52]]({},{attributes:[_0xe407[22]],include:[{raw:true,model:User,attributes:[_0xe407[22]]}]}))[_0xe407[19]](function(_0xcf58x14){var _0xcf58x1a=_[_0xe407[40]](_0xcf58x14[_0xe407[38]],_0xe407[22]);_0xcf58x14[_0xe407[38]][_0xe407[42]](function(_0xcf58x16){_0xcf58x13=_[_0xe407[41]](_0xcf58x13,_[_0xe407[40]](_0xcf58x16.Users,_0xe407[22]))});return User[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]})[_0xe407[26]](_[_0xe407[43]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]],{id:{$in:_0xcf58x13}}),{include:[{model:SmsQueue,where:{id:{$in:_0xcf58x1a}},required:false}]}))})[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)});default:return Agent[_0xe407[28]](_0xe407[27],{method:[_0xe407[32],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[33],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[34],_0xcf58xe[_0xe407[20]]]},{method:[_0xe407[35],_0xcf58xe[_0xe407[20]]]},_0xe407[36])[_0xe407[26]](Util[_0xe407[25]](_0xcf58xe[_0xe407[20]]))[_0xe407[19]](function(_0xcf58x12){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x12)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})}};exports[_0xe407[53]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58xf[_0xe407[17]](_0xcf58x1b)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[56]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[58]]({attributes:[_0xe407[39]]})})[_0xe407[19]](function(_0xcf58x15){return _0xcf58xf[_0xe407[17]]({count:_0xcf58x15[_0xe407[57]],rows:_0xcf58x15})})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[59]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[60]]({attributes:[_0xe407[22]]})})[_0xe407[19]](function(_0xcf58x17){return _0xcf58xf[_0xe407[17]]({count:_0xcf58x17[_0xe407[57]],rows:_0xcf58x17})})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[61]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[62]]({attributes:[_0xe407[22]]})})[_0xe407[19]](function(_0xcf58x18){return _0xcf58xf[_0xe407[17]]({count:_0xcf58x18[_0xe407[57]],rows:_0xcf58x18})})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[63]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[64]]({attributes:[_0xe407[22]]})})[_0xe407[19]](function(_0xcf58x19){return _0xcf58xf[_0xe407[17]]({count:_0xcf58x19[_0xe407[57]],rows:_0xcf58x19})})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[65]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[66]]({attributes:[_0xe407[22]]})})[_0xe407[19]](function(_0xcf58x1a){return _0xcf58xf[_0xe407[17]]({count:_0xcf58x1a[_0xe407[57]],rows:_0xcf58x1a})})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[67]]=function(_0xcf58xe,_0xcf58xf){var _0xcf58x1c;_0xcf58xe[_0xe407[68]][_0xe407[29]]=_0xe407[27];return sequelize[_0xe407[73]](function(_0xcf58x1d){return Agent[_0xe407[28]](_0xe407[27])[_0xe407[67]](_0xcf58xe[_0xe407[68]],{transaction:_0xcf58x1d})[_0xe407[19]](function(_0xcf58x1b){_0xcf58x1c=_0xcf58x1b;return Team[_0xe407[72]]({where:{defaultEntry:true}})})[_0xe407[19]](function(_0xcf58x1f){return _0xcf58x1f[_0xe407[71]](_0xcf58x1c[_0xe407[22]],{transaction:_0xcf58x1d})})[_0xe407[19]](function(){return List[_0xe407[72]]({where:{defaultEntry:true}})})[_0xe407[19]](function(_0xcf58x1e){return _0xcf58x1e[_0xe407[71]](_0xcf58x1c[_0xe407[22]],{transaction:_0xcf58x1d})})})[_0xe407[19]](function(){return _0xcf58xf[_0xe407[18]](201)[_0xe407[17]](_0xcf58x1c)})[_0xe407[16]](sequelize.UniqueConstraintError,function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return Util[_0xe407[70]][_0xe407[69]](_0xcf58xf,_0xcf58x11)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[74]]=function(_0xcf58xe,_0xcf58xf){var _0xcf58x20;if(_0xcf58xe[_0xe407[68]]&&_0xcf58xe[_0xe407[68]][_0xe407[57]]){_0xcf58xe[_0xe407[68]][_0xe407[42]](function(_0xcf58x1b){_0xcf58x1b[_0xe407[29]]=_0xe407[27]})};return sequelize[_0xe407[73]](function(_0xcf58x1d){return Agent[_0xe407[74]](_0xcf58xe[_0xe407[68]],{transaction:_0xcf58x1d,individualHooks:true})[_0xe407[19]](function(_0xcf58x21){_0xcf58x20=_0xcf58x21;return Team[_0xe407[72]]({where:{defaultEntry:true}})})[_0xe407[19]](function(_0xcf58x1f){return _0xcf58x1f[_0xe407[75]](_[_0xe407[40]](_0xcf58x20,_0xe407[22]),{transaction:_0xcf58x1d})})})[_0xe407[19]](function(){return _0xcf58xf[_0xe407[54]](201)})[_0xe407[16]](sequelize.UniqueConstraintError,function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return Util[_0xe407[70]][_0xe407[69]](_0xcf58xf,_0xcf58x11)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[76]]=function(_0xcf58xe,_0xcf58xf){if(_0xcf58xe[_0xe407[68]][_0xe407[22]]){delete _0xcf58xe[_0xe407[68]][_0xe407[22]];delete _0xcf58xe[_0xe407[68]][_0xe407[29]]};return sequelize[_0xe407[73]](function(_0xcf58x1d){return Agent[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};var _0xcf58x22=_[_0xe407[43]](_0xcf58x1b,_0xcf58xe[_0xe407[68]]);return _0xcf58x22[_0xe407[77]]({transaction:_0xcf58x1d})})[_0xe407[19]](function(_0xcf58x1b){return _0xcf58xf[_0xe407[18]](200)[_0xe407[17]](_0xcf58x1b)})})[_0xe407[16]](sequelize.UniqueConstraintError,function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return Util[_0xe407[70]][_0xe407[69]](_0xcf58xf,_0xcf58x11)})[_0xe407[16]](function(_0xcf58x11){console[_0xe407[31]](_0xcf58x11);return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[78]]=function(_0xcf58xe,_0xcf58xf){var _0xcf58x1c;return Agent[_0xe407[24]](_0xcf58xe[_0xe407[55]][_0xe407[22]])[_0xe407[19]](function(_0xcf58x1b){_0xcf58x1c=_0xcf58x1b;if(!_0xcf58x1b){return _0xcf58xf[_0xe407[54]](404)};return _0xcf58x1b[_0xe407[78]]()})[_0xe407[19]](function(){return _0xcf58xf[_0xe407[54]](204)})[_0xe407[16]](sequelize.ForeignKeyConstraintError,function(_0xcf58x11){return Util[_0xe407[70]][_0xe407[79]](_0xcf58xf,_0xe407[27],_0xcf58x1c[_0xe407[39]],_0xcf58x11)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[80]]=function(_0xcf58xe,_0xcf58xf){return Agent[_0xe407[78]]({where:{id:_0xcf58xe[_0xe407[20]][_0xe407[81]]},individualHooks:true})[_0xe407[19]](function(){return _0xcf58xf[_0xe407[54]](204)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};exports[_0xe407[82]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){var _0xcf58x23=_0xcf58xe[_0xe407[23]][_0xe407[22]];var _0xcf58x24=String(_0xcf58xe[_0xe407[68]][_0xe407[83]]);var _0xcf58x25=String(_0xcf58xe[_0xe407[68]][_0xe407[84]]);return Agent[_0xe407[24]](_0xcf58x23)[_0xe407[19]](function(_0xcf58x26){if(_0xcf58x26[_0xe407[85]](_0xcf58x24)){_0xcf58x26[_0xe407[86]]=_0xcf58x25;_0xcf58x26[_0xe407[77]]()[_0xe407[19]](function(){return _0xcf58xf[_0xe407[54]](200)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})}else {return _0xcf58xf[_0xe407[54]](403)}})};exports[_0xe407[87]]=function(_0xcf58xe,_0xcf58xf,_0xcf58x10){var _0xcf58x23=_0xcf58xe[_0xe407[55]][_0xe407[22]];var _0xcf58x25=String(_0xcf58xe[_0xe407[68]][_0xe407[84]]);return Agent[_0xe407[24]](_0xcf58x23)[_0xe407[19]](function(_0xcf58x26){_0xcf58x26[_0xe407[86]]=_0xcf58x25;return _0xcf58x26[_0xe407[77]]()})[_0xe407[19]](function(){return _0xcf58xf[_0xe407[54]](200)})[_0xe407[16]](function(_0xcf58x11){return handleError(_0xcf58xf,_0xcf58x11)})};function handleError(_0xcf58xf,_0xcf58x11){return _0xcf58xf[_0xe407[18]](500)[_0xe407[17]](_0xcf58x11)}
\ No newline at end of file
+var _0xf76c=["\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\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","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\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","\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","\x6E\x61\x6D\x65","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\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","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\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","\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","\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","\x69\x64\x73","\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","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0xf76c[0];var _=require(_0xf76c[1]);var sequelize=require(_0xf76c[3])[_0xf76c[2]];var Util=require(_0xf76c[4]);var Agent=require(_0xf76c[3])[_0xf76c[5]];var VoiceQueue=require(_0xf76c[3])[_0xf76c[6]];var ChatQueue=require(_0xf76c[3])[_0xf76c[7]];var MailQueue=require(_0xf76c[3])[_0xf76c[8]];var FaxQueue=require(_0xf76c[3])[_0xf76c[9]];var SmsQueue=require(_0xf76c[3])[_0xf76c[10]];var User=require(_0xf76c[3])[_0xf76c[5]];var Team=require(_0xf76c[3])[_0xf76c[11]];var MailRoom=require(_0xf76c[3])[_0xf76c[12]];var List=require(_0xf76c[3])[_0xf76c[13]];exports[_0xf76c[14]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[21]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[15]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[30]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[21]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[37]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:var _0x4678x13=[];return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[44]]({},{attributes:[_0xf76c[39]],include:[{raw:true,model:User,attributes:[_0xf76c[22]]}]}))[_0xf76c[19]](function(_0x4678x14){var _0x4678x15=_[_0xf76c[40]](_0x4678x14[_0xf76c[38]],_0xf76c[39]);_0x4678x14[_0xf76c[38]][_0xf76c[42]](function(_0x4678x16){_0x4678x13= _[_0xf76c[41]](_0x4678x13,_[_0xf76c[40]](_0x4678x16.Users,_0xf76c[22]))});return User[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]})[_0xf76c[26]](_[_0xf76c[43]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]],{id:{$in:_0x4678x13}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x4678x15}},required:false}]}))})[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[45]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:var _0x4678x13=[];return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[46]]({},{attributes:[_0xf76c[22]],include:[{raw:true,model:User,attributes:[_0xf76c[22]]}]}))[_0xf76c[19]](function(_0x4678x14){var _0x4678x17=_[_0xf76c[40]](_0x4678x14[_0xf76c[38]],_0xf76c[22]);_0x4678x14[_0xf76c[38]][_0xf76c[42]](function(_0x4678x16){_0x4678x13= _[_0xf76c[41]](_0x4678x13,_[_0xf76c[40]](_0x4678x16.Users,_0xf76c[22]))});return User[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]})[_0xf76c[26]](_[_0xf76c[43]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]],{id:{$in:_0x4678x13}}),{include:[{model:ChatQueue,where:{id:{$in:_0x4678x17}},required:false}]}))})[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[47]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:var _0x4678x13=[];return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[48]]({},{attributes:[_0xf76c[22]],include:[{raw:true,model:User,attributes:[_0xf76c[22]]}]}))[_0xf76c[19]](function(_0x4678x14){var _0x4678x18=_[_0xf76c[40]](_0x4678x14[_0xf76c[38]],_0xf76c[22]);_0x4678x14[_0xf76c[38]][_0xf76c[42]](function(_0x4678x16){_0x4678x13= _[_0xf76c[41]](_0x4678x13,_[_0xf76c[40]](_0x4678x16.Users,_0xf76c[22]))});return User[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]})[_0xf76c[26]](_[_0xf76c[43]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]],{id:{$in:_0x4678x13}}),{include:[{model:MailQueue,where:{id:{$in:_0x4678x18}},required:false}]}))})[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[49]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:var _0x4678x13=[];return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[50]]({},{attributes:[_0xf76c[22]],include:[{raw:true,model:User,attributes:[_0xf76c[22]]}]}))[_0xf76c[19]](function(_0x4678x14){var _0x4678x19=_[_0xf76c[40]](_0x4678x14[_0xf76c[38]],_0xf76c[22]);_0x4678x14[_0xf76c[38]][_0xf76c[42]](function(_0x4678x16){_0x4678x13= _[_0xf76c[41]](_0x4678x13,_[_0xf76c[40]](_0x4678x16.Users,_0xf76c[22]))});return User[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]})[_0xf76c[26]](_[_0xf76c[43]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]],{id:{$in:_0x4678x13}}),{include:[{model:FaxQueue,where:{id:{$in:_0x4678x19}},required:false}]}))})[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[51]]= function(_0x4678xe,_0x4678xf,_0x4678x10){switch(_0x4678xe[_0xf76c[23]][_0xf76c[29]]){case _0xf76c[23]:var _0x4678x13=[];return User[_0xf76c[24]](_0x4678xe[_0xf76c[23]][_0xf76c[22]],{attributes:[_0xf76c[22]]})[_0xf76c[19]](Util[_0xf76c[52]]({},{attributes:[_0xf76c[22]],include:[{raw:true,model:User,attributes:[_0xf76c[22]]}]}))[_0xf76c[19]](function(_0x4678x14){var _0x4678x1a=_[_0xf76c[40]](_0x4678x14[_0xf76c[38]],_0xf76c[22]);_0x4678x14[_0xf76c[38]][_0xf76c[42]](function(_0x4678x16){_0x4678x13= _[_0xf76c[41]](_0x4678x13,_[_0xf76c[40]](_0x4678x16.Users,_0xf76c[22]))});return User[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]})[_0xf76c[26]](_[_0xf76c[43]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]],{id:{$in:_0x4678x13}}),{include:[{model:SmsQueue,where:{id:{$in:_0x4678x1a}},required:false}]}))})[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)});default:return Agent[_0xf76c[28]](_0xf76c[27],{method:[_0xf76c[32],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[33],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[34],_0x4678xe[_0xf76c[20]]]},{method:[_0xf76c[35],_0x4678xe[_0xf76c[20]]]},_0xf76c[36])[_0xf76c[26]](Util[_0xf76c[25]](_0x4678xe[_0xf76c[20]]))[_0xf76c[19]](function(_0x4678x12){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x12)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})}};exports[_0xf76c[53]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678xf[_0xf76c[17]](_0x4678x1b)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[56]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[58]]({attributes:[_0xf76c[39]]})})[_0xf76c[19]](function(_0x4678x15){return _0x4678xf[_0xf76c[17]]({count:_0x4678x15[_0xf76c[57]],rows:_0x4678x15})})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[59]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[60]]({attributes:[_0xf76c[22]]})})[_0xf76c[19]](function(_0x4678x17){return _0x4678xf[_0xf76c[17]]({count:_0x4678x17[_0xf76c[57]],rows:_0x4678x17})})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[61]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[62]]({attributes:[_0xf76c[22]]})})[_0xf76c[19]](function(_0x4678x18){return _0x4678xf[_0xf76c[17]]({count:_0x4678x18[_0xf76c[57]],rows:_0x4678x18})})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[63]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[64]]({attributes:[_0xf76c[22]]})})[_0xf76c[19]](function(_0x4678x19){return _0x4678xf[_0xf76c[17]]({count:_0x4678x19[_0xf76c[57]],rows:_0x4678x19})})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[65]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[66]]({attributes:[_0xf76c[22]]})})[_0xf76c[19]](function(_0x4678x1a){return _0x4678xf[_0xf76c[17]]({count:_0x4678x1a[_0xf76c[57]],rows:_0x4678x1a})})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[67]]= function(_0x4678xe,_0x4678xf){var _0x4678x1c;_0x4678xe[_0xf76c[68]][_0xf76c[29]]= _0xf76c[27];return sequelize[_0xf76c[73]](function(_0x4678x1d){return Agent[_0xf76c[28]](_0xf76c[27])[_0xf76c[67]](_0x4678xe[_0xf76c[68]],{transaction:_0x4678x1d})[_0xf76c[19]](function(_0x4678x1b){_0x4678x1c= _0x4678x1b;return Team[_0xf76c[72]]({where:{defaultEntry:true}})})[_0xf76c[19]](function(_0x4678x1f){return _0x4678x1f[_0xf76c[71]](_0x4678x1c[_0xf76c[22]],{transaction:_0x4678x1d})})[_0xf76c[19]](function(){return List[_0xf76c[72]]({where:{defaultEntry:true}})})[_0xf76c[19]](function(_0x4678x1e){return _0x4678x1e[_0xf76c[71]](_0x4678x1c[_0xf76c[22]],{transaction:_0x4678x1d})})})[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[18]](201)[_0xf76c[17]](_0x4678x1c)})[_0xf76c[16]](sequelize.UniqueConstraintError,function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return Util[_0xf76c[70]][_0xf76c[69]](_0x4678xf,_0x4678x11)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[74]]= function(_0x4678xe,_0x4678xf){var _0x4678x20;if(_0x4678xe[_0xf76c[68]]&& _0x4678xe[_0xf76c[68]][_0xf76c[57]]){_0x4678xe[_0xf76c[68]][_0xf76c[42]](function(_0x4678x1b){_0x4678x1b[_0xf76c[29]]= _0xf76c[27]})};return sequelize[_0xf76c[73]](function(_0x4678x1d){return Agent[_0xf76c[74]](_0x4678xe[_0xf76c[68]],{transaction:_0x4678x1d,individualHooks:true})[_0xf76c[19]](function(_0x4678x21){_0x4678x20= _0x4678x21;return Team[_0xf76c[72]]({where:{defaultEntry:true}})})[_0xf76c[19]](function(_0x4678x1f){return _0x4678x1f[_0xf76c[75]](_[_0xf76c[40]](_0x4678x20,_0xf76c[22]),{transaction:_0x4678x1d})})})[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[54]](201)})[_0xf76c[16]](sequelize.UniqueConstraintError,function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return Util[_0xf76c[70]][_0xf76c[69]](_0x4678xf,_0x4678x11)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[76]]= function(_0x4678xe,_0x4678xf){if(_0x4678xe[_0xf76c[68]][_0xf76c[22]]){delete _0x4678xe[_0xf76c[68]][_0xf76c[22]];delete _0x4678xe[_0xf76c[68]][_0xf76c[29]]};return sequelize[_0xf76c[73]](function(_0x4678x1d){return Agent[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};var _0x4678x22=_[_0xf76c[43]](_0x4678x1b,_0x4678xe[_0xf76c[68]]);return _0x4678x22[_0xf76c[77]]({transaction:_0x4678x1d})})[_0xf76c[19]](function(_0x4678x1b){return _0x4678xf[_0xf76c[18]](200)[_0xf76c[17]](_0x4678x1b)})})[_0xf76c[16]](sequelize.UniqueConstraintError,function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return Util[_0xf76c[70]][_0xf76c[69]](_0x4678xf,_0x4678x11)})[_0xf76c[16]](function(_0x4678x11){console[_0xf76c[31]](_0x4678x11);return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[78]]= function(_0x4678xe,_0x4678xf){var _0x4678x1c;return Agent[_0xf76c[24]](_0x4678xe[_0xf76c[55]][_0xf76c[22]])[_0xf76c[19]](function(_0x4678x1b){_0x4678x1c= _0x4678x1b;if(!_0x4678x1b){return _0x4678xf[_0xf76c[54]](404)};return _0x4678x1b[_0xf76c[78]]()})[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[54]](204)})[_0xf76c[16]](sequelize.ForeignKeyConstraintError,function(_0x4678x11){return Util[_0xf76c[70]][_0xf76c[79]](_0x4678xf,_0xf76c[27],_0x4678x1c[_0xf76c[39]],_0x4678x11)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[80]]= function(_0x4678xe,_0x4678xf){return Agent[_0xf76c[78]]({where:{id:_0x4678xe[_0xf76c[20]][_0xf76c[81]]},individualHooks:true})[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[54]](204)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};exports[_0xf76c[82]]= function(_0x4678xe,_0x4678xf,_0x4678x10){var _0x4678x23=_0x4678xe[_0xf76c[23]][_0xf76c[22]];var _0x4678x24=String(_0x4678xe[_0xf76c[68]][_0xf76c[83]]);var _0x4678x25=String(_0x4678xe[_0xf76c[68]][_0xf76c[84]]);return Agent[_0xf76c[24]](_0x4678x23)[_0xf76c[19]](function(_0x4678x26){if(_0x4678x26[_0xf76c[85]](_0x4678x24)){_0x4678x26[_0xf76c[86]]= _0x4678x25;_0x4678x26[_0xf76c[77]]()[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[54]](200)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})}else {return _0x4678xf[_0xf76c[54]](403)}})};exports[_0xf76c[87]]= function(_0x4678xe,_0x4678xf,_0x4678x10){var _0x4678x23=_0x4678xe[_0xf76c[55]][_0xf76c[22]];var _0x4678x25=String(_0x4678xe[_0xf76c[68]][_0xf76c[84]]);return Agent[_0xf76c[24]](_0x4678x23)[_0xf76c[19]](function(_0x4678x26){_0x4678x26[_0xf76c[86]]= _0x4678x25;return _0x4678x26[_0xf76c[77]]()})[_0xf76c[19]](function(){return _0x4678xf[_0xf76c[54]](200)})[_0xf76c[16]](function(_0x4678x11){return handleError(_0x4678xf,_0x4678x11)})};function handleError(_0x4678xf,_0x4678x11){return _0x4678xf[_0xf76c[18]](500)[_0xf76c[17]](_0x4678x11)}
\ No newline at end of file