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 _0xd4b7=['VoiceExtension','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x48999d,_0x1e02cb){var _0x1ad0d1=function(_0x3f974e){while(--_0x3f974e){_0x48999d['push'](_0x48999d['shift']());}};_0x1ad0d1(++_0x1e02cb);}(_0xd4b7,0x76));var _0x7d4b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd4b7[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x7d4b('0x0'));var VoiceExtension=require(_0x7d4b('0x1'))['db'][_0x7d4b('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x7d4b('0x3')](0x0);var events={'afterCreate':_0x7d4b('0x4'),'afterUpdate':_0x7d4b('0x5'),'afterDestroy':_0x7d4b('0x6')};function emitEvent(_0xa1a404){return function(_0x5bebfe,_0x29a30d,_0x5b6848){VoiceExtensionEvents[_0x7d4b('0x7')](_0xa1a404+':'+_0x5bebfe['id'],_0x5bebfe);VoiceExtensionEvents[_0x7d4b('0x7')](_0xa1a404,_0x5bebfe);_0x5b6848(null);};}for(var e in events){if(events[_0x7d4b('0x8')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x7d4b('0x9')]=VoiceExtensionEvents;