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 _0x77a3=['./mailMessage.events','save','emit','length'];(function(_0x14e27a,_0x3b4136){var _0x288688=function(_0x3d7ab1){while(--_0x3d7ab1){_0x14e27a['push'](_0x14e27a['shift']());}};_0x288688(++_0x3b4136);}(_0x77a3,0xfc));var _0x377a=function(_0x5c85e3,_0x48bfe5){_0x5c85e3=_0x5c85e3-0x0;var _0x4ca6e3=_0x77a3[_0x5c85e3];return _0x4ca6e3;};'use strict';var MailMessageEvents=require(_0x377a('0x0'));var events=[_0x377a('0x1'),'remove','update'];function createListener(_0x219493,_0x3de647){return function(_0x1fa9f0){_0x3de647[_0x377a('0x2')](_0x219493,_0x1fa9f0);};}function removeListener(_0x3688c9,_0x32d937){return function(){MailMessageEvents['removeListener'](_0x3688c9,_0x32d937);};}exports['register']=function(_0x2ca6b1){for(var _0x2e935c=0x0,_0x26177f=events[_0x377a('0x3')];_0x2e935c<_0x26177f;_0x2e935c++){var _0x1cc8d8=events[_0x2e935c];var _0x56202b=createListener('mailMessage:'+_0x1cc8d8,_0x2ca6b1);MailMessageEvents['on'](_0x1cc8d8,_0x56202b);}};