Built motion from commit (unavailable).|2.2.0
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 8c949b5..13285cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3369=['message','join','condition','priorityFalse','info','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','validate','lodash','html-to-text','./utils','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','fromString','getMustacheRender','replace','map'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x3369,0x1c7));var _0x9336=function(_0x21d717,_0x57342b){_0x21d717=_0x21d717-0x0;var _0xfdde90=_0x3369[_0x21d717];return _0xfdde90;};'use strict';var schema=require(_0x9336('0x0'));var _=require(_0x9336('0x1'));var htmlToText=require(_0x9336('0x2'));var utils=require(_0x9336('0x3'));var logger=require('../../../../config/logger')(_0x9336('0x4'));var gotoif=schema({'condition':{'type':_0x9336('0x5'),'required':!![],'message':_0x9336('0x6')},'priorityTrue':{'type':_0x9336('0x7'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x9336('0x7'),'message':_0x9336('0x8')}});exports['consequence']=function(_0x1ec071,_0x2f8781){return function(_0x4f1b5f){try{var _0x5a3c94={'condition':htmlToText[_0x9336('0x9')](utils[_0x9336('0xa')](_0x2f8781[0x0],this),{'wordwrap':![]})[_0x9336('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x2f8781[0x1],'priorityFalse':_0x2f8781[0x2]};var _0xceb06d=gotoif[_0x9336('0x0')](_0x5a3c94,{'typecast':!![]});if(_0xceb06d['length']){logger['error']('[%s][GOTOIF]\x20%s',_0x1ec071,_[_0x9336('0xc')](_0xceb06d,_0x9336('0xd'))[_0x9336('0xe')](',\x20'));_0x4f1b5f['stop']();}else{try{var _0x5d2a8e=eval('('+_0x5a3c94[_0x9336('0xf')]+')');var _0x1b21ec=_0x5d2a8e?_0x5a3c94['priorityTrue']:_0x5a3c94[_0x9336('0x10')];logger[_0x9336('0x11')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x1ec071,_0x5a3c94['condition'],_0x5d2a8e,_0x1b21ec||_0x9336('0x12'));if(_0x1b21ec){var _0x36a82f=_[_0x9336('0x13')](_0x4f1b5f[_0x9336('0x14')](),{'p':_0x1b21ec});if(_0x36a82f>=0x0){logger[_0x9336('0x11')](_0x9336('0x15'),_0x1ec071,_0x1b21ec||_0x9336('0x12'),_0x36a82f);_0x4f1b5f[_0x9336('0x12')](_0x36a82f);}else{logger[_0x9336('0x11')](_0x9336('0x16'),_0x1ec071,_0x1b21ec||_0x9336('0x12'));_0x4f1b5f[_0x9336('0x17')]();}}else{_0x4f1b5f[_0x9336('0x12')]();}}catch(_0x50710a){logger[_0x9336('0x18')](_0x9336('0x19'),_0x1ec071,_0x50710a[_0x9336('0xd')]);_0x4f1b5f['stop']();}}}catch(_0x232a75){logger[_0x9336('0x18')]('[%s][GOTOIF]\x20%s',_0x1ec071,JSON['stringify'](_0x232a75));_0x4f1b5f['stop']();}};};
\ No newline at end of file
+var _0x1dad=['[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','routing','priority\x20true\x20is\x20a\x20number','number','priority\x20false\x20is\x20a\x20number','consequence','getMustacheRender','replace','length','[%s][GOTOIF]\x20%s','map','message','join','stop','condition','priorityFalse','info','next','findIndex'];(function(_0xcde4da,_0xaafd17){var _0x2052b7=function(_0x461574){while(--_0x461574){_0xcde4da['push'](_0xcde4da['shift']());}};_0x2052b7(++_0xaafd17);}(_0x1dad,0x1df));var _0xd1da=function(_0x3502db,_0x350792){_0x3502db=_0x3502db-0x0;var _0x4b8b5f=_0x1dad[_0x3502db];return _0x4b8b5f;};'use strict';var schema=require(_0xd1da('0x0'));var _=require(_0xd1da('0x1'));var htmlToText=require(_0xd1da('0x2'));var utils=require('./utils');var logger=require('../../../../config/logger')(_0xd1da('0x3'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':'number','message':_0xd1da('0x4')},'priorityFalse':{'type':_0xd1da('0x5'),'message':_0xd1da('0x6')}});exports[_0xd1da('0x7')]=function(_0x1f0a50,_0x3f409c){return function(_0x76ab4f){try{var _0x2b9bdd={'condition':htmlToText['fromString'](utils[_0xd1da('0x8')](_0x3f409c[0x0],this),{'wordwrap':![]})[_0xd1da('0x9')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x3f409c[0x1],'priorityFalse':_0x3f409c[0x2]};var _0xed736f=gotoif[_0xd1da('0x0')](_0x2b9bdd,{'typecast':!![]});if(_0xed736f[_0xd1da('0xa')]){logger['error'](_0xd1da('0xb'),_0x1f0a50,_[_0xd1da('0xc')](_0xed736f,_0xd1da('0xd'))[_0xd1da('0xe')](',\x20'));_0x76ab4f[_0xd1da('0xf')]();}else{try{var _0x1e5f50=eval('('+_0x2b9bdd[_0xd1da('0x10')]+')');var _0x39cf08=_0x1e5f50?_0x2b9bdd['priorityTrue']:_0x2b9bdd[_0xd1da('0x11')];logger[_0xd1da('0x12')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x1f0a50,_0x2b9bdd[_0xd1da('0x10')],_0x1e5f50,_0x39cf08||_0xd1da('0x13'));if(_0x39cf08){var _0x201ec2=_[_0xd1da('0x14')](_0x76ab4f['rules'](),{'p':_0x39cf08});if(_0x201ec2>=0x0){logger[_0xd1da('0x12')](_0xd1da('0x15'),_0x1f0a50,_0x39cf08||_0xd1da('0x13'),_0x201ec2);_0x76ab4f[_0xd1da('0x13')](_0x201ec2);}else{logger[_0xd1da('0x12')]('[%s][GOTOIF]\x20priority\x20%s\x20not\x20found',_0x1f0a50,_0x39cf08||_0xd1da('0x13'));_0x76ab4f['stop']();}}else{_0x76ab4f[_0xd1da('0x13')]();}}catch(_0x39a789){logger[_0xd1da('0x16')](_0xd1da('0x17'),_0x1f0a50,_0x39a789[_0xd1da('0xd')]);_0x76ab4f['stop']();}}}catch(_0x2b882f){logger['error'](_0xd1da('0xb'),_0x1f0a50,JSON[_0xd1da('0x18')](_0x2b882f));_0x76ab4f['stop']();}};};
\ No newline at end of file