Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / components / license / service.js
index 0a9ff40..c22eae2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd6f=['final','parse','hasOwnProperty','use','License','findOne','then','count','status','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','User','isUserLimit','crypto','util','composable-middleware','../../mysqldb','../../config/environment','data1','license','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','utf8'];(function(_0x595a3c,_0x45d7d3){var _0x2552f1=function(_0x443cd8){while(--_0x443cd8){_0x595a3c['push'](_0x595a3c['shift']());}};_0x2552f1(++_0x45d7d3);}(_0xcd6f,0x11d));var _0xfcd6=function(_0x17848d,_0x2c71fa){_0x17848d=_0x17848d-0x0;var _0x467214=_0xcd6f[_0x17848d];return _0x467214;};'use strict';var crypto=require(_0xfcd6('0x0'));var util=require(_0xfcd6('0x1'));var compose=require(_0xfcd6('0x2'));var db=require(_0xfcd6('0x3'))['db'];var config=require(_0xfcd6('0x4'));function getValueFromLicense(_0x1b454f,_0x30ba28){if(_0x1b454f&&_0x30ba28){if(_0x30ba28[_0xfcd6('0x5')]&&_0x30ba28[_0xfcd6('0x6')]){var _0x1799b3=_0x30ba28['data1'];var _0x380932=_0x30ba28[_0xfcd6('0x6')];var _0x13babe=_0x1799b3[_0xfcd6('0x7')]('-')[0x4];var _0x1523ea=_0x1799b3[_0xfcd6('0x7')]('-')[0x0];var _0x3bdb51=crypto[_0xfcd6('0x8')](_0xfcd6('0x9'),util[_0xfcd6('0xa')](_0xfcd6('0xb'),_0x13babe,_0x1799b3,_0x1523ea));var _0x24e617=_0x3bdb51[_0xfcd6('0xc')](_0x380932,_0xfcd6('0xd'),_0xfcd6('0xe'));_0x24e617+=_0x3bdb51[_0xfcd6('0xf')](_0xfcd6('0xe'));var _0x2c27e7=JSON[_0xfcd6('0x10')](_0x24e617);return _0x2c27e7[_0xfcd6('0x11')](_0x1b454f)?_0x2c27e7[_0x1b454f]:null;}}return null;}function isLimit(_0x336e52,_0x3b8320,_0x484b2e,_0x44de90){var _0x1ffe5c=_0x3b8320;return compose()[_0xfcd6('0x12')](function(_0x124730,_0x46b389,_0x35fddd){return db[_0xfcd6('0x13')][_0xfcd6('0x14')]({'where':{'id':0x1},'raw':!![]})[_0xfcd6('0x15')](function(_0x56c7cf){var _0x50d148=getValueFromLicense(_0x336e52,_0x56c7cf);return _0x50d148?_0x50d148:_0x1ffe5c;})[_0xfcd6('0x15')](function(_0x48a010){_0x1ffe5c=_0x48a010;return _0x484b2e[_0xfcd6('0x16')](_0x44de90);})['then'](function(_0x132013){if(_0x132013>=_0x1ffe5c){return _0x46b389[_0xfcd6('0x17')](0x193)[_0xfcd6('0x18')]({'message':util['format'](_0xfcd6('0x19'),_0x336e52)});}_0x35fddd();})[_0xfcd6('0x1a')](function(_0x4923de){_0x35fddd(_0x4923de);});});}function isUserLimit(){return isLimit(_0xfcd6('0x1b'),0x1,db[_0xfcd6('0x1c')],{'where':{'$or':[{'role':'admin'},{'role':'user'}]}});}exports[_0xfcd6('0x1d')]=isUserLimit;
\ No newline at end of file
+var _0x5f8b=['data1','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','utf8','final','parse','hasOwnProperty','use','License','then','count','status','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','admin','user','isUserLimit','util','composable-middleware','../../mysqldb','license'];(function(_0x37b7b6,_0x165a5c){var _0x10c4c3=function(_0x16d71e){while(--_0x16d71e){_0x37b7b6['push'](_0x37b7b6['shift']());}};_0x10c4c3(++_0x165a5c);}(_0x5f8b,0x100));var _0xb5f8=function(_0x44bcb0,_0x235aa9){_0x44bcb0=_0x44bcb0-0x0;var _0xfaf881=_0x5f8b[_0x44bcb0];return _0xfaf881;};'use strict';var crypto=require('crypto');var util=require(_0xb5f8('0x0'));var compose=require(_0xb5f8('0x1'));var db=require(_0xb5f8('0x2'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0x68e1fc,_0x8f554d){if(_0x68e1fc&&_0x8f554d){if(_0x8f554d['data1']&&_0x8f554d[_0xb5f8('0x3')]){var _0x256294=_0x8f554d[_0xb5f8('0x4')];var _0x3522a1=_0x8f554d[_0xb5f8('0x3')];var _0x1fd96b=_0x256294[_0xb5f8('0x5')]('-')[0x4];var _0x27f3d4=_0x256294[_0xb5f8('0x5')]('-')[0x0];var _0x55dc07=crypto[_0xb5f8('0x6')](_0xb5f8('0x7'),util[_0xb5f8('0x8')](_0xb5f8('0x9'),_0x1fd96b,_0x256294,_0x27f3d4));var _0x4de952=_0x55dc07[_0xb5f8('0xa')](_0x3522a1,'base64',_0xb5f8('0xb'));_0x4de952+=_0x55dc07[_0xb5f8('0xc')](_0xb5f8('0xb'));var _0x4aafca=JSON[_0xb5f8('0xd')](_0x4de952);return _0x4aafca[_0xb5f8('0xe')](_0x68e1fc)?_0x4aafca[_0x68e1fc]:null;}}return null;}function isLimit(_0x56e2aa,_0x19249b,_0x122e1e,_0x1b8a83){var _0x15ad9e=_0x19249b;return compose()[_0xb5f8('0xf')](function(_0xc4a47a,_0x17f204,_0x115e55){return db[_0xb5f8('0x10')]['findOne']({'where':{'id':0x1},'raw':!![]})[_0xb5f8('0x11')](function(_0x5ae301){var _0x40cd5a=getValueFromLicense(_0x56e2aa,_0x5ae301);return _0x40cd5a?_0x40cd5a:_0x15ad9e;})['then'](function(_0x5618fa){_0x15ad9e=_0x5618fa;return _0x122e1e[_0xb5f8('0x12')](_0x1b8a83);})['then'](function(_0x8d1ef6){if(_0x8d1ef6>=_0x15ad9e){return _0x17f204[_0xb5f8('0x13')](0x193)['json']({'message':util[_0xb5f8('0x8')](_0xb5f8('0x14'),_0x56e2aa)});}_0x115e55();})[_0xb5f8('0x15')](function(_0x33fcf8){_0x115e55(_0x33fcf8);});});}function isUserLimit(){return isLimit(_0xb5f8('0x16'),0x1,db['User'],{'where':{'$or':[{'role':_0xb5f8('0x17')},{'role':_0xb5f8('0x18')}]}});}exports[_0xb5f8('0x19')]=isUserLimit;
\ No newline at end of file