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 _0xbc3c=['setMaxListeners','save','update','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueue'];(function(_0x1e7634,_0x37d8e2){var _0x50a829=function(_0x3fe890){while(--_0x3fe890){_0x1e7634['push'](_0x1e7634['shift']());}};_0x50a829(++_0x37d8e2);}(_0xbc3c,0x1da));var _0xcbc3=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0xbc3c[_0x126558];return _0x1f6d14;};'use strict';var EventEmitter=require(_0xcbc3('0x0'));var VoiceQueue=require(_0xcbc3('0x1'))['db'][_0xcbc3('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xcbc3('0x3')](0x0);var events={'afterCreate':_0xcbc3('0x4'),'afterUpdate':_0xcbc3('0x5'),'afterDestroy':'remove'};function emitEvent(_0x4eba9a){return function(_0x504944,_0x5c3b65,_0x6c98bb){VoiceQueueEvents['emit'](_0x4eba9a+':'+_0x504944['id'],_0x504944);VoiceQueueEvents['emit'](_0x4eba9a,_0x504944);_0x6c98bb(null);};}for(var e in events){if(events[_0xcbc3('0x6')](e)){var event=events[e];VoiceQueue[_0xcbc3('0x7')](e,emitEvent(event));}}module[_0xcbc3('0x8')]=VoiceQueueEvents;