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 _0xebf9=['save','update','emit','hasOwnProperty','hook','exports','events','VoiceExtension','setMaxListeners'];(function(_0xa28b17,_0x171472){var _0x2129b9=function(_0x4cbfff){while(--_0x4cbfff){_0xa28b17['push'](_0xa28b17['shift']());}};_0x2129b9(++_0x171472);}(_0xebf9,0x192));var _0x9ebf=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xebf9[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require(_0x9ebf('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x9ebf('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x9ebf('0x2')](0x0);var events={'afterCreate':_0x9ebf('0x3'),'afterUpdate':_0x9ebf('0x4'),'afterDestroy':'remove'};function emitEvent(_0x53bb5c){return function(_0x4588f4,_0xa56ffd,_0x9497cf){VoiceExtensionEvents[_0x9ebf('0x5')](_0x53bb5c+':'+_0x4588f4['id'],_0x4588f4);VoiceExtensionEvents[_0x9ebf('0x5')](_0x53bb5c,_0x4588f4);_0x9497cf(null);};}for(var e in events){if(events[_0x9ebf('0x6')](e)){var event=events[e];VoiceExtension[_0x9ebf('0x7')](e,emitEvent(event));}}module[_0x9ebf('0x8')]=VoiceExtensionEvents;