71805872d2658e4ec83a9aa6aafc8dd0c8a661d3
[motion2.git] / server / api / trunk / trunk.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 _0xbfcc=['createdAt','updatedAt','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','root','server/files/templates/trunk.ejs','utf8','join','server/files/templates/registry.ejs','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','/etc/asterisk/sip_xcally_registers.conf','Reload','update','chan_sip.so','html-pdf','zip-dir','fast-json-patch','request-promise','moment','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','code','Trunk,\x20%s,\x20%s','message','info','result','catch','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','destroy','Trunks','UserProfileResource','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','Trunk','includeAll','findAll','show','params','include','find','omit'];(function(_0x1773f7,_0x54318f){var _0x1983fb=function(_0x50b543){while(--_0x50b543){_0x1773f7['push'](_0x1773f7['shift']());}};_0x1983fb(++_0x54318f);}(_0xbfcc,0x1dd));var _0xcbfc=function(_0x3b231a,_0x53a00d){_0x3b231a=_0x3b231a-0x0;var _0x18d67a=_0xbfcc[_0x3b231a];return _0x18d67a;};'use strict';var pdf=require(_0xcbfc('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xcbfc('0x1'));var jsonpatch=require(_0xcbfc('0x2'));var rp=require(_0xcbfc('0x3'));var moment=require(_0xcbfc('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xcbfc('0x5'));var csv=require(_0xcbfc('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xcbfc('0x7'));var squel=require('squel');var crypto=require(_0xcbfc('0x8'));var jsforce=require(_0xcbfc('0x9'));var deskjs=require(_0xcbfc('0xa'));var toCsv=require(_0xcbfc('0x6'));var querystring=require('querystring');var Papa=require(_0xcbfc('0xb'));var Redis=require(_0xcbfc('0xc'));var authService=require(_0xcbfc('0xd'));var qs=require(_0xcbfc('0xe'));var as=require(_0xcbfc('0xf'));var hardwareService=require(_0xcbfc('0x10'));var logger=require('../../config/logger')(_0xcbfc('0x11'));var utils=require(_0xcbfc('0x12'));var config=require(_0xcbfc('0x13'));var db=require(_0xcbfc('0x14'))['db'];var jayson=require(_0xcbfc('0x15'));var client=jayson['client'][_0xcbfc('0x16')]({'port':0x232a});function checkPasswordPattern(_0x86f67c,_0x80d08d,_0x5ba249){if(_0x5ba249){var _0x3c1092=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3c1092[_0xcbfc('0x17')](_0x80d08d)){return _0x86f67c;}else{throw new db[(_0xcbfc('0x18'))][(_0xcbfc('0x19'))](_0xcbfc('0x1a'));}}else{return _0x86f67c;}}function respondWithRpcPromise(_0x53a7ea,_0x3c69ed,_0x1963de,_0x1ec8c4){return new BPromise(function(_0x4317e4,_0x50c6b6){var _0x565301=_0x1ec8c4||client;return _0x565301[_0xcbfc('0x1b')](_0x53a7ea,_0x1963de)[_0xcbfc('0x1c')](function(_0xa65368){logger['info']('Trunk,\x20%s,\x20%s',_0x3c69ed,_0xcbfc('0x1d'));logger[_0xcbfc('0x1e')](_0xcbfc('0x1f'),_0x3c69ed,'request\x20sent',JSON[_0xcbfc('0x20')](_0xa65368));if(_0xa65368['error']){if(_0xa65368[_0xcbfc('0x21')][_0xcbfc('0x22')]===0x1f4){logger[_0xcbfc('0x21')](_0xcbfc('0x23'),_0x3c69ed,_0xa65368[_0xcbfc('0x21')][_0xcbfc('0x24')]);return _0x50c6b6(_0xa65368['error'][_0xcbfc('0x24')]);}logger[_0xcbfc('0x21')]('Trunk,\x20%s,\x20%s',_0x3c69ed,_0xa65368[_0xcbfc('0x21')]['message']);return _0x4317e4(_0xa65368['error']['message']);}else{logger[_0xcbfc('0x25')]('Trunk,\x20%s,\x20%s',_0x3c69ed,'request\x20sent');_0x4317e4(_0xa65368[_0xcbfc('0x26')][_0xcbfc('0x24')]);}})[_0xcbfc('0x27')](function(_0x1564bc){logger['error'](_0xcbfc('0x23'),_0x3c69ed,_0x1564bc);_0x50c6b6(_0x1564bc);});});}function respondWithStatusCode(_0x51284a,_0x280b78){_0x280b78=_0x280b78||0xcc;return function(_0x75bca0){if(_0x75bca0){return _0x51284a['sendStatus'](_0x280b78);}return _0x51284a[_0xcbfc('0x28')](_0x280b78)[_0xcbfc('0x29')]();};}function respondWithResult(_0x4ab48e,_0x1b2c01){_0x1b2c01=_0x1b2c01||0xc8;return function(_0x3c3afd){if(_0x3c3afd){return _0x4ab48e[_0xcbfc('0x28')](_0x1b2c01)[_0xcbfc('0x2a')](_0x3c3afd);}};}function respondWithFilteredResult(_0x4e2576,_0x29f896){return function(_0x1ec530){if(_0x1ec530){var _0x4f632a=_0x1ec530[_0xcbfc('0x2b')],_0x1f6a14=_0x29f896[_0xcbfc('0x2c')],_0x26463f=_0x29f896[_0xcbfc('0x2c')]+_0x29f896[_0xcbfc('0x2d')],_0x7cbdfa;if(_0x26463f>=_0x4f632a){_0x26463f=_0x4f632a;_0x7cbdfa=0xc8;}else{_0x7cbdfa=0xce;}_0x4e2576['status'](_0x7cbdfa);return _0x4e2576[_0xcbfc('0x2e')](_0xcbfc('0x2f'),_0x1f6a14+'-'+_0x26463f+'/'+_0x4f632a)[_0xcbfc('0x2a')](_0x1ec530);}return null;};}function patchUpdates(_0x20a378){return function(_0x500a0b){try{jsonpatch[_0xcbfc('0x30')](_0x500a0b,_0x20a378,!![]);}catch(_0x2bfc9a){return BPromise[_0xcbfc('0x31')](_0x2bfc9a);}return _0x500a0b[_0xcbfc('0x32')]();};}function saveUpdates(_0x335f68,_0x34baa6){return function(_0x7f7dda){if(_0x7f7dda){return _0x7f7dda['update'](_0x335f68)[_0xcbfc('0x1c')](function(_0x26172f){return _0x26172f;});}return null;};}function removeEntity(_0x55542a,_0x25accd){return function(_0x442cab){if(_0x442cab){return _0x442cab[_0xcbfc('0x33')]()['then'](function(){var _0x4f4939=_0x442cab['get']({'plain':!![]});var _0x3c6d04=_0xcbfc('0x34');return db[_0xcbfc('0x35')][_0xcbfc('0x33')]({'where':{'type':_0x3c6d04,'resourceId':_0x4f4939['id']}})[_0xcbfc('0x1c')](function(){return _0x442cab;});})[_0xcbfc('0x1c')](function(){_0x55542a[_0xcbfc('0x28')](0xcc)[_0xcbfc('0x29')]();});}};}function handleEntityNotFound(_0x49ad63,_0x2f14ff){return function(_0x1f391b){if(!_0x1f391b){_0x49ad63['sendStatus'](0x194);}return _0x1f391b;};}function handleError(_0x3093b5,_0x4fa746){_0x4fa746=_0x4fa746||0x1f4;return function(_0xe59188){logger[_0xcbfc('0x21')](_0xe59188[_0xcbfc('0x36')]);if(_0xe59188['name']){delete _0xe59188[_0xcbfc('0x37')];}_0x3093b5['status'](_0x4fa746)['send'](_0xe59188);};}exports[_0xcbfc('0x38')]=function(_0x218772,_0x382d8b){var _0x20fc31={},_0x3f25a4={},_0x2e3648={'count':0x0,'rows':[]};var _0x2951f5=_[_0xcbfc('0x39')](db['Trunk'][_0xcbfc('0x3a')],function(_0x4aa064){return{'name':_0x4aa064[_0xcbfc('0x3b')],'type':_0x4aa064[_0xcbfc('0x3c')][_0xcbfc('0x3d')]};});_0x3f25a4[_0xcbfc('0x3e')]=_['map'](_0x2951f5,'name');_0x3f25a4[_0xcbfc('0x3f')]=_[_0xcbfc('0x40')](_0x218772[_0xcbfc('0x3f')]);_0x3f25a4[_0xcbfc('0x41')]=_[_0xcbfc('0x42')](_0x3f25a4['model'],_0x3f25a4[_0xcbfc('0x3f')]);_0x20fc31[_0xcbfc('0x43')]=_[_0xcbfc('0x42')](_0x3f25a4['model'],qs[_0xcbfc('0x44')](_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x44')]));_0x20fc31['attributes']=_0x20fc31[_0xcbfc('0x43')][_0xcbfc('0x45')]?_0x20fc31[_0xcbfc('0x43')]:_0x3f25a4[_0xcbfc('0x3e')];if(!_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x46')](_0xcbfc('0x47'))){_0x20fc31['limit']=qs[_0xcbfc('0x2d')](_0x218772[_0xcbfc('0x3f')]['limit']);_0x20fc31[_0xcbfc('0x2c')]=qs[_0xcbfc('0x2c')](_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x2c')]);}_0x20fc31[_0xcbfc('0x48')]=qs[_0xcbfc('0x49')](_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x49')]);_0x20fc31['where']=qs[_0xcbfc('0x41')](_[_0xcbfc('0x4a')](_0x218772[_0xcbfc('0x3f')],_0x3f25a4[_0xcbfc('0x41')]),_0x2951f5);if(_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x4b')]){_0x20fc31[_0xcbfc('0x4c')]=_['merge'](_0x20fc31[_0xcbfc('0x4c')],{'$or':_[_0xcbfc('0x39')](_0x2951f5,function(_0x5294f3){if(_0x5294f3[_0xcbfc('0x3c')]!==_0xcbfc('0x4d')){var _0x3a118f={};_0x3a118f[_0x5294f3['name']]={'$like':'%'+_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x4b')]+'%'};return _0x3a118f;}})});}_0x20fc31=_[_0xcbfc('0x4e')]({},_0x20fc31,_0x218772[_0xcbfc('0x4f')]);var _0x15f1a0={'where':_0x20fc31[_0xcbfc('0x4c')]};return db[_0xcbfc('0x50')]['count'](_0x15f1a0)['then'](function(_0x237f30){_0x2e3648[_0xcbfc('0x2b')]=_0x237f30;if(_0x218772[_0xcbfc('0x3f')][_0xcbfc('0x51')]){_0x20fc31['include']=[{'all':!![]}];}return db['Trunk'][_0xcbfc('0x52')](_0x20fc31);})[_0xcbfc('0x1c')](function(_0x12340f){_0x2e3648['rows']=_0x12340f;return _0x2e3648;})[_0xcbfc('0x1c')](respondWithFilteredResult(_0x382d8b,_0x20fc31))[_0xcbfc('0x27')](handleError(_0x382d8b,null));};exports[_0xcbfc('0x53')]=function(_0x4b3096,_0x287c24){var _0x42ead6={'raw':![],'where':{'id':_0x4b3096[_0xcbfc('0x54')]['id']}},_0x114a8a={};_0x114a8a[_0xcbfc('0x3e')]=_[_0xcbfc('0x40')](db[_0xcbfc('0x50')][_0xcbfc('0x3a')]);_0x114a8a[_0xcbfc('0x3f')]=_[_0xcbfc('0x40')](_0x4b3096['query']);_0x114a8a[_0xcbfc('0x41')]=_[_0xcbfc('0x42')](_0x114a8a[_0xcbfc('0x3e')],_0x114a8a['query']);_0x42ead6[_0xcbfc('0x43')]=_[_0xcbfc('0x42')](_0x114a8a['model'],qs[_0xcbfc('0x44')](_0x4b3096[_0xcbfc('0x3f')][_0xcbfc('0x44')]));_0x42ead6[_0xcbfc('0x43')]=_0x42ead6['attributes'][_0xcbfc('0x45')]?_0x42ead6[_0xcbfc('0x43')]:_0x114a8a['model'];if(_0x4b3096[_0xcbfc('0x3f')][_0xcbfc('0x51')]){_0x42ead6[_0xcbfc('0x55')]=[{'all':!![]}];}_0x42ead6=_[_0xcbfc('0x4e')]({},_0x42ead6,_0x4b3096[_0xcbfc('0x4f')]);return db[_0xcbfc('0x50')][_0xcbfc('0x56')](_0x42ead6)[_0xcbfc('0x1c')](handleEntityNotFound(_0x287c24,null))[_0xcbfc('0x1c')](respondWithResult(_0x287c24,null))[_0xcbfc('0x27')](handleError(_0x287c24,null));};exports['clone']=function(_0x403328,_0x4e5d41){var _0x5a9f6f={'where':{'id':_0x403328[_0xcbfc('0x54')]['id']}},_0x4a10e6={};_0x4a10e6[_0xcbfc('0x3e')]=_[_0xcbfc('0x40')](db[_0xcbfc('0x50')][_0xcbfc('0x3a')]);_0x5a9f6f[_0xcbfc('0x43')]=_[_0xcbfc('0x42')](_0x4a10e6[_0xcbfc('0x3e')],qs['fields'](_0x403328[_0xcbfc('0x3f')][_0xcbfc('0x44')]));_0x5a9f6f[_0xcbfc('0x43')]=_0x5a9f6f['attributes'][_0xcbfc('0x45')]?_0x5a9f6f[_0xcbfc('0x43')]:_0x4a10e6[_0xcbfc('0x3e')];if(_0x403328[_0xcbfc('0x3f')][_0xcbfc('0x51')]){_0x5a9f6f[_0xcbfc('0x55')]=[{'all':!![]}];}_0x5a9f6f=_[_0xcbfc('0x4e')]({},_0x5a9f6f,_0x403328['options']);return db[_0xcbfc('0x50')]['find'](_0x5a9f6f)[_0xcbfc('0x1c')](handleEntityNotFound(_0x4e5d41,null))[_0xcbfc('0x1c')](function(_0x5de047){if(_0x5de047){var _0x2c6b23=_0x5de047['get']({'plain':!![]});_0x2c6b23=qs[_0xcbfc('0x57')](_0x2c6b23,['id',_0xcbfc('0x58'),_0xcbfc('0x59')]);_0x403328[_0xcbfc('0x5a')]=_[_0xcbfc('0x57')](_0x403328[_0xcbfc('0x5a')],['id','createdAt',_0xcbfc('0x59')]);return db[_0xcbfc('0x50')]['create'](_[_0xcbfc('0x4e')](_0x2c6b23,_0x403328[_0xcbfc('0x5a')]),{'include':_0x403328[_0xcbfc('0x3f')][_0xcbfc('0x51')]?[{'all':!![]}]:undefined})[_0xcbfc('0x1c')](function(_0x3af38b){var _0x2bf39a=_0x403328[_0xcbfc('0x5b')]['get']({'plain':!![]});if(!_0x2bf39a)throw new Error(_0xcbfc('0x5c'));if(_0x2bf39a[_0xcbfc('0x5d')]===_0xcbfc('0x5b')){var _0x170717=_0x3af38b[_0xcbfc('0x5e')]({'plain':!![]});var _0x2fb0c2=_0xcbfc('0x34');return db[_0xcbfc('0x5f')][_0xcbfc('0x56')]({'where':{'name':_0x2fb0c2,'userProfileId':_0x2bf39a[_0xcbfc('0x60')]},'raw':!![]})['then'](function(_0x185303){if(_0x185303&&_0x185303[_0xcbfc('0x61')]===0x0){return db['UserProfileResource'][_0xcbfc('0x62')]({'name':_0x170717['name'],'resourceId':_0x170717['id'],'type':_0x185303['name'],'sectionId':_0x185303['id']},{})[_0xcbfc('0x1c')](function(){return _0x3af38b;});}else{return _0x3af38b;}})[_0xcbfc('0x27')](function(_0x524890){logger[_0xcbfc('0x21')](_0xcbfc('0x63'),_0x524890);throw _0x524890;});}return _0x3af38b;});}})['then'](respondWithResult(_0x4e5d41,0xc9))['catch'](handleError(_0x4e5d41,null));};exports[_0xcbfc('0x62')]=function(_0x2f5d8a,_0x2a3fcb,_0x26cb3a){var _0x17e42f;return db['Trunk'][_0xcbfc('0x62')](_0x2f5d8a[_0xcbfc('0x5a')],{'raw':!![]})[_0xcbfc('0x1c')](function(_0x4a62fc){_0x17e42f=_0x4a62fc;return db['Trunk']['findAll']({'raw':!![]});})[_0xcbfc('0x1c')](function(_0x47f928){var _0x5de4bc=fs[_0xcbfc('0x64')](path['join'](config[_0xcbfc('0x65')],_0xcbfc('0x66')),_0xcbfc('0x67'));var _0x461e5b=fs[_0xcbfc('0x64')](path[_0xcbfc('0x68')](config[_0xcbfc('0x65')],_0xcbfc('0x69')),_0xcbfc('0x67'));var _0x538954=ejs[_0xcbfc('0x6a')](_0x5de4bc,{'trunks':_0x47f928||[]});fs[_0xcbfc('0x6b')](_0xcbfc('0x6c'),_0x538954);if(_0x17e42f['registry']){var _0x34aa32=ejs[_0xcbfc('0x6a')](_0x461e5b,{'trunks':_0x47f928||[]});fs[_0xcbfc('0x6b')](_0xcbfc('0x6d'),_0x34aa32);}})[_0xcbfc('0x1c')](function(){return respondWithRpcPromise(_0xcbfc('0x6e'),_0xcbfc('0x62'),{'module':'chan_sip.so'});})[_0xcbfc('0x1c')](function(){var _0x49a451=_0x2f5d8a[_0xcbfc('0x5b')][_0xcbfc('0x5e')]({'plain':!![]});if(!_0x49a451)throw new Error(_0xcbfc('0x5c'));if(_0x49a451['role']===_0xcbfc('0x5b')){var _0x47e090=_0x17e42f[_0xcbfc('0x5e')]({'plain':!![]});return db[_0xcbfc('0x5f')][_0xcbfc('0x56')]({'where':{'name':_0xcbfc('0x34'),'userProfileId':_0x49a451[_0xcbfc('0x60')]},'raw':!![]})[_0xcbfc('0x1c')](function(_0x1bdfa0){if(_0x1bdfa0&&_0x1bdfa0['autoAssociation']===0x0){return db[_0xcbfc('0x35')][_0xcbfc('0x62')]({'name':_0x47e090[_0xcbfc('0x37')],'resourceId':_0x47e090['id'],'type':_0x1bdfa0['name'],'sectionId':_0x1bdfa0['id']},{})[_0xcbfc('0x1c')](function(){return _0x17e42f;});}else{return _0x17e42f;}})['catch'](function(_0x189a3a){logger[_0xcbfc('0x21')](_0xcbfc('0x63'),_0x189a3a);throw _0x189a3a;});}return _0x17e42f;})['then'](respondWithResult(_0x2a3fcb,0xc9))[_0xcbfc('0x27')](handleError(_0x2a3fcb,null));};exports[_0xcbfc('0x6f')]=function(_0x5d2634,_0xb3378d,_0x58be73){var _0x171c4a;return db['Trunk'][_0xcbfc('0x56')]({'where':{'id':_0x5d2634[_0xcbfc('0x54')]['id']}})['then'](handleEntityNotFound(_0xb3378d,null))[_0xcbfc('0x1c')](saveUpdates(_0x5d2634['body'],null))[_0xcbfc('0x1c')](function(_0x2f2f6a){if(_0x2f2f6a){_0x171c4a=_0x2f2f6a;return db[_0xcbfc('0x50')][_0xcbfc('0x52')]({'raw':!![]});}})['then'](function(_0x353302){if(_0x353302){var _0x4c1e0a=fs[_0xcbfc('0x64')](path[_0xcbfc('0x68')](config[_0xcbfc('0x65')],_0xcbfc('0x66')),_0xcbfc('0x67'));var _0x34d1c6=fs[_0xcbfc('0x64')](path[_0xcbfc('0x68')](config[_0xcbfc('0x65')],_0xcbfc('0x69')),_0xcbfc('0x67'));var _0x297513=ejs[_0xcbfc('0x6a')](_0x4c1e0a,{'trunks':_0x353302||[]});fs[_0xcbfc('0x6b')](_0xcbfc('0x6c'),_0x297513);var _0x2c90fe=ejs[_0xcbfc('0x6a')](_0x34d1c6,{'trunks':_0x353302||[]});fs['writeFileSync'](_0xcbfc('0x6d'),_0x2c90fe);return respondWithRpcPromise('Reload',_0xcbfc('0x6f'),{'module':'chan_sip.so'});}return null;})[_0xcbfc('0x1c')](function(_0x33cec4){if(_0x33cec4){return _0x171c4a;}})[_0xcbfc('0x1c')](respondWithResult(_0xb3378d,null))[_0xcbfc('0x27')](handleError(_0xb3378d,null));};exports[_0xcbfc('0x33')]=function(_0x36eab3,_0x1b05a3,_0x4f38cb){var _0x1b4b4e;return db['Trunk'][_0xcbfc('0x56')]({'where':{'id':_0x36eab3[_0xcbfc('0x54')]['id']}})['then'](handleEntityNotFound(_0x1b05a3,null))['then'](removeEntity(_0x1b05a3,null))['then'](function(){return db[_0xcbfc('0x50')][_0xcbfc('0x52')]({'raw':!![]});})[_0xcbfc('0x1c')](function(_0x511463){var _0x4f298c=fs[_0xcbfc('0x64')](path[_0xcbfc('0x68')](config[_0xcbfc('0x65')],_0xcbfc('0x66')),_0xcbfc('0x67'));var _0x52fdc5=fs['readFileSync'](path['join'](config[_0xcbfc('0x65')],_0xcbfc('0x69')),_0xcbfc('0x67'));var _0x302358=ejs['render'](_0x4f298c,{'trunks':_0x511463});var _0x5da08b=ejs[_0xcbfc('0x6a')](_0x52fdc5,{'trunks':_0x511463});fs[_0xcbfc('0x6b')](_0xcbfc('0x6c'),_0x302358);fs[_0xcbfc('0x6b')](_0xcbfc('0x6d'),_0x5da08b);return respondWithRpcPromise('Reload','destroy',{'module':_0xcbfc('0x70')});})[_0xcbfc('0x27')](handleError(_0x1b05a3,null));};