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 _0x6ebf=['../../mysqldb','VoiceExtension','save','update','remove','emit','hook','exports'];(function(_0x14c00f,_0x11b192){var _0x19fbda=function(_0xf9caa4){while(--_0xf9caa4){_0x14c00f['push'](_0x14c00f['shift']());}};_0x19fbda(++_0x11b192);}(_0x6ebf,0x140));var _0xf6eb=function(_0x576e2b,_0x328953){_0x576e2b=_0x576e2b-0x0;var _0x46461a=_0x6ebf[_0x576e2b];return _0x46461a;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0xf6eb('0x0'))['db'][_0xf6eb('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf6eb('0x2'),'afterUpdate':_0xf6eb('0x3'),'afterDestroy':_0xf6eb('0x4')};function emitEvent(_0x1d4192){return function(_0x2791c7,_0x470257,_0x5d3a0c){VoiceExtensionEvents['emit'](_0x1d4192+':'+_0x2791c7['id'],_0x2791c7);VoiceExtensionEvents[_0xf6eb('0x5')](_0x1d4192,_0x2791c7);_0x5d3a0c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0xf6eb('0x6')](e,emitEvent(event));}}module[_0xf6eb('0x7')]=VoiceExtensionEvents;