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 _0xa48d=['update','remove','emit','hasOwnProperty','exports','../../mysqldb','VoicePrefix'];(function(_0x296786,_0x3c22e5){var _0x45312c=function(_0x5e492d){while(--_0x5e492d){_0x296786['push'](_0x296786['shift']());}};_0x45312c(++_0x3c22e5);}(_0xa48d,0xc2));var _0xda48=function(_0x2a3bbb,_0x1897db){_0x2a3bbb=_0x2a3bbb-0x0;var _0x5100b1=_0xa48d[_0x2a3bbb];return _0x5100b1;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0xda48('0x0'))['db'][_0xda48('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xda48('0x2'),'afterDestroy':_0xda48('0x3')};function emitEvent(_0x39e154){return function(_0x4a750f,_0x3ce4f8,_0x301e96){VoicePrefixEvents[_0xda48('0x4')](_0x39e154+':'+_0x4a750f['id'],_0x4a750f);VoicePrefixEvents[_0xda48('0x4')](_0x39e154,_0x4a750f);_0x301e96(null);};}for(var e in events){if(events[_0xda48('0x5')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0xda48('0x6')]=VoicePrefixEvents;