Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / services / routing / server / applications / gotoif.js
index e48c794..e703baa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62d1=['lodash','html-to-text','./utils','../../../../config/logger','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','fromString','replace','length','[%s][GOTOIF]\x20%s','map','join','stop','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','message','validate'];(function(_0x4bbbf1,_0x1b5b25){var _0x20ee84=function(_0x42b9ba){while(--_0x42b9ba){_0x4bbbf1['push'](_0x4bbbf1['shift']());}};_0x20ee84(++_0x1b5b25);}(_0x62d1,0x167));var _0x162d=function(_0xfd2dd2,_0x41e8d6){_0xfd2dd2=_0xfd2dd2-0x0;var _0x3f28f1=_0x62d1[_0xfd2dd2];return _0x3f28f1;};'use strict';var schema=require(_0x162d('0x0'));var _=require(_0x162d('0x1'));var htmlToText=require(_0x162d('0x2'));var utils=require(_0x162d('0x3'));var logger=require(_0x162d('0x4'))(_0x162d('0x5'));var gotoif=schema({'condition':{'type':_0x162d('0x6'),'required':!![],'message':_0x162d('0x7')},'priorityTrue':{'type':_0x162d('0x8'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x162d('0x8'),'message':_0x162d('0x9')}});exports[_0x162d('0xa')]=function(_0x528e84,_0x69af1c){return function(_0x2976c5){try{var _0x1af975={'condition':htmlToText[_0x162d('0xb')](utils['getMustacheRender'](_0x69af1c[0x0],this),{'wordwrap':![]})[_0x162d('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x69af1c[0x1],'priorityFalse':_0x69af1c[0x2]};var _0x3981b5=gotoif[_0x162d('0x0')](_0x1af975,{'typecast':!![]});if(_0x3981b5[_0x162d('0xd')]){logger['error'](_0x162d('0xe'),_0x528e84,_[_0x162d('0xf')](_0x3981b5,'message')[_0x162d('0x10')](',\x20'));_0x2976c5[_0x162d('0x11')]();}else{try{var _0x504dba=eval('('+_0x1af975[_0x162d('0x12')]+')');var _0x4c7c70=_0x504dba?_0x1af975[_0x162d('0x13')]:_0x1af975[_0x162d('0x14')];logger[_0x162d('0x15')](_0x162d('0x16'),_0x528e84,_0x1af975[_0x162d('0x12')],_0x504dba,_0x4c7c70||'next');if(_0x4c7c70){var _0x28940b=_['findIndex'](_0x2976c5[_0x162d('0x17')](),{'p':_0x4c7c70});if(_0x28940b>=0x0){logger['info'](_0x162d('0x18'),_0x528e84,_0x4c7c70||_0x162d('0x19'),_0x28940b);_0x2976c5['next'](_0x28940b);}else{logger[_0x162d('0x15')](_0x162d('0x1a'),_0x528e84,_0x4c7c70||_0x162d('0x19'));_0x2976c5[_0x162d('0x11')]();}}else{_0x2976c5[_0x162d('0x19')]();}}catch(_0x51c4d2){logger[_0x162d('0x1b')](_0x162d('0x1c'),_0x528e84,_0x51c4d2[_0x162d('0x1d')]);_0x2976c5[_0x162d('0x11')]();}}}catch(_0x268fc4){logger[_0x162d('0x1b')](_0x162d('0xe'),_0x528e84,JSON['stringify'](_0x268fc4));_0x2976c5[_0x162d('0x11')]();}};};
\ No newline at end of file
+var _0x4039=['validate','lodash','html-to-text','../../../../config/logger','routing','string','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','length','error','map','message','stop','condition','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','[%s][GOTOIF]\x20%s'];(function(_0x17882c,_0x4b964b){var _0x355a59=function(_0x534b5b){while(--_0x534b5b){_0x17882c['push'](_0x17882c['shift']());}};_0x355a59(++_0x4b964b);}(_0x4039,0x134));var _0x9403=function(_0x152121,_0x120c53){_0x152121=_0x152121-0x0;var _0x592a85=_0x4039[_0x152121];return _0x592a85;};'use strict';var schema=require(_0x9403('0x0'));var _=require(_0x9403('0x1'));var htmlToText=require(_0x9403('0x2'));var utils=require('./utils');var logger=require(_0x9403('0x3'))(_0x9403('0x4'));var gotoif=schema({'condition':{'type':_0x9403('0x5'),'required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':_0x9403('0x6'),'message':_0x9403('0x7')},'priorityFalse':{'type':_0x9403('0x6'),'message':_0x9403('0x8')}});exports[_0x9403('0x9')]=function(_0x1e9813,_0x564c23){return function(_0x280f33){try{var _0x203ebc={'condition':htmlToText[_0x9403('0xa')](utils[_0x9403('0xb')](_0x564c23[0x0],this),{'wordwrap':![]})[_0x9403('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x564c23[0x1],'priorityFalse':_0x564c23[0x2]};var _0x1e3f24=gotoif[_0x9403('0x0')](_0x203ebc,{'typecast':!![]});if(_0x1e3f24[_0x9403('0xd')]){logger[_0x9403('0xe')]('[%s][GOTOIF]\x20%s',_0x1e9813,_[_0x9403('0xf')](_0x1e3f24,_0x9403('0x10'))['join'](',\x20'));_0x280f33[_0x9403('0x11')]();}else{try{var _0xabf9c2=eval('('+_0x203ebc[_0x9403('0x12')]+')');var _0x33da52=_0xabf9c2?_0x203ebc['priorityTrue']:_0x203ebc[_0x9403('0x13')];logger[_0x9403('0x14')](_0x9403('0x15'),_0x1e9813,_0x203ebc[_0x9403('0x12')],_0xabf9c2,_0x33da52||_0x9403('0x16'));if(_0x33da52){var _0x3877a3=_['findIndex'](_0x280f33[_0x9403('0x17')](),{'p':_0x33da52});if(_0x3877a3>=0x0){logger['info'](_0x9403('0x18'),_0x1e9813,_0x33da52||_0x9403('0x16'),_0x3877a3);_0x280f33[_0x9403('0x16')](_0x3877a3);}else{logger['info'](_0x9403('0x19'),_0x1e9813,_0x33da52||_0x9403('0x16'));_0x280f33[_0x9403('0x11')]();}}else{_0x280f33['next']();}}catch(_0x56cd06){logger[_0x9403('0xe')](_0x9403('0x1a'),_0x1e9813,_0x56cd06[_0x9403('0x10')]);_0x280f33[_0x9403('0x11')]();}}}catch(_0x190bab){logger[_0x9403('0xe')](_0x9403('0x1b'),_0x1e9813,JSON['stringify'](_0x190bab));_0x280f33['stop']();}};};
\ No newline at end of file