1 var _0x152c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x41\x66\x74\x65\x72","\x5B\x5D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\x5F\x75\x69\x46\x72\x6F\x6D","\x69\x6E\x63\x6C\x75\x64\x65\x73","","\x72\x65\x70\x6C\x61\x63\x65","\x5F\x75\x69\x54\x6F","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x64","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x6F\x6E","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68","\x5E\x5C\x2F\x7C\x5C\x2F\x24","\x67","\x63\x61\x6C\x6C","\x73\x6C\x69\x63\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6A\x6F\x69\x6E","\x47\x45\x54","\x50\x4F\x53\x54","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x65\x74\x68\x6F\x64","\x6C\x6F\x67","\x41\x63\x74\x69\x6F\x6E\x20\x46\x61\x69\x6C\x65\x64","\x63\x61\x74\x63\x68","\x41\x63\x74\x69\x6F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x61\x63\x74\x69\x6F\x6E","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x152c[0];var _=require(_0x152c[1]);var moment=require(_0x152c[2]);var request=require(_0x152c[3]);var User=require(_0x152c[5])[_0x152c[4]];var VoiceQueue=require(_0x152c[5])[_0x152c[6]];var ChatQueue=require(_0x152c[5])[_0x152c[7]];var MailQueue=require(_0x152c[5])[_0x152c[8]];var FaxQueue=require(_0x152c[5])[_0x152c[9]];var SmsQueue=require(_0x152c[5])[_0x152c[10]];var OpenchannelQueue=require(_0x152c[5])[_0x152c[11]];var Action=require(_0x152c[5])[_0x152c[12]];var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};function splitInterval(_0x8cd4xf){var _0x8cd4x10={};var _0x8cd4x11=_0x8cd4xf[_0x152c[14]](_0x152c[13]);var _0x8cd4x12;_0x8cd4x11[_0x152c[26]](function(_0x8cd4x13,_0x8cd4x14){switch(_0x8cd4x14){case 0:if(_0x8cd4x13!== _0x152c[15]){_0x8cd4x12= _0x8cd4x13[_0x152c[14]](_0x152c[16]);_0x8cd4x10[_0x152c[17]]= moment(_0x8cd4x12[0],_0x152c[18]);_0x8cd4x10[_0x152c[19]]= moment(_0x8cd4x12[1],_0x152c[18])}else {_0x8cd4x10[_0x152c[17]]= null;_0x8cd4x10[_0x152c[19]]= null};break;case 1:if(_0x8cd4x13!== _0x152c[15]){_0x8cd4x12= _0x8cd4x13[_0x152c[14]](_0x152c[16]);_0x8cd4x10[_0x152c[20]]= Number(weekDaysCollection[_0x8cd4x12[0]]);_0x8cd4x10[_0x152c[21]]= _0x8cd4x12[1]?Number(weekDaysCollection[_0x8cd4x12[1]]):null}else {_0x8cd4x10[_0x152c[20]]= null;_0x8cd4x10[_0x152c[21]]= null};break;case 2:if(_0x8cd4x13!== _0x152c[15]){_0x8cd4x12= _0x8cd4x13[_0x152c[14]](_0x152c[16]);_0x8cd4x10[_0x152c[22]]= Number(_0x8cd4x12[0]);_0x8cd4x10[_0x152c[23]]= _0x8cd4x12[1]?Number(_0x8cd4x12[1]):null}else {_0x8cd4x10[_0x152c[22]]= null;_0x8cd4x10[_0x152c[23]]= null};break;case 3:if(_0x8cd4x13!== _0x152c[15]){_0x8cd4x12= _0x8cd4x13[_0x152c[14]](_0x152c[16]);_0x8cd4x10[_0x152c[24]]= Number(monthsCollection[_0x8cd4x12[0]]);_0x8cd4x10[_0x152c[25]]= _0x8cd4x12[1]?Number(monthsCollection[_0x8cd4x12[1]]):null}else {_0x8cd4x10[_0x152c[24]]= null;_0x8cd4x10[_0x152c[25]]= null};break;default:}});return _0x8cd4x10}function isIntervalValid(_0x8cd4xf){var _0x8cd4x16=moment()[_0x152c[27]](_0x152c[18]);var _0x8cd4x17=moment()[_0x152c[27]](_0x152c[28]);var _0x8cd4x18=moment()[_0x152c[27]](_0x152c[29]);var _0x8cd4x19=moment()[_0x152c[27]](_0x152c[30]);var _0x8cd4x1a,_0x8cd4x1b,_0x8cd4x1c,_0x8cd4x1d;var _0x8cd4x1e=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x8cd4x1f=[1,2,3,4,5,6,7];var _0x8cd4x20=[];for(var _0x8cd4x21=1;_0x8cd4x21<= 31;_0x8cd4x21++){_0x8cd4x20[_0x152c[31]](_0x8cd4x21)};if(_0x8cd4xf[_0x152c[17]]&& _0x8cd4xf[_0x152c[19]]){if(_0x8cd4xf[_0x152c[19]][_0x152c[32]](_0x8cd4xf[_0x152c[17]])){_0x8cd4x1a= moment(_0x8cd4x16,_0x152c[18])[_0x152c[34]](_0x8cd4xf[_0x152c[17]],_0x8cd4xf[_0x152c[19]],null,_0x152c[33])}else {_0x8cd4x1a= !moment(_0x8cd4x16,_0x152c[18])[_0x152c[34]](_0x8cd4xf[_0x152c[19]],_0x8cd4xf[_0x152c[17]],null,_0x152c[33])}}else {_0x8cd4x1a= true};if(_0x8cd4xf[_0x152c[20]]){if(_0x8cd4xf[_0x152c[21]]&& _0x8cd4xf[_0x152c[21]]!== _0x8cd4xf[_0x152c[20]]){var _0x8cd4x22=_[_0x152c[35]](_0x8cd4x1f,function(_0x8cd4x23){if(_0x8cd4xf[_0x152c[20]]< _0x8cd4xf[_0x152c[21]]){return (_0x8cd4x23>= _0x8cd4xf[_0x152c[20]])&& (_0x8cd4x23<= _0x8cd4xf[_0x152c[21]])}else {return (1<= _0x8cd4x23&& _0x8cd4x23<= _0x8cd4xf[_0x152c[21]])|| (_0x8cd4xf[_0x152c[20]]<= _0x8cd4x23&& _0x8cd4x23<= 7)}});_0x8cd4x1b= (_0x8cd4x22[_0x152c[36]](parseInt(_0x8cd4x17))!== -1)?true:false}else {_0x8cd4x1b= (parseInt(_0x8cd4x17)=== _0x8cd4xf[_0x152c[20]])?true:false}}else {_0x8cd4x1b= true};if(_0x8cd4xf[_0x152c[22]]){if(_0x8cd4xf[_0x152c[23]]&& _0x8cd4xf[_0x152c[23]]!== _0x8cd4xf[_0x152c[22]]){var _0x8cd4x24=_[_0x152c[35]](_0x8cd4x20,function(_0x8cd4x23){if(_0x8cd4xf[_0x152c[22]]< _0x8cd4xf[_0x152c[23]]){return (_0x8cd4x23>= _0x8cd4xf[_0x152c[22]])&& (_0x8cd4x23<= _0x8cd4xf[_0x152c[23]])}else {return (1<= _0x8cd4x23&& _0x8cd4x23<= _0x8cd4xf[_0x152c[23]])|| (_0x8cd4xf[_0x152c[22]]<= _0x8cd4x23&& _0x8cd4x23<= 7)}});_0x8cd4x1c= (_0x8cd4x24[_0x152c[36]](parseInt(_0x8cd4x18))!== -1)?true:false}else {_0x8cd4x1c= (parseInt(_0x8cd4x18)=== _0x8cd4xf[_0x152c[22]])?true:false}}else {_0x8cd4x1c= true};if(_0x8cd4xf[_0x152c[24]]){if(_0x8cd4xf[_0x152c[25]]&& _0x8cd4xf[_0x152c[25]]!== _0x8cd4xf[_0x152c[24]]){var _0x8cd4x25=_[_0x152c[35]](_0x8cd4x1e,function(_0x8cd4x23){if(_0x8cd4xf[_0x152c[24]]< _0x8cd4xf[_0x152c[25]]){return (_0x8cd4x23>= _0x8cd4xf[_0x152c[24]])&& (_0x8cd4x23<= _0x8cd4xf[_0x152c[25]])}else {return (1<= _0x8cd4x23&& _0x8cd4x23<= _0x8cd4xf[_0x152c[25]])|| (_0x8cd4xf[_0x152c[24]]<= _0x8cd4x23&& _0x8cd4x23<= 7)}});_0x8cd4x1d= (_0x8cd4x25[_0x152c[36]](parseInt(_0x8cd4x19))!== -1)?true:false}else {_0x8cd4x1d= (parseInt(_0x8cd4x19)=== _0x8cd4xf[_0x152c[24]])?true:false}}else {_0x8cd4x1d= true};return _0x8cd4x1a&& _0x8cd4x1b&& _0x8cd4x1c&& _0x8cd4x1d}var getDate=function(_0x8cd4x27,_0x8cd4x28){var _0x8cd4x29=_0x152c[37];if(moment(_0x8cd4x27,_0x8cd4x29,true)[_0x152c[38]]()){return moment(_0x8cd4x27)}else {switch(_0x8cd4x28){case _0x152c[41]:return moment(_0x8cd4x27)[_0x152c[40]](_0x152c[39]);case _0x152c[43]:return moment(_0x8cd4x27)[_0x152c[42]](_0x152c[39]);default:return moment(_0x8cd4x27)}}};var getQuery=function(_0x8cd4x2b,_0x8cd4x2c,_0x8cd4x2d){var _0x8cd4x2e={where:{}};if(_0x8cd4x2b){var _0x8cd4x2f,_0x8cd4x30={};for(var _0x8cd4x31 in _0x8cd4x2b){if(_[_0x152c[45]](_0x8cd4x31,_0x152c[44])){_0x8cd4x2f= _0x8cd4x31[_0x152c[47]](_0x152c[44],_0x152c[46]);if(_0x8cd4x2b[_0x8cd4x2f+ _0x152c[48]]){_0x8cd4x2e[_0x152c[50]][_0x152c[49]]= _0x8cd4x2e[_0x152c[50]][_0x152c[49]]|| [];_0x8cd4x30= {};_0x8cd4x30[_0x8cd4x2f]= {$gte:getDate(_0x8cd4x2b[_0x8cd4x31],_0x152c[41])};_0x8cd4x2e[_0x152c[50]][_0x152c[49]][_0x152c[31]](_0x8cd4x30);_0x8cd4x30= {};_0x8cd4x30[_0x8cd4x2f]= {$lte:getDate(_0x8cd4x2b[_0x8cd4x2f+ _0x152c[48]],_0x152c[43])};_0x8cd4x2e[_0x152c[50]][_0x152c[49]][_0x152c[31]](_0x8cd4x30);delete _0x8cd4x2b[_0x8cd4x2f+ _0x152c[48]]}else {_0x8cd4x2e[_0x152c[50]][_0x8cd4x31[_0x152c[47]](_0x152c[44],_0x152c[46])]= {$gte:getDate(_0x8cd4x2b[_0x8cd4x31],_0x152c[41])}};delete _0x8cd4x2b[_0x8cd4x31]}else {if(_[_0x152c[45]](_0x8cd4x31,_0x152c[48])){_0x8cd4x2f= _0x8cd4x31[_0x152c[47]](_0x152c[48],_0x152c[46]);if(_0x8cd4x2b[_0x8cd4x2f+ _0x152c[44]]){_0x8cd4x2e[_0x152c[50]][_0x152c[49]]= _0x8cd4x2e[_0x152c[50]][_0x152c[49]]|| [];_0x8cd4x30= {};_0x8cd4x30[_0x8cd4x2f]= {$lte:getDate(_0x8cd4x2b[_0x8cd4x31],_0x152c[43])};_0x8cd4x2e[_0x152c[50]][_0x152c[49]][_0x152c[31]](_0x8cd4x30);_0x8cd4x30[_0x8cd4x2f]= {$gte:getDate(_0x8cd4x2b[_0x8cd4x2f+ _0x152c[44]],_0x152c[41])};_0x8cd4x2e[_0x152c[50]][_0x152c[49]][_0x152c[31]](_0x8cd4x30);delete _0x8cd4x2b[_0x8cd4x2f+ _0x152c[44]]}else {_0x8cd4x2e[_0x152c[50]][_0x8cd4x31[_0x152c[47]](_0x152c[48],_0x152c[46])]= {$lte:getDate(_0x8cd4x2b[_0x8cd4x31],_0x152c[43])}};delete _0x8cd4x2b[_0x8cd4x31]}}};_[_0x152c[26]](_0x8cd4x2b,function(_0x8cd4x32,_0x8cd4x31){switch(_0x8cd4x31){case _0x152c[51]:;case _0x152c[52]:_0x8cd4x2e[_0x8cd4x31]= Number(_0x8cd4x32);break;case _0x152c[53]:_0x8cd4x2e[_0x8cd4x31]= _0x8cd4x32;break;case _0x152c[54]:;case _0x152c[55]:_0x8cd4x2e[_0x152c[50]][_0x8cd4x31]= _0x8cd4x32;break;default:_0x8cd4x2e[_0x152c[50]][_0x8cd4x31]= {$like:_0x152c[56]+ _0x8cd4x32+ _0x152c[56]}}})};if(_0x8cd4x2c){_[_0x152c[57]](_0x8cd4x2e[_0x152c[50]],_0x8cd4x2c)};if(_0x8cd4x2d){_[_0x152c[57]](_0x8cd4x2e,_0x8cd4x2d)};return _0x8cd4x2e};var getVoiceQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_0x8cd4x2d|| {};return _0x8cd4x36[_0x152c[62]]({attributes:[_0x152c[60]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[60])})[_0x152c[59]](function(){return VoiceQueue[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2b,{name:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getChatQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_[_0x152c[57]](_0x8cd4x2d|| {},{distinct:true});return _0x8cd4x36[_0x152c[66]]({attributes:[_0x152c[65]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[65])})[_0x152c[59]](function(){return ChatQueue[_0x152c[64]](_0x152c[63])[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getMailQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_[_0x152c[57]](_0x8cd4x2d|| {},{distinct:true});return _0x8cd4x36[_0x152c[67]]({attributes:[_0x152c[65]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[65])})[_0x152c[59]](function(){return MailQueue[_0x152c[64]](_0x152c[63])[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getSmsQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_[_0x152c[57]](_0x8cd4x2d|| {},{distinct:true});return _0x8cd4x36[_0x152c[68]]({attributes:[_0x152c[65]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[65])})[_0x152c[59]](function(){return SmsQueue[_0x152c[64]](_0x152c[63])[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getFaxQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_[_0x152c[57]](_0x8cd4x2d|| {},{distinct:true});return _0x8cd4x36[_0x152c[69]]({attributes:[_0x152c[65]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[65])})[_0x152c[59]](function(){return FaxQueue[_0x152c[64]](_0x152c[63])[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getOpenchannelQueuesIdByUser=function(_0x8cd4x2b,_0x8cd4x2d){return function(_0x8cd4x34){var _0x8cd4x35=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x37=_[_0x152c[57]](_0x8cd4x2d|| {},{distinct:true});return _0x8cd4x36[_0x152c[70]]({attributes:[_0x152c[65]]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x35= _[_0x152c[61]](_0x8cd4x38,_0x152c[65])})[_0x152c[59]](function(){return OpenchannelQueue[_0x152c[64]](_0x152c[63])[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x35}}),_0x8cd4x37))})}};var getAgentsIdByUser=function(_0x8cd4x2b){return function(_0x8cd4x34){var _0x8cd4x3f=[];var _0x8cd4x36=_0x8cd4x34;var _0x8cd4x2e=_0x8cd4x2b|| {};var _0x8cd4x40=[],_0x8cd4x41=[],_0x8cd4x42=[],_0x8cd4x43=[],_0x8cd4x44=[],_0x8cd4x45=[];return _0x8cd4x36[_0x152c[62]]({attributes:[_0x152c[60]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x40= _[_0x152c[61]](_0x8cd4x38,_0x152c[60]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return _0x8cd4x36[_0x152c[66]]({attributes:[_0x152c[65]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x41= _[_0x152c[61]](_0x8cd4x38,_0x152c[65]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return _0x8cd4x36[_0x152c[67]]({attributes:[_0x152c[65]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x42= _[_0x152c[61]](_0x8cd4x38,_0x152c[65]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return _0x8cd4x36[_0x152c[69]]({attributes:[_0x152c[65]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x43= _[_0x152c[61]](_0x8cd4x38,_0x152c[65]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return _0x8cd4x36[_0x152c[68]]({attributes:[_0x152c[65]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x45= _[_0x152c[61]](_0x8cd4x38,_0x152c[65]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return _0x8cd4x36[_0x152c[70]]({attributes:[_0x152c[65]],include:[{raw:true,model:User,attributes:[_0x152c[65]]}]})})[_0x152c[59]](function(_0x8cd4x38){_0x8cd4x44= _[_0x152c[61]](_0x8cd4x38,_0x152c[65]);_0x8cd4x38[_0x152c[26]](function(_0x8cd4x46){_0x8cd4x3f= _[_0x152c[76]](_0x8cd4x3f,_[_0x152c[61]](_0x8cd4x46.Users,_0x152c[65]))})})[_0x152c[59]](function(){return User[_0x152c[64]](_0x152c[71],{method:[_0x152c[72],_0x8cd4x2e]},{method:[_0x152c[73],_0x8cd4x2e]},{method:[_0x152c[74],_0x8cd4x2e]},{method:[_0x152c[75],_0x8cd4x2e]})[_0x152c[58]](_[_0x152c[57]](getQuery(_0x8cd4x2e,{id:{$in:_0x8cd4x3f}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x8cd4x40}},required:false},{model:ChatQueue,where:{id:{$in:_0x8cd4x41}},required:false},{model:MailQueue,where:{id:{$in:_0x8cd4x42}},required:false},{model:FaxQueue,where:{id:{$in:_0x8cd4x43}},required:false},{model:SmsQueue,where:{id:{$in:_0x8cd4x45}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0x8cd4x44}},required:false}]}))})}};var stripTrailingSlash=function(_0x8cd4x48){if(_0x8cd4x48[_0x152c[77]](-1) === _0x152c[78]){return _0x8cd4x48[_0x152c[77]](0,_0x8cd4x48[_0x152c[79]]- 1)};return _0x8cd4x48};var join_url=function(){var _0x8cd4x4a= new RegExp(_0x152c[80],_0x152c[81]);var _0x8cd4x4b=Array[_0x152c[84]][_0x152c[83]][_0x152c[82]](arguments);return _0x8cd4x4b[_0x152c[61]](function(_0x8cd4x13){return _0x8cd4x13[_0x152c[47]](_0x8cd4x4a,_0x152c[46])})[_0x152c[85]](_0x152c[78])};var sendRequest=function(_0x8cd4x4d,_0x8cd4x4e,_0x8cd4x4f){if(_0x8cd4x4e== _0x152c[86]|| _0x8cd4x4e== _0x152c[87]){var _0x8cd4x50={method:_0x8cd4x4e,uri:_0x8cd4x4f,body:_0x8cd4x4d,json:true};return request(_0x8cd4x50)}else {console[_0x152c[89]](_0x152c[88])}};var execAction=function(_0x8cd4x52,_0x8cd4x4d){switch(_0x8cd4x52[_0x152c[93]]){case _0x152c[97]:Action[_0x152c[96]]({name:_0x8cd4x52[_0x152c[93]],data4:_0x8cd4x52[_0x152c[54]]|| _0x152c[94]},{body:{name:_0x8cd4x52[_0x152c[93]],agent:_0x8cd4x4d[_0x152c[95]],type:_0x8cd4x52[_0x152c[54]]|| _0x152c[94]}})[_0x152c[59]](function(){console[_0x152c[89]](_0x152c[92])})[_0x152c[91]](function(_0x8cd4x53){console[_0x152c[89]](_0x152c[90],_0x8cd4x53)});break;default:console[_0x152c[89]](_0x152c[98])}};module[_0x152c[99]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getSmsQueuesIdByUser:getSmsQueuesIdByUser,getOpenchannelQueuesIdByUser:getOpenchannelQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,join_url:join_url,splitInterval:splitInterval,isValidInterval:isIntervalValid,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0x152c[100])}