Built motion from commit (unavailable).|2.5.7
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 4a2ada1..8c72730 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7bea=['routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','length','map','message','stop','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','[%s][GOTOIF]\x20%s','stringify','validate','./utils'];(function(_0x49ca18,_0x5e6d05){var _0x145d54=function(_0x30b9be){while(--_0x30b9be){_0x49ca18['push'](_0x49ca18['shift']());}};_0x145d54(++_0x5e6d05);}(_0x7bea,0x103));var _0xa7be=function(_0x1bcc92,_0x4929b8){_0x1bcc92=_0x1bcc92-0x0;var _0x88406a=_0x7bea[_0x1bcc92];return _0x88406a;};'use strict';var schema=require(_0xa7be('0x0'));var _=require('lodash');var htmlToText=require('html-to-text');var utils=require(_0xa7be('0x1'));var logger=require('../../../../config/logger')(_0xa7be('0x2'));var gotoif=schema({'condition':{'type':_0xa7be('0x3'),'required':!![],'message':_0xa7be('0x4')},'priorityTrue':{'type':_0xa7be('0x5'),'message':_0xa7be('0x6')},'priorityFalse':{'type':_0xa7be('0x5'),'message':'priority\x20false\x20is\x20a\x20number'}});exports[_0xa7be('0x7')]=function(_0x132f46,_0x45d84c){return function(_0x406cee){try{var _0x415250={'condition':htmlToText[_0xa7be('0x8')](utils[_0xa7be('0x9')](_0x45d84c[0x0],this),{'wordwrap':![]})[_0xa7be('0xa')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x45d84c[0x1],'priorityFalse':_0x45d84c[0x2]};var _0x23606b=gotoif['validate'](_0x415250,{'typecast':!![]});if(_0x23606b[_0xa7be('0xb')]){logger['error']('[%s][GOTOIF]\x20%s',_0x132f46,_[_0xa7be('0xc')](_0x23606b,_0xa7be('0xd'))['join'](',\x20'));_0x406cee[_0xa7be('0xe')]();}else{try{var _0x505d22=eval('('+_0x415250[_0xa7be('0xf')]+')');var _0x4ec18c=_0x505d22?_0x415250[_0xa7be('0x10')]:_0x415250[_0xa7be('0x11')];logger[_0xa7be('0x12')](_0xa7be('0x13'),_0x132f46,_0x415250['condition'],_0x505d22,_0x4ec18c||_0xa7be('0x14'));if(_0x4ec18c){var _0x9b6269=_[_0xa7be('0x15')](_0x406cee[_0xa7be('0x16')](),{'p':_0x4ec18c});if(_0x9b6269>=0x0){logger[_0xa7be('0x12')](_0xa7be('0x17'),_0x132f46,_0x4ec18c||_0xa7be('0x14'),_0x9b6269);_0x406cee[_0xa7be('0x14')](_0x9b6269);}else{logger[_0xa7be('0x12')](_0xa7be('0x18'),_0x132f46,_0x4ec18c||_0xa7be('0x14'));_0x406cee[_0xa7be('0xe')]();}}else{_0x406cee['next']();}}catch(_0x34783e){logger[_0xa7be('0x19')](_0xa7be('0x1a'),_0x132f46,_0x34783e[_0xa7be('0xd')]);_0x406cee[_0xa7be('0xe')]();}}}catch(_0x14a50f){logger[_0xa7be('0x19')](_0xa7be('0x1b'),_0x132f46,JSON[_0xa7be('0x1c')](_0x14a50f));_0x406cee['stop']();}};};
\ No newline at end of file
+var _0x1664=['priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','length','error','[%s][GOTOIF]\x20%s','map','message','join','priorityFalse','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','condition','next','findIndex','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','./utils','../../../../config/logger','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number'];(function(_0x491a7f,_0x28bb80){var _0x3d8f44=function(_0xdaa716){while(--_0xdaa716){_0x491a7f['push'](_0x491a7f['shift']());}};_0x3d8f44(++_0x28bb80);}(_0x1664,0x1a4));var _0x4166=function(_0x4fbfd9,_0x3ab91a){_0x4fbfd9=_0x4fbfd9-0x0;var _0x31dc94=_0x1664[_0x4fbfd9];return _0x31dc94;};'use strict';var schema=require(_0x4166('0x0'));var _=require(_0x4166('0x1'));var htmlToText=require(_0x4166('0x2'));var utils=require(_0x4166('0x3'));var logger=require(_0x4166('0x4'))(_0x4166('0x5'));var gotoif=schema({'condition':{'type':_0x4166('0x6'),'required':!![],'message':_0x4166('0x7')},'priorityTrue':{'type':_0x4166('0x8'),'message':_0x4166('0x9')},'priorityFalse':{'type':'number','message':_0x4166('0xa')}});exports[_0x4166('0xb')]=function(_0x1280b9,_0x5a6a3c){return function(_0x4c1bbf){try{var _0x30dd19={'condition':htmlToText[_0x4166('0xc')](utils[_0x4166('0xd')](_0x5a6a3c[0x0],this),{'wordwrap':![]})[_0x4166('0xe')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x5a6a3c[0x1],'priorityFalse':_0x5a6a3c[0x2]};var _0x5d3b78=gotoif[_0x4166('0x0')](_0x30dd19,{'typecast':!![]});if(_0x5d3b78[_0x4166('0xf')]){logger[_0x4166('0x10')](_0x4166('0x11'),_0x1280b9,_[_0x4166('0x12')](_0x5d3b78,_0x4166('0x13'))[_0x4166('0x14')](',\x20'));_0x4c1bbf['stop']();}else{try{var _0x45b682=eval('('+_0x30dd19['condition']+')');var _0x542674=_0x45b682?_0x30dd19['priorityTrue']:_0x30dd19[_0x4166('0x15')];logger['info'](_0x4166('0x16'),_0x1280b9,_0x30dd19[_0x4166('0x17')],_0x45b682,_0x542674||_0x4166('0x18'));if(_0x542674){var _0x379e41=_[_0x4166('0x19')](_0x4c1bbf[_0x4166('0x1a')](),{'p':_0x542674});if(_0x379e41>=0x0){logger[_0x4166('0x1b')](_0x4166('0x1c'),_0x1280b9,_0x542674||_0x4166('0x18'),_0x379e41);_0x4c1bbf[_0x4166('0x18')](_0x379e41);}else{logger[_0x4166('0x1b')](_0x4166('0x1d'),_0x1280b9,_0x542674||_0x4166('0x18'));_0x4c1bbf[_0x4166('0x1e')]();}}else{_0x4c1bbf[_0x4166('0x18')]();}}catch(_0x205272){logger['error'](_0x4166('0x1f'),_0x1280b9,_0x205272['message']);_0x4c1bbf[_0x4166('0x1e')]();}}}catch(_0x3b8ea4){logger['error'](_0x4166('0x11'),_0x1280b9,JSON[_0x4166('0x20')](_0x3b8ea4));_0x4c1bbf['stop']();}};};
\ No newline at end of file