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 _0x142c=['setMaxListeners','save','remove','emit','hook','exports','events','ChatWebsite'];(function(_0x24f69b,_0x432b8f){var _0x272ad6=function(_0x1b529a){while(--_0x1b529a){_0x24f69b['push'](_0x24f69b['shift']());}};_0x272ad6(++_0x432b8f);}(_0x142c,0x86));var _0xc142=function(_0x4825bf,_0x2e42fa){_0x4825bf=_0x4825bf-0x0;var _0x6de463=_0x142c[_0x4825bf];return _0x6de463;};'use strict';var EventEmitter=require(_0xc142('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0xc142('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xc142('0x2')](0x0);var events={'afterCreate':_0xc142('0x3'),'afterUpdate':'update','afterDestroy':_0xc142('0x4')};function emitEvent(_0x3d66ef){return function(_0x4fa56e,_0x47e43a,_0x110b14){ChatWebsiteEvents['emit'](_0x3d66ef+':'+_0x4fa56e['id'],_0x4fa56e);ChatWebsiteEvents[_0xc142('0x5')](_0x3d66ef,_0x4fa56e);_0x110b14(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatWebsite[_0xc142('0x6')](e,emitEvent(event));}}module[_0xc142('0x7')]=ChatWebsiteEvents;