Built motion from commit 775e2a94.|2.6.3
[motion2.git] / server / config / triggers / index.js
index 96fcc59..3aa2b18 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe1f1=['EventManager','code','error','Trigger,\x20%s','catch','get','motionChannel','event','direction','resolve','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','query','Sequelize','QueryTypes','then','contact','UserId','interface','SIP/%s','name','channel','incomingmessage','outgoingmessage','offlineMessage','opened','format','AfterCreate','changed','closed','substatus','agent','AfterUpdate','User','find','fullname','internal','default','length','hasOwnProperty','model','callback','util','../../mysqldb','jayson/promise','../logger','triggers','client','http','Chat','ChatInteraction','afterCreate','afterUpdate','closedinteraction','ChatMessage','newmessage','newinteraction','Sms','Whatsapp','WhatsappInteraction','WhatsappMessage','Fax','FaxInteraction','FaxMessage','Mail','MailInteraction','MailMessage','Openchannel','OpenchannelInteraction'];(function(_0xc2fc17,_0x2b78be){var _0x5b4fe0=function(_0x5f1e00){while(--_0x5f1e00){_0xc2fc17['push'](_0xc2fc17['shift']());}};_0x5b4fe0(++_0x2b78be);}(_0xe1f1,0xba));var _0x1e1f=function(_0x41278a,_0x25c59c){_0x41278a=_0x41278a-0x0;var _0x188e52=_0xe1f1[_0x41278a];return _0x188e52;};'use strict';var util=require(_0x1e1f('0x0'));var db=require(_0x1e1f('0x1'))['db'];var jayson=require(_0x1e1f('0x2'));var logger=require(_0x1e1f('0x3'))(_0x1e1f('0x4'));var client=jayson[_0x1e1f('0x5')][_0x1e1f('0x6')]({'port':0x232a});var triggers=[{'channel':_0x1e1f('0x7'),'model':_0x1e1f('0x8'),'event':_0x1e1f('0x9'),'condition':'newinteraction','callback':afterCreate},{'channel':_0x1e1f('0x7'),'model':_0x1e1f('0x8'),'event':_0x1e1f('0xa'),'condition':_0x1e1f('0xb'),'callback':afterUpdate},{'channel':'Chat','model':_0x1e1f('0xc'),'event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateMessage},{'channel':_0x1e1f('0x7'),'model':'ChatOfflineMessage','event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateOfflineMessage},{'channel':'Sms','model':'SmsInteraction','event':'afterCreate','condition':_0x1e1f('0xe'),'callback':afterCreate},{'channel':_0x1e1f('0xf'),'model':'SmsInteraction','event':_0x1e1f('0xa'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0x1e1f('0xf'),'model':'SmsMessage','event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateMessage},{'channel':_0x1e1f('0x10'),'model':_0x1e1f('0x11'),'event':_0x1e1f('0x9'),'condition':_0x1e1f('0xe'),'callback':afterCreate},{'channel':_0x1e1f('0x10'),'model':_0x1e1f('0x11'),'event':_0x1e1f('0xa'),'condition':'closedinteraction','callback':afterUpdate},{'channel':'Whatsapp','model':_0x1e1f('0x12'),'event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateMessage},{'channel':_0x1e1f('0x13'),'model':_0x1e1f('0x14'),'event':_0x1e1f('0x9'),'condition':_0x1e1f('0xe'),'callback':afterCreate},{'channel':_0x1e1f('0x13'),'model':_0x1e1f('0x14'),'event':_0x1e1f('0xa'),'condition':_0x1e1f('0xb'),'callback':afterUpdate},{'channel':_0x1e1f('0x13'),'model':_0x1e1f('0x15'),'event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateMessage},{'channel':_0x1e1f('0x16'),'model':_0x1e1f('0x17'),'event':_0x1e1f('0x9'),'condition':'newinteraction','callback':afterCreate},{'channel':_0x1e1f('0x16'),'model':_0x1e1f('0x17'),'event':_0x1e1f('0xa'),'condition':_0x1e1f('0xb'),'callback':afterUpdate},{'channel':_0x1e1f('0x16'),'model':_0x1e1f('0x18'),'event':'afterCreate','condition':_0x1e1f('0xd'),'callback':afterCreateMessage},{'channel':_0x1e1f('0x19'),'model':_0x1e1f('0x1a'),'event':'afterCreate','condition':_0x1e1f('0xe'),'callback':afterCreate},{'channel':'Openchannel','model':_0x1e1f('0x1a'),'event':_0x1e1f('0xa'),'condition':_0x1e1f('0xb'),'callback':afterUpdate},{'channel':_0x1e1f('0x19'),'model':'OpenchannelMessage','event':_0x1e1f('0x9'),'condition':_0x1e1f('0xd'),'callback':afterCreateMessage}];function request(_0x2b1bb0){return client['request'](_0x1e1f('0x1b'),_0x2b1bb0)['then'](function(_0x2023a5){logger['info']('Trigger,\x20%s','EventManager',_0x2023a5);if(_0x2023a5['error']){if(_0x2023a5['error'][_0x1e1f('0x1c')]===0x1f4){logger[_0x1e1f('0x1d')](_0x1e1f('0x1e'),'EventManager',_0x2023a5[_0x1e1f('0x1d')]);}}})[_0x1e1f('0x1f')](function(_0x95aef1){logger[_0x1e1f('0x1d')]('Trigger,\x20%s',_0x1e1f('0x1b'),_0x95aef1);});}function afterCreateMessage(_0x5895ee){return function(_0x2945a5){_0x2945a5=_0x2945a5[_0x1e1f('0x20')]({'plain':!![]});_0x2945a5['channel']=_0x5895ee;_0x2945a5[_0x1e1f('0x21')]=_0x5895ee;_0x2945a5[_0x1e1f('0x22')]=_0x2945a5[_0x1e1f('0x23')];Promise[_0x1e1f('0x24')]()['then'](function(){if(typeof _0x2945a5['ContactId']===_0x1e1f('0x25'))return null;var _0x4f1b06=_0x1e1f('0x26')+_0x2945a5[_0x1e1f('0x27')];return db[_0x1e1f('0x28')][_0x1e1f('0x29')](_0x4f1b06,{'type':db[_0x1e1f('0x2a')][_0x1e1f('0x2b')]['SELECT'],'raw':!![]});})[_0x1e1f('0x2c')](function(_0x569979){if(_0x569979){_0x2945a5[_0x1e1f('0x2d')]=_0x569979[0x0];}if(typeof _0x2945a5['UserId']==='undefined')return;return getAgent(_0x2945a5[_0x1e1f('0x2e')]);})[_0x1e1f('0x2c')](function(_0x2b5191){if(_0x2b5191){_0x2945a5[_0x1e1f('0x2f')]=util['format'](_0x1e1f('0x30'),_0x2b5191[_0x1e1f('0x31')]);_0x2945a5['agent']=_0x2b5191;_0x2945a5[_0x1e1f('0x32')]=_0x5895ee;return request({'event':_0x1e1f('0x33'),'message':_0x2945a5});}else{return request({'event':_0x1e1f('0x34'),'message':_0x2945a5});}})[_0x1e1f('0x1f')](function(_0x2fb4a6){logger[_0x1e1f('0x1d')](_0x1e1f('0x1e'),'AfterCreateMessage',_0x2fb4a6);});};}function afterCreateOfflineMessage(_0x2b41d3){return function(_0x2f232b){_0x2f232b=_0x2f232b[_0x1e1f('0x20')]({'plain':!![]});_0x2f232b[_0x1e1f('0x32')]=_0x2b41d3;_0x2f232b[_0x1e1f('0x21')]=_0x2b41d3;_0x2f232b['event']=_0x1e1f('0x35');return request({'event':_0x2f232b[_0x1e1f('0x22')],'message':_0x2f232b});};}function afterCreate(_0x2c47e9,_0x2b7e99){return function(_0x485dbd){_0x485dbd=_0x485dbd[_0x1e1f('0x20')]({'plain':!![]});_0x485dbd[_0x1e1f('0x32')]=_0x2c47e9;_0x485dbd[_0x1e1f('0x21')]=_0x2c47e9;_0x485dbd[_0x1e1f('0x22')]=_0x1e1f('0x36');Promise['resolve']()['then'](function(){var _0x2b983b=_0x1e1f('0x26')+_0x485dbd['ContactId'];return db[_0x1e1f('0x28')][_0x1e1f('0x29')](_0x2b983b,{'type':db[_0x1e1f('0x2a')][_0x1e1f('0x2b')]['SELECT'],'raw':!![]});})[_0x1e1f('0x2c')](function(_0x487a9d){if(_0x487a9d){_0x485dbd[_0x1e1f('0x2d')]=_0x487a9d[0x0];}if(typeof _0x485dbd[_0x1e1f('0x2e')]===_0x1e1f('0x25'))return;return getAgent(_0x485dbd[_0x1e1f('0x2e')]);})[_0x1e1f('0x2c')](function(_0x1705e8){if(_0x1705e8){_0x485dbd['interface']=util[_0x1e1f('0x37')](_0x1e1f('0x30'),_0x1705e8[_0x1e1f('0x31')]);_0x485dbd['agent']=_0x1705e8;}return request({'event':_0x2b7e99,'message':_0x485dbd});})[_0x1e1f('0x1f')](function(_0x66071f){logger[_0x1e1f('0x1d')](_0x1e1f('0x1e'),_0x1e1f('0x38'),_0x66071f);});};}function afterUpdate(_0x4c6f9d){return function(_0xbc5220){var _0x9fec49=_0xbc5220[_0x1e1f('0x39')](_0x1e1f('0x3a'))&&_0xbc5220['closed'];var _0x4ae34d=_0xbc5220[_0x1e1f('0x39')]('substatus');if(_0x9fec49||_0x4ae34d){var _0x346db0=_0x9fec49?_0x1e1f('0xb'):_0x1e1f('0x3b');var _0x59447c=_0xbc5220[_0x1e1f('0x20')]({'plain':!![]});_0x59447c[_0x1e1f('0x32')]=_0x4c6f9d;_0x59447c[_0x1e1f('0x21')]=_0x4c6f9d;_0x59447c[_0x1e1f('0x22')]=_0x9fec49?_0x1e1f('0x3a'):_0x1e1f('0x3b');var _0x2b1908=_0x1e1f('0x26')+_0x59447c[_0x1e1f('0x27')];return db[_0x1e1f('0x28')]['query'](_0x2b1908,{'type':db[_0x1e1f('0x2a')][_0x1e1f('0x2b')]['SELECT'],'raw':!![]})[_0x1e1f('0x2c')](function(_0x1ce8d7){if(_0x1ce8d7){_0x59447c['contact']=_0x1ce8d7[0x0];}if(typeof _0x59447c[_0x1e1f('0x2e')]===_0x1e1f('0x25'))return;return getAgent(_0x59447c[_0x1e1f('0x2e')]);})[_0x1e1f('0x2c')](function(_0x2e4932){if(_0x2e4932){_0x59447c[_0x1e1f('0x2f')]=util['format']('SIP/%s',_0x2e4932[_0x1e1f('0x31')]);_0x59447c[_0x1e1f('0x3c')]=_0x2e4932;}return request({'event':_0x346db0,'message':_0x59447c});})[_0x1e1f('0x1f')](function(_0x370d79){logger['error']('Trigger,\x20%s',_0x1e1f('0x3d'),_0x370d79);});}};}function getAgent(_0x236629){return db[_0x1e1f('0x3e')][_0x1e1f('0x3f')]({'where':{'id':_0x236629},'attributes':['id',_0x1e1f('0x31'),_0x1e1f('0x40'),'email',_0x1e1f('0x41')],'raw':!![]})['then'](function(_0x2c3d0f){return _0x2c3d0f;});}exports[_0x1e1f('0x42')]=function(){for(var _0x14337b=0x0;_0x14337b<triggers[_0x1e1f('0x43')];_0x14337b+=0x1){if(db[_0x1e1f('0x44')](triggers[_0x14337b]['model'])){db[triggers[_0x14337b][_0x1e1f('0x45')]]['hook'](triggers[_0x14337b][_0x1e1f('0x22')],triggers[_0x14337b][_0x1e1f('0x46')](triggers[_0x14337b][_0x1e1f('0x32')]['toLowerCase'](),triggers[_0x14337b]['condition']));}}};
\ No newline at end of file
+var _0x47bd=['afterUpdate','closedinteraction','ChatMessage','afterCreate','ChatOfflineMessage','Sms','SmsInteraction','SmsMessage','Whatsapp','WhatsappInteraction','WhatsappMessage','newmessage','Fax','FaxInteraction','Mail','MailInteraction','MailMessage','Openchannel','OpenchannelInteraction','request','EventManager','then','info','Trigger,\x20%s','error','code','catch','channel','event','resolve','ContactId','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','query','SELECT','contact','UserId','SIP/%s','agent','incomingmessage','outgoingmessage','AfterCreateMessage','get','motionChannel','opened','sequelize','Sequelize','QueryTypes','format','name','AfterCreate','changed','closed','substatus','interface','AfterUpdate','User','internal','default','length','hasOwnProperty','model','callback','toLowerCase','condition','util','../../mysqldb','client','http','ChatInteraction','newinteraction','Chat'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x47bd,0x1f1));var _0xd47b=function(_0x1d6d1b,_0x40f583){_0x1d6d1b=_0x1d6d1b-0x0;var _0x124fa3=_0x47bd[_0x1d6d1b];return _0x124fa3;};'use strict';var util=require(_0xd47b('0x0'));var db=require(_0xd47b('0x1'))['db'];var jayson=require('jayson/promise');var logger=require('../logger')('triggers');var client=jayson[_0xd47b('0x2')][_0xd47b('0x3')]({'port':0x232a});var triggers=[{'channel':'Chat','model':_0xd47b('0x4'),'event':'afterCreate','condition':_0xd47b('0x5'),'callback':afterCreate},{'channel':_0xd47b('0x6'),'model':_0xd47b('0x4'),'event':_0xd47b('0x7'),'condition':_0xd47b('0x8'),'callback':afterUpdate},{'channel':_0xd47b('0x6'),'model':_0xd47b('0x9'),'event':_0xd47b('0xa'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xd47b('0x6'),'model':_0xd47b('0xb'),'event':_0xd47b('0xa'),'condition':'newmessage','callback':afterCreateOfflineMessage},{'channel':_0xd47b('0xc'),'model':_0xd47b('0xd'),'event':_0xd47b('0xa'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xd47b('0xc'),'model':_0xd47b('0xd'),'event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':_0xd47b('0xc'),'model':_0xd47b('0xe'),'event':_0xd47b('0xa'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xd47b('0xf'),'model':_0xd47b('0x10'),'event':_0xd47b('0xa'),'condition':_0xd47b('0x5'),'callback':afterCreate},{'channel':_0xd47b('0xf'),'model':_0xd47b('0x10'),'event':_0xd47b('0x7'),'condition':_0xd47b('0x8'),'callback':afterUpdate},{'channel':_0xd47b('0xf'),'model':_0xd47b('0x11'),'event':'afterCreate','condition':_0xd47b('0x12'),'callback':afterCreateMessage},{'channel':_0xd47b('0x13'),'model':_0xd47b('0x14'),'event':_0xd47b('0xa'),'condition':_0xd47b('0x5'),'callback':afterCreate},{'channel':_0xd47b('0x13'),'model':_0xd47b('0x14'),'event':_0xd47b('0x7'),'condition':_0xd47b('0x8'),'callback':afterUpdate},{'channel':_0xd47b('0x13'),'model':'FaxMessage','event':_0xd47b('0xa'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xd47b('0x15'),'model':_0xd47b('0x16'),'event':_0xd47b('0xa'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xd47b('0x15'),'model':'MailInteraction','event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':_0xd47b('0x15'),'model':_0xd47b('0x17'),'event':_0xd47b('0xa'),'condition':_0xd47b('0x12'),'callback':afterCreateMessage},{'channel':_0xd47b('0x18'),'model':_0xd47b('0x19'),'event':_0xd47b('0xa'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xd47b('0x18'),'model':_0xd47b('0x19'),'event':_0xd47b('0x7'),'condition':'closedinteraction','callback':afterUpdate},{'channel':'Openchannel','model':'OpenchannelMessage','event':_0xd47b('0xa'),'condition':_0xd47b('0x12'),'callback':afterCreateMessage}];function request(_0x2147a5){return client[_0xd47b('0x1a')](_0xd47b('0x1b'),_0x2147a5)[_0xd47b('0x1c')](function(_0x2bfac6){logger[_0xd47b('0x1d')](_0xd47b('0x1e'),_0xd47b('0x1b'),_0x2bfac6);if(_0x2bfac6[_0xd47b('0x1f')]){if(_0x2bfac6[_0xd47b('0x1f')][_0xd47b('0x20')]===0x1f4){logger[_0xd47b('0x1f')](_0xd47b('0x1e'),_0xd47b('0x1b'),_0x2bfac6['error']);}}})[_0xd47b('0x21')](function(_0x2c98ce){logger[_0xd47b('0x1f')](_0xd47b('0x1e'),'EventManager',_0x2c98ce);});}function afterCreateMessage(_0x35617b){return function(_0xd7afeb){_0xd7afeb=_0xd7afeb['get']({'plain':!![]});_0xd7afeb[_0xd47b('0x22')]=_0x35617b;_0xd7afeb['motionChannel']=_0x35617b;_0xd7afeb[_0xd47b('0x23')]=_0xd7afeb['direction'];Promise[_0xd47b('0x24')]()[_0xd47b('0x1c')](function(){if(typeof _0xd7afeb[_0xd47b('0x25')]===_0xd47b('0x26'))return null;var _0x2dc40b=_0xd47b('0x27')+_0xd7afeb[_0xd47b('0x25')];return db['sequelize'][_0xd47b('0x28')](_0x2dc40b,{'type':db['Sequelize']['QueryTypes'][_0xd47b('0x29')],'raw':!![]});})[_0xd47b('0x1c')](function(_0x16d744){if(_0x16d744){_0xd7afeb[_0xd47b('0x2a')]=_0x16d744[0x0];}if(typeof _0xd7afeb[_0xd47b('0x2b')]===_0xd47b('0x26'))return;return getAgent(_0xd7afeb[_0xd47b('0x2b')]);})[_0xd47b('0x1c')](function(_0x10ae08){if(_0x10ae08){_0xd7afeb['interface']=util['format'](_0xd47b('0x2c'),_0x10ae08['name']);_0xd7afeb[_0xd47b('0x2d')]=_0x10ae08;_0xd7afeb[_0xd47b('0x22')]=_0x35617b;return request({'event':_0xd47b('0x2e'),'message':_0xd7afeb});}else{return request({'event':_0xd47b('0x2f'),'message':_0xd7afeb});}})[_0xd47b('0x21')](function(_0x2c0236){logger[_0xd47b('0x1f')](_0xd47b('0x1e'),_0xd47b('0x30'),_0x2c0236);});};}function afterCreateOfflineMessage(_0x4b833c){return function(_0x41e63b){_0x41e63b=_0x41e63b[_0xd47b('0x31')]({'plain':!![]});_0x41e63b[_0xd47b('0x22')]=_0x4b833c;_0x41e63b['motionChannel']=_0x4b833c;_0x41e63b[_0xd47b('0x23')]='offlineMessage';return request({'event':_0x41e63b['event'],'message':_0x41e63b});};}function afterCreate(_0x52ad58,_0x33edc4){return function(_0x4837e8){_0x4837e8=_0x4837e8[_0xd47b('0x31')]({'plain':!![]});_0x4837e8['channel']=_0x52ad58;_0x4837e8[_0xd47b('0x32')]=_0x52ad58;_0x4837e8[_0xd47b('0x23')]=_0xd47b('0x33');Promise['resolve']()[_0xd47b('0x1c')](function(){var _0x46138f='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x4837e8[_0xd47b('0x25')];return db[_0xd47b('0x34')][_0xd47b('0x28')](_0x46138f,{'type':db[_0xd47b('0x35')][_0xd47b('0x36')][_0xd47b('0x29')],'raw':!![]});})['then'](function(_0x3ab8ed){if(_0x3ab8ed){_0x4837e8[_0xd47b('0x2a')]=_0x3ab8ed[0x0];}if(typeof _0x4837e8['UserId']===_0xd47b('0x26'))return;return getAgent(_0x4837e8[_0xd47b('0x2b')]);})[_0xd47b('0x1c')](function(_0x3c4a15){if(_0x3c4a15){_0x4837e8['interface']=util[_0xd47b('0x37')](_0xd47b('0x2c'),_0x3c4a15[_0xd47b('0x38')]);_0x4837e8[_0xd47b('0x2d')]=_0x3c4a15;}return request({'event':_0x33edc4,'message':_0x4837e8});})['catch'](function(_0x42bd17){logger['error'](_0xd47b('0x1e'),_0xd47b('0x39'),_0x42bd17);});};}function afterUpdate(_0x491e07){return function(_0x1ab803){var _0x2bbad3=_0x1ab803[_0xd47b('0x3a')](_0xd47b('0x3b'))&&_0x1ab803[_0xd47b('0x3b')];var _0x2041b0=_0x1ab803[_0xd47b('0x3a')](_0xd47b('0x3c'));if(_0x2bbad3||_0x2041b0){var _0x8f3aee=_0x2bbad3?_0xd47b('0x8'):'substatus';var _0xf4b8a6=_0x1ab803[_0xd47b('0x31')]({'plain':!![]});_0xf4b8a6[_0xd47b('0x22')]=_0x491e07;_0xf4b8a6['motionChannel']=_0x491e07;_0xf4b8a6[_0xd47b('0x23')]=_0x2bbad3?_0xd47b('0x3b'):_0xd47b('0x3c');var _0x53a0d8='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0xf4b8a6['ContactId'];return db['sequelize'][_0xd47b('0x28')](_0x53a0d8,{'type':db['Sequelize'][_0xd47b('0x36')]['SELECT'],'raw':!![]})[_0xd47b('0x1c')](function(_0x221435){if(_0x221435){_0xf4b8a6[_0xd47b('0x2a')]=_0x221435[0x0];}if(typeof _0xf4b8a6[_0xd47b('0x2b')]===_0xd47b('0x26'))return;return getAgent(_0xf4b8a6['UserId']);})[_0xd47b('0x1c')](function(_0x1791cf){if(_0x1791cf){_0xf4b8a6[_0xd47b('0x3d')]=util[_0xd47b('0x37')]('SIP/%s',_0x1791cf[_0xd47b('0x38')]);_0xf4b8a6[_0xd47b('0x2d')]=_0x1791cf;}return request({'event':_0x8f3aee,'message':_0xf4b8a6});})[_0xd47b('0x21')](function(_0x44d820){logger[_0xd47b('0x1f')](_0xd47b('0x1e'),_0xd47b('0x3e'),_0x44d820);});}};}function getAgent(_0x374b63){return db[_0xd47b('0x3f')]['find']({'where':{'id':_0x374b63},'attributes':['id','name','fullname','email',_0xd47b('0x40')],'raw':!![]})['then'](function(_0x5e59ff){return _0x5e59ff;});}exports[_0xd47b('0x41')]=function(){for(var _0x41aa71=0x0;_0x41aa71<triggers[_0xd47b('0x42')];_0x41aa71+=0x1){if(db[_0xd47b('0x43')](triggers[_0x41aa71]['model'])){db[triggers[_0x41aa71][_0xd47b('0x44')]]['hook'](triggers[_0x41aa71][_0xd47b('0x23')],triggers[_0x41aa71][_0xd47b('0x45')](triggers[_0x41aa71][_0xd47b('0x22')][_0xd47b('0x46')](),triggers[_0x41aa71][_0xd47b('0x47')]));}}};
\ No newline at end of file