main.7121176c0750a24caa1f.js.map 1.7 MB

1
  1. {"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/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/parseFromVisual.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","$castChar","$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","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","writeRawHTML","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","_context","Error","captureStackTrace","contextObj","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","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","command","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","_appendTextLn","newLine","_appendText","USER","write_time","Utils","divClass","getClassForType","textDiv","insertBefore","getOutputText","scrollTerm","filter","removeChild","INPUT","getUserInputText","scrollTop","scrollHeight","display","top","marginTop","showInput","scrollIntoView","removeEventListener","cNode","cloneNode","parentNode","replaceChild","click","promise","outputList","split","write","clearPendingWrites","parentElement","childNodes","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","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","registerEvent","registerSystemEvent","tag","getLogs","setRebuildMode","getLogsAsString","parseLogs","logData","toChar","debug","toReal","toBool","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","con","TestConsole","autoAssessment","runTest","TYPES","VARIABLE","CONST","RELATIONAL","LOGIC","ARITHMETIC","getOpType","expressionWalker","funcObj","paramsList","opType","opValue","arrayClass","expressionAST","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","_type","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","delay","show","remove","globalsCode","has_error","n_code","functionsCode","function_obj","return_type","TEXT","return_dimensions","is_main","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","repeatNtimesHeader","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","isBackslash","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","lockexpression","CodeGenerator","toggle","toggleClass","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","expressionEdition","inputExpression","afterWhichElement","lockButton","editButton","ex","ok_button","cancel_button","focusout","keyup","parsed","mousedown","len","setSelectionRange","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","collapsed","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","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","getVariable","search","variavel","system_functions","expressionParserToVisual","input_field","var_not_found","fun_not_found","ivprogCore","funcao","uniqueWords","Set","exp_obj","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","inputWidth","textWidth","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","var_obj","var_fun","parameters_menu","AttribuitionsManagement","variable_render","openInputToValue","sub_menu","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","RepeatNTimesManagement","tmpStr","function_selected","field","rendered","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","slideToggle","renderFunctionReturn","function_element","tm","cont","appender","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","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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,wEAAwE;AACxE,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;;;;AAIA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;;AAGA,OAAO;AACP;AACA;;AAEA,iBAAiB,mBAAO,CAAC,oDAAc;;AAEvC,OAAO;AACP,Y;;;;;;;;;;;;ACziBA;AAAA;;AAEe;AACbA,eAAa,EAAE,MADF;AAEbC,OAAK,EAAE,MAFM;AAGbC,QAAM,EAAE,OAHK;AAIbC,cAAY,EAAE,mBAJD;AAKbC,cAAY,EAAE,gBALD;AAMbC,gBAAc,EAAE,kBANH;AAObC,YAAU,EAAE,WAPC;AAQbC,SAAO,EAAE,QARI;AASbC,YAAU,EAAE,WATC;AAUbC,YAAU,EAAE,WAVC;AAWbC,SAAO,EAAE,SAXI;AAYbC,SAAO,EAAE,SAZI;AAabC,QAAM,EAAE,YAbK;AAcbC,SAAO,EAAE,UAdI;AAebC,WAAS,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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;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;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M;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;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,SAASgtB,UAAT,CAAqB7nB,KAArB,EAA4B8nB,MAA5B,EAAoC;AAClC,OAAK,IAAMC,GAAX,IAAkBD,MAAlB,EAA0B;AACxB,QAAGjc,MAAM,CAACmc,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCJ,MAArC,EAA6CC,GAA7C,CAAH,EAAqD;AACnD,UAAID,MAAM,CAACC,GAAD,CAAN,KAAgB/nB,KAApB,EAA2B;AACzB,eAAO+n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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,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;A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AAZ,GAhCc,CAkCd;;AACAkoB,uCAAiC,GAAG,KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;;AACD,QAAGx2B,IAAI,IAAI,EAAX,EAAe;AACd,UAAIopB,OAAO,CAAC3gE,IAAR,IAAgBkL,4CAAK,CAACiG,IAA1B,EAAgC;AAC/B65D,mBAAW,CAACtzD,IAAZ,CAAiB,sBAAjB,EAAyChV,IAAzC,CAA8Ci+D,OAAO,CAACjgE,KAAR,CAAc+pD,GAAd,EAAmBniD,KAAnB,EAA0BlK,OAA1B,CAAkC,CAAlC,CAA9C;AACA,OAFD,MAEO;AACN4sE,mBAAW,CAACtzD,IAAZ,CAAiB,sBAAjB,EAAyChV,IAAzC,CAA8Ci+D,OAAO,CAACjgE,KAAR,CAAc+pD,GAAd,EAAmBniD,KAAnB,CAA9C;AACA;;AACDi2D,iBAAW,CAACpZ,GAAZ;AACAoZ,iBAAW,CAAC3Y,MAAZ,GAPc,CASd;;AACAkoB,uCAAiC,GAAG,KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;AACD,GAtDD;AAwDAxP,aAAW,CAAC0M,MAAZ;AACA,C","file":"main.7121176c0750a24caa1f.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-48289T1aitCa3P7nn/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 $castChar: \"to_char\",\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}","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\";\n/*import * 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-48289mryj67g3StD5/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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Caso de teste $0 não executou com sucesso.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Caso de teste $0 falhou</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, 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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, 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\":\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, 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.\"}}","\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Caso de teste $0</span>: OK</div>\",\"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\":\"A solução submetida não lê todas entradas disponíveis no caso de teste 1\",\"testcase_autogen_empty\":\"Sua solução não gerou qualquer saída para o caso de teste $0.\",\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"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 submitted solution does not read all inputs available in the test case $0\",\"testcase_autogen_empty\":\"Your solution did not generate any output for test case $0.\",\"success_execution\":\"Program execution finished!\",\"aborted_execution\":\"Program execution was aborted!\",\"unexpected_execution_error\":\"Unexpected error during program execution.\"},\"es\":{\"test_case_success\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"test_case_duration\":\"Tardó $0ms\",\"test_suite_grade\":\"Su solución obtuvo $0% de la calificación.\",\"awaiting_input_message\":\"Su programa se está ejecutando y esperando una entrada. Escriba algo y presione ENTER ...\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"El programa no generó suficientes resultados.\",\"testcase_autogen_unused_input\":\"La solución presentada no lee todas las entradas disponibles en el caso de prueba 1\",\"testcase_autogen_empty\":\"Su solución no generó ningún resultado para el caso de prueba de $ 0.\",\"success_execution\":\"¡Ejecución del programa terminada!\",\"aborted_execution\":\"¡La ejecución del programa fue abortada!\",\"unexpected_execution_error\":\"Error inesperado durante la ejecución del programa.\"}}","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\",\"expression_invalid\":\"Expressão inválida. Verifique a sintáxe antes de continuar.\",\"expression_undelcared_variable\":\"Variáveis não declaradas:\",\"expression_undeclared_function\":\"Funções não definidas:\",\"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_lock_expression\":\"Bloquear expressão\",\"text_unlock_expression\":\"Desbloquear expressão\",\"text_edit_expression\":\"Editar expressão manualmente\",\"text_edit_expression_confirm\":\"Confirmar edição\",\"text_edit_expression_cancel\":\"Cancelar edição\",\"text_add_function\":\"Adicionar uma nova função ao programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Adicionar um novo parâmetro\",\"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. <br> 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\":\"Espaço\",\"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\",\"write_seprator_menu_tooltip\":\"Separador para imprimir mais valores/variáveis\"},\"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\",\"expression_invalid\":\"Invalid expression. Check the syntax before proceeding.\",\"expression_undelcared_variable\":\"Undeclared variables:\",\"expression_undeclared_function\":\"Undefined functions:\",\"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_lock_expression\":\"Block expression\",\"text_unlock_expression\":\"Unlock expression\",\"text_edit_expression\":\"Edit expression manually\",\"text_edit_expression_confirm\":\"Confirm edition\",\"text_edit_expression_cancel\":\"Cancel edition\",\"text_add_function\":\"Add a new function to the program\",\"text_move_command\":\"Move command\",\"text_add_parameters\":\"Add a new parameter\",\"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.<br> 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\":\"Spacer\",\"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\",\"write_seprator_menu_tooltip\":\"Separator used to print more values/variables\"},\"es\":{\"function\":\"function\",\"btn_clear\":\"Limpiar\",\"btn_function\":\"Funcíon\",\"btn_arithmetic_plus\":\"Adición\",\"btn_arithmetic_minus\":\"Sustracción\",\"btn_arithmetic_multiplication\":\"Multiplicación\",\"btn_arithmetic_division\":\"División\",\"btn_arithmetic_module\":\"Resto\",\"btn_break\":\"break\",\"btn_case\":\"Caso\",\"expression_invalid\":\"Expresión no válida. Verifique la sintaxis antes de continuar.\",\"expression_undelcared_variable\":\"Variables no declaradas:\",\"expression_undeclared_function\":\"Funcíon no declaradas:\",\"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\":\"texto\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"nueva_función\",\"matrix\":\"matriz\",\"vector\":\"vector\",\"text_lock_expression\":\"Expresión de bloque \",\"text_unlock_expression\":\"Desbloquear expresión \",\"text_edit_expression\":\"Editar expresión manualmente \",\"text_edit_expression_confirm\":\"Confirmar edición\",\"text_edit_expression_cancel\":\"Cancelar edición\",\"text_add_function\":\"Agregar una nueva función al programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Agregar un nuevo parámetro\",\"text_comment_start\":\"Comentario inicial de la función\",\"text_comment_main\":\"Esta es la función principal\",\"text_read_var\":\"Entrada/Lectura de dados\",\"text_write_var\":\"Salida/Escribir datos\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Devolución\",\"text_comment\":\"Comentario\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vector de $0\",\"text_attribution\":\"Asignación\",\"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\":\"Programación\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritmética\",\"text_iftrue\":\"Si verdad entonces\",\"text_message_error_activity_file\":\"Se produjo un error al procesar la actividad.<br> Recargar la página para volver a intentarlo.\",\"text_message_error_activity_reload\":\"Recargar\",\"text_repeatNtimes\":\"Repetir N veces\",\"text_receives\":\"receives\",\"text_whiletrue\":\"Mientras verdad\",\"text_dowhiletrue\":\"Repita hasta verdad\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Llamada de función\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Paréntesis\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Incluir el algoritmo en la actividad.\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configuraciones\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Funciones\",\"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\":\"Antes de usar una variable, debe crearla\",\"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\":\"Proporcionar algunos datos\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Borra el terminal eliminando todo el texto escrito y pendiente.\",\"tooltip_terminal_show\":\"Muestra el terminal si está oculto.\",\"tooltip_terminal_hide\":\"Oculta el terminal si no está en exhibición\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"Al activar el filtro, las modificaciones en iVProg serán bloqueadas\",\"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\":\"Antes de generar las salidas necesita crear un algoritmo\",\"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\":\"El salto de línea está activado\",\"write_command_newline_off\":\"El salto de línea está desactivado\",\"write_seprator_menu_text\":\"Spacer\",\"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\",\"write_seprator_menu_tooltip\":\"Separator used to print more values/variables\"}}","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 this.domConsole.writeRawHTML(msg, channel);\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 `<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='content-type' content='text/html; charset=UTF-8'>\n <link rel='stylesheet' href='css/ivprog-assessment.css' type='text/css'/>\n </head>\n <body>\n :assessment-result:\n </body>\n </html>`;\n }\n\n static get DETAIL_TEMPLATE () {\n return `<div class='details-body'>\n <div class='details-header'>\n <h2>:test-name:</h2>\n <p>:time-label:: <span>:time:ms</span></p>\n <p>:grade-label:: <span>:grade:%</span></p>\n </div>\n <div>\n <h3>:input-label:</h3>\n <ul>\n <li>:input-list:</li>\n </ul>\n </div>\n <div>\n <h3>:output-label:</h3>\n :output-result:\n </div>\n </div>`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `<div class='detaisl-div-table'>\n <table class='assessment-output-table'>\n <tr>\n <th>:expected-label:</th>\n <th>:generated-label:</th>\n <th>:result-label:</th>\n </tr>\n :results:\n </table>\n </div>`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `<tr><td class=':class-expected:'>$0</td>\n <td class=':class-generated:'>$1</td>\n <td class=':class-result:'>$2</td></tr>`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `<div class='assessment-popup'><img class='assessment-empty-output' src='img/empty.svg'>\n <span class='assessment-popuptext'>$0</span></div>`;\n }\n\n static get FAILED_TEMPLATE () {\n return `<p class='assessment-failed-execution'><span class='assessment-failed-case'>✗</span>$0</p>`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `<span class='$0'>$1</span>`;\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(/> *</g, '><');\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\", \"<span class='assessment-failed-case'>✗</span>\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"<span class='$0'>$1</span>\"\n // Fix missing whitespace when its a single element\n text = text.replace(/\\s/g,\"&#160;\");\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 constructor (msg, id) {\n super(...msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, SyntaxError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\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(\n LocalizedStrings.getError(message_id, context),\n message_id\n );\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 const error = createError(\"token_missing_one\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n const error = SyntaxErrorFactory.token_missing_one(line, token);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"id_missing\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n eos_missing: (token) => {\n const context = [token.line, token.column];\n const error = createError(\"eos_missing\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.column, typeName];\n const error = createError(\"invalid_array_dimension\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_array_size\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n const error = createError(\"invalid_main_return\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_var_declaration\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n const error = createError(\"invalid_break_command\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"invalid_terminal\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.column, line];\n const error = createError(\"invalid_type\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n const_not_init: (token) => {\n const context = [token.line, token.column];\n const error = createError(\"const_not_init\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"invalid_id_format\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"duplicate_function\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"duplicate_variable\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_character: (text, line, column) => {\n const context = [text, line];\n const error = createError(\"invalid_character\", context);\n error.context = { line: line, column: column };\n return error;\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n const error = createError(\"annonymous_array_literal\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n const error = createError(\"invalid_matrix_literal_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_column\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_vector_size\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"matrix_to_vector_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"vector_to_matrix_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_init_not_literal\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_exceeds_2d\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_id_dimension\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_vector_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 static createParser (input) {\n const lexerClass = LanguageService.getCurrentLexer();\n return new IVProgParser(input, lexerClass);\n }\n\n // <BEGIN scope consts>\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 // </ END scope consts>\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 = [\n 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 (\n token.type === this.lexerClass.RK_CONST ||\n this.isVariableType(token)\n ) {\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(\n this.lexer.literalNames[this.lexerClass.RK_PROGRAM],\n token\n );\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if (this.lexerClass.OPEN_CURLY !== token.type) {\n if (!attempt) throw SyntaxErrorFactory.token_missing_one(\"{\", token);\n else 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) throw SyntaxErrorFactory.token_missing_one(\"}\", token);\n else 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) throw SyntaxErrorFactory.eos_missing(eosToken);\n else 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(\n this.getTypeArray()\n ),\n 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(\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n );\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(\n idString,\n typeString,\n initial,\n isConst\n );\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].concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration];\n }\n }\n }\n\n parseArrayDeclaration (\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n ) {\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 (\n dim1 instanceof Expressions.VariableLiteral ||\n dim2 instanceof Expressions.VariableLiteral\n ) {\n dim_is_id = true;\n if (dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(\n SourceInfo.createSourceInfo(equalsToken)\n );\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(\n SourceInfo.createSourceInfo(equalsToken)\n );\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(\n SourceInfo.createSourceInfo(equalsToken)\n );\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(\n idString,\n sourceInfo\n );\n }\n }\n\n if (dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\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(\n idString,\n new ArrayType(typeString, dimensions),\n n_lines,\n n_columns,\n initial,\n isConst\n );\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].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(\n this.lexer.literalNames[this.lexerClass.RK_INTEGER],\n dimToken\n );\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(\n SourceInfo.createSourceInfo(invalid_token)\n );\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(\n SourceInfo.createSourceInfo(beginArray)\n );\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(\n beginArray,\n endArray\n );\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(\n SourceInfo.createSourceInfo(beginArray)\n );\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(\n beginArray,\n endArray\n );\n if (lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.getText(\n beginArray.start,\n endArray.stop\n );\n throw SyntaxErrorFactory.invalid_matrix_literal_line(\n expString,\n sourceInfo\n );\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(\n functionID,\n returnType,\n formalParams,\n commandsBlock\n );\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(\n LanguageDefinedFunction.getMainFunctionName(),\n this.lexer.literalNames[this.lexerClass.RK_VOID],\n token.line\n );\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) 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 (\n token.type !== this.lexerClass.ID &&\n token.type !== this.lexerClass.LIB_ID\n ) {\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 (\n token.type === this.lexerClass.ID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\n return Types.VOID;\n } else if (\n token.type === this.lexerClass.RK_VOID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\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 const cmd = this.parseCommand();\n if (cmd === null) 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 (\n token.type === this.lexerClass.RK_WHILE ||\n token.type === this.lexerClass.RK_WHILE_ALT\n ) {\n return this.parseWhile();\n } else if (\n token.type === this.lexerClass.RK_FOR ||\n token.type === this.lexerClass.RK_FOR_ALT\n ) {\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(\n this.lexer.literalNames[this.lexerClass.RK_DO_UNTIL],\n whileToken\n );\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(\n [this.lexer.literalNames[this.lexerClass.RK_IF], \"{\"],\n maybeIf\n );\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(\n logicalExpression,\n cmdBlocks,\n elseBlock\n );\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(\n for_id,\n for_from,\n for_to,\n maybePass,\n commandsBlock\n );\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 const token = this.getToken();\n this.pos++;\n this.checkEOS();\n this.pos++;\n const command = new Commands.Break();\n command.sourceInfo = SourceInfo.createSourceInfo(token);\n return command;\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(\n id,\n lineExpression,\n columnExpression,\n exp\n );\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(\n [\"=\", \"(\"],\n equalOrParenthesis\n );\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(\n \"Error de sintaxe no comando repita_para: esperava-se \" +\n keyword +\n \" mas encontrou \" +\n from_token.text\n );\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(\n \"Error de sintaxe no comando repeita_para: \" +\n int_or_id.text +\n \" não é compativel com o esperado para o paramentro \" +\n keyword +\n \". O valor deve ser um inteiro ou variável.\"\n );\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(\n this.lexer.literalNames[this.lexerClass.RK_CASE],\n token\n );\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 } 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(\n convertFromString(token.text),\n this.parseTerm()\n );\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 } 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)\n ? this.functionTypes\n : 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 static get BASH_TEMPLATE () {\n return `\n <div class=\"bash-title\">\n <i id=\"ivprog-console-clearbtn\" class=\"icon eraser\" style=\"float:left;padding-left: 5px\"></i>\n <span>Terminal</span>\n <i id=\"ivprog-console-showbtn\" class=\"icon window maximize outline\" style=\"float:right\"></i>\n <i id=\"ivprog-console-hidebtn\" class=\"icon window minimize outline\" style=\"float:right\"></i>\n </div>\n <div id='ivprog-term' class=\"bash-body\"></div>`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n <div id=\"cmd\">\n <span></span>\n <div id=\"cursor\"></div>\n </div>`;\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.input.setAttribute(\"autocomplete\", \"off\");\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\n .$(this.clearBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_clear\") });\n window\n .$(this.showBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_show\") });\n window\n .$(this.hideBtn)\n .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) 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 writeRawHTML (text, channel) {\n this._appendTextLn(text, channel, 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 // console.debug(\"Caling appendText\");\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) textDiv.innerHTML = this.getOutputText(text);\n else textDiv.innerHTML = `<span>${text}</span>`;\n if (this.currentLine != null && this.currentLine.innerHTML.length === 0) {\n this.termDiv.removeChild(this.currentLine);\n }\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, \"&#160;\");\n return `<span>${text}</span>`;\n }\n\n getUserInputText (text) {\n if (text.trim().length == 0) {\n text = \"&nbsp;\";\n }\n return `<i class=\"icon keyboard outline\" style=\"float:left\"></i><span>${text}</span>`;\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(\n \"click\",\n this.blinkCaretAndFocus.bind(this)\n );\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) 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, \"&#x0020;&#x0020;\");\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length !== 0) {\n this.write(t);\n }\n this.write(\"\", true);\n }\n let t = outputList[i];\n t = t.replace(/\\t/g, \"&#x0020;&#x0020;\");\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length != 0) this.write(t);\n } else {\n // console.debug(\"no newline\");\n output = output.replace(/\\t/g, \"&#x0020;&#x0020;\");\n output = output.replace(/\\s/g, \"&#x0020;\");\n if (output.length != 0) this.write(output);\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(\n this.inputDiv.parentElement.firstChild\n );\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(\n this.notifyIdle.bind(this),\n Config.idle_input_interval\n );\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 {\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n} from \"./visualUI/functions\";\nimport * as LocalizedStringsService from \"./services/localizedStringsService\";\nimport { i18nHelper } from \"./services/i18nHelper\";\nimport {\n ActionTypes,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n} from \"./services/userLog\";\nimport {\n prepareActivityToStudentHelper,\n autoEval,\n} from \"./util/iassignHelpers\";\nimport { openAssessmentDetail } from \"./util/utils\";\nimport { Config } from \"./util/config\";\nimport { parseExpression } from \"./util/parseFromVisual\";\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 parseExpression,\n};\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), i18n_id);\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(\n LocalizedStrings.getError(i18n_id, context),\n i18n_id\n );\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 const error = createSemanticError(\"symbol_not_found_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"function_missing_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\n \"array_dimension_not_int_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"unknown_command_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n },\n unknown_command: () => {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp,\n source_info\n ) => {\n if (source_info) {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n source_info.line,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n const error = createSemanticError(\"incompatible_types_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.incompatible_types(\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp\n );\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\n \"incompatible_types_array_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"loop_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"endless_loop_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"if_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\"invalid_case_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"void_in_expression_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_array_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_matrix_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"matrix_column_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"matrix_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"vector_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"vector_not_matrix_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_void_return_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_return_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\n \"invalid_parameters_size_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(\n id,\n expected,\n actual\n );\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 = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_parameter_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"unexpected_break_command_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_type_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_line_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_column_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(\n expected,\n actual\n );\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 = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createRuntimeError(\"invalid_unary_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight,\n sourceInfo\n ) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n const error = createRuntimeError(\"invalid_infix_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_infix_op(\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n );\n }\n },\n invalid_infix_op: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n ) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createSemanticError(\n \"array_dimension_not_positive_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n source_info.line,\n exp,\n LocalizedStrings.translateType(type, dim),\n name,\n ];\n const error = createRuntimeError(\"invalid_read_type\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_read_type_array: (\n exp,\n typePos,\n dimPos,\n name,\n typeArray,\n dimArray,\n sourceInfo\n ) => {\n const context = [\n sourceInfo.line,\n exp,\n LocalizedStrings.translateType(typePos, dimPos),\n name,\n LocalizedStrings.translateType(typeArray, dimArray),\n ];\n const error = createRuntimeError(\"invalid_read_type_array\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_const_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_const_ref\", context);\n return error;\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if (source_info) {\n const context = [source_info.line, var_id];\n const error = createSemanticError(\n \"invalid_const_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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: (\n left_id,\n left_size,\n right_id,\n right_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_size,\n right_id,\n right_size,\n ];\n const error = createRuntimeError(\n \"invalid_vector_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(\n left_id,\n left_size,\n right_id,\n right_size\n );\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: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n );\n }\n },\n invalid_matrix_assignment: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n ) => {\n const context = [\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\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 const error = createSemanticError(\"matrix_to_vector_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createSemanticError(\"vector_to_matrix_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_matrix_index_assign_full: (\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n mat_line,\n mat_id,\n mat_size,\n exp,\n exp_size,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_index_assign_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size\n );\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: (\n expected_num,\n exp,\n actual_num,\n source_info\n ) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n const error = createRuntimeError(\"invalid_number_elements_vector\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createRuntimeError(\"invalid_number_lines_matrix\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n divsion_by_zero_full: (exp, source_info) => {\n if (source_info) {\n const context = [source_info.line, exp];\n const error = createRuntimeError(\"divsion_by_zero_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createRuntimeError(\"undefined_tanget_value\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_log_value: (source_info) => {\n const error = createRuntimeError(\"negative_log_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [\n source_info.line,\n local_fun_name,\n index,\n str,\n str.length - 1,\n ];\n const error = createRuntimeError(\"invalid_string_index\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_sqrt_value: (source_info) => {\n const error = createRuntimeError(\"negative_sqrt_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n const error = createRuntimeError(\"exceeded_recursive_calls\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n const error = createSemanticError(\"invalid_for_variable\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_from\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_to\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_pass\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n exceed_max_instructions: () => {\n return createRuntimeError(\"exceed_max_instructions\");\n },\n});\n\n","export class RuntimeError extends Error {\n constructor (msg, id) {\n super(...msg);\n this.id = id;\n if (Error.captureStackTrace) Error.captureStackTrace(this, RuntimeError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\n\n","export class SemanticError extends Error {\n constructor (msg, id) {\n super(...msg);\n this.id = id;\n if (Error.captureStackTrace) Error.captureStackTrace(this, SemanticError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\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 = await 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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<Store>}\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<import('./store/value/istore_value').IStoreValue>}\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<StoreValue[]>}\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<StoreValue[]>} 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<StoreValue[][]>}\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 * as Parsers 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(Parsers.convertToString(val.get(), val.type));\n }\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(writeFunction)]\n );\n const func = new Commands.Function(\n \"$write\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", false, true)],\n block\n );\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 = Parsers.toInt(text.trim()).trunc();\n type = Types.INTEGER;\n } else if (typeToConvert.isCompatible(Types.REAL)) {\n result = Parsers.toReal(text.trim());\n type = Types.REAL;\n } else if (typeToConvert.isCompatible(Types.BOOLEAN)) {\n result = Parsers.toBool(text.trim());\n type = Types.BOOLEAN;\n } else if (typeToConvert.isCompatible(Types.STRING)) {\n result = Parsers.toString(text);\n type = Types.STRING;\n } else if (typeToConvert.isCompatible(Types.CHAR)) {\n result = Parsers.toChar(text);\n type = Types.CHAR;\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(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n arrayInfo.type,\n dim,\n this.function_call_stack.pop()\n );\n }\n throw ProcessorErrorFactory.invalid_read_type(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n this.function_call_stack.pop()\n );\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(\n [],\n [new Commands.SysCall(readFunction)]\n );\n const func = new Commands.Function(\n \"$read\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", true)],\n block\n );\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});","/* global iLMparameters*/\nimport Lexers from \"./../../grammar/\";\nimport line_i18n from \"line-i18n\";\nimport { Config } from \"./../util/config\";\n\nclass LanguageServiceExtended extends line_i18n.LanguageServiceNoLS {\n constructor () {\n super(\n typeof iLMparameters === \"undefined\"\n ? Config.default_lang\n : iLMparameters.lang\n );\n }\n\n getDefaultLang () {\n return \"en\";\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 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) return this.getUI(\"matrix_info_string\", [type_string]);\n else 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(\n new IVProgLocalizedStrings(LanguageService, Langs, true)\n);\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 console.debug(str, str.length);\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[0];\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}\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 //console.debug(code);\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 try {\n const ast_code = SemanticAnalyser.analyseFromSource(code);\n const con = new TestConsole([]);\n const autoAssessment = new IVProgAssessment(\n ast_code,\n original.testcases,\n con\n );\n autoAssessment\n .runTest()\n .then((grade) => callback(grade))\n .catch((err) => {\n console.log(err);\n callback(-5); // @FeedbackConvention Falha na execução\n });\n } catch (e) {\n console.error(e);\n callback(-5);\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 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 const output = \"\" + text;\n if (output.indexOf(\"\\n\") !== -1) {\n const outputList = output.split(\"\\n\");\n const last = outputList.pop();\n outputList.forEach((t) => {\n //t = t.replace(/\\t/g, '&#x0020;&#x0020;');\n //t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length == 0) this.currentLine = null;\n else this.write(t, true);\n });\n //last = last.replace(/\\t/g, '&#x0020;&#x0020;');\n //last = last.replace(/\\s/g, \"&#x0020;\");\n if (last.length != 0) this.write(last);\n } else {\n //output = output.replace(/\\t/g, '&#x0020;&#x0020;');\n //output = output.replace(/\\s/g, \"&#x0020;\");\n this.write(output);\n }\n }\n}\n","import { IVProgParser } from \"../ast/ivprogParser\";\nimport * as Expressions from \"../ast/expressions\";\nimport { Types } from \"../typeSystem/types\";\nimport { convertBoolToString } from \"../typeSystem/parsers\";\n\nconst TYPES = {\n VARIABLE: \"var\",\n CONST: \"const\",\n FUNCTION: \"function\",\n RELATIONAL: \"relational\",\n LOGIC: \"logic\",\n ARITHMETIC: \"arithmetic\",\n};\n\nfunction translateOp (type, op) {\n switch (type) {\n case TYPES.ARITHMETIC:\n return op.value;\n case TYPES.RELATIONAL:\n return op.value;\n case TYPES.LOGIC: {\n if (op.ord === 11) {\n return \"and\";\n } else if (op.ord === 12) {\n return \"or\";\n } else {\n return \"not\";\n }\n }\n }\n}\n\nfunction getOpType (op) {\n switch (op.ord) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n return TYPES.ARITHMETIC;\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n return TYPES.RELATIONAL;\n default:\n return TYPES.LOGIC;\n }\n}\n\nfunction expressionWalker (expression) {\n let result;\n if (expression instanceof Expressions.VariableLiteral) {\n result = [\n { instance: \"expression\", type: TYPES.VARIABLE, value: expression.id },\n ];\n } else if (expression instanceof Expressions.FunctionCall) {\n const funcObj = {\n instance: \"expression\",\n type: TYPES.FUNCTION,\n value: expression.id,\n };\n const paramsList = expression.actualParameters.map((e) =>\n expressionWalker(e)\n );\n //const params = Array.prototype.concat.apply([], paramsList);\n funcObj.params = paramsList;\n result = [funcObj];\n } else if (expression instanceof Expressions.UnaryApp) {\n const left = expressionWalker(expression.left);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [{ instance: \"operator\", type: opType, value: opValue }, ...left];\n } else if (expression instanceof Expressions.InfixApp) {\n const left = expressionWalker(expression.left);\n const right = expressionWalker(expression.right);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [\n ...left,\n { instance: \"operator\", type: opType, value: opValue },\n ...right,\n ];\n } else if (expression instanceof Expressions.ArrayAccess) {\n const line = expressionWalker(expression.line);\n let arrayClass = \"vector\";\n let column = null;\n if (expression.column) {\n arrayClass = \"matrix\";\n column = expressionWalker(expression.column);\n }\n result = [\n {\n instance: \"expression\",\n type: TYPES.VARIABLE,\n class: arrayClass,\n column: column,\n line: line,\n value: expression.id,\n },\n ];\n } else if (expression instanceof Expressions.BoolLiteral) {\n const value = expression.value;\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: convertBoolToString(value),\n },\n ];\n } else {\n let value = expression.value;\n if (expression.value.toNumber) {\n if (\n Types.REAL.isCompatible(expression.type) &&\n expression.value.decimalPlaces() == 0\n ) {\n value = expression.value.toFixed(2);\n } else {\n value = expression.value.toNumber();\n }\n }\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: value,\n },\n ];\n }\n if (expression.parenthesis) return [\"(\", ...result, \")\"];\n else return result;\n}\n\nexport function parseExpression (text) {\n const parser = IVProgParser.createParser(text);\n const expressionAST = parser.parseExpressionOR();\n return expressionWalker(expressionAST);\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.<string>} 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.<string>} 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: A<ins>BA</ins>C -> <ins>AB</ins>AC\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 writeRawHTML (text) {\n this._appendTextLn(text);\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, '&#x0020;&#x0020;');\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length == 0)\n this.currentLine = null;\n else\n this.write(t, true);\n });\n last = last.replace(/\\t/g, '&#x0020;&#x0020;');\n last = last.replace(/\\s/g, \"&#x0020;\");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, '&#x0020;&#x0020;');\n output = output.replace(/\\s/g, \"&#x0020;\");\n this.write(output);\n }\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\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\n\tif (settingsFilter && settingsFilter[0]) {\n blockAllEditingOptions();\n\t\t} \n\t\n\t$('.command_drag').popup({\n content : LocalizedStrings.getUI(\"text_move_command\"),\n delay: {\n show: 1000,\n hide: 0\n }\n });\n\t\t\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 if (function_obj.is_main) {\n ret += LocalizedStrings.getUI(\"start\");\n } else {\n ret += function_obj.name;\n }\n ret += \" ( \";\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( ' <i class=\"ui icon red exclamation triangle error_icon\"></i> ' );\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\nexport function repeatNtimesHeader (command_obj) {\n let ret = \"\";\n if (command_obj.var_attribution) {\n ret += '<span class=\"repeatN_text_par_1\">';\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += '</span>';\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += '<span class=\"repeatN_text_par_2\">';\n ret += variableValueMenuCode(command_obj.expression1);\n ret += '</span>';\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += '<span class=\"repeatN_text_par_3\">';\n ret += variableValueMenuCode(command_obj.expression2);\n ret += '</span>';\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n ret += '<span class=\"repeatN_text_par_4\">';\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 ret += '</span>';\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 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\nexport function 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\nexport function 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 const content = String(variable_obj.content);\n if (isNaN(content)) {\n // console.debug(\"Content length: \", content.length);\n // console.debug(\"Char code at 0\", content.charCodeAt(0));\n const isBackslash = content.charCodeAt(0) === 92;\n if (content.length === 1 || (content.length === 2 && isBackslash)) {\n ret += `'${content}'`;\n } else {\n ret += '\"' + variable_obj.content + '\"';\n }\n } else if (content.length == 0) {\n ret += '\"\"';\n } else if (content.trim().length == 0) {\n ret += '\"' + 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\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\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 = $('<div class=\"ghost_div\">');\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\t//console.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\t//console.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\t//console.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\t//console.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\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\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\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 = $('<i class=\"ui icon trash alternate outline\"></i>');\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\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\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\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\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\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\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\t\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\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\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\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\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\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\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\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\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}\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\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\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\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\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\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\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\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\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\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\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\tif (command_parent == command_target) {\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\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\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\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\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\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\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\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\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\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\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\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\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\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\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\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\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\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\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';\nimport * as CodeGenerator from '../code_generator';\nimport { renderAlgorithm } from '../algorithm';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui attribution created_element\"> <i class=\"ui icon small arrow left\"></i> <span> x <&#8212; 1 + 1 </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui attribution command_container\"><i class=\"ui icon small arrow left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_attributed\"></div> <span class=\"text_attr_receives span_command_spec\">'+LocalizedStrings.getUI('text_receives')+'</span> '\n\t\t + '<div class=\"expression_elements\"></div> <span class=\"textual_expression\"></span> <i class=\"ui icon i cursor button_write_expression\"></i> <i class=\"ui icon unlock button_alternate_expression\"></i> </div>');\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\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 = $('<div class=\"expression_element\"></div>');\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 = '<div class=\"ui dropdown\"><div class=\"text\">';\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 += '</div><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.plus+'\">+</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.minus+'\">-</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.multiplication+'\">*</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.division+'\">/</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.module+'\">%</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.none+'\" data-text=\"...\">Nenhum</div>';\n\tcontext_menu += '</div></div>';\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\t\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 = '<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"ui icon arrow alternate circle right outline\"></i><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n\tcontext_menu += '</div></div>';\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 = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_1 = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_2 = $('<div class=\"component_element\"></div>');\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 = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\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 = $('<div class=\"component_element\"> ( </div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_par_2 = $('<div class=\"component_element\"> ) </div>');\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 = $('<div class=\"menu_add_item\"></div>');\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 = $('<div class=\"expression_element\"></div>');\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 = $('<div class=\"expression_element\">'+command.expression[i]+'</div>');\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 = '<div class=\"expression_element\">';\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 += '</div>';\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 = $('<div class=\"menu_add_item\"></div>');\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 = '<div class=\"ui dropdown context_menu_clear\"><i class=\"ui icon plus square outline\"></i><div class=\"menu\">';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"value\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_value')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"operator\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_operator')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"parentheses\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_parentheses')+'</div>';\n\t\tcontext_menu += '</div></div>';\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_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(attribution_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = attribution_dom.find('.expression_elements');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = attribution_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = ExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = ExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\n\tattribution_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(attribution_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t\tif (command.lockexpression) {\n\t\t\t\tattribution_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tattribution_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\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 = '<div class=\"ui dropdown menu_operations\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '<div class=\"item\" data-option=\"'+tm+'\">'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'</div>';\n }\n menu_operations += '<div class=\"item\" data-option=\"clear\">'+LocalizedStrings.getUI('btn_clear')+'</div>';\n\t\n menu_operations += '</div></div>';\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$('<span> ( </span>').insertBefore(dom_object);\n\t$('<span> ) </span>').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 $('<div class=\"ui comment created_element\"> <i class=\"ui icon small pause\"></i> <span> '+LocalizedStrings.getUI('text_break')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small pause\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span>'+LocalizedStrings.getUI('text_break')+'</span> </div>');\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 $('<div class=\"ui comment created_element\"> <i class=\"ui icon small quote left\"></i> <span class=\"span_comment_text\" \"> '+LocalizedStrings.getUI('text_comment')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small quote left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> <div class=\"div_comment_text\">'+'</div> </div>');\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 = $('<div class=\"expression_elements\"></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 = $('<div class=\"ui restart_expression\"><i class=\"ui icon undo\"></i></div>');\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 = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\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 = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\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 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\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 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\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 += '<div class=\"ui dropdown menu_start_rendered\"><div class=\"text\"><i>'+LocalizedStrings.getUI('expression_menu_select')+'</i></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_logic+'\">'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)</div>';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_arithmetic+'\">'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)</div>';\n\tstart_menu += '</div></div>';\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(' <span class=\"span_command_spec\"> </span> ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' <span class=\"span_command_spec\"> </span> ');\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 = '<div class=\"ui dropdown menu_commands pause\" ><button><i class=\"icon code\"></i></button> <div class=\"menu\"> ';\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 += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\n\t} else {\n\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switchcase+'\"><i class=\"plus icon\"></i> '+LocalizedStrings.getUI('btn_case')+' </a>';\n\n\t}\n\n\tmenu_div += '</div></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\tif (command.collapsed) {\n\t\tdom_command.children('.ui.block_commands').toggle();\n\t}\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui dowhiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> '+ LocalizedStrings.getUI('text_command_do') +' <br> ' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10) </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui dowhiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do') + ' </span>';\n\tret += '<div class=\"ui block_commands\" data-subblock=\"\" data-idcommand=\"\">';\n\tret += '</div>';\n\tret += ' <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do_until') + ' </span> <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span>';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"display: inline !important;\"></i> <i class=\"ui icon unlock button_alternate_expression\" style=\"margin-left: 1rem !important;\"></i> <div class=\"ui context_menu\"></div> ';\n\tret += '</div>';\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[el.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[el.find('.button_alternate_expression').length - 1]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\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_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(dowhiletrue_dom.find('.button_write_expression')[dowhiletrue_dom.find('.button_write_expression').length - 1]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\tdowhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\tdowhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(dowhiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tdowhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).toggle();\n\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tdowhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tdowhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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 $('<div class=\"ui functioncall created_element\"> <i class=\"hand point right icon\"></i> <span> funcao() </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui functioncall command_container\"> <i class=\"hand point right icon command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> </div>');\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\";\nimport * as Utils from '../utils';\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 = $('<div class=\"lixeira\" draggable=\"true\"></div>');\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 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 '<div class=\"single_element_expression\" data-index=\"' + i + '\"></div>'\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 } else if (expression_array[i - 1] == \"(\") {\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 '<div class=\"single_element_expression add_parentheses not_allowed\"><img style=\"width: 15px; position: relative; top: 3px; left: 1px; height: 15px;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAEjCAYAAAA48U27AAAasXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZtZkhw5km3/sYpeAkYFsByMIm8Hvfw+Fx4kg6zM7HolHaykOz3MzWA63EFh5c5//7/r/osfK8m7XGqzbub5yT33OHjT/Ofn8xp8fn+/n/Pjd+H3z11MX28jr4nX9PmFna/jB5+XX1+o+evz+fvnrq7Pm9i+TvT1C078fpKurPf7a5FfJ0rx83n4+rfrX18Y9u12vv6L6+u0Xyf/89+5EoxdOF+KLp4Ukv/8/blSYhWpp8Grvb9L1CeJ9+n9HVL71/g5/Wutvw7gz3d/xM//WFn6FQ73iezXAfZHnL4+D+WPz9PPy8TfVhTizyvH7yuyEZr//vMtfvfudu/53N3I5giXfd3Uj1t57zhwEs70vmb8qfxXeF/fn86f5odfZG1zq9P5yT96iMT6hhx2GOGG815XWCwxxxMrrzGumN5nLdXY43pJyfoTbqyO/OzUyNUic4mP48+1hHfdrutxscaVd+DIGDhZ4B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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 = $('<div class=\"floating_parenthesis\"> ( </div>');\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 = $('<div class=\"floating_parenthesis\"> ) </div>');\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 = $('<div class=\"parentheses_ghost\">(</div>');\nwindow.close_parentheses = $('<div class=\"parentheses_ghost\">)</div>');\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 '<div class=\"single_element_expression parentheses_in_expression\" data-index=\"' +\n position +\n '\">' +\n expression_content +\n \"</div>\"\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 '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\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 '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\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 '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '<div class=\"single_element_expression ghost_element mouse_distance\"></div>'\n );\n div_temp.append(menu_final);\n const div_higher = $('<div class=\"higher_element\"></div>');\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 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 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 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 '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\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 '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\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 '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $('<div class=\"simple_add mouse_distance\"></div>');\n const div_higher = $('<div class=\"higher_element\"></div>');\n\n const button = $(\n '<button class=\"ui button green add_expression\"><i class=\"plus circle inverted icon\"></i></button>'\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 '<div class=\"ui dropdown\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\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_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\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 '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n menu_final.find(\".ivprog-write-sep\").popup({\n content: LocalizedStrings.getUI(\"write_seprator_menu_tooltip\"),\n delay: {\n show: 500,\n hide: 0,\n },\n });\n\n const div_temp = $(\n '<div class=\"single_element_expression not_allowed\" data-index=\"' +\n position +\n '\"></div>'\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 '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.plus +\n '\">+</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.minus +\n '\">-</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.multiplication +\n '\">*</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.division +\n '\">/</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.module +\n '\">%</div>';\n return arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n let logic_operators;\n logic_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.equals_to +\n '\">==</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.and +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_and\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.or +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_or\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_not\") +\n \"</div>\";\n return logic_operators;\n}\n\nfunction getRelationalOperators () {\n let relational_operators;\n relational_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than +\n '\">></div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than +\n '\"><</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.equals_to +\n '\">==</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to +\n '\">>=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to +\n '\"><=</div>';\n return relational_operators;\n}\n\nfunction getSeparator () {\n return `<div class=\"item ivprog-write-sep\" data-type=\"${\n Models.EXPRESSION_TYPES.write_sep\n }\" data-value=\"${Models.EXPRESSION_TYPES.write_sep}\">${LocalizedStrings.getUI(\n \"write_seprator_menu_text\"\n )}</div>`;\n}\n\nfunction getVariable (function_obj, search) {\n if (search == \")\" || search == \"(\") {\n return search;\n }\n\n if (search.instance == \"operator\") {\n var obj;\n switch (search.value) {\n case '+':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.plus); \n break;\n case '-':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.minus); \n break;\n case '*':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.multiplication); \n break;\n case '/':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.division); \n break;\n case '%':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.module); \n break;\n case '>':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than); \n break;\n case '<':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than); \n break;\n case '>=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to); \n break;\n case '<=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to); \n break;\n case '==':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.equals_to); \n break;\n case '!=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.not_equals_to); \n break;\n case 'and':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.and); \n break;\n case 'or':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.or); \n break;\n case 'not':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.not); \n break;\n }\n return obj;\n }\n\n if (search.instance == \"expression\" \n && search.type == \"const\") {\n \n if (search.value === true) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_true'),\n null,\n null,\n true\n );\n return obj;\n }\n if (search.value === false) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_false'),\n null,\n null,\n true\n );\n return obj;\n }\n if (search.value === 0) search.value = \"0\";\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n search.value,\n null,\n null,\n true\n );\n return obj;\n }\n\n var variavel = null;\n if (search.instance == \"expression\"\n && search.type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == search.value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas gloais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == search.value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n \n // 3. Procurar na lista de parâmetros: \n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == search.value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && !search.line) {\n\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"vector\") {\n \n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n getVariable(function_obj, search.line[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"matrix\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n getVariable(function_obj, search.line[0]),\n getVariable(function_obj, search.column[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"function\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n // Procurar a função para referência:\n for (var i = 0; i < program_obj.functions.length; i++) {\n if (program_obj.functions[i].name == search.value) {\n obj.function_called = program_obj.functions[i];\n }\n }\n\n // Se ainda não foi encontrada, procurar na biblioteca do iVProg:\n if (!obj.function_called) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (search.value.split(\".\")[1] && search.value.split(\".\")[1] \n == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n } else if (search.value == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n }\n }\n }\n\n obj.parameters_list = [];\n\n for (var i = 0; i < search.params.length; i++) {\n obj.parameters_list.push(getVariable(function_obj,search.params[i][0]));\n }\n return obj;\n }\n}\n\nexport function expressionParserToVisual (text, function_obj, input_field) {\n\n if (text.trim().length == 0) {\n return [new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )];\n }\n\n var var_not_found = [];\n var fun_not_found = [];\n var parsed;\n try {\n parsed = ivprogCore.parseExpression(text);\n } catch (ex) {\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_invalid'));\n }\n if (!parsed) return null;\n\n for (var i = 0; i < parsed.length; i++) {\n var variavel = null;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == parsed[i].value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas globais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == parsed[i].value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n\n // 3. Procurar a variável nos parâmetros:\n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == parsed[i].value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n \n if (!variavel)\n var_not_found.push(parsed[i].value);\n }\n\n var funcao;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"function\") {\n \n // Procurar a função para referência:\n for (var j = 0; j < program_obj.functions.length; j++) {\n if (program_obj.functions[j].name == parsed[i].value) {\n funcao = program_obj.functions[j];\n }\n }\n\n // Se ainda não encontrou, procurar na biblioteca do iVProg:\n if (!funcao) {\n for (var j = 0; j < window.system_functions.length; j++) {\n if (parsed[i].value.split(\".\")[1] && parsed[i].value.split(\".\")[1] \n == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n } else if (parsed[i].value == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n }\n }\n }\n\n if (!funcao) {\n fun_not_found.push(parsed[i].value);\n }\n }\n}\n\n if (fun_not_found.length > 0) {\n let uniqueWords = [...new Set(fun_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undeclared_function') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n if (var_not_found.length > 0) {\n let uniqueWords = [...new Set(var_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undelcared_variable') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n var exp_obj = [];\n for (var i = 0; i < parsed.length; i++) {\n exp_obj.push(getVariable(function_obj, parsed[i]));\n }\n\n \n\n return exp_obj;\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui iftrue created_element\"> <i class=\"ui icon small random\"></i> <span> if (x < 1) { } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui iftrue command_container\"><div class=\"ui data_block_if\" data-if=\"true\"> <i class=\"ui icon small random command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button>';\n\tret += '<span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_if') + '</span>';\n\tret += ' <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span> ';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"margin-right: 1rem !important;\"></i> ';\n\tret += '<i class=\"ui icon unlock button_alternate_expression\"></i>';\n\tret += '<span> </span> ';\n\tret += '<div class=\"ui block_commands commands_if conditional_comands_block\" data-if=\"true\">';\n \tret += '</div></div>';\n\tret += '<div class=\"ui data_block_else\" data-else=\"true\"> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_else') + ' </span>';\n\tret += '<div class=\"ui block_commands commands_else conditional_comands_block\" data-else=\"true\">';\n\tret += '</div>';\n\tret += '<span></span></div>';\n\tret += '</div>';\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\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\tif (command.collapsed) {\n\t\tel.children('.data_block_else').toggle();\n\t\t$(el.find('.block_commands')[0]).toggle();\n\t}\n\n\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\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_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(iftrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(iftrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(iftrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tiftrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(iftrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tiftrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tiftrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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\n\tiftrue_dom.find('.minimize_block_button').on('click', function() {\n\t\tiftrue_dom.children('.data_block_else').toggle();\n\t\t$(iftrue_dom.find('.block_commands')[0]).toggle();\n\t\tcommand.collapsed = !command.collapsed;\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 $('<div class=\"ui reader created_element\"> <i class=\"ui icon small download\"></i> <span> '+LocalizedStrings.getUI('text_command_read')+' var </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '<div class=\"ui reader command_container\"> <i class=\"ui icon small download command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\">'+LocalizedStrings.getUI('text_command_read')+' ( </span> <div class=\"var_value_menu_div\"></div> <span class=\"close_parentheses span_command_spec\">)</span> </div>';\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui repeatNtimes created_element\"> <i class=\"ui icon small sync\"></i> <span> repita_para i de 0 ate 10 passo 1 <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `<div class=\"ui repeatNtimes command_container\"> \n\t\t<i class=\"ui icon small sync command_drag\"></i>\n\t\t<i class=\"ui icon times red button_remove_command\"></i>\n\t\t<button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button>\n\t\t<span class=\"span_command_spec\"> ${LocalizedStrings.getUI('text_for')}\n\t\t</span> <div class=\"ui attribution_expression\">\n\t\t<div class=\"ui variable_attribution\"></div>\n\t\t<span class=\"text_receives span_command_spec\" style=\"margin-left: 10px;margin-right: 20px;\"></span>\n\t\t<div class=\"ui var_value_expression div_expression_st\"></div>\n\t\t</div>\n\t\t<span class=\"span_command_spec separator_character\" style=\"margin-left: 25px; margin-right: 15px;\">\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} </span>\n\t\t<div class=\"conditional_expression\"></div> <div class=\"pass_button\"></div> \n\t\t<div class=\"ui incrementation_field\"><span class=\"text_inc_receives span_command_spec\"></span>\n\t\t<div class=\"ui first_operand\"></div><div class=\"ui operator\"></div>\n\t\t<div class=\"ui second_operand\"></div></div> <span class=\"span_command_spec\"> </span>\n\t\t<span class=\"textual_expression\"></span> <i class=\"ui icon unlock button_alternate_expression\"></i>\n\t\t<div class=\"ui context_menu\"></div>`;\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\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('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double right\"></i></button>');\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('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double left\"></i></button>');\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\tif (command.lockexpression) {\n\t\ttry {\n\t\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\t\tif (text) {\n\t\t\t\t$(el.find('.textual_expression')[0]).html(text);\n\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\n\t\t\t\t$(el.find('.attribution_expression')[0]).toggle();\n\t\t\t\t$(el.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(el.find('.pass_button')[0]).toggle();\n\t\t\t\t$(el.find('.incrementation_field')[0]).toggle();\n\n\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tcommand.lockexpression = false;\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\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('.minimize_block_button').on('click', function(evt){\n\t\trepeatNtimes_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\t\n\trepeatNtimes_dom.find('.button_alternate_expression').on('click', function() {\n\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\tif (text) {\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).html(text);\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.attribution_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.pass_button')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.incrementation_field')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\n\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\trepeatNtimes_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\trepeatNtimes_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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 = $('<div class=\"ui dropdown\"><div class=\"text\"></div></div>');\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui return created_element\"> <i class=\"ui icon small reply\"></i> <span> '+LocalizedStrings.getUI('text_return')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui return command_container\"> <i class=\"ui icon small reply command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\"> '+LocalizedStrings.getUI('text_return')+' </span> <div class=\"expression_elements\"></div><span class=\"textual_expression\" style=\"display: none; margin-left: 1rem;\"></span></div>');\n\tel.data('command', command);\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\tel.append($('<i class=\"ui icon unlock button_alternate_expression\" style=\"margin-left: 1rem;\"></i>'));\n\n\t\tif (command.lockexpression) {\n\t\t\tif (command.variable_value_menu) {\n\t\t\t\ttry {\n\t\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcommand.lockexpression = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.variable_value_menu) {\n var text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\tif (text) {\n\t\t\t\t$(return_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\t});\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 $('<div class=\"ui switch created_element\"> <i class=\"ui icon small random\"></i> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( x ) { <br> '+LocalizedStrings.getUI('text_code_case')+' 1: <br> '+LocalizedStrings.getUI('text_code_case')+' 2: <br> } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui switch command_container\"> <i class=\"ui icon small random command_drag\" ></i> <i class=\"ui icon times red button_remove_command\"></i> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( <div class=\"ui variable_to_switch\"></div> ) <div class=\"ui context_menu\"></div> <div class=\"ui all_cases_div\"></div></span>';\n\tret += '</div>';\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 = $('<div class=\"ui case_div\"><i class=\"ui icon times red button_remove_command\"></i><span>'+LocalizedStrings.getUI('text_code_case')+'</span> <div class=\"ui variable_case\"></div>: <div class=\"case_commands_block\"></div></div>');\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({\n only_variable: 1,\n only_value: 2,\n only_function: 3,\n variable_and_function: 4,\n variable_and_value_opt: 5,\n value_and_function: 6,\n all: 7,\n});\n\nexport function renderMenu (\n command,\n ref_object,\n dom_object,\n function_obj,\n size_field = 2,\n expression_element\n) {\n // Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros\n // Caso não possua, tem que adicionar as variáveis que servirão de parâmetros:\n if (ref_object.function_called) {\n if (ref_object.function_called.parameters_list) {\n while (\n ref_object.function_called.parameters_list.length !=\n ref_object.parameters_list.length\n ) {\n if (\n ref_object.parameters_list.length >\n ref_object.function_called.parameters_list.length\n ) {\n ref_object.parameters_list.pop();\n } else {\n ref_object.parameters_list.push(\n new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n }\n }\n }\n\n let menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"variable\");\n menu_var_or_value += '<div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div></div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value =\n '<input type=\"text\" class=\"width-dynamic\" size=\"' +\n size_field +\n '\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />';\n }\n\n if (\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_value +\n '\">' +\n LocalizedStrings.getUI(\"text_value\") +\n \"</div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"btn_function\");\n menu_var_or_value += '<div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div></div>\";\n\n /* if (command.type == Models.COMMAND_TYPES.attribution) {\n menu_var_or_value += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n menu_var_or_value += '<div class=\"menu\">';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n menu_var_or_value += '</div></div>';\n }*/\n }\n\n menu_var_or_value += \"</div></div>\";\n\n menu_var_or_value = $(menu_var_or_value);\n\n menu_var_or_value.find('.width-dynamic').on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n dom_object.append(menu_var_or_value);\n\n ref_object.dom_object = menu_var_or_value;\n\n addHandlers(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n\n addVariablesToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addIVProgFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n if (ref_object.content || ref_object.function_called) {\n if (ref_object.content) {\n // Verificar se a variável ainda existe:\n const variable_fun = isVarInProgram(ref_object.content, function_obj);\n if (variable_fun) {\n ref_object.content = variable_fun;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n if (ref_object.content && ref_object.content.type) {\n ref_object.content = null;\n appendSelectText(ref_object, menu_var_or_value);\n } else {\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n }\n }\n } else if (ref_object.function_called) {\n // Verificar se a função ainda existe:\n const ret_function = isFunctionInProgram(ref_object.function_called);\n if (ret_function) {\n ref_object.function_called = ret_function;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n appendSelectText(ref_object, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(ref_object, menu_var_or_value);\n }\n}\n\nfunction appendSelectText (ref_object, menu_var_or_value) {\n switch (ref_object.variable_and_value) {\n case VAR_OR_VALUE_TYPES.only_variable:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_var\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.all:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.variable_and_function:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.only_function:\n menu_var_or_value\n .find(\".text\")\n .append(\n \"<i>\" + LocalizedStrings.getUI(\"var_menu_select_function\") + \"</i>\"\n );\n break;\n }\n}\n\nfunction isFunctionInProgram (function_called_obj) {\n if (function_called_obj.name) {\n if (window.program_obj.functions) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i] == function_called_obj) {\n return window.program_obj.functions[i];\n }\n }\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_called_obj.name) {\n return window.program_obj.functions[i];\n }\n }\n }\n } else if (function_called_obj.identifier) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (\n window.system_functions[i].identifier == function_called_obj.identifier\n ) {\n return window.system_functions[i];\n }\n }\n }\n\n return null;\n}\n\nfunction isVarInProgram (var_obj, function_obj) {\n // Verify in locals:\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] == var_obj) {\n return function_obj.variables_list[i];\n }\n }\n }\n // Verify in parameters:\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] == var_obj) {\n return function_obj.parameters_list[i];\n }\n }\n }\n // Verify in globals:\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i] == var_obj) {\n return window.program_obj.globals[i];\n }\n }\n }\n\n // If not found, verify if the reference was lost\n if (var_obj) {\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 == var_obj.name) {\n return function_obj.variables_list[i];\n }\n }\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 == var_obj.name) {\n return function_obj.parameters_list[i];\n }\n }\n }\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == var_obj.name) {\n return window.program_obj.globals[i];\n }\n }\n }\n }\n\n return null;\n}\n\nfunction renderPreviousContent (\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n) {\n if (ref_object.function_called) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (ref_object.content.type) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n }\n}\n\nfunction variableValueMenuCode (\n command,\n variable_obj,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n) {\n if (variable_obj.content || variable_obj.function_called) {\n // Verificar se a variável ainda existe:\n const var_fun = isVarInProgram(variable_obj.content, function_obj);\n\n if (var_fun) {\n variable_obj.content = var_fun;\n } else {\n if (variable_obj.content && variable_obj.content.type) {\n variable_obj.content = null;\n appendSelectText(variable_obj, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(variable_obj, menu_var_or_value);\n }\n\n if (variable_obj.content == null && variable_obj.function_called == null) {\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n return;\n }\n\n const ret = \"\";\n if (variable_obj.function_called) {\n if (\n variable_obj.function_called.parameters_list == null ||\n variable_obj.function_called.length == 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != variable_obj.function_called.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n renderMenu(\n command,\n variable_obj.parameters_list[j],\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(parameters_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else if (variable_obj.content.type) {\n let variable_render = \"\";\n\n if (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n variable_obj.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span>';\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ] </span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n variable_obj.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n if (!variable_obj.row) {\n variable_obj.row = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n\n variableValueMenuCode(\n command,\n variable_obj.row,\n $(variable_render.find(\".row_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log('dom_object6');\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else {\n let variable_render;\n\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">';\n\n if (isNaN(variable_obj.content)) {\n variable_render += variable_obj.content.split(\" \").join(\"&nbsp;\");\n } else {\n variable_render += variable_obj.content;\n }\n\n variable_render += \"</span>\";\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n if (variable_obj.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(variable_render);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n variable_render.on(\"click\", function (e) {\n variable_render.remove();\n variable_render.empty();\n variable_render.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction addIVProgFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.append(\n '<div class=\"divider\"></div><div class=\"header\">' +\n LocalizedStrings.getUI(\"text_header_ivprog_functions\") +\n \"</div>\"\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_math\") +\n '<div class=\"menu menu_math_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_text\") +\n '<div class=\"menu menu_text_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_array\") +\n '<div class=\"menu menu_arrangement_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_conversion\") +\n '<div class=\"menu menu_conversion_functions\"></div></div>'\n );\n\n // Insert Math functions:\n for (let i = 0; i < window.system_functions.length; i++) {\n const t = $('<div class=\"item\"></div>');\n t.data(\"function_reference\", window.system_functions[i]);\n t.data(\"option\", VAR_OR_VALUE_TYPES.only_function);\n t.text(\n LocalizedStrings.translateInternalFunction(\n window.system_functions[i].identifier\n )\n );\n\n switch (window.system_functions[i].category) {\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.math:\n sub_menu.find(\".menu_math_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.text:\n sub_menu.find(\".menu_text_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement:\n sub_menu.find(\".menu_arrangement_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion:\n sub_menu.find(\".menu_conversion_functions\").append(t);\n break;\n }\n }\n}\n\nfunction addFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.text(\"\");\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\">' +\n window.program_obj.functions[i].name +\n \" </div>\"\n );\n temp.data(\"function_reference\", window.program_obj.functions[i]);\n sub_menu.append(temp);\n }\n}\n\nfunction addVariablesToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_vars\");\n sub_menu.text(\"\");\n let is_there = false;\n\n if (window.program_obj.globals) {\n if (ref_object.include_constant) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n } else {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (!window.program_obj.globals[i].is_constant) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n }\n }\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.parameters_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.parameters_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.variables_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.variables_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n if (!is_there) {\n sub_menu.append(\n $(\n '<div class=\"header\">' +\n LocalizedStrings.getUI(\"text_no_variable\") +\n \"</div>\"\n )\n );\n sub_menu.append(\n $(\n '<div class=\"item disabled\">' +\n LocalizedStrings.getUI(\"text_no_variable_instruction\") +\n \"</div>\"\n )\n );\n }\n}\n\nfunction addHandlers (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value.dropdown({\n onChange: function (value, text, $selectedItem) {\n dom_object.find(\".var_name\").remove();\n switch ($selectedItem.data(\"option\")) {\n case VAR_OR_VALUE_TYPES.only_function:\n openInputToFunction(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"function_reference\"),\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_value:\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_variable:\n openInputToVariable(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"variable_reference\"),\n expression_element\n );\n break;\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n dom_object\n .find(\".width-dynamic\")\n .on(\"input\", function () {\n const inputWidth = $(this).textWidth() + 10;\n $(this).focus();\n\n const tmpStr = $(this).val();\n $(this).val(\"\");\n $(this).val(tmpStr);\n\n $(this).css({\n width: inputWidth,\n });\n })\n .trigger(\"input\");\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n dom_object.parent().on(\"click\", function (e) {\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".value_rendered\").empty();\n dom_object.find(\".value_rendered\").remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction openInputToFunction (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n function_selected,\n expression_element\n) {\n ref_object.function_called = function_selected;\n ref_object.parameters_list = [];\n\n if (\n function_selected.parameters_list != null &&\n function_selected.parameters_list.length > 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != function_selected.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n var temp;\n if (function_selected.parameters_list[j].dimensions > 0) {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.variable_and_function,\n null,\n null,\n null,\n true,\n function_selected.parameters_list[j].dimensions\n );\n } else {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n ref_object.parameters_list.push(temp);\n renderMenu(\n command,\n temp,\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\nfunction openInputToVariable (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n variable_selected,\n expression_element\n) {\n ref_object.content = variable_selected;\n\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n let variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_selected.name +\n \"</span>\";\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span> ';\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n }\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n ref_object.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n ref_object.row = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.row,\n variable_render.find(\".row_container\"),\n function_obj,\n 2,\n expression_element\n );\n\n ref_object.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log(\"dom_object 10: \");\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".variable_rendered\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageClearExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected);\n }*/\n}\n\nfunction openInputToValue (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.content == null) {\n ref_object.content = \"\";\n }\n\n menu_var_or_value.find(\".text\").text(\" \");\n const field = $(\n '<input type=\"text\" size=\"2\" class=\"width-dynamic-minus\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />'\n );\n field.insertBefore(dom_object.find(\".menu_var_or_value_dom\"));\n\n\n field.on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n const rendered = $('<div class=\"value_rendered\"></div>');\n rendered.insertBefore(field);\n\n field.focus();\n field.val(ref_object.content);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(field);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n dom_object.find(\".width-dynamic-minus\").focusout(function () {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n $(this).remove();\n });\n\n dom_object.find(\".width-dynamic-minus\").on(\"keydown\", function (e) {\n const code = e.keyCode || e.which;\n if (code == 13) {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n if (code == 27) {\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n });\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n /*rendered.parent().on('click', function(e) {\n rendered.parent().off();\n console.log(\"TTT14\");\n rendered.remove();\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n });*/\n }\n\n rendered.on(\"click\", function (e) {\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\n$.fn.textWidth = function (text, font) {\n if (!$.fn.textWidth.fakeEl)\n $.fn.textWidth.fakeEl = $(\"<span>\")\n .hide()\n .appendTo(document.body);\n\n $.fn.textWidth.fakeEl\n .text(text || this.val() || this.text() || this.attr(\"placeholder\"))\n .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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui whiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> ' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 ) <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui whiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i><button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_while') + ' </span>';\n\tret += '<span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span>';\n\tret += ' </span>';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"margin-right: 1rem !important;\"></i> <i class=\"ui icon unlock button_alternate_expression\"></i> <div class=\"ui context_menu\"></div>';\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(whiletrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(whiletrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(whiletrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\twhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\twhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\twhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(whiletrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\twhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\twhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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\";\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n return $(\n '<div class=\"ui writer created_element\"> <i class=\"ui icon small upload\"></i> <span> ' +\n LocalizedStrings.getUI(\"text_command_write\") +\n \" var </span></div>\"\n );\n}\n\nexport function renderCommand (command, function_obj) {\n const ret = `<div class=\"ui writer command_container\">\n <i class=\"ui icon small upload command_drag\"></i>\n <i class=\"ui icon times red button_remove_command\"></i>\n <span class=\"span_command_spec\">${LocalizedStrings.getUI(\n \"text_command_write\"\n )}\n ( </span><div class=\"all_elements_write\"></div> <span class=\"textual_expression\"></span>\n <span class=\"close_parentheses span_command_spec\">)</span>\n <img data-state=\"${command.newline ? \"on\" : \"false\"}\" src=\"${\n command.newline ? \"img/new_line.svg\" : \"img/no_new_line.svg\"\n }\" class=\"ivprog_newline_btn\"/> \n <i class=\"ui icon i cursor button_write_expression\" style=\"margin-left: 3rem !important; margin-right: -1.1rem !important;\"></i> \n <i class=\"ui icon unlock button_alternate_expression\"></i>\n </div>`;\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 \n addHandlers(command, function_obj, el);\n\n if (command.content && command.lockexpression) {\n try {\n var text = CodeGenerator.elementExpressionCode(command.content);\n if (text) {\n $(el.find('.all_elements_write')[0]).toggle();\n $(el.find('.textual_expression')[0]).text(text);\n $(el.find('.textual_expression')[0]).toggle();\n $(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n }\n } catch (e) {\n command.lockexpression = false;\n }\n }\n\n el.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n });\n el.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\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\n $(writer_dom.find('.textual_expression')[0]).toggle();\n\n writer_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(writer_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = writer_dom.find('.all_elements_write');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = writer_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.content) {\n\t\t\tif (command.content.length == 1 && command.content[0].content == null && !command.content[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.content);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t\n\twriter_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.content) {\n var text = CodeGenerator.elementExpressionCode(command.content);\n\t\t\tif (text) {\n\t\t\t\t$(writer_dom.find('.all_elements_write')[0]).toggle();\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n }\n \n if (command.lockexpression) {\n\t\t\t\twriter_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\twriter_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\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 '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\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 '<div class=\"div_parent_handler\" style=\"display:none;\"></div>'\n );\n const new_div_item = $('<div class=\"var_value_menu_div\"></div>');\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\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 '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\n );\n icon_add_item.insertAfter(dom_object);\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '<div class=\"div_parent_handler\"></div>'\n );\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\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 = '<div class=\"ui dropdown function_return\">';\n \n if (function_obj.return_dimensions == 1) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] </div>';\n } else if (function_obj.return_dimensions == 2) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ] </div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n for (var tm in Types) {\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions < 1 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\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 = '<div class=\"ui secondary segment function_div list-group-item function_cont_'+cont+'\">';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '<span class=\"glyphicon glyphicon-move move_function\" aria-hidden=\"true\"><i class=\"icon sort alternate vertical\"></i></span>';\n\n appender += (function_obj.is_main ? '<div class=\"div_start_minimize_v\"> </div>' : '<button class=\"ui icon button large remove_function_button\"><i class=\"red icon times\"></i></button>')\n + '<button class=\"ui icon button tiny minimize_function_button\"><i class=\"icon window minimize\"></i></button>';\n\n appender += '<div class=\"function_signature_div\">'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '<div class=\"function_name_div\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' + LocalizedStrings.getUI('type_void') + ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class=\"span_name_function\" >'+function_obj.name+'</span> </div> '\n + ' <span class=\"parethesis_function\">( </span> <div class=\"ui large labels parameters_list\">';\n } else {\n appender += '<div class=\"ui function_return\"></div>';\n\n appender += '<div class=\"function_name_div function_name_div_updated\"><span class=\"span_name_function name_function_updated\">'+function_obj.name+'</span> </div> ' \n + ' <span class=\"parethesis_function\"> ( </span> <i class=\"ui icon plus square outline add_parameter_button\"></i> <div class=\"ui large labels parameters_list container_parameters_list\">';\n }\n \n appender += '</div> <span class=\"parethesis_function\"> ) </span> </div>'\n + (function_obj.is_hidden ? ' <div class=\"function_area\" style=\"display: none;\"> ' : ' <div class=\"function_area\"> ');\n\n appender += '<div class=\"ui add_var_context add_var_button_function\" style=\"float: left;\"> <div class=\"ui icon button purple\"> ';\n\n appender += '<i class=\"icons\"><i class=\"icon superscript\" style=\"margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>';\n\n appender += '</div></div>';\n\n appender += '<div class=\"ui top attached segment variables_list_div\"></div>';\n\n appender += '<div class=\"ui bottom attached segment commands_list_div commands_cont_'+cont+'\">'\n + '<div class=\"ui rail\" style=\"width: 35px; margin-left: -36px;\"><div class=\"ui sticky sticky_cont_'+cont+'\" style=\"top: 50px !important;\">';\n\n\n appender += '<div class=\"ui icon button dropdown menu_commands orange\" > '\n + '<i class=\"icons\"><i class=\"icon code\" style=\"margin-top: -1px;margin-bottom: 1px;margin-right: 0px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>'\n + '<div class=\"menu\"> ';\n appender += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.reader+'\"><i class=\"download icon\"></i> ' +LocalizedStrings.getUI('text_read_var')+ '</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.writer+'\"><i class=\"upload icon\"></i> '+LocalizedStrings.getUI('text_write_var')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.comment+'\"><i class=\"quote left icon\"></i> '+LocalizedStrings.getUI('text_comment')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.attribution+'\"><i class=\"arrow left icon\"></i> '+LocalizedStrings.getUI('text_attribution')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.functioncall+'\"><i class=\"hand point right icon\"></i> '+LocalizedStrings.getUI('text_functioncall')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.iftrue+'\" ><i class=\"random icon\"></i> '+LocalizedStrings.getUI('text_iftrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.repeatNtimes+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_repeatNtimes')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.whiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_whiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.dowhiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_dowhiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switch+'\"><i class=\"list icon\"></i> '+LocalizedStrings.getUI('text_switch')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.return+'\"><i class=\"reply icon\"></i> '+LocalizedStrings.getUI('text_btn_return')+'</a>'\n + '</div></div>';\n\n\n appender += '</div></div>'\n +'</div>';\n\n appender += '</div></div>';\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 appender.find('.add_parameter_button').popup({\n content : LocalizedStrings.getUI(\"text_add_parameters\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\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 if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\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 \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 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 }).popup({\n content : LocalizedStrings.getUI(\"text_add_function\"),\n delay: {\n show: 750,\n hide: 0\n }\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 is_iassign = false;\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 += '<div class=\"ui label function_name_parameter pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n ret += '<div class=\"ui dropdown parameter_type\">';\n\n if (parameter_obj.dimensions > 0) {\n ret += '<div class=\"text\">'+ 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 += '</div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\n\n ret += '<div class=\"parameter_div_edit\"><span class=\"span_name_parameter label_enable_name_parameter\">'+parameter_obj.name+'</span></div> ';\n\n ret += ' <i class=\"yellow inverted icon times remove_parameter\"></i></div>';\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+parameter_obj.name+\"' />\" );\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+function_obj.name+\"' />\" );\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 += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+global_var.value.toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+global_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '<tr>';\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 += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+global_var.value[k].toFixed(1)+'</span></td>';\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 += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+global_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\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 += '<tr>';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+global_var.value[l][k].toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\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 += '<tr>';\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 += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+global_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+global_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\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 = '<div class=\"ui label global_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i><div class=\"global_const\">const: ';\n\n\telement += '<i class=\"ui icon toggle '+(global_var.is_constant?\"on\":\"off\")+' alternate_constant\"></i></div>';\n \t\n \telement += '<div class=\"ui dropdown global_type\">';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] ';\n \t\telement += '</div>';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] [ <span class=\"dimensions_1\"></span> ] ';\n \t\telement += '</div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\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 += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\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 += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> <div class=\"editing_name_var\"> <span class=\"span_name_variable enable_edit_name_parameter\">'+global_var.name+'</span> </div> <span class=\"character_equals\"> <&#8212; </span> ';\n\n\telement += '<div class=\"ui div_valor_var\">'+global_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_global\"></i></div>';\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[row][index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[row][index] + \"' />\" );\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value.toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value + \"' />\" );\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 (global_var.type == Types.CHAR) {\n\t\t\t\t\tglobal_var.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 (global_var.type == Types.CHAR) {\n\t\t\t\t\t\tglobal_var.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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+global_var.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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[index] + \"' />\" );\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 = $('<span>').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 : '<i class=\"ui icon inverted exclamation triangle yellow\"></i>' + 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 = '<div class=\"ui label variable_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n\telement += '<div class=\"ui dropdown variable_type\">';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] </div>';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ] </div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\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 += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\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 += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> ';\n\n element += '<div class=\"editing_name_var\"><span class=\"span_name_variable enable_edit_name_variable\">'+new_var.name+'</span> </div>';\n\n\telement += ' <span class=\"character_equals\"> <&#8212; </span> <div class=\"ui div_valor_var\">'+new_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_variable\"></i></div>';\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 += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value.toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '<tr>';\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 += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k].toFixed(1)+'</span></td>';\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 += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\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 += '<tr>';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k].toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\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 += '<tr>';\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 += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+new_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index] + \"' />\" );\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value.toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value + \"' />\" );\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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+variable_obj.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 = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index] + \"' />\" );\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":""}