Built motion from commit (unavailable).|2.5.28
[motion2.git] / server / components / parsers / qs.js
index c362821..441a20c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc08=['isEmpty','forOwn','find','type','DATE','$gte','format','YYYY-MM-DD','utc','subtract','isArray','parse','offset','map','cast','col','substr','DESC','priority','ASC','omit','length','isObject','unset','hasOwnProperty','isNumeric','^[+]?[0-9]*$','isEmail','match','getFullTextValue','forEach','replace','includes','lodash','moment','fields','split','filters'];(function(_0x27addf,_0x28d84e){var _0x2b13bc=function(_0x164251){while(--_0x164251){_0x27addf['push'](_0x27addf['shift']());}};_0x2b13bc(++_0x28d84e);}(_0xdc08,0xb9));var _0x8dc0=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xdc08[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require(_0x8dc0('0x0'));var sequelize=require('sequelize');var moment=require(_0x8dc0('0x1'));var LIMIT_VALUE=0xfa;exports[_0x8dc0('0x2')]=function(_0x239ad9){var _0x526431=null;if(_0x239ad9){_0x526431=_0x239ad9[_0x8dc0('0x3')](',');}return _0x526431;};exports[_0x8dc0('0x4')]=function(_0x131923,_0x23647b){var _0x7f1620={};if(!_[_0x8dc0('0x5')](_0x131923)){_[_0x8dc0('0x6')](_0x131923,function(_0x4d1658,_0xcf3824){try{if(_0x23647b){var _0x39130d=_[_0x8dc0('0x7')](_0x23647b,{'name':_0xcf3824})||{};if(_0x39130d[_0x8dc0('0x8')]===_0x8dc0('0x9')&&_['isPlainObject'](_0x4d1658)){var _0x5ceac6=JSON['parse'](_0x4d1658);var _0x112b12={'$gte':moment(moment(_0x5ceac6[_0x8dc0('0xa')])[_0x8dc0('0xb')](_0x8dc0('0xc')))[_0x8dc0('0xd')]()[_0x8dc0('0xb')](),'$lte':moment(moment(_0x5ceac6['$lte'])['format'](_0x8dc0('0xc')))[_0x8dc0('0xd')]()[_0x8dc0('0xe')](0x1,'s')[_0x8dc0('0xb')]()};_0x7f1620[_0xcf3824]=_0x112b12;}else{_0x7f1620[_0xcf3824]=_[_0x8dc0('0xf')](_0x4d1658)?_0x4d1658:JSON[_0x8dc0('0x10')](_0x4d1658);}}else{_0x7f1620[_0xcf3824]=_[_0x8dc0('0xf')](_0x4d1658)?_0x4d1658:JSON[_0x8dc0('0x10')](_0x4d1658);}}catch(_0x303bde){_0x7f1620[_0xcf3824]=_0x4d1658[_0x8dc0('0x3')](',');}});}return _0x7f1620;};exports['limit']=function(_0x48926e){_0x48926e=parseInt(_0x48926e,0xa);if(!_0x48926e||_0x48926e<0x0){_0x48926e=LIMIT_VALUE;}return _0x48926e;};exports[_0x8dc0('0x11')]=function(_0x5be4de){_0x5be4de=parseInt(_0x5be4de,0xa);if(!_0x5be4de||_0x5be4de<0x0){_0x5be4de=0x0;}return _0x5be4de;};exports['sort']=function(_0x25b3fb){var _0x177460,_0x2a63bd=null;if(_0x25b3fb){_0x177460=_0x25b3fb['split'](',');_0x2a63bd=_[_0x8dc0('0x12')](_0x177460,function(_0x242b3e){if(_0x242b3e['indexOf']('-')===0x0){return[_0x242b3e==='priority'?sequelize[_0x8dc0('0x13')](sequelize[_0x8dc0('0x14')]('priority'),'unsigned'):_0x242b3e[_0x8dc0('0x15')](0x1),_0x8dc0('0x16')];}else{return[_0x242b3e===_0x8dc0('0x17')?sequelize[_0x8dc0('0x13')](sequelize[_0x8dc0('0x14')](_0x8dc0('0x17')),'unsigned'):_0x242b3e,_0x8dc0('0x18')];}});}return _0x2a63bd;};exports[_0x8dc0('0x19')]=function(_0x5441ac,_0x3d6d59){if(_['isEmpty'](_0x5441ac)){return _0x5441ac;}if(_['isArray'](_0x5441ac)){for(var _0x37378b=0x0;_0x37378b<_0x5441ac[_0x8dc0('0x1a')];_0x37378b+=0x1){_0x5441ac[_0x37378b]=this[_0x8dc0('0x19')](_0x5441ac[_0x37378b],_0x3d6d59);}return _0x5441ac;}if(!_[_0x8dc0('0x1b')](_0x5441ac)){return _0x5441ac;}if(_['isString'](_0x3d6d59)){_0x3d6d59=[_0x3d6d59];}if(!_['isArray'](_0x3d6d59)){return _0x5441ac;}for(var _0x8c5ffc=0x0;_0x8c5ffc<_0x3d6d59[_0x8dc0('0x1a')];_0x8c5ffc+=0x1){_[_0x8dc0('0x1c')](_0x5441ac,_0x3d6d59[_0x8c5ffc]);}for(var _0x2b60a0 in _0x5441ac){if(_0x5441ac[_0x8dc0('0x1d')](_0x2b60a0)){_0x5441ac[_0x2b60a0]=this['omit'](_0x5441ac[_0x2b60a0],_0x3d6d59);}}return _0x5441ac;};exports[_0x8dc0('0x1e')]=function(_0x111740){return _0x111740['match'](RegExp(_0x8dc0('0x1f')))?!![]:![];};exports[_0x8dc0('0x20')]=function(_0x294a73){return _0x294a73[_0x8dc0('0x21')](/^\S+@\S+$/)?!![]:![];};exports[_0x8dc0('0x22')]=function(_0x99d3a){var _0x4024ae=[];_0x99d3a['split'](/[ ,]+/)[_0x8dc0('0x23')](function(_0x30a786){_0x30a786=_0x30a786[_0x8dc0('0x24')](/([^:]")"+/g,'$1');_0x30a786='+'+_0x30a786+'*';if(_0x30a786[_0x8dc0('0x25')]('@'))_0x30a786='\x22'+_0x30a786+'\x22';_0x4024ae['push'](_0x30a786);});return _0x4024ae['join']('\x20');};
\ No newline at end of file
+var _0x6ee5=['parse','$gte','format','YYYY-MM-DD','utc','name','uniqueid','isArray','limit','offset','sort','map','cast','col','priority','unsigned','substr','DESC','ASC','omit','length','isObject','unset','isNumeric','match','^[+]?[0-9]*$','isEmail','forEach','push','join','sequelize','moment','fields','split','filters','isEmpty','find','type','DATE'];(function(_0x3e02e3,_0x4cba6a){var _0x277130=function(_0xad9558){while(--_0xad9558){_0x3e02e3['push'](_0x3e02e3['shift']());}};_0x277130(++_0x4cba6a);}(_0x6ee5,0x93));var _0x56ee=function(_0x2941b9,_0x20794b){_0x2941b9=_0x2941b9-0x0;var _0x2815de=_0x6ee5[_0x2941b9];return _0x2815de;};'use strict';var _=require('lodash');var sequelize=require(_0x56ee('0x0'));var moment=require(_0x56ee('0x1'));var LIMIT_VALUE=0xfa;exports[_0x56ee('0x2')]=function(_0x3d2039){var _0x332888=null;if(_0x3d2039){_0x332888=_0x3d2039[_0x56ee('0x3')](',');}return _0x332888;};exports[_0x56ee('0x4')]=function(_0xbe8071,_0x484d9d){var _0x3a9ee9={};if(!_[_0x56ee('0x5')](_0xbe8071)){_['forOwn'](_0xbe8071,function(_0x2b2a57,_0x17c1f9){try{if(_0x484d9d){var _0x2bc348=_[_0x56ee('0x6')](_0x484d9d,{'name':_0x17c1f9})||{};if(_0x2bc348[_0x56ee('0x7')]===_0x56ee('0x8')&&_['isPlainObject'](_0x2b2a57)){var _0xe26783=JSON[_0x56ee('0x9')](_0x2b2a57);var _0x5323c8={'$gte':moment(moment(_0xe26783[_0x56ee('0xa')])[_0x56ee('0xb')](_0x56ee('0xc')))['utc']()[_0x56ee('0xb')](),'$lte':moment(moment(_0xe26783['$lte'])[_0x56ee('0xb')](_0x56ee('0xc')))[_0x56ee('0xd')]()['subtract'](0x1,'s')[_0x56ee('0xb')]()};_0x3a9ee9[_0x17c1f9]=_0x5323c8;}else if(_0x2bc348[_0x56ee('0xe')]===_0x56ee('0xf')){_0x3a9ee9[_0x17c1f9]=_0x2b2a57;}else{_0x3a9ee9[_0x17c1f9]=_[_0x56ee('0x10')](_0x2b2a57)?_0x2b2a57:JSON['parse'](_0x2b2a57);}}else{_0x3a9ee9[_0x17c1f9]=_[_0x56ee('0x10')](_0x2b2a57)?_0x2b2a57:JSON[_0x56ee('0x9')](_0x2b2a57);}}catch(_0x555991){_0x3a9ee9[_0x17c1f9]=_0x2b2a57[_0x56ee('0x3')](',');}});}return _0x3a9ee9;};exports[_0x56ee('0x11')]=function(_0x1ce2ec){_0x1ce2ec=parseInt(_0x1ce2ec,0xa);if(!_0x1ce2ec||_0x1ce2ec<0x0){_0x1ce2ec=LIMIT_VALUE;}return _0x1ce2ec;};exports[_0x56ee('0x12')]=function(_0x87a29){_0x87a29=parseInt(_0x87a29,0xa);if(!_0x87a29||_0x87a29<0x0){_0x87a29=0x0;}return _0x87a29;};exports[_0x56ee('0x13')]=function(_0x200c48){var _0x442725,_0x22582c=null;if(_0x200c48){_0x442725=_0x200c48[_0x56ee('0x3')](',');_0x22582c=_[_0x56ee('0x14')](_0x442725,function(_0x1c7fa3){if(_0x1c7fa3['indexOf']('-')===0x0){return[_0x1c7fa3==='priority'?sequelize[_0x56ee('0x15')](sequelize[_0x56ee('0x16')](_0x56ee('0x17')),_0x56ee('0x18')):_0x1c7fa3[_0x56ee('0x19')](0x1),_0x56ee('0x1a')];}else{return[_0x1c7fa3==='priority'?sequelize['cast'](sequelize[_0x56ee('0x16')](_0x56ee('0x17')),_0x56ee('0x18')):_0x1c7fa3,_0x56ee('0x1b')];}});}return _0x22582c;};exports[_0x56ee('0x1c')]=function(_0x148613,_0x3f3719){if(_[_0x56ee('0x5')](_0x148613)){return _0x148613;}if(_[_0x56ee('0x10')](_0x148613)){for(var _0x13452c=0x0;_0x13452c<_0x148613[_0x56ee('0x1d')];_0x13452c+=0x1){_0x148613[_0x13452c]=this[_0x56ee('0x1c')](_0x148613[_0x13452c],_0x3f3719);}return _0x148613;}if(!_[_0x56ee('0x1e')](_0x148613)){return _0x148613;}if(_['isString'](_0x3f3719)){_0x3f3719=[_0x3f3719];}if(!_['isArray'](_0x3f3719)){return _0x148613;}for(var _0x27c27c=0x0;_0x27c27c<_0x3f3719[_0x56ee('0x1d')];_0x27c27c+=0x1){_[_0x56ee('0x1f')](_0x148613,_0x3f3719[_0x27c27c]);}for(var _0x1619df in _0x148613){if(_0x148613['hasOwnProperty'](_0x1619df)){_0x148613[_0x1619df]=this[_0x56ee('0x1c')](_0x148613[_0x1619df],_0x3f3719);}}return _0x148613;};exports[_0x56ee('0x20')]=function(_0x5ed92e){return _0x5ed92e[_0x56ee('0x21')](RegExp(_0x56ee('0x22')))?!![]:![];};exports[_0x56ee('0x23')]=function(_0x5040fe){return _0x5040fe['match'](/^\S+@\S+$/)?!![]:![];};exports['getFullTextValue']=function(_0x2252f8){var _0x260363=[];_0x2252f8[_0x56ee('0x3')](/[ ,]+/)[_0x56ee('0x24')](function(_0x5ad761){_0x5ad761=_0x5ad761['replace'](/([^:]")"+/g,'$1');_0x5ad761='+'+_0x5ad761+'*';if(_0x5ad761['includes']('@'))_0x5ad761='\x22'+_0x5ad761+'\x22';_0x260363[_0x56ee('0x25')](_0x5ad761);});return _0x260363[_0x56ee('0x26')]('\x20');};
\ No newline at end of file