Built motion from commit a679711e.|2.6.15
[motion2.git] / server / services / routing / server / index.js
index 10147fa..b66f1fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc4c=['listen','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','bluebird','uuid','./applications/utils','routing','../rpc/openchannelQueueReport','../rpc/smsQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','isNil','IntervalId','Intervals','map','interval','rules','message','interaction','applications','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','channel','mail','push','slice','dialogflow','split','amazonlex','tag','TagId','account','notificationTemplate','ContactId','body','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','stringify','matchPath','complete','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','emit','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server'];(function(_0x594c52,_0x3615b0){var _0x20a77e=function(_0x3c28a8){while(--_0x3c28a8){_0x594c52['push'](_0x594c52['shift']());}};_0x20a77e(++_0x3615b0);}(_0xfc4c,0xca));var _0xcfc4=function(_0x5a899f,_0x351771){_0x5a899f=_0x5a899f-0x0;var _0x5679de=_0xfc4c[_0x5a899f];return _0x5679de;};'use strict';var _=require(_0xcfc4('0x0'));var util=require(_0xcfc4('0x1'));var path=require(_0xcfc4('0x2'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0xcfc4('0x3'));var uuid=require(_0xcfc4('0x4'));var utils=require(_0xcfc4('0x5'));var config=require('../../../config/environment');var logger=require('../../../config/logger')(_0xcfc4('0x6'));var rpc={'openchannelQueueReport':require(_0xcfc4('0x7')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0xcfc4('0x8')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require(_0xcfc4('0x9'))};var RuleEngine=require(_0xcfc4('0xa'));function getId(_0x520566,_0x13b9f6,_0x57e2f5){return util['format']('%s.%s.%s',_0x520566,_0x13b9f6||0x0,_0x57e2f5||0x0);}function getIntervals(_0x1ce9e8,_0x2d8256){var _0x584f17=[];if(!_[_0xcfc4('0xb')](_0x2d8256['IntervalId'])&&!_['isNil'](_0x1ce9e8[_0x2d8256[_0xcfc4('0xc')]])&&!_[_0xcfc4('0xb')](_0x1ce9e8[_0x2d8256[_0xcfc4('0xc')]][_0xcfc4('0xd')])){_0x584f17=_[_0xcfc4('0xe')](_0x1ce9e8[_0x2d8256['IntervalId']][_0xcfc4('0xd')],'interval');}else if(!_[_0xcfc4('0xb')](_0x2d8256['interval'])){_0x584f17=[_0x2d8256[_0xcfc4('0xf')]];}return _0x584f17;}exports['listen']=function(_0x57fffb){_0x57fffb[_0xcfc4('0x10')]={};return new BPromise(function(_0x40029f,_0x588dd1){var _0x407cd6={'Start':function(_0x391d92){var _0x39f8f1=this;return new Promise(function(_0x4bb1f3,_0x5af66f){if(_0x391d92){try{var _0xe4c5bd=[];var _0x47db36=getId(_0x391d92['channel'],_0x391d92['message']?_0x391d92[_0xcfc4('0x11')]['id']:0x0,_0x391d92['interaction']?_0x391d92[_0xcfc4('0x12')]['id']:0x0);if(_0x391d92[_0xcfc4('0x13')]&&_['isArray'](_0x391d92[_0xcfc4('0x13')])&&_0x391d92[_0xcfc4('0x13')][_0xcfc4('0x14')]){for(var _0x520dae=0x0;_0x520dae<_0x391d92[_0xcfc4('0x13')][_0xcfc4('0x14')];_0x520dae+=0x1){var _0x2aec71=_0x391d92['applications'][_0x520dae];if(fs[_0xcfc4('0x15')](path[_0xcfc4('0x16')](__dirname,_0xcfc4('0x13'),_0x2aec71[_0xcfc4('0x17')]+_0xcfc4('0x18')))){var _0x3e6839=[];switch(_0x2aec71[_0xcfc4('0x17')][_0xcfc4('0x19')]()){case _0xcfc4('0x1a'):var _0x42ef35=_0x2aec71[_0xcfc4('0x1b')]['split'](',');if(_0x391d92[_0xcfc4('0x1c')]===_0xcfc4('0x1d')){_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[0x0]);_0x3e6839['push'](_0x42ef35[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x42ef35['slice'](0x2,_0x42ef35[_0xcfc4('0x14')])[_0xcfc4('0x16')](','));}else{_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[_0xcfc4('0x1f')](0x1,_0x42ef35[_0xcfc4('0x14')])['join'](','));}break;case _0xcfc4('0x20'):var _0x347f15=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x347f15[0x0]);_0x3e6839['push'](_0x347f15[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x347f15[_0xcfc4('0x1f')](0x2,_0x347f15[_0xcfc4('0x14')])[_0xcfc4('0x16')](','));break;case'dialogflowv2':var _0x4c65fc=_0x2aec71['appdata'][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x2]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[_0xcfc4('0x1f')](0x4,_0x4c65fc['length'])[_0xcfc4('0x16')](','));break;case _0xcfc4('0x22'):var _0x28a085=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x28a085[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x28a085[0x1]);_0x3e6839['push'](_0x28a085[0x2]);_0x3e6839['push'](_0x28a085[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x28a085[_0xcfc4('0x1f')](0x4,_0x28a085[_0xcfc4('0x14')])['join'](','));break;case _0xcfc4('0x11'):_0x3e6839[_0xcfc4('0x1e')](_0x2aec71['appdata']);break;case _0xcfc4('0x23'):_0x3e6839[_0xcfc4('0x1e')](_0x2aec71[_0xcfc4('0x24')]);_0x3e6839[_0xcfc4('0x1e')](_0x2aec71[_0xcfc4('0x1b')]);break;case'tvox':var _0x3d59c8=utils['getMustacheRender'](_0x391d92[_0xcfc4('0x25')][_0xcfc4('0x26')],_0x391d92);var _0x3ac6ea=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x2]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x4]);_0x3e6839['push'](_0x3ac6ea[0x5]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x6]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x7]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x8]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x9]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0xa]);_0x3e6839['push'](_0x391d92[_0xcfc4('0x12')]['id']);_0x3e6839['push'](_0x391d92[_0xcfc4('0x11')]['id']);_0x3e6839[_0xcfc4('0x1e')](_0x2aec71['ChatWebsiteId']);_0x3e6839['push'](_0x391d92['interaction'][_0xcfc4('0x27')]);_0x3e6839['push'](_0x391d92[_0xcfc4('0x28')][_0xcfc4('0x28')]);_0x3e6839['push'](_0x3d59c8);break;default:_0x3e6839=_[_0xcfc4('0xb')](_0x2aec71[_0xcfc4('0x1b')])?[]:_0x2aec71[_0xcfc4('0x1b')]['split'](',');}var _0x15b89f={'id':util['format'](_0xcfc4('0x29'),_0x47db36,_0x2aec71['id'],_0x2aec71[_0xcfc4('0x17')]),'condition':require(_0xcfc4('0x2a'))[_0xcfc4('0x2b')](_0x47db36,getIntervals(_0x57fffb[_0xcfc4('0x2c')],_0x2aec71),_0x57fffb),'consequence':require(_0xcfc4('0x2d')+_0x2aec71[_0xcfc4('0x17')])[_0xcfc4('0x2e')](_0x47db36,_0x3e6839,_0x57fffb,_0x391d92),'p':_0x2aec71['priority']||0x0};logger['info'](_0xcfc4('0x2f'),_0x15b89f['id'],_0xcfc4('0x30'),getIntervals(_0x57fffb['intervals'],_0x2aec71)[_0xcfc4('0x16')](_0xcfc4('0x31')));_0xe4c5bd['push'](_0x15b89f);}else{logger[_0xcfc4('0x32')](_0xcfc4('0x33'),path[_0xcfc4('0x16')](__dirname,_0xcfc4('0x13'),_0x2aec71['app']+_0xcfc4('0x18')));}}_0x57fffb[_0xcfc4('0x10')][_0x47db36]=new RuleEngine(_0xe4c5bd);_0x57fffb[_0xcfc4('0x10')][_0x47db36][_0xcfc4('0x34')](_0x391d92,function(_0x329029){logger['info'](_0xcfc4('0x35'),JSON[_0xcfc4('0x36')](_0x329029[_0xcfc4('0x37')]));if(_0x57fffb[_0xcfc4('0x10')][_0x47db36]){_0x57fffb['rules'][_0x47db36]['emit'](_0xcfc4('0x38'));}});return _0x4bb1f3({'code':0xc8,'message':_0x391d92});}else{logger['info'](_0xcfc4('0x39'));return _0x4bb1f3({'code':0xc8,'message':_0x391d92});}}catch(_0x7464ed){logger[_0xcfc4('0x32')](_0x7464ed[_0xcfc4('0x3a')]);return _0x5af66f(_0x39f8f1['error'](0x1f4,_0x7464ed));}}return _0x5af66f(_0xcfc4('0x3b'));});},'AcceptMessage':function(_0x11e8aa){var _0x68ea0d=this;return new Promise(function(_0x5018a3,_0x1bac85){if(_0x11e8aa[_0xcfc4('0x3c')]&&_0x11e8aa[_0xcfc4('0x3c')]['id']){if(_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']]){_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3e')]=![];_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3f')]=undefined;}}if(_0x11e8aa['message']&&_0x11e8aa['message']['id']){try{var _0x127889=getId(_0x11e8aa['channel'],_0x11e8aa[_0xcfc4('0x11')]?_0x11e8aa[_0xcfc4('0x11')]['id']:0x0,_0x11e8aa[_0xcfc4('0x12')]?_0x11e8aa[_0xcfc4('0x12')]['id']:0x0);if(_0x57fffb[_0xcfc4('0x10')][_0x127889]){_0x57fffb[_0xcfc4('0x10')][_0x127889][_0xcfc4('0x40')](_0xcfc4('0x41'));if(rpc[_0x11e8aa['channel']+_0xcfc4('0x42')]){rpc[_0x11e8aa[_0xcfc4('0x1c')]+_0xcfc4('0x42')][_0xcfc4('0x43')](_0x127889,{'UserId':_0x11e8aa['message'][_0xcfc4('0x44')]})[_0xcfc4('0x45')](function(_0x42ffe2){logger[_0xcfc4('0x32')](_0xcfc4('0x46'));});}}return _0x5018a3({'code':0xc8,'message':_0x11e8aa});}catch(_0x38d89d){logger['error'](_0x38d89d[_0xcfc4('0x3a')]);return _0x1bac85(_0x68ea0d[_0xcfc4('0x32')](0x1f4,_0x38d89d));}}logger['error']('message\x20is\x20empty');return _0x1bac85(_0x68ea0d[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'RejectMessage':function(_0x137804){var _0x4d5551=this;return new Promise(function(_0x3d7981,_0x44d0e5){if(_0x137804[_0xcfc4('0x3c')]&&_0x137804['agent']['id']){try{if(_0x57fffb['agents'][_0x137804[_0xcfc4('0x3c')]['id']]){_0x57fffb[_0xcfc4('0x3d')][_0x137804[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3e')]=![];_0x57fffb[_0xcfc4('0x3d')][_0x137804['agent']['id']][_0xcfc4('0x3f')]=undefined;}return _0x3d7981({'code':0xc8,'message':_0x137804});}catch(_0x1f2116){logger[_0xcfc4('0x32')](_0x1f2116[_0xcfc4('0x3a')]);return _0x44d0e5(_0x4d5551['error'](0x1f4,_0x1f2116));}}logger[_0xcfc4('0x32')](_0xcfc4('0x47'));return _0x44d0e5(_0x4d5551[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'AbandonInteraction':function(_0x1718fb){var _0x49aa5a=this;return new Promise(function(_0x51c637,_0x20ddf6){if(_0x1718fb[_0xcfc4('0x1c')]&&_0x1718fb[_0xcfc4('0x12')]&&_0x1718fb[_0xcfc4('0x12')]['id']){try{var _0x2e0019=getId(_0x1718fb['channel'],_0x1718fb['message']?_0x1718fb['message']['id']:0x0,_0x1718fb['interaction']?_0x1718fb[_0xcfc4('0x12')]['id']:0x0);if(_0x57fffb['rules'][_0x2e0019]){_0x57fffb[_0xcfc4('0x10')][_0x2e0019]['emit'](_0xcfc4('0x41'));}return _0x51c637({'code':0xc8,'message':_0x1718fb});}catch(_0x508c0f){logger[_0xcfc4('0x32')](_0x508c0f[_0xcfc4('0x3a')]);return _0x20ddf6(_0x49aa5a[_0xcfc4('0x32')](0x1f4,_0x508c0f));}}logger[_0xcfc4('0x32')](_0xcfc4('0x47'));return _0x20ddf6(_0x49aa5a[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'AgentCapacity':function(_0x1e0a33){var _0x4baa0e=this;return new Promise(function(_0x3f19d0,_0x31a253){if(_0x57fffb[_0xcfc4('0x3d')]['hasOwnProperty'](_0x1e0a33['id'])){for(var _0x4edf39 in _0x1e0a33[_0xcfc4('0x48')]){if(_0x1e0a33['capacity'][_0xcfc4('0x49')](_0x4edf39)){if(_0x57fffb['agents'][_0x1e0a33['id']][_0xcfc4('0x49')](_0x4edf39+_0xcfc4('0x4a'))){_0x57fffb[_0xcfc4('0x3d')][_0x1e0a33['id']][_0x4edf39+'CurrentCapacity']=parseInt(_0x1e0a33['capacity'][_0x4edf39],0xa);}}}_0x57fffb['agents'][_0x1e0a33['id']][_0xcfc4('0x4b')]();return _0x3f19d0({'code':0xc8,'message':_0x57fffb[_0xcfc4('0x3d')][_0x1e0a33['id']]});}else{return _0x31a253(_0x4baa0e['error'](0x1f4,_0xcfc4('0x4c')));}});},'Agents':function(_0x18c87c){return new Promise(function(_0x22049a,_0x2ff874){var _0x336800=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x3d')]);_0x22049a({'count':_0x336800[_0xcfc4('0x14')],'rows':_0x336800});});},'ChatQueues':function(_0x54802b){return new Promise(function(_0x30d118,_0x25174d){var _0x569a5e=[];for(var _0x522939 in _0x57fffb[_0xcfc4('0x4e')]){if(_0x57fffb[_0xcfc4('0x4e')]['hasOwnProperty'](_0x522939)){var _0x55e73c=_0x57fffb[_0xcfc4('0x4e')][_0x522939];var _0x582ee1={'id':_0x55e73c['id'],'available':_0x55e73c[_0xcfc4('0x4f')],'loggedIn':_0x55e73c[_0xcfc4('0x50')],'name':_0x55e73c[_0xcfc4('0x51')],'paused':_0x55e73c[_0xcfc4('0x52')],'waiting':_0x55e73c[_0xcfc4('0x53')]};_0x569a5e[_0xcfc4('0x1e')](_0x582ee1);}}_0x30d118({'count':_0x569a5e['length'],'rows':_0x569a5e});});},'MailQueues':function(_0x2fd03c){return new Promise(function(_0x5a5c7d,_0x839c74){var _0x582630=[];for(var _0x40d671 in _0x57fffb[_0xcfc4('0x54')]){if(_0x57fffb['mailQueues'][_0xcfc4('0x49')](_0x40d671)){var _0x57e093=_0x57fffb[_0xcfc4('0x54')][_0x40d671];var _0x24a42f={'id':_0x57e093['id'],'available':_0x57e093[_0xcfc4('0x4f')],'loggedIn':_0x57e093[_0xcfc4('0x50')],'name':_0x57e093[_0xcfc4('0x51')],'paused':_0x57e093[_0xcfc4('0x52')],'waiting':_0x57e093[_0xcfc4('0x53')]};_0x582630[_0xcfc4('0x1e')](_0x24a42f);}}_0x5a5c7d({'count':_0x582630[_0xcfc4('0x14')],'rows':_0x582630});});},'OpenchannelQueues':function(_0x306748){return new Promise(function(_0x5ad449,_0x3245e4){var _0x5455dd=[];for(var _0x1c5519 in _0x57fffb['openchannelQueues']){if(_0x57fffb[_0xcfc4('0x55')]['hasOwnProperty'](_0x1c5519)){var _0x1b7708=_0x57fffb['openchannelQueues'][_0x1c5519];var _0x484993={'id':_0x1b7708['id'],'available':_0x1b7708[_0xcfc4('0x4f')],'loggedIn':_0x1b7708[_0xcfc4('0x50')],'name':_0x1b7708[_0xcfc4('0x51')],'paused':_0x1b7708['paused'],'waiting':_0x1b7708[_0xcfc4('0x53')]};_0x5455dd[_0xcfc4('0x1e')](_0x484993);}}_0x5ad449({'count':_0x5455dd['length'],'rows':_0x5455dd});});},'SmsQueues':function(_0x32fafc){return new Promise(function(_0x495329,_0x272ee8){var _0xa51dce=[];for(var _0x2a4c90 in _0x57fffb[_0xcfc4('0x56')]){if(_0x57fffb[_0xcfc4('0x56')]['hasOwnProperty'](_0x2a4c90)){var _0x2aaad2=_0x57fffb[_0xcfc4('0x56')][_0x2a4c90];var _0x1a13bb={'id':_0x2aaad2['id'],'available':_0x2aaad2[_0xcfc4('0x4f')],'loggedIn':_0x2aaad2['loggedIn'],'name':_0x2aaad2[_0xcfc4('0x51')],'paused':_0x2aaad2[_0xcfc4('0x52')],'waiting':_0x2aaad2[_0xcfc4('0x53')]};_0xa51dce[_0xcfc4('0x1e')](_0x1a13bb);}}_0x495329({'count':_0xa51dce[_0xcfc4('0x14')],'rows':_0xa51dce});});},'FaxQueues':function(_0x2fcbb8){return new Promise(function(_0xa1c5f2,_0x36d305){var _0x25f42b=[];for(var _0x4bef20 in _0x57fffb[_0xcfc4('0x57')]){if(_0x57fffb['faxQueues'][_0xcfc4('0x49')](_0x4bef20)){var _0x1b8a2b=_0x57fffb['faxQueues'][_0x4bef20];var _0xcae1b2={'id':_0x1b8a2b['id'],'available':_0x1b8a2b['available'],'loggedIn':_0x1b8a2b['loggedIn'],'name':_0x1b8a2b[_0xcfc4('0x51')],'paused':_0x1b8a2b['paused'],'waiting':_0x1b8a2b[_0xcfc4('0x53')]};_0x25f42b[_0xcfc4('0x1e')](_0xcae1b2);}}_0xa1c5f2({'count':_0x25f42b[_0xcfc4('0x14')],'rows':_0x25f42b});});},'WhatsappQueues':function(_0x250789){return new Promise(function(_0x252594,_0x4b6358){var _0x40edea=[];for(var _0x1959e0 in _0x57fffb[_0xcfc4('0x58')]){if(_0x57fffb[_0xcfc4('0x58')]['hasOwnProperty'](_0x1959e0)){var _0x24809b=_0x57fffb[_0xcfc4('0x58')][_0x1959e0];var _0x51d4e0={'id':_0x24809b['id'],'available':_0x24809b['available'],'loggedIn':_0x24809b[_0xcfc4('0x50')],'name':_0x24809b[_0xcfc4('0x51')],'paused':_0x24809b[_0xcfc4('0x52')],'waiting':_0x24809b[_0xcfc4('0x53')]};_0x40edea[_0xcfc4('0x1e')](_0x51d4e0);}}_0x252594({'count':_0x40edea[_0xcfc4('0x14')],'rows':_0x40edea});});},'ChatQueuesWaitingInteractions':function(_0x42eaad){return new Promise(function(_0x11259b,_0x1b6438){var _0x3fabc6=_['values'](_0x57fffb[_0xcfc4('0x59')]);_0x11259b({'count':_0x3fabc6[_0xcfc4('0x14')],'rows':_0x3fabc6});});},'MailQueuesWaitingInteractions':function(_0x3c4889){return new Promise(function(_0x1937a1,_0x353bec){var _0x481083=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5a')]);_0x1937a1({'count':_0x481083[_0xcfc4('0x14')],'rows':_0x481083});});},'OpenchannelQueuesWaitingInteractions':function(_0x1373f6){return new Promise(function(_0x4cbb68,_0x1d1ebe){var _0xde585d=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5b')]);_0x4cbb68({'count':_0xde585d[_0xcfc4('0x14')],'rows':_0xde585d});});},'SmsQueuesWaitingInteractions':function(_0x3f3664){return new Promise(function(_0x1f39bc,_0x4d6dfb){var _0x59d996=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5c')]);_0x1f39bc({'count':_0x59d996[_0xcfc4('0x14')],'rows':_0x59d996});});},'FaxQueuesWaitingInteractions':function(_0x4d86a8){return new Promise(function(_0x157b3b,_0x1dc62f){var _0x1d7ed4=_[_0xcfc4('0x4d')](_0x57fffb['faxQueuesWaitingInteractions']);_0x157b3b({'count':_0x1d7ed4[_0xcfc4('0x14')],'rows':_0x1d7ed4});});},'WhatsappQueuesWaitingInteractions':function(_0x24b1bd){return new Promise(function(_0x27199a,_0x40ce03){var _0x2d6065=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5d')]);_0x27199a({'count':_0x2d6065[_0xcfc4('0x14')],'rows':_0x2d6065});});}};var _0x71653f=jayson[_0xcfc4('0x5e')](_0x407cd6)['http']();_0x71653f['on']('error',function(_0x232afe){logger['error'](JSON[_0xcfc4('0x36')](_0x232afe));return _0x588dd1(_0x232afe);});_0x71653f[_0xcfc4('0x5f')](0x232c,'127.0.0.1',function(){console[_0xcfc4('0x60')](_0xcfc4('0x61'),0x232c);return _0x40029f(_0xcfc4('0x62')+0x232c);});});};
\ No newline at end of file
+var _0x0325=['name','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','faxQueuesWaitingInteractions','server','http','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','./applications/utils','../../../config/logger','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','IntervalId','isNil','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','applications','length','existsSync','join','app','toLowerCase','autoreply','split','mail','push','slice','dialogflow','appdata','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','ContactId','body','./interval','intervals','consequence','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','.js','execute','stringify','matchPath','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agents','agent','busy','emit','QueueReport','UserId','error\x20update\x20queue\x20report','message\x20is\x20empty','busyQueue','end','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','paused','mailQueues','loggedIn'];(function(_0x468a77,_0x1382be){var _0x2d1c33=function(_0x2f2e83){while(--_0x2f2e83){_0x468a77['push'](_0x468a77['shift']());}};_0x2d1c33(++_0x1382be);}(_0x0325,0x71));var _0x5032=function(_0x15d5e7,_0x5979f7){_0x15d5e7=_0x15d5e7-0x0;var _0x3bfb0a=_0x0325[_0x15d5e7];return _0x3bfb0a;};'use strict';var _=require(_0x5032('0x0'));var util=require(_0x5032('0x1'));var path=require(_0x5032('0x2'));var fs=require('fs');var jayson=require(_0x5032('0x3'));var BPromise=require(_0x5032('0x4'));var utils=require(_0x5032('0x5'));var sUtils=require('./applications/strategy/util');var logger=require(_0x5032('0x6'))('routing');var rpc={'openchannelQueueReport':require('../rpc/openchannelQueueReport'),'mailQueueReport':require(_0x5032('0x7')),'chatQueueReport':require(_0x5032('0x8')),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0x5032('0x9')),'whatsappQueueReport':require(_0x5032('0xa'))};var RuleEngine=require(_0x5032('0xb'));function getId(_0x307133,_0x20ee60,_0x1567f2){return util[_0x5032('0xc')]('%s.%s.%s',_0x307133,_0x20ee60||0x0,_0x1567f2||0x0);}function getIntervals(_0x2af4ea,_0x2be816){var _0x3eec28=[];if(!_['isNil'](_0x2be816['IntervalId'])&&!_['isNil'](_0x2af4ea[_0x2be816[_0x5032('0xd')]])&&!_[_0x5032('0xe')](_0x2af4ea[_0x2be816['IntervalId']][_0x5032('0xf')])){_0x3eec28=_[_0x5032('0x10')](_0x2af4ea[_0x2be816[_0x5032('0xd')]][_0x5032('0xf')],_0x5032('0x11'));}else if(!_['isNil'](_0x2be816[_0x5032('0x11')])){_0x3eec28=[_0x2be816['interval']];}return _0x3eec28;}exports[_0x5032('0x12')]=function(_0x34397d){_0x34397d[_0x5032('0x13')]={};return new BPromise(function(_0x4a7bd0,_0x19d663){var _0xa7d285={'Start':function(_0x59310d){var _0x1c608c=this;return new Promise(function(_0x545e75,_0x48a3ae){if(_0x59310d){try{var _0x5e5f72=[];var _0x128e39=getId(_0x59310d[_0x5032('0x14')],_0x59310d[_0x5032('0x15')]?_0x59310d[_0x5032('0x15')]['id']:0x0,_0x59310d[_0x5032('0x16')]?_0x59310d[_0x5032('0x16')]['id']:0x0);var _0xdcf6d8=sUtils[_0x5032('0x17')](_0x34397d,_0x59310d);if(!_0xdcf6d8&&_0x59310d[_0x5032('0x18')]&&_['isArray'](_0x59310d[_0x5032('0x18')])&&_0x59310d[_0x5032('0x18')][_0x5032('0x19')]){for(var _0x47ad46=0x0;_0x47ad46<_0x59310d[_0x5032('0x18')]['length'];_0x47ad46+=0x1){var _0x4d1498=_0x59310d[_0x5032('0x18')][_0x47ad46];if(fs[_0x5032('0x1a')](path[_0x5032('0x1b')](__dirname,_0x5032('0x18'),_0x4d1498[_0x5032('0x1c')]+'.js'))){var _0x4f3d2d=[];switch(_0x4d1498[_0x5032('0x1c')][_0x5032('0x1d')]()){case _0x5032('0x1e'):var _0x180435=_0x4d1498['appdata'][_0x5032('0x1f')](',');if(_0x59310d[_0x5032('0x14')]===_0x5032('0x20')){_0x4f3d2d[_0x5032('0x21')](_0x180435[0x0]);_0x4f3d2d['push'](_0x180435[0x1]);_0x4f3d2d[_0x5032('0x21')](_0x180435[_0x5032('0x22')](0x2,_0x180435[_0x5032('0x19')])[_0x5032('0x1b')](','));}else{_0x4f3d2d[_0x5032('0x21')](_0x180435[0x0]);_0x4f3d2d['push'](_0x180435[_0x5032('0x22')](0x1,_0x180435[_0x5032('0x19')])[_0x5032('0x1b')](','));}break;case _0x5032('0x23'):var _0xa79d75=_0x4d1498[_0x5032('0x24')]['split'](',');_0x4f3d2d[_0x5032('0x21')](_0xa79d75[0x0]);_0x4f3d2d['push'](_0xa79d75[0x1]);_0x4f3d2d['push'](_0xa79d75['slice'](0x2,_0xa79d75[_0x5032('0x19')])[_0x5032('0x1b')](','));break;case _0x5032('0x25'):var _0x13ecb4=_0x4d1498[_0x5032('0x24')]['split'](',');_0x4f3d2d['push'](_0x13ecb4[0x0]);_0x4f3d2d[_0x5032('0x21')](_0x13ecb4[0x1]);_0x4f3d2d[_0x5032('0x21')](_0x13ecb4[0x2]);_0x4f3d2d['push'](_0x13ecb4[0x3]);_0x4f3d2d['push'](_0x13ecb4[_0x5032('0x22')](0x4,_0x13ecb4[_0x5032('0x19')])[_0x5032('0x1b')](','));break;case _0x5032('0x26'):var _0x1213c2=_0x4d1498[_0x5032('0x24')][_0x5032('0x1f')](',');_0x4f3d2d[_0x5032('0x21')](_0x1213c2[0x0]);_0x4f3d2d[_0x5032('0x21')](_0x1213c2[0x1]);_0x4f3d2d['push'](_0x1213c2[0x2]);_0x4f3d2d[_0x5032('0x21')](_0x1213c2[0x3]);_0x4f3d2d[_0x5032('0x21')](_0x1213c2[_0x5032('0x22')](0x4,_0x1213c2['length'])[_0x5032('0x1b')](','));break;case'message':_0x4f3d2d[_0x5032('0x21')](_0x4d1498[_0x5032('0x24')]);break;case _0x5032('0x27'):_0x4f3d2d[_0x5032('0x21')](_0x4d1498[_0x5032('0x28')]);_0x4f3d2d['push'](_0x4d1498['appdata']);break;case _0x5032('0x29'):var _0x21570f=utils[_0x5032('0x2a')](_0x59310d[_0x5032('0x2b')][_0x5032('0x2c')],_0x59310d);var _0x14fc09=_0x4d1498['appdata']['split'](',');_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x0]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x1]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x2]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x3]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x4]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x5]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x6]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x7]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x8]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0x9]);_0x4f3d2d[_0x5032('0x21')](_0x14fc09[0xa]);_0x4f3d2d[_0x5032('0x21')](_0x59310d[_0x5032('0x16')]['id']);_0x4f3d2d[_0x5032('0x21')](_0x59310d['message']['id']);_0x4f3d2d[_0x5032('0x21')](_0x4d1498['ChatWebsiteId']);_0x4f3d2d['push'](_0x59310d['interaction'][_0x5032('0x2d')]);_0x4f3d2d[_0x5032('0x21')](_0x59310d[_0x5032('0x2e')]['body']);_0x4f3d2d[_0x5032('0x21')](_0x21570f);break;default:_0x4f3d2d=_['isNil'](_0x4d1498['appdata'])?[]:_0x4d1498['appdata'][_0x5032('0x1f')](',');}var _0x7ea58c={'id':util[_0x5032('0xc')]('%s:%s:%s',_0x128e39,_0x4d1498['id'],_0x4d1498['app']),'condition':require(_0x5032('0x2f'))['condition'](_0x128e39,getIntervals(_0x34397d[_0x5032('0x30')],_0x4d1498),_0x34397d),'consequence':require('./applications/'+_0x4d1498[_0x5032('0x1c')])[_0x5032('0x31')](_0x128e39,_0x4f3d2d,_0x34397d,_0x59310d),'p':_0x4d1498['priority']||0x0};logger[_0x5032('0x32')](_0x5032('0x33'),_0x7ea58c['id'],_0x5032('0x34'),getIntervals(_0x34397d[_0x5032('0x30')],_0x4d1498)[_0x5032('0x1b')](_0x5032('0x35')));_0x5e5f72[_0x5032('0x21')](_0x7ea58c);}else{logger[_0x5032('0x36')]('Please\x20create\x20a\x20new\x20file\x20under',path['join'](__dirname,'applications',_0x4d1498['app']+_0x5032('0x37')));}}_0x34397d[_0x5032('0x13')][_0x128e39]=new RuleEngine(_0x5e5f72);_0x34397d['rules'][_0x128e39][_0x5032('0x38')](_0x59310d,function(_0x1b9839){logger[_0x5032('0x32')]('Applications\x20executed',JSON[_0x5032('0x39')](_0x1b9839[_0x5032('0x3a')]));if(_0x34397d[_0x5032('0x13')][_0x128e39]){_0x34397d[_0x5032('0x13')][_0x128e39]['emit']('complete');}});return _0x545e75({'code':0xc8,'message':_0x59310d});}else{if(_0xdcf6d8){logger[_0x5032('0x32')](util[_0x5032('0xc')](_0x5032('0x3b'),_0x128e39));}else{logger[_0x5032('0x32')](_0x5032('0x3c'));}return _0x545e75({'code':0xc8,'message':_0x59310d});}}catch(_0xad274c){logger[_0x5032('0x36')](_0xad274c[_0x5032('0x3d')]);return _0x48a3ae(_0x1c608c['error'](0x1f4,_0xad274c));}}return _0x48a3ae(_0x5032('0x3e'));});},'AcceptMessage':function(_0x2d1b7c){var _0x1989e4=this;return new Promise(function(_0x249ee7,_0x1788b4){if(_0x2d1b7c['agent']&&_0x2d1b7c['agent']['id']){if(_0x34397d[_0x5032('0x3f')][_0x2d1b7c[_0x5032('0x40')]['id']]){_0x34397d[_0x5032('0x3f')][_0x2d1b7c['agent']['id']][_0x5032('0x41')]=![];_0x34397d[_0x5032('0x3f')][_0x2d1b7c[_0x5032('0x40')]['id']]['busyQueue']=undefined;}}if(_0x2d1b7c[_0x5032('0x15')]&&_0x2d1b7c[_0x5032('0x15')]['id']){try{var _0x464d84=getId(_0x2d1b7c['channel'],_0x2d1b7c[_0x5032('0x15')]?_0x2d1b7c[_0x5032('0x15')]['id']:0x0,_0x2d1b7c[_0x5032('0x16')]?_0x2d1b7c[_0x5032('0x16')]['id']:0x0);if(_0x34397d[_0x5032('0x13')][_0x464d84]){_0x34397d[_0x5032('0x13')][_0x464d84][_0x5032('0x42')]('end');if(rpc[_0x2d1b7c['channel']+_0x5032('0x43')]){rpc[_0x2d1b7c[_0x5032('0x14')]+'QueueReport']['update'](_0x464d84,{'UserId':_0x2d1b7c[_0x5032('0x15')][_0x5032('0x44')]})['catch'](function(){logger[_0x5032('0x36')](_0x5032('0x45'));});}}return _0x249ee7({'code':0xc8,'message':_0x2d1b7c});}catch(_0xa38ce3){logger['error'](_0xa38ce3[_0x5032('0x3d')]);return _0x1788b4(_0x1989e4['error'](0x1f4,_0xa38ce3));}}logger['error'](_0x5032('0x46'));return _0x1788b4(_0x1989e4['error'](0x1f4,_0x5032('0x46')));});},'RejectMessage':function(_0x15d17c){var _0x25dc96=this;return new Promise(function(_0x4e2b04,_0x49a7a2){if(_0x15d17c[_0x5032('0x40')]&&_0x15d17c[_0x5032('0x40')]['id']){try{if(_0x34397d[_0x5032('0x3f')][_0x15d17c[_0x5032('0x40')]['id']]){_0x34397d[_0x5032('0x3f')][_0x15d17c[_0x5032('0x40')]['id']][_0x5032('0x41')]=![];_0x34397d[_0x5032('0x3f')][_0x15d17c[_0x5032('0x40')]['id']][_0x5032('0x47')]=undefined;}return _0x4e2b04({'code':0xc8,'message':_0x15d17c});}catch(_0x38ba32){logger[_0x5032('0x36')](_0x38ba32[_0x5032('0x3d')]);return _0x49a7a2(_0x25dc96['error'](0x1f4,_0x38ba32));}}logger[_0x5032('0x36')](_0x5032('0x46'));return _0x49a7a2(_0x25dc96[_0x5032('0x36')](0x1f4,_0x5032('0x46')));});},'AbandonInteraction':function(_0x1a45ae){var _0x28cf30=this;return new Promise(function(_0x32fc69,_0x1652ff){if(_0x1a45ae[_0x5032('0x14')]&&_0x1a45ae['interaction']&&_0x1a45ae[_0x5032('0x16')]['id']){try{var _0x3d226c=getId(_0x1a45ae['channel'],_0x1a45ae['message']?_0x1a45ae['message']['id']:0x0,_0x1a45ae[_0x5032('0x16')]?_0x1a45ae[_0x5032('0x16')]['id']:0x0);if(_0x34397d['rules'][_0x3d226c]){_0x34397d['rules'][_0x3d226c]['emit'](_0x5032('0x48'));}return _0x32fc69({'code':0xc8,'message':_0x1a45ae});}catch(_0x4f1417){logger[_0x5032('0x36')](_0x4f1417[_0x5032('0x3d')]);return _0x1652ff(_0x28cf30['error'](0x1f4,_0x4f1417));}}logger[_0x5032('0x36')]('message\x20is\x20empty');return _0x1652ff(_0x28cf30[_0x5032('0x36')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x13f8c1){var _0x4a10eb=this;return new Promise(function(_0xc04a4,_0x370c0f){if(_0x34397d['agents']['hasOwnProperty'](_0x13f8c1['id'])){for(var _0x4f2191 in _0x13f8c1[_0x5032('0x49')]){if(_0x13f8c1[_0x5032('0x49')][_0x5032('0x4a')](_0x4f2191)){if(_0x34397d[_0x5032('0x3f')][_0x13f8c1['id']][_0x5032('0x4a')](_0x4f2191+_0x5032('0x4b'))){_0x34397d[_0x5032('0x3f')][_0x13f8c1['id']][_0x4f2191+_0x5032('0x4b')]=parseInt(_0x13f8c1[_0x5032('0x49')][_0x4f2191],0xa);}}}_0x34397d[_0x5032('0x3f')][_0x13f8c1['id']][_0x5032('0x4c')]();return _0xc04a4({'code':0xc8,'message':_0x34397d[_0x5032('0x3f')][_0x13f8c1['id']]});}else{return _0x370c0f(_0x4a10eb['error'](0x1f4,_0x5032('0x4d')));}});},'Agents':function(_0x70fb9a){return new Promise(function(_0x230262){var _0x5ca335=_[_0x5032('0x4e')](_0x34397d[_0x5032('0x3f')]);if(_0x70fb9a&&_0x70fb9a['id']){var _0x26127a=_[_0x5032('0x4f')](_0x5ca335,function(_0x2c0fe9){return _0x2c0fe9['id']===_0x70fb9a['id'];});_0x230262(_0x26127a);}else{_0x230262({'count':_0x5ca335[_0x5032('0x19')],'rows':_0x5ca335});}});},'ChatQueues':function(){return new Promise(function(_0x47afe4){var _0x29be6b=[];for(var _0x42afc7 in _0x34397d['chatQueues']){if(_0x34397d[_0x5032('0x50')][_0x5032('0x4a')](_0x42afc7)){var _0x480d39=_0x34397d[_0x5032('0x50')][_0x42afc7];var _0x1640d2={'id':_0x480d39['id'],'available':_0x480d39[_0x5032('0x51')],'loggedIn':_0x480d39['loggedIn'],'name':_0x480d39['name'],'paused':_0x480d39[_0x5032('0x52')],'waiting':_0x480d39['waiting']};_0x29be6b[_0x5032('0x21')](_0x1640d2);}}_0x47afe4({'count':_0x29be6b[_0x5032('0x19')],'rows':_0x29be6b});});},'MailQueues':function(){return new Promise(function(_0x3b0ef5){var _0x3b976d=[];for(var _0x3521d5 in _0x34397d['mailQueues']){if(_0x34397d[_0x5032('0x53')]['hasOwnProperty'](_0x3521d5)){var _0x3634c1=_0x34397d[_0x5032('0x53')][_0x3521d5];var _0x2087fb={'id':_0x3634c1['id'],'available':_0x3634c1['available'],'loggedIn':_0x3634c1[_0x5032('0x54')],'name':_0x3634c1[_0x5032('0x55')],'paused':_0x3634c1[_0x5032('0x52')],'waiting':_0x3634c1[_0x5032('0x56')]};_0x3b976d[_0x5032('0x21')](_0x2087fb);}}_0x3b0ef5({'count':_0x3b976d[_0x5032('0x19')],'rows':_0x3b976d});});},'OpenchannelQueues':function(){return new Promise(function(_0x34ffec){var _0x2e5693=[];for(var _0x10b504 in _0x34397d[_0x5032('0x57')]){if(_0x34397d['openchannelQueues'][_0x5032('0x4a')](_0x10b504)){var _0x11dd8f=_0x34397d[_0x5032('0x57')][_0x10b504];var _0x48777d={'id':_0x11dd8f['id'],'available':_0x11dd8f['available'],'loggedIn':_0x11dd8f[_0x5032('0x54')],'name':_0x11dd8f[_0x5032('0x55')],'paused':_0x11dd8f[_0x5032('0x52')],'waiting':_0x11dd8f['waiting']};_0x2e5693[_0x5032('0x21')](_0x48777d);}}_0x34ffec({'count':_0x2e5693[_0x5032('0x19')],'rows':_0x2e5693});});},'SmsQueues':function(){return new Promise(function(_0x43427c){var _0x827b36=[];for(var _0xdaf668 in _0x34397d['smsQueues']){if(_0x34397d['smsQueues'][_0x5032('0x4a')](_0xdaf668)){var _0x554b9b=_0x34397d[_0x5032('0x58')][_0xdaf668];var _0xb486e6={'id':_0x554b9b['id'],'available':_0x554b9b[_0x5032('0x51')],'loggedIn':_0x554b9b[_0x5032('0x54')],'name':_0x554b9b[_0x5032('0x55')],'paused':_0x554b9b[_0x5032('0x52')],'waiting':_0x554b9b[_0x5032('0x56')]};_0x827b36['push'](_0xb486e6);}}_0x43427c({'count':_0x827b36['length'],'rows':_0x827b36});});},'FaxQueues':function(){return new Promise(function(_0x2f3a40){var _0x15cf5d=[];for(var _0x487098 in _0x34397d[_0x5032('0x59')]){if(_0x34397d['faxQueues'][_0x5032('0x4a')](_0x487098)){var _0x2a28f1=_0x34397d[_0x5032('0x59')][_0x487098];var _0x27e092={'id':_0x2a28f1['id'],'available':_0x2a28f1[_0x5032('0x51')],'loggedIn':_0x2a28f1[_0x5032('0x54')],'name':_0x2a28f1[_0x5032('0x55')],'paused':_0x2a28f1['paused'],'waiting':_0x2a28f1['waiting']};_0x15cf5d[_0x5032('0x21')](_0x27e092);}}_0x2f3a40({'count':_0x15cf5d[_0x5032('0x19')],'rows':_0x15cf5d});});},'WhatsappQueues':function(){return new Promise(function(_0x3106d4){var _0x1876c3=[];for(var _0x4abe77 in _0x34397d['whatsappQueues']){if(_0x34397d[_0x5032('0x5a')][_0x5032('0x4a')](_0x4abe77)){var _0x4b5432=_0x34397d[_0x5032('0x5a')][_0x4abe77];var _0x171a5c={'id':_0x4b5432['id'],'available':_0x4b5432[_0x5032('0x51')],'loggedIn':_0x4b5432['loggedIn'],'name':_0x4b5432['name'],'paused':_0x4b5432[_0x5032('0x52')],'waiting':_0x4b5432[_0x5032('0x56')]};_0x1876c3[_0x5032('0x21')](_0x171a5c);}}_0x3106d4({'count':_0x1876c3['length'],'rows':_0x1876c3});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x359b35){var _0x417b82=_[_0x5032('0x4e')](_0x34397d[_0x5032('0x5b')]);_0x359b35({'count':_0x417b82[_0x5032('0x19')],'rows':_0x417b82});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x22c7c8){var _0x56a2d9=_['values'](_0x34397d[_0x5032('0x5c')]);_0x22c7c8({'count':_0x56a2d9[_0x5032('0x19')],'rows':_0x56a2d9});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x2b327c){var _0x4b4845=_['values'](_0x34397d['openchannelQueuesWaitingInteractions']);_0x2b327c({'count':_0x4b4845[_0x5032('0x19')],'rows':_0x4b4845});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x1b4548){var _0x503e13=_[_0x5032('0x4e')](_0x34397d['smsQueuesWaitingInteractions']);_0x1b4548({'count':_0x503e13[_0x5032('0x19')],'rows':_0x503e13});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x225ec1){var _0x419c35=_[_0x5032('0x4e')](_0x34397d[_0x5032('0x5d')]);_0x225ec1({'count':_0x419c35['length'],'rows':_0x419c35});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x176b22){var _0xc33570=_['values'](_0x34397d['whatsappQueuesWaitingInteractions']);_0x176b22({'count':_0xc33570[_0x5032('0x19')],'rows':_0xc33570});});}};var _0x4f8de5=jayson[_0x5032('0x5e')](_0xa7d285)[_0x5032('0x5f')]();_0x4f8de5['on'](_0x5032('0x36'),function(_0x3ff3b2){logger['error'](JSON[_0x5032('0x39')](_0x3ff3b2));return _0x19d663(_0x3ff3b2);});_0x4f8de5['listen'](0x232c,'127.0.0.1',function(){console[_0x5032('0x60')](_0x5032('0x61'),0x232c);return _0x4a7bd0(_0x5032('0x62')+0x232c);});});};
\ No newline at end of file