Built motion from commit (unavailable).|2.3.91
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 8a9589b..291076e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f47=['message','[%s][GOTOIF]\x20%s','validate','lodash','html-to-text','./utils','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','fromString','getMustacheRender','replace','error','map','join','stop','condition','priorityTrue','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','findIndex','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s'];(function(_0x16bb0a,_0x1861f9){var _0x46800a=function(_0x275a50){while(--_0x275a50){_0x16bb0a['push'](_0x16bb0a['shift']());}};_0x46800a(++_0x1861f9);}(_0x9f47,0x152));var _0x79f4=function(_0x20815f,_0x471ee0){_0x20815f=_0x20815f-0x0;var _0x2431b5=_0x9f47[_0x20815f];return _0x2431b5;};'use strict';var schema=require(_0x79f4('0x0'));var _=require(_0x79f4('0x1'));var htmlToText=require(_0x79f4('0x2'));var utils=require(_0x79f4('0x3'));var logger=require('../../../../config/logger')(_0x79f4('0x4'));var gotoif=schema({'condition':{'type':_0x79f4('0x5'),'required':!![],'message':_0x79f4('0x6')},'priorityTrue':{'type':_0x79f4('0x7'),'message':_0x79f4('0x8')},'priorityFalse':{'type':'number','message':'priority\x20false\x20is\x20a\x20number'}});exports['consequence']=function(_0x3f3ce0,_0x4760b2){return function(_0x115d78){try{var _0x464b11={'condition':htmlToText[_0x79f4('0x9')](utils[_0x79f4('0xa')](_0x4760b2[0x0],this),{'wordwrap':![]})[_0x79f4('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x4760b2[0x1],'priorityFalse':_0x4760b2[0x2]};var _0x195658=gotoif[_0x79f4('0x0')](_0x464b11,{'typecast':!![]});if(_0x195658['length']){logger[_0x79f4('0xc')]('[%s][GOTOIF]\x20%s',_0x3f3ce0,_[_0x79f4('0xd')](_0x195658,'message')[_0x79f4('0xe')](',\x20'));_0x115d78[_0x79f4('0xf')]();}else{try{var _0x36f61a=eval('('+_0x464b11[_0x79f4('0x10')]+')');var _0x12005e=_0x36f61a?_0x464b11[_0x79f4('0x11')]:_0x464b11['priorityFalse'];logger['info'](_0x79f4('0x12'),_0x3f3ce0,_0x464b11[_0x79f4('0x10')],_0x36f61a,_0x12005e||'next');if(_0x12005e){var _0x406a93=_[_0x79f4('0x13')](_0x115d78[_0x79f4('0x14')](),{'p':_0x12005e});if(_0x406a93>=0x0){logger[_0x79f4('0x15')](_0x79f4('0x16'),_0x3f3ce0,_0x12005e||'next',_0x406a93);_0x115d78[_0x79f4('0x17')](_0x406a93);}else{logger['info'](_0x79f4('0x18'),_0x3f3ce0,_0x12005e||'next');_0x115d78[_0x79f4('0xf')]();}}else{_0x115d78[_0x79f4('0x17')]();}}catch(_0x306ccd){logger[_0x79f4('0xc')](_0x79f4('0x19'),_0x3f3ce0,_0x306ccd[_0x79f4('0x1a')]);_0x115d78[_0x79f4('0xf')]();}}}catch(_0x1deb70){logger['error'](_0x79f4('0x1b'),_0x3f3ce0,JSON['stringify'](_0x1deb70));_0x115d78['stop']();}};};
\ No newline at end of file
+var _0x12b5=['join','stop','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stringify','lodash','html-to-text','./utils','../../../../config/logger','routing','string','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','fromString','getMustacheRender','replace','validate','length','error','[%s][GOTOIF]\x20%s','map','message'];(function(_0x1274b6,_0x5c61b6){var _0x213bcb=function(_0x363ab1){while(--_0x363ab1){_0x1274b6['push'](_0x1274b6['shift']());}};_0x213bcb(++_0x5c61b6);}(_0x12b5,0x1bf));var _0x512b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x12b5[_0x3dd15e];return _0x231fd0;};'use strict';var schema=require('validate');var _=require(_0x512b('0x0'));var htmlToText=require(_0x512b('0x1'));var utils=require(_0x512b('0x2'));var logger=require(_0x512b('0x3'))(_0x512b('0x4'));var gotoif=schema({'condition':{'type':_0x512b('0x5'),'required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':_0x512b('0x6'),'message':_0x512b('0x7')},'priorityFalse':{'type':_0x512b('0x6'),'message':_0x512b('0x8')}});exports['consequence']=function(_0x528a46,_0x2957f0){return function(_0x4c8b8e){try{var _0x21e6d0={'condition':htmlToText[_0x512b('0x9')](utils[_0x512b('0xa')](_0x2957f0[0x0],this),{'wordwrap':![]})[_0x512b('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x2957f0[0x1],'priorityFalse':_0x2957f0[0x2]};var _0x499c97=gotoif[_0x512b('0xc')](_0x21e6d0,{'typecast':!![]});if(_0x499c97[_0x512b('0xd')]){logger[_0x512b('0xe')](_0x512b('0xf'),_0x528a46,_[_0x512b('0x10')](_0x499c97,_0x512b('0x11'))[_0x512b('0x12')](',\x20'));_0x4c8b8e[_0x512b('0x13')]();}else{try{var _0x542d9e=eval('('+_0x21e6d0[_0x512b('0x14')]+')');var _0xcecf43=_0x542d9e?_0x21e6d0[_0x512b('0x15')]:_0x21e6d0[_0x512b('0x16')];logger[_0x512b('0x17')](_0x512b('0x18'),_0x528a46,_0x21e6d0['condition'],_0x542d9e,_0xcecf43||'next');if(_0xcecf43){var _0x54f37d=_[_0x512b('0x19')](_0x4c8b8e[_0x512b('0x1a')](),{'p':_0xcecf43});if(_0x54f37d>=0x0){logger['info'](_0x512b('0x1b'),_0x528a46,_0xcecf43||_0x512b('0x1c'),_0x54f37d);_0x4c8b8e[_0x512b('0x1c')](_0x54f37d);}else{logger[_0x512b('0x17')](_0x512b('0x1d'),_0x528a46,_0xcecf43||_0x512b('0x1c'));_0x4c8b8e['stop']();}}else{_0x4c8b8e[_0x512b('0x1c')]();}}catch(_0x5adc3e){logger[_0x512b('0xe')]('[%s][GOTOIF]\x20eval\x20error:\x20%s',_0x528a46,_0x5adc3e[_0x512b('0x11')]);_0x4c8b8e['stop']();}}}catch(_0x14297b){logger['error']('[%s][GOTOIF]\x20%s',_0x528a46,JSON[_0x512b('0x1e')](_0x14297b));_0x4c8b8e['stop']();}};};
\ No newline at end of file