Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / services / ami / trigger / index.js
index aa96c25..faf5598 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x17c2=['data3','isNil','uriLocation','data4','windowWidth','data5','800','windowHeight','data6','winApplication','winArguments','format','user:%s','trigger:%s:%s','merge','jscripty','name','trigger:%s','toLowerCase','contactmanager','exec','integration','voiceQueues','queue','routeId','script','parse','query','search','replace','AllConditions','every','channel','AnyConditions','checkConditions','account','chat','ChatWebsiteId','value','upperFirst','AccountId','operator','message','event','membername','lastevent','mustache','./urlforward','./integration','./script','../../../config/environment','../../../config/logger','../ami','redis','defaults','localhost','socket.io-emitter','popup','url','winapp','triggers','agents','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','accounts','freshsalesAccounts','syncCustomEvent','bind','custom:agentconnect','custom:agentringnoanswer','custom:agentcomplete','custom:agentnoanswer','custom:agentbusy','custom:amd','custom:queuecallerabandon','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','prototype','emit','info','stringify','clone','syncAgentDial','hasOwnProperty','status','checkTrigger','variables','Actions','length','interface','action','motionbar','browser','data1','TemplateId','data2','html','render','template\x20not\x20found','uri','buildUri'];(function(_0x25faf3,_0x4f9df4){var _0x273c83=function(_0x26d9d2){while(--_0x26d9d2){_0x25faf3['push'](_0x25faf3['shift']());}};_0x273c83(++_0x4f9df4);}(_0x17c2,0x116));var _0x217c=function(_0x536735,_0x4bb008){_0x536735=_0x536735-0x0;var _0xaed5c5=_0x17c2[_0x536735];return _0xaed5c5;};'use strict';var util=require('util');var _=require('lodash');var url=require('url');var Mustache=require(_0x217c('0x0'));var Redis=require('ioredis');var urlforward=require(_0x217c('0x1'));var integration=require(_0x217c('0x2'));var cmContact=require('./cmContact');var script=require(_0x217c('0x3'));var config=require(_0x217c('0x4'));var logger=require(_0x217c('0x5'))('trigger');var ami=require(_0x217c('0x6'));config[_0x217c('0x7')]=_[_0x217c('0x8')](config[_0x217c('0x7')],{'host':_0x217c('0x9'),'port':0x18eb});var io=require(_0x217c('0xa'))(new Redis(config['redis']));var operators={'equals':function(_0x5e16be,_0x39b990){return _0x5e16be==_0x39b990;},'not_equals':function(_0x3c1fb3,_0x7d3498){return _0x3c1fb3!=_0x7d3498;}};var barAndWebActions=[_0x217c('0xb'),_0x217c('0xc'),_0x217c('0xd')];function Trigger(_0x1a909f){this[_0x217c('0xe')]=_0x1a909f[_0x217c('0xe')];this[_0x217c('0xf')]=_0x1a909f[_0x217c('0xf')];this['voiceQueues']=_0x1a909f['voiceQueues'];this[_0x217c('0x10')]=_0x1a909f['templates'];this[_0x217c('0x11')]=_0x1a909f[_0x217c('0x11')];this[_0x217c('0x12')]=_0x1a909f[_0x217c('0x12')];this['freshdeskAccounts']=_0x1a909f[_0x217c('0x13')];this['salesforceAccounts']=_0x1a909f[_0x217c('0x14')];this[_0x217c('0x15')]=_0x1a909f[_0x217c('0x15')];this[_0x217c('0x16')]=_0x1a909f[_0x217c('0x16')];this[_0x217c('0x17')]=_0x1a909f[_0x217c('0x17')];this[_0x217c('0x18')]=_0x1a909f[_0x217c('0x18')];this[_0x217c('0x19')]=_0x1a909f['servicenowAccounts'];this[_0x217c('0x1a')]=_0x1a909f[_0x217c('0x1a')];this['freshsalesAccounts']=_0x1a909f['freshsalesAccounts'];this[_0x217c('0x1b')]={'zendesk':this[_0x217c('0x12')],'salesforce':this[_0x217c('0x14')],'freshdesk':this[_0x217c('0x13')],'sugarcrm':this[_0x217c('0x15')],'zoho':this[_0x217c('0x16')],'desk':this['deskAccounts'],'vtiger':this[_0x217c('0x18')],'dynamics365':this[_0x217c('0x1a')],'freshsales':this[_0x217c('0x1c')],'servicenow':this[_0x217c('0x19')]};ami['on']('custom:agentcalled',this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x1f'),this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x20'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x21'),this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on']('custom:agentnosuchnumber',this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x22'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x23'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on']('custom:agentcongestion',this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on']('custom:agentreject',this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x24'),this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x25'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on']('custom:timeout',this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on']('custom:dialbegin',this['syncAgentDial']['bind'](this));ami['on'](_0x217c('0x26'),this['syncAgentDial'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x27'),this['syncAgentDial']['bind'](this));ami['on'](_0x217c('0x28'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x29'),this['syncCustomEvent'][_0x217c('0x1e')](this));ami['on'](_0x217c('0x2a'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x2b'),this['syncCustomEvent']['bind'](this));ami['on'](_0x217c('0x2c'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));ami['on'](_0x217c('0x2d'),this[_0x217c('0x1d')][_0x217c('0x1e')](this));}Trigger[_0x217c('0x2e')][_0x217c('0x2f')]=function(_0x5a1b61,_0x5c3584,_0x7bafb6){logger[_0x217c('0x30')](_0x5a1b61,_0x5c3584,JSON[_0x217c('0x31')](_0x7bafb6));io['to'](_0x5a1b61)[_0x217c('0x2f')](_0x5c3584,_0x7bafb6);};Trigger['prototype']['syncCustomEvent']=function(_0x50201a){var _0x364789=_[_0x217c('0x32')](_0x50201a);this['checkTriggers'](_0x364789);};Trigger[_0x217c('0x2e')][_0x217c('0x33')]=function(_0x5db5a6){if(this[_0x217c('0xf')][_0x5db5a6['interface']]){this['syncCustomEvent'](_0x5db5a6);}};Trigger[_0x217c('0x2e')]['checkTriggers']=function(_0x3d3c68){var _0x24fddd;for(var _0x1e89dc in this['triggers']){if(this[_0x217c('0xe')][_0x217c('0x34')](_0x1e89dc)){if(this[_0x217c('0xe')][_0x1e89dc][_0x217c('0x35')]){_0x24fddd=this[_0x217c('0x36')](this['triggers'][_0x1e89dc],_0x3d3c68);if(_0x24fddd){_['merge'](_0x3d3c68,_0x3d3c68[_0x217c('0x37')]);for(var _0x5b7161=0x0,_0x123ee5,_0x23c961,_0x16fce1;_0x5b7161<this[_0x217c('0xe')][_0x1e89dc][_0x217c('0x38')][_0x217c('0x39')];_0x5b7161+=0x1){_0x123ee5=this[_0x217c('0xe')][_0x1e89dc][_0x217c('0x38')][_0x5b7161];if(this[_0x217c('0xf')][_0x3d3c68[_0x217c('0x3a')]]){switch(_0x123ee5[_0x217c('0x3b')]['toLowerCase']()){case'contactmanager':break;case _0x217c('0x3c'):case _0x217c('0x3d'):var _0x166974={};switch(barAndWebActions[_0x123ee5[_0x217c('0x3e')]]){case _0x217c('0xb'):_0x166974[_0x217c('0x3f')]=_0x123ee5[_0x217c('0x40')];_0x166974[_0x217c('0x41')]=this[_0x217c('0x10')][_0x123ee5[_0x217c('0x40')]]?Mustache[_0x217c('0x42')](this[_0x217c('0x10')][_0x123ee5['data2']]['html'],_0x3d3c68):_0x217c('0x43');break;case _0x217c('0xc'):_0x166974[_0x217c('0x44')]=this[_0x217c('0x45')](_0x123ee5[_0x217c('0x40')],_0x3d3c68,_['isNil'](_0x123ee5[_0x217c('0x46')])?!![]:parseInt(_0x123ee5[_0x217c('0x46')],0xa));if(_[_0x217c('0x47')](_0x123ee5['data4'])){_0x166974['location']='0';}else{_0x166974[_0x217c('0x48')]=_0x123ee5[_0x217c('0x49')];_0x166974[_0x217c('0x4a')]=_[_0x217c('0x47')](_0x123ee5[_0x217c('0x4b')])?_0x217c('0x4c'):_0x123ee5['data5'];_0x166974[_0x217c('0x4d')]=_[_0x217c('0x47')](_0x123ee5['data6'])?'600':_0x123ee5[_0x217c('0x4e')];}break;case _0x217c('0xd'):_0x166974[_0x217c('0x4f')]=_0x123ee5[_0x217c('0x40')]?Mustache[_0x217c('0x42')](_0x123ee5[_0x217c('0x40')],_0x3d3c68):'';_0x166974[_0x217c('0x50')]=_0x123ee5['data3']?Mustache[_0x217c('0x42')](_0x123ee5[_0x217c('0x46')],_0x3d3c68):'';break;}this[_0x217c('0x2f')](util[_0x217c('0x51')](_0x217c('0x52'),this[_0x217c('0xf')][_0x3d3c68[_0x217c('0x3a')]]['name']),util['format'](_0x217c('0x53'),_0x123ee5['action']['toLowerCase'](),barAndWebActions[_0x123ee5[_0x217c('0x3e')]]),_[_0x217c('0x54')](_0x166974,_0x3d3c68));break;case _0x217c('0x55'):this[_0x217c('0x2f')](util[_0x217c('0x51')](_0x217c('0x52'),this[_0x217c('0xf')][_0x3d3c68[_0x217c('0x3a')]][_0x217c('0x56')]),util[_0x217c('0x51')](_0x217c('0x57'),_0x123ee5[_0x217c('0x3b')][_0x217c('0x58')]()),_[_0x217c('0x54')]({'ProjectId':parseInt(_0x123ee5[_0x217c('0x3e')],0xa)},_0x3d3c68));break;default:this[_0x217c('0x2f')](util[_0x217c('0x51')](_0x217c('0x52'),this[_0x217c('0xf')][_0x3d3c68['interface']][_0x217c('0x56')]),util[_0x217c('0x51')]('trigger:%s',_0x123ee5['action'][_0x217c('0x58')]()),_[_0x217c('0x54')]({},_0x123ee5,_0x3d3c68));}}switch(_0x123ee5[_0x217c('0x3b')][_0x217c('0x58')]()){case _0x217c('0x59'):cmContact[_0x217c('0x5a')](this[_0x217c('0xf')][_0x3d3c68[_0x217c('0x3a')]],this[_0x217c('0xe')][_0x1e89dc],_0x123ee5,_0x3d3c68);break;case _0x217c('0x5b'):integration['exec'](_0x123ee5,_0x3d3c68,this[_0x217c('0x1b')],this[_0x217c('0xf')][_0x3d3c68['interface']],this[_0x217c('0x5c')][_0x3d3c68[_0x217c('0x5d')]],this[_0x217c('0x11')][_0x3d3c68[_0x217c('0x5e')]]);break;case'urlforward':urlforward[_0x217c('0x5a')](_0x123ee5,_0x3d3c68);break;case _0x217c('0x5f'):script[_0x217c('0x5a')](_0x123ee5,_0x3d3c68);break;}}}}}}};Trigger[_0x217c('0x2e')][_0x217c('0x45')]=function(_0x2e954b,_0x4f37f5,_0x2a55aa){var _0xae9fa6=url[_0x217c('0x60')](Mustache[_0x217c('0x42')](_0x2e954b,_0x4f37f5),!![]);if(_0x2a55aa){_[_0x217c('0x54')](_0xae9fa6[_0x217c('0x61')],_0x4f37f5);}delete _0xae9fa6[_0x217c('0x62')];var _0x405e0f=url[_0x217c('0x51')](_0xae9fa6);_0x405e0f=_0x405e0f[_0x217c('0x63')](/\/\?/g,'?');return _0x405e0f;};Trigger[_0x217c('0x2e')]['checkTrigger']=function(_0x48ffb1,_0x4a385f){var _0x6beb6d=!![],_0x195321=!![];if(_0x48ffb1[_0x217c('0x64')][_0x217c('0x39')]){_0x6beb6d=_[_0x217c('0x65')](_0x48ffb1[_0x217c('0x64')],this['checkConditions'](_0x4a385f,_0x48ffb1[_0x217c('0x66')]));}if(_0x48ffb1['AnyConditions'][_0x217c('0x39')]){_0x195321=_['some'](_0x48ffb1[_0x217c('0x67')],this['checkConditions'](_0x4a385f,_0x48ffb1['channel']));}return _0x6beb6d&&_0x195321;};Trigger['prototype'][_0x217c('0x68')]=function(_0x474d8e,_0xd011b4){return function(_0x227796){switch(_0x227796['field']){case _0x217c('0x69'):if(_0x474d8e[_0x217c('0x66')]===_0xd011b4){if(_0xd011b4===_0x217c('0x6a')){return _0x474d8e[_0x217c('0x6b')]?operators[_0x227796['operator']](Number(_0x227796[_0x217c('0x6c')]),_0x474d8e['ChatWebsiteId']):![];}else{return _0x474d8e[_[_0x217c('0x6d')](_0xd011b4)+_0x217c('0x6e')]?operators[_0x227796[_0x217c('0x6f')]](Number(_0x227796[_0x217c('0x6c')]),_0x474d8e[_[_0x217c('0x6d')](_0xd011b4)+_0x217c('0x6e')]):![];}}break;case'interaction':case _0x217c('0x70'):if(_0x474d8e[_0x217c('0x66')]===_0xd011b4){return _0x474d8e[_0x217c('0x71')]?operators[_0x227796['operator']](_0x227796['value'],_0x474d8e[_0x217c('0x71')]):![];}break;case _0x217c('0x5d'):return _0x474d8e['queue']?operators[_0x227796[_0x217c('0x6f')]](_0x227796[_0x217c('0x6c')],_0x474d8e[_0x217c('0x5d')]):![];case'agent':return _0x474d8e[_0x217c('0x72')]?operators[_0x227796[_0x217c('0x6f')]](_0x227796[_0x217c('0x6c')],_0x474d8e[_0x217c('0x72')]):![];case'lastevent':return _0x474d8e[_0x217c('0x73')]?operators[_0x227796[_0x217c('0x6f')]](_0x227796[_0x217c('0x6c')],_0x474d8e[_0x217c('0x73')]):![];case _0x217c('0x5e'):return _0x474d8e[_0x217c('0x5e')]?operators[_0x227796[_0x217c('0x6f')]](_0x227796[_0x217c('0x6c')],_0x474d8e['routeId']):![];}return![];};};module['exports']=Trigger;
\ No newline at end of file
+var _0x2fdb=['freshsalesAccounts','custom:agentcalled','bind','custom:agentconnect','syncCustomEvent','custom:agentringnoanswer','custom:agentcomplete','custom:agentnoanswer','custom:agentcongestion','custom:agentreject','custom:amd','custom:queuecallerabandon','custom:timeout','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','prototype','emit','info','stringify','checkTriggers','interface','hasOwnProperty','status','checkTrigger','variables','length','Actions','toLowerCase','contactmanager','motionbar','browser','popup','TemplateId','data2','html','render','uri','isNil','data3','data4','uriLocation','windowWidth','data5','800','windowHeight','data6','600','winapp','winApplication','winArguments','format','user:%s','trigger:%s:%s','jscripty','name','action','merge','data1','trigger:%s','integration','exec','accounts','queue','script','buildUri','parse','search','replace','AllConditions','every','checkConditions','channel','AnyConditions','some','field','chat','ChatWebsiteId','operator','value','upperFirst','AccountId','interaction','event','agent','membername','lastevent','routeId','exports','util','url','ioredis','./urlforward','./integration','./cmContact','../../../config/environment','../../../config/logger','trigger','../ami','redis','defaults','localhost','socket.io-emitter','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts'];(function(_0x45c981,_0x2ad2d4){var _0x4f62c8=function(_0x55209b){while(--_0x55209b){_0x45c981['push'](_0x45c981['shift']());}};_0x4f62c8(++_0x2ad2d4);}(_0x2fdb,0xdb));var _0xb2fd=function(_0x2d1222,_0x220a01){_0x2d1222=_0x2d1222-0x0;var _0x217de9=_0x2fdb[_0x2d1222];return _0x217de9;};'use strict';var util=require(_0xb2fd('0x0'));var _=require('lodash');var url=require(_0xb2fd('0x1'));var Mustache=require('mustache');var Redis=require(_0xb2fd('0x2'));var urlforward=require(_0xb2fd('0x3'));var integration=require(_0xb2fd('0x4'));var cmContact=require(_0xb2fd('0x5'));var script=require('./script');var config=require(_0xb2fd('0x6'));var logger=require(_0xb2fd('0x7'))(_0xb2fd('0x8'));var ami=require(_0xb2fd('0x9'));config[_0xb2fd('0xa')]=_[_0xb2fd('0xb')](config[_0xb2fd('0xa')],{'host':_0xb2fd('0xc'),'port':0x18eb});var io=require(_0xb2fd('0xd'))(new Redis(config[_0xb2fd('0xa')]));var operators={'equals':function(_0x335949,_0x9e91e3){return _0x335949==_0x9e91e3;},'not_equals':function(_0x79c663,_0x5eb31a){return _0x79c663!=_0x5eb31a;}};var barAndWebActions=['popup',_0xb2fd('0x1'),'winapp'];function Trigger(_0x32365a){this[_0xb2fd('0xe')]=_0x32365a[_0xb2fd('0xe')];this['agents']=_0x32365a[_0xb2fd('0xf')];this['voiceQueues']=_0x32365a[_0xb2fd('0x10')];this['templates']=_0x32365a[_0xb2fd('0x11')];this['voiceExtensions']=_0x32365a[_0xb2fd('0x12')];this[_0xb2fd('0x13')]=_0x32365a[_0xb2fd('0x13')];this[_0xb2fd('0x14')]=_0x32365a[_0xb2fd('0x14')];this[_0xb2fd('0x15')]=_0x32365a[_0xb2fd('0x15')];this[_0xb2fd('0x16')]=_0x32365a['sugarcrmAccounts'];this[_0xb2fd('0x17')]=_0x32365a[_0xb2fd('0x17')];this['deskAccounts']=_0x32365a['deskAccounts'];this['vtigerAccounts']=_0x32365a[_0xb2fd('0x18')];this[_0xb2fd('0x19')]=_0x32365a['servicenowAccounts'];this[_0xb2fd('0x1a')]=_0x32365a['dynamics365Accounts'];this[_0xb2fd('0x1b')]=_0x32365a[_0xb2fd('0x1b')];this['accounts']={'zendesk':this[_0xb2fd('0x13')],'salesforce':this[_0xb2fd('0x15')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this[_0xb2fd('0x16')],'zoho':this['zohoAccounts'],'desk':this['deskAccounts'],'vtiger':this[_0xb2fd('0x18')],'dynamics365':this[_0xb2fd('0x1a')],'freshsales':this[_0xb2fd('0x1b')],'servicenow':this['servicenowAccounts']};ami['on'](_0xb2fd('0x1c'),this['syncCustomEvent'][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x1e'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x20'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x21'),this['syncCustomEvent'][_0xb2fd('0x1d')](this));ami['on']('custom:agentnosuchnumber',this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x22'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentbusy',this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x23'),this['syncCustomEvent'][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x24'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x25'),this[_0xb2fd('0x1f')]['bind'](this));ami['on'](_0xb2fd('0x26'),this['syncCustomEvent']['bind'](this));ami['on'](_0xb2fd('0x27'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x28'),this[_0xb2fd('0x29')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x2a'),this['syncAgentDial'][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x2b'),this[_0xb2fd('0x29')]['bind'](this));ami['on'](_0xb2fd('0x2c'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x2d'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x2e'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x2f'),this[_0xb2fd('0x1f')]['bind'](this));ami['on'](_0xb2fd('0x30'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));ami['on'](_0xb2fd('0x31'),this[_0xb2fd('0x1f')][_0xb2fd('0x1d')](this));}Trigger[_0xb2fd('0x32')][_0xb2fd('0x33')]=function(_0x436667,_0x58314a,_0x5a559b){logger[_0xb2fd('0x34')](_0x436667,_0x58314a,JSON[_0xb2fd('0x35')](_0x5a559b));io['to'](_0x436667)[_0xb2fd('0x33')](_0x58314a,_0x5a559b);};Trigger[_0xb2fd('0x32')]['syncCustomEvent']=function(_0x477eaa){var _0x13c659=_['clone'](_0x477eaa);this[_0xb2fd('0x36')](_0x13c659);};Trigger[_0xb2fd('0x32')][_0xb2fd('0x29')]=function(_0x474ddb){if(this[_0xb2fd('0xf')][_0x474ddb[_0xb2fd('0x37')]]){this[_0xb2fd('0x1f')](_0x474ddb);}};Trigger[_0xb2fd('0x32')][_0xb2fd('0x36')]=function(_0x130832){var _0xfd4a0d;for(var _0x5dcc95 in this[_0xb2fd('0xe')]){if(this[_0xb2fd('0xe')][_0xb2fd('0x38')](_0x5dcc95)){if(this['triggers'][_0x5dcc95][_0xb2fd('0x39')]){_0xfd4a0d=this[_0xb2fd('0x3a')](this[_0xb2fd('0xe')][_0x5dcc95],_0x130832);if(_0xfd4a0d){_['merge'](_0x130832,_0x130832[_0xb2fd('0x3b')]);for(var _0x463604=0x0,_0x41c5dc,_0x5d09a8,_0x3cb2ef;_0x463604<this[_0xb2fd('0xe')][_0x5dcc95]['Actions'][_0xb2fd('0x3c')];_0x463604+=0x1){_0x41c5dc=this[_0xb2fd('0xe')][_0x5dcc95][_0xb2fd('0x3d')][_0x463604];if(this[_0xb2fd('0xf')][_0x130832[_0xb2fd('0x37')]]){switch(_0x41c5dc['action'][_0xb2fd('0x3e')]()){case _0xb2fd('0x3f'):break;case _0xb2fd('0x40'):case _0xb2fd('0x41'):var _0x2375e9={};switch(barAndWebActions[_0x41c5dc['data1']]){case _0xb2fd('0x42'):_0x2375e9[_0xb2fd('0x43')]=_0x41c5dc[_0xb2fd('0x44')];_0x2375e9[_0xb2fd('0x45')]=this[_0xb2fd('0x11')][_0x41c5dc['data2']]?Mustache[_0xb2fd('0x46')](this[_0xb2fd('0x11')][_0x41c5dc[_0xb2fd('0x44')]][_0xb2fd('0x45')],_0x130832):'template\x20not\x20found';break;case'url':_0x2375e9[_0xb2fd('0x47')]=this['buildUri'](_0x41c5dc[_0xb2fd('0x44')],_0x130832,_[_0xb2fd('0x48')](_0x41c5dc[_0xb2fd('0x49')])?!![]:parseInt(_0x41c5dc[_0xb2fd('0x49')],0xa));if(_['isNil'](_0x41c5dc[_0xb2fd('0x4a')])){_0x2375e9['location']='0';}else{_0x2375e9[_0xb2fd('0x4b')]=_0x41c5dc['data4'];_0x2375e9[_0xb2fd('0x4c')]=_[_0xb2fd('0x48')](_0x41c5dc[_0xb2fd('0x4d')])?_0xb2fd('0x4e'):_0x41c5dc['data5'];_0x2375e9[_0xb2fd('0x4f')]=_['isNil'](_0x41c5dc[_0xb2fd('0x50')])?_0xb2fd('0x51'):_0x41c5dc['data6'];}break;case _0xb2fd('0x52'):_0x2375e9[_0xb2fd('0x53')]=_0x41c5dc[_0xb2fd('0x44')]?Mustache[_0xb2fd('0x46')](_0x41c5dc[_0xb2fd('0x44')],_0x130832):'';_0x2375e9[_0xb2fd('0x54')]=_0x41c5dc['data3']?Mustache[_0xb2fd('0x46')](_0x41c5dc[_0xb2fd('0x49')],_0x130832):'';break;}this[_0xb2fd('0x33')](util[_0xb2fd('0x55')](_0xb2fd('0x56'),this[_0xb2fd('0xf')][_0x130832[_0xb2fd('0x37')]]['name']),util[_0xb2fd('0x55')](_0xb2fd('0x57'),_0x41c5dc['action'][_0xb2fd('0x3e')](),barAndWebActions[_0x41c5dc['data1']]),_['merge'](_0x2375e9,_0x130832));break;case _0xb2fd('0x58'):this[_0xb2fd('0x33')](util[_0xb2fd('0x55')](_0xb2fd('0x56'),this[_0xb2fd('0xf')][_0x130832['interface']][_0xb2fd('0x59')]),util['format']('trigger:%s',_0x41c5dc[_0xb2fd('0x5a')][_0xb2fd('0x3e')]()),_[_0xb2fd('0x5b')]({'ProjectId':parseInt(_0x41c5dc[_0xb2fd('0x5c')],0xa)},_0x130832));break;default:this[_0xb2fd('0x33')](util[_0xb2fd('0x55')](_0xb2fd('0x56'),this[_0xb2fd('0xf')][_0x130832[_0xb2fd('0x37')]][_0xb2fd('0x59')]),util['format'](_0xb2fd('0x5d'),_0x41c5dc[_0xb2fd('0x5a')]['toLowerCase']()),_[_0xb2fd('0x5b')]({},_0x41c5dc,_0x130832));}}switch(_0x41c5dc[_0xb2fd('0x5a')][_0xb2fd('0x3e')]()){case _0xb2fd('0x3f'):cmContact['exec'](this[_0xb2fd('0xf')][_0x130832[_0xb2fd('0x37')]],this[_0xb2fd('0xe')][_0x5dcc95],_0x41c5dc,_0x130832);break;case _0xb2fd('0x5e'):integration[_0xb2fd('0x5f')](_0x41c5dc,_0x130832,this[_0xb2fd('0x60')],this[_0xb2fd('0xf')][_0x130832[_0xb2fd('0x37')]],this[_0xb2fd('0x10')][_0x130832[_0xb2fd('0x61')]],this[_0xb2fd('0x12')][_0x130832['routeId']]);break;case'urlforward':urlforward[_0xb2fd('0x5f')](_0x41c5dc,_0x130832);break;case _0xb2fd('0x62'):script['exec'](_0x41c5dc,_0x130832);break;}}}}}}};Trigger[_0xb2fd('0x32')][_0xb2fd('0x63')]=function(_0x5e6db6,_0x87eee6,_0x20f10a){var _0xb5b1b3=url[_0xb2fd('0x64')](Mustache['render'](_0x5e6db6,_0x87eee6),!![]);if(_0x20f10a){_[_0xb2fd('0x5b')](_0xb5b1b3['query'],_0x87eee6);}delete _0xb5b1b3[_0xb2fd('0x65')];var _0x47b6ae=url[_0xb2fd('0x55')](_0xb5b1b3);_0x47b6ae=_0x47b6ae[_0xb2fd('0x66')](/\/\?/g,'?');return _0x47b6ae;};Trigger[_0xb2fd('0x32')][_0xb2fd('0x3a')]=function(_0x238685,_0x1a8d1b){var _0x12ac5a=!![],_0x477687=!![];if(_0x238685[_0xb2fd('0x67')][_0xb2fd('0x3c')]){_0x12ac5a=_[_0xb2fd('0x68')](_0x238685[_0xb2fd('0x67')],this[_0xb2fd('0x69')](_0x1a8d1b,_0x238685[_0xb2fd('0x6a')]));}if(_0x238685[_0xb2fd('0x6b')]['length']){_0x477687=_[_0xb2fd('0x6c')](_0x238685[_0xb2fd('0x6b')],this[_0xb2fd('0x69')](_0x1a8d1b,_0x238685[_0xb2fd('0x6a')]));}return _0x12ac5a&&_0x477687;};Trigger[_0xb2fd('0x32')]['checkConditions']=function(_0x1970f3,_0x4cffde){return function(_0x5d3663){switch(_0x5d3663[_0xb2fd('0x6d')]){case'account':if(_0x1970f3[_0xb2fd('0x6a')]===_0x4cffde){if(_0x4cffde===_0xb2fd('0x6e')){return _0x1970f3[_0xb2fd('0x6f')]?operators[_0x5d3663[_0xb2fd('0x70')]](Number(_0x5d3663[_0xb2fd('0x71')]),_0x1970f3[_0xb2fd('0x6f')]):![];}else{return _0x1970f3[_[_0xb2fd('0x72')](_0x4cffde)+'AccountId']?operators[_0x5d3663['operator']](Number(_0x5d3663[_0xb2fd('0x71')]),_0x1970f3[_['upperFirst'](_0x4cffde)+_0xb2fd('0x73')]):![];}}break;case _0xb2fd('0x74'):case'message':if(_0x1970f3[_0xb2fd('0x6a')]===_0x4cffde){return _0x1970f3['event']?operators[_0x5d3663[_0xb2fd('0x70')]](_0x5d3663[_0xb2fd('0x71')],_0x1970f3[_0xb2fd('0x75')]):![];}break;case _0xb2fd('0x61'):return _0x1970f3[_0xb2fd('0x61')]?operators[_0x5d3663['operator']](_0x5d3663[_0xb2fd('0x71')],_0x1970f3['queue']):![];case _0xb2fd('0x76'):return _0x1970f3[_0xb2fd('0x77')]?operators[_0x5d3663['operator']](_0x5d3663[_0xb2fd('0x71')],_0x1970f3[_0xb2fd('0x77')]):![];case _0xb2fd('0x78'):return _0x1970f3['lastevent']?operators[_0x5d3663['operator']](_0x5d3663['value'],_0x1970f3[_0xb2fd('0x78')]):![];case _0xb2fd('0x79'):return _0x1970f3[_0xb2fd('0x79')]?operators[_0x5d3663[_0xb2fd('0x70')]](_0x5d3663[_0xb2fd('0x71')],_0x1970f3['routeId']):![];}return![];};};module[_0xb2fd('0x7a')]=Trigger;
\ No newline at end of file