3b0b4524b6e869db5b4492bf7bb7ef7e190c13ac
[motion.git] / server / config / agi / lib / channel.js
1 var _0xc27e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x79\x6E\x63\x68\x6F","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x72\x65\x70\x6C\x79","\x63\x61\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74","\x63\x6D\x64\x49\x64","\x61\x67\x69\x73\x71\x75\x61\x72\x65","\x65\x72\x72\x6F\x72","\x65\x6D\x69\x74","\x64\x6F\x6E\x65","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x69\x6E\x68\x65\x72\x69\x74\x73","\x68\x61\x6E\x64\x6C\x65\x52\x65\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x68\x61\x6E\x67\x75\x70","\x2D\x31","\x5F\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x73\x79\x6E\x63","\x61\x6E\x73\x77\x65\x72","\x41\x4E\x53\x57\x45\x52","\x67\x65\x74\x44\x61\x74\x61","\x62\x65\x65\x70","\x35","\x31","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6E\x6F\x6F\x70","\x4E\x4F\x20\x4D\x45\x53\x53\x41\x47\x45","\x56\x45\x52\x42\x4F\x53\x45\x20\x22\x25\x73\x22","\x65\x78\x65\x63","\x69\x73\x41\x72\x72\x61\x79","\x45\x58\x45\x43\x20\x25\x73\x20\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x73\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x53\x45\x54\x20\x43\x4F\x4E\x54\x45\x58\x54\x20\x25\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x45\x54\x20\x45\x58\x54\x45\x4E\x53\x49\x4F\x4E\x20\x25\x73","\x73\x65\x74\x50\x72\x69\x6F\x72\x69\x74\x79","\x53\x45\x54\x20\x50\x52\x49\x4F\x52\x49\x54\x59\x20\x25\x73","\x48\x41\x4E\x47\x55\x50","\x73\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x22\x25\x73\x22","\x73\x61\x79\x4E\x75\x6D\x62\x65\x72","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x44\x69\x67\x69\x74\x73","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x50\x68\x6F\x6E\x65\x74\x69\x63","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x25\x73\x20\x25\x73","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x47\x4F\x54\x4F\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x47\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x22\x25\x73\x22","\x72\x65\x63\x6F\x72\x64\x46\x69\x6C\x65","\x77\x61\x76","","\x73\x3D","\x42\x45\x45\x50","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x73\x74\x72\x65\x61\x6D\x46\x69\x6C\x65","\x53\x54\x52\x45\x41\x4D\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22","\x61\x67\x69","\x41\x47\x49","\x49\x44\x3A\x25\x73\x20\x2D\x20\x4C\x41\x42\x45\x4C\x3A\x20\x25\x73\x20\x2D\x20\x4D\x53\x47\x3A\x20\x25\x73","\x69\x64","\x6C\x61\x62\x65\x6C","\x77\x61\x69\x74","\x57\x41\x49\x54","\x65\x78\x70\x6F\x72\x74\x73"];_0xc27e[0];var syncho=require(_0xc27e[1]);var util=require(_0xc27e[2]);var _=require(_0xc27e[3]);var EventEmitter=require(_0xc27e[5])[_0xc27e[4]];var AGIReply=require(_0xc27e[6]);var AGIChannel=function(_0x917fx7,_0x917fx8){EventEmitter[_0xc27e[7]](this);this[_0xc27e[8]]= _0x917fx7;this[_0xc27e[9]]= 0;this[_0xc27e[10]]= _0x917fx8;var _0x917fx9=this;process[_0xc27e[14]](function(){syncho(function(){try{_0x917fx9[_0xc27e[10]](_0x917fx9)}catch(e){_0x917fx9[_0xc27e[12]](_0xc27e[11],e.toString())};_0x917fx9[_0xc27e[12]](_0xc27e[13])})})};util[_0xc27e[15]](AGIChannel,EventEmitter);AGIChannel[_0xc27e[17]][_0xc27e[16]]= function(_0x917fxa){if(this[_0xc27e[18]]){if(_0x917fxa=== _0xc27e[19]){this[_0xc27e[18]](null,{code:200,result:_0xc27e[20]})}else {this[_0xc27e[18]](null, new AGIReply(_0x917fxa))}}};AGIChannel[_0xc27e[17]][_0xc27e[21]]= function(_0x917fx7,_0x917fxb){this[_0xc27e[18]]= _0x917fxb;this[_0xc27e[9]]= this[_0xc27e[9]]+ 1;this[_0xc27e[12]](_0xc27e[8],_0x917fx7,this[_0xc27e[9]])};AGIChannel[_0xc27e[17]][_0xc27e[22]]= function(_0x917fx7){return this[_0xc27e[21]][_0xc27e[23]](this,_0x917fx7)};AGIChannel[_0xc27e[17]][_0xc27e[24]]= function(){return this[_0xc27e[22]](_0xc27e[25])};AGIChannel[_0xc27e[17]][_0xc27e[26]]= function(_0x917fxc,_0x917fxd,_0x917fxe){_0x917fxc= (_0x917fxc=== undefined)?_0xc27e[27]:_0x917fxc;_0x917fxd= (_0x917fxd=== undefined)?_0xc27e[28]:_0x917fxd;_0x917fxe= (_0x917fxe=== undefined)?_0xc27e[29]:_0x917fxe;return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[30],_0x917fxc,_0x917fxd* 1000,_0x917fxe))};AGIChannel[_0xc27e[17]][_0xc27e[32]]= function(_0x917fxf){_0x917fxf= _0x917fxf|| _0xc27e[33];return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[34],_0x917fxf))};AGIChannel[_0xc27e[17]][_0xc27e[35]]= function(_0x917fx10,_0x917fx11){if(_[_0xc27e[36]](_0x917fx11)){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[37],_0x917fx10,_0x917fx11[_0xc27e[39]](_0xc27e[38])))};return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[37],_0x917fx10,_0x917fx11))};AGIChannel[_0xc27e[17]][_0xc27e[40]]= function(_0x917fx12){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[41],_0x917fx12))};AGIChannel[_0xc27e[17]][_0xc27e[42]]= function(_0x917fx13){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[43],_0x917fx13))};AGIChannel[_0xc27e[17]][_0xc27e[44]]= function(_0x917fx14){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[45],_0x917fx14))};AGIChannel[_0xc27e[17]][_0xc27e[19]]= function(){return this[_0xc27e[22]](_0xc27e[46])};AGIChannel[_0xc27e[17]][_0xc27e[47]]= function(_0x917fx15,_0x917fx16){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[48],_0x917fx15,_0x917fx16))};AGIChannel[_0xc27e[17]][_0xc27e[49]]= function(_0x917fx17,_0x917fx18){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[50],_0x917fx17,_0x917fx18))};AGIChannel[_0xc27e[17]][_0xc27e[51]]= function(_0x917fx19,_0x917fx18){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[52],_0x917fx19,_0x917fx18))};AGIChannel[_0xc27e[17]][_0xc27e[53]]= function(_0x917fx1a,_0x917fx18){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[54],_0x917fx1a,_0x917fx18))};AGIChannel[_0xc27e[17]][_0xc27e[55]]= function(_0x917fx12,_0x917fx13,_0x917fx14){_0x917fx13= _0x917fx13|| this[_0xc27e[8]][_0xc27e[56]];_0x917fx14= _0x917fx14|| 1;this[_0xc27e[40]](_0x917fx12);this[_0xc27e[42]](_0x917fx13);this[_0xc27e[44]](_0x917fx14);return this[_0xc27e[32]](util[_0xc27e[31]](_0xc27e[57],_0x917fx12,_0x917fx13,_0x917fx14))};AGIChannel[_0xc27e[17]][_0xc27e[58]]= function(_0x917fx15){return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[59],_0x917fx15))};AGIChannel[_0xc27e[17]][_0xc27e[60]]= function(_0x917fxc,_0x917fx1b,_0x917fx18,_0x917fxd,_0x917fx1c,_0x917fx1d){_0x917fx1b= _0x917fx1b|| _0xc27e[61];_0x917fx18= _0x917fx18|| _0xc27e[62];_0x917fxd= (_0x917fxd=== undefined)?-1:((_0x917fxd=== _0xc27e[20])?-1:_0x917fxd* 1000);_0x917fx1c= (_0x917fx1c=== undefined)?_0xc27e[62]:_0xc27e[63]+ _0x917fx1c;_0x917fx1d= (_0x917fx1d)?_0xc27e[64]:_0xc27e[62];return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[65],_0x917fxc,_0x917fx1b,_0x917fx18,_0x917fxd,_0x917fx1d,_0x917fx1c))};AGIChannel[_0xc27e[17]][_0xc27e[66]]= function(_0x917fxc,_0x917fx18){_0x917fx18= _0x917fx18|| _0xc27e[62];return this[_0xc27e[22]](util[_0xc27e[31]](_0xc27e[67],_0x917fxc,_0x917fx18))};AGIChannel[_0xc27e[17]][_0xc27e[68]]= function(_0x917fx11){return this[_0xc27e[35]](_0xc27e[69],_0x917fx11)};AGIChannel[_0xc27e[17]][_0xc27e[11]]= function(_0x917fx1e,_0x917fx1f){this[_0xc27e[32]](util[_0xc27e[31]](_0xc27e[70],_0x917fx1e[_0xc27e[71]],_0x917fx1e[_0xc27e[72]],_0x917fx1f));return {code:500,result:_0xc27e[20],extra:_0xc27e[62]}};AGIChannel[_0xc27e[17]][_0xc27e[73]]= function(_0x917fx20){return this[_0xc27e[35]](_0xc27e[74],_0x917fx20)};module[_0xc27e[75]]= AGIChannel