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 _0x1f75=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','SquareProject','save','update','remove'];(function(_0x58a364,_0x3439f6){var _0x409b74=function(_0xff5c15){while(--_0xff5c15){_0x58a364['push'](_0x58a364['shift']());}};_0x409b74(++_0x3439f6);}(_0x1f75,0x18a));var _0x51f7=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0x1f75[_0x4709c0];return _0x13348b;};'use strict';var EventEmitter=require(_0x51f7('0x0'));var SquareProject=require(_0x51f7('0x1'))['db'][_0x51f7('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x51f7('0x3'),'afterUpdate':_0x51f7('0x4'),'afterDestroy':_0x51f7('0x5')};function emitEvent(_0x5707aa){return function(_0x3e748b,_0x21fbf0,_0x5233b9){SquareProjectEvents['emit'](_0x5707aa+':'+_0x3e748b['id'],_0x3e748b);SquareProjectEvents[_0x51f7('0x6')](_0x5707aa,_0x3e748b);_0x5233b9(null);};}for(var e in events){if(events[_0x51f7('0x7')](e)){var event=events[e];SquareProject[_0x51f7('0x8')](e,emitEvent(event));}}module[_0x51f7('0x9')]=SquareProjectEvents;