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 _0xf1ec=['setMaxListeners','emit','hasOwnProperty','hook','events','../../mysqldb','CmList'];(function(_0x5d2170,_0x17572e){var _0x3e7aba=function(_0x233d9b){while(--_0x233d9b){_0x5d2170['push'](_0x5d2170['shift']());}};_0x3e7aba(++_0x17572e);}(_0xf1ec,0x107));var _0xcf1e=function(_0x444f36,_0x1df79b){_0x444f36=_0x444f36-0x0;var _0x2578da=_0xf1ec[_0x444f36];return _0x2578da;};'use strict';var EventEmitter=require(_0xcf1e('0x0'));var CmList=require(_0xcf1e('0x1'))['db'][_0xcf1e('0x2')];var CmListEvents=new EventEmitter();CmListEvents[_0xcf1e('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x408812){return function(_0x121b73,_0x439a43,_0x4cd7b4){CmListEvents[_0xcf1e('0x4')](_0x408812+':'+_0x121b73['id'],_0x121b73);CmListEvents['emit'](_0x408812,_0x121b73);_0x4cd7b4(null);};}for(var e in events){if(events[_0xcf1e('0x5')](e)){var event=events[e];CmList[_0xcf1e('0x6')](e,emitEvent(event));}}module['exports']=CmListEvents;