Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / openchannelMessage / openchannelMessage.controller.js
index 0313d94..cd2dc23 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62f2=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','defaults','redis','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','request','then','info','OpenchannelMessage,\x20%s,\x20%s','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','status','end','json','limit','undefined','count','offset','set','Content-Range','save','update','destroy','stack','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','params','length','includeAll','include','find','create','body','describe','../../config/logger','openchannel-interactions','accept','openchannel','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','read1stAt','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','QueryTypes','SELECT','User','email','internal','manual','SIP/%s','channel','motionChannel','event','acceptmessage','reject','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','RejectMessage','rejectMessage','contact','interface','EventManager','rejectmessage','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','querystring'];(function(_0x39d6bb,_0x4eed73){var _0x1a85bc=function(_0x3c743c){while(--_0x3c743c){_0x39d6bb['push'](_0x39d6bb['shift']());}};_0x1a85bc(++_0x4eed73);}(_0x62f2,0xff));var _0x262f=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x62f2[_0x2b4411];return _0x8e41ef;};'use strict';var emlformat=require(_0x262f('0x0'));var rimraf=require(_0x262f('0x1'));var zipdir=require(_0x262f('0x2'));var jsonpatch=require(_0x262f('0x3'));var rp=require('request-promise');var moment=require(_0x262f('0x4'));var BPromise=require(_0x262f('0x5'));var Mustache=require(_0x262f('0x6'));var util=require('util');var path=require(_0x262f('0x7'));var sox=require(_0x262f('0x8'));var csv=require(_0x262f('0x9'));var ejs=require(_0x262f('0xa'));var fs=require('fs');var fs_extra=require(_0x262f('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x262f('0xc'));var jsforce=require(_0x262f('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x262f('0x9'));var querystring=require(_0x262f('0xe'));var Papa=require('papaparse');var Redis=require(_0x262f('0xf'));var authService=require(_0x262f('0x10'));var qs=require(_0x262f('0x11'));var as=require(_0x262f('0x12'));var hardwareService=require(_0x262f('0x13'));var logger=require('../../config/logger')(_0x262f('0x14'));var utils=require(_0x262f('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x262f('0x16'));var db=require(_0x262f('0x17'))['db'];config['redis']=_[_0x262f('0x18')](config[_0x262f('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0x262f('0x1a'))(new Redis(config['redis']));require(_0x262f('0x1b'))[_0x262f('0x1c')](socket);var jayson=require(_0x262f('0x1d'));var client=jayson[_0x262f('0x1e')][_0x262f('0x1f')]({'port':0x232c});var client9002=jayson[_0x262f('0x1e')][_0x262f('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x2e0476,_0x1c7064,_0x575937,_0x145300){return new BPromise(function(_0x45c2f7,_0x147058){var _0x18ec2d=_0x145300||client;return _0x18ec2d[_0x262f('0x20')](_0x2e0476,_0x575937)[_0x262f('0x21')](function(_0x580315){logger[_0x262f('0x22')](_0x262f('0x23'),_0x1c7064,'request\x20sent');logger[_0x262f('0x24')](_0x262f('0x25'),_0x1c7064,_0x262f('0x26'),JSON[_0x262f('0x27')](_0x580315));if(_0x580315['error']){if(_0x580315[_0x262f('0x28')][_0x262f('0x29')]===0x1f4){logger[_0x262f('0x28')](_0x262f('0x23'),_0x1c7064,_0x580315[_0x262f('0x28')]['message']);return _0x147058(_0x580315['error'][_0x262f('0x2a')]);}logger[_0x262f('0x28')](_0x262f('0x23'),_0x1c7064,_0x580315[_0x262f('0x28')][_0x262f('0x2a')]);return _0x45c2f7(_0x580315[_0x262f('0x28')][_0x262f('0x2a')]);}else{logger['info']('OpenchannelMessage,\x20%s,\x20%s',_0x1c7064,_0x262f('0x26'));_0x45c2f7(_0x580315[_0x262f('0x2b')][_0x262f('0x2a')]);}})['catch'](function(_0x5ebea9){logger[_0x262f('0x28')](_0x262f('0x23'),_0x1c7064,_0x5ebea9);_0x147058(_0x5ebea9);});});}function respondWithStatusCode(_0x32a95d,_0x1e7c7d){_0x1e7c7d=_0x1e7c7d||0xcc;return function(_0x34a4b9){if(_0x34a4b9){return _0x32a95d['sendStatus'](_0x1e7c7d);}return _0x32a95d[_0x262f('0x2c')](_0x1e7c7d)[_0x262f('0x2d')]();};}function respondWithResult(_0x2dd870,_0x231543){_0x231543=_0x231543||0xc8;return function(_0x339270){if(_0x339270){return _0x2dd870[_0x262f('0x2c')](_0x231543)[_0x262f('0x2e')](_0x339270);}};}function respondWithFilteredResult(_0x25be2e,_0x2cf539){return function(_0x577c52){if(_0x577c52){var _0x13bf5a=typeof _0x2cf539['offset']==='undefined'&&typeof _0x2cf539[_0x262f('0x2f')]===_0x262f('0x30');var _0x504dd2=_0x577c52[_0x262f('0x31')];var _0x28abc4=_0x13bf5a?0x0:_0x2cf539[_0x262f('0x32')];var _0x2223e9=_0x13bf5a?_0x577c52['count']:_0x2cf539[_0x262f('0x32')]+_0x2cf539[_0x262f('0x2f')];var _0x182ad4;if(_0x2223e9>=_0x504dd2){_0x2223e9=_0x504dd2;_0x182ad4=0xc8;}else{_0x182ad4=0xce;}_0x25be2e[_0x262f('0x2c')](_0x182ad4);return _0x25be2e[_0x262f('0x33')](_0x262f('0x34'),_0x28abc4+'-'+_0x2223e9+'/'+_0x504dd2)[_0x262f('0x2e')](_0x577c52);}return null;};}function patchUpdates(_0x569d7e){return function(_0xac00bf){try{jsonpatch['apply'](_0xac00bf,_0x569d7e,!![]);}catch(_0x40a4a2){return BPromise['reject'](_0x40a4a2);}return _0xac00bf[_0x262f('0x35')]();};}function saveUpdates(_0x1d82bb,_0x5876f1){return function(_0x185b2d){if(_0x185b2d){return _0x185b2d[_0x262f('0x36')](_0x1d82bb)['then'](function(_0x426bf2){return _0x426bf2;});}return null;};}function removeEntity(_0x1adcf6,_0x4642cb){return function(_0xba6eed){if(_0xba6eed){return _0xba6eed[_0x262f('0x37')]()[_0x262f('0x21')](function(){_0x1adcf6['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4baaa2,_0x163dc9){return function(_0x900602){if(!_0x900602){_0x4baaa2['sendStatus'](0x194);}return _0x900602;};}function handleError(_0x1015fd,_0x39bb43){_0x39bb43=_0x39bb43||0x1f4;return function(_0x10a756){logger['error'](_0x10a756[_0x262f('0x38')]);if(_0x10a756[_0x262f('0x39')]){delete _0x10a756[_0x262f('0x39')];}_0x1015fd[_0x262f('0x2c')](_0x39bb43)[_0x262f('0x3a')](_0x10a756);};}exports[_0x262f('0x3b')]=function(_0x5975e9,_0x1df62b){var _0x107922={},_0x212137={},_0x2f1a00={'count':0x0,'rows':[]};var _0x20ad76=_[_0x262f('0x3c')](db[_0x262f('0x3d')][_0x262f('0x3e')],function(_0x3e7bdb){return{'name':_0x3e7bdb[_0x262f('0x3f')],'type':_0x3e7bdb[_0x262f('0x40')]['key']};});_0x212137[_0x262f('0x41')]=_[_0x262f('0x3c')](_0x20ad76,'name');_0x212137[_0x262f('0x42')]=_[_0x262f('0x43')](_0x5975e9[_0x262f('0x42')]);_0x212137[_0x262f('0x44')]=_[_0x262f('0x45')](_0x212137[_0x262f('0x41')],_0x212137[_0x262f('0x42')]);_0x107922[_0x262f('0x46')]=_['intersection'](_0x212137[_0x262f('0x41')],qs[_0x262f('0x47')](_0x5975e9['query'][_0x262f('0x47')]));_0x107922['attributes']=_0x107922[_0x262f('0x46')]['length']?_0x107922[_0x262f('0x46')]:_0x212137[_0x262f('0x41')];if(!_0x5975e9[_0x262f('0x42')][_0x262f('0x48')](_0x262f('0x49'))){_0x107922[_0x262f('0x2f')]=qs[_0x262f('0x2f')](_0x5975e9[_0x262f('0x42')]['limit']);_0x107922[_0x262f('0x32')]=qs[_0x262f('0x32')](_0x5975e9['query'][_0x262f('0x32')]);}_0x107922['order']=qs['sort'](_0x5975e9[_0x262f('0x42')][_0x262f('0x4a')]);_0x107922[_0x262f('0x4b')]=qs[_0x262f('0x44')](_[_0x262f('0x4c')](_0x5975e9['query'],_0x212137[_0x262f('0x44')]),_0x20ad76);if(_0x5975e9[_0x262f('0x42')][_0x262f('0x4d')]){_0x107922[_0x262f('0x4b')]=_[_0x262f('0x4e')](_0x107922[_0x262f('0x4b')],{'$or':_['map'](_0x20ad76,function(_0x261b41){if(_0x261b41[_0x262f('0x40')]!==_0x262f('0x4f')){var _0x2af04b={};_0x2af04b[_0x261b41['name']]={'$like':'%'+_0x5975e9[_0x262f('0x42')][_0x262f('0x4d')]+'%'};return _0x2af04b;}})});}_0x107922=_[_0x262f('0x4e')]({},_0x107922,_0x5975e9[_0x262f('0x50')]);var _0x501332={'where':_0x107922['where']};return db[_0x262f('0x3d')][_0x262f('0x31')](_0x501332)['then'](function(_0x1fab3d){_0x2f1a00['count']=_0x1fab3d;if(_0x5975e9['query']['includeAll']){_0x107922['include']=[{'all':!![]}];}return db['OpenchannelMessage'][_0x262f('0x51')](_0x107922);})[_0x262f('0x21')](function(_0x4a75cc){_0x2f1a00[_0x262f('0x52')]=_0x4a75cc;return _0x2f1a00;})['then'](respondWithFilteredResult(_0x1df62b,_0x107922))[_0x262f('0x53')](handleError(_0x1df62b,null));};exports[_0x262f('0x54')]=function(_0x287b57,_0x57abde){var _0x121f09={'raw':!![],'where':{'id':_0x287b57[_0x262f('0x55')]['id']}},_0x55671e={};_0x55671e['model']=_[_0x262f('0x43')](db[_0x262f('0x3d')][_0x262f('0x3e')]);_0x55671e[_0x262f('0x42')]=_[_0x262f('0x43')](_0x287b57[_0x262f('0x42')]);_0x55671e[_0x262f('0x44')]=_['intersection'](_0x55671e['model'],_0x55671e[_0x262f('0x42')]);_0x121f09[_0x262f('0x46')]=_[_0x262f('0x45')](_0x55671e[_0x262f('0x41')],qs[_0x262f('0x47')](_0x287b57[_0x262f('0x42')][_0x262f('0x47')]));_0x121f09[_0x262f('0x46')]=_0x121f09['attributes'][_0x262f('0x56')]?_0x121f09[_0x262f('0x46')]:_0x55671e[_0x262f('0x41')];if(_0x287b57[_0x262f('0x42')][_0x262f('0x57')]){_0x121f09[_0x262f('0x58')]=[{'all':!![]}];}_0x121f09=_['merge']({},_0x121f09,_0x287b57[_0x262f('0x50')]);return db['OpenchannelMessage'][_0x262f('0x59')](_0x121f09)[_0x262f('0x21')](handleEntityNotFound(_0x57abde,null))['then'](respondWithResult(_0x57abde,null))[_0x262f('0x53')](handleError(_0x57abde,null));};exports[_0x262f('0x5a')]=function(_0x531041,_0x5cdd00){return db[_0x262f('0x3d')]['create'](_0x531041[_0x262f('0x5b')],{})[_0x262f('0x21')](respondWithResult(_0x5cdd00,0xc9))[_0x262f('0x53')](handleError(_0x5cdd00,null));};exports[_0x262f('0x36')]=function(_0x5394a0,_0x24c1b7){if(_0x5394a0[_0x262f('0x5b')]['id']){delete _0x5394a0[_0x262f('0x5b')]['id'];}return db[_0x262f('0x3d')][_0x262f('0x59')]({'where':{'id':_0x5394a0['params']['id']}})['then'](handleEntityNotFound(_0x24c1b7,null))[_0x262f('0x21')](saveUpdates(_0x5394a0['body'],null))['then'](respondWithResult(_0x24c1b7,null))[_0x262f('0x53')](handleError(_0x24c1b7,null));};exports[_0x262f('0x37')]=function(_0x1bb240,_0x388d84){return db[_0x262f('0x3d')][_0x262f('0x59')]({'where':{'id':_0x1bb240[_0x262f('0x55')]['id']}})[_0x262f('0x21')](handleEntityNotFound(_0x388d84,null))[_0x262f('0x21')](removeEntity(_0x388d84,null))[_0x262f('0x53')](handleError(_0x388d84,null));};exports[_0x262f('0x5c')]=function(_0x5d8514,_0x4e01af){return db['OpenchannelMessage'][_0x262f('0x5c')]()[_0x262f('0x21')](respondWithResult(_0x4e01af,null))[_0x262f('0x53')](handleError(_0x4e01af,null));};var interaction_log=require(_0x262f('0x5d'))(_0x262f('0x5e'));exports[_0x262f('0x5f')]=function(_0xf658a5,_0x2a1238,_0x48b967){var _0x503110={'agent':{},'channel':_0x262f('0x60')};if(_0xf658a5[_0x262f('0x5b')]['id']){delete _0xf658a5['body']['id'];}_0xf658a5[_0x262f('0x5b')]['read']=!![];_0xf658a5[_0x262f('0x5b')][_0x262f('0x61')]=moment()[_0x262f('0x62')](_0x262f('0x63'));_0xf658a5[_0x262f('0x5b')]['UserId']=_0xf658a5['body'][_0x262f('0x64')]||_0xf658a5[_0x262f('0x65')]['id'];_0x503110[_0x262f('0x66')]['id']=_0xf658a5[_0x262f('0x5b')]['UserId'];return db[_0x262f('0x3d')][_0x262f('0x59')]({'where':{'id':_0xf658a5[_0x262f('0x55')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x2a1238,null))[_0x262f('0x21')](saveUpdates(_0xf658a5['body'],null))['then'](function(_0x281e4b){if(_0x281e4b){_0x503110['message']=_0x281e4b[_0x262f('0x67')]({'plain':!![]});return db[_0x262f('0x68')][_0x262f('0x59')]({'where':{'id':_0x281e4b[_0x262f('0x69')]}});}return null;})[_0x262f('0x21')](handleEntityNotFound(_0x2a1238,null))['then'](function(_0x3d3286){if(_0x3d3286){return _0x3d3286['update']({'UserId':_0xf658a5['body'][_0x262f('0x64')],'read1stAt':_[_0x262f('0x6a')](_0x3d3286[_0x262f('0x6b')])?moment()[_0x262f('0x62')](_0x262f('0x63')):undefined});}return null;})[_0x262f('0x21')](function(_0x45099b){if(_0x45099b){_0x503110[_0x262f('0x6c')]=_0x45099b[_0x262f('0x67')]({'plain':!![]});interaction_log['info'](_0x262f('0x6d'),_0xf658a5[_0x262f('0x65')]['id'],_0xf658a5[_0x262f('0x65')]['name'],_0xf658a5[_0x262f('0x65')][_0x262f('0x6e')],_0x503110['interaction']['id'],_0xf658a5[_0x262f('0x5b')]?JSON[_0x262f('0x27')](_0xf658a5[_0x262f('0x5b')]):'null');return respondWithRpcPromise(_0x262f('0x6f'),'acceptMessage',_0x503110);}return null;})[_0x262f('0x21')](function(_0x2d76b0){var _0x172698=_0x262f('0x70')+_0x2d76b0['message'][_0x262f('0x71')];return db[_0x262f('0x72')]['query'](_0x172698,{'type':db['Sequelize'][_0x262f('0x73')][_0x262f('0x74')],'raw':!![]})[_0x262f('0x21')](function(_0x3b5145){return _0x3b5145;});})[_0x262f('0x21')](function(_0x1c2971){if(_0x1c2971){_0x503110[_0x262f('0x2a')]['contact']=_0x1c2971[0x0];if(!_0xf658a5['body']['UserId'])return;return db[_0x262f('0x75')]['find']({'where':{'id':_0xf658a5[_0x262f('0x5b')]['UserId'],'role':_0x262f('0x66')},'attributes':['id','name','fullname',_0x262f('0x76'),_0x262f('0x77')],'raw':!![]});}return null;})[_0x262f('0x21')](function(_0x4fad04){if(!_0x4fad04)return null;_0x503110[_0x262f('0x2a')][_0x262f('0x66')]=_0x4fad04;return _0x503110;})[_0x262f('0x21')](function(_0x40a46c){if(_0x40a46c){if(_0xf658a5['body'][_0x262f('0x78')]){_0x503110[_0x262f('0x2a')]['interface']=util[_0x262f('0x62')](_0x262f('0x79'),_0xf658a5[_0x262f('0x65')][_0x262f('0x39')]);_0x503110[_0x262f('0x2a')][_0x262f('0x7a')]=_0x503110['channel'];_0x503110[_0x262f('0x2a')][_0x262f('0x7b')]=_0x503110[_0x262f('0x7a')];_0x503110[_0x262f('0x2a')][_0x262f('0x7c')]='accept';return respondWithRpcPromise('EventManager','EventManager',{'event':_0x262f('0x7d'),'message':_0x503110[_0x262f('0x2a')]},client9002)['then'](function(){return _0x503110;});}return _0x503110;}return null;})[_0x262f('0x21')](respondWithResult(_0x2a1238,null))['catch'](handleError(_0x2a1238,null));};var interaction_log=require('../../config/logger')(_0x262f('0x5e'));exports[_0x262f('0x7e')]=function(_0x168e18,_0x7858c,_0x957671){var _0x51b8ed={'agent':{},'channel':_0x262f('0x60')};if(_0x168e18[_0x262f('0x5b')]['id']){delete _0x168e18['body']['id'];}_0x168e18[_0x262f('0x5b')][_0x262f('0x64')]=_0x168e18[_0x262f('0x5b')][_0x262f('0x64')]||_0x168e18[_0x262f('0x65')]['id'];_0x51b8ed[_0x262f('0x66')]['id']=_0x168e18[_0x262f('0x5b')]['UserId'];return db[_0x262f('0x3d')][_0x262f('0x59')]({'where':{'id':_0x168e18[_0x262f('0x55')]['id'],'UserId':null}})[_0x262f('0x21')](handleEntityNotFound(_0x7858c,null))[_0x262f('0x21')](function(_0x366d69){if(_0x366d69){_0x51b8ed[_0x262f('0x2a')]=_0x366d69[_0x262f('0x67')]({'plain':!![]});return db['OpenchannelInteraction'][_0x262f('0x59')]({'where':{'id':_0x366d69[_0x262f('0x69')]}});}return null;})['then'](handleEntityNotFound(_0x7858c,null))['then'](function(_0x47bf2a){if(_0x47bf2a){_0x51b8ed[_0x262f('0x6c')]=_0x47bf2a[_0x262f('0x67')]({'plain':!![]});interaction_log[_0x262f('0x22')](_0x262f('0x7f'),_0x168e18['user']['id'],_0x168e18[_0x262f('0x65')][_0x262f('0x39')],_0x168e18[_0x262f('0x65')][_0x262f('0x6e')],_0x51b8ed[_0x262f('0x6c')]['id'],_0x168e18['body']?JSON['stringify'](_0x168e18['body']):_0x262f('0x80'));return respondWithRpcPromise(_0x262f('0x81'),_0x262f('0x82'),_0x51b8ed);}return null;})[_0x262f('0x21')](function(_0x5e5bd9){var _0x54d67a=_0x262f('0x70')+_0x5e5bd9[_0x262f('0x2a')]['ContactId'];return db[_0x262f('0x72')][_0x262f('0x42')](_0x54d67a,{'type':db['Sequelize'][_0x262f('0x73')][_0x262f('0x74')],'raw':!![]})['then'](function(_0x3f21e3){return _0x3f21e3;});})[_0x262f('0x21')](function(_0x1af2d0){if(_0x1af2d0){_0x51b8ed[_0x262f('0x2a')][_0x262f('0x83')]=_0x1af2d0[0x0];if(!_0x168e18[_0x262f('0x5b')][_0x262f('0x64')])return;return db[_0x262f('0x75')][_0x262f('0x59')]({'where':{'id':_0x168e18[_0x262f('0x5b')][_0x262f('0x64')],'role':_0x262f('0x66')},'attributes':['id',_0x262f('0x39'),'fullname',_0x262f('0x76'),_0x262f('0x77')],'raw':!![]});}return null;})['then'](function(_0x1202be){if(!_0x1202be)return null;_0x51b8ed[_0x262f('0x2a')][_0x262f('0x66')]=_0x1202be;return _0x51b8ed;})[_0x262f('0x21')](function(_0x26c3d6){if(_0x26c3d6){_0x26c3d6[_0x262f('0x2a')][_0x262f('0x84')]=util['format'](_0x262f('0x79'),_0x168e18[_0x262f('0x65')]['name']);_0x26c3d6[_0x262f('0x2a')]['channel']=_0x51b8ed[_0x262f('0x7a')];_0x26c3d6[_0x262f('0x2a')][_0x262f('0x7b')]=_0x51b8ed[_0x262f('0x7a')];_0x26c3d6[_0x262f('0x2a')][_0x262f('0x7c')]=_0x262f('0x7e');respondWithRpcPromise(_0x262f('0x85'),_0x262f('0x85'),{'event':_0x262f('0x86'),'message':_0x26c3d6[_0x262f('0x2a')]},client9002);return _0x51b8ed;}return null;})[_0x262f('0x21')](respondWithResult(_0x7858c,null))[_0x262f('0x53')](handleError(_0x7858c,null));};
\ No newline at end of file
+var _0x31ce=['Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','manual','interface','channel','motionChannel','accept','EventManager','acceptmessage','reject','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SIP/%s','rejectmessage','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','defaults','localhost','socket.io-emitter','redis','./openchannelMessage.socket','register','jayson/promise','http','client','request','info','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','OpenchannelMessage,\x20%s,\x20%s','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','stack','name','map','OpenchannelMessage','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','sort','where','pick','merge','VIRTUAL','options','includeAll','include','rows','show','params','rawAttributes','create','body','find','destroy','describe','../../config/logger','openchannel-interactions','openchannel','read','readAt','format','UserId','agent','get','OpenchannelInteraction','OpenchannelInteractionId','update','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','user','role','null','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize'];(function(_0xdb4fa6,_0xfd3f51){var _0x20ef2e=function(_0x7b4bf3){while(--_0x7b4bf3){_0xdb4fa6['push'](_0xdb4fa6['shift']());}};_0x20ef2e(++_0xfd3f51);}(_0x31ce,0x99));var _0xe31c=function(_0x16051a,_0x5e4326){_0x16051a=_0x16051a-0x0;var _0x35d20d=_0x31ce[_0x16051a];return _0x35d20d;};'use strict';var emlformat=require(_0xe31c('0x0'));var rimraf=require(_0xe31c('0x1'));var zipdir=require(_0xe31c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe31c('0x3'));var moment=require(_0xe31c('0x4'));var BPromise=require(_0xe31c('0x5'));var Mustache=require(_0xe31c('0x6'));var util=require('util');var path=require(_0xe31c('0x7'));var sox=require(_0xe31c('0x8'));var csv=require(_0xe31c('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe31c('0xa'));var _=require(_0xe31c('0xb'));var squel=require('squel');var crypto=require(_0xe31c('0xc'));var jsforce=require(_0xe31c('0xd'));var deskjs=require(_0xe31c('0xe'));var toCsv=require('to-csv');var querystring=require(_0xe31c('0xf'));var Papa=require(_0xe31c('0x10'));var Redis=require('ioredis');var authService=require(_0xe31c('0x11'));var qs=require(_0xe31c('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe31c('0x13'));var logger=require('../../config/logger')(_0xe31c('0x14'));var utils=require(_0xe31c('0x15'));var config=require(_0xe31c('0x16'));var licenseUtil=require(_0xe31c('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xe31c('0x18')](config['redis'],{'host':_0xe31c('0x19'),'port':0x18eb});var socket=require(_0xe31c('0x1a'))(new Redis(config[_0xe31c('0x1b')]));require(_0xe31c('0x1c'))[_0xe31c('0x1d')](socket);var jayson=require(_0xe31c('0x1e'));var client=jayson['client'][_0xe31c('0x1f')]({'port':0x232c});var client9002=jayson[_0xe31c('0x20')][_0xe31c('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x2814e5,_0x4f817f,_0xfc3c46,_0x5d9c7e){return new BPromise(function(_0x2fd5e7,_0xaac899){var _0x1a69c0=_0x5d9c7e||client;return _0x1a69c0[_0xe31c('0x21')](_0x2814e5,_0xfc3c46)['then'](function(_0x55b88e){logger[_0xe31c('0x22')]('OpenchannelMessage,\x20%s,\x20%s',_0x4f817f,'request\x20sent');logger[_0xe31c('0x23')](_0xe31c('0x24'),_0x4f817f,'request\x20sent',JSON[_0xe31c('0x25')](_0x55b88e));if(_0x55b88e['error']){if(_0x55b88e[_0xe31c('0x26')]['code']===0x1f4){logger[_0xe31c('0x26')]('OpenchannelMessage,\x20%s,\x20%s',_0x4f817f,_0x55b88e[_0xe31c('0x26')][_0xe31c('0x27')]);return _0xaac899(_0x55b88e['error']['message']);}logger[_0xe31c('0x26')](_0xe31c('0x28'),_0x4f817f,_0x55b88e[_0xe31c('0x26')][_0xe31c('0x27')]);return _0x2fd5e7(_0x55b88e[_0xe31c('0x26')]['message']);}else{logger[_0xe31c('0x22')](_0xe31c('0x28'),_0x4f817f,'request\x20sent');_0x2fd5e7(_0x55b88e[_0xe31c('0x29')][_0xe31c('0x27')]);}})[_0xe31c('0x2a')](function(_0x3180ae){logger[_0xe31c('0x26')](_0xe31c('0x28'),_0x4f817f,_0x3180ae);_0xaac899(_0x3180ae);});});}function respondWithStatusCode(_0x26d1b2,_0x1b198b){_0x1b198b=_0x1b198b||0xcc;return function(_0x40923d){if(_0x40923d){return _0x26d1b2[_0xe31c('0x2b')](_0x1b198b);}return _0x26d1b2[_0xe31c('0x2c')](_0x1b198b)[_0xe31c('0x2d')]();};}function respondWithResult(_0x5a5b86,_0x599d56){_0x599d56=_0x599d56||0xc8;return function(_0x56076a){if(_0x56076a){return _0x5a5b86['status'](_0x599d56)[_0xe31c('0x2e')](_0x56076a);}};}function respondWithFilteredResult(_0xe43f93,_0x562387){return function(_0x1f99de){if(_0x1f99de){var _0x28bbfd=typeof _0x562387[_0xe31c('0x2f')]===_0xe31c('0x30')&&typeof _0x562387[_0xe31c('0x31')]===_0xe31c('0x30');var _0x5c56de=_0x1f99de[_0xe31c('0x32')];var _0x32f724=_0x28bbfd?0x0:_0x562387['offset'];var _0x1d08b4=_0x28bbfd?_0x1f99de[_0xe31c('0x32')]:_0x562387['offset']+_0x562387['limit'];var _0x37c889;if(_0x1d08b4>=_0x5c56de){_0x1d08b4=_0x5c56de;_0x37c889=0xc8;}else{_0x37c889=0xce;}_0xe43f93['status'](_0x37c889);return _0xe43f93[_0xe31c('0x33')](_0xe31c('0x34'),_0x32f724+'-'+_0x1d08b4+'/'+_0x5c56de)[_0xe31c('0x2e')](_0x1f99de);}return null;};}function patchUpdates(_0x4e9b43){return function(_0x5efc14){try{jsonpatch[_0xe31c('0x35')](_0x5efc14,_0x4e9b43,!![]);}catch(_0x5bc8d6){return BPromise['reject'](_0x5bc8d6);}return _0x5efc14[_0xe31c('0x36')]();};}function saveUpdates(_0x56b0c0,_0x1da80e){return function(_0x3597f1){if(_0x3597f1){return _0x3597f1['update'](_0x56b0c0)[_0xe31c('0x37')](function(_0x135703){return _0x135703;});}return null;};}function removeEntity(_0x57f7c5,_0xe79295){return function(_0x48a24d){if(_0x48a24d){return _0x48a24d['destroy']()[_0xe31c('0x37')](function(){_0x57f7c5[_0xe31c('0x2c')](0xcc)[_0xe31c('0x2d')]();});}};}function handleEntityNotFound(_0x33ad15,_0xb977c8){return function(_0x4f6dc5){if(!_0x4f6dc5){_0x33ad15[_0xe31c('0x2b')](0x194);}return _0x4f6dc5;};}function handleError(_0x33ba38,_0x60a122){_0x60a122=_0x60a122||0x1f4;return function(_0x3c7f6a){logger[_0xe31c('0x26')](_0x3c7f6a[_0xe31c('0x38')]);if(_0x3c7f6a[_0xe31c('0x39')]){delete _0x3c7f6a['name'];}_0x33ba38[_0xe31c('0x2c')](_0x60a122)['send'](_0x3c7f6a);};}exports['index']=function(_0x35946e,_0x227106){var _0x19deee={},_0x46eb6d={},_0x31a468={'count':0x0,'rows':[]};var _0x1f9e02=_[_0xe31c('0x3a')](db[_0xe31c('0x3b')]['rawAttributes'],function(_0x2d75ad){return{'name':_0x2d75ad[_0xe31c('0x3c')],'type':_0x2d75ad[_0xe31c('0x3d')][_0xe31c('0x3e')]};});_0x46eb6d[_0xe31c('0x3f')]=_[_0xe31c('0x3a')](_0x1f9e02,_0xe31c('0x39'));_0x46eb6d['query']=_[_0xe31c('0x40')](_0x35946e[_0xe31c('0x41')]);_0x46eb6d[_0xe31c('0x42')]=_[_0xe31c('0x43')](_0x46eb6d[_0xe31c('0x3f')],_0x46eb6d[_0xe31c('0x41')]);_0x19deee['attributes']=_[_0xe31c('0x43')](_0x46eb6d[_0xe31c('0x3f')],qs[_0xe31c('0x44')](_0x35946e['query']['fields']));_0x19deee['attributes']=_0x19deee[_0xe31c('0x45')][_0xe31c('0x46')]?_0x19deee[_0xe31c('0x45')]:_0x46eb6d[_0xe31c('0x3f')];if(!_0x35946e[_0xe31c('0x41')]['hasOwnProperty']('nolimit')){_0x19deee[_0xe31c('0x31')]=qs[_0xe31c('0x31')](_0x35946e[_0xe31c('0x41')][_0xe31c('0x31')]);_0x19deee[_0xe31c('0x2f')]=qs[_0xe31c('0x2f')](_0x35946e[_0xe31c('0x41')][_0xe31c('0x2f')]);}_0x19deee['order']=qs[_0xe31c('0x47')](_0x35946e[_0xe31c('0x41')][_0xe31c('0x47')]);_0x19deee[_0xe31c('0x48')]=qs[_0xe31c('0x42')](_[_0xe31c('0x49')](_0x35946e['query'],_0x46eb6d['filters']),_0x1f9e02);if(_0x35946e[_0xe31c('0x41')]['filter']){_0x19deee[_0xe31c('0x48')]=_[_0xe31c('0x4a')](_0x19deee[_0xe31c('0x48')],{'$or':_[_0xe31c('0x3a')](_0x1f9e02,function(_0xf0108b){if(_0xf0108b['type']!==_0xe31c('0x4b')){var _0x487abb={};_0x487abb[_0xf0108b['name']]={'$like':'%'+_0x35946e['query']['filter']+'%'};return _0x487abb;}})});}_0x19deee=_['merge']({},_0x19deee,_0x35946e[_0xe31c('0x4c')]);var _0x4c8dbc={'where':_0x19deee[_0xe31c('0x48')]};return db[_0xe31c('0x3b')][_0xe31c('0x32')](_0x4c8dbc)[_0xe31c('0x37')](function(_0x6ad238){_0x31a468['count']=_0x6ad238;if(_0x35946e[_0xe31c('0x41')][_0xe31c('0x4d')]){_0x19deee[_0xe31c('0x4e')]=[{'all':!![]}];}return db[_0xe31c('0x3b')]['findAll'](_0x19deee);})['then'](function(_0x326728){_0x31a468[_0xe31c('0x4f')]=_0x326728;return _0x31a468;})[_0xe31c('0x37')](respondWithFilteredResult(_0x227106,_0x19deee))[_0xe31c('0x2a')](handleError(_0x227106,null));};exports[_0xe31c('0x50')]=function(_0xe0cc0a,_0x291370){var _0x254a94={'raw':!![],'where':{'id':_0xe0cc0a[_0xe31c('0x51')]['id']}},_0x515a81={};_0x515a81[_0xe31c('0x3f')]=_['keys'](db[_0xe31c('0x3b')][_0xe31c('0x52')]);_0x515a81[_0xe31c('0x41')]=_[_0xe31c('0x40')](_0xe0cc0a['query']);_0x515a81[_0xe31c('0x42')]=_[_0xe31c('0x43')](_0x515a81[_0xe31c('0x3f')],_0x515a81[_0xe31c('0x41')]);_0x254a94[_0xe31c('0x45')]=_[_0xe31c('0x43')](_0x515a81[_0xe31c('0x3f')],qs[_0xe31c('0x44')](_0xe0cc0a[_0xe31c('0x41')][_0xe31c('0x44')]));_0x254a94[_0xe31c('0x45')]=_0x254a94[_0xe31c('0x45')][_0xe31c('0x46')]?_0x254a94[_0xe31c('0x45')]:_0x515a81['model'];if(_0xe0cc0a[_0xe31c('0x41')][_0xe31c('0x4d')]){_0x254a94['include']=[{'all':!![]}];}_0x254a94=_[_0xe31c('0x4a')]({},_0x254a94,_0xe0cc0a[_0xe31c('0x4c')]);return db['OpenchannelMessage']['find'](_0x254a94)[_0xe31c('0x37')](handleEntityNotFound(_0x291370,null))[_0xe31c('0x37')](respondWithResult(_0x291370,null))[_0xe31c('0x2a')](handleError(_0x291370,null));};exports['create']=function(_0x37b3a7,_0x48cba2){return db[_0xe31c('0x3b')][_0xe31c('0x53')](_0x37b3a7[_0xe31c('0x54')],{})[_0xe31c('0x37')](respondWithResult(_0x48cba2,0xc9))['catch'](handleError(_0x48cba2,null));};exports['update']=function(_0x33a6c1,_0x22f07c){if(_0x33a6c1[_0xe31c('0x54')]['id']){delete _0x33a6c1[_0xe31c('0x54')]['id'];}return db['OpenchannelMessage'][_0xe31c('0x55')]({'where':{'id':_0x33a6c1[_0xe31c('0x51')]['id']}})['then'](handleEntityNotFound(_0x22f07c,null))['then'](saveUpdates(_0x33a6c1['body'],null))['then'](respondWithResult(_0x22f07c,null))[_0xe31c('0x2a')](handleError(_0x22f07c,null));};exports[_0xe31c('0x56')]=function(_0x3a9fe2,_0x55861d){return db[_0xe31c('0x3b')][_0xe31c('0x55')]({'where':{'id':_0x3a9fe2[_0xe31c('0x51')]['id']}})[_0xe31c('0x37')](handleEntityNotFound(_0x55861d,null))[_0xe31c('0x37')](removeEntity(_0x55861d,null))['catch'](handleError(_0x55861d,null));};exports[_0xe31c('0x57')]=function(_0x5e3b30,_0x12e007){return db[_0xe31c('0x3b')][_0xe31c('0x57')]()[_0xe31c('0x37')](respondWithResult(_0x12e007,null))[_0xe31c('0x2a')](handleError(_0x12e007,null));};var interaction_log=require(_0xe31c('0x58'))(_0xe31c('0x59'));exports['accept']=function(_0x423d98,_0x277c1a,_0x2eb85d){var _0xe09e65={'agent':{},'channel':_0xe31c('0x5a')};if(_0x423d98[_0xe31c('0x54')]['id']){delete _0x423d98[_0xe31c('0x54')]['id'];}_0x423d98['body'][_0xe31c('0x5b')]=!![];_0x423d98[_0xe31c('0x54')][_0xe31c('0x5c')]=moment()[_0xe31c('0x5d')]('YYYY-MM-DD\x20HH:mm:ss');_0x423d98[_0xe31c('0x54')][_0xe31c('0x5e')]=_0x423d98[_0xe31c('0x54')][_0xe31c('0x5e')]||_0x423d98['user']['id'];_0xe09e65[_0xe31c('0x5f')]['id']=_0x423d98['body']['UserId'];return db['OpenchannelMessage']['find']({'where':{'id':_0x423d98[_0xe31c('0x51')]['id'],'UserId':null}})[_0xe31c('0x37')](handleEntityNotFound(_0x277c1a,null))['then'](saveUpdates(_0x423d98['body'],null))[_0xe31c('0x37')](function(_0x2ef4cd){if(_0x2ef4cd){_0xe09e65['message']=_0x2ef4cd[_0xe31c('0x60')]({'plain':!![]});return db[_0xe31c('0x61')]['find']({'where':{'id':_0x2ef4cd[_0xe31c('0x62')]}});}return null;})[_0xe31c('0x37')](handleEntityNotFound(_0x277c1a,null))[_0xe31c('0x37')](function(_0x4eb540){if(_0x4eb540){return _0x4eb540[_0xe31c('0x63')]({'UserId':_0x423d98[_0xe31c('0x54')][_0xe31c('0x5e')],'read1stAt':_[_0xe31c('0x64')](_0x4eb540[_0xe31c('0x65')])?moment()[_0xe31c('0x5d')](_0xe31c('0x66')):undefined});}return null;})[_0xe31c('0x37')](function(_0x2cf016){if(_0x2cf016){_0xe09e65[_0xe31c('0x67')]=_0x2cf016[_0xe31c('0x60')]({'plain':!![]});interaction_log['info']('[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x423d98[_0xe31c('0x68')]['id'],_0x423d98[_0xe31c('0x68')][_0xe31c('0x39')],_0x423d98[_0xe31c('0x68')][_0xe31c('0x69')],_0xe09e65[_0xe31c('0x67')]['id'],_0x423d98[_0xe31c('0x54')]?JSON[_0xe31c('0x25')](_0x423d98[_0xe31c('0x54')]):_0xe31c('0x6a'));return respondWithRpcPromise('AcceptMessage',_0xe31c('0x6b'),_0xe09e65);}return null;})[_0xe31c('0x37')](function(_0x53b422){var _0x3358f5=_0xe31c('0x6c')+_0x53b422[_0xe31c('0x27')][_0xe31c('0x6d')];return db[_0xe31c('0x6e')][_0xe31c('0x41')](_0x3358f5,{'type':db[_0xe31c('0x6f')][_0xe31c('0x70')][_0xe31c('0x71')],'raw':!![]})[_0xe31c('0x37')](function(_0x36ec43){return _0x36ec43;});})[_0xe31c('0x37')](function(_0x108caf){if(_0x108caf){_0xe09e65[_0xe31c('0x27')][_0xe31c('0x72')]=_0x108caf[0x0];if(!_0x423d98[_0xe31c('0x54')][_0xe31c('0x5e')])return;return db[_0xe31c('0x73')][_0xe31c('0x55')]({'where':{'id':_0x423d98[_0xe31c('0x54')][_0xe31c('0x5e')],'role':'agent'},'attributes':['id',_0xe31c('0x39'),_0xe31c('0x74'),_0xe31c('0x75'),_0xe31c('0x76')],'raw':!![]});}return null;})[_0xe31c('0x37')](function(_0x5b8d3c){if(!_0x5b8d3c)return null;_0xe09e65[_0xe31c('0x27')]['agent']=_0x5b8d3c;return _0xe09e65;})[_0xe31c('0x37')](function(_0x496e4d){if(_0x496e4d){if(_0x423d98[_0xe31c('0x54')][_0xe31c('0x77')]){_0xe09e65[_0xe31c('0x27')][_0xe31c('0x78')]=util[_0xe31c('0x5d')]('SIP/%s',_0x423d98['user'][_0xe31c('0x39')]);_0xe09e65['message'][_0xe31c('0x79')]=_0xe09e65[_0xe31c('0x79')];_0xe09e65[_0xe31c('0x27')][_0xe31c('0x7a')]=_0xe09e65[_0xe31c('0x79')];_0xe09e65[_0xe31c('0x27')]['event']=_0xe31c('0x7b');return respondWithRpcPromise(_0xe31c('0x7c'),'EventManager',{'event':_0xe31c('0x7d'),'message':_0xe09e65['message']},client9002)[_0xe31c('0x37')](function(){return _0xe09e65;});}return _0xe09e65;}return null;})[_0xe31c('0x37')](respondWithResult(_0x277c1a,null))[_0xe31c('0x2a')](handleError(_0x277c1a,null));};var interaction_log=require(_0xe31c('0x58'))(_0xe31c('0x59'));exports[_0xe31c('0x7e')]=function(_0x1389bc,_0x34fc34,_0x20114c){var _0x2359bb={'agent':{},'channel':_0xe31c('0x5a')};if(_0x1389bc['body']['id']){delete _0x1389bc['body']['id'];}_0x1389bc[_0xe31c('0x54')][_0xe31c('0x5e')]=_0x1389bc[_0xe31c('0x54')]['UserId']||_0x1389bc[_0xe31c('0x68')]['id'];_0x2359bb[_0xe31c('0x5f')]['id']=_0x1389bc['body'][_0xe31c('0x5e')];return db[_0xe31c('0x3b')]['find']({'where':{'id':_0x1389bc[_0xe31c('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x34fc34,null))[_0xe31c('0x37')](function(_0x39717f){if(_0x39717f){_0x2359bb[_0xe31c('0x27')]=_0x39717f[_0xe31c('0x60')]({'plain':!![]});return db['OpenchannelInteraction'][_0xe31c('0x55')]({'where':{'id':_0x39717f[_0xe31c('0x62')]}});}return null;})['then'](handleEntityNotFound(_0x34fc34,null))[_0xe31c('0x37')](function(_0x6a686a){if(_0x6a686a){_0x2359bb[_0xe31c('0x67')]=_0x6a686a['get']({'plain':!![]});interaction_log[_0xe31c('0x22')](_0xe31c('0x7f'),_0x1389bc[_0xe31c('0x68')]['id'],_0x1389bc['user'][_0xe31c('0x39')],_0x1389bc[_0xe31c('0x68')][_0xe31c('0x69')],_0x2359bb[_0xe31c('0x67')]['id'],_0x1389bc[_0xe31c('0x54')]?JSON['stringify'](_0x1389bc[_0xe31c('0x54')]):_0xe31c('0x6a'));return respondWithRpcPromise(_0xe31c('0x80'),_0xe31c('0x81'),_0x2359bb);}return null;})[_0xe31c('0x37')](function(_0xbe8c3e){var _0x42b29a='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0xbe8c3e[_0xe31c('0x27')]['ContactId'];return db[_0xe31c('0x6e')][_0xe31c('0x41')](_0x42b29a,{'type':db[_0xe31c('0x6f')][_0xe31c('0x70')][_0xe31c('0x71')],'raw':!![]})[_0xe31c('0x37')](function(_0x25ee00){return _0x25ee00;});})['then'](function(_0x223fae){if(_0x223fae){_0x2359bb[_0xe31c('0x27')][_0xe31c('0x72')]=_0x223fae[0x0];if(!_0x1389bc[_0xe31c('0x54')][_0xe31c('0x5e')])return;return db[_0xe31c('0x73')][_0xe31c('0x55')]({'where':{'id':_0x1389bc[_0xe31c('0x54')][_0xe31c('0x5e')],'role':_0xe31c('0x5f')},'attributes':['id',_0xe31c('0x39'),_0xe31c('0x74'),_0xe31c('0x75'),_0xe31c('0x76')],'raw':!![]});}return null;})['then'](function(_0x484d25){if(!_0x484d25)return null;_0x2359bb['message'][_0xe31c('0x5f')]=_0x484d25;return _0x2359bb;})[_0xe31c('0x37')](function(_0x23a93c){if(_0x23a93c){_0x23a93c['message']['interface']=util[_0xe31c('0x5d')](_0xe31c('0x82'),_0x1389bc['user'][_0xe31c('0x39')]);_0x23a93c['message'][_0xe31c('0x79')]=_0x2359bb[_0xe31c('0x79')];_0x23a93c[_0xe31c('0x27')][_0xe31c('0x7a')]=_0x2359bb[_0xe31c('0x79')];_0x23a93c[_0xe31c('0x27')]['event']='reject';respondWithRpcPromise(_0xe31c('0x7c'),'EventManager',{'event':_0xe31c('0x83'),'message':_0x23a93c['message']},client9002);return _0x2359bb;}return null;})['then'](respondWithResult(_0x34fc34,null))[_0xe31c('0x2a')](handleError(_0x34fc34,null));};
\ No newline at end of file