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 _0x554b=['update','removeListener','register','./whatsappQueue.events','remove'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x554b,0xda));var _0xb554=function(_0x47a349,_0x4699d9){_0x47a349=_0x47a349-0x0;var _0x18ab75=_0x554b[_0x47a349];return _0x18ab75;};'use strict';var WhatsappQueueEvents=require(_0xb554('0x0'));var events=['save',_0xb554('0x1'),_0xb554('0x2')];function createListener(_0x3e6542,_0x329cd8){return function(_0x254e6c){_0x329cd8['emit'](_0x3e6542,_0x254e6c);};}function removeListener(_0x21b2db,_0x435d2a){return function(){WhatsappQueueEvents[_0xb554('0x3')](_0x21b2db,_0x435d2a);};}exports[_0xb554('0x4')]=function(_0x42563){for(var _0x32bffc=0x0,_0x355800=events['length'];_0x32bffc<_0x355800;_0x32bffc++){var _0x2757c8=events[_0x32bffc];var _0x4da21b=createListener('whatsappQueue:'+_0x2757c8,_0x42563);WhatsappQueueEvents['on'](_0x2757c8,_0x4da21b);}};