Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / services / ami / trigger / integration / util.js
index 1de6722..c19243b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1686=['variableName','customVariable','Variable','toLowerCase','name','toString','keyType','key','format','%s:\x20%s','keyContent','stripTrailingSlash','substr','validateEmail','test','lodash','util','getString','length','type','string','push','content','variable'];(function(_0x1e707b,_0x364cad){var _0x5c793c=function(_0x389eee){while(--_0x389eee){_0x1e707b['push'](_0x1e707b['shift']());}};_0x5c793c(++_0x364cad);}(_0x1686,0x147));var _0x6168=function(_0x117c6e,_0x1b1729){_0x117c6e=_0x117c6e-0x0;var _0xfe63f5=_0x1686[_0x117c6e];return _0xfe63f5;};'use strict';var _=require(_0x6168('0x0'));var util=require(_0x6168('0x1'));exports[_0x6168('0x2')]=function(_0x22587e,_0x4f30c9,_0x4c6fde){var _0x38fc83=[];if(_0x22587e[_0x6168('0x3')]>0x0){var _0x496f82=_['sortBy'](_0x22587e,['id']);for(var _0x168b15=0x0;_0x168b15<_0x496f82['length'];_0x168b15++){var _0x562d85=_0x496f82[_0x168b15];if(_0x562d85[_0x6168('0x4')]===_0x6168('0x5')){_0x38fc83[_0x6168('0x6')](_0x562d85[_0x6168('0x7')]);}else if(_0x562d85[_0x6168('0x4')]===_0x6168('0x8')&&_0x562d85['variableName']){_0x4f30c9[_0x562d85[_0x6168('0x9')]]&&_0x38fc83[_0x6168('0x6')](_0x4f30c9[_0x562d85['variableName']]['toString']());}else if(_0x562d85[_0x6168('0x4')]===_0x6168('0xa')&&_0x562d85['Variable']&&_0x562d85[_0x6168('0xb')]['name']){_0x4f30c9[_0x562d85['Variable']['name'][_0x6168('0xc')]()]&&_0x38fc83[_0x6168('0x6')](_0x4f30c9[_0x562d85[_0x6168('0xb')][_0x6168('0xd')][_0x6168('0xc')]()][_0x6168('0xe')]());}else if(_0x562d85[_0x6168('0x4')]==='keyValue'){if(_0x562d85[_0x6168('0xf')]===_0x6168('0x5')&&_0x562d85[_0x6168('0x10')]){_0x38fc83[_0x6168('0x6')](util[_0x6168('0x11')](_0x6168('0x12'),_0x562d85[_0x6168('0x10')],_0x562d85[_0x6168('0x13')]));}else if(_0x562d85[_0x6168('0xf')]==='variable'&&_0x562d85[_0x6168('0x9')]&&_0x562d85[_0x6168('0x10')]){_0x4f30c9[_0x562d85[_0x6168('0x9')]]&&_0x38fc83[_0x6168('0x6')](util['format'](_0x6168('0x12'),_0x562d85['key'],_0x4f30c9[_0x562d85[_0x6168('0x9')]]));}else if(_0x562d85[_0x6168('0xf')]===_0x6168('0xa')&&_0x562d85[_0x6168('0xb')]&&_0x562d85[_0x6168('0xb')][_0x6168('0xd')]&&_0x562d85[_0x6168('0x10')]){_0x4f30c9[_0x562d85['Variable'][_0x6168('0xd')][_0x6168('0xc')]()]&&_0x38fc83[_0x6168('0x6')](util[_0x6168('0x11')](_0x6168('0x12'),_0x562d85[_0x6168('0x10')],_0x4f30c9[_0x562d85[_0x6168('0xb')][_0x6168('0xd')]['toLowerCase']()]));}}}}return _0x38fc83['join'](_0x4c6fde);};exports[_0x6168('0x14')]=function(_0x40a265){if(_0x40a265&&_0x40a265[_0x6168('0x15')](-0x1)==='/'){return _0x40a265[_0x6168('0x15')](0x0,_0x40a265['length']-0x1);}return _0x40a265;};exports[_0x6168('0x16')]=function(_0x4addac){if(_0x4addac&&_0x4addac!==''){var _0x2b47d1=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x2b47d1[_0x6168('0x17')](String(_0x4addac)[_0x6168('0xc')]());}else{return![];}};
\ No newline at end of file
+var _0x6923=['format','join','substr','validateEmail','test','util','sortBy','type','string','push','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','keyType','%s:\x20%s','key','keyContent'];(function(_0x497232,_0x4f1d61){var _0x5e7853=function(_0x91d282){while(--_0x91d282){_0x497232['push'](_0x497232['shift']());}};_0x5e7853(++_0x4f1d61);}(_0x6923,0x165));var _0x3692=function(_0x2df5ca,_0x8e02f9){_0x2df5ca=_0x2df5ca-0x0;var _0x101af2=_0x6923[_0x2df5ca];return _0x101af2;};'use strict';var _=require('lodash');var util=require(_0x3692('0x0'));exports['getString']=function(_0x204910,_0x150dd0,_0x51141e){var _0x39af3c=[];if(_0x204910['length']>0x0){var _0x376742=_[_0x3692('0x1')](_0x204910,['id']);for(var _0x1a56eb=0x0;_0x1a56eb<_0x376742['length'];_0x1a56eb++){var _0x2967d1=_0x376742[_0x1a56eb];if(_0x2967d1[_0x3692('0x2')]===_0x3692('0x3')){_0x39af3c[_0x3692('0x4')](_0x2967d1[_0x3692('0x5')]);}else if(_0x2967d1[_0x3692('0x2')]===_0x3692('0x6')&&_0x2967d1[_0x3692('0x7')]){_0x150dd0[_0x2967d1['variableName']]&&_0x39af3c['push'](_0x150dd0[_0x2967d1[_0x3692('0x7')]][_0x3692('0x8')]());}else if(_0x2967d1['type']===_0x3692('0x9')&&_0x2967d1[_0x3692('0xa')]&&_0x2967d1['Variable'][_0x3692('0xb')]){_0x150dd0[_0x2967d1[_0x3692('0xa')]['name'][_0x3692('0xc')]()]&&_0x39af3c[_0x3692('0x4')](_0x150dd0[_0x2967d1[_0x3692('0xa')][_0x3692('0xb')][_0x3692('0xc')]()]['toString']());}else if(_0x2967d1['type']==='keyValue'){if(_0x2967d1[_0x3692('0xd')]===_0x3692('0x3')&&_0x2967d1['key']){_0x39af3c[_0x3692('0x4')](util['format'](_0x3692('0xe'),_0x2967d1[_0x3692('0xf')],_0x2967d1[_0x3692('0x10')]));}else if(_0x2967d1[_0x3692('0xd')]===_0x3692('0x6')&&_0x2967d1[_0x3692('0x7')]&&_0x2967d1[_0x3692('0xf')]){_0x150dd0[_0x2967d1['variableName']]&&_0x39af3c['push'](util[_0x3692('0x11')](_0x3692('0xe'),_0x2967d1[_0x3692('0xf')],_0x150dd0[_0x2967d1[_0x3692('0x7')]]));}else if(_0x2967d1[_0x3692('0xd')]===_0x3692('0x9')&&_0x2967d1['Variable']&&_0x2967d1[_0x3692('0xa')]['name']&&_0x2967d1['key']){_0x150dd0[_0x2967d1['Variable'][_0x3692('0xb')][_0x3692('0xc')]()]&&_0x39af3c[_0x3692('0x4')](util['format'](_0x3692('0xe'),_0x2967d1[_0x3692('0xf')],_0x150dd0[_0x2967d1[_0x3692('0xa')][_0x3692('0xb')][_0x3692('0xc')]()]));}}}}return _0x39af3c[_0x3692('0x12')](_0x51141e);};exports['stripTrailingSlash']=function(_0x5e2580){if(_0x5e2580&&_0x5e2580[_0x3692('0x13')](-0x1)==='/'){return _0x5e2580[_0x3692('0x13')](0x0,_0x5e2580['length']-0x1);}return _0x5e2580;};exports[_0x3692('0x14')]=function(_0x258637){if(_0x258637&&_0x258637!==''){var _0x3e7eb7=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x3e7eb7[_0x3692('0x15')](String(_0x258637)[_0x3692('0xc')]());}else{return![];}};
\ No newline at end of file