{"version":3,"sources":["webpack://ivprogCore/webpack/universalModuleDefinition","webpack://ivprogCore/webpack/bootstrap","webpack://ivprogCore/./grammar/en/ivprog.g4","webpack://ivprogCore/./grammar/en/langFunctions.js","webpack://ivprogCore/./grammar/en/langLibs.js","webpack://ivprogCore/./grammar/es/ivprog.g4","webpack://ivprogCore/./grammar/es/langFunctions.js","webpack://ivprogCore/./grammar/es/langLibs.js","webpack://ivprogCore/./grammar/index.js","webpack://ivprogCore/./grammar/pt/ivprog.g4","webpack://ivprogCore/./grammar/pt/langFunctions.js","webpack://ivprogCore/./grammar/pt/langLibs.js","webpack://ivprogCore/./i18n/error.csv","webpack://ivprogCore/./i18n/index.ts","webpack://ivprogCore/./i18n/message.csv","webpack://ivprogCore/./i18n/ui.csv","webpack://ivprogCore/./js/assessment/ivprogAssessment.js","webpack://ivprogCore/./js/assessment/output_matching/assessment_result.js","webpack://ivprogCore/./js/assessment/output_matching/output_matching.js","webpack://ivprogCore/./js/assessment/output_matching/output_result.js","webpack://ivprogCore/./js/ast/ast_helpers.js","webpack://ivprogCore/./js/ast/commands/arrayAssign.js","webpack://ivprogCore/./js/ast/commands/arrayDeclaration.js","webpack://ivprogCore/./js/ast/commands/assign.js","webpack://ivprogCore/./js/ast/commands/break.js","webpack://ivprogCore/./js/ast/commands/case.js","webpack://ivprogCore/./js/ast/commands/command.js","webpack://ivprogCore/./js/ast/commands/commandBlock.js","webpack://ivprogCore/./js/ast/commands/declaration.js","webpack://ivprogCore/./js/ast/commands/for.js","webpack://ivprogCore/./js/ast/commands/formalParameter.js","webpack://ivprogCore/./js/ast/commands/function.js","webpack://ivprogCore/./js/ast/commands/ifThenElse.js","webpack://ivprogCore/./js/ast/commands/index.js","webpack://ivprogCore/./js/ast/commands/repeatUntil.js","webpack://ivprogCore/./js/ast/commands/return.js","webpack://ivprogCore/./js/ast/commands/switch.js","webpack://ivprogCore/./js/ast/commands/sysCall.js","webpack://ivprogCore/./js/ast/commands/while.js","webpack://ivprogCore/./js/ast/error/syntaxError.js","webpack://ivprogCore/./js/ast/error/syntaxErrorFactory.js","webpack://ivprogCore/./js/ast/expressions/arrayAccess.js","webpack://ivprogCore/./js/ast/expressions/arrayLiteral.js","webpack://ivprogCore/./js/ast/expressions/boolLiteral.js","webpack://ivprogCore/./js/ast/expressions/charLiteral.js","webpack://ivprogCore/./js/ast/expressions/expression.js","webpack://ivprogCore/./js/ast/expressions/functionCall.js","webpack://ivprogCore/./js/ast/expressions/index.js","webpack://ivprogCore/./js/ast/expressions/infixApp.js","webpack://ivprogCore/./js/ast/expressions/intLiteral.js","webpack://ivprogCore/./js/ast/expressions/literal.js","webpack://ivprogCore/./js/ast/expressions/realLiteral.js","webpack://ivprogCore/./js/ast/expressions/stringLiteral.js","webpack://ivprogCore/./js/ast/expressions/unaryApp.js","webpack://ivprogCore/./js/ast/expressions/variableLiteral.js","webpack://ivprogCore/./js/ast/ivprogParser.js","webpack://ivprogCore/./js/ast/operators.ts","webpack://ivprogCore/./js/ast/sourceInfo.js","webpack://ivprogCore/./js/io/domConsole.js","webpack://ivprogCore/./js/io/input.js","webpack://ivprogCore/./js/io/output.js","webpack://ivprogCore/./js/main.js","webpack://ivprogCore/./js/memory/address.ts","webpack://ivprogCore/./js/memory/location.ts","webpack://ivprogCore/./js/processor/compatibilityTable.ts","webpack://ivprogCore/./js/processor/context.ts","webpack://ivprogCore/./js/processor/definedFunctions.js","webpack://ivprogCore/./js/processor/error/processorErrorFactory.js","webpack://ivprogCore/./js/processor/error/runtimeError.js","webpack://ivprogCore/./js/processor/error/semanticError.js","webpack://ivprogCore/./js/processor/ivprogProcessor.js","webpack://ivprogCore/./js/processor/lib/arrays.js","webpack://ivprogCore/./js/processor/lib/io.js","webpack://ivprogCore/./js/processor/lib/lang.js","webpack://ivprogCore/./js/processor/lib/math.js","webpack://ivprogCore/./js/processor/lib/strings.js","webpack://ivprogCore/./js/processor/modes.ts","webpack://ivprogCore/./js/processor/semantic/semanticAnalyser.js","webpack://ivprogCore/./js/processor/store/store.ts","webpack://ivprogCore/./js/processor/store/storeObject.ts","webpack://ivprogCore/./js/processor/store/storeObjectArray.ts","webpack://ivprogCore/./js/processor/store/storeObjectRef.ts","webpack://ivprogCore/./js/processor/store/store_object_array_ref.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value_ref.ts","webpack://ivprogCore/./js/processor/store/value/store_value.ts","webpack://ivprogCore/./js/processor/store/value/store_value_address.ts","webpack://ivprogCore/./js/processor/store/value/store_value_ref.ts","webpack://ivprogCore/./js/runner.js","webpack://ivprogCore/./js/services/i18nHelper.js","webpack://ivprogCore/./js/services/languageService.js","webpack://ivprogCore/./js/services/localizedStringsService.js","webpack://ivprogCore/./js/services/userLog.js","webpack://ivprogCore/./js/typeSystem/array_type.ts","webpack://ivprogCore/./js/typeSystem/multiType.ts","webpack://ivprogCore/./js/typeSystem/parsers.js","webpack://ivprogCore/./js/typeSystem/type.ts","webpack://ivprogCore/./js/typeSystem/types.ts","webpack://ivprogCore/./js/util/auto_gen_output.js","webpack://ivprogCore/./js/util/config.ts","webpack://ivprogCore/./js/util/editorMode2.js","webpack://ivprogCore/./js/util/iassignHelpers.js","webpack://ivprogCore/./js/util/inputTest.js","webpack://ivprogCore/./js/util/input_assessment.js","webpack://ivprogCore/./js/util/maybe.ts","webpack://ivprogCore/./js/util/outputTest.js","webpack://ivprogCore/./js/util/string_diff.js","webpack://ivprogCore/./js/util/testConsole.js","webpack://ivprogCore/./js/util/utils.js","webpack://ivprogCore/./js/visualUI/algorithm.js","webpack://ivprogCore/./js/visualUI/code_generator.js","webpack://ivprogCore/./js/visualUI/commands.js","webpack://ivprogCore/./js/visualUI/commands/attribution.js","webpack://ivprogCore/./js/visualUI/commands/break.js","webpack://ivprogCore/./js/visualUI/commands/comment.js","webpack://ivprogCore/./js/visualUI/commands/conditional_expression.js","webpack://ivprogCore/./js/visualUI/commands/contextualized_menu.js","webpack://ivprogCore/./js/visualUI/commands/dowhiletrue.js","webpack://ivprogCore/./js/visualUI/commands/functioncall.js","webpack://ivprogCore/./js/visualUI/commands/generic_expression.js","webpack://ivprogCore/./js/visualUI/commands/iftrue.js","webpack://ivprogCore/./js/visualUI/commands/reader.js","webpack://ivprogCore/./js/visualUI/commands/repeatNtimes.js","webpack://ivprogCore/./js/visualUI/commands/return.js","webpack://ivprogCore/./js/visualUI/commands/switch.js","webpack://ivprogCore/./js/visualUI/commands/variable_value_menu.js","webpack://ivprogCore/./js/visualUI/commands/whiletrue.js","webpack://ivprogCore/./js/visualUI/commands/writer.js","webpack://ivprogCore/./js/visualUI/functions.js","webpack://ivprogCore/./js/visualUI/globals.js","webpack://ivprogCore/./js/visualUI/ivprog_elements.js","webpack://ivprogCore/./js/visualUI/text_editor.js","webpack://ivprogCore/./js/visualUI/types.js","webpack://ivprogCore/./js/visualUI/utils.js","webpack://ivprogCore/./js/visualUI/variables.js"],"names":["main_function","$read","$write","$numElements","$matrixLines","$matrixColumns","$substring","$length","$uppercase","$lowercase","$charAt","$isReal","$isInt","$isBool","$castReal","$castInt","$castBool","$castString","$sin","$cos","$tan","$sqrt","$pow","$log","$abs","$negate","$invert","$max","$min","$rand","$mathLib","$ioLib","$strLib","$arrayLib","$langLib","pt","lexer","PT","langFuncs","PTFuncs","langLibs","PTLibs","en","EN","ENFuncs","ENLibs","es","ES","ESFuncs","ESLibs","$castChar","LocalizedStrings","LocalizedStringsService","StringTypes","line_i18n","AssessmentConfig","max_instruction_count","suspend_threshold","IVProgAssessment","ast_code","testCases","domConsole","old_config","JSON","parse","stringify","Config","setConfig","partialTests","map","t","name","OutputMatching","IVProgProcessor","input","output","testResult","om","eval","Promise","all","then","results","grade","i","length","result","writeToConsole","DOMConsole","INFO","MESSAGE","generateOutput","status","ERR","ERROR","error_msg","channel","toFixed","error","showErrorMessage","err","message","resolve","errorID","args","getError","msgID","info","getMessage","msgType","msg","getString","processString","USER","write","OutputAssessmentResult","inputs","store","time","template","DETAIL_TEMPLATE","replace","getUI","input_spans","prepareInputList","output_rows","type","formatString","formatNumber","formatBool","prepareOutputTable","failed_text","FAILED_TEMPLATE","input_list","list","INPUT_INFO_TEMPLATE","value","read","join","OUPUT_TABLE_TEMPLATE","assessment_result","prepareResults","page","PAGE_TEMPLATE","result_class","formatOutput","expected_class","generated_class","OUTPUT_TEMPLATE","expected_tmpl","expected","generated_tmpl","generated","EMPTY_OUTPUT_TEMPLATE","final_result","g_string","e_string","g_string_tmpl","e_string_tmpl","diff","StringDiff","diff_vec","part","getDiffStringStyle","diff_string","reduce","prev","actual","text","action","INSERT","DELETE","EQUAL","val","str","RegExp","program","expected_output","test_name","refThis","InputAssessment","gen_output","OutputTest","registerInput","registerOutput","start_time","Date","now","interpretAST","sto","final_time","isInputAvailable","getErrorMessage","g_out","OutputResult","getPotentialOutputType","outputMatch","console","log","e_out","push","NUM_REGEX","test","BOOLEAN_REGEX","g_output","e_output","checkStrings","g_num","Decimal","e_num","checkNumbers","g_bool","TypeParser","e_bool","checkBoolean","decimalPlaces","Math","min","dp","ROUND_FLOOR","eq","toNumber","g_bool_text","e_bool_text","e_ouput","assessmentList","e_output_clean","trim","g_output_clean","NUM_IN_STRING_REGEX","expected_numbers","match","generated_numbers","g_val","e_val","numberGrade","r","BOOLEAN_IN_STRING_REGEX","expected_bools","generated_bools","boolGrade","dist","levenshteinDistance","gradeDiff","max","Number","isNaN","assessment_size","gradeAcc","finalGrade","createNumberResult","OutputMatchResult","createBoolResult","createStringResult","recover","_","start","_tokenStartCharIndex","stop","_input","index","getText","getErrorDisplay","line","_tokenStartLine","column","_tokenStartColumn","SyntaxErrorFactory","invalid_character","ArrayIndexAssign","id","lineExpression","columnExpression","expression","Assign","ArrayDeclaration","lines","columns","initial","isConst","Declaration","Command","Break","Case","commands","_sourceInfo","sourceInfo","CommandBlock","variables","For","for_id","for_from","for_to","for_pass","commandBlock","FormalParameter","byRef","variadic","Function","returnType","formalParameters","some","p","isCompatible","Types","VOID","IfThenElse","condition","ifTrue","ifFalse","RepeatUntil","While","Return","Switch","cases","SysCall","langFunc","SyntaxError","Error","captureStackTrace","createError","message_id","context","Object","freeze","extra_lines","token_missing_one","token","token_missing_list","expectedList","getOR","id_missing","eos_missing","invalid_array_dimension","typeName","invalid_array_size","invalid_main_return","invalid_var_declaration","invalid_break_command","cmdName","invalid_terminal","invalid_type","const_not_init","invalid_id_format","duplicate_function","main_parameters","duplicate_variable","_column","annonymous_array_literal","invalid_matrix_literal_line","exp","cannot_infer_matrix_line","cannot_infer_matrix_column","cannot_infer_vector_size","matrix_to_vector_literal_attr","vector_to_matrix_literal_attr","array_init_not_literal","array_exceeds_2d","invalid_matrix_id_dimension","invalid_vector_init","invalid_matrix_init","ArrayAccess","strLine","toString","strColumn","parenthesis","Expression","ArrayLiteral","valid","strList","arrayLiteral","element","validateSize","validateType","Literal","BoolLiteral","BOOLEAN","convertBoolToString","CharLiteral","CHAR","_parenthesis","flag","FunctionCall","actualParameters","isMainCall","LanguageDefinedFunction","getMainFunctionName","getLocalName","params","strParams","v","InfixApp","op","left","right","l","IntLiteral","INTEGER","convertToString","RealLiteral","REAL","StringLiteral","STRING","UnaryApp","VariableLiteral","UNDEFINED","IVProgParser","lexerClass","LanguageService","getCurrentLexer","inputStream","InputStream","AstHelpers","bind","tokenStream","CommonTokenStream","fill","pos","variableTypes","RK_INTEGER","RK_REAL","RK_BOOLEAN","RK_STRING","RK_CHARACTER","functionTypes","concat","RK_VOID","parsingArrayDimension","scope","getCurrentLangFuncs","definedFuncsNameList","definedVariablesStack","parseProgram","LT","BASE","pop","getToken","fetchedEOF","consumeNewLines","globalVars","functions","RK_PROGRAM","checkOpenCurly","pushVariableStack","RK_CONST","isVariableType","parseGlobalVariables","RK_FUNCTION","parseFunction","popVariableStack","checkCloseCurly","isEOF","global","literalNames","attempt","OPEN_CURLY","CLOSE_CURLY","OPEN_BRACE","CLOSE_BRACE","OPEN_PARENTHESIS","CLOSE_PARENTHESIS","eosToken","EOS","functionID","funcIDToken","indexOf","variableID","getCurrentVariableStack","decl","parseMaybeConst","checkEOS","constToken","typeString","parseType","parseDeclaration","getTypeArray","dim1","dim2","dimensions","SourceInfo","createSourceInfo","idString","parseID","checkVariableDuplicate","checkOpenBrace","parseArrayDimension","checkCloseBrace","parseArrayDeclaration","equalsToken","parseExpressionOR","declaration","Commands","commaToken","COMMA","n_lines","n_columns","dim_is_id","Expressions","parseArrayLiteral","isVector","expString","Parsers","ArrayType","find","dimToken","getIntLiteral","ID","parseVariable","openCurly","invalid_token","beginArray","data","maybeCurlyOpen","parseVectorList","parseExpressionList","endArray","createSourceInfoFromList","dataDim","lastSize","pushScope","FUNCTION","formalParams","funType","checkFunctionDuplicate","checkOpenParenthesis","checkCloseParenthesis","parseFormalParameters","commandsBlock","parseCommandBlock","func","isMain","popScope","reference","maybeIDToken","RK_REFERENCE","parameter","insideScope","LIB_ID","optionalCurly","variablesDecl","hasOpen","parsedCommand","cmd","parseCommand","Array","lastToken","varType","parseIDCommand","RK_RETURN","parseReturn","RK_WHILE","RK_WHILE_ALT","parseWhile","RK_FOR","RK_FOR_ALT","parseFor","RK_BREAK","BREAKABLE","parseBreak","RK_SWITCH","parseSwitchCase","RK_DO","parseRepeatUntil","RK_IF","parseIfThenElse","casesList","parseCases","whileToken","RK_DO_UNTIL","COMMAND","logicalExpression","cmdBlocks","maybeElse","RK_ELSE","maybeIf","elseBlock","for_token","id_token","parseForParameters","RK_FOR_FROM","RK_FOR_TO","maybePass","RK_FOR_PASS","refToken","isID","parseMaybeLibID","parseExpression","equalToken","equalOrParenthesis","funcCall","parseFunctionCallCommand","keyword_code","from_token","keyword","int_or_id","is_unary_op","SUM_OP","convertFromString","RK_CASE","nextToken","RK_DEFAULT","colonToken","COLON","block","defaultCase","setCommands","aCase","caseToken","exp1","parseExpressionAND","OR_OPERATOR","opToken","or","exp2","finalExp","parseExpressionNot","AND_OPERATOR","and","maybeNotToken","NOT_OPERATOR","not","parseExpressionRel","RELATIONAL_OPERATOR","relToken","rel","factor","parseFactor","sumOpToken","factor2","term","parseTerm","MULTI_OP","multOpToken","term2","getRealLiteral","getStringLiteral","CHARACTER","getCharLiteral","RK_TRUE","RK_FALSE","getBoolLiteral","parseIDTerm","parseParenthesisExp","tokenA","tokenB","firstIndex","secondIndex","parseFunctionCallExpression","getInternalName","parseActualParameters","funcName","getFunctionName","maybeToken","types","x","size","tokenIndex","elementID","disableMarginTop","cursorInterval","idleInterval","inputDiv","inputCMD","inputSpan","cursorRef","needInput","clearBtn","hideBtn","showBtn","termDiv","anyKey","actualID","substring","parent","document","getElementById","setup","inputListeners","hideInput","pending_writes","last_clear","_setupDom","_setupEvents","addEventListener","clearBtnClick","hideBtnClick","showBtnClick","event","keyCode","which","clearInterval","notifyListeners","_appendUserInput","innerHTML","currentLine","bashNode","createElement","classList","add","BASH_TEMPLATE","querySelector","INPUT_CARET_TEMPLATE","setAttribute","append","_setupCursor","window","$","popup","content","blinkCaretAndFocus","updateSpanText","stopBlinkCaret","focus","setInterval","style","visibility","scheduleNotify","forEach","splice","newLine","_appendText","_appendTextLn","write_time","Utils","divClass","getClassForType","textDiv","insertBefore","getOutputText","debug","scrollTerm","filter","INPUT","getUserInputText","scrollTop","scrollHeight","display","top","marginTop","showInput","scrollIntoView","removeEventListener","cNode","cloneNode","parentNode","replaceChild","click","promise","outputList","split","clearPendingWrites","parentElement","childNodes","removeChild","firstChild","clear","hide","notifyIdle","idle_input_interval","Input","Output","CodeEditor","initTextEditor","CodeEditorAll","setCode","getCode","updateEditor","disable","i18n","i18nHelper","valueToKey","object","key","prototype","hasOwnProperty","call","concatObjects","obj","libsObject","createSinFun","createCosFun","createTanFun","createSqrtFun","createPowFun","createLogFun","createAbsFun","createNegateFun","createInvertFun","createMaxFun","createMinFun","createRandFun","createInputFun","createOutputFun","createSubstringFun","createLengthFun","createUppercaseFun","createLowercaseFun","createrCharAtFun","createNumElementsFun","createMatrixLinesFun","createMatrixColumnsFun","createIsRealFun","createIsIntFun","createIsBoolFun","createCastRealFun","createCastIntFun","createCastBoolFun","createCastStringFun","createCastCharFun","funcsObject","localName","names","lib","getCurrentLangLibs","internalName","getFunction","libName","funName","createRuntimeError","i18n_id","RuntimeError","createSemanticError","SemanticError","ProcessorErrorFactory","symbol_not_found_full","symbol_not_found","function_missing_full","function_missing","main_missing","array_dimension_not_int_full","array_dimension_not_int","unknown_command_full","unknown_command","incompatible_types_full","left_type","left_dim","right_type","right_dim","source_info","translateType","incompatible_types","incompatible_types_array_full","dim","incompatible_types_array","loop_condition_type_full","loop_condition_type","endless_loop_full","endless_loop","if_condition_type_full","if_condition_type","invalid_global_var","not_implemented","invalid_case_type_full","invalid_case_type","void_in_expression_full","void_in_expression","invalid_array_access_full","invalid_array_access","invalid_matrix_access_full","invalid_matrix_access","matrix_column_outbounds_full","matrix_column_outbounds","matrix_line_outbounds_full","matrix_line_outbounds","vector_line_outbounds_full","vector_line_outbounds","vector_not_matrix_full","vector_not_matrix","function_no_return","invalid_void_return_full","invalid_void_return","invalid_return_type_full","invalid_return_type","invalid_parameters_size_full","invalid_parameters_size","invalid_parameter_type_full","fun_name","invalid_parameter_type","invalid_ref_full","invalid_ref","unexpected_break_command_full","unexpected_break_command","invalid_array_literal_type_full","invalid_array_literal_type","invalid_array_literal_line_full","invalid_array_literal_line","invalid_array_literal_column_full","invalid_array_literal_column","invalid_unary_op_full","opName","translateOp","invalid_unary_op","invalid_infix_op_full","typeLeft","dimLeft","typeRight","dimRight","invalid_infix_op","array_dimension_not_positive_full","array_dimension_not_positive","invalid_type_conversion","invalid_read_type","invalid_read_type_array","typePos","dimPos","typeArray","dimArray","invalid_const_ref_full","invalid_const_ref","invalid_const_assignment_full","var_id","invalid_const_assignment","invalid_vector_assignment_full","left_id","left_size","right_id","right_size","invalid_vector_assignment","invalid_matrix_assignment_full","left_line","left_column","right_line","right_column","invalid_matrix_assignment","matrix_to_vector_attr","vector_to_matrix_attr","invalid_matrix_index_assign_full","mat_id","mat_line","mat_size","exp_size","invalid_matrix_index_assign","invalid_number_elements_vector","expected_num","actual_num","invalid_number_lines_matrix","divsion_by_zero_full","divsion_by_zero","undefined_tanget_value","negative_log_value","invalid_string_index","local_fun_name","negative_sqrt_value","exceeded_recursive_calls","invalid_for_variable","invalid_for_from","invalid_for_to","invalid_for_pass","exceed_max_instructions","ast","globalStore","Store","stores","Context","forceKill","mode","Modes","RUN","function_call_stack","instruction_count","function_call_count","RETURN","BREAK","prepareState","Location","initGlobal","mainFunc","findMainFunction","runFunction","checkContext","executeCommands","MAIN_INTERNAL_ID","fun","funcStore","extendStore","associateParameters","variablesDeclarations","stoWithVars","finalSto","formal_params","effective_params","caller_store","callee_store","hasVariadic","j","formalParameter","associateVariadicParameter","actualParam","associateParameter","count","variadicCount","StoreValue","undefined","insertStore","actualParameter","callerStore","calleeStore","evaluateExpression","actualValue","shouldTypeCast","enable_type_casting","canImplicitTypeCast","inStore","realObj","getStoreObject","ref","ArrayStoreValue","values","get","array_type","addresses","getLocAddressOf","ArrayStoreValueRef","StoreValueAddress","StoreValueRef","setReferenceDimension","locAddress","varID","realValue","doImplicitCasting","cmds","executeCommand","PAUSE","ABORT","executeDeclaration","executeArrayIndexAssign","executeAssign","executeBreak","executeReturn","executeIfThenElse","executeRepeatUntil","executeWhile","executeFor","executeSwitch","executeFunctionCall","executeSysCall","findFunction","destroy","switchCases","lastStore","lastCaseCheckResult","ignoreSwitchCases","switchCase","isDefault","equalityInfixApp","Operators","EQ","initCmd","passValue","toInt","GE","checkEndGTBegin","GT","isForward","increment","ADD","whileBlock","forAsWhile","newCmdList","checkCondition","isTrue","funcType","real_value","stringInfo","applyStore","exp_type_string_info","exp_type_info","updateStore","mustBeArray","used_dims","lineSV","columnSV","canAccept","innerType","current_value","getAt","updateStoreArray","executeArrayDeclaration","temp","linesSV","columnsSV","evaluateArrayLiteral","valueList","evaluateUnaryApp","evaluateInfixApp","evaluateArrayAccess","evaluateVariableLiteral","evaluateLiteral","evaluateFunctionCall","max_call_stack","evaluateMatrix","storeValueMatrix","next","evaluateVector","exps","n_elements","actualValues","exp_str","newValue","vectors","vector","vec_type","isArray","col","readOnly","unaryApp","resultType","resultTypeAfterUnaryOp","ord","SUB","NOT","negated","infixApp","shouldImplicitCast","resultTypeAfterInfixOp","stringInfoLeft","infoLeft","stringInfoRight","infoRight","MULT","DIV","MOD","LE","NEQ","AND","OR","rightStr","leftStr","strLeft","strRight","plus","minus","times","divToInt","div","leftValue","rightValue","trunc","modulo","charCodeAt","gt","gte","lt","lte","numElementsFun","ALL","matrixLinesFun","matrix","matrixColumnsFun","writeFunction","totalSV","total","sendOutput","readFunction","requestInput","typeToConvert","toReal","toBool","realObject","getReferenceDimension","arrayInfo","getRefObj","stoValue","isRealFun","parser","createParser","isIntFun","isBoolFun","castRealFun","typeStringInfoArray","typeInfo","MultiType","castIntFun","floor","castBoolFun","castStringFun","castCharFun","valSV","String","fromCharCode","convertToRadians","degrees","acos","sinFun","angle","mod","sin","cosFun","cos","tanFun","tan","sqrtFun","isNeg","reject","sqrt","powFun","y","pow","logFun","isNegative","log10","absFun","abs","negateFun","invertFun","dividedBy","maxFun","numbers","sto_addrs","paramType","minFun","seed","a","m","c","randFun","createSetSeedFun","setSeedFun","substringFun","end","lengthFun","uppercaseFun","toUpperCase","lowercaseFun","toLowerCase","charAtFun","idx","charAt","SemanticAnalyser","stringCode","semantic","parseTree","analyseTree","symbolMap","currentFunction","n","symbol_map","findSymbol","pushMap","assertDeclarations","f","assertFunction","assertDeclaration","assertArrayDeclaration","insertSymbol","evaluateExpressionType","result_string_info","result_info","lineType","columnType","finalResult","resultTypeLeft","resultTypeRight","evaluateLiteralType","assertParameters","arrayTypeInfo","arrType","literal","last","e","strInfo","strExp","arrayDeclaration","evaluateVectorLiteralType","line_literal","formalParam","optional","assertReturn","popMap","checkCommand","checkCommands","var_type","from_type","to_type","pass_type","sType","hasDefault","caseType","lineExp","columnExp","exp_type","access_type","compatible","access_type_string_info","access_type_info","getMainFunction","actualParametersList","parameterList","assertVariadicParameter","param","assertParameter","expType","variable","shared","runner","ivprogLexer","editor","JsonEditor","analiser","semAna","proc","load","alert","identifier","opts","UI","warn","LanguageServiceExtended","iLMparameters","default_lang","lang","langInfo","Lexers","getLang","getDefaultLang","LanguageServiceNoLS","IVProgLocalizedStrings","langService","langsJsons","shouldListenToChange","type_string","category","Langs","_instance","getInstance","clicks","inRebuildMode","ActionTypes","INSERT_FUNCTION","REMOVE_FUNCTION","INSERT_GLOBAL_VAR","REMOVE_GLOBAL_VAR","RENAME_FUNCTION","RENAME_GLOBAL_VAR","SET_GLOBAL_CONST","CHANGE_FUNCTION_RETURN","CHANGE_GLOBAL_TYPE","CHANGE_GLOBAL_VALUE","INSERT_FUNCTION_PARAM","REMOVE_FUNCTION_PARAM","CHANGE_PARAM_TYPE","RENAME_FUNCTION_PARAM","INSERT_FUNCTION_VAR","REMOVE_FUNCTION_VAR","RENAME_FUNCTION_VAR","CHANGE_VAR_TYPE","CHANGE_VAR_VALUE","INSERT_COMMAND","REMOVE_COMMAND","CHANGE_COMMAND_EXP","CHANGE_ATTRIB_EXP","CHANGE_ATTRIB_VAR","MOVE_COMMAND","ENTER_CHANGE_VAR_NAME","ENTER_CHANGE_VAR_VALUE","ENTER_CHANGE_GLOBAL_NAME","ENTER_CHANGE_GLOBAL_VALUE","ENTER_CHANGE_PARAM_NAME","registerClick","details","registerUserEvent","command","registerEvent","registerSystemEvent","tag","getLogs","setRebuildMode","getLogsAsString","parseLogs","logData","toChar","instance","bool","autoGenerateTestCaseOutput","program_text","copyTestCases","assign","analyseFromSource","resultList","InputTest","exec","result_final","inputList","showAlert","outputGenerated","CodeEditorMode","CodeMirror","indented","align","pushContext","state","indent","popContext","typeBefore","stream","prevToken","string","slice","typeAtEndOfLine","indentation","isTopScope","contains","words","word","propertyIsEnumerable","tokenComment","maybeEnd","ch","tokenize","defineMode","config","parserConfig","indentUnit","statementIndentUnit","dontAlignCalls","keywords","switchKeyword","caseKeyword","defaultKeyword","caseRegex","builtin","blockKeywords","defKeywords","atoms","hooks","multiLineStrings","indentStatements","namespaceSeparator","isPunctuationChar","numberStart","number","isOperatorChar","isIdentifierChar","isReservedIdentifier","curPunc","isDefKeyword","tokenString","tokenBase","backUp","eat","skipToEnd","eatWhile","cur","current","quote","escaped","maybeEOL","typeFirstDefinitions","eol","startState","basecolumn","startOfLine","ctx","sol","eatSpace","styleDefs","textAfter","Pass","firstChar","closing","dontIndentStatements","hook","switchBlock","allmanIndentation","caseTestRegex","electricInput","blockCommentStart","blockCommentEnd","blockCommentContinue","lineComment","fold","codeConfig","getCodeEditorModeConfig","ivprogKeywords","basicTypes","ivprogTypes","ivprogBlockKeywords","blocks","ivprogDefKeywords","def","mimes","prop","helperType","registerHelper","defineMIME","switchString","case_default","modeProps","parseActivityData","algorithm_in_ilm","logs","Maybe","none","prepareActivityToStudentHelper","ilm_cont","maybe_content","testcases","setTestCases","prog_type","settings_programming_type","settingsProgrammingType","settingsDataTypes","settings_data_types","settingsCommands","settings_commands","settingsFunctions","settings_functions","algorithmInIlm","settingsFilter","settings_filter","compareArray","b","elementA","elementB","compareTestcases","original","student","elementO","elementS","autoEval","originalData","callback","code","generate","getOrElse","getTestCases","autoAssessment","TestConsole","runTest","DIFF_DELETE","DIFF_INSERT","DIFF_EQUAL","diff_main","text1","text2","cursor_pos","_fix_unicode","editdiff","find_cursor_edit_diff","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","unshift","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_bisect_","text1_length","text2_length","max_d","ceil","v_offset","v_length","v1","v2","delta","front","k1start","k1end","k2start","k2end","d","k1","k1_offset","x1","y1","k2_offset","x2","diff_bisectSplit_","k2","y2","text1a","text2a","text1b","text2b","diffsb","pointermin","pointermax","pointermid","pointerstart","is_surrogate_pair_start","pointerend","is_surrogate_pair_end","diff_halfMatchI_","best_common","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","prefixLength","suffixLength","hm1","hm2","fix_unicode","pointer","count_delete","count_insert","text_delete","text_insert","previous_equality","ends_with_pair_start","stray","k","starts_with_pair_end","changes","charCode","remove_empty_tuples","tuples","ret","make_edit_splice","before","oldMiddle","newMiddle","after","oldText","newText","oldRange","newRange","oldLength","newLength","oldCursor","oldBefore","oldAfter","maybeNewCursor","editBefore","newCursor","newBefore","newAfter","oldPrefix","newPrefix","editAfter","cursor","oldSuffix","newSuffix","replaceRange","scrollIt","destination","duration","easing","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","pageYOffset","startTime","performance","getTime","documentHeight","body","offsetHeight","documentElement","clientHeight","windowHeight","innerHeight","getElementsByTagName","destinationOffset","offsetTop","destinationOffsetToScroll","round","scroll","timeFunction","requestAnimationFrame","isElementInViewport","el","rect","getBoundingClientRect","bottom","innerWidth","clientWidth","cacheMainList","cacheOp","fillCache","mainList","nullLexer","logicOpList","lOp","isKeyword","isValidIdentifier","identifier_str","validRegex","blockList","keywordsList","typeList","atomList","win","openAssessmentDetail","preventDefault","page_code","currentTarget","dataset","close","open","range","startAt","keys","sleep","ms","res","setTimeout","block_render","renderAlgorithm","draging","children","off","empty","program_obj","FunctionsManagement","globals","GlobalsManagement","blockAllEditingOptions","remove","globalsCode","has_error","n_code","functionsCode","function_obj","return_type","TEXT","return_dimensions","parameters_list","parametersCode","variables_list","variablesCode","commandsCode","command_obj","Models","breaksCode","comment","commentsCode","reader","readersCode","writer","writersCode","functioncall","functioncallsCode","attribution","attributionsCode","whiletrue","whiletruesCode","dowhiletrue","doWhilesCode","iftrue","iftruesCode","repeatNtimes","repeatNtimesCode","switchsCode","returnsCode","variable_value_menu","elementExpressionCode","_command_obj","variableValueMenuCode","switchcasesCode","switchcase","commands_block","var_attribution","expression1","expression2","expression3","itens","dom_object","commands_else","logicExpressionCode","first_operand","exp_logic","exp_arithmetic","arithmeticExpressionCode","operator","equals_to","not_equals_to","second_operand","greater_than","less_than","greater_than_or_equals_to","less_than_or_equals_to","expression_obj","type_op","item","multiplication","division","module","write_sep","function_called","variable_obj","is_return","translateInternalFunction","row","newline","comment_text","parameter_obj","is_constant","rows","removeCommand","dom_obj","function_container_active","createFloatingCommand","function_container","command_type","mouse_event","floatingObject","BreaksManagement","CommentsManagement","ReadersManagement","WritersManagement","AttributionsManagement","IftruesManagement","RepeatNtimesManagement","WhiletruesManagement","DowhiletruesManagement","SwitchesManagement","FunctioncallsManagement","ReturnsManagement","draggable","appendTo","mouseup","evt","manageCommand","hasClass","originalEvent","srcElement","closest","on","addGhostDiv","elementFromPoint","clientX","clientY","ghostDiv","css","target","pageX","divx","pageY","trigger","active_container","addGhostToEmptyBlock","container","addGhostToNotEmptyBlock","is","containerIf","containerElse","topIfDistance","bottomIfDistance","height","topElseDistance","bottomElseDistance","addGhostToFunctionArea","allfilhos","topDistances","bottomDistances","topD","botD","menorTop","apply","indiceTop","menorBot","indiceBot","insertAfter","undermouse","borderMouseDragCommand","each","removeClass","objLeft","offset","objTop","objRight","width","objBottom","addClass","renderCommand","element_reference","before_after_inside","createdElement","genericCreateCommand","VariableValueMenuManagement","only_value","only_variable","only_function","sc","variable_and_function","dragTrash","trash","fadeIn","fadeOut","findSingleElement","searching","query","findPathRecursive","starter_index","hierarquia_bottom_up","index_command","full_path","hier","parentsUntil","esta_correto","esta_na_div_correta","new_cmd","findNearbyCommandToAddInFunctionScope","hier_find","is_correct_context","sub_elemento","findBeforeOrAfterCommandToAdd","insertCommandInBlockHierar","all_str_path","hier_dom","hier_obj","el_jq","command_parent","recentComand","findNearbyCommandToAddInBlockScope","addCommandToSwitchCase","findBeforeOrAfterCommandToAddInsertBlock","node_list_commands","all_sub","menor_distancia","elemento_menor_distancia","antes","t_bot","t_top","borda_inferior","command_target","temp_parent","is_in_else","d_top","d_bot","findInBlockCorrectPlace","insertCommandInBlock","correct_div","is_in_if","which_case","case_div","findInBlockCorrectPlaceInSwitchCase","VariableValueMenu","addHandlers","ExpressionManagement","manageExpressionElements","ref_object","menu_var_or_value","selectedItem","expression_element","index_to_move","exp_op_exp","op_exp","par_exp_par","renderExpressionElements","expression_div","command_container","renderElement","renderOperator","temp_op","index_op","context_menu","dropdown","onChange","$selectedItem","renderMenuAddExpression","dom_append_menu","expression_append_new_expression","type_exp","temp_exp_1","temp_exp_2","temp_exp","temp_par_1","temp_par_2","renderExpression","menu_add_item","menu_add_item_seq","index_temp","addMenuItens","divs_expression","attribution_dom","CommandsManagement","renderMenuOperations","variable_selected","createExpressionAround","break_dom","renderTextComment","comment_dom","initial_el_to_render","renderStartMenu","main_div","renderLogicExpression","renderArithmeticExpression","restartMenu","renderArithmeticOperator","all_expression","expression_arithmetic","arithmetic_operator","element_to_append","menu_operator","selected","renderLogicOperator","expression_logic","logic_operator","exp_el_par_1","exp_el_expr_el_1","exp_el_expr_operand","exp_el_expr_el_2","exp_el_par_2","start_menu","html","selectOnKeydown","renderMenu","dom_where_render","dom_command","menu_div","addCaseToSwitch","SwitchManagement","ContextualizedMenu","GenericExpressionManagement","dowhiletrue_dom","functioncall_dom","timer","div_to_render","expression_array","WatchJS","unwatch","watch","s","types_included","exp_conditional","renderElements","open_or_close","lixeira","posX","posY","Sortable","create","animation","ghostClass","group","put","sort","onStart","onMove","onEnd","onAdd","removeElement","indice","first","opening","div_temp","renderFinalAddElements","renderParenthesis","renderStartAddOperator","renderOperatorMenu","renderAddParenthesis","parentheses_activate","addParentheses","delay","show","actual_target","renderGhostParentheses","floating","comando_que_esta","comando_certo","open_parentheses","close_parentheses","inserir_open","inserir_close","evts","is_correct","index_in_array","count_opened","count_closed","expression_content","position","ghost_parenthesis","menu_final","getArithmeticOperators","getLogicOperators","getRelationalOperators","div_higher","sera","is_last","button","getSeparator","_value","_text","arithmetic_operators","logic_operators","relational_operators","iftrue_dom","reader_dom","togglePasso","var_incrementation","cond_exp","manageClearExpressionElements","repeatNtimes_dom","return_dom","renderCase","casediv","switch_dom","VAR_OR_VALUE_TYPES","variable_and_value_opt","value_and_function","size_field","variable_and_value","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","system_functions","var_obj","var_fun","parameters_menu","AttribuitionsManagement","variable_render","openInputToValue","sub_menu","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","RepeatNTimesManagement","inputWidth","textWidth","tmpStr","function_selected","field","rendered","focusout","fn","font","fakeEl","attr","whiletrue_dom","addHandlersManager","_function_obj","_writer_dom","item_div","content_element","writer_dom","handle","random","newIndex","oldIndex","replaceWith","newlineBtn","setPopup","_addHandlerIconAdd","insert_after","after_which","icon_add_item","_event","div_parent_with_handler","new_div_item","new_related_menu","addHandlerIconAdd","addContent","_ref_object","_menu_var_or_value","_ref_object_content","counter_new_functions","counter_new_parameters","ivprog_version","VersionInfo","version","globalChangeListeners","functionsChangeListeners","_testCases","isRunning","studentGrade","mainFunction","function_comment","addFunction","generator","CodeManagement","runCodeAssessment","AlgorithmManagement","insertContext","watchW","addFunctionHandler","new_function","renderFunction","addParameter","new_parameter","renderParameter","updateReturnType","new_type","new_dimensions","removeFunction","minimizeFunction","is_hidden","enableNameFunctionUpdate","VariablesManagement","toggle","slideToggle","renderFunctionReturn","function_element","tm","cont","appender","is_main","function_index","updateSequenceLocals","addSortableHandler","updateSequenceParameters","teste","sticky","scrollContext","observeChanges","onStick","onBottom","onUnstick","onReposition","onScroll","isVisible","onTop","elementTop","elementHeight","containerTop","containerHeight","evento_drag","updateProgramObjDrag","nodes","start_index","path_target","index_each","path_relative","indice_na_raiz","is_in_case_switch","command_start_point","block_to_insert","command_in_drag","prepareDragHandler","id_function","n_group","itemEl","to","from","initVisualUI","showStopButton","runCode","showRunButton","stopExecution","toggleVisualCoding","toggleTextualCoding","is_iassign","toggleConsole","full_screen","time_show","listWithHandle","updateSequenceFunction","listGlobalsHandle","updateSequenceGlobals","strCode","settingsProgrammingTypes","TextEditor","getEvaluationCallback","scheduleCall","is_running","removeParameter","parameter_container","updateParameterType","function_name","__","enableNameParameterUpdate","updateParameterName","parameter_var","new_name","parameter_obj_dom","variableNameAlreadyExists","name_var","updateFunctionName","function_var","function_obj_dom","functionNameAlreadyExists","opened_name_parameter","opened_input_parameter","parent_node","input_field","select","opened_name_function","opened_input","previousPadding","addFunctionChangeListener","addGlobalChangeListener","removeGlobalListener","removeFunctionListener","scheduled_call","cancelPendingInputRequests","counter_new_globals","addGlobal","is_from_click","new_global","newe","renderGlobal","toggleConstant","global_var","updateName","global_obj_dom","globalNameAlreadyExists","global_name","updateType","updateInitialValues","removeGlobal","global_container","alternateBooleanGlobalValue","value_container","alternateBooleanGlobalVectorValue","removeGlobalColumnVector","addGlobalColumnVector","removeColumnGlobalMatrix","addColumnGlobalMatrix","removeLineGlobalMatrix","addLineGlobalMatrix","n_l","alternateBooleanGlobalMatrixValue","renderValues","enableGlobalValueUpdate","enableGlobalVectorValueUpdate","enableGlobalMatrixValueUpdate","updateColumnsAndRowsText","enableNameUpdate","ff","complete_element","opened_name_value_matrix_global_v","opened_input_value_matrix_global_v","parseFloat","parseInt","opened_name_value_global_var","opened_input_value_global_ar","changed","opened_name_global","opened_input_global","input_name","opened_name_value_vector_global_","opened_input_value_vector_global_","COMMAND_TYPES","ARITHMETIC_TYPES","EXPRESSION_ELEMENTS","start_point","EXPRESSION_TYPES","ARITHMETIC_COMPARISON","LOGIC_COMPARISON","SYSTEM_FUNCTIONS_CATEGORIES","Variable","SystemFunction","Comment","Reader","Writer","Attribution","ExpressionOperator","ExpressionElement","ConditionalExpression","LogicExpression","has_neg","ArithmeticExpression","IfTrue","RepeatNTimes","WhileTrue","DoWhileTrue","SwitchCase","FunctionCallMenu","Program","function_to_add","function_to_receive","codeEditor","theme","lineNumbers","matchBrackets","autoCloseBrackets","fixedGutter","styleActiveLine","setOption","refresh","setValue","getValue","renderErrorMessage","dom_obj_target","message_text","transition","closable","movePopup","boundary","preserve","className","onHidden","$module","counter_new_variables","addVariable","is_in_click","new_var","renderVariable","variable_obj_dom","removeVariable","variable_container","function_associated","variable_var","alternateBooleanValue","enableValueUpdate","alternateBooleanVectorValue","enableVectorValueUpdate","removeColumnVector","addColumnVector","removeColumnMatrix","addColumnMatrix","removeLineMatrix","addLineMatrix","alternateBooleanMatrixValue","enableMatrixValueUpdate"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;ACvJA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA,6BAA6B,OAAO;AACpC;AACA,aAAa,qBAAqB;AAClC;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AE,KAzBO;AA0BbC,SAAO,EAAE,QA1BI;AA2BbC,SAAO,EAAE,QA3BI;AA4BbC,MAAI,EAAE,SA5BO;AA6BbC,MAAI,EAAE,SA7BO;AA8BbC,OAAK,EAAE;AA9BM,CAAf,E;;;;;;;;;;;;ACFA;AAAA;;;AAGe;AACbC,UAAQ,EAAE,YADG;AAEbC,QAAM,EAAE,IAFK;AAGbC,SAAO,EAAE,MAHI;AAIbC,WAAS,EAAE,OAJE;AAKbC,UAAQ,EAAE;AALG,CAAf,E;;;;;;;;;;;ACHA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,gDAAgD;AAChD;AACA;AACA,8DAA8D;AAC9D,aAAa;AACb;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB,sBAAsB;AAC9D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AA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;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,uDAAuD,OAAO;AAC9D;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,OAAO;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;;;;;;;;;;;ACda;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,yCAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC5GY;AACb,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,qDAAqB;AAC7C,oBAAoB,mBAAO,CAAC,+CAAkB;AAC9C,oBAAoB,mBAAO,CAAC,6DAAyB;AACrD,iBAAiB,mBAAO,CAAC,2CAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA,+BAA+B,sCAAsC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrNa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACPD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAEA;AAIA;;AAOA,SAAS8sB,UAAT,CAAqB1nB,KAArB,EAA4B2nB,MAA5B,EAAoC;AAClC,OAAK,IAAMC,GAAX,IAAkBD,MAAlB,EAA0B;AACxB,QAAGhc,MAAM,CAACkc,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCJ,MAArC,EAA6CC,GAA7C,CAAH,EAAqD;AACnD,UAAID,MAAM,CAACC,GAAD,CAAN,KAAgB5nB,KAApB,EAA2B;AACzB,eAAO4nB,GAAP;AACD;AACF;AACF;;AACD,SAAO,I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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc,+BAA+B,cAAc;AAC1F;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qBAAqB;AAC5D;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc,+BAA+B,cAAc;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9Qa;AACb,8CAA8C,cAAc;AAC5D;AACA,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C,4BAA4B,mBAAO,CAAC,kFAA2B;AAC/D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrIa;AACb,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3Ba;AACb,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,oEAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBa;AACb,8CAA8C,cAAc;AAC5D;AACA,qBAAqB,mBAAO,CAAC,qEAAgC;AAC7D,8BAA8B,mBAAO,CAAC,gFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrFa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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CAAcwoD,GAAd,EAAmB5gD,KAAnB,CAA9C;AACA;;AACDy/D,iBAAW,CAAC/jB,GAAZ;AACA+jB,iBAAW,CAACxjB,MAAZ,GAPc,CASd;;AACAsmB,uCAAiC,GAAG,KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;AACD,GAtDD;AAwDA/C,aAAW,CAACC,MAAZ;AACA,C","file":"main.f255f7efef480c0fecaf.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ivprogCore\"] = factory();\n\telse\n\t\troot[\"ivprogCore\"] = factory();\n})(window, function() {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"main\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpivprogCore\"] = window[\"webpackJsonpivprogCore\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./js/main.js\",\"vendors~main\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-12601NtkdG7r4cIqV/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0207\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\r\\u0003\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001d\\u0003\\u001d\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\",\n \"\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003 \\u0003!\\u0003!\\u0003\\\"\\u0003\",\n \"\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003%\\u0003&\\u0003&\\u0003\\'\\u0003\",\n \"\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0148\\n(\\u0003)\\u0003)\\u0003*\\u0003*\",\n \"\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0005-\\u015b\\n-\\u0003.\\u0003.\\u0003/\\u0003/\\u0003\",\n \"0\\u00030\\u00070\\u0163\\n0\\f0\\u000e0\\u0166\\u000b0\\u00031\\u00031\\u0003\",\n \"1\\u00031\\u00032\\u00062\\u016d\\n2\\r2\\u000e2\\u016e\\u00032\\u00032\\u0003\",\n \"2\\u00032\\u00052\\u0175\\n2\\u00032\\u00062\\u0178\\n2\\r2\\u000e2\\u0179\\u0003\",\n \"2\\u00032\\u00032\\u00032\\u00052\\u0180\\n2\\u00032\\u00062\\u0183\\n2\\r2\\u000e\",\n \"2\\u0184\\u00052\\u0187\\n2\\u00033\\u00063\\u018a\\n3\\r3\\u000e3\\u018b\\u0003\",\n \"3\\u00033\\u00063\\u0190\\n3\\r3\\u000e3\\u0191\\u00033\\u00063\\u0195\\n3\\r3\\u000e\",\n \"3\\u0196\\u00033\\u00033\\u00073\\u019b\\n3\\f3\\u000e3\\u019e\\u000b3\\u00033\",\n \"\\u00053\\u01a1\\n3\\u00034\\u00034\\u00054\\u01a5\\n4\\u00034\\u00064\\u01a8\\n\",\n \"4\\r4\\u000e4\\u01a9\\u00035\\u00035\\u00075\\u01ae\\n5\\f5\\u000e5\\u01b1\\u000b\",\n \"5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01b7\\n6\\u00037\\u00037\\u00037\\u0005\",\n \"7\\u01bc\\n7\\u00037\\u00037\\u00038\\u00038\\u00038\\u00038\\u00039\\u00039\\u0003\",\n \":\\u0006:\\u01c7\\n:\\r:\\u000e:\\u01c8\\u0003:\\u0005:\\u01cc\\n:\\u0003;\\u0003\",\n \";\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003=\\u0005=\\u01d6\\n=\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0005\",\n \">\\u01e3\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003@\\u0003\",\n \"@\\u0003@\\u0003@\\u0007@\\u01f0\\n@\\f@\\u000e@\\u01f3\\u000b@\\u0003@\\u0005\",\n \"@\\u01f6\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u01fd\\n@\\f@\\u000e\",\n \"@\\u0200\\u000b@\\u0003@\\u0003@\\u0005@\\u0204\\n@\\u0003@\\u0003@\\u0003\\u01fe\",\n \"\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\\t\\u0006\\u000b\\u0007\\r\\b\",\n \"\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\\u0019\\u000e\\u001b\\u000f\",\n \"\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\\'\\u0015)\\u0016+\\u0017\",\n \"-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002;\\u0002=\\u0002?\\u001e\",\n \"A\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\\u0002i2k\\u0002m3o4q\\u0002\",\n \"s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f6\\u0003\\u0002\\u0012\\u0004\",\n \"\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002>>@@\\u0005\\u0002C\\\\aac|\\u0006\",\n \"\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u000223\\u0004\\u0002GGgg\\u0006\\u0002\",\n \"\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\\u000f))^^\\u0004\\u0002\\u000b\",\n \"\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\\u00022;CHch\\u0003\\u0002\",\n \"29\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\\u021c\\u0002\\u0003\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\\u0002\\u0002\\u0007\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\\u0002\\u0002\\u000b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\\u0002\\u0002\\u000f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\\u0002\\u0002\\u0013\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\\u0002\\u0002\\u0017\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\\u0002\\u0002\\u001b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\\u0002\\u0002\\u001f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\\u0002\\u0002#\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\\u0002\\'\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002+\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"1\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\\u0002\\u0002\\u00025\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\\u0002\\u0002?\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\\u0002C\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002G\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\\u0002\\u0002\\u0002Q\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\\u0002\\u0002U\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\\u0002Y\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002]\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\\u0002\\u0002\\u0002i\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\\u0002\\u0002o\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\\u0002\\u007f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\\u0005\\u0089\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0007\\u008e\\u0003\\u0002\\u0002\\u0002\\t\\u0093\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0098\\u0003\\u0002\\u0002\\u0002\\r\\u009f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000f\\u00a3\\u0003\\u0002\\u0002\\u0002\\u0011\\u00a8\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0013\\u00af\\u0003\\u0002\\u0002\\u0002\\u0015\\u00b4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0017\\u00be\\u0003\\u0002\\u0002\\u0002\\u0019\\u00c4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001b\\u00cd\\u0003\\u0002\\u0002\\u0002\\u001d\\u00d4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001f\\u00d8\\u0003\\u0002\\u0002\\u0002!\\u00e3\\u0003\\u0002\",\n \"\\u0002\\u0002#\\u00e8\\u0003\\u0002\\u0002\\u0002%\\u00eb\\u0003\\u0002\\u0002\",\n \"\\u0002\\'\\u00f0\\u0003\\u0002\\u0002\\u0002)\\u00f6\\u0003\\u0002\\u0002\\u0002\",\n \"+\\u00fd\\u0003\\u0002\\u0002\\u0002-\\u0103\\u0003\\u0002\\u0002\\u0002/\\u0109\",\n \"\\u0003\\u0002\\u0002\\u00021\\u0116\\u0003\\u0002\\u0002\\u00023\\u0119\\u0003\",\n \"\\u0002\\u0002\\u00025\\u011e\\u0003\\u0002\\u0002\\u00027\\u0124\\u0003\\u0002\",\n \"\\u0002\\u00029\\u0129\\u0003\\u0002\\u0002\\u0002;\\u012d\\u0003\\u0002\\u0002\",\n \"\\u0002=\\u0131\\u0003\\u0002\\u0002\\u0002?\\u0134\\u0003\\u0002\\u0002\\u0002\",\n \"A\\u0136\\u0003\\u0002\\u0002\\u0002C\\u0138\\u0003\\u0002\\u0002\\u0002E\\u013a\",\n \"\\u0003\\u0002\\u0002\\u0002G\\u013c\\u0003\\u0002\\u0002\\u0002I\\u013e\\u0003\",\n \"\\u0002\\u0002\\u0002K\\u0140\\u0003\\u0002\\u0002\\u0002M\\u0142\\u0003\\u0002\",\n \"\\u0002\\u0002O\\u0147\\u0003\\u0002\\u0002\\u0002Q\\u0149\\u0003\\u0002\\u0002\",\n \"\\u0002S\\u014b\\u0003\\u0002\\u0002\\u0002U\\u014d\\u0003\\u0002\\u0002\\u0002\",\n \"W\\u014f\\u0003\\u0002\\u0002\\u0002Y\\u015a\\u0003\\u0002\\u0002\\u0002[\\u015c\",\n \"\\u0003\\u0002\\u0002\\u0002]\\u015e\\u0003\\u0002\\u0002\\u0002_\\u0160\\u0003\",\n \"\\u0002\\u0002\\u0002a\\u0167\\u0003\\u0002\\u0002\\u0002c\\u0186\\u0003\\u0002\",\n \"\\u0002\\u0002e\\u01a0\\u0003\\u0002\\u0002\\u0002g\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002i\\u01ab\\u0003\\u0002\\u0002\\u0002k\\u01b6\\u0003\\u0002\\u0002\\u0002\",\n \"m\\u01b8\\u0003\\u0002\\u0002\\u0002o\\u01bf\\u0003\\u0002\\u0002\\u0002q\\u01c3\",\n \"\\u0003\\u0002\\u0002\\u0002s\\u01cb\\u0003\\u0002\\u0002\\u0002u\\u01cd\\u0003\",\n \"\\u0002\\u0002\\u0002w\\u01cf\\u0003\\u0002\\u0002\\u0002y\\u01d5\\u0003\\u0002\",\n \"\\u0002\\u0002{\\u01e2\\u0003\\u0002\\u0002\\u0002}\\u01e4\\u0003\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0203\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\\u0007r\\u0002\",\n \"\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007q\\u0002\\u0002\",\n \"\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\\u0002\\u0086\",\n \"\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\\u0088\\u0004\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0089\\u008a\\u0007t\\u0002\\u0002\\u008a\\u008b\",\n \"\\u0007g\\u0002\\u0002\\u008b\\u008c\\u0007c\\u0002\\u0002\\u008c\\u008d\\u0007\",\n \"n\\u0002\\u0002\\u008d\\u0006\\u0003\\u0002\\u0002\\u0002\\u008e\\u008f\\u0007\",\n \"x\\u0002\\u0002\\u008f\\u0090\\u0007q\\u0002\\u0002\\u0090\\u0091\\u0007k\\u0002\",\n \"\\u0002\\u0091\\u0092\\u0007f\\u0002\\u0002\\u0092\\b\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0093\\u0094\\u0007d\\u0002\\u0002\\u0094\\u0095\\u0007q\\u0002\\u0002\\u0095\",\n \"\\u0096\\u0007q\\u0002\\u0002\\u0096\\u0097\\u0007n\\u0002\\u0002\\u0097\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0098\\u0099\\u0007u\\u0002\\u0002\\u0099\\u009a\\u0007\",\n \"v\\u0002\\u0002\\u009a\\u009b\\u0007t\\u0002\\u0002\\u009b\\u009c\\u0007k\\u0002\",\n \"\\u0002\\u009c\\u009d\\u0007p\\u0002\\u0002\\u009d\\u009e\\u0007i\\u0002\\u0002\",\n \"\\u009e\\f\\u0003\\u0002\\u0002\\u0002\\u009f\\u00a0\\u0007k\\u0002\\u0002\\u00a0\",\n \"\\u00a1\\u0007p\\u0002\\u0002\\u00a1\\u00a2\\u0007v\\u0002\\u0002\\u00a2\\u000e\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007e\\u0002\\u0002\\u00a4\\u00a5\",\n \"\\u0007j\\u0002\\u0002\\u00a5\\u00a6\\u0007c\\u0002\\u0002\\u00a6\\u00a7\\u0007\",\n \"t\\u0002\\u0002\\u00a7\\u0010\\u0003\\u0002\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"u\\u0002\\u0002\\u00a9\\u00aa\\u0007y\\u0002\\u0002\\u00aa\\u00ab\\u0007k\\u0002\",\n \"\\u0002\\u00ab\\u00ac\\u0007v\\u0002\\u0002\\u00ac\\u00ad\\u0007e\\u0002\\u0002\",\n \"\\u00ad\\u00ae\\u0007j\\u0002\\u0002\\u00ae\\u0012\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007c\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007u\\u0002\\u0002\\u00b2\\u00b3\\u0007g\\u0002\\u0002\\u00b3\\u0014\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00b4\\u00b5\\u0007q\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007v\\u0002\\u0002\\u00b6\\u00b7\\u0007j\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"g\\u0002\\u0002\\u00b8\\u00b9\\u0007t\\u0002\\u0002\\u00b9\\u00ba\\u0007y\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007k\\u0002\\u0002\\u00bb\\u00bc\\u0007u\\u0002\\u0002\",\n \"\\u00bc\\u00bd\\u0007g\\u0002\\u0002\\u00bd\\u0016\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007e\\u0002\\u0002\\u00bf\\u00c0\\u0007q\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007p\\u0002\\u0002\\u00c1\\u00c2\\u0007u\\u0002\\u0002\\u00c2\\u00c3\",\n \"\\u0007v\\u0002\\u0002\\u00c3\\u0018\\u0003\\u0002\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007h\\u0002\\u0002\\u00c5\\u00c6\\u0007w\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"p\\u0002\\u0002\\u00c7\\u00c8\\u0007e\\u0002\\u0002\\u00c8\\u00c9\\u0007v\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u00cc\\u0007p\\u0002\\u0002\\u00cc\\u001a\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007t\\u0002\\u0002\\u00ce\\u00cf\\u0007g\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007v\\u0002\\u0002\\u00d0\\u00d1\\u0007w\\u0002\\u0002\\u00d1\\u00d2\",\n \"\\u0007t\\u0002\\u0002\\u00d2\\u00d3\\u0007p\\u0002\\u0002\\u00d3\\u001c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00d4\\u00d5\\u0007h\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"q\\u0002\\u0002\\u00d6\\u00d7\\u0007t\\u0002\\u0002\\u00d7\\u001e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00d8\\u00d9\\u0007t\\u0002\\u0002\\u00d9\\u00da\\u0007g\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007r\\u0002\\u0002\\u00db\\u00dc\\u0007g\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007c\\u0002\\u0002\\u00dd\\u00de\\u0007v\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007a\\u0002\\u0002\\u00df\\u00e0\\u0007h\\u0002\\u0002\\u00e0\\u00e1\",\n \"\\u0007q\\u0002\\u0002\\u00e1\\u00e2\\u0007t\\u0002\\u0002\\u00e2 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00e3\\u00e4\\u0007h\\u0002\\u0002\\u00e4\\u00e5\\u0007t\\u0002\",\n \"\\u0002\\u00e5\\u00e6\\u0007q\\u0002\\u0002\\u00e6\\u00e7\\u0007o\\u0002\\u0002\",\n \"\\u00e7\\\"\\u0003\\u0002\\u0002\\u0002\\u00e8\\u00e9\\u0007v\\u0002\\u0002\\u00e9\",\n \"\\u00ea\\u0007q\\u0002\\u0002\\u00ea$\\u0003\\u0002\\u0002\\u0002\\u00eb\\u00ec\",\n \"\\u0007r\\u0002\\u0002\\u00ec\\u00ed\\u0007c\\u0002\\u0002\\u00ed\\u00ee\\u0007\",\n \"u\\u0002\\u0002\\u00ee\\u00ef\\u0007u\\u0002\\u0002\\u00ef&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00f0\\u00f1\\u0007d\\u0002\\u0002\\u00f1\\u00f2\\u0007t\\u0002\\u0002\",\n \"\\u00f2\\u00f3\\u0007g\\u0002\\u0002\\u00f3\\u00f4\\u0007c\\u0002\\u0002\\u00f4\",\n \"\\u00f5\\u0007m\\u0002\\u0002\\u00f5(\\u0003\\u0002\\u0002\\u0002\\u00f6\\u00f7\",\n \"\\u0007t\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\\u00f9\\u0007\",\n \"r\\u0002\\u0002\\u00f9\\u00fa\\u0007g\\u0002\\u0002\\u00fa\\u00fb\\u0007c\\u0002\",\n \"\\u0002\\u00fb\\u00fc\\u0007v\\u0002\\u0002\\u00fc*\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00fd\\u00fe\\u0007w\\u0002\\u0002\\u00fe\\u00ff\\u0007p\\u0002\\u0002\\u00ff\",\n \"\\u0100\\u0007v\\u0002\\u0002\\u0100\\u0101\\u0007k\\u0002\\u0002\\u0101\\u0102\",\n \"\\u0007n\\u0002\\u0002\\u0102,\\u0003\\u0002\\u0002\\u0002\\u0103\\u0104\\u0007\",\n \"y\\u0002\\u0002\\u0104\\u0105\\u0007j\\u0002\\u0002\\u0105\\u0106\\u0007k\\u0002\",\n \"\\u0002\\u0106\\u0107\\u0007n\\u0002\\u0002\\u0107\\u0108\\u0007g\\u0002\\u0002\",\n \"\\u0108.\\u0003\\u0002\\u0002\\u0002\\u0109\\u010a\\u0007t\\u0002\\u0002\\u010a\",\n \"\\u010b\\u0007g\\u0002\\u0002\\u010b\\u010c\\u0007r\\u0002\\u0002\\u010c\\u010d\",\n \"\\u0007g\\u0002\\u0002\\u010d\\u010e\\u0007c\\u0002\\u0002\\u010e\\u010f\\u0007\",\n \"v\\u0002\\u0002\\u010f\\u0110\\u0007a\\u0002\\u0002\\u0110\\u0111\\u0007y\\u0002\",\n \"\\u0002\\u0111\\u0112\\u0007j\\u0002\\u0002\\u0112\\u0113\\u0007k\\u0002\\u0002\",\n \"\\u0113\\u0114\\u0007n\\u0002\\u0002\\u0114\\u0115\\u0007g\\u0002\\u0002\\u0115\",\n \"0\\u0003\\u0002\\u0002\\u0002\\u0116\\u0117\\u0007k\\u0002\\u0002\\u0117\\u0118\",\n \"\\u0007h\\u0002\\u0002\\u01182\\u0003\\u0002\\u0002\\u0002\\u0119\\u011a\\u0007\",\n \"g\\u0002\\u0002\\u011a\\u011b\\u0007n\\u0002\\u0002\\u011b\\u011c\\u0007u\\u0002\",\n \"\\u0002\\u011c\\u011d\\u0007g\\u0002\\u0002\\u011d4\\u0003\\u0002\\u0002\\u0002\",\n \"\\u011e\\u011f\\u0007h\\u0002\\u0002\\u011f\\u0120\\u0007c\\u0002\\u0002\\u0120\",\n \"\\u0121\\u0007n\\u0002\\u0002\\u0121\\u0122\\u0007u\\u0002\\u0002\\u0122\\u0123\",\n \"\\u0007g\\u0002\\u0002\\u01236\\u0003\\u0002\\u0002\\u0002\\u0124\\u0125\\u0007\",\n \"v\\u0002\\u0002\\u0125\\u0126\\u0007t\\u0002\\u0002\\u0126\\u0127\\u0007w\\u0002\",\n \"\\u0002\\u0127\\u0128\\u0007g\\u0002\\u0002\\u01288\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0129\\u012a\\u0007p\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\\u0002\\u012b\",\n \"\\u012c\\u0007v\\u0002\\u0002\\u012c:\\u0003\\u0002\\u0002\\u0002\\u012d\\u012e\",\n \"\\u0007C\\u0002\\u0002\\u012e\\u012f\\u0007P\\u0002\\u0002\\u012f\\u0130\\u0007\",\n \"F\\u0002\\u0002\\u0130<\\u0003\\u0002\\u0002\\u0002\\u0131\\u0132\\u0007Q\\u0002\",\n \"\\u0002\\u0132\\u0133\\u0007T\\u0002\\u0002\\u0133>\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0134\\u0135\\u0007(\\u0002\\u0002\\u0135@\\u0003\\u0002\\u0002\\u0002\\u0136\",\n \"\\u0137\\u0007*\\u0002\\u0002\\u0137B\\u0003\\u0002\\u0002\\u0002\\u0138\\u0139\",\n \"\\u0007+\\u0002\\u0002\\u0139D\\u0003\\u0002\\u0002\\u0002\\u013a\\u013b\\u0007\",\n \"]\\u0002\\u0002\\u013bF\\u0003\\u0002\\u0002\\u0002\\u013c\\u013d\\u0007_\\u0002\",\n \"\\u0002\\u013dH\\u0003\\u0002\\u0002\\u0002\\u013e\\u013f\\u0007}\\u0002\\u0002\",\n \"\\u013fJ\\u0003\\u0002\\u0002\\u0002\\u0140\\u0141\\u0007\\u007f\\u0002\\u0002\",\n \"\\u0141L\\u0003\\u0002\\u0002\\u0002\\u0142\\u0143\\u0007.\\u0002\\u0002\\u0143\",\n \"N\\u0003\\u0002\\u0002\\u0002\\u0144\\u0145\\u0007>\\u0002\\u0002\\u0145\\u0148\",\n \"\\u0007/\\u0002\\u0002\\u0146\\u0148\\u0007\\u2192\\u0002\\u0002\\u0147\\u0144\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0147\\u0146\\u0003\\u0002\\u0002\\u0002\\u0148P\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0149\\u014a\\t\\u0002\\u0002\\u0002\\u014aR\\u0003\",\n \"\\u0002\\u0002\\u0002\\u014b\\u014c\\t\\u0003\\u0002\\u0002\\u014cT\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014d\\u014e\\u0005;\\u001e\\u0002\\u014eV\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014f\\u0150\\u0005=\\u001f\\u0002\\u0150X\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0151\\u0152\\u0007@\\u0002\\u0002\\u0152\\u015b\\u0007?\\u0002\\u0002\\u0153\",\n \"\\u0154\\u0007?\\u0002\\u0002\\u0154\\u015b\\u0007?\\u0002\\u0002\\u0155\\u0156\",\n \"\\u0007>\\u0002\\u0002\\u0156\\u015b\\u0007?\\u0002\\u0002\\u0157\\u015b\\t\\u0004\",\n \"\\u0002\\u0002\\u0158\\u0159\\u0007#\\u0002\\u0002\\u0159\\u015b\\u0007?\\u0002\",\n \"\\u0002\\u015a\\u0151\\u0003\\u0002\\u0002\\u0002\\u015a\\u0153\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0155\\u0003\\u0002\\u0002\\u0002\\u015a\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0158\\u0003\\u0002\\u0002\\u0002\\u015bZ\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015c\\u015d\\u0007<\\u0002\\u0002\\u015d\\\\\\u0003\\u0002\\u0002\\u0002\",\n \"\\u015e\\u015f\\u00059\\u001d\\u0002\\u015f^\\u0003\\u0002\\u0002\\u0002\\u0160\",\n \"\\u0164\\t\\u0005\\u0002\\u0002\\u0161\\u0163\\t\\u0006\\u0002\\u0002\\u0162\\u0161\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0163\\u0166\\u0003\\u0002\\u0002\\u0002\\u0164\\u0162\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\u0003\\u0002\\u0002\\u0002\\u0165`\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0166\\u0164\\u0003\\u0002\\u0002\\u0002\\u0167\\u0168\",\n \"\\u0005_0\\u0002\\u0168\\u0169\\u00070\\u0002\\u0002\\u0169\\u016a\\u0005_0\\u0002\",\n \"\\u016ab\\u0003\\u0002\\u0002\\u0002\\u016b\\u016d\\t\\u0007\\u0002\\u0002\\u016c\",\n \"\\u016b\\u0003\\u0002\\u0002\\u0002\\u016d\\u016e\\u0003\\u0002\\u0002\\u0002\\u016e\",\n \"\\u016c\\u0003\\u0002\\u0002\\u0002\\u016e\\u016f\\u0003\\u0002\\u0002\\u0002\\u016f\",\n \"\\u0187\\u0003\\u0002\\u0002\\u0002\\u0170\\u0171\\u00072\\u0002\\u0002\\u0171\",\n \"\\u0175\\u0007z\\u0002\\u0002\\u0172\\u0173\\u00072\\u0002\\u0002\\u0173\\u0175\",\n \"\\u0007Z\\u0002\\u0002\\u0174\\u0170\\u0003\\u0002\\u0002\\u0002\\u0174\\u0172\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0175\\u0177\\u0003\\u0002\\u0002\\u0002\\u0176\\u0178\",\n \"\\u0005u;\\u0002\\u0177\\u0176\\u0003\\u0002\\u0002\\u0002\\u0178\\u0179\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0179\\u0177\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017a\\u0187\\u0003\\u0002\\u0002\\u0002\\u017b\\u017c\\u0007\",\n \"2\\u0002\\u0002\\u017c\\u0180\\u0007d\\u0002\\u0002\\u017d\\u017e\\u00072\\u0002\",\n \"\\u0002\\u017e\\u0180\\u0007D\\u0002\\u0002\\u017f\\u017b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u0180\\u0182\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0181\\u0183\\t\\b\\u0002\\u0002\\u0182\\u0181\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0183\\u0184\\u0003\\u0002\\u0002\\u0002\\u0184\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0003\\u0002\\u0002\\u0002\\u0185\\u0187\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u016c\\u0003\\u0002\\u0002\\u0002\\u0186\\u0174\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u017f\\u0003\\u0002\\u0002\\u0002\\u0187d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0188\\u018a\\t\\u0007\\u0002\\u0002\\u0189\\u0188\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018a\\u018b\\u0003\\u0002\\u0002\\u0002\\u018b\\u0189\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018b\\u018c\\u0003\\u0002\\u0002\\u0002\\u018c\\u018d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018d\\u018f\\u00070\\u0002\\u0002\\u018e\\u0190\\t\\u0007\\u0002\\u0002\\u018f\",\n \"\\u018e\\u0003\\u0002\\u0002\\u0002\\u0190\\u0191\\u0003\\u0002\\u0002\\u0002\\u0191\",\n \"\\u018f\\u0003\\u0002\\u0002\\u0002\\u0191\\u0192\\u0003\\u0002\\u0002\\u0002\\u0192\",\n \"\\u01a1\\u0003\\u0002\\u0002\\u0002\\u0193\\u0195\\t\\u0007\\u0002\\u0002\\u0194\",\n \"\\u0193\\u0003\\u0002\\u0002\\u0002\\u0195\\u0196\\u0003\\u0002\\u0002\\u0002\\u0196\",\n \"\\u0194\\u0003\\u0002\\u0002\\u0002\\u0196\\u0197\\u0003\\u0002\\u0002\\u0002\\u0197\",\n \"\\u0198\\u0003\\u0002\\u0002\\u0002\\u0198\\u019c\\u00070\\u0002\\u0002\\u0199\",\n \"\\u019b\\t\\u0007\\u0002\\u0002\\u019a\\u0199\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019e\\u0003\\u0002\\u0002\\u0002\\u019c\\u019a\\u0003\\u0002\\u0002\\u0002\\u019c\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019d\\u019f\\u0003\\u0002\\u0002\\u0002\\u019e\",\n \"\\u019c\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a1\\u0005g4\\u0002\\u01a0\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a0\\u0194\\u0003\\u0002\\u0002\\u0002\\u01a1f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a2\\u01a4\\t\\t\\u0002\\u0002\\u01a3\\u01a5\\t\\u0002\",\n \"\\u0002\\u0002\\u01a4\\u01a3\\u0003\\u0002\\u0002\\u0002\\u01a4\\u01a5\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a5\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a8\\t\\u0007\",\n \"\\u0002\\u0002\\u01a7\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01a9\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a9\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a9\\u01aa\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01aah\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01af\\u0007$\\u0002\",\n \"\\u0002\\u01ac\\u01ae\\u0005k6\\u0002\\u01ad\\u01ac\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ae\\u01b1\\u0003\\u0002\\u0002\\u0002\\u01af\\u01ad\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01af\\u01b0\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0007$\\u0002\\u0002\",\n \"\\u01b3j\\u0003\\u0002\\u0002\\u0002\\u01b4\\u01b7\\n\\n\\u0002\\u0002\\u01b5\\u01b7\",\n \"\\u0005y=\\u0002\\u01b6\\u01b4\\u0003\\u0002\\u0002\\u0002\\u01b6\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7l\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01bb\\u0007\",\n \")\\u0002\\u0002\\u01b9\\u01bc\\u0005y=\\u0002\\u01ba\\u01bc\\n\\u000b\\u0002\\u0002\",\n \"\\u01bb\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01ba\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bc\\u01bd\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01be\\u0007)\\u0002\\u0002\",\n \"\\u01ben\\u0003\\u0002\\u0002\\u0002\\u01bf\\u01c0\\t\\f\\u0002\\u0002\\u01c0\\u01c1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c1\\u01c2\\b8\\u0002\\u0002\\u01c2p\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01c3\\u01c4\\u0007=\\u0002\\u0002\\u01c4r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01c5\\u01c7\\t\\r\\u0002\\u0002\\u01c6\\u01c5\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c7\\u01c8\\u0003\\u0002\\u0002\\u0002\\u01c8\\u01c6\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c8\\u01c9\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ca\\u01cc\\u0005q9\\u0002\\u01cb\\u01c6\\u0003\\u0002\\u0002\\u0002\\u01cb\",\n \"\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cct\\u0003\\u0002\\u0002\\u0002\\u01cd\",\n \"\\u01ce\\t\\u000e\\u0002\\u0002\\u01cev\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d0\",\n \"\\t\\u000f\\u0002\\u0002\\u01d0x\\u0003\\u0002\\u0002\\u0002\\u01d1\\u01d2\\u0007\",\n \"^\\u0002\\u0002\\u01d2\\u01d6\\t\\u0010\\u0002\\u0002\\u01d3\\u01d6\\u0005}?\\u0002\",\n \"\\u01d4\\u01d6\\u0005{>\\u0002\\u01d5\\u01d1\\u0003\\u0002\\u0002\\u0002\\u01d5\",\n \"\\u01d3\\u0003\\u0002\\u0002\\u0002\\u01d5\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\",\n \"z\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0007^\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\t\\u0011\\u0002\\u0002\\u01d9\\u01da\\u0005w<\\u0002\\u01da\\u01db\\u0005w<\\u0002\",\n \"\\u01db\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\u0007^\\u0002\\u0002\",\n \"\\u01dd\\u01de\\u0005w<\\u0002\\u01de\\u01df\\u0005w<\\u0002\\u01df\\u01e3\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e0\\u01e1\\u0007^\\u0002\\u0002\\u01e1\\u01e3\\u0005\",\n \"w<\\u0002\\u01e2\\u01d7\\u0003\\u0002\\u0002\\u0002\\u01e2\\u01dc\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e2\\u01e0\\u0003\\u0002\\u0002\\u0002\\u01e3|\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e4\\u01e5\\u0007^\\u0002\\u0002\\u01e5\\u01e6\\u0007w\\u0002\",\n \"\\u0002\\u01e6\\u01e7\\u0005u;\\u0002\\u01e7\\u01e8\\u0005u;\\u0002\\u01e8\\u01e9\",\n \"\\u0005u;\\u0002\\u01e9\\u01ea\\u0005u;\\u0002\\u01ea~\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01eb\\u01ec\\u00071\\u0002\\u0002\\u01ec\\u01ed\\u00071\\u0002\\u0002\\u01ed\",\n \"\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01ee\\u01f0\\n\\r\\u0002\\u0002\\u01ef\\u01ee\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01f3\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01ef\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f3\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01f4\\u01f6\",\n \"\\u0007\\u000f\\u0002\\u0002\\u01f5\\u01f4\\u0003\\u0002\\u0002\\u0002\\u01f5\\u01f6\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f6\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01f7\\u0204\",\n \"\\u0007\\f\\u0002\\u0002\\u01f8\\u01f9\\u00071\\u0002\\u0002\\u01f9\\u01fa\\u0007\",\n \",\\u0002\\u0002\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fd\\u000b\",\n \"\\u0002\\u0002\\u0002\\u01fc\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fd\\u0200\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01fe\\u01ff\\u0003\\u0002\\u0002\\u0002\\u01fe\\u01fc\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01ff\\u0201\\u0003\\u0002\\u0002\\u0002\\u0200\\u01fe\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0201\\u0202\\u0007,\\u0002\\u0002\\u0202\\u0204\\u0007\",\n \"1\\u0002\\u0002\\u0203\\u01eb\\u0003\\u0002\\u0002\\u0002\\u0203\\u01f8\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0204\\u0205\\u0003\\u0002\\u0002\\u0002\\u0205\\u0206\\b\",\n \"@\\u0003\\u0002\\u0206\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\\u0147\",\n \"\\u015a\\u0164\\u016e\\u0174\\u0179\\u017f\\u0184\\u0186\\u018b\\u0191\\u0196\\u019c\",\n \"\\u01a0\\u01a4\\u01a9\\u01af\\u01b6\\u01bb\\u01c8\\u01cb\\u01d5\\u01e2\\u01f1\\u01f5\",\n \"\\u01fe\\u0203\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'program'\", \"'real'\", \"'void'\", \n \"'bool'\", \"'string'\", \"'int'\", \"'char'\", \n \"'switch'\", \"'case'\", \"'otherwise'\", \"'const'\", \n \"'function'\", \"'return'\", \"'for'\", \"'repeat_for'\", \n \"'from'\", \"'to'\", \"'pass'\", \"'break'\", \n \"'repeat'\", \"'until'\", \"'while'\", \"'repeat_while'\", \n \"'if'\", \"'else'\", \"'false'\", \"'true'\", \n \"'&'\", \"'('\", \"')'\", \"'['\", \"']'\", \"'{'\", \n \"'}'\", \"','\", null, null, null, null, \n null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"main\",\n $read: \"read\",\n $write: \"write\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"substring\",\n $length: \"length\",\n $uppercase: \"uppercase\",\n $lowercase: \"lowercase\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\",\n $rand: \"random\"\n\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Mathematic\",\n $ioLib: \"IO\",\n $strLib: \"Text\",\n $arrayLib: \"Array\",\n $langLib: \"Conversion\"\n}","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-12601a6lkpTcwTySs/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00020\\u01e3\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\",\n \"\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\",\n \"\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\",\n \"\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0006\",\n \"\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\",\n \"\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\",\n \"\\u0003\\u0007\\u0003\\u0007\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\",\n \"\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\",\n \"\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\",\n \"\\f\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0019\\u0003\",\n \"\\u0019\\u0003\\u0019\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\\u001b\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\\u001e\\u0003\\u001e\\u0003\",\n \"\\u001f\\u0003\\u001f\\u0003 \\u0003 \\u0003!\\u0003!\\u0003\\\"\\u0003\\\"\\u0003\",\n \"\\\"\\u0005\\\"\\u0124\\n\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003%\\u0003\",\n \"&\\u0003&\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\",\n \"\\'\\u0003\\'\\u0005\\'\\u0137\\n\\'\\u0003(\\u0003(\\u0003)\\u0003)\\u0003*\\u0003\",\n \"*\\u0007*\\u013f\\n*\\f*\\u000e*\\u0142\\u000b*\\u0003+\\u0003+\\u0003+\\u0003\",\n \"+\\u0003,\\u0006,\\u0149\\n,\\r,\\u000e,\\u014a\\u0003,\\u0003,\\u0003,\\u0003\",\n \",\\u0005,\\u0151\\n,\\u0003,\\u0006,\\u0154\\n,\\r,\\u000e,\\u0155\\u0003,\\u0003\",\n \",\\u0003,\\u0003,\\u0005,\\u015c\\n,\\u0003,\\u0006,\\u015f\\n,\\r,\\u000e,\\u0160\",\n \"\\u0005,\\u0163\\n,\\u0003-\\u0006-\\u0166\\n-\\r-\\u000e-\\u0167\\u0003-\\u0003\",\n \"-\\u0006-\\u016c\\n-\\r-\\u000e-\\u016d\\u0003-\\u0006-\\u0171\\n-\\r-\\u000e-\\u0172\",\n \"\\u0003-\\u0003-\\u0007-\\u0177\\n-\\f-\\u000e-\\u017a\\u000b-\\u0003-\\u0005-\",\n \"\\u017d\\n-\\u0003.\\u0003.\\u0005.\\u0181\\n.\\u0003.\\u0006.\\u0184\\n.\\r.\\u000e\",\n \".\\u0185\\u0003/\\u0003/\\u0007/\\u018a\\n/\\f/\\u000e/\\u018d\\u000b/\\u0003/\",\n \"\\u0003/\\u00030\\u00030\\u00050\\u0193\\n0\\u00031\\u00031\\u00031\\u00051\\u0198\",\n \"\\n1\\u00031\\u00031\\u00032\\u00032\\u00032\\u00032\\u00033\\u00033\\u00034\\u0006\",\n \"4\\u01a3\\n4\\r4\\u000e4\\u01a4\\u00034\\u00054\\u01a8\\n4\\u00035\\u00035\\u0003\",\n \"6\\u00036\\u00037\\u00037\\u00037\\u00037\\u00057\\u01b2\\n7\\u00038\\u00038\\u0003\",\n \"8\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00058\\u01bf\",\n \"\\n8\\u00039\\u00039\\u00039\\u00039\\u00039\\u00039\\u00039\\u0003:\\u0003:\\u0003\",\n \":\\u0003:\\u0007:\\u01cc\\n:\\f:\\u000e:\\u01cf\\u000b:\\u0003:\\u0005:\\u01d2\",\n \"\\n:\\u0003:\\u0003:\\u0003:\\u0003:\\u0003:\\u0007:\\u01d9\\n:\\f:\\u000e:\\u01dc\",\n \"\\u000b:\\u0003:\\u0003:\\u0005:\\u01e0\\n:\\u0003:\\u0003:\\u0003\\u01da\\u0002\",\n \";\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\\t\\u0006\\u000b\\u0007\\r\\b\\u000f\",\n \"\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\\u0019\\u000e\\u001b\\u000f\\u001d\",\n \"\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\\'\\u0015)\\u0016+\\u0017-\\u0002\",\n \"/\\u00021\\u00023\\u00185\\u00197\\u001a9\\u001b;\\u001c=\\u001d?\\u001eA\\u001f\",\n \"C E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[\\u0002],_\\u0002a-c.e\\u0002g/i\\u0002k\\u0002\",\n \"m\\u0002o\\u0002q\\u0002s0\\u0003\\u0002\\u0012\\u0004\\u0002--//\\u0005\\u0002\",\n \"\\'\\',,11\\u0004\\u0002>>@@\\u0005\\u0002C\\\\aac|\\u0006\\u00022;C\\\\aac|\\u0003\",\n \"\\u00022;\\u0003\\u000223\\u0004\\u0002GGgg\\u0006\\u0002\\f\\f\\u000f\\u000f$\",\n \"$^^\\u0006\\u0002\\f\\f\\u000f\\u000f))^^\\u0004\\u0002\\u000b\\u000b\\\"\\\"\\u0004\",\n \"\\u0002\\f\\f\\u000f\\u000f\\u0005\\u00022;CHch\\u0003\\u000229\\n\\u0002$$))^\",\n \"^ddhhppttvv\\u0003\\u000225\\u0002\\u01f8\\u0002\\u0003\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\\u0002\\u0002\\u0007\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\t\\u0003\\u0002\\u0002\\u0002\\u0002\\u000b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\r\\u0003\\u0002\\u0002\\u0002\\u0002\\u000f\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\\u0002\\u0002\\u0013\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\\u0002\\u0002\\u0017\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\\u0002\\u0002\\u001b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\\u0002\\u0002\\u001f\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002!\\u0003\\u0002\\u0002\\u0002\\u0002#\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002%\\u0003\\u0002\\u0002\\u0002\\u0002\\'\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \")\\u0003\\u0002\\u0002\\u0002\\u0002+\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00025\\u0003\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00029\\u0003\\u0002\\u0002\\u0002\\u0002;\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002=\\u0003\\u0002\\u0002\\u0002\\u0002?\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002A\\u0003\\u0002\\u0002\\u0002\\u0002C\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"E\\u0003\\u0002\\u0002\\u0002\\u0002G\\u0003\\u0002\\u0002\\u0002\\u0002I\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002K\\u0003\\u0002\\u0002\\u0002\\u0002M\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002O\\u0003\\u0002\\u0002\\u0002\\u0002Q\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002S\\u0003\\u0002\\u0002\\u0002\\u0002U\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002W\\u0003\\u0002\\u0002\\u0002\\u0002Y\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"]\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\\u0002\\u0002\\u0002\\u0002c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002g\\u0003\\u0002\\u0002\\u0002\\u0002s\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0003u\\u0003\\u0002\\u0002\\u0002\\u0005~\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0007\\u0083\\u0003\\u0002\\u0002\\u0002\\t\\u0089\\u0003\\u0002\\u0002\",\n \"\\u0002\\u000b\\u0090\\u0003\\u0002\\u0002\\u0002\\r\\u0097\\u0003\\u0002\\u0002\",\n \"\\u0002\\u000f\\u009f\\u0003\\u0002\\u0002\\u0002\\u0011\\u00a9\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0013\\u00b1\\u0003\\u0002\\u0002\\u0002\\u0015\\u00b6\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0017\\u00c0\\u0003\\u0002\\u0002\\u0002\\u0019\\u00c6\\u0003\\u0002\\u0002\",\n \"\\u0002\\u001b\\u00cd\\u0003\\u0002\\u0002\\u0002\\u001d\\u00d5\\u0003\\u0002\\u0002\",\n \"\\u0002\\u001f\\u00da\\u0003\\u0002\\u0002\\u0002!\\u00df\\u0003\\u0002\\u0002\",\n \"\\u0002#\\u00e4\\u0003\\u0002\\u0002\\u0002%\\u00ed\\u0003\\u0002\\u0002\\u0002\",\n \"\\'\\u00f0\\u0003\\u0002\\u0002\\u0002)\\u00f6\\u0003\\u0002\\u0002\\u0002+\\u00fc\",\n \"\\u0003\\u0002\\u0002\\u0002-\\u0107\\u0003\\u0002\\u0002\\u0002/\\u010b\\u0003\",\n \"\\u0002\\u0002\\u00021\\u010d\\u0003\\u0002\\u0002\\u00023\\u0110\\u0003\\u0002\",\n \"\\u0002\\u00025\\u0112\\u0003\\u0002\\u0002\\u00027\\u0114\\u0003\\u0002\\u0002\",\n \"\\u00029\\u0116\\u0003\\u0002\\u0002\\u0002;\\u0118\\u0003\\u0002\\u0002\\u0002\",\n \"=\\u011a\\u0003\\u0002\\u0002\\u0002?\\u011c\\u0003\\u0002\\u0002\\u0002A\\u011e\",\n \"\\u0003\\u0002\\u0002\\u0002C\\u0123\\u0003\\u0002\\u0002\\u0002E\\u0125\\u0003\",\n \"\\u0002\\u0002\\u0002G\\u0127\\u0003\\u0002\\u0002\\u0002I\\u0129\\u0003\\u0002\",\n \"\\u0002\\u0002K\\u012b\\u0003\\u0002\\u0002\\u0002M\\u0136\\u0003\\u0002\\u0002\",\n \"\\u0002O\\u0138\\u0003\\u0002\\u0002\\u0002Q\\u013a\\u0003\\u0002\\u0002\\u0002\",\n \"S\\u013c\\u0003\\u0002\\u0002\\u0002U\\u0143\\u0003\\u0002\\u0002\\u0002W\\u0162\",\n \"\\u0003\\u0002\\u0002\\u0002Y\\u017c\\u0003\\u0002\\u0002\\u0002[\\u017e\\u0003\",\n \"\\u0002\\u0002\\u0002]\\u0187\\u0003\\u0002\\u0002\\u0002_\\u0192\\u0003\\u0002\",\n \"\\u0002\\u0002a\\u0194\\u0003\\u0002\\u0002\\u0002c\\u019b\\u0003\\u0002\\u0002\",\n \"\\u0002e\\u019f\\u0003\\u0002\\u0002\\u0002g\\u01a7\\u0003\\u0002\\u0002\\u0002\",\n \"i\\u01a9\\u0003\\u0002\\u0002\\u0002k\\u01ab\\u0003\\u0002\\u0002\\u0002m\\u01b1\",\n \"\\u0003\\u0002\\u0002\\u0002o\\u01be\\u0003\\u0002\\u0002\\u0002q\\u01c0\\u0003\",\n \"\\u0002\\u0002\\u0002s\\u01df\\u0003\\u0002\\u0002\\u0002uv\\u0007r\\u0002\\u0002\",\n \"vw\\u0007t\\u0002\\u0002wx\\u0007q\\u0002\\u0002xy\\u0007i\\u0002\\u0002yz\\u0007\",\n \"t\\u0002\\u0002z{\\u0007c\\u0002\\u0002{|\\u0007o\\u0002\\u0002|}\\u0007c\\u0002\",\n \"\\u0002}\\u0004\\u0003\\u0002\\u0002\\u0002~\\u007f\\u0007t\\u0002\\u0002\\u007f\",\n \"\\u0080\\u0007g\\u0002\\u0002\\u0080\\u0081\\u0007c\\u0002\\u0002\\u0081\\u0082\",\n \"\\u0007n\\u0002\\u0002\\u0082\\u0006\\u0003\\u0002\\u0002\\u0002\\u0083\\u0084\",\n \"\\u0007x\\u0002\\u0002\\u0084\\u0085\\u0007c\\u0002\\u0002\\u0085\\u0086\\u0007\",\n \"|\\u0002\\u0002\\u0086\\u0087\\u0007k\\u0002\\u0002\\u0087\\u0088\\u0007q\\u0002\",\n \"\\u0002\\u0088\\b\\u0003\\u0002\\u0002\\u0002\\u0089\\u008a\\u0007n\\u0002\\u0002\",\n \"\\u008a\\u008b\\u0007q\\u0002\\u0002\\u008b\\u008c\\u0007i\\u0002\\u0002\\u008c\",\n \"\\u008d\\u0007k\\u0002\\u0002\\u008d\\u008e\\u0007e\\u0002\\u0002\\u008e\\u008f\",\n \"\\u0007q\\u0002\\u0002\\u008f\\n\\u0003\\u0002\\u0002\\u0002\\u0090\\u0091\\u0007\",\n \"e\\u0002\\u0002\\u0091\\u0092\\u0007c\\u0002\\u0002\\u0092\\u0093\\u0007f\\u0002\",\n \"\\u0002\\u0093\\u0094\\u0007g\\u0002\\u0002\\u0094\\u0095\\u0007k\\u0002\\u0002\",\n \"\\u0095\\u0096\\u0007c\\u0002\\u0002\\u0096\\f\\u0003\\u0002\\u0002\\u0002\\u0097\",\n \"\\u0098\\u0007k\\u0002\\u0002\\u0098\\u0099\\u0007p\\u0002\\u0002\\u0099\\u009a\",\n \"\\u0007v\\u0002\\u0002\\u009a\\u009b\\u0007g\\u0002\\u0002\\u009b\\u009c\\u0007\",\n \"k\\u0002\\u0002\\u009c\\u009d\\u0007t\\u0002\\u0002\\u009d\\u009e\\u0007q\\u0002\",\n \"\\u0002\\u009e\\u000e\\u0003\\u0002\\u0002\\u0002\\u009f\\u00a0\\u0007e\\u0002\",\n \"\\u0002\\u00a0\\u00a1\\u0007c\\u0002\\u0002\\u00a1\\u00a2\\u0007t\\u0002\\u0002\",\n \"\\u00a2\\u00a3\\u0007c\\u0002\\u0002\\u00a3\\u00a4\\u0007e\\u0002\\u0002\\u00a4\",\n \"\\u00a5\\u0007v\\u0002\\u0002\\u00a5\\u00a6\\u0007g\\u0002\\u0002\\u00a6\\u00a7\",\n \"\\u0007t\\u0002\\u0002\\u00a7\\u00a8\\u0007g\\u0002\\u0002\\u00a8\\u0010\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00a9\\u00aa\\u0007g\\u0002\\u0002\\u00aa\\u00ab\\u0007\",\n \"u\\u0002\\u0002\\u00ab\\u00ac\\u0007e\\u0002\\u0002\\u00ac\\u00ad\\u0007q\\u0002\",\n \"\\u0002\\u00ad\\u00ae\\u0007n\\u0002\\u0002\\u00ae\\u00af\\u0007j\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007c\\u0002\\u0002\\u00b0\\u0012\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00b1\\u00b2\\u0007e\\u0002\\u0002\\u00b2\\u00b3\\u0007c\\u0002\\u0002\\u00b3\",\n \"\\u00b4\\u0007u\\u0002\\u0002\\u00b4\\u00b5\\u0007q\\u0002\\u0002\\u00b5\\u0014\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00b6\\u00b7\\u0007e\\u0002\\u0002\\u00b7\\u00b8\",\n \"\\u0007q\\u0002\\u0002\\u00b8\\u00b9\\u0007p\\u0002\\u0002\\u00b9\\u00ba\\u0007\",\n \"v\\u0002\\u0002\\u00ba\\u00bb\\u0007t\\u0002\\u0002\\u00bb\\u00bc\\u0007c\\u0002\",\n \"\\u0002\\u00bc\\u00bd\\u0007t\\u0002\\u0002\\u00bd\\u00be\\u0007k\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007q\\u0002\\u0002\\u00bf\\u0016\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00c0\\u00c1\\u0007e\\u0002\\u0002\\u00c1\\u00c2\\u0007q\\u0002\\u0002\\u00c2\",\n \"\\u00c3\\u0007p\\u0002\\u0002\\u00c3\\u00c4\\u0007u\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007v\\u0002\\u0002\\u00c5\\u0018\\u0003\\u0002\\u0002\\u0002\\u00c6\\u00c7\",\n \"\\u0007h\\u0002\\u0002\\u00c7\\u00c8\\u0007w\\u0002\\u0002\\u00c8\\u00c9\\u0007\",\n \"p\\u0002\\u0002\\u00c9\\u00ca\\u0007e\\u0002\\u0002\\u00ca\\u00cb\\u0007c\\u0002\",\n \"\\u0002\\u00cb\\u00cc\\u0007q\\u0002\\u0002\\u00cc\\u001a\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00cd\\u00ce\\u0007t\\u0002\\u0002\\u00ce\\u00cf\\u0007g\\u0002\\u0002\",\n \"\\u00cf\\u00d0\\u0007v\\u0002\\u0002\\u00d0\\u00d1\\u0007q\\u0002\\u0002\\u00d1\",\n \"\\u00d2\\u0007t\\u0002\\u0002\\u00d2\\u00d3\\u0007p\\u0002\\u0002\\u00d3\\u00d4\",\n \"\\u0007g\\u0002\\u0002\\u00d4\\u001c\\u0003\\u0002\\u0002\\u0002\\u00d5\\u00d6\",\n \"\\u0007r\\u0002\\u0002\\u00d6\\u00d7\\u0007c\\u0002\\u0002\\u00d7\\u00d8\\u0007\",\n \"t\\u0002\\u0002\\u00d8\\u00d9\\u0007c\\u0002\\u0002\\u00d9\\u001e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00da\\u00db\\u0007r\\u0002\\u0002\\u00db\\u00dc\\u0007c\\u0002\",\n \"\\u0002\\u00dc\\u00dd\\u0007t\\u0002\\u0002\\u00dd\\u00de\\u0007g\\u0002\\u0002\",\n \"\\u00de \\u0003\\u0002\\u0002\\u0002\\u00df\\u00e0\\u0007h\\u0002\\u0002\\u00e0\",\n \"\\u00e1\\u0007c\\u0002\\u0002\\u00e1\\u00e2\\u0007e\\u0002\\u0002\\u00e2\\u00e3\",\n \"\\u0007c\\u0002\\u0002\\u00e3\\\"\\u0003\\u0002\\u0002\\u0002\\u00e4\\u00e5\\u0007\",\n \"g\\u0002\\u0002\\u00e5\\u00e6\\u0007p\\u0002\\u0002\\u00e6\\u00e7\\u0007s\\u0002\",\n \"\\u0002\\u00e7\\u00e8\\u0007w\\u0002\\u0002\\u00e8\\u00e9\\u0007c\\u0002\\u0002\",\n \"\\u00e9\\u00ea\\u0007p\\u0002\\u0002\\u00ea\\u00eb\\u0007v\\u0002\\u0002\\u00eb\",\n \"\\u00ec\\u0007q\\u0002\\u0002\\u00ec$\\u0003\\u0002\\u0002\\u0002\\u00ed\\u00ee\",\n \"\\u0007u\\u0002\\u0002\\u00ee\\u00ef\\u0007g\\u0002\\u0002\\u00ef&\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00f0\\u00f1\\u0007u\\u0002\\u0002\\u00f1\\u00f2\\u0007g\\u0002\",\n \"\\u0002\\u00f2\\u00f3\\u0007p\\u0002\\u0002\\u00f3\\u00f4\\u0007c\\u0002\\u0002\",\n \"\\u00f4\\u00f5\\u0007q\\u0002\\u0002\\u00f5(\\u0003\\u0002\\u0002\\u0002\\u00f6\",\n \"\\u00f7\\u0007h\\u0002\\u0002\\u00f7\\u00f8\\u0007c\\u0002\\u0002\\u00f8\\u00f9\",\n \"\\u0007n\\u0002\\u0002\\u00f9\\u00fa\\u0007u\\u0002\\u0002\\u00fa\\u00fb\\u0007\",\n \"q\\u0002\\u0002\\u00fb*\\u0003\\u0002\\u0002\\u0002\\u00fc\\u00fd\\u0007x\\u0002\",\n \"\\u0002\\u00fd\\u00fe\\u0007g\\u0002\\u0002\\u00fe\\u00ff\\u0007t\\u0002\\u0002\",\n \"\\u00ff\\u0100\\u0007f\\u0002\\u0002\\u0100\\u0101\\u0007c\\u0002\\u0002\\u0101\",\n \"\\u0102\\u0007f\\u0002\\u0002\\u0102\\u0103\\u0007g\\u0002\\u0002\\u0103\\u0104\",\n \"\\u0007k\\u0002\\u0002\\u0104\\u0105\\u0007t\\u0002\\u0002\\u0105\\u0106\\u0007\",\n \"q\\u0002\\u0002\\u0106,\\u0003\\u0002\\u0002\\u0002\\u0107\\u0108\\u0007p\\u0002\",\n \"\\u0002\\u0108\\u0109\\u0007c\\u0002\\u0002\\u0109\\u010a\\u0007q\\u0002\\u0002\",\n \"\\u010a.\\u0003\\u0002\\u0002\\u0002\\u010b\\u010c\\u0007G\\u0002\\u0002\\u010c\",\n \"0\\u0003\\u0002\\u0002\\u0002\\u010d\\u010e\\u0007Q\\u0002\\u0002\\u010e\\u010f\",\n \"\\u0007W\\u0002\\u0002\\u010f2\\u0003\\u0002\\u0002\\u0002\\u0110\\u0111\\u0007\",\n \"(\\u0002\\u0002\\u01114\\u0003\\u0002\\u0002\\u0002\\u0112\\u0113\\u0007*\\u0002\",\n \"\\u0002\\u01136\\u0003\\u0002\\u0002\\u0002\\u0114\\u0115\\u0007+\\u0002\\u0002\",\n \"\\u01158\\u0003\\u0002\\u0002\\u0002\\u0116\\u0117\\u0007]\\u0002\\u0002\\u0117\",\n \":\\u0003\\u0002\\u0002\\u0002\\u0118\\u0119\\u0007_\\u0002\\u0002\\u0119<\\u0003\",\n \"\\u0002\\u0002\\u0002\\u011a\\u011b\\u0007}\\u0002\\u0002\\u011b>\\u0003\\u0002\",\n \"\\u0002\\u0002\\u011c\\u011d\\u0007\\u007f\\u0002\\u0002\\u011d@\\u0003\\u0002\",\n \"\\u0002\\u0002\\u011e\\u011f\\u0007.\\u0002\\u0002\\u011fB\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0120\\u0121\\u0007>\\u0002\\u0002\\u0121\\u0124\\u0007/\\u0002\\u0002\",\n \"\\u0122\\u0124\\u0007\\u2192\\u0002\\u0002\\u0123\\u0120\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0123\\u0122\\u0003\\u0002\\u0002\\u0002\\u0124D\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0125\\u0126\\t\\u0002\\u0002\\u0002\\u0126F\\u0003\\u0002\\u0002\\u0002\\u0127\",\n \"\\u0128\\t\\u0003\\u0002\\u0002\\u0128H\\u0003\\u0002\\u0002\\u0002\\u0129\\u012a\",\n \"\\u0005/\\u0018\\u0002\\u012aJ\\u0003\\u0002\\u0002\\u0002\\u012b\\u012c\\u0005\",\n \"1\\u0019\\u0002\\u012cL\\u0003\\u0002\\u0002\\u0002\\u012d\\u012e\\u0007@\\u0002\",\n \"\\u0002\\u012e\\u0137\\u0007?\\u0002\\u0002\\u012f\\u0130\\u0007?\\u0002\\u0002\",\n \"\\u0130\\u0137\\u0007?\\u0002\\u0002\\u0131\\u0132\\u0007>\\u0002\\u0002\\u0132\",\n \"\\u0137\\u0007?\\u0002\\u0002\\u0133\\u0137\\t\\u0004\\u0002\\u0002\\u0134\\u0135\",\n \"\\u0007#\\u0002\\u0002\\u0135\\u0137\\u0007?\\u0002\\u0002\\u0136\\u012d\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0136\\u012f\\u0003\\u0002\\u0002\\u0002\\u0136\\u0131\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0136\\u0133\\u0003\\u0002\\u0002\\u0002\\u0136\\u0134\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0137N\\u0003\\u0002\\u0002\\u0002\\u0138\\u0139\\u0007\",\n \"<\\u0002\\u0002\\u0139P\\u0003\\u0002\\u0002\\u0002\\u013a\\u013b\\u0005-\\u0017\",\n \"\\u0002\\u013bR\\u0003\\u0002\\u0002\\u0002\\u013c\\u0140\\t\\u0005\\u0002\\u0002\",\n \"\\u013d\\u013f\\t\\u0006\\u0002\\u0002\\u013e\\u013d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u013f\\u0142\\u0003\\u0002\\u0002\\u0002\\u0140\\u013e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0140\\u0141\\u0003\\u0002\\u0002\\u0002\\u0141T\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0142\\u0140\\u0003\\u0002\\u0002\\u0002\\u0143\\u0144\\u0005S*\\u0002\\u0144\",\n \"\\u0145\\u00070\\u0002\\u0002\\u0145\\u0146\\u0005S*\\u0002\\u0146V\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0147\\u0149\\t\\u0007\\u0002\\u0002\\u0148\\u0147\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0149\\u014a\\u0003\\u0002\\u0002\\u0002\\u014a\\u0148\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014a\\u014b\\u0003\\u0002\\u0002\\u0002\\u014b\\u0163\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014c\\u014d\\u00072\\u0002\\u0002\\u014d\\u0151\\u0007z\\u0002\",\n \"\\u0002\\u014e\\u014f\\u00072\\u0002\\u0002\\u014f\\u0151\\u0007Z\\u0002\\u0002\",\n \"\\u0150\\u014c\\u0003\\u0002\\u0002\\u0002\\u0150\\u014e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0151\\u0153\\u0003\\u0002\\u0002\\u0002\\u0152\\u0154\\u0005i5\\u0002\\u0153\",\n \"\\u0152\\u0003\\u0002\\u0002\\u0002\\u0154\\u0155\\u0003\\u0002\\u0002\\u0002\\u0155\",\n \"\\u0153\\u0003\\u0002\\u0002\\u0002\\u0155\\u0156\\u0003\\u0002\\u0002\\u0002\\u0156\",\n \"\\u0163\\u0003\\u0002\\u0002\\u0002\\u0157\\u0158\\u00072\\u0002\\u0002\\u0158\",\n \"\\u015c\\u0007d\\u0002\\u0002\\u0159\\u015a\\u00072\\u0002\\u0002\\u015a\\u015c\",\n \"\\u0007D\\u0002\\u0002\\u015b\\u0157\\u0003\\u0002\\u0002\\u0002\\u015b\\u0159\",\n \"\\u0003\\u0002\\u0002\\u0002\\u015c\\u015e\\u0003\\u0002\\u0002\\u0002\\u015d\\u015f\",\n \"\\t\\b\\u0002\\u0002\\u015e\\u015d\\u0003\\u0002\\u0002\\u0002\\u015f\\u0160\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0160\\u015e\\u0003\\u0002\\u0002\\u0002\\u0160\\u0161\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0161\\u0163\\u0003\\u0002\\u0002\\u0002\\u0162\\u0148\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0162\\u0150\\u0003\\u0002\\u0002\\u0002\\u0162\\u015b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0163X\\u0003\\u0002\\u0002\\u0002\\u0164\\u0166\\t\\u0007\",\n \"\\u0002\\u0002\\u0165\\u0164\\u0003\\u0002\\u0002\\u0002\\u0166\\u0167\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0167\\u0165\\u0003\\u0002\\u0002\\u0002\\u0167\\u0168\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0168\\u0169\\u0003\\u0002\\u0002\\u0002\\u0169\\u016b\\u00070\",\n \"\\u0002\\u0002\\u016a\\u016c\\t\\u0007\\u0002\\u0002\\u016b\\u016a\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016c\\u016d\\u0003\\u0002\\u0002\\u0002\\u016d\\u016b\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016d\\u016e\\u0003\\u0002\\u0002\\u0002\\u016e\\u017d\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016f\\u0171\\t\\u0007\\u0002\\u0002\\u0170\\u016f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0171\\u0172\\u0003\\u0002\\u0002\\u0002\\u0172\\u0170\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0172\\u0173\\u0003\\u0002\\u0002\\u0002\\u0173\\u0174\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0174\\u0178\\u00070\\u0002\\u0002\\u0175\\u0177\\t\\u0007\\u0002\",\n \"\\u0002\\u0176\\u0175\\u0003\\u0002\\u0002\\u0002\\u0177\\u017a\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0178\\u0176\\u0003\\u0002\\u0002\\u0002\\u0178\\u0179\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0179\\u017b\\u0003\\u0002\\u0002\\u0002\\u017a\\u0178\\u0003\\u0002\\u0002\",\n \"\\u0002\\u017b\\u017d\\u0005[.\\u0002\\u017c\\u0165\\u0003\\u0002\\u0002\\u0002\",\n \"\\u017c\\u0170\\u0003\\u0002\\u0002\\u0002\\u017dZ\\u0003\\u0002\\u0002\\u0002\",\n \"\\u017e\\u0180\\t\\t\\u0002\\u0002\\u017f\\u0181\\t\\u0002\\u0002\\u0002\\u0180\\u017f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0180\\u0181\\u0003\\u0002\\u0002\\u0002\\u0181\\u0183\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0182\\u0184\\t\\u0007\\u0002\\u0002\\u0183\\u0182\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0184\\u0185\\u0003\\u0002\\u0002\\u0002\\u0185\\u0183\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0185\\u0186\\u0003\\u0002\\u0002\\u0002\\u0186\\\\\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0187\\u018b\\u0007$\\u0002\\u0002\\u0188\\u018a\",\n \"\\u0005_0\\u0002\\u0189\\u0188\\u0003\\u0002\\u0002\\u0002\\u018a\\u018d\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018b\\u0189\\u0003\\u0002\\u0002\\u0002\\u018b\\u018c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018c\\u018e\\u0003\\u0002\\u0002\\u0002\\u018d\\u018b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018e\\u018f\\u0007$\\u0002\\u0002\\u018f^\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0190\\u0193\\n\\n\\u0002\\u0002\\u0191\\u0193\\u0005m7\\u0002\\u0192\",\n \"\\u0190\\u0003\\u0002\\u0002\\u0002\\u0192\\u0191\\u0003\\u0002\\u0002\\u0002\\u0193\",\n \"`\\u0003\\u0002\\u0002\\u0002\\u0194\\u0197\\u0007)\\u0002\\u0002\\u0195\\u0198\",\n \"\\u0005m7\\u0002\\u0196\\u0198\\n\\u000b\\u0002\\u0002\\u0197\\u0195\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0197\\u0196\\u0003\\u0002\\u0002\\u0002\\u0198\\u0199\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0199\\u019a\\u0007)\\u0002\\u0002\\u019ab\\u0003\\u0002\\u0002\",\n \"\\u0002\\u019b\\u019c\\t\\f\\u0002\\u0002\\u019c\\u019d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u019d\\u019e\\b2\\u0002\\u0002\\u019ed\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a0\",\n \"\\u0007=\\u0002\\u0002\\u01a0f\\u0003\\u0002\\u0002\\u0002\\u01a1\\u01a3\\t\\r\\u0002\",\n \"\\u0002\\u01a2\\u01a1\\u0003\\u0002\\u0002\\u0002\\u01a3\\u01a4\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01a4\\u01a2\\u0003\\u0002\\u0002\\u0002\\u01a4\\u01a5\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01a5\\u01a8\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a8\\u0005e3\\u0002\",\n \"\\u01a7\\u01a2\\u0003\\u0002\\u0002\\u0002\\u01a7\\u01a6\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01a8h\\u0003\\u0002\\u0002\\u0002\\u01a9\\u01aa\\t\\u000e\\u0002\\u0002\\u01aa\",\n \"j\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01ac\\t\\u000f\\u0002\\u0002\\u01acl\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01ad\\u01ae\\u0007^\\u0002\\u0002\\u01ae\\u01b2\\t\\u0010\",\n \"\\u0002\\u0002\\u01af\\u01b2\\u0005q9\\u0002\\u01b0\\u01b2\\u0005o8\\u0002\\u01b1\",\n \"\\u01ad\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b1\",\n \"\\u01b0\\u0003\\u0002\\u0002\\u0002\\u01b2n\\u0003\\u0002\\u0002\\u0002\\u01b3\",\n \"\\u01b4\\u0007^\\u0002\\u0002\\u01b4\\u01b5\\t\\u0011\\u0002\\u0002\\u01b5\\u01b6\",\n \"\\u0005k6\\u0002\\u01b6\\u01b7\\u0005k6\\u0002\\u01b7\\u01bf\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01b8\\u01b9\\u0007^\\u0002\\u0002\\u01b9\\u01ba\\u0005k6\\u0002\\u01ba\",\n \"\\u01bb\\u0005k6\\u0002\\u01bb\\u01bf\\u0003\\u0002\\u0002\\u0002\\u01bc\\u01bd\",\n \"\\u0007^\\u0002\\u0002\\u01bd\\u01bf\\u0005k6\\u0002\\u01be\\u01b3\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01be\\u01b8\\u0003\\u0002\\u0002\\u0002\\u01be\\u01bc\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01bfp\\u0003\\u0002\\u0002\\u0002\\u01c0\\u01c1\\u0007^\\u0002\",\n \"\\u0002\\u01c1\\u01c2\\u0007w\\u0002\\u0002\\u01c2\\u01c3\\u0005i5\\u0002\\u01c3\",\n \"\\u01c4\\u0005i5\\u0002\\u01c4\\u01c5\\u0005i5\\u0002\\u01c5\\u01c6\\u0005i5\\u0002\",\n \"\\u01c6r\\u0003\\u0002\\u0002\\u0002\\u01c7\\u01c8\\u00071\\u0002\\u0002\\u01c8\",\n \"\\u01c9\\u00071\\u0002\\u0002\\u01c9\\u01cd\\u0003\\u0002\\u0002\\u0002\\u01ca\",\n \"\\u01cc\\n\\r\\u0002\\u0002\\u01cb\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cc\\u01cf\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01cb\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01ce\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ce\\u01d1\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01cd\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d0\\u01d2\\u0007\\u000f\\u0002\\u0002\\u01d1\\u01d0\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d1\\u01d2\\u0003\\u0002\\u0002\\u0002\\u01d2\\u01d3\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d3\\u01e0\\u0007\\f\\u0002\\u0002\\u01d4\\u01d5\",\n \"\\u00071\\u0002\\u0002\\u01d5\\u01d6\\u0007,\\u0002\\u0002\\u01d6\\u01da\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01d7\\u01d9\\u000b\\u0002\\u0002\\u0002\\u01d8\\u01d7\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01d9\\u01dc\\u0003\\u0002\\u0002\\u0002\\u01da\\u01db\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01da\\u01d8\\u0003\\u0002\\u0002\\u0002\\u01db\\u01dd\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01dc\\u01da\\u0003\\u0002\\u0002\\u0002\\u01dd\\u01de\\u0007\",\n \",\\u0002\\u0002\\u01de\\u01e0\\u00071\\u0002\\u0002\\u01df\\u01c7\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01df\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01e0\\u01e1\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e1\\u01e2\\b:\\u0003\\u0002\\u01e2t\\u0003\\u0002\\u0002\\u0002\",\n \"\\u001e\\u0002\\u0123\\u0136\\u0140\\u014a\\u0150\\u0155\\u015b\\u0160\\u0162\\u0167\",\n \"\\u016d\\u0172\\u0178\\u017c\\u0180\\u0185\\u018b\\u0192\\u0197\\u01a4\\u01a7\\u01b1\",\n \"\\u01be\\u01cd\\u01d1\\u01da\\u01df\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_BREAK = 15;\nivprog.RK_DO = 16;\nivprog.RK_WHILE = 17;\nivprog.RK_IF = 18;\nivprog.RK_ELSE = 19;\nivprog.RK_FALSE = 20;\nivprog.RK_TRUE = 21;\nivprog.RK_REFERENCE = 22;\nivprog.OPEN_PARENTHESIS = 23;\nivprog.CLOSE_PARENTHESIS = 24;\nivprog.OPEN_BRACE = 25;\nivprog.CLOSE_BRACE = 26;\nivprog.OPEN_CURLY = 27;\nivprog.CLOSE_CURLY = 28;\nivprog.COMMA = 29;\nivprog.EQUAL = 30;\nivprog.SUM_OP = 31;\nivprog.MULTI_OP = 32;\nivprog.AND_OPERATOR = 33;\nivprog.OR_OPERATOR = 34;\nivprog.RELATIONAL_OPERATOR = 35;\nivprog.COLON = 36;\nivprog.NOT_OPERATOR = 37;\nivprog.ID = 38;\nivprog.LIB_ID = 39;\nivprog.INTEGER = 40;\nivprog.REAL = 41;\nivprog.STRING = 42;\nivprog.CHARACTER = 43;\nivprog.WHITESPACE = 44;\nivprog.EOS = 45;\nivprog.COMMENTS = 46;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'programa'\", \"'real'\", \"'vazio'\", \n \"'logico'\", \"'cadeia'\", \"'inteiro'\", \"'caractere'\", \n \"'escolha'\", \"'caso'\", \"'contrario'\", \n \"'const'\", \"'funcao'\", \"'retorne'\", \"'para'\", \n \"'pare'\", \"'faca'\", \"'enquanto'\", \"'se'\", \n \"'senao'\", \"'falso'\", \"'verdadeiro'\", \n \"'&'\", \"'('\", \"')'\", \"'['\", \"']'\", \"'{'\", \n \"'}'\", \"','\", null, null, null, null, \n null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_BREAK\", \"RK_DO\", \n \"RK_WHILE\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_BREAK\", \n \"RK_DO\", \"RK_WHILE\", \"RK_IF\", \"RK_ELSE\", \n \"RK_FALSE\", \"RK_TRUE\", \"RK_LOGICAL_NOT\", \n \"RK_LOGICAL_AND\", \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \n \"OPEN_PARENTHESIS\", \"CLOSE_PARENTHESIS\", \n \"OPEN_BRACE\", \"CLOSE_BRACE\", \"OPEN_CURLY\", \n \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \"SUM_OP\", \n \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\"\n}\n","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Mathematic\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversion\"\n}","import * as PT from './pt/ivprog.g4';\nimport PTFuncs from './pt/langFunctions';\nimport PTLibs from './pt/langLibs';\nimport * as EN from './en/ivprog.g4';\nimport ENFuncs from './en/langFunctions';\nimport ENLibs from './en/langLibs';\nimport * as ES from './es/ivprog.g4';\nimport ESFuncs from './es/langFunctions';\nimport ESLibs from './es/langLibs';\n\nexport default {\n pt: {lexer: PT.ivprog, langFuncs: PTFuncs, langLibs: PTLibs},\n en: {lexer: EN.ivprog, langFuncs: ENFuncs, langLibs: ENLibs},\n es: {lexer: ES.ivprog, langFuncs: ESFuncs, langLibs: ESLibs}\n}\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-12601ui1vFcDRBaer/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0222\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001e\\u0003\\u001e\\u0003\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003\",\n \" \\u0003!\\u0003!\\u0003\\\"\\u0003\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003\",\n \"%\\u0003&\\u0003&\\u0003\\'\\u0003\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0163\\n\",\n \"(\\u0003)\\u0003)\\u0003*\\u0003*\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0005-\\u0176\\n-\\u0003\",\n \".\\u0003.\\u0003/\\u0003/\\u00030\\u00030\\u00070\\u017e\\n0\\f0\\u000e0\\u0181\",\n \"\\u000b0\\u00031\\u00031\\u00031\\u00031\\u00032\\u00062\\u0188\\n2\\r2\\u000e\",\n \"2\\u0189\\u00032\\u00032\\u00032\\u00032\\u00052\\u0190\\n2\\u00032\\u00062\\u0193\",\n \"\\n2\\r2\\u000e2\\u0194\\u00032\\u00032\\u00032\\u00032\\u00052\\u019b\\n2\\u0003\",\n \"2\\u00062\\u019e\\n2\\r2\\u000e2\\u019f\\u00052\\u01a2\\n2\\u00033\\u00063\\u01a5\",\n \"\\n3\\r3\\u000e3\\u01a6\\u00033\\u00033\\u00063\\u01ab\\n3\\r3\\u000e3\\u01ac\\u0003\",\n \"3\\u00063\\u01b0\\n3\\r3\\u000e3\\u01b1\\u00033\\u00033\\u00073\\u01b6\\n3\\f3\\u000e\",\n \"3\\u01b9\\u000b3\\u00033\\u00053\\u01bc\\n3\\u00034\\u00034\\u00054\\u01c0\\n4\",\n \"\\u00034\\u00064\\u01c3\\n4\\r4\\u000e4\\u01c4\\u00035\\u00035\\u00075\\u01c9\\n\",\n \"5\\f5\\u000e5\\u01cc\\u000b5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01d2\\n\",\n \"6\\u00037\\u00037\\u00037\\u00057\\u01d7\\n7\\u00037\\u00037\\u00038\\u00038\\u0003\",\n \"8\\u00038\\u00039\\u00039\\u0003:\\u0006:\\u01e2\\n:\\r:\\u000e:\\u01e3\\u0003\",\n \":\\u0005:\\u01e7\\n:\\u0003;\\u0003;\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003\",\n \"=\\u0005=\\u01f1\\n=\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0005>\\u01fe\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003\",\n \"?\\u0003?\\u0003?\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u020b\\n@\\f@\\u000e\",\n \"@\\u020e\\u000b@\\u0003@\\u0005@\\u0211\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003\",\n \"@\\u0007@\\u0218\\n@\\f@\\u000e@\\u021b\\u000b@\\u0003@\\u0003@\\u0005@\\u021f\",\n \"\\n@\\u0003@\\u0003@\\u0003\\u0219\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\",\n \"\\t\\u0006\\u000b\\u0007\\r\\b\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\",\n \"\\u0019\\u000e\\u001b\\u000f\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\",\n \"\\'\\u0015)\\u0016+\\u0017-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002\",\n \";\\u0002=\\u0002?\\u001eA\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\",\n \"\\u0002i2k\\u0002m3o4q\\u0002s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f\",\n \"6\\u0003\\u0002\\u0012\\u0004\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002\",\n \">>@@\\u0005\\u0002C\\\\aac|\\u0006\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u0002\",\n \"23\\u0004\\u0002GGgg\\u0006\\u0002\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\",\n \"\\u000f))^^\\u0004\\u0002\\u000b\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\",\n \"\\u00022;CHch\\u0003\\u000229\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\",\n \"\\u0237\\u0002\\u0003\\u0003\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0007\\u0003\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0003\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000f\\u0003\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0013\\u0003\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0017\\u0003\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001b\\u0003\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001f\\u0003\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002#\\u0003\\u0002\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\'\\u0003\\u0002\\u0002\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"+\\u0003\\u0002\\u0002\\u0002\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00021\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00025\\u0003\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002?\\u0003\\u0002\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002C\\u0003\\u0002\\u0002\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"G\\u0003\\u0002\\u0002\\u0002\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002Q\\u0003\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002U\\u0003\\u0002\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002Y\\u0003\\u0002\\u0002\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"]\\u0003\\u0002\\u0002\\u0002\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002i\\u0003\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002o\\u0003\\u0002\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0003\\u0002\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0005\\u008a\\u0003\\u0002\\u0002\\u0002\\u0007\\u008f\\u0003\\u0002\\u0002\\u0002\",\n \"\\t\\u0095\\u0003\\u0002\\u0002\\u0002\\u000b\\u009c\\u0003\\u0002\\u0002\\u0002\",\n \"\\r\\u00a3\\u0003\\u0002\\u0002\\u0002\\u000f\\u00ab\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0011\\u00b5\\u0003\\u0002\\u0002\\u0002\\u0013\\u00bd\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0015\\u00c2\\u0003\\u0002\\u0002\\u0002\\u0017\\u00cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0019\\u00d2\\u0003\\u0002\\u0002\\u0002\\u001b\\u00d9\\u0003\\u0002\\u0002\\u0002\",\n \"\\u001d\\u00e1\\u0003\\u0002\\u0002\\u0002\\u001f\\u00e6\\u0003\\u0002\\u0002\\u0002\",\n \"!\\u00f2\\u0003\\u0002\\u0002\\u0002#\\u00f5\\u0003\\u0002\\u0002\\u0002%\\u00f9\",\n \"\\u0003\\u0002\\u0002\\u0002\\'\\u00ff\\u0003\\u0002\\u0002\\u0002)\\u0104\\u0003\",\n \"\\u0002\\u0002\\u0002+\\u010b\\u0003\\u0002\\u0002\\u0002-\\u0113\\u0003\\u0002\",\n \"\\u0002\\u0002/\\u011c\\u0003\\u0002\\u0002\\u00021\\u012c\\u0003\\u0002\\u0002\",\n \"\\u00023\\u012f\\u0003\\u0002\\u0002\\u00025\\u0135\\u0003\\u0002\\u0002\\u0002\",\n \"7\\u013b\\u0003\\u0002\\u0002\\u00029\\u0146\\u0003\\u0002\\u0002\\u0002;\\u014a\",\n \"\\u0003\\u0002\\u0002\\u0002=\\u014c\\u0003\\u0002\\u0002\\u0002?\\u014f\\u0003\",\n \"\\u0002\\u0002\\u0002A\\u0151\\u0003\\u0002\\u0002\\u0002C\\u0153\\u0003\\u0002\",\n \"\\u0002\\u0002E\\u0155\\u0003\\u0002\\u0002\\u0002G\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002I\\u0159\\u0003\\u0002\\u0002\\u0002K\\u015b\\u0003\\u0002\\u0002\\u0002\",\n \"M\\u015d\\u0003\\u0002\\u0002\\u0002O\\u0162\\u0003\\u0002\\u0002\\u0002Q\\u0164\",\n \"\\u0003\\u0002\\u0002\\u0002S\\u0166\\u0003\\u0002\\u0002\\u0002U\\u0168\\u0003\",\n \"\\u0002\\u0002\\u0002W\\u016a\\u0003\\u0002\\u0002\\u0002Y\\u0175\\u0003\\u0002\",\n \"\\u0002\\u0002[\\u0177\\u0003\\u0002\\u0002\\u0002]\\u0179\\u0003\\u0002\\u0002\",\n \"\\u0002_\\u017b\\u0003\\u0002\\u0002\\u0002a\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"c\\u01a1\\u0003\\u0002\\u0002\\u0002e\\u01bb\\u0003\\u0002\\u0002\\u0002g\\u01bd\",\n \"\\u0003\\u0002\\u0002\\u0002i\\u01c6\\u0003\\u0002\\u0002\\u0002k\\u01d1\\u0003\",\n \"\\u0002\\u0002\\u0002m\\u01d3\\u0003\\u0002\\u0002\\u0002o\\u01da\\u0003\\u0002\",\n \"\\u0002\\u0002q\\u01de\\u0003\\u0002\\u0002\\u0002s\\u01e6\\u0003\\u0002\\u0002\",\n \"\\u0002u\\u01e8\\u0003\\u0002\\u0002\\u0002w\\u01ea\\u0003\\u0002\\u0002\\u0002\",\n \"y\\u01f0\\u0003\\u0002\\u0002\\u0002{\\u01fd\\u0003\\u0002\\u0002\\u0002}\\u01ff\",\n \"\\u0003\\u0002\\u0002\\u0002\\u007f\\u021e\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\",\n \"\\u0007r\\u0002\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007\",\n \"q\\u0002\\u0002\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\",\n \"\\u0002\\u0086\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\",\n \"\\u0088\\u0089\\u0007c\\u0002\\u0002\\u0089\\u0004\\u0003\\u0002\\u0002\\u0002\",\n \"\\u008a\\u008b\\u0007t\\u0002\\u0002\\u008b\\u008c\\u0007g\\u0002\\u0002\\u008c\",\n \"\\u008d\\u0007c\\u0002\\u0002\\u008d\\u008e\\u0007n\\u0002\\u0002\\u008e\\u0006\",\n \"\\u0003\\u0002\\u0002\\u0002\\u008f\\u0090\\u0007x\\u0002\\u0002\\u0090\\u0091\",\n \"\\u0007c\\u0002\\u0002\\u0091\\u0092\\u0007|\\u0002\\u0002\\u0092\\u0093\\u0007\",\n \"k\\u0002\\u0002\\u0093\\u0094\\u0007q\\u0002\\u0002\\u0094\\b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0095\\u0096\\u0007n\\u0002\\u0002\\u0096\\u0097\\u0007q\\u0002\\u0002\",\n \"\\u0097\\u0098\\u0007i\\u0002\\u0002\\u0098\\u0099\\u0007k\\u0002\\u0002\\u0099\",\n \"\\u009a\\u0007e\\u0002\\u0002\\u009a\\u009b\\u0007q\\u0002\\u0002\\u009b\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u009c\\u009d\\u0007e\\u0002\\u0002\\u009d\\u009e\\u0007\",\n \"c\\u0002\\u0002\\u009e\\u009f\\u0007f\\u0002\\u0002\\u009f\\u00a0\\u0007g\\u0002\",\n \"\\u0002\\u00a0\\u00a1\\u0007k\\u0002\\u0002\\u00a1\\u00a2\\u0007c\\u0002\\u0002\",\n \"\\u00a2\\f\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007k\\u0002\\u0002\\u00a4\",\n \"\\u00a5\\u0007p\\u0002\\u0002\\u00a5\\u00a6\\u0007v\\u0002\\u0002\\u00a6\\u00a7\",\n \"\\u0007g\\u0002\\u0002\\u00a7\\u00a8\\u0007k\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"t\\u0002\\u0002\\u00a9\\u00aa\\u0007q\\u0002\\u0002\\u00aa\\u000e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00ab\\u00ac\\u0007e\\u0002\\u0002\\u00ac\\u00ad\\u0007c\\u0002\",\n \"\\u0002\\u00ad\\u00ae\\u0007t\\u0002\\u0002\\u00ae\\u00af\\u0007c\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007v\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007g\\u0002\\u0002\\u00b2\\u00b3\\u0007t\\u0002\\u0002\\u00b3\\u00b4\",\n \"\\u0007g\\u0002\\u0002\\u00b4\\u0010\\u0003\\u0002\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007g\\u0002\\u0002\\u00b6\\u00b7\\u0007u\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"e\\u0002\\u0002\\u00b8\\u00b9\\u0007q\\u0002\\u0002\\u00b9\\u00ba\\u0007n\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007j\\u0002\\u0002\\u00bb\\u00bc\\u0007c\\u0002\\u0002\",\n \"\\u00bc\\u0012\\u0003\\u0002\\u0002\\u0002\\u00bd\\u00be\\u0007e\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007c\\u0002\\u0002\\u00bf\\u00c0\\u0007u\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007q\\u0002\\u0002\\u00c1\\u0014\\u0003\\u0002\\u0002\\u0002\\u00c2\",\n \"\\u00c3\\u0007e\\u0002\\u0002\\u00c3\\u00c4\\u0007q\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007p\\u0002\\u0002\\u00c5\\u00c6\\u0007v\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"t\\u0002\\u0002\\u00c7\\u00c8\\u0007c\\u0002\\u0002\\u00c8\\u00c9\\u0007t\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u0016\\u0003\\u0002\\u0002\\u0002\\u00cc\\u00cd\\u0007e\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007q\\u0002\\u0002\\u00ce\\u00cf\\u0007p\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007u\\u0002\\u0002\\u00d0\\u00d1\\u0007v\\u0002\\u0002\\u00d1\\u0018\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00d2\\u00d3\\u0007h\\u0002\\u0002\\u00d3\\u00d4\",\n \"\\u0007w\\u0002\\u0002\\u00d4\\u00d5\\u0007p\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"e\\u0002\\u0002\\u00d6\\u00d7\\u0007c\\u0002\\u0002\\u00d7\\u00d8\\u0007q\\u0002\",\n \"\\u0002\\u00d8\\u001a\\u0003\\u0002\\u0002\\u0002\\u00d9\\u00da\\u0007f\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007g\\u0002\\u0002\\u00db\\u00dc\\u0007x\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007q\\u0002\\u0002\\u00dd\\u00de\\u0007n\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007x\\u0002\\u0002\\u00df\\u00e0\\u0007c\\u0002\\u0002\\u00e0\\u001c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00e1\\u00e2\\u0007r\\u0002\\u0002\\u00e2\\u00e3\",\n \"\\u0007c\\u0002\\u0002\\u00e3\\u00e4\\u0007t\\u0002\\u0002\\u00e4\\u00e5\\u0007\",\n \"c\\u0002\\u0002\\u00e5\\u001e\\u0003\\u0002\\u0002\\u0002\\u00e6\\u00e7\\u0007\",\n \"t\\u0002\\u0002\\u00e7\\u00e8\\u0007g\\u0002\\u0002\\u00e8\\u00e9\\u0007r\\u0002\",\n \"\\u0002\\u00e9\\u00ea\\u0007k\\u0002\\u0002\\u00ea\\u00eb\\u0007v\\u0002\\u0002\",\n \"\\u00eb\\u00ec\\u0007c\\u0002\\u0002\\u00ec\\u00ed\\u0007a\\u0002\\u0002\\u00ed\",\n \"\\u00ee\\u0007r\\u0002\\u0002\\u00ee\\u00ef\\u0007c\\u0002\\u0002\\u00ef\\u00f0\",\n \"\\u0007t\\u0002\\u0002\\u00f0\\u00f1\\u0007c\\u0002\\u0002\\u00f1 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00f2\\u00f3\\u0007f\\u0002\\u0002\\u00f3\\u00f4\\u0007g\\u0002\",\n \"\\u0002\\u00f4\\\"\\u0003\\u0002\\u0002\\u0002\\u00f5\\u00f6\\u0007c\\u0002\\u0002\",\n \"\\u00f6\\u00f7\\u0007v\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\",\n \"$\\u0003\\u0002\\u0002\\u0002\\u00f9\\u00fa\\u0007r\\u0002\\u0002\\u00fa\\u00fb\",\n \"\\u0007c\\u0002\\u0002\\u00fb\\u00fc\\u0007u\\u0002\\u0002\\u00fc\\u00fd\\u0007\",\n \"u\\u0002\\u0002\\u00fd\\u00fe\\u0007q\\u0002\\u0002\\u00fe&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00ff\\u0100\\u0007r\\u0002\\u0002\\u0100\\u0101\\u0007c\\u0002\\u0002\",\n \"\\u0101\\u0102\\u0007t\\u0002\\u0002\\u0102\\u0103\\u0007g\\u0002\\u0002\\u0103\",\n \"(\\u0003\\u0002\\u0002\\u0002\\u0104\\u0105\\u0007t\\u0002\\u0002\\u0105\\u0106\",\n \"\\u0007g\\u0002\\u0002\\u0106\\u0107\\u0007r\\u0002\\u0002\\u0107\\u0108\\u0007\",\n \"k\\u0002\\u0002\\u0108\\u0109\\u0007v\\u0002\\u0002\\u0109\\u010a\\u0007c\\u0002\",\n \"\\u0002\\u010a*\\u0003\\u0002\\u0002\\u0002\\u010b\\u010c\\u0007c\\u0002\\u0002\",\n \"\\u010c\\u010d\\u0007v\\u0002\\u0002\\u010d\\u010e\\u0007g\\u0002\\u0002\\u010e\",\n \"\\u010f\\u0007a\\u0002\\u0002\\u010f\\u0110\\u0007s\\u0002\\u0002\\u0110\\u0111\",\n \"\\u0007w\\u0002\\u0002\\u0111\\u0112\\u0007g\\u0002\\u0002\\u0112,\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0113\\u0114\\u0007g\\u0002\\u0002\\u0114\\u0115\\u0007p\\u0002\",\n \"\\u0002\\u0115\\u0116\\u0007s\\u0002\\u0002\\u0116\\u0117\\u0007w\\u0002\\u0002\",\n \"\\u0117\\u0118\\u0007c\\u0002\\u0002\\u0118\\u0119\\u0007p\\u0002\\u0002\\u0119\",\n \"\\u011a\\u0007v\\u0002\\u0002\\u011a\\u011b\\u0007q\\u0002\\u0002\\u011b.\\u0003\",\n \"\\u0002\\u0002\\u0002\\u011c\\u011d\\u0007t\\u0002\\u0002\\u011d\\u011e\\u0007\",\n \"g\\u0002\\u0002\\u011e\\u011f\\u0007r\\u0002\\u0002\\u011f\\u0120\\u0007k\\u0002\",\n \"\\u0002\\u0120\\u0121\\u0007v\\u0002\\u0002\\u0121\\u0122\\u0007c\\u0002\\u0002\",\n \"\\u0122\\u0123\\u0007a\\u0002\\u0002\\u0123\\u0124\\u0007g\\u0002\\u0002\\u0124\",\n \"\\u0125\\u0007p\\u0002\\u0002\\u0125\\u0126\\u0007s\\u0002\\u0002\\u0126\\u0127\",\n \"\\u0007w\\u0002\\u0002\\u0127\\u0128\\u0007c\\u0002\\u0002\\u0128\\u0129\\u0007\",\n \"p\\u0002\\u0002\\u0129\\u012a\\u0007v\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\",\n \"\\u0002\\u012b0\\u0003\\u0002\\u0002\\u0002\\u012c\\u012d\\u0007u\\u0002\\u0002\",\n \"\\u012d\\u012e\\u0007g\\u0002\\u0002\\u012e2\\u0003\\u0002\\u0002\\u0002\\u012f\",\n \"\\u0130\\u0007u\\u0002\\u0002\\u0130\\u0131\\u0007g\\u0002\\u0002\\u0131\\u0132\",\n \"\\u0007p\\u0002\\u0002\\u0132\\u0133\\u0007c\\u0002\\u0002\\u0133\\u0134\\u0007\",\n \"q\\u0002\\u0002\\u01344\\u0003\\u0002\\u0002\\u0002\\u0135\\u0136\\u0007h\\u0002\",\n \"\\u0002\\u0136\\u0137\\u0007c\\u0002\\u0002\\u0137\\u0138\\u0007n\\u0002\\u0002\",\n \"\\u0138\\u0139\\u0007u\\u0002\\u0002\\u0139\\u013a\\u0007q\\u0002\\u0002\\u013a\",\n \"6\\u0003\\u0002\\u0002\\u0002\\u013b\\u013c\\u0007x\\u0002\\u0002\\u013c\\u013d\",\n \"\\u0007g\\u0002\\u0002\\u013d\\u013e\\u0007t\\u0002\\u0002\\u013e\\u013f\\u0007\",\n \"f\\u0002\\u0002\\u013f\\u0140\\u0007c\\u0002\\u0002\\u0140\\u0141\\u0007f\\u0002\",\n \"\\u0002\\u0141\\u0142\\u0007g\\u0002\\u0002\\u0142\\u0143\\u0007k\\u0002\\u0002\",\n \"\\u0143\\u0144\\u0007t\\u0002\\u0002\\u0144\\u0145\\u0007q\\u0002\\u0002\\u0145\",\n \"8\\u0003\\u0002\\u0002\\u0002\\u0146\\u0147\\u0007p\\u0002\\u0002\\u0147\\u0148\",\n \"\\u0007c\\u0002\\u0002\\u0148\\u0149\\u0007q\\u0002\\u0002\\u0149:\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014a\\u014b\\u0007G\\u0002\\u0002\\u014b<\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014c\\u014d\\u0007Q\\u0002\\u0002\\u014d\\u014e\\u0007W\\u0002\\u0002\",\n \"\\u014e>\\u0003\\u0002\\u0002\\u0002\\u014f\\u0150\\u0007(\\u0002\\u0002\\u0150\",\n \"@\\u0003\\u0002\\u0002\\u0002\\u0151\\u0152\\u0007*\\u0002\\u0002\\u0152B\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0153\\u0154\\u0007+\\u0002\\u0002\\u0154D\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0155\\u0156\\u0007]\\u0002\\u0002\\u0156F\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0157\\u0158\\u0007_\\u0002\\u0002\\u0158H\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0159\\u015a\\u0007}\\u0002\\u0002\\u015aJ\\u0003\\u0002\\u0002\\u0002\\u015b\",\n \"\\u015c\\u0007\\u007f\\u0002\\u0002\\u015cL\\u0003\\u0002\\u0002\\u0002\\u015d\",\n \"\\u015e\\u0007.\\u0002\\u0002\\u015eN\\u0003\\u0002\\u0002\\u0002\\u015f\\u0160\",\n \"\\u0007>\\u0002\\u0002\\u0160\\u0163\\u0007/\\u0002\\u0002\\u0161\\u0163\\u0007\",\n \"\\u2192\\u0002\\u0002\\u0162\\u015f\\u0003\\u0002\\u0002\\u0002\\u0162\\u0161\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0163P\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\t\\u0002\",\n \"\\u0002\\u0002\\u0165R\\u0003\\u0002\\u0002\\u0002\\u0166\\u0167\\t\\u0003\\u0002\",\n \"\\u0002\\u0167T\\u0003\\u0002\\u0002\\u0002\\u0168\\u0169\\u0005;\\u001e\\u0002\",\n \"\\u0169V\\u0003\\u0002\\u0002\\u0002\\u016a\\u016b\\u0005=\\u001f\\u0002\\u016b\",\n \"X\\u0003\\u0002\\u0002\\u0002\\u016c\\u016d\\u0007@\\u0002\\u0002\\u016d\\u0176\",\n \"\\u0007?\\u0002\\u0002\\u016e\\u016f\\u0007?\\u0002\\u0002\\u016f\\u0176\\u0007\",\n \"?\\u0002\\u0002\\u0170\\u0171\\u0007>\\u0002\\u0002\\u0171\\u0176\\u0007?\\u0002\",\n \"\\u0002\\u0172\\u0176\\t\\u0004\\u0002\\u0002\\u0173\\u0174\\u0007#\\u0002\\u0002\",\n \"\\u0174\\u0176\\u0007?\\u0002\\u0002\\u0175\\u016c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u016e\\u0003\\u0002\\u0002\\u0002\\u0175\\u0170\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u0172\\u0003\\u0002\\u0002\\u0002\\u0175\\u0173\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0176Z\\u0003\\u0002\\u0002\\u0002\\u0177\\u0178\\u0007<\\u0002\\u0002\\u0178\",\n \"\\\\\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u00059\\u001d\\u0002\\u017a^\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017b\\u017f\\t\\u0005\\u0002\\u0002\\u017c\\u017e\\t\\u0006\",\n \"\\u0002\\u0002\\u017d\\u017c\\u0003\\u0002\\u0002\\u0002\\u017e\\u0181\\u0003\\u0002\",\n \"\\u0002\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u017f\\u0180\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0180`\\u0003\\u0002\\u0002\\u0002\\u0181\\u017f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0182\\u0183\\u0005_0\\u0002\\u0183\\u0184\\u00070\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0005_0\\u0002\\u0185b\\u0003\\u0002\\u0002\\u0002\\u0186\\u0188\",\n \"\\t\\u0007\\u0002\\u0002\\u0187\\u0186\\u0003\\u0002\\u0002\\u0002\\u0188\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0189\\u0187\\u0003\\u0002\\u0002\\u0002\\u0189\\u018a\",\n \"\\u0003\\u0002\\u0002\\u0002\\u018a\\u01a2\\u0003\\u0002\\u0002\\u0002\\u018b\\u018c\",\n \"\\u00072\\u0002\\u0002\\u018c\\u0190\\u0007z\\u0002\\u0002\\u018d\\u018e\\u0007\",\n \"2\\u0002\\u0002\\u018e\\u0190\\u0007Z\\u0002\\u0002\\u018f\\u018b\\u0003\\u0002\",\n \"\\u0002\\u0002\\u018f\\u018d\\u0003\\u0002\\u0002\\u0002\\u0190\\u0192\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0191\\u0193\\u0005u;\\u0002\\u0192\\u0191\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0193\\u0194\\u0003\\u0002\\u0002\\u0002\\u0194\\u0192\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0194\\u0195\\u0003\\u0002\\u0002\\u0002\\u0195\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0196\\u0197\\u00072\\u0002\\u0002\\u0197\\u019b\\u0007d\\u0002\\u0002\",\n \"\\u0198\\u0199\\u00072\\u0002\\u0002\\u0199\\u019b\\u0007D\\u0002\\u0002\\u019a\",\n \"\\u0196\\u0003\\u0002\\u0002\\u0002\\u019a\\u0198\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019c\\u019e\\t\\b\\u0002\\u0002\\u019d\\u019c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019e\\u019f\\u0003\\u0002\\u0002\\u0002\\u019f\\u019d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a0\\u0003\\u0002\\u0002\\u0002\\u01a0\\u01a2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u0187\\u0003\\u0002\\u0002\\u0002\\u01a1\\u018f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u019a\\u0003\\u0002\\u0002\\u0002\\u01a2d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a3\\u01a5\\t\\u0007\\u0002\\u0002\\u01a4\\u01a3\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a5\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a4\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a7\\u01a8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01aa\\u00070\\u0002\\u0002\\u01a9\\u01ab\",\n \"\\t\\u0007\\u0002\\u0002\\u01aa\\u01a9\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01ac\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01aa\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01ad\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ad\\u01bc\\u0003\\u0002\\u0002\\u0002\\u01ae\\u01b0\",\n \"\\t\\u0007\\u0002\\u0002\\u01af\\u01ae\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01b2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0003\\u0002\\u0002\\u0002\\u01b3\\u01b7\",\n \"\\u00070\\u0002\\u0002\\u01b4\\u01b6\\t\\u0007\\u0002\\u0002\\u01b5\\u01b4\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b6\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01b7\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7\\u01b8\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01ba\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b9\\u01b7\\u0003\\u0002\\u0002\\u0002\\u01ba\\u01bc\\u0005\",\n \"g4\\u0002\\u01bb\\u01a4\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01af\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01bcf\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01bf\\t\\t\\u0002\\u0002\",\n \"\\u01be\\u01c0\\t\\u0002\\u0002\\u0002\\u01bf\\u01be\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bf\\u01c0\\u0003\\u0002\\u0002\\u0002\\u01c0\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c1\\u01c3\\t\\u0007\\u0002\\u0002\\u01c2\\u01c1\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c3\\u01c4\\u0003\\u0002\\u0002\\u0002\\u01c4\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c4\\u01c5\\u0003\\u0002\\u0002\\u0002\\u01c5h\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c6\\u01ca\\u0007$\\u0002\\u0002\\u01c7\\u01c9\\u0005k6\\u0002\\u01c8\\u01c7\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01c8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01cb\\u0003\\u0002\\u0002\\u0002\\u01cb\\u01cd\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01cc\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01ce\",\n \"\\u0007$\\u0002\\u0002\\u01cej\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d2\\n\\n\\u0002\",\n \"\\u0002\\u01d0\\u01d2\\u0005y=\\u0002\\u01d1\\u01cf\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d1\\u01d0\\u0003\\u0002\\u0002\\u0002\\u01d2l\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d3\\u01d6\\u0007)\\u0002\\u0002\\u01d4\\u01d7\\u0005y=\\u0002\\u01d5\\u01d7\",\n \"\\n\\u000b\\u0002\\u0002\\u01d6\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\\u01d5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0003\\u0002\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\u0007)\\u0002\\u0002\\u01d9n\\u0003\\u0002\\u0002\\u0002\\u01da\\u01db\\t\\f\\u0002\",\n \"\\u0002\\u01db\\u01dc\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\b8\\u0002\\u0002\",\n \"\\u01ddp\\u0003\\u0002\\u0002\\u0002\\u01de\\u01df\\u0007=\\u0002\\u0002\\u01df\",\n \"r\\u0003\\u0002\\u0002\\u0002\\u01e0\\u01e2\\t\\r\\u0002\\u0002\\u01e1\\u01e0\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e2\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01e3\\u01e1\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e3\\u01e4\\u0003\\u0002\\u0002\\u0002\\u01e4\\u01e7\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e5\\u01e7\\u0005q9\\u0002\\u01e6\\u01e1\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e6\\u01e5\\u0003\\u0002\\u0002\\u0002\\u01e7t\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e8\\u01e9\\t\\u000e\\u0002\\u0002\\u01e9v\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01ea\\u01eb\\t\\u000f\\u0002\\u0002\\u01ebx\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ec\\u01ed\\u0007^\\u0002\\u0002\\u01ed\\u01f1\\t\\u0010\\u0002\\u0002\\u01ee\",\n \"\\u01f1\\u0005}?\\u0002\\u01ef\\u01f1\\u0005{>\\u0002\\u01f0\\u01ec\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f0\\u01ee\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01ef\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f1z\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f3\\u0007^\\u0002\",\n \"\\u0002\\u01f3\\u01f4\\t\\u0011\\u0002\\u0002\\u01f4\\u01f5\\u0005w<\\u0002\\u01f5\",\n \"\\u01f6\\u0005w<\\u0002\\u01f6\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01f7\\u01f8\",\n \"\\u0007^\\u0002\\u0002\\u01f8\\u01f9\\u0005w<\\u0002\\u01f9\\u01fa\\u0005w<\\u0002\",\n \"\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fc\\u0007^\\u0002\\u0002\",\n \"\\u01fc\\u01fe\\u0005w<\\u0002\\u01fd\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01fd\",\n \"\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01fd\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fe\",\n \"|\\u0003\\u0002\\u0002\\u0002\\u01ff\\u0200\\u0007^\\u0002\\u0002\\u0200\\u0201\",\n \"\\u0007w\\u0002\\u0002\\u0201\\u0202\\u0005u;\\u0002\\u0202\\u0203\\u0005u;\\u0002\",\n \"\\u0203\\u0204\\u0005u;\\u0002\\u0204\\u0205\\u0005u;\\u0002\\u0205~\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0206\\u0207\\u00071\\u0002\\u0002\\u0207\\u0208\\u00071\\u0002\",\n \"\\u0002\\u0208\\u020c\\u0003\\u0002\\u0002\\u0002\\u0209\\u020b\\n\\r\\u0002\\u0002\",\n \"\\u020a\\u0209\\u0003\\u0002\\u0002\\u0002\\u020b\\u020e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020c\\u020a\\u0003\\u0002\\u0002\\u0002\\u020c\\u020d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020d\\u0210\\u0003\\u0002\\u0002\\u0002\\u020e\\u020c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020f\\u0211\\u0007\\u000f\\u0002\\u0002\\u0210\\u020f\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0210\\u0211\\u0003\\u0002\\u0002\\u0002\\u0211\\u0212\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0212\\u021f\\u0007\\f\\u0002\\u0002\\u0213\\u0214\\u00071\\u0002\\u0002\\u0214\",\n \"\\u0215\\u0007,\\u0002\\u0002\\u0215\\u0219\\u0003\\u0002\\u0002\\u0002\\u0216\",\n \"\\u0218\\u000b\\u0002\\u0002\\u0002\\u0217\\u0216\\u0003\\u0002\\u0002\\u0002\\u0218\",\n \"\\u021b\\u0003\\u0002\\u0002\\u0002\\u0219\\u021a\\u0003\\u0002\\u0002\\u0002\\u0219\",\n \"\\u0217\\u0003\\u0002\\u0002\\u0002\\u021a\\u021c\\u0003\\u0002\\u0002\\u0002\\u021b\",\n \"\\u0219\\u0003\\u0002\\u0002\\u0002\\u021c\\u021d\\u0007,\\u0002\\u0002\\u021d\",\n \"\\u021f\\u00071\\u0002\\u0002\\u021e\\u0206\\u0003\\u0002\\u0002\\u0002\\u021e\",\n \"\\u0213\\u0003\\u0002\\u0002\\u0002\\u021f\\u0220\\u0003\\u0002\\u0002\\u0002\\u0220\",\n \"\\u0221\\b@\\u0003\\u0002\\u0221\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\",\n \"\\u0162\\u0175\\u017f\\u0189\\u018f\\u0194\\u019a\\u019f\\u01a1\\u01a6\\u01ac\\u01b1\",\n \"\\u01b7\\u01bb\\u01bf\\u01c4\\u01ca\\u01d1\\u01d6\\u01e3\\u01e6\\u01f0\\u01fd\\u020c\",\n \"\\u0210\\u0219\\u021e\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'programa'\", \"'real'\", \"'vazio'\", \n \"'logico'\", \"'cadeia'\", \"'inteiro'\", \"'caractere'\", \n \"'escolha'\", \"'caso'\", \"'contrario'\", \n \"'const'\", \"'funcao'\", \"'devolva'\", \"'para'\", \n \"'repita_para'\", \"'de'\", \"'ate'\", \"'passo'\", \n \"'pare'\", \"'repita'\", \"'ate_que'\", \"'enquanto'\", \n \"'repita_enquanto'\", \"'se'\", \"'senao'\", \n \"'falso'\", \"'verdadeiro'\", \"'&'\", \"'('\", \n \"')'\", \"'['\", \"']'\", \"'{'\", \"'}'\", \"','\", \n null, null, null, null, null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_de_elementos\",\n $matrixLines: \"total_de_linhas\",\n $matrixColumns: \"total_de_colunas\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"caractere_na_posicao\",\n $isReal: \"e_real\",\n $isInt: \"e_inteiro\",\n $isBool: \"e_logico\",\n $castReal: \"como_real\",\n $castInt: \"como_inteiro\",\n $castBool: \"como_logico\",\n $castString: \"como_cadeia\",\n $castChar: \"como_caractere\",\n $sin: \"seno\",\n $cos: \"cosseno\",\n $tan: \"tangente\",\n $sqrt: \"raiz_quadrada\",\n $pow: \"potencia\",\n $log: \"logaritmo\",\n $abs: \"modulo\",\n $negate: \"trocar_sinal\",\n $invert: \"inverter_valor\",\n $max: \"maximo\",\n $min: \"minimo\",\n $rand: \"numero_aleatorio\"\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Matematica\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversao\"\n}","module.exports = {\"pt\":{\"token_missing_one\":\"Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3\",\"token_missing_two\":\"Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4\",\"eos_missing\":\"Falta uma nova linha ou ; na linha: $0, coluna: $1\",\"invalid_type\":\"$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3\",\"invalid_array_dimension\":\"A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.\",\"invalid_array_size\":\"O tamnho do vetor/matriz excede o máximo de 2 na linha $0\",\"extra_lines\":\"Nenhum texto é permitido após '}' em 'programa {...}'\",\"invalid_main_return\":\"A função $0 declarada na linha $2 deve retornar $1.\",\"invalid_var_declaration\":\"Erro na linha $0: variáveis só podem ser declaradas no corpo principal da função e nas primeiras linhas, antes de qualquer comando.\",\"invalid_break_command\":\"Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'\",\"invalid_terminal\":\"Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.\",\"const_not_init\":\"Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada\",\"id_missing\":\"Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2\",\"invalid_id_format\":\"$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.\",\"main_missing\":\"A função principal não foi encontrada\",\"invalid_global_var\":\"Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE\",\"not_implemented\":\"Erro interno crítico: A função definida pelo sistema $0 não foi implementada.\",\"function_missing\":\"A função $0 não foi encontrada\",\"function_missing_full\":\"A função $0 na linha: $1, coluna: $2 não foi encontrada\",\"invalid_parameters_size_full\":\"Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.\",\"invalid_parameters_size\":\"A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2\",\"invalid_ref_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_ref\":\"A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_parameter_type_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.\",\"invalid_parameter_type\":\"A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.\",\"unknown_command_full\":\"Erro interno crítico: comando desconhecido encontrado na linha $0\",\"unknown_command\":\"Erro interno crítico: comando desconhecido encontrado!\",\"loop_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do laço de repetição deve ser do tipo lógico\",\"loop_condition_type\":\"A condição $0 do laço de repetição deve ser do tipo lógico\",\"endless_loop_full\":\"Possível laço infinito detectado no seu código. Verifique a linha $0\",\"endless_loop\":\"Possível laço infinito detectado no seu código.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do comando se...senao deve ser do tipo lógico\",\"if_condition_type\":\"A condição $0 do comando se...senao deve ser do tipo lógico\",\"invalid_return_type_full\":\"Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.\",\"invalid_return_type\":\"A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.\",\"invalid_void_return_full\":\"Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2\",\"invalid_void_return\":\"A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1\",\"unexpected_break_command_full\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0\",\"unexpected_break_command\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso\",\"invalid_dimension\":\"As dimensões de um vetor/matriz devem ser do tipo inteiro\",\"void_in_expression_full\":\"Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"void_in_expression\":\"A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"invalid_array_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido\",\"invalid_array_access\":\"Identificador $0 não se refere a um vetor/matriz válido\",\"invalid_matrix_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida\",\"invalid_matrix_access\":\"Identificador $0 não se refere a uma matriz válida\",\"matrix_column_outbounds_full\":\"Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas\",\"matrix_column_outbounds\":\"Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas\",\"matrix_line_outbounds_full\":\"Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas\",\"matrix_line_outbounds\":\"Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas\",\"vector_line_outbounds_full\":\"Erro na linha $0: O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_line_outbounds\":\"O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_not_matrix_full\":\"Erro na linha $0: $1 não é uma matriz\",\"vector_not_matrix\":\"$0 não é uma matriz\",\"invalid_infix_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado aos tipos $3 e $4\",\"invalid_infix_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado aos tipos $2 e $3\",\"invalid_unary_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado ao tipo $3\",\"invalid_unary_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado ao tipo $2\",\"unknown_op\":\"Erro interno crítico: Operação $0 desconhecida\",\"duplicate_function\":\"A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.\",\"duplicate_variable\":\"A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.\",\"main_parameters\":\"A função inicio não pode ter parâmetros.\",\"symbol_not_found_full\":\"A variável $0 na linha: $1, coluna: $2 não foi declarada\",\"symbol_not_found\":\"A variável $0 não foi declarada\",\"array_dimension_not_int_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser do tipo inteiro.\",\"array_dimension_not_int\":\"As dimensões de um arranjo (vetor ou matriz) devem ser do tipo inteiro.\",\"array_dimension_not_positive_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser valores positivos.\",\"array_dimension_not_positive\":\"As dimensões de um arranjo (vetor ou matriz) devem ser valores positivos.\",\"incompatible_types_full\":\"Era esperado um $0 mas a expressão $1 na linha $2 resulta em $3.\",\"incompatible_types\":\"Era esperado um $0 mas a expressão $1 resulta em $2.\",\"incompatible_types_array_full\":\"A expressão $0 na linha $2 é incompatível com o tipo $1.\",\"incompatible_types_array\":\"A expressão $0 é incompatível com o tipo $1.\",\"invalid_case_type_full\":\"O caso $0 na linha $1 é incompatível com o tipo $2.\",\"invalid_case_type\":\"O caso $0 é incompatível com o tipo $1.\",\"function_no_return\":\"A função $0 não possui um comando de devolução acessível. Toda função deve ter ao menos um comando 'devolva' no seu corpo principal.\",\"invalid_array_literal_type_full\":\"Erro na linha $0: a expressão $1 não resulta em um tipo compatível.\",\"invalid_array_literal_type\":\"A expressão $0 não resulta em um tipo compatível.\",\"invalid_array_literal_line_full\":\"Erro na linha $0: esperava-se $1 linhas mas encontrou $2.\",\"invalid_array_literal_line\":\"Esperava-se $0 linhas mas encontrou $1.\",\"invalid_array_literal_column_full\":\"Erro na linha $0: esperava-se $1 colunas mas encontrou $2.\",\"invalid_array_literal_column\":\"Esperava-se $0 colunas mas encontrou $1.\",\"exceeded_input_request\":\"A quantidade de leituras requisitadas execedeu a quantidade de entradas disponíveis.\",\"test_case_few_reads\":\"Caso de teste $0 falhou: ainda restam entradas!\",\"test_case_failed\":\"
Caso de teste $0 não executou com sucesso.
\",\"test_case_failed_exception\":\"
Caso de teste $0 falhou: $1\",\"test_case_exception\":\"Ocorreu uma exceção no caso de teste $0: $1\",\"invalid_type_conversion\":\"O valor $0 não pode ser convertido para o tipo $1\",\"invalid_read_type\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo da variável $3.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável $3 que é um $4.\",\"inform_valid_identifier\":\"Informe um nome válido! O nome não pode ser uma palavra reservadas e deve começar com letras ou _ e conter apenas letras, números e _.\",\"inform_valid_global_duplicated\":\"Já existe uma variável global com o nome $0, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome $0 na função $1, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome $0, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome $0 na função $1, você precisa de nomes distintos.\",\"invalid_character\":\"O caractere $0 na linha $1 não pode ser utilizado neste contexto.\",\"annonymous_array_literal\":\"Erro na linha $0: a notação de vetor/matriz só permitida durante a inicialização de uma variável desse tipo. Ex: inteiro vec[3] ← {1,2,3}.\",\"invalid_matrix_literal_line\":\"A expressão $0 na linha $1 não possui um número de elementos igual a linha anterior. Todas as linhas de uma matriz devem ter a mesma quantidade de elementos.\",\"cannot_infer_matrix_line\":\"Não é possível inferir o número de linhas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_matrix_column\":\"Não é possível inferir o número de colunas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_vector_size\":\"Não é possível inferir o número de elementos do vetor $0 na linha $1. É necessário que ele seja inicializado ou que o valor seja informado de forma explícita\",\"matrix_to_vector_literal_attr\":\"Erro na linha $0: A expressão $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_literal_attr\":\"Erro na linha $0: A expressão $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_const_ref_full\":\"A variável $0 fornecida como parâmetro para a função $1 na linha $2 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_ref\":\"A variável $0 fornecida como parâmetro para a função $1 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_assignment_full\":\"Erro na linha $0: $1 é uma constante e portanto não pode ter seu valor alterado\",\"invalid_const_assignment\":\"$0 é uma constante e portanto não pode ter seu valor alterado\",\"array_init_not_literal\":\"Erro na linha $0: Vetor/Matriz só pode ser inicializado por literal. Ex: real vetor[] <- {1,2,3}\",\"array_exceeds_2d\":\"Erro na linha $0: O número máximo de dimensões que um arranjo pode ter é 2. Elemento de 3 ou mais dimensões encontrado!\",\"invalid_matrix_id_dimension\":\"Erro na linha $0: Você deve definir todas as dimensões da matriz quando uma delas é definida por uma variável! Ex: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Erro na linha $0: Não se pode inicializar um vetor que teve seu tamanho declarado utilizando uma variável! Utilize uma atribuição de vetores ou use um laço de repetição.\",\"invalid_matrix_init\":\"Erro na linha $0: Não se pode inicializar uma matrix que teve ao menos uma das suas dimensões declaradas utilizando uma variável! Utilize uma atribuição de matrizes ou use um laço de repetição.\",\"invalid_vector_assignment_full\":\"Erro na linha $0: Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $1 comporta $2 e $3 comporta $4!\",\"invalid_vector_assignment\":\"Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $0 comporta $1 e $2 comporta $3!\",\"invalid_matrix_assignment_full\":\"Erro na linha $0: Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $1 tem $2 linhas e $3 colunas, enquanto $4 possui $5 linhas e $6 colunas!\",\"invalid_matrix_assignment\":\"Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $0 tem $1 linhas e $2 colunas, enquanto $3 possui $4 linhas e $5 colunas!\",\"matrix_to_vector_attr\":\"Erro na linha $0: $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_attr\":\"Erro na linha $0: $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_matrix_index_assign_full\":\"Erro na linha $0: A posição $1 da matriz $2 aceita apenas vetores de tamanho $3, mas $4 tem tamanho $5\",\"invalid_matrix_index_assign\":\"A linha $0 da matriz $1 aceita apenas vetores de tamanho $2, mas $3 tem tamanho $4\",\"invalid_number_elements_vector\":\"Esperava-se por $0 elementos na linha $1 mas a expressão $2 possui $3 elementos.\",\"invalid_number_lines_matrix\":\"Esperava-se por uma matriz com $0 linhas na linha $1 mas a expressão $2 possui $3 linhas\",\"divsion_by_zero_full\":\"Erro na linha $0: A expressão $1 resulta em uma divisão por 0.\",\"divsion_by_zero\":\"A expressão $0 resulta em uma divisão por 0.\",\"undefined_tanget_value\":\"Erro na linha $0: A tangente de $1° não é indefinida.\",\"negative_log_value\":\"Erro na linha $0: Não se pode calcular o log de um valor negativo.\",\"invalid_string_index\":\"Erro na linha $0 durante a execução da função $1: $2 é um índice inválido para a cadeia de texto $3. Os valores válidos vão de 0 à $4\",\"negative_sqrt_value\":\"Erro na linha $0: Não é permitido calcular a raiz quadrada de um número negativo.\",\"exceeded_recursive_calls\":\"Erro na execução da linha $0: Número de chamadas recursivas execedeu o limite máximo definido!\",\"invalid_for_variable\":\"Erro na linha $0: A variavel $1 utilizada no comando repita_para deve ser do tipo inteiro.\",\"invalid_for_from\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'de' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_to\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'para' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_pass\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'passo' do comando repita_para deve ser do tipo inteiro.\",\"exceed_max_instructions\":\"Número de instruções excedeu o limite definido. Certifique-se que seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"},\"en\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"
Test case $0 did not executed successfully.
\",\"test_case_failed_exception\":\"
Test case $0 failed: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable $3.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable $3 of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named $0 already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named $0 already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named $0 already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named $0 already exists in function $1, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"annonymous_array_literal\":\"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.\",\"invalid_matrix_literal_line\":\"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.\",\"cannot_infer_matrix_line\":\"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.\",\"cannot_infer_matrix_column\":\"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.\",\"cannot_infer_vector_size\":\"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.\",\"matrix_to_vector_literal_attr\":\"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_literal_attr\":\"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_const_ref_full\":\"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_ref\":\"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_assignment_full\":\"Error at line $0: $1 is a constant e therefore cannot have its value changed.\",\"invalid_const_assignment\":\"$0 is a constant e therefore cannot have its value changed.\",\"array_init_not_literal\":\"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}\",\"array_exceeds_2d\":\"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.\",\"invalid_matrix_id_dimension\":\"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.\",\"invalid_matrix_init\":\"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.\",\"invalid_vector_assignment_full\":\"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!\",\"invalid_vector_assignment\":\"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!\",\"invalid_matrix_assignment_full\":\"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!\",\"invalid_matrix_assignment\":\"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!\",\"matrix_to_vector_attr\":\"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_attr\":\"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_matrix_index_assign_full\":\"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.\",\"invalid_matrix_index_assign\":\"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.\",\"invalid_number_elements_vector\":\"It expected $0 elements at line $1 but the expression $2 has $3 elements.\",\"invalid_number_lines_matrix\":\"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.\",\"divsion_by_zero_full\":\"Error at line $0: The expression $1 resuts in a division by zero.\",\"divsion_by_zero\":\"The expression $0 resuts in a division by zero.\",\"undefined_tanget_value\":\"Error at line $0: The tangent of $1° is undefined.\",\"negative_log_value\":\"Error at line $0: You cannot calculate the logarithm of a negative value.\",\"invalid_string_index\":\"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.\",\"negative_sqrt_value\":\"Error at line $0: It is not allowd to calculate the square root of a negative number.\",\"exceeded_recursive_calls\":\"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.\",\"invalid_for_variable\":\"Error at line $0: The variable $1 used in the repeat_for command must be of type int.\",\"invalid_for_from\":\"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.\",\"invalid_for_to\":\"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.\",\"invalid_for_pass\":\"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.\",\"exceed_max_instructions\":\"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls.\"},\"es\":{\"token_missing_one\":\" \",\"token_missing_two\":\" \",\"eos_missing\":\" \",\"invalid_type\":\" \",\"invalid_array_dimension\":\" \",\"invalid_array_size\":\" \",\"extra_lines\":\" \",\"invalid_main_return\":\" \",\"invalid_var_declaration\":\" \",\"invalid_break_command\":\" \",\"invalid_terminal\":\" \",\"const_not_init\":\" \",\"id_missing\":\" \",\"invalid_id_format\":\" \",\"main_missing\":\" \",\"invalid_global_var\":\" \",\"not_implemented\":\" \",\"function_missing\":\" \",\"function_missing_full\":\" \",\"invalid_parameters_size_full\":\" \",\"invalid_parameters_size\":\" \",\"invalid_ref_full\":\" \",\"invalid_ref\":\" \",\"invalid_parameter_type_full\":\" \",\"invalid_parameter_type\":\" \",\"unknown_command_full\":\" \",\"unknown_command\":\" \",\"loop_condition_type_full\":\" \",\"loop_condition_type\":\" \",\"endless_loop_full\":\" \",\"endless_loop\":\" \",\"for_condition_type_full\":\" \",\"for_condition_type\":\" \",\"if_condition_type_full\":\" \",\"if_condition_type\":\" \",\"invalid_return_type_full\":\" \",\"invalid_return_type\":\" \",\"invalid_void_return_full\":\" \",\"invalid_void_return\":\" \",\"unexpected_break_command_full\":\" \",\"unexpected_break_command\":\" \",\"invalid_dimension\":\" \",\"void_in_expression_full\":\" \",\"void_in_expression\":\" \",\"invalid_array_access_full\":\" \",\"invalid_array_access\":\" \",\"invalid_matrix_access_full\":\" \",\"invalid_matrix_access\":\" \",\"matrix_column_outbounds_full\":\" \",\"matrix_column_outbounds\":\" \",\"matrix_line_outbounds_full\":\" \",\"matrix_line_outbounds\":\" \",\"vector_line_outbounds_full\":\" \",\"vector_line_outbounds\":\" \",\"vector_not_matrix_full\":\" \",\"vector_not_matrix\":\" \",\"invalid_infix_op_full\":\" \",\"invalid_infix_op\":\" \",\"invalid_unary_op_full\":\" \",\"invalid_unary_op\":\" \",\"unknown_op\":\" \",\"duplicate_function\":\" \",\"duplicate_variable\":\" \",\"main_parameters\":\" \",\"symbol_not_found_full\":\" \",\"symbol_not_found\":\" \",\"array_dimension_not_int_full\":\" \",\"array_dimension_not_int\":\" \",\"array_dimension_not_positive_full\":\" \",\"array_dimension_not_positive\":\" \",\"incompatible_types_full\":\" \",\"incompatible_types\":\" \",\"incompatible_types_array_full\":\" \",\"incompatible_types_array\":\" \",\"invalid_case_type_full\":\" \",\"invalid_case_type\":\" \",\"function_no_return\":\" \",\"invalid_array_literal_type_full\":\" \",\"invalid_array_literal_type\":\" \",\"invalid_array_literal_line_full\":\" \",\"invalid_array_literal_line\":\" \",\"invalid_array_literal_column_full\":\" \",\"invalid_array_literal_column\":\" \",\"exceeded_input_request\":\" \",\"test_case_few_reads\":\" \",\"test_case_failed\":\" \",\"test_case_failed_exception\":\" \",\"test_case_exception\":\" \",\"invalid_type_conversion\":\" \",\"invalid_read_type\":\" \",\"invalid_read_type_array\":\" \",\"inform_valid_identifier\":\" \",\"inform_valid_global_duplicated\":\" \",\"inform_valid_variable_duplicated\":\" \",\"inform_valid_function_duplicated\":\" \",\"inform_valid_param_duplicated\":\" \",\"invalid_character\":\" \",\"annonymous_array_literal\":\" \",\"invalid_matrix_literal_line\":\" \",\"cannot_infer_matrix_line\":\" \",\"cannot_infer_matrix_column\":\" \",\"cannot_infer_vector_size\":\" \",\"matrix_to_vector_literal_attr\":\" \",\"vector_to_matrix_literal_attr\":\" \",\"invalid_const_ref_full\":\" \",\"invalid_const_ref\":\" \",\"invalid_const_assignment_full\":\" \",\"invalid_const_assignment\":\" \",\"array_init_not_literal\":\" \",\"array_exceeds_2d\":\" \",\"invalid_matrix_id_dimension\":\" \",\"invalid_vector_init\":\" \",\"invalid_matrix_init\":\" \",\"invalid_vector_assignment_full\":\" \",\"invalid_vector_assignment\":\" \",\"invalid_matrix_assignment_full\":\" \",\"invalid_matrix_assignment\":\" \",\"matrix_to_vector_attr\":\" \",\"vector_to_matrix_attr\":\" \",\"invalid_matrix_index_assign_full\":\" \",\"invalid_matrix_index_assign\":\" \",\"invalid_number_elements_vector\":\" \",\"invalid_number_lines_matrix\":\" \",\"divsion_by_zero_full\":\" \",\"divsion_by_zero\":\" \",\"undefined_tanget_value\":\" \",\"negative_log_value\":\" \",\"invalid_string_index\":\" \",\"negative_sqrt_value\":\" \",\"exceeded_recursive_calls\":\" \",\"invalid_for_variable\":\"\",\"invalid_for_from\":\"\",\"invalid_for_to\":\"\",\"invalid_for_pass\":\"\",\"exceed_max_instructions\":\"\"}}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Messages = require(\"./message.csv\");\nconst UI = require(\"./ui.csv\");\nconst Errors = require(\"./error.csv\");\nconst MessagesObj = Messages;\nconst UIObj = UI;\nconst ErrorsObj = Errors;\nconst i18n_data = {};\nfor (const key in UIObj) {\n const data = {};\n data['error'] = ErrorsObj[key];\n data['message'] = MessagesObj[key];\n data['ui'] = UIObj[key];\n i18n_data[key] = data;\n}\nexports.default = i18n_data;\n","module.exports = {\"pt\":{\"test_case_success\":\"
Caso de teste $0: OK
\",\"test_case_duration\":\"Levou $0ms\",\"test_suite_grade\":\"A sua solução alcançou $0% da nota.\",\"awaiting_input_message\":\"O seu programa está em execução e aguardando uma entrada! Digite algo e pressione ENTER...\",\"assessment-empty-expected-tooltip\":\"A saída gerada foi além do esperado\",\"assessment-empty-generated-tooltip\":\"O programa não gerou saídas suficientes\",\"testcase_autogen_unused_input\":\"O caso de teste $0 possui mais entradas do que as leituras feitas no programa.\",\"testcase_autogen_empty\":\"O caso de teste $0 não gerou qualquer saída.\",\"success_execution\":\"Execução do programa finalizada!\",\"aborted_execution\":\"A execução do programa foi interrompida!\",\"unexpected_execution_error\":\"Erro inesperado durante a execução do programa.\"},\"en\":{\"test_case_success\":\"
Test case $0: OK
\",\"test_case_duration\":\"Took $0ms\",\"test_suite_grade\":\"Your solution scored $0% of the grade.\",\"awaiting_input_message\":\"Your program is running and awaiting for an input. Type something and press ENTER…\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"The program did not generate enough outputs\",\"testcase_autogen_unused_input\":\"The test case $0 has more inputs than output than the number of reads present in the algorithm.\",\"testcase_autogen_empty\":\"The test case $0 did not generate any output.\",\"success_execution\":\"Program execution finished!\",\"aborted_execution\":\"Program execution was aborted!\",\"unexpected_execution_error\":\"Unexpected error during program execution.\"},\"es\":{\"test_case_success\":\" \",\"test_case_duration\":\" \",\"test_suite_grade\":\" \",\"awaiting_input_message\":\" \",\"assessment-empty-expected-tooltip\":\" \",\"assessment-empty-generated-tooltip\":\" \",\"testcase_autogen_unused_input\":\" \",\"testcase_autogen_empty\":\" \",\"success_execution\":\"\",\"aborted_execution\":\"\",\"unexpected_execution_error\":\"\"}}","module.exports = {\"pt\":{\"function\":\"funcao\",\"btn_clear\":\"Limpar\",\"btn_function\":\"Função\",\"btn_arithmetic_plus\":\"Adição\",\"btn_arithmetic_minus\":\"Subtração\",\"btn_arithmetic_multiplication\":\"Multiplicação\",\"btn_arithmetic_division\":\"Divisão\",\"btn_arithmetic_module\":\"Módulo\",\"btn_break\":\"Pare\",\"btn_case\":\"Caso\",\"start\":\"inicio\",\"type_void\":\"vazio\",\"type_integer\":\"inteiro\",\"logic_operator_and\":\"E\",\"logic_operator_or\":\"OU\",\"logic_operator_not\":\"nao\",\"type_real\":\"real\",\"program\":\"programa\",\"type_text\":\"cadeia\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"logico\",\"logic_value_true\":\"verdadeiro\",\"logic_value_false\":\"falso\",\"variable\":\"Variável\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variavel\",\"new_global\":\"global\",\"new_function\":\"nova_funcao\",\"matrix\":\"matriz\",\"vector\":\"vetor\",\"text_comment_start\":\"Comentário inicial da função...\",\"text_comment_main\":\"Esta é a função principal...\",\"text_read_var\":\"Entrada/Leitura de dados\",\"text_write_var\":\"Saída/Escrita de dados\",\"text_command_read\":\"leia\",\"text_command_write\":\"escreva\",\"text_return\":\"devolva\",\"text_btn_return\":\"Devolver\",\"text_comment\":\"Comentário\",\"string_join_or\":\"ou\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vetor de $0\",\"text_attribution\":\"Atribuição\",\"text_if\":\"se\",\"text_break\":\"pare\",\"text_else\":\"senao\",\"text_for\":\"repita_para\",\"text_code_while\":\"repita_enquanto\",\"text_code_do\":\"repita\",\"text_code_do_until\":\"ate_que\",\"text_command_do\":\"repita\",\"text_command_while\":\"repita enquanto\",\"text_command_do_until\":\"até que\",\"text_code_switch\":\"escolha\",\"text_code_case\":\"caso\",\"text_config_programming\":\"Programação\",\"text_config_programming_both\":\"Visual e textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritméticos\",\"text_iftrue\":\"Se verdadeiro então\",\"text_message_error_activity_file\":\"Aconteceu um erro ao processar a atividade.
Recarregue a página para tentar novamente.\",\"text_message_error_activity_reload\":\"Recarregar\",\"text_repeatNtimes\":\"Repita N vezes\",\"text_receives\":\"recebe\",\"text_whiletrue\":\"Enquanto verdadeiro\",\"text_dowhiletrue\":\"Repita até que verdadeiro\",\"text_switch\":\"Escolha\",\"text_functioncall\":\"Chamada de função\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Parênteses\",\"text_change\":\"Alterar\",\"text_teacher_algorithm\":\"Algoritmo\",\"text_teacher_algorithm_include\":\"Incluir o algoritmo abaixo no exercício\",\"text_teacher_test_case\":\"Casos de teste\",\"text_teacher_config\":\"Configurações\",\"text_teacher_data_types\":\"Tipos de dados\",\"text_teacher_commands\":\"Comandos\",\"text_teacher_functions\":\"Funções\",\"text_teacher_create_functions\":\"Criar novas funções\",\"text_teacher_create_movement_functions\":\"Movimentar funções\",\"text_teacher_test_case_input\":\"Entrada\",\"text_teacher_test_case_output\":\"Saída\",\"text_teacher_test_case_actions\":\"Ações\",\"text_teacher_test_case_add\":\"Adicionar caso de teste\",\"text_header_ivprog_functions\":\"Funções do iVProg\",\"text_menu_functions_math\":\"Matemática\",\"text_menu_functions_text\":\"Texto\",\"text_menu_functions_array\":\"Arranjo\",\"text_menu_functions_conversion\":\"Conversão\",\"text_no_variable\":\"Nenhuma variável declarada\",\"text_no_variable_instruction\":\"Antes de utilizar uma variável, é necessário criá-la\",\"text_ivprog_description\":\"Programação Visual interativa na Internet\",\"tooltip_visual\":\"Programação visual\",\"tooltip_textual\":\"Programação textual\",\"tooltip_upload\":\"Upload de código fonte\",\"tooltip_download\":\"Download do código fonte\",\"tooltip_undo\":\"Desfazer\",\"tooltip_redo\":\"Refazer\",\"tooltip_run\":\"Executar o programa\",\"tooltip_evaluate\":\"Avaliar o programa\",\"tooltip_help\":\"Ajuda\",\"tooltip_add_global\":\"Adicionar variável global\",\"tooltip_hide_function\":\"Ocultar os elementos da função\",\"var_menu_select_var\":\"Selecione uma variável\",\"var_menu_select_all\":\"Selecione\",\"var_menu_select_function\":\"Selecione uma função\",\"expression_menu_select\":\"Construir uma expressão lógica\",\"inform_valid_content\":\"Informe o conteúdo!\",\"inform_valid_expression\":\"Construa uma expressão lógica!\",\"tooltip_terminal_clear\":\"Limpa o terminal removendo todos os textos já escritos e os pendentes.\",\"tooltip_terminal_show\":\"Exibe o terminal caso esteja escondido\",\"tooltip_terminal_hide\":\"Esconde o terminal caso não esteja escondido\",\"text_ivprog_version\":\"Versão\",\"text_teacher_filter\":\"Filtro\",\"text_teacher_filter_active\":\"Ativado\",\"text_teacher_filter_help\":\"Ao ativar o filtro, as modificações do iVProg estarão bloqueadas.\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duração\",\"assessment-detail-grade-label\":\"Nota\",\"assessment-detail-input-label\":\"Entradas\",\"assessment-detail-output-label\":\"Saídas\",\"assessment-detail-expected-label\":\"Esperava\",\"assessment-detail-generated-label\":\"Gerou\",\"assessment-detail-result-label\":\"Resultado\",\"assessment-detail-title\":\"Caso de Teste $0\",\"text_teacher_generate_outputs\":\"Gerar saídas\",\"text_teacher_generate_outputs_algorithm\":\"Antes de gerar as saídas, elabore um algoritmo!\",\"text_code_for_from\":\"de\",\"text_code_for_to\":\"ate\",\"text_code_for_pass\":\"passo\",\"text_for_from\":\"de\",\"text_for_to\":\"até\",\"text_for_pass\":\"passo\",\"text_relational_expression\":\"Relacionais\",\"write_command_newline_on\":\"Quebra de linha ativada\",\"write_command_newline_off\":\" Quebra de linha desativada\",\"write_seprator_menu_text\":\"Vírgula\",\"initial_program_code\":\"programa {\\\\n\\\\n\\\\t\\\\tfuncao vazio inicio () {\\\\n\\\\t\\\\t\\\\t// Inicie seu codigo aqui!\\\\n\\\\t\\\\t}\\\\n}\",\"type_char\":\"caractere\",\"charvar_default_value\":\"A\"},\"en\":{\"function\":\"function\",\"btn_clear\":\"Clean\",\"btn_function\":\"Function\",\"btn_arithmetic_plus\":\"Addition\",\"btn_arithmetic_minus\":\"Subtraction\",\"btn_arithmetic_multiplication\":\"Multiplication\",\"btn_arithmetic_division\":\"Division\",\"btn_arithmetic_module\":\"Remainder\",\"btn_break\":\"break\",\"btn_case\":\"Case\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"text\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Command\",\"new_parameter\":\"parameter\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"new_function\",\"matrix\":\"matrix\",\"vector\":\"vector\",\"text_comment_start\":\"Function initial comment\",\"text_comment_main\":\"This is the main funcion\",\"text_read_var\":\"Input/Read data\",\"text_write_var\":\"Output/Write data\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Return\",\"text_comment\":\"Comment\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matrix of $0\",\"vector_info_string\":\"vector of $0\",\"text_attribution\":\"Assignment\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programming\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Logic\",\"text_arithmetic_expression\":\"Arithmetics\",\"text_iftrue\":\"If true then\",\"text_message_error_activity_file\":\"There was an error processing the activity.
Reload the page to try again.\",\"text_message_error_activity_reload\":\"Reload\",\"text_repeatNtimes\":\"Repeat N times\",\"text_receives\":\"receives\",\"text_whiletrue\":\"While true\",\"text_dowhiletrue\":\"Repeat until true\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Function call\",\"text_value\":\"Value\",\"text_operator\":\"Operator\",\"text_parentheses\":\"Parentheses\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Include the algorithm below in the activity\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configurations\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Functions\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Before using a variable, you need to create it\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Provide some data\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Clears the terminal by removing all wrriten and pending text.\",\"tooltip_terminal_show\":\"Shows the terminal if it is hidden\",\"tooltip_terminal_hide\":\"Hides the terminal if it is not on display\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"By activating the filter modifications in iVProg will be blocked\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"Result\",\"assessment-detail-title\":\"Test Case $0\",\"text_teacher_generate_outputs\":\"Generate outputs\",\"text_teacher_generate_outputs_algorithm\":\"Before generating the outputs you need to create an algorithm\",\"text_code_for_from\":\"from\",\"text_code_for_to\":\"to\",\"text_code_for_pass\":\"pass\",\"text_for_from\":\"from\",\"text_for_to\":\"to\",\"text_for_pass\":\"pass\",\"text_relational_expression\":\"Relational\",\"write_command_newline_on\":\" Line break is on\",\"write_command_newline_off\":\" Line break is off\",\"write_seprator_menu_text\":\"Comma\",\"initial_program_code\":\"program {\\\\n\\\\n\\\\t\\\\tfunction void main () {\\\\n\\\\t\\\\t\\\\t// Start your code here!\\\\n\\\\t\\\\t}\\\\n}\",\"type_char\":\"char\",\"charvar_default_value\":\"A\"},\"es\":{\"function\":\"funccion\",\"btn_clear\":\"\",\"btn_function\":\"\",\"btn_arithmetic_plus\":\"\",\"btn_arithmetic_minus\":\"\",\"btn_arithmetic_multiplication\":\"\",\"btn_arithmetic_division\":\"\",\"btn_arithmetic_module\":\"\",\"btn_break\":\"\",\"btn_case\":\"\",\"start\":\"\",\"type_void\":\"\",\"type_integer\":\"\",\"logic_operator_and\":\"\",\"logic_operator_or\":\"\",\"logic_operator_not\":\"\",\"type_real\":\"\",\"program\":\"\",\"type_text\":\"\",\"textvar_default_value\":\"\",\"type_boolean\":\"\",\"logic_value_true\":\"\",\"logic_value_false\":\"\",\"variable\":\"\",\"command\":\"\",\"new_parameter\":\"\",\"new_variable\":\"\",\"new_global\":\"\",\"new_function\":\"\",\"matrix\":\"\",\"vector\":\"\",\"text_comment_start\":\"\",\"text_comment_main\":\"\",\"text_read_var\":\"\",\"text_write_var\":\"\",\"text_command_read\":\"\",\"text_command_write\":\"\",\"text_return\":\"\",\"text_btn_return\":\"\",\"text_comment\":\"\",\"string_join_or\":\"\",\"matrix_info_string\":\"\",\"vector_info_string\":\"\",\"text_attribution\":\"\",\"text_if\":\"\",\"text_break\":\"\",\"text_else\":\"\",\"text_for\":\"\",\"text_code_while\":\"\",\"text_code_do\":\"\",\"text_code_do_until\":\"\",\"text_command_do\":\"\",\"text_command_while\":\"\",\"text_command_do_until\":\"\",\"text_code_switch\":\"\",\"text_code_case\":\"\",\"text_config_programming\":\"\",\"text_config_programming_both\":\"\",\"text_config_programming_textual\":\"\",\"text_config_programming_visual\":\"\",\"text_logic_expression\":\"\",\"text_arithmetic_expression\":\"\",\"text_iftrue\":\"\",\"text_message_error_activity_file\":\"\",\"text_message_error_activity_reload\":\"\",\"text_repeatNtimes\":\"\",\"text_receives\":\"\",\"text_whiletrue\":\"\",\"text_dowhiletrue\":\"\",\"text_switch\":\"\",\"text_functioncall\":\"\",\"text_value\":\"\",\"text_operator\":\"\",\"text_parentheses\":\"\",\"text_change\":\"\",\"text_teacher_algorithm\":\"\",\"text_teacher_algorithm_include\":\"\",\"text_teacher_test_case\":\"\",\"text_teacher_config\":\"\",\"text_teacher_data_types\":\"\",\"text_teacher_commands\":\"\",\"text_teacher_functions\":\"\",\"text_teacher_create_functions\":\"\",\"text_teacher_create_movement_functions\":\"\",\"text_teacher_test_case_input\":\"\",\"text_teacher_test_case_output\":\"\",\"text_teacher_test_case_actions\":\"\",\"text_teacher_test_case_add\":\"\",\"text_header_ivprog_functions\":\"\",\"text_menu_functions_math\":\"\",\"text_menu_functions_text\":\"\",\"text_menu_functions_array\":\"\",\"text_menu_functions_conversion\":\"\",\"text_no_variable\":\"\",\"text_no_variable_instruction\":\"\",\"text_ivprog_description\":\"\",\"tooltip_visual\":\"\",\"tooltip_textual\":\"\",\"tooltip_upload\":\"\",\"tooltip_download\":\"\",\"tooltip_undo\":\"\",\"tooltip_redo\":\"\",\"tooltip_run\":\"\",\"tooltip_evaluate\":\"\",\"tooltip_help\":\"\",\"tooltip_add_global\":\"\",\"tooltip_hide_function\":\"\",\"var_menu_select_var\":\"\",\"var_menu_select_all\":\"\",\"var_menu_select_function\":\"\",\"expression_menu_select\":\"\",\"inform_valid_content\":\"\",\"inform_valid_expression\":\"\",\"tooltip_terminal_clear\":\"\",\"tooltip_terminal_show\":\"\",\"tooltip_terminal_hide\":\"\",\"text_ivprog_version\":\"\",\"text_teacher_filter\":\"\",\"text_teacher_filter_active\":\"\",\"text_teacher_filter_help\":\"\",\"text_join_assessment_outputs\":\"\",\"assessment-detail-time-label\":\"\",\"assessment-detail-grade-label\":\"\",\"assessment-detail-input-label\":\"\",\"assessment-detail-output-label\":\"\",\"assessment-detail-expected-label\":\"\",\"assessment-detail-generated-label\":\"\",\"assessment-detail-result-label\":\"\",\"assessment-detail-title\":\"\",\"text_teacher_generate_outputs\":\"\",\"text_teacher_generate_outputs_algorithm\":\"\",\"text_code_for_from\":\"\",\"text_code_for_to\":\"\",\"text_code_for_pass\":\"\",\"text_for_from\":\"\",\"text_for_to\":\"\",\"text_for_pass\":\"\",\"text_relational_expression\":\"\",\"write_command_newline_on\":\"\",\"write_command_newline_off\":\"\",\"write_seprator_menu_text\":\"\",\"initial_program_code\":\"\",\"type_char\":\"\",\"charvar_default_value\":\"A\"}}","import line_i18n from 'line-i18n'\nimport { IVProgProcessor } from \"./../processor/ivprogProcessor\";\nimport { DOMConsole} from \"./../io/domConsole\";\nimport * as LocalizedStringsService from \"../services/localizedStringsService\";\nimport { OutputMatching } from './output_matching/output_matching';\nimport { Config } from '../util/config';\n\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nconst StringTypes = line_i18n.StringTypes;\n\nconst AssessmentConfig = {\n max_instruction_count: 350250,\n suspend_threshold: 200\n}\n\nexport class IVProgAssessment {\n\n constructor (ast_code, testCases, domConsole) {\n this.ast_code = ast_code;\n this.testCases = testCases;\n this.domConsole = domConsole;\n this.old_config = JSON.parse(JSON.stringify(Config));\n Config.setConfig(AssessmentConfig);\n }\n\n runTest () {\n try {\n // loop test cases and show messages through domconsole\n const partialTests = this.testCases.map( (t, name) => {\n return new OutputMatching(new IVProgProcessor(this.ast_code), t.input, t.output, name);\n });\n const testResult = partialTests.map(om => om.eval());\n return Promise.all(testResult).then(results => {\n let grade = 0;\n for(let i = 0; i < results.length; i += 1) {\n const result = results[i];\n grade += result.grade;\n if(result.grade == 1) {\n this.writeToConsole(DOMConsole.INFO, StringTypes.MESSAGE,'test_case_success',\n result.name + 1, result.generateOutput());\n } else if (result.status == 1) {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed_exception',\n result.name + 1, result.error_msg, result.generateOutput());\n } else {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed',\n result.name + 1, result.generateOutput());\n }\n }\n grade /= results.length;\n const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n return grade;\n });\n // return testResult.then(function (total) {\n // const grade = total / this.testCases.length;\n // const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n // this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n // return Promise.resolve(grade)\n // }).catch(err => {\n // this.domConsole.err(\"Erro inesperado durante o cálculo da nota.\");// try and show error messages through domconsole\n // this.domConsole.err(err.message);\n // return Promise.resolve(0);\n // });\n } catch (error) {\n this.showErrorMessage(DOMConsole.ERR, StringTypes.MESSAGE, \"unexpected_execution_error\");\n this.domConsole.err(error.message);\n return Promise.resolve(0);\n } finally {\n Config.setConfig(this.old_config);\n }\n }\n\n showErrorMessage (errorID, ...args) {\n this.domConsole.err(LocalizedStrings.getError(errorID, args));\n }\n\n showInfoMessage (msgID, ...args) {\n this.domConsole.info(LocalizedStrings.getMessage(msgID, args));\n }\n\n writeToConsole (channel, msgType, msgID, ...args) {\n let msg = LocalizedStrings.getString(msgID, msgType);\n msg = LocalizedStrings.processString(msg, args);\n switch(channel) {\n case DOMConsole.ERR: {\n this.domConsole.err(msg);\n break;\n }\n case DOMConsole.INFO: {\n this.domConsole.info(msg);\n break;\n }\n case DOMConsole.USER: {\n this.domConsole.write(msg);\n break;\n }\n }\n }\n}","import StringDiff from \"./../../util/string_diff\";\nimport { LocalizedStrings } from './../../services/localizedStringsService'\n\nexport class OutputAssessmentResult {\n\n static get PAGE_TEMPLATE () {\n return `\n \n \n \n \n \n \n :assessment-result:\n \n `;\n }\n\n static get DETAIL_TEMPLATE () {\n return `
\n
\n

:test-name:

\n

:time-label:: :time:ms

\n

:grade-label:: :grade:%

\n
\n
\n

:input-label:

\n
    \n
  • :input-list:
  • \n
\n
\n
\n

:output-label:

\n :output-result:\n
\n
`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `
\n \n \n \n \n \n \n :results:\n
:expected-label::generated-label::result-label:
\n
`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `$0\n $1\n $2`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `
\n $0
`;\n }\n\n static get FAILED_TEMPLATE () {\n return `

$0

`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `$1`;\n }\n\n // Status code - it is not grade related!\n // 0 - Succesful execution\n // 1 - failed execution\n constructor (name, status, inputs, result, store, time, error_msg = '') {\n this.name = name;\n this.status = status;\n this.inputs = inputs;\n this.results = result;\n this.store = store;\n this.time = time;\n this.error_msg = error_msg;\n }\n\n get grade () {\n if(this.results == null) {\n return 0;\n }\n return this.results.reduce((prev, val) => prev + val.grade, 0) / this.results.length;\n }\n\n prepareResults () {\n let template = OutputAssessmentResult.DETAIL_TEMPLATE;\n const grade = (this.grade * 100).toFixed(2);\n const time = this.time || \"-\";\n template = template.replace(':test-name:', LocalizedStrings.getUI('assessment-detail-title', [this.name + 1]));\n template = template.replace(':time-label:', LocalizedStrings.getUI('assessment-detail-time-label'));\n template = template.replace(':time:', time);\n template = template.replace(':grade-label:', LocalizedStrings.getUI('assessment-detail-grade-label'));\n template = template.replace(':grade:', grade);\n const input_spans = this.prepareInputList(this.inputs);\n template = template.replace(':input-label:', LocalizedStrings.getUI('assessment-detail-input-label'));\n template = template.replace(':input-list:', input_spans);\n template = template.replace(':output-label:', LocalizedStrings.getUI('assessment-detail-output-label'));\n if(this.status == 0) {\n const output_rows = this.results.map(result => {\n if(result.type == \"string\") {\n return this.formatString(result);\n } else if (result.type == \"number\") {\n return this.formatNumber(result);\n } else {\n return this.formatBool(result);\n }\n }, this);\n template = template.replace(':output-result:', this.prepareOutputTable(output_rows));\n } else {\n let failed_text = OutputAssessmentResult.FAILED_TEMPLATE;\n failed_text = failed_text.replace(\"$0\", this.error_msg);\n template = template.replace(\":output-result:\", failed_text);\n }\n return template;\n }\n\n prepareInputList (input_list) {\n const list = input_list.map(input => {\n let template = OutputAssessmentResult.INPUT_INFO_TEMPLATE;\n template = template.replace(\"$1\", input.value);\n if(input.read) {\n template = template.replace(\"$0\", \"assessment-input-read\");\n } else {\n template = template.replace(\"$0\", \"assessment-input-unread\");\n }\n return template;\n }, this);\n return list.join(LocalizedStrings.getUI('text_join_assessment_outputs'));\n }\n\n prepareOutputTable (output_rows) {\n let template = OutputAssessmentResult.OUPUT_TABLE_TEMPLATE;\n template = template.replace(':expected-label:', LocalizedStrings.getUI('assessment-detail-expected-label'));\n template = template.replace(':generated-label:', LocalizedStrings.getUI('assessment-detail-generated-label'));\n template = template.replace(':result-label:', LocalizedStrings.getUI('assessment-detail-result-label'));\n template = template.replace(':results:', output_rows.join(''));\n return template;\n }\n\n generateOutput () {\n const assessment_result = this.prepareResults();\n let page = OutputAssessmentResult.PAGE_TEMPLATE;\n page = page.replace(':assessment-result:', assessment_result);\n page = page.replace(/(\\r|\\n|\\t)/gm,'').replace(/> *<');\n return page;\n }\n\n formatNumber (result) {\n const result_class = result.grade == 1 ? 'assessment-number-result' : 'assessment-number-result-failed';\n let template = this.formatOutput('assessment-number-expected',\n 'assessment-number-generated', result_class, result);\n return template\n }\n\n formatBool (result) {\n const result_class = result.grade == 1 ? 'assessment-bool-result' : 'assessment-bool-result-failed';\n let template = this.formatOutput('assessment-bool-expected',\n 'assessment-bool-generated', result_class, result);\n return template\n }\n\n formatOutput (expected_class, generated_class, result_class, result) {\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n template = template.replace(\":class-result:\", result_class);\n let expected_tmpl = result.expected;\n let generated_tmpl = result.generated;\n if(expected_tmpl == null) {\n expected_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n } else if(generated_tmpl == null) {\n generated_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n }\n template = template.replace(\"$0\", expected_tmpl);\n template = template.replace(\"$1\", generated_tmpl);\n const final_result = result.grade == 1 ? \"✓\" : \"✗\"\n template = template.replace(\"$2\", final_result);\n return template\n }\n\n formatString (result) {\n const expected_class = 'assessment-string-expected';\n const generated_class = 'assessment-string-generated';\n //const result_class = 'assessment-string-result';\n\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n //template = template.replace(\":class-result:\", result_class);\n\n const g_string = result.generated || \"\";\n const e_string = result.expected || \"\";\n // console.log(\"generated: \", g_string,\"expected: \", e_string);\n let g_string_tmpl = g_string;\n let e_string_tmpl = e_string;\n if(result.generated == null) {\n g_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n } else if (result.expected == null) {\n e_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n }\n template = template.replace(\"$0\", e_string_tmpl);\n template = template.replace(\"$1\", g_string_tmpl);\n if(result.grade == 1) {\n template = template.replace(\"$2\", \"✓\");\n template = template.replace(\":class-result:\", 'assessment-string-result');\n } else {\n const diff = StringDiff(g_string, e_string);\n // console.log(diff);\n const diff_vec = diff.map(part => this.getDiffStringStyle(part[1], part[0]), this);\n const diff_string = diff_vec.reduce((prev, actual) => prev + actual, \"\");\n template = template.replace(\"$2\", \"\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"$1\"\n // Fix missing whitespace when its a single element\n text = text.replace(/\\s/g,\" \");\n switch(action) {\n case StringDiff.INSERT:\n return template.replace(\"$0\", \"stringdiff-insert\").replace(\"$1\", text);\n case StringDiff.DELETE:\n return template.replace(\"$0\", \"stringdiff-delete\").replace(\"$1\", text);\n case StringDiff.EQUAL:\n return template.replace(\"$0\", \"stringdiff-equal\").replace(\"$1\", text);\n }\n }\n}\n","import { Decimal } from 'decimal.js';\nimport { InputAssessment } from \"../../util/input_assessment\";\nimport { OutputTest } from \"../../util/outputTest\";\nimport { Config } from \"../../util/config\";\nimport { levenshteinDistance } from \"../../util/utils\";\nimport { OutputAssessmentResult } from './assessment_result';\nimport * as TypeParser from \"./../../typeSystem/parsers\";\nimport * as LocalizedStringsService from \"../../services/localizedStringsService\";\nimport * as OutputResult from \"./output_result\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport class OutputMatching {\n\n static get NUM_REGEX () {\n return /^[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)$/;\n }\n\n static get NUM_IN_STRING_REGEX () {\n return /[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)/g;\n }\n\n static get BOOLEAN_REGEX () {\n const str = `^(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})$`;\n return new RegExp(str);\n }\n\n static get BOOLEAN_IN_STRING_REGEX () {\n const str = `(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})`;\n return new RegExp(str, 'g');\n }\n\n constructor (program, input_list, expected_output, test_name) {\n this.program = program;\n this.name = test_name;\n this.input_list = input_list;\n this.expected_output = expected_output;\n }\n\n eval () {\n const refThis = this;\n const input = new InputAssessment(this.input_list);\n const gen_output = new OutputTest();\n this.program.registerInput(input);\n this.program.registerOutput(gen_output);\n const start_time = Date.now();\n return this.program.interpretAST().then( sto => {\n const final_time = Date.now() - start_time;\n if(input.isInputAvailable()) {\n return new OutputAssessmentResult(this.name, 1, input.input_list,\n null, sto, final_time, refThis.getErrorMessage('test_case_few_reads', this.name+1))\n }\n const result = gen_output.list.map((g_out, i) => {\n if(i >= this.expected_output.length) {\n return new OutputResult.OutputMatchResult(null, g_out, 0, this.getPotentialOutputType(g_out));\n }\n return this.outputMatch(g_out, this.expected_output[i]);\n }, this);\n if(this.expected_output.length > gen_output.list.length) {\n console.log(\"Saída insuficientes!\",this.expected_output.length,gen_output.list.length);\n for(let i = gen_output.list.length; i < this.expected_output.length; ++i) {\n const e_out = this.expected_output[i];\n result.push(new OutputResult.OutputMatchResult(e_out, null, 0, this.getPotentialOutputType(e_out)));\n }\n } else if (this.expected_output.length == 0 && this.expected_output.length == gen_output.list.length) {\n // no output expected....\n result.push(new OutputResult.OutputMatchResult(\"\", \"\", 1, \"string\"));\n }\n return new OutputAssessmentResult(this.name, 0, input.input_list, result, sto, final_time);\n }).catch(error => {\n return new OutputAssessmentResult(this.name, 1, input.input_list, null, null,\n null, refThis.getErrorMessage('test_case_exception', this.name + 1, error.message))\n });\n }\n\n getPotentialOutputType (output) {\n if(OutputMatching.NUM_REGEX.test(output)) {\n return \"number\";\n } else if (OutputMatching.BOOLEAN_REGEX.test(output)) {\n return \"bool\";\n } else {\n return \"string\";\n }\n }\n\n outputMatch (g_output, e_output) {\n if(OutputMatching.NUM_REGEX.test(e_output)) {\n if(!OutputMatching.NUM_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output);\n }\n const g_num = new Decimal(g_output);\n const e_num = new Decimal(e_output);\n return this.checkNumbers(g_num, e_num);\n } else if (OutputMatching.BOOLEAN_REGEX.test(e_output)) {\n if (!OutputMatching.BOOLEAN_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output)\n }\n const g_bool = TypeParser.toBool(g_output);\n const e_bool = TypeParser.toBool(e_output);\n return this.checkBoolean(g_bool, e_bool);\n } else {\n return this.checkStrings(g_output, e_output);\n }\n }\n\n checkNumbers (g_num, e_num) {\n const decimalPlaces = Math.min(e_num.dp(), Config.decimalPlaces);\n g_num = new Decimal(g_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n e_num = new Decimal(e_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n const result = g_num.eq(e_num);\n const grade = result ? 1 : 0;\n return OutputResult.createNumberResult(e_num.toNumber(), g_num.toNumber(), grade);\n }\n\n checkBoolean (g_bool, e_bool) {\n const grade = g_bool == e_bool ? 1 : 0;\n const g_bool_text = TypeParser.convertBoolToString(g_bool);\n const e_bool_text = TypeParser.convertBoolToString(e_bool);\n return OutputResult.createBoolResult(e_bool_text, g_bool_text, grade);\n }\n\n checkStrings (g_output, e_ouput) {\n const assessmentList = []\n let e_output_clean = e_ouput.trim();\n let g_output_clean = g_output.trim();\n if (OutputMatching.NUM_IN_STRING_REGEX.test(e_ouput)) {\n const expected_numbers = e_ouput.match(OutputMatching.NUM_IN_STRING_REGEX);\n const generated_numbers = g_output.match(OutputMatching.NUM_IN_STRING_REGEX) || [];\n const result = generated_numbers.map((val, i) => {\n if(i >= expected_numbers.length) {\n return OutputResult.createNumberResult(null, val, 0);\n }\n const g_val = new Decimal(val)\n const e_val = new Decimal(expected_numbers[i]);\n return this.checkNumbers(g_val, e_val);\n }, this);\n if(expected_numbers.length > generated_numbers.length) {\n for(let i = generated_numbers.length; i < expected_numbers.length; ++i) {\n result.push(OutputResult.createNumberResult(expected_numbers[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n const numberGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(numberGrade);\n }\n if(OutputMatching.BOOLEAN_IN_STRING_REGEX.test(e_ouput)) {\n const expected_bools = e_ouput.match(OutputMatching.BOOLEAN_IN_STRING_REGEX);\n const generated_bools = g_output.match(OutputMatching.BOOLEAN_IN_STRING_REGEX) || [];\n const result = generated_bools.map((val, i) => {\n if(i >= expected_bools.length) {\n return OutputResult.createBoolResult(null, val, 0);\n }\n const g_bool = TypeParser.toBool(val);\n const e_bool = TypeParser.toBool(expected_bools[i]);\n return this.checkBoolean(g_bool, e_bool );\n }, this);\n if(expected_bools.length > generated_bools.length) {\n for(let i = generated_bools.length; i < expected_bools.length; ++i) {\n result.push(OutputResult.createBoolResult(expected_bools[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n const boolGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(boolGrade);\n }\n const dist = levenshteinDistance(g_output_clean, e_output_clean);\n let gradeDiff = Math.max(0, e_output_clean.length - dist)/e_output_clean.length;\n gradeDiff = Number.isNaN(gradeDiff) ? 0 : gradeDiff;\n const assessment_size = assessmentList.length + 1;\n const gradeAcc = assessmentList.reduce((prev, val) => prev + val/assessment_size, 0);\n const finalGrade = 1 * (gradeDiff/assessment_size + gradeAcc);\n return OutputResult.createStringResult(e_ouput, g_output, finalGrade);\n }\n\n getErrorMessage (errorID, ...args) {\n return LocalizedStrings.getError(errorID, args);\n }\n}\n\n","\nexport function createNumberResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"number\");\n}\n\nexport function createBoolResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"bool\");\n}\n\nexport function createStringResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"string\");\n}\n\nexport class OutputMatchResult {\n\n constructor (expected, generated, grade, type) {\n this.expected = expected;\n this.generated = generated;\n this.grade = grade;\n this.type = type;\n }\n}","import { SyntaxErrorFactory } from \"./error/syntaxErrorFactory\";\n\nexport function recover (_) {\n const start = this._tokenStartCharIndex;\n const stop = this._input.index;\n let text = this._input.getText(start, stop);\n text = this.getErrorDisplay(text);\n const line = this._tokenStartLine;\n const column = this._tokenStartColumn;\n throw SyntaxErrorFactory.invalid_character(text, line, column);\n}\n","import { Assign } from './assign';\n\nexport class ArrayIndexAssign extends Assign {\n\n constructor (id, lineExpression, columnExpression, expression) {\n super(id, expression);\n this.line = lineExpression;\n this.column = columnExpression;\n }\n}\n","import { Declaration } from './declaration';\n\nexport class ArrayDeclaration extends Declaration {\n\n constructor (id, type, lines, columns, initial, isConst) {\n super(id, type, initial, isConst);\n this.lines = lines;\n this.columns = columns;\n }\n\n get isVector () {\n return this.columns == null;\n }\n}","import { Command } from './command';\n\nexport class Assign extends Command {\n \n constructor (id, expression) {\n super();\n this.id = id;\n this.expression = expression;\n }\n}","import { Command } from './command';\n\nexport class Break extends Command {\n\n constructor () {\n super();\n }\n}\n","import { Command } from './command';\n\nexport class Case extends Command {\n\n constructor (expression) {\n super();\n this.expression = expression;\n /**\n * @type {Command[]}\n */\n this.commands = [];\n }\n\n /**\n * \n * @param {Command[]} commands \n */\n setCommands (commands) {\n this.commands = commands;\n }\n\n get isDefault () {\n return this.expression === null;\n }\n}","export class Command {\n\n constructor () {\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n this._sourceInfo = sourceInfo;\n }\n\n get sourceInfo () {\n return this._sourceInfo;\n }\n}\n","export class CommandBlock {\n\t\n\tconstructor(variables, commands) {\n\t\tthis.variables = variables;\n\t\tthis.commands = commands;\n\t\tthis._sourceInfo = null;\n\t}\n\n\tset sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Command } from './command';\n\nexport class Declaration extends Command {\n \n constructor (id, type, initial, isConst) {\n super();\n this.id = id;\n this.type = type;\n this.initial = initial;\n this.isConst = isConst;\n }\n}\n","import { Command } from './command';\n\nexport class For extends Command {\n\n constructor (for_id, for_from, for_to, for_pass, commandBlock) {\n super();\n this.for_id = for_id;\n this.for_from = for_from;\n this.for_to = for_to;\n this.for_pass = for_pass;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n}","export class FormalParameter {\n\n constructor (type, id, byRef = false, variadic = false) {\n this.type = type;\n this.id = id;\n this.byRef = byRef;\n this.variadic = variadic;\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Types } from './../../typeSystem/types';\n\nexport class Function {\n\n /**\n * \n * @param {string} name \n * @param {import('./../../typeSystem/itype').IType} returnType \n * @param {import('./formalParameter').FormalParameter[]} formalParameters \n * @param {import('./commandBlock').CommandBlock} commandBlock \n */\n constructor(name, returnType, formalParameters, commandBlock) {\n this.name = name;\n this.returnType = returnType;\n this.formalParameters = formalParameters;\n this.commandBlock = commandBlock;\n this._sourceInfo = null;\n }\n\n get isMain () {\n return this.name === null && this.returnType.isCompatible(Types.VOID);\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get variablesDeclarations () {\n return this.commandBlock.variables;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n }\n \n hasVariadic () {\n return this.formalParameters.some( p => p.variadic);\n }\n}","import { Command } from './command';\n\nexport class IfThenElse extends Command {\n\n constructor (condition, ifTrue, ifFalse) {\n super();\n this.condition = condition;\n this.ifTrue = ifTrue;\n this.ifFalse = ifFalse;\n }\n}","import { Break } from './break';\nimport { Return } from './return';\nimport { Assign } from './assign';\nimport { ArrayIndexAssign } from './arrayAssign';\nimport { Declaration } from './declaration';\nimport { ArrayDeclaration } from './arrayDeclaration';\nimport { While } from './while';\nimport { For } from './for';\nimport { Function } from './function';\nimport { IfThenElse } from './ifThenElse';\nimport { CommandBlock } from './commandBlock';\nimport { RepeatUntil } from './repeatUntil';\nimport { Switch } from './switch';\nimport { Case } from './case';\nimport { SysCall } from './sysCall';\nimport { FormalParameter } from './formalParameter';\nimport { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing\n\nexport {\n Break,\n Return,\n Assign,\n ArrayIndexAssign,\n Declaration,\n ArrayDeclaration,\n While,\n For,\n Function,\n IfThenElse,\n CommandBlock,\n RepeatUntil,\n Switch,\n Case,\n SysCall,\n FormalParameter,\n FunctionCall\n};","import { While } from './while';\n\nexport class RepeatUntil extends While {\n\n constructor(condition, commandBlock) {\n super(condition, commandBlock);\n }\n\n get testFirst () {\n return false;\n }\n \n}","import { Command } from './command';\n\nexport class Return extends Command {\n\n constructor(expression) {\n super();\n this.expression = expression;\n }\n \n}","import { Command } from './command';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from '../expressions/expression';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Case } from '.';\n\nexport class Switch extends Command {\n \n /**\n * \n * @param {Expression} expression \n * @param {Case[]} cases \n */\n constructor (expression, cases) {\n super();\n this.expression = expression;\n this.cases = cases;\n }\n}","/**\n * This class represents all the language defined functions.\n * The language processor uses the id provided here to properly execute the desired function.\n * The function is actually implemented inside the language processor.\n * All the functions can be found at: js/processor/definedFunctions.js\n */\nexport class SysCall {\n\n constructor (langFunc) {\n this.langFunc = langFunc;\n }\n}","import { Command } from './command';\n\nexport class While extends Command {\n\n constructor (expression, commandBlock) {\n super();\n this.expression = expression;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get testFirst () {\n \treturn true;\n }\n}","export class SyntaxError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SyntaxError);\n }\n}\n","import * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { SyntaxError } from './syntaxError';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createError (message_id, context = []) {\n return new SyntaxError(LocalizedStrings.getError(message_id, context));\n}\n\nexport const SyntaxErrorFactory = Object.freeze({\n extra_lines: () => new SyntaxError(LocalizedStrings.getError(\"extra_lines\")),\n token_missing_one: (expected, token) => {\n const context = [expected, token.text, token.line, token.column];\n return createError(\"token_missing_one\", context);\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n return SyntaxErrorFactory.token_missing_one(line, token);\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"id_missing\", context);\n },\n eos_missing: (token) => {\n const context = [token.line, token.column];\n return createError(\"eos_missing\", context);\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.column, typeName];\n return createError(\"invalid_array_dimension\", context);\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n return createError(\"invalid_array_size\", context);\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n return createError(\"invalid_main_return\", context);\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n return createError(\"invalid_var_declaration\", context);\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n return createError(\"invalid_break_command\", context);\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.column];\n return createError('invalid_terminal', context);\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.column, line]\n return createError(\"invalid_type\", context);\n },\n const_not_init: (token) => {\n const context = [token.line, token.column];\n return createError(\"const_not_init\", context);\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"invalid_id_format\", context);\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_function\", context);\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_variable\", context);\n },\n invalid_character: (text, line, _column) => {\n const context = [text, line];\n return createError(\"invalid_character\", context);\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n return createError(\"annonymous_array_literal\", context);\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n return createError(\"invalid_matrix_literal_line\", context);\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_line\", context);\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_column\", context);\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_vector_size\", context);\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"matrix_to_vector_literal_attr\", context);\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"vector_to_matrix_literal_attr\", context);\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_init_not_literal\", context);\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_exceeds_2d\", context);\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_id_dimension\", context);\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_vector_init\", context);\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_init\", context);\n }\n});\n","import { Expression } from './expression';\n\nexport class ArrayAccess extends Expression {\n\t\n\tconstructor (id, line, column) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.line = line;\n\t\tthis.column = column;\n\t}\n\n\ttoString () {\n\t\tconst strLine = this.line.toString();\n\t\tlet strColumn = null;\n\t\tif(this.column) {\n\t\t\tstrColumn = this.column.toString();\n\t\t}\n\t\tlet text = null;\n\t\tif(strColumn) {\n\t\t\ttext = `${this.id}[${strLine}][${strColumn}]`;\n\t\t} else {\n\t\t\ttext = `${this.id}[${strLine}]`;\n\t\t}\n\t\tif(this.parenthesis ){\n\t\t\treturn `(${text})`\n\t\t} else {\n\t\t\treturn text;\n\t\t}\n\t}\n}","import { Literal } from './literal';\n\nexport class ArrayLiteral extends Literal {\n \n /**\n * \n * @param {import('../../typeSystem/itype').IType} type \n * @param {import('./expression').Expression[]} value \n */\n constructor(type, value) {\n super(type);\n this.value = value;\n }\n\n get subtype () {\n const element = this.value[0];\n if (element instanceof ArrayLiteral) {\n return element.value[0].type;\n } else {\n return element.type;\n }\n }\n\n get lines () {\n return this.value.length;\n }\n\n get columns () {\n const element = this.value[0];\n if (!(element instanceof ArrayLiteral)){\n return null;\n } else {\n return element.value.length;\n }\n }\n\n get isVector () {\n return this.columns === null;\n }\n\n get isValid () {\n return this.validateSize() && this.validateType();\n }\n\n validateType () {\n const valid = true;\n // const subtype = this.subtype;\n // if(this.columns !== null) {\n // const len = this.lines;\n // const len2 = this.columns;\n // for (let i = len - 1; i >= 0 && valid; --i) {\n // for (let j = len2 - 1; j >= 0 && valid; --j) {\n // if(!this.value[i].value[j].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // } else {\n // const len = this.lines;\n // for (var i = len - 1; i >= 0 && valid; i--) {\n // if(!this.value[i].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // Cannot validate type since no information on variables literals are available\n return valid;\n }\n\n validateSize () {\n const valid = true;\n // if(this.columns !== null) {\n // const equalityTest = this.value.map(v => v.value.length)\n // .reduce((old, next) => {\n // console.log(next);\n // if (old == null) {\n // return next;\n // } else if (old === next) {\n // return old\n // } else {\n // return -1;\n // }\n // }, null);\n // valid = equalityTest !== -1;\n // }\n // check is now made inside IVProgParser.parseVectorList(...)\n return valid;\n }\n\n toString () {\n const strList = this.value.map(arrayLiteral => arrayLiteral.toString());\n const text = \"{\" + strList.join(',') + \"}\";\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}\n","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertBoolToString } from \"./../../typeSystem/parsers\";\n\nexport class BoolLiteral extends Literal {\n \n constructor(value) {\n super(Types.BOOLEAN);\n this.value = value;\n }\n\n toString () {\n const text = convertBoolToString(this.value);\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class CharLiteral extends Literal {\n \n constructor(value) {\n super(Types.CHAR);\n this.value = value;\n }\n\n toString () {\n const text = `'${this.value}'`;\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","export class Expression {\n\n constructor () {\n\t\tthis._sourceInfo = null;\n\t\tthis._parenthesis = false;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n\n\tset parenthesis (flag) {\n\t\tthis._parenthesis = flag;\n\t}\n\n\tget parenthesis () {\n\t\treturn this._parenthesis;\n\t}\n}","import { Expression } from './expression';\nimport { LanguageDefinedFunction } from '../../processor/definedFunctions';\n\nexport class FunctionCall extends Expression {\n\n\t/**\n\t * \n\t * @param {string} id \n\t * @param {Expression[]} actualParameters \n\t */\n\tconstructor (id, actualParameters) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.actualParameters = actualParameters;\n\t}\n\n\tget isMainCall () {\n\t\treturn this.id === null;\n\t}\n\n\tget parametersSize () {\n\t\treturn this.actualParameters.length;\n\t}\n\n\ttoString () {\n\t\tlet name = null;\n\t\tif(this.isMainCall) {\n\t\t\tname = LanguageDefinedFunction.getMainFunctionName();\n\t\t} else {\n\t\t\tname = LanguageDefinedFunction.getLocalName(this.id);\n\t\t}\n\t\tlet params = null;\n\t\tif(this.actualParameters.length == 0) {\n\t\t\tparams = \"()\";\n\t\t} else {\n\t\t\tconst strParams = this.actualParameters.map(v => v.toString());\n\t\t\tparams = \"(\" + strParams.join(\",\") + \")\";\n\t\t}\n\t\tif(this.parenthesis) {\n\t\t\treturn `(${name + params})`;\n\t\t} else {\n\t\t\treturn name + params;\n\t\t}\n\t}\n}","import { ArrayAccess } from './arrayAccess';\nimport { FunctionCall } from './functionCall';\nimport { IntLiteral } from './intLiteral';\nimport { RealLiteral } from './realLiteral';\nimport { BoolLiteral } from './boolLiteral';\nimport { CharLiteral } from './charLiteral'\nimport { StringLiteral } from './stringLiteral';\nimport { ArrayLiteral } from './arrayLiteral';\nimport { VariableLiteral } from './variableLiteral';\nimport { InfixApp } from './infixApp';\nimport { UnaryApp } from './unaryApp';\n\nexport {\n\tArrayAccess,\n\tFunctionCall,\n IntLiteral,\n RealLiteral,\n BoolLiteral,\n CharLiteral,\n StringLiteral,\n ArrayLiteral,\n VariableLiteral,\n InfixApp,\n UnaryApp\n};","import { Expression } from './expression';\n\nexport class InfixApp extends Expression {\n\n constructor(op, left, right) {\n super();\n this.op = op;\n this.left = left;\n this.right = right;\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n const r = this.right.toString();\n if(this.parenthesis) {\n return `(${l + op + r})`;\n } else {\n return l + op + r;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class IntLiteral extends Literal {\n \n constructor(value) {\n super(Types.INTEGER);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Expression } from './expression';\n\nexport class Literal extends Expression {\n \n constructor (type) {\n super();\n this.type = type;\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class RealLiteral extends Literal {\n \n constructor(value) {\n super(Types.REAL);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if (this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class StringLiteral extends Literal {\n \n constructor(value) {\n super(Types.STRING);\n this.value = value;\n }\n\n toString() {\n const text = '\"' + this.value + '\"';\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import {InfixApp} from './infixApp';\n\nexport class UnaryApp extends InfixApp {\n \n constructor (op, left) {\n super(op, left, null);\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n if(this.parenthesis) {\n return `(${op + l})`;\n } else {\n return op + l;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class VariableLiteral extends Literal {\n \n constructor(id) {\n super(Types.UNDEFINED);\n this.id = id;\n }\n\n toString () {\n if(this.parenthesis) {\n return `(${this.id})`;\n } else {\n return this.id;\n }\n }\n}","import { CommonTokenStream, InputStream } from 'antlr4/index';\nimport * as Expressions from './expressions';\nimport * as Commands from './commands';\nimport * as AstHelpers from \"./ast_helpers\";\nimport * as Parsers from '../typeSystem/parsers';\nimport { Types } from \"../typeSystem/types\";\nimport { ArrayType } from \"../typeSystem/array_type\";\nimport { SourceInfo } from './sourceInfo';\nimport { convertFromString } from './operators';\nimport { SyntaxErrorFactory } from './error/syntaxErrorFactory';\nimport { LanguageDefinedFunction } from '../processor/definedFunctions';\nimport { LanguageService } from '../services/languageService';\n\nexport class IVProgParser {\n\n static createParser (input) {\n const lexerClass = LanguageService.getCurrentLexer();\n return new IVProgParser(input, lexerClass);\n }\n\n // \n static get BASE () {\n return 0;\n }\n static get FUNCTION () {\n return 1;\n }\n static get COMMAND () {\n return 2;\n }\n static get BREAKABLE () {\n return 4;\n }\n // \n\n constructor (input, lexerClass) {\n this.lexerClass = lexerClass;\n this.inputStream = new InputStream(input)\n this.lexer = new lexerClass(this.inputStream);\n this.lexer.recover = AstHelpers.recover.bind(this.lexer);\n this.tokenStream = new CommonTokenStream(this.lexer);\n this.tokenStream.fill();\n this.pos = 1;\n this.variableTypes = [this.lexerClass.RK_INTEGER,\n this.lexerClass.RK_REAL,\n this.lexerClass.RK_BOOLEAN,\n this.lexerClass.RK_STRING,\n this.lexerClass.RK_CHARACTER\n ];\n this.functionTypes = this.variableTypes.concat(this.lexerClass.RK_VOID);\n this.parsingArrayDimension = 0;\n this.scope = [];\n this.langFuncs = LanguageService.getCurrentLangFuncs();\n this.definedFuncsNameList = [];\n this.definedVariablesStack = [];\n }\n\n parseTree () {\n return this.parseProgram();\n }\n\n getToken (index = this.pos) {\n // if(index === null)\n // index = this.pos;\n return this.tokenStream.LT(index);\n }\n\n insideScope (scope) {\n if(this.scope.length <= 0) {\n return IVProgParser.BASE === scope;\n } else {\n return this.scope[this.scope.length-1] === scope;\n }\n }\n\n pushScope (scope) {\n this.scope.push(scope);\n }\n\n pushVariableStack () {\n this.definedVariablesStack.push([]);\n }\n\n popScope () {\n return this.scope.pop();\n }\n\n popVariableStack () {\n return this.definedVariablesStack.pop();\n }\n\n getCurrentVariableStack () {\n return this.definedVariablesStack[this.definedVariablesStack.length - 1];\n }\n\n isEOF () {\n this.getToken(this.pos);\n return this.tokenStream.fetchedEOF;\n }\n\n parseProgram () {\n this.consumeNewLines();\n const token = this.getToken();\n let globalVars = [];\n let functions = [];\n\n if(this.lexerClass.RK_PROGRAM === token.type) {\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.pushVariableStack();\n for(;;) {\n this.consumeNewLines();\n const token = this.getToken();\n if (token.type === this.lexerClass.RK_CONST || this.isVariableType(token)) {\n globalVars = globalVars.concat(this.parseGlobalVariables());\n } else if (token.type === this.lexerClass.RK_FUNCTION) {\n this.pushVariableStack();\n functions = functions.concat(this.parseFunction());\n this.popVariableStack();\n } else {\n break;\n }\n }\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n if(!this.isEOF()) {\n throw SyntaxErrorFactory.extra_lines();\n }\n this.popVariableStack();\n return {global: globalVars, functions: functions};\n } else {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_PROGRAM],\n token);\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('{', token);\n else\n return false;\n }\n return true;\n }\n\n checkCloseCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('}', token);\n else\n return false;\n }\n return true;\n }\n\n /* It checks if the current token at position pos is a ']'.\n * As a check function it doesn't increment pos.\n *\n * @params bool:attempt, indicates that the token is optional. Defaults: false\n *\n * @returns true if the attempt is true and current token is '[',\n * false is attempt is true and current token is not '['\n **/\n checkOpenBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('[', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(']', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkOpenParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('(', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(')', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkEOS (attempt = false) {\n const eosToken = this.getToken();\n if (eosToken.type !== this.lexerClass.EOS) {\n if (!attempt)\n throw SyntaxErrorFactory.eos_missing(eosToken);\n else\n return false;\n }\n return true;\n }\n\n checkFunctionDuplicate (functionID, funcIDToken) {\n const id = functionID === null ? \"$main\" : functionID;\n const index = this.definedFuncsNameList.indexOf(id);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_function(funcIDToken);\n }\n this.definedFuncsNameList.push(id);\n }\n\n checkVariableDuplicate (variableID, sourceInfo) {\n const index = this.getCurrentVariableStack().indexOf(variableID);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_variable(sourceInfo);\n }\n this.getCurrentVariableStack().push(variableID);\n }\n\n consumeForSemiColon () {\n const eosToken = this.getToken();\n if (eosToken.type === this.lexerClass.EOS && eosToken.text.match(';')) {\n this.pos++;\n return; \n }\n throw SyntaxErrorFactory.token_missing_one(';', eosToken);\n }\n\n parseGlobalVariables () {\n const decl = this.parseMaybeConst();\n this.checkEOS();\n this.pos++;\n return decl;\n }\n\n /*\n * Checks if the next token is PR_CONST. It's only available\n * at global variables declaration level\n * @returns Declararion(const, type, id, initVal?)\n **/\n parseMaybeConst () {\n const constToken = this.getToken();\n if(constToken.type === this.lexerClass.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if(this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.lexer.literalNames[this.lexerClass.RK_CONST]].concat(this.getTypeArray()), constToken);\n }\n\n }\n\n /*\n * Parses a declarion of the form: type --- id --- (= --- EAnd)?\n * @returns a list of Declararion(const, type, id, initVal?)\n **/\n parseDeclaration (typeString, isConst = false) {\n let initial = null;\n let dim1 = null;\n let dim2 = null;\n let dimensions = 0;\n const sourceInfo = SourceInfo.createSourceInfo(this.getToken())\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, sourceInfo);\n // Check for array or vector\n // ID[int/IDi?][int/IDj?]\n if (this.checkOpenBrace(true)) {\n this.pos += 1; \n this.consumeNewLines();\n dim1 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n this.consumeNewLines();\n dim2 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n }\n return this.parseArrayDeclaration(typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2);\n } else {\n const equalsToken = this.getToken();\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n this.pos++;\n initial = this.parseExpressionOR();\n }\n const declaration = new Commands.Declaration(idString, typeString, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n }\n\n parseArrayDeclaration (typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2) {\n const equalsToken = this.getToken();\n let n_lines = dim1;\n let n_columns = dim2;\n let initial = null;\n let dim_is_id = false;\n if(dim1 instanceof Expressions.VariableLiteral || dim2 instanceof Expressions.VariableLiteral) {\n dim_is_id = true;\n if(dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n if(dim_is_id) {\n if(dimensions == 1) {\n throw SyntaxErrorFactory.invalid_vector_init(SourceInfo.createSourceInfo(equalsToken));\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n this.pos += 1\n initial = this.parseArrayLiteral(typeString);\n }\n if(initial == null && dim1 == null) {\n if(dimensions > 1) {\n throw SyntaxErrorFactory.cannot_infer_matrix_line(idString, sourceInfo);\n }\n throw SyntaxErrorFactory.cannot_infer_vector_size(idString, sourceInfo);\n }\n if(dimensions > 1) {\n if(initial == null && dim2 == null) {\n throw SyntaxErrorFactory.cannot_infer_matrix_column(idString, sourceInfo);\n }\n }\n\n if(dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(idString, expString, initial.sourceInfo);\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(idString, expString, initial.sourceInfo);\n }\n\n if(dim1 == null) {\n n_lines = new Expressions.IntLiteral(Parsers.toInt(initial.lines));\n n_lines.sourceInfo = sourceInfo;\n }\n\n if (dimensions > 1) {\n if(dim2 == null) {\n n_columns = new Expressions.IntLiteral(Parsers.toInt(initial.columns));\n n_columns.sourceInfo = sourceInfo;\n } \n }\n const declaration = new Commands.ArrayDeclaration(idString,\n new ArrayType(typeString, dimensions), n_lines, n_columns, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n\n consumeNewLines () {\n let token = this.getToken();\n while(token.type === this.lexerClass.EOS && token.text.match('[\\r\\n]+')) {\n this.pos++;\n token = this.getToken();\n }\n }\n\n isVariableType (token) {\n return this.variableTypes.find(v => v === token.type);\n }\n\n /*\n * Reads the next token of the stream to check if it is a Integer or an ID.\n * @returns Integer | ID\n **/\n parseArrayDimension () {\n const dimToken = this.getToken();\n if(dimToken.type === this.lexerClass.INTEGER) {\n //parse as int literal\n this.pos++;\n return this.getIntLiteral(dimToken);\n } else if(dimToken.type === this.lexerClass.ID) {\n //parse as variable\n this.pos++;\n return this.parseVariable(dimToken);\n } else if(dimToken.type === this.lexerClass.CLOSE_BRACE) {\n return null;\n } else {\n throw SyntaxErrorFactory.invalid_array_dimension(this.lexer.literalNames[this.lexerClass.RK_INTEGER], dimToken);\n }\n }\n\n /*\n * Returns an object {type: 'int', value: value}.\n * It checks for binary and hexadecimal integers.\n * @returns object with fields type and value\n **/\n getIntLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.IntLiteral(Parsers.toInt(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getRealLiteral (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.RealLiteral(Parsers.toReal(token.text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getStringLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.StringLiteral(Parsers.toString(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getCharLiteral (token) {\n const text = token.text;\n const exp = new Expressions.CharLiteral(Parsers.toChar(text));\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n getBoolLiteral (token) {\n const val = Parsers.toBool(token.text);\n const exp = new Expressions.BoolLiteral(val);\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n parseArrayLiteral (typeString) {\n const openCurly = this.checkOpenCurly(true);\n if(!openCurly) {\n const invalid_token = this.getToken();\n throw SyntaxErrorFactory.array_init_not_literal(SourceInfo.createSourceInfo(invalid_token));\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n let data = null;\n const maybeCurlyOpen = this.checkOpenCurly(true);\n if(maybeCurlyOpen) {\n // This is potentially a list of vectors\n data = this.parseVectorList(typeString);\n } else {\n data = this.parseExpressionList();\n }\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n let dataDim = 1;\n if(data[0] instanceof Expressions.ArrayLiteral) {\n dataDim += 1;\n } else if(data.length == 1) {\n console.log(\"Talvez uma variável seja uma melhor opção\");\n }\n const type = new ArrayType(typeString, dataDim);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /** \n * Returns a list of ArrayLiterals. Helper function for parsing matrices\n */\n parseVectorList (typeString) {\n const list = [];\n let lastSize = null;\n for(;;) {\n this.checkOpenCurly();\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n const data = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n if(lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.getText(beginArray.start, endArray.stop);\n throw SyntaxErrorFactory.invalid_matrix_literal_line(expString, sourceInfo);\n }\n const type = new ArrayType(typeString, 1);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n list.push(exp);\n const commaToken = this.getToken();\n if(commaToken.type !== this.lexerClass.COMMA) {\n break;\n } \n this.pos += 1;\n this.consumeNewLines();\n }\n if(list.length == 1) {\n console.log(\"Talvez um vetor seja uma melhor opção\");\n }\n return list\n }\n\n /*\n * Returns an object {type: 'variable', value: value}.\n * @returns object with fields type and value\n **/\n parseVariable (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.VariableLiteral(token.text);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /*\n * Returns an object representing a function. It has\n * four attributes: returnType, id, formalParams and block.\n * The block object has two attributes: declarations and commands\n **/\n parseFunction () {\n this.pushScope(IVProgParser.FUNCTION);\n let formalParams = [];\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_FUNCTION) {\n //throw SyntaxError.createError(this.lexer.literalNames[this.lexerClass.PR_FUNCAO], token);\n return null;\n }\n this.pos++;\n const funType = this.parseType();\n let dimensions = 0;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n }\n }\n const funcIDToken = this.getToken();\n const functionID = this.parseID();\n this.checkFunctionDuplicate(functionID, funcIDToken);\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n if (!this.checkCloseParenthesis(true)) {\n formalParams = this.parseFormalParameters(); // formal parameters \n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n } else {\n this.pos++;\n }\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n let returnType = funType;\n if(dimensions > 0) {\n returnType = new ArrayType(funType, dimensions);\n }\n const func = new Commands.Function(functionID, returnType, formalParams, commandsBlock);\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(LanguageDefinedFunction.getMainFunctionName(),\n this.lexer.literalNames[this.lexerClass.RK_VOID],\n token.line);\n } else if (func.isMain && formalParams.length !== 0) {\n throw SyntaxErrorFactory.main_parameters();\n }\n this.popScope();\n return func;\n }\n\n /*\n * Parse the formal parameters of a function.\n * @returns a list of objects with the following attributes: type, id and dimensions.\n **/\n parseFormalParameters () {\n const list = [];\n for(;;) {\n let dimensions = 0;\n let reference = false;\n const typeString = this.parseType();\n let maybeIDToken = this.getToken();\n if(maybeIDToken.type === this.lexerClass.RK_REFERENCE) {\n reference = true;\n this.pos += 1;\n maybeIDToken = this.getToken();\n }\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, maybeIDToken);\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n }\n }\n let type = null;\n if(dimensions > 0) {\n type = new ArrayType(typeString, dimensions);\n } else {\n type = typeString;\n }\n const parameter = new Commands.FormalParameter(type, idString, reference);\n parameter.sourceInfo = SourceInfo.createSourceInfo(maybeIDToken);\n list.push(parameter);\n const commaToken = this.getToken();\n if (commaToken.type !== this.lexerClass.COMMA)\n break;\n this.pos++;\n this.consumeNewLines();\n }\n return list;\n }\n\n parseID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID) {\n throw SyntaxErrorFactory.id_missing(token);\n }\n this.pos++;\n if (this.insideScope(IVProgParser.FUNCTION)) {\n if (token.text === LanguageDefinedFunction.getMainFunctionName()){\n return null;\n }\n }\n return token.text;\n }\n\n parseMaybeLibID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID && token.type !== this.lexerClass.LIB_ID) {\n throw SyntaxErrorFactory.id_missing(token);\n } \n this.pos++;\n return token.text;\n }\n\n parseType () {\n const token = this.getToken();\n if(token.type === this.lexerClass.ID && this.insideScope(IVProgParser.FUNCTION)) {\n return Types.VOID;\n } else if (token.type === this.lexerClass.RK_VOID && this.insideScope(IVProgParser.FUNCTION)) {\n this.pos++;\n return Types.VOID;\n } else if (this.isVariableType(token)) {\n this.pos++;\n switch(token.type) {\n case this.lexerClass.RK_INTEGER:\n return Types.INTEGER;\n case this.lexerClass.RK_BOOLEAN:\n return Types.BOOLEAN;\n case this.lexerClass.RK_REAL:\n return Types.REAL;\n case this.lexerClass.RK_STRING:\n return Types.STRING;\n case this.lexerClass.RK_CHARACTER:\n return Types.CHAR;\n default:\n break;\n }\n }\n \n throw SyntaxErrorFactory.invalid_type(this.getTypeArray(), token);\n }\n\n parseCommandBlock (optionalCurly = false) {\n let variablesDecl = [];\n const commands = [];\n let hasOpen = false;\n if (this.checkOpenCurly(optionalCurly)) {\n this.pos++;\n hasOpen = true;\n }\n this.consumeNewLines();\n let parsedCommand = false;\n for(;;) {\n\n const cmd = this.parseCommand();\n if (cmd === null)\n break;\n if(cmd !== -1) {\n if (cmd instanceof Array) {\n if(parsedCommand) {\n const lastToken = this.getToken(this.pos - 1);\n throw SyntaxErrorFactory.invalid_var_declaration(lastToken);\n }\n variablesDecl = variablesDecl.concat(cmd);\n } else {\n parsedCommand = true;\n commands.push(cmd);\n }\n }\n }\n this.consumeNewLines();\n if (hasOpen) {\n this.checkCloseCurly()\n this.pos++;\n this.consumeNewLines();\n }\n return new Commands.CommandBlock(variablesDecl, commands);\n }\n\n parseCommand () {\n const token = this.getToken();\n if (this.isVariableType(token)) {\n if(!this.insideScope(IVProgParser.FUNCTION)) {\n throw SyntaxErrorFactory.invalid_var_declaration(token);\n }\n this.pushScope(IVProgParser.BASE);\n const varType = this.parseType();\n this.popScope();\n const cmd = this.parseDeclaration(varType);\n this.checkEOS();\n this.pos++;\n return cmd;\n } else if (token.type === this.lexerClass.ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.LIB_ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.RK_RETURN) {\n return this.parseReturn();\n } else if (token.type === this.lexerClass.RK_WHILE || token.type === this.lexerClass.RK_WHILE_ALT) {\n return this.parseWhile();\n } else if (token.type === this.lexerClass.RK_FOR || token.type === this.lexerClass.RK_FOR_ALT) {\n return this.parseFor();\n } else if (token.type === this.lexerClass.RK_BREAK ) {\n if(!this.insideScope(IVProgParser.BREAKABLE)) {\n throw SyntaxErrorFactory.invalid_break_command(\n this.lexer.literalNames[this.lexerClass.RK_BREAK],\n token\n );\n }\n return this.parseBreak();\n } else if (token.type === this.lexerClass.RK_SWITCH) {\n return this.parseSwitchCase();\n } else if (token.type === this.lexerClass.RK_DO) {\n return this.parseRepeatUntil();\n } else if (token.type === this.lexerClass.RK_IF) {\n return this.parseIfThenElse();\n } else if (this.checkEOS(true)){\n this.pos++;\n return -1;\n } else {\n return null;\n }\n }\n\n parseSwitchCase () {\n this.pushScope(IVProgParser.BREAKABLE);\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.consumeNewLines();\n const casesList = this.parseCases();\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n\n this.popScope();\n return new Commands.Switch(exp, casesList);\n }\n\n parseRepeatUntil () {\n this.pos++;\n this.consumeNewLines();\n this.pushScope(IVProgParser.BREAKABLE);\n const commandsBlock = this.parseCommandBlock();\n this.consumeNewLines(); //Maybe not...\n const whileToken = this.getToken();\n if (whileToken.type !== this.lexerClass.RK_DO_UNTIL) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_DO_UNTIL], whileToken);\n }\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const condition = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.checkEOS();\n this.popScope();\n return new Commands.RepeatUntil(condition, commandsBlock);\n }\n\n parseIfThenElse () {\n if(this.insideScope(IVProgParser.BREAKABLE)) {\n this.pushScope(IVProgParser.BREAKABLE);\n } else {\n this.pushScope(IVProgParser.COMMAND);\n }\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n\n const maybeElse = this.getToken();\n if(maybeElse.type === this.lexerClass.RK_ELSE) {\n this.pos++;\n this.consumeNewLines();\n const maybeIf = this.getToken();\n let elseBlock = null;\n if(this.checkOpenCurly(true)) {\n elseBlock = this.parseCommandBlock();\n } else if(maybeIf.type === this.lexerClass.RK_IF) {\n elseBlock = this.parseIfThenElse();\n } else {\n throw SyntaxErrorFactory.token_missing_list([this.lexer.literalNames[this.lexerClass.RK_IF], '{'], maybeIf);\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, elseBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n this.popScope();\n\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, null);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseFor () {\n this.pushScope(IVProgParser.BREAKABLE);\n const for_token = this.getToken();\n this.pos += 1;\n // parse ID\n const id_token = this.getToken();\n const id = this.parseID();\n const for_id = new Expressions.VariableLiteral(id);\n for_id.sourceInfo = SourceInfo.createSourceInfo(id_token);\n // END parse ID\n const for_from = this.parseForParameters(this.lexerClass.RK_FOR_FROM);\n const for_to = this.parseForParameters(this.lexerClass.RK_FOR_TO);\n const maybePass = this.parseForParameters(this.lexerClass.RK_FOR_PASS);\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.For(for_id, for_from, for_to, maybePass, commandsBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(for_token);\n return cmd;\n }\n\n parseWhile () {\n this.pushScope(IVProgParser.BREAKABLE);\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.While(logicalExpression, cmdBlocks);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseBreak () {\n this.pos++;\n this.checkEOS();\n this.pos++;\n return new Commands.Break();\n }\n\n parseReturn () {\n this.pos++;\n let exp = null;\n if(!this.checkEOS(true)) {\n exp = this.parseExpressionOR();\n this.checkEOS();\n }\n this.pos++;\n return new Commands.Return(exp);\n }\n\n parseIDCommand () {\n const refToken = this.getToken();\n const isID = refToken.type === this.lexerClass.ID;\n const id = this.parseMaybeLibID();\n if(this.checkOpenBrace(true)) {\n this.pos++;\n let lineExpression = null;\n let columnExpression = null;\n this.consumeNewLines();\n lineExpression = this.parseExpression()\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n if (this.checkOpenBrace(true)) {\n this.pos++\n this.consumeNewLines();\n columnExpression = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n }\n const equalToken = this.getToken();\n if (equalToken.type !== this.lexerClass.EQUAL) {\n throw SyntaxErrorFactory.token_missing_one('=', equalToken);\n }\n this.pos++;\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.ArrayIndexAssign(id, lineExpression, columnExpression, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalToken);\n return cmd;\n }\n const equalOrParenthesis = this.getToken();\n if (isID && equalOrParenthesis.type === this.lexerClass.EQUAL) {\n this.pos++\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.Assign(id, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalOrParenthesis);\n return cmd;\n } else if (equalOrParenthesis.type === this.lexerClass.OPEN_PARENTHESIS) {\n const funcCall = this.parseFunctionCallCommand(id);\n this.checkEOS();\n this.pos++;\n return funcCall;\n } else if (isID) {\n throw SyntaxErrorFactory.token_missing_list(['=','('], equalOrParenthesis);\n } else {\n throw SyntaxErrorFactory.invalid_id_format(refToken);\n }\n }\n\n parseForParameters (keyword_code) {\n if(keyword_code === this.lexerClass.RK_FOR_PASS) {\n if(this.checkOpenCurly(true)) {\n return null;\n }\n }\n const from_token = this.getToken();\n if (from_token.type !== keyword_code) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code];\n throw new Error(\"Error de sintaxe no comando repita_para: esperava-se \"+keyword+\" mas encontrou \"+from_token.text);\n }\n this.pos += 1;\n let int_or_id = this.getToken();\n let is_unary_op = false;\n let op = null;\n if(int_or_id.type === this.lexerClass.SUM_OP) {\n is_unary_op = true;\n op = int_or_id.text;\n this.pos += 1;\n int_or_id = this.getToken();\n }\n let for_from = null;\n if (int_or_id.type === this.lexerClass.ID) {\n for_from = new Expressions.VariableLiteral(this.parseID());\n for_from.sourceInfo = SourceInfo.createSourceInfo(int_or_id);\n } else if (int_or_id.type === this.lexerClass.INTEGER) {\n this.pos += 1;\n for_from = this.getIntLiteral(int_or_id);\n }\n if (for_from == null) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code]; \n throw new Error(\"Error de sintaxe no comando repeita_para: \"+ int_or_id.text + \" não é compativel com o esperado para o paramentro \"+ keyword + \". O valor deve ser um inteiro ou variável.\");\n }\n if (is_unary_op) {\n for_from = new Expressions.UnaryApp(convertFromString(op), for_from);\n }\n return for_from;\n }\n\n parseCases () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_CASE) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_CASE], token);\n }\n this.pos++;\n const nextToken = this.getToken();\n if(nextToken.type === this.lexerClass.RK_DEFAULT) {\n this.pos++;\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const defaultCase = new Commands.Case(null);\n defaultCase.setCommands(block.commands);\n return [defaultCase];\n } else {\n const exp = this.parseExpressionOR();\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const aCase = new Commands.Case(exp);\n aCase.setCommands(block.commands);\n const caseToken = this.getToken();\n if(caseToken.type === this.lexerClass.RK_CASE) {\n return [aCase].concat(this.parseCases());\n } else {\n return [aCase];\n }\n }\n }\n\n /*\n * Parses an Expression following the structure:\n *\n * EOR => EAnd ( 'or' EOR)? #expression and\n *\n * EOR => ENot ('and' EOR)? #expression or\n *\n * ENot => 'not'? ER #expression not\n *\n * ER => E ((>=, <=, ==, >, <) E)? #expression relational\n *\n * E => factor ((+, -) E)? #expression\n *\n * factor=> term ((*, /, %) factor)?\n *\n * term => literal || arrayAccess || FuncCall || ID || '('EAnd')'\n **/\n parseExpressionOR () {\n let exp1 = this.parseExpressionAND();\n while (this.getToken().type === this.lexerClass.OR_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const or = convertFromString('or');\n this.consumeNewLines();\n const exp2 = this.parseExpressionAND();\n const finalExp = new Expressions.InfixApp(or, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp\n }\n return exp1;\n }\n\n parseExpressionAND () {\n let exp1 = this.parseExpressionNot();\n while (this.getToken().type === this.lexerClass.AND_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const and = convertFromString('and');\n this.consumeNewLines();\n const exp2 = this.parseExpressionNot();\n const finalExp = new Expressions.InfixApp(and, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpressionNot () {\n const maybeNotToken = this.getToken();\n if (maybeNotToken.type === this.lexerClass.NOT_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const not = convertFromString('not');\n const exp1 = this.parseExpressionRel();\n const finalExp = new Expressions.UnaryApp(not, exp1);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n return finalExp;\n \n } else {\n return this.parseExpressionRel();\n }\n }\n\n parseExpressionRel () {\n let exp1 = this.parseExpression();\n while (this.getToken().type === this.lexerClass.RELATIONAL_OPERATOR) {\n const relToken = this.getToken();\n this.pos++;\n const rel = convertFromString(relToken.text);\n const exp2 = this.parseExpression();\n const finalExp = new Expressions.InfixApp(rel, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(relToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpression () {\n let factor = this.parseFactor();\n while (this.getToken().type === this.lexerClass.SUM_OP) {\n const sumOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(sumOpToken.text);\n const factor2 = this.parseFactor();\n const finalExp = new Expressions.InfixApp(op, factor, factor2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(sumOpToken);\n factor = finalExp;\n }\n return factor;\n }\n\n parseFactor () {\n let term = this.parseTerm();\n while (this.getToken().type === this.lexerClass.MULTI_OP) {\n const multOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(multOpToken.text);\n const term2 =this.parseTerm();\n const finalExp = new Expressions.InfixApp(op, term, term2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(multOpToken);\n term = finalExp;\n }\n return term;\n }\n\n parseTerm () {\n const token = this.getToken();\n let sourceInfo = null;\n let exp = null;\n switch(token.type) {\n case this.lexerClass.SUM_OP:\n this.pos++;\n sourceInfo = SourceInfo.createSourceInfo(token);\n exp = new Expressions.UnaryApp(convertFromString(token.text), this.parseTerm());\n exp.sourceInfo = sourceInfo;\n return exp;\n case this.lexerClass.INTEGER:\n this.pos++;\n return this.getIntLiteral(token);\n case this.lexerClass.REAL:\n this.pos++;\n return this.getRealLiteral(token);\n case this.lexerClass.STRING:\n this.pos++;\n return this.getStringLiteral(token);\n case this.lexerClass.CHARACTER:\n this.pos++;\n return this.getCharLiteral(token);\n case this.lexerClass.RK_TRUE:\n case this.lexerClass.RK_FALSE:\n this.pos++;\n return this.getBoolLiteral(token);\n case this.lexerClass.OPEN_CURLY:\n // No more annonymous array\n // return this.parseArrayLiteral();\n throw SyntaxErrorFactory.annonymous_array_literal(token);\n case this.lexerClass.ID:\n case this.lexerClass.LIB_ID:\n return this.parseIDTerm();\n case this.lexerClass.OPEN_PARENTHESIS:\n return this.parseParenthesisExp();\n default:\n throw SyntaxErrorFactory.invalid_terminal(token);\n }\n }\n\n parseIDTerm () {\n const tokenA = this.getToken();\n const id = this.parseMaybeLibID();\n const isID = tokenA.type === this.lexerClass.ID;\n if(isID && this.checkOpenBrace(true)) {\n let tokenB = null;\n this.pos++;\n const firstIndex = this.parseExpression();\n let secondIndex = null;\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n if(this.checkOpenBrace(true)){\n this.pos++;\n secondIndex = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n }\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB); \n const exp = new Expressions.ArrayAccess(id, firstIndex, secondIndex);\n exp.sourceInfo = sourceInfo;\n return exp;\n\n } else if (this.checkOpenParenthesis(true)) {\n return this.parseFunctionCallExpression(id);\n } else if (isID) {\n const sourceInfo = SourceInfo.createSourceInfo(tokenA);\n const exp = new Expressions.VariableLiteral(id);\n exp.sourceInfo = sourceInfo;\n return exp;\n } else {\n throw SyntaxErrorFactory.invalid_id_format(tokenA);\n }\n }\n\n getFunctionName (id) {\n const name = LanguageDefinedFunction.getInternalName(id);\n if (name === null) {\n if (id === LanguageDefinedFunction.getMainFunctionName()) {\n return null;\n }\n return id;\n } else {\n return name;\n }\n }\n\n parseFunctionCallExpression (id) {\n const tokenA = this.getToken(this.pos - 1);\n const actualParameters = this.parseActualParameters();\n const tokenB = this.getToken(this.pos - 1);\n const funcName = this.getFunctionName(id);\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n const cmd = new Expressions.FunctionCall(funcName, actualParameters);\n cmd.sourceInfo = sourceInfo;\n return cmd;\n }\n\n parseFunctionCallCommand (id) {\n return this.parseFunctionCallExpression(id);\n }\n\n parseParenthesisExp () {\n this.checkOpenParenthesis();\n const tokenA = this.getToken();\n this.pos += 1;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n const tokenB = this.getToken();\n this.pos += 1;\n exp.sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n exp.parenthesis = true;\n return exp;\n }\n\n parseActualParameters () {\n this.checkOpenParenthesis();\n this.pos++;\n if(this.checkCloseParenthesis(true)) {\n this.pos++;\n return [];\n }\n this.consumeNewLines();\n const list = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n return list;\n }\n\n parseExpressionList () {\n const list = [];\n for(;;) {\n const exp = this.parseExpressionOR();\n list.push(exp);\n const maybeToken = this.getToken();\n if (maybeToken.type !== this.lexerClass.COMMA) {\n break;\n } else {\n this.pos++;\n this.consumeNewLines();\n }\n }\n return list;\n }\n\n getTypeArray () {\n const types = this.insideScope(IVProgParser.FUNCTION) ? this.functionTypes : this.variableTypes;\n return types.map( x => this.lexer.literalNames[x]);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertFromString = exports.Operators = void 0;\nexports.Operators = Object.freeze({\n ADD: { ord: 0, value: \"+\" },\n SUB: { ord: 1, value: \"-\" },\n MULT: { ord: 2, value: '*' },\n DIV: { ord: 3, value: '/' },\n MOD: { ord: 4, value: '%' },\n GT: { ord: 5, value: '>' },\n GE: { ord: 6, value: '>=' },\n LT: { ord: 7, value: '<' },\n LE: { ord: 8, value: '<=' },\n EQ: { ord: 9, value: '==' },\n NEQ: { ord: 10, value: '!=' },\n AND: { ord: 11, value: 'and' },\n OR: { ord: 12, value: 'or' },\n NOT: { ord: 13, value: 'not' }\n});\nfunction convertFromString(op) {\n switch (op) {\n case '+': return exports.Operators.ADD;\n case '-': return exports.Operators.SUB;\n case '*': return exports.Operators.MULT;\n case '/': return exports.Operators.DIV;\n case '%': return exports.Operators.MOD;\n case '>': return exports.Operators.GT;\n case '>=': return exports.Operators.GE;\n case '<': return exports.Operators.LT;\n case '<=': return exports.Operators.LE;\n case '==': return exports.Operators.EQ;\n case '!=': return exports.Operators.NEQ;\n case 'and': return exports.Operators.AND;\n case 'or': return exports.Operators.OR;\n case 'not': return exports.Operators.NOT;\n }\n return null;\n}\nexports.convertFromString = convertFromString;\n","export class SourceInfo {\n\n static createSourceInfo (token) {\n return new SourceInfo(token.line, token.column, token.text, token.text.length);\n }\n\n static createSourceInfoFromList (tokenA, tokenB) {\n const line = tokenA.line;\n const column = tokenA.column;\n // adapted from https://github.com/UNIVALI-LITE/Portugol-Studio/blob/master/core/src/main/java/br/univali/portugol/nucleo/analise/sintatica/Portugol.g\n // No idea why...\n const size = tokenB.tokenIndex + 1 - tokenA.tokenIndex\n return new SourceInfo(line, column, \"\", size);\n }\n\n constructor (line, column, text, size) {\n this.line = line;\n this.column = column;\n this.text = text;\n this.size = size;\n }\n\n}","import { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./../util/utils\";\nimport { Config } from \"./../util/config\";\n\nexport class DOMConsole {\n\n static get BASH_TEMPLATE () {\n return `\n
\n \n Terminal\n \n \n
\n
`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n
\n \n
\n
`;\n }\n\n static get USER () {\n return 0;\n }\n\n static get INFO () {\n return 1;\n }\n\n static get ERR () {\n return 2;\n }\n\n static get INPUT () {\n return 3;\n }\n\n constructor (elementID, disableMarginTop = false) {\n this.disableMarginTop = disableMarginTop;\n this.input = null;\n this.cursorInterval = null;\n this.idleInterval = null;\n this.inputDiv = null;\n this.inputCMD = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.needInput = false;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.termDiv = null;\n this.anyKey = false;\n let actualID = elementID\n if (elementID[0] === '#') {\n actualID = elementID.substring(1);\n }\n this.parent = document.getElementById(actualID)\n this.setup();\n this.inputListeners = [];\n this.hideInput();\n this.pending_writes = [];\n this.last_clear = -1;\n }\n\n setup () {\n this._setupDom();\n this._setupEvents();\n }\n\n _setupEvents () {\n this.input.addEventListener('keydown', this.registerInput.bind(this));\n this.clearBtn.addEventListener('click', this.clearBtnClick.bind(this));\n this.hideBtn.addEventListener('click', this.hideBtnClick.bind(this));\n this.showBtn.addEventListener('click', this.showBtnClick.bind(this));\n }\n\n registerInput (event) {\n if (!this.needInput) {\n return;\n }\n const keyCode = event.which;\n if (keyCode === 13 || this.anyKey) {\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n let text = this.input.value;\n text = text.replace('[\\n\\r]+', '');\n this.notifyListeners(text);\n this._appendUserInput(text);\n this.input.value = '';\n this.inputSpan.innerHTML = '';\n this.currentLine = null;\n }\n }\n\n _setupDom () {\n const bashNode = document.createElement('div');\n bashNode.classList.add('bash');\n bashNode.innerHTML = DOMConsole.BASH_TEMPLATE;\n this.termDiv = bashNode.querySelector(\"#ivprog-term\");\n this.termDiv.classList.add(\"ivprog-term-div\");\n this.inputDiv = document.createElement(\"div\");\n this.inputDiv.id = \"ivprog-terminal-inputdiv\";\n this.inputDiv.innerHTML = DOMConsole.INPUT_CARET_TEMPLATE;\n this.input = document.createElement(\"input\");\n this.input.setAttribute(\"name\", \"command\");\n this.input.setAttribute(\"value\", \"\");\n this.input.setAttribute(\"type\", \"text\");\n this.inputDiv.append(this.input);\n this.termDiv.append(this.inputDiv);\n bashNode.append(this.termDiv);\n this.parent.append(bashNode);\n this.inputCMD = this.inputDiv.querySelector(\"#cmd\");\n this.cursorRef = this.inputCMD.querySelector(\"#cursor\");\n this.inputSpan = this.inputCMD.querySelector('span');\n this.clearBtn = bashNode.querySelector('#ivprog-console-clearbtn');\n this.hideBtn = bashNode.querySelector('#ivprog-console-hidebtn');\n this.showBtn = bashNode.querySelector('#ivprog-console-showbtn');\n this._setupCursor();\n //Jquery tooltips....\n window.$(this.clearBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_clear\")});\n window.$(this.showBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_show\")});\n window.$(this.hideBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_hide\")});\n }\n\n _setupCursor () {\n this.inputCMD.addEventListener('click', this.blinkCaretAndFocus.bind(this));\n //this.inputCMD.click();\n\n this.input.addEventListener('keyup', this.updateSpanText.bind(this));\n this.input.addEventListener('blur', this.stopBlinkCaret.bind(this));\n }\n\n blinkCaretAndFocus () {\n if (this.cursorInterval != null) {\n return;\n }\n this.input.focus();\n this.cursorInterval = window.setInterval(() => {\n if (this.cursorRef.style.visibility === 'visible') {\n this.cursorRef.style.visibility = 'hidden';\n } else {\n this.cursorRef.style.visibility = 'visible';\n }\n }, 500);\n }\n\n updateSpanText () {\n this.inputSpan.innerHTML = this.input.value;\n if (this.idleInterval != null)\n window.clearInterval(this.idleInterval);\n this.scheduleNotify()\n }\n\n stopBlinkCaret () {\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n this.cursorRef.style.visibility = 'visible';\n }\n\n notifyListeners (text) {\n this.inputListeners.forEach(resolve => resolve(text));\n this.inputListeners.splice(0, this.inputListeners.length);\n this.hideInput();\n this.anyKey = false;\n }\n\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n async _appendText (text, type, newLine = false) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n \n if (this.currentLine == null) {\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement('div');\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = textDiv\n }\n this.currentLine.innerHTML += this.getOutputText(text);\n if (newLine) {\n console.debug(\"append newline\");\n this.currentLine = null;\n }\n this.scrollTerm();\n }\n\n async _appendTextLn (text, type, filter = true) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement('div');\n textDiv.classList.add(divClass);\n if (filter)\n textDiv.innerHTML = this.getOutputText(text);\n else\n textDiv.innerHTML = `${text}`;\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n async _appendUserInput (text) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(DOMConsole.INPUT);\n const textDiv = document.createElement('div');\n textDiv.innerHTML = this.getUserInputText(text);\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n getOutputText (text) {\n text = text.replace(/\\s/g, \" \");\n return `${text}`;\n }\n\n getUserInputText (text) {\n if (text.trim().length == 0) {\n text = \" \";\n }\n return `${text}`;\n }\n\n scrollTerm () {\n //scrollIt(this.inputDiv.previousSibling,200);\n this.termDiv.scrollTop = this.termDiv.scrollHeight;\n }\n\n focus () {\n this.termDiv.style.display = 'block';\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"-160px\";\n }\n if (this.needInput) {\n this.showInput();\n this.scheduleNotify();\n }\n if (!Utils.isElementInViewport(this.termDiv))\n this.termDiv.scrollIntoView(false);\n this.scrollTerm();\n }\n\n hide () {\n if (this.needInput) {\n clearInterval(this.idleInterval);\n this.hideInput();\n this.needInput = true;\n }\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"0\";\n }\n this.termDiv.style.display = 'none';\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.INPUT:\n return \"ivprog-term-userInput\";\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n dispose () {\n this.input.removeEventListener('keyup', this.updateSpanText.bind(this));\n this.input.removeEventListener('blur', this.stopBlinkCaret.bind(this));\n this.input.removeEventListener('keydown', this.registerInput.bind(this));\n this.inputCMD.removeEventListener('click', this.blinkCaretAndFocus.bind(this));\n this.clearBtn.removeEventListener('click', this.clearBtnClick.bind(this));\n this.hideBtn.removeEventListener('click', this.hideBtnClick.bind(this));\n this.showBtn.removeEventListener('click', this.showBtnClick.bind(this));\n this.input = null;\n this.inputCMD = null;\n this.inputDiv = null;\n this.termDiv = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.currentLine = null;\n const cNode = this.parent.cloneNode(false);\n this.parent.parentNode.replaceChild(cNode, this.parent);\n if (this.cursorInterval != null) {\n clearInterval(this.cursorInterval);\n }\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n }\n }\n\n showInput () {\n this.needInput = true;\n this.inputDiv.style.display = 'block';\n this.inputCMD.click();\n //this.inputCMD.scrollIntoView();\n this.scrollTerm();\n }\n\n hideInput () {\n this.needInput = false;\n this.inputDiv.style.display = ' none';\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n }\n\n requestInput (anyKey = false) {\n const promise = new Promise( (resolve, _) => {\n this.inputListeners.push(resolve);\n this.anyKey = anyKey;\n if (this.idleInterval == null)\n this.scheduleNotify();\n this.showInput();\n });\n return promise;\n }\n\n sendOutput (text) {\n console.debug(text);\n let output = \"\"+text;\n if (output.indexOf('\\n') !== -1) {\n console.debug(\"newline\");\n const outputList = output.split('\\n');\n let i = 0;\n for ( ; i < outputList.length - 1; i += 1) {\n console.debug(\"newline write\");\n let t = outputList[i];\n t = t.replace(/\\t/g,' ');\n t = t.replace(/\\s/g,\" \");\n if (t.length == 0)\n t = \" \"\n this.write(t, true);\n }\n let t = outputList[i];\n t = t.replace(/\\t/g,' ');\n t = t.replace(/\\s/g,\" \");\n if (t.length != 0)\n this.write(t);\n } else {\n console.debug(\"no newline\");\n output = output.replace(/\\t/g,' ');\n output = output.replace(/\\s/g,\" \");\n this.write(output);\n }\n \n }\n\n clearPendingWrites () {\n this.last_clear = Date.now();\n }\n\n clear () {\n this.clearPendingWrites()\n while (this.inputDiv.parentElement.childNodes.length > 1) {\n this.inputDiv.parentElement.removeChild(this.inputDiv.parentElement.firstChild);\n }\n this.input.value = '';\n this.inputSpan.innerHTML = '';\n this.currentLine = null;\n }\n\n clearBtnClick () {\n this.clear();\n }\n\n showBtnClick () {\n this.focus();\n }\n\n hideBtnClick () {\n this.hide();\n }\n\n notifyIdle () {\n this.info(LocalizedStrings.getMessage('awaiting_input_message'));\n this.inputCMD.click();\n }\n\n scheduleNotify () {\n this.idleInterval = window.setInterval(this.notifyIdle.bind(this), Config.idle_input_interval);\n }\n\n cancelPendingInputRequests () {\n this.inputListeners.forEach(resolve => resolve(''));\n this.inputListeners.splice(0, this.inputListeners.length);\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n this.input.value = '';\n this.inputSpan.innerHTML = '';\n this.currentLine = null;\n this.hideInput();\n this.anyKey = false;\n }\n}\n","export class Input {\n\n requestInput () {\n throw new Error(\"Must be implemented\");\n }\n\n cancelPendingInputRequests () {\n throw new Error(\"Must be implemented\");\n }\n}","export class Output {\n\n sendOutput (text) {\n throw new Error(\"Must be implemented\");\n }\n}","import { runner } from './runner';\nimport { initVisualUI, addFunctionChangeListener,\n addGlobalChangeListener, removeFunctionListener,\n removeGlobalListener, getTestCases } from './visualUI/functions';\nimport * as LocalizedStringsService from './services/localizedStringsService';\nimport { i18nHelper } from \"./services/i18nHelper\";\nimport { ActionTypes, getLogs, getLogsAsString, registerClick, registerUserEvent, parseLogs } from \"./services/userLog\";\nimport { prepareActivityToStudentHelper, autoEval } from \"./util/iassignHelpers\";\nimport { openAssessmentDetail } from \"./util/utils\";\nimport { Config } from './util/config';\nimport * as CodeEditorAll from \"./visualUI/text_editor\";\nimport {autoGenerateTestCaseOutput} from './util/auto_gen_output';\n\nconst CodeEditor = {\n initTextEditor: CodeEditorAll.initTextEditor,\n setCode: CodeEditorAll.setCode,\n getCode: CodeEditorAll.getCode,\n updateEditor: CodeEditorAll.updateEditor,\n disable: CodeEditorAll.disable\n};\n\nconst i18n = i18nHelper.i18n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport {\n runner,\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n autoEval,\n prepareActivityToStudentHelper,\n LocalizedStrings,\n i18n,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n ActionTypes,\n CodeEditor,\n openAssessmentDetail,\n autoGenerateTestCaseOutput,\n Config\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Address = void 0;\nclass Address {\n /**\n *\n * @param {Number} id the address id\n * @param {never} value the value stored at this address\n */\n constructor(id, value) {\n this.id = id;\n this.value = value;\n }\n}\nexports.Address = Address;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Location = void 0;\nconst address_1 = require(\"./address\");\nclass LocationHolder {\n constructor() {\n this.data = [];\n this.address_id = 0;\n }\n /**\n *\n * @param {never} value the value to be allocated\n * @returns {number} - the address id\n */\n allocate(value) {\n const id = this.address_id;\n // console.log(\"Allocation address \"+ id);\n const address = new address_1.Address(id, value);\n this.data.push(address);\n this.address_id += 1;\n return id;\n }\n /**\n *\n * @param {number} id\n */\n deallocate(id) {\n const index = this.findIndex(id);\n // console.log(\"Deallocation address \"+ id);\n if (index !== -1) {\n this.data.splice(index, 1);\n return true;\n }\n return false;\n }\n /**\n *\n * @param {number} id\n * @returns {Address} the address identified by id\n */\n find(id) {\n let beg = 0;\n let end = this.data.length;\n // console.log(\"Finding address \"+id);\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return address;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return undefined;\n }\n getAddressAt(pos) {\n return this.data[pos];\n }\n /**\n *\n * @param {number} id address id\n * @returns {number} the index of the address identified by id\n */\n findIndex(id) {\n let beg = 0;\n let end = this.data.length;\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return med;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return -1;\n }\n updateAddress(id, value) {\n const index = this.findIndex(id);\n if (index === -1) {\n throw new Error(\"Invalid address...\" + id);\n }\n this.data[index].value = value;\n }\n clear() {\n for (let i = 0; i < this.data.length; i += 1) {\n delete this.data[i];\n }\n this.data = [];\n this.address_id = 0;\n }\n}\nconst inner_ref = new LocationHolder();\nexports.Location = Object.freeze({\n allocate: inner_ref.allocate.bind(inner_ref),\n deallocate: inner_ref.deallocate.bind(inner_ref),\n find: inner_ref.find.bind(inner_ref),\n updateAddress: inner_ref.updateAddress.bind(inner_ref),\n clear: inner_ref.clear.bind(inner_ref),\n size: () => inner_ref.data.length\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resultTypeAfterUnaryOp = exports.resultTypeAfterInfixOp = void 0;\nconst types_1 = require(\"../typeSystem/types\");\nconst operators_1 = require(\"../ast/operators\");\nconst multiType_1 = require(\"../typeSystem/multiType\");\nconst config_1 = require(\"../util/config\");\nfunction buildInfixAddTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.INTEGER.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.INTEGER.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.REAL.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n return table;\n}\nfunction buildInfixMultiDivSubTable() {\n const table = [[], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n return table;\n}\nfunction buildInfixEqualityInequalityTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixRelationalTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixAndOrTable() {\n const table = [[], [], [], []];\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixModTable() {\n const table = [[]];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n return table;\n}\nfunction buildUnarySumSubList() {\n const list = [];\n list[types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n list[types_1.Types.REAL.ord] = types_1.Types.REAL;\n return list;\n}\nfunction buildUnaryNegList() {\n const list = [];\n list[types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return list;\n}\nfunction buildInfixCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildInfixAddTable());\n compatibilityMap.set(operators_1.Operators.SUB, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.MULT, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.DIV, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.EQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.NEQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.GE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.GT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.OR, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.AND, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.MOD, buildInfixModTable());\n return compatibilityMap;\n}\nfunction buildUnaryCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.SUB, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.NOT, buildUnaryNegList());\n return compatibilityMap;\n}\nconst infixMap = buildInfixCompatibilityTable();\nconst unaryMap = buildUnaryCompatibilityTable();\nfunction resultTypeAfterInfixOp(operator, leftExpressionType, rightExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType && rightExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const typeA = leftExpressionType.types[i];\n for (let j = 0; j < rightExpressionType.types.length; ++i) {\n const typeB = rightExpressionType.types[j];\n newMulti.push(resultTypeAfterInfixOp(operator, typeA, typeB));\n }\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return new multiType_1.MultiType([types_1.Types.INTEGER, types_1.Types.REAL]);\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n else {\n return new multiType_1.MultiType(newMulti);\n }\n }\n else if (leftExpressionType instanceof multiType_1.MultiType) {\n if (leftExpressionType.isCompatible(rightExpressionType)) {\n return resultTypeAfterInfixOp(operator, rightExpressionType, rightExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return rightExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n else if (rightExpressionType instanceof multiType_1.MultiType) {\n if (rightExpressionType.isCompatible(leftExpressionType)) {\n return resultTypeAfterInfixOp(operator, leftExpressionType, leftExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return leftExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n const resultTable = infixMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord][rightExpressionType.ord];\n if (resultType === null || resultType === undefined) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n if (operator === operators_1.Operators.MOD) {\n return types_1.Types.INTEGER;\n }\n else if (operator.ord >= 5 && operator.ord <= 10) {\n return types_1.Types.BOOLEAN;\n }\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterInfixOp = resultTypeAfterInfixOp;\nfunction resultTypeAfterUnaryOp(operator, leftExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const type = leftExpressionType.types[i];\n newMulti.push(resultTypeAfterUnaryOp(operator, type));\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n return types_1.Types.UNDEFINED;\n }\n return new multiType_1.MultiType(newMulti);\n }\n const resultTable = unaryMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord];\n if (resultType == null) {\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterUnaryOp = resultTypeAfterUnaryOp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nexports.Context = Object.freeze({\n BASE: Symbol('context:base'),\n BREAKABLE: Symbol('context:breakable'),\n FUNCTION: Symbol('context:function')\n});\n","import { LanguageService } from '../services/languageService';\nimport {createInputFun, createOutputFun} from './lib/io';\nimport {createLengthFun, createLowercaseFun,\n createrCharAtFun, createSubstringFun,\n createUppercaseFun} from './lib/strings';\nimport {createMatrixColumnsFun, createMatrixLinesFun,\n createNumElementsFun} from './lib/arrays';\nimport {createCastBoolFun, createCastIntFun,\n createCastRealFun, createCastStringFun,\n createIsBoolFun, createIsIntFun,\n createIsRealFun, createCastCharFun} from './lib/lang';\nimport {createAbsFun, createCosFun,\n createInvertFun, createLogFun,\n createMaxFun, createMinFun,\n createNegateFun, createPowFun,\n createSinFun, createSqrtFun,\n createTanFun, createRandFun} from './lib/math';\n\nfunction valueToKey (value, object) {\n for (const key in object) {\n if(Object.prototype.hasOwnProperty.call(object, key)){\n if (object[key] === value) {\n return key;\n }\n }\n }\n return null;\n}\n\nfunction concatObjects (...objs) {\n const result = {};\n for (let i = 0; i < objs.length; i++) {\n const obj = objs[i];\n for(const key in obj) {\n if(Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n }\n return result;\n}\n\nconst libsObject = {\n $mathLib: {\n $sin: createSinFun(),\n $cos: createCosFun(),\n $tan: createTanFun(),\n $sqrt: createSqrtFun(),\n $pow: createPowFun(),\n $log: createLogFun(),\n $abs: createAbsFun(),\n $negate: createNegateFun(),\n $invert: createInvertFun(),\n $max: createMaxFun(),\n $min: createMinFun(),\n $rand: createRandFun()\n },\n $ioLib: {\n $read: createInputFun(),\n $write: createOutputFun()\n },\n $strLib: {\n $substring: createSubstringFun(),\n $length: createLengthFun(),\n $uppercase: createUppercaseFun(),\n $lowercase: createLowercaseFun(),\n $charAt: createrCharAtFun(),\n },\n $arrayLib: {\n $numElements: createNumElementsFun(),\n $matrixLines: createMatrixLinesFun(),\n $matrixColumns: createMatrixColumnsFun()\n },\n $langLib: {\n $isReal: createIsRealFun(),\n $isInt: createIsIntFun(),\n $isBool: createIsBoolFun(),\n $castReal: createCastRealFun(),\n $castInt: createCastIntFun(),\n $castBool: createCastBoolFun(),\n $castString: createCastStringFun(),\n $castChar: createCastCharFun()\n }\n}\n\nconst funcsObject = concatObjects(libsObject.$ioLib, libsObject.$langLib,\n libsObject.$strLib, libsObject.$arrayLib);\n\nexport const LanguageDefinedFunction = Object.freeze({\n getMainFunctionName: () => LanguageService.getCurrentLangFuncs().main_function,\n getInternalName: (localName) => {\n if (localName.indexOf(\".\") !== -1) {\n const names = localName.split(\".\");\n const lib = valueToKey(names[0], LanguageService.getCurrentLangLibs());\n const internalName = valueToKey(names[1], LanguageService.getCurrentLangFuncs());\n if (lib === null || internalName === null) {\n return null;\n }\n return lib + \".\" + internalName;\n }\n const funcName = valueToKey(localName, LanguageService.getCurrentLangFuncs());\n if(funcName !== null) {\n if(funcsObject[funcName]) {\n return funcName;\n }\n }\n return null;\n },\n getFunction: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = names[0];\n const funName = names[1];\n return libsObject[libName][funName];\n }\n return funcsObject[internalName];\n },\n getLocalName: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = LanguageService.getCurrentLangLibs()[names[0]];\n const funName = LanguageService.getCurrentLangFuncs()[names[1]];\n return `${libName}.${funName}`;\n } else if (LanguageService.getCurrentLangFuncs()[internalName]) {\n return LanguageService.getCurrentLangFuncs()[internalName];\n } else { \n return internalName\n }\n }\n});","import { RuntimeError } from './runtimeError';\nimport { SemanticError } from './semanticError';\nimport * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { LanguageDefinedFunction } from '../definedFunctions';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createRuntimeError (i18n_id, context = []) {\n return new RuntimeError(LocalizedStrings.getError(i18n_id, context))\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(LocalizedStrings.getError(i18n_id, context))\n}\n\nexport const ProcessorErrorFactory = Object.freeze({\n symbol_not_found_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"symbol_not_found_full\", context);\n } else {\n return ProcessorErrorFactory.symbol_not_found(id);\n }\n },\n symbol_not_found: (id) => {\n const context = [id];\n return createSemanticError(\"symbol_not_found\", context);\n },\n function_missing_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"function_missing_full\", context);\n } else {\n return ProcessorErrorFactory.function_missing(id);\n }\n },\n function_missing: (id) => {\n const context = [id];\n return createSemanticError(\"function_missing\", context);\n },\n main_missing: () => {\n return createSemanticError(\"main_missing\");\n },\n array_dimension_not_int_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_int_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_int();\n }\n },\n array_dimension_not_int: () => {\n return createSemanticError(\"array_dimension_not_int\");\n },\n unknown_command_full: (sourceInfo)=> {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unknown_command_full\", context);\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n \n },\n unknown_command: ()=> {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (left_type, left_dim, right_type, right_dim, exp, source_info) => {\n if(source_info) {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp, source_info.line,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types(left_type, left_dim, right_type, right_dim, exp);\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"incompatible_types_array_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types_array(exp, type, dim);\n }\n },\n incompatible_types_array: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"incompatible_types_array\", context);\n },\n loop_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"loop_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.loop_condition_type(exp);\n }\n },\n loop_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"loop_condition_type\", context);\n },\n /**\n * @deprecated 01/10/2019\n */\n endless_loop_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"endless_loop_full\", context);\n } else {\n return ProcessorErrorFactory.endless_loop();\n }\n },\n endless_loop: () => {\n return createSemanticError(\"endless_loop\");\n },\n if_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"if_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.if_condition_type(exp);\n }\n },\n if_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"if_condition_type\", context);\n },\n invalid_global_var: () => {\n return createRuntimeError(\"invalid_global_var\")\n },\n not_implemented: (id) => {\n const context = [id]\n return createRuntimeError(\"not_implemented\", context)\n },\n invalid_case_type_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_case_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_case_type(exp, type, dim);\n }\n },\n invalid_case_type: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_case_type\", context);\n },\n void_in_expression_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, id];\n return createSemanticError(\"void_in_expression_full\", context);\n } else {\n return ProcessorErrorFactory.void_in_expression(id);\n }\n },\n void_in_expression: (id) => {\n const context = [id];\n return createSemanticError(\"void_in_expression\", context);\n },\n invalid_array_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_array_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_access(id);\n }\n },\n invalid_array_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_array_access\", context);\n },\n invalid_matrix_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_matrix_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_access(id);\n }\n },\n invalid_matrix_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_matrix_access\", context);\n },\n matrix_column_outbounds_full: (id, value, columns, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_column_outbounds(id, value, columns);\n }\n },\n matrix_column_outbounds: (id, value, columns) => {\n const context = [value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds\", context);\n },\n matrix_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_line_outbounds(id, value, lines);\n }\n },\n matrix_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds\", context);\n },\n vector_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"vector_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.vector_line_outbounds(id, value, lines);\n }\n },\n vector_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"vector_line_outbounds\", context);\n },\n vector_not_matrix_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id];\n return createRuntimeError(\"vector_not_matrix_full\", context);\n } else {\n return ProcessorErrorFactory.vector_not_matrix(id);\n }\n },\n vector_not_matrix: (id) => {\n const context = [id];\n return createRuntimeError(\"vector_not_matrix\", context);\n },\n function_no_return: (id) => {\n const context = [id];\n return createSemanticError(\"function_no_return\", context);\n },\n invalid_void_return_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_void_return(id, type, dim);\n }\n },\n invalid_void_return: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n },\n invalid_return_type_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_return_type(id, type, dim);\n }\n },\n invalid_return_type: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type\", context);\n },\n invalid_parameters_size_full: (id, expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, expected, actual];\n return createSemanticError(\"invalid_parameters_size_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(id, expected, actual);\n }\n },\n invalid_parameters_size: (id, expected, actual) => {\n const context = [id, expected, actual];\n return createSemanticError(\"invalid_parameters_size\", context);\n },\n invalid_parameter_type_full: (fun_name, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameter_type(fun_name, exp);\n }\n },\n invalid_parameter_type: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n },\n invalid_ref_full: (id, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, id , sourceInfo.line];\n return createSemanticError(\"invalid_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_ref(id, exp);\n }\n },\n invalid_ref: (id, exp) => {\n const context = [exp, id];\n return createSemanticError(\"invalid_ref\", context);\n },\n unexpected_break_command_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unexpected_break_command_full\", context);\n } else {\n return ProcessorErrorFactory.unexpected_break_command();\n }\n },\n unexpected_break_command: () => {\n return createRuntimeError(\"unexpected_break_command\");\n },\n invalid_array_literal_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, exp];\n return createRuntimeError(\"invalid_array_literal_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(exp);\n }\n },\n invalid_array_literal_type: (exp) => {\n const context = [exp];\n return createRuntimeError(\"invalid_array_literal_type\", context);\n },\n invalid_array_literal_line_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_line_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(expected, actual);\n }\n },\n invalid_array_literal_line: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_line\", context);\n },\n invalid_array_literal_column_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_column_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(expected, actual);\n }\n },\n invalid_array_literal_column: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_column\", context);\n },\n invalid_unary_op_full: (expString, opName, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (expString, opName, typeLeft, dimLeft, typeRight, dimRight, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_infix_op(opName, typeLeft, dimLeft, typeRight, dimRight);\n }\n },\n invalid_infix_op: (expString, opName, typeLeft, dimLeft, typeRight, dimRight) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_positive_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_positive();\n }\n },\n array_dimension_not_positive: () => {\n return createSemanticError(\"array_dimension_not_positive\");\n },\n invalid_type_conversion: (value, type, dim) => {\n const context = [value, LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_type_conversion\", context);\n },\n invalid_read_type: (exp, type, dim, name, source_info) => {\n const context = [source_info.line, exp, LocalizedStrings.translateType(type, dim), name];\n return createRuntimeError(\"invalid_read_type\", context)\n },\n invalid_read_type_array: (exp, typePos, dimPos, name, typeArray, dimArray, sourceInfo) => {\n const context = [sourceInfo.line, exp, LocalizedStrings.translateType(typePos, dimPos), name,LocalizedStrings.translateType(typeArray, dimArray)];\n return createRuntimeError(\"invalid_read_type_array\", context)\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo)=> {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_const_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_ref(fun_name, exp);\n }\n },\n invalid_const_ref: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_const_ref\", context);\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if(source_info) {\n const context = [source_info.line, var_id];\n return createSemanticError(\"invalid_const_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_assignment(var_id);\n }\n },\n invalid_const_assignment: (var_id) => {\n const context = [var_id];\n return createSemanticError(\"invalid_const_assignment\", context);\n },\n invalid_vector_assignment_full: (left_id, left_size, right_id, right_size, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(left_id, left_size, right_id, right_size);\n }\n },\n invalid_vector_assignment: (left_id, left_size, right_id, right_size) => {\n const context = [left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment\", context);\n },\n invalid_matrix_assignment_full: (left_id, left_line, left_column, right_id, right_line, right_column, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(left_id, left_line, left_column, right_id, right_line, right_column);\n }\n },\n invalid_matrix_assignment: (left_id, left_line, left_column, right_id, right_line, right_column) => {\n const context = [left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment\", context);\n },\n matrix_to_vector_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"matrix_to_vector_attr\", context);\n },\n vector_to_matrix_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"vector_to_matrix_attr\", context);\n },\n invalid_matrix_index_assign_full: (mat_id, mat_line, mat_size, exp, exp_size, source_info) => {\n if(source_info){\n const context = [source_info.line, mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(mat_id, mat_line, mat_size, exp, exp_size)\n }\n },\n invalid_matrix_index_assign: (mat_id, mat_line, mat_size, exp, exp_size) =>{\n const context = [mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign\", context);\n },\n invalid_number_elements_vector: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_elements_vector\", context);\n },\n invalid_number_lines_matrix: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_lines_matrix\", context);\n },\n divsion_by_zero_full: (exp, source_info) => {\n if(source_info) {\n const context = [source_info.line, exp];\n return createRuntimeError(\"divsion_by_zero_full\", context);\n } else {\n return ProcessorErrorFactory.divsion_by_zero(exp);\n }\n },\n divsion_by_zero: (exp) => {\n const context = [exp];\n return createRuntimeError(\"divsion_by_zero\", context);\n },\n undefined_tanget_value: (value, source_info) => {\n const context = [source_info.line, value];\n return createRuntimeError(\"undefined_tanget_value\", context);\n },\n negative_log_value: (source_info) => {\n return createRuntimeError(\"negative_log_value\",[source_info.line]);\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [source_info.line, local_fun_name, index, str, str.length - 1];\n return createRuntimeError(\"invalid_string_index\", context);\n },\n negative_sqrt_value: (source_info) => {\n return createRuntimeError(\"negative_sqrt_value\",[source_info.line]);\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n return createRuntimeError(\"exceeded_recursive_calls\", context);\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n return createSemanticError(\"invalid_for_variable\", context);\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_from\", context);\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_to\", context);\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_pass\", context);\n },\n exceed_max_instructions: () => {\n return createRuntimeError('exceed_max_instructions');\n }\n});","export class RuntimeError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, RuntimeError);\n }\n}","export class SemanticError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SemanticError);\n }\n}","import { Store } from \"./store/store\";\nimport { Modes } from \"./modes\";\nimport { Context } from \"./context\";\nimport { Types } from \"./../typeSystem/types\";\nimport { Operators } from \"./../ast/operators\";\nimport { LanguageDefinedFunction } from \"./definedFunctions\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"./compatibilityTable\";\nimport * as Commands from \"./../ast/commands/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Command } from \"./../ast/commands/command\";\nimport * as Expressions from \"./../ast/expressions/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../ast/expressions/expression\";\nimport * as Utils from \"./../util/utils\";\nimport { ArrayType } from \"./../typeSystem/array_type\";\nimport { convertToString, toInt } from \"../typeSystem/parsers\";\nimport { Config } from \"../util/config\";\nimport { ProcessorErrorFactory } from \"./error/processorErrorFactory\";\nimport { RuntimeError } from \"./error/runtimeError\";\nimport { Location } from \"../memory/location\";\nimport { StoreValue } from \"./store/value/store_value\";\nimport { StoreValueRef } from \"./store/value/store_value_ref\";\nimport { ArrayStoreValue } from \"./store/value/array_store_value\";\nimport { ArrayStoreValueRef } from \"./store/value/array_store_value_ref\";\nimport { StoreValueAddress } from \"./store/value/store_value_address\";\nimport { LocalizedStrings } from \"../services/localizedStringsService\";\n\nexport class IVProgProcessor {\n static get MAIN_INTERNAL_ID () {\n return \"$main\";\n }\n\n constructor (ast) {\n this.ast = ast;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.input = null;\n this.forceKill = false;\n this.output = null;\n this.mode = Modes.RUN;\n /**\n * Stores the sourceInfo of every function call, command or expression\n */\n this.function_call_stack = [];\n this.instruction_count = 0;\n this.function_call_count = 0;\n }\n\n registerInput (input) {\n if (this.input !== null) this.input = null;\n this.input = input;\n }\n\n registerOutput (output) {\n if (this.output !== null) this.output = null;\n this.output = output;\n }\n\n checkContext (context) {\n return this.context[this.context.length - 1] === context;\n }\n\n ignoreSwitchCases (store) {\n if (store.mode === Modes.RETURN) {\n return true;\n } else if (store.mode === Modes.BREAK) {\n return true;\n } else {\n return false;\n }\n }\n\n prepareState () {\n if (this.stores !== null) {\n for (let i = 0; i < this.stores.length; i++) {\n delete this.stores[i];\n }\n this.stores = null;\n }\n if (this.globalStore !== null) this.globalStore = null;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.instruction_count = 0;\n this.mode = Modes.RUN;\n }\n\n async interpretAST () {\n this.prepareState();\n Location.clear();\n await this.initGlobal();\n const mainFunc = this.findMainFunction();\n if (mainFunc === null) {\n throw ProcessorErrorFactory.main_missing();\n }\n return this.runFunction(mainFunc, [], this.globalStore);\n }\n\n async initGlobal () {\n if (!this.checkContext(Context.BASE)) {\n return ProcessorErrorFactory.invalid_global_var();\n }\n return this.executeCommands(this.globalStore, this.ast.global);\n }\n\n findMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n if (name === IVProgProcessor.MAIN_INTERNAL_ID) {\n return this.findMainFunction();\n }\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n throw ProcessorErrorFactory.function_missing(name);\n }\n return val;\n }\n }\n\n async runFunction (func, actualParameters, store) {\n const funcName = func.isMain ? IVProgProcessor.MAIN_INTERNAL_ID : func.name;\n const funcStore = new Store(funcName);\n funcStore.extendStore(this.globalStore);\n await this.associateParameters(\n func.formalParameters,\n actualParameters,\n store,\n funcStore\n );\n this.context.push(Context.FUNCTION);\n this.stores.push(funcStore);\n const stoWithVars = await this.executeCommands(\n funcStore,\n func.variablesDeclarations\n );\n const finalSto = this.executeCommands(stoWithVars, func.commands);\n this.stores.pop();\n this.context.pop();\n return finalSto;\n }\n\n /**\n *\n * @param {import('./../ast/commands/formalParameter').FormalParameter[]} formal_params\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateParameters (\n formal_params,\n effective_params,\n caller_store,\n callee_store\n ) {\n const funcName =\n callee_store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : callee_store.name;\n\n const hasVariadic = formal_params.some((p) => p.variadic);\n\n if (\n (formal_params.length != effective_params.length && !hasVariadic) ||\n formal_params.length > effective_params.length\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size(\n funcName,\n formal_params.length,\n effective_params.length\n );\n }\n for (\n let i = 0, j = 0;\n i < formal_params.length && j < effective_params.length;\n i += 1, j += 1\n ) {\n const formalParameter = formal_params[i];\n if (formalParameter.variadic) {\n [j, callee_store] = await this.associateVariadicParameter(\n funcName,\n formalParameter,\n j,\n effective_params,\n caller_store,\n callee_store\n );\n } else {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store\n );\n }\n }\n return callee_store;\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {number} index\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateVariadicParameter (\n funcName,\n formalParameter,\n index,\n effective_params,\n caller_store,\n callee_store\n ) {\n let i;\n let count = 1;\n for (i = index; i < effective_params.length; i += 1) {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store,\n count\n );\n count += 1;\n }\n const variadicCount = new StoreValue(Types.INTEGER, count, undefined, true);\n callee_store.insertStore(`${formalParameter.id}.0`, variadicCount);\n return [i - 1, callee_store];\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {Expression} actualParameter\n * @param {Store} callerStore\n * @param {Store} calleeStore\n * @param {number} variadicCount The number of the current value being assigned to the variadic parameter, default 0\n */\n async associateParameter (\n funcName,\n formalParameter,\n actualParameter,\n callerStore,\n calleeStore,\n variadicCount = 0\n ) {\n const actualValue = await this.evaluateExpression(\n callerStore,\n actualParameter\n );\n\n let shouldTypeCast = false;\n\n if (!formalParameter.type.isCompatible(actualValue.type)) {\n if (\n Config.enable_type_casting &&\n !formalParameter.byRef &&\n Store.canImplicitTypeCast(formalParameter.type, actualValue.type)\n ) {\n shouldTypeCast = true;\n } else {\n throw ProcessorErrorFactory.invalid_parameter_type(\n funcName,\n actualParameter.toString()\n );\n }\n }\n\n if (formalParameter.byRef && !actualValue.inStore()) {\n throw ProcessorErrorFactory.invalid_ref(\n funcName,\n actualParameter.toString()\n );\n }\n\n if (formalParameter.byRef) {\n const realObj = callerStore.getStoreObject(actualValue.id);\n let ref = null;\n if (actualValue instanceof ArrayStoreValue) {\n // it's a vector or matrix...\n const values = actualValue.get();\n const array_type = actualValue.type;\n const addresses = values.map((v) =>\n realObj.getLocAddressOf(v.line, v.column)\n );\n const columns = actualValue.isVector() ? 0 : actualValue.columns;\n ref = new ArrayStoreValueRef(\n array_type,\n values,\n addresses,\n actualValue.lines,\n columns,\n realObj.id\n );\n } else {\n if (actualValue instanceof StoreValueAddress) {\n const line = actualValue.line;\n const column = actualValue.column;\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.getLocAddressOf(line, column),\n realObj.id\n );\n ref.setReferenceDimension(realObj.type.dimensions);\n } else {\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.locAddress,\n realObj.id\n );\n }\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, ref);\n } else {\n let realValue = actualValue;\n if (shouldTypeCast) {\n realValue = Store.doImplicitCasting(formalParameter.type, realValue);\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, realValue);\n }\n return calleeStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command[]} cmds\n *\n * @returns {Promise}\n */\n async executeCommands (store, cmds) {\n // helper to partially apply a function, in this case executeCommand\n let sto = store;\n for (let i = 0; i < cmds.length; i += 1) {\n sto = await this.executeCommand(sto, cmds[i]);\n }\n return sto;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command} cmd\n *\n * @returns {Promise}\n */\n async executeCommand (store, cmd) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(5);\n }\n\n // Checks if it must interrupt the execution for some reason\n if (this.instruction_count >= Config.max_instruction_count) {\n throw ProcessorErrorFactory.exceed_max_instructions();\n } else if (this.forceKill) {\n throw \"FORCED_KILL!\";\n } else if (store.mode === Modes.PAUSE) {\n return this.executeCommand(store, cmd);\n } else if (store.mode === Modes.RETURN) {\n return store;\n } else if (\n this.checkContext(Context.BREAKABLE) &&\n store.mode === Modes.BREAK\n ) {\n return store;\n } else if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n\n if (cmd instanceof Commands.Declaration) {\n return this.executeDeclaration(store, cmd);\n } else if (cmd instanceof Commands.ArrayIndexAssign) {\n return this.executeArrayIndexAssign(store, cmd);\n } else if (cmd instanceof Commands.Assign) {\n return this.executeAssign(store, cmd);\n } else if (cmd instanceof Commands.Break) {\n return this.executeBreak(store, cmd);\n } else if (cmd instanceof Commands.Return) {\n return this.executeReturn(store, cmd);\n } else if (cmd instanceof Commands.IfThenElse) {\n return this.executeIfThenElse(store, cmd);\n } else if (cmd instanceof Commands.RepeatUntil) {\n return this.executeRepeatUntil(store, cmd);\n } else if (cmd instanceof Commands.While) {\n return this.executeWhile(store, cmd);\n } else if (cmd instanceof Commands.For) {\n return this.executeFor(store, cmd);\n } else if (cmd instanceof Commands.Switch) {\n return this.executeSwitch(store, cmd);\n } else if (cmd instanceof Expressions.FunctionCall) {\n return this.executeFunctionCall(store, cmd);\n } else if (cmd instanceof Commands.SysCall) {\n return this.executeSysCall(store, cmd);\n } else {\n throw ProcessorErrorFactory.unknown_command(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.SysCall} cmd\n *\n * @returns {Promise}\n */\n async executeSysCall (store, cmd) {\n const func = cmd.langFunc.bind(this);\n return func(store, cmd);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.FunctionCall} cmd\n *\n * @returns {Promise}\n */\n async executeFunctionCall (store, cmd) {\n let func = null;\n if (cmd.isMainCall) {\n func = this.findMainFunction();\n } else {\n func = this.findFunction(cmd.id);\n }\n this.function_call_stack.push(cmd.sourceInfo);\n const sto = await this.runFunction(func, cmd.actualParameters, store);\n sto.destroy();\n if (\n !Types.VOID.isCompatible(func.returnType) &&\n sto.mode !== Modes.RETURN\n ) {\n const funcName =\n func.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : func.name;\n throw ProcessorErrorFactory.function_no_return(funcName);\n } else {\n this.function_call_stack.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Switch} cmd\n *\n * @returns {Promise}\n */\n async executeSwitch (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const switchCases = cmd.cases;\n let lastStore = store;\n let lastCaseCheckResult = false;\n for (\n let i = 0;\n i < switchCases.length && !this.ignoreSwitchCases(lastStore);\n i += 1\n ) {\n const switchCase = switchCases[i];\n if (lastCaseCheckResult || switchCase.isDefault) {\n lastStore = await this.executeCommands(lastStore, switchCase.commands);\n } else {\n const equalityInfixApp = new Expressions.InfixApp(\n Operators.EQ,\n cmd.expression,\n switchCase.expression\n );\n equalityInfixApp.sourceInfo = switchCase.sourceInfo;\n const result = await this.evaluateExpression(\n lastStore,\n equalityInfixApp\n );\n if (result.get()) {\n lastStore = await this.executeCommands(\n lastStore,\n switchCase.commands\n );\n }\n lastCaseCheckResult = result.get();\n }\n }\n this.context.pop();\n if (lastStore.mode === Modes.BREAK) {\n lastStore.mode = Modes.RUN;\n }\n return lastStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.For} cmd\n *\n * @returns {Promise}\n */\n async executeFor (store, cmd) {\n //BEGIN for -> while rewrite\n const initCmd = new Commands.Assign(cmd.for_id.id, cmd.for_from);\n initCmd.sourceInfo = cmd.sourceInfo;\n // Assume for is iterating forward and that pass is not missing\n let passValue = cmd.for_pass;\n let condition = new Expressions.InfixApp(\n Operators.LT,\n cmd.for_id,\n cmd.for_to\n );\n\n if (cmd.for_pass == null) {\n passValue = new Expressions.IntLiteral(toInt(1));\n const checkEndGTBegin = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(Operators.GE, cmd.for_to, cmd.for_from)\n );\n if (!checkEndGTBegin.get()) {\n passValue = new Expressions.IntLiteral(toInt(-1));\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n } else {\n const isForward = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(\n Operators.GE,\n cmd.for_pass,\n new Expressions.IntLiteral(toInt(0))\n )\n );\n if (!isForward.get()) {\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n }\n\n condition.sourceInfo = cmd.sourceInfo;\n const increment = new Commands.Assign(\n cmd.for_id.id,\n new Expressions.InfixApp(Operators.ADD, cmd.for_id, passValue)\n );\n increment.sourceInfo = cmd.sourceInfo;\n const whileBlock = new Commands.CommandBlock(\n [],\n cmd.commands.concat(increment)\n );\n const forAsWhile = new Commands.While(condition, whileBlock);\n forAsWhile.sourceInfo = cmd.sourceInfo;\n //END for -> while rewrite\n const newCmdList = [initCmd, forAsWhile];\n return this.executeCommands(store, newCmdList);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.RepeatUntil} cmd\n *\n * @returns {Promise}\n */\n async executeRepeatUntil (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const sto = await this.executeCommands(store, cmd.commands);\n if (sto.mode === Modes.BREAK) {\n this.context.pop();\n sto.mode = Modes.RUN;\n return sto;\n }\n const checkCondition = await this.evaluateExpression(sto, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(cmd.sourceInfo);\n }\n this.context.pop();\n if (checkCondition.get()) {\n return sto;\n } else {\n return this.executeCommand(sto, cmd);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.While} cmd\n *\n * @returns {Promise}\n */\n async executeWhile (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const checkCondition = await this.evaluateExpression(store, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n if (checkCondition.get()) {\n const sto = await this.executeCommands(store, cmd.commands);\n this.context.pop();\n if (sto.mode === Modes.BREAK) {\n sto.mode = Modes.RUN;\n return sto;\n }\n return this.executeCommand(sto, cmd);\n } else {\n this.context.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.IfThenElse} cmd\n *\n * @returns {Promise}\n */\n async executeIfThenElse (store, cmd) {\n const isTrue = await this.evaluateExpression(store, cmd.condition);\n if (!isTrue.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (isTrue.get()) {\n return this.executeCommands(store, cmd.ifTrue.commands);\n } else if (cmd.ifFalse !== null) {\n if (cmd.ifFalse instanceof Commands.IfThenElse) {\n return this.executeCommand(store, cmd.ifFalse);\n } else {\n return this.executeCommands(store, cmd.ifFalse.commands);\n }\n } else {\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Return} cmd\n *\n * @returns {Promise}\n */\n async executeReturn (store, cmd) {\n const funcName =\n store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : store.name;\n // console.log(funcName, store.name === IVProgProcessor.MAIN_INTERNAL_ID);\n const func = this.findFunction(store.name);\n const funcType = func.returnType;\n const value = await this.evaluateExpression(store, cmd.expression);\n if (value === null && funcType.isCompatible(Types.VOID)) {\n store.mode = Modes.RETURN;\n return store;\n }\n\n let real_value = value;\n if (value === null || !funcType.isCompatible(value.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(funcType, value.type)\n ) {\n const stringInfo = funcType.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n real_value = Store.doImplicitCasting(funcType, value);\n }\n\n store.insertStore(\"$\", real_value);\n store.mode = Modes.RETURN;\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Break} cmd\n *\n * @returns {Promise}\n */\n async executeBreak (store, cmd) {\n if (this.checkContext(Context.BREAKABLE)) {\n store.mode = Modes.BREAK;\n return store;\n } else {\n throw ProcessorErrorFactory.unexpected_break_command_full(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Assign} cmd\n *\n * @returns {Promise}\n */\n async executeAssign (store, cmd) {\n const inStore = store.applyStore(cmd.id);\n if (inStore.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let realValue = value;\n if (!inStore.type.isCompatible(realValue.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(inStore.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(inStore.type, realValue);\n } else {\n const stringInfo = inStore.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n\n if (inStore instanceof ArrayStoreValue) {\n const columns = realValue.columns == null ? 0 : realValue.columns;\n if (inStore.lines !== realValue.lines || inStore.columns !== columns) {\n const exp = cmd.expression.toString();\n if (inStore.isVector()) {\n throw ProcessorErrorFactory.invalid_vector_assignment_full(\n cmd.id,\n inStore.lines,\n exp,\n realValue.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.invalid_matrix_assignment_full(\n cmd.id,\n inStore.lines,\n inStore.columns,\n exp,\n realValue.lines,\n realValue.columns,\n cmd.sourceInfo\n );\n }\n }\n }\n\n store.updateStore(cmd.id, realValue);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayIndexAssign} cmd\n *\n * @returns {Promise}\n */\n async executeArrayIndexAssign (store, cmd) {\n const mustBeArray = store.applyStore(cmd.id);\n let used_dims = 0;\n if (mustBeArray.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, cmd.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n used_dims += 1;\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, cmd.column);\n let column = null;\n if (columnSV != null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n used_dims += 1;\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let actualValue = value;\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n if (column != null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (column != null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n cmd.id,\n column,\n mustBeArray.columns,\n cmd.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n\n if (!mustBeArray.type.canAccept(value.type, used_dims)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(mustBeArray.type.innerType, value.type)\n ) {\n const type = mustBeArray.type.innerType;\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n actualValue = Store.doImplicitCasting(mustBeArray.type.innerType, value);\n }\n\n const current_value = mustBeArray.getAt(line, column);\n if (current_value instanceof ArrayStoreValue) {\n if (\n current_value.lines !== actualValue.lines ||\n current_value.columns !== actualValue.columns\n ) {\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.invalid_matrix_index_assign_full(\n cmd.id,\n line,\n current_value.lines,\n exp,\n actualValue.lines,\n cmd.sourceInfo\n );\n }\n }\n\n return store.updateStoreArray(cmd.id, actualValue, line, column);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Declaration} cmd\n *\n * @returns {Promise}\n */\n async executeDeclaration (store, cmd) {\n if (cmd instanceof Commands.ArrayDeclaration) {\n return this.executeArrayDeclaration(store, cmd);\n } else {\n let temp = new StoreValue(cmd.type, null, null, cmd.isConst);\n if (cmd.initial !== null) {\n const value = await this.evaluateExpression(store, cmd.initial);\n let realValue = value;\n if (!value.type.isCompatible(cmd.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(cmd.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(cmd.type, realValue);\n } else {\n const stringInfo = value.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n temp = new StoreValue(cmd.type, realValue.get(), null, cmd.isConst);\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayDeclaration} cmd\n *\n * @returns {Promise}\n */\n async executeArrayDeclaration (store, cmd) {\n const linesSV = await this.evaluateExpression(store, cmd.lines);\n if (!Types.INTEGER.isCompatible(linesSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n const line = linesSV.get().toNumber();\n const columnsSV = await this.evaluateExpression(store, cmd.columns);\n let column = null;\n if (columnsSV !== null) {\n if (!Types.INTEGER.isCompatible(columnsSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnsSV.get().toNumber();\n if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n let temp = new ArrayStoreValue(\n cmd.type,\n [],\n line,\n column,\n null,\n cmd.isConst\n );\n if (cmd.initial !== null) {\n // array can only be initialized by a literal....\n const valueList = await this.evaluateArrayLiteral(\n store,\n cmd.initial,\n cmd.type,\n line,\n column\n );\n temp = new ArrayStoreValue(\n cmd.type,\n valueList,\n line,\n column,\n null,\n cmd.isConst\n );\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expression} exp\n *\n * @returns {Promise}\n */\n async evaluateExpression (store, exp) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(5);\n }\n if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n if (this.instruction_count >= Config.max_instruction_count) {\n throw new Error(\n \"Número de instruções excedeu o limite definido. Verifique se seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"\n );\n }\n if (exp instanceof Expressions.UnaryApp) {\n return this.evaluateUnaryApp(store, exp);\n } else if (exp instanceof Expressions.InfixApp) {\n return this.evaluateInfixApp(store, exp);\n } else if (exp instanceof Expressions.ArrayAccess) {\n return this.evaluateArrayAccess(store, exp);\n } else if (exp instanceof Expressions.VariableLiteral) {\n return this.evaluateVariableLiteral(store, exp);\n } else if (exp instanceof Expressions.IntLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.RealLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.BoolLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.StringLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.CharLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.ArrayLiteral) {\n throw new Error(\n \"Internal Error: The system should not eval an array literal.\"\n );\n } else if (exp instanceof Expressions.FunctionCall) {\n return this.evaluateFunctionCall(store, exp);\n }\n return null;\n }\n\n async evaluateFunctionCall (store, exp) {\n if (exp.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n exp.sourceInfo\n );\n }\n const func = this.findFunction(exp.id);\n if (Types.VOID.isCompatible(func.returnType)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (this.function_call_stack.length >= Config.max_call_stack) {\n throw ProcessorErrorFactory.exceeded_recursive_calls(exp.sourceInfo);\n }\n this.function_call_stack.push(exp.sourceInfo);\n const sto = await this.runFunction(func, exp.actualParameters, store);\n if (sto.mode !== Modes.RETURN) {\n throw new Error(\n \"!!!Internal error: the function that was called did not have a return command or did not set the store mode properly -> \" +\n exp.id\n );\n }\n const val = sto.applyStore(\"$\");\n sto.destroy();\n this.function_call_stack.pop();\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exp\n * @param {ArrayType} type\n *\n * @returns {Promise}\n */\n async evaluateArrayLiteral (store, exp, type, lines, columns) {\n if (!exp.isVector) {\n if (columns == null) {\n throw new Error(\n \"This should never happen: Vector cannot be initialized by a matrix\"\n );\n }\n const storeValueMatrix = await this.evaluateMatrix(\n store,\n exp,\n type,\n lines,\n columns\n );\n return storeValueMatrix.reduce((prev, next) => prev.concat(next), []);\n } else {\n if (columns != null) {\n throw new Error(\n \"This should never happen: Matrix cannot be initialized by a vector\"\n );\n }\n return this.evaluateVector(store, exp, type, lines);\n }\n }\n\n /**\n * Evalautes a list of literals and expression composing the vector\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n * @param {number} n_elements\n *\n * @returns {Promise} store object list\n */\n async evaluateVector (store, exps, type, n_elements) {\n const values = exps.value;\n if (n_elements !== values.length) {\n throw ProcessorErrorFactory.invalid_number_elements_vector(\n n_elements,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const actualValues = await Promise.all(\n values.map((exp) => this.evaluateExpression(store, exp))\n );\n return actualValues.map((v, index) => {\n if (!type.canAccept(v.type, 1)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, v.type)\n ) {\n // const stringInfo = v.type.stringInfo();\n // const info = stringInfo[0];\n const exp_str = values[index].toString();\n // TODO - fix error message\n throw ProcessorErrorFactory.invalid_array_literal_type_full(\n exp_str,\n values[index].sourceInfo\n );\n }\n const newValue = Store.doImplicitCasting(type.innerType, v);\n return newValue;\n }\n return v;\n });\n }\n\n /**\n * Evaluates a list of array literals composing the matrix\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n *\n * @returns {Promise}\n */\n async evaluateMatrix (store, exps, type, lines, columns) {\n const values = exps.value;\n if (values.length !== lines) {\n throw ProcessorErrorFactory.invalid_number_lines_matrix(\n lines,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const vectors = values.map((vector) => {\n const vec_type = new ArrayType(type.innerType, 1);\n return this.evaluateVector(store, vector, vec_type, columns);\n });\n return await Promise.all(vectors);\n }\n\n /**\n *\n * @param {Store} _\n * @param {import('../ast/expressions/literal').Literal} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateLiteral (_, exp) {\n return new StoreValue(exp.type, exp.value);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.VariableLiteral} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateVariableLiteral (store, exp) {\n const val = store.applyStore(exp.id);\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayAccess} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateArrayAccess (store, exp) {\n const mustBeArray = store.getStoreObject(exp.id);\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n exp.id,\n exp.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, exp.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(exp.sourceInfo);\n }\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, exp.column);\n let column = null;\n if (columnSV !== null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n exp.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n }\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n if (column !== null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (column !== null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n exp.id,\n column,\n mustBeArray.columns,\n exp.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n }\n const result = mustBeArray.getAt(line, column);\n const type = mustBeArray.type.innerType;\n if (Array.isArray(result)) {\n const values = result.map((val, col) => {\n return new StoreValueAddress(\n type,\n val,\n line,\n col,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n });\n return new ArrayStoreValue(\n new ArrayType(type, 1),\n values,\n mustBeArray.columns,\n null,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n } else {\n return new StoreValueAddress(\n type,\n result,\n line,\n column,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.UnaryApp} unaryApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateUnaryApp (store, unaryApp) {\n const left = await this.evaluateExpression(store, unaryApp.left);\n const resultType = resultTypeAfterUnaryOp(unaryApp.op, left.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n const stringInfo = left.type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_unary_op_full(\n unaryApp.op,\n info.type,\n info.dim,\n unaryApp.sourceInfo\n );\n }\n switch (unaryApp.op.ord) {\n case Operators.ADD.ord:\n return new StoreValue(resultType, left.get());\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().negated());\n case Operators.NOT.ord:\n return new StoreValue(resultType, !left.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid UnaryApp \" + unaryApp.op);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.InfixApp} infixApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateInfixApp (store, infixApp) {\n const left = await this.evaluateExpression(store, infixApp.left);\n const right = await this.evaluateExpression(store, infixApp.right);\n let shouldImplicitCast = false;\n let resultType = resultTypeAfterInfixOp(infixApp.op, left.type, right.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(left.type, right.type)\n ) {\n shouldImplicitCast = true;\n } else {\n const stringInfoLeft = left.type.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = right.type.stringInfo();\n const infoRight = stringInfoRight[0];\n throw ProcessorErrorFactory.invalid_infix_op_full(\n infixApp.op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n infixApp.sourceInfo\n );\n }\n }\n let result = null;\n switch (infixApp.op.ord) {\n case Operators.ADD.ord: {\n if (Types.STRING.isCompatible(left.type)) {\n const rightStr = convertToString(right.get(), right.type);\n return new StoreValue(resultType, left.get() + rightStr);\n } else if (Types.STRING.isCompatible(right.type)) {\n const leftStr = convertToString(left.get(), left.type);\n return new StoreValue(resultType, leftStr + right.get());\n } else if (Types.CHAR.isCompatible(left.type)) {\n const strLeft = convertToString(left.get(), left.type);\n const strRight = convertToString(right.get(), right.type);\n return new StoreValue(resultType, strLeft + strRight);\n } else {\n return new StoreValue(resultType, left.get().plus(right.get()));\n }\n }\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().minus(right.get()));\n case Operators.MULT.ord: {\n result = left.get().times(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.DIV.ord: {\n if (right.get() == 0) {\n throw ProcessorErrorFactory.divsion_by_zero_full(\n infixApp.toString(),\n infixApp.sourceInfo\n );\n }\n if (Types.INTEGER.isCompatible(resultType))\n result = left.get().divToInt(right.get());\n else result = left.get().div(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.MOD.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (shouldImplicitCast) {\n resultType = Types.INTEGER;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.modulo(rightValue);\n return new StoreValue(resultType, result);\n }\n case Operators.GT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length > rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) > rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.GE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length >= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) >= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length < rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) < rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length <= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) <= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.EQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.eq(rightValue);\n } else {\n result = leftValue === rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.NEQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = !leftValue.eq(rightValue);\n } else {\n result = leftValue !== rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.AND.ord:\n return new StoreValue(resultType, left.get() && right.get());\n case Operators.OR.ord:\n return new StoreValue(resultType, left.get() || right.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid InfixApp \" + infixApp.op);\n }\n }\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * num_elements\n * matrix_lines\n * matrix_columns\n */\n\nexport function createNumElementsFun () {\n const numElementsFun = async (sto, _) => {\n const vector = sto.applyStore(\"vector\");\n const temp = new StoreValue(Types.INTEGER, toInt(vector.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(numElementsFun)]);\n const func = new Commands.Function('$numElements', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 1), 'vector', false)],\n block);\n return func;\n }\n\nexport function createMatrixLinesFun () {\n const matrixLinesFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixLinesFun)]);\n const func = new Commands.Function('$matrixLines', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n\nexport function createMatrixColumnsFun () {\n const matrixColumnsFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.columns));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixColumnsFun)]);\n const func = new Commands.Function('$matrixColumns', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n ","import * as Commands from './../../ast/commands';\nimport { Modes } from '../modes';\nimport {toInt, toString, toBool, toReal, convertToString} from './../../typeSystem/parsers';\nimport { Types } from './../../typeSystem/types';\nimport { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { StoreValue } from '../store/value/store_value';\n\nexport function createOutputFun () {\n const writeFunction = async function (store, _) {\n const totalSV = store.applyStore('p1.0');\n const total = totalSV.get();\n for (let i = 1; i < total; i += 1) {\n const val = store.applyStore(`p1.${i}`);\n this.output.sendOutput(convertToString(val.get(), val.type));\n }\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(writeFunction)]);\n const func = new Commands.Function('$write', Types.VOID,\n [new Commands.FormalParameter(Types.ALL, 'p1', false, true)],\n block);\n return func;\n}\n\nexport function createInputFun () {\n const readFunction = async function (store, _) {\n const text = await this.input.requestInput();\n const typeToConvert = store.applyStore('p1').type;\n let type = null\n let result = null;\n try {\n if (typeToConvert.isCompatible(Types.INTEGER)) {\n result = toInt(text.trim()).trunc();\n type = Types.INTEGER;\n } else if (typeToConvert.isCompatible(Types.REAL)) {\n result = toReal(text.trim())\n type = Types.REAL;\n } else if (typeToConvert.isCompatible(Types.BOOLEAN)) {\n result = toBool(text.trim())\n type = Types.BOOLEAN;\n } else if (typeToConvert.isCompatible(Types.STRING)) {\n result = toString(text)\n type = Types.STRING;\n } else {\n throw new Error(\"!!!!Critical error: Unknown type in readFunction!!!!\");\n }\n } catch (_) {\n if(this.mode == Modes.ABORT) {\n store.mode = Modes.RETURN;\n return store;\n }\n const stringInfo = typeToConvert.stringInfo()[0]\n const realObject = store.getStoreObject(\"p1\");\n if (realObject.getReferenceDimension() > 0) {\n const arrayInfo = realObject.type.stringInfo()[0];\n const dim = realObject.getReferenceDimension();\n throw ProcessorErrorFactory.invalid_read_type_array(text, stringInfo.type, stringInfo.dim,\n realObject.getRefObj(), arrayInfo.type, dim, this.function_call_stack.pop());\n }\n throw ProcessorErrorFactory.invalid_read_type(text, stringInfo.type, stringInfo.dim,\n realObject.getRefObj(), this.function_call_stack.pop());\n }\n const stoValue = new StoreValue(type, result);\n store.updateStore('p1', stoValue);\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(readFunction)]);\n const func = new Commands.Function('$read', Types.VOID,\n [new Commands.FormalParameter(Types.ALL, 'p1', true)],\n block);\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { IVProgParser } from '../../ast/ivprogParser';\nimport { RealLiteral, IntLiteral, BoolLiteral } from '../../ast/expressions';\nimport { Modes } from '../modes';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * \n * is_real\n * is_int\n * is_bool\n * cast_real\n * cast_int\n * cast_bool\n * cast_string\n * cast_char\n */\n\nexport function createIsRealFun () {\n const isRealFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof RealLiteral) {\n result = true;\n }\n } catch (error) {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isRealFun)]);\n const func = new Commands.Function('$isReal', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsIntFun () {\n const isIntFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof IntLiteral) {\n result = true;\n }\n } catch { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isIntFun)]);\n const func = new Commands.Function('$isInt', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsBoolFun () {\n const isBoolFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n result = true;\n }\n } catch (error) { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isBoolFun)]);\n const func = new Commands.Function('$isBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastRealFun () {\n const castRealFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.INTEGER.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.REAL, Parsers.toReal(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof RealLiteral) {\n const temp = new StoreValue(Types.REAL, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) {\n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.REAL.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castRealFun)]);\n const func = new Commands.Function('$castReal', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastIntFun () {\n const castIntFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.REAL.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.INTEGER, Math.floor(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.CHAR.ord: {\n const temp = new StoreValue(Types.INTEGER, value.charCodeAt(0));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof IntLiteral) {\n const temp = new StoreValue(Types.INTEGER, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) { \n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.INTEGER.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castIntFun)]);\n const func = new Commands.Function('$castInt', Types.INTEGER,\n [new Commands.FormalParameter(new MultiType([Types.REAL, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastBoolFun () {\n const castBoolFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const value = str.get(); \n const parser = IVProgParser.createParser(value);\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n const temp = new StoreValue(Types.BOOLEAN, val.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) { \n // ignore\n }\n const typeStringInfoArray = Types.BOOLEAN.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castBoolFun)]);\n const func = new Commands.Function('$castBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastStringFun () {\n const castStringFun = async function (store, _) {\n const val = store.applyStore('str');\n const result = Parsers.convertToString(val.get(), val.type);\n const temp = new StoreValue(Types.STRING, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castStringFun)]);\n const func = new Commands.Function('$castString', Types.STRING,\n [new Commands.FormalParameter(Types.ALL, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastCharFun () {\n const castCharFun = (store, _) => {\n const valSV = store.applyStore('charCode');\n // Force the int value to the range [0, 255]\n const value = valSV.get().toNumber() & 0xFF;\n const result = String.fromCharCode(value);\n const temp = new StoreValue(Types.CHAR, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castCharFun)]);\n const func = new Commands.Function('$castChar', Types.CHAR,\n [new Commands.FormalParameter(Types.INTEGER, 'charCode', false)],\n block);\n return func;\n}","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { Decimal } from 'decimal.js';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/**\n * sin\n * cos\n * tan\n * sqrt\n * pow\n * log\n * abs\n * negate\n * invert\n * max\n * min\n */\n\nfunction convertToRadians(degrees) {\n return degrees.times(Decimal.acos(-1)).div(180);\n}\n\nexport function createSinFun () {\n const sinFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if(angle.eq(90)) {\n result = new Decimal(1);\n } else if (angle.eq(180)) {\n result = new Decimal(0);\n } else if (angle.eq(270)) {\n result = new Decimal(-1);\n } else {\n result = Decimal.sin(convertToRadians(angle));\n }\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sinFun)]);\n const func = new Commands.Function(\n \"$sin\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createCosFun () {\n const cosFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if (angle.eq(90)) {\n result = new Decimal(0);\n } else if (angle.eq(180)) {\n result = new Decimal(-1);\n } else if (angle.eq(270)) {\n result = new Decimal(0);\n }\n result = Decimal.cos(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(cosFun)]);\n const func = new Commands.Function(\n \"$cos\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createTanFun () {\n const tanFun = async function (sto, _) {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n if(angle.eq(90) || angle.eq(270)) {\n throw ProcessorErrorFactory.undefined_tanget_value(x.get().toNumber(),\n this.function_call_stack.pop());\n }\n const result = Decimal.tan(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(tanFun)]);\n const func = new Commands.Function(\n \"$tan\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createSqrtFun () {\n const sqrtFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if(x.get().isNeg()) {\n return Promise.reject(ProcessorErrorFactory.negative_sqrt_value(this.function_call_stack.pop()));\n }\n const result = x.get().sqrt();\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sqrtFun)]);\n const func = new Commands.Function(\n \"$sqrt\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createPowFun () {\n const powFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const y = sto.applyStore('y');\n const result = x.get().pow(y.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(powFun)]);\n const func = new Commands.Function(\n \"$pow\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n ),\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"y\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createLogFun () {\n const logFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if (x.get().isNegative()) {\n return Promise.reject(\n ProcessorErrorFactory.negative_log_value(this.function_call_stack.pop())\n );\n }\n const result = Decimal.log10(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(logFun)]);\n const func = new Commands.Function(\n \"$log\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createAbsFun () {\n const absFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().abs();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(absFun)]);\n const func = new Commands.Function(\n \"$abs\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createNegateFun () {\n const negateFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().negated();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(negateFun)]\n );\n const func = new Commands.Function(\n \"$negate\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createInvertFun() {\n const invertFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = Parsers.toReal(1).dividedBy(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(invertFun)]\n );\n const func = new Commands.Function(\n \"$invert\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createMaxFun () {\n const maxFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.max(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(maxFun)]);\n const func = new Commands.Function(\n \"$max\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nexport function createMinFun () {\n const minFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.min(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(minFun)]);\n const func = new Commands.Function(\n \"$min\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nlet seed = Date.now();\nexport function createRandFun() {\n const a = 16807;\n const m = 2147483647;\n const c = 12345;\n const randFun = async (sto, _) => {\n seed = (a * seed + c) % m;\n const val = seed / (m - 1);\n const temp = new StoreValue(Types.REAL, new Decimal(val));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock([], [new Commands.SysCall(randFun)]);\n const func = new Commands.Function(\"$rand\", Types.REAL, [], block);\n return func;\n}\n\nexport function createSetSeedFun() {\n const setSeedFun = async (sto, _) => {\n const value = sto.applyStore(\"x\");\n seed = value.get().toNumber();\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(setSeedFun)]\n );\n const func = new Commands.Function(\n \"$setSeed\",\n Types.VOID,\n [new Commands.FormalParameter(Types.INTEGER, \"x\", false)],\n block\n );\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/*\n* substring\n* length\n* uppercase\n* lowercase\n* charAt\n**/\n\nexport function createSubstringFun () {\n const substringFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const start = sto.applyStore(\"start\");\n const end = sto.applyStore(\"end\");\n const result = str.get().substring(start.get(), end.get());\n const temp = new StoreValue(Types.STRING, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(substringFun)]);\n const func = new Commands.Function('$substring', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'start', false),\n new Commands.FormalParameter(Types.INTEGER, 'end', false)],\n block);\n return func;\n}\n\nexport function createLengthFun () {\n const lengthFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.INTEGER, toInt(str.value.length));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lengthFun)]);\n const func = new Commands.Function('$length', Types.INTEGER,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createUppercaseFun () {\n const uppercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toUpperCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(uppercaseFun)]);\n const func = new Commands.Function('$uppercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createLowercaseFun () {\n const lowercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toLowerCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lowercaseFun)]);\n const func = new Commands.Function('$lowercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createrCharAtFun () {\n const charAtFun = async function (sto, _) {\n const str = sto.applyStore(\"str\");\n const idx = sto.applyStore(\"index\");\n if (idx.get().toNumber() < 0 || idx.get().toNumber() >= str.get().length) {\n throw ProcessorErrorFactory.invalid_string_index(idx.get().toNumber(), str.get(),\n this.function_call_stack.pop());\n }\n const temp = new StoreValue(Types.CHAR, str.get().charAt(idx.get().toNumber()));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(charAtFun)]);\n const func = new Commands.Function('$charAt', Types.CHAR,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'index', false)],\n block);\n return func;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Modes = void 0;\nexports.Modes = Object.freeze({\n RETURN: Symbol('mode:return'),\n BREAK: Symbol('mode:break'),\n PAUSE: Symbol('mode:pause'),\n RUN: Symbol('mode:run'),\n ABORT: Symbol('mode:abort')\n});\n","import { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { LanguageDefinedFunction } from \"./../definedFunctions\";\nimport { LanguageService } from \"./../../services/languageService\";\nimport {\n ArrayDeclaration,\n While,\n For,\n Switch,\n Assign,\n Break,\n IfThenElse,\n Return,\n ArrayIndexAssign,\n} from \"../../ast/commands\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../../ast/expressions/expression\";\nimport {\n InfixApp,\n UnaryApp,\n FunctionCall,\n IntLiteral,\n RealLiteral,\n StringLiteral,\n BoolLiteral,\n VariableLiteral,\n ArrayAccess,\n CharLiteral,\n} from \"../../ast/expressions\";\nimport { Literal } from \"../../ast/expressions/literal\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"../compatibilityTable\";\nimport { Types } from \"../../typeSystem/types\";\nimport { ArrayType } from \"../../typeSystem/array_type\";\nimport { MultiType } from \"../../typeSystem/multiType\";\nimport { Config } from \"../../util/config\";\nimport { Store } from \"../store/store\";\nimport { IVProgParser } from \"../../ast/ivprogParser\";\n\nexport class SemanticAnalyser {\n static analyseFromSource (stringCode) {\n const parser = IVProgParser.createParser(stringCode);\n const semantic = new SemanticAnalyser(parser.parseTree());\n return semantic.analyseTree();\n }\n\n constructor (ast) {\n this.ast = ast;\n this.lexerClass = LanguageService.getCurrentLexer();\n const lexer = new this.lexerClass(null);\n this.literalNames = lexer.literalNames;\n this.symbolMap = null;\n this.currentFunction = null;\n }\n\n pushMap () {\n if (this.symbolMap === null) {\n this.symbolMap = { map: {}, next: null };\n } else {\n const n = { map: {}, next: this.symbolMap };\n this.symbolMap = n;\n }\n }\n\n popMap () {\n if (this.symbolMap !== null) {\n this.symbolMap = this.symbolMap.next;\n }\n }\n\n insertSymbol (id, typeInfo) {\n this.symbolMap.map[id] = typeInfo;\n }\n\n findSymbol (id, symbol_map) {\n if (!symbol_map.map[id]) {\n if (symbol_map.next) {\n return this.findSymbol(id, symbol_map.next);\n }\n return null;\n } else {\n return symbol_map.map[id];\n }\n }\n\n getMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n return null;\n }\n return val;\n }\n }\n\n analyseTree () {\n const globalVars = this.ast.global;\n this.pushMap();\n this.assertDeclarations(globalVars);\n const functions = this.ast.functions;\n const mainFunc = functions.filter((f) => f.name === null);\n if (mainFunc.length <= 0) {\n throw ProcessorErrorFactory.main_missing();\n }\n for (let i = 0; i < functions.length; i++) {\n const fun = functions[i];\n this.assertFunction(fun);\n }\n return this.ast;\n }\n\n assertDeclarations (list) {\n for (let i = 0; i < list.length; i++) {\n this.assertDeclaration(list[i]);\n }\n }\n\n assertDeclaration (declaration) {\n if (declaration instanceof ArrayDeclaration) {\n this.assertArrayDeclaration(declaration);\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else {\n if (declaration.initial === null) {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n return;\n }\n const resultType = this.evaluateExpressionType(declaration.initial);\n if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(declaration.type)) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else if (\n (!declaration.type.isCompatible(resultType) &&\n !Config.enable_type_casting) ||\n (!declaration.type.isCompatible(resultType) &&\n Config.enable_type_casting &&\n !Store.canImplicitTypeCast(declaration.type, resultType))\n ) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n } else {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n }\n }\n }\n\n assertArrayDeclaration (declaration) {\n if (declaration.initial === null) {\n const lineType = this.evaluateExpressionType(declaration.lines);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n if (declaration.columns !== null) {\n const columnType = this.evaluateExpressionType(declaration.columns);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n }\n } else {\n this.evaluateArrayLiteral(declaration);\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n });\n return;\n }\n\n evaluateExpressionType (expression) {\n // TODO: Throw operator error in case type == UNDEFINED\n if (expression instanceof UnaryApp) {\n const op = expression.op;\n const resultType = this.evaluateExpressionType(expression.left);\n const finalResult = resultTypeAfterUnaryOp(op, resultType);\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfo = resultType.stringInfo();\n const info = stringInfo[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_unary_op_full(\n expString,\n op,\n info.type,\n info.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof InfixApp) {\n const op = expression.op;\n const resultTypeLeft = this.evaluateExpressionType(expression.left);\n const resultTypeRight = this.evaluateExpressionType(expression.right);\n const finalResult = resultTypeAfterInfixOp(\n op,\n resultTypeLeft,\n resultTypeRight\n );\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfoLeft = resultTypeLeft.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = resultTypeRight.stringInfo();\n const infoRight = stringInfoRight[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_infix_op_full(\n expString,\n op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof Literal) {\n return this.evaluateLiteralType(expression);\n } else if (expression instanceof FunctionCall) {\n if (expression.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n expression.sourceInfo\n );\n }\n const fun = this.findFunction(expression.id);\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (fun.returnType.isCompatible(Types.VOID)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n expression.id,\n expression.sourceInfo\n );\n }\n this.assertParameters(fun, expression.actualParameters);\n return fun.returnType;\n } else if (expression instanceof ArrayAccess) {\n const arrayTypeInfo = this.findSymbol(expression.id, this.symbolMap);\n if (arrayTypeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (!(arrayTypeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const lineType = this.evaluateExpressionType(expression.line);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n if (expression.column !== null) {\n if (arrayTypeInfo.columns === null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const columnType = this.evaluateExpressionType(expression.column);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n }\n const arrType = arrayTypeInfo.type;\n if (expression.column !== null) {\n // indexing matrix\n return arrType.innerType;\n } else {\n if (arrayTypeInfo.columns === null) {\n return arrType.innerType;\n }\n return new ArrayType(arrType.innerType, 1);\n }\n }\n }\n\n evaluateLiteralType (literal) {\n if (literal instanceof IntLiteral) {\n return literal.type;\n } else if (literal instanceof RealLiteral) {\n return literal.type;\n } else if (literal instanceof StringLiteral) {\n return literal.type;\n } else if (literal instanceof BoolLiteral) {\n return literal.type;\n } else if (literal instanceof CharLiteral) {\n return literal.type;\n } else if (literal instanceof VariableLiteral) {\n const typeInfo = this.findSymbol(literal.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n literal.id,\n literal.sourceInfo\n );\n }\n if (typeInfo.type instanceof ArrayType) {\n return typeInfo.type;\n }\n return typeInfo.type;\n } else {\n // console.warn(\"Evaluating type only for an array literal...\");\n let last = null;\n if (literal.value.length === 1) {\n last = this.evaluateExpressionType(literal.value[0]);\n } else {\n for (let i = 0; i < literal.value.length; i++) {\n const e = this.evaluateExpressionType(literal.value[i]);\n if (last === null) {\n last = e;\n } else if (!last.isCompatible(e)) {\n const strInfo = last.stringInfo();\n const info = strInfo[0];\n const strExp = literal.toString();\n throw ProcessorErrorFactory.incompatible_types_array_full(\n strExp,\n info.type,\n info.dim,\n literal.sourceInfo\n );\n }\n }\n }\n if (last instanceof ArrayType) {\n return new ArrayType(last.innerType, last.dimensions + 1);\n }\n return new ArrayType(last, 1);\n }\n }\n\n evaluateArrayLiteral (arrayDeclaration) {\n const type = arrayDeclaration.type;\n const literal = arrayDeclaration.initial;\n // console.log(arrayDeclaration);\n if (arrayDeclaration.isVector) {\n this.evaluateVectorLiteralType(literal, type);\n } else {\n // TODO matrix type check\n for (let i = 0; i < literal.lines; ++i) {\n const line_literal = literal.value[i];\n this.evaluateVectorLiteralType(\n line_literal,\n new ArrayType(type.innerType, 1)\n );\n }\n }\n return true;\n }\n\n assertFunction (fun) {\n this.pushMap();\n this.currentFunction = fun;\n fun.formalParameters.forEach((formalParam) => {\n if (formalParam.type instanceof ArrayType) {\n if (formalParam.type.dimensions > 1) {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: -1,\n type: formalParam.type,\n });\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: null,\n type: formalParam.type,\n });\n }\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n type: formalParam.type,\n });\n }\n });\n this.assertDeclarations(fun.variablesDeclarations);\n const optional = fun.returnType.isCompatible(Types.VOID);\n const valid = this.assertReturn(fun, optional);\n if (!valid) {\n throw ProcessorErrorFactory.function_no_return(fun.name);\n }\n this.popMap();\n }\n\n assertReturn (fun, optional) {\n return fun.commands.reduce(\n (last, next) => this.checkCommand(fun.returnType, next, optional) || last,\n optional\n );\n }\n\n checkCommand (type, cmd, optional) {\n if (cmd instanceof While) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof For) {\n const var_type = this.evaluateExpressionType(cmd.for_id);\n if (!var_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_variable(\n cmd.for_id,\n cmd.sourceInfo\n );\n }\n const from_type = this.evaluateExpressionType(cmd.for_from);\n if (!from_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_from(\n cmd.for_from,\n cmd.sourceInfo\n );\n }\n const to_type = this.evaluateExpressionType(cmd.for_to);\n if (!to_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_to(cmd.for_to, cmd.sourceInfo);\n }\n if (cmd.for_pass != null) {\n const pass_type = this.evaluateExpressionType(cmd.for_pass);\n if (!pass_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_pass(\n cmd.for_pass,\n cmd.sourceInfo\n );\n }\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof Switch) {\n const sType = this.evaluateExpressionType(cmd.expression);\n let result = optional;\n let hasDefault = false;\n for (let i = 0; i < cmd.cases.length; i++) {\n const aCase = cmd.cases[i];\n if (aCase.expression !== null) {\n const caseType = this.evaluateExpressionType(aCase.expression);\n if (!sType.isCompatible(caseType)) {\n const strInfo = sType.stringInfo();\n const info = strInfo[0];\n const strExp = aCase.expression.toString();\n throw ProcessorErrorFactory.invalid_case_type_full(\n strExp,\n info.type,\n info.dim,\n aCase.sourceInfo\n );\n }\n } else {\n hasDefault = true;\n }\n result = result && this.checkCommands(type, aCase.commands, result);\n }\n return result && hasDefault;\n } else if (cmd instanceof ArrayIndexAssign) {\n // TODO - rework!!!!!\n let used_dims = 0;\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(typeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const lineExp = cmd.line;\n const lineType = this.evaluateExpressionType(lineExp);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n const columnExp = cmd.column;\n if (typeInfo.columns === null && columnExp !== null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n } else if (columnExp !== null) {\n const columnType = this.evaluateExpressionType(columnExp);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n }\n // exp a single value exp or an array access\n const exp_type = this.evaluateExpressionType(exp);\n const access_type = typeInfo.type;\n\n let compatible = false;\n if (exp_type instanceof MultiType) {\n let type = access_type;\n if (access_type.dimensions - used_dims == 0) {\n type = access_type.innerType;\n } else {\n type = new ArrayType(\n access_type.innerType,\n Math.max(0, access_type.dimensions - used_dims)\n );\n }\n compatible = exp_type.isCompatible(type);\n } else {\n compatible = access_type.canAccept(exp_type, used_dims);\n }\n if (!compatible) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(access_type, exp_type)\n ) {\n const access_type_string_info = access_type.stringInfo();\n const access_type_info = access_type_string_info[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n access_type_info.type,\n access_type_info.dim - used_dims,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Assign) {\n // TODO - rework since there is no literal array assignment\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const exp_type = this.evaluateExpressionType(exp);\n if (exp_type instanceof ArrayType) {\n if (!(typeInfo.type instanceof ArrayType)) {\n // TODO better error message\n throw new Error(\"Cannot assign an array to a non-array variable \");\n }\n // Both are arrays...\n // if both don't have same dimensions and type, cannot perform assignment\n if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n exp_type.dimensions === typeInfo.type.dimensions &&\n !exp_type.innerType.isCompatible(typeInfo.type.innerType)\n ) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(\n typeInfo.type.innerType,\n exp_type.innerType\n )\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n } else {\n switch (exp_type.dimensions) {\n case 1: {\n throw ProcessorErrorFactory.vector_to_matrix_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n case 2: {\n throw ProcessorErrorFactory.matrix_to_vector_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n }\n }\n } else if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(typeInfo.type, exp_type)\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Break) {\n return optional;\n } else if (cmd instanceof IfThenElse) {\n const resultType = this.evaluateExpressionType(cmd.condition);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (cmd.ifFalse instanceof IfThenElse) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommand(type, cmd.ifFalse, optional)\n );\n } else if (cmd.ifFalse != null) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommands(type, cmd.ifFalse.commands, optional)\n );\n } else {\n return this.checkCommands(type, cmd.ifTrue.commands, optional);\n }\n } else if (cmd instanceof FunctionCall) {\n let fun = null;\n if (cmd.isMainCall) {\n fun = this.getMainFunction();\n } else {\n fun = this.findFunction(cmd.id);\n }\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n this.assertParameters(fun, cmd.actualParameters);\n return optional;\n } else if (cmd instanceof Return) {\n const funcName = this.currentFunction.isMain\n ? LanguageDefinedFunction.getMainFunctionName()\n : this.currentFunction.name;\n if (cmd.expression === null && !type.isCompatible(Types.VOID)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_void_return_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n } else if (cmd.expression !== null) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!type.isCompatible(resultType)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type, resultType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n }\n return true;\n } else {\n return true;\n }\n }\n }\n\n checkCommands (type, cmds, optional) {\n return cmds.reduce(\n (last, next) => this.checkCommand(type, next, optional) || last,\n optional\n );\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {Expression[]} actualParametersList\n */\n assertParameters (fun, actualParametersList) {\n const parameterList = fun.formalParameters;\n if (\n parameterList.length > actualParametersList.length ||\n (parameterList.length !== actualParametersList.length &&\n !fun.hasVariadic())\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size_full(\n fun.name,\n actualParametersList.length,\n fun.formalParameters.length,\n null\n );\n }\n\n for (\n let i = 0, j = 0;\n i < parameterList.length && j < actualParametersList.length;\n i += 1, j += 1\n ) {\n const formalParam = parameterList[i];\n if (formalParam.variadic && i + 1 !== parameterList.length) {\n throw \"A function variadic parameter must be its last parameter!\";\n }\n if (formalParam.variadic) {\n j = this.assertVariadicParameter(\n fun,\n formalParam,\n j,\n actualParametersList\n );\n } else {\n const param = actualParametersList[j];\n this.assertParameter(fun, formalParam, param);\n }\n }\n }\n\n evaluateVectorLiteralType (literal, type) {\n // console.log(literal);\n for (let i = 0; i < literal.value.length; i += 1) {\n const exp = literal.value[i];\n const expType = this.evaluateExpressionType(exp);\n let compatible = false;\n if (expType instanceof MultiType) {\n compatible = expType.isCompatible(type.innerType);\n } else {\n compatible = type.canAccept(expType, 1);\n }\n if (!compatible) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, expType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = expType.stringInfo();\n const result_info = result_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n 0,\n result_info.type,\n result_info.dim,\n exp.toString(),\n literal.sourceInfo\n );\n }\n }\n }\n return type;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {number} index\n * @param {Expression[]} actualParametersList\n */\n assertVariadicParameter (fun, formalParam, index, actualParametersList) {\n let i;\n for (i = index; i < actualParametersList.length; i += 1) {\n this.assertParameter(fun, formalParam, actualParametersList[i]);\n }\n return i - 1;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {Expression} actualParameter\n */\n assertParameter (fun, formalParam, actualParameter) {\n // const id = formalParam.id;\n if (formalParam.byRef) {\n if (actualParameter instanceof VariableLiteral) {\n const variable = this.findSymbol(actualParameter.id, this.symbolMap);\n if (variable.isConst) {\n throw ProcessorErrorFactory.invalid_const_ref_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n } else if (\n !(\n actualParameter instanceof VariableLiteral ||\n actualParameter instanceof ArrayAccess\n )\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n const resultType = this.evaluateExpressionType(actualParameter);\n if (\n resultType instanceof MultiType &&\n formalParam.type instanceof MultiType\n ) {\n let shared = 0;\n for (let j = 0; j < resultType.types.length; ++j) {\n const element = resultType.types[j];\n if (formalParam.type.types.indexOf(element) !== -1) {\n shared += 1;\n }\n }\n if (shared <= 0) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(formalParam.type)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (!formalParam.type.isCompatible(resultType)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (!Store.canImplicitTypeCast(formalParam.type, resultType)) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Store = void 0;\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nconst modes_1 = require(\"../modes\");\nconst types_1 = require(\"../../typeSystem/types\");\nconst storeObject_1 = require(\"./storeObject\");\nconst storeObjectRef_1 = require(\"./storeObjectRef\");\nconst array_type_1 = require(\"../../typeSystem/array_type\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nconst store_value_1 = require(\"./value/store_value\");\nconst store_value_address_1 = require(\"./value/store_value_address\");\nconst store_value_ref_1 = require(\"./value/store_value_ref\");\nconst array_store_value_ref_1 = require(\"./value/array_store_value_ref\");\nconst store_object_array_ref_1 = require(\"./store_object_array_ref\");\nclass Store {\n constructor(name) {\n this.name = name;\n this.store = new Map();\n this.mode = modes_1.Modes.RUN;\n }\n static canImplicitTypeCast(castType, sourceType) {\n if (castType.isCompatible(types_1.Types.INTEGER) || castType.isCompatible(types_1.Types.REAL)) {\n if (sourceType.isCompatible(types_1.Types.INTEGER) || sourceType.isCompatible(types_1.Types.REAL)) {\n return true;\n }\n }\n return false;\n }\n static doImplicitCasting(castType, stoObj) {\n if (!Store.canImplicitTypeCast(castType, stoObj.type)) {\n throw new Error(\"!!!Critical error: attempted to type cast invalid types\");\n }\n if (castType.isCompatible(types_1.Types.INTEGER)) {\n return new store_value_1.StoreValue(types_1.Types.INTEGER, stoObj.get().trunc());\n }\n else {\n return new store_value_1.StoreValue(types_1.Types.REAL, stoObj.get());\n }\n }\n extendStore(nextStore) {\n this.nextStore = nextStore;\n }\n applyStore(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.applyStore(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n const val = this.store.get(id);\n let result = null;\n if (val.type instanceof array_type_1.ArrayType) {\n const array = val;\n const array_type = array.type;\n let l = 0, c = 0;\n const values = array.value.map(v => {\n if (array.isVector) {\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l++, undefined, array.id, array.readOnly);\n }\n else {\n if (c >= array.columns) {\n c = 0;\n l += 1;\n }\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l, c++, array.id, array.readOnly);\n }\n });\n result = new array_store_value_1.ArrayStoreValue(array_type, values, array.lines, array.columns, val.id, val.readOnly);\n }\n else {\n result = new store_value_1.StoreValue(val.type, val.value, val.id, val.readOnly);\n }\n return result;\n }\n updateStore(id, stoValue) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStore(id, stoValue);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n const array_value = stoValue;\n if (oldObj.isCompatible(array_value)) {\n if (oldObj.isVector) {\n array_value.get().forEach((val, index) => {\n oldObj.setAt(val, index, undefined);\n });\n }\n else {\n let line = 0;\n let column = 0;\n array_value.get().forEach((val) => {\n oldObj.setAt(val, line, column);\n column += 1;\n if (column >= oldObj.columns) {\n line += 1;\n column = 0;\n }\n });\n }\n return this;\n }\n }\n else if (oldObj.isCompatible(stoValue)) {\n const loc_address = oldObj.locAddress;\n location_1.Location.updateAddress(loc_address, stoValue.get());\n return this;\n }\n const oldType = oldObj.type;\n const stoType = stoValue.type;\n // TODO: better error message\n throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n }\n }\n /**\n * Method used to update regions of an array (vector or matrix). The should only be used when update an specific\n * possition since it will only update the required addresses.\n * @param {string} id the variable id to be updated\n * @param {IStoreValue} sto_value the value to be used in the update process\n * @param {number} line the line address of the vector/matrix\n * @param {number} column the matrix column, which can be undefined\n */\n updateStoreArray(id, sto_value, line, column) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStoreArray(id, sto_value, line, column);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n if (sto_value instanceof array_store_value_1.ArrayStoreValue) {\n // this must be a vector or matrix line update\n const actual_values = sto_value.get();\n if (oldObj.isVector && sto_value.isVector()) {\n for (let i = 0; i < sto_value.lines; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, i, undefined);\n }\n }\n else if (!oldObj.isVector && column == null && sto_value.isVector()) {\n for (let i = 0; i < oldObj.columns; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, line, i);\n }\n }\n else {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n }\n else {\n if (!oldObj.isVector && column == null) {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n oldObj.setAt(sto_value, line, column);\n }\n }\n else {\n throw new Error(\"Cannot update a non-array variable using updateStoreArray\");\n }\n // const oldType = oldObj.type;\n // const stoType = sto_value.type;\n // // TODO: better error message\n // throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n return this;\n }\n }\n /**\n * Inserts a new variable into the Store. This method should be used when declaring a new variable,\n * including the special return variable $.\n * @param id variable id\n * @param stoValue the value to be used as the initial value of id\n */\n insertStore(id, stoValue) {\n if (this.store.has(id)) {\n // TODO: better error message\n throw new Error(`${id} is already defined`);\n }\n // TODO check for array....\n let newObj;\n if (stoValue instanceof store_value_ref_1.StoreValueRef) {\n newObj = new storeObjectRef_1.StoreObjectRef(stoValue);\n }\n else if (stoValue instanceof array_store_value_ref_1.ArrayStoreValueRef) {\n newObj = new store_object_array_ref_1.StoreObjectArrayRef(stoValue, stoValue.lines, stoValue.columns);\n }\n else if (stoValue instanceof array_store_value_1.ArrayStoreValue) {\n const columns = stoValue.isVector() ? 0 : stoValue.columns;\n const addresses = [];\n const all_values = stoValue.get();\n if (all_values.length > 0) {\n for (let i = 0; i < stoValue.get().length; i += 1) {\n const val = all_values[i].get();\n addresses.push(location_1.Location.allocate(val));\n }\n }\n else {\n let total = stoValue.lines;\n total = stoValue.isVector() ? total : total * columns;\n for (let i = 0; i < total; i += 1) {\n addresses.push(location_1.Location.allocate(null));\n }\n }\n newObj = new storeObjectArray_1.StoreObjectArray(stoValue.type, stoValue.lines, columns, addresses, stoValue.isConst);\n }\n else {\n const loc_address = location_1.Location.allocate(stoValue.get());\n newObj = new storeObject_1.StoreObject(stoValue.type, loc_address, stoValue.isConst);\n }\n newObj.setID(id);\n this.store.set(id, newObj);\n return this;\n }\n /**\n * Helper function similar to applyStore. But it returns the actual object in the store be it ref or not\n * applyStore will return the refferenced object if the object in the store is a ref\n */\n getStoreObject(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.getStoreObject(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n return this.store.get(id);\n }\n destroy() {\n this.store.forEach(sto => sto.destroy(), this);\n }\n isDefined(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.isDefined(id);\n }\n else {\n return false;\n }\n }\n return true;\n }\n}\nexports.Store = Store;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObject = void 0;\nconst location_1 = require(\"../../memory/location\");\nclass StoreObject {\n /**\n *\n * @param {Type} type\n * @param {Number} loc_address\n * @param {Boolean} readOnly\n */\n constructor(type, loc_address, readOnly = false) {\n this._loc_address = loc_address;\n this._type = type;\n this._readOnly = readOnly;\n this._id = undefined;\n }\n setID(id) {\n this._id = id;\n }\n get id() {\n return this._id;\n }\n get inStore() {\n return this.id !== null;\n }\n get type() {\n return this._type;\n }\n /**\n * Returns the actual value stored at the loccation address present in this object.\n * The returned value is compatible with @prop{StoreObject.type}\n */\n get value() {\n const address = location_1.Location.find(this._loc_address);\n if (address != null) {\n return address.value;\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n get number() {\n throw new Error(\"DOT NOT USE THIS PROPERTY!\");\n }\n get readOnly() {\n return this._readOnly;\n }\n set readOnly(value) {\n this._readOnly = value;\n }\n isCompatible(another) {\n return this.type.isCompatible(another.type);\n }\n destroy() {\n return location_1.Location.deallocate(this._loc_address);\n }\n get locAddress() {\n return this._loc_address;\n }\n}\nexports.StoreObject = StoreObject;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArray = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nclass StoreObjectArray extends storeObject_1.StoreObject {\n constructor(type, _lines, _columns, loc_addresses, readOnly = false) {\n super(type, -1, readOnly);\n this._lines = _lines;\n this._columns = _columns;\n this.loc_addresses = loc_addresses;\n }\n get lines() {\n return this._lines;\n }\n get columns() {\n return this._columns;\n }\n isCompatible(another) {\n if (another instanceof array_store_value_1.ArrayStoreValue) {\n const cols = another.columns == null ? 0 : another.columns;\n if (this.lines === another.lines && this.columns === cols) {\n return super.isCompatible(another);\n }\n }\n return false;\n }\n get isVector() {\n return this.type.dimensions === 1;\n }\n /**@override\n * Returns the list of values stored by this array.\n * All returned values are compatible with @prop{StoreObject.type}\n */\n get value() {\n const values = [];\n for (let i = 0; i < this.addresses.length; i += 1) {\n const address = location_1.Location.find(this.addresses[i]);\n if (address != null) {\n values.push(address.value);\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n return values;\n }\n destroy() {\n let bool = true;\n for (let i = 0; i < this.addresses.length; i += 1) {\n bool = bool && location_1.Location.deallocate(this.addresses[i]);\n }\n return bool;\n }\n /**\n * @override\n *\n * Returns the address that contains a list of all addresses of the values present in the array\n */\n get locAddress() {\n throw new Error(\"!!!Internal Error: Cannot invoke locAddress on StoreObjectArray\");\n }\n get addresses() {\n return this.loc_addresses;\n }\n getAt(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n const address = location_1.Location.find(this.addresses[index]);\n values.push(address.value);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n const address = location_1.Location.find(this.addresses[index]);\n return address.value;\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n throw new Error(\"!!!Internal Error: Attempting to insert a line into matrix \" + this.id);\n }\n const pos = this.getIndexOf(line, column);\n location_1.Location.updateAddress(this.addresses[pos], value.get());\n }\n getIndexOf(line, column) {\n return line * this.columns + column;\n }\n getLocAddressOf(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n values.push(this.addresses[index]);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n return this.addresses[index];\n }\n}\nexports.StoreObjectArray = StoreObjectArray;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectRef = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nclass StoreObjectRef extends storeObject_1.StoreObject {\n /**\n *\n * @param {StoreObject} stoValue\n */\n constructor(stoValue) {\n super(stoValue.type, stoValue.getRefAddress(), false);\n this.refObj = stoValue.id;\n this.reference_dimension = stoValue.getReferenceDimension();\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n getReferenceDimension() {\n return this.reference_dimension;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectRef = StoreObjectRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArrayRef = void 0;\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nclass StoreObjectArrayRef extends storeObjectArray_1.StoreObjectArray {\n constructor(stoValue, lines, columns) {\n super(stoValue.type, lines, columns, stoValue.getAddresses(), false);\n this.refObj = stoValue.id;\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectArrayRef = StoreObjectArrayRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValue = void 0;\nconst array_type_1 = require(\"../../../typeSystem/array_type\");\nconst store_value_address_1 = require(\"./store_value_address\");\nclass ArrayStoreValue {\n constructor(type, values, lines, columns, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.values = values;\n this.lines = lines;\n this.columns = columns;\n }\n get() {\n return this.values;\n }\n /**\n * @deprecated\n * Potential not necessary since array access is occuring directly in the StoreObject\n * @param line\n * @param column\n */\n getAt(line, column) {\n console.log(\"Column \", column);\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = line * this.lines + col;\n values.push(this.values[index]);\n }\n const array_type = this.type;\n const vector_type = new array_type_1.ArrayType(array_type.innerType, array_type.dimensions - 1);\n return new ArrayStoreValue(vector_type, values, this.columns, 0, this.id, this.isConst);\n }\n const index = line * this.lines + column;\n console.log(\"Get at: \", index);\n return this.values[index];\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n let actual_line = line;\n let actual_column = column;\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n actual_column = actual_line;\n actual_line = 0;\n }\n else if (column == null) {\n if (!(value instanceof ArrayStoreValue)) {\n throw new Error(\"Attempting to insert a single value as a line of matrix \" + this.id);\n }\n const actual_values = value.get();\n for (let i = 0; i < this.columns; i += 1) {\n const pos = actual_line * this.columns + i;\n const val = actual_values[i];\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, val.get(), actual_line, i, this.id, this.isConst);\n }\n }\n const columns = this.columns == null ? 0 : this.columns;\n const pos = actual_line * columns + actual_column;\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, value.get(), line, column, this.id, this.isConst);\n }\n inStore() {\n return this.id != null;\n }\n isVector() {\n return this.type.dimensions == 1;\n }\n}\nexports.ArrayStoreValue = ArrayStoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValueRef = void 0;\nclass ArrayStoreValueRef {\n constructor(type, values, addresses, lines, columns, id) {\n this.type = type;\n this.values = values;\n this.addresses = addresses;\n this.lines = lines;\n this.columns = columns;\n this.id = id;\n this.isConst = false;\n }\n get() {\n return this.values;\n }\n getAddresses() {\n return this.addresses;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.ArrayStoreValueRef = ArrayStoreValueRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValue = void 0;\nclass StoreValue {\n constructor(type, value, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.value = value;\n }\n get() {\n return this.value;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.StoreValue = StoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueAddress = void 0;\nconst store_value_1 = require(\"./store_value\");\nclass StoreValueAddress extends store_value_1.StoreValue {\n constructor(type, value, line, column, id, isConst = false) {\n super(type, value, id, isConst);\n this.line = line;\n this.column = column;\n }\n}\nexports.StoreValueAddress = StoreValueAddress;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueRef = void 0;\nclass StoreValueRef {\n constructor(type, value, loc_address, id) {\n this.type = type;\n this.value = value;\n this.loc_address = loc_address;\n this.id = id;\n this.isConst = false;\n this.reference_dimesion = 0;\n }\n get() {\n return this.value;\n }\n getRefAddress() {\n return this.loc_address;\n }\n inStore() {\n return this.id != null;\n }\n getReferenceDimension() {\n return this.reference_dimesion;\n }\n setReferenceDimension(dimension) {\n this.reference_dimesion = dimension;\n }\n}\nexports.StoreValueRef = StoreValueRef;\n","import { IVProgParser } from './ast/ivprogParser';\nimport { IVProgProcessor } from './processor/ivprogProcessor';\nimport {DOMConsole} from './io/domConsole';\nimport { LanguageService } from './services/languageService';\nimport { SemanticAnalyser } from './processor/semantic/semanticAnalyser';\nimport { Location } from \"./memory/location\";\n\nexport function runner () {\nconst ivprogLexer = LanguageService.getCurrentLexer();\n\n\n// const lexer = new ivprogLexer(new InputStream(input));\n// const stream = new CommonTokenStream(lexer);\n// stream.fill();\n// let i = 1;\n// let token = null;\n// while ((token = stream.LT(i)).type !== ivprogLexer.EOF && token.type !== ivprogLexer.WHITESPACE) {\n// console.log(`${token.type}-${token.text}`);\n// console.log('\\n')\n// i++;\n// }\n// const anaSin = new IVProgParser(input, ivprogLexer);\nconst editor = new window.JsonEditor('#json-renderer', {});\nconst domConsole = new DOMConsole(\"#console\", true);\ndomConsole.hide();\n// proc.interpretAST().then( sto => {\n// console.log(sto.applyStore('a'));\n// }).catch(e => console.log(e));\ntry {\n window.$('#btn').click( () => {\n const input = window.$('#input').val();\n const analiser = new IVProgParser(input, ivprogLexer);\n try {\n const data = analiser.parseTree();\n const semAna = new SemanticAnalyser(data);\n const proc = new IVProgProcessor(semAna.analyseTree());\n proc.registerInput(domConsole);\n domConsole.clear();\n proc.registerOutput(domConsole);\n proc.interpretAST().then(sto => {\n console.log(sto);\n editor.load(sto.store);\n console.log(Location.size());\n }).catch( e => {\n alert(e);\n console.log(e);\n console.log(Location.size());\n });\n } catch (error) {\n alert(error);\n console.log(error);\n console.log(Location.size());\n }\n \n });\n} catch(a) {\n console.log(a);\n}\n}\n","import line_i18n from \"line-i18n\";\nimport { LocalizedStrings } from \"./localizedStringsService\";\n\nconst StringTypes = line_i18n.StringTypes;\n\nexport const i18nHelper = Object.freeze({\n i18n: (identifier) => {\n var opts = identifier.split(':');\n var type = opts[0].toLowerCase();\n var id = opts[1];\n if (StringTypes.ERROR === type) {\n return LocalizedStrings.getError(id);\n } else if (StringTypes.MESSAGE === type) {\n return LocalizedStrings.getMessage(id); \n } else if (StringTypes.UI === type) {\n return LocalizedStrings.getUI(id);\n } else {\n console.warn(\"A string has been passed to the i18n helper function that was not in the form type:id -> \" + identifier);\n return LocalizedStrings.getString(identifier, type);\n }\n }\n});","import Lexers from './../../grammar/';\nimport line_i18n from 'line-i18n';\nimport { Config } from \"./../util/config\";\n\nclass LanguageServiceExtended extends line_i18n.LanguageServiceNoLS {\n\n constructor () {\n super(typeof(iLMparameters) === 'undefined' ? Config.default_lang : iLMparameters.lang);\n }\n\n getDefaultLang () {\n return \"pt\";\n }\n\n getCurrentLexer () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].lexer;\n } else {\n return langInfo.lexer;\n }\n }\n\n getCurrentLangFuncs () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langFuncs;\n } else {\n return langInfo.langFuncs;\n }\n }\n\n getCurrentLangLibs () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langLibs;\n }\n return langInfo.langLibs;\n }\n}\n\nexport const LanguageService = new LanguageServiceExtended();\n","import line_i18n from 'line-i18n';\nimport { LanguageService } from \"./languageService\";\nimport { LanguageDefinedFunction } from \"./../processor/definedFunctions\";\nimport Langs from './../../i18n';\nimport { Operators } from \"./../ast/operators\";\n\nclass IVProgLocalizedStrings extends line_i18n.LocalizedStrings {\n\n constructor(langService, langsJsons, shouldListenToChange = false) {\n super(langService, langsJsons, shouldListenToChange);\n }\n\n translateType (type, dim) {\n const type_string = this.getUI(`type_${type}`);\n switch (dim) {\n case 0:\n return type_string;\n default:\n if(dim > 1)\n return this.getUI(\"matrix_info_string\", [type_string])\n else\n return this.getUI(\"vector_info_string\", [type_string])\n }\n }\n \n translateOp (op) {\n switch(op.ord) {\n case Operators.AND.ord:\n case Operators.OR.ord:\n case Operators.NOT.ord:\n return this.getUI(`logic_operator_${op.value}`);\n default:\n return op.value;\n }\n }\n\n translateInternalFunction (name, category = null) {\n if (category == null) {\n return LanguageDefinedFunction.getLocalName(name);\n } else {\n return LanguageDefinedFunction.getLocalName(`${category}.${name}`);\n }\n }\n}\n\nexport const LocalizedStrings = Object.freeze(new IVProgLocalizedStrings(LanguageService, Langs, true));\n\nlet _instance = null;\n\nexport function getInstance () {\n if(_instance == null) {\n _instance = new IVProgLocalizedStrings(LanguageService, Langs);\n }\n return _instance;\n}\n","let clicks = [];\nlet inRebuildMode = false;\n\nexport const ActionTypes = Object.freeze({\n // registerUserEvent payload:\n // (function_name, insert action)\n INSERT_FUNCTION:\"INSERT_FUNCTION\",\n // (function_name, remove action)\n REMOVE_FUNCTION:\"REMOVE_FUNCTION\",\n // (var_name,insert action, type, dim)\n INSERT_GLOBAL_VAR:\"INSERT_GLOBAL_VAR\",\n // (var name, remove action)\n REMOVE_GLOBAL_VAR:\"REMOVE_GLOBAL_VAR\",\n // (old function name, rename action, new function name)\n RENAME_FUNCTION:\"RENAME_FUNCTION\",\n // (old var name, rename action. new var name)\n RENAME_GLOBAL_VAR:\"RENAME_GLOBAL_VAR\",\n // (var name, set const action)\n SET_GLOBAL_CONST:\"SET_GLOBAL_CONST\",\n // (function name, change return action, type, dim)\n CHANGE_FUNCTION_RETURN:\"CHANGE_FUNCTION_RETURN\",\n // (var name, change type action, type, dim, rows?, columns?)\n CHANGE_GLOBAL_TYPE:\"CHANGE_GLOBAL_TYPE\",\n // (var name, change value action, value)\n CHANGE_GLOBAL_VALUE:\"CHANGE_GLOBAL_VALUE\",\n // (function name, insert param action, param varname, type, dim)\n INSERT_FUNCTION_PARAM:\"INSERT_FUNCTION_PARAM\",\n // (function name, remove param action, param varname)\n REMOVE_FUNCTION_PARAM:\"REMOVE_FUNCTION_PARAM\",\n // (function name, change param type action, type, dim)\n CHANGE_PARAM_TYPE:\"CHANGE_PARAM_TYPE\",\n // (function name, rename param action, old param name, new param name)\n RENAME_FUNCTION_PARAM:\"RENAME_FUNCTION_PARAM\",\n // (function name, insert var action, var name, type, dim)\n INSERT_FUNCTION_VAR:\"INSERT_FUCNTION_VAR\",\n // (function name, remove var action, var name)\n REMOVE_FUNCTION_VAR:\"REMOVE_FUNCTION_VAR\",\n // (function name, rename var action, old var name, new var name)\n RENAME_FUNCTION_VAR:\"RENAME_FUNCTION_VAR\",\n // (function name, change var type action, var name, type, dim, rows?, columns?)\n CHANGE_VAR_TYPE:\"CHANGE_VAR_TYPE\",\n // (function name, change var value action, var name, value)\n CHANGE_VAR_VALUE:\"CHANGE_VAR_VALUE\",\n // (function name, insert command action, command, path)\n INSERT_COMMAND:\"INSERT_COMMAND\",\n // (function name, remove command action, path)\n REMOVE_COMMAND:\"REMOVE_COMMAND\",\n // (function name, change command exp action, path, exp)\n CHANGE_COMMAND_EXP:\"CHANGE_COMMAND_EXP\",\n // (function name, change attrib exp action, path, exp)\n CHANGE_ATTRIB_EXP:\"CHANGE_ATTRIB_EXP\",\n // (function name, change attrib var action, path, var name, row_exp?, column_exp?)\n CHANGE_ATTRIB_VAR:\"CHANGE_ATTRIB_VAR\",\n // (function name, move command action, old path, new path)\n MOVE_COMMAND:\"MOVE_COMMAND\",\n // (function name, enter change name action, var name)\n ENTER_CHANGE_VAR_NAME:'ENTER_CHANGE_VAR_NAME',\n // (function name, enter change value action, var name)\n ENTER_CHANGE_VAR_VALUE:'ENTER_CHANGE_VAR_VALUE',\n // (var name, enter change name action)\n ENTER_CHANGE_GLOBAL_NAME:'ENTER_CHANGE_GLOBAL_NAME',\n // (var name, enter change value action)\n ENTER_CHANGE_GLOBAL_VALUE:'ENTER_CHANGE_GLOBAL_VALUE',\n // (function name, enter change name action, param name)\n ENTER_CHANGE_PARAM_NAME:'ENTER_CHANGE_PARAM_NAME',\n});\n\nexport function registerClick (x, y, details) {\n if (inRebuildMode) {\n return;\n }\n clicks.push([x, y, Date.now(), details]);\n}\n\nexport function registerUserEvent (command, action, ...params) {\n registerEvent('user_event', command, action, params);\n}\n\nexport function registerSystemEvent (command, action, ...params) {\n registerEvent('system_event', command, action, params);\n}\n\nfunction registerEvent (tag, command, action, params) {\n if (inRebuildMode) {\n return;\n }\n const event = {context: command, action: action, params:params};\n clicks.push([tag, Date.now(), event]);\n}\n\nexport function getLogs () {\n return clicks;\n}\n\nexport function setRebuildMode (flag) {\n inRebuildMode = flag;\n}\n\nexport function getLogsAsString () {\n return JSON.stringify(clicks);\n}\n\nexport function parseLogs (logData) {\n clicks = JSON.parse(logData);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayType = void 0;\nclass ArrayType {\n constructor(type, dimensions) {\n this.dimensions = dimensions;\n this.innerType = type;\n }\n get isVector() {\n return this.dimensions == 1;\n }\n isCompatible(another) {\n if (another instanceof ArrayType) {\n if (this.dimensions !== another.dimensions) {\n return false;\n }\n return this.innerType.isCompatible(another.innerType);\n }\n return false;\n }\n stringInfo() {\n const list = this.innerType.stringInfo();\n list.forEach(v => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const tmp = v;\n tmp.dim = this.dimensions;\n });\n return list;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n canAccept(another, used_dims) {\n const free_dims = this.dimensions - used_dims;\n if (another instanceof ArrayType) {\n return free_dims == another.dimensions && this.innerType.isCompatible(another.innerType);\n }\n else {\n return free_dims == 0 && this.innerType.isCompatible(another);\n }\n }\n}\nexports.ArrayType = ArrayType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiType = void 0;\nclass MultiType {\n constructor(types) {\n this.types = types;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n stringInfo() {\n let list = [];\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n list = list.concat(t.stringInfo());\n }\n return list;\n }\n isCompatible(another) {\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n if (another.isCompatible(t)) {\n return true;\n }\n }\n return false;\n }\n}\nexports.MultiType = MultiType;\n","import { LanguageService } from \"../services/languageService\";\nimport { Types } from \"./types\";\nimport Decimal from \"decimal.js\";\nimport { Config } from \"../util/config\";\n\nexport function toInt (str) {\n return new Decimal(str);\n}\n\nexport function toString (str) {\n let value = str.replace(/^\"/, '');\n value = value.replace(/\"$/, '');\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, \"\\\"\");\n value = value.replace(/\\\\'/g, '\\'');\n value = value.replace(/\\\\\\\\/g, \"\\\\\");\n return value;\n}\n\nexport function toChar (str) {\n let value = str.replace(/^'/, '');\n value = value.replace(/'$/, '');\n return value;\n}\n\nexport function toReal (value) {\n return new Decimal(value);\n}\n\nexport function toBool (str) {\n const val = \"'\" + str + \"'\";\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n if (instance.literalNames[lexer.RK_TRUE] === val) {\n return true;\n } else if (instance.literalNames[lexer.RK_FALSE] === val) {\n return false;\n } else {\n // TODO: better error message\n throw new Error(str + \"not a valid boolean\");\n }\n}\n\nexport function convertBoolToString (bool) {\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n let result = null;\n if (bool) {\n result = instance.literalNames[lexer.RK_TRUE];\n } else {\n result = instance.literalNames[lexer.RK_FALSE];\n }\n return result.replace(/'/g,\"\");\n}\n\nexport function convertToString(value, type) {\n switch (type.ord) {\n case Types.INTEGER.ord:\n return value.toString();\n case Types.REAL.ord: {\n if (value.dp() <= 0) {\n return value.toFixed(1); \n } else {\n return value.toFixed(Config.decimalPlaces);\n }\n }\n case Types.BOOLEAN.ord:\n return convertBoolToString(value);\n default:\n return value;\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Type = void 0;\nclass Type {\n constructor(value, ord) {\n this.value = value;\n this.ord = ord;\n }\n stringInfo() {\n return [{ type: this.value, dim: 0 }];\n }\n isCompatible(another) {\n return this.value === another.value && this.ord === another.ord;\n }\n}\nexports.Type = Type;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromOrdToType = exports.Types = void 0;\nconst type_1 = require(\"./type\");\nconst multiType_1 = require(\"./multiType\");\nconst maybe_1 = require(\"../util/maybe\");\nconst INTEGER = new type_1.Type(\"integer\", 0);\nconst REAL = new type_1.Type(\"real\", 1);\nconst STRING = new type_1.Type(\"text\", 2);\nconst BOOLEAN = new type_1.Type(\"boolean\", 3);\nconst CHAR = new type_1.Type(\"char\", 4);\nconst VOID = new type_1.Type(\"void\", 5);\nconst UNDEFINED = new type_1.Type(\"undefined\", 6);\nconst ALL = new multiType_1.MultiType([INTEGER, REAL, STRING, CHAR, BOOLEAN]);\nexports.Types = Object.freeze({\n INTEGER: INTEGER,\n REAL: REAL,\n STRING: STRING,\n CHAR: CHAR,\n BOOLEAN: BOOLEAN,\n VOID: VOID,\n UNDEFINED: UNDEFINED,\n ALL: ALL\n});\nfunction fromOrdToType(ord) {\n const typeMap = exports.Types;\n for (const t in typeMap) {\n if (typeMap[t].ord && typeMap[t].ord === ord) {\n return maybe_1.Maybe.some(typeMap[t]);\n }\n }\n return maybe_1.Maybe.none();\n}\nexports.fromOrdToType = fromOrdToType;\n","import {SemanticAnalyser} from './../processor/semantic/semanticAnalyser';\nimport {IVProgProcessor} from './../processor/ivprogProcessor';\nimport { InputTest } from './inputTest';\nimport { OutputTest } from './outputTest';\nimport { LocalizedStrings } from './../services/localizedStringsService'\n\nexport function autoGenerateTestCaseOutput (program_text, testCases) {\n let copyTestCases = testCases.map((test) => Object.assign({}, test));\n try {\n const program = SemanticAnalyser.analyseFromSource(program_text);\n const resultList = testCases.map((test, id) => {\n const input = new InputTest(test.input);\n const output = new OutputTest();\n const exec = new IVProgProcessor(program);\n exec.registerInput(input);\n exec.registerOutput(output);\n return exec.interpretAST().then(_ => {\n return {id: id, program: exec};\n });\n });\n return Promise.all(resultList).then(result_final => {\n for(let i = 0; i < result_final.length; ++i) {\n const result = result_final[i];\n const output = result.program.output.list;\n const input = result.program.input;\n if(input.index != input.inputList.length) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_unused_input\", [result.id+1]));\n return Promise.resolve(false);\n }\n if(output.length == 0) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_empty\", [result.id+1]));\n }\n copyTestCases[result.id].output = output;\n }\n window.outputGenerated(copyTestCases);\n return Promise.resolve(true);\n });\n }catch (error) {\n return Promise.reject(error)\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = void 0;\nclass ConfigObject {\n constructor() {\n this.decimalPlaces = 8;\n this.intConvertRoundMode = 2;\n this.default_lang = 'pt';\n this.enable_type_casting = true;\n this.idle_input_interval = 5000;\n this.suspend_threshold = 100;\n // this.max_instruction_count = 350250; - automated evaluation limit\n this.max_instruction_count = Number.MAX_SAFE_INTEGER;\n }\n setConfig(opts) {\n const otherConfig = opts;\n for (const key in otherConfig) {\n if (Object.prototype.hasOwnProperty.call(this, key)) {\n this[key] = otherConfig[key];\n }\n }\n }\n}\nconst config = new ConfigObject();\nexports.Config = config;\n","import { getCodeEditorModeConfig } from \"./utils\";\n\n/**\n * Source: https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/clike/clike.js\n * @author arijn Haverbeke and others\n * @author Lucas de Souza\n * @param {CodeMirror} CodeMirror \n */\nexport function CodeEditorMode (CodeMirror) {\n \"use strict\";\n\n function Context(indented, column, type, info, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.info = info;\n this.align = align;\n this.prev = prev;\n }\n\n function pushContext(state, col, type, info) {\n let indent = state.indented;\n if (state.context && state.context.type == \"statement\" && type != \"statement\")\n indent = state.context.indented;\n return state.context = new Context(indent, col, type, info, null, state.context);\n }\n \n function popContext(state) {\n const t = state.context.type;\n if (t == \")\" || t == \"]\" || t == \"}\")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n }\n\n function typeBefore(stream, state, pos) {\n if (state.prevToken == \"variable\" || state.prevToken == \"type\") return true;\n if (/\\S(?:[^- ]>|[*\\]])\\s*$|\\*$/.test(stream.string.slice(0, pos))) return true;\n if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;\n }\n\n function isTopScope(context) {\n for (; ;) {\n if (!context || context.type == \"top\") return true;\n if (context.type == \"}\" && context.prev.info != \"namespace\") return false;\n context = context.prev;\n }\n }\n\n function contains(words, word) {\n if (typeof words === \"function\") {\n return words(word);\n } else {\n return Object.propertyIsEnumerable.call(words, word);\n }\n }\n\n function tokenComment(stream, state) {\n let maybeEnd = false, ch;\n while ((ch = stream.next())) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return \"comment\";\n }\n\n CodeMirror.defineMode(\"ivprog\", function (config, parserConfig) {\n const indentUnit = config.indentUnit,\n statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n dontAlignCalls = parserConfig.dontAlignCalls,\n keywords = parserConfig.keywords || {},\n switchKeyword = parserConfig.switchKeyword,\n caseKeyword = parserConfig.caseKeyword,\n defaultKeyword = parserConfig.defaultKeyword,\n caseRegex = new RegExp(`^\\\\s*(?:${caseKeyword} .*?:|${defaultKeyword}:|\\\\{\\\\}?|\\\\})$`),////,\n types = parserConfig.types || {},\n builtin = parserConfig.builtin || {},\n blockKeywords = parserConfig.blockKeywords || {},\n defKeywords = parserConfig.defKeywords || {},\n atoms = parserConfig.atoms || {},\n hooks = parserConfig.hooks || {},\n multiLineStrings = parserConfig.multiLineStrings,\n indentStatements = false,\n namespaceSeparator = null,\n isPunctuationChar = /[[\\]{}(),;:\\n]/,\n numberStart = /[\\d.]/,\n number = /^(?:0x[a-f\\d]+|0b[01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)$/i,\n isOperatorChar = /[+\\-*%=<>!/&]/,\n isIdentifierChar = /[a-zA-Z0-9_]/,\n // An optional function that takes a {string} token and returns true if it\n // should be treated as a builtin.\n isReservedIdentifier = parserConfig.isReservedIdentifier || false;\n\n let curPunc, isDefKeyword;\n let tokenString = function () { /*SKIP*/};\n function tokenBase(stream, state) {\n const ch = stream.next();\n if (hooks[ch]) {\n const result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == '\"') {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (isPunctuationChar.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (numberStart.test(ch)) {\n stream.backUp(1)\n if (stream.match(number)) return \"number\"\n stream.next()\n }\n if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return \"comment\";\n }\n }\n if (isOperatorChar.test(ch)) {\n while (!stream.match(/^\\/[/*]/, false) && stream.eat(isOperatorChar)) { /* SKIP */}\n return \"operator\";\n }\n stream.eatWhile(isIdentifierChar);\n if (namespaceSeparator) while (stream.match(namespaceSeparator))\n stream.eatWhile(isIdentifierChar);\n\n const cur = stream.current();\n if (contains(keywords, cur)) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n if (contains(defKeywords, cur)) isDefKeyword = true;\n return \"keyword\";\n }\n if (contains(types, cur)) return \"type\";\n if (contains(builtin, cur)\n || (isReservedIdentifier && isReservedIdentifier(cur))) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n return \"builtin\";\n }\n if (contains(atoms, cur)) return \"atom\";\n return \"variable\";\n }\n\n tokenString = function (quote) {\n return function (stream, state) {\n let escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) { end = true; break; }\n escaped = !escaped && next == \"\\\\\";\n }\n if (end || !(escaped || multiLineStrings))\n state.tokenize = null;\n return \"string\";\n };\n }\n\n function maybeEOL(stream, state) {\n if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))\n state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)\n }\n\n // Interface\n\n return {\n startState: function (basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", null, false),\n indented: 0,\n startOfLine: true,\n prevToken: null\n };\n },\n\n token: function (stream, state) {\n let ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n }\n if (stream.eatSpace()) { maybeEOL(stream, state); return null; }\n curPunc = isDefKeyword = null;\n let style = (state.tokenize || tokenBase)(stream, state);\n if (style == \"comment\" || style == \"meta\") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == \";\" || curPunc == \":\" || (curPunc == \",\" && stream.match(/^\\s*(?:\\/\\/.*)?$/, false)))\n while (state.context.type == \"statement\") popContext(state);\n else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n else if (curPunc == \"}\") {\n while (ctx.type == \"statement\") ctx = popContext(state);\n if (ctx.type == \"}\") ctx = popContext(state);\n while (ctx.type == \"statement\") ctx = popContext(state);\n }\n else if (curPunc == ctx.type) popContext(state);\n else if (indentStatements &&\n (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != \";\") ||\n (ctx.type == \"statement\" && curPunc == \"newstatement\"))) {\n pushContext(state, stream.column(), \"statement\", stream.current());\n }\n\n if (style == \"variable\" &&\n ((state.prevToken == \"def\" ||\n (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&\n isTopScope(state.context) && stream.match(/^\\s*\\(/, false)))))\n style = \"def\";\n\n if (hooks.token) {\n const result = hooks.token(stream, state, style);\n if (result !== undefined) style = result;\n }\n\n if (style == \"def\" && parserConfig.styleDefs === false) style = \"variable\";\n\n state.startOfLine = false;\n state.prevToken = isDefKeyword ? \"def\" : style || curPunc;\n maybeEOL(stream, state);\n return style;\n },\n\n indent: function (state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;\n let ctx = state.context;\n const firstChar = textAfter && textAfter.charAt(0)\n const closing = firstChar == ctx.type;\n if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n if (parserConfig.dontIndentStatements)\n while (ctx.type == \"statement\" && parserConfig.dontIndentStatements.test(ctx.info))\n ctx = ctx.prev\n if (hooks.indent) {\n const hook = hooks.indent(state, ctx, textAfter, indentUnit);\n if (typeof hook == \"number\") return hook\n }\n const switchBlock = ctx.prev && ctx.prev.info == switchKeyword;\n if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {\n while (ctx.type != \"top\" && ctx.type != \"}\") ctx = ctx.prev\n return ctx.indented\n }\n if (ctx.type == \"statement\")\n return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n if (ctx.align && (!dontAlignCalls || ctx.type != \")\"))\n return ctx.column + (closing ? 0 : 1);\n if (ctx.type == \")\" && !closing)\n return ctx.indented + statementIndentUnit;\n const caseTestRegex = new RegExp(`^(?:${caseKeyword}|${defaultKeyword})\\b`)\n return ctx.indented + (closing ? 0 : indentUnit) +\n (!closing && switchBlock && !caseTestRegex.test(textAfter) ? indentUnit : 0);\n },\n\n electricInput: caseRegex,\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: \"//\",\n fold: \"brace\"\n };\n });\n\n function words(str) {\n const obj = {}, words = str.split(\" \");\n for (let i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n \n const codeConfig = getCodeEditorModeConfig();\n\n const ivprogKeywords = codeConfig.keywords.join(\" \");\n\n const basicTypes = words(codeConfig.types.join(\" \"));\n\n function ivprogTypes(identifier) {\n return contains(basicTypes, identifier);\n }\n\n const ivprogBlockKeywords = codeConfig.blocks.join(\" \");\n const ivprogDefKeywords = \"funcao const\";\n\n function def(mimes, mode) {\n if (typeof mimes == \"string\") mimes = [mimes];\n const words = [];\n function add(obj) {\n if (obj) {\n for (const prop in obj) if (Object.hasOwnProperty.call(obj, prop)) {\n words.push(prop);\n }\n }\n }\n add(mode.keywords);\n add(mode.types);\n add(mode.builtin);\n add(mode.atoms);\n if (words.length) {\n mode.helperType = mimes[0];\n CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n }\n\n for (let i = 0; i < mimes.length; ++i)\n CodeMirror.defineMIME(mimes[i], mode);\n }\n \n def([\"text/x-ivprog\"], {\n name: \"ivprog\",\n keywords: words(ivprogKeywords),\n types: ivprogTypes,\n blockKeywords: words(ivprogBlockKeywords),\n defKeywords: words(ivprogDefKeywords),\n typeFirstDefinitions: true,\n atoms: words(codeConfig.atoms.join(\" \")),\n switchKeyword: codeConfig.switchString,\n caseKeyword: codeConfig.case_default[0],\n defaultKeyword: codeConfig.case_default[1],\n modeProps: { fold: [\"brace\"] }\n });\n\n}\n","import { setTestCases, getTestCases } from \"../visualUI/functions\";\nimport { generate } from \"../visualUI/code_generator\";\nimport { IVProgAssessment } from \"../assessment/ivprogAssessment\";\nimport { TestConsole } from \"./testConsole\";\nimport { parseLogs } from \"./../services/userLog\";\nimport { SemanticAnalyser } from \"../processor/semantic/semanticAnalyser\";\nimport { Maybe } from \"./maybe\";\n\nfunction parseActivityData (data) {\n let algorithm_in_ilm = null;\n if (data.split('\\n::algorithm::')[1]) {\n algorithm_in_ilm = data.split('\\n::algorithm::')[1].split('\\n::logs::')[0];\n const logs = data.split('\\n::algorithm::')[1].split('\\n::logs::')[1];\n if (logs != null) {\n parseLogs(logs);\n }\n }\n let content;\n try {\n content = JSON.parse(data.split('\\n::algorithm::')[0]);\n content['algorithm_in_ilm'] = algorithm_in_ilm;\n } catch (e) {\n console.error(e);\n return Maybe.none();\n }\n return Maybe.some(content);\n}\n\nexport function prepareActivityToStudentHelper (ilm_cont) {\n const maybe_content = parseActivityData(ilm_cont);\n return maybe_content.map(content => {\n const testCases = content.testcases;\n setTestCases(testCases);\n\n let prog_type = null;\n if (content.settings_programming_type) {\n prog_type = content.settings_programming_type[0].value;\n } else {\n prog_type = \"visual\";\n }\n\n return {\n settingsProgrammingType: prog_type,\n settingsDataTypes: content.settings_data_types,\n settingsCommands: content.settings_commands,\n settingsFunctions: content.settings_functions,\n algorithmInIlm: content.algorithm_in_ilm,\n settingsFilter: content.settings_filter\n }\n });\n}\n\nfunction compareArray (a, b) {\n for (let i = 0; i < a.length; ++i) {\n const elementA = a[i];\n const elementB = b[i];\n if (elementA != elementB) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareTestcases (original, student) {\n if (original.length != student.length) {\n return false;\n }\n for (let i = 0; i < original.length; ++i) {\n const elementO = original[i];\n const elementS = student[i];\n if(!compareArray(elementO.input, elementS.input)) {\n return false;\n }\n if(!compareArray(elementO.output, elementS.output)) {\n return false;\n }\n }\n return true;\n}\n\nexport function autoEval (originalData, callback) {\n const code = generate();\n const original = parseActivityData(originalData).getOrElse(undefined);\n if(original == null) {\n alert(\"iAssign did not provide the original activity data!\");\n return callback(null);\n }\n if (code == null) {\n return callback(-1); // @FeedbackConvention Casos de teste vazios\n } else {\n if (!compareTestcases(original.testcases, getTestCases())) {\n return callback(-2); // @FeedbackConvention Casos de teste alterados pelo aluno\n }\n const ast_code = SemanticAnalyser.analyseFromSource(code);\n const autoAssessment = new IVProgAssessment(ast_code, getTestCases(), new TestConsole([]));\n autoAssessment.runTest().then( grade => callback(grade)).catch(err => {\n console.log(err);\n callback(-5); // @FeedbackConvention Falha na execução\n });\n }\n}\n","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputTest extends Input {\n\n constructor (inputList) {\n super();\n this.index = 0;\n this.inputList = inputList;\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) { \n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n}","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputAssessment extends Input {\n\n constructor (input_list) {\n super();\n this.index = 0;\n this.input_list = input_list.map((val) => {\n return {\"value\": val, \"read\": false};\n });\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.input_list.length) {\n const input = this.input_list[this.index];\n input.read = true;\n this.index += 1;\n resolve(input.value);\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n isInputAvailable () {\n return this.index < this.input_list.length;\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Maybe = void 0;\n/**\n*\n* Maybe Monad\n* @Source: https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/\n* @Modified by: @lucascalion - 28/08/2019\n*\n**/\nclass Maybe {\n constructor(value) {\n this.value = value;\n }\n static some(value) {\n if (!value) {\n throw Error(\"Provided value must not be empty\");\n }\n return new Maybe(value);\n }\n static none() {\n return new Maybe(null);\n }\n static fromValue(value) {\n return value ? Maybe.some(value) : Maybe.none();\n }\n getOrElse(defaultValue) {\n return this.value === null ? defaultValue : this.value;\n }\n map(f) {\n if (this.value === null) {\n return Maybe.none();\n }\n else {\n return Maybe.fromValue(f(this.value));\n }\n }\n}\nexports.Maybe = Maybe;\n","import { Output } from './../io/output';\n\nexport class OutputTest extends Output {\n\n constructor () {\n super();\n this.list = [];\n this.currentLine = null;\n }\n\n write (text, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push('') - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n sendOutput (text) {\n let output = '' + text;\n if (output.indexOf('\\n') !== -1) {\n const outputList = output.split('\\n');\n let last = outputList.pop();\n outputList.forEach( t => {\n t = t.replace(/\\t/g, ' ');\n t = t.replace(/\\s/g, \" \");\n if (t.length == 0)\n t = \" \";\n this.write(t, true);\n });\n last = last.replace(/\\t/g, ' ');\n last = last.replace(/\\s/g, \" \");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, ' ');\n output = output.replace(/\\s/g, \" \");\n this.write(output);\n }\n }\n}\n","/**\n * Author: @jhchen - https://github.com/jhchen\n * Modified by: @lucascalion - 23/07/2019\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nconst DIFF_DELETE = -1;\nconst DIFF_INSERT = 1;\nconst DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n const editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n let commonlength = diff_commonPrefix(text1, text2);\n const commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n const commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n const diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n return diffs;\n}\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n let diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n const i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)]\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n const text1_length = text1.length;\n const text2_length = text2.length;\n const max_d = Math.ceil((text1_length + text2_length) / 2);\n const v_offset = max_d;\n const v_length = 2 * max_d;\n const v1 = new Array(v_length);\n const v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n const delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n const front = (delta % 2 !== 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n let k1start = 0;\n let k1end = 0;\n let k2start = 0;\n let k2end = 0;\n for (let d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (let k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n const k1_offset = v_offset + k1;\n let x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n let y1 = x1 - k1;\n while (\n x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n const k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n const x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detfrontected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (let k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n const k2_offset = v_offset + k2;\n let x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n let y2 = x2 - k2;\n while (\n x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n const k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n const x1 = v1[k1_offset];\n const y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n}\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n const text1a = text1.substring(0, x);\n const text2a = text2.substring(0, y);\n const text1b = text1.substring(x);\n const text2b = text2.substring(y);\n\n // Compute both diffs serially.\n const diffs = diff_main(text1a, text2a);\n const diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n const seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n let j = -1;\n let best_common = '';\n let best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n const prefixLength = diff_commonPrefix(\n longtext.substring(i), shorttext.substring(j));\n const suffixLength = diff_commonSuffix(\n longtext.substring(0, i), shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(\n j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n const hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n const hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));\n let hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n let text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n const mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.\n let pointer = 0;\n let count_delete = 0;\n let count_insert = 0;\n let text_delete = '';\n let text_insert = '';\n let commonlength;\n let previous_equality;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {\n const stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n const stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length - commonlength);\n text_delete = text_delete.substring(0, text_delete.length - commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n const n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n let changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xD800 && charCode <= 0xDBFF;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xDC00 && charCode <= 0xDFFF;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n const ret = [];\n for (let i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after]\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n const oldRange = typeof cursor_pos === 'number' ?\n { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n const newRange = typeof cursor_pos === 'number' ?\n null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n const oldLength = oldText.length;\n const newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n const oldCursor = oldRange.index;\n const oldBefore = oldText.slice(0, oldCursor);\n const oldAfter = oldText.slice(oldCursor);\n const maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n const newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n const newBefore = newText.slice(0, newCursor);\n const newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n const prefixLength = Math.min(oldCursor, newCursor);\n const oldPrefix = oldBefore.slice(0, prefixLength);\n const newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n const oldMiddle = oldBefore.slice(prefixLength);\n const newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n const cursor = oldCursor;\n const newBefore = newText.slice(0, cursor);\n const newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n const suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n const oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n const newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n const oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n const newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n const oldPrefix = oldText.slice(0, oldRange.index);\n const oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n const prefixLength = oldPrefix.length;\n const suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n const newPrefix = newText.slice(0, prefixLength);\n const newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n const oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n const newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nexport default diff;\n","import { DOMConsole } from \"../io/domConsole\";\nimport { getInstance } from \"../services/localizedStringsService\";\n\nconst LocalizedStrings = getInstance();\n\nexport class TestConsole {\n\n\n constructor (inputList) {\n this.index = 0;\n this.inputList = inputList;\n this.list = [];\n this.currentLine = null;\n }\n\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n _appendText (text, type, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push('') - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n _appendTextLn (text) {\n this.list.push(text);\n this.currentLine = null;\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) { \n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n sendOutput (text) {\n let output = '' + text;\n if (output.indexOf('\\n') !== -1) {\n const outputList = output.split('\\n');\n let last = outputList.pop();\n outputList.forEach( t => {\n t = t.replace(/\\t/g, ' ');\n t = t.replace(/\\s/g, \" \");\n if (t.length == 0)\n t = \" \";\n this.write(t, true);\n });\n last = last.replace(/\\t/g, ' ');\n last = last.replace(/\\s/g, \" \");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, ' ');\n output = output.replace(/\\s/g, \" \");\n this.write(output);\n }\n }\n}","import { LanguageService } from \"./../services/languageService\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport { Operators } from \"./../ast/operators\";\n\n/** \n * source: https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/ \n * \n*/\nexport function scrollIt (destination, duration = 200, easing = 'linear', callback = null) {\n\n const easings = {\n linear(t) {\n return t;\n },\n easeInQuad(t) {\n return t * t;\n },\n easeOutQuad(t) {\n return t * (2 - t);\n },\n easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeInCubic(t) {\n return t * t * t;\n },\n easeOutCubic(t) {\n return (--t) * t * t + 1;\n },\n easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n easeInQuart(t) {\n return t * t * t * t;\n },\n easeOutQuart(t) {\n return 1 - (--t) * t * t * t;\n },\n easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;\n },\n easeInQuint(t) {\n return t * t * t * t * t;\n },\n easeOutQuint(t) {\n return 1 + (--t) * t * t * t * t;\n },\n easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t;\n }\n };\n\n const start = window.pageYOffset;\n const startTime = 'now' in window.performance ? performance.now() : new Date().getTime();\n\n const documentHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);\n const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;\n const destinationOffset = typeof destination === 'number' ? destination : destination.offsetTop;\n const destinationOffsetToScroll = Math.round(documentHeight - destinationOffset < windowHeight ? documentHeight - windowHeight : destinationOffset);\n\n if ('requestAnimationFrame' in window === false) {\n window.scroll(0, destinationOffsetToScroll);\n if (callback) {\n callback();\n }\n return;\n }\n\n function scroll() {\n const now = 'now' in window.performance ? performance.now() : new Date().getTime();\n const time = Math.min(1, ((now - startTime) / duration));\n const timeFunction = easings[easing](time);\n window.scroll(0, Math.ceil((timeFunction * (destinationOffsetToScroll - start)) + start));\n\n if (window.pageYOffset === destinationOffsetToScroll) {\n if (callback) {\n callback();\n }\n return;\n }\n\n requestAnimationFrame(scroll);\n }\n\n scroll();\n}\n\n/**\n * \n * source: https://stackoverflow.com/a/16270434\n */\nexport function isElementInViewport (el) {\n const rect = el.getBoundingClientRect();\n\n return rect.bottom > 0 &&\n rect.right > 0 &&\n rect.left < (window.innerWidth || document.documentElement.clientWidth) &&\n rect.top < (window.innerHeight || document.documentElement.clientHeight);\n}\n\nlet cacheMainList = null;\nlet cacheOp = null;\n\nfunction fillCache () {\n if(cacheMainList == null) {\n cacheMainList = [];\n const mainList = [\"RK_PROGRAM\",\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\n \"RK_INTEGER\",\"RK_CHARACTER\",\"RK_SWITCH\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_CONST\",\n \"RK_FUNCTION\",\"RK_RETURN\",\"RK_FOR\",\"RK_BREAK\",\"RK_DO\",\"RK_WHILE\",\"RK_IF\",\n \"RK_ELSE\",\"RK_FALSE\",\"RK_TRUE\"];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n for (let key = 0; key < mainList.length; ++key) {\n const word = mainList[key];\n const keyword = nullLexer.literalNames[lexerClass[word]];\n cacheMainList.push(keyword.substring(1, keyword.length-1));\n }\n }\n if(cacheOp == null) {\n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n cacheOp.push(LocalizedStrings.getUI(lOp))\n }\n }\n}\n\nexport function isKeyword (text) {\n fillCache();\n for (let key = 0; key < cacheMainList.length; ++key) {\n const keyword = cacheMainList[key];\n if(keyword == text) {\n return true;\n }\n }\n // not in main list, check op\n for (let op = 0; op < cacheOp.length; op++) {\n const lOp = cacheOp[op];\n if(lOp == text) {\n return true;\n }\n }\n return false;\n}\n\nexport function isValidIdentifier (identifier_str) {\n const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n if(!validRegex) {\n return false;\n }\n\treturn !isKeyword(identifier_str);\n}\n\nexport function getCodeEditorModeConfig () {\n const blockList = [\"RK_SWITCH\", \"RK_PROGRAM\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_FOR\",\"RK_FOR_ALT\",\n \"RK_FUNCTION\",\"RK_DO\",\"RK_WHILE\",\"RK_WHILE_ALT\",\"RK_IF\",\"RK_ELSE\"]\n const keywordsList = [\"RK_CONST\",\"RK_RETURN\",\"RK_BREAK\",\"RK_FOR_FROM\",\"RK_FOR_TO\",\"RK_FOR_PASS\",\"RK_DO_UNTIL\"];\n const typeList = [\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\"RK_INTEGER\",\"RK_CHARACTER\"];\n const atomList = [\"RK_FALSE\", \"RK_TRUE\"];\n\n const case_default = [];\n const blocks = [];\n const keywords = [];\n const types = [];\n const atoms = []\n let switchString = \"\";\n\n cacheMainList = [];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n blockList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n blocks.push(value);\n if(v == \"RK_SWITCH\") {\n switchString = value;\n } else if (v == \"RK_CASE\" || v == \"RK_DEFAULT\") {\n case_default.push(value);\n }\n });\n keywordsList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n });\n typeList.forEach(v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n types.push(value);\n })\n atomList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n atoms.push(value);\n })\n \n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n const value = LocalizedStrings.getUI(lOp);\n cacheOp.push(value)\n keywords.push(value);\n }\n return {\n case_default: case_default,\n atoms: atoms,\n keywords: keywords,\n switchString: switchString,\n types: types,\n blocks: blocks\n }\n}\n\n/**\n * Source: https://gist.github.com/andrei-m/982927\n * @param {string} a \n * @param {string} b \n */\nexport function levenshteinDistance (a, b) {\n if(a.length == 0) return b.length; \n if(b.length == 0) return a.length; \n\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for(i = 0; i <= b.length; i++){\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for(j = 0; j <= a.length; j++){\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for(i = 1; i <= b.length; i++){\n for(j = 1; j <= a.length; j++){\n if(b.charCodeAt(i-1) == a.charCodeAt(j-1)){\n matrix[i][j] = matrix[i-1][j-1];\n } else {\n matrix[i][j] = Math.min(matrix[i-1][j-1] + 1, // substitution\n Math.min(matrix[i][j-1] + 1, // insertion\n matrix[i-1][j] + 1)); // deletion\n }\n }\n }\n return matrix[b.length][a.length];\n}\n\nlet win = null\nexport function openAssessmentDetail (event) {\n event.preventDefault();\n const page_code = event.currentTarget.dataset.page;\n if(win != null) {\n win.close()\n }\n win = window.open(\"\", \"DetailWindow\", \"width=550,height=600\");\n win.document.open();\n win.document.write(page_code);\n win.document.close();\n}\n\nexport function range (size, startAt = 0) {\n return [...Array(size).keys()].map(i => i + startAt);\n}\n\n/**\n * \n * @param {number} ms \n */\nexport async function sleep (ms) {\n return new Promise( (res, _) => setTimeout(res, ms));\n }\n","import * as GlobalsManagement from './globals';\nimport * as FunctionsManagement from './functions';\n\nwindow.block_render = false;\n\nexport function renderAlgorithm () {\n\tif (window.block_render) {\n\t\treturn;\n\t}\n\tif (window.draging) {\n\t\treturn;\n\t}\n\twindow.block_render = true;\n\tconsole.log('rendering algorithm');\n\n \t$('.all_functions').children().off();\n\t$('.all_functions').empty();\n\n\t$('.list_globals').children().off();\n\t$('.list_globals').empty();\t\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tFunctionsManagement.renderFunction(window.program_obj.functions[i]);\n\t}\n\n\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\tGlobalsManagement.renderGlobal(window.program_obj.globals[i]);\n\t}\t\n\n\tsetTimeout(function(){ window.block_render = false; }, 100);\n\tconsole.log('fim do render');\n\n\tif (settingsFilter && settingsFilter[0]) {\n blockAllEditingOptions();\n } \n}","/* eslint-disable @typescript-eslint/no-use-before-define */\n/* globals $*/\nimport { Types } from \"./types\";\nimport * as Models from \"./ivprog_elements\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./utils\";\n\nexport function generate () {\n $(\".ivprog_visual_panel\")\n .find(\".error_icon\")\n .remove();\n\n let code = LocalizedStrings.getUI(\"program\") + \" { \";\n\n code += globalsCode();\n\n code += \"\\n\";\n\n let has_error = false;\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const n_code = functionsCode(window.program_obj.functions[i]);\n if (n_code == null) {\n has_error = true;\n }\n code += n_code;\n code += \"\\n\";\n }\n\n code += \"\\n}\";\n\n if (has_error) {\n return null;\n } else {\n return code;\n }\n}\n\nfunction functionsCode (function_obj) {\n let ret = \"\\n\\t\" + LocalizedStrings.getUI(\"function\") + \" \";\n\n const has_error = false;\n\n switch (function_obj.return_type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n case Types.VOID:\n ret += LocalizedStrings.getUI(\"type_void\");\n break;\n }\n ret += \" \";\n\n if (function_obj.return_dimensions == 1) {\n ret += \"[] \";\n } else if (function_obj.return_dimensions == 2) {\n ret += \"[][] \";\n }\n\n ret += function_obj.name + \" ( \";\n\n for (let j = 0; j < function_obj.parameters_list.length; j++) {\n ret += parametersCode(function_obj.parameters_list[j]);\n if (j + 1 < function_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n\n ret += \" ) {\";\n\n for (let j = 0; j < function_obj.variables_list.length; j++) {\n ret += variablesCode(function_obj.variables_list[j]);\n }\n\n for (let j = 0; j < function_obj.commands.length; j++) {\n //try {\n ret += commandsCode(function_obj.commands[j]);\n /*} catch (err) {\n\n has_error = true;\n\n console.error(err.message);\n\n var todos = $('body').find('.command_container');\n\n for (var i = 0; i < todos.length; i++) {\n if ($(todos[i]).data('command') == function_obj.commands[j]) {\n $( todos[i] ).prepend( ' ' );\n break;\n }\n }\n\n }*/\n }\n\n ret += \"\\n\\t}\";\n\n if (has_error) {\n return null;\n } else {\n return ret;\n }\n}\n\nfunction commandsCode (command_obj, indentation = 2) {\n switch (command_obj.type) {\n case Models.COMMAND_TYPES.break:\n return breaksCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.comment:\n return commentsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.reader:\n return readersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.writer:\n return writersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.functioncall:\n return functioncallsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.attribution:\n return attributionsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.whiletrue:\n return whiletruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.dowhiletrue:\n return doWhilesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.iftrue:\n return iftruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.repeatNtimes:\n return repeatNtimesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.switch:\n return switchsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.return:\n return returnsCode(command_obj, indentation);\n }\n}\n\nfunction returnsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_return\");\n\n if (command_obj.variable_value_menu) {\n try {\n ret += \" \" + elementExpressionCode(command_obj.variable_value_menu);\n //ret += ' ' + variableValueMenuCode(command_obj.variable_value_menu, true);\n } catch (err) {\n //Empty block\n }\n }\n\n return ret;\n}\n\nfunction breaksCode (_command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_break\");\n\n return ret;\n}\n\nfunction switchsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_switch\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable);\n\n ret += \" ) { \";\n\n if (command_obj.cases) {\n for (let i = 0; i < command_obj.cases.length; i++) {\n ret += switchcasesCode(command_obj.cases[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n ret += \"} \";\n\n return ret;\n}\n\nfunction switchcasesCode (switchcase, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_case\") + \" \";\n ret += variableValueMenuCode(switchcase.variable_value_menu);\n ret += \" :\";\n\n if (switchcase.commands_block) {\n for (let i = 0; i < switchcase.commands_block.length; i++) {\n ret += commandsCode(switchcase.commands_block[i], indentation + 1);\n }\n }\n\n return ret;\n}\n\nfunction repeatNtimesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_for\") + \" \";\n\n if (command_obj.var_attribution) {\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += variableValueMenuCode(command_obj.expression1);\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += variableValueMenuCode(command_obj.expression2);\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" +\";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" -\";\n break;\n }\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n }\n\n /*if (command_obj.var_incrementation) {\n ret += variableValueMenuCode(command_obj.var_incrementation);\n ret += ' <- ';\n ret += variableValueMenuCode(command_obj.expression3.itens[0]);\n\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += ' + ';\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += ' - ';\n break;\n case Models.ARITHMETIC_TYPES.multiplication:\n ret += ' * ';\n break;\n case Models.ARITHMETIC_TYPES.division:\n ret += ' / ';\n break;\n case Models.ARITHMETIC_TYPES.module:\n ret += ' % ';\n break;\n }\n\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n }*/\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n return ret;\n}\n\nfunction iftruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_if\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n } else {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_else\") + \" {\";\n\n if (command_obj.commands_else) {\n for (let i = 0; i < command_obj.commands_else.length; i++) {\n ret += commandsCode(command_obj.commands_else[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction doWhilesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_do\") + \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_code_do_until\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n return ret;\n}\n\nfunction whiletruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_while\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction logicExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n if (expression.operator) {\n switch (expression.operator) {\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.LOGIC_COMPARISON.and:\n ret += \" && \";\n break;\n case Models.LOGIC_COMPARISON.or:\n ret += \" || \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction arithmeticExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n switch (expression.operator) {\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n case Models.ARITHMETIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.ARITHMETIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction attributionsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.variable) + \" <- \";\n\n /*for (var i = 0; i < command_obj.expression.length; i++) {\n ret += elementExpressionCode(command_obj.expression[i]);\n }*/\n ret += elementExpressionCode(command_obj.expression);\n\n return ret;\n}\n\nfunction elementExpressionCode (expression_obj) {\n let ret = \"\";\n\n for (let i = 0; i < expression_obj.length; i++) {\n if (expression_obj[i].type) {\n ret += variableValueMenuCode(expression_obj[i]);\n } else if (expression_obj[i].type_op) {\n switch (expression_obj[i].item) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" + \";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" - \";\n break;\n case Models.ARITHMETIC_TYPES.multiplication:\n ret += \" * \";\n break;\n case Models.ARITHMETIC_TYPES.division:\n ret += \" / \";\n break;\n case Models.ARITHMETIC_TYPES.module:\n ret += \" % \";\n break;\n\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n\n case Models.LOGIC_COMPARISON.and:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_and\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.or:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_or\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.not:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_not\") + \" \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n case Models.EXPRESSION_TYPES.write_sep:\n ret += \", \";\n break;\n }\n } else {\n ret += \" \" + expression_obj[i] + \" \";\n }\n }\n\n return ret;\n}\n\nfunction functioncallsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.function_called);\n\n return ret;\n}\n\nfunction readersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_read\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable_value_menu);\n\n ret += \" ) \";\n return ret;\n}\n\nfunction variableValueMenuCode (variable_obj, is_return = false) {\n let ret = \"\";\n try {\n if (variable_obj.function_called) {\n if (variable_obj.function_called.name) {\n ret += variable_obj.function_called.name + \" ( \";\n } else {\n ret +=\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) + \" ( \";\n }\n\n if (variable_obj.parameters_list) {\n for (let i = 0; i < variable_obj.parameters_list.length; i++) {\n ret += variableValueMenuCode(variable_obj.parameters_list[i]);\n if (i + 1 < variable_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n }\n\n ret += \" )\";\n } else if (variable_obj.content.type) {\n ret += variable_obj.content.name;\n\n if (\n variable_obj.content.dimensions == 1 &&\n variable_obj.dimensions != 1\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n\n if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.row) + \" ] \";\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n } else {\n if (isNaN(variable_obj.content)) {\n ret += '\"' + variable_obj.content + '\"';\n } else {\n ret += variable_obj.content;\n }\n }\n } catch (err) {\n if (!is_return) {\n Utils.renderErrorMessage(\n variable_obj.dom_object,\n LocalizedStrings.getUI(\"inform_valid_content\")\n );\n throw err;\n }\n }\n\n return ret;\n}\n\nfunction writersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_write\") + \" ( \";\n\n /*for (var i = 0; i < command_obj.content.length; i++) {\n ret += variableValueMenuCode(command_obj.content[i]);\n\n if ((i + 1) < command_obj.content.length) {\n ret += ' + ';\n }\n }*/\n\n ret += elementExpressionCode(command_obj.content);\n if (command_obj.newline) {\n ret += ', \"\\\\n\"';\n }\n\n ret += \" ) \";\n return ret;\n}\n\nfunction commentsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"// \";\n\n ret += command_obj.comment_text.content;\n return ret;\n}\n\nfunction parametersCode (parameter_obj) {\n let ret = \"\";\n switch (parameter_obj.type) {\n case Types.INTEGER:\n ret += \" \" + LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += \" \" + LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += \" \" + LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += \" \" + LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += \" \" + LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n ret += parameter_obj.name + \"\";\n\n if (parameter_obj.dimensions == 1) {\n ret += \" []\";\n } else if (parameter_obj.dimensions == 2) {\n ret += \" [][]\";\n }\n return ret;\n}\n\nfunction variablesCode (variable_obj) {\n let ret = \"\";\n\n const temp = variable_obj;\n\n ret += \"\\n\\t\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n ret += temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j].toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k].toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + temp.value.toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n\n return ret;\n}\n\nfunction globalsCode () {\n let ret = \"\";\n\n if (window.program_obj.globals) {\n for (let i = 0; i < window.program_obj.globals.length; i++) {\n const temp = window.program_obj.globals[i];\n\n ret += \"\\n\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n }\n ret += \" \" + temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j].toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k].toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + temp.value.toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n }\n }\n\n return ret;\n}\n","import * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as CommentsManagement from './commands/comment';\nimport * as ReadersManagement from './commands/reader';\nimport * as WritersManagement from './commands/writer';\nimport * as AttributionsManagement from './commands/attribution';\nimport * as IftruesManagement from './commands/iftrue';\nimport * as RepeatNtimesManagement from './commands/repeatNtimes';\nimport * as WhiletruesManagement from './commands/whiletrue';\nimport * as DowhiletruesManagement from './commands/dowhiletrue';\nimport * as SwitchesManagement from './commands/switch';\nimport * as FunctioncallsManagement from './commands/functioncall';\nimport * as VariableValueMenuManagement from './commands/variable_value_menu';\nimport * as BreaksManagement from './commands/break';\nimport * as ReturnsManagement from './commands/return';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\n\n// let has_element_created_draged = false;\n// let which_element_is_draged = null;\n\nexport function removeCommand (command, function_obj, dom_obj) {\n\n\tregisterUserEvent(function_obj.name, ActionTypes.REMOVE_COMMAND, command.type, '/', 0);\n\n\tif (function_obj.commands.indexOf(command) > -1) {\n\t\tfunction_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\t// Utilize dois parantNode, pois o primeiro é o div de comandos\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').commands_block.indexOf(command) > -1) {\n\t\t\tdom_obj.parent().parent().data('command').commands_block.splice\n\t\t\t(dom_obj.parent().parent().data('command').commands_block.indexOf(command), 1);\n\t\t\treturn true;\n\t\t}\t\n\t} catch (err) {}\n\t\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').type == Models.COMMAND_TYPES.iftrue) {\n\t\t\tif (dom_obj.parent().parent().data('command').commands_else.indexOf(command) > -1) {\n\t\t\t\tdom_obj.parent().parent().data('command').commands_else.splice\n\t\t\t\t(dom_obj.parent().parent().data('command').commands_else.indexOf(command), 1);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} catch (err) {}\n\n\tif (dom_obj.parent().data('switchcase')) {\n\t\tconsole.log(\"o que encontrei: \");\n\t\tconsole.log(dom_obj.parent().data('switchcase'));\n\t\tdom_obj.parent().data('switchcase').commands_block.splice(dom_obj.parent().data('switchcase').commands_block.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nwindow.function_container_active = null;\n\nexport function createFloatingCommand (function_obj, function_container, command_type, mouse_event) {\n\n\tvar floatingObject;\n\n\tswitch (command_type) {\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tfloatingObject = BreaksManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tfloatingObject = CommentsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tfloatingObject = ReadersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tfloatingObject = WritersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tfloatingObject = AttributionsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tfloatingObject = IftruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tfloatingObject = RepeatNtimesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tfloatingObject = WhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tfloatingObject = DowhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tfloatingObject = SwitchesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tfloatingObject = FunctioncallsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tfloatingObject = ReturnsManagement.createFloatingCommand();\n\t\t\tbreak;\n\t}\n\n\tfloatingObject.draggable().appendTo(\"body\");\n\n\t$('body').mouseup(function(evt) {\n\t manageCommand(function_obj, function_container, evt, command_type);\n\t $('body').off('mouseup');\n\t $('body').off('mouseover');\n\t});\n\n\tif (!function_container.hasClass('function_div') || function_container.length < 1) {\n\t\twindow.mouse_event = mouse_event;\n\t\tfunction_container = $(mouse_event.originalEvent.srcElement.closest('.function_div'));\n\t}\n\n\tconsole.log('function_container', function_container);\n\n\tfunction_container_active = function_container;\n\n\tfunction_container.find('.commands_list_div').on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\tfunction_container.find('.commands_list_div').find(\"*\").on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\n\tfunction_container.on('mouseout', function(event) {\n\t\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\t\tif (el.closest('.commands_list_div').length < 1) {\n\t\t\twindow.ghostDiv.remove();\n\t\t}\n\t});\n\t\n\tfloatingObject.css(\"position\", \"absolute\");\n\tmouse_event.type = \"mousedown.draggable\";\n\tmouse_event.target = floatingObject[0];\n\tfloatingObject.css(\"left\", mouse_event.pageX - window.divx);\n\tfloatingObject.css(\"top\", mouse_event.pageY);\n\tfloatingObject.trigger(mouse_event);\n}\n\nwindow.divx = 100;\nwindow.ghostDiv = $('
');\nwindow.active_container = null;\n\nfunction addGhostToEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.command_container');\n\n\tif (container.hasClass('switch')) {\n\t\tcontainer = $(evt.target).closest('.case_div');\t\t\n\t}\n\n\tif (!container.hasClass('dowhiletrue') && !container.hasClass('iftrue') && !container.hasClass('repeatNtimes') \n\t\t\t\t&& !container.hasClass('case_div') && !container.hasClass('whiletrue')) {\n\t\taddGhostToNotEmptyBlock(element, evt);\n\t\treturn;\n\t}\n\n\tif (window.active_container != null) {\n\t\tif (window.active_container.is(container)) {\n\t\t\tconsole.log('é o mesmo, não mudou!');\n\t\t} else {\n\t\t\tif (container.length < 1) {\n\t\t\t\tcontainer = element.closest('.commands_list_div');\n\t\t\t\tif (window.active_container.is(container)) {\n\t\t\t\t\tconsole.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('mudou para um command list');\n\t\t\t\t\twindow.active_container = container;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('mudou para um outro container?');\n\t\t\t}\n\t\t}\n\t}\n\n\twindow.active_container = container;\n\tif (container.hasClass('iftrue')) {\n\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t$(containerIf).append(window.ghostDiv);\n\t\t} else {\n\t\t\t$(containerElse).append(window.ghostDiv);\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tcontainer.find('.case_commands_block').append(window.ghostDiv);\n\t} else {\n\t\tcontainer.find('.block_commands').append(window.ghostDiv);\n\t}\n\t\n}\n\nfunction addGhostToNotEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.dowhiletrue, .iftrue, .repeatNtimes, .case_div, .whiletrue');\n\n\t//console.log(\"\\n\\nNOT EMPTY: \", container);\n\n\t//if (window.active_container != null) {\n\t\t\n\t\t\n\t//}\n\n\tif (container.length < 1) {\n\t\tcontainer = element.closest('.commands_list_div');\n\t\twindow.active_container = container;\n\t\taddGhostToFunctionArea(element, evt);\n\t} else {\n\t\t//console.log('mudou para um outro container?');\n\t}\n\n\twindow.active_container = container;\n\n\t// quem está mais próximo? // Essa regra se aplica somente quando o over está sobre um comando\n\tvar allfilhos;\n\tconsole.log('olha o container: ', container);\n\tif (container.hasClass('iftrue')) {\n\t\t\n\t\tif ($(evt.target).closest('.data_block_if').length > 0) {\n\t\t\tallfilhos = container.find('.commands_if').children('.command_container');\n\t\t} else if ($(evt.target).closest('.data_block_else').length > 0) {\n\t\t\tallfilhos = container.find('.commands_else').children('.command_container');\n\t\t} else {\n\n\t\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t\tallfilhos = $(containerIf).children('.command_container');\n\t\t\t} else {\n\t\t\t\tallfilhos = $(containerElse).children('.command_container');\n\t\t\t}\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tallfilhos = container.children('.case_commands_block').children('.command_container');\n\t} else if (container.hasClass('commands_list_div')) {\n\t\tallfilhos = container.children('.command_container');\n\t} else {\n\t\tallfilhos = container.children('.block_commands').children('.command_container');\n\t}\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tconsole.log('topDistances\\n', topDistances, '\\nbottomDistances\\n', bottomDistances)\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n\tconsole.log('distancias: menorTop ', menorTop, ' menorBot ', menorBot);\n}\n\nfunction addGhostToFunctionArea (undermouse, evt) {\n\t$('.ghost_div').remove();\n\tvar allfilhos = undermouse.closest('.commands_list_div').children('.command_container');\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n}\n\nfunction addGhostDiv (evt) {\n\n\tvar undermouse = $(evt.target);\n\n\tif (undermouse.hasClass('ghost_div')) {\n\t\treturn;\n\t} else if (undermouse.hasClass('commands_list_div')) {\n\t\taddGhostToFunctionArea(undermouse, evt);\n\t\treturn;\n\t} else if (undermouse.hasClass('block_commands')) {\n\t\tif (undermouse.find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else if (undermouse.hasClass('case_div')) {\n\t\tif (undermouse.find('.case_commands_block').find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else {\n\t\t\n\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t\n\t} \n}\n\nfunction borderMouseDragCommand (function_obj, function_container, evt) {\n\n\tfunction_container.find('.over_command_drag').each(function( index ) {\n\t\t$(this).removeClass('over_command_drag');\n\t});\n\n\tvar prev = null;\n\n\tfunction_container.find('.commands_list_div').each(function( index ) { \n\t\tprev = $(this);\n\t\tif (prev) {\n\t\t\tvar objLeft = prev.offset().left;\n\t var objTop = prev.offset().top;\n\t var objRight = objLeft + prev.width();\n\t var objBottom = objTop + prev.height();\n\t if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n\t \tprev.addClass(\"over_command_drag\"); \n\t }\n\t }\n\t});\n\n\tfunction_container.find('.command_container').each(function( index ) { \n\t\tvar obj = $(this);\n\t\tvar objLeft = obj.offset().left;\n var objTop = obj.offset().top;\n var objRight = objLeft + obj.width();\n var objBottom = objTop + obj.height();\n if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n \tif (prev) {\n \t\tprev.removeClass('over_command_drag');\n \t}\n \tobj.addClass(\"over_command_drag\"); \n \treturn;\n }\n\t});\n}\n\n// before_after_inside: 1 -> before, 2 -> after, 3 -> inside\nexport function renderCommand (command, element_reference, before_after_inside, function_obj) {\n\tvar createdElement;\n\tswitch (command.type) {\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tcreatedElement = CommentsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tcreatedElement = BreaksManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tcreatedElement = ReadersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tcreatedElement = WritersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tcreatedElement = AttributionsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tcreatedElement = FunctioncallsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tcreatedElement = IftruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tcreatedElement = RepeatNtimesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tcreatedElement = WhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tcreatedElement = DowhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tcreatedElement = SwitchesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tcreatedElement = ReturnsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\t}\n\tswitch (before_after_inside) {\n\t\tcase 1:\n\t\t\tcreatedElement.insertBefore(element_reference);\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tcreatedElement.insertAfter(element_reference);\n\t\t\tbreak;\n\n\t\tcase 3: \n\t\t\telement_reference.append(createdElement);\n\t\t\tbreak;\n\t}\n\n}\n\nexport function genericCreateCommand (command_type) {\n\n\tswitch (command_type) {\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\treturn new Models.Break();\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\treturn new Models.Comment(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_value, LocalizedStrings.getUI('text_comment'), null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\treturn new Models.Reader(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\treturn new Models.Writer([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\treturn new Models.Attribution(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t[]);\n \n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\treturn new Models.FunctionCall(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_function, null, null, null, false), null);\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\treturn new Models.IfTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n//(var_attribution, var_incrementation, expression1, expression2, expression3, commands_block)\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\treturn new Models.RepeatNTimes(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false),\n\t\t\t\t\t\t\t\t\t\t null, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), null, null);\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\treturn new Models.WhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\treturn new Models.DoWhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\n\t\t\tvar sc = [new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true))];\n\n\t\t\treturn new Models.Switch(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true), sc);\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\treturn new Models.Return([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\t}\n}\n\nfunction dragTrash (event) {\n\n\t$('.ghost_div').remove();\n\n\tvar trash = $('');\n\t$('body').append(trash);\n\ttrash.css('position', 'absolute');\n\ttrash.css('top', event.clientY);\n\ttrash.css('left', event.clientX - 20);\n\ttrash.css('font-size', '3em');\n\ttrash.css('display', 'none');\n\n\tfunction_container_active.find('.commands_list_div').off('mousemove');\n\tfunction_container_active.find('.commands_list_div').find(\"*\").off('mousemove');\n\n\ttrash.fadeIn( 200, function() {\n\t\ttrash.fadeOut( 200, function() {\n\t\t\ttrash.remove();\n\t\t} );\n });\n}\n\nfunction findSingleElement (searching, query) {\n\n\tif (!searching || !query) {\n\t\treturn '';\n\t}\n\n\tif (searching.type == Models.COMMAND_TYPES.repeatNtimes || \n\t\tsearching.type == Models.COMMAND_TYPES.whiletrue ||\n\t\tsearching.type == Models.COMMAND_TYPES.dowhiletrue) {\n\n\t\tif (searching.commands_block) {\n\t\t\treturn '' + searching.commands_block.indexOf(query);\n\t\t} else {\n\t\t\treturn '0';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tif (searching.commands_block == null) {\n\t\t\tsearching.commands_block = [];\n\t\t}\n\t\tif (searching.commands_else == null) {\n\t\t\tsearching.commands_else = [];\n\t\t}\n\n\t\tconsole.log('\\n\\nveja onde: ', searching.commands_block, ' \\n\\nquery: ', query);\n\n\t\tif (searching.commands_block.indexOf(query) >= 0) {\n\t\t\treturn 'if[' + searching.commands_block.indexOf(query) + ']';\n\t\t} else {\n\t\t\treturn 'else[' + searching.commands_else.indexOf(query) + ']';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.switch) {\n\n\t\tfor (var i = 0; i < searching.cases.length; i++) {\n\t\t\tif (searching.cases[i].commands_block.indexOf(query) >= 0) {\n\t\t\t\treturn 'case[' + searching.cases[i].commands_block.indexOf(query) + ']';\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\nfunction findPathRecursive (starter_index, hierarquia_bottom_up, function_obj, index_command = -1, actual = null) {\n\tvar full_path = '';\n\t\n\tfor (var i = 0; i <= hierarquia_bottom_up.length; i ++) {\n\n\t\tconsole.log('\\n\\n:: ', i, ':\\n', hierarquia_bottom_up[i]);\n\n\t\tfull_path += findSingleElement(hierarquia_bottom_up[i], hierarquia_bottom_up[i + 1]) + '-';\n\t}\n\n\treturn full_path;\n}\n\nfunction manageCommand (function_obj, function_container, event, command_type) {\n\n\t$( \".created_element\" ).each(function( index ) { \n\t\t$(this).remove();\n\t});\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tif (el.hasClass('ghost_div')) {\n\t\tif (el.closest('.command_container').length < 1) {\n\t\t\t\n\n\t\t\tconsole.log('\\n\\nvou tentar!!!!');\n\n\t\t\tconsole.log(el.closest('.commands_list_div'), '\\n\\n');\n\n\t\t\tel.closest('.commands_list_div').css('height', el.closest('.commands_list_div').css('height') + 30);\n\t\t\t\n\t\t\t//$('.ghost_div').remove();\n\n\t\t\tel = el.closest('.commands_list_div');\n\t\t}\n\t}\n\n\tconsole.log('soltou no: ');\n\tconsole.log(el);\n\tconsole.log(el.data('fun'));\n\n\t// Primeiro verificar se ele soltou no espaço da função correta:\n\tvar hier = el.parentsUntil(\".all_functions\");\n\tvar esta_correto = false;\n\tvar esta_na_div_correta = false;\n\tif (el.hasClass(\"commands_list_div\")) {\n\t\testa_na_div_correta = true;\n\t} \n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (temp.hasClass(\"commands_list_div\")) {\n\t\t\testa_na_div_correta = true;\n\t\t} \n\t\tif (temp.data('fun') == function_obj) {\n\t\t\testa_correto = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!esta_correto) {\n\t\t// has_element_created_draged = false;\n\t\t// which_element_is_draged = null;\n\t\tdragTrash(event);\n\t\treturn;\n\t} else {\n\t\tif (!esta_na_div_correta) {\n\t\t\t// has_element_created_draged = false;\n\t\t\t// which_element_is_draged = null;\n\t\t\tdragTrash(event);\n\t\t\treturn;\n\t\t}\n\t}\n\tvar hierarquia_bottom_up = null;\n\t// Agora é descobrir qual o escopo para adicionar o comando:\n\tconsole.log('ev0');\n\t// Se o elemento clicado possuir o atributo \"fun\", então, é direto na div dos comandos:\n\tif (typeof el.data('fun') !== 'undefined') {\n\n\t\t// Se a lista de comandos estiver vazia, então é o primeiro.\n\t\t// Portanto, ele deve soltar o elemento obrigatoriamente no objeto vazio\n\t\tif ((el.data('fun').commands == null) || (el.data('fun').commands.length == 0)) {\n\t\t\t\t// pode adicionar \n\t\t\t\tel.data('fun').commands = [];\n\n\t\t\t\tvar new_cmd = genericCreateCommand(command_type);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', 0);\n\n\t\t\t\tel.data('fun').commands.push(new_cmd);\n\n\t\t\t\trenderCommand(new_cmd, $(function_container).find('.commands_list_div'), 3, function_obj);\n\t\t\t\n\t\t} else { // Entra nesse else, caso já existam outros comandos no bloco:\n\n\t\t\tfindNearbyCommandToAddInFunctionScope(el, event, $(function_container).find('.commands_list_div'), function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log(\"soltou em um comando\");\n\t\t// descobrir em qual comando ele soltou: \n\t\tvar hier_find = el.parentsUntil(\".commands_list_div\");\n\t\thierarquia_bottom_up = [];\n\t\tif (typeof el.data('command') !== 'undefined') {\n\t\t\thierarquia_bottom_up.push(el.data('command'));\n\t\t}\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\thierarquia_bottom_up.push($(hier_find[i]).data('command'));\n\t\t\t}\n\t\t}\n\t\tconsole.log(\"comando em que soltou: \");\n\t\tconsole.log(hierarquia_bottom_up[0]);\n\t\tconsole.log(\"hierarquia de baixo para cima na árvore, de onde ele soltou: \");\n\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\tconsole.log(hierarquia_bottom_up[i]);\n\t\t}\n\n\t\t// Se for do tipo break, verificar se está no contexto correto: \n\t\t// Caso não esteja no contexto, apenas retorna sem dar continuidade:\n\t\tvar is_correct_context = false;\n\t\tif (command_type == Models.COMMAND_TYPES.break) {\n\t\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\t\tif ((hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.repeatNtimes)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.whiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.dowhiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.switch)) {\n\n\t\t\t\t\tis_correct_context = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!is_correct_context) {\n\t\t\t\tconsole.error(\"Context not allowed to insert BREAK COMMAND!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// se a hierarquia possuir apenas um elemento, então está na raiz dos comandos: \n\t\tif (hierarquia_bottom_up.length == 1) {\n\t\t\tconsole.log('QQ1');\n\t\t\tvar sub_elemento = false;\n\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\tconsole.log('QQ2');\n\t\t\t\t\tfindBeforeOrAfterCommandToAdd(hier_find[i], event, function_obj, command_type);\n\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!sub_elemento) {\n\t\t\t\tconsole.log('QQ3');\n\t\t\t\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log('QQ4');\n\t\t\t// caso exista mais de um elemento na hierarquia:\n\t\t\tif (typeof $(el).data('command') !== 'undefined') {\n\t\t\t\tconsole.log('QQ5');\n\t\t\t\tconsole.log(\"PPP1\");\n\t\t\t\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\n\t\t\t\tconsole.log('QQ6');\n\t\t\t\tvar sub_elemento = false;\n\t\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\t\tconsole.log('QQ7');\n\t\t\t\t\t\tinsertCommandInBlockHierar(hier_find[i], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t// has_element_created_draged = false;\n\t// which_element_is_draged = null;\n\n\tif (hierarquia_bottom_up) {\n\t\tconsole.log('\\n\\n:::índices::\\n\\n');\n\t\tvar i = hierarquia_bottom_up.length - 1;\n\t\tvar starter_index = window.program_obj.functions[window.program_obj.functions.indexOf(function_obj)].commands.indexOf(hierarquia_bottom_up[i]);\n\t\tvar all_str_path = starter_index + '-' + findPathRecursive(starter_index, hierarquia_bottom_up, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' , all_str_path);\n\t\tconsole.log('\\n\\nfull path: \\n\\n', all_str_path);\n\t\tconsole.log('fim dos índices');\n\t}\n\n\trenderAlgorithm();\n}\n\nfunction insertCommandInBlockHierar (el, event, function_obj, command_type, hier_dom, hier_obj) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\t\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.switch) ) {\n\n\t\tconsole.log('QQ17');\n\n\t\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t\tconsole.log('QQ18');\n\n\t\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' + el_jq.data('command').type, 0);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindNearbyCommandToAddInBlockScope(el, event, el, function_obj, command_type, command_parent);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// QUANDO FOR BLOCO DO TIPO IF OU SWITCH/CASE:\n\t\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log('QQ19');\n\t\t// entra neste bloco, se soltou o comando sobre outro comando dentro de um subbloco:\n\t\tfindBeforeOrAfterCommandToAddInsertBlock(el, event, function_obj, command_type);\n\t}\n}\n\nfunction findNearbyCommandToAddInBlockScope (el, event, node_list_commands, function_obj, command_type, command_parent) {\n\n\tconsole.log(\"\\n\\n\\n::COMANDOS:\\n\\n\", el, event, node_list_commands, function_obj, command_type, command_parent);\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tcommand_parent.commands_block.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAddInsertBlock (el, event, function_obj, command_type) {\n\n\tvar el_jq = $(el);\n\tvar command_parent = $(el.parentNode.parentNode).data('command');\n\tvar command_target = el_jq.data('command');\n\tvar temp_parent = $(el.parentNode.parentNode);\n\n\tvar is_in_else = false;\n\n\tif (!command_parent) {\n\t\tcommand_parent = el_jq.data('command');\n\t\ttemp_parent = el_jq;\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t}\n\t\t\tif (typeof temp.data('command') != 'undefined') {\n\t\t\t\tcommand_parent = temp.data('command');\n\t\t\t\ttemp_parent = temp;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tvar hier = el_jq.parentsUntil(\".command_container\");\n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\tis_in_else = true;\n\t\t}\n\t}\n\n\tif (command_parent == command_target) {\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ((command_parent.type != Models.COMMAND_TYPES.iftrue) && (command_parent.type != Models.COMMAND_TYPES.switch)) {\n\t\tvar hier = temp_parent.parentsUntil(\".all_cases_div\");\n\t\tconsole.log(\"vou procurar!!\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tconsole.log(\"estou vasculhando...\");\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\n\t\t\t\tconsole.log(\"encontrei\");\n\t\t\t\tcommand_parent = temp.data('switchcase');\n\t\t\t\tis_in_else = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log('debugging:');\n\tconsole.log('el_jq');\n\tconsole.log(el_jq);\n\tconsole.log('command_parent');\n\tconsole.log(command_parent);\n\tconsole.log('command_target');\n\tconsole.log(command_target);\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tconsole.log('MMM1');\n\n\t\tif (is_in_else) {\n\n\t\t\tconsole.log('MMM2');\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM7');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t} else {\n\t\t\tconsole.log('MMM4');\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx5');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\t\t\t\t\tconsole.log('SSS4');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS5');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM6');\n\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t}\n\n\t\t\n\n\t} else {\n\t\tconsole.log('XXX1');\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\t\t\t\t\tconsole.log('SSS1');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tconsole.log('SSS2');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX2');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\n\t\t} else {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx78');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\t\tconsole.log('SSS6');\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS7');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX3');\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\t}\n\n\t\t\n\t}\n}\n\nfunction insertCommandInBlock (el, event, function_obj, command_type) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\tcommand_parent.commands_block = [];\n\n\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t} else { // Se já tem algum comando no bloco:\n\t\t\tfindInBlockCorrectPlace(el, event, function_obj, command_type);\n\t\t}\n\n\t} else if (el_jq.data('command').type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tconsole.log('QQ9');\n\t\t\n\t\t// no if ou no else?\n\t\tvar correct_div = $(document.elementFromPoint(event.pageX, event.pageY));\n\t\tvar is_in_if = true;\n\t\tif (correct_div.data('if')) {\n\t\t\tis_in_if = true;\n\t\t} else if (correct_div.data('else')) {\n\t\t\tis_in_if = false;\n\t\t} else {\n\t\t\tvar hier = correct_div.parentsUntil(\".command_container\");\n\t\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\t\tvar temp = $(hier[i]);\n\t\t\t\tif (typeof temp.data('if') !== 'undefined') {\n\t\t\t\t\tis_in_if = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\t\tis_in_if = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (is_in_if) {\n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_if'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_if'), event, function_obj, command_type);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_else'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_else'), event, function_obj, command_type, true);\n\t\t\t}\n\n\t\t}\n\n\t} else { // é do tipo switch\n\t\tconsole.log(\"está tentando inserir em um switch que está na raiz!\");\n\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t}\n}\n\nfunction addCommandToSwitchCase (event, function_obj, command_type) {\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tvar which_case = el.data('switchcase');\n\tvar case_div = el;\n\t\n\tif (!which_case) {\n\t\tvar hier_find = el.parentsUntil(\".all_cases_div\");\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('switchcase') !== 'undefined') {\n\t\t\t\twhich_case = $(hier_find[i]).data('switchcase');\n\t\t\t\tcase_div = $(hier_find[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (which_case.commands_block == null || which_case.commands_block.length < 1) {\n\t\twhich_case.commands_block = [];\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\twhich_case.commands_block.push(recentComand);\n\t\trenderCommand(recentComand, case_div.find('.case_commands_block'), 3, function_obj);\n\t} else {\n\t\tfindInBlockCorrectPlaceInSwitchCase(which_case, case_div, event, function_obj, command_type);\n\t}\n\n}\n\n\n\n\nfunction findInBlockCorrectPlaceInSwitchCase (which_case, case_div, event, function_obj, command_type) {\n\n\tvar all_sub = case_div.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\twhich_case.commands_block.push(recentComand);\n\n\t\trenderCommand(recentComand, $(case_div.find('.case_commands_block')[0]), 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = which_case.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t which_case.commands_block.splice(index, 0, recentComand);\n\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t}\n\t}\n}\n\nfunction findInBlockCorrectPlace (el, event, function_obj, command_type, is_in_else = false) {\n\tvar el_jq = $(el);\n\tvar all_sub = el_jq.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\n\tconsole.log(\"menor_distancia: \");\n\tconsole.log(elemento_menor_distancia);\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\n\t\tconsole.log('QQ11');\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\t\t\tconsole.log('QQ15');\n\t\t\tcommand_parent.commands_else.push(recentComand);\n\t\t\tconsole.log('el_jq');\n\t\t\tconsole.log(el_jq);\n\t\t\tconsole.log(\"$(el_jq.find('.commands_else')[0]):: \");\n\t\t\tconsole.log($(el_jq.find('.commands_else')[0]));\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\n\t\t\tconsole.log('QQ16');\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, $(el_jq.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\n\t} else {\n\n\t\tconsole.log('QQ12');\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\n\t\t\tvar index = command_parent.commands_else.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAdd (el, event, function_obj, command_type) {\n\tswitch ($(el).data('command').type) {\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tinsertCommandInBlock(el, event, function_obj, command_type);\n\t\t\treturn;\n\t}\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\n\t} else {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice((index + 1), 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n\nfunction findNearbyCommandToAddInFunctionScope (el, event, node_list_commands, function_obj, command_type) {\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tfunction_obj.commands.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', function_obj.commands.length - 1);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as ExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
x <— 1 + 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\t\n\tvar el = $('
'+LocalizedStrings.getUI('text_receives')+' '\n\t\t + '
');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.var_attributed'), function_obj);\n\n\tif (!command.expression || command.expression.length < 1) {\n\t\tvar exp = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\tcommand.expression.push(exp);\n\t}\n\n\taddHandlers(command, function_obj, el);\n\n\tExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.expression);\n\n\t//renderExpressionElements(command, function_obj, el);\n\n\treturn el;\n\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, selectedItem, expression_element) {\n\t\n\tvar index_to_move = expression_element.itens.indexOf(ref_object);\n\n\tswitch (selectedItem.data('exp')) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [expression_element.itens[index_to_move],\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\texpression_element.itens[index_to_move] ]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [expression_element.itens[index_to_move]]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\t}\n\n\trenderExpressionElements(command, function_obj, dom_object);\n\n}\n\nfunction renderExpressionElements (command, function_obj, el) {\n\tvar expression_div = el.find('.expression_elements');\n\tvar command_container;\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tcommand_container = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\texpression_div = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (command_container) {\n\t\texpression_div = command_container.find('.expression_elements');\n\t}\n\n\texpression_div.text('');\n\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tvar temp = $('
');\n\t\ttemp.data('ref_element', command.expression[i]);\n\t\ttemp.data('ref_index', i);\n\n\t\texpression_div.append(temp);\n\n\t\trenderElement(command, function_obj, temp, command.expression[i]);\n\t}\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar context_menu = '
';\n\n\tswitch (expression_element.itens[index_op]) {\n\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\tcontext_menu += '+';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\tcontext_menu += '-';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\tcontext_menu += '*';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\tcontext_menu += '/';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\tcontext_menu += '%';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.none:\n\t\t\tcontext_menu += '...';\n\t\t\tbreak;\n\t}\n\t\n\tcontext_menu += '
';\n\tcontext_menu += '
+
';\n\tcontext_menu += '
-
';\n\tcontext_menu += '
*
';\n\tcontext_menu += '
/
';\n\tcontext_menu += '
%
';\n\tcontext_menu += '
Nenhum
';\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\ttemp_op.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t expression_element.itens[index_op] = value;\n }\n\t});\n\n}\n\nfunction renderMenuAddExpression (command, function_obj, el, dom_append_menu, expression_append_new_expression) {\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tel = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom_append_menu.hasClass(\"expression_elements\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\tdom_append_menu = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar context_menu = '
';\n\tcontext_menu += '
EXP OP EXP
';\n\tcontext_menu += '
OP EXP
';\n\tcontext_menu += '
( EXP )
';\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_append_menu.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t switch (value) {\n\t \tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t \tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\trenderExpressionElements(command, function_obj, el);\n }\n\t});\n\n}\n\nfunction renderElement (command, function_obj, el, expression_element) {\n\n\tswitch (expression_element.type_exp) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar temp_op = $('
');\n\t\t\tvar temp_exp_1 = $('
');\n\t\t\tvar temp_exp_2 = $('
');\n\n\t\t\tel.append(temp_exp_1);\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp_2);\n\t\t\t\n\t\t\tif (expression_element.itens[0].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[0], temp_exp_1, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_1, expression_element.itens[0]);\n\t\t\t}\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 1);\n\n\t\t\tif (expression_element.itens[2].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[2], temp_exp_2, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_2, expression_element.itens[2]);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar temp_op = $('
');\n\t\t\tvar temp_exp = $('
');\n\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp);\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 0);\n\n\t\t\tif (expression_element.itens[1].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[1], temp_exp, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[1]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar temp_par_1 = $('
(
');\n\t\t\tvar temp_exp = $('
');\n\t\t\tvar temp_par_2 = $('
)
');\n\n\t\t\tel.append(temp_par_1);\n\t\t\tel.append(temp_exp);\n\n\t\t\tfor (var j = 0; j < expression_element.itens.length; j++) {\n\t\t\t\tif (expression_element.itens[j].type) {\n\t\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[j], temp_exp, function_obj, 2, expression_element);\n\t\t\t\t} else {\n\t\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//renderMenuAddExpression(command, function_obj, el, el, expression_element.itens);\n\n\t\t\tel.append(temp_par_2);\n\n\t\t\tbreak;\n\t}\n\n}\n\n\nfunction renderExpression (command, function_obj, el) {\n\n\tvar expression_div = el.find('.expression_elements');\n\texpression_div.text('');\n\n\tvar menu_add_item = $('
');\n\tmenu_add_item.data('index_add', 0);\n\n\texpression_div.append(menu_add_item);\n\t\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tif (command.expression[i].type) {\n\n\t\t\tvar temp = $('
');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t\tVariableValueMenu.renderMenu(command, command.expression[i], temp, function_obj);\n\n\t\t} else if (command.expression[i] == \"(\" || command.expression[i] == \")\") {\n\n\t\t\tvar temp = $('
'+command.expression[i]+'
');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t} else {\n\n\t\t\tvar temp = '
';\n\n\t\t\tswitch(command.expression[i]) {\n\t\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\t\ttemp += '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\t\ttemp += '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\t\ttemp += '*';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\t\ttemp += '/';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\t\ttemp += '%';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttemp += '
';\n\t\t\ttemp = $(temp);\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t}\n\t\t\n\t\tvar menu_add_item_seq = $('
');\n\t\tvar index_temp = (i + 1);\n\t\tmenu_add_item_seq.data('index_add', index_temp);\n\t\texpression_div.append(menu_add_item_seq);\n\n\t}\n\n\taddMenuItens(command, function_obj, el);\n\n}\n\nfunction addMenuItens (command, function_obj, expression_div) {\n\tvar divs_expression = expression_div.find('.menu_add_item');\n\n\tfor (var i = 0; i < divs_expression.length; i++) {\n\n\t\tvar temp = $(divs_expression[i]).data('index_add');\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_value')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_operator')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_parentheses')+'
';\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\t$(divs_expression[i]).append(context_menu);\n\n\t\tcontext_menu.dropdown({\n\t on: 'hover',\n\t onChange: function(value, text, $selectedItem) {\n \t\tswitch ($selectedItem.data('option')) {\n \t\t\tcase \"value\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"operator\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, Models.ARITHMETIC_TYPES.plus);\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"parentheses\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, \"(\");\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 2, 0, \")\");\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t }\n \t}\n\t });\n\n\t}\n}\n\n\nfunction addHandlers (command, function_obj, attribution_dom) {\n\n\tattribution_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, attribution_dom)) {\n\t\t\tattribution_dom.fadeOut(400, function() {\n\t\t\t\tattribution_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tattribution_dom.find('.button_refresh_attribution').on('click', function() {\n\t\trenderExpressionElements(command, function_obj, attribution_dom);\n\t});\n}\n\nexport function renderMenuOperations (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected) {\n\n\t/*console.log(\"recebido o seguinte DOM: \");\n\tconsole.log(dom_object);\n\n\tif (dom_object.hasClass('var_attributed')) {\n\t\treturn;\n\t} else {\n\t\tvar hier = dom_object.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass('var_attributed') || $(hier[i]).hasClass('parameters_function_called')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t}\n\n\tdom_object.find('.context_menu_clear').remove();\n\n\n\tvar menu_operations = '
';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '
'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'
';\n }\n menu_operations += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\t\n menu_operations += '
';\n\n menu_operations = $(menu_operations);\n\n dom_object.append(menu_operations);\n\n menu_operations.dropdown({\n \tonChange: function(value, text, $selectedItem) {\n \t\tswitch ($($selectedItem).data('option')) {\n \t\t\tcase \"clear\":\n\t \t\t\t$(dom_object).text('');\n\t\t \t \tVariableValueMenu.renderMenu(command, ref_object, dom_object, function_obj);\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tcreateExpressionAround(command, ref_object, dom_object, function_obj);\n \t\t\t\tmenu_operations.find('.text').text('');\n \t\t}\n }\n });*/\n}\n\nfunction createExpressionAround (command, ref_object, dom_object, function_obj) {\n\t$(' ( ').insertBefore(dom_object);\n\t$(' ) ').insertAfter(dom_object);\n\n\tVariableValueMenu.renderMenu(command, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), dom_object, function_obj);\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_break')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_break')+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, break_dom) {\n\n\tbreak_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, break_dom)) {\n\t\t\tbreak_dom.fadeOut(400, function() {\n\t\t\t\tbreak_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_comment')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\trenderTextComment(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction renderTextComment (command, function_obj, el) {\n\tVariableValueMenu.renderMenu(command, command.comment_text, el.find('.var_value_menu_div'), function_obj, 20);\n}\n\nfunction addHandlers (command, function_obj, comment_dom) {\n\n\tcomment_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, comment_dom)) {\n\t\t\tcomment_dom.fadeOut(400, function() {\n\t\t\t\tcomment_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenuManagement from './variable_value_menu';\n\n\nexport function renderExpression (command, expression, function_obj, initial_el_to_render) {\n\n\texpression.dom_object = initial_el_to_render;\n\n\tif (expression.expression == null || expression.expression.length < 1) {\n\n\t\trenderStartMenu(command, expression, function_obj, initial_el_to_render);\n\n\t} else {\n\t\t\n\t\tvar main_div = $('
');\n\n\t\tswitch (expression.expression.type) {\n\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\trenderLogicExpression(command, expression, expression.expression, function_obj, main_div, initial_el_to_render);\n\t\t\t\tbreak;\n\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\trenderArithmeticExpression(command, expression, expression.expression, function_obj, main_div);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tinitial_el_to_render.append(main_div);\t\n\t\tvar restartMenu = $('
');\n\t\tinitial_el_to_render.append(restartMenu);\t\n\t\trestartMenu.on('click', function(e){\n\t \texpression.expression = null;\n\t \tinitial_el_to_render.empty();\n\t \trenderExpression(command, expression, function_obj, initial_el_to_render);\n\t \t});\n\t}\n}\n\nfunction renderArithmeticOperator (command, all_expression, expression_arithmetic, arithmetic_operator, function_obj, element_to_append) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '>',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than)\n\t },\n\t {\n\t name : '<',\n\t value : Models.ARITHMETIC_COMPARISON.less_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than)\n\t },\n\t {\n\t name : '==',\n\t value : Models.ARITHMETIC_COMPARISON.equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.ARITHMETIC_COMPARISON.not_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '>=',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to)\n\t },\n\t {\n\t name : '<=',\n\t value : Models.ARITHMETIC_COMPARISON.less_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than_or_equals_to)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_arithmetic.operator = value;\n\t }\n\t })\n\t;\n\n\telement_to_append.append(menu_operator);\n}\n\nfunction renderLogicOperator (command, all_expression, expression_logic, logic_operator, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '==',\n\t value : Models.LOGIC_COMPARISON.equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.LOGIC_COMPARISON.not_equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '&&',\n\t value : Models.LOGIC_COMPARISON.and,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.and)\n\t },\n\t {\n\t name : '||',\n\t value : Models.LOGIC_COMPARISON.or,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.or)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \tif ($selectedItem) {\n\t\t \texpression_logic.operator = value;\n\t\t \tif (expression_logic.second_operand == null) {\n\t\t \t\texpression_logic.second_operand = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t \t\tinitial_el_to_render.empty();\n\t\t \t\trenderExpression(command, all_expression, function_obj, initial_el_to_render);\n\t\t \t}\n\t \t}\n\t }\n\t });\n\n\telement_to_append.append(menu_operator);\n\n}\n\n\nfunction renderLogicExpression (command, all_expression, expression_logic, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar exp_el_par_1 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\n\n\tif (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\n\trenderLogicOperator(command, all_expression, expression_logic, expression_logic.operator, function_obj, exp_el_expr_operand, initial_el_to_render);\n\n\telement_to_append.append(exp_el_expr_operand);\n\n\tif (expression_logic.second_operand) {\n\t\tif (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\t\trenderLogicExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else if (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\t\trenderArithmeticExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else {\n\t\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.second_operand, exp_el_expr_el_2, function_obj);\n\t\t}\n\n\t\telement_to_append.append(exp_el_expr_el_2);\n\t}\n\n\telement_to_append.append(exp_el_par_2);\n\n}\n\nfunction renderArithmeticExpression (command, all_expression, expression_arithmetic, function_obj, element_to_append) {\n\n\tvar exp_el_par_1 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\n\n\n\tif (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\tif (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else if (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.second_operand, exp_el_expr_el_2, function_obj);\n\t}\n\n\trenderArithmeticOperator(command, all_expression, expression_arithmetic, expression_arithmetic.operator, function_obj, exp_el_expr_operand);\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\telement_to_append.append(exp_el_expr_operand);\n\telement_to_append.append(exp_el_expr_el_2);\n\telement_to_append.append(exp_el_par_2);\n}\n\nfunction renderStartMenu (command, expression, function_obj, initial_el_to_render) {\n\tvar start_menu = '';\n\tstart_menu += '
'+LocalizedStrings.getUI('expression_menu_select')+'
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)
';\n\tstart_menu += '
';\n\tstart_menu = $(start_menu);\n\n\tstart_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tswitch ($selectedItem.data('exp')) {\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.LogicExpression(false, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tinitial_el_to_render.html('');\n\n\t\t\trenderExpression(command, expression, function_obj, initial_el_to_render);\n \t},\n \tselectOnKeydown: false\n\t});\n\n\tinitial_el_to_render.append(' ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' ');\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as SwitchManagement from './switch';\n\nexport function renderMenu (command, dom_where_render, function_obj, dom_command) {\n\n\tvar menu_div = '
';\n\n\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\n\t} else {\n\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_case')+' ';\n\n\t}\n\n\tmenu_div += '
';\n\n\tmenu_div = $(menu_div);\n \t\n\tdom_where_render.append(menu_div);\n\n\taddHandlers(command, dom_where_render, function_obj, dom_command);\n}\n\nfunction addHandlers (command, dom_where_render, function_obj, dom_command) {\n\n\tdom_where_render.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\t\n\tdom_where_render.find('.menu_commands a').on('click', function(evt){\n\n\t\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\t\t\tif (command.commands_block == null || command.commands_block.length == 0) {\n\n\t\t\t command.commands_block = [];\n\n\t\t\t var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n\t\t\t command.commands_block.push(new_cmd);\n\n\t\t\t CommandsManagement.renderCommand(new_cmd, dom_command.find('.block_commands'), 3, function_obj);\n\n\t\t\t } else {\n\t\t\t CommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t }\n\n\t\t} else {\n\n\t\t\tswitch ($(this).data('command')) {\n\t\t\t\tcase Models.COMMAND_TYPES.break:\n\t\t\t\t\tCommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.COMMAND_TYPES.switchcase:\n\t\t\t\t\taddCaseToSwitch(command, dom_where_render, function_obj, dom_command);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t});\n}\n\nfunction addCaseToSwitch (command, dom_where_render, function_obj, dom_command) {\n\t\n\tif ((command.cases == null)) {\n\t\tcommand.cases = [];\n\t}\n\t\n\tvar sc = new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\n\tcommand.cases.push(sc);\n\n\tSwitchManagement.renderCase(sc, command, function_obj, dom_command.find('.all_cases_div'));\n\n}\n\n\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
'+ LocalizedStrings.getUI('text_command_do') +'
' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10)
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_do') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_command_do_until') + ' (
) ';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tif (command.expression) {\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, dowhiletrue_dom) {\n\n\tdowhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, dowhiletrue_dom)) {\n\t\t\tdowhiletrue_dom.fadeOut(400, function() {\n\t\t\t\tdowhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
funcao()
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.function_called, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, functioncall_dom) {\n\n\tfunctioncall_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, functioncall_dom)) {\n\t\t\tfunctioncall_dom.fadeOut(400, function() {\n\t\t\t\tfunctioncall_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { Types } from \"../types\";\nimport * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport { registerUserEvent, ActionTypes } from \"../../services/userLog\";\nimport WatchJS from \"melanke-watchjs\";\n\nwindow.timer = false;\n\nexport function renderExpression (\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n div_to_render.empty();\n\n WatchJS.unwatch(command, \"expression\");\n WatchJS.watch(\n command,\n \"expression\",\n function () {\n if (window.timer) return;\n const m = div_to_render\n .find(\".single_element_expression\")\n .not(\".mouse_distance\")\n .not(\".add_parentheses\");\n let s = \"\";\n m.each(function (e) {\n if ($(this).hasClass(\"parentheses_in_expression\")) {\n s += $(this).text() + \" \";\n } else {\n s += $(this)\n .find(\".text\")\n .text();\n\n s += $(this)\n .find(\".var_name\")\n .text();\n\n s += $(this)\n .find(\".parameters_function_called\")\n .text();\n\n s += $(this)\n .find(\".value_rendered\")\n .text();\n\n s += \" \";\n }\n });\n if (s) {\n window.timer = true;\n } else {\n return;\n }\n registerUserEvent(\n function_obj.name,\n ActionTypes.CHANGE_COMMAND_EXP,\n command.type,\n \"/\",\n s\n );\n setTimeout(function () {\n window.timer = false;\n }, 200);\n },\n 20,\n true\n );\n\n if (command.type === Models.COMMAND_TYPES.attribution) {\n WatchJS.unwatch(command.variable);\n WatchJS.watch(\n command.variable,\n function () {\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n },\n 0\n );\n\n if (command.variable.content) {\n const types_included = [];\n\n if (\n command.variable.content.type == Types.INTEGER ||\n command.variable.content.type == Types.REAL\n ) {\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.BOOLEAN) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.TEXT) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else {\n console.log(\"NÃO RECONHECI! VEJA: \", command.variable.content.type);\n }\n\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n } else {\n div_to_render.text(\n LocalizedStrings.getUI(\"var_menu_select_var\").toLowerCase()\n );\n }\n } else {\n const types_included = [];\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n if (command.type === Models.COMMAND_TYPES.writer)\n types_included.push(Models.EXPRESSION_TYPES.write_sep);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n }\n\n div_to_render.children(\".mouse_distance\").addClass(\"mouse_distance_hidden\");\n div_to_render.children(\".higher_element\").on(\"mousemove\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"relative\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"1\");\n }\n });\n div_to_render.children(\".higher_element\").on(\"mouseout\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"absolute\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"0\");\n }\n });\n const lixeira = $('
');\n\n div_to_render\n .find(\".single_element_expression\")\n .on(\"mousedown\", function (evt) {\n window.posX = evt.clientX;\n window.posY = evt.clientY;\n });\n\n Sortable.create(div_to_render[0], {\n animation: 100,\n ghostClass: \"ghost\",\n group: {\n name: \"shared\",\n put: false, // Do not allow items to be put into this list\n },\n draggable: \".single_element_expression\",\n sort: false,\n filter: \".not_allowed\",\n\n onStart: function () {\n $(\"body\").append(lixeira);\n lixeira.css(\"display\", \"block\");\n lixeira.css(\"top\", window.posY + 70, \"!important\");\n lixeira.css(\"left\", window.posX - 20, \"!important\");\n },\n onMove: function () {\n lixeira.addClass(\"color_test\");\n },\n onEnd: function () {\n lixeira.remove();\n div_to_render.find(\".ghost\").removeClass(\"ghost\");\n },\n });\n new Sortable(lixeira[0], {\n group: \"shared\",\n animation: 150,\n onAdd: function (evt) {\n lixeira.css(\"display\", \"none\");\n lixeira.find(\".single_element_expression\").remove();\n lixeira.css(\"background-color\", \"\");\n lixeira.remove();\n removeElement(evt, expression_array);\n renderExpression(command, function_obj, div_to_render, expression_array);\n },\n });\n}\n\nfunction removeElement (event, expression_array) {\n const indice = $(event.item).data(\"index\");\n const first = expression_array[0];\n console.log(\"indice: \", indice);\n if (expression_array[indice].type) {\n // if is alone in expression:\n if (expression_array.length == 1) {\n //function_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n expression_array.splice(0, 1);\n } else if (expression_array.length > 1) {\n if (indice > 0 && expression_array[indice - 1].type_op) {\n if (\n indice < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n }\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n if (\n indice - 2 < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice - 1] == \")\"\n ) {\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n if (\n indice - 3 >= 0 &&\n indice - 3 < expression_array.length &&\n expression_array[indice - 3].type_op\n ) {\n expression_array.splice(indice - 3, 1);\n }\n }\n } else if (\n indice < expression_array.length - 1 &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n } else if (\n indice < expression_array.length - 1 &&\n indice > 0 &&\n expression_array[indice - 1] == \"(\" &&\n expression_array[indice + 1] == \")\"\n ) {\n if (indice > 1 && expression_array[indice - 2].type_op) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n } else if (\n indice < expression_array.length - 2 &&\n expression_array[indice + 2].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n } else {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n }\n }\n }\n } else if (expression_array[indice].type_op) {\n // iVProg doesn't support operator remove\n } else {\n let opening = -1;\n let closing = -1;\n\n if (expression_array[indice] == \"(\") {\n opening = indice;\n for (var i = indice + 1; i < expression_array.length; i++) {\n if (expression_array[i] == \")\") {\n closing = i;\n break;\n }\n }\n } else {\n closing = indice;\n for (var i = indice - 1; i >= 0; i--) {\n if (expression_array[i] == \"(\") {\n opening = i;\n break;\n }\n }\n }\n\n if (expression_array[opening + 1].type_op) {\n expression_array.splice(closing, 1);\n expression_array.splice(opening + 1, 1);\n expression_array.splice(opening, 1);\n } else {\n expression_array.splice(closing, 1);\n expression_array.splice(opening, 1);\n }\n }\n // if expression is empty, add a new var value:\n if (expression_array.length == 0) {\n expression_array.push(\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n if (first != expression_array[0] && expression_array[0].type_op) {\n expression_array.splice(0, 1);\n }\n}\n\nfunction renderElements (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n /*if (expression_array.length > 0) {\n\t\tif (!expression_array[0].type_op) {\n\t\t\trenderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n\t\t}\n\t}*/\n\n let i = 0;\n for (i = 0; i < expression_array.length; i++) {\n if (expression_array[i].type == \"var_value\") {\n const div_temp = $(\n '
'\n );\n if (i == 0) {\n if (expression_array.length > 0 && !expression_array[0].type_op) {\n //renderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n }\n }\n VariableValueMenuManagement.renderMenu(\n command,\n expression_array[i],\n div_temp,\n function_obj\n );\n div_to_render.append(div_temp);\n } else if (expression_array[i] == \"(\" || expression_array[i] == \")\") {\n if (expression_array[i] == \")\") {\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i\n );\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n } else if (\n expression_array[i] == \"(\" &&\n !expression_array[i + 1].type_op\n ) {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n renderStartAddOperator(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i + 1\n );\n } else {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n }\n } else {\n if (i == 0) {\n console.log(\"NEGAÇÃO NO PRIMEIRO ELEMENTO\");\n } else if (expression_array[i - 1] == \"(\") {\n console.log(\"NEGAÇÃO APÓS O PARÊNTESES\");\n }\n renderOperatorMenu(\n command,\n function_obj,\n div_to_render,\n expression_array[i],\n types_included,\n i,\n expression_array\n );\n }\n }\n\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i,\n true\n );\n\n renderAddParenthesis(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n}\n\nwindow.parentheses_activate = false;\nwindow.open_or_close = null;\nfunction renderAddParenthesis (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n const addParentheses = $(\n '
'\n );\n div_to_render.append(addParentheses);\n addParentheses.popup({\n content: \"Adicionar parênteses\",\n delay: {\n show: 750,\n hide: 0,\n },\n });\n\n addParentheses.on(\"click\", function (mouse_event) {\n // verificar se já está ativado\n if (window.parentheses_activate) {\n return;\n }\n\n div_to_render.find(\".usepointer\").off(\"click\");\n\n window.parentheses_activate = true;\n\n window.open_or_close = \"open\";\n\n div_to_render.find(\".dropdown\").addClass(\"disabled\");\n\n div_to_render.find(\".ghost_element\").addClass(\"temp_class\");\n div_to_render.find(\".ghost_element\").removeClass(\"ghost_element\");\n\n const floatingObject = $('
(
');\n floatingObject.draggable().appendTo(\"body\");\n floatingObject.css(\"position\", \"absolute\");\n mouse_event.type = \"mousedown.draggable\";\n mouse_event.target = floatingObject[0];\n floatingObject.css(\"left\", mouse_event.pageX + 10);\n floatingObject.css(\"top\", mouse_event.pageY + 10);\n floatingObject.trigger(mouse_event);\n\n div_to_render.on(\"mousemove\", function (evt) {\n let actual_target = null;\n if ($(evt.target).hasClass(\"single_element_expression\")) {\n actual_target = $(evt.target);\n } else {\n actual_target = $(evt.target).closest(\".single_element_expression\");\n }\n\n if (\n $(evt.target).hasClass(\"temp_class\") ||\n actual_target.length < 1 ||\n actual_target.hasClass(\"add_parentheses\") ||\n actual_target.hasClass(\"rendered_parentheses\") ||\n $(evt.target).hasClass(\"expression_elements\")\n ) {\n return;\n }\n renderGhostParentheses(\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n });\n\n div_to_render.on(\"mouseleave\", function () {\n /*window.open_parentheses.remove();\n\t\t\twindow.close_parentheses.remove();*/\n });\n\n let floating;\n\n $(\"body\").on(\"mouseup\", function (evt) {\n if (window.open_or_close == \"open\") {\n window.open_or_close = \"close\";\n\n floatingObject.remove();\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n if (!comando_que_esta.is(comando_certo)) {\n window.parentheses_activate = false;\n div_to_render.find(\".temp_class\").addClass(\"ghost_element\");\n div_to_render.find(\".temp_class\").removeClass(\"temp_class\");\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n window.open_parentheses.remove();\n window.close_parentheses.remove();\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n\n return;\n }\n\n window.open_parentheses.addClass(\"parentheses_fixed\");\n\n floating = $('
)
');\n floating.draggable().appendTo(\"body\");\n floating.css(\"position\", \"absolute\");\n floating.css(\"left\", evt.pageX + 10);\n floating.css(\"top\", evt.pageY + 10);\n\n $(\"body\").on(\"mousemove\", function (evts) {\n floating.css(\"left\", evts.pageX + 10);\n floating.css(\"top\", evts.pageY + 10);\n });\n } else {\n floating.remove();\n\n window.open_parentheses.removeClass(\"parentheses_fixed\");\n\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n\n setTimeout(function () {\n window.parentheses_activate = false;\n }, 50);\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n let is_correct = false;\n if (comando_que_esta.is(comando_certo)) {\n is_correct = true;\n }\n\n if (is_correct) {\n expression_array.splice(window.inserir_open, 0, \"(\");\n expression_array.splice(window.inserir_close, 0, \")\");\n }\n\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n }\n });\n });\n}\n\nwindow.open_parentheses = $('
(
');\nwindow.close_parentheses = $('
)
');\nwindow.inserir_open = -1;\nwindow.inserir_close = -1;\nfunction renderGhostParentheses (\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n /*window.open_parentheses.remove();\n\twindow.close_parentheses.remove();*/\n\n const index_in_array = actual_target.data(\"index\");\n\n if (\n expression_array[index_in_array] == \"(\" ||\n expression_array[index_in_array] == \")\"\n ) {\n return;\n }\n\n if (window.open_or_close == \"close\") {\n if (index_in_array < window.inserir_open) {\n return;\n }\n }\n\n // Tratando a situação quando é na primeira posição:\n\n if (index_in_array == 0) {\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n /*if (expression_array.length == 1) {\n\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\twindow.close_parentheses.insertAfter(actual_target);\n\t\t\t\t\twindow.inserir_close = index_in_array + 2;\n\t\t\t\t}*/\n\n //} else {\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 0; i < expression_array.length; i++) {\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n //}\n } else if (expression_array[index_in_array].type_op) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 1; i < expression_array.length; i++) {\n // $('.slide-link[data-slide=\"0\"]')\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n }\n return;\n }\n\n // Tratando quando não é no índice 0:\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(actual_target);\n window.inserir_close = index_in_array + 2;\n }\n return;\n }\n\n if (expression_array[index_in_array].type_op) {\n // buscar para a esquerda primeiro:\n if (expression_array[index_in_array - 1] == \"(\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n } else if (expression_array[index_in_array - 1] == \")\") {\n // buscar a abertura\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array - 1; j >= 0; j--) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_closed > 0) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_open = j;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array - 1].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array - 1) +\n '\"]'\n )\n );\n window.inserir_open = index_in_array - 1;\n }\n }\n\n // buscar para a direita agora:\n if (expression_array[index_in_array + 1] == \"(\") {\n // buscar o fechamento:\n\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array + 1; j < expression_array.length; j++) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_close = j + 2;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array + 1].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array + 1) +\n '\"]'\n )\n );\n window.inserir_close = index_in_array + 3;\n }\n }\n }\n}\n\nfunction renderParenthesis (\n div_to_render,\n expression_content,\n command,\n function_obj,\n position,\n expression_array\n) {\n const ghost_parenthesis = $(\n '
' +\n expression_content +\n \"
\"\n );\n div_to_render.append(ghost_parenthesis);\n}\n\nfunction renderStartAddOperator (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position\n) {\n let menu_final =\n '
+
';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '
'\n );\n div_temp.append(menu_final);\n const div_higher = $('
');\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.minus);\n\n div_temp.on(\"click\", function () {\n if (!window.open_or_close) {\n const sera = position;\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n console.log(\"p1\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.minus\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0\n ) {\n console.log(\"p2\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n console.log(\"p3\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n }\n });\n}\n\nfunction renderFinalAddElements (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position,\n is_last = false\n) {\n let menu_final =\n '
+
';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\n\n menu_final = $(menu_final);\n const div_temp = $('
');\n const div_higher = $('
');\n\n const button = $(\n ''\n );\n div_temp.append(button);\n\n if (!is_last) {\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n //div_temp.append(menu_final);\n div_temp.css(\"opacity\", \"0\", \"!important\");\n } else {\n div_temp.removeClass(\"mouse_distance\");\n div_temp.css(\"opacity\", \"1\", \"!important\");\n //div_temp.append(menu_final);\n div_to_render.append(div_temp);\n }\n\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.plus);\n\n div_temp.on(\"click\", function () {\n const sera = position;\n\n if (expression_array[sera] == \")\" && expression_array[sera - 1] == \"(\") {\n expression_array.splice(\n sera,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n renderExpression(command, function_obj, div_to_render, expression_array);\n return;\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.plus\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n });\n}\n\nfunction renderOperatorMenu (\n command,\n function_obj,\n div_to_render,\n expression_element,\n types_included,\n position,\n expression_array\n) {\n let menu_final =\n '
+
';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.write_sep) >= 0) {\n menu_final += getSeparator();\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '
'\n );\n div_temp.append(menu_final);\n div_to_render.append(div_temp);\n menu_final.dropdown({\n onChange: function (_value, _text, $selectedItem) {\n expression_element.item = $selectedItem.data(\"value\");\n expression_element.type_op = $selectedItem.data(\"type\");\n },\n });\n\n menu_final.dropdown(\"set selected\", expression_element.item);\n}\n\nfunction getArithmeticOperators () {\n let arithmetic_operators;\n arithmetic_operators =\n '
+
';\n arithmetic_operators +=\n '
-
';\n arithmetic_operators +=\n '
*
';\n arithmetic_operators +=\n '
/
';\n arithmetic_operators +=\n '
%
';\n return arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n let logic_operators;\n logic_operators =\n '
==
';\n logic_operators +=\n '
!=
';\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_and\") +\n \"
\";\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_or\") +\n \"
\";\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_not\") +\n \"
\";\n return logic_operators;\n}\n\nfunction getRelationalOperators () {\n let relational_operators;\n relational_operators =\n '
>
';\n relational_operators +=\n '
<
';\n relational_operators +=\n '
==
';\n relational_operators +=\n '
!=
';\n relational_operators +=\n '
>=
';\n relational_operators +=\n '
<=
';\n return relational_operators;\n}\n\nfunction getSeparator () {\n return `
,
`;\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
if (x < 1) { }
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_if') + '';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '
';\n \tret += '
';\n\tret += '
' + LocalizedStrings.getUI('text_else') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\tel.find('.data_block_if').data('command', command);\n\tel.find('.data_block_else').data('command', command);\n\tel.find('.commands_if').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.commands_if')[0]), 3, function_obj);\n\t\t}\n\t}\n\tif (command.commands_else) {\n\t\tfor (var j = 0; j < command.commands_else.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_else[j], $(el.find('.commands_else')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, iftrue_dom) {\n\n\tiftrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, iftrue_dom)) {\n\t\t\tiftrue_dom.fadeOut(400, function() {\n\t\t\t\tiftrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_command_read')+' var
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '
'+LocalizedStrings.getUI('text_command_read')+' (
)
';\n\t\n\tel = $(el);\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, reader_dom) {\n\treader_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, reader_dom)) {\n\t\t\treader_dom.fadeOut(400, function() {\n\t\t\t\treader_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
repita_para i de 0 ate 10 passo 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `
\n\t\t\n\t\t\n\t\t
${LocalizedStrings.getUI('text_for')}\n\t\t
\n\t\t
\n\t\t\n\t\t
\n\t\t
\n\t\t\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} \n\t\t
\n\t\t
\n\t\t
\n\t\t
'`;\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\n\t\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.var_attribution, el.find('.variable_attribution'), function_obj);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression2, function_obj, el.find('.conditional_expression'));\n\n\tVariableValueMenu.renderMenu(command, command.expression2, el.find('.conditional_expression'), function_obj);\t\n\t//GenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression2);\n\n\t//VariableValueMenu.renderMenu(command, command.var_incrementation, el.find('.incrementation_variable'), function_obj);\t\n\t//angle double right\n\tif (!command.expression1) {\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\t}\n\n\tel.find('.text_receives').text(LocalizedStrings.getUI(\"text_for_from\"));\n\tVariableValueMenu.renderMenu(command, command.expression1, el.find('.var_value_expression'), function_obj);\n\n\tif (!command.expression3) {\n\t\tel.find('.pass_button').html('');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\t\t/*var exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;*/\n\t} else {\n\t\tel.find('.pass_button').html('');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\n\t\trenderOperator(command, function_obj, el.find('.operator'), command.expression3, 1);\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], el.find('.second_operand'), function_obj);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction togglePasso (command) {\n\tif (!command.expression3) {\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;\n\t} else {\n\t\tcommand.expression3 = null;\n\t}\n\trenderAlgorithm();\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\tif (!command.expression3) {\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[command.var_attribution,\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\t\tcommand.expression3 = exp;\n\t\t\tcommand.var_incrementation = command.var_attribution;\n\n\t\t\tvar cond_exp = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tcommand.var_attribution, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\n\t\t\tcommand.expression2.expression = cond_exp;\n\t\t}\n\n\t\tdom_object.parent().find('.text_receives').text('de');\n\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\n\t\tdom_object.parent().find('.var_value_expression').empty();\n\t\t\n\t\tVariableValueMenu.renderMenu(command, command.expression1, dom_object.parent().find('.var_value_expression'), function_obj);\n\n\t\trenderAlgorithm();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\tdom_object.parent().find('.text_inc_receives').text('de');\n\t\t\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[0], dom_object.parent().find('.first_operand'), function_obj);\n\n\t\trenderOperator(command, function_obj, dom_object.parent().find('.operator'), command.expression3, 1);\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], dom_object.parent().find('.second_operand'), function_obj);\t\t\n\n\t}\n\n}\n\nexport function manageClearExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\t$(dom_object).parent().find('.text_receives').text('');\n\t\tcommand.expression1 = null;\n\t\t$(dom_object).parent().find('.var_value_expression').empty();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\t$(dom_object).parent().find('.text_inc_receives').text('');\n\t\tcommand.expression3 = null;\n\t\t$(dom_object).parent().find('.first_operand').empty();\n\t\t$(dom_object).parent().find('.operator').empty();\n\t\t$(dom_object).parent().find('.second_operand').empty();\n\t}\n}\n\nfunction addHandlers (command, function_obj, repeatNtimes_dom) {\n\n\trepeatNtimes_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, repeatNtimes_dom)) {\n\t\t\trepeatNtimes_dom.fadeOut(400, function() {\n\t\t\t\trepeatNtimes_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '+',\n\t value : Models.ARITHMETIC_TYPES.plus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.plus)\n\t },\n\t {\n\t name : '-',\n\t value : Models.ARITHMETIC_TYPES.minus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.minus)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_element.itens[index_op] = value;\n\t }\n\t });\n\ttemp_op.append(menu_operator);\n}","import { Types } from '../types';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as Models from '../ivprog_elements';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_return')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_return')+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tif (function_obj.return_type != Types.VOID) {\n\t\tif (!command.variable_value_menu) {\n\t\t\tcommand.variable_value_menu = [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)];\n\t\t}\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.variable_value_menu);\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, return_dom)) {\n\t\t\treturn_dom.fadeOut(400, function() {\n\t\t\t\treturn_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_code_switch')+' ( x ) {
'+LocalizedStrings.getUI('text_code_case')+' 1:
'+LocalizedStrings.getUI('text_code_case')+' 2:
}
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
'+LocalizedStrings.getUI('text_code_switch')+' (
)
';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.variable_to_switch'), function_obj);\n\n\tif (command.cases) {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\trenderCase(command.cases[i], command, function_obj, el.find('.all_cases_div'));\n\t\t}\n\t}\n\n\treturn el;\n}\n\nexport function renderCase (switchcase, command, function_obj, el) {\n\n\tvar casediv = $('
'+LocalizedStrings.getUI('text_code_case')+'
:
');\n\n\tVariableValueMenu.renderMenu(command, switchcase.variable_value_menu, casediv.find('.variable_case'), function_obj);\n\n\tcasediv.data('switchcase', switchcase);\n\tcasediv.find('.case_commands_block').data('switchcase', switchcase);\n\n\tel.append(casediv);\n\n\tif (switchcase.commands_block) {\n\t\tfor (var j = 0; j < switchcase.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(switchcase.commands_block[j], $(casediv.find('.case_commands_block')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tcasediv.find('.button_remove_command').on('click', function() {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\tif (switchcase == command.cases[i]) {\n\t\t\t\tdelete command.cases[i];\n\t\t\t\tcommand.cases.splice(i, 1);\n\t\t\t\tcasediv.remove();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n}\n\nfunction addHandlers (command, function_obj, switch_dom) {\n\n\tswitch_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, switch_dom)) {\n\t\t\tswitch_dom.fadeOut(400, function() {\n\t\t\t\tswitch_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as AttribuitionsManagement from './attribution';\nimport * as RepeatNTimesManagement from './repeatNtimes';\n\nexport const VAR_OR_VALUE_TYPES = Object.freeze({only_variable: 1, only_value: 2, only_function: 3, variable_and_function: 4, variable_and_value_opt: 5,\n\tvalue_and_function: 6, all: 7});\n\nexport function renderMenu (command, ref_object, dom_object, function_obj, size_field = 2, expression_element) {\n\t// Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros\n\t// Caso não possua, tem que adicionar as variáveis que servirão de parâmetros:\n\tif (ref_object.function_called) {\n\t\tif (ref_object.function_called.parameters_list) {\n\n\t\t\twhile (ref_object.function_called.parameters_list.length != ref_object.parameters_list.length) {\n\t\t\t\tif (ref_object.parameters_list.length > ref_object.function_called.parameters_list.length) {\n\t\t\t\t\tref_object.parameters_list.pop();\n\t\t\t\t} else {\n\t\t\t\t\tref_object.parameters_list.push(new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvar menu_var_or_value = '
';\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n\n\t\tmenu_var_or_value = '
';\n\t\tmenu_var_or_value += '
';\n\t}\n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_value_opt) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\t\t\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('variable');\n\t\tmenu_var_or_value += '
';\n\t\tmenu_var_or_value += '
';\n\t}\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n\t\tmenu_var_or_value = '';\n\t}\n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_value_opt) \n\t\t|| (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('text_value')+'
';\n\n\t}\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n\n\t\tmenu_var_or_value = '
';\n\t\tmenu_var_or_value += '
';\n\t} \n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function) \n\t\t|| (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\t\t\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('btn_function');\n\t\tmenu_var_or_value += '
';\n\t\tmenu_var_or_value += '
';\n\n/*\t\tif (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tmenu_var_or_value += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tmenu_var_or_value += '
';\n\t\t\tmenu_var_or_value += '
EXP OP EXP
';\n\t\t\tmenu_var_or_value += '
OP EXP
';\n\t\t\tmenu_var_or_value += '
( EXP )
';\n\t\t\tmenu_var_or_value += '
';\n\t\t}*/\n\t}\n\n menu_var_or_value += '
';\n\n menu_var_or_value = $(menu_var_or_value);\n\n dom_object.append(menu_var_or_value);\n \n ref_object.dom_object = menu_var_or_value;\n\n addHandlers(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element);\n\n addVariablesToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n addFunctionsToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n\taddIVProgFunctionsToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n if (ref_object.content || ref_object.function_called) {\n \tif (ref_object.content) {\n \t\t// Verificar se a variável ainda existe:\n \t\tvar variable_fun = isVarInProgram(ref_object.content, function_obj);\n \t\tif (variable_fun) {\n \t\t\tref_object.content = variable_fun;\n \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n\t \t} else {\n\t \t\tif (ref_object.content && ref_object.content.type) {\n\t \t\t\tref_object.content = null;\n\t \t\t\tappendSelectText(ref_object, menu_var_or_value);\n\t \t\t} else {\n\t \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n\t \t\t}\n\t \t}\n \t} else if (ref_object.function_called) {\n \t\t// Verificar se a função ainda existe:\n \t\tvar ret_function = isFunctionInProgram(ref_object.function_called);\n \t\tif (ret_function) {\n \t\t\tref_object.function_called = ret_function;\n \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n \t\t} else {\n \t\t\tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n \t\t\tappendSelectText(ref_object, menu_var_or_value);\n \t\t}\n \t}\n\n } else {\n \tappendSelectText(ref_object, menu_var_or_value);\n }\n\n}\n\nfunction appendSelectText (ref_object, menu_var_or_value) {\n\tswitch(ref_object.variable_and_value) {\n\t\tcase VAR_OR_VALUE_TYPES.only_variable:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_var')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.all:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_all')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.variable_and_function:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_all')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.only_function:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_function')+'');\n\t\t\tbreak;\n\t}\n}\n\nfunction isFunctionInProgram (function_called_obj) {\n\tif (function_called_obj.name) {\n\t\tif (window.program_obj.functions) {\n\t\t\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\t\t\tif (window.program_obj.functions[i] == function_called_obj) {\n\t\t\t\t\treturn window.program_obj.functions[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\t\t\tif (window.program_obj.functions[i].name == function_called_obj.name) {\n\t\t\t\t\treturn window.program_obj.functions[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (function_called_obj.identifier) {\n\t\tfor (var i = 0; i < window.system_functions.length; i++) {\n\t\t\tif (window.system_functions[i].identifier == function_called_obj.identifier) {\n\t\t\t\treturn window.system_functions[i];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n}\n\nfunction isVarInProgram (var_obj, function_obj) {\n\t// Verify in locals:\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i] == var_obj) {\n\t\t\t\treturn function_obj.variables_list[i];\n\t\t\t}\n\t\t}\n\t}\n\t// Verify in parameters:\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i] == var_obj) {\n\t\t\t\treturn function_obj.parameters_list[i];\n\t\t\t}\n\t\t}\n\t}\n\t// Verify in globals:\n\tif (window.program_obj.globals) {\n\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\tif (window.program_obj.globals[i] == var_obj) {\n\t\t\t\treturn window.program_obj.globals[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t// If not found, verify if the reference was lost\n\tif (var_obj) {\n\t\tif (function_obj.variables_list) {\n\t\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\t\tif (function_obj.variables_list[i].name == var_obj.name) {\n\t\t\t\t\treturn function_obj.variables_list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (function_obj.parameters_list) {\n\t\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\t\tif (function_obj.parameters_list[i].name == var_obj.name) {\n\t\t\t\t\treturn function_obj.parameters_list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (window.program_obj.globals) {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tif (window.program_obj.globals[i].name == var_obj.name) {\n\t\t\t\t\treturn window.program_obj.globals[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction renderPreviousContent (function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element) {\n\n\t\n\tif (ref_object.function_called) {\n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t} else if (ref_object.content.type) { \n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t} else {\n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t}\n}\n\nfunction variableValueMenuCode (command, variable_obj, dom_object, function_obj, menu_var_or_value, expression_element) {\n\t\n\tif (variable_obj.content || variable_obj.function_called) {\n \t// Verificar se a variável ainda existe:\n \tvar var_fun = isVarInProgram(variable_obj.content, function_obj);\n\n \tif (var_fun) {\n\t \tvariable_obj.content = var_fun;\n \t} else {\n \t\tif (variable_obj.content && variable_obj.content.type) {\n \t\t\tvariable_obj.content = null;\n \t\t\tappendSelectText(variable_obj, menu_var_or_value);\n \t\t}\n \t}\n } else {\n \tappendSelectText(variable_obj, menu_var_or_value);\n }\n\n\tif (variable_obj.content == null && variable_obj.function_called == null) {\n\t\trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\treturn;\n\t}\n\n\tvar ret = '';\n\tif (variable_obj.function_called) {\n\n\t\tif (variable_obj.function_called.parameters_list == null || variable_obj.function_called.length == 0) {\n\n\t\t\tmenu_var_or_value.find('.text').text(' ');\n\t\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\t\tvar parameters_menu;\n\t\t\t\n\t\t\tif (variable_obj.function_called.name) {\n\t\t\t\tparameters_menu = '
'+variable_obj.function_called.name+' ( ';\n\t\t\t} else {\n\t\t\t\tparameters_menu = '
'+ LocalizedStrings.translateInternalFunction(variable_obj.function_called.identifier, variable_obj.function_called.category)+' ( ';\n\t\t\t}\n\n\t\t\tparameters_menu += ' )
';\n\n\t\t\tparameters_menu = $(parameters_menu);\n\n\t\t\tdom_object.append(parameters_menu);\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t console.log('S1');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP1');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t\t \tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\t\t} else {\n\n\t\t\tmenu_var_or_value.find('.text').text(' ');\n\t\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\t\tvar parameters_menu;\n\n\t\t\tif (variable_obj.function_called.name) {\n\t\t\t\tparameters_menu = '
'+variable_obj.function_called.name+' ( ';\n\t\t\t} else {\n\t\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(variable_obj.function_called.identifier, variable_obj.function_called.category)+' ( ';\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < variable_obj.function_called.parameters_list.length; j++) {\n\t\t\t\tparameters_menu += '
';\n\t\t\t\tif ((j + 1) != variable_obj.function_called.parameters_list.length) {\n\t\t\t\t\tparameters_menu += ' , ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tparameters_menu += ' )
';\n\n\t\t\tparameters_menu = $(parameters_menu);\n\n\t\t\tdom_object.append(parameters_menu);\n\n\t\t\tfor (var j = 0; j < variable_obj.function_called.parameters_list.length; j++) {\n\t\t\t\trenderMenu(command, variable_obj.parameters_list[j], parameters_menu.find('.parameter_'+j), function_obj, 2, expression_element);\n\t\t\t}\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tcontext_menu.insertAfter( parameters_menu );\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S2');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP2');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t\t \tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\t\t}\n\n\n\t} else if (variable_obj.content.type) {\n\n\t\tvar variable_render = \"\";\n\n\t\tif (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += ' [
]';\n\t\t\t\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S3');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP3');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t\tif (!variable_obj.column) {\n\t\t\t\tvariable_obj.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\n\t\t\tvariableValueMenuCode(command, variable_obj.column, $(variable_render.find('.column_container')), function_obj, menu_var_or_value, expression_element);\n\n\t\t} else if (variable_obj.content.dimensions == 2 && variable_obj.dimensions != 2) {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += ' [
]';\n\t\t\tvariable_render += ' [
] ';\n\t\t\t\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S4');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP4');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t\tif (!variable_obj.column) {\n\t\t\t\tvariable_obj.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\t\t\tif (!variable_obj.row) {\n\t\t\t\tvariable_obj.row = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\n\t\t\tvariableValueMenuCode(command, variable_obj.row, $(variable_render.find('.row_container')), function_obj, menu_var_or_value, expression_element);\n\t\t\tvariableValueMenuCode(command, variable_obj.column, $(variable_render.find('.column_container')), function_obj, menu_var_or_value, expression_element);\n\n\t\t} else {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n\t\t\t\tconsole.log('dom_object6');\n\t\t\t\tconsole.log(dom_object);\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S5');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP5');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t}\n\n\t} else {\n\n\t\tvar variable_render = '
'+variable_obj.content+'';\n\t\tvariable_render += '
';\n\n\t\tvariable_render = $(variable_render);\n\n\t\tdom_object.append(variable_render);\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tif (variable_obj.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\t\tcontext_menu.insertAfter( variable_render );\n\t\t}\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S6');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP6');\n\t\t \tdom_object.text('');\n\n \t\t\t\tvariable_obj.content = null;\n\t\t\t variable_obj.row = null;\n\t\t\t variable_obj.column = null;\n\n\t\t \tdelete variable_obj.function_called;\n\t\t \tdelete variable_obj.parameters_list;\n\n\t\t \tdom_object.find('.value_rendered').remove();\n\t\t\t\tdom_object.find('.context_menu_clear').remove();\n\t\t\t\tdom_object.find('.width-dynamic-minus').remove();\n\n\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\n\t\tvariable_render.on('click', function(e) {\n\t\t\tvariable_render.remove();\n\t\t\tvariable_render.empty();\n\t\t\tvariable_render.remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, variable_obj, dom_object, menu_var_or_value, function_obj, expression_element);\n\t\t});\n\t}\n}\n\nfunction addIVProgFunctionsToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\tvar sub_menu = menu_var_or_value.find('.menu_only_functions');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_header_ivprog_functions')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_math')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_text')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_array')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_conversion')+'
');\n\n\t// Insert Math functions:\n\tfor (var i = 0; i < window.system_functions.length; i++) {\n\t\tvar t = $('
');\n\t\tt.data('function_reference', window.system_functions[i]);\n\t\tt.data('option', VAR_OR_VALUE_TYPES.only_function);\n\t\tt.text(LocalizedStrings.translateInternalFunction(window.system_functions[i].identifier));\n\t\t\n\t\tswitch(window.system_functions[i].category) {\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.math:\n\t\t\t\tsub_menu.find('.menu_math_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.text:\n\t\t\t\tsub_menu.find('.menu_text_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement:\n\t\t\t\tsub_menu.find('.menu_arrangement_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion:\n\t\t\t\tsub_menu.find('.menu_conversion_functions').append(t);\n\t\t\t\tbreak;\n\t\t}\t\n\t}\n}\n\nfunction addFunctionsToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\tvar sub_menu = menu_var_or_value.find('.menu_only_functions');\n\tsub_menu.text('');\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tvar temp = $('
' + window.program_obj.functions[i].name + '
');\n\t\ttemp.data('function_reference', window.program_obj.functions[i]);\n\t\tsub_menu.append(temp);\n\t}\n}\n\nfunction addVariablesToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\n\tvar sub_menu = menu_var_or_value.find('.menu_only_vars');\n\tsub_menu.text('');\n\tvar is_there = false;\n\n\tif (window.program_obj.globals) {\n\n\t\tif (ref_object.include_constant) {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tvar temp = $('
' + window.program_obj.globals[i].name + '
');\n\t\t\t\ttemp.data('variable_reference', window.program_obj.globals[i]);\n\t\t\t\tsub_menu.append(temp);\n\t\t\t\tis_there = true;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tif (!window.program_obj.globals[i].is_constant) {\n\t\t\t\t\tvar temp = $('
' + window.program_obj.globals[i].name + '
');\n\t\t\t\t\ttemp.data('variable_reference', window.program_obj.globals[i]);\n\t\t\t\t\tsub_menu.append(temp);\n\t\t\t\t\tis_there = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tvar temp = $('
' + function_obj.parameters_list[i].name + '
');\n\t\t\ttemp.data('variable_reference', function_obj.parameters_list[i]);\n\t\t\tsub_menu.append(temp);\n\t\t\tis_there = true;\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tvar temp = $('
' + function_obj.variables_list[i].name + '
');\n\t\t\ttemp.data('variable_reference', function_obj.variables_list[i]);\n\t\t\tsub_menu.append(temp);\n\t\t\tis_there = true;\n\t\t}\n\t}\n\tif (!is_there) {\n\t\tsub_menu.append($('
'+LocalizedStrings.getUI('text_no_variable')+'
'));\n\t\tsub_menu.append($('
'+LocalizedStrings.getUI('text_no_variable_instruction')+'
'));\n\t}\n\n}\n\nfunction addHandlers (command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element) {\n\n\tif (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\tmenu_var_or_value.dropdown({\n\t\t onChange: function(value, text, $selectedItem) {\n\t\t \tconsole.log('S7');\n\t\t \tdom_object.find('.var_name').remove();\n\t\t switch ($selectedItem.data('option')) {\n\t\t \tcase VAR_OR_VALUE_TYPES.only_function:\n\t\t \t\topenInputToFunction(command, ref_object, dom_object, menu_var_or_value, function_obj, $($selectedItem).data('function_reference'), expression_element);\n\t\t \t\tbreak;\n\n\t\t \tcase VAR_OR_VALUE_TYPES.only_value:\n\t\t \t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element);\n\t\t \t\tbreak;\n\n\t\t \tcase VAR_OR_VALUE_TYPES.only_variable:\n\t\t \t\topenInputToVariable(command, ref_object, dom_object, menu_var_or_value, function_obj, $($selectedItem).data('variable_reference'), expression_element);\n\t\t \t\tbreak;\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\n\t\t if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n\t\t \tRepeatNTimesManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t });\n\t}\n\n\tdom_object.find('.width-dynamic').on('input', function() {\n\t var inputWidth = $(this).textWidth()+10;\n\t $(this).focus();\n\n\t var tmpStr = $(this).val();\n\t\t$(this).val('');\n\t\t$(this).val(tmpStr);\n\n\t $(this).css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\n\tif (command.type == Models.COMMAND_TYPES.comment) {\n\t\tdom_object.parent().on('click', function(e) {\n\t\t\tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.find('.value_rendered').empty();\n\t\t\tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t\t});\n\t}\n\t\n}\n\nfunction openInputToFunction (command, ref_object, dom_object, menu_var_or_value, function_obj, function_selected, expression_element) {\n\t\n\tref_object.function_called = function_selected;\n\tref_object.parameters_list = [];\n\n\n\tif (function_selected.parameters_list != null && function_selected.parameters_list.length > 0) {\n\n\t\tmenu_var_or_value.find('.text').text(' ');\n\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\tvar parameters_menu;\n\t\tif (function_selected.name) {\n\t\t\tparameters_menu = '
'+function_selected.name+' ( ';\n\t\t} else {\n\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(function_selected.identifier, function_selected.category)+' ( ';\n\t\t}\n\t\tfor (var j = 0; j < function_selected.parameters_list.length; j++) {\n\t\t\tparameters_menu += '
';\n\t\t\tif ((j + 1) != function_selected.parameters_list.length) {\n\t\t\t\tparameters_menu += ' , ';\n\t\t\t}\n\t\t}\n\t\tparameters_menu += ' )
';\n\n\t\tparameters_menu = $(parameters_menu);\n\n\t\tdom_object.append(parameters_menu);\n\n\t\tfor (var j = 0; j < function_selected.parameters_list.length; j++) {\n\t\t\tvar temp;\n\t\t\tif (function_selected.parameters_list[j].dimensions > 0) {\n\t\t\t\ttemp = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, function_selected.parameters_list[j].dimensions);\n\t\t\t} else {\n\t\t\t\ttemp = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\t\t\tref_object.parameters_list.push(temp);\n\t\t\trenderMenu(command, temp, parameters_menu.find('.parameter_'+j), function_obj, 2, expression_element);\n\t\t}\n\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S8');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP7');\n\t\t \tdom_object.text('');\n\n\t\t \tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n\n\t\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\n\t} else {\n\t\tmenu_var_or_value.find('.text').text(' ');\n\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\tvar parameters_menu;\n\n\t\tif (function_selected.name) {\n\t\t\tparameters_menu = '
'+function_selected.name+' ( ';\n\t\t} else {\n\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(function_selected.identifier, function_selected.category)+' ( ';\n\t\t}\n\t\t\n\t\tparameters_menu += ' )
';\n\n\t\tparameters_menu = $(parameters_menu);\n\n\t\tdom_object.append(parameters_menu);\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S9');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP8');\n\t\t \tdom_object.text('');\n\n\t\t \tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n\n\t\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\t}\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n\t}*/\n}\n\nfunction openInputToVariable (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected, expression_element) {\n\t\n\tref_object.content = variable_selected;\n\n\tmenu_var_or_value.find('.text').text(' ');\n\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\tvar variable_render = '
'+variable_selected.name+'';\n\n\tif (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n\t\tvariable_render += ' [
]';\n\t}\n\tif (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n\t\tvariable_render += ' [
] ';\n\t\tvariable_render += ' [
]';\n\t}\n\n\n\tvariable_render += '
';\n\n\tvariable_render = $(variable_render);\n\n\tdom_object.append(variable_render);\n\n\tif (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n\t\tref_object.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.column, variable_render.find('.column_container'), function_obj, 2, expression_element);\n\t}\n\tif (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n\t\tref_object.row = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.row, variable_render.find('.row_container'), function_obj, 2, expression_element);\n\n\t\tref_object.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.column, variable_render.find('.column_container'), function_obj, 2, expression_element);\n\t}\n\n\tvar context_menu = '
';\n\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n\t\tconsole.log(\"dom_object 10: \");\n\t\tconsole.log(dom_object);\n\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\tcontext_menu += '
';\n\t\tcontext_menu += '
EXP OP EXP
';\n\t\tcontext_menu += '
OP EXP
';\n\t\tcontext_menu += '
( EXP )
';\n\t\tcontext_menu += '
';\n\t}*/\n\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tcontext_menu.insertAfter( dom_object.find('.variable_rendered') );\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tconsole.log('S10');\n\t if ($selectedItem.data('clear')) {\n\t \tconsole.log('PP9');\n\t \tdom_object.text('');\n\n\t \tref_object.content = null;\n\t \tref_object.row = null;\n\t \tref_object.column = null;\n\n\t \tdelete ref_object.function_called;\n\t\t delete ref_object.parameters_list;\n\n\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t }\n\n\t if ($selectedItem.data('exp')) {\n\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n\n\t if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n\t \tRepeatNTimesManagement.manageClearExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n },\n\t selectOnKeydown: false\n\t});\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected);\n\t}*/\n}\n\n\nfunction openInputToValue (command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element) {\n\n\tif (ref_object.content == null) {\n\t\tref_object.content = \"\";\n\t}\n\n\tmenu_var_or_value.find('.text').text(' ');\n\tvar field = $('');\n\tfield.insertBefore(dom_object.find('.menu_var_or_value_dom'));\n\tvar rendered = $('
');\n\trendered.insertBefore(field);\n\n\tfield.focus();\n\tfield.val(ref_object.content);\n\n\tvar context_menu = '
';\n\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\tcontext_menu += '
';\n\t\tcontext_menu += '
EXP OP EXP
';\n\t\tcontext_menu += '
OP EXP
';\n\t\tcontext_menu += '
( EXP )
';\n\t\tcontext_menu += '
';\n\t}*/\n\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\tif (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\tcontext_menu.insertAfter( field );\n\t}\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tconsole.log('S11');\n\t if ($selectedItem.data('clear')) {\n\t \tconsole.log('PP10');\n\t \tdom_object.text('');\n\n\t \tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.find('.context_menu_clear').remove();\n\t\t\tdom_object.find('.width-dynamic-minus').remove();\n\n\t\t\tref_object.content = null;\n\t\t ref_object.row = null;\n\t\t ref_object.column = null;\n\n\t\t\tdelete ref_object.function_called;\n\t\t delete ref_object.parameters_list;\n\n\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t }\n\n\t if ($selectedItem.data('exp')) {\n\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n },\n\t selectOnKeydown: false\n\t});\n\n\tdom_object.find('.width-dynamic-minus').focusout(function() {\n\t\tif ($(this).val().trim()) {\n\t\t\tref_object.content = $(this).val().trim();\n\t\t}\n\n\t\trendered.text(ref_object.content);\n\t\t$(this).remove();\n\n\t});\n\n\tdom_object.find('.width-dynamic-minus').on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif ($(this).val().trim()) {\n\t\t\t\tref_object.content = $(this).val().trim();\n\t\t\t}\n\t\t\trendered.text(ref_object.content);\n\n\t\t\t$(this).remove();\n\t\t}\n\t\tif(code == 27) {\n\t\t\trendered.text(ref_object.content);\n\n\t\t\t$(this).remove();\n\t\t}\n\t});\n\n\tif (command.type == Models.COMMAND_TYPES.comment) {\n\t\t/*rendered.parent().on('click', function(e) {\n\t\t\trendered.parent().off();\n\t\t\tconsole.log(\"TTT14\");\n\t\t\trendered.remove();\n\t\t\trendered.empty();\n\t\t\trendered.remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t\t});*/\n\t}\n\n\trendered.on('click', function(e) {\n\t\tconsole.log(\"TTT2\");\n\t\trendered.remove();\n\t\trendered.empty();\n\t\trendered.remove();\n\t\tdom_object.empty();\n\t\tdom_object.append(' ');\n\t\t\n\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t});\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n\t}*/\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 )
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_while') + ' ';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, whiletrue_dom)) {\n\t\t\twhiletrue_dom.fadeOut(400, function() {\n\t\t\t\twhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenu from \"./variable_value_menu\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport * as CommandsManagement from \"../commands\";\nimport * as GenericExpressionManagement from \"./generic_expression\";\n\nexport function createFloatingCommand () {\n return $(\n '
' +\n LocalizedStrings.getUI(\"text_command_write\") +\n \" var
\"\n );\n}\n\nexport function renderCommand (command, function_obj) {\n const ret = `
\n \n \n ${LocalizedStrings.getUI(\n \"text_command_write\"\n )}\n (
\n )\n \n
`;\n const el = $(ret);\n el.data(\"command\", command);\n\n //renderExpression (command, function_obj, div_to_render, expression_array)\n\n GenericExpressionManagement.renderExpression(\n command,\n function_obj,\n el.find(\".all_elements_write\"),\n command.content\n );\n\n /*for (var i = 0; i < command.content.length; i ++) {\n\t\tvar new_div_item = $( '
' );\n\t\tvar div_parent_with_handler = $( '
' );\n\t\tdiv_parent_with_handler.append($(''));\n\t\tdiv_parent_with_handler.append(new_div_item);\n\t\tdiv_parent_with_handler.append($(''));\n\n\t\tel.find('.all_elements_write').append(div_parent_with_handler);\n\t\tVariableValueMenu.renderMenu(command, command.content[i], new_div_item, function_obj);\n\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\n\t\taddHandlersManager(command, function_obj, el, div_parent_with_handler, command.content[i]);\n\t}\n\n\tif (command.content.length == 0) {\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\t}*/\n\n addHandlers(command, function_obj, el);\n return el;\n}\n\nfunction addHandlersManager (\n command,\n _function_obj,\n _writer_dom,\n item_div,\n content_element\n) {\n item_div.find(\".times\").on(\"click\", function () {\n for (let i = 0; i < command.content.length; i++) {\n if (command.content[i] == content_element) {\n delete command.content[i];\n command.content.splice(i, 1);\n\n item_div.children().off();\n item_div.off();\n item_div.fadeOut();\n\n if (command.content.length > 0) {\n item_div.next(\".icon_add_item_to_writer\").fadeOut();\n }\n break;\n }\n }\n });\n}\n\nfunction addHandlers (command, function_obj, writer_dom) {\n writer_dom.find(\".button_remove_command\").on(\"click\", function () {\n if (CommandsManagement.removeCommand(command, function_obj, writer_dom)) {\n writer_dom.fadeOut(400, function () {\n writer_dom.remove();\n });\n }\n });\n\n Sortable.create(writer_dom.find(\".all_elements_write\")[0], {\n handle: \".ellipsis\",\n animation: 100,\n ghostClass: \"ghost\",\n group: \"writer_\" + Math.floor(Math.random() * 10000000),\n draggable: \".div_parent_handler\",\n onEnd: function (evt) {\n command.content.splice(\n evt.newIndex,\n 0,\n command.content.splice(evt.oldIndex, 1)[0]\n );\n\n writer_dom.empty();\n writer_dom.replaceWith(renderCommand(command, function_obj));\n },\n });\n // Attach event handles for the newline button\n const newlineBtn = writer_dom.find(\".ivprog_newline_btn\");\n newlineBtn.on(\"click\", function () {\n const state = this.dataset.state;\n if (state === \"on\") {\n this.dataset.state = \"off\";\n command.newline = false;\n this.setAttribute(\"src\", \"img/no_new_line.svg\");\n } else {\n this.dataset.state = \"on\";\n command.newline = true;\n this.setAttribute(\"src\", \"img/new_line.svg\");\n }\n writer_dom.data(\"command\", command);\n setPopup(newlineBtn, command.newline);\n });\n // Attach jquery popup\n setPopup(newlineBtn, command.newline);\n}\n\nfunction setPopup (element, state) {\n if (element.popup(\"exists\")) {\n element.popup(\"destroy\");\n }\n const content = state\n ? LocalizedStrings.getUI(\"write_command_newline_on\")\n : LocalizedStrings.getUI(\"write_command_newline_off\");\n element.popup({\n content: content,\n delay: {\n show: 750,\n hide: 0,\n },\n });\n}\n\nfunction _addHandlerIconAdd (\n dom_object,\n command,\n function_obj,\n insert_after = false,\n after_which = null\n) {\n const icon_add_item = $(\n ' '\n );\n if (!insert_after) {\n dom_object.append(icon_add_item);\n } else {\n icon_add_item.insertAfter(after_which);\n }\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '
'\n );\n const new_div_item = $('
');\n div_parent_with_handler.append(\n $('')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('')\n );\n div_parent_with_handler.insertAfter(icon_add_item);\n\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlerIconAdd(\n dom_object,\n command,\n function_obj,\n true,\n div_parent_with_handler\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n let pos = 1;\n dom_object.find(\".icon_add_item_to_writer\").each(function () {\n if ($(this).get(0) === icon_add_item.get(0)) {\n command.content.splice(pos, 0, new_related_menu);\n } else {\n pos++;\n }\n });\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n div_parent_with_handler.fadeIn();\n });\n}\n\nexport function addContent (\n command,\n _ref_object,\n dom_object,\n _menu_var_or_value,\n function_obj,\n _ref_object_content\n) {\n if (dom_object.hasClass(\"var_value_menu_div\")) {\n const icon_add_item = $(\n ' '\n );\n icon_add_item.insertAfter(dom_object);\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '
'\n );\n div_parent_with_handler.append(\n $('')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('')\n );\n\n div_parent_with_handler.insertAfter(icon_add_item);\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n\n command.content.push(new_related_menu);\n\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n });\n }\n}\n","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as GlobalsManagement from './globals';\nimport * as VariablesManagement from './variables';\nimport * as CommandsManagement from './commands';\nimport * as CodeManagement from './code_generator';\nimport * as VariableValueMenu from './commands/variable_value_menu';\nimport { DOMConsole } from './../io/domConsole';\nimport { IVProgProcessor } from './../processor/ivprogProcessor';\nimport WatchJS from 'melanke-watchjs';\nimport { SemanticAnalyser } from '../processor/semantic/semanticAnalyser';\nimport { IVProgAssessment } from '../assessment/ivprogAssessment';\nimport * as AlgorithmManagement from './algorithm';\nimport * as Utils from './utils';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\nimport VersionInfo from './../../.ima_version.json';\nimport * as TextEditor from \"./text_editor\";\nimport { isValidIdentifier } from \"./../util/utils\";\nimport { Modes } from '../processor/modes';\n\nvar counter_new_functions = 0;\nvar counter_new_parameters = 0;\nvar ivprog_version = VersionInfo.version;\n\nconst globalChangeListeners = [];\nconst functionsChangeListeners = [];\nlet proc = null;\nlet domConsole = null;\nlet _testCases = [];\nlet isRunning = false;\nwindow.studentGrade = null;\nwindow.LocalizedStrings = LocalizedStrings;\nconst program = new Models.Program();\n\nwindow.system_functions = [];\n// Adding math functions:\nwindow.system_functions.push(new Models.SystemFunction('$sin', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$cos', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$tan', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$sqrt', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$pow', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$log', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$abs', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$negate', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$invert', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$max', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$min', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$rand', Types.REAL, 0, [],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\n// Adding text functions:\nwindow.system_functions.push(new Models.SystemFunction('$substring', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$length', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$uppercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$lowercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$charAt', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\n// Adding arrangement functions:\nwindow.system_functions.push(new Models.SystemFunction('$numElements', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 1)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixLines', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixColumns', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\n// Adding conversion functions:\nwindow.system_functions.push(new Models.SystemFunction('$isReal', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isInt', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castReal', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castInt', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castString', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castChar', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\n\nconsole.log(' ___ ___ ________ \\n / / / / / ____/ \\n / / / / / / \\n / / / / ______ ___ / /__ \\n / / / / / \\\\ / / / ___/ \\n / /______ / / / /\\\\ \\\\/ / / / \\n / / / / / / \\\\ / / /____ \\n/__________/ /___/ /___/ \\\\___/ /________/ \\n\\n Laboratório de Informática na Educação\\n http://line.ime.usp.br');\n\nconst mainFunction = new Models.Function(LocalizedStrings.getUI(\"start\"), Types.VOID, 0, [], true, false);\nmainFunction.function_comment = new Models.Comment(LocalizedStrings.getUI('text_comment_main'));\nprogram.addFunction(mainFunction);\n\nwindow.program_obj = program;\n\nwindow.generator = CodeManagement.generate;\nwindow.runCodeAssessment = runCodeAssessment;\nwindow.renderAlgorithm = AlgorithmManagement.renderAlgorithm;\nwindow.insertContext = false;\nwindow.watchW = WatchJS;\n\nWatchJS.watch(window.program_obj.globals, function(){\n if (window.insertContext) {\n setTimeout(function() {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }\n}, 1);\n\nWatchJS.watch(window.program_obj.functions, function(){\n if (window.insertContext) {\n setTimeout(function(){\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }\n}, 1);\n\nfunction addFunctionHandler () {\n\n\tconst new_function = new Models.Function(LocalizedStrings.getUI(\"new_function\") + \"_\" + counter_new_functions, Types.VOID, 0, [], false, false, [], new Models.Comment(LocalizedStrings.getUI('text_comment_start')));\n\tprogram.addFunction(new_function);\n\n\tcounter_new_functions ++;\n\n window.insertContext = true;\n registerUserEvent(new_function.name, ActionTypes.INSERT_FUNCTION);\n\n // var newe = renderFunction(new_function);\n renderFunction(new_function);\n /*newe.css('display', 'none');\n newe.fadeIn();*/\n}\n\nfunction addParameter (function_obj, function_container/*, is_from_click = false*/) {\n if (function_obj.parameters_list == null) {\n function_obj.parameters_list = [];\n }\n const new_parameter = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI(\"new_parameter\") + \"_\" + counter_new_parameters);\n function_obj.parameters_list.push(new_parameter);\n counter_new_parameters ++;\n registerUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_PARAM, new_parameter.name, Types.INTEGER, 0);\n //var newe = renderParameter(function_obj, new_parameter, function_container);\n renderParameter(function_obj, new_parameter, function_container);\n // if (is_from_click) {\n // newe.css('display', 'none');\n // newe.fadeIn();\n // }\n}\n\nfunction updateReturnType (function_obj, new_type, new_dimensions = 0) {\n registerUserEvent(function_obj.name, ActionTypes.CHANGE_FUNCTION_RETURN, new_type, new_dimensions);\n function_obj.return_type = new_type;\n function_obj.return_dimensions = new_dimensions;\n}\n\nfunction removeFunction (function_obj) {\n var index = program.functions.indexOf(function_obj);\n if (index > -1) {\n registerUserEvent(function_obj.name, ActionTypes.REMOVE_FUNCTION);\n program.functions.splice(index, 1);\n }\n}\n\nfunction minimizeFunction (function_obj) {\n function_obj.is_hidden = !function_obj.is_hidden;\n}\n\nfunction addHandlers (function_obj, function_container) {\n\n function_container.find('.ui.dropdown.function_return').dropdown({\n onChange: function(value, text, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateReturnType(function_obj, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n } else {\n updateReturnType(function_obj, Types[$selectedItem.data('type')]);\n }\n },\n selectOnKeydown: false\n });\n\n function_container.find( \".name_function_updated\" ).on('click', function(e){\n enableNameFunctionUpdate(function_obj, function_container);\n });\n\n function_container.find( \".add_parameter_button\" ).on('click', function(e){\n window.insertContext = true;\n addParameter(function_obj, function_container, true);\n });\n\n function_container.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\n function_container.find('.menu_commands a').on('click', function(evt){\n if (function_obj.commands == null || function_obj.commands.length == 0) {\n function_obj.commands = [];\n var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n function_obj.commands.push(new_cmd);\n\n CommandsManagement.renderCommand(new_cmd, function_container.find('.commands_list_div'), 3, function_obj);\n registerUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, $(this).data('command'), '/', 0);\n } else {\n CommandsManagement.createFloatingCommand(function_obj, function_container, $(this).data('command'), evt);\n }\n\n });\n\n function_container.find('.add_var_button_function').on('click', function(e){\n window.insertContext = true;\n VariablesManagement.addVariable(function_obj, function_container, true);\n });\n\n function_container.find('.remove_function_button').on('click', function(e){\n removeFunction(function_obj);\n function_container.fadeOut();\n });\n\n function_container.find('.minimize_function_button').on('click', function(e){\n minimizeFunction(function_obj);\n if (function_obj.is_hidden) {\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n function_container.find(\".function_area\").slideToggle();\n } else {\n function_container.find(\".function_area\").slideToggle(function(){\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n });\n }\n \n });\n}\n\n// Essa função imprime o tipo de retorno da função e cria o menu do tipo 'select' para alteração\nfunction renderFunctionReturn (function_obj, function_element) {\n\n var ret = '
';\n \n if (function_obj.return_dimensions == 1) {\n ret += '
'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ]
';\n } else if (function_obj.return_dimensions == 2) {\n ret += '
'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ]
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n for (var tm in Types) {\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\n\n ret = $(ret);\n \n function_element.find('.function_return').append(ret);\n}\n\nvar cont = 0;\n\nexport function renderFunction (function_obj) {\n \n var appender = '
';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '';\n\n appender += (function_obj.is_main ? '
' : '')\n + '';\n\n appender += '
'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '
      ' + LocalizedStrings.getUI('type_void') + '       '+function_obj.name+'
'\n + ' (
';\n } else {\n appender += '
';\n\n appender += '
'+function_obj.name+'
' \n + ' (
';\n }\n \n appender += '
)
'\n + (function_obj.is_hidden ? ' ';\n\n appender = $(appender);\n\n $('.all_functions').append(appender);\n\n appender.data('fun', function_obj);\n appender.find('.commands_list_div').data('fun', function_obj);\n\n renderFunctionReturn(function_obj, appender);\n\n addHandlers(function_obj, appender);\n\n // Rendering parameters: \n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n renderParameter(function_obj, function_obj.parameters_list[j], appender);\n }\n\n // Rendering variables:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n VariablesManagement.renderVariable(appender, function_obj.variables_list[j], function_obj);\n }\n // Rendering commands:\n for (var j = 0; j < function_obj.commands.length; j++) {\n CommandsManagement.renderCommand(function_obj.commands[j], $(appender.find('.commands_list_div')[0]), 3, function_obj);\n }\n $('.minimize_function_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_hide_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n var function_index = program.functions.indexOf(function_obj);\n\n Sortable.create(appender.find(\".variables_list_div\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'local_vars_drag_' + function_index,\n onEnd: function (evt) {\n updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n\n addSortableHandler(appender.find(\".commands_list_div\")[0], function_index);\n\n if (!function_obj.is_main) {\n Sortable.create(appender.find(\".container_parameters_list\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'parameters_drag_' + program.functions.indexOf(function_obj),\n onEnd: function (evt) {\n updateSequenceParameters(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n }\n\n if (function_obj.commands.length > 0) {\n var teste = '.ui.sticky.sticky_cont_'+cont;\n $(teste).sticky({\n context: '.ui.bottom.attached.segment.commands_list_div.commands_cont_'+cont,\n scrollContext: '.ivprog_visual_panel',\n observeChanges: true,\n offset: 40,\n onStick: function (evt) {\n $(teste).css('top', '20px', 'important');\n }, \n onBottom: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onUnstick: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onReposition: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onScroll: function (evt) {\n $(teste).css('top', '20px', 'important');\n if (!isVisible($(teste), $(teste).parent())) {\n $(teste).removeClass('fixed');\n }\n },\n onTop: function (evt) {\n $(teste).css('top', '20px', 'important');\n }\n });\n }\n \n cont ++;\n\n return appender;\n}\n\nfunction isVisible (element, container) {\n\n var elementTop = $(element).offset().top,\n elementHeight = $(element).height(),\n containerTop = $(container).offset().top,\n containerHeight = $(container).height() - 30;\n\n return ((((elementTop - containerTop) + elementHeight) > 0)\n && ((elementTop - containerTop) < containerHeight));\n}\n\n\nwindow.evento_drag;\n\nfunction updateProgramObjDrag () {\n const nodes = Array.prototype.slice.call( $('.all_functions').children() );\n let function_index;\n var start_index;\n let function_obj;\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function (index) {\n const ref = $(this);\n if (ref.hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n start_index = index;\n function_obj = ref;\n }\n });\n\n const path_target = [];\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function () {\n if ($(this).hasClass('command_container')) {\n path_target.push(this);\n }\n });\n if (path_target.length == 0) {\n //console.log('soltou na raiz, na posição: ' + evento_drag.newIndex + ' mas ainda não sei de onde saiu ');\n } else {\n //console.log('soltou dentro de algum bloco, sequência vem logo abaixo (de baixo pra cima): ');\n //console.log(path_target);\n }\n\n var index_each = [];\n var path_relative = [];\n for (var i = path_target.length - 1; i >= 0; i --) {\n console.log('da vez', $(path_target[i + 1]));\n if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\n console.log('índice na raiz: ', indice_na_raiz);\n } else {\n if ($(path_target[i + 1]).hasClass('iftrue')) {\n if ($(path_target[i]).parent().hasClass('commands_if')) {\n path_relative.push('if');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n } else {\n path_relative.push('else');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n }\n } else if ($(path_target[i + 1]).hasClass('dowhiletrue')) {\n path_relative.push('dowhiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('repeatNtimes')) {\n path_relative.push('repeatNtimes');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('whiletrue')) {\n path_relative.push('whiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('switch')) {\n path_relative.push('switch');\n //index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n }\n }\n }\n // var index_in_block = -1;\n const is_in_else = $(evento_drag.item).parent().hasClass('commands_else');\n\n // index_in_block = $(evento_drag.item).parent().find('.command_container').index(evento_drag.item);\n\n const is_in_case_switch = $(evento_drag.item).parent().hasClass('case_commands_block');\n // var index_case_of_switch = -1;\n // if (is_in_case_switch) {\n // index_case_of_switch = $(evento_drag.item).parent().parent().parent().find('.case_div').index($(evento_drag.item).parent().parent());\n // }\n\n /*console.log('path_relative:');\n console.log(path_relative);\n console.log('index_each:');\n console.log(index_each);\n console.log('index_in_block:');\n console.log(index_in_block);\n console.log('ele está em algum bloco de senão? ');\n console.log(is_in_else);\n console.log('ele está dentro de um case de switch?');\n console.log(is_in_case_switch);\n console.log('qual é o índice do case: ');\n console.log(index_case_of_switch);*/\n\n // encontrar o elemento na árvore:\n\n var command_start_point = window.program_obj.functions[function_index].commands[indice_na_raiz];\n var block_to_insert = command_start_point;\n for (var i = 0; i < index_each.length; i++) {\n if (path_relative[i] == \"else\") {\n block_to_insert = block_to_insert.commands_else[index_each[i]];\n } else if (path_relative[i] == \"switch\") {\n\n } else {\n block_to_insert = block_to_insert.commands_block[index_each[i]]\n }\n }\n\n //console.log('command_start_point', command_start_point);\n //console.log('block_to_insert', block_to_insert);\n\n // agora tem que alocar o comando na árvore, mas considerar as quatro situações:\n // (1) se está em um else ou (2) se está em switch ou (3) será um caso padrão ou (4) se será na raiz.\n \n if (path_target.length == 0) { // soltou na raiz:\n window.program_obj.functions[function_index].commands.splice(evento_drag.newIndex - 1, 0, command_in_drag);\n } else if (is_in_else) {\n if (block_to_insert.commands_else) {\n block_to_insert.commands_else.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_else = [];\n block_to_insert.commands_else.push(command_in_drag);\n }\n } else if (is_in_case_switch) {\n\n } else {\n // verificar se tem alguma coisa no bloco:\n if (block_to_insert.commands_block) {\n console.log(\"existe alguma coisa dentro do bloco, index: \", evento_drag.newIndex);\n block_to_insert.commands_block.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_block = [];\n block_to_insert.commands_block.push(command_in_drag);\n }\n }\n\n window.draging = false;\n renderAlgorithm();\n \n\n}\n\nfunction prepareDragHandler (evt) {\n window.draging = true;\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n command_in_drag = $(evt.item).data(\"command\");\n\n //console.log('$(evt.item).parent(): ');\n //console.log($(evt.item).parent());\n\n // descobrir qual das quatro situações:\n if ($(evt.item).parent().hasClass('commands_list_div')) { // está na raiz:\n if (function_obj.commands.indexOf(command_in_drag) > -1) {\n function_obj.commands.splice(function_obj.commands.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('commands_else')) { // está no else:\n if ($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_else.splice($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('case_commands_block')) { // está em um switch:\n\n } else { // caso padrão:\n if ($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_block.splice($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag), 1);\n }\n }\n\n}\n\nvar command_in_drag;\n\nfunction addSortableHandler (element, id_function) {\n \n var n_group = 'commands_drag_' + id_function;\n Sortable.create(element, {\n handle: '.command_drag',\n ghostClass: 'ghost',\n animation: 300,\n group: {name: n_group},\n onEnd: function (evt) {\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n registerUserEvent(function_obj.name, ActionTypes.MOVE_COMMAND, $(evt.item).data('command').type, '/', 'from: ' + evt.oldIndex + ' to: ' + evt.newIndex);\n //updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n var itemEl = evt.item; // dragged HTMLElement\n evt.to; // target list\n evt.from; // previous list\n evt.oldIndex; // element's old index within old parent\n evt.newIndex; // element's new index within new parent\n //console.log('::EVT::');\n //console.log(evt);\n\n window.evento_drag = evt;\n\n try {\n updateProgramObjDrag();\n } catch (e) {\n console.error(e);\n window.draging = false;\n }\n },\n onStart: function (evt) {\n //console.log(\"START::EVT::\");\n //console.log(evt);\n //console.log(\"\\n\\ncommand_in_drag\");\n try {\n prepareDragHandler(evt);\n } catch (e) {\n window.draging = false;\n }\n }\n });\n element = $(element);\n element.find(\".iftrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n addSortableHandler($(this).find(\".block_commands\")[1], id_function);\n });\n\n element.find(\".repeatNtimes\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".dowhiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".whiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".switch\").each(function( index ) {\n\n $(this).find(\".case_div\").each(function( index ) {\n addSortableHandler($(this).find(\".case_commands_block\")[0], id_function);\n });\n\n }); \n}\n\nexport function initVisualUI () {\n // MUST USE CONST, LET, OR VAR !!!!!!\n // const mainDiv = $('#visual-main-div');\n // fill mainDiv with functions and globals...\n // renderAlgorithm()...\n domConsole = new DOMConsole(\"ivprog-term-div\");\n domConsole.hide();\n $(document.getElementById(\"ivprog-term-div\")).draggable()\n $('.add_function_button').on('click', () => {\n addFunctionHandler();\n });\n $('.add_global_button').on('click', () => {\n window.insertContext = true;\n GlobalsManagement.addGlobal(program, true);\n });\n\n $('#run_button').on('click', function () {\n showStopButton();\n runCode();\n });\n\n $('#stop_button').on('click', function () {\n showRunButton();\n stopExecution();\n });\n\n $('.visual_coding_button').on('click', () => {\n toggleVisualCoding();\n });\n\n $('.textual_coding_button').on('click', () => {\n toggleTextualCoding();\n });\n\n $('.assessment').on('click', () => {\n is_iassign = true;\n runCodeAssessment();\n });\n\n $('.div_toggle_console').on('click', () => {\n toggleConsole();\n });\n $('.expand_button').on('click', () => {\n full_screen();\n });\n $('.help_button').on('click', () => {\n window.open('https://www.usp.br/line/ivprog/', '_blank');\n });\n $('.main_title h2').prop('title', LocalizedStrings.getUI('text_ivprog_description'));\n\n var time_show = 750;\n $('.visual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_visual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.textual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_textual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.upload_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_upload\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.download_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_download\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.undo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_undo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.redo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_redo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.run_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_run\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.assessment_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_evaluate\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.help_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_help\") + ' - ' + LocalizedStrings.getUI(\"text_ivprog_version\") + ' ' + ivprog_version,\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.add_global_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_add_global\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.div_toggle_console').popup({\n content : LocalizedStrings.getUI(\"tooltip_console\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n\n Sortable.create(listWithHandle, {\n handle: '.glyphicon-move',\n animation: 100,\n ghostClass: 'ghost',\n group: 'functions_divs_drag',\n onEnd: function (evt) {\n updateSequenceFunction(evt.oldIndex, evt.newIndex);\n }\n });\n\n var listGlobalsHandle = document.getElementById(\"listGlobalsHandle\");\n Sortable.create(listGlobalsHandle, {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'globals_divs_drag',\n onEnd: function (evt) {\n updateSequenceGlobals(evt.oldIndex, evt.newIndex);\n }\n });\n\n}\n\nexport function setTestCases (testCases) {\n _testCases = testCases;\n}\n\nexport function getTestCases () {\n // Deep clone of test cases to avoid unauthorized modification\n // TODO: It may be not possible to use this once custom test are fully implemented \n return JSON.parse(JSON.stringify(_testCases));\n}\n\nvar is_iassign = false;\n\nfunction updateSequenceParameters (oldIndex, newIndex, function_obj) {\n function_obj.parameters_list.splice(newIndex, 0, function_obj.parameters_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceLocals (oldIndex, newIndex, function_obj) {\n function_obj.variables_list.splice(newIndex, 0, function_obj.variables_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceGlobals (oldIndex, newIndex) {\n program_obj.globals.splice(newIndex, 0, program_obj.globals.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceFunction (oldIndex, newIndex) {\n program_obj.functions.splice(newIndex, 0, program_obj.functions.splice(oldIndex, 1)[0]);\n}\n\nfunction runCodeAssessment () {\n if (isRunning) {\n // cannot run assessment or it's already running\n return -1;\n }\n \n let strCode = null;\n\n window.studentGrade = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n // No code, so no assessment\n return -1;\n }\n\n toggleConsole(true);\n\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n isRunning = true;\n const runner = new IVProgAssessment(data, _testCases, domConsole);\n runner.runTest().then(grade => {\n if (!is_iassign) {\n parent.getEvaluationCallback(grade);\n } else {\n is_iassign = false;\n }\n isRunning = false;\n }).catch( err => {\n console.log(err);\n isRunning = false;\n });\n } catch (error) {\n isRunning = false;\n domConsole.err(error.message);\n console.log(error);\n if (!is_iassign) {\n parent.getEvaluationCallback(0);\n } else {\n is_iassign = false;\n }\n }\n return 0;\n}\n\nfunction runCode () {\n if (isRunning) {\n return;\n }\n let strCode = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n return;\n }\n \n toggleConsole(true);\n\n // if(domConsole == null)\n // domConsole = new DOMConsole(\"#ivprog-term\");\n //$(\"#ivprog-term\").slideDown(500);\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n proc = new IVProgProcessor(data);\n proc.registerInput(domConsole);\n proc.registerOutput(domConsole);\n $(\"#ivprog-term\").addClass('ivprog-term-active');\n isRunning = true;\n proc.interpretAST().then( _ => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(proc.mode === Modes.ABORT) {\n domConsole.info(LocalizedStrings.getMessage(\"aborted_execution\")); \n } else {\n domConsole.info(LocalizedStrings.getMessage(\"success_execution\"));\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }).catch(err => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(err instanceof Error) {\n domConsole.err(err.message);\n } else {\n domConsole.err(err);\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }) \n } catch (error) {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n isRunning = false;\n proc = null;\n showRunButton();\n domConsole.err(error.message);\n console.log(error);\n return true;\n }\n return false;\n },100);\n }\n \n}\n\nfunction toggleConsole (is_running) {\n\n if (is_running) {\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n if(domConsole != null)\n domConsole.focus();\n //$('#ivprog-term').css('margin-top', '-170px');\n return;\n } else {\n domConsole.hide();\n return;\n }\n\n if ($('#ivprog-term').css('min-height') == '160px') {\n // esconder\n $('.ivprog-term-div').css('display', 'none');\n $('#ivprog-term').css('min-height', '0');\n //$('#ivprog-term').css('margin-top', '-30px');\n //$('#ivprog-term').css('padding', '5px');\n } else {\n // mostrar\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n //$('#ivprog-term').css('margin-top', '-170px');\n }\n}\n\n// function waitToCloseConsole () {\n// domConsole.info(\"Aperte qualquer tecla para fechar...\");\n// const p = new Promise((resolve, _) => {\n// domConsole.requestInput(resolve, true);\n// });\n// p.then( _ => {\n// domConsole.dispose();\n// domConsole = null;\n// $(\"#ivprog-term\").hide();\n// })\n// }\n\nfunction toggleTextualCoding () {\n let code = null;\n if (settingsProgrammingTypes != \"textual\") {\n code = CodeManagement.generate();\n if (code == null) {\n return;\n }\n }\n\n\n $('.ivprog_visual_panel').css('display', 'none');\n $('.ivprog_textual_panel').css('display', 'block');\n $('.ivprog_textual_panel').removeClass('loading');\n TextEditor.updateEditor();\n if (code != null)\n TextEditor.setCode(code);\n //$('.ivprog_textual_code').text(code);\n\n $('.visual_coding_button').removeClass('active');\n $('.textual_coding_button').addClass('active');\n}\n\nfunction toggleVisualCoding () {\n $('.ivprog_textual_panel').addClass('loading');\n $('.ivprog_textual_panel').css('display', 'none');\n $('.ivprog_visual_panel').css('display', 'block');\n\n $('.textual_coding_button').removeClass('active');\n $('.visual_coding_button').addClass('active');\n}\n\nfunction removeParameter (function_obj, parameter_obj, parameter_container) {\n registerUserEvent(parameter_obj.name, ActionTypes.REMOVE_FUNCTION_PARAM, function_obj.name);\n var index = function_obj.parameters_list.indexOf(parameter_obj);\n if (index > -1) {\n window.insertContext = true;\n function_obj.parameters_list.splice(index, 1);\n }\n $(parameter_container).fadeOut();\n}\n\nfunction updateParameterType (parameter_obj, new_type, function_name, new_dimensions = 0) {\n registerUserEvent(parameter_obj.name, ActionTypes.CHANGE_PARAM_TYPE, function_name, new_type, new_dimensions);\n parameter_obj.type = new_type;\n parameter_obj.dimensions = new_dimensions;\n\n if (new_dimensions > 0) {\n parameter_obj.rows = new_dimensions;\n parameter_obj.columns = 2;\n }\n\n}\n\nfunction renderParameter (function_obj, parameter_obj, function_container) {\n let ret = \"\";\n\n ret += '
';\n\n ret += '
';\n\n if (parameter_obj.dimensions > 0) {\n ret += '
'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`);\n if (parameter_obj.dimensions == 1) {\n ret += ' [ ] ';\n } else {\n ret += ' [ ] [ ] ';\n }\n ret += '
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\n\n ret += '
'+parameter_obj.name+'
';\n\n ret += '
';\n\n ret = $(ret);\n \n function_container.find('.container_parameters_list').append(ret);\n\n ret.find('.remove_parameter').on('click', function(e){\n removeParameter(function_obj, parameter_obj, ret);\n });\n \n ret.find('.ui.dropdown.parameter_type').dropdown({\n onChange: function(_, __, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n } else {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name);\n }\n },\n selectOnKeydown: false\n });\n\n ret.find('.parameter_div_edit').on('click', function(e){\n registerUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_PARAM_NAME, parameter_obj.name);\n enableNameParameterUpdate(parameter_obj, ret, function_obj);\n });\n\n return ret;\n}\n\nfunction updateParameterName (parameter_var, new_name, parameter_obj_dom, function_obj) {\n \n if (parameter_var.name == new_name) {\n return;\n }\n\n if (isValidIdentifier(new_name)) {\n if (variableNameAlreadyExists(new_name, function_obj)) {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_param_duplicated', [new_name, function_obj.name]));\n } else {\n registerUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_PARAM, parameter_var.name, new_name);\n parameter_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction updateFunctionName (function_var, new_name, function_obj_dom) {\n \n if (function_var.name == new_name) {\n return;\n }\n \n if (isValidIdentifier(new_name)) {\n if (functionNameAlreadyExists(new_name)) {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_function_duplicated', [new_name]));\n } else {\n registerUserEvent(function_var.name, ActionTypes.RENAME_FUNCTION, new_name);\n function_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction functionNameAlreadyExists (function_name) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_name) {\n return true;\n }\n }\n return false;\n}\n\nvar opened_name_parameter = false;\nvar opened_input_parameter = null;\nfunction enableNameParameterUpdate (parameter_obj, parent_node, function_obj) {\n if (opened_name_parameter) {\n opened_input_parameter.focus();\n return;\n }\n opened_name_parameter = true;\n parent_node = $(parent_node);\n\n var input_field;\n\n parent_node.find('.span_name_parameter').text('');\n input_field = $( \"\" );\n input_field.insertBefore(parent_node.find('.span_name_parameter'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input_parameter = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n\n }\n if(code == 27) {\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n }\n });\n input_field.select();\n}\n\nvar opened_name_function = false;\nvar opened_input = null;\nvar previousPadding = null;\nfunction enableNameFunctionUpdate (function_obj, parent_node) {\n if (opened_name_function) {\n opened_input.focus();\n return;\n }\n parent_node = $(parent_node);\n parent_node.find('.span_name_function').text('');\n var input_field;\n if (!previousPadding) {\n previousPadding = parent_node.find('.span_name_function').css('padding-left');\n }\n parent_node.find('.span_name_function').css('padding-left', '0');\n parent_node.find('.span_name_function').css('padding-right', '0');\n \n input_field = $( \"\" );\n input_field.insertBefore(parent_node.find('.span_name_function'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n if(code == 27) {\n\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n });\n input_field.select();\n \n}\n\nexport function addFunctionChangeListener (callback) {\n functionsChangeListeners.push(callback);\n return functionsChangeListeners.length - 1;\n}\n\nexport function addGlobalChangeListener (callback) {\n globalChangeListeners.push(callback);\n return globalChangeListeners.length - 1;\n}\n\nexport function removeGlobalListener (index) {\n globalChangeListeners.splice(index, 1);\n}\n\nexport function removeFunctionListener (index) {\n functionsChangeListeners.splice(index);\n}\n\nfunction scheduleCall (callback, time) {\n const scheduled_call = () => {\n const id = setInterval(() => {\n if(callback()) {\n clearInterval(id);\n }\n }, time)\n }\n scheduled_call();\n}\n\nfunction showRunButton () {\n document.getElementById('run_button').style.display = 'inline';\n document.getElementById('stop_button').style.display = 'none';\n}\n\nfunction showStopButton () {\n document.getElementById('run_button').style.display = 'none';\n document.getElementById('stop_button').style.display = 'inline';\n}\n\nfunction stopExecution () {\n domConsole.clearPendingWrites();\n domConsole.cancelPendingInputRequests();\n if(!isRunning) {\n return;\n }\n proc.mode = Modes.ABORT;\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\n\nvar counter_new_globals = 0;\n\nexport function addGlobal (program, is_from_click = false) {\n\n\tvar new_global = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_global') + '_' + counter_new_globals, 0);\n\tcounter_new_globals ++;\n\n\tprogram.addGlobal(new_global);\n\n\tregisterUserEvent(new_global.name, ActionTypes.INSERT_GLOBAL_VAR);\n\tvar newe = renderGlobal(new_global);\n\n\tif (is_from_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n\n}\n\nfunction toggleConstant (global_var) {\n\tglobal_var.is_constant = !global_var.is_constant;\n\tregisterUserEvent(global_var.name, ActionTypes.SET_GLOBAL_CONST);\n}\n\nfunction updateName (global_var, new_name, global_obj_dom) {\n\n\tif (global_var.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (globalNameAlreadyExists(new_name)) {\n\t\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_global_duplicated'));\n\t\t} else {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.RENAME_GLOBAL_VAR, new_name);\n\t\t\tglobal_var.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_name'));\n\t}\n}\n\nfunction globalNameAlreadyExists (global_name) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == global_name) {\n return true;\n }\n }\n return false;\n}\n\nfunction isValidIdentifier (identifier_str) {\n\treturn /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n}\n\nfunction updateType (global_var, new_type, new_dimensions = 0) {\n\tglobal_var.type = new_type;\n\tglobal_var.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tglobal_var.rows = new_dimensions;\n\t\tglobal_var.columns = 2;\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_VAR_TYPE, new_type,\n\t\tnew_dimensions, global_var.rows, global_var.columns);\n\tupdateInitialValues(global_var);\n}\n\nfunction removeGlobal (global_var, global_container) {\n\tvar index = window.program_obj.globals.indexOf(global_var);\n\tif (index > -1) {\n\t\twindow.insertContext = true;\n\t window.program_obj.globals.splice(index, 1);\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.REMOVE_GLOBAL_VAR);\n\tglobal_container.children().off();\n\tglobal_container.off();\n\tglobal_container.fadeOut();\n}\n\nfunction updateInitialValues (global_var) {\n\tif (global_var.type == Types.INTEGER) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0, 0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.REAL) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0.0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0.0, 0.0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = true;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [true, true];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 'A';\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = ['A', 'A'];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.name,\n\t\tglobal_var.value);\n}\n\nfunction alternateBooleanGlobalValue (global_var, value_container) {\n\tglobal_var.value = !global_var.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value}`));\n}\n\nfunction alternateBooleanGlobalVectorValue (global_var, index, value_container) {\n\tglobal_var.value[index] = !global_var.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[index]}`));\n}\n\nfunction removeGlobalColumnVector (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addGlobalColumnVector (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tglobal_var.value.push(0);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tglobal_var.value.push(0.0);\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tglobal_var.value.push(true);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnGlobalMatrix (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\n\tfor (var i = 0; i < global_var.rows; i++) {\n\t\tglobal_var.value[i].splice(global_var.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnGlobalMatrix (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0);\n\t\t}\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0.0);\n\t\t}\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(true);\n\t\t}\n\t}\n\tif (global_var.type == Types.CHAR) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeLineGlobalMatrix (global_var) {\n\tif (global_var.rows == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.rows --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addLineGlobalMatrix (global_var) {\n\tglobal_var.rows ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n}\n\nfunction alternateBooleanGlobalMatrixValue (global_var, row, index, value_container) {\n\tglobal_var.value[row][index] = !global_var.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[row][index]}`));\n}\n\nfunction renderValues (global_var, global_container) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\n\tif (global_var.dimensions == 0) {\n\t\tif (global_var.type == Types.REAL) {\n\t\t\tret += '
'+global_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+global_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '';\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+global_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+''+global_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\n\t\tif (global_var.dimensions == 2) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += ''+global_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tif (global_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += ''+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+global_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\t\t\n\t}\n\n\tglobal_container.find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\tret.find('.span_value_variable').data('associatedOject', global_var);\n\n\tret.find( \".boolean_simple_type\" ).on('click', function(e){\n\t\talternateBooleanGlobalValue(global_var, this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalValueUpdate(global_var, this.parentNode);\n\t});\n\n\tret.find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalVectorValue(global_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".vector_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalVectorValueUpdate(global_var, $(this).data('index'), this.parentNode);\n\t});\n\tret.find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveGlobalColumnVector(global_var);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddGlobalColumnVector(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalMatrixValue(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalMatrixValueUpdate(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t});\n\tglobal_container.find( \".div_valor_var\" ).append(ret);\n\n\n\tupdateColumnsAndRowsText(global_container, global_var);\n\n}\n\nfunction addHandlers (global_container) {\n\tvar global_var = global_container.data('associatedOject'); \n\t// Manage constant option:\n\tglobal_container.find( \".alternate_constant\" ).on('click', function(e){\n\t\ttoggleConstant(global_var);\n\n\t\t$( this ).removeClass( \"on off\" );\n\t\tif (global_var.is_constant) {\n\t\t\t$( this ).addClass( \"on\" );\n\t\t} else {\n\t\t\t$( this ).addClass( \"off\" );\n\t\t}\n\t});\n\n\t// Manage global name: \n\tglobal_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_NAME);\n\t\tenableNameUpdate(global_container);\n\t});\n\n\t// Menu to change type:\n\tglobal_container.find('.ui.dropdown.global_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')]);\n\t \t}\n\n\t \trenderValues(global_var, global_container);\n\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove global: \n\tglobal_container.find( \".remove_global\" ).on('click', function(e){\n\t\tremoveGlobal(global_var, global_container);\n\t});\n\n}\n\nfunction updateColumnsAndRowsText (global_container, global_var) {\n\tvar prev = global_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] [ ' + global_var.rows + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n}\n\nexport function renderGlobal (global_var) {\n\n\tvar element = '
const: ';\n\n\telement += '
';\n \t\n \telement += '
';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] ';\n \t\telement += '
';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] [ ] ';\n \t\telement += '
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
'+global_var.name+'
<— ';\n\n\telement += '
'+global_var.value+'
'; \n\n\telement += '
';\n\n\tvar complete_element = $(element);\n\n\tcomplete_element.data('associatedOject', global_var);\n\n\t$('.list_globals').append(complete_element);\n\n\taddHandlers(complete_element);\n\n\trenderValues(global_var, complete_element);\n\n\tif (global_var.dimensions == 1) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t}\n\tif (global_var.dimensions == 2) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t\tcomplete_element.find('.dimensions_1').text(global_var.rows);\n\t}\n\n\treturn complete_element;\n}\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableGlobalMatrixValueUpdate (global_var, row, index, parent_node) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableGlobalValueUpdate (global_var, parent_node) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t\tvar inputWidth = input_field.textWidth()+10;\n\t\topened_input_value_global_ar = input_field;\n\t\tinput_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t\tinput_field.css({\n\t\t\t\twidth: inputWidth\n\t\t})\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = true;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (global_container) {\n\n\tvar global_var = global_container.data('associatedOject'); \n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tglobal_container.find('.span_name_variable').text('');\n\tvar input_name = $( \"\" );\n\tinput_name.insertBefore(global_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t opened_input_global.focus();\n\n\t opened_input_global.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t} else {\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim()) {\n\t\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t} else {\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableGlobalVectorValueUpdate (global_var, index, parent_node) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};","import { Types } from \"./types\";\nimport WatchJS from \"melanke-watchjs\";\nimport * as AlgorithmManagement from \"./algorithm\";\n\nexport const COMMAND_TYPES = Object.freeze({\n function: \"function\",\n comment: \"comment\",\n reader: \"reader\",\n writer: \"writer\",\n attribution: \"attribution\",\n iftrue: \"iftrue\",\n repeatNtimes: \"repeatNtimes\",\n whiletrue: \"whiletrue\",\n dowhiletrue: \"dowhiletrue\",\n switch: \"switch\",\n switchcase: \"switchcase\",\n functioncall: \"functioncall\",\n break: \"break\",\n return: \"return\",\n});\n\nexport const ARITHMETIC_TYPES = Object.freeze({\n plus: \"plus\",\n minus: \"minus\",\n multiplication: \"multiplication\",\n division: \"division\",\n module: \"module\",\n none: \"none\",\n});\n\nexport const EXPRESSION_ELEMENTS = Object.freeze({\n exp_op_exp: \"exp_op_exp\",\n op_exp: \"op_exp\",\n par_exp_par: \"par_exp_par\",\n start_point: \"start_point\",\n});\n\nexport const EXPRESSION_TYPES = Object.freeze({\n exp_conditional: \"exp_conditional\",\n exp_logic: \"exp_logic\",\n exp_arithmetic: \"exp_arithmetic\",\n write_sep: \"write_separator\",\n});\n\nexport const ARITHMETIC_COMPARISON = Object.freeze({\n greater_than: \"greater_than\",\n less_than: \"less_than\",\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n greater_than_or_equals_to: \"greater_than_or_equals_to\",\n less_than_or_equals_to: \"less_than_or_equals_to\",\n});\n\nexport const LOGIC_COMPARISON = Object.freeze({\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n and: \"and\",\n or: \"or\",\n not: \"not\",\n});\n\nexport const SYSTEM_FUNCTIONS_CATEGORIES = Object.freeze({\n math: \"$mathLib\",\n text: \"$strLib\",\n arrangement: \"$arrayLib\",\n conversion: \"$langLib\",\n});\n\nexport class Variable {\n constructor (\n type,\n name,\n value,\n dimensions = 0,\n is_constant = false,\n rows = 0,\n columns = 0\n ) {\n this.type = type;\n this.name = name;\n this.value = value;\n this.dimensions = dimensions;\n this.is_constant = is_constant;\n this.rows = rows;\n this.columns = columns;\n }\n}\n\nexport class Function {\n constructor (\n name,\n return_type = Types.VOID,\n return_dimensions = 0,\n parameters_list = [],\n is_main = false,\n is_hidden = false,\n variables_list = [],\n function_comment = null,\n commands = []\n ) {\n this.type = COMMAND_TYPES.function;\n this.name = name;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.is_main = is_main;\n this.is_hidden = is_hidden;\n this.variables_list = variables_list;\n this.function_comment = function_comment;\n this.commands = commands;\n }\n}\n\nexport class SystemFunction {\n constructor (\n identifier,\n return_type,\n return_dimensions,\n parameters_list,\n function_comment = null,\n category\n ) {\n this.type = COMMAND_TYPES.function;\n this.identifier = identifier;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.function_comment = function_comment;\n this.category = category;\n }\n}\n\nexport class Comment {\n constructor (comment_text) {\n this.type = COMMAND_TYPES.comment;\n this.comment_text = comment_text;\n }\n}\n\nexport class Break {\n constructor () {\n this.type = COMMAND_TYPES.break;\n }\n}\n\nexport class Reader {\n constructor (variable_value_menu = new VariableValueMenu()) {\n this.type = COMMAND_TYPES.reader;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class Writer {\n constructor (content, newline = true) {\n this.type = COMMAND_TYPES.writer;\n this.content = content;\n this.newline = newline;\n }\n}\n\nexport class Attribution {\n constructor (variable, expression = []) {\n this.type = COMMAND_TYPES.attribution;\n this.variable = variable;\n this.expression = expression;\n }\n}\n\nexport class ExpressionOperator {\n constructor (type_op, item) {\n this.type_op = type_op; // Logic, Arithmetic OR Relational\n this.item = item;\n }\n}\n\nexport class ExpressionElement {\n constructor (type_exp, itens = []) {\n this.type_exp = type_exp;\n this.itens = itens;\n }\n}\n\nexport class ConditionalExpression {\n constructor (expression) {\n this.type = EXPRESSION_TYPES.exp_conditional;\n this.expression = expression;\n }\n}\n\nexport class LogicExpression {\n constructor (has_neg, first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_logic;\n this.has_neg = has_neg;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class ArithmeticExpression {\n constructor (first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_arithmetic;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class IfTrue {\n constructor (expression, commands_block, commands_else) {\n this.type = COMMAND_TYPES.iftrue;\n this.expression = expression;\n this.commands_block = commands_block;\n this.commands_else = commands_else;\n }\n}\n\nexport class RepeatNTimes {\n constructor (\n var_attribution,\n var_incrementation,\n expression1,\n expression2,\n expression3,\n commands_block\n ) {\n this.type = COMMAND_TYPES.repeatNtimes;\n this.var_attribution = var_attribution;\n this.var_incrementation = var_incrementation;\n this.expression1 = expression1;\n this.expression2 = expression2;\n this.expression3 = expression3;\n this.commands_block = commands_block;\n }\n}\n\nexport class WhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.whiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class DoWhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.dowhiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class Switch {\n constructor (variable, cases = []) {\n this.type = COMMAND_TYPES.switch;\n this.variable = variable;\n this.cases = cases;\n }\n}\n\nexport class Return {\n constructor (variable_value_menu) {\n this.type = COMMAND_TYPES.return;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class SwitchCase {\n constructor (variable_value_menu, commands_block = []) {\n this.type = COMMAND_TYPES.switchcase;\n this.variable_value_menu = variable_value_menu;\n this.commands_block = commands_block;\n }\n}\n\nexport class FunctionCall {\n constructor (function_called, parameters_list) {\n this.type = COMMAND_TYPES.functioncall;\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class VariableValueMenu {\n constructor (\n variable_and_value = 7,\n content = null,\n row = null,\n column = null,\n include_constant = true,\n dimensions = 0\n ) {\n this.type = \"var_value\";\n this.variable_and_value = variable_and_value;\n this.content = content;\n this.row = row;\n this.column = column;\n this.include_constant = include_constant;\n this.dimensions = dimensions;\n }\n}\n\nexport class FunctionCallMenu {\n constructor (function_called = null, parameters_list = []) {\n this.type = \"function_call\";\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class Program {\n constructor () {\n this.functions = [];\n this.globals = [];\n }\n\n addFunction (function_to_add) {\n WatchJS.watch(\n function_to_add.parameters_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n WatchJS.watch(\n function_to_add.variables_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n this.functions.push(function_to_add);\n }\n\n addVariable (function_to_receive, variable) {\n if (this.functions[function_to_receive].variable === null) {\n this.functions[function_to_receive].variables_list = [];\n }\n this.functions[function_to_receive].variables_list.push(variable);\n }\n\n addGlobal (variable) {\n this.globals.push(variable);\n }\n}\n","import * as CodeMirror from \"codemirror\";\nimport \"codemirror/addon/edit/closebrackets\";\nimport \"codemirror/addon/edit/matchbrackets\";\n// import \"codemirror/addon/hint/show-hint\";\n// import \"codemirror/addon/hint/anyword-hint\";\nimport \"codemirror/addon/selection/active-line\";\nimport { CodeEditorMode } from \"./../util/editorMode2\"\nCodeEditorMode(CodeMirror);\n\nlet codeEditor = null;\n\nexport function initTextEditor (element) {\n let id = element;\n if (element[0] == '#') {\n id = element.substring(1);\n }\n codeEditor = CodeMirror.fromTextArea(document.getElementById(id), {\n theme: \"ttcn\",\n value: \"\",\n mode: \"text/x-ivprog\",\n indentUnit: 4,\n lineNumbers: true,\n matchBrackets: true,\n autoCloseBrackets: true,\n fixedGutter: true,\n styleActiveLine: true,\n readOnly: true\n });\n}\n\nexport function disable (flag) {\n codeEditor.setOption(\"readOnly\", flag);\n updateEditor();\n}\n\nexport function updateEditor () {\n codeEditor.refresh();\n}\n\nexport function setCode (code) {\n codeEditor.setValue(code);\n}\n\nexport function getCode () {\n return codeEditor.getValue();\n}\n","export const Types = Object.freeze({\n INTEGER: \"integer\",\n REAL: \"real\",\n TEXT: \"text\",\n CHAR: 'char',\n BOOLEAN: \"boolean\",\n VOID: \"void\"\n});","\nexport function renderErrorMessage (dom_obj_target, message_text) {\n\n\tdom_obj_target.popup({\n\t\thtml : '' + message_text,\n\t\ttransition : \"fade up\",\n\t\ton : 'click',\n \t\tclosable : true,\n \t\tmovePopup : true,\n \t\tboundary : window,\n \t\tpreserve : false,\n \t\ttarget : false,\n\t\tclassName : {\n\t\t popup : 'ui popup invalid-identifier'\n\t\t},\n\t\tonHidden : function($module) {\n\t\t\tdom_obj_target.popup('destroy');\n\t\t}\n\n\t}).popup('toggle');\n\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\nimport { isValidIdentifier } from \"./../util/utils\";\n\nvar counter_new_variables = 0;\n\nexport function addVariable (function_obj, function_container, is_in_click = false) {\n\tvar new_var = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_variable') + '_' + counter_new_variables, 0);\n\tif (function_obj.variables_list == null) {\n\t\tfunction_obj.variables_list = [];\n\t}\n\tfunction_obj.variables_list.push(new_var);\n\n\tcounter_new_variables ++;\n\n\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_VAR, new_var.name, Types.INTEGER, 0);\n\tvar newe = renderVariable(function_container, new_var, function_obj);\n\n\tif (is_in_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n}\n\nfunction updateName (variable_obj, new_name, variable_obj_dom, function_obj) {\n\n\tif (variable_obj.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (variableNameAlreadyExists(new_name, function_obj)) {\n\t\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_variable_duplicated', [new_name, function_obj.name]));\n\t\t} else {\n\t\t\tregisterUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_VAR, variable_obj.name, new_name);\n\t\t\tvariable_obj.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_identifier'));\n\t}\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nfunction removeVariable (variable_obj, variable_container, function_name) {\n\tvar function_associated = variable_container.data('associatedFunction');\n\tregisterUserEvent(function_name, ActionTypes.REMOVE_FUNCTION_VAR, variable_obj.name);\n\n\tvar index = function_associated.variables_list.indexOf(variable_obj);\n\tif (index > -1) {\n\t window.insertContext = true;\n\t delete function_associated.variables_list[index];\n\t function_associated.variables_list.splice(index, 1);\n\t}\n\tvariable_container.children().off();\n\tvariable_container.off();\n\tvariable_container.fadeOut();\n}\n\nfunction updateType (variable_obj, new_type, function_name, new_dimensions = 0) {\n\tvariable_obj.type = new_type;\t\t\n\tvariable_obj.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tvariable_obj.rows = new_dimensions;\n\t\tvariable_obj.columns = 2;\n\t}\n\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, variable_obj.name,\n\t\tnew_type, new_dimensions, variable_obj.rows, variable_obj.columns);\n\n\tupdateInitialValues(variable_obj, function_name);\n}\n\nfunction addHandlers (variable_obj, variable_container, function_obj) {\n\n\t// Manage variable name: \n\tvariable_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_VAR_NAME, variable_obj.name);\n\t\tenableNameUpdate(variable_obj, variable_container, function_obj);\n\t});\n\n\t// Menu to change type:\n\tvariable_container.find('.ui.dropdown.variable_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name);\n\t \t}\n\n\t \trenderValues(variable_obj, variable_container, function_obj.name);\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove variable: \n\tvariable_container.find( \".remove_variable\" ).on('click', function(e){\n\t\tremoveVariable(variable_obj, variable_container, function_obj.name);\n\t});\n\n}\n\nexport function renderVariable (function_container, new_var, function_obj) {\n\n\tvar element = '
';\n\n\telement += '
';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ]
';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ]
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
';\n\n element += '
'+new_var.name+'
';\n\n\telement += ' <—
'+new_var.value+'
'; \n\n\telement += '
';\n\n\telement = $(element);\n\n\telement.data('associatedFunction', function_obj);\n\n\tfunction_container.find('.variables_list_div').append(element);\n\n\taddHandlers(new_var, element, function_obj);\n\n\trenderValues(new_var, element, function_obj.name);\n\n\treturn element;\n}\n\nfunction updateColumnsAndRowsText (variable_container, variable_var) {\n\tvar prev = variable_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] [ ' + variable_var.rows + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n}\n\nfunction renderValues (new_var, variable_container, function_name) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\t\t\n\tif (new_var.dimensions == 0) {\n\t\tif (new_var.type == Types.REAL) {\n\t\t\tret += '
'+new_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+new_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '';\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+new_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+''+new_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\n\t\tif (new_var.dimensions == 2) {\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += ''+new_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tif (new_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += ''+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+new_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\t\t\n\t}\n\n\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\t$(ret).find('.span_value_variable').\t\tdata('associatedOject', new_var);\n\n\t$( ret ).find( \".boolean_simple_type\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name, new_var.value);\n\t\talternateBooleanValue(new_var, this.parentNode);\n\t});\n\t$( ret ).find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableValueUpdate(new_var, this.parentNode, function_name);\n\t});\n\n\t$( ret ).find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanVectorValue(new_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".vector_var\" ).on('click', function(e){\n\t\tenableVectorValueUpdate(new_var, $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( ret ).find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanMatrixValue(new_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableMatrixValueUpdate(new_var, $(this).data('row'), $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( variable_container ).find( \".div_valor_var\" ).append(ret);\n\n\tupdateColumnsAndRowsText(variable_container, new_var);\n\n}\n\nfunction alternateBooleanMatrixValue (var_obj, row, index, value_container) {\n\tvar_obj.value[row][index] = !var_obj.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[row][index]}`));\n}\n\nfunction addLineMatrix (var_obj) {\n\tvar_obj.rows ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n}\n\nfunction removeLineMatrix (var_obj) {\n\tif (var_obj.rows == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.rows --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction addColumnMatrix (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0.0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(true);\n\t\t}\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeColumnMatrix (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\n\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\tvar_obj.value[i].splice(var_obj.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnVector (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar_obj.value.push(0);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar_obj.value.push(0.0);\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar_obj.value.push(true);\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnVector (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction alternateBooleanValue (var_obj, value_container) {\n\tvar_obj.value = !var_obj.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value}`));\n}\n\nfunction alternateBooleanVectorValue (var_obj, index, value_container) {\n\tvar_obj.value[index] = !var_obj.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[index]}`));\n}\n\nfunction updateInitialValues (variable_obj, function_name) {\n\tif (variable_obj.type == Types.INTEGER) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0, 0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.REAL) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0.0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0.0, 0.0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.TEXT) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.BOOLEAN) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = true;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [true, true];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.CHAR) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 'A';\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = ['A', 'A'];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, variable_obj.name, variable_obj.value);\n}\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableVectorValueUpdate (var_obj, index, parent_node, function_name) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableValueUpdate (var_obj, parent_node, function_name) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tvar input_field;\n\n\tparent_node.find('.span_value_variable').text('');\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_global_ar = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tlet changed = false;\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else{\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (variable_obj, variable_container, function_obj) {\n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tvariable_container.find('.span_name_variable').text('');\n\n\tvar input_name;\n\n\tinput_name = $( \"\" );\n\tinput_name.insertBefore(variable_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t input_name.focus();\t\t\t\t\t\n\n\t var tmpStr = input_name.val();\n\t\tinput_name.val('');\n\t\tinput_name.val(tmpStr);\n\n\t input_name.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t} else {\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim().length > 0) {\n\t\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t} else {\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableMatrixValueUpdate (var_obj, row, index, parent_node, function_name) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\t\t\t\t\t\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n"],"sourceRoot":""}