Built motion from commit 6a0adb95.|2.6.31
[motion2.git] / server / services / routing / server / applications / gotop.js
index 262ae66..2b45df8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x75f0=['routing','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','length','error','[%s][GOTOP]\x20%s','map','join','stop','info','[%s][GOTOP]\x20priority\x20%s','priority','rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','stringify','lodash','../../../../config/logger'];(function(_0x43c6ae,_0x31e9ec){var _0x129ec5=function(_0x55aca2){while(--_0x55aca2){_0x43c6ae['push'](_0x43c6ae['shift']());}};_0x129ec5(++_0x31e9ec);}(_0x75f0,0x18d));var _0x075f=function(_0x2f837d,_0x20606e){_0x2f837d=_0x2f837d-0x0;var _0x3874a3=_0x75f0[_0x2f837d];return _0x3874a3;};'use strict';var schema=require('validate');var _=require(_0x075f('0x0'));var logger=require(_0x075f('0x1'))(_0x075f('0x2'));var gotop=schema({'priority':{'type':_0x075f('0x3'),'required':!![],'message':_0x075f('0x4')}});exports['consequence']=function(_0x113a00,_0x1afbb3){return function(_0xf39e53){try{var _0x220239={'priority':_0x1afbb3[0x0]};var _0x949319=gotop['validate'](_0x220239,{'typecast':!![]});if(_0x949319[_0x075f('0x5')]){logger[_0x075f('0x6')](_0x075f('0x7'),_0x113a00,_[_0x075f('0x8')](_0x949319,'message')[_0x075f('0x9')](',\x20'));_0xf39e53[_0x075f('0xa')]();}else{logger[_0x075f('0xb')](_0x075f('0xc'),_0x113a00,_0x220239['priority']);if(_0x220239[_0x075f('0xd')]){var _0x26ae9f=_['findIndex'](_0xf39e53[_0x075f('0xe')](),{'p':_0x220239[_0x075f('0xd')]});if(_0x26ae9f>=0x0){logger[_0x075f('0xb')](_0x075f('0xf'),_0x113a00,_0x220239['priority']||_0x075f('0x10'),_0x26ae9f);_0xf39e53[_0x075f('0x10')](_0x26ae9f);}else{logger['info'](_0x075f('0x11'),_0x113a00,_0x220239[_0x075f('0xd')]||_0x075f('0x10'));_0xf39e53['stop']();}}else{_0xf39e53[_0x075f('0x10')]();}}}catch(_0x143517){logger[_0x075f('0x6')](_0x075f('0x7'),_0x113a00,JSON[_0x075f('0x12')](_0x143517));_0xf39e53[_0x075f('0xa')]();}};};
\ No newline at end of file
+var _0xb892=['message','join','stop','info','[%s][GOTOP]\x20priority\x20%s','priority','findIndex','rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','error','stringify','validate','lodash','routing','length','[%s][GOTOP]\x20%s','map'];(function(_0x2112d4,_0x3c863c){var _0x434972=function(_0x477020){while(--_0x477020){_0x2112d4['push'](_0x2112d4['shift']());}};_0x434972(++_0x3c863c);}(_0xb892,0x1d5));var _0x2b89=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0xb892[_0xd0b415];return _0x2bdf2c;};'use strict';var schema=require(_0x2b89('0x0'));var _=require(_0x2b89('0x1'));var logger=require('../../../../config/logger')(_0x2b89('0x2'));var gotop=schema({'priority':{'type':'number','required':!![],'message':'priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'}});exports['consequence']=function(_0x3fcc48,_0x2737cb){return function(_0x5d52bc){try{var _0x1b6882={'priority':_0x2737cb[0x0]};var _0x561757=gotop[_0x2b89('0x0')](_0x1b6882,{'typecast':!![]});if(_0x561757[_0x2b89('0x3')]){logger['error'](_0x2b89('0x4'),_0x3fcc48,_[_0x2b89('0x5')](_0x561757,_0x2b89('0x6'))[_0x2b89('0x7')](',\x20'));_0x5d52bc[_0x2b89('0x8')]();}else{logger[_0x2b89('0x9')](_0x2b89('0xa'),_0x3fcc48,_0x1b6882[_0x2b89('0xb')]);if(_0x1b6882['priority']){var _0x463036=_[_0x2b89('0xc')](_0x5d52bc[_0x2b89('0xd')](),{'p':_0x1b6882['priority']});if(_0x463036>=0x0){logger[_0x2b89('0x9')](_0x2b89('0xe'),_0x3fcc48,_0x1b6882[_0x2b89('0xb')]||_0x2b89('0xf'),_0x463036);_0x5d52bc['next'](_0x463036);}else{logger[_0x2b89('0x9')](_0x2b89('0x10'),_0x3fcc48,_0x1b6882[_0x2b89('0xb')]||_0x2b89('0xf'));_0x5d52bc[_0x2b89('0x8')]();}}else{_0x5d52bc[_0x2b89('0xf')]();}}}catch(_0x2e8d03){logger[_0x2b89('0x11')](_0x2b89('0x4'),_0x3fcc48,JSON[_0x2b89('0x12')](_0x2e8d03));_0x5d52bc[_0x2b89('0x8')]();}};};
\ No newline at end of file