Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / services / routing / server / index.js
index d461662..ac750f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc95=['routing','../rpc/openchannelQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','%s.%s.%s','IntervalId','isNil','Intervals','map','interval','channel','message','interaction','transfer','applications','isArray','length','app','.js','toLowerCase','autoreply','appdata','mail','push','slice','join','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','split','ContactId','./interval','condition','intervals','./applications/','consequence','priority','Push\x20new\x20rule','\x20|\x20','Please\x20create\x20a\x20new\x20file\x20under','rules','info','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','error','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','QueueReport','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird'];(function(_0x4044c2,_0x2f2ad6){var _0x15b5fb=function(_0x3f2c5f){while(--_0x3f2c5f){_0x4044c2['push'](_0x4044c2['shift']());}};_0x15b5fb(++_0x2f2ad6);}(_0xbc95,0x1f4));var _0x5bc9=function(_0x1d4bdb,_0x58f77b){_0x1d4bdb=_0x1d4bdb-0x0;var _0x288bea=_0xbc95[_0x1d4bdb];return _0x288bea;};'use strict';var _=require(_0x5bc9('0x0'));var util=require(_0x5bc9('0x1'));var path=require(_0x5bc9('0x2'));var fs=require('fs');var jayson=require(_0x5bc9('0x3'));var BPromise=require(_0x5bc9('0x4'));var utils=require('./applications/utils');var sUtils=require('./applications/strategy/util');var logger=require('../../../config/logger')(_0x5bc9('0x5'));var rpc={'openchannelQueueReport':require(_0x5bc9('0x6')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0x5bc9('0x7')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x5bc9('0x8'));function getId(_0x4bdc20,_0x49ab1a,_0x6cc9f1){return util[_0x5bc9('0x9')](_0x5bc9('0xa'),_0x4bdc20,_0x49ab1a||0x0,_0x6cc9f1||0x0);}function getIntervals(_0x357d27,_0x24d4b3){var _0x2caa35=[];if(!_['isNil'](_0x24d4b3[_0x5bc9('0xb')])&&!_['isNil'](_0x357d27[_0x24d4b3['IntervalId']])&&!_[_0x5bc9('0xc')](_0x357d27[_0x24d4b3['IntervalId']][_0x5bc9('0xd')])){_0x2caa35=_[_0x5bc9('0xe')](_0x357d27[_0x24d4b3[_0x5bc9('0xb')]][_0x5bc9('0xd')],_0x5bc9('0xf'));}else if(!_['isNil'](_0x24d4b3[_0x5bc9('0xf')])){_0x2caa35=[_0x24d4b3[_0x5bc9('0xf')]];}return _0x2caa35;}exports['listen']=function(_0x1e345a){_0x1e345a['rules']={};return new BPromise(function(_0x48a2c2,_0x767740){var _0x11341a={'Start':function(_0x298800){var _0x16cf5f=this;return new Promise(function(_0x443185,_0x33053f){if(_0x298800){try{var _0x5db036=[];var _0x49e2a2=getId(_0x298800[_0x5bc9('0x10')],_0x298800[_0x5bc9('0x11')]?_0x298800['message']['id']:0x0,_0x298800[_0x5bc9('0x12')]?_0x298800[_0x5bc9('0x12')]['id']:0x0);var _0x20e02d=sUtils['checkWaitingNotifications'](_0x1e345a,_0x298800);if(_0x298800[_0x5bc9('0x13')]||!_0x20e02d&&_0x298800[_0x5bc9('0x14')]&&_[_0x5bc9('0x15')](_0x298800['applications'])&&_0x298800[_0x5bc9('0x14')]['length']){for(var _0x102ab2=0x0;_0x102ab2<_0x298800[_0x5bc9('0x14')][_0x5bc9('0x16')];_0x102ab2+=0x1){var _0x242bb4=_0x298800[_0x5bc9('0x14')][_0x102ab2];if(fs['existsSync'](path['join'](__dirname,_0x5bc9('0x14'),_0x242bb4[_0x5bc9('0x17')]+_0x5bc9('0x18')))){var _0x4433ab=[];switch(_0x242bb4[_0x5bc9('0x17')][_0x5bc9('0x19')]()){case _0x5bc9('0x1a'):var _0x37f3aa=_0x242bb4[_0x5bc9('0x1b')]['split'](',');if(_0x298800[_0x5bc9('0x10')]===_0x5bc9('0x1c')){_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x0]);_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x1]);_0x4433ab['push'](_0x37f3aa[_0x5bc9('0x1e')](0x2,_0x37f3aa['length'])[_0x5bc9('0x1f')](','));}else{_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x0]);_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[_0x5bc9('0x1e')](0x1,_0x37f3aa['length'])[_0x5bc9('0x1f')](','));}break;case'dialogflow':var _0x4cb942=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab[_0x5bc9('0x1d')](_0x4cb942[0x0]);_0x4433ab['push'](_0x4cb942[0x1]);_0x4433ab['push'](_0x4cb942[_0x5bc9('0x1e')](0x2,_0x4cb942[_0x5bc9('0x16')])[_0x5bc9('0x1f')](','));break;case _0x5bc9('0x20'):var _0x2ff10a=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab['push'](_0x2ff10a[0x0]);_0x4433ab['push'](_0x2ff10a[0x1]);_0x4433ab['push'](_0x2ff10a[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x2ff10a[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x2ff10a[_0x5bc9('0x1e')](0x4,_0x2ff10a[_0x5bc9('0x16')])[_0x5bc9('0x1f')](','));break;case _0x5bc9('0x21'):var _0x73a4d2=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[0x0]);_0x4433ab['push'](_0x73a4d2[0x1]);_0x4433ab['push'](_0x73a4d2[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[_0x5bc9('0x1e')](0x4,_0x73a4d2['length'])['join'](','));break;case'message':_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x1b')]);break;case _0x5bc9('0x22'):_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x23')]);_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x1b')]);break;case _0x5bc9('0x24'):var _0x4fda67=utils[_0x5bc9('0x25')](_0x298800[_0x5bc9('0x26')][_0x5bc9('0x27')],_0x298800);var _0x43f827=_0x242bb4[_0x5bc9('0x1b')][_0x5bc9('0x28')](',');_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x0]);_0x4433ab['push'](_0x43f827[0x1]);_0x4433ab['push'](_0x43f827[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x4]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x5]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x6]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x7]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x8]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x9]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0xa]);_0x4433ab[_0x5bc9('0x1d')](_0x298800['interaction']['id']);_0x4433ab[_0x5bc9('0x1d')](_0x298800[_0x5bc9('0x11')]['id']);_0x4433ab[_0x5bc9('0x1d')](_0x242bb4['ChatWebsiteId']);_0x4433ab['push'](_0x298800[_0x5bc9('0x12')][_0x5bc9('0x29')]);_0x4433ab[_0x5bc9('0x1d')](_0x298800['body']['body']);_0x4433ab[_0x5bc9('0x1d')](_0x4fda67);break;default:_0x4433ab=_['isNil'](_0x242bb4[_0x5bc9('0x1b')])?[]:_0x242bb4[_0x5bc9('0x1b')]['split'](',');}var _0x22a736={'id':util[_0x5bc9('0x9')]('%s:%s:%s',_0x49e2a2,_0x242bb4['id'],_0x242bb4['app']),'condition':require(_0x5bc9('0x2a'))[_0x5bc9('0x2b')](_0x49e2a2,getIntervals(_0x1e345a[_0x5bc9('0x2c')],_0x242bb4),_0x1e345a),'consequence':require(_0x5bc9('0x2d')+_0x242bb4[_0x5bc9('0x17')])[_0x5bc9('0x2e')](_0x49e2a2,_0x4433ab,_0x1e345a,_0x298800),'p':_0x242bb4[_0x5bc9('0x2f')]||0x0};logger['info'](_0x5bc9('0x30'),_0x22a736['id'],'on\x20interval',getIntervals(_0x1e345a[_0x5bc9('0x2c')],_0x242bb4)['join'](_0x5bc9('0x31')));_0x5db036['push'](_0x22a736);}else{logger['error'](_0x5bc9('0x32'),path['join'](__dirname,_0x5bc9('0x14'),_0x242bb4[_0x5bc9('0x17')]+'.js'));}}_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]=new RuleEngine(_0x5db036);_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]['execute'](_0x298800,function(_0x315fea){logger[_0x5bc9('0x34')]('Applications\x20executed',JSON[_0x5bc9('0x35')](_0x315fea[_0x5bc9('0x36')]));if(_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]){_0x1e345a[_0x5bc9('0x33')][_0x49e2a2][_0x5bc9('0x37')](_0x5bc9('0x38'));}});return _0x443185({'code':0xc8,'message':_0x298800});}else{if(_0x20e02d){logger[_0x5bc9('0x34')](util[_0x5bc9('0x9')]('Skipped\x20routing\x20for\x20%s',_0x49e2a2));}else{logger[_0x5bc9('0x34')](_0x5bc9('0x39'));}return _0x443185({'code':0xc8,'message':_0x298800});}}catch(_0x29f69c){logger[_0x5bc9('0x3a')](_0x29f69c[_0x5bc9('0x3b')]);return _0x33053f(_0x16cf5f[_0x5bc9('0x3a')](0x1f4,_0x29f69c));}}return _0x33053f(_0x5bc9('0x3c'));});},'AcceptMessage':function(_0x395940){var _0x2c767f=this;return new Promise(function(_0x590a66,_0x2be96b){if(_0x395940[_0x5bc9('0x3d')]&&_0x395940[_0x5bc9('0x3d')]['id']){if(_0x1e345a[_0x5bc9('0x3e')][_0x395940['agent']['id']]){_0x1e345a[_0x5bc9('0x3e')][_0x395940[_0x5bc9('0x3d')]['id']][_0x5bc9('0x3f')]=![];_0x1e345a[_0x5bc9('0x3e')][_0x395940[_0x5bc9('0x3d')]['id']][_0x5bc9('0x40')]=undefined;}}if(_0x395940['message']&&_0x395940[_0x5bc9('0x11')]['id']){try{var _0xd90ff9=getId(_0x395940['channel'],_0x395940['message']?_0x395940[_0x5bc9('0x11')]['id']:0x0,_0x395940[_0x5bc9('0x12')]?_0x395940['interaction']['id']:0x0);if(_0x1e345a[_0x5bc9('0x33')][_0xd90ff9]){_0x1e345a[_0x5bc9('0x33')][_0xd90ff9][_0x5bc9('0x37')](_0x5bc9('0x41'));if(rpc[_0x395940[_0x5bc9('0x10')]+_0x5bc9('0x42')]){rpc[_0x395940[_0x5bc9('0x10')]+'QueueReport']['update'](_0xd90ff9,{'UserId':_0x395940[_0x5bc9('0x11')][_0x5bc9('0x43')]})[_0x5bc9('0x44')](function(){logger[_0x5bc9('0x3a')](_0x5bc9('0x45'));});}}return _0x590a66({'code':0xc8,'message':_0x395940});}catch(_0x32bb65){logger['error'](_0x32bb65['stack']);return _0x2be96b(_0x2c767f['error'](0x1f4,_0x32bb65));}}logger[_0x5bc9('0x3a')](_0x5bc9('0x46'));return _0x2be96b(_0x2c767f['error'](0x1f4,_0x5bc9('0x46')));});},'RejectMessage':function(_0x2636fc){var _0x410995=this;return new Promise(function(_0x341d2b,_0x3f9067){if(_0x2636fc[_0x5bc9('0x3d')]&&_0x2636fc[_0x5bc9('0x3d')]['id']){try{if(_0x1e345a[_0x5bc9('0x3e')][_0x2636fc[_0x5bc9('0x3d')]['id']]){_0x1e345a[_0x5bc9('0x3e')][_0x2636fc[_0x5bc9('0x3d')]['id']][_0x5bc9('0x3f')]=![];_0x1e345a[_0x5bc9('0x3e')][_0x2636fc['agent']['id']][_0x5bc9('0x40')]=undefined;}return _0x341d2b({'code':0xc8,'message':_0x2636fc});}catch(_0x568577){logger['error'](_0x568577['stack']);return _0x3f9067(_0x410995[_0x5bc9('0x3a')](0x1f4,_0x568577));}}logger['error'](_0x5bc9('0x46'));return _0x3f9067(_0x410995[_0x5bc9('0x3a')](0x1f4,_0x5bc9('0x46')));});},'AbandonInteraction':function(_0x2ec2b6){var _0x3863c0=this;return new Promise(function(_0x907ff,_0x57cba7){if(_0x2ec2b6[_0x5bc9('0x10')]&&_0x2ec2b6[_0x5bc9('0x12')]&&_0x2ec2b6[_0x5bc9('0x12')]['id']){try{var _0x28fe28=getId(_0x2ec2b6[_0x5bc9('0x10')],_0x2ec2b6[_0x5bc9('0x11')]?_0x2ec2b6[_0x5bc9('0x11')]['id']:0x0,_0x2ec2b6[_0x5bc9('0x12')]?_0x2ec2b6[_0x5bc9('0x12')]['id']:0x0);if(_0x1e345a[_0x5bc9('0x33')][_0x28fe28]){_0x1e345a[_0x5bc9('0x33')][_0x28fe28][_0x5bc9('0x37')](_0x5bc9('0x41'));}return _0x907ff({'code':0xc8,'message':_0x2ec2b6});}catch(_0x158643){logger[_0x5bc9('0x3a')](_0x158643[_0x5bc9('0x3b')]);return _0x57cba7(_0x3863c0[_0x5bc9('0x3a')](0x1f4,_0x158643));}}logger['error']('message\x20is\x20empty');return _0x57cba7(_0x3863c0[_0x5bc9('0x3a')](0x1f4,_0x5bc9('0x46')));});},'AgentCapacity':function(_0x334119){var _0x4fa74d=this;return new Promise(function(_0x1b4e32,_0x4c4bbb){if(_0x1e345a['agents']['hasOwnProperty'](_0x334119['id'])){for(var _0x2d96d0 in _0x334119[_0x5bc9('0x47')]){if(_0x334119[_0x5bc9('0x47')][_0x5bc9('0x48')](_0x2d96d0)){if(_0x1e345a['agents'][_0x334119['id']][_0x5bc9('0x48')](_0x2d96d0+'CurrentCapacity')){_0x1e345a[_0x5bc9('0x3e')][_0x334119['id']][_0x2d96d0+_0x5bc9('0x49')]=parseInt(_0x334119['capacity'][_0x2d96d0],0xa);}}}_0x1e345a[_0x5bc9('0x3e')][_0x334119['id']][_0x5bc9('0x4a')]();return _0x1b4e32({'code':0xc8,'message':_0x1e345a['agents'][_0x334119['id']]});}else{return _0x4c4bbb(_0x4fa74d['error'](0x1f4,_0x5bc9('0x4b')));}});},'Agents':function(_0xb3ab0a){return new Promise(function(_0x35cc49){var _0x221efd=_[_0x5bc9('0x4c')](_0x1e345a[_0x5bc9('0x3e')]);if(_0xb3ab0a&&_0xb3ab0a['id']){var _0x4ae73d=_[_0x5bc9('0x4d')](_0x221efd,function(_0x47edab){return _0x47edab['id']===_0xb3ab0a['id'];});_0x35cc49(_0x4ae73d);}else{_0x35cc49({'count':_0x221efd['length'],'rows':_0x221efd});}});},'ChatQueues':function(){return new Promise(function(_0x542834){var _0x1c20ed=[];for(var _0x23b711 in _0x1e345a[_0x5bc9('0x4e')]){if(_0x1e345a['chatQueues']['hasOwnProperty'](_0x23b711)){var _0x2b17b5=_0x1e345a[_0x5bc9('0x4e')][_0x23b711];var _0x542aa9={'id':_0x2b17b5['id'],'available':_0x2b17b5[_0x5bc9('0x4f')],'loggedIn':_0x2b17b5[_0x5bc9('0x50')],'name':_0x2b17b5[_0x5bc9('0x51')],'paused':_0x2b17b5[_0x5bc9('0x52')],'waiting':_0x2b17b5[_0x5bc9('0x53')]};_0x1c20ed[_0x5bc9('0x1d')](_0x542aa9);}}_0x542834({'count':_0x1c20ed[_0x5bc9('0x16')],'rows':_0x1c20ed});});},'MailQueues':function(){return new Promise(function(_0x447e80){var _0x2328e3=[];for(var _0x3d5d27 in _0x1e345a[_0x5bc9('0x54')]){if(_0x1e345a[_0x5bc9('0x54')][_0x5bc9('0x48')](_0x3d5d27)){var _0x5f20e5=_0x1e345a['mailQueues'][_0x3d5d27];var _0x635317={'id':_0x5f20e5['id'],'available':_0x5f20e5[_0x5bc9('0x4f')],'loggedIn':_0x5f20e5[_0x5bc9('0x50')],'name':_0x5f20e5['name'],'paused':_0x5f20e5[_0x5bc9('0x52')],'waiting':_0x5f20e5[_0x5bc9('0x53')]};_0x2328e3[_0x5bc9('0x1d')](_0x635317);}}_0x447e80({'count':_0x2328e3[_0x5bc9('0x16')],'rows':_0x2328e3});});},'OpenchannelQueues':function(){return new Promise(function(_0x5739a3){var _0x1234ca=[];for(var _0x5a7930 in _0x1e345a['openchannelQueues']){if(_0x1e345a[_0x5bc9('0x55')][_0x5bc9('0x48')](_0x5a7930)){var _0x3b1d25=_0x1e345a['openchannelQueues'][_0x5a7930];var _0x55e667={'id':_0x3b1d25['id'],'available':_0x3b1d25['available'],'loggedIn':_0x3b1d25[_0x5bc9('0x50')],'name':_0x3b1d25['name'],'paused':_0x3b1d25[_0x5bc9('0x52')],'waiting':_0x3b1d25[_0x5bc9('0x53')]};_0x1234ca['push'](_0x55e667);}}_0x5739a3({'count':_0x1234ca[_0x5bc9('0x16')],'rows':_0x1234ca});});},'SmsQueues':function(){return new Promise(function(_0x965d1){var _0x5210df=[];for(var _0x4b0ff0 in _0x1e345a[_0x5bc9('0x56')]){if(_0x1e345a[_0x5bc9('0x56')][_0x5bc9('0x48')](_0x4b0ff0)){var _0x256fb1=_0x1e345a['smsQueues'][_0x4b0ff0];var _0x3593d0={'id':_0x256fb1['id'],'available':_0x256fb1[_0x5bc9('0x4f')],'loggedIn':_0x256fb1[_0x5bc9('0x50')],'name':_0x256fb1[_0x5bc9('0x51')],'paused':_0x256fb1[_0x5bc9('0x52')],'waiting':_0x256fb1[_0x5bc9('0x53')]};_0x5210df[_0x5bc9('0x1d')](_0x3593d0);}}_0x965d1({'count':_0x5210df[_0x5bc9('0x16')],'rows':_0x5210df});});},'FaxQueues':function(){return new Promise(function(_0x1cc032){var _0x2ceae8=[];for(var _0x3bc38b in _0x1e345a['faxQueues']){if(_0x1e345a['faxQueues'][_0x5bc9('0x48')](_0x3bc38b)){var _0x1e4a93=_0x1e345a[_0x5bc9('0x57')][_0x3bc38b];var _0x1c153e={'id':_0x1e4a93['id'],'available':_0x1e4a93[_0x5bc9('0x4f')],'loggedIn':_0x1e4a93['loggedIn'],'name':_0x1e4a93[_0x5bc9('0x51')],'paused':_0x1e4a93['paused'],'waiting':_0x1e4a93[_0x5bc9('0x53')]};_0x2ceae8[_0x5bc9('0x1d')](_0x1c153e);}}_0x1cc032({'count':_0x2ceae8[_0x5bc9('0x16')],'rows':_0x2ceae8});});},'WhatsappQueues':function(){return new Promise(function(_0x233378){var _0x35955d=[];for(var _0xda6b15 in _0x1e345a[_0x5bc9('0x58')]){if(_0x1e345a[_0x5bc9('0x58')][_0x5bc9('0x48')](_0xda6b15)){var _0x3381a0=_0x1e345a['whatsappQueues'][_0xda6b15];var _0x5d1a91={'id':_0x3381a0['id'],'available':_0x3381a0[_0x5bc9('0x4f')],'loggedIn':_0x3381a0[_0x5bc9('0x50')],'name':_0x3381a0[_0x5bc9('0x51')],'paused':_0x3381a0[_0x5bc9('0x52')],'waiting':_0x3381a0[_0x5bc9('0x53')]};_0x35955d[_0x5bc9('0x1d')](_0x5d1a91);}}_0x233378({'count':_0x35955d[_0x5bc9('0x16')],'rows':_0x35955d});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x3f47c5){var _0x211812=_['values'](_0x1e345a[_0x5bc9('0x59')]);_0x3f47c5({'count':_0x211812[_0x5bc9('0x16')],'rows':_0x211812});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x4e7286){var _0xa7acbf=_[_0x5bc9('0x4c')](_0x1e345a[_0x5bc9('0x5a')]);_0x4e7286({'count':_0xa7acbf[_0x5bc9('0x16')],'rows':_0xa7acbf});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x2416b4){var _0x4b1b63=_['values'](_0x1e345a[_0x5bc9('0x5b')]);_0x2416b4({'count':_0x4b1b63[_0x5bc9('0x16')],'rows':_0x4b1b63});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0xa67332){var _0x572d64=_[_0x5bc9('0x4c')](_0x1e345a['smsQueuesWaitingInteractions']);_0xa67332({'count':_0x572d64[_0x5bc9('0x16')],'rows':_0x572d64});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0xf2c589){var _0x514d57=_['values'](_0x1e345a[_0x5bc9('0x5c')]);_0xf2c589({'count':_0x514d57[_0x5bc9('0x16')],'rows':_0x514d57});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x4cce77){var _0x2ef48f=_['values'](_0x1e345a[_0x5bc9('0x5d')]);_0x4cce77({'count':_0x2ef48f['length'],'rows':_0x2ef48f});});}};var _0x275ab7=jayson[_0x5bc9('0x5e')](_0x11341a)[_0x5bc9('0x5f')]();_0x275ab7['on'](_0x5bc9('0x3a'),function(_0x4fe72c){logger[_0x5bc9('0x3a')](JSON[_0x5bc9('0x35')](_0x4fe72c));return _0x767740(_0x4fe72c);});_0x275ab7[_0x5bc9('0x60')](0x232c,_0x5bc9('0x61'),function(){console[_0x5bc9('0x62')](_0x5bc9('0x63'),0x232c);return _0x48a2c2(_0x5bc9('0x64')+0x232c);});});};
\ No newline at end of file
+var _0x9be8=['on\x20interval','intervals','error','Please\x20create\x20a\x20new\x20file\x20under','.js','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','stack','agent','agents','busy','busyQueue','QueueReport','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','end','hasOwnProperty','capacity','CurrentCapacity','agent\x20not\x20found','values','find','chatQueues','available','name','paused','waiting','mailQueues','loggedIn','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/mailQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','isArray','length','existsSync','app','toLowerCase','autoreply','mail','push','slice','join','dialogflowv2','split','appdata','tag','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','ContactId','body','condition','./applications/','consequence','Push\x20new\x20rule'];(function(_0x3a78a0,_0x44985f){var _0x48e917=function(_0x1e428c){while(--_0x1e428c){_0x3a78a0['push'](_0x3a78a0['shift']());}};_0x48e917(++_0x44985f);}(_0x9be8,0x103));var _0x89be=function(_0x32b3c2,_0xe56fd){_0x32b3c2=_0x32b3c2-0x0;var _0x40a313=_0x9be8[_0x32b3c2];return _0x40a313;};'use strict';var _=require(_0x89be('0x0'));var util=require('util');var path=require(_0x89be('0x1'));var fs=require('fs');var jayson=require(_0x89be('0x2'));var BPromise=require(_0x89be('0x3'));var utils=require(_0x89be('0x4'));var sUtils=require(_0x89be('0x5'));var logger=require(_0x89be('0x6'))(_0x89be('0x7'));var rpc={'openchannelQueueReport':require('../rpc/openchannelQueueReport'),'mailQueueReport':require(_0x89be('0x8')),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0x89be('0x9')),'faxQueueReport':require(_0x89be('0xa')),'whatsappQueueReport':require(_0x89be('0xb'))};var RuleEngine=require(_0x89be('0xc'));function getId(_0x49f31c,_0x5008ed,_0x10a2e4){return util[_0x89be('0xd')](_0x89be('0xe'),_0x49f31c,_0x5008ed||0x0,_0x10a2e4||0x0);}function getIntervals(_0x523bbf,_0x32d63c){var _0x2285f5=[];if(!_[_0x89be('0xf')](_0x32d63c['IntervalId'])&&!_[_0x89be('0xf')](_0x523bbf[_0x32d63c[_0x89be('0x10')]])&&!_['isNil'](_0x523bbf[_0x32d63c['IntervalId']][_0x89be('0x11')])){_0x2285f5=_[_0x89be('0x12')](_0x523bbf[_0x32d63c[_0x89be('0x10')]][_0x89be('0x11')],_0x89be('0x13'));}else if(!_[_0x89be('0xf')](_0x32d63c[_0x89be('0x13')])){_0x2285f5=[_0x32d63c[_0x89be('0x13')]];}return _0x2285f5;}exports[_0x89be('0x14')]=function(_0x29ae3a){_0x29ae3a[_0x89be('0x15')]={};return new BPromise(function(_0x1c7bf7,_0x10e3e6){var _0x5c3a6e={'Start':function(_0x20f219){var _0x31c20d=this;return new Promise(function(_0x58ee1a,_0xab6a3a){if(_0x20f219){try{var _0x58103c=[];var _0x529e2e=getId(_0x20f219[_0x89be('0x16')],_0x20f219['message']?_0x20f219[_0x89be('0x17')]['id']:0x0,_0x20f219[_0x89be('0x18')]?_0x20f219[_0x89be('0x18')]['id']:0x0);var _0x4a77ac=sUtils[_0x89be('0x19')](_0x29ae3a,_0x20f219);if(_0x20f219[_0x89be('0x1a')]||!_0x4a77ac&&_0x20f219[_0x89be('0x1b')]&&_[_0x89be('0x1c')](_0x20f219['applications'])&&_0x20f219[_0x89be('0x1b')][_0x89be('0x1d')]){for(var _0x336b7c=0x0;_0x336b7c<_0x20f219[_0x89be('0x1b')]['length'];_0x336b7c+=0x1){var _0x3a59a9=_0x20f219[_0x89be('0x1b')][_0x336b7c];if(fs[_0x89be('0x1e')](path['join'](__dirname,_0x89be('0x1b'),_0x3a59a9['app']+'.js'))){var _0x3f2944=[];switch(_0x3a59a9[_0x89be('0x1f')][_0x89be('0x20')]()){case _0x89be('0x21'):var _0x31de1e=_0x3a59a9['appdata']['split'](',');if(_0x20f219[_0x89be('0x16')]===_0x89be('0x22')){_0x3f2944[_0x89be('0x23')](_0x31de1e[0x0]);_0x3f2944['push'](_0x31de1e[0x1]);_0x3f2944[_0x89be('0x23')](_0x31de1e[_0x89be('0x24')](0x2,_0x31de1e[_0x89be('0x1d')])[_0x89be('0x25')](','));}else{_0x3f2944[_0x89be('0x23')](_0x31de1e[0x0]);_0x3f2944['push'](_0x31de1e[_0x89be('0x24')](0x1,_0x31de1e[_0x89be('0x1d')])[_0x89be('0x25')](','));}break;case'dialogflow':var _0x140eb6=_0x3a59a9['appdata']['split'](',');_0x3f2944[_0x89be('0x23')](_0x140eb6[0x0]);_0x3f2944[_0x89be('0x23')](_0x140eb6[0x1]);_0x3f2944[_0x89be('0x23')](_0x140eb6[_0x89be('0x24')](0x2,_0x140eb6[_0x89be('0x1d')])[_0x89be('0x25')](','));break;case _0x89be('0x26'):var _0x4e9b03=_0x3a59a9['appdata'][_0x89be('0x27')](',');_0x3f2944['push'](_0x4e9b03[0x0]);_0x3f2944[_0x89be('0x23')](_0x4e9b03[0x1]);_0x3f2944[_0x89be('0x23')](_0x4e9b03[0x2]);_0x3f2944['push'](_0x4e9b03[0x3]);_0x3f2944['push'](_0x4e9b03['slice'](0x4,_0x4e9b03[_0x89be('0x1d')])['join'](','));break;case'amazonlex':var _0x1c2618=_0x3a59a9['appdata'][_0x89be('0x27')](',');_0x3f2944['push'](_0x1c2618[0x0]);_0x3f2944[_0x89be('0x23')](_0x1c2618[0x1]);_0x3f2944[_0x89be('0x23')](_0x1c2618[0x2]);_0x3f2944[_0x89be('0x23')](_0x1c2618[0x3]);_0x3f2944[_0x89be('0x23')](_0x1c2618[_0x89be('0x24')](0x4,_0x1c2618['length'])[_0x89be('0x25')](','));break;case'message':_0x3f2944[_0x89be('0x23')](_0x3a59a9[_0x89be('0x28')]);break;case _0x89be('0x29'):_0x3f2944[_0x89be('0x23')](_0x3a59a9['TagId']);_0x3f2944[_0x89be('0x23')](_0x3a59a9[_0x89be('0x28')]);break;case _0x89be('0x2a'):var _0x40be8b=utils[_0x89be('0x2b')](_0x20f219[_0x89be('0x2c')][_0x89be('0x2d')],_0x20f219);var _0x2d35cc=_0x3a59a9[_0x89be('0x28')]['split'](',');_0x3f2944['push'](_0x2d35cc[0x0]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x1]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x2]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x3]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x4]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x5]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x6]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x7]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x8]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0x9]);_0x3f2944[_0x89be('0x23')](_0x2d35cc[0xa]);_0x3f2944['push'](_0x20f219[_0x89be('0x18')]['id']);_0x3f2944[_0x89be('0x23')](_0x20f219['message']['id']);_0x3f2944[_0x89be('0x23')](_0x3a59a9[_0x89be('0x2e')]);_0x3f2944[_0x89be('0x23')](_0x20f219['interaction'][_0x89be('0x2f')]);_0x3f2944['push'](_0x20f219[_0x89be('0x30')]['body']);_0x3f2944[_0x89be('0x23')](_0x40be8b);break;default:_0x3f2944=_['isNil'](_0x3a59a9[_0x89be('0x28')])?[]:_0x3a59a9[_0x89be('0x28')]['split'](',');}var _0x3a0795={'id':util['format']('%s:%s:%s',_0x529e2e,_0x3a59a9['id'],_0x3a59a9[_0x89be('0x1f')]),'condition':require('./interval')[_0x89be('0x31')](_0x529e2e,getIntervals(_0x29ae3a['intervals'],_0x3a59a9),_0x29ae3a),'consequence':require(_0x89be('0x32')+_0x3a59a9['app'])[_0x89be('0x33')](_0x529e2e,_0x3f2944,_0x29ae3a,_0x20f219),'p':_0x3a59a9['priority']||0x0};logger['info'](_0x89be('0x34'),_0x3a0795['id'],_0x89be('0x35'),getIntervals(_0x29ae3a[_0x89be('0x36')],_0x3a59a9)[_0x89be('0x25')]('\x20|\x20'));_0x58103c[_0x89be('0x23')](_0x3a0795);}else{logger[_0x89be('0x37')](_0x89be('0x38'),path[_0x89be('0x25')](__dirname,'applications',_0x3a59a9[_0x89be('0x1f')]+_0x89be('0x39')));}}_0x29ae3a[_0x89be('0x15')][_0x529e2e]=new RuleEngine(_0x58103c);_0x29ae3a['rules'][_0x529e2e][_0x89be('0x3a')](_0x20f219,function(_0x475c6d){logger[_0x89be('0x3b')](_0x89be('0x3c'),JSON[_0x89be('0x3d')](_0x475c6d[_0x89be('0x3e')]));if(_0x29ae3a[_0x89be('0x15')][_0x529e2e]){_0x29ae3a[_0x89be('0x15')][_0x529e2e][_0x89be('0x3f')](_0x89be('0x40'));}});return _0x58ee1a({'code':0xc8,'message':_0x20f219});}else{if(_0x4a77ac){logger['info'](util['format'](_0x89be('0x41'),_0x529e2e));}else{logger['info'](_0x89be('0x42'));}return _0x58ee1a({'code':0xc8,'message':_0x20f219});}}catch(_0x2c07ed){logger[_0x89be('0x37')](_0x2c07ed[_0x89be('0x43')]);return _0xab6a3a(_0x31c20d[_0x89be('0x37')](0x1f4,_0x2c07ed));}}return _0xab6a3a('routing\x20is\x20empty');});},'AcceptMessage':function(_0x237435){var _0x40dc1b=this;return new Promise(function(_0x48ac10,_0x5e9e73){if(_0x237435['agent']&&_0x237435[_0x89be('0x44')]['id']){if(_0x29ae3a[_0x89be('0x45')][_0x237435[_0x89be('0x44')]['id']]){_0x29ae3a['agents'][_0x237435['agent']['id']][_0x89be('0x46')]=![];_0x29ae3a[_0x89be('0x45')][_0x237435['agent']['id']][_0x89be('0x47')]=undefined;}}if(_0x237435['message']&&_0x237435[_0x89be('0x17')]['id']){try{var _0x2ab2c4=getId(_0x237435[_0x89be('0x16')],_0x237435[_0x89be('0x17')]?_0x237435['message']['id']:0x0,_0x237435[_0x89be('0x18')]?_0x237435['interaction']['id']:0x0);if(_0x29ae3a[_0x89be('0x15')][_0x2ab2c4]){_0x29ae3a['rules'][_0x2ab2c4][_0x89be('0x3f')]('end');if(rpc[_0x237435[_0x89be('0x16')]+_0x89be('0x48')]){rpc[_0x237435[_0x89be('0x16')]+_0x89be('0x48')]['update'](_0x2ab2c4,{'UserId':_0x237435[_0x89be('0x17')][_0x89be('0x49')]})[_0x89be('0x4a')](function(){logger[_0x89be('0x37')](_0x89be('0x4b'));});}}return _0x48ac10({'code':0xc8,'message':_0x237435});}catch(_0x2d8665){logger[_0x89be('0x37')](_0x2d8665[_0x89be('0x43')]);return _0x5e9e73(_0x40dc1b[_0x89be('0x37')](0x1f4,_0x2d8665));}}logger[_0x89be('0x37')](_0x89be('0x4c'));return _0x5e9e73(_0x40dc1b[_0x89be('0x37')](0x1f4,_0x89be('0x4c')));});},'RejectMessage':function(_0x525e01){var _0x77c3ce=this;return new Promise(function(_0x38e75e,_0x389126){if(_0x525e01[_0x89be('0x44')]&&_0x525e01[_0x89be('0x44')]['id']){try{if(_0x29ae3a[_0x89be('0x45')][_0x525e01['agent']['id']]){_0x29ae3a['agents'][_0x525e01[_0x89be('0x44')]['id']][_0x89be('0x46')]=![];_0x29ae3a[_0x89be('0x45')][_0x525e01[_0x89be('0x44')]['id']][_0x89be('0x47')]=undefined;}return _0x38e75e({'code':0xc8,'message':_0x525e01});}catch(_0x2d41aa){logger[_0x89be('0x37')](_0x2d41aa[_0x89be('0x43')]);return _0x389126(_0x77c3ce[_0x89be('0x37')](0x1f4,_0x2d41aa));}}logger[_0x89be('0x37')](_0x89be('0x4c'));return _0x389126(_0x77c3ce[_0x89be('0x37')](0x1f4,_0x89be('0x4c')));});},'AbandonInteraction':function(_0x1fc1fd){var _0xdabe91=this;return new Promise(function(_0x17367e,_0xe8c5c0){if(_0x1fc1fd[_0x89be('0x16')]&&_0x1fc1fd[_0x89be('0x18')]&&_0x1fc1fd[_0x89be('0x18')]['id']){try{var _0x57283f=getId(_0x1fc1fd[_0x89be('0x16')],_0x1fc1fd[_0x89be('0x17')]?_0x1fc1fd[_0x89be('0x17')]['id']:0x0,_0x1fc1fd[_0x89be('0x18')]?_0x1fc1fd[_0x89be('0x18')]['id']:0x0);if(_0x29ae3a[_0x89be('0x15')][_0x57283f]){_0x29ae3a[_0x89be('0x15')][_0x57283f][_0x89be('0x3f')](_0x89be('0x4d'));}return _0x17367e({'code':0xc8,'message':_0x1fc1fd});}catch(_0xb8ed94){logger[_0x89be('0x37')](_0xb8ed94[_0x89be('0x43')]);return _0xe8c5c0(_0xdabe91['error'](0x1f4,_0xb8ed94));}}logger[_0x89be('0x37')](_0x89be('0x4c'));return _0xe8c5c0(_0xdabe91[_0x89be('0x37')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x1206ba){var _0x1dad4d=this;return new Promise(function(_0xfe7c45,_0x3dc674){if(_0x29ae3a[_0x89be('0x45')][_0x89be('0x4e')](_0x1206ba['id'])){for(var _0x557839 in _0x1206ba[_0x89be('0x4f')]){if(_0x1206ba[_0x89be('0x4f')]['hasOwnProperty'](_0x557839)){if(_0x29ae3a['agents'][_0x1206ba['id']][_0x89be('0x4e')](_0x557839+_0x89be('0x50'))){_0x29ae3a[_0x89be('0x45')][_0x1206ba['id']][_0x557839+_0x89be('0x50')]=parseInt(_0x1206ba['capacity'][_0x557839],0xa);}}}_0x29ae3a[_0x89be('0x45')][_0x1206ba['id']]['updateRealtime']();return _0xfe7c45({'code':0xc8,'message':_0x29ae3a[_0x89be('0x45')][_0x1206ba['id']]});}else{return _0x3dc674(_0x1dad4d[_0x89be('0x37')](0x1f4,_0x89be('0x51')));}});},'Agents':function(_0x347867){return new Promise(function(_0x43cf02){var _0x52c877=_[_0x89be('0x52')](_0x29ae3a[_0x89be('0x45')]);if(_0x347867&&_0x347867['id']){var _0x2b7a6d=_[_0x89be('0x53')](_0x52c877,function(_0x33790b){return _0x33790b['id']===_0x347867['id'];});_0x43cf02(_0x2b7a6d);}else{_0x43cf02({'count':_0x52c877[_0x89be('0x1d')],'rows':_0x52c877});}});},'ChatQueues':function(){return new Promise(function(_0x3f9cb8){var _0x5d568e=[];for(var _0x153d9d in _0x29ae3a[_0x89be('0x54')]){if(_0x29ae3a[_0x89be('0x54')]['hasOwnProperty'](_0x153d9d)){var _0x2a6c31=_0x29ae3a[_0x89be('0x54')][_0x153d9d];var _0x24ae05={'id':_0x2a6c31['id'],'available':_0x2a6c31[_0x89be('0x55')],'loggedIn':_0x2a6c31['loggedIn'],'name':_0x2a6c31[_0x89be('0x56')],'paused':_0x2a6c31[_0x89be('0x57')],'waiting':_0x2a6c31[_0x89be('0x58')]};_0x5d568e['push'](_0x24ae05);}}_0x3f9cb8({'count':_0x5d568e['length'],'rows':_0x5d568e});});},'MailQueues':function(){return new Promise(function(_0x3086ef){var _0x36c665=[];for(var _0x4e7806 in _0x29ae3a[_0x89be('0x59')]){if(_0x29ae3a[_0x89be('0x59')][_0x89be('0x4e')](_0x4e7806)){var _0x446e97=_0x29ae3a[_0x89be('0x59')][_0x4e7806];var _0x2f0eb2={'id':_0x446e97['id'],'available':_0x446e97[_0x89be('0x55')],'loggedIn':_0x446e97[_0x89be('0x5a')],'name':_0x446e97[_0x89be('0x56')],'paused':_0x446e97[_0x89be('0x57')],'waiting':_0x446e97[_0x89be('0x58')]};_0x36c665[_0x89be('0x23')](_0x2f0eb2);}}_0x3086ef({'count':_0x36c665[_0x89be('0x1d')],'rows':_0x36c665});});},'OpenchannelQueues':function(){return new Promise(function(_0x5ac501){var _0x1241b4=[];for(var _0x4fe7d7 in _0x29ae3a[_0x89be('0x5b')]){if(_0x29ae3a[_0x89be('0x5b')][_0x89be('0x4e')](_0x4fe7d7)){var _0x339b4d=_0x29ae3a['openchannelQueues'][_0x4fe7d7];var _0x258384={'id':_0x339b4d['id'],'available':_0x339b4d['available'],'loggedIn':_0x339b4d['loggedIn'],'name':_0x339b4d['name'],'paused':_0x339b4d[_0x89be('0x57')],'waiting':_0x339b4d[_0x89be('0x58')]};_0x1241b4['push'](_0x258384);}}_0x5ac501({'count':_0x1241b4[_0x89be('0x1d')],'rows':_0x1241b4});});},'SmsQueues':function(){return new Promise(function(_0x19e9e8){var _0x1220a4=[];for(var _0x41f8af in _0x29ae3a['smsQueues']){if(_0x29ae3a[_0x89be('0x5c')]['hasOwnProperty'](_0x41f8af)){var _0x4ac74e=_0x29ae3a[_0x89be('0x5c')][_0x41f8af];var _0x1c29a0={'id':_0x4ac74e['id'],'available':_0x4ac74e[_0x89be('0x55')],'loggedIn':_0x4ac74e['loggedIn'],'name':_0x4ac74e[_0x89be('0x56')],'paused':_0x4ac74e[_0x89be('0x57')],'waiting':_0x4ac74e['waiting']};_0x1220a4[_0x89be('0x23')](_0x1c29a0);}}_0x19e9e8({'count':_0x1220a4['length'],'rows':_0x1220a4});});},'FaxQueues':function(){return new Promise(function(_0x1ef06f){var _0x46b5d9=[];for(var _0x2f8c39 in _0x29ae3a[_0x89be('0x5d')]){if(_0x29ae3a['faxQueues'][_0x89be('0x4e')](_0x2f8c39)){var _0x55f8fe=_0x29ae3a[_0x89be('0x5d')][_0x2f8c39];var _0x2024d8={'id':_0x55f8fe['id'],'available':_0x55f8fe['available'],'loggedIn':_0x55f8fe['loggedIn'],'name':_0x55f8fe[_0x89be('0x56')],'paused':_0x55f8fe[_0x89be('0x57')],'waiting':_0x55f8fe['waiting']};_0x46b5d9[_0x89be('0x23')](_0x2024d8);}}_0x1ef06f({'count':_0x46b5d9['length'],'rows':_0x46b5d9});});},'WhatsappQueues':function(){return new Promise(function(_0x3ba12d){var _0x5413df=[];for(var _0x2f283f in _0x29ae3a[_0x89be('0x5e')]){if(_0x29ae3a['whatsappQueues']['hasOwnProperty'](_0x2f283f)){var _0x181525=_0x29ae3a[_0x89be('0x5e')][_0x2f283f];var _0x2ae493={'id':_0x181525['id'],'available':_0x181525['available'],'loggedIn':_0x181525[_0x89be('0x5a')],'name':_0x181525['name'],'paused':_0x181525[_0x89be('0x57')],'waiting':_0x181525['waiting']};_0x5413df[_0x89be('0x23')](_0x2ae493);}}_0x3ba12d({'count':_0x5413df[_0x89be('0x1d')],'rows':_0x5413df});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x1e6664){var _0x14b65a=_['values'](_0x29ae3a[_0x89be('0x5f')]);_0x1e6664({'count':_0x14b65a[_0x89be('0x1d')],'rows':_0x14b65a});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x34996d){var _0xce6ef0=_[_0x89be('0x52')](_0x29ae3a['mailQueuesWaitingInteractions']);_0x34996d({'count':_0xce6ef0['length'],'rows':_0xce6ef0});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x22ccea){var _0x2da629=_[_0x89be('0x52')](_0x29ae3a['openchannelQueuesWaitingInteractions']);_0x22ccea({'count':_0x2da629[_0x89be('0x1d')],'rows':_0x2da629});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x3d4321){var _0x73c1eb=_[_0x89be('0x52')](_0x29ae3a[_0x89be('0x60')]);_0x3d4321({'count':_0x73c1eb[_0x89be('0x1d')],'rows':_0x73c1eb});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x550f44){var _0x2b7de0=_[_0x89be('0x52')](_0x29ae3a[_0x89be('0x61')]);_0x550f44({'count':_0x2b7de0['length'],'rows':_0x2b7de0});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x2e5938){var _0x2a1264=_['values'](_0x29ae3a[_0x89be('0x62')]);_0x2e5938({'count':_0x2a1264['length'],'rows':_0x2a1264});});}};var _0x4eb530=jayson[_0x89be('0x63')](_0x5c3a6e)['http']();_0x4eb530['on'](_0x89be('0x37'),function(_0x3874a6){logger[_0x89be('0x37')](JSON[_0x89be('0x3d')](_0x3874a6));return _0x10e3e6(_0x3874a6);});_0x4eb530[_0x89be('0x14')](0x232c,_0x89be('0x64'),function(){console[_0x89be('0x65')](_0x89be('0x66'),0x232c);return _0x1c7bf7(_0x89be('0x67')+0x232c);});});};
\ No newline at end of file