Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / services / ami / trigger / index.js
index 97e5fbf..728b1f1 100644 (file)
@@ -1 +1 @@
-const a1135_0x5490=['Actions','field','lastevent','length','custom:dialconnect','checkTriggers','status','stringify','checkConditions','./script','winArguments','toLowerCase','account','AnyConditions','routeId','custom:agentcomplete','template\x20not\x20found','AllConditions','action','channel','popup','exec','vtigerAccounts','undefined','location','event','custom:newinteraction','custom:dialbegin','motionbar','uri','urlforward','custom:agentringnoanswer','custom:incomingmessage','name','custom:closedinteraction','jscripty','clone','AccountId','html','format','zendeskAccounts','operator','upperFirst','zohoAccounts','windowHeight','util','exports','custom:dialend','./integration','uriLocation','voiceQueues','voiceExtensions','replace','data5','isNil','ChatWebsiteId','deskAccounts','some','every','buildUri','syncCustomEvent','url','parse','agent','custom:acceptmessage','./urlforward','agents','contactmanager','browser','../ami','custom:outgoingmessage','data3','mustache','templates','render','custom:queuecallerabandon','info','queue','custom:rejectmessage','custom:agentnoanswer','interface','checkTrigger','accounts','freshdeskAccounts','bind','800','value','servicenowAccounts','data2','data4','600','syncAgentDial','merge','trigger','freshsalesAccounts','user:%s','prototype','data1','message','interaction','variables','dynamics365Accounts','search','TemplateId','winapp','query','emit','data6','salesforceAccounts','windowWidth','script','sugarcrmAccounts','custom:agentbusy','triggers'];(function(_0x559fc6,_0x5490b2){const _0x2cacf8=function(_0x452539){while(--_0x452539){_0x559fc6['push'](_0x559fc6['shift']());}};_0x2cacf8(++_0x5490b2);}(a1135_0x5490,0x19c));const a1135_0x2cac=function(_0x559fc6,_0x5490b2){_0x559fc6=_0x559fc6-0x0;let _0x2cacf8=a1135_0x5490[_0x559fc6];return _0x2cacf8;};const _0x2a4d15=a1135_0x2cac;'use strict';const util=require(_0x2a4d15('0x59')),_=require('lodash'),url=require(_0x2a4d15('0x69')),Mustache=require(_0x2a4d15('0x2')),urlforward=require(_0x2a4d15('0x6d')),integration=require(_0x2a4d15('0x5c')),cmContact=require('./cmContact'),script=require(_0x2a4d15('0x35')),logger=require('../../../config/logger')(_0x2a4d15('0x17')),ami=require(_0x2a4d15('0x71')),{getSocket}=require('../../../rediscache'),io=getSocket(),operators={'equals':function(_0x452539,_0x1c5544){return _0x452539==_0x1c5544;},'not_equals':function(_0xa0718e,_0x3659ae){return _0xa0718e!=_0x3659ae;}},barAndWebActions=[_0x2a4d15('0x40'),_0x2a4d15('0x69'),'winapp'];function Trigger(_0x3b7faf){const _0x565207=_0x2a4d15;this['triggers']=_0x3b7faf[_0x565207('0x2b')],this[_0x565207('0x6e')]=_0x3b7faf[_0x565207('0x6e')],this[_0x565207('0x5e')]=_0x3b7faf['voiceQueues'],this[_0x565207('0x3')]=_0x3b7faf['templates'],this[_0x565207('0x5f')]=_0x3b7faf['voiceExtensions'],this[_0x565207('0x54')]=_0x3b7faf[_0x565207('0x54')],this[_0x565207('0xd')]=_0x3b7faf[_0x565207('0xd')],this[_0x565207('0x26')]=_0x3b7faf[_0x565207('0x26')],this[_0x565207('0x29')]=_0x3b7faf[_0x565207('0x29')],this[_0x565207('0x57')]=_0x3b7faf[_0x565207('0x57')],this[_0x565207('0x64')]=_0x3b7faf[_0x565207('0x64')],this[_0x565207('0x42')]=_0x3b7faf[_0x565207('0x42')],this[_0x565207('0x11')]=_0x3b7faf[_0x565207('0x11')],this[_0x565207('0x1f')]=_0x3b7faf[_0x565207('0x1f')],this['freshsalesAccounts']=_0x3b7faf[_0x565207('0x18')],this[_0x565207('0xc')]={'zendesk':this['zendeskAccounts'],'salesforce':this[_0x565207('0x26')],'freshdesk':this[_0x565207('0xd')],'sugarcrm':this[_0x565207('0x29')],'zoho':this[_0x565207('0x57')],'desk':this[_0x565207('0x64')],'vtiger':this['vtigerAccounts'],'dynamics365':this['dynamics365Accounts'],'freshsales':this[_0x565207('0x18')],'servicenow':this[_0x565207('0x11')]},ami['on']('custom:agentcalled',this['syncCustomEvent'][_0x565207('0xe')](this)),ami['on']('custom:agentconnect',this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x4b'),this[_0x565207('0x68')]['bind'](this)),ami['on'](_0x565207('0x3b'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on']('custom:agentnosuchnumber',this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x9'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x2a'),this['syncCustomEvent']['bind'](this)),ami['on']('custom:agentcongestion',this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on']('custom:agentreject',this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x5'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on']('custom:timeout',this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x47'),this[_0x565207('0x15')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x30'),this[_0x565207('0x15')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x5b'),this['syncAgentDial'][_0x565207('0xe')](this)),ami['on'](_0x565207('0x46'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x4e'),this['syncCustomEvent'][_0x565207('0xe')](this)),ami['on'](_0x565207('0x4c'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x0'),this['syncCustomEvent'][_0x565207('0xe')](this)),ami['on'](_0x565207('0x6c'),this[_0x565207('0x68')][_0x565207('0xe')](this)),ami['on'](_0x565207('0x8'),this[_0x565207('0x68')][_0x565207('0xe')](this));}Trigger[_0x2a4d15('0x1a')][_0x2a4d15('0x24')]=function(_0x1cd912,_0x3c8372,_0x4840fb){const _0x719d94=_0x2a4d15;logger[_0x719d94('0x6')](_0x1cd912,_0x3c8372,JSON[_0x719d94('0x33')](_0x4840fb)),io['to'](_0x1cd912)[_0x719d94('0x24')](_0x3c8372,_0x4840fb);},Trigger[_0x2a4d15('0x1a')][_0x2a4d15('0x68')]=function(_0x373d9e){const _0x2d4509=_0x2a4d15,_0x2d3faf=_[_0x2d4509('0x50')](_0x373d9e);this[_0x2d4509('0x31')](_0x2d3faf);},Trigger[_0x2a4d15('0x1a')][_0x2a4d15('0x15')]=function(_0x5f0508){const _0x12400a=_0x2a4d15;this[_0x12400a('0x6e')][_0x5f0508[_0x12400a('0xa')]]&&this['syncCustomEvent'](_0x5f0508);},Trigger['prototype'][_0x2a4d15('0x31')]=function(_0x362874){const _0x11b8aa=_0x2a4d15;let _0x11bc3c;for(const _0x1dd50b in this['triggers']){if(typeof this[_0x11b8aa('0x2b')][_0x1dd50b]!==_0x11b8aa('0x43')){if(this[_0x11b8aa('0x2b')][_0x1dd50b][_0x11b8aa('0x32')]){_0x11bc3c=this[_0x11b8aa('0xb')](this[_0x11b8aa('0x2b')][_0x1dd50b],_0x362874);if(_0x11bc3c){_['merge'](_0x362874,_0x362874[_0x11b8aa('0x1e')]);for(let _0x4126e6=0x0,_0x527fdf;_0x4126e6<this[_0x11b8aa('0x2b')][_0x1dd50b]['Actions'][_0x11b8aa('0x2f')];_0x4126e6+=0x1){_0x527fdf=this[_0x11b8aa('0x2b')][_0x1dd50b][_0x11b8aa('0x2c')][_0x4126e6];if(this['agents'][_0x362874[_0x11b8aa('0xa')]])switch(_0x527fdf['action']['toLowerCase']()){case _0x11b8aa('0x6f'):break;case _0x11b8aa('0x48'):case _0x11b8aa('0x70'):{const _0x286508={};switch(barAndWebActions[_0x527fdf[_0x11b8aa('0x1b')]]){case _0x11b8aa('0x40'):_0x286508[_0x11b8aa('0x21')]=_0x527fdf[_0x11b8aa('0x12')],_0x286508[_0x11b8aa('0x52')]=this[_0x11b8aa('0x3')][_0x527fdf['data2']]?Mustache[_0x11b8aa('0x4')](this[_0x11b8aa('0x3')][_0x527fdf['data2']][_0x11b8aa('0x52')],_0x362874):_0x11b8aa('0x3c');break;case'url':_0x286508[_0x11b8aa('0x49')]=this[_0x11b8aa('0x67')](_0x527fdf[_0x11b8aa('0x12')],_0x362874,_[_0x11b8aa('0x62')](_0x527fdf[_0x11b8aa('0x1')])?!![]:parseInt(_0x527fdf[_0x11b8aa('0x1')],0xa));_[_0x11b8aa('0x62')](_0x527fdf[_0x11b8aa('0x13')])?_0x286508[_0x11b8aa('0x44')]='0':(_0x286508[_0x11b8aa('0x5d')]=_0x527fdf['data4'],_0x286508[_0x11b8aa('0x27')]=_['isNil'](_0x527fdf[_0x11b8aa('0x61')])?_0x11b8aa('0xf'):_0x527fdf['data5'],_0x286508[_0x11b8aa('0x58')]=_[_0x11b8aa('0x62')](_0x527fdf[_0x11b8aa('0x25')])?_0x11b8aa('0x14'):_0x527fdf[_0x11b8aa('0x25')]);break;case _0x11b8aa('0x22'):_0x286508['winApplication']=_0x527fdf[_0x11b8aa('0x12')]?Mustache[_0x11b8aa('0x4')](_0x527fdf[_0x11b8aa('0x12')],_0x362874):'',_0x286508[_0x11b8aa('0x36')]=_0x527fdf[_0x11b8aa('0x1')]?Mustache[_0x11b8aa('0x4')](_0x527fdf[_0x11b8aa('0x1')],_0x362874):'';break;}this['emit'](util[_0x11b8aa('0x53')]('user:%s',this[_0x11b8aa('0x6e')][_0x362874[_0x11b8aa('0xa')]]['name']),util[_0x11b8aa('0x53')]('trigger:%s:%s',_0x527fdf[_0x11b8aa('0x3e')]['toLowerCase'](),barAndWebActions[_0x527fdf[_0x11b8aa('0x1b')]]),_[_0x11b8aa('0x16')](_0x286508,_0x362874));break;}case _0x11b8aa('0x4f'):this[_0x11b8aa('0x24')](util[_0x11b8aa('0x53')](_0x11b8aa('0x19'),this[_0x11b8aa('0x6e')][_0x362874[_0x11b8aa('0xa')]][_0x11b8aa('0x4d')]),util['format']('trigger:%s',_0x527fdf[_0x11b8aa('0x3e')][_0x11b8aa('0x37')]()),_[_0x11b8aa('0x16')]({'ProjectId':parseInt(_0x527fdf[_0x11b8aa('0x1b')],0xa)},_0x362874));break;default:this[_0x11b8aa('0x24')](util[_0x11b8aa('0x53')](_0x11b8aa('0x19'),this[_0x11b8aa('0x6e')][_0x362874[_0x11b8aa('0xa')]][_0x11b8aa('0x4d')]),util['format']('trigger:%s',_0x527fdf[_0x11b8aa('0x3e')][_0x11b8aa('0x37')]()),_[_0x11b8aa('0x16')]({},_0x527fdf,_0x362874));}switch(_0x527fdf[_0x11b8aa('0x3e')]['toLowerCase']()){case'contactmanager':cmContact['exec'](this[_0x11b8aa('0x6e')][_0x362874[_0x11b8aa('0xa')]],this['triggers'][_0x1dd50b],_0x527fdf,_0x362874);break;case'integration':integration['exec'](_0x527fdf,_0x362874,this[_0x11b8aa('0xc')],this[_0x11b8aa('0x6e')][_0x362874[_0x11b8aa('0xa')]],this[_0x11b8aa('0x5e')][_0x362874['queue']],this[_0x11b8aa('0x5f')][_0x362874[_0x11b8aa('0x3a')]]);break;case _0x11b8aa('0x4a'):urlforward[_0x11b8aa('0x41')](_0x527fdf,_0x362874);break;case _0x11b8aa('0x28'):script[_0x11b8aa('0x41')](_0x527fdf,_0x362874);break;}}}}}}},Trigger[_0x2a4d15('0x1a')][_0x2a4d15('0x67')]=function(_0x19c62a,_0x234cdd,_0xe28f0f){const _0x2d2610=_0x2a4d15,_0x5f4c72=url[_0x2d2610('0x6a')](Mustache['render'](_0x19c62a,_0x234cdd),!![]);_0xe28f0f&&_[_0x2d2610('0x16')](_0x5f4c72[_0x2d2610('0x23')],_0x234cdd);delete _0x5f4c72[_0x2d2610('0x20')];let _0x5f4ef7=url[_0x2d2610('0x53')](_0x5f4c72);return _0x5f4ef7=_0x5f4ef7[_0x2d2610('0x60')](/\/\?/g,'?'),_0x5f4ef7;},Trigger[_0x2a4d15('0x1a')][_0x2a4d15('0xb')]=function(_0x3d8c91,_0x61e6fc){const _0x4c52ff=_0x2a4d15;let _0x5e1e6d=!![],_0x5cc4e3=!![];return _0x3d8c91['AllConditions']['length']&&(_0x5e1e6d=_[_0x4c52ff('0x66')](_0x3d8c91[_0x4c52ff('0x3d')],this[_0x4c52ff('0x34')](_0x61e6fc,_0x3d8c91[_0x4c52ff('0x3f')]))),_0x3d8c91[_0x4c52ff('0x39')]['length']&&(_0x5cc4e3=_[_0x4c52ff('0x65')](_0x3d8c91[_0x4c52ff('0x39')],this['checkConditions'](_0x61e6fc,_0x3d8c91[_0x4c52ff('0x3f')]))),_0x5e1e6d&&_0x5cc4e3;},Trigger['prototype'][_0x2a4d15('0x34')]=function(_0x519d67,_0x47d5c4){return function(_0x369d65){const _0x4d50ae=a1135_0x2cac;switch(_0x369d65[_0x4d50ae('0x2d')]){case _0x4d50ae('0x38'):if(_0x519d67['channel']===_0x47d5c4)return _0x47d5c4==='chat'?_0x519d67['ChatWebsiteId']?operators[_0x369d65[_0x4d50ae('0x55')]](Number(_0x369d65['value']),_0x519d67[_0x4d50ae('0x63')]):![]:_0x519d67[_[_0x4d50ae('0x56')](_0x47d5c4)+_0x4d50ae('0x51')]?operators[_0x369d65[_0x4d50ae('0x55')]](Number(_0x369d65[_0x4d50ae('0x10')]),_0x519d67[_[_0x4d50ae('0x56')](_0x47d5c4)+_0x4d50ae('0x51')]):![];break;case _0x4d50ae('0x1d'):case _0x4d50ae('0x1c'):if(_0x519d67[_0x4d50ae('0x3f')]===_0x47d5c4)return _0x519d67[_0x4d50ae('0x45')]?operators[_0x369d65['operator']](_0x369d65[_0x4d50ae('0x10')],_0x519d67[_0x4d50ae('0x45')]):![];break;case'queue':return _0x519d67[_0x4d50ae('0x7')]?operators[_0x369d65[_0x4d50ae('0x55')]](_0x369d65[_0x4d50ae('0x10')],_0x519d67[_0x4d50ae('0x7')]):![];case _0x4d50ae('0x6b'):return _0x519d67['membername']?operators[_0x369d65[_0x4d50ae('0x55')]](_0x369d65[_0x4d50ae('0x10')],_0x519d67['membername']):![];case _0x4d50ae('0x2e'):return _0x519d67['lastevent']?operators[_0x369d65[_0x4d50ae('0x55')]](_0x369d65[_0x4d50ae('0x10')],_0x519d67[_0x4d50ae('0x2e')]):![];case'routeId':return _0x519d67[_0x4d50ae('0x3a')]?operators[_0x369d65[_0x4d50ae('0x55')]](_0x369d65[_0x4d50ae('0x10')],_0x519d67[_0x4d50ae('0x3a')]):![];}return![];};},module[_0x2a4d15('0x5a')]=Trigger;
\ No newline at end of file
+const a1135_0x2ea3=['custom:dialconnect','data5','render','variables','TemplateId','stringify','interface','jscripty','ChatWebsiteId','event','syncAgentDial','motionbar','membername','syncCustomEvent','voiceQueues','trigger','./integration','operator','channel','agents','integration','accounts','servicenowAccounts','routeId','winapp','winArguments','custom:agentcongestion','custom:agentringnoanswer','deskAccounts','custom:closedinteraction','Actions','action','util','lastevent','../../../config/logger','custom:agentbusy','600','./script','value','custom:newinteraction','location','data3','contactmanager','triggers','./urlforward','some','data4','checkTrigger','AnyConditions','sugarcrmAccounts','bind','toLowerCase','exec','exports','prototype','popup','custom:dialend','zohoAccounts','windowHeight','custom:agentnoanswer','freshdeskAccounts','freshsalesAccounts','undefined','checkConditions','every','custom:dialbegin','name','trigger:%s','custom:rejectmessage','parse','chat','custom:agentnosuchnumber','data6','custom:agentcalled','800','salesforceAccounts','templates','account','mustache','script','vtigerAccounts','interaction','AccountId','custom:timeout','upperFirst','data1','emit','field','AllConditions','dynamics365Accounts','isNil','length','custom:acceptmessage','user:%s','lodash','merge','clone','queue','voiceExtensions','checkTriggers','custom:outgoingmessage','custom:agentcomplete','urlforward','./cmContact','url','custom:agentconnect','buildUri','data2','zendeskAccounts','format','replace'];(function(_0x58858e,_0x2ea396){const _0x51201a=function(_0x2b0f95){while(--_0x2b0f95){_0x58858e['push'](_0x58858e['shift']());}};_0x51201a(++_0x2ea396);}(a1135_0x2ea3,0x162));const a1135_0x5120=function(_0x58858e,_0x2ea396){_0x58858e=_0x58858e-0x0;let _0x51201a=a1135_0x2ea3[_0x58858e];return _0x51201a;};const _0x9b9281=a1135_0x5120;'use strict';const util=require(_0x9b9281('0xb')),_=require(_0x9b9281('0x49')),url=require(_0x9b9281('0x53')),Mustache=require(_0x9b9281('0x39')),urlforward=require(_0x9b9281('0x17')),integration=require(_0x9b9281('0x6a')),cmContact=require(_0x9b9281('0x52')),script=require(_0x9b9281('0x10')),logger=require(_0x9b9281('0xd'))(_0x9b9281('0x69')),ami=require('../ami'),{getSocket}=require('../../../rediscache'),io=getSocket(),operators={'equals':function(_0x2b0f95,_0x5aec74){return _0x2b0f95==_0x5aec74;},'not_equals':function(_0x2f41de,_0x425799){return _0x2f41de!=_0x425799;}},barAndWebActions=['popup',_0x9b9281('0x53'),_0x9b9281('0x3')];function Trigger(_0x18e998){const _0x2f7c31=_0x9b9281;this[_0x2f7c31('0x16')]=_0x18e998[_0x2f7c31('0x16')],this[_0x2f7c31('0x6d')]=_0x18e998[_0x2f7c31('0x6d')],this[_0x2f7c31('0x68')]=_0x18e998[_0x2f7c31('0x68')],this[_0x2f7c31('0x37')]=_0x18e998['templates'],this[_0x2f7c31('0x4d')]=_0x18e998[_0x2f7c31('0x4d')],this['zendeskAccounts']=_0x18e998[_0x2f7c31('0x57')],this[_0x2f7c31('0x27')]=_0x18e998[_0x2f7c31('0x27')],this[_0x2f7c31('0x36')]=_0x18e998['salesforceAccounts'],this[_0x2f7c31('0x1c')]=_0x18e998[_0x2f7c31('0x1c')],this[_0x2f7c31('0x24')]=_0x18e998[_0x2f7c31('0x24')],this[_0x2f7c31('0x7')]=_0x18e998[_0x2f7c31('0x7')],this[_0x2f7c31('0x3b')]=_0x18e998[_0x2f7c31('0x3b')],this[_0x2f7c31('0x1')]=_0x18e998[_0x2f7c31('0x1')],this[_0x2f7c31('0x44')]=_0x18e998[_0x2f7c31('0x44')],this[_0x2f7c31('0x28')]=_0x18e998[_0x2f7c31('0x28')],this[_0x2f7c31('0x0')]={'zendesk':this[_0x2f7c31('0x57')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x2f7c31('0x27')],'sugarcrm':this[_0x2f7c31('0x1c')],'zoho':this[_0x2f7c31('0x24')],'desk':this[_0x2f7c31('0x7')],'vtiger':this[_0x2f7c31('0x3b')],'dynamics365':this[_0x2f7c31('0x44')],'freshsales':this[_0x2f7c31('0x28')],'servicenow':this[_0x2f7c31('0x1')]},ami['on'](_0x2f7c31('0x34'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x54'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x6'),this[_0x2f7c31('0x67')]['bind'](this)),ami['on'](_0x2f7c31('0x50'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x32'),this['syncCustomEvent'][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x26'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0xe'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x5'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on']('custom:agentreject',this['syncCustomEvent']['bind'](this)),ami['on']('custom:queuecallerabandon',this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x3e'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x2c'),this[_0x2f7c31('0x64')]['bind'](this)),ami['on'](_0x2f7c31('0x5a'),this['syncAgentDial'][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x23'),this[_0x2f7c31('0x64')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x12'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x8'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on']('custom:incomingmessage',this['syncCustomEvent'][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x4f'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x47'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this)),ami['on'](_0x2f7c31('0x2f'),this[_0x2f7c31('0x67')][_0x2f7c31('0x1d')](this));}Trigger[_0x9b9281('0x21')][_0x9b9281('0x41')]=function(_0x59998b,_0x5d5d22,_0x1563a4){const _0x400aac=_0x9b9281;logger['info'](_0x59998b,_0x5d5d22,JSON[_0x400aac('0x5f')](_0x1563a4)),io['to'](_0x59998b)['emit'](_0x5d5d22,_0x1563a4);},Trigger[_0x9b9281('0x21')]['syncCustomEvent']=function(_0x4c76fc){const _0x1c1c98=_0x9b9281,_0x206de9=_[_0x1c1c98('0x4b')](_0x4c76fc);this[_0x1c1c98('0x4e')](_0x206de9);},Trigger['prototype'][_0x9b9281('0x64')]=function(_0x11867f){const _0x5c0ddf=_0x9b9281;this[_0x5c0ddf('0x6d')][_0x11867f['interface']]&&this[_0x5c0ddf('0x67')](_0x11867f);},Trigger[_0x9b9281('0x21')][_0x9b9281('0x4e')]=function(_0xb76d0a){const _0x2c2ad8=_0x9b9281;let _0x20a1a9;for(const _0x1f3c02 in this[_0x2c2ad8('0x16')]){if(typeof this[_0x2c2ad8('0x16')][_0x1f3c02]!==_0x2c2ad8('0x29')){if(this[_0x2c2ad8('0x16')][_0x1f3c02]['status']){_0x20a1a9=this[_0x2c2ad8('0x1a')](this[_0x2c2ad8('0x16')][_0x1f3c02],_0xb76d0a);if(_0x20a1a9){_[_0x2c2ad8('0x4a')](_0xb76d0a,_0xb76d0a[_0x2c2ad8('0x5d')]);for(let _0x1a2074=0x0,_0x4547db;_0x1a2074<this[_0x2c2ad8('0x16')][_0x1f3c02][_0x2c2ad8('0x9')][_0x2c2ad8('0x46')];_0x1a2074+=0x1){_0x4547db=this[_0x2c2ad8('0x16')][_0x1f3c02][_0x2c2ad8('0x9')][_0x1a2074];if(this['agents'][_0xb76d0a[_0x2c2ad8('0x60')]])switch(_0x4547db[_0x2c2ad8('0xa')][_0x2c2ad8('0x1e')]()){case _0x2c2ad8('0x15'):break;case _0x2c2ad8('0x65'):case'browser':{const _0x3f3cd8={};switch(barAndWebActions[_0x4547db[_0x2c2ad8('0x40')]]){case _0x2c2ad8('0x22'):_0x3f3cd8[_0x2c2ad8('0x5e')]=_0x4547db['data2'],_0x3f3cd8['html']=this[_0x2c2ad8('0x37')][_0x4547db['data2']]?Mustache['render'](this[_0x2c2ad8('0x37')][_0x4547db[_0x2c2ad8('0x56')]]['html'],_0xb76d0a):'template\x20not\x20found';break;case'url':_0x3f3cd8['uri']=this[_0x2c2ad8('0x55')](_0x4547db[_0x2c2ad8('0x56')],_0xb76d0a,_[_0x2c2ad8('0x45')](_0x4547db[_0x2c2ad8('0x14')])?!![]:parseInt(_0x4547db['data3'],0xa));_[_0x2c2ad8('0x45')](_0x4547db[_0x2c2ad8('0x19')])?_0x3f3cd8[_0x2c2ad8('0x13')]='0':(_0x3f3cd8['uriLocation']=_0x4547db['data4'],_0x3f3cd8['windowWidth']=_[_0x2c2ad8('0x45')](_0x4547db[_0x2c2ad8('0x5b')])?_0x2c2ad8('0x35'):_0x4547db[_0x2c2ad8('0x5b')],_0x3f3cd8[_0x2c2ad8('0x25')]=_[_0x2c2ad8('0x45')](_0x4547db[_0x2c2ad8('0x33')])?_0x2c2ad8('0xf'):_0x4547db['data6']);break;case _0x2c2ad8('0x3'):_0x3f3cd8['winApplication']=_0x4547db['data2']?Mustache[_0x2c2ad8('0x5c')](_0x4547db['data2'],_0xb76d0a):'',_0x3f3cd8[_0x2c2ad8('0x4')]=_0x4547db[_0x2c2ad8('0x14')]?Mustache[_0x2c2ad8('0x5c')](_0x4547db['data3'],_0xb76d0a):'';break;}this[_0x2c2ad8('0x41')](util[_0x2c2ad8('0x58')](_0x2c2ad8('0x48'),this['agents'][_0xb76d0a[_0x2c2ad8('0x60')]]['name']),util[_0x2c2ad8('0x58')]('trigger:%s:%s',_0x4547db[_0x2c2ad8('0xa')]['toLowerCase'](),barAndWebActions[_0x4547db[_0x2c2ad8('0x40')]]),_[_0x2c2ad8('0x4a')](_0x3f3cd8,_0xb76d0a));break;}case _0x2c2ad8('0x61'):this[_0x2c2ad8('0x41')](util[_0x2c2ad8('0x58')](_0x2c2ad8('0x48'),this['agents'][_0xb76d0a[_0x2c2ad8('0x60')]][_0x2c2ad8('0x2d')]),util['format'](_0x2c2ad8('0x2e'),_0x4547db[_0x2c2ad8('0xa')]['toLowerCase']()),_[_0x2c2ad8('0x4a')]({'ProjectId':parseInt(_0x4547db[_0x2c2ad8('0x40')],0xa)},_0xb76d0a));break;default:this[_0x2c2ad8('0x41')](util[_0x2c2ad8('0x58')](_0x2c2ad8('0x48'),this[_0x2c2ad8('0x6d')][_0xb76d0a[_0x2c2ad8('0x60')]][_0x2c2ad8('0x2d')]),util[_0x2c2ad8('0x58')](_0x2c2ad8('0x2e'),_0x4547db[_0x2c2ad8('0xa')][_0x2c2ad8('0x1e')]()),_[_0x2c2ad8('0x4a')]({},_0x4547db,_0xb76d0a));}switch(_0x4547db[_0x2c2ad8('0xa')][_0x2c2ad8('0x1e')]()){case _0x2c2ad8('0x15'):cmContact['exec'](this['agents'][_0xb76d0a['interface']],this[_0x2c2ad8('0x16')][_0x1f3c02],_0x4547db,_0xb76d0a);break;case _0x2c2ad8('0x6e'):integration[_0x2c2ad8('0x1f')](_0x4547db,_0xb76d0a,this[_0x2c2ad8('0x0')],this[_0x2c2ad8('0x6d')][_0xb76d0a[_0x2c2ad8('0x60')]],this[_0x2c2ad8('0x68')][_0xb76d0a['queue']],this['voiceExtensions'][_0xb76d0a['routeId']]);break;case _0x2c2ad8('0x51'):urlforward[_0x2c2ad8('0x1f')](_0x4547db,_0xb76d0a);break;case _0x2c2ad8('0x3a'):script['exec'](_0x4547db,_0xb76d0a);break;}}}}}}},Trigger[_0x9b9281('0x21')][_0x9b9281('0x55')]=function(_0x2f0f34,_0x5a0b93,_0x220fb0){const _0x4b8723=_0x9b9281,_0x5bc971=url[_0x4b8723('0x30')](Mustache[_0x4b8723('0x5c')](_0x2f0f34,_0x5a0b93),!![]);_0x220fb0&&_['merge'](_0x5bc971['query'],_0x5a0b93);delete _0x5bc971['search'];let _0x465849=url['format'](_0x5bc971);return _0x465849=_0x465849[_0x4b8723('0x59')](/\/\?/g,'?'),_0x465849;},Trigger['prototype'][_0x9b9281('0x1a')]=function(_0x22d027,_0x57051d){const _0x19c7a3=_0x9b9281;let _0x24fe11=!![],_0x748b45=!![];return _0x22d027[_0x19c7a3('0x43')][_0x19c7a3('0x46')]&&(_0x24fe11=_[_0x19c7a3('0x2b')](_0x22d027[_0x19c7a3('0x43')],this[_0x19c7a3('0x2a')](_0x57051d,_0x22d027['channel']))),_0x22d027['AnyConditions'][_0x19c7a3('0x46')]&&(_0x748b45=_[_0x19c7a3('0x18')](_0x22d027[_0x19c7a3('0x1b')],this[_0x19c7a3('0x2a')](_0x57051d,_0x22d027[_0x19c7a3('0x6c')]))),_0x24fe11&&_0x748b45;},Trigger[_0x9b9281('0x21')][_0x9b9281('0x2a')]=function(_0x5b9894,_0x512fa0){return function(_0x480bc9){const _0x47ebef=a1135_0x5120;switch(_0x480bc9[_0x47ebef('0x42')]){case _0x47ebef('0x38'):if(_0x5b9894[_0x47ebef('0x6c')]===_0x512fa0)return _0x512fa0===_0x47ebef('0x31')?_0x5b9894['ChatWebsiteId']?operators[_0x480bc9['operator']](Number(_0x480bc9['value']),_0x5b9894[_0x47ebef('0x62')]):![]:_0x5b9894[_[_0x47ebef('0x3f')](_0x512fa0)+_0x47ebef('0x3d')]?operators[_0x480bc9[_0x47ebef('0x6b')]](Number(_0x480bc9[_0x47ebef('0x11')]),_0x5b9894[_[_0x47ebef('0x3f')](_0x512fa0)+'AccountId']):![];break;case _0x47ebef('0x3c'):case'message':if(_0x5b9894[_0x47ebef('0x6c')]===_0x512fa0)return _0x5b9894[_0x47ebef('0x63')]?operators[_0x480bc9['operator']](_0x480bc9['value'],_0x5b9894[_0x47ebef('0x63')]):![];break;case _0x47ebef('0x4c'):return _0x5b9894[_0x47ebef('0x4c')]?operators[_0x480bc9[_0x47ebef('0x6b')]](_0x480bc9['value'],_0x5b9894[_0x47ebef('0x4c')]):![];case'agent':return _0x5b9894[_0x47ebef('0x66')]?operators[_0x480bc9[_0x47ebef('0x6b')]](_0x480bc9['value'],_0x5b9894['membername']):![];case _0x47ebef('0xc'):return _0x5b9894['lastevent']?operators[_0x480bc9['operator']](_0x480bc9[_0x47ebef('0x11')],_0x5b9894['lastevent']):![];case _0x47ebef('0x2'):return _0x5b9894[_0x47ebef('0x2')]?operators[_0x480bc9['operator']](_0x480bc9['value'],_0x5b9894[_0x47ebef('0x2')]):![];}return![];};},module[_0x9b9281('0x20')]=Trigger;
\ No newline at end of file