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 _0x2db3=['SquareProject','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x302633,_0x657910){var _0x3b87c9=function(_0x923917){while(--_0x923917){_0x302633['push'](_0x302633['shift']());}};_0x3b87c9(++_0x657910);}(_0x2db3,0x111));var _0x32db=function(_0x574617,_0x42eccc){_0x574617=_0x574617-0x0;var _0x29de90=_0x2db3[_0x574617];return _0x29de90;};'use strict';var EventEmitter=require(_0x32db('0x0'));var SquareProject=require(_0x32db('0x1'))['db'][_0x32db('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x32db('0x3')](0x0);var events={'afterCreate':_0x32db('0x4'),'afterUpdate':_0x32db('0x5'),'afterDestroy':_0x32db('0x6')};function emitEvent(_0x371d62){return function(_0x4caadf,_0x3bb053,_0x3cc8bb){SquareProjectEvents['emit'](_0x371d62+':'+_0x4caadf['id'],_0x4caadf);SquareProjectEvents[_0x32db('0x7')](_0x371d62,_0x4caadf);_0x3cc8bb(null);};}for(var e in events){if(events[_0x32db('0x8')](e)){var event=events[e];SquareProject[_0x32db('0x9')](e,emitEvent(event));}}module[_0x32db('0xa')]=SquareProjectEvents;