1 var _0x9201=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x61\x6D\x69","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x43\x57","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x61\x63\x77\x5D","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x74\x68\x65\x6E","\x75\x6E\x70\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x5B\x61\x63\x77\x5D\x20\x61\x67\x65\x6E\x74\x20\x61\x63\x77\x20\x63\x68\x65\x63\x6B","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x61\x63\x77","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x64","\x6E\x61\x6D\x65","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x5B\x61\x63\x77\x5D\x20\x61\x67\x65\x6E\x74\x20\x61\x63\x77\x20\x70\x61\x75\x73\x65","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x70\x61\x75\x73\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x6C\x6F\x6E\x65"];_0x9201[0];var _=require(_0x9201[1]);var util=require(_0x9201[2]);var moment=require(_0x9201[3]);var BPromise=require(_0x9201[4]);var VoiceQueue=require(_0x9201[6])[_0x9201[5]];var UserHasVoiceQueue=require(_0x9201[6])[_0x9201[7]];var Action=require(_0x9201[6])[_0x9201[8]];var Agent=require(_0x9201[6])[_0x9201[9]];var logger=require(_0x9201[11])(_0x9201[10]);module[_0x9201[12]]= function(){var _0x5c68xa=_0x9201[13];var _0x5c68xb=[];var _0x5c68xc=[];var _0x5c68xd=function(_0x5c68xe,_0x5c68xf,_0x5c68x10){return _0x5c68x10({action:_0x9201[24],interface:util[_0x9201[27]](_0x9201[25],_0x9201[26],_0x5c68xf),paused:false})[_0x9201[21]](function(){return Action[_0x9201[23]]({name:_0x9201[22],data1:_0x5c68xa,data2:_0x5c68xf},{body:{agent:_0x5c68xe,type:_0x5c68xa},raw:true})})[_0x9201[21]](function(){logger[_0x9201[20]](_0x9201[15],_0x9201[16],_0x5c68xf);return null})[_0x9201[19]](function(_0x5c68x11){logger[_0x9201[18]](_0x9201[15],_0x9201[16],_0x5c68xf,JSON[_0x9201[17]](_0x5c68x11));return null})[_0x9201[14]](function(){if(_0x5c68xb[_0x5c68xf]){clearTimeout(_0x5c68xb[_0x5c68xf]);delete _0x5c68xb[_0x5c68xf]};return null})};return {checkacw:function(_0x5c68xf){if(_0x5c68xb[_0x5c68xf]){clearTimeout(_0x5c68xb[_0x5c68xf]);delete _0x5c68xb[_0x5c68xf]};delete _0x5c68xc[_0x5c68xf]},agentconnect:function(_0x5c68x12){return function(_0x5c68x13){return Agent[_0x9201[39]]({where:{name:_0x5c68x12[_0x9201[35]]},include:[{model:VoiceQueue,required:false}]})[_0x9201[21]](function(_0x5c68x14){if(_0x5c68x14&& !_0x5c68x14[_0x9201[29]]&& _0x5c68x14[_0x9201[31]][_0x9201[30]]){var _0x5c68x15=_[_0x9201[33]](_0x5c68x14.VoiceQueues,{name:_0x5c68x12[_0x9201[32]]});if(_0x5c68x15&& _0x5c68x15[_0x9201[34]]){_0x5c68xc[_0x5c68x12[_0x9201[35]]]= {id:_0x5c68x14[_0x9201[36]],name:_0x5c68x14[_0x9201[37]],acwTimeout:_0x5c68x15[_0x9201[38]]}}}})[_0x9201[19]](function(_0x5c68x11){logger[_0x9201[18]](_0x9201[28],JSON[_0x9201[17]](_0x5c68x11))})}},hanguprequest:function(_0x5c68x12,_0x5c68x10){return function(_0x5c68x13){if(_0x5c68xc[_0x5c68x12[_0x9201[35]]]){return _0x5c68x10({action:_0x9201[24],interface:util[_0x9201[27]](_0x9201[25],_0x9201[26],_0x5c68xc[_0x5c68x12[_0x9201[35]]][_0x9201[37]]),paused:true,reason:_0x5c68xa})[_0x9201[21]](function(_0x5c68x16){if(_0x5c68x16){var _0x5c68x14=_[_0x9201[44]](_0x5c68xc[_0x5c68x12[_0x9201[35]]]);_0x5c68xb[_0x5c68x12[_0x9201[35]]]= setTimeout(function(){_0x5c68xd(_0x5c68x14[_0x9201[36]],_0x5c68x14[_0x9201[37]],_0x5c68x10)},_0x5c68x14[_0x9201[38]]* 1000)}})[_0x9201[21]](function(){return Action[_0x9201[23]]({name:_0x9201[42],data1:_0x5c68xa,data2:_0x5c68xc[_0x5c68x12[_0x9201[35]]][_0x9201[38]],data3:_0x5c68x12[_0x9201[43]],data4:_0x5c68x12[_0x9201[32]]},{body:{agent:_0x5c68xc[_0x5c68x12[_0x9201[35]]][_0x9201[36]],type:_0x5c68xa},raw:true})})[_0x9201[21]](function(){logger[_0x9201[20]](_0x9201[15],_0x9201[41],_0x5c68x12[_0x9201[35]]);return null})[_0x9201[19]](function(_0x5c68x11){logger[_0x9201[18]](_0x9201[40],JSON[_0x9201[17]](_0x5c68x11))})[_0x9201[14]](function(){delete _0x5c68xc[_0x5c68x12[_0x9201[35]]]})}}}}}