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 _0xe50e=['exports','events','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x114363,_0x165747){var _0x35d3e6=function(_0x3e3a68){while(--_0x3e3a68){_0x114363['push'](_0x114363['shift']());}};_0x35d3e6(++_0x165747);}(_0xe50e,0xf9));var _0xee50=function(_0x6f0bdb,_0xb91694){_0x6f0bdb=_0x6f0bdb-0x0;var _0x22cc09=_0xe50e[_0x6f0bdb];return _0x22cc09;};'use strict';var EventEmitter=require(_0xee50('0x0'));var OpenchannelQueue=require('../../mysqldb')['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xee50('0x1'),'afterUpdate':_0xee50('0x2'),'afterDestroy':_0xee50('0x3')};function emitEvent(_0x13a2c3){return function(_0xeec6c5,_0x40272b,_0x4895a){OpenchannelQueueEvents[_0xee50('0x4')](_0x13a2c3+':'+_0xeec6c5['id'],_0xeec6c5);OpenchannelQueueEvents[_0xee50('0x4')](_0x13a2c3,_0xeec6c5);_0x4895a(null);};}for(var e in events){if(events[_0xee50('0x5')](e)){var event=events[e];OpenchannelQueue[_0xee50('0x6')](e,emitEvent(event));}}module[_0xee50('0x7')]=OpenchannelQueueEvents;