Built motion from commit 775e2a94.|2.6.3
[motion2.git] / server / services / ami / trigger / integration / util.js
index a0112ab..a75da9a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdda5=['toLowerCase','keyValue','string','key','keyType','format','%s:\x20%s','join','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','getString','sortBy','length','type','variable','variableName','push','toString','customVariable','Variable','name'];(function(_0x1d7d47,_0x445ce8){var _0x578edb=function(_0x59ffbc){while(--_0x59ffbc){_0x1d7d47['push'](_0x1d7d47['shift']());}};_0x578edb(++_0x445ce8);}(_0xdda5,0x152));var _0x5dda=function(_0x6292d0,_0x586f87){_0x6292d0=_0x6292d0-0x0;var _0x4100ee=_0xdda5[_0x6292d0];return _0x4100ee;};'use strict';var _=require(_0x5dda('0x0'));var util=require(_0x5dda('0x1'));exports[_0x5dda('0x2')]=function(_0x3d7e64,_0xa9db8e,_0x4112ad){var _0x4ee06d=[];if(_0x3d7e64['length']>0x0){var _0x513cb7=_[_0x5dda('0x3')](_0x3d7e64,['id']);for(var _0xf42742=0x0;_0xf42742<_0x513cb7[_0x5dda('0x4')];_0xf42742++){var _0x39a597=_0x513cb7[_0xf42742];if(_0x39a597[_0x5dda('0x5')]==='string'){_0x4ee06d['push'](_0x39a597['content']);}else if(_0x39a597[_0x5dda('0x5')]===_0x5dda('0x6')&&_0x39a597['variableName']){_0xa9db8e[_0x39a597[_0x5dda('0x7')]]&&_0x4ee06d[_0x5dda('0x8')](_0xa9db8e[_0x39a597['variableName']][_0x5dda('0x9')]());}else if(_0x39a597[_0x5dda('0x5')]===_0x5dda('0xa')&&_0x39a597[_0x5dda('0xb')]&&_0x39a597['Variable'][_0x5dda('0xc')]){_0xa9db8e[_0x39a597['Variable'][_0x5dda('0xc')]['toLowerCase']()]&&_0x4ee06d[_0x5dda('0x8')](_0xa9db8e[_0x39a597[_0x5dda('0xb')][_0x5dda('0xc')][_0x5dda('0xd')]()][_0x5dda('0x9')]());}else if(_0x39a597[_0x5dda('0x5')]===_0x5dda('0xe')){if(_0x39a597['keyType']===_0x5dda('0xf')&&_0x39a597['key']){_0x4ee06d['push'](util['format']('%s:\x20%s',_0x39a597[_0x5dda('0x10')],_0x39a597['keyContent']));}else if(_0x39a597[_0x5dda('0x11')]===_0x5dda('0x6')&&_0x39a597[_0x5dda('0x7')]&&_0x39a597['key']){_0xa9db8e[_0x39a597[_0x5dda('0x7')]]&&_0x4ee06d[_0x5dda('0x8')](util[_0x5dda('0x12')](_0x5dda('0x13'),_0x39a597[_0x5dda('0x10')],_0xa9db8e[_0x39a597[_0x5dda('0x7')]]));}else if(_0x39a597['keyType']===_0x5dda('0xa')&&_0x39a597[_0x5dda('0xb')]&&_0x39a597[_0x5dda('0xb')][_0x5dda('0xc')]&&_0x39a597['key']){_0xa9db8e[_0x39a597['Variable'][_0x5dda('0xc')][_0x5dda('0xd')]()]&&_0x4ee06d[_0x5dda('0x8')](util[_0x5dda('0x12')](_0x5dda('0x13'),_0x39a597[_0x5dda('0x10')],_0xa9db8e[_0x39a597[_0x5dda('0xb')]['name'][_0x5dda('0xd')]()]));}}}}return _0x4ee06d[_0x5dda('0x14')](_0x4112ad);};exports['stripTrailingSlash']=function(_0x52a361){var _0x23cb0d=_0x52a361[_0x5dda('0x15')](-0x1);if(_0x23cb0d==='/'){_0x52a361=_0x52a361[_0x5dda('0x16')](0x0,_0x52a361[_0x5dda('0x17')](_0x23cb0d));}return _0x52a361;};exports[_0x5dda('0x18')]=function(_0x4a63b2){if(!_[_0x5dda('0x19')](_0x4a63b2)&&_0x4a63b2!==''){var _0x2de935=/^(([^<>()\[\]\\.,;:\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 _0x2de935[_0x5dda('0x1a')](String(_0x4a63b2)['toLowerCase']());}else{return![];}};
\ No newline at end of file
+var _0xe17a=['toString','Variable','name','toLowerCase','keyValue','keyType','key','format','%s:\x20%s','keyContent','join','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','getString','length','type','string','push','variable','variableName'];(function(_0x89cb3a,_0x385fd1){var _0x407cf1=function(_0x61fa77){while(--_0x61fa77){_0x89cb3a['push'](_0x89cb3a['shift']());}};_0x407cf1(++_0x385fd1);}(_0xe17a,0x79));var _0xae17=function(_0x2141a5,_0x4a660d){_0x2141a5=_0x2141a5-0x0;var _0x340111=_0xe17a[_0x2141a5];return _0x340111;};'use strict';var _=require(_0xae17('0x0'));var util=require(_0xae17('0x1'));exports[_0xae17('0x2')]=function(_0x1faf49,_0xc9e034,_0x14dd45){var _0x22afb=[];if(_0x1faf49[_0xae17('0x3')]>0x0){var _0x20f5ec=_['sortBy'](_0x1faf49,['id']);for(var _0x1a22ef=0x0;_0x1a22ef<_0x20f5ec[_0xae17('0x3')];_0x1a22ef++){var _0xb18792=_0x20f5ec[_0x1a22ef];if(_0xb18792[_0xae17('0x4')]===_0xae17('0x5')){_0x22afb[_0xae17('0x6')](_0xb18792['content']);}else if(_0xb18792[_0xae17('0x4')]===_0xae17('0x7')&&_0xb18792[_0xae17('0x8')]){_0xc9e034[_0xb18792[_0xae17('0x8')]]&&_0x22afb[_0xae17('0x6')](_0xc9e034[_0xb18792[_0xae17('0x8')]][_0xae17('0x9')]());}else if(_0xb18792[_0xae17('0x4')]==='customVariable'&&_0xb18792[_0xae17('0xa')]&&_0xb18792[_0xae17('0xa')]['name']){_0xc9e034[_0xb18792[_0xae17('0xa')][_0xae17('0xb')][_0xae17('0xc')]()]&&_0x22afb[_0xae17('0x6')](_0xc9e034[_0xb18792[_0xae17('0xa')]['name'][_0xae17('0xc')]()][_0xae17('0x9')]());}else if(_0xb18792[_0xae17('0x4')]===_0xae17('0xd')){if(_0xb18792[_0xae17('0xe')]===_0xae17('0x5')&&_0xb18792[_0xae17('0xf')]){_0x22afb[_0xae17('0x6')](util[_0xae17('0x10')](_0xae17('0x11'),_0xb18792[_0xae17('0xf')],_0xb18792[_0xae17('0x12')]));}else if(_0xb18792[_0xae17('0xe')]===_0xae17('0x7')&&_0xb18792[_0xae17('0x8')]&&_0xb18792[_0xae17('0xf')]){_0xc9e034[_0xb18792['variableName']]&&_0x22afb[_0xae17('0x6')](util[_0xae17('0x10')]('%s:\x20%s',_0xb18792['key'],_0xc9e034[_0xb18792['variableName']]));}else if(_0xb18792[_0xae17('0xe')]==='customVariable'&&_0xb18792[_0xae17('0xa')]&&_0xb18792[_0xae17('0xa')]['name']&&_0xb18792['key']){_0xc9e034[_0xb18792[_0xae17('0xa')][_0xae17('0xb')]['toLowerCase']()]&&_0x22afb[_0xae17('0x6')](util['format'](_0xae17('0x11'),_0xb18792[_0xae17('0xf')],_0xc9e034[_0xb18792[_0xae17('0xa')]['name']['toLowerCase']()]));}}}}return _0x22afb[_0xae17('0x13')](_0x14dd45);};exports['stripTrailingSlash']=function(_0x2d6a6d){var _0x3106fc=_0x2d6a6d[_0xae17('0x14')](-0x1);if(_0x3106fc==='/'){_0x2d6a6d=_0x2d6a6d[_0xae17('0x15')](0x0,_0x2d6a6d[_0xae17('0x16')](_0x3106fc));}return _0x2d6a6d;};exports[_0xae17('0x17')]=function(_0x250048){if(!_[_0xae17('0x18')](_0x250048)&&_0x250048!==''){var _0x5c81b1=/^(([^<>()\[\]\\.,;:\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 _0x5c81b1[_0xae17('0x19')](String(_0x250048)[_0xae17('0xc')]());}else{return![];}};
\ No newline at end of file