Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / config / routing / fax / index.js
index b0d6301..3f20ac7 100644 (file)
@@ -1 +1 @@
-var _0x2e44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x52\x6F\x6F\x6D","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65","\x66\x72\x6F\x6D","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x55\x73\x65\x72\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x6F\x72\x64\x65\x72\x42\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x45\x6E\x64\x20\x66\x61\x78\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x66\x69\x6E\x64\x42\x79\x49\x64","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x2e44[0];var _=require(_0x2e44[1]);var moment=require(_0x2e44[2]);var util=require(_0x2e44[3]);var async=require(_0x2e44[4]);var Util=require(_0x2e44[5]);var ReportFax=require(_0x2e44[7])[_0x2e44[6]];var ReportFaxRoom=require(_0x2e44[7])[_0x2e44[8]];var ReportFaxSession=require(_0x2e44[7])[_0x2e44[9]];var FaxMessage=require(_0x2e44[7])[_0x2e44[10]];var FaxQueue=require(_0x2e44[7])[_0x2e44[11]];var FaxRoom=require(_0x2e44[7])[_0x2e44[12]];var Interval=require(_0x2e44[7])[_0x2e44[13]];var User=require(_0x2e44[7])[_0x2e44[14]];var Session=require(_0x2e44[15]);module[_0x2e44[16]]=function(){console[_0x2e44[18]](_0x2e44[17]);FaxMessage[_0x2e44[21]](function(_0x976fxf){if(_0x976fxf[_0x2e44[19]]===_0x2e44[20]){handleMessage(_0x976fxf)}})};function handleEntityNotFound(_0x976fxf){return function(_0x976fx11){if(!_0x976fx11){throw {message:_0x976fxf}};return _0x976fx11}}function handleFaxRoom(_0x976fx13,_0x976fx14){return function(_0x976fx15){_0x976fx13[_0x2e44[22]]=_0x976fx15[_0x2e44[23]];_0x976fx13[_0x2e44[24]]=util[_0x2e44[27]](_0x2e44[25],moment()[_0x2e44[26]](),_0x976fx15[_0x2e44[23]]);_0x976fx14[_0x2e44[28]]=_[_0x2e44[30]](_0x976fx15.Users,function(_0x976fx16){return {id:_0x976fx16[_0x2e44[23]],name:_0x976fx16[_0x2e44[29]],penalty:0}});return _0x976fx15[_0x2e44[31]]()}}function handleFaxAccount(_0x976fx13,_0x976fx14){return function(_0x976fx18){_0x976fx13[_0x2e44[32]]=_0x976fx18[_0x2e44[23]];_0x976fx13[_0x2e44[33]]=_0x976fx18[_0x2e44[29]];_0x976fx13[_0x2e44[34]]=_0x976fx18[_0x2e44[35]];_0x976fx14[_0x2e44[36]]=_0x976fx18[_0x2e44[36]];if(_0x976fx18[_0x2e44[36]]){_0x976fx14[_0x2e44[37]]=_0x976fx14[_0x2e44[38]]=_0x976fx18[_0x2e44[39]];_0x976fx14[_0x2e44[36]]=_0x976fx18[_0x2e44[39]];_0x976fx14[_0x2e44[40]]=_0x2e44[41]};return _0x976fx18[_0x2e44[45]]({order:_0x2e44[42],include:[{model:FaxQueue,attributes:[_0x2e44[23],_0x2e44[29],_0x2e44[39],_0x2e44[40]],include:[{model:User,attributes:[_0x2e44[23],_0x2e44[29],_0x2e44[43],_0x2e44[44]]}]},{model:User,attributes:[_0x2e44[23],_0x2e44[29],_0x2e44[43],_0x2e44[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0x976fx13,_0x976fx14){return function(_0x976fx1a){var _0x976fx1b=[];if(_0x976fx14[_0x2e44[36]]){_0x976fx13[_0x2e44[38]]=_0x976fx14[_0x2e44[36]];_0x976fx13[_0x2e44[37]]=_0x976fx14[_0x2e44[36]];_0x976fx13[_0x2e44[28]]=_0x976fx14[_0x2e44[28]];_0x976fx13[_0x2e44[46]]=_0x2e44[36];_0x976fx13[_0x2e44[40]]=_0x2e44[41];var _0x976fx1c=_[_0x2e44[47]](_0x976fx13);if(_0x976fx1c[_0x2e44[28]][_0x2e44[48]]){_0x976fx1b[_0x2e44[59]](function(_0x976fx1d){return ReportFaxRoom[_0x2e44[57]]({uniqueid:_0x976fx1c[_0x2e44[24]],accountid:_0x976fx1c[_0x2e44[32]],accountname:_0x976fx1c[_0x2e44[33]],accountphone:_0x976fx1c[_0x2e44[34]],from:_0x976fx1c[_0x2e44[58]],roomid:_0x976fx1c[_0x2e44[22]],joinAt:moment()[_0x2e44[27]](_0x2e44[56])})[_0x2e44[51]](function(){return ReportFaxSession[_0x2e44[57]]({uniqueid:_0x976fx1c[_0x2e44[24]],accountid:_0x976fx1c[_0x2e44[32]],accountname:_0x976fx1c[_0x2e44[33]],accountphone:_0x976fx1c[_0x2e44[34]],application:_0x976fx1c[_0x2e44[46]],memberid:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[23]]:null,membername:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[29]]:null,queue:_0x976fx1c[_0x2e44[53]],queuename:_0x976fx1c[_0x2e44[54]],roomid:_0x976fx1c[_0x2e44[22]],fidelity:_0x976fx1c[_0x2e44[46]]===_0x2e44[36]?_0x976fx1c[_0x2e44[55]]:null,joinAt:moment()[_0x2e44[27]](_0x2e44[56])})})[_0x2e44[51]](function(){ new Session(_0x976fx1c,_0x976fx1d)})[_0x2e44[50]](function(_0x976fx1e){console[_0x2e44[49]](_0x976fx1e)})})}};_0x976fx1a[_0x2e44[69]](function(_0x976fx1f,_0x976fx20){var _0x976fx1c=_[_0x2e44[47]](_0x976fx13);_0x976fx1c[_0x2e44[37]]=_0x976fx1f[_0x2e44[39]];_0x976fx1c[_0x2e44[46]]=_0x976fx1f[_0x2e44[60]];_0x976fx1c[_0x2e44[61]]=moment()[_0x2e44[27]](_0x2e44[56]);switch(_0x976fx1f[_0x2e44[60]]){case _0x2e44[67]:_0x976fx1c[_0x2e44[53]]=_0x976fx1f[_0x2e44[11]][_0x2e44[23]];_0x976fx1c[_0x2e44[54]]=_0x976fx1f[_0x2e44[11]][_0x2e44[29]];_0x976fx1c[_0x2e44[40]]=_0x976fx1f[_0x2e44[11]][_0x2e44[40]];_0x976fx1c[_0x2e44[38]]=_0x976fx1f[_0x2e44[11]][_0x2e44[39]];_0x976fx1f[_0x2e44[11]][_0x2e44[62]]=_[_0x2e44[64]](_0x976fx1f[_0x2e44[11]].Users,_0x2e44[63]);_0x976fx1c[_0x2e44[28]]=_[_0x2e44[30]](_0x976fx1f[_0x2e44[11]].Users,function(_0x976fx21){return {id:_0x976fx21[_0x2e44[23]],name:_0x976fx21[_0x2e44[29]],penalty:_0x976fx21[_0x2e44[66]][_0x2e44[65]]}});break;case _0x2e44[52]:_0x976fx1c[_0x2e44[38]]=_0x976fx1f[_0x2e44[39]];_0x976fx1c[_0x2e44[40]]=_0x2e44[41];_0x976fx1c[_0x2e44[28]]=[{id:_0x976fx1f[_0x2e44[14]][_0x2e44[23]],name:_0x976fx1f[_0x2e44[14]][_0x2e44[29]],penalty:0}];break;default:};if(_0x976fx1b[_0x2e44[48]]){_0x976fx1b[_0x2e44[59]](function(_0x976fx22,_0x976fx1d){if(_0x976fx22){_0x976fx1d(null,_0x976fx22)}else {return ReportFaxSession[_0x2e44[68]]({leaveAt:moment()[_0x2e44[27]](_0x2e44[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x976fx1c[_0x2e44[24]]},individualHooks:true})[_0x2e44[51]](function(){return ReportFaxSession[_0x2e44[57]]({uniqueid:_0x976fx1c[_0x2e44[24]],accountid:_0x976fx1c[_0x2e44[32]],accountname:_0x976fx1c[_0x2e44[33]],accountphone:_0x976fx1c[_0x2e44[34]],application:_0x976fx1c[_0x2e44[46]],memberid:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[23]]:null,membername:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[29]]:null,queue:_0x976fx1c[_0x2e44[53]],queuename:_0x976fx1c[_0x2e44[54]],roomid:_0x976fx1c[_0x2e44[22]],fidelity:_0x976fx1c[_0x2e44[46]]===_0x2e44[36]?_0x976fx1c[_0x2e44[55]]:null,joinAt:moment()[_0x2e44[27]](_0x2e44[56])})})[_0x2e44[51]](function(){ new Session(_0x976fx1c,_0x976fx1d)})[_0x2e44[50]](function(_0x976fx1e){console[_0x2e44[49]](_0x976fx1e)})}})}else {_0x976fx1b[_0x2e44[59]](function(_0x976fx1d){return ReportFaxRoom[_0x2e44[57]]({uniqueid:_0x976fx1c[_0x2e44[24]],accountid:_0x976fx1c[_0x2e44[32]],accountname:_0x976fx1c[_0x2e44[33]],accountphone:_0x976fx1c[_0x2e44[34]],from:_0x976fx1c[_0x2e44[58]],roomid:_0x976fx1c[_0x2e44[22]],joinAt:moment()[_0x2e44[27]](_0x2e44[56])})[_0x2e44[51]](function(){return ReportFaxSession[_0x2e44[57]]({uniqueid:_0x976fx1c[_0x2e44[24]],accountid:_0x976fx1c[_0x2e44[32]],accountname:_0x976fx1c[_0x2e44[33]],accountphone:_0x976fx1c[_0x2e44[34]],application:_0x976fx1c[_0x2e44[46]],memberid:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[23]]:null,membername:(_0x976fx1c[_0x2e44[46]]===_0x2e44[52]&&_0x976fx1c[_0x2e44[28]][0])?_0x976fx1c[_0x2e44[28]][0][_0x2e44[29]]:null,queue:_0x976fx1c[_0x2e44[53]],queuename:_0x976fx1c[_0x2e44[54]],roomid:_0x976fx1c[_0x2e44[22]],fidelity:_0x976fx1c[_0x2e44[46]]===_0x2e44[36]?_0x976fx1c[_0x2e44[55]]:null,joinAt:moment()[_0x2e44[27]](_0x2e44[56])})})[_0x2e44[51]](function(){ new Session(_0x976fx1c,_0x976fx1d)})[_0x2e44[50]](function(_0x976fx1e){console[_0x2e44[49]](_0x976fx1e)})})}});async[_0x2e44[73]](_0x976fx1b,function(_0x976fx1e,_0x976fx23){console[_0x2e44[18]](_0x2e44[70]);if(_0x976fx1e){console[_0x2e44[49]](_0x976fx1e)};if(!_0x976fx23){return ReportFaxRoom[_0x2e44[68]]({leaveAt:moment()[_0x2e44[27]](_0x2e44[56]),unmanaged:true,status:_0x2e44[71]},{where:{leaveAt:null,uniqueid:_0x976fx13[_0x2e44[24]]},individualHooks:true})[_0x2e44[51]](function(){return ReportFaxSession[_0x2e44[68]]({leaveAt:moment()[_0x2e44[27]](_0x2e44[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x976fx13[_0x2e44[24]]},individualHooks:true})})[_0x2e44[51]](function(){return FaxRoom[_0x2e44[72]](_0x976fx13[_0x2e44[22]])})[_0x2e44[51]](function(_0x976fx24){if(_0x976fx24){return _0x976fx24[_0x2e44[68]]({status:_0x2e44[71]})}})[_0x2e44[50]](function(_0x976fx1e){console[_0x2e44[49]](_0x976fx1e)})}})}}function handleMessage(_0x976fxf){var _0x976fx14={agents:[]};var _0x976fx13={messageid:_0x976fxf[_0x2e44[23]],from:_0x976fxf[_0x2e44[58]]||null,joinAt:moment()[_0x2e44[27]](_0x2e44[56])};return _0x976fxf[_0x2e44[77]]({include:[{model:User,attributes:[_0x2e44[23],_0x2e44[29],_0x2e44[43],_0x2e44[44]]}]})[_0x2e44[51]](handleEntityNotFound(_0x2e44[76]))[_0x2e44[51]](handleFaxRoom(_0x976fx13,_0x976fx14))[_0x2e44[51]](handleEntityNotFound(_0x2e44[75]))[_0x2e44[51]](handleFaxAccount(_0x976fx13,_0x976fx14))[_0x2e44[51]](handleApps(_0x976fx13,_0x976fx14))[_0x2e44[50]](function(_0x976fx1e){console[_0x2e44[49]](_0x2e44[74],_0x976fx1e)})}
\ No newline at end of file
+var _0x31c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x52\x6F\x6F\x6D","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65","\x66\x72\x6F\x6D","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x55\x73\x65\x72\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x6F\x72\x64\x65\x72\x42\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x45\x6E\x64\x20\x66\x61\x78\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x66\x69\x6E\x64\x42\x79\x49\x64","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x31c2[0];var _=require(_0x31c2[1]);var moment=require(_0x31c2[2]);var util=require(_0x31c2[3]);var async=require(_0x31c2[4]);var Util=require(_0x31c2[5]);var ReportFax=require(_0x31c2[7])[_0x31c2[6]];var ReportFaxRoom=require(_0x31c2[7])[_0x31c2[8]];var ReportFaxSession=require(_0x31c2[7])[_0x31c2[9]];var FaxMessage=require(_0x31c2[7])[_0x31c2[10]];var FaxQueue=require(_0x31c2[7])[_0x31c2[11]];var FaxRoom=require(_0x31c2[7])[_0x31c2[12]];var Interval=require(_0x31c2[7])[_0x31c2[13]];var User=require(_0x31c2[7])[_0x31c2[14]];var Session=require(_0x31c2[15]);module[_0x31c2[16]]=function(){console[_0x31c2[18]](_0x31c2[17]);FaxMessage[_0x31c2[21]](function(_0xadc2xf){if(_0xadc2xf[_0x31c2[19]]===_0x31c2[20]){handleMessage(_0xadc2xf)}})};function handleEntityNotFound(_0xadc2xf){return function(_0xadc2x11){if(!_0xadc2x11){throw {message:_0xadc2xf}};return _0xadc2x11}}function handleFaxRoom(_0xadc2x13,_0xadc2x14){return function(_0xadc2x15){_0xadc2x13[_0x31c2[22]]=_0xadc2x15[_0x31c2[23]];_0xadc2x13[_0x31c2[24]]=util[_0x31c2[27]](_0x31c2[25],moment()[_0x31c2[26]](),_0xadc2x15[_0x31c2[23]]);_0xadc2x14[_0x31c2[28]]=_[_0x31c2[30]](_0xadc2x15.Users,function(_0xadc2x16){return {id:_0xadc2x16[_0x31c2[23]],name:_0xadc2x16[_0x31c2[29]],penalty:0}});return _0xadc2x15[_0x31c2[31]]()}}function handleFaxAccount(_0xadc2x13,_0xadc2x14){return function(_0xadc2x18){_0xadc2x13[_0x31c2[32]]=_0xadc2x18[_0x31c2[23]];_0xadc2x13[_0x31c2[33]]=_0xadc2x18[_0x31c2[29]];_0xadc2x13[_0x31c2[34]]=_0xadc2x18[_0x31c2[35]];_0xadc2x14[_0x31c2[36]]=_0xadc2x18[_0x31c2[36]];if(_0xadc2x18[_0x31c2[36]]){_0xadc2x14[_0x31c2[37]]=_0xadc2x14[_0x31c2[38]]=_0xadc2x18[_0x31c2[39]];_0xadc2x14[_0x31c2[36]]=_0xadc2x18[_0x31c2[39]];_0xadc2x14[_0x31c2[40]]=_0x31c2[41]};return _0xadc2x18[_0x31c2[45]]({order:_0x31c2[42],include:[{model:FaxQueue,attributes:[_0x31c2[23],_0x31c2[29],_0x31c2[39],_0x31c2[40]],include:[{model:User,attributes:[_0x31c2[23],_0x31c2[29],_0x31c2[43],_0x31c2[44]]}]},{model:User,attributes:[_0x31c2[23],_0x31c2[29],_0x31c2[43],_0x31c2[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xadc2x13,_0xadc2x14){return function(_0xadc2x1a){var _0xadc2x1b=[];if(_0xadc2x14[_0x31c2[36]]){_0xadc2x13[_0x31c2[38]]=_0xadc2x14[_0x31c2[36]];_0xadc2x13[_0x31c2[37]]=_0xadc2x14[_0x31c2[36]];_0xadc2x13[_0x31c2[28]]=_0xadc2x14[_0x31c2[28]];_0xadc2x13[_0x31c2[46]]=_0x31c2[36];_0xadc2x13[_0x31c2[40]]=_0x31c2[41];var _0xadc2x1c=_[_0x31c2[47]](_0xadc2x13);if(_0xadc2x1c[_0x31c2[28]][_0x31c2[48]]){_0xadc2x1b[_0x31c2[59]](function(_0xadc2x1d){return ReportFaxRoom[_0x31c2[57]]({uniqueid:_0xadc2x1c[_0x31c2[24]],accountid:_0xadc2x1c[_0x31c2[32]],accountname:_0xadc2x1c[_0x31c2[33]],accountphone:_0xadc2x1c[_0x31c2[34]],from:_0xadc2x1c[_0x31c2[58]],roomid:_0xadc2x1c[_0x31c2[22]],joinAt:moment()[_0x31c2[27]](_0x31c2[56])})[_0x31c2[51]](function(){return ReportFaxSession[_0x31c2[57]]({uniqueid:_0xadc2x1c[_0x31c2[24]],accountid:_0xadc2x1c[_0x31c2[32]],accountname:_0xadc2x1c[_0x31c2[33]],accountphone:_0xadc2x1c[_0x31c2[34]],application:_0xadc2x1c[_0x31c2[46]],memberid:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[23]]:null,membername:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[29]]:null,queue:_0xadc2x1c[_0x31c2[53]],queuename:_0xadc2x1c[_0x31c2[54]],roomid:_0xadc2x1c[_0x31c2[22]],fidelity:_0xadc2x1c[_0x31c2[46]]===_0x31c2[36]?_0xadc2x1c[_0x31c2[55]]:null,joinAt:moment()[_0x31c2[27]](_0x31c2[56])})})[_0x31c2[51]](function(){ new Session(_0xadc2x1c,_0xadc2x1d)})[_0x31c2[50]](function(_0xadc2x1e){console[_0x31c2[49]](_0xadc2x1e)})})}};_0xadc2x1a[_0x31c2[69]](function(_0xadc2x1f,_0xadc2x20){var _0xadc2x1c=_[_0x31c2[47]](_0xadc2x13);_0xadc2x1c[_0x31c2[37]]=_0xadc2x1f[_0x31c2[39]];_0xadc2x1c[_0x31c2[46]]=_0xadc2x1f[_0x31c2[60]];_0xadc2x1c[_0x31c2[61]]=moment()[_0x31c2[27]](_0x31c2[56]);switch(_0xadc2x1f[_0x31c2[60]]){case _0x31c2[67]:_0xadc2x1c[_0x31c2[53]]=_0xadc2x1f[_0x31c2[11]][_0x31c2[23]];_0xadc2x1c[_0x31c2[54]]=_0xadc2x1f[_0x31c2[11]][_0x31c2[29]];_0xadc2x1c[_0x31c2[40]]=_0xadc2x1f[_0x31c2[11]][_0x31c2[40]];_0xadc2x1c[_0x31c2[38]]=_0xadc2x1f[_0x31c2[11]][_0x31c2[39]];_0xadc2x1f[_0x31c2[11]][_0x31c2[62]]=_[_0x31c2[64]](_0xadc2x1f[_0x31c2[11]].Users,_0x31c2[63]);_0xadc2x1c[_0x31c2[28]]=_[_0x31c2[30]](_0xadc2x1f[_0x31c2[11]].Users,function(_0xadc2x21){return {id:_0xadc2x21[_0x31c2[23]],name:_0xadc2x21[_0x31c2[29]],penalty:_0xadc2x21[_0x31c2[66]][_0x31c2[65]]}});break;case _0x31c2[52]:_0xadc2x1c[_0x31c2[38]]=_0xadc2x1f[_0x31c2[39]];_0xadc2x1c[_0x31c2[40]]=_0x31c2[41];_0xadc2x1c[_0x31c2[28]]=[{id:_0xadc2x1f[_0x31c2[14]][_0x31c2[23]],name:_0xadc2x1f[_0x31c2[14]][_0x31c2[29]],penalty:0}];break;default:};if(_0xadc2x1b[_0x31c2[48]]){_0xadc2x1b[_0x31c2[59]](function(_0xadc2x22,_0xadc2x1d){if(_0xadc2x22){_0xadc2x1d(null,_0xadc2x22)}else {return ReportFaxSession[_0x31c2[68]]({leaveAt:moment()[_0x31c2[27]](_0x31c2[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xadc2x1c[_0x31c2[24]]},individualHooks:true})[_0x31c2[51]](function(){return ReportFaxSession[_0x31c2[57]]({uniqueid:_0xadc2x1c[_0x31c2[24]],accountid:_0xadc2x1c[_0x31c2[32]],accountname:_0xadc2x1c[_0x31c2[33]],accountphone:_0xadc2x1c[_0x31c2[34]],application:_0xadc2x1c[_0x31c2[46]],memberid:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[23]]:null,membername:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[29]]:null,queue:_0xadc2x1c[_0x31c2[53]],queuename:_0xadc2x1c[_0x31c2[54]],roomid:_0xadc2x1c[_0x31c2[22]],fidelity:_0xadc2x1c[_0x31c2[46]]===_0x31c2[36]?_0xadc2x1c[_0x31c2[55]]:null,joinAt:moment()[_0x31c2[27]](_0x31c2[56])})})[_0x31c2[51]](function(){ new Session(_0xadc2x1c,_0xadc2x1d)})[_0x31c2[50]](function(_0xadc2x1e){console[_0x31c2[49]](_0xadc2x1e)})}})}else {_0xadc2x1b[_0x31c2[59]](function(_0xadc2x1d){return ReportFaxRoom[_0x31c2[57]]({uniqueid:_0xadc2x1c[_0x31c2[24]],accountid:_0xadc2x1c[_0x31c2[32]],accountname:_0xadc2x1c[_0x31c2[33]],accountphone:_0xadc2x1c[_0x31c2[34]],from:_0xadc2x1c[_0x31c2[58]],roomid:_0xadc2x1c[_0x31c2[22]],joinAt:moment()[_0x31c2[27]](_0x31c2[56])})[_0x31c2[51]](function(){return ReportFaxSession[_0x31c2[57]]({uniqueid:_0xadc2x1c[_0x31c2[24]],accountid:_0xadc2x1c[_0x31c2[32]],accountname:_0xadc2x1c[_0x31c2[33]],accountphone:_0xadc2x1c[_0x31c2[34]],application:_0xadc2x1c[_0x31c2[46]],memberid:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[23]]:null,membername:(_0xadc2x1c[_0x31c2[46]]===_0x31c2[52]&&_0xadc2x1c[_0x31c2[28]][0])?_0xadc2x1c[_0x31c2[28]][0][_0x31c2[29]]:null,queue:_0xadc2x1c[_0x31c2[53]],queuename:_0xadc2x1c[_0x31c2[54]],roomid:_0xadc2x1c[_0x31c2[22]],fidelity:_0xadc2x1c[_0x31c2[46]]===_0x31c2[36]?_0xadc2x1c[_0x31c2[55]]:null,joinAt:moment()[_0x31c2[27]](_0x31c2[56])})})[_0x31c2[51]](function(){ new Session(_0xadc2x1c,_0xadc2x1d)})[_0x31c2[50]](function(_0xadc2x1e){console[_0x31c2[49]](_0xadc2x1e)})})}});async[_0x31c2[73]](_0xadc2x1b,function(_0xadc2x1e,_0xadc2x23){console[_0x31c2[18]](_0x31c2[70]);if(_0xadc2x1e){console[_0x31c2[49]](_0xadc2x1e)};if(!_0xadc2x23){return ReportFaxRoom[_0x31c2[68]]({leaveAt:moment()[_0x31c2[27]](_0x31c2[56]),unmanaged:true,status:_0x31c2[71]},{where:{leaveAt:null,uniqueid:_0xadc2x13[_0x31c2[24]]},individualHooks:true})[_0x31c2[51]](function(){return ReportFaxSession[_0x31c2[68]]({leaveAt:moment()[_0x31c2[27]](_0x31c2[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xadc2x13[_0x31c2[24]]},individualHooks:true})})[_0x31c2[51]](function(){return FaxRoom[_0x31c2[72]](_0xadc2x13[_0x31c2[22]])})[_0x31c2[51]](function(_0xadc2x24){if(_0xadc2x24){return _0xadc2x24[_0x31c2[68]]({status:_0x31c2[71]})}})[_0x31c2[50]](function(_0xadc2x1e){console[_0x31c2[49]](_0xadc2x1e)})}})}}function handleMessage(_0xadc2xf){var _0xadc2x14={agents:[]};var _0xadc2x13={messageid:_0xadc2xf[_0x31c2[23]],from:_0xadc2xf[_0x31c2[58]]||null,joinAt:moment()[_0x31c2[27]](_0x31c2[56])};return _0xadc2xf[_0x31c2[77]]({include:[{model:User,attributes:[_0x31c2[23],_0x31c2[29],_0x31c2[43],_0x31c2[44]]}]})[_0x31c2[51]](handleEntityNotFound(_0x31c2[76]))[_0x31c2[51]](handleFaxRoom(_0xadc2x13,_0xadc2x14))[_0x31c2[51]](handleEntityNotFound(_0x31c2[75]))[_0x31c2[51]](handleFaxAccount(_0xadc2x13,_0xadc2x14))[_0x31c2[51]](handleApps(_0xadc2x13,_0xadc2x14))[_0x31c2[50]](function(_0xadc2x1e){console[_0x31c2[49]](_0x31c2[74],_0xadc2x1e)})}
\ No newline at end of file