Built motion from commit 13c3002c.|2.6.9
[motion2.git] / server / components / parsers / qs.js
index 1d69403..3e60bdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81bd=['lower','options','lodash','sequelize','moment','parse','keys','includes','fields','split','filters','isEmpty','forOwn','find','type','isPlainObject','format','utc','$lte','YYYY-MM-DD','subtract','uniqueid','isArray','limit','offset','sort','indexOf','priority','cast','unsigned','DESC','col','ASC','omit','length','isObject','isString','unset','match','^[+]?[0-9]*$','getFullTextValue','forEach','replace','join','getOptions','query','$id','map','name','intersection','model','attributes','nolimit','where','pick','filter','object','columns','value','merge','VIRTUAL'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0x81bd,0x7c));var _0xd81b=function(_0x861e02,_0x33f772){_0x861e02=_0x861e02-0x0;var _0x48fc24=_0x81bd[_0x861e02];return _0x48fc24;};'use strict';var _=require(_0xd81b('0x0'));var sequelize=require(_0xd81b('0x1'));var moment=require(_0xd81b('0x2'));var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x2337b1){var _0x2d27cb=['ne'];try{var _0x2ec03a=JSON[_0xd81b('0x3')](_0x2337b1);var _0x54e096=Object[_0xd81b('0x4')](_0x2ec03a)[0x0];return _0x2d27cb[_0xd81b('0x5')](_0x54e096);}catch(_0x1b6cfe){return![];}}function getOperatorValue(_0x4d8e7e){var _0x42a0aa=JSON[_0xd81b('0x3')](_0x4d8e7e);var _0x1f3f2c=Object['keys'](_0x42a0aa)[0x0];var _0x5e14e8=_0x42a0aa[_0x1f3f2c];return{['$'+_0x1f3f2c]:_0x5e14e8};}exports[_0xd81b('0x6')]=function(_0x5468d5){var _0x223515=null;if(_0x5468d5){_0x223515=_0x5468d5[_0xd81b('0x7')](',');}return _0x223515;};exports[_0xd81b('0x8')]=function(_0x86dab6,_0x17fba4){var _0x1ff60f={};if(!_[_0xd81b('0x9')](_0x86dab6)){_[_0xd81b('0xa')](_0x86dab6,function(_0x2090e1,_0x23c789){try{if(_0x17fba4){var _0x215b92=_[_0xd81b('0xb')](_0x17fba4,{'name':_0x23c789})||{};if(hasSequelizeOperator(_0x2090e1)){_0x1ff60f[_0x23c789]=getOperatorValue(_0x2090e1);}else if(_0x215b92[_0xd81b('0xc')]==='DATE'&&_[_0xd81b('0xd')](_0x2090e1)){var _0x57f71d=JSON[_0xd81b('0x3')](_0x2090e1);var _0xe75568={'$gte':moment(moment(_0x57f71d['$gte'])[_0xd81b('0xe')]('YYYY-MM-DD'))[_0xd81b('0xf')]()[_0xd81b('0xe')](),'$lte':moment(moment(_0x57f71d[_0xd81b('0x10')])[_0xd81b('0xe')](_0xd81b('0x11')))['utc']()[_0xd81b('0x12')](0x1,'s')[_0xd81b('0xe')]()};_0x1ff60f[_0x23c789]=_0xe75568;}else if(_0x215b92['name']===_0xd81b('0x13')){_0x1ff60f[_0x23c789]=_0x2090e1;}else{_0x1ff60f[_0x23c789]=_[_0xd81b('0x14')](_0x2090e1)?_0x2090e1:JSON[_0xd81b('0x3')](_0x2090e1);}}else{_0x1ff60f[_0x23c789]=_[_0xd81b('0x14')](_0x2090e1)?_0x2090e1:JSON[_0xd81b('0x3')](_0x2090e1);}}catch(_0xc49b8d){_0x1ff60f[_0x23c789]=_0x2090e1[_0xd81b('0x7')](',');}});}return _0x1ff60f;};exports[_0xd81b('0x15')]=function(_0x1c34c5){_0x1c34c5=parseInt(_0x1c34c5,0xa);if(!_0x1c34c5||_0x1c34c5<0x0){_0x1c34c5=LIMIT_VALUE;}return _0x1c34c5;};exports[_0xd81b('0x16')]=function(_0x1ff3c6){_0x1ff3c6=parseInt(_0x1ff3c6,0xa);if(!_0x1ff3c6||_0x1ff3c6<0x0){_0x1ff3c6=0x0;}return _0x1ff3c6;};exports[_0xd81b('0x17')]=function(_0xfa27e0){var _0x3518f0,_0x156894=null;if(_0xfa27e0){_0x3518f0=_0xfa27e0[_0xd81b('0x7')](',');_0x156894=_['map'](_0x3518f0,function(_0x4d566e){if(_0x4d566e[_0xd81b('0x18')]('-')===0x0){return[_0x4d566e===_0xd81b('0x19')?sequelize[_0xd81b('0x1a')](sequelize['col'](_0xd81b('0x19')),_0xd81b('0x1b')):_0x4d566e['substr'](0x1),_0xd81b('0x1c')];}else{return[_0x4d566e===_0xd81b('0x19')?sequelize[_0xd81b('0x1a')](sequelize[_0xd81b('0x1d')](_0xd81b('0x19')),_0xd81b('0x1b')):_0x4d566e,_0xd81b('0x1e')];}});}return _0x156894;};exports[_0xd81b('0x1f')]=function(_0x341aec,_0x212c4e){if(_[_0xd81b('0x9')](_0x341aec)){return _0x341aec;}if(_[_0xd81b('0x14')](_0x341aec)){for(var _0x596389=0x0;_0x596389<_0x341aec[_0xd81b('0x20')];_0x596389+=0x1){_0x341aec[_0x596389]=this[_0xd81b('0x1f')](_0x341aec[_0x596389],_0x212c4e);}return _0x341aec;}if(!_[_0xd81b('0x21')](_0x341aec)){return _0x341aec;}if(_[_0xd81b('0x22')](_0x212c4e)){_0x212c4e=[_0x212c4e];}if(!_[_0xd81b('0x14')](_0x212c4e)){return _0x341aec;}for(var _0x2d0d02=0x0;_0x2d0d02<_0x212c4e[_0xd81b('0x20')];_0x2d0d02+=0x1){_[_0xd81b('0x23')](_0x341aec,_0x212c4e[_0x2d0d02]);}for(var _0x10a561 in _0x341aec){if(_0x341aec['hasOwnProperty'](_0x10a561)){_0x341aec[_0x10a561]=this[_0xd81b('0x1f')](_0x341aec[_0x10a561],_0x212c4e);}}return _0x341aec;};exports['isNumeric']=function(_0x5c8aee){return _0x5c8aee[_0xd81b('0x24')](RegExp(_0xd81b('0x25')))?!![]:![];};exports['isEmail']=function(_0x481454){return _0x481454[_0xd81b('0x24')](/^\S+@\S+$/)?!![]:![];};exports[_0xd81b('0x26')]=function(_0x1b1434){var _0x289f54=[];_0x1b1434[_0xd81b('0x7')](/[ ,]+/)[_0xd81b('0x27')](function(_0x5527ed){_0x5527ed=_0x5527ed[_0xd81b('0x28')](/([^:]")"+/g,'$1');_0x5527ed='+'+_0x5527ed+'*';var _0x26f629=/[ `!@#$%^&*()_\-?~]/;if(_0x5527ed['match'](_0x26f629))_0x5527ed='\x22'+_0x5527ed+'\x22';_0x289f54['push'](_0x5527ed);});return _0x289f54[_0xd81b('0x29')]('\x20');};exports[_0xd81b('0x2a')]=function(_0x50472a,_0x50ce25,_0x5317b2){var _0x322991={},_0x3ead68={};if(_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x2c')]){_0x50ce25[_0xd81b('0x2b')]['id']=_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x2c')];delete _0x50ce25['query'][_0xd81b('0x2c')];}_0x322991['model']=_[_0xd81b('0x2d')](_0x50472a,_0xd81b('0x2e'));_0x322991[_0xd81b('0x2b')]=_[_0xd81b('0x4')](_0x50ce25[_0xd81b('0x2b')]);_0x322991[_0xd81b('0x8')]=_[_0xd81b('0x2f')](_0x322991[_0xd81b('0x30')],_0x322991[_0xd81b('0x2b')]);_0x3ead68[_0xd81b('0x31')]=_[_0xd81b('0x2f')](_0x322991[_0xd81b('0x30')],this[_0xd81b('0x6')](_0x50ce25['query']['fields']));_0x3ead68[_0xd81b('0x31')]=_0x3ead68[_0xd81b('0x31')][_0xd81b('0x20')]?_0x3ead68['attributes']:_0x322991[_0xd81b('0x30')];if(!_0x50ce25[_0xd81b('0x2b')]['hasOwnProperty'](_0xd81b('0x32'))){_0x3ead68[_0xd81b('0x15')]=this['limit'](_0x50ce25[_0xd81b('0x2b')]['limit']);_0x3ead68[_0xd81b('0x16')]=this[_0xd81b('0x16')](_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x16')]);}_0x3ead68['order']=this[_0xd81b('0x17')](_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x17')]);_0x3ead68[_0xd81b('0x33')]=this[_0xd81b('0x8')](_[_0xd81b('0x34')](_0x50ce25[_0xd81b('0x2b')],_0x322991['filters']),_0x50472a);if(_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x35')]){var _0x5185fe=_0x50472a;var _0x5065a0=_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x35')];if(typeof _0x5065a0===_0xd81b('0x36')){_0x5185fe=_[_0xd81b('0x35')](_0x50472a,function(_0x29bddd){return _['includes'](_0x5065a0[_0xd81b('0x37')],_0x29bddd[_0xd81b('0x2e')]);});_0x5065a0=_0x5065a0[_0xd81b('0x38')];}_0x3ead68[_0xd81b('0x33')]=_[_0xd81b('0x39')](_0x3ead68[_0xd81b('0x33')],{'$or':_[_0xd81b('0x2d')](_0x5185fe,function(_0x486f0d){if(_0x486f0d[_0xd81b('0xc')]!==_0xd81b('0x3a')){if(_0x5317b2){return sequelize[_0xd81b('0x33')](sequelize['fn']('lower',sequelize[_0xd81b('0x1d')](_0x486f0d[_0xd81b('0x2e')])),{'$like':sequelize['fn'](_0xd81b('0x3b'),'%'+_0x50ce25[_0xd81b('0x2b')][_0xd81b('0x35')]+'%')});}else{var _0x194d2a={};_0x194d2a[_0x486f0d[_0xd81b('0x2e')]]={'$like':'%'+_0x50ce25[_0xd81b('0x2b')]['filter']+'%'};return _0x194d2a;}}})});}_0x3ead68=_['merge']({},_0x3ead68,_0x50ce25[_0xd81b('0x3c')]);return _0x3ead68;};
\ No newline at end of file
+var _0x5fc3=['YYYY-MM-DD','utc','subtract','name','uniqueid','isArray','limit','sort','map','indexOf','priority','cast','col','unsigned','DESC','ASC','omit','length','isObject','isString','hasOwnProperty','isNumeric','match','^[+]?[0-9]*$','isEmail','getFullTextValue','forEach','replace','push','join','getOptions','$id','query','model','keys','intersection','attributes','nolimit','offset','order','where','pick','filter','object','value','merge','lower','options','lodash','sequelize','parse','includes','fields','split','filters','isEmpty','find','type','$gte','format'];(function(_0x174a4d,_0x50cdfa){var _0x1e74ea=function(_0x41bade){while(--_0x41bade){_0x174a4d['push'](_0x174a4d['shift']());}};_0x1e74ea(++_0x50cdfa);}(_0x5fc3,0xa8));var _0x35fc=function(_0xd1b4d7,_0x28b2c1){_0xd1b4d7=_0xd1b4d7-0x0;var _0x3002ec=_0x5fc3[_0xd1b4d7];return _0x3002ec;};'use strict';var _=require(_0x35fc('0x0'));var sequelize=require(_0x35fc('0x1'));var moment=require('moment');var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x253d6e){var _0x2ac6da=['ne'];try{var _0x196bc2=JSON[_0x35fc('0x2')](_0x253d6e);var _0xb4f9ce=Object['keys'](_0x196bc2)[0x0];return _0x2ac6da[_0x35fc('0x3')](_0xb4f9ce);}catch(_0x1d5fec){return![];}}function getOperatorValue(_0x186a06){var _0x5b85ad=JSON['parse'](_0x186a06);var _0x19a0d1=Object['keys'](_0x5b85ad)[0x0];var _0x16e153=_0x5b85ad[_0x19a0d1];return{['$'+_0x19a0d1]:_0x16e153};}exports[_0x35fc('0x4')]=function(_0xc72d93){var _0x1e5f90=null;if(_0xc72d93){_0x1e5f90=_0xc72d93[_0x35fc('0x5')](',');}return _0x1e5f90;};exports[_0x35fc('0x6')]=function(_0x2051ab,_0x565f95){var _0x1083a9={};if(!_[_0x35fc('0x7')](_0x2051ab)){_['forOwn'](_0x2051ab,function(_0x471549,_0x33f491){try{if(_0x565f95){var _0x5021d4=_[_0x35fc('0x8')](_0x565f95,{'name':_0x33f491})||{};if(hasSequelizeOperator(_0x471549)){_0x1083a9[_0x33f491]=getOperatorValue(_0x471549);}else if(_0x5021d4[_0x35fc('0x9')]==='DATE'&&_['isPlainObject'](_0x471549)){var _0x409357=JSON['parse'](_0x471549);var _0x397738={'$gte':moment(moment(_0x409357[_0x35fc('0xa')])[_0x35fc('0xb')](_0x35fc('0xc')))[_0x35fc('0xd')]()['format'](),'$lte':moment(moment(_0x409357['$lte'])['format']('YYYY-MM-DD'))[_0x35fc('0xd')]()[_0x35fc('0xe')](0x1,'s')[_0x35fc('0xb')]()};_0x1083a9[_0x33f491]=_0x397738;}else if(_0x5021d4[_0x35fc('0xf')]===_0x35fc('0x10')){_0x1083a9[_0x33f491]=_0x471549;}else{_0x1083a9[_0x33f491]=_[_0x35fc('0x11')](_0x471549)?_0x471549:JSON['parse'](_0x471549);}}else{_0x1083a9[_0x33f491]=_[_0x35fc('0x11')](_0x471549)?_0x471549:JSON[_0x35fc('0x2')](_0x471549);}}catch(_0x553677){_0x1083a9[_0x33f491]=_0x471549[_0x35fc('0x5')](',');}});}return _0x1083a9;};exports[_0x35fc('0x12')]=function(_0x2e513b){_0x2e513b=parseInt(_0x2e513b,0xa);if(!_0x2e513b||_0x2e513b<0x0){_0x2e513b=LIMIT_VALUE;}return _0x2e513b;};exports['offset']=function(_0x1a86e9){_0x1a86e9=parseInt(_0x1a86e9,0xa);if(!_0x1a86e9||_0x1a86e9<0x0){_0x1a86e9=0x0;}return _0x1a86e9;};exports[_0x35fc('0x13')]=function(_0x465eb3){var _0x488234,_0x402cff=null;if(_0x465eb3){_0x488234=_0x465eb3[_0x35fc('0x5')](',');_0x402cff=_[_0x35fc('0x14')](_0x488234,function(_0x251a1f){if(_0x251a1f[_0x35fc('0x15')]('-')===0x0){return[_0x251a1f===_0x35fc('0x16')?sequelize[_0x35fc('0x17')](sequelize[_0x35fc('0x18')](_0x35fc('0x16')),_0x35fc('0x19')):_0x251a1f['substr'](0x1),_0x35fc('0x1a')];}else{return[_0x251a1f===_0x35fc('0x16')?sequelize[_0x35fc('0x17')](sequelize[_0x35fc('0x18')](_0x35fc('0x16')),'unsigned'):_0x251a1f,_0x35fc('0x1b')];}});}return _0x402cff;};exports[_0x35fc('0x1c')]=function(_0x561bf8,_0x265324){if(_[_0x35fc('0x7')](_0x561bf8)){return _0x561bf8;}if(_[_0x35fc('0x11')](_0x561bf8)){for(var _0x51cfec=0x0;_0x51cfec<_0x561bf8[_0x35fc('0x1d')];_0x51cfec+=0x1){_0x561bf8[_0x51cfec]=this['omit'](_0x561bf8[_0x51cfec],_0x265324);}return _0x561bf8;}if(!_[_0x35fc('0x1e')](_0x561bf8)){return _0x561bf8;}if(_[_0x35fc('0x1f')](_0x265324)){_0x265324=[_0x265324];}if(!_['isArray'](_0x265324)){return _0x561bf8;}for(var _0x519264=0x0;_0x519264<_0x265324[_0x35fc('0x1d')];_0x519264+=0x1){_['unset'](_0x561bf8,_0x265324[_0x519264]);}for(var _0x274208 in _0x561bf8){if(_0x561bf8[_0x35fc('0x20')](_0x274208)){_0x561bf8[_0x274208]=this['omit'](_0x561bf8[_0x274208],_0x265324);}}return _0x561bf8;};exports[_0x35fc('0x21')]=function(_0x645eac){return _0x645eac[_0x35fc('0x22')](RegExp(_0x35fc('0x23')))?!![]:![];};exports[_0x35fc('0x24')]=function(_0x134dfa){return _0x134dfa[_0x35fc('0x22')](/^\S+@\S+$/)?!![]:![];};exports[_0x35fc('0x25')]=function(_0x54aedc){var _0x1cd1ae=[];_0x54aedc[_0x35fc('0x5')](/[ ,]+/)[_0x35fc('0x26')](function(_0x52acc5){_0x52acc5=_0x52acc5[_0x35fc('0x27')](/([^:]")"+/g,'$1');_0x52acc5='+'+_0x52acc5+'*';var _0x16f067=/[ `!@#$%^&*()_\-?~]/;if(_0x52acc5[_0x35fc('0x22')](_0x16f067))_0x52acc5='\x22'+_0x52acc5+'\x22';_0x1cd1ae[_0x35fc('0x28')](_0x52acc5);});return _0x1cd1ae[_0x35fc('0x29')]('\x20');};exports[_0x35fc('0x2a')]=function(_0x222ddb,_0x37b435,_0xf4dfab){var _0x127bfc={},_0x57072d={};if(_0x37b435['query'][_0x35fc('0x2b')]){_0x37b435['query']['id']=_0x37b435[_0x35fc('0x2c')][_0x35fc('0x2b')];delete _0x37b435[_0x35fc('0x2c')][_0x35fc('0x2b')];}_0x127bfc[_0x35fc('0x2d')]=_[_0x35fc('0x14')](_0x222ddb,'name');_0x127bfc[_0x35fc('0x2c')]=_[_0x35fc('0x2e')](_0x37b435[_0x35fc('0x2c')]);_0x127bfc[_0x35fc('0x6')]=_[_0x35fc('0x2f')](_0x127bfc[_0x35fc('0x2d')],_0x127bfc['query']);_0x57072d[_0x35fc('0x30')]=_[_0x35fc('0x2f')](_0x127bfc[_0x35fc('0x2d')],this['fields'](_0x37b435[_0x35fc('0x2c')]['fields']));_0x57072d[_0x35fc('0x30')]=_0x57072d[_0x35fc('0x30')][_0x35fc('0x1d')]?_0x57072d[_0x35fc('0x30')]:_0x127bfc['model'];if(!_0x37b435['query']['hasOwnProperty'](_0x35fc('0x31'))){_0x57072d['limit']=this[_0x35fc('0x12')](_0x37b435['query'][_0x35fc('0x12')]);_0x57072d[_0x35fc('0x32')]=this[_0x35fc('0x32')](_0x37b435[_0x35fc('0x2c')][_0x35fc('0x32')]);}_0x57072d[_0x35fc('0x33')]=this[_0x35fc('0x13')](_0x37b435['query'][_0x35fc('0x13')]);_0x57072d[_0x35fc('0x34')]=this['filters'](_[_0x35fc('0x35')](_0x37b435[_0x35fc('0x2c')],_0x127bfc[_0x35fc('0x6')]),_0x222ddb);if(_0x37b435[_0x35fc('0x2c')][_0x35fc('0x36')]){var _0x31d926=_0x222ddb;var _0x58f25c=_0x37b435[_0x35fc('0x2c')][_0x35fc('0x36')];if(typeof _0x58f25c===_0x35fc('0x37')){_0x31d926=_['filter'](_0x222ddb,function(_0x17821e){return _[_0x35fc('0x3')](_0x58f25c['columns'],_0x17821e[_0x35fc('0xf')]);});_0x58f25c=_0x58f25c[_0x35fc('0x38')];}_0x57072d[_0x35fc('0x34')]=_[_0x35fc('0x39')](_0x57072d[_0x35fc('0x34')],{'$or':_[_0x35fc('0x14')](_0x31d926,function(_0x211b70){if(_0x211b70[_0x35fc('0x9')]!=='VIRTUAL'){if(_0xf4dfab){return sequelize['where'](sequelize['fn'](_0x35fc('0x3a'),sequelize[_0x35fc('0x18')](_0x211b70['name'])),{'$like':sequelize['fn']('lower','%'+_0x37b435['query'][_0x35fc('0x36')]+'%')});}else{var _0x10f98b={};_0x10f98b[_0x211b70['name']]={'$like':'%'+_0x37b435[_0x35fc('0x2c')][_0x35fc('0x36')]+'%'};return _0x10f98b;}}})});}_0x57072d=_[_0x35fc('0x39')]({},_0x57072d,_0x37b435[_0x35fc('0x3b')]);return _0x57072d;};
\ No newline at end of file