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 _0x1b27=['save','update','emit','hasOwnProperty','exports','../../mysqldb','setMaxListeners'];(function(_0x3adb8e,_0x247ca2){var _0x3eacdb=function(_0x127ddf){while(--_0x127ddf){_0x3adb8e['push'](_0x3adb8e['shift']());}};_0x3eacdb(++_0x247ca2);}(_0x1b27,0xd7));var _0x71b2=function(_0x25f04b,_0x43c5ef){_0x25f04b=_0x25f04b-0x0;var _0xe12b1c=_0x1b27[_0x25f04b];return _0xe12b1c;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x71b2('0x0'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x71b2('0x1')](0x0);var events={'afterCreate':_0x71b2('0x2'),'afterUpdate':_0x71b2('0x3'),'afterDestroy':'remove'};function emitEvent(_0x112d29){return function(_0x30e637,_0x5511c9,_0x202834){VoiceQueueEvents[_0x71b2('0x4')](_0x112d29+':'+_0x30e637['id'],_0x30e637);VoiceQueueEvents['emit'](_0x112d29,_0x30e637);_0x202834(null);};}for(var e in events){if(events[_0x71b2('0x5')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x71b2('0x6')]=VoiceQueueEvents;