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 _0xfb0b=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxAccount','save','update'];(function(_0x2af88f,_0x48993b){var _0x1326ed=function(_0xd45251){while(--_0xd45251){_0x2af88f['push'](_0x2af88f['shift']());}};_0x1326ed(++_0x48993b);}(_0xfb0b,0x94));var _0xbfb0=function(_0x3f486d,_0x490f99){_0x3f486d=_0x3f486d-0x0;var _0x2fc9fe=_0xfb0b[_0x3f486d];return _0x2fc9fe;};'use strict';var EventEmitter=require(_0xbfb0('0x0'));var FaxAccount=require(_0xbfb0('0x1'))['db'][_0xbfb0('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbfb0('0x3'),'afterUpdate':_0xbfb0('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4adab6){return function(_0x299a7b,_0x4ac75d,_0x238a87){FaxAccountEvents[_0xbfb0('0x5')](_0x4adab6+':'+_0x299a7b['id'],_0x299a7b);FaxAccountEvents[_0xbfb0('0x5')](_0x4adab6,_0x299a7b);_0x238a87(null);};}for(var e in events){if(events[_0xbfb0('0x6')](e)){var event=events[e];FaxAccount[_0xbfb0('0x7')](e,emitEvent(event));}}module[_0xbfb0('0x8')]=FaxAccountEvents;