Built motion from commit 1038d87.|0.0.141
[motion.git] / server / config / license / license.service.js
index 73b0358..d937f4e 100644 (file)
@@ -1 +1 @@
-var _0x12eb=["\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","\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\x73","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x6C\x69\x6E\x75\x78","\x6F\x75\x74\x70\x75\x74","\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","\x73\x6C\x69\x63\x65","\x0A","\x73\x70\x6C\x69\x74","\x62\x6C\x6B\x69\x64\x20\x2D\x67\x20\x26\x26\x20\x62\x6C\x6B\x69\x64","\x6D\x61\x74\x63\x68","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x78\x65\x63","\x6D\x61\x70","\x75\x75\x69\x64","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x70\x61\x72\x73\x65","\x63\x68\x61\x74","\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","\x6D\x61\x69\x6C","\x66\x61\x78","\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","\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","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\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","\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"];_0x12eb[0];var compose=require(_0x12eb[1]);var moment=require(_0x12eb[2]);var crypto=require(_0x12eb[3]);var util=require(_0x12eb[4]);var os=require(_0x12eb[5]);var config=require(_0x12eb[6]);var User=require(_0x12eb[8])[_0x12eb[7]];var Telephone=require(_0x12eb[8])[_0x12eb[9]];var Settings=require(_0x12eb[8])[_0x12eb[10]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x12eb[11]};function getUuid(){if(os[_0x12eb[12]]()!==_0x12eb[13]){var _0x6198xc=exec(_0x12eb[15],{silent:true})[_0x12eb[14]];var _0x6198xd=_0x6198xc[_0x12eb[18]](_0x12eb[17])[_0x12eb[16]](0,-1);return _0x6198xd[0]}else {var _0x6198xc=exec(_0x12eb[19],{silent:true})[_0x12eb[14]];var _0x6198xd=_0x6198xc[_0x12eb[18]](_0x12eb[17])[_0x12eb[16]](0,-1)[_0x12eb[23]](function(_0x6198xe){var _0x6198xf,_0x6198x10,_0x6198xd;_0x6198x10= new RegExp(/(\w+)\=\"([^\"]+)/g);_0x6198xf={partition:_0x6198xe[_0x12eb[20]](/^(\S+)\:\ /)[1]};while(_0x6198xd=_0x6198x10[_0x12eb[22]](_0x6198xe)){_0x6198xf[_0x6198xd[1][_0x12eb[21]]()]=_0x6198xd[2]};return _0x6198xf});return _0x6198xd[0][_0x12eb[24]]}}function hasChat(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){var _0x6198x17=null,_0x6198x18=false;if(_0x6198x16[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x16[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};_0x6198x18=_0x6198x17[_0x12eb[28]];if(!_0x6198x18){return _0x6198x13[_0x12eb[29]](403)};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function hasMail(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){var _0x6198x17=null,_0x6198x1a=false;if(_0x6198x16[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x16[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};_0x6198x1a=_0x6198x17[_0x12eb[33]];if(!_0x6198x1a){return _0x6198x13[_0x12eb[29]](403)};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function hasFax(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){var _0x6198x17=null,_0x6198x1c=false;if(_0x6198x16[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x16[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};_0x6198x1c=_0x6198x17[_0x12eb[34]];if(!_0x6198x1c){return _0x6198x13[_0x12eb[29]](403)};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function isValidDate(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){var _0x6198x17=null,_0x6198x1e=false;if(_0x6198x16[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x16[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17);if(moment()[_0x12eb[36]](_0x6198x17[_0x12eb[35]])){_0x6198x1e=true}};if(!_0x6198x1e){return _0x6198x13[_0x12eb[29]](403)};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function isUsersLimit(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){var _0x6198x20;return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){_0x6198x20=_0x6198x16;return User[_0x12eb[44]]({where:{$or:[{role:_0x12eb[42]},{role:_0x12eb[43]}]}})})[_0x12eb[41]](function(_0x6198x21){var _0x6198x17=null,_0x6198x22=false;if(_0x6198x20[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x20[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};if(_0x6198x17[_0x12eb[37]]>_0x6198x21){_0x6198x22=true};if(!_0x6198x22){return _0x6198x13[_0x12eb[40]](403)[_0x12eb[39]]({message:_0x12eb[38]})};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function isTelephonesLimit(){return compose()[_0x12eb[32]](function(_0x6198x12,_0x6198x13,_0x6198x14){var _0x6198x20;return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){_0x6198x20=_0x6198x16;return User[_0x12eb[44]]({where:{role:_0x12eb[47]}})})[_0x12eb[41]](function(_0x6198x24){var _0x6198x17=null,_0x6198x22=false;if(_0x6198x20[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x20[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};if(_0x6198x17[_0x12eb[45]]>_0x6198x24){_0x6198x22=true};if(!_0x6198x22){return _0x6198x13[_0x12eb[40]](403)[_0x12eb[39]]({message:_0x12eb[46]})};return _0x6198x14()})[_0x12eb[25]](function(_0x6198x15){return _0x6198x14(_0x6198x15)})})}function isValidAgent(){return function(_0x6198x26){var _0x6198x20;var _0x6198x27=false;if(_0x6198x26[_0x12eb[48]]===_0x12eb[42]||_0x6198x26[_0x12eb[48]]===_0x12eb[43]||(_0x6198x26[_0x12eb[48]]===_0x12eb[49]&&_0x6198x26[_0x12eb[50]])){_0x6198x27=true};return Settings[_0x12eb[31]]({where:{id:1}})[_0x12eb[30]](function(_0x6198x16){_0x6198x20=_0x6198x16;return User[_0x12eb[44]]({where:{role:_0x12eb[49],online:true}})})[_0x12eb[41]](function(_0x6198x28){var _0x6198x17=null;if(_0x6198x20[_0x12eb[26]]){_0x6198x17=decrypt(_0x6198x20[_0x12eb[26]]);_0x6198x17=JSON[_0x12eb[27]](_0x6198x17)}else {_0x6198x17=demoLicense};if(_0x6198x17[_0x12eb[51]]>_0x6198x28){_0x6198x27=true};return _0x6198x27})}}function decrypt(_0x6198x2a){var _0x6198x2b=getUuid();var _0x6198x2c=_0x6198x2b[_0x12eb[18]](_0x12eb[52])[4];var _0x6198x2d=_0x6198x2b[_0x12eb[18]](_0x12eb[52])[0];var _0x6198x2e=crypto[_0x12eb[56]](_0x12eb[53],util[_0x12eb[55]](_0x12eb[54],_0x6198x2c,_0x6198x2b,_0x6198x2d));var _0x6198x17=_0x6198x2e[_0x12eb[59]](_0x6198x2a,_0x12eb[57],_0x12eb[58]);_0x6198x17+=_0x6198x2e[_0x12eb[60]](_0x12eb[58]);return _0x6198x17}exports[_0x12eb[61]]=getUuid;exports[_0x12eb[62]]=isValidDate;exports[_0x12eb[63]]=isUsersLimit;exports[_0x12eb[64]]=isTelephonesLimit;exports[_0x12eb[65]]=hasChat;exports[_0x12eb[66]]=hasMail;exports[_0x12eb[67]]=hasFax;exports[_0x12eb[68]]=isValidAgent;exports[_0x12eb[69]]=demoLicense;exports[_0x12eb[70]]=decrypt
\ No newline at end of file
+var _0x5d8b=["\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"];_0x5d8b[0];var compose=require(_0x5d8b[1]);var moment=require(_0x5d8b[2]);var crypto=require(_0x5d8b[3]);var util=require(_0x5d8b[4]);var os=require(_0x5d8b[5]);var exec=require(_0x5d8b[7])[_0x5d8b[6]];var config=require(_0x5d8b[8]);var User=require(_0x5d8b[10])[_0x5d8b[9]];var Telephone=require(_0x5d8b[10])[_0x5d8b[11]];var Setting=require(_0x5d8b[10])[_0x5d8b[12]];var License=require(_0x5d8b[10])[_0x5d8b[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:_0x5d8b[14]};function getUuid(){switch(os[_0x5d8b[22]]()){case _0x5d8b[20]:return exec(_0x5d8b[18],{encoding:_0x5d8b[19]})[_0x5d8b[17]](_0x5d8b[15],_0x5d8b[16]);default:return require(_0x5d8b[21])(true)}}function checkLicense(_0xb1ccxf){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx14){var _0xb1ccx15=null;var _0xb1ccx16=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};_0xb1ccx16= _0xb1ccx15[_0xb1ccxf];if(!_0xb1ccx16){return _0xb1ccx11[_0x5d8b[29]](403)};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function hasChat(){return checkLicense(_0x5d8b[33])}function hasSms(){return checkLicense(_0x5d8b[34])}function hasCm(){return checkLicense(_0x5d8b[35])}function hasUpdate(){return checkLicense(_0x5d8b[36])}function hasMail(){return checkLicense(_0x5d8b[37])}function hasFax(){return checkLicense(_0x5d8b[38])}function hasJscripty(){return checkLicense(_0x5d8b[39])}function hasCustom(){return checkLicense(_0x5d8b[40])}function hasOpenchannel(){return checkLicense(_0x5d8b[41])}function isValidDate(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx14){var _0xb1ccx15=null,_0xb1ccx21=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15);if(moment()[_0x5d8b[43]](_0xb1ccx15[_0x5d8b[42]])){_0xb1ccx21= true}}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err)};if(!_0xb1ccx21){return _0xb1ccx11[_0x5d8b[29]](403)};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isUsersLimit(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){var _0xb1ccx14;return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{$or:[{role:_0x5d8b[49]},{role:_0x5d8b[50]}]}})})[_0x5d8b[48]](function(_0xb1ccx23){var _0xb1ccx15=null,_0xb1ccx24=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[44]]> _0xb1ccx23){_0xb1ccx24= true};if(!_0xb1ccx24){return _0xb1ccx11[_0x5d8b[47]](403)[_0x5d8b[46]]({message:_0x5d8b[45]})};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isTelephonesLimit(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){var _0xb1ccx14;return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{role:_0x5d8b[54]}})})[_0x5d8b[48]](function(_0xb1ccx27){var _0xb1ccx15=null,_0xb1ccx24=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[52]]> _0xb1ccx27){_0xb1ccx24= true};if(!_0xb1ccx24){return _0xb1ccx11[_0x5d8b[47]](403)[_0x5d8b[46]]({message:_0x5d8b[53]})};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isValidAgent(){return function(_0xb1ccx29){var _0xb1ccx14;var _0xb1ccx2a=false;if(_0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[49]|| _0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[50]|| (_0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[56]&& _0xb1ccx29[_0x5d8b[57]])){_0xb1ccx2a= true};return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{role:_0x5d8b[56],online:true}})})[_0x5d8b[48]](function(_0xb1ccx2b){var _0xb1ccx15=null;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[58]]> _0xb1ccx2b){_0xb1ccx2a= true};return _0xb1ccx2a})}}function decrypt(_0xb1ccx2d,_0xb1ccx2e){var _0xb1ccx2f=_0xb1ccx2e[_0x5d8b[60]](_0x5d8b[59])[4];var _0xb1ccx30=_0xb1ccx2e[_0x5d8b[60]](_0x5d8b[59])[0];var _0xb1ccx31=crypto[_0x5d8b[64]](_0x5d8b[61],util[_0x5d8b[63]](_0x5d8b[62],_0xb1ccx2f,_0xb1ccx2e,_0xb1ccx30));var _0xb1ccx14=_0xb1ccx31[_0x5d8b[36]](_0xb1ccx2d,_0x5d8b[65],_0x5d8b[19]);_0xb1ccx14+= _0xb1ccx31[_0x5d8b[66]](_0x5d8b[19]);return _0xb1ccx14}exports[_0x5d8b[67]]= getUuid;exports[_0x5d8b[68]]= isValidDate;exports[_0x5d8b[69]]= isUsersLimit;exports[_0x5d8b[70]]= isTelephonesLimit;exports[_0x5d8b[71]]= hasChat;exports[_0x5d8b[72]]= hasMail;exports[_0x5d8b[73]]= hasFax;exports[_0x5d8b[74]]= hasOpenchannel;exports[_0x5d8b[75]]= hasSms;exports[_0x5d8b[76]]= hasJscripty;exports[_0x5d8b[77]]= hasCm;exports[_0x5d8b[78]]= hasUpdate;exports[_0x5d8b[79]]= isValidAgent;exports[_0x5d8b[80]]= demoLicense;exports[_0x5d8b[81]]= decrypt
\ No newline at end of file