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 _0x1c98=['OpenchannelQueue','setMaxListeners','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x70582f,_0x94c2c){var _0x244a1f=function(_0x1c715c){while(--_0x1c715c){_0x70582f['push'](_0x70582f['shift']());}};_0x244a1f(++_0x94c2c);}(_0x1c98,0x1c9));var _0x81c9=function(_0x4691fc,_0x36dcd3){_0x4691fc=_0x4691fc-0x0;var _0xe54241=_0x1c98[_0x4691fc];return _0xe54241;};'use strict';var EventEmitter=require(_0x81c9('0x0'));var OpenchannelQueue=require(_0x81c9('0x1'))['db'][_0x81c9('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x81c9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x81c9('0x4')};function emitEvent(_0xdccfd9){return function(_0x3ac02e,_0x3c8bfc,_0x44b577){OpenchannelQueueEvents[_0x81c9('0x5')](_0xdccfd9+':'+_0x3ac02e['id'],_0x3ac02e);OpenchannelQueueEvents['emit'](_0xdccfd9,_0x3ac02e);_0x44b577(null);};}for(var e in events){if(events[_0x81c9('0x6')](e)){var event=events[e];OpenchannelQueue[_0x81c9('0x7')](e,emitEvent(event));}}module[_0x81c9('0x8')]=OpenchannelQueueEvents;