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 _0x8bfc=['hasOwnProperty','exports','../../mysqldb','FaxAccount','save','update','remove','emit'];(function(_0x232b8f,_0x18b3c2){var _0x3fdc20=function(_0x2244f5){while(--_0x2244f5){_0x232b8f['push'](_0x232b8f['shift']());}};_0x3fdc20(++_0x18b3c2);}(_0x8bfc,0x9a));var _0xc8bf=function(_0x3b0731,_0xcf9925){_0x3b0731=_0x3b0731-0x0;var _0x4204d7=_0x8bfc[_0x3b0731];return _0x4204d7;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xc8bf('0x0'))['db'][_0xc8bf('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc8bf('0x2'),'afterUpdate':_0xc8bf('0x3'),'afterDestroy':_0xc8bf('0x4')};function emitEvent(_0x378992){return function(_0x3ce3c5,_0xed95e8,_0x30902a){FaxAccountEvents[_0xc8bf('0x5')](_0x378992+':'+_0x3ce3c5['id'],_0x3ce3c5);FaxAccountEvents[_0xc8bf('0x5')](_0x378992,_0x3ce3c5);_0x30902a(null);};}for(var e in events){if(events[_0xc8bf('0x6')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xc8bf('0x7')]=FaxAccountEvents;