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 _0x2bff=['FaxAccount','setMaxListeners','update','emit','exports','events'];(function(_0x24804c,_0x33a8db){var _0x488374=function(_0x1d018e){while(--_0x1d018e){_0x24804c['push'](_0x24804c['shift']());}};_0x488374(++_0x33a8db);}(_0x2bff,0x1eb));var _0xf2bf=function(_0x28dfb9,_0x351827){_0x28dfb9=_0x28dfb9-0x0;var _0x1999dc=_0x2bff[_0x28dfb9];return _0x1999dc;};'use strict';var EventEmitter=require(_0xf2bf('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0xf2bf('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xf2bf('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf2bf('0x3'),'afterDestroy':'remove'};function emitEvent(_0x5ec78d){return function(_0x453656,_0x6d3c83,_0x4eb2e3){FaxAccountEvents[_0xf2bf('0x4')](_0x5ec78d+':'+_0x453656['id'],_0x453656);FaxAccountEvents[_0xf2bf('0x4')](_0x5ec78d,_0x453656);_0x4eb2e3(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xf2bf('0x5')]=FaxAccountEvents;