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 _0xc48e=['exports','events','../../mysqldb','setMaxListeners','update','emit','hasOwnProperty'];(function(_0x12877b,_0x8650cf){var _0x3549ff=function(_0x4f96b7){while(--_0x4f96b7){_0x12877b['push'](_0x12877b['shift']());}};_0x3549ff(++_0x8650cf);}(_0xc48e,0x1ac));var _0xec48=function(_0x463920,_0x77d49e){_0x463920=_0x463920-0x0;var _0x58f450=_0xc48e[_0x463920];return _0x58f450;};'use strict';var EventEmitter=require(_0xec48('0x0'));var Dashboard=require(_0xec48('0x1'))['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents[_0xec48('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xec48('0x3'),'afterDestroy':'remove'};function emitEvent(_0x5d7f02){return function(_0x171500,_0x1ed5d9,_0x164eae){DashboardEvents['emit'](_0x5d7f02+':'+_0x171500['id'],_0x171500);DashboardEvents[_0xec48('0x4')](_0x5d7f02,_0x171500);_0x164eae(null);};}for(var e in events){if(events[_0xec48('0x5')](e)){var event=events[e];Dashboard['hook'](e,emitEvent(event));}}module[_0xec48('0x6')]=DashboardEvents;