Built motion from commit d6d69adf.|2.6.33
[motion2.git] / server / services / routing / server / applications / gotop.js
index 18fc450..7b1f416 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x843f=['number','consequence','validate','error','[%s][GOTOP]\x20%s','map','message','join','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','lodash'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x843f,0xef));var _0xf843=function(_0x53fb6,_0x86681b){_0x53fb6=_0x53fb6-0x0;var _0x2bdcf9=_0x843f[_0x53fb6];return _0x2bdcf9;};'use strict';var schema=require('validate');var _=require(_0xf843('0x0'));var logger=require('../../../../config/logger')('routing');var gotop=schema({'priority':{'type':_0xf843('0x1'),'required':!![],'message':'priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'}});exports[_0xf843('0x2')]=function(_0x12cb5d,_0x2e68f1){return function(_0x1c7f59){try{var _0x383996={'priority':_0x2e68f1[0x0]};var _0x306f67=gotop[_0xf843('0x3')](_0x383996,{'typecast':!![]});if(_0x306f67['length']){logger[_0xf843('0x4')](_0xf843('0x5'),_0x12cb5d,_[_0xf843('0x6')](_0x306f67,_0xf843('0x7'))[_0xf843('0x8')](',\x20'));_0x1c7f59['stop']();}else{logger[_0xf843('0x9')](_0xf843('0xa'),_0x12cb5d,_0x383996[_0xf843('0xb')]);if(_0x383996[_0xf843('0xb')]){var _0x3b8bad=_['findIndex'](_0x1c7f59[_0xf843('0xc')](),{'p':_0x383996[_0xf843('0xb')]});if(_0x3b8bad>=0x0){logger['info'](_0xf843('0xd'),_0x12cb5d,_0x383996[_0xf843('0xb')]||_0xf843('0xe'),_0x3b8bad);_0x1c7f59[_0xf843('0xe')](_0x3b8bad);}else{logger[_0xf843('0x9')](_0xf843('0xf'),_0x12cb5d,_0x383996['priority']||_0xf843('0xe'));_0x1c7f59['stop']();}}else{_0x1c7f59['next']();}}}catch(_0x596f8e){logger[_0xf843('0x4')](_0xf843('0x5'),_0x12cb5d,JSON['stringify'](_0x596f8e));_0x1c7f59['stop']();}};};
\ No newline at end of file
+var _0xc063=['stop','error','[%s][GOTOP]\x20%s','stringify','validate','lodash','../../../../config/logger','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','length','map','message','join','info','priority','findIndex','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found'];(function(_0x32eb20,_0x3366c2){var _0x1492b5=function(_0x17b654){while(--_0x17b654){_0x32eb20['push'](_0x32eb20['shift']());}};_0x1492b5(++_0x3366c2);}(_0xc063,0x1cc));var _0x3c06=function(_0x460ae8,_0x3f0ee9){_0x460ae8=_0x460ae8-0x0;var _0x4d2a87=_0xc063[_0x460ae8];return _0x4d2a87;};'use strict';var schema=require(_0x3c06('0x0'));var _=require(_0x3c06('0x1'));var logger=require(_0x3c06('0x2'))('routing');var gotop=schema({'priority':{'type':_0x3c06('0x3'),'required':!![],'message':_0x3c06('0x4')}});exports['consequence']=function(_0x555710,_0x5b7c20){return function(_0x47ae30){try{var _0x597086={'priority':_0x5b7c20[0x0]};var _0xd66893=gotop[_0x3c06('0x0')](_0x597086,{'typecast':!![]});if(_0xd66893[_0x3c06('0x5')]){logger['error']('[%s][GOTOP]\x20%s',_0x555710,_[_0x3c06('0x6')](_0xd66893,_0x3c06('0x7'))[_0x3c06('0x8')](',\x20'));_0x47ae30['stop']();}else{logger[_0x3c06('0x9')]('[%s][GOTOP]\x20priority\x20%s',_0x555710,_0x597086['priority']);if(_0x597086[_0x3c06('0xa')]){var _0x4a4435=_[_0x3c06('0xb')](_0x47ae30['rules'](),{'p':_0x597086[_0x3c06('0xa')]});if(_0x4a4435>=0x0){logger['info'](_0x3c06('0xc'),_0x555710,_0x597086['priority']||_0x3c06('0xd'),_0x4a4435);_0x47ae30[_0x3c06('0xd')](_0x4a4435);}else{logger[_0x3c06('0x9')](_0x3c06('0xe'),_0x555710,_0x597086[_0x3c06('0xa')]||_0x3c06('0xd'));_0x47ae30[_0x3c06('0xf')]();}}else{_0x47ae30[_0x3c06('0xd')]();}}}catch(_0x29e721){logger[_0x3c06('0x10')](_0x3c06('0x11'),_0x555710,JSON[_0x3c06('0x12')](_0x29e721));_0x47ae30['stop']();}};};
\ No newline at end of file