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 _0x8c17=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','FaxQueue'];(function(_0x235ab6,_0x5d72c0){var _0x46c2d4=function(_0x41db7e){while(--_0x41db7e){_0x235ab6['push'](_0x235ab6['shift']());}};_0x46c2d4(++_0x5d72c0);}(_0x8c17,0x16e));var _0x78c1=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0x8c17[_0x5f3f88];return _0xd08119;};'use strict';var EventEmitter=require(_0x78c1('0x0'));var FaxQueue=require(_0x78c1('0x1'))['db'][_0x78c1('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x78c1('0x3'),'afterUpdate':_0x78c1('0x4'),'afterDestroy':_0x78c1('0x5')};function emitEvent(_0x5ce021){return function(_0xe532a2,_0x13f9f2,_0xcbf036){FaxQueueEvents['emit'](_0x5ce021+':'+_0xe532a2['id'],_0xe532a2);FaxQueueEvents[_0x78c1('0x6')](_0x5ce021,_0xe532a2);_0xcbf036(null);};}for(var e in events){if(events[_0x78c1('0x7')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0x78c1('0x8')]=FaxQueueEvents;