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 _0x829a=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x88ac12,_0x50e021){var _0x94b1d8=function(_0x221418){while(--_0x221418){_0x88ac12['push'](_0x88ac12['shift']());}};_0x94b1d8(++_0x50e021);}(_0x829a,0x9b));var _0xa829=function(_0x42bfc2,_0x1cd78f){_0x42bfc2=_0x42bfc2-0x0;var _0xeb6185=_0x829a[_0x42bfc2];return _0xeb6185;};'use strict';var EventEmitter=require(_0xa829('0x0'));var VoiceQueue=require(_0xa829('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xa829('0x2')](0x0);var events={'afterCreate':_0xa829('0x3'),'afterUpdate':_0xa829('0x4'),'afterDestroy':_0xa829('0x5')};function emitEvent(_0x4f88a4){return function(_0xfc36da,_0x1d24ef,_0xe9453c){VoiceQueueEvents[_0xa829('0x6')](_0x4f88a4+':'+_0xfc36da['id'],_0xfc36da);VoiceQueueEvents[_0xa829('0x6')](_0x4f88a4,_0xfc36da);_0xe9453c(null);};}for(var e in events){if(events[_0xa829('0x7')](e)){var event=events[e];VoiceQueue[_0xa829('0x8')](e,emitEvent(event));}}module[_0xa829('0x9')]=VoiceQueueEvents;