Built motion from commit b8fca89.|0.0.57
[motion.git] / server / config / triggers / index.js
1 var _0xa11e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C","\x2E\x2F\x76\x6F\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6D","\x2E\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x66\x69\x6C\x74\x65\x72","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6D\x61\x69\x6C","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x74\x69\x6F\x6E\x20\x22","\x61\x63\x74\x69\x6F\x6E","\x22","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x73\x65\x6E\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74"];_0xa11e[0];var _=require(_0xa11e[1]);var Util=require(_0xa11e[2]);var Voice=require(_0xa11e[3]);var Mail=require(_0xa11e[4]);var Chat=require(_0xa11e[5]);var Cm=require(_0xa11e[6]);var Integration=require(_0xa11e[7]);var Trigger=require(_0xa11e[9])[_0xa11e[8]];var ReportAgent=require(_0xa11e[9])[_0xa11e[10]];var MailMessage=require(_0xa11e[9])[_0xa11e[11]];module[_0xa11e[12]]=function(_0x9dc5xb){var _0x9dc5xc= new Util();var _0x9dc5xd= new Voice();var _0x9dc5xe= new Chat();var _0x9dc5xf= new Mail();var _0x9dc5x10= new Cm();var _0x9dc5x11= new Integration(_0x9dc5xb);Trigger[_0xa11e[31]](_0xa11e[30])[_0xa11e[29]]()[_0xa11e[28]](function(_0x9dc5x13){synchTriggers(_0x9dc5x13);console[_0xa11e[17]](_0xa11e[15],_0x9dc5x13[_0xa11e[16]]);ReportAgent[_0xa11e[22]](function(_0x9dc5x14){var _0x9dc5x15=_0x9dc5xc[_0xa11e[20]](_0x9dc5x14,_[_0xa11e[19]](_0x9dc5x13,{channel:_0xa11e[18]}));console[_0xa11e[17]](_0xa11e[21],_0x9dc5x15[_0xa11e[16]]);execActions(_0x9dc5x15,_0x9dc5x14,_0xa11e[18],_0x9dc5xc,_0x9dc5xd,_0x9dc5xf,_0x9dc5x10,_0x9dc5x11)});ReportAgent[_0xa11e[24]](function(_0x9dc5x14){var _0x9dc5x15=_0x9dc5xc[_0xa11e[20]](_0x9dc5x14,_[_0xa11e[19]](_0x9dc5x13,{channel:_0xa11e[18]}));console[_0xa11e[17]](_0xa11e[23],_0x9dc5x15[_0xa11e[16]]);execActions(_0x9dc5x15,_0x9dc5x14,_0xa11e[18],_0x9dc5xc,_0x9dc5xd,_0x9dc5xf,_0x9dc5x10,_0x9dc5x11)});MailMessage[_0xa11e[22]](function(_0x9dc5x14){if(_0x9dc5x14[_0xa11e[25]]===_0xa11e[26]){var _0x9dc5x15=_0x9dc5xc[_0xa11e[20]](_0x9dc5x14,_[_0xa11e[19]](_0x9dc5x13,{channel:_0xa11e[27]}));execActions(_0x9dc5x15,_0x9dc5x14,_0xa11e[27],_0x9dc5xc,_0x9dc5xd,_0x9dc5xf,_0x9dc5x10,_0x9dc5x11)}})})[_0xa11e[14]](function(_0x9dc5x12){console[_0xa11e[13]](_0x9dc5x12)})};function execActions(_0x9dc5x15,_0x9dc5x14,_0x9dc5x17,_0x9dc5xc,_0x9dc5xd,_0x9dc5xf,_0x9dc5x10,_0x9dc5x11){_0x9dc5x15[_0xa11e[42]](function(_0x9dc5x18){console[_0xa11e[17]](_0xa11e[32]+_0x9dc5x18[_0xa11e[33]]+_0xa11e[34]);switch(_0x9dc5x18[_0xa11e[33]]){case _0xa11e[37]:_0x9dc5x10[_0xa11e[36]](_0x9dc5x14[_0xa11e[35]],_0x9dc5x17);break;case _0xa11e[39]:_0x9dc5xf[_0xa11e[38]](_0x9dc5x18);break;case _0xa11e[41]:_0x9dc5x11[_0xa11e[40]](_0x9dc5x18,_0x9dc5x14,_0x9dc5x17);break;default:}})}function synchTriggers(_0x9dc5x13){Trigger[_0xa11e[22]](function(_0x9dc5x14){updateCollection(_0x9dc5x13,_0x9dc5x14);console[_0xa11e[17]](_0xa11e[43],_0x9dc5x13[_0xa11e[16]])});Trigger[_0xa11e[24]](function(_0x9dc5x14){updateCollection(_0x9dc5x13,_0x9dc5x14);console[_0xa11e[17]](_0xa11e[44],_0x9dc5x13[_0xa11e[16]])});Trigger[_0xa11e[48]](function(_0x9dc5x14){_[_0xa11e[46]](_0x9dc5x13,{id:_0x9dc5x14[_0xa11e[45]]});console[_0xa11e[17]](_0xa11e[47],_0x9dc5x13[_0xa11e[16]])})}function updateCollection(_0x9dc5x1b,_0x9dc5x14){var _0x9dc5x1c=_[_0xa11e[49]](_0x9dc5x1b,{id:_0x9dc5x14[_0xa11e[45]]});var _0x9dc5x1d=_0x9dc5x1b[_0xa11e[50]](_0x9dc5x1c);if(_0x9dc5x1c){_[_0xa11e[51]](_0x9dc5x1b[_0x9dc5x1d],_0x9dc5x14)}else {_0x9dc5x1b[_0xa11e[52]](_0x9dc5x14)}}