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 _0xa22a=['setMaxListeners','save','remove','emit','hasOwnProperty','exports','events','../../mysqldb','ChatWebsite'];(function(_0x247fa1,_0x4ec37c){var _0x244f35=function(_0xfb98be){while(--_0xfb98be){_0x247fa1['push'](_0x247fa1['shift']());}};_0x244f35(++_0x4ec37c);}(_0xa22a,0x153));var _0xaa22=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa22a[_0x5b644e];return _0x49c6bf;};'use strict';var EventEmitter=require(_0xaa22('0x0'));var ChatWebsite=require(_0xaa22('0x1'))['db'][_0xaa22('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xaa22('0x3')](0x0);var events={'afterCreate':_0xaa22('0x4'),'afterUpdate':'update','afterDestroy':_0xaa22('0x5')};function emitEvent(_0x280c73){return function(_0x1912a3,_0x454829,_0xc8f622){ChatWebsiteEvents[_0xaa22('0x6')](_0x280c73+':'+_0x1912a3['id'],_0x1912a3);ChatWebsiteEvents['emit'](_0x280c73,_0x1912a3);_0xc8f622(null);};}for(var e in events){if(events[_0xaa22('0x7')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0xaa22('0x8')]=ChatWebsiteEvents;