Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / intSugarcrmConfiguration / intSugarcrmConfiguration.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 _0x9bd8=['status','end','json','count','offset','limit','set','Content-Range','apply','destroy','stack','name','send','index','map','SugarcrmConfiguration','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','findAll','show','params','keys','includeAll','include','find','create','update','body','getFields','findOne','SugarcrmField','order','nolimit','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','Sequelize','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','code','error','message','SugarcrmConfiguration,\x20%s,\x20%s','info','result','catch'];(function(_0x3f175d,_0x20ab9f){var _0xfd7eef=function(_0x528e95){while(--_0x528e95){_0x3f175d['push'](_0x3f175d['shift']());}};_0xfd7eef(++_0x20ab9f);}(_0x9bd8,0xf0));var _0x89bd=function(_0x36ea36,_0x544f2a){_0x36ea36=_0x36ea36-0x0;var _0x419659=_0x9bd8[_0x36ea36];return _0x419659;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x89bd('0x0'));var rimraf=require(_0x89bd('0x1'));var zipdir=require(_0x89bd('0x2'));var jsonpatch=require(_0x89bd('0x3'));var rp=require(_0x89bd('0x4'));var moment=require(_0x89bd('0x5'));var BPromise=require(_0x89bd('0x6'));var Mustache=require(_0x89bd('0x7'));var util=require(_0x89bd('0x8'));var path=require('path');var sox=require(_0x89bd('0x9'));var csv=require('to-csv');var ejs=require(_0x89bd('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x89bd('0xb'));var crypto=require(_0x89bd('0xc'));var jsforce=require(_0x89bd('0xd'));var deskjs=require(_0x89bd('0xe'));var toCsv=require(_0x89bd('0xf'));var querystring=require(_0x89bd('0x10'));var Papa=require(_0x89bd('0x11'));var Redis=require(_0x89bd('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x89bd('0x13'));var hardwareService=require(_0x89bd('0x14'));var logger=require(_0x89bd('0x15'))(_0x89bd('0x16'));var utils=require(_0x89bd('0x17'));var config=require(_0x89bd('0x18'));var db=require(_0x89bd('0x19'))['db'];var jayson=require(_0x89bd('0x1a'));var client=jayson[_0x89bd('0x1b')][_0x89bd('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x261377,_0x274d52,_0x69eb64){if(_0x69eb64){var _0x300c36=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x300c36['test'](_0x274d52)){return _0x261377;}else{throw new db[(_0x89bd('0x1d'))]['ValidationError'](_0x89bd('0x1e'));}}else{return _0x261377;}}function respondWithRpcPromise(_0x2c4ebe,_0xe9632b,_0x259d32,_0x3c28f0){return new BPromise(function(_0x4c8c1c,_0x10fe40){var _0x54b946=_0x3c28f0||client;return _0x54b946['request'](_0x2c4ebe,_0x259d32)[_0x89bd('0x1f')](function(_0x288719){logger['info']('SugarcrmConfiguration,\x20%s,\x20%s',_0xe9632b,_0x89bd('0x20'));logger[_0x89bd('0x21')](_0x89bd('0x22'),_0xe9632b,_0x89bd('0x20'),JSON['stringify'](_0x288719));if(_0x288719['error']){if(_0x288719['error'][_0x89bd('0x23')]===0x1f4){logger[_0x89bd('0x24')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xe9632b,_0x288719[_0x89bd('0x24')]['message']);return _0x10fe40(_0x288719[_0x89bd('0x24')][_0x89bd('0x25')]);}logger[_0x89bd('0x24')](_0x89bd('0x26'),_0xe9632b,_0x288719['error'][_0x89bd('0x25')]);return _0x4c8c1c(_0x288719[_0x89bd('0x24')][_0x89bd('0x25')]);}else{logger[_0x89bd('0x27')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xe9632b,_0x89bd('0x20'));_0x4c8c1c(_0x288719[_0x89bd('0x28')][_0x89bd('0x25')]);}})[_0x89bd('0x29')](function(_0x161afd){logger['error'](_0x89bd('0x26'),_0xe9632b,_0x161afd);_0x10fe40(_0x161afd);});});}function respondWithStatusCode(_0x30ae17,_0x4d7968){_0x4d7968=_0x4d7968||0xcc;return function(_0x555cb0){if(_0x555cb0){return _0x30ae17['sendStatus'](_0x4d7968);}return _0x30ae17[_0x89bd('0x2a')](_0x4d7968)[_0x89bd('0x2b')]();};}function respondWithResult(_0x50728e,_0x5c776c){_0x5c776c=_0x5c776c||0xc8;return function(_0x1de5e3){if(_0x1de5e3){return _0x50728e[_0x89bd('0x2a')](_0x5c776c)[_0x89bd('0x2c')](_0x1de5e3);}};}function respondWithFilteredResult(_0x1852d8,_0x342f20){return function(_0x14ff45){if(_0x14ff45){var _0x344be5=_0x14ff45[_0x89bd('0x2d')],_0x1585c8=_0x342f20[_0x89bd('0x2e')],_0x4d38e3=_0x342f20[_0x89bd('0x2e')]+_0x342f20[_0x89bd('0x2f')],_0x11c852;if(_0x4d38e3>=_0x344be5){_0x4d38e3=_0x344be5;_0x11c852=0xc8;}else{_0x11c852=0xce;}_0x1852d8[_0x89bd('0x2a')](_0x11c852);return _0x1852d8[_0x89bd('0x30')](_0x89bd('0x31'),_0x1585c8+'-'+_0x4d38e3+'/'+_0x344be5)[_0x89bd('0x2c')](_0x14ff45);}return null;};}function patchUpdates(_0x3eed3f){return function(_0x202d7c){try{jsonpatch[_0x89bd('0x32')](_0x202d7c,_0x3eed3f,!![]);}catch(_0x365ae1){return BPromise['reject'](_0x365ae1);}return _0x202d7c['save']();};}function saveUpdates(_0x4a9bbc,_0x43a4b0){return function(_0x2e00a0){if(_0x2e00a0){return _0x2e00a0['update'](_0x4a9bbc)[_0x89bd('0x1f')](function(_0x212aea){return _0x212aea;});}return null;};}function removeEntity(_0x6fb7a1,_0x125548){return function(_0x4f7fe1){if(_0x4f7fe1){return _0x4f7fe1[_0x89bd('0x33')]()[_0x89bd('0x1f')](function(){_0x6fb7a1[_0x89bd('0x2a')](0xcc)[_0x89bd('0x2b')]();});}};}function handleEntityNotFound(_0x525f54,_0x61dc56){return function(_0x336c0c){if(!_0x336c0c){_0x525f54['sendStatus'](0x194);}return _0x336c0c;};}function handleError(_0x293375,_0x150ca3){_0x150ca3=_0x150ca3||0x1f4;return function(_0x31c2bc){logger[_0x89bd('0x24')](_0x31c2bc[_0x89bd('0x34')]);if(_0x31c2bc['name']){delete _0x31c2bc[_0x89bd('0x35')];}_0x293375['status'](_0x150ca3)[_0x89bd('0x36')](_0x31c2bc);};}exports[_0x89bd('0x37')]=function(_0x2d6e49,_0x1584f4){var _0x1fcafe={},_0x399dfe={},_0x37ee32={'count':0x0,'rows':[]};var _0x3743c=_[_0x89bd('0x38')](db[_0x89bd('0x39')][_0x89bd('0x3a')],function(_0x479c7e){return{'name':_0x479c7e[_0x89bd('0x3b')],'type':_0x479c7e[_0x89bd('0x3c')][_0x89bd('0x3d')]};});_0x399dfe[_0x89bd('0x3e')]=_['map'](_0x3743c,'name');_0x399dfe[_0x89bd('0x3f')]=_['keys'](_0x2d6e49['query']);_0x399dfe[_0x89bd('0x40')]=_[_0x89bd('0x41')](_0x399dfe['model'],_0x399dfe[_0x89bd('0x3f')]);_0x1fcafe[_0x89bd('0x42')]=_['intersection'](_0x399dfe[_0x89bd('0x3e')],qs[_0x89bd('0x43')](_0x2d6e49[_0x89bd('0x3f')][_0x89bd('0x43')]));_0x1fcafe[_0x89bd('0x42')]=_0x1fcafe[_0x89bd('0x42')][_0x89bd('0x44')]?_0x1fcafe[_0x89bd('0x42')]:_0x399dfe[_0x89bd('0x3e')];if(!_0x2d6e49[_0x89bd('0x3f')][_0x89bd('0x45')]('nolimit')){_0x1fcafe['limit']=qs[_0x89bd('0x2f')](_0x2d6e49['query']['limit']);_0x1fcafe[_0x89bd('0x2e')]=qs[_0x89bd('0x2e')](_0x2d6e49[_0x89bd('0x3f')]['offset']);}_0x1fcafe['order']=qs[_0x89bd('0x46')](_0x2d6e49[_0x89bd('0x3f')]['sort']);_0x1fcafe[_0x89bd('0x47')]=qs['filters'](_[_0x89bd('0x48')](_0x2d6e49['query'],_0x399dfe[_0x89bd('0x40')]),_0x3743c);if(_0x2d6e49[_0x89bd('0x3f')][_0x89bd('0x49')]){_0x1fcafe[_0x89bd('0x47')]=_[_0x89bd('0x4a')](_0x1fcafe[_0x89bd('0x47')],{'$or':_[_0x89bd('0x38')](_0x3743c,function(_0x2fcd48){if(_0x2fcd48['type']!==_0x89bd('0x4b')){var _0x3c264c={};_0x3c264c[_0x2fcd48[_0x89bd('0x35')]]={'$like':'%'+_0x2d6e49[_0x89bd('0x3f')][_0x89bd('0x49')]+'%'};return _0x3c264c;}})});}_0x1fcafe=_[_0x89bd('0x4a')]({},_0x1fcafe,_0x2d6e49[_0x89bd('0x4c')]);var _0x184b25={'where':_0x1fcafe[_0x89bd('0x47')]};return db[_0x89bd('0x39')][_0x89bd('0x2d')](_0x184b25)[_0x89bd('0x1f')](function(_0x2fc78d){_0x37ee32[_0x89bd('0x2d')]=_0x2fc78d;if(_0x2d6e49['query']['includeAll']){_0x1fcafe['include']=[{'all':!![]}];}return db[_0x89bd('0x39')][_0x89bd('0x4d')](_0x1fcafe);})[_0x89bd('0x1f')](function(_0x35a212){_0x37ee32['rows']=_0x35a212;return _0x37ee32;})[_0x89bd('0x1f')](respondWithFilteredResult(_0x1584f4,_0x1fcafe))['catch'](handleError(_0x1584f4,null));};exports[_0x89bd('0x4e')]=function(_0x202d0f,_0x91d043){var _0x45ea71={'raw':![],'where':{'id':_0x202d0f[_0x89bd('0x4f')]['id']}},_0x3421c8={};_0x3421c8[_0x89bd('0x3e')]=_[_0x89bd('0x50')](db['SugarcrmConfiguration'][_0x89bd('0x3a')]);_0x3421c8[_0x89bd('0x3f')]=_[_0x89bd('0x50')](_0x202d0f[_0x89bd('0x3f')]);_0x3421c8['filters']=_[_0x89bd('0x41')](_0x3421c8[_0x89bd('0x3e')],_0x3421c8[_0x89bd('0x3f')]);_0x45ea71['attributes']=_['intersection'](_0x3421c8['model'],qs[_0x89bd('0x43')](_0x202d0f[_0x89bd('0x3f')][_0x89bd('0x43')]));_0x45ea71['attributes']=_0x45ea71[_0x89bd('0x42')][_0x89bd('0x44')]?_0x45ea71[_0x89bd('0x42')]:_0x3421c8[_0x89bd('0x3e')];if(_0x202d0f['query'][_0x89bd('0x51')]){_0x45ea71[_0x89bd('0x52')]=[{'all':!![]}];}_0x45ea71=_[_0x89bd('0x4a')]({},_0x45ea71,_0x202d0f['options']);return db[_0x89bd('0x39')][_0x89bd('0x53')](_0x45ea71)[_0x89bd('0x1f')](handleEntityNotFound(_0x91d043,null))[_0x89bd('0x1f')](respondWithResult(_0x91d043,null))[_0x89bd('0x29')](handleError(_0x91d043,null));};exports['create']=function(_0x41b0a7,_0xa8e0de){return db[_0x89bd('0x39')][_0x89bd('0x54')](_0x41b0a7['body'],{})[_0x89bd('0x1f')](respondWithResult(_0xa8e0de,0xc9))[_0x89bd('0x29')](handleError(_0xa8e0de,null));};exports[_0x89bd('0x55')]=function(_0x24b99c,_0x5c0f39){if(_0x24b99c[_0x89bd('0x56')]['id']){delete _0x24b99c[_0x89bd('0x56')]['id'];}return db['SugarcrmConfiguration'][_0x89bd('0x53')]({'where':{'id':_0x24b99c[_0x89bd('0x4f')]['id']}})[_0x89bd('0x1f')](handleEntityNotFound(_0x5c0f39,null))[_0x89bd('0x1f')](saveUpdates(_0x24b99c['body'],null))[_0x89bd('0x1f')](respondWithResult(_0x5c0f39,null))[_0x89bd('0x29')](handleError(_0x5c0f39,null));};exports[_0x89bd('0x33')]=function(_0x40efc6,_0x95461f){return db[_0x89bd('0x39')][_0x89bd('0x53')]({'where':{'id':_0x40efc6[_0x89bd('0x4f')]['id']}})[_0x89bd('0x1f')](handleEntityNotFound(_0x95461f,null))['then'](removeEntity(_0x95461f,null))[_0x89bd('0x29')](handleError(_0x95461f,null));};exports[_0x89bd('0x57')]=function(_0x3617b8,_0x37063c,_0x11de7f){var _0x24e185={};var _0x17a577={};var _0x4212b9;var _0x22fc32;return db[_0x89bd('0x39')][_0x89bd('0x58')]({'where':{'id':_0x3617b8[_0x89bd('0x4f')]['id']}})[_0x89bd('0x1f')](handleEntityNotFound(_0x37063c,null))[_0x89bd('0x1f')](function(_0x3a2638){if(_0x3a2638){_0x4212b9=_0x3a2638;_0x17a577[_0x89bd('0x3e')]=_['keys'](db[_0x89bd('0x59')][_0x89bd('0x3a')]);_0x17a577['query']=_[_0x89bd('0x50')](_0x3617b8[_0x89bd('0x3f')]);_0x17a577[_0x89bd('0x40')]=_[_0x89bd('0x41')](_0x17a577['model'],_0x17a577[_0x89bd('0x3f')]);_0x24e185[_0x89bd('0x42')]=_['intersection'](_0x17a577[_0x89bd('0x3e')],qs[_0x89bd('0x43')](_0x3617b8[_0x89bd('0x3f')]['fields']));_0x24e185['attributes']=_0x24e185[_0x89bd('0x42')][_0x89bd('0x44')]?_0x24e185[_0x89bd('0x42')]:_0x17a577[_0x89bd('0x3e')];_0x24e185[_0x89bd('0x5a')]=qs['sort'](_0x3617b8[_0x89bd('0x3f')]['sort']);_0x24e185[_0x89bd('0x47')]=qs['filters'](_[_0x89bd('0x48')](_0x3617b8[_0x89bd('0x3f')],_0x17a577[_0x89bd('0x40')]));if(_0x3617b8['query'][_0x89bd('0x49')]){_0x24e185[_0x89bd('0x47')]=_[_0x89bd('0x4a')](_0x24e185[_0x89bd('0x47')],{'$or':_[_0x89bd('0x38')](_0x24e185[_0x89bd('0x42')],function(_0x2dcbb8){var _0x4d9339={};_0x4d9339[_0x2dcbb8]={'$like':'%'+_0x3617b8['query']['filter']+'%'};return _0x4d9339;})});}_0x24e185=_[_0x89bd('0x4a')]({},_0x24e185,_0x3617b8['options']);return _0x4212b9[_0x89bd('0x57')](_0x24e185);}})[_0x89bd('0x1f')](function(_0xdf7402){if(_0xdf7402){_0x22fc32=_0xdf7402['length'];if(!_0x3617b8[_0x89bd('0x3f')][_0x89bd('0x45')](_0x89bd('0x5b'))){_0x24e185[_0x89bd('0x2f')]=qs[_0x89bd('0x2f')](_0x3617b8['query'][_0x89bd('0x2f')]);_0x24e185[_0x89bd('0x2e')]=qs[_0x89bd('0x2e')](_0x3617b8['query'][_0x89bd('0x2e')]);}return _0x4212b9[_0x89bd('0x57')](_0x24e185);}})[_0x89bd('0x1f')](function(_0x386bbe){if(_0x386bbe){return _0x386bbe?{'count':_0x22fc32,'rows':_0x386bbe}:null;}})['then'](respondWithResult(_0x37063c,null))[_0x89bd('0x29')](handleError(_0x37063c,null));};exports[_0x89bd('0x5c')]=function(_0x431276,_0x40d5c7,_0x146e6b){var _0x504616={};var _0x4ae7ee={};var _0x24b9be;var _0x366908;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x431276[_0x89bd('0x4f')]['id']}})['then'](handleEntityNotFound(_0x40d5c7,null))['then'](function(_0xb618d5){if(_0xb618d5){_0x24b9be=_0xb618d5;_0x4ae7ee[_0x89bd('0x3e')]=_[_0x89bd('0x50')](db[_0x89bd('0x59')]['rawAttributes']);_0x4ae7ee[_0x89bd('0x3f')]=_[_0x89bd('0x50')](_0x431276[_0x89bd('0x3f')]);_0x4ae7ee[_0x89bd('0x40')]=_[_0x89bd('0x41')](_0x4ae7ee[_0x89bd('0x3e')],_0x4ae7ee['query']);_0x504616[_0x89bd('0x42')]=_[_0x89bd('0x41')](_0x4ae7ee['model'],qs[_0x89bd('0x43')](_0x431276[_0x89bd('0x3f')]['fields']));_0x504616['attributes']=_0x504616['attributes'][_0x89bd('0x44')]?_0x504616[_0x89bd('0x42')]:_0x4ae7ee[_0x89bd('0x3e')];_0x504616['order']=qs[_0x89bd('0x46')](_0x431276[_0x89bd('0x3f')]['sort']);_0x504616[_0x89bd('0x47')]=qs[_0x89bd('0x40')](_[_0x89bd('0x48')](_0x431276['query'],_0x4ae7ee[_0x89bd('0x40')]));if(_0x431276[_0x89bd('0x3f')][_0x89bd('0x49')]){_0x504616[_0x89bd('0x47')]=_[_0x89bd('0x4a')](_0x504616['where'],{'$or':_[_0x89bd('0x38')](_0x504616[_0x89bd('0x42')],function(_0x40a238){var _0x3278d7={};_0x3278d7[_0x40a238]={'$like':'%'+_0x431276[_0x89bd('0x3f')][_0x89bd('0x49')]+'%'};return _0x3278d7;})});}_0x504616=_[_0x89bd('0x4a')]({},_0x504616,_0x431276[_0x89bd('0x4c')]);return _0x24b9be[_0x89bd('0x5c')](_0x504616);}})[_0x89bd('0x1f')](function(_0xd5a263){if(_0xd5a263){_0x366908=_0xd5a263[_0x89bd('0x44')];if(!_0x431276[_0x89bd('0x3f')][_0x89bd('0x45')]('nolimit')){_0x504616[_0x89bd('0x2f')]=qs[_0x89bd('0x2f')](_0x431276['query'][_0x89bd('0x2f')]);_0x504616[_0x89bd('0x2e')]=qs[_0x89bd('0x2e')](_0x431276[_0x89bd('0x3f')][_0x89bd('0x2e')]);}return _0x24b9be['getSubjects'](_0x504616);}})[_0x89bd('0x1f')](function(_0x24a1d3){if(_0x24a1d3){return _0x24a1d3?{'count':_0x366908,'rows':_0x24a1d3}:null;}})['then'](respondWithResult(_0x40d5c7,null))[_0x89bd('0x29')](handleError(_0x40d5c7,null));};exports[_0x89bd('0x5d')]=function(_0x23a929,_0x2c64cb,_0x8d7fe7){var _0x54b04e={};var _0x50f29d={};var _0x291095;var _0x423632;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x23a929[_0x89bd('0x4f')]['id']}})[_0x89bd('0x1f')](handleEntityNotFound(_0x2c64cb,null))[_0x89bd('0x1f')](function(_0x31f0b0){if(_0x31f0b0){_0x291095=_0x31f0b0;_0x50f29d['model']=_[_0x89bd('0x50')](db[_0x89bd('0x59')][_0x89bd('0x3a')]);_0x50f29d['query']=_[_0x89bd('0x50')](_0x23a929['query']);_0x50f29d[_0x89bd('0x40')]=_[_0x89bd('0x41')](_0x50f29d['model'],_0x50f29d[_0x89bd('0x3f')]);_0x54b04e[_0x89bd('0x42')]=_['intersection'](_0x50f29d['model'],qs[_0x89bd('0x43')](_0x23a929[_0x89bd('0x3f')][_0x89bd('0x43')]));_0x54b04e['attributes']=_0x54b04e['attributes'][_0x89bd('0x44')]?_0x54b04e['attributes']:_0x50f29d['model'];_0x54b04e[_0x89bd('0x5a')]=qs['sort'](_0x23a929['query'][_0x89bd('0x46')]);_0x54b04e[_0x89bd('0x47')]=qs['filters'](_[_0x89bd('0x48')](_0x23a929['query'],_0x50f29d['filters']));if(_0x23a929[_0x89bd('0x3f')][_0x89bd('0x49')]){_0x54b04e[_0x89bd('0x47')]=_['merge'](_0x54b04e[_0x89bd('0x47')],{'$or':_[_0x89bd('0x38')](_0x54b04e[_0x89bd('0x42')],function(_0x481eaa){var _0x34ce08={};_0x34ce08[_0x481eaa]={'$like':'%'+_0x23a929['query'][_0x89bd('0x49')]+'%'};return _0x34ce08;})});}_0x54b04e=_[_0x89bd('0x4a')]({},_0x54b04e,_0x23a929['options']);return _0x291095['getDescriptions'](_0x54b04e);}})['then'](function(_0x2b47d7){if(_0x2b47d7){_0x423632=_0x2b47d7['length'];if(!_0x23a929[_0x89bd('0x3f')][_0x89bd('0x45')](_0x89bd('0x5b'))){_0x54b04e['limit']=qs['limit'](_0x23a929[_0x89bd('0x3f')][_0x89bd('0x2f')]);_0x54b04e['offset']=qs[_0x89bd('0x2e')](_0x23a929[_0x89bd('0x3f')][_0x89bd('0x2e')]);}return _0x291095[_0x89bd('0x5d')](_0x54b04e);}})[_0x89bd('0x1f')](function(_0x4a3547){if(_0x4a3547){return _0x4a3547?{'count':_0x423632,'rows':_0x4a3547}:null;}})[_0x89bd('0x1f')](respondWithResult(_0x2c64cb,null))[_0x89bd('0x29')](handleError(_0x2c64cb,null));};