Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / screenRecording / screenRecording.controller.js
index 557909a..a8bf3a7 100644 (file)
@@ -1 +1 @@
-const a534_0x2070=['../../config/logger','rows','info','pick','createdAt','stack','sendStatus','format','download','body','set','filter','params','key','closedAt','json','send','recording','like','VIRTUAL','filters','rawAttributes','keys','name','message','destroy','model','findAll','create','index','sequelize','fieldName','filename','extname','unlink','differenceBy','include','options','isNil','show','secrets','File:\x20\x22','count','findOne','ScreenRecording\x20not\x20found','value','attributes','server/files/screen_recordings','then','intersection','ScreenRecording','duration','join','query','root','existsSync','fields','describe','uniqueid','where','Not\x20found','error','nolimit','unlinkSync','undefined','%s.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','end','order','includeAll','length','map','offset','merge','update','util','limit','catch','.cypher','../../components/parsers/qs','status','sort','type','Entity\x20not\x20found'];(function(_0x286999,_0x2070a){const _0x36b83d=function(_0x14b389){while(--_0x14b389){_0x286999['push'](_0x286999['shift']());}};_0x36b83d(++_0x2070a);}(a534_0x2070,0x165));const a534_0x36b8=function(_0x286999,_0x2070a){_0x286999=_0x286999-0x0;let _0x36b83d=a534_0x2070[_0x286999];return _0x36b83d;};const _0x2dba8c=a534_0x36b8;'use strict';const util=require(_0x2dba8c('0x36')),path=require('path'),fs=require('fs'),_=require('lodash'),qs=require(_0x2dba8c('0x3a')),logger=require(_0x2dba8c('0x3f'))('api'),config=require('../../config/environment'),db=require('../../mysqldb')['db'],{Op,ValidationError}=require(_0x2dba8c('0x9')),{InternalError}=require('error-middleware/errors');function respondWithResult(_0x14b389,_0x14a5d7){return _0x14a5d7=_0x14a5d7||0xc8,function(_0x3afe06){const _0xafe839=a534_0x36b8;if(_0x3afe06)return _0x14b389['status'](_0x14a5d7)[_0xafe839('0x4e')](_0x3afe06);};}function respondWithFilteredResult(_0x1a2a9d,_0x3da0be){return function(_0x5a6c80){const _0x461ecc=a534_0x36b8;if(_0x5a6c80){const _0xcda680=_0x5a6c80[_0x461ecc('0x15')],_0x2ef4bb=_0x3da0be[_0x461ecc('0x33')];let _0x55201f=_0x3da0be[_0x461ecc('0x33')]+_0x3da0be['limit'],_0x11a314;return _0x55201f>=_0xcda680?(_0x55201f=_0xcda680,_0x11a314=0xc8):_0x11a314=0xce,_0x1a2a9d[_0x461ecc('0x3b')](_0x11a314),_0x1a2a9d[_0x461ecc('0x49')]('Content-Range',_0x2ef4bb+'-'+_0x55201f+'/'+_0xcda680)['json'](_0x5a6c80);}return null;};}function saveUpdates(_0x378bc8){return function(_0x25d39f){const _0x318ad1=a534_0x36b8;if(_0x25d39f)return _0x25d39f[_0x318ad1('0x35')](_0x378bc8)[_0x318ad1('0x1b')](function(_0x52dfba){return _0x52dfba;});return null;};}function handleEntityNotFound(_0x1702a8){return function(_0x5e8516){const _0x78d4c8=a534_0x36b8;return!_0x5e8516&&_0x1702a8[_0x78d4c8('0x45')](0x194),_0x5e8516;};}function handleError(_0x100074,_0x20c708){return _0x20c708=_0x20c708||0x1f4,function(_0x44923f){const _0x18043f=a534_0x36b8;logger[_0x18043f('0x28')](_0x44923f[_0x18043f('0x44')]),_0x44923f[_0x18043f('0x2')]&&delete _0x44923f[_0x18043f('0x2')],_0x100074['status'](_0x20c708)[_0x18043f('0x4f')](_0x44923f);};}exports[_0x2dba8c('0x8')]=function(_0x34f65b,_0x300967){const _0x4e2b2b=_0x2dba8c;let _0x12ba62={};const _0x18d1b3={},_0x50d6d7={'count':0x0,'rows':[]},_0x29b2cf=_[_0x4e2b2b('0x32')](db['ScreenRecording'][_0x4e2b2b('0x0')],function(_0x48e7f6){const _0x5654a3=_0x4e2b2b;return{'name':_0x48e7f6[_0x5654a3('0xa')],'type':_0x48e7f6[_0x5654a3('0x3d')][_0x5654a3('0x4c')]};});_0x18d1b3[_0x4e2b2b('0x5')]=_[_0x4e2b2b('0xe')](_[_0x4e2b2b('0x32')](_0x29b2cf,_0x4e2b2b('0x2')),['format']),_0x18d1b3['query']=_[_0x4e2b2b('0x1')](_0x34f65b[_0x4e2b2b('0x20')]),_0x18d1b3[_0x4e2b2b('0x53')]=_[_0x4e2b2b('0x1c')](_0x18d1b3[_0x4e2b2b('0x5')],_0x18d1b3['query']),_0x12ba62[_0x4e2b2b('0x19')]=_[_0x4e2b2b('0x1c')](_0x18d1b3[_0x4e2b2b('0x5')],qs[_0x4e2b2b('0x23')](_0x34f65b['query'][_0x4e2b2b('0x23')])),_0x12ba62[_0x4e2b2b('0x19')]=_0x12ba62[_0x4e2b2b('0x19')][_0x4e2b2b('0x31')]?_0x12ba62['attributes']:_0x18d1b3[_0x4e2b2b('0x5')];typeof _0x34f65b[_0x4e2b2b('0x20')][_0x4e2b2b('0x29')]===_0x4e2b2b('0x2b')&&(_0x12ba62[_0x4e2b2b('0x37')]=qs[_0x4e2b2b('0x37')](_0x34f65b['query'][_0x4e2b2b('0x37')]),_0x12ba62[_0x4e2b2b('0x33')]=qs['offset'](_0x34f65b['query'][_0x4e2b2b('0x33')]));_0x12ba62[_0x4e2b2b('0x2f')]=qs[_0x4e2b2b('0x3c')](_0x34f65b[_0x4e2b2b('0x20')][_0x4e2b2b('0x3c')]),_0x12ba62[_0x4e2b2b('0x26')]=qs[_0x4e2b2b('0x53')](_[_0x4e2b2b('0x42')](_0x34f65b[_0x4e2b2b('0x20')],_0x18d1b3[_0x4e2b2b('0x53')]),_0x29b2cf);_0x34f65b[_0x4e2b2b('0x20')][_0x4e2b2b('0x4a')]&&(_0x12ba62[_0x4e2b2b('0x26')]=_[_0x4e2b2b('0x34')](_0x12ba62[_0x4e2b2b('0x26')],{[Op['or']]:_[_0x4e2b2b('0x32')](_0x29b2cf,function(_0x2ed0d5){const _0x5e363f=_0x4e2b2b;if(_0x2ed0d5[_0x5e363f('0x3d')]!==_0x5e363f('0x52')){const _0x517ce3={};return _0x517ce3[_0x2ed0d5[_0x5e363f('0x2')]]={[Op[_0x5e363f('0x51')]]:'%'+_0x34f65b['query']['filter']+'%'},_0x517ce3;}})}));_0x12ba62=_['merge']({},_0x12ba62,_0x34f65b[_0x4e2b2b('0x10')]);const _0x9ffd4f={'where':_0x12ba62['where']};return db[_0x4e2b2b('0x1d')]['count'](_0x9ffd4f)['then'](function(_0x541632){const _0x447654=_0x4e2b2b;return _0x50d6d7['count']=_0x541632,_0x34f65b[_0x447654('0x20')][_0x447654('0x30')]&&(_0x12ba62['include']=[{'all':!![]}]),db[_0x447654('0x1d')][_0x447654('0x6')](_0x12ba62);})[_0x4e2b2b('0x1b')](function(_0x3a2117){const _0x23bc75=_0x4e2b2b;return _0x50d6d7[_0x23bc75('0x40')]=_0x3a2117,_0x50d6d7;})[_0x4e2b2b('0x1b')](respondWithFilteredResult(_0x300967,_0x12ba62))[_0x4e2b2b('0x38')](handleError(_0x300967,null));},exports[_0x2dba8c('0x12')]=function(_0xcaaaaa,_0x2cd072){const _0x54673e=_0x2dba8c;let _0x28dd02={'raw':![],'where':{'id':_0xcaaaaa['params']['id']}};const _0x2cece7={};return _0x2cece7[_0x54673e('0x5')]=_[_0x54673e('0x1')](db[_0x54673e('0x1d')]['rawAttributes']),_0x2cece7[_0x54673e('0x20')]=_[_0x54673e('0x1')](_0xcaaaaa[_0x54673e('0x20')]),_0x2cece7[_0x54673e('0x53')]=_[_0x54673e('0x1c')](_0x2cece7[_0x54673e('0x5')],_0x2cece7['query']),_0x28dd02[_0x54673e('0x19')]=_[_0x54673e('0x1c')](_0x2cece7[_0x54673e('0x5')],qs[_0x54673e('0x23')](_0xcaaaaa[_0x54673e('0x20')][_0x54673e('0x23')])),_0x28dd02[_0x54673e('0x19')]=_0x28dd02[_0x54673e('0x19')][_0x54673e('0x31')]?_0x28dd02[_0x54673e('0x19')]:_0x2cece7[_0x54673e('0x5')],_0xcaaaaa[_0x54673e('0x20')][_0x54673e('0x30')]&&(_0x28dd02[_0x54673e('0xf')]=[{'all':!![]}]),_0x28dd02=_[_0x54673e('0x34')]({},_0x28dd02,_0xcaaaaa[_0x54673e('0x10')]),db[_0x54673e('0x1d')][_0x54673e('0x16')](_0x28dd02)[_0x54673e('0x1b')](handleEntityNotFound(_0x2cd072,null))[_0x54673e('0x1b')](respondWithResult(_0x2cd072,null))[_0x54673e('0x38')](handleError(_0x2cd072,null));},exports[_0x2dba8c('0x7')]=function(_0x456df7,_0x1bd846){const _0xb2d900=_0x2dba8c;return db['ScreenRecording'][_0xb2d900('0x7')](_0x456df7[_0xb2d900('0x48')],{})[_0xb2d900('0x1b')](respondWithResult(_0x1bd846,0xc9))[_0xb2d900('0x38')](handleError(_0x1bd846,null));},exports['update']=function(_0x10ba25,_0x272227){const _0x5ac5cf=_0x2dba8c;return _0x10ba25[_0x5ac5cf('0x48')]['id']&&delete _0x10ba25['body']['id'],delete _0x10ba25[_0x5ac5cf('0x48')][_0x5ac5cf('0x1e')],delete _0x10ba25[_0x5ac5cf('0x48')][_0x5ac5cf('0x43')],delete _0x10ba25['body'][_0x5ac5cf('0x4d')],delete _0x10ba25[_0x5ac5cf('0x48')][_0x5ac5cf('0x18')],db[_0x5ac5cf('0x1d')]['findOne']({'where':{'id':_0x10ba25[_0x5ac5cf('0x4b')]['id']}})[_0x5ac5cf('0x1b')](handleEntityNotFound(_0x272227,null))[_0x5ac5cf('0x1b')](saveUpdates(_0x10ba25[_0x5ac5cf('0x48')],null))['then'](respondWithResult(_0x272227,null))[_0x5ac5cf('0x38')](handleError(_0x272227,null));},exports[_0x2dba8c('0x24')]=function(_0x36c4b2,_0x1c7839){const _0x29a75d=_0x2dba8c;return db['ScreenRecording'][_0x29a75d('0x24')]()[_0x29a75d('0x1b')](respondWithResult(_0x1c7839,null))[_0x29a75d('0x38')](handleError(_0x1c7839,null));},exports[_0x2dba8c('0x47')]=function(_0x323acf,_0x4522da){const _0x130b49=_0x2dba8c,_0x12bfb4=require('../../components/encryptor');let _0x45e827=![];const _0xbf97ad={};return _0x323acf[_0x130b49('0x20')][_0x130b49('0x3d')]&&_0x323acf[_0x130b49('0x20')][_0x130b49('0x3d')]===_0x130b49('0x25')?_0xbf97ad[_0x130b49('0x25')]=_0x323acf[_0x130b49('0x4b')]['id']:_0xbf97ad['id']=_0x323acf[_0x130b49('0x4b')]['id'],db[_0x130b49('0x1d')][_0x130b49('0x16')]({'where':_0xbf97ad,'attributes':['id',_0x130b49('0x18')],'raw':!![]})['then'](handleEntityNotFound(_0x4522da,null))[_0x130b49('0x1b')](function(_0x3399b0){const _0x102fcf=_0x130b49;if(_0x3399b0){const _0x396652=path[_0x102fcf('0x1f')](config['root'],_0x102fcf('0x1a'),_0x3399b0['value']),_0x1191fd=util[_0x102fcf('0x46')](_0x102fcf('0x2c'),_0x396652);if(fs[_0x102fcf('0x22')](_0x1191fd))return _0x45e827=!![],_0x12bfb4['decryptFile'](_0x1191fd,_0x396652,config[_0x102fcf('0x13')][_0x102fcf('0x50')])['then'](function(){return _0x3399b0;});return _0x3399b0;}})['then'](function(_0x5d7bde){const _0x245946=_0x130b49;if(_0x5d7bde){const _0x23dbc1=path[_0x245946('0x1f')](config[_0x245946('0x21')],_0x245946('0x1a'),_0x5d7bde[_0x245946('0x18')]);if(!fs[_0x245946('0x22')](_0x23dbc1))throw new ValidationError(_0x245946('0x17'));return _0x5d7bde[_0x245946('0xb')]?_0x4522da[_0x245946('0x47')](_0x23dbc1,_0x5d7bde[_0x245946('0xb')]+path[_0x245946('0xc')](_0x23dbc1),function(){const _0x197a75=_0x245946;_0x45e827&&fs[_0x197a75('0xd')](_0x23dbc1);}):_0x4522da['download'](_0x23dbc1,function(){const _0x353a4f=_0x245946;_0x45e827&&fs[_0x353a4f('0xd')](_0x23dbc1);});}})[_0x130b49('0x38')](function(_0x51f11e){const _0x1fabcf=_0x130b49;if(_0x51f11e[_0x1fabcf('0x3')]===_0x1fabcf('0x17'))_0x4522da[_0x1fabcf('0x3b')](0x194)[_0x1fabcf('0x4f')](_0x1fabcf('0x27'));else return handleError(_0x4522da,null);});},exports[_0x2dba8c('0x4')]=function(_0x7388cf,_0x2a4ab3){const _0x5e3feb=_0x2dba8c;return db['ScreenRecording'][_0x5e3feb('0x16')]({'where':{'id':_0x7388cf['params']['id']}})[_0x5e3feb('0x1b')](function(_0x2275fc){const _0x5c5fb0=_0x5e3feb;if(!_0x2275fc)throw new ReferenceError(_0x5c5fb0('0x3e'));return _0x2275fc;})['then'](function(_0x14bc68){const _0x9aca5b=_0x5e3feb;let _0x98363a=path[_0x9aca5b('0x1f')](config[_0x9aca5b('0x21')],_0x9aca5b('0x1a'),_0x14bc68[_0x9aca5b('0x18')]);return logger[_0x9aca5b('0x41')]('cancellazione\x20fisica\x20documento\x20%s',_0x98363a),!_[_0x9aca5b('0x11')](_0x14bc68['value'])&&fs[_0x9aca5b('0x22')](_0x98363a)&&(logger[_0x9aca5b('0x41')](_0x9aca5b('0x14')+_0x98363a+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione'),fs[_0x9aca5b('0x2a')](_0x98363a)),_0x98363a=_0x98363a+_0x9aca5b('0x39'),!_[_0x9aca5b('0x11')](_0x14bc68[_0x9aca5b('0x18')])&&fs[_0x9aca5b('0x22')](_0x98363a)&&(logger[_0x9aca5b('0x41')](_0x9aca5b('0x14')+_0x98363a+_0x9aca5b('0x2d')),fs[_0x9aca5b('0x2a')](_0x98363a)),_0x14bc68;})[_0x5e3feb('0x1b')](function(_0x49dbf8){const _0x41e7bd=_0x5e3feb;if(!_0x49dbf8)throw new InternalError();return _0x49dbf8[_0x41e7bd('0x4')]();})[_0x5e3feb('0x1b')](function(){const _0x1349bd=_0x5e3feb;_0x2a4ab3[_0x1349bd('0x3b')](0xcc)[_0x1349bd('0x2e')]();})[_0x5e3feb('0x38')](handleError(_0x2a4ab3,null));};
\ No newline at end of file
+const a534_0x2b58=['../../components/parsers/qs','recording','util','stack','catch','fields','sequelize','merge','name','%s.cypher','update','params','duration','rawAttributes','pick','body','count','set','uniqueid','include','api','Not\x20found','decryptFile','../../config/logger','Content-Range','differenceBy','error','attributes','where','filter','value','../../components/encryptor','extname','secrets','limit','map','filters','describe','isNil','server/files/screen_recordings','error-middleware/errors','keys','order','offset','.cypher','lodash','message','findOne','key','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','options','type','../../mysqldb','unlink','info','json','closedAt','createdAt','existsSync','length','undefined','intersection','VIRTUAL','destroy','includeAll','download','then','path','status','nolimit','model','Entity\x20not\x20found','query','filename','root','fieldName','cancellazione\x20fisica\x20documento\x20%s','format','File:\x20\x22','join','like','ScreenRecording','sort','ScreenRecording\x20not\x20found','send','unlinkSync'];(function(_0x258bfc,_0x2b584d){const _0x276a90=function(_0x250097){while(--_0x250097){_0x258bfc['push'](_0x258bfc['shift']());}};_0x276a90(++_0x2b584d);}(a534_0x2b58,0x1bc));const a534_0x276a=function(_0x258bfc,_0x2b584d){_0x258bfc=_0x258bfc-0x0;let _0x276a90=a534_0x2b58[_0x258bfc];return _0x276a90;};const _0x497ceb=a534_0x276a;'use strict';const util=require(_0x497ceb('0x4a')),path=require(_0x497ceb('0x35')),fs=require('fs'),_=require(_0x497ceb('0x1f')),qs=require(_0x497ceb('0x48')),logger=require(_0x497ceb('0x9'))(_0x497ceb('0x6')),config=require('../../config/environment'),db=require(_0x497ceb('0x26'))['db'],{Op,ValidationError}=require(_0x497ceb('0x4e')),{InternalError}=require(_0x497ceb('0x1a'));function respondWithResult(_0x250097,_0x5363bc){return _0x5363bc=_0x5363bc||0xc8,function(_0x55b049){if(_0x55b049)return _0x250097['status'](_0x5363bc)['json'](_0x55b049);};}function respondWithFilteredResult(_0x1a6708,_0x4d5716){return function(_0x32db5d){const _0xf37f27=a534_0x276a;if(_0x32db5d){const _0x367799=_0x32db5d[_0xf37f27('0x2')],_0x3a882e=_0x4d5716[_0xf37f27('0x1d')];let _0x11aa17=_0x4d5716['offset']+_0x4d5716[_0xf37f27('0x14')],_0x2436fa;return _0x11aa17>=_0x367799?(_0x11aa17=_0x367799,_0x2436fa=0xc8):_0x2436fa=0xce,_0x1a6708[_0xf37f27('0x36')](_0x2436fa),_0x1a6708[_0xf37f27('0x3')](_0xf37f27('0xa'),_0x3a882e+'-'+_0x11aa17+'/'+_0x367799)[_0xf37f27('0x29')](_0x32db5d);}return null;};}function saveUpdates(_0x823c57){return function(_0x4857e0){const _0x19edb9=a534_0x276a;if(_0x4857e0)return _0x4857e0[_0x19edb9('0x52')](_0x823c57)['then'](function(_0x4d8276){return _0x4d8276;});return null;};}function handleEntityNotFound(_0x56a1de){return function(_0x2a56f7){return!_0x2a56f7&&_0x56a1de['sendStatus'](0x194),_0x2a56f7;};}function handleError(_0x430e17,_0x96ee5f){return _0x96ee5f=_0x96ee5f||0x1f4,function(_0x41a652){const _0x58856b=a534_0x276a;logger[_0x58856b('0xc')](_0x41a652[_0x58856b('0x4b')]),_0x41a652['name']&&delete _0x41a652[_0x58856b('0x50')],_0x430e17[_0x58856b('0x36')](_0x96ee5f)[_0x58856b('0x46')](_0x41a652);};}exports['index']=function(_0x51b7c6,_0x157456){const _0x418845=_0x497ceb;let _0x3e9be8={};const _0x58b551={},_0x358b50={'count':0x0,'rows':[]},_0x4eb4bb=_['map'](db[_0x418845('0x43')][_0x418845('0x55')],function(_0x459438){const _0x4fe03b=_0x418845;return{'name':_0x459438[_0x4fe03b('0x3d')],'type':_0x459438[_0x4fe03b('0x25')][_0x4fe03b('0x22')]};});_0x58b551['model']=_[_0x418845('0xb')](_[_0x418845('0x15')](_0x4eb4bb,_0x418845('0x50')),['format']),_0x58b551[_0x418845('0x3a')]=_[_0x418845('0x1b')](_0x51b7c6[_0x418845('0x3a')]),_0x58b551['filters']=_['intersection'](_0x58b551[_0x418845('0x38')],_0x58b551[_0x418845('0x3a')]),_0x3e9be8[_0x418845('0xd')]=_[_0x418845('0x2f')](_0x58b551[_0x418845('0x38')],qs['fields'](_0x51b7c6[_0x418845('0x3a')]['fields'])),_0x3e9be8[_0x418845('0xd')]=_0x3e9be8[_0x418845('0xd')][_0x418845('0x2d')]?_0x3e9be8[_0x418845('0xd')]:_0x58b551[_0x418845('0x38')];typeof _0x51b7c6['query'][_0x418845('0x37')]===_0x418845('0x2e')&&(_0x3e9be8[_0x418845('0x14')]=qs['limit'](_0x51b7c6[_0x418845('0x3a')][_0x418845('0x14')]),_0x3e9be8['offset']=qs[_0x418845('0x1d')](_0x51b7c6[_0x418845('0x3a')][_0x418845('0x1d')]));_0x3e9be8[_0x418845('0x1c')]=qs['sort'](_0x51b7c6[_0x418845('0x3a')][_0x418845('0x44')]),_0x3e9be8[_0x418845('0xe')]=qs[_0x418845('0x16')](_[_0x418845('0x0')](_0x51b7c6['query'],_0x58b551[_0x418845('0x16')]),_0x4eb4bb);_0x51b7c6[_0x418845('0x3a')][_0x418845('0xf')]&&(_0x3e9be8[_0x418845('0xe')]=_[_0x418845('0x4f')](_0x3e9be8['where'],{[Op['or']]:_[_0x418845('0x15')](_0x4eb4bb,function(_0x23c283){const _0x4973c0=_0x418845;if(_0x23c283[_0x4973c0('0x25')]!==_0x4973c0('0x30')){const _0x3ac71e={};return _0x3ac71e[_0x23c283[_0x4973c0('0x50')]]={[Op[_0x4973c0('0x42')]]:'%'+_0x51b7c6[_0x4973c0('0x3a')]['filter']+'%'},_0x3ac71e;}})}));_0x3e9be8=_[_0x418845('0x4f')]({},_0x3e9be8,_0x51b7c6[_0x418845('0x24')]);const _0x5ee13e={'where':_0x3e9be8[_0x418845('0xe')]};return db['ScreenRecording'][_0x418845('0x2')](_0x5ee13e)[_0x418845('0x34')](function(_0xc460b5){const _0x1dce05=_0x418845;return _0x358b50[_0x1dce05('0x2')]=_0xc460b5,_0x51b7c6[_0x1dce05('0x3a')][_0x1dce05('0x32')]&&(_0x3e9be8['include']=[{'all':!![]}]),db[_0x1dce05('0x43')]['findAll'](_0x3e9be8);})[_0x418845('0x34')](function(_0x319147){return _0x358b50['rows']=_0x319147,_0x358b50;})[_0x418845('0x34')](respondWithFilteredResult(_0x157456,_0x3e9be8))['catch'](handleError(_0x157456,null));},exports['show']=function(_0x59926a,_0x5b88ed){const _0x2677cc=_0x497ceb;let _0x4ffd50={'raw':![],'where':{'id':_0x59926a[_0x2677cc('0x53')]['id']}};const _0x488276={};return _0x488276['model']=_[_0x2677cc('0x1b')](db['ScreenRecording']['rawAttributes']),_0x488276['query']=_['keys'](_0x59926a['query']),_0x488276[_0x2677cc('0x16')]=_[_0x2677cc('0x2f')](_0x488276[_0x2677cc('0x38')],_0x488276[_0x2677cc('0x3a')]),_0x4ffd50['attributes']=_['intersection'](_0x488276[_0x2677cc('0x38')],qs[_0x2677cc('0x4d')](_0x59926a['query'][_0x2677cc('0x4d')])),_0x4ffd50['attributes']=_0x4ffd50[_0x2677cc('0xd')][_0x2677cc('0x2d')]?_0x4ffd50[_0x2677cc('0xd')]:_0x488276['model'],_0x59926a[_0x2677cc('0x3a')][_0x2677cc('0x32')]&&(_0x4ffd50[_0x2677cc('0x5')]=[{'all':!![]}]),_0x4ffd50=_[_0x2677cc('0x4f')]({},_0x4ffd50,_0x59926a[_0x2677cc('0x24')]),db[_0x2677cc('0x43')][_0x2677cc('0x21')](_0x4ffd50)[_0x2677cc('0x34')](handleEntityNotFound(_0x5b88ed,null))[_0x2677cc('0x34')](respondWithResult(_0x5b88ed,null))[_0x2677cc('0x4c')](handleError(_0x5b88ed,null));},exports['create']=function(_0x27cb32,_0x260f17){const _0x39d560=_0x497ceb;return db['ScreenRecording']['create'](_0x27cb32[_0x39d560('0x1')],{})['then'](respondWithResult(_0x260f17,0xc9))[_0x39d560('0x4c')](handleError(_0x260f17,null));},exports[_0x497ceb('0x52')]=function(_0x6f0f51,_0x4662a6){const _0x1e1754=_0x497ceb;return _0x6f0f51[_0x1e1754('0x1')]['id']&&delete _0x6f0f51[_0x1e1754('0x1')]['id'],delete _0x6f0f51[_0x1e1754('0x1')][_0x1e1754('0x54')],delete _0x6f0f51[_0x1e1754('0x1')][_0x1e1754('0x2b')],delete _0x6f0f51[_0x1e1754('0x1')][_0x1e1754('0x2a')],delete _0x6f0f51['body'][_0x1e1754('0x10')],db[_0x1e1754('0x43')][_0x1e1754('0x21')]({'where':{'id':_0x6f0f51[_0x1e1754('0x53')]['id']}})['then'](handleEntityNotFound(_0x4662a6,null))[_0x1e1754('0x34')](saveUpdates(_0x6f0f51[_0x1e1754('0x1')],null))[_0x1e1754('0x34')](respondWithResult(_0x4662a6,null))[_0x1e1754('0x4c')](handleError(_0x4662a6,null));},exports[_0x497ceb('0x17')]=function(_0x658732,_0x1264e5){const _0x104e5c=_0x497ceb;return db[_0x104e5c('0x43')]['describe']()['then'](respondWithResult(_0x1264e5,null))[_0x104e5c('0x4c')](handleError(_0x1264e5,null));},exports[_0x497ceb('0x33')]=function(_0x4cea5f,_0x7711b7){const _0x53eca0=_0x497ceb,_0x1d0b9c=require(_0x53eca0('0x11'));let _0x37c542=![];const _0x554cd0={};return _0x4cea5f[_0x53eca0('0x3a')][_0x53eca0('0x25')]&&_0x4cea5f[_0x53eca0('0x3a')][_0x53eca0('0x25')]===_0x53eca0('0x4')?_0x554cd0[_0x53eca0('0x4')]=_0x4cea5f[_0x53eca0('0x53')]['id']:_0x554cd0['id']=_0x4cea5f[_0x53eca0('0x53')]['id'],db[_0x53eca0('0x43')]['findOne']({'where':_0x554cd0,'attributes':['id','value'],'raw':!![]})[_0x53eca0('0x34')](handleEntityNotFound(_0x7711b7,null))['then'](function(_0x104920){const _0x4672b8=_0x53eca0;if(_0x104920){const _0x44ffb5=path[_0x4672b8('0x41')](config[_0x4672b8('0x3c')],'server/files/screen_recordings',_0x104920[_0x4672b8('0x10')]),_0x4e6efc=util[_0x4672b8('0x3f')](_0x4672b8('0x51'),_0x44ffb5);if(fs[_0x4672b8('0x2c')](_0x4e6efc))return _0x37c542=!![],_0x1d0b9c[_0x4672b8('0x8')](_0x4e6efc,_0x44ffb5,config[_0x4672b8('0x13')][_0x4672b8('0x49')])[_0x4672b8('0x34')](function(){return _0x104920;});return _0x104920;}})[_0x53eca0('0x34')](function(_0x1c2cd9){const _0x238f07=_0x53eca0;if(_0x1c2cd9){const _0x3fbc3b=path[_0x238f07('0x41')](config[_0x238f07('0x3c')],'server/files/screen_recordings',_0x1c2cd9[_0x238f07('0x10')]);if(!fs[_0x238f07('0x2c')](_0x3fbc3b))throw new ValidationError(_0x238f07('0x45'));return _0x1c2cd9[_0x238f07('0x3b')]?_0x7711b7[_0x238f07('0x33')](_0x3fbc3b,_0x1c2cd9[_0x238f07('0x3b')]+path[_0x238f07('0x12')](_0x3fbc3b),function(){_0x37c542&&fs['unlink'](_0x3fbc3b);}):_0x7711b7[_0x238f07('0x33')](_0x3fbc3b,function(){const _0x38680c=_0x238f07;_0x37c542&&fs[_0x38680c('0x27')](_0x3fbc3b);});}})[_0x53eca0('0x4c')](function(_0x2cc544){const _0x53004c=_0x53eca0;if(_0x2cc544[_0x53004c('0x20')]===_0x53004c('0x45'))_0x7711b7[_0x53004c('0x36')](0x194)[_0x53004c('0x46')](_0x53004c('0x7'));else return handleError(_0x7711b7,null);});},exports[_0x497ceb('0x31')]=function(_0x5104a2,_0x4e02fa){const _0x263ec3=_0x497ceb;return db['ScreenRecording'][_0x263ec3('0x21')]({'where':{'id':_0x5104a2[_0x263ec3('0x53')]['id']}})['then'](function(_0x199028){const _0x33fe2a=_0x263ec3;if(!_0x199028)throw new ReferenceError(_0x33fe2a('0x39'));return _0x199028;})[_0x263ec3('0x34')](function(_0x48eb67){const _0x2406ac=_0x263ec3;let _0x5787e2=path['join'](config[_0x2406ac('0x3c')],_0x2406ac('0x19'),_0x48eb67['value']);return logger[_0x2406ac('0x28')](_0x2406ac('0x3e'),_0x5787e2),!_[_0x2406ac('0x18')](_0x48eb67[_0x2406ac('0x10')])&&fs['existsSync'](_0x5787e2)&&(logger[_0x2406ac('0x28')]('File:\x20\x22'+_0x5787e2+_0x2406ac('0x23')),fs[_0x2406ac('0x47')](_0x5787e2)),_0x5787e2=_0x5787e2+_0x2406ac('0x1e'),!_[_0x2406ac('0x18')](_0x48eb67[_0x2406ac('0x10')])&&fs[_0x2406ac('0x2c')](_0x5787e2)&&(logger[_0x2406ac('0x28')](_0x2406ac('0x40')+_0x5787e2+_0x2406ac('0x23')),fs[_0x2406ac('0x47')](_0x5787e2)),_0x48eb67;})[_0x263ec3('0x34')](function(_0x4babb9){const _0x49e096=_0x263ec3;if(!_0x4babb9)throw new InternalError();return _0x4babb9[_0x49e096('0x31')]();})[_0x263ec3('0x34')](function(){const _0x3f9684=_0x263ec3;_0x4e02fa[_0x3f9684('0x36')](0xcc)['end']();})['catch'](handleError(_0x4e02fa,null));};
\ No newline at end of file