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 _0xb43b=['ChatWebsite','setMaxListeners','save','update','remove','emit','hook','events'];(function(_0x27494d,_0x3fd247){var _0x27fcb8=function(_0x34cd15){while(--_0x34cd15){_0x27494d['push'](_0x27494d['shift']());}};_0x27fcb8(++_0x3fd247);}(_0xb43b,0xbf));var _0xbb43=function(_0x1eb358,_0x4795f9){_0x1eb358=_0x1eb358-0x0;var _0x190b6a=_0xb43b[_0x1eb358];return _0x190b6a;};'use strict';var EventEmitter=require(_0xbb43('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0xbb43('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xbb43('0x2')](0x0);var events={'afterCreate':_0xbb43('0x3'),'afterUpdate':_0xbb43('0x4'),'afterDestroy':_0xbb43('0x5')};function emitEvent(_0xeeec7c){return function(_0x2e9c09,_0x25f690,_0x24edde){ChatWebsiteEvents[_0xbb43('0x6')](_0xeeec7c+':'+_0x2e9c09['id'],_0x2e9c09);ChatWebsiteEvents[_0xbb43('0x6')](_0xeeec7c,_0x2e9c09);_0x24edde(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatWebsite[_0xbb43('0x7')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;