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 _0x73d5=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save'];(function(_0x230615,_0x3916bc){var _0xf81957=function(_0x18bc96){while(--_0x18bc96){_0x230615['push'](_0x230615['shift']());}};_0xf81957(++_0x3916bc);}(_0x73d5,0xc3));var _0x573d=function(_0x2b5062,_0x12b234){_0x2b5062=_0x2b5062-0x0;var _0x15b1e1=_0x73d5[_0x2b5062];return _0x15b1e1;};'use strict';var EventEmitter=require(_0x573d('0x0'));var OpenchannelAccount=require(_0x573d('0x1'))['db'][_0x573d('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x573d('0x3')](0x0);var events={'afterCreate':_0x573d('0x4'),'afterUpdate':_0x573d('0x5'),'afterDestroy':_0x573d('0x6')};function emitEvent(_0x5649fc){return function(_0x480a74,_0x1d577d,_0xdf6550){OpenchannelAccountEvents[_0x573d('0x7')](_0x5649fc+':'+_0x480a74['id'],_0x480a74);OpenchannelAccountEvents[_0x573d('0x7')](_0x5649fc,_0x480a74);_0xdf6550(null);};}for(var e in events){if(events[_0x573d('0x8')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module[_0x573d('0x9')]=OpenchannelAccountEvents;