Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / voiceMusicOnHold / voiceMusicOnHold.controller.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xb0b0=['to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit','set','Content-Range','json','save','update','then','destroy','get','MusicOnHolds','UserProfileResource','end','stack','name','send','index','map','VoiceMusicOnHold','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','count','include','findAll','rows','catch','show','params','includeAll','body','create','sequelize','transaction','mode','files','join','root','server/files/moh','mkdirSync','directory','0777','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readdirSync','forEach','unlinkSync','Sequelize','ValidationError','message','addSound','findOne','save_name','converted_format','createdAt','format','basename','extname','%s.%s','symlinkSync','removeSound','Sound','id2','getSounds','order','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0xb0b0,0x6a));var _0x0b0b=function(_0x1cabc0,_0x50dbc7){_0x1cabc0=_0x1cabc0-0x0;var _0x39fa24=_0xb0b0[_0x1cabc0];return _0x39fa24;};'use strict';var emlformat=require(_0x0b0b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x0b0b('0x1'));var jsonpatch=require(_0x0b0b('0x2'));var rp=require('request-promise');var moment=require(_0x0b0b('0x3'));var BPromise=require(_0x0b0b('0x4'));var Mustache=require(_0x0b0b('0x5'));var util=require(_0x0b0b('0x6'));var path=require(_0x0b0b('0x7'));var sox=require(_0x0b0b('0x8'));var csv=require(_0x0b0b('0x9'));var ejs=require(_0x0b0b('0xa'));var fs=require('fs');var fs_extra=require(_0x0b0b('0xb'));var _=require(_0x0b0b('0xc'));var squel=require(_0x0b0b('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0b0b('0xe'));var toCsv=require(_0x0b0b('0x9'));var querystring=require(_0x0b0b('0xf'));var Papa=require(_0x0b0b('0x10'));var Redis=require(_0x0b0b('0x11'));var authService=require(_0x0b0b('0x12'));var qs=require(_0x0b0b('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x0b0b('0x14'));var utils=require(_0x0b0b('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x0b0b('0x16'));var db=require(_0x0b0b('0x17'))['db'];function respondWithStatusCode(_0x1253d8,_0x204f87){_0x204f87=_0x204f87||0xcc;return function(_0x2cd600){if(_0x2cd600){return _0x1253d8[_0x0b0b('0x18')](_0x204f87);}return _0x1253d8[_0x0b0b('0x19')](_0x204f87)['end']();};}function respondWithResult(_0x4b98a7,_0x50a10d){_0x50a10d=_0x50a10d||0xc8;return function(_0x7811d5){if(_0x7811d5){return _0x4b98a7[_0x0b0b('0x19')](_0x50a10d)['json'](_0x7811d5);}};}function respondWithFilteredResult(_0x3986c3,_0x19b67a){return function(_0x186270){if(_0x186270){var _0x46784a=typeof _0x19b67a[_0x0b0b('0x1a')]===_0x0b0b('0x1b')&&typeof _0x19b67a[_0x0b0b('0x1c')]===_0x0b0b('0x1b');var _0x1e9fb7=_0x186270['count'];var _0x550d57=_0x46784a?0x0:_0x19b67a[_0x0b0b('0x1a')];var _0x2f71a2=_0x46784a?_0x186270['count']:_0x19b67a[_0x0b0b('0x1a')]+_0x19b67a[_0x0b0b('0x1c')];var _0x13529c;if(_0x2f71a2>=_0x1e9fb7){_0x2f71a2=_0x1e9fb7;_0x13529c=0xc8;}else{_0x13529c=0xce;}_0x3986c3[_0x0b0b('0x19')](_0x13529c);return _0x3986c3[_0x0b0b('0x1d')](_0x0b0b('0x1e'),_0x550d57+'-'+_0x2f71a2+'/'+_0x1e9fb7)[_0x0b0b('0x1f')](_0x186270);}return null;};}function patchUpdates(_0x5b2382){return function(_0x62fb8){try{jsonpatch['apply'](_0x62fb8,_0x5b2382,!![]);}catch(_0x187c23){return BPromise['reject'](_0x187c23);}return _0x62fb8[_0x0b0b('0x20')]();};}function saveUpdates(_0x20b863,_0x125de9){return function(_0x2e050a){if(_0x2e050a){return _0x2e050a[_0x0b0b('0x21')](_0x20b863)[_0x0b0b('0x22')](function(_0x32a35f){return _0x32a35f;});}return null;};}function removeEntity(_0x47e42a,_0x5e08ae){return function(_0x4378c3){if(_0x4378c3){return _0x4378c3[_0x0b0b('0x23')]()[_0x0b0b('0x22')](function(){var _0x22496c=_0x4378c3[_0x0b0b('0x24')]({'plain':!![]});var _0x286216=_0x0b0b('0x25');return db[_0x0b0b('0x26')]['destroy']({'where':{'type':_0x286216,'resourceId':_0x22496c['id']}})[_0x0b0b('0x22')](function(){return _0x4378c3;});})[_0x0b0b('0x22')](function(){_0x47e42a[_0x0b0b('0x19')](0xcc)[_0x0b0b('0x27')]();});}};}function handleEntityNotFound(_0x58aa8d,_0x4157a1){return function(_0x417809){if(!_0x417809){_0x58aa8d[_0x0b0b('0x18')](0x194);}return _0x417809;};}function handleError(_0x261247,_0x19c80c){_0x19c80c=_0x19c80c||0x1f4;return function(_0xc071a0){logger['error'](_0xc071a0[_0x0b0b('0x28')]);if(_0xc071a0[_0x0b0b('0x29')]){delete _0xc071a0[_0x0b0b('0x29')];}_0x261247[_0x0b0b('0x19')](_0x19c80c)[_0x0b0b('0x2a')](_0xc071a0);};}exports[_0x0b0b('0x2b')]=function(_0x1d6e2b,_0x3fb3e4){var _0x349f3a={},_0x298f82={},_0xf9b690={'count':0x0,'rows':[]};var _0x56ef84=_[_0x0b0b('0x2c')](db[_0x0b0b('0x2d')][_0x0b0b('0x2e')],function(_0x5d391a){return{'name':_0x5d391a[_0x0b0b('0x2f')],'type':_0x5d391a[_0x0b0b('0x30')]['key']};});_0x298f82['model']=_[_0x0b0b('0x2c')](_0x56ef84,_0x0b0b('0x29'));_0x298f82[_0x0b0b('0x31')]=_[_0x0b0b('0x32')](_0x1d6e2b[_0x0b0b('0x31')]);_0x298f82[_0x0b0b('0x33')]=_[_0x0b0b('0x34')](_0x298f82[_0x0b0b('0x35')],_0x298f82['query']);_0x349f3a[_0x0b0b('0x36')]=_['intersection'](_0x298f82[_0x0b0b('0x35')],qs['fields'](_0x1d6e2b[_0x0b0b('0x31')][_0x0b0b('0x37')]));_0x349f3a['attributes']=_0x349f3a[_0x0b0b('0x36')][_0x0b0b('0x38')]?_0x349f3a[_0x0b0b('0x36')]:_0x298f82[_0x0b0b('0x35')];if(!_0x1d6e2b[_0x0b0b('0x31')]['hasOwnProperty'](_0x0b0b('0x39'))){_0x349f3a[_0x0b0b('0x1c')]=qs[_0x0b0b('0x1c')](_0x1d6e2b[_0x0b0b('0x31')]['limit']);_0x349f3a['offset']=qs['offset'](_0x1d6e2b[_0x0b0b('0x31')][_0x0b0b('0x1a')]);}_0x349f3a['order']=qs[_0x0b0b('0x3a')](_0x1d6e2b['query'][_0x0b0b('0x3a')]);delete _0x1d6e2b['query'][_0x0b0b('0x3a')];_0x349f3a[_0x0b0b('0x3b')]=qs[_0x0b0b('0x33')](_[_0x0b0b('0x3c')](_0x1d6e2b['query'],_0x298f82[_0x0b0b('0x33')]),_0x56ef84);if(_0x1d6e2b[_0x0b0b('0x31')][_0x0b0b('0x3d')]){_0x349f3a[_0x0b0b('0x3b')]=_[_0x0b0b('0x3e')](_0x349f3a['where'],{'$or':_[_0x0b0b('0x2c')](_0x56ef84,function(_0x3ad194){if(_0x3ad194[_0x0b0b('0x30')]!==_0x0b0b('0x3f')){var _0x12de3f={};_0x12de3f[_0x3ad194[_0x0b0b('0x29')]]={'$like':'%'+_0x1d6e2b[_0x0b0b('0x31')]['filter']+'%'};return _0x12de3f;}})});}_0x349f3a=_[_0x0b0b('0x3e')]({},_0x349f3a,_0x1d6e2b[_0x0b0b('0x40')]);var _0x155db5={'where':_0x349f3a['where']};return db[_0x0b0b('0x2d')][_0x0b0b('0x41')](_0x155db5)[_0x0b0b('0x22')](function(_0x1e5fce){_0xf9b690[_0x0b0b('0x41')]=_0x1e5fce;if(_0x1d6e2b[_0x0b0b('0x31')]['includeAll']){_0x349f3a[_0x0b0b('0x42')]=[{'all':!![]}];}return db['VoiceMusicOnHold'][_0x0b0b('0x43')](_0x349f3a);})[_0x0b0b('0x22')](function(_0x249372){_0xf9b690[_0x0b0b('0x44')]=_0x249372;return _0xf9b690;})[_0x0b0b('0x22')](respondWithFilteredResult(_0x3fb3e4,_0x349f3a))[_0x0b0b('0x45')](handleError(_0x3fb3e4,null));};exports[_0x0b0b('0x46')]=function(_0x672887,_0x2935d7){var _0x4b7c74={'raw':![],'where':{'id':_0x672887[_0x0b0b('0x47')]['id']}},_0xebb972={};_0xebb972['model']=_['keys'](db[_0x0b0b('0x2d')][_0x0b0b('0x2e')]);_0xebb972[_0x0b0b('0x31')]=_[_0x0b0b('0x32')](_0x672887[_0x0b0b('0x31')]);_0xebb972[_0x0b0b('0x33')]=_[_0x0b0b('0x34')](_0xebb972[_0x0b0b('0x35')],_0xebb972[_0x0b0b('0x31')]);_0x4b7c74['attributes']=_[_0x0b0b('0x34')](_0xebb972[_0x0b0b('0x35')],qs['fields'](_0x672887[_0x0b0b('0x31')]['fields']));_0x4b7c74[_0x0b0b('0x36')]=_0x4b7c74[_0x0b0b('0x36')][_0x0b0b('0x38')]?_0x4b7c74[_0x0b0b('0x36')]:_0xebb972['model'];if(_0x672887[_0x0b0b('0x31')][_0x0b0b('0x48')]){_0x4b7c74[_0x0b0b('0x42')]=[{'all':!![]}];}_0x4b7c74=_[_0x0b0b('0x3e')]({},_0x4b7c74,_0x672887[_0x0b0b('0x40')]);return db[_0x0b0b('0x2d')]['find'](_0x4b7c74)[_0x0b0b('0x22')](handleEntityNotFound(_0x2935d7,null))[_0x0b0b('0x22')](respondWithResult(_0x2935d7,null))[_0x0b0b('0x45')](handleError(_0x2935d7,null));};exports[_0x0b0b('0x21')]=function(_0x361bee,_0x1cc341){if(_0x361bee[_0x0b0b('0x49')]['id']){delete _0x361bee['body']['id'];}return db[_0x0b0b('0x2d')]['find']({'where':{'id':_0x361bee[_0x0b0b('0x47')]['id']}})[_0x0b0b('0x22')](handleEntityNotFound(_0x1cc341,null))[_0x0b0b('0x22')](saveUpdates(_0x361bee[_0x0b0b('0x49')],null))[_0x0b0b('0x22')](respondWithResult(_0x1cc341,null))['catch'](handleError(_0x1cc341,null));};exports[_0x0b0b('0x4a')]=function(_0x2e431b,_0x2e27e3,_0x39c33c){return db[_0x0b0b('0x4b')][_0x0b0b('0x4c')](function(_0x30d103){if(_0x2e431b[_0x0b0b('0x49')][_0x0b0b('0x4d')]===_0x0b0b('0x4e')){_0x2e431b['body']['directory']=path[_0x0b0b('0x4f')](config[_0x0b0b('0x50')],_0x0b0b('0x51'),_0x2e431b[_0x0b0b('0x49')]['name']);}return db[_0x0b0b('0x2d')][_0x0b0b('0x4a')](_0x2e431b[_0x0b0b('0x49')],{'transaction':_0x30d103})[_0x0b0b('0x22')](function(_0x36b337){if(_0x2e431b[_0x0b0b('0x49')][_0x0b0b('0x4d')]===_0x0b0b('0x4e')){fs[_0x0b0b('0x52')](_0x36b337[_0x0b0b('0x53')],parseInt(_0x0b0b('0x54'),0x8));}var _0x333091=_0x2e431b[_0x0b0b('0x55')][_0x0b0b('0x24')]({'plain':!![]});if(!_0x333091)throw new Error(_0x0b0b('0x56'));if(_0x333091[_0x0b0b('0x57')]==='user'){var _0x13c591=_0x36b337[_0x0b0b('0x24')]({'plain':!![]});return db[_0x0b0b('0x58')][_0x0b0b('0x59')]({'where':{'name':_0x0b0b('0x25'),'userProfileId':_0x333091[_0x0b0b('0x5a')]},'raw':!![]})['then'](function(_0x3a8be7){if(_0x3a8be7&&_0x3a8be7[_0x0b0b('0x5b')]===0x0){return db[_0x0b0b('0x26')][_0x0b0b('0x4a')]({'name':_0x13c591['name'],'resourceId':_0x13c591['id'],'type':_0x3a8be7[_0x0b0b('0x29')],'sectionId':_0x3a8be7['id']},{})[_0x0b0b('0x22')](function(){return _0x36b337;});}else{return _0x36b337;}})[_0x0b0b('0x45')](function(_0x3400fe){logger[_0x0b0b('0x5c')](_0x0b0b('0x5d'),_0x3400fe);});}return _0x36b337;});})[_0x0b0b('0x22')](respondWithResult(_0x2e27e3,0xc9))[_0x0b0b('0x45')](handleError(_0x2e27e3,null));};exports[_0x0b0b('0x23')]=function(_0x1de337,_0x4709c4,_0x3488ff){var _0x1658e7;return db[_0x0b0b('0x2d')][_0x0b0b('0x59')]({'where':{'id':_0x1de337['params']['id']}})[_0x0b0b('0x22')](function(_0x196de9){if(_0x196de9){return db[_0x0b0b('0x4b')]['transaction'](function(_0x1f7d2a){return _0x196de9[_0x0b0b('0x23')]({'transaction':_0x1f7d2a,'raw':!![]})[_0x0b0b('0x22')](function(_0x4f547d){if(_0x4f547d['directory']){fs[_0x0b0b('0x5e')](_0x4f547d['directory'])[_0x0b0b('0x5f')](function(_0x1b1a56){fs[_0x0b0b('0x60')](path[_0x0b0b('0x4f')](_0x4f547d['directory'],_0x1b1a56));});fs['rmdirSync'](_0x4f547d[_0x0b0b('0x53')]);}return _0x4f547d;});})[_0x0b0b('0x45')](function(_0x326e2a){throw new db[(_0x0b0b('0x61'))][(_0x0b0b('0x62'))](_0x326e2a[_0x0b0b('0x63')]);});}})['then'](handleEntityNotFound(_0x4709c4,null))[_0x0b0b('0x22')](removeEntity(_0x4709c4,null))[_0x0b0b('0x45')](handleError(_0x4709c4,null));};exports['addSound']=function(_0x22d366,_0x1c8425,_0x4bc773){return db['sequelize'][_0x0b0b('0x4c')](function(_0x2db891){var _0xe1bcb7;return db[_0x0b0b('0x2d')]['find']({'where':{'id':_0x22d366[_0x0b0b('0x47')]['id']}})[_0x0b0b('0x22')](function(_0x465bd9){if(_0x465bd9){_0xe1bcb7=_0x465bd9;return _0x465bd9[_0x0b0b('0x64')](_0x22d366['body']['id'],{'transaction':_0x2db891});}})[_0x0b0b('0x22')](function(_0x5c4d71){if(_0x5c4d71){return db['Sound'][_0x0b0b('0x65')]({'where':{'id':_0x22d366['body']['id']},'attributes':['id',_0x0b0b('0x29'),_0x0b0b('0x66'),_0x0b0b('0x67'),_0x0b0b('0x68')],'raw':!![]});}})[_0x0b0b('0x22')](function(_0x8fffa3){if(_0x8fffa3){var _0x560e71=path[_0x0b0b('0x4f')](config[_0x0b0b('0x50')],'server/files/sounds/converted',util[_0x0b0b('0x69')]('%s.%s',path[_0x0b0b('0x6a')](_0x8fffa3[_0x0b0b('0x66')],path[_0x0b0b('0x6b')](_0x8fffa3[_0x0b0b('0x66')])),_0x8fffa3[_0x0b0b('0x67')]));var _0x1e7244=path[_0x0b0b('0x4f')](config[_0x0b0b('0x50')],_0x0b0b('0x51'),_0xe1bcb7[_0x0b0b('0x29')],util['format'](_0x0b0b('0x6c'),_0x8fffa3[_0x0b0b('0x29')],_0x8fffa3[_0x0b0b('0x67')]));fs[_0x0b0b('0x6d')](_0x560e71,_0x1e7244);return _0x8fffa3;}})[_0x0b0b('0x45')](function(_0x590d3c){throw new db[(_0x0b0b('0x61'))][(_0x0b0b('0x62'))](_0x590d3c[_0x0b0b('0x63')]);});})[_0x0b0b('0x22')](handleEntityNotFound(_0x1c8425,null))[_0x0b0b('0x22')](respondWithResult(_0x1c8425,0xc9))[_0x0b0b('0x45')](handleError(_0x1c8425,null));};exports['removeSound']=function(_0x105e9e,_0x54008b,_0x1cf066){return db['sequelize'][_0x0b0b('0x4c')](function(_0x50e821){var _0x3236d9;return db[_0x0b0b('0x2d')][_0x0b0b('0x65')]({'where':{'id':_0x105e9e[_0x0b0b('0x47')]['id']}})[_0x0b0b('0x22')](handleEntityNotFound(_0x54008b,null))[_0x0b0b('0x22')](function(_0x493fb9){if(_0x493fb9){_0x3236d9=_0x493fb9;return _0x493fb9[_0x0b0b('0x6e')](_0x105e9e[_0x0b0b('0x47')]['id2']);}})[_0x0b0b('0x22')](function(_0x57520b){if(_0x57520b){return db[_0x0b0b('0x6f')][_0x0b0b('0x65')]({'where':{'id':_0x105e9e[_0x0b0b('0x47')][_0x0b0b('0x70')]},'attributes':['id',_0x0b0b('0x29'),_0x0b0b('0x66'),'converted_format','createdAt'],'raw':!![]});}})['then'](function(_0x232288){if(_0x232288){fs['unlinkSync'](path[_0x0b0b('0x4f')](_0x3236d9['directory'],util[_0x0b0b('0x69')](_0x0b0b('0x6c'),_0x232288['name'],_0x232288[_0x0b0b('0x67')])));return _0x232288;}})['catch'](function(_0x2ebf48){throw new db[(_0x0b0b('0x61'))]['ValidationError'](_0x2ebf48['message']);});})['then'](handleEntityNotFound(_0x54008b,null))['then'](respondWithStatusCode(_0x54008b,0xcc))[_0x0b0b('0x45')](handleError(_0x54008b,null));};exports[_0x0b0b('0x71')]=function(_0x161dde,_0x59b534,_0x245454){var _0x5612c1={};var _0x565a55={};var _0x12825a;var _0x87d865;return db['VoiceMusicOnHold'][_0x0b0b('0x65')]({'where':{'id':_0x161dde[_0x0b0b('0x47')]['id']}})['then'](handleEntityNotFound(_0x59b534,null))[_0x0b0b('0x22')](function(_0x2cc68f){if(_0x2cc68f){_0x12825a=_0x2cc68f;_0x565a55[_0x0b0b('0x35')]=_[_0x0b0b('0x32')](db[_0x0b0b('0x6f')][_0x0b0b('0x2e')]);_0x565a55[_0x0b0b('0x31')]=_[_0x0b0b('0x32')](_0x161dde[_0x0b0b('0x31')]);_0x565a55[_0x0b0b('0x33')]=_[_0x0b0b('0x34')](_0x565a55[_0x0b0b('0x35')],_0x565a55[_0x0b0b('0x31')]);_0x5612c1[_0x0b0b('0x36')]=_[_0x0b0b('0x34')](_0x565a55[_0x0b0b('0x35')],qs[_0x0b0b('0x37')](_0x161dde[_0x0b0b('0x31')][_0x0b0b('0x37')]));_0x5612c1['attributes']=_0x5612c1['attributes']['length']?_0x5612c1[_0x0b0b('0x36')]:_0x565a55[_0x0b0b('0x35')];_0x5612c1[_0x0b0b('0x72')]=qs[_0x0b0b('0x3a')](_0x161dde[_0x0b0b('0x31')][_0x0b0b('0x3a')]);_0x5612c1[_0x0b0b('0x3b')]=qs['filters'](_[_0x0b0b('0x3c')](_0x161dde[_0x0b0b('0x31')],_0x565a55[_0x0b0b('0x33')]));if(_0x161dde[_0x0b0b('0x31')][_0x0b0b('0x3d')]){_0x5612c1[_0x0b0b('0x3b')]=_[_0x0b0b('0x3e')](_0x5612c1['where'],{'$or':_[_0x0b0b('0x2c')](_0x5612c1['attributes'],function(_0x5dd840){var _0x81735b={};_0x81735b[_0x5dd840]={'$like':'%'+_0x161dde[_0x0b0b('0x31')]['filter']+'%'};return _0x81735b;})});}_0x5612c1=_[_0x0b0b('0x3e')]({},_0x5612c1,_0x161dde['options']);return _0x12825a[_0x0b0b('0x71')](_0x5612c1);}})[_0x0b0b('0x22')](function(_0xaf1450){if(_0xaf1450){_0x87d865=_0xaf1450[_0x0b0b('0x38')];if(!_0x161dde[_0x0b0b('0x31')]['hasOwnProperty'](_0x0b0b('0x39'))){_0x5612c1[_0x0b0b('0x1c')]=qs[_0x0b0b('0x1c')](_0x161dde[_0x0b0b('0x31')][_0x0b0b('0x1c')]);_0x5612c1[_0x0b0b('0x1a')]=qs[_0x0b0b('0x1a')](_0x161dde[_0x0b0b('0x31')]['offset']);}return _0x12825a['getSounds'](_0x5612c1);}})[_0x0b0b('0x22')](function(_0x447e1e){if(_0x447e1e){return _0x447e1e?{'count':_0x87d865,'rows':_0x447e1e}:null;}})['then'](respondWithResult(_0x59b534,null))['catch'](handleError(_0x59b534,null));};