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 _0xe49d=['../../mysqldb','OpenchannelAccount','setMaxListeners','save','emit','exports','events'];(function(_0x21d2b1,_0x523bde){var _0x12c151=function(_0x4d22c5){while(--_0x4d22c5){_0x21d2b1['push'](_0x21d2b1['shift']());}};_0x12c151(++_0x523bde);}(_0xe49d,0x148));var _0xde49=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xe49d[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require(_0xde49('0x0'));var OpenchannelAccount=require(_0xde49('0x1'))['db'][_0xde49('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xde49('0x3')](0x0);var events={'afterCreate':_0xde49('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4b80b4){return function(_0x34418e,_0x1a965c,_0x1e8f8a){OpenchannelAccountEvents[_0xde49('0x5')](_0x4b80b4+':'+_0x34418e['id'],_0x34418e);OpenchannelAccountEvents['emit'](_0x4b80b4,_0x34418e);_0x1e8f8a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module[_0xde49('0x6')]=OpenchannelAccountEvents;