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 _0x6a08=['setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x5a17d6,_0x514820){var _0x409d71=function(_0x583acd){while(--_0x583acd){_0x5a17d6['push'](_0x5a17d6['shift']());}};_0x409d71(++_0x514820);}(_0x6a08,0xc4));var _0x86a0=function(_0x3e961c,_0x5747e7){_0x3e961c=_0x3e961c-0x0;var _0x474f9c=_0x6a08[_0x3e961c];return _0x474f9c;};'use strict';var EventEmitter=require(_0x86a0('0x0'));var VoiceQueue=require(_0x86a0('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x86a0('0x2')](0x0);var events={'afterCreate':_0x86a0('0x3'),'afterUpdate':_0x86a0('0x4'),'afterDestroy':'remove'};function emitEvent(_0x160616){return function(_0x1be103,_0x2bd197,_0x4ff603){VoiceQueueEvents[_0x86a0('0x5')](_0x160616+':'+_0x1be103['id'],_0x1be103);VoiceQueueEvents[_0x86a0('0x5')](_0x160616,_0x1be103);_0x4ff603(null);};}for(var e in events){if(events[_0x86a0('0x6')](e)){var event=events[e];VoiceQueue[_0x86a0('0x7')](e,emitEvent(event));}}module[_0x86a0('0x8')]=VoiceQueueEvents;