Built motion from commit da617fac.|2.6.6
[motion2.git] / server / components / realtime / agents.js
index d51d852..8083963 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x41df=['Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','merge','getRealtimeAgents','*pause','busy','getAgentStatus','isArray','startCase','map','findOne','all','flatten','uniq','value','filter','getAgentIdsByStatus','resolve','includes','User','findAll','name','fullname','faxPause','find','globalStatus','catch','getSortedAgentsIdsByStatus','fields','order','startsWith','DESC','getUpdatedSortOptions','internal','indexOf','validateSortParameter','sort','pauseType','toLowerCase','sortAgentsByStatus','online','lastLoginAt','lastPauseAt','chatCapacity','openchannelCapacity','smsCapacity','whatsappCapacity','faxCapacity','chatCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','whatsappStatus','openchannelStatusTime','mailStatusTime','smsStatusTime','whatsappStatusTime','faxStatusTime','voiceStatusTime','queue','screenrecording','phoneBarEnableScreenRecordingByAgent','phoneBarEnableAutomaticScreenRecording','routealias','lodash','jayson/promise','client','http','chatPause','mailPause','openchannelPause','smsPause','whatsappPause','every','length','idle','isNil','voiceStatus','voicePause','pause','chatStatus','faxStatus','mailStatus','openchannelStatus','smsStatus','request','then','error','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result'];(function(_0x3dc06d,_0x34ec1b){var _0x560f2b=function(_0x22a3d7){while(--_0x22a3d7){_0x3dc06d['push'](_0x3dc06d['shift']());}};_0x560f2b(++_0x34ec1b);}(_0x41df,0x14a));var _0xf41d=function(_0x4c7fb5,_0x2548ef){_0x4c7fb5=_0x4c7fb5-0x0;var _0x2e10ac=_0x41df[_0x4c7fb5];return _0x2e10ac;};'use strict';var _=require(_0xf41d('0x0'));var jayson=require(_0xf41d('0x1'));var db=require('../../mysqldb')['db'];var amiClient=jayson[_0xf41d('0x2')]['http']({'port':0x232a});var routingClient=jayson[_0xf41d('0x2')][_0xf41d('0x3')]({'port':0x232c});function isAgentPaused(_0x2dc4a3,_0x3149d6){var _0x33fad3=[_0x2dc4a3[_0xf41d('0x4')],_0x2dc4a3['faxPause'],_0x2dc4a3[_0xf41d('0x5')],_0x2dc4a3[_0xf41d('0x6')],_0x2dc4a3[_0xf41d('0x7')],_0x2dc4a3['voicePause'],_0x2dc4a3[_0xf41d('0x8')]];if(!_0x3149d6)return _[_0xf41d('0x9')](_0x33fad3);var _0x5e9546=_['filter'](_0x33fad3);return _0x5e9546[_0xf41d('0xa')]>0x0&&_0x5e9546[_0xf41d('0xa')]<_0x33fad3[_0xf41d('0xa')]?!![]:![];}function isIdle(_0x50e303){return _0x50e303===_0xf41d('0xb')||_0x50e303==='unknown'||_0x50e303==='unavailable'||_0x50e303==='ringing'||_[_0xf41d('0xc')](_0x50e303);}function isAgentIdle(_0x4b53d9){if(_0x4b53d9[_0xf41d('0xd')]!==_0xf41d('0xb')&&_0x4b53d9[_0xf41d('0xe')]){_0x4b53d9[_0xf41d('0xd')]=_0xf41d('0xf');return![];}return _['every']([_0x4b53d9[_0xf41d('0x10')],_0x4b53d9[_0xf41d('0x11')],_0x4b53d9[_0xf41d('0x12')],_0x4b53d9[_0xf41d('0x13')],_0x4b53d9[_0xf41d('0x14')],_0x4b53d9['voiceStatus'],_0x4b53d9['whatsappStatus']],isIdle);}function getRealtimeAgents(){return amiClient[_0xf41d('0x15')]('Agents',{})[_0xf41d('0x16')](function(_0x4b32da){if(_0x4b32da[_0xf41d('0x17')]){throw new Error(_0xf41d('0x18'));}var _0x165c3d=_0x4b32da[_0xf41d('0x19')];return routingClient[_0xf41d('0x15')]('Agents',{})['then'](function(_0xf22aff){if(_0xf22aff[_0xf41d('0x17')]){throw new Error(_0xf41d('0x1a'));}var _0x2b0a91=_0xf22aff[_0xf41d('0x19')];return _[_0xf41d('0x1b')]({},_0x165c3d,_0x2b0a91);});})['catch'](function(_0x58e4f6){throw _0x58e4f6;});}exports[_0xf41d('0x1c')]=getRealtimeAgents;function getAgentStatus(_0xa8f7ee){var _0x49be93='unknown';if(isAgentPaused(_0xa8f7ee))_0x49be93=_0xf41d('0xf');else if(isAgentPaused(_0xa8f7ee,!![]))_0x49be93=_0xf41d('0x1d');else if(isAgentIdle(_0xa8f7ee))_0x49be93='idle';else _0x49be93=_0xf41d('0x1e');return _0x49be93;}exports[_0xf41d('0x1f')]=getAgentStatus;function getAgentIdsByQueues(_0x19a2bb,_0x558b13){var _0x15647d=_[_0xf41d('0x20')](_0x19a2bb)?_0x19a2bb:[_0x19a2bb];var _0x5818c9=_[_0xf41d('0x21')](_0x558b13)+'Queue';var _0x33601c=_[_0xf41d('0x22')](_0x15647d,function(_0x5ea24f){return db[_0x5818c9][_0xf41d('0x23')]({'where':{'id':_0x5ea24f}})[_0xf41d('0x16')](function(_0x7e0418){if(!_0x7e0418)return[];return _0x7e0418['getAgents']({'attributes':['id'],'raw':!![]});});});return Promise[_0xf41d('0x24')](_0x33601c)['then'](function(_0x414a38){var _0x399029=_(_0x414a38)[_0xf41d('0x25')]()[_0xf41d('0x22')]('id')[_0xf41d('0x26')]()[_0xf41d('0x27')]();return _0x399029;});}exports['getAgentIdsByQueues']=getAgentIdsByQueues;function getAgentIdsByStatus(_0x55166c,_0x31637c,_0x3a6a84){try{if(_0x31637c[_0xf41d('0xa')]>0x0){_0x55166c=_0x55166c[_0xf41d('0x28')](function(_0x38146e){return _0x31637c['includes'](_0x38146e['id']);});}var _0x3bedf1=_0x55166c[_0xf41d('0x28')](function(_0x43da87){var _0x38e479=_0xf41d('0x1e');if(isAgentIdle(_0x43da87)){_0x38e479=_0xf41d('0xb');}return _0x38e479===_0x3a6a84;});return _[_0xf41d('0x22')](_0x3bedf1,'id');}catch(_0x47ec05){throw _0x47ec05;}}exports[_0xf41d('0x29')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x4a5a6e,_0x5bcae4,_0x431942){return Promise[_0xf41d('0x2a')]()[_0xf41d('0x16')](function(){if(_0x5bcae4[_0xf41d('0xa')]>0x0){_0x4a5a6e=_0x4a5a6e['filter'](function(_0x4e96e5){return _0x5bcae4[_0xf41d('0x2b')](_0x4e96e5['id']);});}return _0x4a5a6e;})[_0xf41d('0x16')](function(){return db[_0xf41d('0x2c')][_0xf41d('0x2d')]({'attributes':['id',_0xf41d('0x2e'),_0xf41d('0x2f'),_0xf41d('0x4'),_0xf41d('0x30'),'mailPause','openchannelPause','smsPause',_0xf41d('0xe'),_0xf41d('0x8'),'pauseType'],'where':{'id':{'$in':_['map'](_0x4a5a6e,'id')}},'raw':!![]});})[_0xf41d('0x16')](function(_0x26c733){return _0x26c733[_0xf41d('0x22')](function(_0xc26ba8){var _0x593953=_[_0xf41d('0x31')](_0x4a5a6e,['id',_0xc26ba8['id']]);var _0x9e3be3=filterAgentAttributes(_0x593953);_[_0xf41d('0x1b')](_0xc26ba8,_0x9e3be3);_0xc26ba8[_0xf41d('0x32')]=getAgentStatus(_0xc26ba8);return _0xc26ba8;});})[_0xf41d('0x16')](function(_0x52d8d7){var _0x12ed67=sortAgentsByStatus(_0x52d8d7,_0x431942);return _[_0xf41d('0x22')](_0x12ed67,'id');})[_0xf41d('0x33')](function(_0x499eaf){throw _0x499eaf;});}exports[_0xf41d('0x34')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x101511){var _0x3ece78={'fields':[],'order':null};var _0x28a875=_0x101511['split'](',');_0x3ece78[_0xf41d('0x35')]=_[_0xf41d('0x28')](_0x28a875,function(_0x2b60bf){if(!_0x2b60bf[_0xf41d('0x2b')]('globalStatus')){return!![];}_0x3ece78[_0xf41d('0x36')]=_[_0xf41d('0x37')](_0x2b60bf,'-')?_0xf41d('0x38'):'ASC';return![];});return _0x3ece78;}exports[_0xf41d('0x39')]=getUpdatedSortOptions;function validateSortParameter(_0x26f9b9){if(_0x26f9b9[_0xf41d('0x2b')]('fullname')&&!_0x26f9b9[_0xf41d('0x2b')](_0xf41d('0x3a'))){var _0x9cadc4=_0x26f9b9['substring'](0x0,_0x26f9b9[_0xf41d('0x3b')](_0xf41d('0x2f')));_0x26f9b9+=','+_0x9cadc4+'internal';}return _0x26f9b9;}exports[_0xf41d('0x3c')]=validateSortParameter;function sortAgentsByStatus(_0x17fee3,_0x42d268){var _0x2d6bbc=_0x17fee3[_0xf41d('0x3d')](function(_0x4425b7,_0x45fb64){if(_0x4425b7['globalStatus']===_0x45fb64['globalStatus']){if(_0x4425b7['globalStatus']==='pause'){if(_0x42d268===_0xf41d('0x38')){return(_0x4425b7[_0xf41d('0x3e')]||'')<(_0x45fb64[_0xf41d('0x3e')]||'')||_0x4425b7[_0xf41d('0x2f')][_0xf41d('0x3f')]()>_0x45fb64[_0xf41d('0x2f')][_0xf41d('0x3f')]()?0x1:-0x1;}else{return(_0x4425b7[_0xf41d('0x3e')]||'')<(_0x45fb64['pauseType']||'')||_0x4425b7[_0xf41d('0x2f')]['toLowerCase']()>_0x45fb64[_0xf41d('0x2f')]['toLowerCase']()?-0x1:0x1;}}else{if(_0x42d268===_0xf41d('0x38')){return _0x4425b7[_0xf41d('0x2f')]['toLowerCase']()<_0x45fb64[_0xf41d('0x2f')][_0xf41d('0x3f')]()?0x1:-0x1;}else{return _0x4425b7[_0xf41d('0x2f')][_0xf41d('0x3f')]()<_0x45fb64[_0xf41d('0x2f')][_0xf41d('0x3f')]()?-0x1:0x1;}}}else{if(_0x42d268===_0xf41d('0x38')){return _0x4425b7[_0xf41d('0x32')]<_0x45fb64[_0xf41d('0x32')]?0x1:-0x1;}else{return _0x4425b7[_0xf41d('0x32')]<_0x45fb64[_0xf41d('0x32')]?-0x1:0x1;}}});return _0x2d6bbc;}exports[_0xf41d('0x40')]=sortAgentsByStatus;function filterAgentAttributes(_0x207154){var _0x142cda=['userpic',_0xf41d('0x41'),_0xf41d('0x42'),'lastPauseAt','pauseType',_0xf41d('0x43'),_0xf41d('0x3a'),'address',_0xf41d('0x4'),_0xf41d('0x6'),'mailPause',_0xf41d('0x7'),_0xf41d('0x8'),_0xf41d('0x30'),_0xf41d('0xe'),_0xf41d('0x44'),_0xf41d('0x45'),'mailCapacity',_0xf41d('0x46'),_0xf41d('0x47'),_0xf41d('0x48'),_0xf41d('0x49'),'openchannelCurrentCapacity','mailCurrentCapacity',_0xf41d('0x4a'),_0xf41d('0x4b'),_0xf41d('0x4c'),_0xf41d('0x10'),_0xf41d('0x13'),_0xf41d('0x12'),'smsStatus',_0xf41d('0x4d'),_0xf41d('0x11'),_0xf41d('0xd'),'chatStatusTime',_0xf41d('0x4e'),_0xf41d('0x4f'),_0xf41d('0x50'),_0xf41d('0x51'),_0xf41d('0x52'),_0xf41d('0x53'),_0xf41d('0x54'),'destconnectedlinenum',_0xf41d('0x55'),_0xf41d('0x56'),_0xf41d('0x57'),_0xf41d('0x58')];var _0x25a2d4=[_0xf41d('0x4'),'openchannelPause',_0xf41d('0x5'),_0xf41d('0x7'),_0xf41d('0x8'),_0xf41d('0x30'),_0xf41d('0xe'),_0xf41d('0x41')];var _0x709cbf=_(_0x207154)['omit'](_0x25a2d4)['pick'](_0x142cda)[_0xf41d('0x27')]();return _0x709cbf;}exports['filterAgentAttributes']=filterAgentAttributes;
\ No newline at end of file
+var _0x0164=['faxPause','mailPause','openchannelPause','voicePause','filter','length','idle','unknown','unavailable','ringing','isNil','voiceStatus','pause','faxStatus','mailStatus','openchannelStatus','smsStatus','whatsappStatus','Agents','then','error','result','request','merge','catch','getRealtimeAgents','busy','getAgentStatus','isArray','startCase','map','findOne','getAgents','all','uniq','value','getAgentIdsByQueues','includes','getAgentIdsByStatus','resolve','User','findAll','name','fullname','chatPause','smsPause','find','globalStatus','getSortedAgentsIdsByStatus','split','fields','order','startsWith','DESC','ASC','getUpdatedSortOptions','internal','substring','indexOf','validateSortParameter','pauseType','toLowerCase','sortAgentsByStatus','userpic','online','lastLoginAt','lastPauseAt','whatsappPause','mailCapacity','smsCapacity','whatsappCapacity','chatCurrentCapacity','chatStatus','chatStatusTime','openchannelStatusTime','mailStatusTime','whatsappStatusTime','faxStatusTime','voiceStatusTime','destconnectedlinenum','screenrecording','phoneBarEnableAutomaticScreenRecording','omit','pick','filterAgentAttributes','lodash','jayson/promise','../../mysqldb','http'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x0164,0x160));var _0x4016=function(_0x4d07cc,_0x587613){_0x4d07cc=_0x4d07cc-0x0;var _0x42de3b=_0x0164[_0x4d07cc];return _0x42de3b;};'use strict';var _=require(_0x4016('0x0'));var jayson=require(_0x4016('0x1'));var db=require(_0x4016('0x2'))['db'];var amiClient=jayson['client'][_0x4016('0x3')]({'port':0x232a});var routingClient=jayson['client'][_0x4016('0x3')]({'port':0x232c});function isAgentPaused(_0x407b78,_0x42c678){var _0x216d60=[_0x407b78['chatPause'],_0x407b78[_0x4016('0x4')],_0x407b78[_0x4016('0x5')],_0x407b78[_0x4016('0x6')],_0x407b78['smsPause'],_0x407b78[_0x4016('0x7')],_0x407b78['whatsappPause']];if(!_0x42c678)return _['every'](_0x216d60);var _0x34f543=_[_0x4016('0x8')](_0x216d60);return _0x34f543[_0x4016('0x9')]>0x0&&_0x34f543[_0x4016('0x9')]<_0x216d60[_0x4016('0x9')]?!![]:![];}function isIdle(_0x5382a0){return _0x5382a0===_0x4016('0xa')||_0x5382a0===_0x4016('0xb')||_0x5382a0===_0x4016('0xc')||_0x5382a0===_0x4016('0xd')||_[_0x4016('0xe')](_0x5382a0);}function isAgentIdle(_0x3a8bfa){if(_0x3a8bfa[_0x4016('0xf')]!==_0x4016('0xa')&&_0x3a8bfa[_0x4016('0x7')]){_0x3a8bfa[_0x4016('0xf')]=_0x4016('0x10');return![];}return _['every']([_0x3a8bfa['chatStatus'],_0x3a8bfa[_0x4016('0x11')],_0x3a8bfa[_0x4016('0x12')],_0x3a8bfa[_0x4016('0x13')],_0x3a8bfa[_0x4016('0x14')],_0x3a8bfa['voiceStatus'],_0x3a8bfa[_0x4016('0x15')]],isIdle);}function getRealtimeAgents(){return amiClient['request'](_0x4016('0x16'),{})[_0x4016('0x17')](function(_0x5ea5c9){if(_0x5ea5c9[_0x4016('0x18')]){throw new Error('Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)');}var _0xf1ca1a=_0x5ea5c9[_0x4016('0x19')];return routingClient[_0x4016('0x1a')](_0x4016('0x16'),{})[_0x4016('0x17')](function(_0x38891e){if(_0x38891e[_0x4016('0x18')]){throw new Error('Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)');}var _0x43c96b=_0x38891e[_0x4016('0x19')];return _[_0x4016('0x1b')]({},_0xf1ca1a,_0x43c96b);});})[_0x4016('0x1c')](function(_0x2fc52f){throw _0x2fc52f;});}exports[_0x4016('0x1d')]=getRealtimeAgents;function getAgentStatus(_0x22d184){var _0x3b8921=_0x4016('0xb');if(isAgentPaused(_0x22d184))_0x3b8921=_0x4016('0x10');else if(isAgentPaused(_0x22d184,!![]))_0x3b8921='*pause';else if(isAgentIdle(_0x22d184))_0x3b8921='idle';else _0x3b8921=_0x4016('0x1e');return _0x3b8921;}exports[_0x4016('0x1f')]=getAgentStatus;function getAgentIdsByQueues(_0x5c357d,_0x1fd797){var _0x262af6=_[_0x4016('0x20')](_0x5c357d)?_0x5c357d:[_0x5c357d];var _0x3124bf=_[_0x4016('0x21')](_0x1fd797)+'Queue';var _0x5772e0=_[_0x4016('0x22')](_0x262af6,function(_0x26d710){return db[_0x3124bf][_0x4016('0x23')]({'where':{'id':_0x26d710}})[_0x4016('0x17')](function(_0x240bc1){if(!_0x240bc1)return[];return _0x240bc1[_0x4016('0x24')]({'attributes':['id'],'raw':!![]});});});return Promise[_0x4016('0x25')](_0x5772e0)[_0x4016('0x17')](function(_0xf190dd){var _0x591bce=_(_0xf190dd)['flatten']()['map']('id')[_0x4016('0x26')]()[_0x4016('0x27')]();return _0x591bce;});}exports[_0x4016('0x28')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x37273c,_0x19ac7,_0x190a57){try{if(_0x19ac7[_0x4016('0x9')]>0x0){_0x37273c=_0x37273c['filter'](function(_0x1a5de2){return _0x19ac7[_0x4016('0x29')](_0x1a5de2['id']);});}var _0x525d7e=_0x37273c['filter'](function(_0x5b9230){var _0x42dee8=_0x4016('0x1e');if(isAgentIdle(_0x5b9230)){_0x42dee8=_0x4016('0xa');}return _0x42dee8===_0x190a57;});return _['map'](_0x525d7e,'id');}catch(_0x5212e6){throw _0x5212e6;}}exports[_0x4016('0x2a')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x2bd7a3,_0xfcfa7,_0x15d0f1){return Promise[_0x4016('0x2b')]()['then'](function(){if(_0xfcfa7[_0x4016('0x9')]>0x0){_0x2bd7a3=_0x2bd7a3[_0x4016('0x8')](function(_0x497976){return _0xfcfa7[_0x4016('0x29')](_0x497976['id']);});}return _0x2bd7a3;})[_0x4016('0x17')](function(){return db[_0x4016('0x2c')][_0x4016('0x2d')]({'attributes':['id',_0x4016('0x2e'),_0x4016('0x2f'),_0x4016('0x30'),'faxPause','mailPause',_0x4016('0x6'),_0x4016('0x31'),'voicePause','whatsappPause','pauseType'],'where':{'id':{'$in':_[_0x4016('0x22')](_0x2bd7a3,'id')}},'raw':!![]});})[_0x4016('0x17')](function(_0x138185){return _0x138185[_0x4016('0x22')](function(_0x26b213){var _0x279c15=_[_0x4016('0x32')](_0x2bd7a3,['id',_0x26b213['id']]);var _0x91a0ee=filterAgentAttributes(_0x279c15);_['merge'](_0x26b213,_0x91a0ee);_0x26b213[_0x4016('0x33')]=getAgentStatus(_0x26b213);return _0x26b213;});})['then'](function(_0x8e4517){var _0x436adb=sortAgentsByStatus(_0x8e4517,_0x15d0f1);return _[_0x4016('0x22')](_0x436adb,'id');})[_0x4016('0x1c')](function(_0x2490b5){throw _0x2490b5;});}exports[_0x4016('0x34')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x22b9c0){var _0x15d845={'fields':[],'order':null};var _0x4e7473=_0x22b9c0[_0x4016('0x35')](',');_0x15d845[_0x4016('0x36')]=_[_0x4016('0x8')](_0x4e7473,function(_0x46b105){if(!_0x46b105[_0x4016('0x29')](_0x4016('0x33'))){return!![];}_0x15d845[_0x4016('0x37')]=_[_0x4016('0x38')](_0x46b105,'-')?_0x4016('0x39'):_0x4016('0x3a');return![];});return _0x15d845;}exports[_0x4016('0x3b')]=getUpdatedSortOptions;function validateSortParameter(_0x5ee115){if(_0x5ee115[_0x4016('0x29')]('fullname')&&!_0x5ee115[_0x4016('0x29')](_0x4016('0x3c'))){var _0x5b597e=_0x5ee115[_0x4016('0x3d')](0x0,_0x5ee115[_0x4016('0x3e')](_0x4016('0x2f')));_0x5ee115+=','+_0x5b597e+_0x4016('0x3c');}return _0x5ee115;}exports[_0x4016('0x3f')]=validateSortParameter;function sortAgentsByStatus(_0x4e7370,_0x404301){var _0x4af13d=_0x4e7370['sort'](function(_0x4b2d49,_0x2876f9){if(_0x4b2d49['globalStatus']===_0x2876f9[_0x4016('0x33')]){if(_0x4b2d49[_0x4016('0x33')]===_0x4016('0x10')){if(_0x404301===_0x4016('0x39')){return(_0x4b2d49[_0x4016('0x40')]||'')<(_0x2876f9['pauseType']||'')||_0x4b2d49['fullname'][_0x4016('0x41')]()>_0x2876f9[_0x4016('0x2f')]['toLowerCase']()?0x1:-0x1;}else{return(_0x4b2d49['pauseType']||'')<(_0x2876f9[_0x4016('0x40')]||'')||_0x4b2d49[_0x4016('0x2f')][_0x4016('0x41')]()>_0x2876f9['fullname'][_0x4016('0x41')]()?-0x1:0x1;}}else{if(_0x404301==='DESC'){return _0x4b2d49[_0x4016('0x2f')][_0x4016('0x41')]()<_0x2876f9[_0x4016('0x2f')][_0x4016('0x41')]()?0x1:-0x1;}else{return _0x4b2d49[_0x4016('0x2f')][_0x4016('0x41')]()<_0x2876f9[_0x4016('0x2f')][_0x4016('0x41')]()?-0x1:0x1;}}}else{if(_0x404301==='DESC'){return _0x4b2d49['globalStatus']<_0x2876f9[_0x4016('0x33')]?0x1:-0x1;}else{return _0x4b2d49[_0x4016('0x33')]<_0x2876f9[_0x4016('0x33')]?-0x1:0x1;}}});return _0x4af13d;}exports[_0x4016('0x42')]=sortAgentsByStatus;function filterAgentAttributes(_0x86db59){var _0x230205=[_0x4016('0x43'),_0x4016('0x44'),_0x4016('0x45'),'lastPauseAt','pauseType',_0x4016('0x46'),'internal','address',_0x4016('0x30'),'openchannelPause','mailPause',_0x4016('0x31'),_0x4016('0x47'),_0x4016('0x4'),_0x4016('0x7'),'chatCapacity','openchannelCapacity',_0x4016('0x48'),_0x4016('0x49'),_0x4016('0x4a'),'faxCapacity',_0x4016('0x4b'),'openchannelCurrentCapacity','mailCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity',_0x4016('0x4c'),_0x4016('0x13'),'mailStatus','smsStatus',_0x4016('0x15'),'faxStatus',_0x4016('0xf'),_0x4016('0x4d'),_0x4016('0x4e'),_0x4016('0x4f'),'smsStatusTime',_0x4016('0x50'),_0x4016('0x51'),_0x4016('0x52'),'queue',_0x4016('0x53'),_0x4016('0x54'),'phoneBarEnableScreenRecordingByAgent',_0x4016('0x55'),'routealias'];var _0x1508c7=[_0x4016('0x30'),_0x4016('0x6'),_0x4016('0x5'),_0x4016('0x31'),_0x4016('0x47'),_0x4016('0x4'),_0x4016('0x7'),_0x4016('0x44')];var _0x144522=_(_0x86db59)[_0x4016('0x56')](_0x1508c7)[_0x4016('0x57')](_0x230205)['value']();return _0x144522;}exports[_0x4016('0x58')]=filterAgentAttributes;
\ No newline at end of file