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 _0x35ee=['save','remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x36eaaa,_0x326732){var _0x461349=function(_0x4e4180){while(--_0x4e4180){_0x36eaaa['push'](_0x36eaaa['shift']());}};_0x461349(++_0x326732);}(_0x35ee,0x188));var _0xe35e=function(_0xec55fb,_0x556f07){_0xec55fb=_0xec55fb-0x0;var _0x2122bc=_0x35ee[_0xec55fb];return _0x2122bc;};'use strict';var EventEmitter=require(_0xe35e('0x0'));var FaxQueue=require(_0xe35e('0x1'))['db'][_0xe35e('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xe35e('0x3')](0x0);var events={'afterCreate':_0xe35e('0x4'),'afterUpdate':'update','afterDestroy':_0xe35e('0x5')};function emitEvent(_0x2d66b6){return function(_0x126ffb,_0x46f92e,_0x182665){FaxQueueEvents['emit'](_0x2d66b6+':'+_0x126ffb['id'],_0x126ffb);FaxQueueEvents[_0xe35e('0x6')](_0x2d66b6,_0x126ffb);_0x182665(null);};}for(var e in events){if(events[_0xe35e('0x7')](e)){var event=events[e];FaxQueue[_0xe35e('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;