ad807a02af7a8272fd8993f885952a59b60cdf2c
[motion2.git] / server / services / agi / vertices.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 _0x6739=['Trying\x20DialogflowV2:\x20%s','providerResponse','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','Enter\x20in\x20FINALLY\x20(%s)\x20block','getdigits','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','file_id','getData','test','mindigit','maxdigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','aws\x20Polly\x20%s\x20file\x20created','aws\x20Polly\x20is\x20unreachable','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','no\x20key\x20configured','wav','NOBEEP','recordFile','intKey','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','beep','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','priority','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','%s/recordings/%s','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','Enter\x20in\x20LOGOUT\x20(%s)\x20block','agentLogout','failure','math','Enter\x20in\x20MATH\x20(%s)\x20block','operation','math\x20%s','%s[%s]','variable\x20%s[key]\x20set','menu','Enter\x20in\x20MENU\x20(%s)\x20block','response','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause_id','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','no\x20file\x20audio\x20found','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','indexOf','QUEUE','macro','gosub','position','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','email','user','bcc','template_id','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','smtpOptions','Mail\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Answer','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','no\x20subproject\x20found\x20with\x20id\x20%d','AGI','host','127.0.0.1','arg_1','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','util','lodash','shelljs','odbc','randomstring','moment','../../config/logger','../../config/environment','/var/opt/motion2/server/files','rawHeaders','rawBody','getsecretdigits','channel','rpc','mailRpc','getVariable','then','name','catch','prototype','getVoiceQueue','getVoiceQueueById','getSquareProject','getSquareOdbc','getUser','getUserById','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','getMailAccount','sendMailMessage','getIntervals','getIntervalById','interval','format','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','query','info','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','agicommand','callerid','context','extension','accountcode','createSquareMessage','isEmpty','callback_','random','lastName','phone','list_id','callback','scheduledAt','toString','callback_priority','getPause','agent','agentPause','isNil','agentUnpause','agentLogin','internal','%s/%s@from-sip/n','LOCAL','shellCommand','exec','trim','replace','googleCloudTTS','apiKey','text','languageCode','ssmlGender','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','url','method','timeout','number','includes','POST','PUT','body','parse','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','render','headers','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','private_key','sestekNDA','ispeechTTS','ispeech_tts_language','en-US','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','awsLex','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','appsecret','uri','clone','hasOwnProperty','isString','replaceAllVariables','recursiveNodeIndex','isPlainObject','isArray','length','saveRestApiResult','%s.%s','setVariable','replaceObjectAllVariables','split','replaceAll','extra','getAndSetVariable','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','sync','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','MRCPSynth','result','Executed\x20command\x20MRCPSynth\x20%s','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','grammar','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','agi','command','args','answer','Wait\x20%s\x20seconds\x20before\x20answer','wait','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','add','delay','minutes','createCmContact','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','MRCPRecog','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','odbc_id','no\x20odbc\x20database\x20found','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','keys','%s_ROWS_COUNT','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','SIP/%s','opts','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','speech','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','no\x20project_id\x20configured','client_email','no\x20client_email\x20configured','no\x20private_key\x20configured','dialogflowV2_language','no\x20anguage\x20configured'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6739,0xd3));var _0x9673=function(_0x186b51,_0x37be0b){_0x186b51=_0x186b51-0x0;var _0x191f10=_0x6739[_0x186b51];return _0x191f10;};'use strict';var fs=require('fs');var util=require(_0x9673('0x0'));var _=require(_0x9673('0x1'));var sh=require(_0x9673('0x2'));var odbc=require(_0x9673('0x3'))();var rs=require(_0x9673('0x4'));var moment=require(_0x9673('0x5'));var Mustache=require('mustache');var rp=require('request-promise');var logger=require(_0x9673('0x6'))('agi');var config=require(_0x9673('0x7'));var shared=require('../../config/environment/shared');var scripts=require('./scripts');var FILES_PATH=_0x9673('0x8');var recursiveMapAttributes=[_0x9673('0x9'),_0x9673('0xa')];var verticesWithRetry=['menu','getdigits',_0x9673('0xb')];var AGIVertices=function(_0x21e4b4,_0x2c4d48,_0x509966){this[_0x9673('0xc')]=_0x21e4b4;this[_0x9673('0xd')]=_0x2c4d48;this[_0x9673('0xe')]=_0x509966;};AGIVertices['prototype'][_0x9673('0xf')]=function(_0x2bae3b,_0x2c00cd){this[_0x9673('0xd')]['getVariableById'](_0x2bae3b)[_0x9673('0x10')](function(_0x3cf3d1){_0x2c00cd(null,_0x3cf3d1?_0x3cf3d1[_0x9673('0x11')]:![]);})[_0x9673('0x12')](function(_0x565201){_0x2c00cd(_0x565201);});};AGIVertices[_0x9673('0x13')][_0x9673('0x14')]=function(_0x5d9a57,_0xcf8543){this[_0x9673('0xd')][_0x9673('0x15')](_0x5d9a57)['then'](function(_0x34cb76){_0xcf8543(null,_0x34cb76?_0x34cb76['name']:![]);})[_0x9673('0x12')](function(_0x4a846a){_0xcf8543(_0x4a846a);});};AGIVertices['prototype'][_0x9673('0x16')]=function(_0x5484ea,_0x3d5642){this[_0x9673('0xd')]['getSquareProjectById'](_0x5484ea)[_0x9673('0x10')](function(_0x46d721){_0x3d5642(null,_0x46d721?_0x46d721[_0x9673('0x11')]:![]);})[_0x9673('0x12')](function(_0x431564){_0x3d5642(_0x431564);});};AGIVertices[_0x9673('0x13')][_0x9673('0x17')]=function(_0x16a77c,_0x43a196){this[_0x9673('0xd')]['getSquareOdbcById'](_0x16a77c)[_0x9673('0x10')](function(_0xbfc9d6){_0x43a196(null,_0xbfc9d6?_0xbfc9d6['dsn']:![]);})[_0x9673('0x12')](function(_0x4fe72c){_0x43a196(_0x4fe72c);});};AGIVertices['prototype'][_0x9673('0x18')]=function(_0xa8bc6d,_0x3c1e8f){this['rpc'][_0x9673('0x19')](_0xa8bc6d)[_0x9673('0x10')](function(_0x30df62){_0x3c1e8f(null,_0x30df62?_0x30df62[_0x9673('0x11')]:![]);})['catch'](function(_0x282b8d){_0x3c1e8f(_0x282b8d);});};AGIVertices['prototype'][_0x9673('0x1a')]=function(_0x404213,_0x2b99a5){this[_0x9673('0xd')][_0x9673('0x1b')](_0x404213)[_0x9673('0x10')](function(_0x1733cf){_0x2b99a5(null,_0x1733cf?_0x1733cf[_0x9673('0x11')]:![]);})[_0x9673('0x12')](function(_0x4f7473){_0x2b99a5(_0x4f7473);});};AGIVertices[_0x9673('0x13')][_0x9673('0x1c')]=function(_0x4d8cca,_0x4c3dde){var _0x2de799=this;this[_0x9673('0xd')][_0x9673('0x1d')](_0x4d8cca)[_0x9673('0x10')](function(_0x52513e){_0x4c3dde(null,_0x52513e?_0x2de799[_0x9673('0x1e')](_0x52513e['save_name']):![]);})[_0x9673('0x12')](function(_0x5bf713){_0x4c3dde(_0x5bf713);});};AGIVertices[_0x9673('0x13')][_0x9673('0x1f')]=function(_0x3838c5,_0x588154){this[_0x9673('0xd')]['getMailAccountById'](_0x3838c5)[_0x9673('0x10')](function(_0x2d3880){_0x588154(null,_0x2d3880?_0x2d3880:![]);})['catch'](function(_0x4e6af2){_0x588154(_0x4e6af2);});};AGIVertices[_0x9673('0x13')][_0x9673('0x20')]=function(_0x12f8a7,_0x28d3c0,_0x332966){this[_0x9673('0xe')][_0x9673('0x20')](_0x12f8a7,_0x28d3c0)['then'](function(){_0x332966(null);})[_0x9673('0x12')](function(_0x208448){_0x332966(_0x208448);});};AGIVertices[_0x9673('0x13')][_0x9673('0x21')]=function(_0xdf7a84,_0x11c2ab){this[_0x9673('0xd')][_0x9673('0x22')](_0xdf7a84)[_0x9673('0x10')](function(_0x449a59){if(_0x449a59){if(_0x449a59['IntervalId']){_0x11c2ab(null,[_0x449a59[_0x9673('0x23')]]);}else{_0x11c2ab(null,_['map'](_0x449a59['Intervals'],_0x9673('0x23')));}}else{_0x11c2ab(null,![]);}})[_0x9673('0x12')](function(_0x9bcbef){_0x11c2ab(_0x9bcbef);});};AGIVertices[_0x9673('0x13')]['getSoundPath']=function(_0x2f960d){return util[_0x9673('0x24')](_0x9673('0x25'),FILES_PATH,_0x2f960d);};AGIVertices[_0x9673('0x13')][_0x9673('0x26')]=function(_0x36cf45,_0x3edae9,_0x39e640){odbc[_0x9673('0x27')](_0x36cf45,function(_0x5d5e3c){if(_0x5d5e3c){logger[_0x9673('0x28')](_0x9673('0x29'),_0x5d5e3c);_0x39e640(_0x5d5e3c);}else{logger['info']('ODBC\x20connection\x20successfully');odbc[_0x9673('0x2a')](_0x3edae9,function(_0x53bee0,_0x32b4e7){if(_0x53bee0){logger[_0x9673('0x2b')]('Error\x20executing\x20query\x20%s',_0x3edae9);_0x39e640(_0x53bee0);}else{logger['info'](_0x9673('0x2c'),_0x3edae9);odbc[_0x9673('0x2d')](function(_0x1d5ff2){if(_0x1d5ff2){logger[_0x9673('0x28')](_0x9673('0x2e'),_0x1d5ff2);}_0x39e640(null,_0x32b4e7);});}});}});};AGIVertices[_0x9673('0x13')][_0x9673('0x2f')]=function(_0x393f83,_0x168169){this['rpc'][_0x9673('0x30')](_0x393f83)[_0x9673('0x10')](function(_0x1c1087){_0x168169(null,_0x1c1087?_0x1c1087:![]);})[_0x9673('0x12')](function(_0x2168b9){_0x168169(_0x2168b9);});};AGIVertices[_0x9673('0x13')][_0x9673('0x31')]=function(_0x5f3385,_0x219580){this[_0x9673('0xd')][_0x9673('0x31')](_0x5f3385)[_0x9673('0x10')](function(_0xef619a){_0x219580(null,_0xef619a);})['catch'](function(_0x2b4066){_0x219580(_0x2b4066);});};AGIVertices['prototype'][_0x9673('0x32')]=function(_0x5a63e3,_0x3278aa,_0x4026e9){this[_0x9673('0xd')][_0x9673('0x32')]({'uniqueid':this[_0x9673('0xc')][_0x9673('0x33')],'node':_0x5a63e3[_0x9673('0x34')],'application':_0x5a63e3[_0x9673('0x35')],'data':_0x3278aa||null,'project_name':this['channel']['arg_1'],'callerid':this['channel']['callerid']})[_0x9673('0x10')](function(_0x4739dd){if(_0x4026e9){_0x4026e9(null,_0x4739dd);}})[_0x9673('0x12')](function(_0x38264d){if(_0x4026e9){_0x4026e9(_0x38264d);}});};AGIVertices[_0x9673('0x13')]['createSquareRecording']=function(_0x14feb6,_0x2a1466,_0x48b1d8,_0x1077ad){this['rpc']['createSquareRecording']({'uniqueid':this[_0x9673('0xc')][_0x9673('0x33')],'callerid':this[_0x9673('0xc')][_0x9673('0x36')],'calleridname':this['channel']['calleridname'],'context':this[_0x9673('0xc')][_0x9673('0x37')],'extension':this[_0x9673('0xc')][_0x9673('0x38')],'priority':this[_0x9673('0xc')]['priority'],'accountcode':this[_0x9673('0xc')][_0x9673('0x39')],'dnid':this[_0x9673('0xc')]['dnid'],'projectName':this['channel']['arg_1'],'saveName':_0x2a1466,'filename':_0x14feb6['file']||_0x2a1466,'savePath':_0x48b1d8})[_0x9673('0x10')](function(_0x36bf41){_0x1077ad(null,_0x36bf41);})[_0x9673('0x12')](function(_0x59f14a){_0x1077ad(_0x59f14a);});};AGIVertices[_0x9673('0x13')][_0x9673('0x3a')]=function(_0x3bea34,_0x48cc16,_0x482732,_0x457e1f,_0x4343a5){this[_0x9673('0xd')]['createSquareMessage']({'uniqueid':this[_0x9673('0xc')][_0x9673('0x33')],'body':_0x3bea34,'direction':_0x48cc16,'providerName':_0x482732,'providerResponse':_0x457e1f})[_0x9673('0x10')](function(_0x1b98da){if(_0x4343a5){_0x4343a5(null,_0x1b98da);}})['catch'](function(_0x480462){if(_0x4343a5){_0x4343a5(_0x480462);}});};AGIVertices[_0x9673('0x13')]['createCmContact']=function(_0x3c561b,_0x3a62fe){this[_0x9673('0xd')]['createCmContact']({'firstName':_[_0x9673('0x3b')](_0x3c561b['name'])||_['isNil'](_0x3c561b[_0x9673('0x11')])?_0x9673('0x3c')+Math[_0x9673('0x3d')]():_0x3c561b[_0x9673('0x11')],'lastName':_['isEmpty'](_0x3c561b[_0x9673('0x3e')])||_['isNil'](_0x3c561b[_0x9673('0x3e')])?null:_0x3c561b[_0x9673('0x3e')],'phone':_0x3c561b[_0x9673('0x3f')],'ListId':_0x3c561b[_0x9673('0x40')],'scheduledat':_0x3c561b['scheduledAt'],'callbackUniqueid':this[_0x9673('0xc')][_0x9673('0x33')],'tags':_0x9673('0x41'),'description':'Callback\x20scheduled\x20at\x20'+_0x3c561b[_0x9673('0x42')][_0x9673('0x43')](),'priority':_0x3c561b[_0x9673('0x44')]})[_0x9673('0x10')](function(_0x38cdf8){_0x3a62fe(null,_0x38cdf8);})[_0x9673('0x12')](function(_0x20d90d){_0x3a62fe(_0x20d90d);});};AGIVertices[_0x9673('0x13')][_0x9673('0x45')]=function(_0x18471d,_0x91c931){this[_0x9673('0xd')]['getPauseById'](_0x18471d)[_0x9673('0x10')](function(_0x268baf){_0x91c931(null,_0x268baf?_0x268baf[_0x9673('0x11')]:![]);})[_0x9673('0x12')](function(_0x408a76){_0x91c931(_0x408a76);});};AGIVertices['prototype']['agentPause']=function(_0x4b99d3,_0xd5967e,_0x59ac79){var _0x39d9a0={'role':_0x9673('0x46')};_0x39d9a0[_0x4b99d3]=this[_0x9673('0xc')][_0x9673('0x36')];this[_0x9673('0xd')][_0x9673('0x47')](_0x39d9a0,_0xd5967e,this[_0x9673('0xc')][_0x9673('0x33')])[_0x9673('0x10')](function(_0x302ca1){_0x59ac79(null,_[_0x9673('0x48')](_0x302ca1)?![]:!![]);})[_0x9673('0x12')](function(_0x267470){logger[_0x9673('0x28')](_0x267470);_0x59ac79(null,![]);});};AGIVertices[_0x9673('0x13')][_0x9673('0x49')]=function(_0x587251,_0x483139){var _0x3cc025={'role':'agent'};_0x3cc025[_0x587251]=this[_0x9673('0xc')][_0x9673('0x36')];this[_0x9673('0xd')]['agentUnpause'](_0x3cc025)['then'](function(_0x38cc40){_0x483139(null,_[_0x9673('0x48')](_0x38cc40)?![]:!![]);})[_0x9673('0x12')](function(_0x1929a1){logger[_0x9673('0x28')](_0x1929a1);_0x483139(null,![]);});};AGIVertices[_0x9673('0x13')]['agentLogout']=function(_0x436ead,_0x34b104){var _0xb2f6c2={'role':_0x9673('0x46')};_0xb2f6c2[_0x436ead]=this[_0x9673('0xc')]['callerid'];this[_0x9673('0xd')]['agentLogout'](_0xb2f6c2)[_0x9673('0x10')](function(_0x4601f7){_0x34b104(null,_['isNil'](_0x4601f7)?![]:!![]);})[_0x9673('0x12')](function(_0x539a35){logger[_0x9673('0x28')](_0x539a35);_0x34b104(null,![]);});};AGIVertices[_0x9673('0x13')][_0x9673('0x4a')]=function(_0xd14e74,_0x53d876){var _0xa22c11={'role':'agent'};_0xa22c11[_0xd14e74]=this[_0x9673('0xc')]['callerid'];var _0x6dc687=_0xd14e74!=_0x9673('0x4b')?util[_0x9673('0x24')](_0x9673('0x4c'),_0x9673('0x4d'),this['channel'][_0x9673('0x36')]):undefined;this[_0x9673('0xd')]['agentLogin'](_0xa22c11,_0x6dc687)[_0x9673('0x10')](function(_0x35aa0b){_0x53d876(null,_[_0x9673('0x48')](_0x35aa0b)?![]:!![]);})[_0x9673('0x12')](function(_0x1cd1fb){logger[_0x9673('0x28')](_0x1cd1fb);_0x53d876(null,![]);});};AGIVertices[_0x9673('0x13')][_0x9673('0x4e')]=function(_0x51c25a,_0x41135f){sh[_0x9673('0x4f')](_[_0x9673('0x50')](_0x51c25a),function(_0x7a9c52,_0x3aa063){var _0x3b80d9=_0x3aa063[_0x9673('0x51')](/(\r\n|\n|\r)/gm,'');_0x41135f(null,_0x3b80d9);});};AGIVertices[_0x9673('0x13')]['googleCloudTTS']=function(_0x3745f4,_0x505062){scripts[_0x9673('0x52')](_0x3745f4[_0x9673('0x53')],_0x3745f4['google_cloud_tts_text_type']||_0x9673('0x54'),_0x3745f4[_0x9673('0x54')],_0x3745f4[_0x9673('0x55')]||'en-US',_0x3745f4[_0x9673('0x56')]||'MALE',_0x3745f4[_0x9673('0x57')]||_0x9673('0x58'))[_0x9673('0x10')](function(_0x35946a){_0x505062(null,_0x35946a);})[_0x9673('0x12')](function(_0x437266){_0x505062(_0x437266);});};AGIVertices[_0x9673('0x13')][_0x9673('0x59')]=function(_0x40530d,_0xc6f4cd){scripts[_0x9673('0x59')](_0x40530d['text'],_0x40530d[_0x9673('0x5a')]||'en',0x1)[_0x9673('0x10')](function(_0xbccee){_0xc6f4cd(null,_0xbccee);})[_0x9673('0x12')](function(_0x486727){_0xc6f4cd(_0x486727);});};AGIVertices['prototype'][_0x9673('0x5b')]=function(_0x254f54,_0x286144){var _0xebe383={'uri':_0x254f54[_0x9673('0x5c')],'method':_0x254f54[_0x9673('0x5d')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x254f54[_0x9673('0x5e')])===_0x9673('0x5f')&&parseInt(_0x254f54[_0x9673('0x5e')])>=0x1?parseInt(_0x254f54[_0x9673('0x5e')])*0x3e8:0x5*0x3e8};if(_[_0x9673('0x60')]([_0x9673('0x61'),_0x9673('0x62')],_0xebe383[_0x9673('0x5d')]['toUpperCase']())){try{_0xebe383[_0x9673('0x63')]=_0x254f54[_0x9673('0xa')]?JSON['parse'](_0x254f54[_0x9673('0xa')]):{};}catch(_0x36ee15){logger[_0x9673('0x28')]('An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function',_0x36ee15);}}try{_0xebe383['headers']=_0x254f54[_0x9673('0x9')]?JSON[_0x9673('0x64')](_0x254f54[_0x9673('0x9')]):{};}catch(_0x186d7f){logger[_0x9673('0x28')](_0x9673('0x65'),_0x186d7f);}if(_0x254f54[_0x9673('0x66')]){try{var _0x4adb7a=require(_0x254f54[_0x9673('0x66')])['sync'](this,_0xebe383);_0xebe383['uri']=Mustache[_0x9673('0x67')](_0x254f54[_0x9673('0x5c')],_0x4adb7a,{},['$$','$$']);if(_0xebe383[_0x9673('0x68')]){_0xebe383['headers']=JSON[_0x9673('0x64')](Mustache[_0x9673('0x67')](JSON['stringify'](_0xebe383[_0x9673('0x68')]),_0x4adb7a,{},['$$','$$']));}if(_0xebe383[_0x9673('0x63')]){_0xebe383[_0x9673('0x63')]=JSON[_0x9673('0x64')](Mustache[_0x9673('0x67')](JSON[_0x9673('0x69')](_0xebe383[_0x9673('0x63')]),_0x4adb7a,{},['$$','$$']));}}catch(_0x244aeb){logger[_0x9673('0x28')](_0x9673('0x6a'),_0x244aeb);}}rp(_0xebe383)[_0x9673('0x10')](function(_0x1ee565){var _0x2b9be6={'statusCode':_0x1ee565[_0x9673('0x6b')]||0xc8,'statusMessage':_0x1ee565[_0x9673('0x6c')]||'OK','headers':_0x1ee565[_0x9673('0x68')]||{},'body':_0x1ee565[_0x9673('0x63')]||{}};_0x286144(null,_0x2b9be6);})[_0x9673('0x12')](function(_0x508cf4){var _0x7a6469={'statusCode':_0x508cf4[_0x9673('0x6b')]||0x1f4,'statusMessage':_0x508cf4[_0x9673('0x6d')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x508cf4[_0x9673('0x6e')][_0x9673('0x68')]||{},'body':_0x508cf4[_0x9673('0x6e')][_0x9673('0x63')]||{}};_0x286144(null,_0x7a6469);});};AGIVertices['prototype'][_0x9673('0x6f')]=function(_0x32baa3,_0x4e258f){scripts[_0x9673('0x6f')](this[_0x9673('0xc')]['uniqueid'],_0x32baa3[_0x9673('0x70')],_0x32baa3[_0x9673('0x54')],_0x32baa3[_0x9673('0x71')]||'en')['then'](function(_0x22a1c0){_0x4e258f(null,_0x22a1c0);})[_0x9673('0x12')](function(_0x483295){_0x4e258f(_0x483295);});};AGIVertices[_0x9673('0x13')][_0x9673('0x72')]=function(_0x1a9f83,_0x1dc63b){scripts[_0x9673('0x72')](this[_0x9673('0xc')][_0x9673('0x33')],_0x1a9f83[_0x9673('0x73')],_0x1a9f83['client_email'],_0x1a9f83[_0x9673('0x74')],_0x1a9f83[_0x9673('0x54')],_0x1a9f83['dialogflowV2_language']||'en')['then'](function(_0x370787){_0x1dc63b(null,_0x370787);})[_0x9673('0x12')](function(_0x377958){_0x1dc63b(_0x377958);});};AGIVertices['prototype'][_0x9673('0x75')]=function(_0x14ac90,_0x5bba98){scripts[_0x9673('0x75')](this[_0x9673('0xc')],_0x14ac90)[_0x9673('0x10')](function(_0x282b84){_0x5bba98(null,_0x282b84);})[_0x9673('0x12')](function(_0x53d2e5){_0x5bba98(_0x53d2e5);});};AGIVertices[_0x9673('0x13')][_0x9673('0x76')]=function(_0x5d92e1,_0x174351){scripts['ispeechTTS'](_0x5d92e1[_0x9673('0x70')],_0x5d92e1[_0x9673('0x54')],_0x5d92e1[_0x9673('0x77')]||_0x9673('0x78'),_0x5d92e1[_0x9673('0x79')])[_0x9673('0x10')](function(_0x4bbdb3){_0x174351(null,_0x4bbdb3);})['catch'](function(_0x3f9d3c){_0x174351(_0x3f9d3c);});};AGIVertices[_0x9673('0x13')][_0x9673('0x7a')]=function(_0x372a3f,_0x204055,_0x1f99d4){scripts[_0x9673('0x7a')](_0x204055,_0x372a3f[_0x9673('0x70')],_0x372a3f[_0x9673('0x7b')]||'en-US',this[_0x9673('0x7c')](_0x372a3f['model'])?_0x372a3f[_0x9673('0x7d')]:undefined)[_0x9673('0x10')](function(_0x223c45){_0x1f99d4(null,_0x223c45);})['catch'](function(_0x15bc6f){_0x1f99d4(_0x15bc6f);});};AGIVertices[_0x9673('0x13')][_0x9673('0x7e')]=function(_0x221a8e,_0x134e71){scripts['awsPolly'](_0x221a8e[_0x9673('0x7f')],_0x221a8e[_0x9673('0x80')],_0x221a8e[_0x9673('0x81')],_0x221a8e[_0x9673('0x82')]||_0x9673('0x83'),_0x221a8e['text'],_0x221a8e['aws_text_type']||'text')[_0x9673('0x10')](function(_0x380638){_0x134e71(null,_0x380638);})['catch'](function(_0x45f00f){_0x134e71(_0x45f00f);});};AGIVertices['prototype']['awsLex']=function(_0x54d4da,_0x14631b){scripts[_0x9673('0x84')](this[_0x9673('0xc')][_0x9673('0x33')],_0x54d4da[_0x9673('0x7f')],_0x54d4da[_0x9673('0x80')],_0x54d4da[_0x9673('0x85')],_0x54d4da['text'],_0x54d4da[_0x9673('0x86')])[_0x9673('0x10')](function(_0x2345b7){_0x14631b(null,_0x2345b7);})[_0x9673('0x12')](function(_0x19bcf8){_0x14631b(_0x19bcf8);});};AGIVertices[_0x9673('0x13')][_0x9673('0x87')]=function(_0x56ee6f,_0x6eb7ae,_0x145dcf){scripts[_0x9673('0x87')](_0x6eb7ae,_0x56ee6f[_0x9673('0x70')],_0x56ee6f[_0x9673('0x88')]||_0x9673('0x78'))[_0x9673('0x10')](function(_0x53e9f7){_0x145dcf(null,_0x53e9f7);})['catch'](function(_0x43b99){_0x145dcf(_0x43b99);});};AGIVertices[_0x9673('0x13')]['tildeASR']=function(_0x174704,_0x434ca1,_0x584e09){scripts[_0x9673('0x89')](_0x434ca1,_0x174704[_0x9673('0x8a')],_0x174704[_0x9673('0x8b')],_0x174704[_0x9673('0x8c')])[_0x9673('0x10')](function(_0x4cc669){_0x584e09(null,_0x4cc669);})[_0x9673('0x12')](function(_0x12b79d){_0x584e09(_0x12b79d);});};AGIVertices[_0x9673('0x13')]['clear']=function(_0xc7cdd9){var _0x2af650=_[_0x9673('0x60')](verticesWithRetry,_0xc7cdd9[_0x9673('0x35')])?_0xc7cdd9:_[_0x9673('0x8d')](_0xc7cdd9);for(var _0x718256 in _0x2af650){if(_0x2af650[_0x9673('0x8e')](_0x718256)){if(_0x2af650[_0x718256]&&_[_0x9673('0x8f')](_0x2af650[_0x718256])){if(_[_0x9673('0x60')](recursiveMapAttributes,_0x718256)){_0x2af650[_0x718256]=this['replaceObjectAllVariables'](_0x2af650[_0x718256]);}else{_0x2af650[_0x718256]=this[_0x9673('0x90')](_0x2af650[_0x718256]);}}}}return _0x2af650;};AGIVertices[_0x9673('0x13')][_0x9673('0x91')]=function(_0x1e11a7){for(var _0x1d0d35 in _0x1e11a7){if(_0x1e11a7[_0x9673('0x8e')](_0x1d0d35)){if(_[_0x9673('0x92')](_0x1e11a7[_0x1d0d35])){this[_0x9673('0x91')](_0x1e11a7[_0x1d0d35]);}else if(_[_0x9673('0x93')](_0x1e11a7[_0x1d0d35])){for(var _0x263c04=0x0;_0x263c04<_0x1e11a7[_0x1d0d35][_0x9673('0x94')];_0x263c04++){this[_0x9673('0x91')](_0x1e11a7[_0x1d0d35][_0x263c04]);}}else if(_[_0x9673('0x8f')](_0x1e11a7[_0x1d0d35])){_0x1e11a7[_0x1d0d35]=this[_0x9673('0x90')](_0x1e11a7[_0x1d0d35]);}}}};AGIVertices['prototype'][_0x9673('0x95')]=function(_0x27d55c,_0x6696da){for(var _0xb375f1 in _0x27d55c){if(_0x27d55c[_0x9673('0x8e')](_0xb375f1)){if(_[_0x9673('0x92')](_0x27d55c[_0xb375f1])){if(!_[_0x9673('0x3b')](_0x27d55c[_0xb375f1])){this['saveRestApiResult'](_0x27d55c[_0xb375f1],util['format'](_0x9673('0x96'),_0x6696da,_0xb375f1));}}else if(_[_0x9673('0x93')](_0x27d55c[_0xb375f1])){for(var _0x3b4c58=0x0;_0x3b4c58<_0x27d55c[_0xb375f1][_0x9673('0x94')];_0x3b4c58++){this[_0x9673('0x95')](_0x27d55c[_0xb375f1][_0x3b4c58],util[_0x9673('0x24')]('%s.%s',_0x6696da,_0xb375f1+'['+_0x3b4c58+']'));}}else{if(!_[_0x9673('0x48')](_0x27d55c[_0xb375f1])){this[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')]('%s.%s',_0x6696da,_0xb375f1),_0x27d55c[_0xb375f1]);}}}}};AGIVertices['prototype'][_0x9673('0x98')]=function(_0x21bcea){try{var _0x4b83f2=JSON[_0x9673('0x64')](_0x21bcea);this[_0x9673('0x91')](_0x4b83f2);return JSON['stringify'](_0x4b83f2);}catch(_0x15f7bc){return this[_0x9673('0x90')](_0x21bcea);}};AGIVertices[_0x9673('0x13')][_0x9673('0x90')]=function(_0x19acc2){var _0x3a6871=_0x19acc2[_0x9673('0x99')]('{');for(var _0x28a070=0x1;_0x28a070<_0x3a6871['length'];_0x28a070+=0x1){var _0x3d70ad=_0x3a6871[_0x28a070][_0x9673('0x99')]('}');if(_0x3d70ad['length']>0x1){_0x19acc2=_0x19acc2[_0x9673('0x9a')]('{'+_0x3d70ad[0x0]+'}',this[_0x9673('0xc')][_0x9673('0xf')](_0x3d70ad[0x0])[_0x9673('0x9b')]||_0x3d70ad[0x0]);}}if(_0x3a6871[_0x9673('0x94')]===0x1){return _0x19acc2['toString']();}return this['replaceAllVariables'](_0x19acc2);};AGIVertices[_0x9673('0x13')][_0x9673('0x9c')]=function(_0x523c93,_0x4f54b7){var _0x1a6399=this[_0x9673('0xc')][_0x9673('0xf')](_0x523c93);if(_0x1a6399['result']===-0x1){return _0x1a6399;}logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x9d'),_0x4f54b7,_0x1a6399['extra']));return this[_0x9673('0xc')]['setVariable'](_0x4f54b7,_0x1a6399['extra']);};AGIVertices[_0x9673('0x13')][_0x9673('0x7c')]=function(_0x4a72a0){return _0x4a72a0&&_0x4a72a0!=='0'&&_0x4a72a0!=='-1'&&_0x4a72a0!=='';};AGIVertices[_0x9673('0x13')][_0x9673('0x9e')]=function(_0x26f0cd){this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x26f0cd,'-');_0x26f0cd[_0x9673('0xa0')]=_0x26f0cd[_0x9673('0x9e')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x9673('0x13')][_0x9673('0xa1')]=function(_0x310efe){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xa2'),_0x310efe[_0x9673('0x34')]));if(!this['isConfigured'](_0x310efe[_0x9673('0x54')])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20text\x20configured');}var _0x2fddee='\x22'+_0x310efe['text']+'\x22';if(this[_0x9673('0x7c')](_0x310efe[_0x9673('0x6e')])){_0x2fddee+=','+_0x310efe[_0x9673('0x6e')];}var _0x3f1739=this[_0x9673('0xc')]['exec'](_0x9673('0xa4'),_0x2fddee);if(_0x3f1739[_0x9673('0xa5')]===-0x1){return _0x3f1739;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xa6'),_0x2fddee));};AGIVertices[_0x9673('0x13')]['mrcprecog']=function(_0x5ed446){logger['info'](util[_0x9673('0x24')](_0x9673('0xa7'),_0x5ed446[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x5ed446['grammar'])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xa8'));}var _0x52c411=_0x5ed446[_0x9673('0xa9')];if(this[_0x9673('0x7c')](_0x5ed446[_0x9673('0x6e')])){_0x52c411+=','+_0x5ed446[_0x9673('0x6e')];}var _0x136954=this[_0x9673('0xc')][_0x9673('0x4f')]('MRCPRecog',_0x52c411);if(_0x136954['result']===-0x1){return _0x136954;}var _0x47cc8d=this[_0x9673('0x9c')](_0x9673('0xaa'),_0x9673('0xab'));if(_0x47cc8d[_0x9673('0xa5')]===-0x1){return _0x47cc8d;}var _0xc53fb7=this[_0x9673('0x9c')](_0x9673('0xac'),_0x9673('0xad'));if(_0xc53fb7[_0x9673('0xa5')]===-0x1){return _0xc53fb7;}var _0x5c19e4=this[_0x9673('0x9c')](_0x9673('0xae'),'MRCP_RECOG_INSTANCE');if(_0x5c19e4['result']===-0x1){return _0x5c19e4;}return this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xaf'),_0x52c411));};AGIVertices[_0x9673('0x13')][_0x9673('0xb0')]=function(_0x45a6c9){logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Enter\x20in\x20AGI\x20(%s)\x20block',_0x45a6c9[_0x9673('0x34')]));return this['channel']['agi']([_0x45a6c9[_0x9673('0xb1')],_0x45a6c9[_0x9673('0xb2')]]);};AGIVertices[_0x9673('0x13')][_0x9673('0xb3')]=function(_0xb3193c){logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0xb3193c[_0x9673('0x34')]));if(this[_0x9673('0x7c')](_0xb3193c[_0x9673('0x5e')])){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xb4'),_0xb3193c[_0x9673('0x5e')]));var _0x43338d=this['channel'][_0x9673('0xb5')](_0xb3193c[_0x9673('0x5e')]);if(_0x43338d[_0x9673('0xa5')]===-0x1){return _0x43338d;}}return this[_0x9673('0xc')][_0x9673('0xb3')]();};AGIVertices[_0x9673('0x13')]['callback']=function(_0x57dc9c){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xb6'),_0x57dc9c[_0x9673('0x34')]));if(!this['isConfigured'](_0x57dc9c['list_id'])){return this['channel'][_0x9673('0x28')](_0x57dc9c,_0x9673('0xb7'));}_0x57dc9c[_0x9673('0x42')]=moment();if(this[_0x9673('0x7c')](_0x57dc9c['delay'])){_0x57dc9c[_0x9673('0x42')]=moment()[_0x9673('0xb8')](_0x57dc9c[_0x9673('0xb9')],_0x9673('0xba'));}if(!this[_0x9673('0x7c')](_0x57dc9c[_0x9673('0x44')])){_0x57dc9c[_0x9673('0x44')]=0x2;}this[_0x9673('0xbb')][_0x9673('0x9f')](this,_0x57dc9c);return this['channel'][_0x9673('0xa3')](util['format'](_0x9673('0xbc'),_0x57dc9c[_0x9673('0x3f')],_0x57dc9c[_0x9673('0x40')],_0x57dc9c[_0x9673('0x42')]));};AGIVertices[_0x9673('0x13')][_0x9673('0xbd')]=function(_0x3116e9){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xbe'),_0x3116e9['label']));var _0x5d8be9=this[_0x9673('0xc')]['exec'](_0x3116e9[_0x9673('0xbf')],_0x3116e9['options']);if(_0x5d8be9['result']===-0x1){return _0x5d8be9;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xc0'),_0x3116e9[_0x9673('0xbf')],_0x3116e9[_0x9673('0x6e')]));};AGIVertices['prototype'][_0x9673('0xc1')]=function(_0x24dd0c){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xc2'),_0x24dd0c[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x24dd0c[_0x9673('0x54')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xc3'));}var _0x181d5a='\x22'+_0x24dd0c[_0x9673('0x54')]+'\x22';if(this['isConfigured'](_0x24dd0c['options'])){_0x181d5a+=','+_0x24dd0c[_0x9673('0x6e')];}var _0x5326c2=this['channel'][_0x9673('0x4f')]('MRCPSynth',_0x181d5a);if(_0x5326c2[_0x9673('0xa5')]===-0x1){return _0x5326c2;}return this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0xa6'),_0x181d5a));};AGIVertices[_0x9673('0x13')][_0x9673('0xc4')]=function(_0x4371b6){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xc5'),_0x4371b6[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x4371b6[_0x9673('0x54')])){return this[_0x9673('0xc')]['noop']('no\x20text\x20configured');}var _0x50a715='\x22'+_0x4371b6[_0x9673('0x54')]+'\x22';if(this[_0x9673('0x7c')](_0x4371b6['options'])){_0x50a715+=','+_0x4371b6[_0x9673('0x6e')];}var _0x42729e=this[_0x9673('0xc')][_0x9673('0x4f')](_0x9673('0xa4'),_0x50a715);if(_0x42729e[_0x9673('0xa5')]===-0x1){return _0x42729e;}return this[_0x9673('0xc')]['noop'](util[_0x9673('0x24')]('Executed\x20command\x20MRCPSynth\x20%s',_0x50a715));};AGIVertices[_0x9673('0x13')][_0x9673('0xc6')]=function(_0x56bf94){logger['info'](util[_0x9673('0x24')](_0x9673('0xc7'),_0x56bf94[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x56bf94[_0x9673('0xa9')])){return this['channel'][_0x9673('0xa3')]('no\x20grammar\x20configured');}var _0x184506=_0x56bf94[_0x9673('0xa9')];if(this[_0x9673('0x7c')](_0x56bf94[_0x9673('0x6e')])){_0x184506+=','+_0x56bf94[_0x9673('0x6e')];}var _0x370258=this[_0x9673('0xc')]['exec'](_0x9673('0xc8'),_0x184506);if(_0x370258[_0x9673('0xa5')]===-0x1){return _0x370258;}var _0x593f98=this[_0x9673('0x9c')](_0x9673('0xaa'),'LUMENVOX_ASR_CONFIDENCE');if(_0x593f98[_0x9673('0xa5')]===-0x1){return _0x593f98;}var _0xdd71f4=this[_0x9673('0x9c')](_0x9673('0xac'),_0x9673('0xc9'));if(_0xdd71f4[_0x9673('0xa5')]===-0x1){return _0xdd71f4;}var _0x1f618c=this[_0x9673('0x9c')](_0x9673('0xae'),_0x9673('0xca'));if(_0x1f618c[_0x9673('0xa5')]===-0x1){return _0x1f618c;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xaf'),_0x184506));};AGIVertices[_0x9673('0x13')][_0x9673('0xcb')]=function(_0x684754){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xcc'),_0x684754[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x684754[_0x9673('0xa9')])){return this[_0x9673('0xc')]['noop'](_0x9673('0xa8'));}var _0x135acb=_0x684754[_0x9673('0xa9')];if(this['isConfigured'](_0x684754[_0x9673('0x6e')])){_0x135acb+=','+_0x684754[_0x9673('0x6e')];}var _0x4d8d02=this[_0x9673('0xc')][_0x9673('0x4f')](_0x9673('0xc8'),_0x135acb);if(_0x4d8d02[_0x9673('0xa5')]===-0x1){return _0x4d8d02;}var _0x1266d8=this[_0x9673('0x9c')](_0x9673('0xaa'),_0x9673('0xcd'));if(_0x1266d8[_0x9673('0xa5')]===-0x1){return _0x1266d8;}var _0x34e2f2=this['getAndSetVariable'](_0x9673('0xac'),_0x9673('0xce'));if(_0x34e2f2[_0x9673('0xa5')]===-0x1){return _0x34e2f2;}var _0x984cb2=this['getAndSetVariable'](_0x9673('0xae'),_0x9673('0xcf'));if(_0x984cb2[_0x9673('0xa5')]===-0x1){return _0x984cb2;}return this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xaf'),_0x135acb));};AGIVertices['prototype'][_0x9673('0xd0')]=function(_0x2a8482){logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Enter\x20in\x20DATABASE\x20(%s)\x20block',_0x2a8482[_0x9673('0x34')]));if(!this['isConfigured'](_0x2a8482[_0x9673('0xd1')])){return this[_0x9673('0xc')]['error'](_0x2a8482,'no\x20database\x20selected');}var _0x3eeb9b=this[_0x9673('0x17')]['sync'](this,_0x2a8482['odbc_id']);if(!_0x3eeb9b){return this['channel'][_0x9673('0x28')](_0x2a8482,_0x9673('0xd2'));}if(!this['isConfigured'](_0x2a8482['query'])){return this[_0x9673('0xc')]['error'](_0x2a8482,'no\x20query\x20configured');}var _0x1033f5=_0x2a8482[_0x9673('0x2a')][_0x9673('0x51')](/(\r\n|\n|\r)/gm,'\x20');this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0xd3'),_0x1033f5));var _0xe01af3=this[_0x9673('0x26')][_0x9673('0x9f')](this,_0x3eeb9b,_0x1033f5);this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x2a8482,_0x1033f5);if(!this[_0x9673('0x7c')](_0x2a8482[_0x9673('0xd4')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xd5'));}var _0x13fede=this['getVariable'][_0x9673('0x9f')](this,_0x2a8482[_0x9673('0xd4')]);if(!_0x13fede){return this['channel'][_0x9673('0x28')](_0x2a8482,_0x9673('0xd6'));}var _0x41f02c=this;_0xe01af3[_0x9673('0xd7')](function(_0x237423,_0x20231f){Object[_0x9673('0xd8')](_0x237423)[_0x9673('0xd7')](function(_0x4953d3){_0x41f02c[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')]('%s[%s][%s]',_0x13fede,_0x20231f,_0x4953d3),_0x237423[_0x4953d3]);});});this[_0x9673('0xc')]['setVariable'](util['format'](_0x9673('0xd9'),_0x13fede),_0xe01af3[_0x9673('0x94')]);return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xda'),_0x13fede));};AGIVertices[_0x9673('0x13')][_0x9673('0xdb')]=function(_0x4da864){logger[_0x9673('0xdc')](util[_0x9673('0x24')](_0x9673('0xdd'),_0x4da864[_0x9673('0x34')]));if(!this['isConfigured'](_0x4da864[_0x9673('0xde')])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x4da864,_0x9673('0xdf'));}var _0x1614a4=this['getUser'][_0x9673('0x9f')](this,_0x4da864['sip_id']);if(!_0x1614a4){return this[_0x9673('0xc')][_0x9673('0x28')](_0x4da864,_0x9673('0xe0'));}var _0xa0ac31=this['channel']['exec']('DIAL',[util[_0x9673('0x24')](_0x9673('0xe1'),_0x1614a4),_0x4da864[_0x9673('0x5e')],_0x4da864[_0x9673('0xe2')],_0x4da864[_0x9673('0x5c')]]);if(_0xa0ac31[_0x9673('0xa5')]===-0x1){return _0xa0ac31;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')]('Executed\x20command\x20%s',_0x9673('0xe3')));};AGIVertices[_0x9673('0x13')][_0x9673('0xe4')]=function(_0x323eed){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xe5'),_0x323eed[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x323eed[_0x9673('0x70')])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20key\x20configured');}if(!this['isConfigured'](_0x323eed['text'])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xc3'));}this[_0x9673('0xc')][_0x9673('0xe6')]=!![];this[_0x9673('0x32')](_0x323eed);this[_0x9673('0x3a')](_0x323eed['text'],'in','','');this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xe7'),_0x323eed[_0x9673('0x54')]));var _0x704226=this['googleDialogflow']['sync'](this,_0x323eed);if(_0x704226){for(var _0x49f4a7 in _0x704226){if(_0x704226['hasOwnProperty'](_0x49f4a7)){this[_0x9673('0xc')]['setVariable'](util[_0x9673('0x24')](_0x9673('0xe8'),_0x49f4a7[_0x9673('0xe9')]()),_0x704226[_0x49f4a7]);}}this[_0x9673('0x3a')](_0x704226[_0x9673('0xea')],_0x9673('0xeb'),_0x9673('0xe4'),'');return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xec'),_0x704226[_0x9673('0xea')]));}return this[_0x9673('0xc')][_0x9673('0x28')](_0x323eed,_0x9673('0xed'));};AGIVertices[_0x9673('0x13')][_0x9673('0xee')]=function(_0x360920){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xef'),_0x360920['label']));if(!this[_0x9673('0x7c')](_0x360920[_0x9673('0x73')])){return this[_0x9673('0xc')]['noop'](_0x9673('0xf0'));}if(!this[_0x9673('0x7c')](_0x360920[_0x9673('0xf1')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xf2'));}if(!this[_0x9673('0x7c')](_0x360920['private_key'])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xf3'));}if(!this['isConfigured'](_0x360920[_0x9673('0xf4')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xf5'));}if(!this[_0x9673('0x7c')](_0x360920[_0x9673('0x54')])){return this[_0x9673('0xc')]['noop'](_0x9673('0xc3'));}this[_0x9673('0xc')][_0x9673('0xe6')]=!![];this[_0x9673('0x32')](_0x360920);this[_0x9673('0x3a')](_0x360920['text'],'in','','');this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xf6'),_0x360920['text']));var _0x527fe9=this[_0x9673('0x72')][_0x9673('0x9f')](this,_0x360920);if(_0x527fe9){for(var _0xec894d in _0x527fe9){if(_0x527fe9['hasOwnProperty'](_0xec894d)){if(_0xec894d!=='providerResponse'){this['channel']['setVariable'](util['format']('DIALOGFLOW_%s',_0xec894d[_0x9673('0xe9')]()),_0x527fe9[_0xec894d]);}}}this['createSquareMessage'](_0x527fe9[_0x9673('0xea')],_0x9673('0xeb'),_0x9673('0xee'),_0x527fe9[_0x9673('0xf7')]);return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xf8'),_0x527fe9[_0x9673('0xea')]));}return this['channel'][_0x9673('0x28')](_0x360920,_0x9673('0xf9'));};AGIVertices['prototype']['sesteknda']=function(_0x135893){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0xfa'),_0x135893[_0x9673('0x34')]));if(!this['isConfigured'](_0x135893[_0x9673('0xfb')])){return this['channel'][_0x9673('0xa3')](_0x9673('0xfc'));}if(!this[_0x9673('0x7c')](_0x135893[_0x9673('0xfd')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xfe'));}if(!this[_0x9673('0x7c')](_0x135893['password'])){return this['channel'][_0x9673('0xa3')]('no\x20password\x20configured');}if(!this[_0x9673('0x7c')](_0x135893[_0x9673('0xff')])){return this[_0x9673('0xc')]['noop'](_0x9673('0xc3'));}this['channel'][_0x9673('0xe6')]=!![];this[_0x9673('0x32')](_0x135893);this[_0x9673('0x3a')](_0x135893[_0x9673('0x54')],'in','','');this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x100'),_0x135893[_0x9673('0x54')]));var _0x467cb3=this[_0x9673('0x75')][_0x9673('0x9f')](this,_0x135893);if(_0x467cb3){for(var _0x5db987 in _0x467cb3){if(_0x467cb3[_0x9673('0x8e')](_0x5db987)){this[_0x9673('0xc')]['setVariable'](util[_0x9673('0x24')](_0x9673('0x101'),_0x5db987[_0x9673('0xe9')]()),_0x467cb3[_0x5db987]);}}this[_0x9673('0x3a')](_0x467cb3[_0x9673('0xea')],_0x9673('0xeb'),'sesteknda','');if(_0x467cb3['audiofile']){this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')]('Sestek\x20NDA\x20%s\x20file\x20created',_0x467cb3[_0x9673('0x102')]));var _0x4795d6=this[_0x9673('0xc')][_0x9673('0x103')](_0x467cb3[_0x9673('0x102')]);try{fs[_0x9673('0x104')](_0x467cb3[_0x9673('0x102')]+_0x9673('0x105'));}catch(_0x3f3335){logger[_0x9673('0x28')](_0x3f3335);}return _0x4795d6;}else{return this['channel']['noop'](util[_0x9673('0x24')](_0x9673('0x106'),_0x467cb3[_0x9673('0xea')]));}}return this[_0x9673('0xc')]['error'](_0x135893,_0x9673('0x107'));};AGIVertices['prototype'][_0x9673('0x108')]=function(_0x122c95){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x109'),_0x122c95[_0x9673('0x34')]));return this['channel'][_0x9673('0xa3')](_0x9673('0x108'));};AGIVertices[_0x9673('0x13')]['ext_dial']=function(_0x53d5a1){logger['info'](util['format']('Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block',_0x53d5a1['label']));var _0x2a3169='';if(_0x53d5a1['trunk_id']){if(!this[_0x9673('0x7c')](_0x53d5a1[_0x9673('0x10a')])){return this['channel']['error'](_0x53d5a1,_0x9673('0x10b'));}else{var _0x48c2b0=parseInt(_0x53d5a1[_0x9673('0x10a')],0xa);if(isNaN(_0x48c2b0)){_0x2a3169=_0x53d5a1[_0x9673('0x10a')];}else{_0x2a3169=this[_0x9673('0x1a')][_0x9673('0x9f')](this,_0x53d5a1[_0x9673('0x10a')]);if(!_0x2a3169){return this[_0x9673('0xc')][_0x9673('0x28')](_0x53d5a1,_0x9673('0x10c'));}}}}else if(_0x53d5a1[_0x9673('0x10d')]){_0x2a3169=_0x53d5a1[_0x9673('0x10d')];}else{return this['channel'][_0x9673('0x28')](_0x53d5a1,_0x9673('0x10b'));}var _0x8f37ef=this[_0x9673('0xc')][_0x9673('0x4f')]('DIAL',[util[_0x9673('0x24')]('SIP/%s/%s',_0x2a3169,_0x53d5a1[_0x9673('0x3f')]),_0x53d5a1[_0x9673('0x5e')],_0x53d5a1['opts'],_0x53d5a1['url']]);if(_0x8f37ef[_0x9673('0xa5')]===-0x1){return _0x8f37ef;}return this[_0x9673('0xc')][_0x9673('0xa3')](util['format']('Executed\x20command\x20%s',_0x9673('0xe3')));};AGIVertices[_0x9673('0x13')]['finally']=function(_0x19527d){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x10e'),_0x19527d[_0x9673('0x34')]));return this['channel']['noop']('finally');};AGIVertices[_0x9673('0x13')][_0x9673('0x10f')]=function(_0x30d976){logger[_0x9673('0x2b')](util['format'](_0x9673('0x110'),_0x30d976[_0x9673('0x34')]));if(_0x30d976[_0x9673('0xa0')]===0x0){return this[_0x9673('0x9e')](_0x30d976);}_0x30d976[_0x9673('0xa0')]-=0x1;if(!this[_0x9673('0x7c')](_0x30d976['file_id'])){return this[_0x9673('0xc')]['error'](_0x30d976,_0x9673('0x111'));}var _0x2a7ed4=this[_0x9673('0x1c')][_0x9673('0x9f')](this,_0x30d976[_0x9673('0x112')]);if(!_0x2a7ed4){return this[_0x9673('0xc')][_0x9673('0x28')](_0x30d976,'no\x20file\x20audio\x20found');}if(!this[_0x9673('0x7c')](_0x30d976['variable_id'])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x9673('0xd5'));}var _0x1d86ca=this[_0x9673('0xc')][_0x9673('0x113')](_0x2a7ed4,_0x30d976['response'],_0x30d976['maxdigit']);var _0x25ad53=_0x1d86ca['result']?_0x1d86ca[_0x9673('0xa5')][_0x9673('0x43')]():'';logger[_0x9673('0x2b')](_0x9673('0x114'),JSON['stringify'](_0x1d86ca));if(_0x1d86ca[_0x9673('0xa5')]===-0x1){this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x30d976,_0x25ad53);return _0x1d86ca;}else if(_0x1d86ca['extra']==='timeout'){_0x1d86ca['result']=_0x25ad53[_0x9673('0x94')]>=parseInt(_0x30d976[_0x9673('0x115')])?'x':'i';}else{_0x1d86ca['result']=_0x25ad53['length']>=parseInt(_0x30d976[_0x9673('0x115')])&&_0x25ad53[_0x9673('0x94')]<=parseInt(_0x30d976[_0x9673('0x116')])?'x':'i';}var _0x1f1b17=this[_0x9673('0xf')][_0x9673('0x9f')](this,_0x30d976[_0x9673('0xd4')]);if(!_0x1f1b17){return this['channel'][_0x9673('0x28')](_0x30d976,_0x9673('0xd6'));}this[_0x9673('0xc')][_0x9673('0x97')](_0x1f1b17,_0x25ad53);if(this[_0x9673('0x7c')](_0x30d976[_0x9673('0x117')])){var _0x449eb8=parseInt(_0x30d976[_0x9673('0x117')],0xa);var _0x37387a=rs[_0x9673('0x118')]({'charset':'*','length':_0x449eb8});var _0x543c5d=_0x25ad53[_0x9673('0x94')];if(_0x543c5d>0x0){if(_0x543c5d>_0x449eb8){this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x30d976,_0x30d976[_0x9673('0x119')]===_0x9673('0x11a')?_0x37387a+_0x25ad53[_0x9673('0x11b')](_0x449eb8):_0x25ad53[_0x9673('0x11b')](0x0,_0x543c5d-_0x449eb8)+_0x37387a);}else{this['createSquareDetailsReport'][_0x9673('0x9f')](this,_0x30d976,rs[_0x9673('0x118')]({'charset':'*','length':_0x543c5d}));}}else{this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x30d976,'');}}else{this['createSquareDetailsReport']['sync'](this,_0x30d976,_0x25ad53);}return _0x1d86ca;};AGIVertices['prototype'][_0x9673('0xb')]=function(_0x2c686b){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x11c'),_0x2c686b[_0x9673('0x34')]));return this['getdigits'](_0x2c686b);};AGIVertices[_0x9673('0x13')][_0x9673('0x11d')]=function(_0x3a0a27){logger[_0x9673('0x2b')](util['format'](_0x9673('0x11e'),_0x3a0a27[_0x9673('0x34')]));this[_0x9673('0x32')]['sync'](this,_0x3a0a27,_0x3a0a27[_0x9673('0x11f')]);return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x120'),_0x3a0a27['goalname']));};AGIVertices['prototype']['awspolly']=function(_0x2745c8){logger[_0x9673('0x2b')](util['format'](_0x9673('0x121'),_0x2745c8[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x2745c8[_0x9673('0x7f')])||!this['isConfigured'](_0x2745c8['aws_secret_access_key'])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x2745c8[_0x9673('0x54')])){return this['channel'][_0x9673('0xa3')]('no\x20text\x20configured');}this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')]('Trying\x20aws\x20Polly\x20%s',_0x2745c8[_0x9673('0x54')]));var _0x2cd921=this[_0x9673('0x7e')][_0x9673('0x9f')](this,_0x2745c8);if(_0x2cd921){this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0x122'),_0x2cd921));var _0x2bf0cd=this[_0x9673('0xc')]['streamFile'](_0x2cd921);try{fs[_0x9673('0x104')](_0x2cd921+'.wav');}catch(_0x211c34){logger[_0x9673('0x28')](_0x211c34);}return _0x2bf0cd;}return this[_0x9673('0xc')][_0x9673('0x28')](_0x2745c8,_0x9673('0x123'));};AGIVertices[_0x9673('0x13')]['awslex']=function(_0x326e96){logger['info'](util[_0x9673('0x24')](_0x9673('0x124'),_0x326e96[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x326e96[_0x9673('0x7f')])||!this[_0x9673('0x7c')](_0x326e96[_0x9673('0x80')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x125'));}if(!this[_0x9673('0x7c')](_0x326e96[_0x9673('0x86')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x126'));}if(!this[_0x9673('0x7c')](_0x326e96[_0x9673('0x54')])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20text\x20configured');}this[_0x9673('0xc')][_0x9673('0xe6')]=!![];this[_0x9673('0x32')](_0x326e96);this[_0x9673('0x3a')](_0x326e96['text'],'in','','');this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x127'),_0x326e96['text']));var _0x33090d=this[_0x9673('0x84')][_0x9673('0x9f')](this,_0x326e96);if(_0x33090d){for(var _0x4d728b in _0x33090d){if(_0x33090d[_0x9673('0x8e')](_0x4d728b)&&_['isString'](_0x33090d[_0x4d728b])){this[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')](_0x9673('0x128'),_0x4d728b[_0x9673('0xe9')]()),_0x33090d[_0x4d728b]);}}if(_[_0x9673('0x48')](_0x33090d[_0x9673('0x6d')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x129'));}else{this[_0x9673('0x3a')](_0x33090d[_0x9673('0x6d')],_0x9673('0xeb'),_0x9673('0x12a'),'');return this['channel'][_0x9673('0xa3')](util['format'](_0x9673('0x12b'),_0x33090d[_0x9673('0x6d')]));}}return this[_0x9673('0xc')][_0x9673('0x28')](_0x326e96,_0x9673('0x12c'));};AGIVertices['prototype'][_0x9673('0x12d')]=function(_0x59257e){logger['info'](util['format'](_0x9673('0x12e'),_0x59257e['label'],_0x59257e[_0x9673('0x5e')]));if(!this['isConfigured'](_0x59257e[_0x9673('0x70')])){return this[_0x9673('0xc')]['noop'](_0x9673('0x12f'));}var _0x184cac=_0x9673('0x130');var _0x50a3a2=util[_0x9673('0x24')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x4c0cff=util[_0x9673('0x24')]('%s.%s',_0x50a3a2,_0x184cac);var _0x4f7c84=!![];if(_0x59257e['beep']===_0x9673('0x131')){_0x4f7c84=![];}var _0x3b087a=this[_0x9673('0xc')][_0x9673('0x132')](_0x50a3a2,_0x184cac,_0x59257e[_0x9673('0x133')],_0x59257e['timeout'],undefined,_0x4f7c84);if(_0x3b087a[_0x9673('0xa5')]!==-0x1){this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')]('google\x20%s\x20file\x20created',_0x4c0cff));var _0x494f26=this[_0x9673('0x87')][_0x9673('0x9f')](this,_0x59257e,_0x4c0cff);if(_0x494f26){for(var _0x3355c4 in _0x494f26){if(_0x494f26[_0x9673('0x8e')](_0x3355c4)){this[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')](_0x9673('0x134'),_0x3355c4[_0x9673('0xe9')]()),_0x494f26[_0x3355c4]);}}return this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0x135'),JSON[_0x9673('0x69')](_0x494f26)));}}return _0x3b087a;};AGIVertices[_0x9673('0x13')][_0x9673('0x136')]=function(_0x380739){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x137'),_0x380739[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x380739[_0x9673('0x8a')])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20appid\x20configured');}if(!this[_0x9673('0x7c')](_0x380739[_0x9673('0x8b')])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20appsecret\x20configured');}var _0x4b39f4=_0x9673('0x130');var _0x3f7924=util[_0x9673('0x24')]('%s/recordings/%s',FILES_PATH,rs[_0x9673('0x118')](0x4));var _0x2a3787=util[_0x9673('0x24')](_0x9673('0x96'),_0x3f7924,_0x4b39f4);var _0x24c3cd=!![];if(_0x380739[_0x9673('0x138')]==='NOBEEP'){_0x24c3cd=![];}var _0x55d333=this[_0x9673('0xc')][_0x9673('0x132')](_0x3f7924,_0x4b39f4,_0x380739[_0x9673('0x133')],_0x380739[_0x9673('0x5e')],undefined,_0x24c3cd);if(_0x55d333[_0x9673('0xa5')]!==-0x1){this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')]('tilde\x20%s\x20file\x20created',_0x2a3787));var _0x154753=this['tildeASR'][_0x9673('0x9f')](this,_0x380739,_0x2a3787);if(_0x154753){for(var _0x37d9ee in _0x154753){if(_0x154753['hasOwnProperty'](_0x37d9ee)){this['channel']['setVariable'](util['format'](_0x9673('0x139'),_0x37d9ee[_0x9673('0xe9')]()),_0x154753[_0x37d9ee]);}}return this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x13a'),JSON[_0x9673('0x69')](_0x154753)));}}return _0x55d333;};AGIVertices[_0x9673('0x13')][_0x9673('0x13b')]=function(_0x1a4c42){logger[_0x9673('0x2b')](util['format'](_0x9673('0x13c'),_0x1a4c42[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0x13d')](_0x1a4c42[_0x9673('0x37')],_0x1a4c42[_0x9673('0x38')],_0x1a4c42[_0x9673('0x13e')]);};AGIVertices['prototype'][_0x9673('0x13f')]=function(_0x3c2d45){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x140'),_0x3c2d45[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x3c2d45[_0x9673('0x141')])){return this[_0x9673('0xc')]['error'](_0x3c2d45,_0x9673('0x142'));}try{var _0x399ca4=eval(_0x3c2d45[_0x9673('0x141')])?_0x9673('0x143'):_0x9673('0x144');this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')]('EVAL\x20CONDITION\x20%s\x20%s',_0x3c2d45[_0x9673('0x141')],_0x399ca4));return{'code':0xc8,'result':_0x399ca4};}catch(_0x45a3f0){return{'code':0xc8,'result':_0x9673('0x144')};}};AGIVertices[_0x9673('0x13')][_0x9673('0x145')]=function(_0xbc12d8){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x146'),_0xbc12d8['label']));if(!this[_0x9673('0x7c')](_0xbc12d8[_0x9673('0x147')])){return this[_0x9673('0xc')][_0x9673('0x28')](_0xbc12d8,_0x9673('0x148'));}var _0x280741=this[_0x9673('0x21')]['sync'](this,_0xbc12d8[_0x9673('0x147')]);if(!_0x280741){return this[_0x9673('0xc')][_0x9673('0x28')](_0xbc12d8,_0x9673('0x149'));}for(var _0x282222=0x0;_0x282222<_0x280741[_0x9673('0x94')];_0x282222+=0x1){var _0xf8c1bd=this['channel'][_0x9673('0xf')](util[_0x9673('0x24')]('IFTIME(%s?true:false)',_0x280741[_0x282222]));if(_0xf8c1bd['result']===-0x1){return _0xf8c1bd;}logger['info'](util[_0x9673('0x24')]('IFTIME\x20%s\x20%s',_0x280741[_0x282222],_0xf8c1bd[_0x9673('0x9b')]));if(_0xf8c1bd['extra']===_0x9673('0x143')){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x14a'),_0x280741[_0x282222],_0x9673('0x143')));this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x14a'),_0x280741[_0x282222],_0x9673('0x143')));return{'code':0xc8,'result':_0x9673('0x143')};}else{logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x14a'),_0x280741[_0x282222],_0x9673('0x144')));this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x14a'),_0x280741[_0x282222],_0x9673('0x144')));}}return{'code':0xc8,'result':_0x9673('0x144')};};AGIVertices[_0x9673('0x13')][_0x9673('0x14b')]=function(_0x513e53){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x14c'),_0x513e53[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0x14b')]();};AGIVertices['prototype'][_0x9673('0x14d')]=function(_0x469dfc){logger['info'](util[_0x9673('0x24')]('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x469dfc['label']));if(!this[_0x9673('0x7c')](_0x469dfc['key'])){return this[_0x9673('0xc')]['noop'](_0x9673('0x12f'));}var _0x27ac0b='wav';var _0xc03171=util[_0x9673('0x24')](_0x9673('0x14e'),FILES_PATH,rs[_0x9673('0x118')](0x4));var _0x544bf6=util[_0x9673('0x24')](_0x9673('0x96'),_0xc03171,_0x27ac0b);var _0x318557=!![];if(_0x469dfc[_0x9673('0x138')]==='NOBEEP'){_0x318557=![];}var _0x16cf1e=this[_0x9673('0xc')][_0x9673('0x132')](_0xc03171,_0x27ac0b,_0x469dfc[_0x9673('0x133')],_0x469dfc[_0x9673('0x5e')],undefined,_0x318557);if(_0x16cf1e['result']!==-0x1){this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x14f'),_0x544bf6));var _0x37a074=this[_0x9673('0x7a')][_0x9673('0x9f')](this,_0x469dfc,_0x544bf6);if(_0x37a074){for(var _0x45171a in _0x37a074){if(_0x37a074[_0x9673('0x8e')](_0x45171a)){this[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')](_0x9673('0x150'),_0x45171a[_0x9673('0xe9')]()),_0x37a074[_0x45171a]);}}return this[_0x9673('0xc')][_0x9673('0xa3')](util['format']('IspeechASR\x20Result\x20%s',JSON[_0x9673('0x69')](_0x37a074)));}}return _0x16cf1e;};AGIVertices[_0x9673('0x13')][_0x9673('0x151')]=function(_0x2eea95){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x152'),_0x2eea95[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x2eea95['key'])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x12f'));}if(!this[_0x9673('0x7c')](_0x2eea95['text'])){return this[_0x9673('0xc')]['noop'](_0x9673('0xc3'));}this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x153'),_0x2eea95['text']));var _0x14e8f0=this[_0x9673('0x76')][_0x9673('0x9f')](this,_0x2eea95);if(_0x14e8f0){this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x14f'),_0x14e8f0));var _0x4ab1e9=this[_0x9673('0xc')]['streamFile'](_0x14e8f0,_0x2eea95[_0x9673('0x133')]);try{fs[_0x9673('0x104')](_0x14e8f0+_0x9673('0x105'));}catch(_0x152a2a){logger[_0x9673('0x28')](_0x152a2a);}return _0x4ab1e9;}return this[_0x9673('0xc')][_0x9673('0x28')](_0x2eea95,_0x9673('0x154'));};AGIVertices['prototype'][_0x9673('0x155')]=function(_0x2d3e35){logger[_0x9673('0x2b')](util['format'](_0x9673('0x156'),_0x2d3e35[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x2d3e35[_0x9673('0x157')])){return this[_0x9673('0xc')]['error'](_0x2d3e35,_0x9673('0x158'));}logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x159'),this['channel']['callerid'],_0x2d3e35['findBy']));var _0x2a133f=this[_0x9673('0x4a')][_0x9673('0x9f')](this,_0x2d3e35[_0x9673('0x157')]);if(_0x2a133f){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x15a'),this[_0x9673('0xc')]['callerid'],_0x2d3e35['findBy']));this[_0x9673('0xc')]['noop'](util['format'](_0x9673('0x15a'),this[_0x9673('0xc')]['callerid'],_0x2d3e35[_0x9673('0x157')]));return{'code':0xc8,'result':_0x9673('0x15b')};}else{logger['info'](util[_0x9673('0x24')](_0x9673('0x15c'),this['channel'][_0x9673('0x36')],_0x2d3e35[_0x9673('0x157')]));this['channel'][_0x9673('0xa3')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x9673('0xc')]['callerid'],_0x2d3e35[_0x9673('0x157')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x9673('0x13')]['logout']=function(_0x2abad3){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x15d'),_0x2abad3[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x2abad3[_0x9673('0x157')])){return this[_0x9673('0xc')]['error'](_0x2abad3,_0x9673('0x158'));}logger['info'](util[_0x9673('0x24')](_0x9673('0x159'),this[_0x9673('0xc')][_0x9673('0x36')],_0x2abad3[_0x9673('0x157')]));var _0x514536=this[_0x9673('0x15e')][_0x9673('0x9f')](this,_0x2abad3[_0x9673('0x157')]);if(_0x514536){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x15a'),this[_0x9673('0xc')]['callerid'],_0x2abad3[_0x9673('0x157')]));this[_0x9673('0xc')]['noop'](util[_0x9673('0x24')](_0x9673('0x15a'),this[_0x9673('0xc')][_0x9673('0x36')],_0x2abad3[_0x9673('0x157')]));return{'code':0xc8,'result':_0x9673('0x15b')};}else{logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x15c'),this['channel'][_0x9673('0x36')],_0x2abad3[_0x9673('0x157')]));this[_0x9673('0xc')]['noop'](util['format'](_0x9673('0x15c'),this['channel'][_0x9673('0x36')],_0x2abad3['findBy']));return{'code':0xc8,'result':_0x9673('0x15f')};}};AGIVertices[_0x9673('0x13')][_0x9673('0x160')]=function(_0x550d67){logger[_0x9673('0x2b')](util['format'](_0x9673('0x161'),_0x550d67['label']));if(!this[_0x9673('0x7c')](_0x550d67[_0x9673('0x162')])){return this[_0x9673('0xc')]['error'](_0x550d67,'no\x20operation\x20configured');}this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x163'),_0x550d67[_0x9673('0x162')]));var _0x14330c=eval(_0x550d67['operation']);if(!this[_0x9673('0x7c')](_0x550d67[_0x9673('0xd4')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0xd5'));}var _0x40abdb=this[_0x9673('0xf')][_0x9673('0x9f')](this,_0x550d67['variable_id']);if(!_0x40abdb){return this[_0x9673('0xc')][_0x9673('0x28')](_0x550d67,_0x9673('0xd6'));}if(_[_0x9673('0x93')](_0x14330c)){var _0x3fd1eb=this;_0x14330c['forEach'](function(_0x7dbdf8,_0x132a0e){_0x3fd1eb[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')](_0x9673('0x164'),_0x40abdb,_0x132a0e),_0x7dbdf8);});return this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0x165'),_0x40abdb));}else{return this[_0x9673('0xc')][_0x9673('0x97')](_0x40abdb,_0x14330c);}};AGIVertices[_0x9673('0x13')][_0x9673('0x166')]=function(_0x1c369a){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x167'),_0x1c369a[_0x9673('0x34')]));if(_0x1c369a[_0x9673('0xa0')]===0x0){return this[_0x9673('0x9e')](_0x1c369a);}_0x1c369a[_0x9673('0xa0')]-=0x1;if(!this['isConfigured'](_0x1c369a['file_id'])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x1c369a,_0x9673('0x111'));}var _0x2adb5b=this[_0x9673('0x1c')][_0x9673('0x9f')](this,_0x1c369a[_0x9673('0x112')]);if(!_0x2adb5b){return this[_0x9673('0xc')][_0x9673('0x28')](_0x1c369a,'no\x20file\x20audio\x20found');}var _0x347197=this[_0x9673('0xc')][_0x9673('0x113')](_0x2adb5b,_0x1c369a[_0x9673('0x168')],_0x1c369a[_0x9673('0x169')]);var _0x5cc49e=_0x347197['result'];if(_0x347197[_0x9673('0xa5')]===-0x1){this['createSquareDetailsReport']['sync'](this,_0x1c369a,'-1');return _0x347197;}else if(_0x347197[_0x9673('0x9b')]===_0x9673('0x5e')){_0x347197[_0x9673('0xa5')]=_0x347197[_0x9673('0xa5')]['length']>0x0?_0x347197[_0x9673('0xa5')]:'t';}else if(_[_0x9673('0x3b')](_0x347197[_0x9673('0xa5')])){_0x347197[_0x9673('0xa5')]='#';_0x5cc49e='#';}if(!this['isConfigured'](_0x1c369a[_0x9673('0xd4')])){this['channel'][_0x9673('0xa3')](_0x9673('0xd5'));}else{var _0x5b9961=this[_0x9673('0xf')]['sync'](this,_0x1c369a['variable_id']);if(!_0x5b9961){return this[_0x9673('0xc')][_0x9673('0x28')](_0x1c369a,_0x9673('0xd6'));}this[_0x9673('0xc')][_0x9673('0x97')](_0x5b9961,_0x5cc49e);}this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x1c369a,_0x5cc49e);return _0x347197;};AGIVertices[_0x9673('0x13')][_0x9673('0xa3')]=function(_0x52e187){logger[_0x9673('0x2b')](util['format'](_0x9673('0x16a'),_0x52e187[_0x9673('0x34')]));return this[_0x9673('0xc')]['noop'](_0x52e187[_0x9673('0x16b')]||_0x52e187[_0x9673('0x34')]);};AGIVertices[_0x9673('0x13')]['pause']=function(_0x2d5e7f){logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x2d5e7f[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x2d5e7f[_0x9673('0x157')])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x2d5e7f,'no\x20find\x20by\x20configured');}logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x159'),this[_0x9673('0xc')][_0x9673('0x36')],_0x2d5e7f[_0x9673('0x157')]));var _0x109698=this[_0x9673('0x45')][_0x9673('0x9f')](this,_0x2d5e7f[_0x9673('0x16c')]);var _0x448b7e=this[_0x9673('0x47')][_0x9673('0x9f')](this,_0x2d5e7f[_0x9673('0x157')],_0x109698);if(_0x448b7e){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x15a'),this[_0x9673('0xc')][_0x9673('0x36')],_0x2d5e7f[_0x9673('0x157')]));this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0x15a'),this[_0x9673('0xc')]['callerid'],_0x2d5e7f[_0x9673('0x157')]));return{'code':0xc8,'result':_0x9673('0x15b')};}else{logger['info'](util[_0x9673('0x24')](_0x9673('0x15c'),this['channel'][_0x9673('0x36')],_0x2d5e7f[_0x9673('0x157')]));this[_0x9673('0xc')][_0x9673('0xa3')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0x9673('0xc')]['callerid'],_0x2d5e7f['findBy']));return{'code':0xc8,'result':_0x9673('0x15f')};}};AGIVertices[_0x9673('0x13')]['playback']=function(_0x550cd1){logger['info'](util['format'](_0x9673('0x16d'),_0x550cd1['label']));if(!this[_0x9673('0x7c')](_0x550cd1[_0x9673('0x112')])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x550cd1,_0x9673('0x111'));}var _0x41c696=this['getSound'][_0x9673('0x9f')](this,_0x550cd1[_0x9673('0x112')]);if(!_0x41c696){return this['channel']['error'](_0x550cd1,_0x9673('0x16e'));}var _0x3ebfae=this[_0x9673('0xc')][_0x9673('0x4f')](_0x9673('0x16f'),[_0x41c696,_0x550cd1[_0x9673('0xe2')]]);if(_0x3ebfae[_0x9673('0xa5')]===-0x1){return _0x3ebfae;}return this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')]('Executed\x20command\x20%s\x20%s',_0x9673('0x16f'),_0x41c696));};AGIVertices['prototype'][_0x9673('0x170')]=function(_0x4fe74b){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x171'),_0x4fe74b['label']));if(!this[_0x9673('0x7c')](_0x4fe74b[_0x9673('0x172')])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x4fe74b,'no\x20queue\x20selected');}var _0x5c7472='';var _0x37ded6=parseInt(_0x4fe74b[_0x9673('0x172')],0xa);if(isNaN(_0x37ded6)){_0x5c7472=_0x4fe74b[_0x9673('0x172')];}else{_0x5c7472=this['getVoiceQueue'][_0x9673('0x9f')](this,_0x4fe74b[_0x9673('0x172')]);if(!_0x5c7472){return this['channel'][_0x9673('0x28')](_0x4fe74b,'no\x20queue\x20found');}}var _0x8406fc='';if(this[_0x9673('0x7c')](_0x4fe74b[_0x9673('0x112')])){var _0x22e864=this['getSound'][_0x9673('0x9f')](this,_0x4fe74b[_0x9673('0x112')]);if(_0x22e864){_0x8406fc=_0x22e864;}}this[_0x9673('0x32')]['sync'](this,_0x4fe74b,_0x5c7472);if(_0x4fe74b[_0x9673('0xe2')][_0x9673('0x173')]('x')<0x0){_0x4fe74b[_0x9673('0xe2')]+='x';}if(_0x4fe74b[_0x9673('0xe2')]['indexOf']('X')<0x0){_0x4fe74b['opts']+='X';}this[_0x9673('0xc')][_0x9673('0x97')]('XMCS-QUEUE',_0x5c7472?_0x5c7472['toLowerCase']():'');var _0x2e6f57=this[_0x9673('0xc')][_0x9673('0x4f')](_0x9673('0x174'),[_0x5c7472,_0x4fe74b['opts'],_0x4fe74b[_0x9673('0x5c')],_0x8406fc,_0x4fe74b[_0x9673('0x5e')],_0x4fe74b[_0x9673('0xb0')],_0x4fe74b[_0x9673('0x175')],_0x4fe74b[_0x9673('0x176')],'',_0x4fe74b[_0x9673('0x177')]]);if(_0x2e6f57[_0x9673('0xa5')]===-0x1){return _0x2e6f57;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xc0'),'QUEUE',_0x5c7472));};AGIVertices[_0x9673('0x13')]['record']=function(_0x1394f8){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x178'),_0x1394f8['label']));var _0xfa25a=_0x1394f8[_0x9673('0x179')]||'wav';var _0x3ed894=util[_0x9673('0x24')](_0x9673('0x17a'),this[_0x9673('0xc')]['uniqueid'],rs[_0x9673('0x118')](0x5));var _0x5dc734=util[_0x9673('0x24')]('%s/recordings/%s.%s',FILES_PATH,_0x3ed894,_0xfa25a);var _0x1bd8bd=util[_0x9673('0x24')](_0x9673('0x14e'),FILES_PATH,_0x3ed894);this['createSquareRecording'][_0x9673('0x9f')](this,_0x1394f8,_0x3ed894,_0x5dc734);this['channel']['setVariable'](_0x9673('0x17b'),_0x3ed894);logger[_0x9673('0x2b')](_0x9673('0x17c'),_0x1bd8bd,_0xfa25a,_0x1394f8[_0x9673('0x17d')],_0x1394f8[_0x9673('0x5e')]);return this[_0x9673('0xc')][_0x9673('0x132')](_0x1bd8bd,_0xfa25a,_0x1394f8[_0x9673('0x17d')],_0x1394f8[_0x9673('0x5e')],undefined,!![]);};AGIVertices['prototype']['restapi']=function(_0x580678){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x17e'),_0x580678[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x580678[_0x9673('0x5c')])){return this['channel'][_0x9673('0xa3')](_0x9673('0x17f'));}var _0x384fc1=this[_0x9673('0x5b')][_0x9673('0x9f')](this,_0x580678);logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Response:',util[_0x9673('0x180')](_0x384fc1,{'showHidden':![],'depth':null})));if(!this[_0x9673('0x7c')](_0x580678[_0x9673('0xd4')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x181'));}var _0x544c8b=this['getVariable'][_0x9673('0x9f')](this,_0x580678['variable_id']);if(!_0x544c8b){return this[_0x9673('0xc')]['error'](_0x580678,_0x9673('0xd6'));}this[_0x9673('0xc')][_0x9673('0x97')](util['format'](_0x9673('0x182'),_0x544c8b),_0x384fc1[_0x9673('0x6b')]?_0x384fc1[_0x9673('0x6b')]:_0x9673('0x183'));this[_0x9673('0xc')][_0x9673('0x97')](util[_0x9673('0x24')](_0x9673('0x184'),_0x544c8b),_0x384fc1[_0x9673('0x6c')]?_0x384fc1[_0x9673('0x6c')]:'OK');if(_0x384fc1['body']){try{this[_0x9673('0x95')](_0x384fc1[_0x9673('0x63')],_0x544c8b);}catch(_0x5ee7b4){logger[_0x9673('0x28')](util[_0x9673('0x24')](_0x9673('0x185'),_0x544c8b));}}return this['channel']['noop'](util[_0x9673('0x24')](_0x9673('0xda'),_0x544c8b));};AGIVertices[_0x9673('0x13')]['saydigits']=function(_0x41c873){logger['info'](util[_0x9673('0x24')](_0x9673('0x186'),_0x41c873[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0x187')](_0x41c873['digits'][_0x9673('0x51')](/\s+/g,''),_0x41c873[_0x9673('0x17d')]);};AGIVertices[_0x9673('0x13')][_0x9673('0x188')]=function(_0x13264a){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x189'),_0x13264a[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0x18a')](_0x13264a[_0x9673('0x5f')][_0x9673('0x51')](/\s+/g,''),_0x13264a[_0x9673('0x17d')]);};AGIVertices[_0x9673('0x13')][_0x9673('0x18b')]=function(_0x41004a){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x18c'),_0x41004a[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0x18d')](_0x41004a['text'],_0x41004a[_0x9673('0x17d')]);};AGIVertices['prototype']['sendMail']=function(_0x201326){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x18e'),_0x201326['label']));if(!this['isConfigured'](_0x201326[_0x9673('0x18f')])){return this[_0x9673('0xc')]['noop'](_0x9673('0x190'));}var _0x1aa113=this[_0x9673('0x1f')][_0x9673('0x9f')](this,_0x201326[_0x9673('0x18f')]);if(!_0x1aa113||!_0x1aa113[_0x9673('0x191')]){return this[_0x9673('0xc')]['error'](_0x201326,_0x9673('0x192'));}var _0x564383={'from':util[_0x9673('0x24')](_0x9673('0x193'),_0x1aa113[_0x9673('0x11')],_0x1aa113[_0x9673('0x194')]||_0x1aa113[_0x9673('0x191')][_0x9673('0x195')]),'to':_0x201326['to']||'','cc':_0x201326['cc']||'','bcc':_0x201326[_0x9673('0x196')]||'','subject':_0x201326['subject'],'html':_0x201326['text'],'text':_0x201326[_0x9673('0x54')]};if(this['isConfigured'](_0x201326[_0x9673('0x197')])){}logger[_0x9673('0xdc')](_0x9673('0x198'),JSON[_0x9673('0x69')](_0x564383));this[_0x9673('0x32')]['sync'](this,_0x201326,_0x201326['account_id']);this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x199'),_0x1aa113[_0x9673('0x11')]));this[_0x9673('0x20')][_0x9673('0x9f')](this,_0x1aa113[_0x9673('0x19a')],_0x564383);return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x19b'));};AGIVertices[_0x9673('0x13')]['sendFax']=function(_0x461645){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x19c'),_0x461645[_0x9673('0x34')]));return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x19d'));};AGIVertices[_0x9673('0x13')][_0x9673('0x19e')]=function(_0x112af6){logger[_0x9673('0x2b')](util['format'](_0x9673('0x19f'),_0x112af6['label']));if(!this['isConfigured'](_0x112af6[_0x9673('0x1a0')])){return this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x1a1'));}var _0xf74dee=this[_0x9673('0x2f')]['sync'](this,_0x112af6[_0x9673('0x1a0')]);if(!_0xf74dee){return this['channel'][_0x9673('0x28')](_0x112af6,_0x9673('0x1a2'));}var _0x3151b2={'body':_0x112af6[_0x9673('0x1a3')],'phone':_0x112af6['to']||'','SmsAccountId':_0xf74dee['id']};logger[_0x9673('0xdc')](_0x9673('0x1a4'),JSON[_0x9673('0x69')](_0x3151b2));this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x112af6,_0x112af6['sms_account_id']);this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x1a5'),_0xf74dee[_0x9673('0x11')]));this[_0x9673('0x31')][_0x9673('0x9f')](this,_0x3151b2);return this[_0x9673('0xc')]['noop'](_0x9673('0x1a6'));};AGIVertices[_0x9673('0x13')][_0x9673('0x1a7')]=function(_0x2b7c04){logger['info'](util['format'](_0x9673('0x1a8'),_0x2b7c04['label']));if(!this[_0x9673('0x7c')](_0x2b7c04[_0x9673('0xd4')])){return this[_0x9673('0xc')]['error'](_0x2b7c04,_0x9673('0x1a9'));}var _0x2399bf=this[_0x9673('0xf')][_0x9673('0x9f')](this,_0x2b7c04[_0x9673('0xd4')]);if(!_0x2399bf){return this['channel'][_0x9673('0x28')](_0x2b7c04,'no\x20variable\x20found');}return this[_0x9673('0xc')]['setVariable'](_0x2399bf,_0x2b7c04[_0x9673('0x1aa')]);};AGIVertices[_0x9673('0x13')][_0x9673('0x1ab')]=function(_0x1889bf){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x1ac'),_0x1889bf[_0x9673('0x34')]));this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x1ad'));if(_0x1889bf['answer']===_0x9673('0x1ae')){this[_0x9673('0xc')][_0x9673('0xa3')](_0x9673('0x1af'));return this[_0x9673('0xc')]['answer']();}return this['channel'][_0x9673('0xa3')]('Skipped\x20Answer');};AGIVertices['prototype']['subproject']=function(_0x358e65){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x1b0'),_0x358e65[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x358e65[_0x9673('0x1b1')])){return this['channel'][_0x9673('0x28')](_0x358e65,_0x9673('0x1b2'));}var _0x506a98=this['getSquareProject']['sync'](this,_0x358e65[_0x9673('0x1b1')]);if(!this[_0x9673('0x7c')](_0x506a98)){return this[_0x9673('0xc')]['error'](_0x358e65,util['format'](_0x9673('0x1b3'),_0x358e65[_0x9673('0x1b1')]));}if(_0x506a98===this[_0x9673('0xc')]['arg_1']){return this[_0x9673('0xc')][_0x9673('0x28')](_0x358e65,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this[_0x9673('0x32')][_0x9673('0x9f')](this,_0x358e65,_0x506a98);var _0x2028f7=this[_0x9673('0xc')][_0x9673('0x4f')](_0x9673('0x1b4'),util[_0x9673('0x24')]('agi://%s/square,\x22%s\x22,\x22%s\x22',config[_0x9673('0xb0')][_0x9673('0x1b5')]||_0x9673('0x1b6'),_0x506a98,this[_0x9673('0xc')][_0x9673('0x1b7')]));if(_0x2028f7[_0x9673('0xa5')]===-0x1){return _0x2028f7;}return this[_0x9673('0xc')]['noop'](util['format'](_0x9673('0xc0'),'AGI',_0x506a98));};AGIVertices[_0x9673('0x13')]['system']=function(_0x2e2ed6){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x1b8'),_0x2e2ed6[_0x9673('0x34')]));var _0x45906b=this[_0x9673('0x4e')]['sync'](this,_0x2e2ed6[_0x9673('0xb1')]);this[_0x9673('0x32')]['sync'](this,_0x2e2ed6,_0x2e2ed6['command']);if(this[_0x9673('0x7c')](_0x2e2ed6['variable_id'])){var _0x356490=this[_0x9673('0xf')][_0x9673('0x9f')](this,_0x2e2ed6[_0x9673('0xd4')]);if(_0x356490){this[_0x9673('0xc')][_0x9673('0x97')](_0x356490,_0x45906b);return this[_0x9673('0xc')]['noop'](util[_0x9673('0x24')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x2e2ed6[_0x9673('0xb1')],_0x356490));}}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x1b9'),_0x2e2ed6['command']));};AGIVertices['prototype'][_0x9673('0x1ba')]=function(_0x112d0e){logger[_0x9673('0x2b')](util[_0x9673('0x24')]('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x112d0e[_0x9673('0x34')]));_0x112d0e[_0x9673('0x54')]=_0x112d0e[_0x9673('0x54')][_0x9673('0x51')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x112d0e['apiKey'])){return this['channel'][_0x9673('0xa3')](_0x9673('0x1bb'));}if(!this[_0x9673('0x7c')](_0x112d0e[_0x9673('0x54')])){return this[_0x9673('0xc')]['noop']('no\x20text\x20configured');}this[_0x9673('0xc')]['noop'](util['format'](_0x9673('0x1bc'),_0x112d0e[_0x9673('0x54')]));var _0x69790=this[_0x9673('0x52')]['sync'](this,_0x112d0e);if(_0x69790){this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')]('Google\x20Cloud\x20TTS\x20%s\x20file\x20created',_0x69790));var _0x5c1f97=this[_0x9673('0xc')][_0x9673('0x103')](_0x69790);try{fs[_0x9673('0x104')](_0x69790+_0x9673('0x105'));}catch(_0x34d4){logger[_0x9673('0x28')](_0x34d4);}return _0x5c1f97;}return this[_0x9673('0xc')][_0x9673('0x28')](_0x112d0e,'Google\x20Cloud\x20TTS\x20is\x20unreachable');};AGIVertices[_0x9673('0x13')][_0x9673('0x1bd')]=function(_0x7724c3){logger[_0x9673('0x2b')](util['format'](_0x9673('0x1be'),_0x7724c3[_0x9673('0x34')]));_0x7724c3['text']=_0x7724c3['text'][_0x9673('0x51')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x7724c3['text'])){return this[_0x9673('0xc')][_0x9673('0xa3')]('no\x20text\x20configured');}this['channel'][_0x9673('0xa3')](util['format'](_0x9673('0x1bf'),_0x7724c3[_0x9673('0x54')]));var _0x42c509=this[_0x9673('0x59')]['sync'](this,_0x7724c3);if(_0x42c509){this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x1c0'),_0x42c509));var _0x4058de=this[_0x9673('0xc')][_0x9673('0x103')](_0x42c509);try{fs[_0x9673('0x104')](_0x42c509+_0x9673('0x105'));}catch(_0x4bd67d){logger[_0x9673('0x28')](_0x4bd67d);}return _0x4058de;}return this[_0x9673('0xc')][_0x9673('0x28')](_0x7724c3,_0x9673('0x1c1'));};AGIVertices[_0x9673('0x13')][_0x9673('0x1c2')]=function(_0x37d591){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x1c3'),_0x37d591[_0x9673('0x34')]));if(!this['isConfigured'](_0x37d591['findBy'])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x37d591,_0x9673('0x158'));}logger[_0x9673('0x2b')](util['format']('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0x9673('0x36')],_0x37d591['findBy']));var _0x46798d=this['agentUnpause'][_0x9673('0x9f')](this,_0x37d591['findBy']);if(_0x46798d){logger[_0x9673('0x2b')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x9673('0x36')],_0x37d591[_0x9673('0x157')]));this['channel'][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0x15a'),this[_0x9673('0xc')][_0x9673('0x36')],_0x37d591[_0x9673('0x157')]));return{'code':0xc8,'result':_0x9673('0x15b')};}else{logger['info'](util[_0x9673('0x24')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x9673('0x36')],_0x37d591[_0x9673('0x157')]));this[_0x9673('0xc')][_0x9673('0xa3')](util['format'](_0x9673('0x15c'),this['channel'][_0x9673('0x36')],_0x37d591[_0x9673('0x157')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x9673('0x13')]['voicemail']=function(_0x3c5620){logger[_0x9673('0x2b')](util[_0x9673('0x24')](_0x9673('0x1c4'),_0x3c5620[_0x9673('0x34')]));var _0x1f45eb=this[_0x9673('0xc')]['exec'](_0x9673('0x1c5'),[_0x3c5620['mailbox'],_0x3c5620[_0x9673('0x6e')]]);if(_0x1f45eb[_0x9673('0xa5')]===-0x1){return _0x1f45eb;}return this[_0x9673('0xc')][_0x9673('0xa3')](util[_0x9673('0x24')](_0x9673('0xc0'),_0x9673('0x1c5'),_0x3c5620[_0x9673('0x1c6')]));};AGIVertices[_0x9673('0x13')][_0x9673('0x1c7')]=function(_0x5c1e9f){logger[_0x9673('0x2b')](util['format'](_0x9673('0x1c8'),_0x5c1e9f[_0x9673('0x34')]));if(!this[_0x9673('0x7c')](_0x5c1e9f['variable_id'])){return this[_0x9673('0xc')][_0x9673('0x28')](_0x5c1e9f,'no\x20variable\x20selected');}var _0x5a56ee=this[_0x9673('0xf')][_0x9673('0x9f')](this,_0x5c1e9f[_0x9673('0xd4')]);if(!_0x5a56ee){return this[_0x9673('0xc')][_0x9673('0x28')](_0x5c1e9f,'no\x20variable\x20found');}var _0x5fe7da=this[_0x9673('0xc')][_0x9673('0xf')](_0x5a56ee);return{'code':0xc8,'result':_0x5fe7da[_0x9673('0x9b')]?_0x5fe7da[_0x9673('0x9b')]:'-'};};String[_0x9673('0x13')][_0x9673('0x9a')]=function(_0x1f764a,_0x8bfbdd){return this['split'](_0x1f764a)['join'](_0x8bfbdd);};module['exports']=AGIVertices;