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 _0xa029=['VoiceExtension','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x2e80d5,_0x16512c){var _0xf3e966=function(_0x381704){while(--_0x381704){_0x2e80d5['push'](_0x2e80d5['shift']());}};_0xf3e966(++_0x16512c);}(_0xa029,0x130));var _0x9a02=function(_0x303775,_0x51539c){_0x303775=_0x303775-0x0;var _0x1c8a3f=_0xa029[_0x303775];return _0x1c8a3f;};'use strict';var EventEmitter=require('events');var VoiceExtension=require('../../mysqldb')['db'][_0x9a02('0x0')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x9a02('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9a02('0x2'),'afterDestroy':_0x9a02('0x3')};function emitEvent(_0x3d7a2f){return function(_0x3c7ceb,_0xd9709b,_0x49ef61){VoiceExtensionEvents['emit'](_0x3d7a2f+':'+_0x3c7ceb['id'],_0x3c7ceb);VoiceExtensionEvents[_0x9a02('0x4')](_0x3d7a2f,_0x3c7ceb);_0x49ef61(null);};}for(var e in events){if(events[_0x9a02('0x5')](e)){var event=events[e];VoiceExtension[_0x9a02('0x6')](e,emitEvent(event));}}module[_0x9a02('0x7')]=VoiceExtensionEvents;