Built motion from commit e1ea3531f.|1.0.19
[motion.git] / server / api / fax_room / fax_room.controller.js
index 71c32d9..44834d7 100644 (file)
@@ -1 +1 @@
-var _0xa61a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x64","\x75\x73\x65\x72","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x74\x61\x67\x73","\x2C","\x73\x70\x6C\x69\x74"];_0xa61a[0];var _=require(_0xa61a[1]);var util=require(_0xa61a[2]);var Util=require(_0xa61a[3]);var sequelize=require(_0xa61a[5])[_0xa61a[4]];var User=require(_0xa61a[5])[_0xa61a[6]];var Agent=require(_0xa61a[5])[_0xa61a[6]];var Contact=require(_0xa61a[5])[_0xa61a[7]];var FaxRoom=require(_0xa61a[5])[_0xa61a[8]];var FaxMessage=require(_0xa61a[5])[_0xa61a[9]];var FaxAccount=require(_0xa61a[5])[_0xa61a[10]];var FaxAttachment=require(_0xa61a[5])[_0xa61a[11]];exports[_0xa61a[12]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[21]](_0xa61a[20])[_0xa61a[19]](Util[_0xa61a[18]](_0x200bxc[_0xa61a[17]]))[_0xa61a[16]](function(_0x200bx10){return _0x200bxd[_0xa61a[15]](200)[_0xa61a[14]](_0x200bx10)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[22]]=function(_0x200bxc,_0x200bxd,_0x200bxe){switch(_0x200bxc[_0xa61a[27]][_0xa61a[32]]){case _0xa61a[30]:return sequelize[_0xa61a[17]](_0xa61a[24],{replacements:{status:_0xa61a[25],id:_0x200bxc[_0xa61a[27]][_0xa61a[26]]},type:sequelize[_0xa61a[29]][_0xa61a[28]]})[_0xa61a[16]](function(_0x200bx10){return _0x200bxd[_0xa61a[15]](200)[_0xa61a[14]](_0x200bx10)})[_0xa61a[13]](function(_0x200bxf){console[_0xa61a[23]](_0x200bxf);return handleError(_0x200bxd,_0x200bxf)});default:return sequelize[_0xa61a[17]](_0xa61a[31],{replacements:{status:_0xa61a[25],id:_0x200bxc[_0xa61a[27]][_0xa61a[26]]},type:sequelize[_0xa61a[29]][_0xa61a[28]]})[_0xa61a[16]](function(_0x200bx10){return _0x200bxd[_0xa61a[15]](200)[_0xa61a[14]](_0x200bx10)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})}};exports[_0xa61a[33]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[35]]({where:{UserId:_0x200bxc[_0xa61a[34]][_0xa61a[26]]},include:[{all:true}]})[_0xa61a[16]](function(_0x200bx11){return _0x200bxd[_0xa61a[15]](200)[_0xa61a[14]](_0x200bx11)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[36]]=function(_0x200bxc,_0x200bxd,_0x200bxe){var _0x200bx12;if(_0x200bxc[_0xa61a[27]][_0xa61a[32]]===_0xa61a[30]){return FaxRoom[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){_0x200bx12=_0x200bx13;if(!_0x200bx12){return _0x200bxd[_0xa61a[37]](404)};return _0x200bx12[_0xa61a[40]]({status:_0xa61a[39]},{userId:_0x200bxc[_0xa61a[27]][_0xa61a[26]]})})[_0xa61a[16]](function(){return _0x200bx12[_0xa61a[38]](_0x200bxc[_0xa61a[27]][_0xa61a[26]])})[_0xa61a[16]](function(){return _0x200bxd[_0xa61a[37]](200)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})}};exports[_0xa61a[42]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[21]](_0xa61a[20])[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){if(!_0x200bx13){return _0x200bxd[_0xa61a[37]](404)};return _0x200bxd[_0xa61a[14]](_0x200bx13)})[_0xa61a[13]](function(_0x200bxf){console[_0xa61a[23]](_0x200bxf);return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[43]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){if(!_0x200bx13){return _0x200bxd[_0xa61a[37]](404)};return _0x200bx13[_0xa61a[48]]({attributes:[_0xa61a[26],_0xa61a[44],_0xa61a[45],_0xa61a[46],_0xa61a[32],_0xa61a[47]]})})[_0xa61a[16]](function(_0x200bx14){return _0x200bxd[_0xa61a[14]](_0x200bx14)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[49]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[49]](_0x200bxc[_0xa61a[50]])[_0xa61a[16]](function(_0x200bx13){return _0x200bxd[_0xa61a[15]](201)[_0xa61a[14]](_0x200bx13)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[51]]=function(_0x200bxc,_0x200bxd,_0x200bxe){_0x200bxc[_0xa61a[50]][_0xa61a[52]]=_0x200bxc[_0xa61a[27]][_0xa61a[26]];_0x200bxc[_0xa61a[50]][_0xa61a[53]]=_0x200bxc[_0xa61a[34]][_0xa61a[26]];_0x200bxc[_0xa61a[50]][_0xa61a[54]]=_0x200bxc[_0xa61a[50]][_0xa61a[54]];return FaxMessage[_0xa61a[49]](_0x200bxc[_0xa61a[50]],{include:[{model:FaxAttachment}],user:_0x200bxc[_0xa61a[27]]})[_0xa61a[16]](function(_0x200bx15){return _0x200bxd[_0xa61a[15]](201)[_0xa61a[14]](_0x200bx15)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[40]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){if(!_0x200bx13){return _0x200bxd[_0xa61a[37]](404)};if(_0x200bx13[_0xa61a[55]]){throw  new Error(_0xa61a[56])};var _0x200bx16=_[_0xa61a[57]](_0x200bx13,_0x200bxc[_0xa61a[50]]);return _0x200bx16[_0xa61a[58]]()})[_0xa61a[16]](function(_0x200bx13){return _0x200bxd[_0xa61a[15]](200)[_0xa61a[14]](_0x200bx13)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[59]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){if(!_0x200bx13){return _0x200bxd[_0xa61a[37]](404)};return _0x200bx13[_0xa61a[61]](_0x200bxc[_0xa61a[50]][_0xa61a[60]],{individualHooks:true})})[_0xa61a[16]](function(){return _0x200bxd[_0xa61a[37]](200)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[62]]=function(_0x200bxc,_0x200bxd,_0x200bxe){return FaxRoom[_0xa61a[41]](_0x200bxc[_0xa61a[34]][_0xa61a[26]])[_0xa61a[16]](function(_0x200bx13){if(!_0x200bx13){return _0x200bxd[_0xa61a[37]](404)};return _0x200bx13[_0xa61a[62]]()})[_0xa61a[16]](function(){return _0x200bxd[_0xa61a[37]](204)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};exports[_0xa61a[63]]=function(_0x200bxc,_0x200bxd){return FaxRoom[_0xa61a[62]]({where:{id:_0x200bxc[_0xa61a[17]][_0xa61a[64]]},individualHooks:true})[_0xa61a[16]](function(){return _0x200bxd[_0xa61a[37]](200)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})};function handleError(_0x200bxd,_0x200bxf){return _0x200bxd[_0xa61a[15]](500)[_0xa61a[14]](_0x200bxf)}exports[_0xa61a[65]]=function(_0x200bxc,_0x200bxd,_0x200bxe){var _0x200bx18={tags:_0x200bxc[_0xa61a[50]][_0xa61a[66]]};var _0x200bx19={where:{id:_0x200bxc[_0xa61a[34]][_0xa61a[26]][_0xa61a[68]](_0xa61a[67])}};return FaxRoom[_0xa61a[40]](_0x200bx18,_0x200bx19)[_0xa61a[16]](function(_0x200bx11){if(!_0x200bx11){return _0x200bxd[_0xa61a[37]](404)};return _0x200bx11})[_0xa61a[16]](function(_0x200bx11){return _0x200bxd[_0xa61a[37]](200)})[_0xa61a[13]](function(_0x200bxf){return handleError(_0x200bxd,_0x200bxf)})}
\ No newline at end of file
+var _0x9ba4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x63\x68\x61\x6E\x67\x65\x64","\x66\x61\x78\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x6B\x65\x79\x42\x79","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x4C\x4F\x57\x45\x52\x28\x73\x74\x61\x74\x75\x73\x29\x20\x41\x53\x20\x73\x74\x61\x74\x75\x73\x2C\x20\x43\x4F\x55\x4E\x54\x28\x69\x64\x29\x20\x41\x53\x20\x63\x6F\x75\x6E\x74\x20\x46\x52\x4F\x4D\x20\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x9ba4[0];var _=require(_0x9ba4[1]);var util=require(_0x9ba4[2]);var Util=require(_0x9ba4[3]);var moment=require(_0x9ba4[4]);var logger=require(_0x9ba4[6])(_0x9ba4[5]);var sequelize=require(_0x9ba4[8])[_0x9ba4[7]];var User=require(_0x9ba4[8])[_0x9ba4[9]];var Agent=require(_0x9ba4[8])[_0x9ba4[9]];var Contact=require(_0x9ba4[8])[_0x9ba4[10]];var FaxRoom=require(_0x9ba4[8])[_0x9ba4[11]];var FaxMessage=require(_0x9ba4[8])[_0x9ba4[12]];var FaxAccount=require(_0x9ba4[8])[_0x9ba4[13]];var FaxApplication=require(_0x9ba4[8])[_0x9ba4[14]];var FaxQueue=require(_0x9ba4[8])[_0x9ba4[15]];var FaxAttachment=require(_0x9ba4[8])[_0x9ba4[16]];exports[_0x9ba4[17]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[26]](_0x9ba4[25])[_0x9ba4[24]](Util[_0x9ba4[23]](_0xa25bx10[_0x9ba4[22]]))[_0x9ba4[21]](function(_0xa25bx14){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx14)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[27]]= function(_0xa25bx10,_0xa25bx11){return FaxRoom[_0x9ba4[27]]()[_0x9ba4[21]](function(_0xa25bx15){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx15)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};function getFaxQueues(_0xa25bx17){return function(){switch(_0xa25bx17[_0x9ba4[33]]){case _0x9ba4[32]:return User[_0x9ba4[31]](_0xa25bx17[_0x9ba4[28]],{attributes:[_0x9ba4[28]]})[_0x9ba4[21]](Util[_0x9ba4[30]]({},{attributes:[_0x9ba4[28]]}))[_0x9ba4[21]](function(_0xa25bx18){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0x9ba4[29]](_0xa25bx18,_0x9ba4[28])}}}}}});default:return {}}}}exports[_0x9ba4[34]]= function(_0xa25bx10,_0xa25bx11){return Promise[_0x9ba4[40]]([])[_0x9ba4[21]](getFaxQueues(_0xa25bx10[_0x9ba4[32]]))[_0x9ba4[21]](function(_0xa25bx1a){return FaxRoom[_0x9ba4[39]](_[_0x9ba4[38]](Util[_0x9ba4[23]](_0xa25bx10[_0x9ba4[22]],{status:_0x9ba4[35],updatedAt:{$gte:moment()[_0x9ba4[37]](_0x9ba4[36])}}),_0xa25bx1a))})[_0x9ba4[21]](function(_0xa25bx19){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]]({value:_0xa25bx19})})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[41]]= function(_0xa25bx10,_0xa25bx11){return Promise[_0x9ba4[40]]([])[_0x9ba4[21]](getFaxQueues(_0xa25bx10[_0x9ba4[32]]))[_0x9ba4[21]](function(_0xa25bx1a){return FaxRoom[_0x9ba4[39]](_[_0x9ba4[38]](Util[_0x9ba4[23]](_0xa25bx10[_0x9ba4[22]],{status:_0x9ba4[42],updatedAt:{$gte:moment()[_0x9ba4[37]](_0x9ba4[36])}}),_0xa25bx1a))})[_0x9ba4[21]](function(_0xa25bx19){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]]({value:_0xa25bx19})})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[43]]= function(_0xa25bx10,_0xa25bx11){return Promise[_0x9ba4[40]]([])[_0x9ba4[21]](getFaxQueues(_0xa25bx10[_0x9ba4[32]]))[_0x9ba4[21]](function(_0xa25bx1a){return FaxRoom[_0x9ba4[39]](_[_0x9ba4[38]](Util[_0x9ba4[23]](_0xa25bx10[_0x9ba4[22]],{status:_0x9ba4[44],updatedAt:{$gte:moment()[_0x9ba4[37]](_0x9ba4[36])}}),_0xa25bx1a))})[_0x9ba4[21]](function(_0xa25bx19){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]]({value:_0xa25bx19})})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[45]]= function(_0xa25bx10,_0xa25bx11){return Promise[_0x9ba4[40]]([])[_0x9ba4[21]](getFaxQueues(_0xa25bx10[_0x9ba4[32]]))[_0x9ba4[21]](function(_0xa25bx1a){return FaxRoom[_0x9ba4[39]](_[_0x9ba4[38]](Util[_0x9ba4[23]](_0xa25bx10[_0x9ba4[22]],{status:_0x9ba4[46],updatedAt:{$gte:moment()[_0x9ba4[37]](_0x9ba4[36])}}),_0xa25bx1a))})[_0x9ba4[21]](function(_0xa25bx19){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]]({value:_0xa25bx19})})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[47]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){switch(_0xa25bx10[_0x9ba4[32]][_0x9ba4[33]]){case _0x9ba4[52]:return sequelize[_0x9ba4[22]](_0x9ba4[48],{replacements:{status:_0x9ba4[49],id:_0xa25bx10[_0x9ba4[32]][_0x9ba4[28]]},type:sequelize[_0x9ba4[51]][_0x9ba4[50]]})[_0x9ba4[21]](function(_0xa25bx14){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx14)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)});default:return sequelize[_0x9ba4[22]](_0x9ba4[53],{replacements:{status:_0x9ba4[49],id:_0xa25bx10[_0x9ba4[32]][_0x9ba4[28]]},type:sequelize[_0x9ba4[51]][_0x9ba4[50]]})[_0x9ba4[21]](function(_0xa25bx14){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx14)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})}};exports[_0x9ba4[54]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[56]]({where:{UserId:_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]]},include:[{all:true}]})[_0x9ba4[21]](function(_0xa25bx1b){return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx1b)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[57]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){var _0xa25bx1c;if(_0xa25bx10[_0x9ba4[32]][_0x9ba4[33]]=== _0x9ba4[52]){return FaxRoom[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){_0xa25bx1c= _0xa25bx1d;if(!_0xa25bx1c){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx1c[_0x9ba4[60]]({status:_0x9ba4[44]},{userId:_0xa25bx10[_0x9ba4[32]][_0x9ba4[28]]})})[_0x9ba4[21]](function(){return _0xa25bx1c[_0x9ba4[59]](_0xa25bx10[_0x9ba4[32]][_0x9ba4[28]])})[_0x9ba4[21]](function(){return _0xa25bx11[_0x9ba4[58]](200)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})}};exports[_0x9ba4[61]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[26]](_0x9ba4[25])[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){if(!_0xa25bx1d){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx11[_0x9ba4[19]](_0xa25bx1d)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[62]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){if(!_0xa25bx1d){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx1d[_0x9ba4[67]]({attributes:[_0x9ba4[28],_0x9ba4[63],_0x9ba4[64],_0x9ba4[65],_0x9ba4[33],_0x9ba4[66]]})})[_0x9ba4[21]](function(_0xa25bx1e){return _0xa25bx11[_0x9ba4[19]](_0xa25bx1e)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[68]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[68]](_0xa25bx10[_0x9ba4[69]])[_0x9ba4[21]](function(_0xa25bx1d){return _0xa25bx11[_0x9ba4[20]](201)[_0x9ba4[19]](_0xa25bx1d)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[70]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){_0xa25bx10[_0x9ba4[69]][_0x9ba4[71]]= _0xa25bx10[_0x9ba4[32]][_0x9ba4[28]];_0xa25bx10[_0x9ba4[69]][_0x9ba4[72]]= _0xa25bx10[_0x9ba4[55]][_0x9ba4[28]];_0xa25bx10[_0x9ba4[69]][_0x9ba4[73]]= _0xa25bx10[_0x9ba4[69]][_0x9ba4[73]];return FaxMessage[_0x9ba4[68]](_0xa25bx10[_0x9ba4[69]],{include:[{model:FaxAttachment}],user:_0xa25bx10[_0x9ba4[32]]})[_0x9ba4[21]](function(_0xa25bx1f){if(_0xa25bx1f){_0xa25bx10[_0x9ba4[77]][_0x9ba4[76]][_0x9ba4[75]][_0x9ba4[19]]({message:_0x9ba4[74],doc:_0xa25bx1f,options:{user:_0xa25bx10[_0x9ba4[32]]}})};return _0xa25bx11[_0x9ba4[20]](201)[_0x9ba4[19]](_0xa25bx1f)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[60]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){if(!_0xa25bx1d){return _0xa25bx11[_0x9ba4[58]](404)};if(_0xa25bx1d[_0x9ba4[80]]){throw  new Error(_0x9ba4[81])};var _0xa25bx20=_[_0x9ba4[38]](_0xa25bx1d,_0xa25bx10[_0x9ba4[69]]);return _0xa25bx20[_0x9ba4[82]]()})[_0x9ba4[21]](function(_0xa25bx1d){if(_0xa25bx1d[_0x9ba4[78]](_0x9ba4[20])&& _0xa25bx1d[_0x9ba4[20]]=== _0x9ba4[46]){_0xa25bx10[_0x9ba4[77]][_0x9ba4[76]][_0x9ba4[75]][_0x9ba4[19]]({message:_0x9ba4[79],doc:_0xa25bx1d})};return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx1d)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[83]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){if(!_0xa25bx1d){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx1d[_0x9ba4[85]](_0xa25bx10[_0x9ba4[69]][_0x9ba4[84]],{individualHooks:true})})[_0x9ba4[21]](function(){return _0xa25bx11[_0x9ba4[58]](200)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[86]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxRoom[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1d){if(!_0xa25bx1d){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx1d[_0x9ba4[86]]()})[_0x9ba4[21]](function(){return _0xa25bx11[_0x9ba4[58]](204)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[87]]= function(_0xa25bx10,_0xa25bx11){return FaxRoom[_0x9ba4[86]]({where:{id:_0xa25bx10[_0x9ba4[22]][_0x9ba4[88]]},individualHooks:true})[_0x9ba4[21]](function(){return _0xa25bx11[_0x9ba4[58]](200)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};function handleError(_0xa25bx11,_0xa25bx13){logger[_0x9ba4[90]](_0xa25bx13[_0x9ba4[89]]);return _0xa25bx11[_0x9ba4[20]](500)[_0x9ba4[19]](_0xa25bx13)}exports[_0x9ba4[91]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){var _0xa25bx22={where:{id:_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]][_0x9ba4[93]](_0x9ba4[92])},user:_0xa25bx10[_0x9ba4[32]],individualHooks:true};return FaxRoom[_0x9ba4[60]](_0xa25bx10[_0x9ba4[69]],_0xa25bx22)[_0x9ba4[21]](function(_0xa25bx23){if(!_0xa25bx23){return _0xa25bx11[_0x9ba4[58]](404)};return _0xa25bx23})[_0x9ba4[21]](function(_0xa25bx23){return _0xa25bx11[_0x9ba4[58]](200)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[94]]= function(_0xa25bx10,_0xa25bx11){return sequelize[_0x9ba4[22]](_0x9ba4[97],{type:sequelize[_0x9ba4[51]][_0x9ba4[50]]})[_0x9ba4[21]](function(_0xa25bx24){var _0xa25bx25=_[_0x9ba4[38]]({new:0,open:0,pending:0,closed:0},_[_0x9ba4[96]](_[_0x9ba4[95]](_0xa25bx24,_0x9ba4[20]),_0x9ba4[39]));return _0xa25bx11[_0x9ba4[20]](200)[_0x9ba4[19]](_0xa25bx25)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})};exports[_0x9ba4[98]]= function(_0xa25bx10,_0xa25bx11,_0xa25bx12){return FaxMessage[_0x9ba4[31]](_0xa25bx10[_0x9ba4[55]][_0x9ba4[28]])[_0x9ba4[21]](function(_0xa25bx1f){return _0xa25bx1f[_0x9ba4[99]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0x9ba4[28],_0x9ba4[63],_0x9ba4[64],_0x9ba4[65]]}]},{model:User,attributes:[_0x9ba4[28],_0x9ba4[63],_0x9ba4[64],_0x9ba4[65]]}]})})[_0x9ba4[21]](function(_0xa25bx1d){return _0xa25bx11[_0x9ba4[19]](_0xa25bx1d)})[_0x9ba4[18]](function(_0xa25bx13){return handleError(_0xa25bx11,_0xa25bx13)})}
\ No newline at end of file