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 _0x148e=['remove','emit','exports','events','../../mysqldb','VoiceQueue','setMaxListeners','save','update'];(function(_0x58edd4,_0x2469da){var _0xc4a4b3=function(_0x2e0c36){while(--_0x2e0c36){_0x58edd4['push'](_0x58edd4['shift']());}};_0xc4a4b3(++_0x2469da);}(_0x148e,0x1d7));var _0xe148=function(_0x1c1bf5,_0x4fc8e6){_0x1c1bf5=_0x1c1bf5-0x0;var _0xa3389=_0x148e[_0x1c1bf5];return _0xa3389;};'use strict';var EventEmitter=require(_0xe148('0x0'));var VoiceQueue=require(_0xe148('0x1'))['db'][_0xe148('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xe148('0x3')](0x0);var events={'afterCreate':_0xe148('0x4'),'afterUpdate':_0xe148('0x5'),'afterDestroy':_0xe148('0x6')};function emitEvent(_0x6b2b62){return function(_0x1cc5bd,_0x4e6b17,_0x24db1e){VoiceQueueEvents[_0xe148('0x7')](_0x6b2b62+':'+_0x1cc5bd['id'],_0x1cc5bd);VoiceQueueEvents[_0xe148('0x7')](_0x6b2b62,_0x1cc5bd);_0x24db1e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xe148('0x8')]=VoiceQueueEvents;