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 _0x6aba=['VoiceExtension','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0xf48cce,_0x3531e4){var _0x2a5c38=function(_0x22a454){while(--_0x22a454){_0xf48cce['push'](_0xf48cce['shift']());}};_0x2a5c38(++_0x3531e4);}(_0x6aba,0x152));var _0xa6ab=function(_0x532bf7,_0x304edf){_0x532bf7=_0x532bf7-0x0;var _0xa16444=_0x6aba[_0x532bf7];return _0xa16444;};'use strict';var EventEmitter=require(_0xa6ab('0x0'));var VoiceExtension=require(_0xa6ab('0x1'))['db'][_0xa6ab('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xa6ab('0x3')](0x0);var events={'afterCreate':_0xa6ab('0x4'),'afterUpdate':_0xa6ab('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3322b9){return function(_0x355001,_0x17dc28,_0x31b0bc){VoiceExtensionEvents[_0xa6ab('0x6')](_0x3322b9+':'+_0x355001['id'],_0x355001);VoiceExtensionEvents[_0xa6ab('0x6')](_0x3322b9,_0x355001);_0x31b0bc(null);};}for(var e in events){if(events[_0xa6ab('0x7')](e)){var event=events[e];VoiceExtension[_0xa6ab('0x8')](e,emitEvent(event));}}module[_0xa6ab('0x9')]=VoiceExtensionEvents;