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 _0x919a=['update','removeListener','register','length','whatsappQueue:','./whatsappQueue.events','save','remove'];(function(_0x254076,_0x5e7b8d){var _0x21a93e=function(_0x26aa78){while(--_0x26aa78){_0x254076['push'](_0x254076['shift']());}};_0x21a93e(++_0x5e7b8d);}(_0x919a,0x185));var _0xa919=function(_0x263a74,_0xc31414){_0x263a74=_0x263a74-0x0;var _0x2aa86c=_0x919a[_0x263a74];return _0x2aa86c;};'use strict';var WhatsappQueueEvents=require(_0xa919('0x0'));var events=[_0xa919('0x1'),_0xa919('0x2'),_0xa919('0x3')];function createListener(_0x3cb3c3,_0x370311){return function(_0x180caf){_0x370311['emit'](_0x3cb3c3,_0x180caf);};}function removeListener(_0x366686,_0x4e921c){return function(){WhatsappQueueEvents[_0xa919('0x4')](_0x366686,_0x4e921c);};}exports[_0xa919('0x5')]=function(_0x331416){for(var _0x3fb88c=0x0,_0x5f1d3a=events[_0xa919('0x6')];_0x3fb88c<_0x5f1d3a;_0x3fb88c++){var _0x1187cb=events[_0x3fb88c];var _0x9c554f=createListener(_0xa919('0x7')+_0x1187cb,_0x331416);WhatsappQueueEvents['on'](_0x1187cb,_0x9c554f);}};