Built motion from commit ab065936.|2.0.51
[motion2.git] / server / services / routing / lib / rule-engine.js
index 55fa39a..71c0632 100644 (file)
@@ -1 +1 @@
-var _0x636c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x69\x74","\x69\x73\x4E\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x69\x67\x6E\x6F\x72\x65\x46\x61\x63\x74\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x75\x6C\x65\x73","\x61\x63\x74\x69\x76\x65\x52\x75\x6C\x65\x73","\x69\x73\x41\x72\x72\x61\x79","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x70\x75\x73\x68","\x73\x79\x6E\x63","\x6F\x6E","\x66\x69\x6C\x74\x65\x72","\x70","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x65\x78\x65\x63\x75\x74\x65","\x72\x65\x73\x75\x6C\x74","\x63\x6C\x6F\x6E\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x72\x75\x6C\x65\x52\x65\x66","\x69\x64","\x6E\x61\x6D\x65","\x69\x6E\x64\x65\x78\x5F","\x63\x61\x6C\x6C","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x6E\x65\x78\x74","\x69\x73\x45\x71\x75\x61\x6C","\x72\x65\x73\x74\x61\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x6E\x6F\x6F\x70","\x66\x69\x6E\x64\x52\x75\x6C\x65\x73","\x6D\x61\x74\x63\x68\x65\x73","\x74\x75\x72\x6E","\x4F\x4E","\x70\x72\x69\x6F\x72\x69\x74\x69\x7A\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x6F\x4A\x53\x4F\x4E","\x6D\x61\x70","\x66\x72\x6F\x6D\x4A\x53\x4F\x4E","\x69\x73\x53\x74\x72\x69\x6E\x67","\x70\x61\x72\x73\x65","\x28","\x29","\x6F\x62\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x636c[0];var _=require(_0x636c[1]);function RuleEngine(_0x3f6cx3,_0x3f6cx4){this[_0x636c[2]]();if(!_[_0x636c[3]](_0x3f6cx3)){this[_0x636c[4]](_0x3f6cx3)};if(_0x3f6cx4){this[_0x636c[5]]= _0x3f6cx4[_0x636c[5]]};return this}RuleEngine[_0x636c[6]][_0x636c[2]]= function(_0x3f6cx3){this[_0x636c[7]]= [];this[_0x636c[8]]= []};RuleEngine[_0x636c[6]][_0x636c[4]]= function(_0x3f6cx3){if(Array[_0x636c[9]](_0x3f6cx3)){this[_0x636c[7]]= this[_0x636c[7]][_0x636c[10]](_0x3f6cx3)}else {if(_0x3f6cx3!== null&& _[_0x636c[11]](_0x3f6cx3)){this[_0x636c[7]][_0x636c[12]](_0x3f6cx3)}};this[_0x636c[13]]()};RuleEngine[_0x636c[6]][_0x636c[13]]= function(){this[_0x636c[8]]= this[_0x636c[7]][_0x636c[15]](function(_0x3f6cx5){if(_[_0x636c[3]](_0x3f6cx5[_0x636c[14]])){_0x3f6cx5[_0x636c[14]]= true};if(_0x3f6cx5[_0x636c[14]]=== true){return _0x3f6cx5}});this[_0x636c[8]]= _[_0x636c[18]](this[_0x636c[8]],[_0x636c[16]],[_0x636c[17]])};RuleEngine[_0x636c[6]][_0x636c[19]]= function(_0x3f6cx6,_0x3f6cx7){var _0x3f6cx8=false;_0x3f6cx6[_0x636c[20]]= true;var _0x3f6cx9=_[_0x636c[21]](_0x3f6cx6);var _0x3f6cxa=_[_0x636c[21]](_0x3f6cx6);var _0x3f6cxb=this[_0x636c[8]];var _0x3f6cxc=[];var _0x3f6cxd=this[_0x636c[5]];(function _0x3f6cxe(_0x3f6cxf){var _0x3f6cx10={"\x72\x75\x6C\x65\x73":function(){return _0x3f6cxb},"\x72\x75\x6C\x65":function(){return _0x3f6cxb[_0x3f6cxf]},"\x77\x68\x65\x6E":function(_0x3f6cx11){if(_0x3f6cx11){var _0x3f6cx12=_0x3f6cxb[_0x3f6cxf][_0x636c[22]];_0x3f6cx12[_0x636c[23]]= _0x3f6cxb[_0x3f6cxf][_0x636c[24]]|| _0x3f6cxb[_0x3f6cxf][_0x636c[25]]|| _0x636c[26]+ _0x3f6cxf;process[_0x636c[28]](function(){_0x3f6cxc[_0x636c[12]](_0x3f6cx12[_0x636c[23]]);_0x3f6cx12[_0x636c[27]](_0x3f6cx9,_0x3f6cx10)})}else {process[_0x636c[28]](function(){_0x3f6cx10[_0x636c[29]]()})}},"\x72\x65\x73\x74\x61\x72\x74":function(){return _0x3f6cxe(0)},"\x73\x74\x6F\x70":function(){_0x3f6cx8= true;return _0x3f6cxe(0)},"\x6E\x65\x78\x74":function(_0x3f6cx13){if(!_0x3f6cxd&&  !_[_0x636c[30]](_0x3f6cxa,_0x3f6cx9)){_0x3f6cxa= _[_0x636c[21]](_0x3f6cx9);process[_0x636c[28]](function(){_0x3f6cx10[_0x636c[31]]()})}else {process[_0x636c[28]](function(){if(_[_0x636c[3]](_0x3f6cx13)){return _0x3f6cxe(_0x3f6cxf+ 1)}else {return _0x3f6cxe(_0x3f6cx13)}})}}};if(_0x3f6cxf< _0x3f6cxb[_0x636c[32]]&& _0x3f6cx8=== false){var _0x3f6cx14=_0x3f6cxb[_0x3f6cxf][_0x636c[33]];_0x3f6cx14[_0x636c[27]](_0x3f6cx9,_0x3f6cx10)}else {process[_0x636c[28]](function(){_0x3f6cx9[_0x636c[34]]= _0x3f6cxc;return _0x3f6cx7?_0x3f6cx7(_0x3f6cx9):_[_0x636c[35]]()})}})(0)};RuleEngine[_0x636c[6]][_0x636c[36]]= function(_0x3f6cx15){if(_[_0x636c[3]](_0x3f6cx15)){return this[_0x636c[7]]}else {var _0x3f6cx16=_[_0x636c[37]](_0x3f6cx15);return _[_0x636c[15]](this[_0x636c[7]],_0x3f6cx16)}};RuleEngine[_0x636c[6]][_0x636c[38]]= function(_0x3f6cx17,_0x3f6cx15){var _0x3f6cx17=(_0x3f6cx17=== _0x636c[14]|| _0x3f6cx17=== _0x636c[39])?true:false;var _0x3f6cx3=this[_0x636c[36]](_0x3f6cx15);for(var _0x3f6cx18=0,_0x3f6cx19=_0x3f6cx3[_0x636c[32]];_0x3f6cx18< _0x3f6cx19;_0x3f6cx18+= 1){_0x3f6cx3[_0x3f6cx18][_0x636c[14]]= _0x3f6cx17};this[_0x636c[13]]()};RuleEngine[_0x636c[6]][_0x636c[40]]= function(_0x3f6cx1a,_0x3f6cx15){_0x3f6cx1a= parseInt(_0x3f6cx1a,10);var _0x3f6cx3=this[_0x636c[36]](_0x3f6cx15);for(var _0x3f6cx18=0,_0x3f6cx19=_0x3f6cx3[_0x636c[32]];_0x3f6cx18< _0x3f6cx19;_0x3f6cx18+= 1){_0x3f6cx3[_0x3f6cx18][_0x636c[41]]= _0x3f6cx1a};this[_0x636c[13]]()};RuleEngine[_0x636c[6]][_0x636c[42]]= function(){var _0x3f6cx3=this[_0x636c[7]];if(_0x3f6cx3 instanceof  Array){_0x3f6cx3= _0x3f6cx3[_0x636c[43]](function(_0x3f6cx1b){_0x3f6cx1b[_0x636c[33]]= _0x3f6cx1b[_0x636c[33]].toString();_0x3f6cx1b[_0x636c[22]]= _0x3f6cx1b[_0x636c[22]].toString();return _0x3f6cx1b})}else {if(!_[_0x636c[3]](_0x3f6cx3)){_0x3f6cx3[_0x636c[33]]= _0x3f6cx3[_0x636c[33]].toString();_0x3f6cx3[_0x636c[22]]= _0x3f6cx3[_0x636c[22]].toString()}};return _0x3f6cx3};RuleEngine[_0x636c[6]][_0x636c[44]]= function(_0x3f6cx3){this[_0x636c[2]]();if(_[_0x636c[45]](_0x3f6cx3)){_0x3f6cx3= JSON[_0x636c[46]](_0x3f6cx3)};if(_0x3f6cx3 instanceof  Array){_0x3f6cx3= _0x3f6cx3[_0x636c[43]](function(_0x3f6cx1b){_0x3f6cx1b[_0x636c[33]]= eval(_0x636c[47]+ _0x3f6cx1b[_0x636c[33]]+ _0x636c[48]);_0x3f6cx1b[_0x636c[22]]= eval(_0x636c[47]+ _0x3f6cx1b[_0x636c[22]]+ _0x636c[48]);return _0x3f6cx1b})}else {if(_0x3f6cx3!== null&&  typeof (_0x3f6cx3)== _0x636c[49]){_0x3f6cx3[_0x636c[33]]= eval(_0x636c[47]+ _0x3f6cx3[_0x636c[33]]+ _0x636c[48]);_0x3f6cx3[_0x636c[22]]= eval(_0x636c[47]+ _0x3f6cx3[_0x636c[22]]+ _0x636c[48])}};this[_0x636c[4]](_0x3f6cx3)};module[_0x636c[50]]= RuleEngine
\ No newline at end of file
+var _0xeb26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x69\x74","\x69\x73\x4E\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x69\x67\x6E\x6F\x72\x65\x46\x61\x63\x74\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x75\x6C\x65\x73","\x61\x63\x74\x69\x76\x65\x52\x75\x6C\x65\x73","\x69\x73\x41\x72\x72\x61\x79","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x70\x75\x73\x68","\x73\x79\x6E\x63","\x6F\x6E","\x66\x69\x6C\x74\x65\x72","\x70","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x65\x78\x65\x63\x75\x74\x65","\x72\x65\x73\x75\x6C\x74","\x63\x6C\x6F\x6E\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x72\x75\x6C\x65\x52\x65\x66","\x69\x64","\x6E\x61\x6D\x65","\x69\x6E\x64\x65\x78\x5F","\x63\x61\x6C\x6C","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x6E\x65\x78\x74","\x69\x73\x45\x71\x75\x61\x6C","\x72\x65\x73\x74\x61\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x6E\x6F\x6F\x70","\x66\x69\x6E\x64\x52\x75\x6C\x65\x73","\x6D\x61\x74\x63\x68\x65\x73","\x74\x75\x72\x6E","\x4F\x4E","\x70\x72\x69\x6F\x72\x69\x74\x69\x7A\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x6F\x4A\x53\x4F\x4E","\x6D\x61\x70","\x66\x72\x6F\x6D\x4A\x53\x4F\x4E","\x69\x73\x53\x74\x72\x69\x6E\x67","\x70\x61\x72\x73\x65","\x28","\x29","\x6F\x62\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xeb26[0];var _=require(_0xeb26[1]);function RuleEngine(_0x13b5x3,_0x13b5x4){this[_0xeb26[2]]();if(!_[_0xeb26[3]](_0x13b5x3)){this[_0xeb26[4]](_0x13b5x3)};if(_0x13b5x4){this[_0xeb26[5]]= _0x13b5x4[_0xeb26[5]]};return this}RuleEngine[_0xeb26[6]][_0xeb26[2]]= function(_0x13b5x3){this[_0xeb26[7]]= [];this[_0xeb26[8]]= []};RuleEngine[_0xeb26[6]][_0xeb26[4]]= function(_0x13b5x3){if(Array[_0xeb26[9]](_0x13b5x3)){this[_0xeb26[7]]= this[_0xeb26[7]][_0xeb26[10]](_0x13b5x3)}else {if(_0x13b5x3!== null&& _[_0xeb26[11]](_0x13b5x3)){this[_0xeb26[7]][_0xeb26[12]](_0x13b5x3)}};this[_0xeb26[13]]()};RuleEngine[_0xeb26[6]][_0xeb26[13]]= function(){this[_0xeb26[8]]= this[_0xeb26[7]][_0xeb26[15]](function(_0x13b5x5){if(_[_0xeb26[3]](_0x13b5x5[_0xeb26[14]])){_0x13b5x5[_0xeb26[14]]= true};if(_0x13b5x5[_0xeb26[14]]=== true){return _0x13b5x5}});this[_0xeb26[8]]= _[_0xeb26[18]](this[_0xeb26[8]],[_0xeb26[16]],[_0xeb26[17]])};RuleEngine[_0xeb26[6]][_0xeb26[19]]= function(_0x13b5x6,_0x13b5x7){var _0x13b5x8=false;_0x13b5x6[_0xeb26[20]]= true;var _0x13b5x9=_[_0xeb26[21]](_0x13b5x6);var _0x13b5xa=_[_0xeb26[21]](_0x13b5x6);var _0x13b5xb=this[_0xeb26[8]];var _0x13b5xc=[];var _0x13b5xd=this[_0xeb26[5]];(function _0x13b5xe(_0x13b5xf){var _0x13b5x10={"\x72\x75\x6C\x65\x73":function(){return _0x13b5xb},"\x72\x75\x6C\x65":function(){return _0x13b5xb[_0x13b5xf]},"\x77\x68\x65\x6E":function(_0x13b5x11){if(_0x13b5x11){var _0x13b5x12=_0x13b5xb[_0x13b5xf][_0xeb26[22]];_0x13b5x12[_0xeb26[23]]= _0x13b5xb[_0x13b5xf][_0xeb26[24]]|| _0x13b5xb[_0x13b5xf][_0xeb26[25]]|| _0xeb26[26]+ _0x13b5xf;process[_0xeb26[28]](function(){_0x13b5xc[_0xeb26[12]](_0x13b5x12[_0xeb26[23]]);_0x13b5x12[_0xeb26[27]](_0x13b5x9,_0x13b5x10)})}else {process[_0xeb26[28]](function(){_0x13b5x10[_0xeb26[29]]()})}},"\x72\x65\x73\x74\x61\x72\x74":function(){return _0x13b5xe(0)},"\x73\x74\x6F\x70":function(){_0x13b5x8= true;return _0x13b5xe(0)},"\x6E\x65\x78\x74":function(_0x13b5x13){if(!_0x13b5xd&&  !_[_0xeb26[30]](_0x13b5xa,_0x13b5x9)){_0x13b5xa= _[_0xeb26[21]](_0x13b5x9);process[_0xeb26[28]](function(){_0x13b5x10[_0xeb26[31]]()})}else {process[_0xeb26[28]](function(){if(_[_0xeb26[3]](_0x13b5x13)){return _0x13b5xe(_0x13b5xf+ 1)}else {return _0x13b5xe(_0x13b5x13)}})}}};if(_0x13b5xf< _0x13b5xb[_0xeb26[32]]&& _0x13b5x8=== false){var _0x13b5x14=_0x13b5xb[_0x13b5xf][_0xeb26[33]];_0x13b5x14[_0xeb26[27]](_0x13b5x9,_0x13b5x10)}else {process[_0xeb26[28]](function(){_0x13b5x9[_0xeb26[34]]= _0x13b5xc;return _0x13b5x7?_0x13b5x7(_0x13b5x9):_[_0xeb26[35]]()})}})(0)};RuleEngine[_0xeb26[6]][_0xeb26[36]]= function(_0x13b5x15){if(_[_0xeb26[3]](_0x13b5x15)){return this[_0xeb26[7]]}else {var _0x13b5x16=_[_0xeb26[37]](_0x13b5x15);return _[_0xeb26[15]](this[_0xeb26[7]],_0x13b5x16)}};RuleEngine[_0xeb26[6]][_0xeb26[38]]= function(_0x13b5x17,_0x13b5x15){var _0x13b5x17=(_0x13b5x17=== _0xeb26[14]|| _0x13b5x17=== _0xeb26[39])?true:false;var _0x13b5x3=this[_0xeb26[36]](_0x13b5x15);for(var _0x13b5x18=0,_0x13b5x19=_0x13b5x3[_0xeb26[32]];_0x13b5x18< _0x13b5x19;_0x13b5x18+= 1){_0x13b5x3[_0x13b5x18][_0xeb26[14]]= _0x13b5x17};this[_0xeb26[13]]()};RuleEngine[_0xeb26[6]][_0xeb26[40]]= function(_0x13b5x1a,_0x13b5x15){_0x13b5x1a= parseInt(_0x13b5x1a,10);var _0x13b5x3=this[_0xeb26[36]](_0x13b5x15);for(var _0x13b5x18=0,_0x13b5x19=_0x13b5x3[_0xeb26[32]];_0x13b5x18< _0x13b5x19;_0x13b5x18+= 1){_0x13b5x3[_0x13b5x18][_0xeb26[41]]= _0x13b5x1a};this[_0xeb26[13]]()};RuleEngine[_0xeb26[6]][_0xeb26[42]]= function(){var _0x13b5x3=this[_0xeb26[7]];if(_0x13b5x3 instanceof  Array){_0x13b5x3= _0x13b5x3[_0xeb26[43]](function(_0x13b5x1b){_0x13b5x1b[_0xeb26[33]]= _0x13b5x1b[_0xeb26[33]].toString();_0x13b5x1b[_0xeb26[22]]= _0x13b5x1b[_0xeb26[22]].toString();return _0x13b5x1b})}else {if(!_[_0xeb26[3]](_0x13b5x3)){_0x13b5x3[_0xeb26[33]]= _0x13b5x3[_0xeb26[33]].toString();_0x13b5x3[_0xeb26[22]]= _0x13b5x3[_0xeb26[22]].toString()}};return _0x13b5x3};RuleEngine[_0xeb26[6]][_0xeb26[44]]= function(_0x13b5x3){this[_0xeb26[2]]();if(_[_0xeb26[45]](_0x13b5x3)){_0x13b5x3= JSON[_0xeb26[46]](_0x13b5x3)};if(_0x13b5x3 instanceof  Array){_0x13b5x3= _0x13b5x3[_0xeb26[43]](function(_0x13b5x1b){_0x13b5x1b[_0xeb26[33]]= eval(_0xeb26[47]+ _0x13b5x1b[_0xeb26[33]]+ _0xeb26[48]);_0x13b5x1b[_0xeb26[22]]= eval(_0xeb26[47]+ _0x13b5x1b[_0xeb26[22]]+ _0xeb26[48]);return _0x13b5x1b})}else {if(_0x13b5x3!== null&&  typeof (_0x13b5x3)== _0xeb26[49]){_0x13b5x3[_0xeb26[33]]= eval(_0xeb26[47]+ _0x13b5x3[_0xeb26[33]]+ _0xeb26[48]);_0x13b5x3[_0xeb26[22]]= eval(_0xeb26[47]+ _0x13b5x3[_0xeb26[22]]+ _0xeb26[48])}};this[_0xeb26[4]](_0x13b5x3)};module[_0xeb26[50]]= RuleEngine
\ No newline at end of file