Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / agi / graph / index.js
index d633e31..4c0cdd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6ae2=['no\x20vertex\x20found','stop\x20traverse','length','condition','split','agicommand','vswitch','target','default','invalid','includes','max\x20retry\x20reach','exports','lodash','../../../config/logger','agi','menu','getdigits','getsecretdigits','vertices','edges','numberOfEdges','addVertex','prototype','addEdge','push','size','relations','traverseBFS','info'];(function(_0x4744b1,_0x1f53ed){var _0xa1e07=function(_0x3a1e89){while(--_0x3a1e89){_0x4744b1['push'](_0x4744b1['shift']());}};_0xa1e07(++_0x1f53ed);}(_0x6ae2,0x1ed));var _0x26ae=function(_0x4673eb,_0x2defb1){_0x4673eb=_0x4673eb-0x0;var _0x10a792=_0x6ae2[_0x4673eb];return _0x10a792;};'use strict';var _=require(_0x26ae('0x0'));var logger=require(_0x26ae('0x1'))(_0x26ae('0x2'));var verticesWithRetry=[_0x26ae('0x3'),_0x26ae('0x4'),_0x26ae('0x5')];var Graph=function(){this[_0x26ae('0x6')]={};this[_0x26ae('0x7')]={};this[_0x26ae('0x8')]=0x0;};Graph['prototype'][_0x26ae('0x9')]=function(_0x408677){this['vertices'][_0x408677['id']]=_0x408677;this['edges'][_0x408677['id']]=[];};Graph[_0x26ae('0xa')][_0x26ae('0xb')]=function(_0x473907,_0x151de3,_0x3bc9de){this[_0x26ae('0x7')][_0x473907][_0x26ae('0xc')]({'target':_0x151de3,'condition':_0x3bc9de});this[_0x26ae('0x8')]+=0x1;};Graph[_0x26ae('0xa')][_0x26ae('0xd')]=function(){return _[_0x26ae('0xd')](this[_0x26ae('0x6')]);};Graph['prototype'][_0x26ae('0xe')]=function(){return this['numberOfEdges'];};Graph[_0x26ae('0xa')]['getVertex']=function(_0x4cb715){return this[_0x26ae('0x6')][_0x4cb715];};Graph[_0x26ae('0xa')][_0x26ae('0xf')]=function(_0x17f9a6,_0x286b7e){if(!this[_0x26ae('0x6')][_0x17f9a6]){return logger[_0x26ae('0x10')](_0x26ae('0x11'));}var _0x2390a7=_0x286b7e(this[_0x26ae('0x6')][_0x17f9a6]);if(!_0x2390a7){return logger[_0x26ae('0x10')](_0x26ae('0x12'));}if(this['edges'][_0x17f9a6][_0x26ae('0x13')]===0x0){return logger[_0x26ae('0x10')]('no\x20edge/s\x20available');}for(var _0x444397=0x0,_0x3426d8=[],_0x4f71d8=![];_0x444397<this[_0x26ae('0x7')][_0x17f9a6][_0x26ae('0x13')];_0x444397+=0x1){if(this[_0x26ae('0x7')][_0x17f9a6][_0x444397][_0x26ae('0x14')]){_0x3426d8=this[_0x26ae('0x7')][_0x17f9a6][_0x444397][_0x26ae('0x14')][_0x26ae('0x15')](',');for(var _0x1e5cf5=0x0;_0x1e5cf5<_0x3426d8[_0x26ae('0x13')];_0x1e5cf5+=0x1){if(this[_0x26ae('0x6')][_0x17f9a6][_0x26ae('0x16')]===_0x26ae('0x17')&&_0x3426d8[_0x1e5cf5]==='-'){_0x4f71d8=this[_0x26ae('0x7')][_0x17f9a6][_0x444397][_0x26ae('0x18')];logger[_0x26ae('0x10')](_0x26ae('0x19'),_0x3426d8[_0x1e5cf5],this[_0x26ae('0x7')][_0x17f9a6][_0x444397][_0x26ae('0x18')]);}else if(this['vertices'][_0x17f9a6]['agicommand']===_0x26ae('0x3')&&_0x3426d8[_0x1e5cf5]==='i'){_0x4f71d8=this['edges'][_0x17f9a6][_0x444397][_0x26ae('0x18')];logger['info'](_0x26ae('0x1a'),_0x3426d8[_0x1e5cf5],this[_0x26ae('0x7')][_0x17f9a6][_0x444397][_0x26ae('0x18')]);}if(_0x3426d8[_0x1e5cf5]===_0x2390a7){return this['traverseBFS'](this['edges'][_0x17f9a6][_0x444397][_0x26ae('0x18')],_0x286b7e);}}}else{return this[_0x26ae('0xf')](this[_0x26ae('0x7')][_0x17f9a6][_0x444397]['target'],_0x286b7e);}}if(_0x3426d8[_0x26ae('0x13')]){if(this[_0x26ae('0x6')][_0x17f9a6]['agicommand']===_0x26ae('0x17')){if(_0x4f71d8){return this[_0x26ae('0xf')](_0x4f71d8,_0x286b7e);}return logger[_0x26ae('0x10')]('default\x20on\x20switch\x20not\x20found');}else if(_[_0x26ae('0x1b')](verticesWithRetry,this['vertices'][_0x17f9a6][_0x26ae('0x16')])){if(_0x2390a7==='-'){return logger[_0x26ae('0x10')](_0x26ae('0x1c'));}if(_0x4f71d8&&_0x2390a7!=='t'){return this['traverseBFS'](_0x4f71d8,_0x286b7e);}return this[_0x26ae('0xf')](_0x17f9a6,_0x286b7e);}return logger['info']('condition\x20not\x20found');}};module[_0x26ae('0x1d')]=Graph;
\ No newline at end of file
+var _0x8caf=['prototype','addVertex','edges','addEdge','size','getVertex','traverseBFS','info','no\x20vertex\x20found','stop\x20traverse','length','no\x20edge/s\x20available','condition','split','agicommand','vswitch','target','default','invalid','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','../../../config/logger','agi','menu','getdigits','getsecretdigits','vertices','numberOfEdges'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8caf,0x1ab));var _0xf8ca=function(_0x19aa84,_0x549537){_0x19aa84=_0x19aa84-0x0;var _0x536146=_0x8caf[_0x19aa84];return _0x536146;};'use strict';var _=require('lodash');var logger=require(_0xf8ca('0x0'))(_0xf8ca('0x1'));var verticesWithRetry=[_0xf8ca('0x2'),_0xf8ca('0x3'),_0xf8ca('0x4')];var Graph=function(){this[_0xf8ca('0x5')]={};this['edges']={};this[_0xf8ca('0x6')]=0x0;};Graph[_0xf8ca('0x7')][_0xf8ca('0x8')]=function(_0x195791){this[_0xf8ca('0x5')][_0x195791['id']]=_0x195791;this[_0xf8ca('0x9')][_0x195791['id']]=[];};Graph['prototype'][_0xf8ca('0xa')]=function(_0x3abd58,_0x3a91d3,_0x31300c){this['edges'][_0x3abd58]['push']({'target':_0x3a91d3,'condition':_0x31300c});this[_0xf8ca('0x6')]+=0x1;};Graph['prototype'][_0xf8ca('0xb')]=function(){return _[_0xf8ca('0xb')](this[_0xf8ca('0x5')]);};Graph[_0xf8ca('0x7')]['relations']=function(){return this[_0xf8ca('0x6')];};Graph[_0xf8ca('0x7')][_0xf8ca('0xc')]=function(_0x9d3406){return this['vertices'][_0x9d3406];};Graph[_0xf8ca('0x7')][_0xf8ca('0xd')]=function(_0x485cab,_0x2d022f){if(!this[_0xf8ca('0x5')][_0x485cab]){return logger[_0xf8ca('0xe')](_0xf8ca('0xf'));}var _0x267b7d=_0x2d022f(this[_0xf8ca('0x5')][_0x485cab]);if(!_0x267b7d){return logger[_0xf8ca('0xe')](_0xf8ca('0x10'));}if(this[_0xf8ca('0x9')][_0x485cab][_0xf8ca('0x11')]===0x0){return logger['info'](_0xf8ca('0x12'));}for(var _0x28bd93=0x0,_0x7d545c=[],_0x12e8f0=![];_0x28bd93<this[_0xf8ca('0x9')][_0x485cab][_0xf8ca('0x11')];_0x28bd93+=0x1){if(this[_0xf8ca('0x9')][_0x485cab][_0x28bd93][_0xf8ca('0x13')]){_0x7d545c=this['edges'][_0x485cab][_0x28bd93][_0xf8ca('0x13')][_0xf8ca('0x14')](',');for(var _0x17eefa=0x0;_0x17eefa<_0x7d545c[_0xf8ca('0x11')];_0x17eefa+=0x1){if(this['vertices'][_0x485cab][_0xf8ca('0x15')]===_0xf8ca('0x16')&&_0x7d545c[_0x17eefa]==='-'){_0x12e8f0=this[_0xf8ca('0x9')][_0x485cab][_0x28bd93][_0xf8ca('0x17')];logger[_0xf8ca('0xe')](_0xf8ca('0x18'),_0x7d545c[_0x17eefa],this['edges'][_0x485cab][_0x28bd93][_0xf8ca('0x17')]);}else if(this['vertices'][_0x485cab][_0xf8ca('0x15')]===_0xf8ca('0x2')&&_0x7d545c[_0x17eefa]==='i'){_0x12e8f0=this[_0xf8ca('0x9')][_0x485cab][_0x28bd93][_0xf8ca('0x17')];logger[_0xf8ca('0xe')](_0xf8ca('0x19'),_0x7d545c[_0x17eefa],this['edges'][_0x485cab][_0x28bd93]['target']);}if(_0x7d545c[_0x17eefa]===_0x267b7d){return this[_0xf8ca('0xd')](this[_0xf8ca('0x9')][_0x485cab][_0x28bd93]['target'],_0x2d022f);}}}else{return this['traverseBFS'](this[_0xf8ca('0x9')][_0x485cab][_0x28bd93][_0xf8ca('0x17')],_0x2d022f);}}if(_0x7d545c[_0xf8ca('0x11')]){if(this[_0xf8ca('0x5')][_0x485cab][_0xf8ca('0x15')]===_0xf8ca('0x16')){if(_0x12e8f0){return this['traverseBFS'](_0x12e8f0,_0x2d022f);}return logger[_0xf8ca('0xe')](_0xf8ca('0x1a'));}else if(_[_0xf8ca('0x1b')](verticesWithRetry,this[_0xf8ca('0x5')][_0x485cab][_0xf8ca('0x15')])){if(_0x267b7d==='-'){return logger[_0xf8ca('0xe')](_0xf8ca('0x1c'));}if(_0x12e8f0&&_0x267b7d!=='t'){return this['traverseBFS'](_0x12e8f0,_0x2d022f);}return this['traverseBFS'](_0x485cab,_0x2d022f);}return logger[_0xf8ca('0xe')](_0xf8ca('0x1d'));}};module[_0xf8ca('0x1e')]=Graph;
\ No newline at end of file