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 _0xf3a7=['hook','exports','events','../../mysqldb','update','emit','hasOwnProperty'];(function(_0x4c706c,_0x57ebb7){var _0x1d8dc7=function(_0x50a0f3){while(--_0x50a0f3){_0x4c706c['push'](_0x4c706c['shift']());}};_0x1d8dc7(++_0x57ebb7);}(_0xf3a7,0xcd));var _0x7f3a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf3a7[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x7f3a('0x0'));var SquareProject=require(_0x7f3a('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x7f3a('0x2'),'afterDestroy':'remove'};function emitEvent(_0x231e3d){return function(_0x280c67,_0x4e6fe1,_0x168a1e){SquareProjectEvents[_0x7f3a('0x3')](_0x231e3d+':'+_0x280c67['id'],_0x280c67);SquareProjectEvents[_0x7f3a('0x3')](_0x231e3d,_0x280c67);_0x168a1e(null);};}for(var e in events){if(events[_0x7f3a('0x4')](e)){var event=events[e];SquareProject[_0x7f3a('0x5')](e,emitEvent(event));}}module[_0x7f3a('0x6')]=SquareProjectEvents;