1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x8c9d=['resolve','then','getAgents','initAgents','getIntervals','initIntervals','getOpenchannelQueues','getChatQueues','initChatQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','initWhatsappQueues','listen','catch','bluebird','./realtime','./rpc/user','./rpc/interval','./rpc/chatQueue','./rpc/smsQueue','./rpc/mailQueue','./rpc/faxQueue','./rpc/whatsappQueue'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0x8c9d,0xd8));var _0xd8c9=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x8c9d[_0x20a584];return _0x4b41a8;};'use strict';var BPromise=require(_0xd8c9('0x0'));var server=require('./server');var Realtime=require(_0xd8c9('0x1'));var user=require(_0xd8c9('0x2'));var interval=require(_0xd8c9('0x3'));var openchannelQueue=require('./rpc/openchannelQueue');var chatQueue=require(_0xd8c9('0x4'));var smsQueue=require(_0xd8c9('0x5'));var mailQueue=require(_0xd8c9('0x6'));var faxQueue=require(_0xd8c9('0x7'));var whatsappQueue=require(_0xd8c9('0x8'));var realtime=new Realtime();function initRealtime(){return BPromise[_0xd8c9('0x9')]()[_0xd8c9('0xa')](user[_0xd8c9('0xb')]())['then'](realtime[_0xd8c9('0xc')]())[_0xd8c9('0xa')](interval[_0xd8c9('0xd')]())[_0xd8c9('0xa')](realtime[_0xd8c9('0xe')]())[_0xd8c9('0xa')](openchannelQueue[_0xd8c9('0xf')]())[_0xd8c9('0xa')](realtime['initOpenchannelQueues']())[_0xd8c9('0xa')](chatQueue[_0xd8c9('0x10')]())[_0xd8c9('0xa')](realtime[_0xd8c9('0x11')]())['then'](smsQueue['getSmsQueues']())[_0xd8c9('0xa')](realtime['initSmsQueues']())[_0xd8c9('0xa')](mailQueue[_0xd8c9('0x12')]())[_0xd8c9('0xa')](realtime[_0xd8c9('0x13')]())[_0xd8c9('0xa')](faxQueue[_0xd8c9('0x14')]())['then'](realtime[_0xd8c9('0x15')]())['then'](whatsappQueue['getWhatsappQueues']())[_0xd8c9('0xa')](realtime[_0xd8c9('0x16')]())[_0xd8c9('0xa')](function(){return realtime;});}function main(){return server[_0xd8c9('0x17')](realtime)[_0xd8c9('0xa')](function(_0x318204){return initRealtime();})[_0xd8c9('0xa')](function(_0x4e13ea){return setInterval(initRealtime,0x1388);})[_0xd8c9('0x18')](function(_0x1afcad){console['log'](_0x1afcad);});}main();