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 _0xc778=['remove','emit','hasOwnProperty','hook','../../mysqldb'];(function(_0x1d546c,_0x48b498){var _0x322435=function(_0x10df92){while(--_0x10df92){_0x1d546c['push'](_0x1d546c['shift']());}};_0x322435(++_0x48b498);}(_0xc778,0x14e));var _0x8c77=function(_0x3880e3,_0xe460ce){_0x3880e3=_0x3880e3-0x0;var _0x4e8909=_0xc778[_0x3880e3];return _0x4e8909;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x8c77('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x8c77('0x1')};function emitEvent(_0x5eb7b7){return function(_0x39f356,_0x386b96,_0x2fdabc){VoicePrefixEvents[_0x8c77('0x2')](_0x5eb7b7+':'+_0x39f356['id'],_0x39f356);VoicePrefixEvents[_0x8c77('0x2')](_0x5eb7b7,_0x39f356);_0x2fdabc(null);};}for(var e in events){if(events[_0x8c77('0x3')](e)){var event=events[e];VoicePrefix[_0x8c77('0x4')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;