Built motion from commit d127c62.|0.0.151
[motion.git] / server / config / license / license.service.js
index 1a027b1..bcd5407 100644 (file)
@@ -1 +1 @@
-var _0x9654=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67","\x4C\x69\x63\x65\x6E\x73\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x63\x68\x61\x74","\x6D\x65\x73\x73\x61\x67\x69\x6E\x67","\x63\x6D","\x75\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x6A\x73\x63\x72\x69\x70\x74\x79","\x63\x75\x73\x74\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x68\x61\x73\x53\x6D\x73","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x68\x61\x73\x43\x6D","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x9654[0];var compose=require(_0x9654[1]);var moment=require(_0x9654[2]);var crypto=require(_0x9654[3]);var util=require(_0x9654[4]);var os=require(_0x9654[5]);var exec=require(_0x9654[7])[_0x9654[6]];var config=require(_0x9654[8]);var User=require(_0x9654[10])[_0x9654[9]];var Telephone=require(_0x9654[10])[_0x9654[11]];var Setting=require(_0x9654[10])[_0x9654[12]];var License=require(_0x9654[10])[_0x9654[13]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,jscripty:false,messaging:false,openchannel:false,custom:false,cm:false,dialer:false,update:false,description:_0x9654[14]};function getUuid(){switch(os[_0x9654[22]]()){case _0x9654[20]:return exec(_0x9654[18],{encoding:_0x9654[19]})[_0x9654[17]](_0x9654[15],_0x9654[16]);default:return require(_0x9654[21])(true)}}function checkLicense(_0x7276xf){return compose()[_0x9654[32]](function(_0x7276x10,_0x7276x11,_0x7276x12){return License[_0x9654[31]]({where:{id:1}})[_0x9654[30]](function(_0x7276x14){var _0x7276x15=null;var _0x7276x16=false;try{if(_0x7276x14[_0x9654[24]]){_0x7276x15= decrypt(_0x7276x14[_0x9654[24]],_0x7276x14[_0x9654[25]]);_0x7276x15= JSON[_0x9654[26]](_0x7276x15)}else {_0x7276x15= demoLicense}}catch(err){console[_0x9654[28]](_0x9654[27],err);_0x7276x15= demoLicense};_0x7276x16= _0x7276x15[_0x7276xf];if(!_0x7276x16){return _0x7276x11[_0x9654[29]](403)};return _0x7276x12()})[_0x9654[23]](function(_0x7276x13){return _0x7276x12(_0x7276x13)})})}function hasChat(){return checkLicense(_0x9654[33])}function hasSms(){return checkLicense(_0x9654[34])}function hasCm(){return checkLicense(_0x9654[35])}function hasUpdate(){return checkLicense(_0x9654[36])}function hasMail(){return checkLicense(_0x9654[37])}function hasFax(){return checkLicense(_0x9654[38])}function hasJscripty(){return checkLicense(_0x9654[39])}function hasCustom(){return checkLicense(_0x9654[40])}function hasOpenchannel(){return checkLicense(_0x9654[41])}function isValidDate(){return compose()[_0x9654[32]](function(_0x7276x10,_0x7276x11,_0x7276x12){return License[_0x9654[31]]({where:{id:1}})[_0x9654[30]](function(_0x7276x14){var _0x7276x15=null,_0x7276x21=false;try{if(_0x7276x14[_0x9654[24]]){_0x7276x15= decrypt(_0x7276x14[_0x9654[24]],_0x7276x14[_0x9654[25]]);_0x7276x15= JSON[_0x9654[26]](_0x7276x15);if(moment()[_0x9654[43]](_0x7276x15[_0x9654[42]])){_0x7276x21= true}}}catch(err){console[_0x9654[28]](_0x9654[27],err)};if(!_0x7276x21){return _0x7276x11[_0x9654[29]](403)};return _0x7276x12()})[_0x9654[23]](function(_0x7276x13){return _0x7276x12(_0x7276x13)})})}function isUsersLimit(){return compose()[_0x9654[32]](function(_0x7276x10,_0x7276x11,_0x7276x12){var _0x7276x14;return License[_0x9654[31]]({where:{id:1}})[_0x9654[30]](function(_0x7276x25){_0x7276x14= _0x7276x25;return User[_0x9654[51]]({where:{$or:[{role:_0x9654[49]},{role:_0x9654[50]}]}})})[_0x9654[48]](function(_0x7276x23){var _0x7276x15=null,_0x7276x24=false;try{if(_0x7276x14[_0x9654[24]]){_0x7276x15= decrypt(_0x7276x14[_0x9654[24]],_0x7276x14[_0x9654[25]]);_0x7276x15= JSON[_0x9654[26]](_0x7276x15)}else {_0x7276x15= demoLicense}}catch(err){console[_0x9654[28]](_0x9654[27],err);_0x7276x15= demoLicense};if(_0x7276x15[_0x9654[44]]> _0x7276x23){_0x7276x24= true};if(!_0x7276x24){return _0x7276x11[_0x9654[47]](403)[_0x9654[46]]({message:_0x9654[45]})};return _0x7276x12()})[_0x9654[23]](function(_0x7276x13){return _0x7276x12(_0x7276x13)})})}function isTelephonesLimit(){return compose()[_0x9654[32]](function(_0x7276x10,_0x7276x11,_0x7276x12){var _0x7276x14;return License[_0x9654[31]]({where:{id:1}})[_0x9654[30]](function(_0x7276x25){_0x7276x14= _0x7276x25;return User[_0x9654[51]]({where:{role:_0x9654[54]}})})[_0x9654[48]](function(_0x7276x27){var _0x7276x15=null,_0x7276x24=false;try{if(_0x7276x14[_0x9654[24]]){_0x7276x15= decrypt(_0x7276x14[_0x9654[24]],_0x7276x14[_0x9654[25]]);_0x7276x15= JSON[_0x9654[26]](_0x7276x15)}else {_0x7276x15= demoLicense}}catch(err){console[_0x9654[28]](_0x9654[27],err);_0x7276x15= demoLicense};if(_0x7276x15[_0x9654[52]]> _0x7276x27){_0x7276x24= true};if(!_0x7276x24){return _0x7276x11[_0x9654[47]](403)[_0x9654[46]]({message:_0x9654[53]})};return _0x7276x12()})[_0x9654[23]](function(_0x7276x13){return _0x7276x12(_0x7276x13)})})}function isValidAgent(){return function(_0x7276x29){var _0x7276x14;var _0x7276x2a=false;if(_0x7276x29[_0x9654[55]]=== _0x9654[49]|| _0x7276x29[_0x9654[55]]=== _0x9654[50]|| (_0x7276x29[_0x9654[55]]=== _0x9654[56]&& _0x7276x29[_0x9654[57]])){_0x7276x2a= true};return License[_0x9654[31]]({where:{id:1}})[_0x9654[30]](function(_0x7276x25){_0x7276x14= _0x7276x25;return User[_0x9654[51]]({where:{role:_0x9654[56],online:true}})})[_0x9654[48]](function(_0x7276x2b){var _0x7276x15=null;try{if(_0x7276x14[_0x9654[24]]){_0x7276x15= decrypt(_0x7276x14[_0x9654[24]],_0x7276x14[_0x9654[25]]);_0x7276x15= JSON[_0x9654[26]](_0x7276x15)}else {_0x7276x15= demoLicense}}catch(err){console[_0x9654[28]](_0x9654[27],err);_0x7276x15= demoLicense};if(_0x7276x15[_0x9654[58]]> _0x7276x2b){_0x7276x2a= true};return _0x7276x2a})}}function decrypt(_0x7276x2d,_0x7276x2e){var _0x7276x2f=_0x7276x2e[_0x9654[60]](_0x9654[59])[4];var _0x7276x30=_0x7276x2e[_0x9654[60]](_0x9654[59])[0];var _0x7276x31=crypto[_0x9654[64]](_0x9654[61],util[_0x9654[63]](_0x9654[62],_0x7276x2f,_0x7276x2e,_0x7276x30));var _0x7276x14=_0x7276x31[_0x9654[36]](_0x7276x2d,_0x9654[65],_0x9654[19]);_0x7276x14+= _0x7276x31[_0x9654[66]](_0x9654[19]);return _0x7276x14}exports[_0x9654[67]]= getUuid;exports[_0x9654[68]]= isValidDate;exports[_0x9654[69]]= isUsersLimit;exports[_0x9654[70]]= isTelephonesLimit;exports[_0x9654[71]]= hasChat;exports[_0x9654[72]]= hasMail;exports[_0x9654[73]]= hasFax;exports[_0x9654[74]]= hasOpenchannel;exports[_0x9654[75]]= hasSms;exports[_0x9654[76]]= hasJscripty;exports[_0x9654[77]]= hasCm;exports[_0x9654[78]]= hasUpdate;exports[_0x9654[79]]= isValidAgent;exports[_0x9654[80]]= demoLicense;exports[_0x9654[81]]= decrypt
\ No newline at end of file
+var _0x872a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67","\x4C\x69\x63\x65\x6E\x73\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x63\x68\x61\x74","\x6D\x65\x73\x73\x61\x67\x69\x6E\x67","\x63\x6D","\x75\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x6A\x73\x63\x72\x69\x70\x74\x79","\x63\x75\x73\x74\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x68\x61\x73\x53\x6D\x73","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x68\x61\x73\x43\x6D","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x872a[0];var compose=require(_0x872a[1]);var moment=require(_0x872a[2]);var crypto=require(_0x872a[3]);var util=require(_0x872a[4]);var os=require(_0x872a[5]);var exec=require(_0x872a[7])[_0x872a[6]];var config=require(_0x872a[8]);var User=require(_0x872a[10])[_0x872a[9]];var Telephone=require(_0x872a[10])[_0x872a[11]];var Setting=require(_0x872a[10])[_0x872a[12]];var License=require(_0x872a[10])[_0x872a[13]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,jscripty:false,messaging:false,openchannel:false,custom:false,cm:false,dialer:false,update:false,description:_0x872a[14]};function getUuid(){switch(os[_0x872a[22]]()){case _0x872a[20]:return exec(_0x872a[18],{encoding:_0x872a[19]})[_0x872a[17]](_0x872a[15],_0x872a[16]);default:return require(_0x872a[21])(true)}}function checkLicense(_0xdbccxf){return compose()[_0x872a[32]](function(_0xdbccx10,_0xdbccx11,_0xdbccx12){return License[_0x872a[31]]({where:{id:1}})[_0x872a[30]](function(_0xdbccx14){var _0xdbccx15=null;var _0xdbccx16=false;try{if(_0xdbccx14[_0x872a[24]]){_0xdbccx15= decrypt(_0xdbccx14[_0x872a[24]],_0xdbccx14[_0x872a[25]]);_0xdbccx15= JSON[_0x872a[26]](_0xdbccx15)}else {_0xdbccx15= demoLicense}}catch(err){console[_0x872a[28]](_0x872a[27],err);_0xdbccx15= demoLicense};_0xdbccx16= _0xdbccx15[_0xdbccxf];if(!_0xdbccx16){return _0xdbccx11[_0x872a[29]](403)};return _0xdbccx12()})[_0x872a[23]](function(_0xdbccx13){return _0xdbccx12(_0xdbccx13)})})}function hasChat(){return checkLicense(_0x872a[33])}function hasSms(){return checkLicense(_0x872a[34])}function hasCm(){return checkLicense(_0x872a[35])}function hasUpdate(){return checkLicense(_0x872a[36])}function hasMail(){return checkLicense(_0x872a[37])}function hasFax(){return checkLicense(_0x872a[38])}function hasJscripty(){return checkLicense(_0x872a[39])}function hasCustom(){return checkLicense(_0x872a[40])}function hasOpenchannel(){return checkLicense(_0x872a[41])}function isValidDate(){return compose()[_0x872a[32]](function(_0xdbccx10,_0xdbccx11,_0xdbccx12){return License[_0x872a[31]]({where:{id:1}})[_0x872a[30]](function(_0xdbccx14){var _0xdbccx15=null,_0xdbccx21=false;try{if(_0xdbccx14[_0x872a[24]]){_0xdbccx15= decrypt(_0xdbccx14[_0x872a[24]],_0xdbccx14[_0x872a[25]]);_0xdbccx15= JSON[_0x872a[26]](_0xdbccx15);if(moment()[_0x872a[43]](_0xdbccx15[_0x872a[42]])){_0xdbccx21= true}}}catch(err){console[_0x872a[28]](_0x872a[27],err)};if(!_0xdbccx21){return _0xdbccx11[_0x872a[29]](403)};return _0xdbccx12()})[_0x872a[23]](function(_0xdbccx13){return _0xdbccx12(_0xdbccx13)})})}function isUsersLimit(){return compose()[_0x872a[32]](function(_0xdbccx10,_0xdbccx11,_0xdbccx12){var _0xdbccx14;return License[_0x872a[31]]({where:{id:1}})[_0x872a[30]](function(_0xdbccx25){_0xdbccx14= _0xdbccx25;return User[_0x872a[51]]({where:{$or:[{role:_0x872a[49]},{role:_0x872a[50]}]}})})[_0x872a[48]](function(_0xdbccx23){var _0xdbccx15=null,_0xdbccx24=false;try{if(_0xdbccx14[_0x872a[24]]){_0xdbccx15= decrypt(_0xdbccx14[_0x872a[24]],_0xdbccx14[_0x872a[25]]);_0xdbccx15= JSON[_0x872a[26]](_0xdbccx15)}else {_0xdbccx15= demoLicense}}catch(err){console[_0x872a[28]](_0x872a[27],err);_0xdbccx15= demoLicense};if(_0xdbccx15[_0x872a[44]]> _0xdbccx23){_0xdbccx24= true};if(!_0xdbccx24){return _0xdbccx11[_0x872a[47]](403)[_0x872a[46]]({message:_0x872a[45]})};return _0xdbccx12()})[_0x872a[23]](function(_0xdbccx13){return _0xdbccx12(_0xdbccx13)})})}function isTelephonesLimit(){return compose()[_0x872a[32]](function(_0xdbccx10,_0xdbccx11,_0xdbccx12){var _0xdbccx14;return License[_0x872a[31]]({where:{id:1}})[_0x872a[30]](function(_0xdbccx25){_0xdbccx14= _0xdbccx25;return User[_0x872a[51]]({where:{role:_0x872a[54]}})})[_0x872a[48]](function(_0xdbccx27){var _0xdbccx15=null,_0xdbccx24=false;try{if(_0xdbccx14[_0x872a[24]]){_0xdbccx15= decrypt(_0xdbccx14[_0x872a[24]],_0xdbccx14[_0x872a[25]]);_0xdbccx15= JSON[_0x872a[26]](_0xdbccx15)}else {_0xdbccx15= demoLicense}}catch(err){console[_0x872a[28]](_0x872a[27],err);_0xdbccx15= demoLicense};if(_0xdbccx15[_0x872a[52]]> _0xdbccx27){_0xdbccx24= true};if(!_0xdbccx24){return _0xdbccx11[_0x872a[47]](403)[_0x872a[46]]({message:_0x872a[53]})};return _0xdbccx12()})[_0x872a[23]](function(_0xdbccx13){return _0xdbccx12(_0xdbccx13)})})}function isValidAgent(){return function(_0xdbccx29){var _0xdbccx14;var _0xdbccx2a=false;if(_0xdbccx29[_0x872a[55]]=== _0x872a[49]|| _0xdbccx29[_0x872a[55]]=== _0x872a[50]|| (_0xdbccx29[_0x872a[55]]=== _0x872a[56]&& _0xdbccx29[_0x872a[57]])){_0xdbccx2a= true};return License[_0x872a[31]]({where:{id:1}})[_0x872a[30]](function(_0xdbccx25){_0xdbccx14= _0xdbccx25;return User[_0x872a[51]]({where:{role:_0x872a[56],online:true}})})[_0x872a[48]](function(_0xdbccx2b){var _0xdbccx15=null;try{if(_0xdbccx14[_0x872a[24]]){_0xdbccx15= decrypt(_0xdbccx14[_0x872a[24]],_0xdbccx14[_0x872a[25]]);_0xdbccx15= JSON[_0x872a[26]](_0xdbccx15)}else {_0xdbccx15= demoLicense}}catch(err){console[_0x872a[28]](_0x872a[27],err);_0xdbccx15= demoLicense};if(_0xdbccx15[_0x872a[58]]> _0xdbccx2b){_0xdbccx2a= true};return _0xdbccx2a})}}function decrypt(_0xdbccx2d,_0xdbccx2e){var _0xdbccx2f=_0xdbccx2e[_0x872a[60]](_0x872a[59])[4];var _0xdbccx30=_0xdbccx2e[_0x872a[60]](_0x872a[59])[0];var _0xdbccx31=crypto[_0x872a[64]](_0x872a[61],util[_0x872a[63]](_0x872a[62],_0xdbccx2f,_0xdbccx2e,_0xdbccx30));var _0xdbccx14=_0xdbccx31[_0x872a[36]](_0xdbccx2d,_0x872a[65],_0x872a[19]);_0xdbccx14+= _0xdbccx31[_0x872a[66]](_0x872a[19]);return _0xdbccx14}exports[_0x872a[67]]= getUuid;exports[_0x872a[68]]= isValidDate;exports[_0x872a[69]]= isUsersLimit;exports[_0x872a[70]]= isTelephonesLimit;exports[_0x872a[71]]= hasChat;exports[_0x872a[72]]= hasMail;exports[_0x872a[73]]= hasFax;exports[_0x872a[74]]= hasOpenchannel;exports[_0x872a[75]]= hasSms;exports[_0x872a[76]]= hasJscripty;exports[_0x872a[77]]= hasCm;exports[_0x872a[78]]= hasUpdate;exports[_0x872a[79]]= isValidAgent;exports[_0x872a[80]]= demoLicense;exports[_0x872a[81]]= decrypt
\ No newline at end of file