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 _0xc716=['events','../../mysqldb','VoiceQueue','setMaxListeners','save','remove','emit','exports'];(function(_0x30e004,_0x46f8c2){var _0x5ca247=function(_0x20d80f){while(--_0x20d80f){_0x30e004['push'](_0x30e004['shift']());}};_0x5ca247(++_0x46f8c2);}(_0xc716,0x138));var _0x6c71=function(_0x31d834,_0x535477){_0x31d834=_0x31d834-0x0;var _0x4c627a=_0xc716[_0x31d834];return _0x4c627a;};'use strict';var EventEmitter=require(_0x6c71('0x0'));var VoiceQueue=require(_0x6c71('0x1'))['db'][_0x6c71('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x6c71('0x3')](0x0);var events={'afterCreate':_0x6c71('0x4'),'afterUpdate':'update','afterDestroy':_0x6c71('0x5')};function emitEvent(_0x3b85bc){return function(_0x13e8d8,_0x56707c,_0x252e52){VoiceQueueEvents[_0x6c71('0x6')](_0x3b85bc+':'+_0x13e8d8['id'],_0x13e8d8);VoiceQueueEvents['emit'](_0x3b85bc,_0x13e8d8);_0x252e52(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x6c71('0x7')]=VoiceQueueEvents;