forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlua_compressed.js.map
1 lines (1 loc) · 108 KB
/
lua_compressed.js.map
1
{"version":3,"sources":["generators/lua.js","generators/lua/variables.js","generators/lua/variables_dynamic.js","generators/lua/text.js","generators/lua/procedures.js","generators/lua/math.js","generators/lua/loops.js","generators/lua/logic.js","generators/lua/lists.js","generators/lua/colour.js","generators/lua/all.js"],"names":["objectUtils","stringUtils","Generator","inputTypes","Names","Lua","addReservedWords","ORDER_ATOMIC","ORDER_HIGH","ORDER_EXPONENTIATION","ORDER_UNARY","ORDER_MULTIPLICATIVE","ORDER_ADDITIVE","ORDER_CONCATENATION","ORDER_RELATIONAL","ORDER_AND","ORDER_OR","ORDER_NONE","isInitialized","init","Lua.init","workspace","Object","getPrototypeOf","call","nameDB_","reset","RESERVED_WORDS_","setVariableMap","getVariableMap","populateVariables","populateProcedures","finish","Lua.finish","code","definitions","values","definitions_","join","scrubNakedValue","Lua.scrubNakedValue","line","quote_","Lua.quote_","string","replace","multiline_quote_","Lua.multiline_quote_","split","map","lines","scrub_","Lua.scrub_","block","opt_thisOnly","commentCode","outputConnection","targetConnection","comment","getCommentText","wrap","COMMENT_WRAP","prefixLines","i","inputList","length","type","VALUE","childBlock","connection","targetBlock","allNestedComments","nextBlock","nextConnection","nextCode","blockToCode","NameType","getName","getFieldValue","VARIABLE","argument0","valueToCode","varName","order","indexOf","itemCount_","element0","element1","elements","value","substring","text","functionName","provideFunction_","FUNCTION_NAME_PLACEHOLDER_","where","at","atOrder","start","Error","match","where1","at1","at1Order","where2","at2","at2Order","end","operator","OPERATORS","LEFT","RIGHT","BOTH","msg","getField","sub","from","to","funcName","PROCEDURE","xfix1","STATEMENT_PREFIX","injectId","STATEMENT_SUFFIX","INDENT","loopTrap","INFINITE_LOOP_TRAP","branch","statementToCode","returnValue","xfix2","args","variables","getVars","tuple","hasReturnValue_","Number","argument1","arg","CONSTANTS","PROPERTIES","dropdownProperty","suffix","inputOrder","outputOrder","numberToCheck","divisor","provideSum","func","list","argument2","CONTINUE_STATEMENT","addContinueLabel","repeats","String","isNumber","parseInt","addLoopTrap","getDistinctName","loopVar","until","variable0","startVar","endVar","increment","incValue","Math","abs","step","xfix","loop","getSurroundLoop","suppressPrefixSuffix","n","conditionCode","branchCode","getInput","defaultArgument","value_if","value_then","value_else","Array","element","repeatCount","item","getListIndex","listName","opt_at","mode","listVar","toLowerCase","at1Param","at2Param","direction","input","delimiter","r","g","b","colour1","colour2","ratio","exports","moduleExports"],"mappings":"A;;;;;;;;;;;;;;;AAaA,IAAA,2BAAA,EAAA,CAEMA,wCAAc,CAAA,CAAA,kCAFpB,CAGMC,wCAAc,CAAA,CAAA,kCAHpB,CAKOC,sCAAA,CAAA,CAAA,0CALP,CAMOC,uCAAA,CAAA,CAAA,iCAAA,CAAA,UANP,CAOOC,kCAAA,CAAA,CAAA,2BAAA,CAAA,KAQDC,2BAAAA,CAAAA,YAAN,CAAY,IAAIH,CAAAA,CAAAA,0CAAJ,CAAc,KAAd,CAQZG;0BAAAA,CAAAA,YAAIC,CAAAA,gBAAJ,CAEI,mzBAFJ,CA6BAD;0BAAAA,CAAAA,YAAIE,CAAAA,YAAJ,CAAmB,CAEnBF,2BAAAA,CAAAA,YAAIG,CAAAA,UAAJ,CAAiB,CACjBH,2BAAAA,CAAAA,YAAII,CAAAA,oBAAJ,CAA2B,CAC3BJ,2BAAAA,CAAAA,YAAIK,CAAAA,WAAJ,CAAkB,CAClBL,2BAAAA,CAAAA,YAAIM,CAAAA,oBAAJ,CAA2B,CAC3BN,2BAAAA,CAAAA,YAAIO,CAAAA,cAAJ,CAAqB,CACrBP,2BAAAA,CAAAA,YAAIQ,CAAAA,mBAAJ,CAA0B,CAC1BR,2BAAAA,CAAAA,YAAIS,CAAAA,gBAAJ,CAAuB,CACvBT;0BAAAA,CAAAA,YAAIU,CAAAA,SAAJ,CAAgB,CAChBV,2BAAAA,CAAAA,YAAIW,CAAAA,QAAJ,CAAe,C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AhB,CAAuB,SAAvB,CAAkChD,0BAAAA,CAAAA,YAAIY,CAAAA,UAAtC,CADEsL,EACmD,WAhBzD,CAiBMC,EACFnM,0BAAAA,CAAAA,YAAI4E,CAAAA,WAAJ,CAAgB5B,CAAhB,CAAuB,SAAvB,CAAkChD,0BAAAA,CAAAA,YAAIY,CAAAA,UAAtC,CADEuL,EACmD,WACnDC,EAAAA,CAAQpM,0BAAAA,CAAAA,YAAI4E,CAAAA,WAAJ,CAAgB5B,CAAhB,CAAuB,OAAvB,CAAgChD,0BAAAA,CAAAA,YAAIY,CAAAA,UAApC,CAARwL,EAA2D,CAGjE,OAAO,CADH7G,CACG,CADY,GACZ,CADkB2G,CAClB,CAD4B,IAC5B,CADmCC,CACnC,CAD6C,IAC7C,CADoDC,CACpD,CAD4D,GAC5D,CAAOpM,0BAAAA,CAAAA,YAAIG,CAAAA,UAAX,CAxB6B,C,CCnBtC,IAAAkM,+BAAUC","file":"lua_compressed.js","sourcesContent":["/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Helper functions for generating Lua for blocks.\n * Based on Ellen Spertus's blocky-lua project.\n * @suppress {checkTypes|globalThis}\n */\n'use strict';\n\ngoog.module('Blockly.Lua');\n\nconst objectUtils = goog.require('Blockly.utils.object');\nconst stringUtils = goog.require('Blockly.utils.string');\nconst {Block} = goog.requireType('Blockly.Block');\nconst {Generator} = goog.require('Blockly.Generator');\nconst {inputTypes} = goog.require('Blockly.inputTypes');\nconst {Names} = goog.require('Blockly.Names');\nconst {Workspace} = goog.requireType('Blockly.Workspace');\n\n\n/**\n * Lua code generator.\n * @type {!Generator}\n */\nconst Lua = new Generator('Lua');\n\n/**\n * List of illegal variable names.\n * This is not intended to be a security feature. Blockly is 100% client-side,\n * so bypassing this list is trivial. This is intended to prevent users from\n * accidentally clobbering a built-in object or function.\n */\nLua.addReservedWords(\n // Special character\n '_,' +\n // From theoriginalbit's script:\n // https://github.com/espertus/blockly-lua/issues/6\n '__inext,assert,bit,colors,colours,coroutine,disk,dofile,error,fs,' +\n 'fetfenv,getmetatable,gps,help,io,ipairs,keys,loadfile,loadstring,math,' +\n 'native,next,os,paintutils,pairs,parallel,pcall,peripheral,print,' +\n 'printError,rawequal,rawget,rawset,read,rednet,redstone,rs,select,' +\n 'setfenv,setmetatable,sleep,string,table,term,textutils,tonumber,' +\n 'tostring,turtle,type,unpack,vector,write,xpcall,_VERSION,__indext,' +\n // Not included in the script, probably because it wasn't enabled:\n 'HTTP,' +\n // Keywords (http://www.lua.org/pil/1.3.html).\n 'and,break,do,else,elseif,end,false,for,function,if,in,local,nil,not,or,' +\n 'repeat,return,then,true,until,while,' +\n // Metamethods (http://www.lua.org/manual/5.2/manual.html).\n 'add,sub,mul,div,mod,pow,unm,concat,len,eq,lt,le,index,newindex,call,' +\n // Basic functions (http://www.lua.org/manual/5.2/manual.html, section 6.1).\n 'assert,collectgarbage,dofile,error,_G,getmetatable,inpairs,load,' +\n 'loadfile,next,pairs,pcall,print,rawequal,rawget,rawlen,rawset,select,' +\n 'setmetatable,tonumber,tostring,type,_VERSION,xpcall,' +\n // Modules (http://www.lua.org/manual/5.2/manual.html, section 6.3).\n 'require,package,string,table,math,bit32,io,file,os,debug');\n\n/**\n * Order of operation ENUMs.\n * http://www.lua.org/manual/5.3/manual.html#3.4.8\n */\nLua.ORDER_ATOMIC = 0; // literals\n// The next level was not explicit in documentation and inferred by Ellen.\nLua.ORDER_HIGH = 1; // Function calls, tables[]\nLua.ORDER_EXPONENTIATION = 2; // ^\nLua.ORDER_UNARY = 3; // not # - ~\nLua.ORDER_MULTIPLICATIVE = 4; // * / %\nLua.ORDER_ADDITIVE = 5; // + -\nLua.ORDER_CONCATENATION = 6; // ..\nLua.ORDER_RELATIONAL = 7; // < > <= >= ~= ==\nLua.ORDER_AND = 8; // and\nLua.ORDER_OR = 9; // or\nLua.ORDER_NONE = 99;\n\n/**\n * Note: Lua is not supporting zero-indexing since the language itself is\n * one-indexed, so the generator does not repoct the oneBasedIndex configuration\n * option used for lists and text.\n */\n\n/**\n * Whether the init method has been called.\n * @type {?boolean}\n */\nLua.isInitialized = false;\n\n/**\n * Initialise the database of variable names.\n * @param {!Workspace} workspace Workspace to generate code from.\n */\nLua.init = function(workspace) {\n // Call Blockly.Generator's init.\n Object.getPrototypeOf(this).init.call(this);\n\n if (!this.nameDB_) {\n this.nameDB_ = new Names(this.RESERVED_WORDS_);\n } else {\n this.nameDB_.reset();\n }\n this.nameDB_.setVariableMap(workspace.getVariableMap());\n this.nameDB_.populateVariables(workspace);\n this.nameDB_.populateProcedures(workspace);\n\n this.isInitialized = true;\n};\n\n/**\n * Prepend the generated code with the variable definitions.\n * @param {string} code Generated code.\n * @return {string} Completed code.\n */\nLua.finish = function(code) {\n // Convert the definitions dictionary into a list.\n const definitions = objectUtils.values(this.definitions_);\n // Call Blockly.Generator's finish.\n code = Object.getPrototypeOf(this).finish.call(this, code);\n this.isInitialized = false;\n\n this.nameDB_.reset();\n return definitions.join('\\n\\n') + '\\n\\n\\n' + code;\n};\n\n/**\n * Naked values are top-level blocks with outputs that aren't plugged into\n * anything. In Lua, an expression is not a legal statement, so we must assign\n * the value to the (conventionally ignored) _.\n * http://lua-users.org/wiki/ExpressionsAsStatements\n * @param {string} line Line of generated code.\n * @return {string} Legal line of code.\n */\nLua.scrubNakedValue = function(line) {\n return 'local _ = ' + line + '\\n';\n};\n\n/**\n * Encode a string as a properly escaped Lua string, complete with\n * quotes.\n * @param {string} string Text to encode.\n * @return {string} Lua string.\n * @protected\n */\nLua.quote_ = function(string) {\n string = string.replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\n/g, '\\\\\\n')\n .replace(/'/g, '\\\\\\'');\n return '\\'' + string + '\\'';\n};\n\n/**\n * Encode a string as a properly escaped multiline Lua string, complete with\n * quotes.\n * @param {string} string Text to encode.\n * @return {string} Lua string.\n * @protected\n */\nLua.multiline_quote_ = function(string) {\n const lines = string.split(/\\n/g).map(this.quote_);\n // Join with the following, plus a newline:\n // .. '\\n' ..\n return lines.join(' .. \\'\\\\n\\' ..\\n');\n};\n\n/**\n * Common tasks for generating Lua from blocks.\n * Handles comments for the specified block and any connected value blocks.\n * Calls any statements following this block.\n * @param {!Block} block The current block.\n * @param {string} code The Lua code created for this block.\n * @param {boolean=} opt_thisOnly True to generate code for only this statement.\n * @return {string} Lua code with comments and subsequent blocks added.\n * @protected\n */\nLua.scrub_ = function(block, code, opt_thisOnly) {\n let commentCode = '';\n // Only collect comments for blocks that aren't inline.\n if (!block.outputConnection || !block.outputConnection.targetConnection) {\n // Collect comment for this block.\n let comment = block.getCommentText();\n if (comment) {\n comment = stringUtils.wrap(comment, this.COMMENT_WRAP - 3);\n commentCode += this.prefixLines(comment, '-- ') + '\\n';\n }\n // Collect comments for all value arguments.\n // Don't collect comments for nested statements.\n for (let i = 0; i < block.inputList.length; i++) {\n if (block.inputList[i].type === inputTypes.VALUE) {\n const childBlock = block.inputList[i].connection.targetBlock();\n if (childBlock) {\n comment = this.allNestedComments(childBlock);\n if (comment) {\n commentCode += this.prefixLines(comment, '-- ');\n }\n }\n }\n }\n }\n const nextBlock = block.nextConnection && block.nextConnection.targetBlock();\n const nextCode = opt_thisOnly ? '' : this.blockToCode(nextBlock);\n return commentCode + code + nextCode;\n};\n\nexports.luaGenerator = Lua;\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for variable blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.variables');\n\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['variables_get'] = function(block) {\n // Variable getter.\n const code =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n return [code, Lua.ORDER_ATOMIC];\n};\n\nLua['variables_set'] = function(block) {\n // Variable setter.\n const argument0 = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || '0';\n const varName =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n return varName + ' = ' + argument0 + '\\n';\n};\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for dynamic variable blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.variablesDynamic');\n\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n/** @suppress {extraRequire} */\ngoog.require('Blockly.Lua.variables');\n\n\n// Lua is dynamically typed.\nLua['variables_get_dynamic'] = Lua['variables_get'];\nLua['variables_set_dynamic'] = Lua['variables_set'];\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for text blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.texts');\n\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['text'] = function(block) {\n // Text value.\n const code = Lua.quote_(block.getFieldValue('TEXT'));\n return [code, Lua.ORDER_ATOMIC];\n};\n\nLua['text_multiline'] = function(block) {\n // Text value.\n const code = Lua.multiline_quote_(block.getFieldValue('TEXT'));\n const order =\n code.indexOf('..') !== -1 ? Lua.ORDER_CONCATENATION : Lua.ORDER_ATOMIC;\n return [code, order];\n};\n\nLua['text_join'] = function(block) {\n // Create a string made up of any number of elements of any type.\n if (block.itemCount_ === 0) {\n return [\"''\", Lua.ORDER_ATOMIC];\n } else if (block.itemCount_ === 1) {\n const element = Lua.valueToCode(block, 'ADD0', Lua.ORDER_NONE) || \"''\";\n const code = 'tostring(' + element + ')';\n return [code, Lua.ORDER_HIGH];\n } else if (block.itemCount_ === 2) {\n const element0 =\n Lua.valueToCode(block, 'ADD0', Lua.ORDER_CONCATENATION) || \"''\";\n const element1 =\n Lua.valueToCode(block, 'ADD1', Lua.ORDER_CONCATENATION) || \"''\";\n const code = element0 + ' .. ' + element1;\n return [code, Lua.ORDER_CONCATENATION];\n } else {\n const elements = [];\n for (let i = 0; i < block.itemCount_; i++) {\n elements[i] = Lua.valueToCode(block, 'ADD' + i, Lua.ORDER_NONE) || \"''\";\n }\n const code = 'table.concat({' + elements.join(', ') + '})';\n return [code, Lua.ORDER_HIGH];\n }\n};\n\nLua['text_append'] = function(block) {\n // Append to a variable in place.\n const varName =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n const value =\n Lua.valueToCode(block, 'TEXT', Lua.ORDER_CONCATENATION) || \"''\";\n return varName + ' = ' + varName + ' .. ' + value + '\\n';\n};\n\nLua['text_length'] = function(block) {\n // String or array length.\n const text = Lua.valueToCode(block, 'VALUE', Lua.ORDER_UNARY) || \"''\";\n return ['#' + text, Lua.ORDER_UNARY];\n};\n\nLua['text_isEmpty'] = function(block) {\n // Is the string null or array empty?\n const text = Lua.valueToCode(block, 'VALUE', Lua.ORDER_UNARY) || \"''\";\n return ['#' + text + ' == 0', Lua.ORDER_RELATIONAL];\n};\n\nLua['text_indexOf'] = function(block) {\n // Search the text for a substring.\n const substring = Lua.valueToCode(block, 'FIND', Lua.ORDER_NONE) || \"''\";\n const text = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || \"''\";\n let functionName;\n if (block.getFieldValue('END') === 'FIRST') {\n functionName = Lua.provideFunction_('firstIndexOf', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(str, substr)\n local i = string.find(str, substr, 1, true)\n if i == nil then\n return 0\n end\n return i\nend\n`);\n } else {\n functionName = Lua.provideFunction_('lastIndexOf', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(str, substr)\n local i = string.find(string.reverse(str), string.reverse(substr), 1, true)\n if i then\n return #str + 2 - i - #substr\n end\n return 0\nend\n`);\n }\n const code = functionName + '(' + text + ', ' + substring + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_charAt'] = function(block) {\n // Get letter at index.\n // Note: Until January 2013 this block did not have the WHERE input.\n const where = block.getFieldValue('WHERE') || 'FROM_START';\n const atOrder = (where === 'FROM_END') ? Lua.ORDER_UNARY : Lua.ORDER_NONE;\n const at = Lua.valueToCode(block, 'AT', atOrder) || '1';\n const text = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || \"''\";\n let code;\n if (where === 'RANDOM') {\n const functionName = Lua.provideFunction_('text_random_letter', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(str)\n local index = math.random(string.len(str))\n return string.sub(str, index, index)\nend\n`);\n code = functionName + '(' + text + ')';\n } else {\n let start;\n if (where === 'FIRST') {\n start = '1';\n } else if (where === 'LAST') {\n start = '-1';\n } else {\n if (where === 'FROM_START') {\n start = at;\n } else if (where === 'FROM_END') {\n start = '-' + at;\n } else {\n throw Error('Unhandled option (text_charAt).');\n }\n }\n if (start.match(/^-?\\w*$/)) {\n code = 'string.sub(' + text + ', ' + start + ', ' + start + ')';\n } else {\n // use function to avoid reevaluation\n const functionName = Lua.provideFunction_('text_char_at', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(str, index)\n return string.sub(str, index, index)\nend\n`);\n code = functionName + '(' + text + ', ' + start + ')';\n }\n }\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_getSubstring'] = function(block) {\n // Get substring.\n const text = Lua.valueToCode(block, 'STRING', Lua.ORDER_NONE) || \"''\";\n\n // Get start index.\n const where1 = block.getFieldValue('WHERE1');\n const at1Order = (where1 === 'FROM_END') ? Lua.ORDER_UNARY : Lua.ORDER_NONE;\n const at1 = Lua.valueToCode(block, 'AT1', at1Order) || '1';\n let start;\n if (where1 === 'FIRST') {\n start = 1;\n } else if (where1 === 'FROM_START') {\n start = at1;\n } else if (where1 === 'FROM_END') {\n start = '-' + at1;\n } else {\n throw Error('Unhandled option (text_getSubstring)');\n }\n\n // Get end index.\n const where2 = block.getFieldValue('WHERE2');\n const at2Order = (where2 === 'FROM_END') ? Lua.ORDER_UNARY : Lua.ORDER_NONE;\n const at2 = Lua.valueToCode(block, 'AT2', at2Order) || '1';\n let end;\n if (where2 === 'LAST') {\n end = -1;\n } else if (where2 === 'FROM_START') {\n end = at2;\n } else if (where2 === 'FROM_END') {\n end = '-' + at2;\n } else {\n throw Error('Unhandled option (text_getSubstring)');\n }\n const code = 'string.sub(' + text + ', ' + start + ', ' + end + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_changeCase'] = function(block) {\n // Change capitalization.\n const operator = block.getFieldValue('CASE');\n const text = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n let functionName;\n if (operator === 'UPPERCASE') {\n functionName = 'string.upper';\n } else if (operator === 'LOWERCASE') {\n functionName = 'string.lower';\n } else if (operator === 'TITLECASE') {\n // There are shorter versions at\n // http://lua-users.org/wiki/SciteTitleCase\n // that do not preserve whitespace.\n functionName = Lua.provideFunction_('text_titlecase', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(str)\n local buf = {}\n local inWord = false\n for i = 1, #str do\n local c = string.sub(str, i, i)\n if inWord then\n table.insert(buf, string.lower(c))\n if string.find(c, \"%s\") then\n inWord = false\n end\n else\n table.insert(buf, string.upper(c))\n inWord = true\n end\n end\n return table.concat(buf)\nend\n`);\n }\n const code = functionName + '(' + text + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_trim'] = function(block) {\n // Trim spaces.\n const OPERATORS = {LEFT: '^%s*(,-)', RIGHT: '(.-)%s*$', BOTH: '^%s*(.-)%s*$'};\n const operator = OPERATORS[block.getFieldValue('MODE')];\n const text = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n const code = 'string.gsub(' + text + ', \"' + operator + '\", \"%1\")';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_print'] = function(block) {\n // Print statement.\n const msg = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n return 'print(' + msg + ')\\n';\n};\n\nLua['text_prompt_ext'] = function(block) {\n // Prompt function.\n let msg;\n if (block.getField('TEXT')) {\n // Internal message.\n msg = Lua.quote_(block.getFieldValue('TEXT'));\n } else {\n // External message.\n msg = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n }\n\n const functionName = Lua.provideFunction_('text_prompt', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(msg)\n io.write(msg)\n io.flush()\n return io.read()\nend\n`);\n let code = functionName + '(' + msg + ')';\n\n const toNumber = block.getFieldValue('TYPE') === 'NUMBER';\n if (toNumber) {\n code = 'tonumber(' + code + ', 10)';\n }\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_prompt'] = Lua['text_prompt_ext'];\n\nLua['text_count'] = function(block) {\n const text = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n const sub = Lua.valueToCode(block, 'SUB', Lua.ORDER_NONE) || \"''\";\n const functionName = Lua.provideFunction_('text_count', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle)\n if #needle == 0 then\n return #haystack + 1\n end\n local i = 1\n local count = 0\n while true do\n i = string.find(haystack, needle, i, true)\n if i == nil then\n break\n end\n count = count + 1\n i = i + #needle\n end\n return count\nend\n`);\n const code = functionName + '(' + text + ', ' + sub + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_replace'] = function(block) {\n const text = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n const from = Lua.valueToCode(block, 'FROM', Lua.ORDER_NONE) || \"''\";\n const to = Lua.valueToCode(block, 'TO', Lua.ORDER_NONE) || \"''\";\n const functionName = Lua.provideFunction_('text_replace', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement)\n local buf = {}\n local i = 1\n while i <= #haystack do\n if string.sub(haystack, i, i + #needle - 1) == needle then\n for j = 1, #replacement do\n table.insert(buf, string.sub(replacement, j, j))\n end\n i = i + #needle\n else\n table.insert(buf, string.sub(haystack, i, i))\n i = i + 1\n end\n end\n return table.concat(buf)\nend\n`);\n const code = functionName + '(' + text + ', ' + from + ', ' + to + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['text_reverse'] = function(block) {\n const text = Lua.valueToCode(block, 'TEXT', Lua.ORDER_NONE) || \"''\";\n const code = 'string.reverse(' + text + ')';\n return [code, Lua.ORDER_HIGH];\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for procedure blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.procedures');\n\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['procedures_defreturn'] = function(block) {\n // Define a procedure with a return value.\n const funcName =\n Lua.nameDB_.getName(block.getFieldValue('NAME'), NameType.PROCEDURE);\n let xfix1 = '';\n if (Lua.STATEMENT_PREFIX) {\n xfix1 += Lua.injectId(Lua.STATEMENT_PREFIX, block);\n }\n if (Lua.STATEMENT_SUFFIX) {\n xfix1 += Lua.injectId(Lua.STATEMENT_SUFFIX, block);\n }\n if (xfix1) {\n xfix1 = Lua.prefixLines(xfix1, Lua.INDENT);\n }\n let loopTrap = '';\n if (Lua.INFINITE_LOOP_TRAP) {\n loopTrap = Lua.prefixLines(\n Lua.injectId(Lua.INFINITE_LOOP_TRAP, block), Lua.INDENT);\n }\n let branch = Lua.statementToCode(block, 'STACK');\n let returnValue = Lua.valueToCode(block, 'RETURN', Lua.ORDER_NONE) || '';\n let xfix2 = '';\n if (branch && returnValue) {\n // After executing the function body, revisit this block for the return.\n xfix2 = xfix1;\n }\n if (returnValue) {\n returnValue = Lua.INDENT + 'return ' + returnValue + '\\n';\n } else if (!branch) {\n branch = '';\n }\n const args = [];\n const variables = block.getVars();\n for (let i = 0; i < variables.length; i++) {\n args[i] = Lua.nameDB_.getName(variables[i], NameType.VARIABLE);\n }\n let code = 'function ' + funcName + '(' + args.join(', ') + ')\\n' + xfix1 +\n loopTrap + branch + xfix2 + returnValue + 'end\\n';\n code = Lua.scrub_(block, code);\n // Add % so as not to collide with helper functions in definitions list.\n Lua.definitions_['%' + funcName] = code;\n return null;\n};\n\n// Defining a procedure without a return value uses the same generator as\n// a procedure with a return value.\nLua['procedures_defnoreturn'] = Lua['procedures_defreturn'];\n\nLua['procedures_callreturn'] = function(block) {\n // Call a procedure with a return value.\n const funcName =\n Lua.nameDB_.getName(block.getFieldValue('NAME'), NameType.PROCEDURE);\n const args = [];\n const variables = block.getVars();\n for (let i = 0; i < variables.length; i++) {\n args[i] = Lua.valueToCode(block, 'ARG' + i, Lua.ORDER_NONE) || 'nil';\n }\n const code = funcName + '(' + args.join(', ') + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['procedures_callnoreturn'] = function(block) {\n // Call a procedure with no return value.\n // Generated code is for a function call as a statement is the same as a\n // function call as a value, with the addition of line ending.\n const tuple = Lua['procedures_callreturn'](block);\n return tuple[0] + '\\n';\n};\n\nLua['procedures_ifreturn'] = function(block) {\n // Conditionally return value from a procedure.\n const condition =\n Lua.valueToCode(block, 'CONDITION', Lua.ORDER_NONE) || 'false';\n let code = 'if ' + condition + ' then\\n';\n if (Lua.STATEMENT_SUFFIX) {\n // Inject any statement suffix here since the regular one at the end\n // will not get executed if the return is triggered.\n code +=\n Lua.prefixLines(Lua.injectId(Lua.STATEMENT_SUFFIX, block), Lua.INDENT);\n }\n if (block.hasReturnValue_) {\n const value = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || 'nil';\n code += Lua.INDENT + 'return ' + value + '\\n';\n } else {\n code += Lua.INDENT + 'return\\n';\n }\n code += 'end\\n';\n return code;\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for math blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.math');\n\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['math_number'] = function(block) {\n // Numeric value.\n const code = Number(block.getFieldValue('NUM'));\n const order = code < 0 ? Lua.ORDER_UNARY : Lua.ORDER_ATOMIC;\n return [code, order];\n};\n\nLua['math_arithmetic'] = function(block) {\n // Basic arithmetic operators, and power.\n const OPERATORS = {\n 'ADD': [' + ', Lua.ORDER_ADDITIVE],\n 'MINUS': [' - ', Lua.ORDER_ADDITIVE],\n 'MULTIPLY': [' * ', Lua.ORDER_MULTIPLICATIVE],\n 'DIVIDE': [' / ', Lua.ORDER_MULTIPLICATIVE],\n 'POWER': [' ^ ', Lua.ORDER_EXPONENTIATION],\n };\n const tuple = OPERATORS[block.getFieldValue('OP')];\n const operator = tuple[0];\n const order = tuple[1];\n const argument0 = Lua.valueToCode(block, 'A', order) || '0';\n const argument1 = Lua.valueToCode(block, 'B', order) || '0';\n const code = argument0 + operator + argument1;\n return [code, order];\n};\n\nLua['math_single'] = function(block) {\n // Math operators with single operand.\n const operator = block.getFieldValue('OP');\n let arg;\n if (operator === 'NEG') {\n // Negation is a special case given its different operator precedence.\n arg = Lua.valueToCode(block, 'NUM', Lua.ORDER_UNARY) || '0';\n return ['-' + arg, Lua.ORDER_UNARY];\n }\n if (operator === 'POW10') {\n arg = Lua.valueToCode(block, 'NUM', Lua.ORDER_EXPONENTIATION) || '0';\n return ['10 ^ ' + arg, Lua.ORDER_EXPONENTIATION];\n }\n if (operator === 'ROUND') {\n arg = Lua.valueToCode(block, 'NUM', Lua.ORDER_ADDITIVE) || '0';\n } else {\n arg = Lua.valueToCode(block, 'NUM', Lua.ORDER_NONE) || '0';\n }\n\n let code;\n switch (operator) {\n case 'ABS':\n code = 'math.abs(' + arg + ')';\n break;\n case 'ROOT':\n code = 'math.sqrt(' + arg + ')';\n break;\n case 'LN':\n code = 'math.log(' + arg + ')';\n break;\n case 'LOG10':\n code = 'math.log(' + arg + ', 10)';\n break;\n case 'EXP':\n code = 'math.exp(' + arg + ')';\n break;\n case 'ROUND':\n // This rounds up. Blockly does not specify rounding direction.\n code = 'math.floor(' + arg + ' + .5)';\n break;\n case 'ROUNDUP':\n code = 'math.ceil(' + arg + ')';\n break;\n case 'ROUNDDOWN':\n code = 'math.floor(' + arg + ')';\n break;\n case 'SIN':\n code = 'math.sin(math.rad(' + arg + '))';\n break;\n case 'COS':\n code = 'math.cos(math.rad(' + arg + '))';\n break;\n case 'TAN':\n code = 'math.tan(math.rad(' + arg + '))';\n break;\n case 'ASIN':\n code = 'math.deg(math.asin(' + arg + '))';\n break;\n case 'ACOS':\n code = 'math.deg(math.acos(' + arg + '))';\n break;\n case 'ATAN':\n code = 'math.deg(math.atan(' + arg + '))';\n break;\n default:\n throw Error('Unknown math operator: ' + operator);\n }\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['math_constant'] = function(block) {\n // Constants: PI, E, the Golden Ratio, sqrt(2), 1/sqrt(2), INFINITY.\n const CONSTANTS = {\n 'PI': ['math.pi', Lua.ORDER_HIGH],\n 'E': ['math.exp(1)', Lua.ORDER_HIGH],\n 'GOLDEN_RATIO': ['(1 + math.sqrt(5)) / 2', Lua.ORDER_MULTIPLICATIVE],\n 'SQRT2': ['math.sqrt(2)', Lua.ORDER_HIGH],\n 'SQRT1_2': ['math.sqrt(1 / 2)', Lua.ORDER_HIGH],\n 'INFINITY': ['math.huge', Lua.ORDER_HIGH],\n };\n return CONSTANTS[block.getFieldValue('CONSTANT')];\n};\n\nLua['math_number_property'] = function(block) {\n // Check if a number is even, odd, prime, whole, positive, or negative\n // or if it is divisible by certain number. Returns true or false.\n const PROPERTIES = {\n 'EVEN': [' % 2 == 0', Lua.ORDER_MULTIPLICATIVE, Lua.ORDER_RELATIONAL],\n 'ODD': [' % 2 == 1', Lua.ORDER_MULTIPLICATIVE, Lua.ORDER_RELATIONAL],\n 'WHOLE': [' % 1 == 0', Lua.ORDER_MULTIPLICATIVE, Lua.ORDER_RELATIONAL],\n 'POSITIVE': [' > 0', Lua.ORDER_RELATIONAL, Lua.ORDER_RELATIONAL],\n 'NEGATIVE': [' < 0', Lua.ORDER_RELATIONAL, Lua.ORDER_RELATIONAL],\n 'DIVISIBLE_BY': [null, Lua.ORDER_MULTIPLICATIVE, Lua.ORDER_RELATIONAL],\n 'PRIME': [null, Lua.ORDER_NONE, Lua.ORDER_HIGH],\n };\n const dropdownProperty = block.getFieldValue('PROPERTY');\n const [suffix, inputOrder, outputOrder] = PROPERTIES[dropdownProperty];\n const numberToCheck = Lua.valueToCode(block, 'NUMBER_TO_CHECK',\n inputOrder) || '0';\n let code;\n if (dropdownProperty === 'PRIME') {\n // Prime is a special case as it is not a one-liner test.\n const functionName = Lua.provideFunction_('math_isPrime', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(n)\n -- https://en.wikipedia.org/wiki/Primality_test#Naive_methods\n if n == 2 or n == 3 then\n return true\n end\n -- False if n is NaN, negative, is 1, or not whole.\n -- And false if n is divisible by 2 or 3.\n if not(n > 1) or n % 1 ~= 0 or n % 2 == 0 or n % 3 == 0 then\n return false\n end\n -- Check all the numbers of form 6k +/- 1, up to sqrt(n).\n for x = 6, math.sqrt(n) + 1.5, 6 do\n if n % (x - 1) == 0 or n % (x + 1) == 0 then\n return false\n end\n end\n return true\nend\n`);\n code = functionName + '(' + numberToCheck + ')';\n } else if (dropdownProperty === 'DIVISIBLE_BY') {\n const divisor = Lua.valueToCode(block, 'DIVISOR',\n Lua.ORDER_MULTIPLICATIVE) || '0';\n // If 'divisor' is some code that evals to 0, Lua will produce a nan.\n // Let's produce nil if we can determine this at compile-time.\n if (divisor === '0') {\n return ['nil', Lua.ORDER_ATOMIC];\n }\n // The normal trick to implement ?: with and/or doesn't work here:\n // divisor == 0 and nil or number_to_check % divisor == 0\n // because nil is false, so allow a runtime failure. :-(\n code = numberToCheck + ' % ' + divisor + ' == 0';\n } else {\n code = numberToCheck + suffix;\n }\n return [code, outputOrder];\n};\n\nLua['math_change'] = function(block) {\n // Add to a variable in place.\n const argument0 = Lua.valueToCode(block, 'DELTA', Lua.ORDER_ADDITIVE) || '0';\n const varName =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n return varName + ' = ' + varName + ' + ' + argument0 + '\\n';\n};\n\n// Rounding functions have a single operand.\nLua['math_round'] = Lua['math_single'];\n// Trigonometry functions have a single operand.\nLua['math_trig'] = Lua['math_single'];\n\nLua['math_on_list'] = function(block) {\n // Math functions for lists.\n const func = block.getFieldValue('OP');\n const list = Lua.valueToCode(block, 'LIST', Lua.ORDER_NONE) || '{}';\n let functionName;\n\n // Functions needed in more than one case.\n function provideSum() {\n return Lua.provideFunction_('math_sum', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n local result = 0\n for _, v in ipairs(t) do\n result = result + v\n end\n return result\nend\n`);\n }\n\n switch (func) {\n case 'SUM':\n functionName = provideSum();\n break;\n\n case 'MIN':\n // Returns 0 for the empty list.\n functionName = Lua.provideFunction_('math_min', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n if #t == 0 then\n return 0\n end\n local result = math.huge\n for _, v in ipairs(t) do\n if v < result then\n result = v\n end\n end\n return result\nend\n`);\n break;\n\n case 'AVERAGE':\n // Returns 0 for the empty list.\n functionName = Lua.provideFunction_('math_average', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n if #t == 0 then\n return 0\n end\n return ${provideSum()}(t) / #t\nend\n`);\n break;\n\n case 'MAX':\n // Returns 0 for the empty list.\n functionName = Lua.provideFunction_('math_max', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n if #t == 0 then\n return 0\n end\n local result = -math.huge\n for _, v in ipairs(t) do\n if v > result then\n result = v\n end\n end\n return result\nend\n`);\n break;\n\n case 'MEDIAN':\n // This operation excludes non-numbers.\n functionName = Lua.provideFunction_('math_median', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n -- Source: http://lua-users.org/wiki/SimpleStats\n if #t == 0 then\n return 0\n end\n local temp = {}\n for _, v in ipairs(t) do\n if type(v) == 'number' then\n table.insert(temp, v)\n end\n end\n table.sort(temp)\n if #temp % 2 == 0 then\n return (temp[#temp / 2] + temp[(#temp / 2) + 1]) / 2\n else\n return temp[math.ceil(#temp / 2)]\n end\nend\n`);\n break;\n\n case 'MODE':\n // As a list of numbers can contain more than one mode,\n // the returned result is provided as an array.\n // The Lua version includes non-numbers.\n functionName = Lua.provideFunction_('math_modes', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n -- Source: http://lua-users.org/wiki/SimpleStats\n local counts = {}\n for _, v in ipairs(t) do\n if counts[v] == nil then\n counts[v] = 1\n else\n counts[v] = counts[v] + 1\n end\n end\n local biggestCount = 0\n for _, v in pairs(counts) do\n if v > biggestCount then\n biggestCount = v\n end\n end\n local temp = {}\n for k, v in pairs(counts) do\n if v == biggestCount then\n table.insert(temp, k)\n end\n end\n return temp\nend\n`);\n break;\n\n case 'STD_DEV':\n functionName = Lua.provideFunction_('math_standard_deviation', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n local m\n local vm\n local total = 0\n local count = 0\n local result\n m = #t == 0 and 0 or ${provideSum()}(t) / #t\n for _, v in ipairs(t) do\n if type(v) == 'number' then\n vm = v - m\n total = total + (vm * vm)\n count = count + 1\n end\n end\n result = math.sqrt(total / (count-1))\n return result\nend\n`);\n break;\n\n case 'RANDOM':\n functionName = Lua.provideFunction_('math_random_list', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t)\n if #t == 0 then\n return nil\n end\n return t[math.random(#t)]\nend\n`);\n break;\n\n default:\n throw Error('Unknown operator: ' + func);\n }\n return [functionName + '(' + list + ')', Lua.ORDER_HIGH];\n};\n\nLua['math_modulo'] = function(block) {\n // Remainder computation.\n const argument0 =\n Lua.valueToCode(block, 'DIVIDEND', Lua.ORDER_MULTIPLICATIVE) || '0';\n const argument1 =\n Lua.valueToCode(block, 'DIVISOR', Lua.ORDER_MULTIPLICATIVE) || '0';\n const code = argument0 + ' % ' + argument1;\n return [code, Lua.ORDER_MULTIPLICATIVE];\n};\n\nLua['math_constrain'] = function(block) {\n // Constrain a number between two limits.\n const argument0 = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || '0';\n const argument1 =\n Lua.valueToCode(block, 'LOW', Lua.ORDER_NONE) || '-math.huge';\n const argument2 =\n Lua.valueToCode(block, 'HIGH', Lua.ORDER_NONE) || 'math.huge';\n const code = 'math.min(math.max(' + argument0 + ', ' + argument1 + '), ' +\n argument2 + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['math_random_int'] = function(block) {\n // Random integer between [X] and [Y].\n const argument0 = Lua.valueToCode(block, 'FROM', Lua.ORDER_NONE) || '0';\n const argument1 = Lua.valueToCode(block, 'TO', Lua.ORDER_NONE) || '0';\n const code = 'math.random(' + argument0 + ', ' + argument1 + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['math_random_float'] = function(block) {\n // Random fraction between 0 and 1.\n return ['math.random()', Lua.ORDER_HIGH];\n};\n\nLua['math_atan2'] = function(block) {\n // Arctangent of point (X, Y) in degrees from -180 to 180.\n const argument0 = Lua.valueToCode(block, 'X', Lua.ORDER_NONE) || '0';\n const argument1 = Lua.valueToCode(block, 'Y', Lua.ORDER_NONE) || '0';\n return [\n 'math.deg(math.atan2(' + argument1 + ', ' + argument0 + '))', Lua.ORDER_HIGH\n ];\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for loop blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.loops');\n\nconst stringUtils = goog.require('Blockly.utils.string');\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\n/**\n * This is the text used to implement a <pre>continue</pre>.\n * It is also used to recognise <pre>continue</pre>s in generated code so that\n * the appropriate label can be put at the end of the loop body.\n * @const {string}\n */\nconst CONTINUE_STATEMENT = 'goto continue\\n';\n\n/**\n * If the loop body contains a \"goto continue\" statement, add a continue label\n * to the loop body. Slightly inefficient, as continue labels will be generated\n * in all outer loops, but this is safer than duplicating the logic of\n * blockToCode.\n *\n * @param {string} branch Generated code of the loop body\n * @return {string} Generated label or '' if unnecessary\n */\nconst addContinueLabel = function(branch) {\n if (branch.indexOf(CONTINUE_STATEMENT) !== -1) {\n // False positives are possible (e.g. a string literal), but are harmless.\n return branch + Lua.INDENT + '::continue::\\n';\n } else {\n return branch;\n }\n};\n\nLua['controls_repeat_ext'] = function(block) {\n // Repeat n times.\n let repeats;\n if (block.getField('TIMES')) {\n // Internal number.\n repeats = String(Number(block.getFieldValue('TIMES')));\n } else {\n // External number.\n repeats = Lua.valueToCode(block, 'TIMES', Lua.ORDER_NONE) || '0';\n }\n if (stringUtils.isNumber(repeats)) {\n repeats = parseInt(repeats, 10);\n } else {\n repeats = 'math.floor(' + repeats + ')';\n }\n let branch = Lua.statementToCode(block, 'DO');\n branch = Lua.addLoopTrap(branch, block);\n branch = addContinueLabel(branch);\n const loopVar = Lua.nameDB_.getDistinctName('count', NameType.VARIABLE);\n const code =\n 'for ' + loopVar + ' = 1, ' + repeats + ' do\\n' + branch + 'end\\n';\n return code;\n};\n\nLua['controls_repeat'] = Lua['controls_repeat_ext'];\n\nLua['controls_whileUntil'] = function(block) {\n // Do while/until loop.\n const until = block.getFieldValue('MODE') === 'UNTIL';\n let argument0 =\n Lua.valueToCode(\n block, 'BOOL', until ? Lua.ORDER_UNARY : Lua.ORDER_NONE) ||\n 'false';\n let branch = Lua.statementToCode(block, 'DO');\n branch = Lua.addLoopTrap(branch, block);\n branch = addContinueLabel(branch);\n if (until) {\n argument0 = 'not ' + argument0;\n }\n return 'while ' + argument0 + ' do\\n' + branch + 'end\\n';\n};\n\nLua['controls_for'] = function(block) {\n // For loop.\n const variable0 =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n const startVar = Lua.valueToCode(block, 'FROM', Lua.ORDER_NONE) || '0';\n const endVar = Lua.valueToCode(block, 'TO', Lua.ORDER_NONE) || '0';\n const increment = Lua.valueToCode(block, 'BY', Lua.ORDER_NONE) || '1';\n let branch = Lua.statementToCode(block, 'DO');\n branch = Lua.addLoopTrap(branch, block);\n branch = addContinueLabel(branch);\n let code = '';\n let incValue;\n if (stringUtils.isNumber(startVar) && stringUtils.isNumber(endVar) &&\n stringUtils.isNumber(increment)) {\n // All arguments are simple numbers.\n const up = Number(startVar) <= Number(endVar);\n const step = Math.abs(Number(increment));\n incValue = (up ? '' : '-') + step;\n } else {\n code = '';\n // Determine loop direction at start, in case one of the bounds\n // changes during loop execution.\n incValue =\n Lua.nameDB_.getDistinctName(variable0 + '_inc', NameType.VARIABLE);\n code += incValue + ' = ';\n if (stringUtils.isNumber(increment)) {\n code += Math.abs(increment) + '\\n';\n } else {\n code += 'math.abs(' + increment + ')\\n';\n }\n code += 'if (' + startVar + ') > (' + endVar + ') then\\n';\n code += Lua.INDENT + incValue + ' = -' + incValue + '\\n';\n code += 'end\\n';\n }\n code +=\n 'for ' + variable0 + ' = ' + startVar + ', ' + endVar + ', ' + incValue;\n code += ' do\\n' + branch + 'end\\n';\n return code;\n};\n\nLua['controls_forEach'] = function(block) {\n // For each loop.\n const variable0 =\n Lua.nameDB_.getName(block.getFieldValue('VAR'), NameType.VARIABLE);\n const argument0 = Lua.valueToCode(block, 'LIST', Lua.ORDER_NONE) || '{}';\n let branch = Lua.statementToCode(block, 'DO');\n branch = Lua.addLoopTrap(branch, block);\n branch = addContinueLabel(branch);\n const code = 'for _, ' + variable0 + ' in ipairs(' + argument0 + ') do \\n' +\n branch + 'end\\n';\n return code;\n};\n\nLua['controls_flow_statements'] = function(block) {\n // Flow statements: continue, break.\n let xfix = '';\n if (Lua.STATEMENT_PREFIX) {\n // Automatic prefix insertion is switched off for this block. Add manually.\n xfix += Lua.injectId(Lua.STATEMENT_PREFIX, block);\n }\n if (Lua.STATEMENT_SUFFIX) {\n // Inject any statement suffix here since the regular one at the end\n // will not get executed if the break/continue is triggered.\n xfix += Lua.injectId(Lua.STATEMENT_SUFFIX, block);\n }\n if (Lua.STATEMENT_PREFIX) {\n const loop = block.getSurroundLoop();\n if (loop && !loop.suppressPrefixSuffix) {\n // Inject loop's statement prefix here since the regular one at the end\n // of the loop will not get executed if 'continue' is triggered.\n // In the case of 'break', a prefix is needed due to the loop's suffix.\n xfix += Lua.injectId(Lua.STATEMENT_PREFIX, loop);\n }\n }\n switch (block.getFieldValue('FLOW')) {\n case 'BREAK':\n return xfix + 'break\\n';\n case 'CONTINUE':\n return xfix + CONTINUE_STATEMENT;\n }\n throw Error('Unknown flow statement.');\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for logic blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.logic');\n\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['controls_if'] = function(block) {\n // If/elseif/else condition.\n let n = 0;\n let code = '';\n if (Lua.STATEMENT_PREFIX) {\n // Automatic prefix insertion is switched off for this block. Add manually.\n code += Lua.injectId(Lua.STATEMENT_PREFIX, block);\n }\n do {\n const conditionCode =\n Lua.valueToCode(block, 'IF' + n, Lua.ORDER_NONE) || 'false';\n let branchCode = Lua.statementToCode(block, 'DO' + n);\n if (Lua.STATEMENT_SUFFIX) {\n branchCode = Lua.prefixLines(\n Lua.injectId(Lua.STATEMENT_SUFFIX, block), Lua.INDENT) + branchCode;\n }\n code +=\n (n > 0 ? 'else' : '') + 'if ' + conditionCode + ' then\\n' + branchCode;\n n++;\n } while (block.getInput('IF' + n));\n\n if (block.getInput('ELSE') || Lua.STATEMENT_SUFFIX) {\n let branchCode = Lua.statementToCode(block, 'ELSE');\n if (Lua.STATEMENT_SUFFIX) {\n branchCode = Lua.prefixLines(\n Lua.injectId(Lua.STATEMENT_SUFFIX, block), Lua.INDENT) +\n branchCode;\n }\n code += 'else\\n' + branchCode;\n }\n return code + 'end\\n';\n};\n\nLua['controls_ifelse'] = Lua['controls_if'];\n\nLua['logic_compare'] = function(block) {\n // Comparison operator.\n const OPERATORS =\n {'EQ': '==', 'NEQ': '~=', 'LT': '<', 'LTE': '<=', 'GT': '>', 'GTE': '>='};\n const operator = OPERATORS[block.getFieldValue('OP')];\n const argument0 = Lua.valueToCode(block, 'A', Lua.ORDER_RELATIONAL) || '0';\n const argument1 = Lua.valueToCode(block, 'B', Lua.ORDER_RELATIONAL) || '0';\n const code = argument0 + ' ' + operator + ' ' + argument1;\n return [code, Lua.ORDER_RELATIONAL];\n};\n\nLua['logic_operation'] = function(block) {\n // Operations 'and', 'or'.\n const operator = (block.getFieldValue('OP') === 'AND') ? 'and' : 'or';\n const order = (operator === 'and') ? Lua.ORDER_AND : Lua.ORDER_OR;\n let argument0 = Lua.valueToCode(block, 'A', order);\n let argument1 = Lua.valueToCode(block, 'B', order);\n if (!argument0 && !argument1) {\n // If there are no arguments, then the return value is false.\n argument0 = 'false';\n argument1 = 'false';\n } else {\n // Single missing arguments have no effect on the return value.\n const defaultArgument = (operator === 'and') ? 'true' : 'false';\n if (!argument0) {\n argument0 = defaultArgument;\n }\n if (!argument1) {\n argument1 = defaultArgument;\n }\n }\n const code = argument0 + ' ' + operator + ' ' + argument1;\n return [code, order];\n};\n\nLua['logic_negate'] = function(block) {\n // Negation.\n const argument0 = Lua.valueToCode(block, 'BOOL', Lua.ORDER_UNARY) || 'true';\n const code = 'not ' + argument0;\n return [code, Lua.ORDER_UNARY];\n};\n\nLua['logic_boolean'] = function(block) {\n // Boolean values true and false.\n const code = (block.getFieldValue('BOOL') === 'TRUE') ? 'true' : 'false';\n return [code, Lua.ORDER_ATOMIC];\n};\n\nLua['logic_null'] = function(block) {\n // Null data type.\n return ['nil', Lua.ORDER_ATOMIC];\n};\n\nLua['logic_ternary'] = function(block) {\n // Ternary operator.\n const value_if = Lua.valueToCode(block, 'IF', Lua.ORDER_AND) || 'false';\n const value_then = Lua.valueToCode(block, 'THEN', Lua.ORDER_AND) || 'nil';\n const value_else = Lua.valueToCode(block, 'ELSE', Lua.ORDER_OR) || 'nil';\n const code = value_if + ' and ' + value_then + ' or ' + value_else;\n return [code, Lua.ORDER_OR];\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for list blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.lists');\n\nconst {NameType} = goog.require('Blockly.Names');\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['lists_create_empty'] = function(block) {\n // Create an empty list.\n return ['{}', Lua.ORDER_HIGH];\n};\n\nLua['lists_create_with'] = function(block) {\n // Create a list with any number of elements of any type.\n const elements = new Array(block.itemCount_);\n for (let i = 0; i < block.itemCount_; i++) {\n elements[i] = Lua.valueToCode(block, 'ADD' + i, Lua.ORDER_NONE) || 'None';\n }\n const code = '{' + elements.join(', ') + '}';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['lists_repeat'] = function(block) {\n // Create a list with one element repeated.\n const functionName = Lua.provideFunction_('create_list_repeated', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(item, count)\n local t = {}\n for i = 1, count do\n table.insert(t, item)\n end\n return t\nend\n `);\n const element = Lua.valueToCode(block, 'ITEM', Lua.ORDER_NONE) || 'None';\n const repeatCount = Lua.valueToCode(block, 'NUM', Lua.ORDER_NONE) || '0';\n const code = functionName + '(' + element + ', ' + repeatCount + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['lists_length'] = function(block) {\n // String or array length.\n const list = Lua.valueToCode(block, 'VALUE', Lua.ORDER_UNARY) || '{}';\n return ['#' + list, Lua.ORDER_UNARY];\n};\n\nLua['lists_isEmpty'] = function(block) {\n // Is the string null or array empty?\n const list = Lua.valueToCode(block, 'VALUE', Lua.ORDER_UNARY) || '{}';\n const code = '#' + list + ' == 0';\n return [code, Lua.ORDER_RELATIONAL];\n};\n\nLua['lists_indexOf'] = function(block) {\n // Find an item in the list.\n const item = Lua.valueToCode(block, 'FIND', Lua.ORDER_NONE) || \"''\";\n const list = Lua.valueToCode(block, 'VALUE', Lua.ORDER_NONE) || '{}';\n let functionName;\n if (block.getFieldValue('END') === 'FIRST') {\n functionName = Lua.provideFunction_('first_index', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t, elem)\n for k, v in ipairs(t) do\n if v == elem then\n return k\n end\n end\n return 0\nend\n`);\n } else {\n functionName = Lua.provideFunction_('last_index', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(t, elem)\n for i = #t, 1, -1 do\n if t[i] == elem then\n return i\n end\n end\n return 0\nend\n`);\n }\n const code = functionName + '(' + list + ', ' + item + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\n/**\n * Returns an expression calculating the index into a list.\n * @param {string} listName Name of the list, used to calculate length.\n * @param {string} where The method of indexing, selected by dropdown in Blockly\n * @param {string=} opt_at The optional offset when indexing from start/end.\n * @return {string|undefined} Index expression.\n */\nconst getListIndex = function(listName, where, opt_at) {\n if (where === 'FIRST') {\n return '1';\n } else if (where === 'FROM_END') {\n return '#' + listName + ' + 1 - ' + opt_at;\n } else if (where === 'LAST') {\n return '#' + listName;\n } else if (where === 'RANDOM') {\n return 'math.random(#' + listName + ')';\n } else {\n return opt_at;\n }\n};\n\nLua['lists_getIndex'] = function(block) {\n // Get element at index.\n // Note: Until January 2013 this block did not have MODE or WHERE inputs.\n const mode = block.getFieldValue('MODE') || 'GET';\n const where = block.getFieldValue('WHERE') || 'FROM_START';\n const list = Lua.valueToCode(block, 'VALUE', Lua.ORDER_HIGH) || '({})';\n\n // If `list` would be evaluated more than once (which is the case for LAST,\n // FROM_END, and RANDOM) and is non-trivial, make sure to access it only once.\n if ((where === 'LAST' || where === 'FROM_END' || where === 'RANDOM') &&\n !list.match(/^\\w+$/)) {\n // `list` is an expression, so we may not evaluate it more than once.\n if (mode === 'REMOVE') {\n // We can use multiple statements.\n const atOrder =\n (where === 'FROM_END') ? Lua.ORDER_ADDITIVE : Lua.ORDER_NONE;\n let at = Lua.valueToCode(block, 'AT', atOrder) || '1';\n const listVar =\n Lua.nameDB_.getDistinctName('tmp_list', NameType.VARIABLE);\n at = getListIndex(listVar, where, at);\n const code = listVar + ' = ' + list + '\\n' +\n 'table.remove(' + listVar + ', ' + at + ')\\n';\n return code;\n } else {\n // We need to create a procedure to avoid reevaluating values.\n const at = Lua.valueToCode(block, 'AT', Lua.ORDER_NONE) || '1';\n let functionName;\n if (mode === 'GET') {\n functionName = Lua.provideFunction_('list_get_' + where.toLowerCase(), [\n 'function ' + Lua.FUNCTION_NAME_PLACEHOLDER_ + '(t' +\n // The value for 'FROM_END' and'FROM_START' depends on `at` so\n // we add it as a parameter.\n ((where === 'FROM_END' || where === 'FROM_START') ? ', at)' :\n ')'),\n ' return t[' + getListIndex('t', where, 'at') + ']', 'end'\n ]);\n } else { // `mode` === 'GET_REMOVE'\n functionName =\n Lua.provideFunction_('list_remove_' + where.toLowerCase(), [\n 'function ' + Lua.FUNCTION_NAME_PLACEHOLDER_ + '(t' +\n // The value for 'FROM_END' and'FROM_START' depends on `at` so\n // we add it as a parameter.\n ((where === 'FROM_END' || where === 'FROM_START') ? ', at)' :\n ')'),\n ' return table.remove(t, ' + getListIndex('t', where, 'at') +\n ')',\n 'end'\n ]);\n }\n const code = functionName + '(' + list +\n // The value for 'FROM_END' and 'FROM_START' depends on `at` so we\n // pass it.\n ((where === 'FROM_END' || where === 'FROM_START') ? ', ' + at : '') +\n ')';\n return [code, Lua.ORDER_HIGH];\n }\n } else {\n // Either `list` is a simple variable, or we only need to refer to `list`\n // once.\n const atOrder = (mode === 'GET' && where === 'FROM_END') ?\n Lua.ORDER_ADDITIVE :\n Lua.ORDER_NONE;\n let at = Lua.valueToCode(block, 'AT', atOrder) || '1';\n at = getListIndex(list, where, at);\n if (mode === 'GET') {\n const code = list + '[' + at + ']';\n return [code, Lua.ORDER_HIGH];\n } else {\n const code = 'table.remove(' + list + ', ' + at + ')';\n if (mode === 'GET_REMOVE') {\n return [code, Lua.ORDER_HIGH];\n } else { // `mode` === 'REMOVE'\n return code + '\\n';\n }\n }\n }\n};\n\nLua['lists_setIndex'] = function(block) {\n // Set element at index.\n // Note: Until February 2013 this block did not have MODE or WHERE inputs.\n let list = Lua.valueToCode(block, 'LIST', Lua.ORDER_HIGH) || '{}';\n const mode = block.getFieldValue('MODE') || 'SET';\n const where = block.getFieldValue('WHERE') || 'FROM_START';\n const at = Lua.valueToCode(block, 'AT', Lua.ORDER_ADDITIVE) || '1';\n const value = Lua.valueToCode(block, 'TO', Lua.ORDER_NONE) || 'None';\n\n let code = '';\n // If `list` would be evaluated more than once (which is the case for LAST,\n // FROM_END, and RANDOM) and is non-trivial, make sure to access it only once.\n if ((where === 'LAST' || where === 'FROM_END' || where === 'RANDOM') &&\n !list.match(/^\\w+$/)) {\n // `list` is an expression, so we may not evaluate it more than once.\n // We can use multiple statements.\n const listVar = Lua.nameDB_.getDistinctName('tmp_list', NameType.VARIABLE);\n code = listVar + ' = ' + list + '\\n';\n list = listVar;\n }\n if (mode === 'SET') {\n code += list + '[' + getListIndex(list, where, at) + '] = ' + value;\n } else { // `mode` === 'INSERT'\n // LAST is a special case, because we want to insert\n // *after* not *before*, the existing last element.\n code += 'table.insert(' + list + ', ' +\n (getListIndex(list, where, at) + (where === 'LAST' ? ' + 1' : '')) +\n ', ' + value + ')';\n }\n return code + '\\n';\n};\n\nLua['lists_getSublist'] = function(block) {\n // Get sublist.\n const list = Lua.valueToCode(block, 'LIST', Lua.ORDER_NONE) || '{}';\n const where1 = block.getFieldValue('WHERE1');\n const where2 = block.getFieldValue('WHERE2');\n const at1 = Lua.valueToCode(block, 'AT1', Lua.ORDER_NONE) || '1';\n const at2 = Lua.valueToCode(block, 'AT2', Lua.ORDER_NONE) || '1';\n\n // The value for 'FROM_END' and'FROM_START' depends on `at` so\n // we add it as a parameter.\n const at1Param =\n (where1 === 'FROM_END' || where1 === 'FROM_START') ? ', at1' : '';\n const at2Param =\n (where2 === 'FROM_END' || where2 === 'FROM_START') ? ', at2' : '';\n const functionName = Lua.provideFunction_(\n 'list_sublist_' + where1.toLowerCase() + '_' + where2.toLowerCase(), `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(source${at1Param}${at2Param})\n local t = {}\n local start = ${getListIndex('source', where1, 'at1')}\n local finish = ${getListIndex('source', where2, 'at2')}\n for i = start, finish do\n table.insert(t, source[i])\n end\n return t\nend\n`);\n const code = functionName + '(' + list +\n // The value for 'FROM_END' and 'FROM_START' depends on `at` so we\n // pass it.\n ((where1 === 'FROM_END' || where1 === 'FROM_START') ? ', ' + at1 : '') +\n ((where2 === 'FROM_END' || where2 === 'FROM_START') ? ', ' + at2 : '') +\n ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['lists_sort'] = function(block) {\n // Block for sorting a list.\n const list = Lua.valueToCode(block, 'LIST', Lua.ORDER_NONE) || '{}';\n const direction = block.getFieldValue('DIRECTION') === '1' ? 1 : -1;\n const type = block.getFieldValue('TYPE');\n\n const functionName = Lua.provideFunction_('list_sort', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(list, typev, direction)\n local t = {}\n for n,v in pairs(list) do table.insert(t, v) end\n local compareFuncs = {\n NUMERIC = function(a, b)\n return (tonumber(tostring(a)) or 0)\n < (tonumber(tostring(b)) or 0) end,\n TEXT = function(a, b)\n return tostring(a) < tostring(b) end,\n IGNORE_CASE = function(a, b)\n return string.lower(tostring(a)) < string.lower(tostring(b)) end\n }\n local compareTemp = compareFuncs[typev]\n local compare = compareTemp\n if direction == -1\n then compare = function(a, b) return compareTemp(b, a) end\n end\n table.sort(t, compare)\n return t\nend\n`);\n\n const code =\n functionName + '(' + list + ',\"' + type + '\", ' + direction + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['lists_split'] = function(block) {\n // Block for splitting text into a list, or joining a list into text.\n let input = Lua.valueToCode(block, 'INPUT', Lua.ORDER_NONE);\n const delimiter = Lua.valueToCode(block, 'DELIM', Lua.ORDER_NONE) || \"''\";\n const mode = block.getFieldValue('MODE');\n let functionName;\n if (mode === 'SPLIT') {\n if (!input) {\n input = \"''\";\n }\n functionName = Lua.provideFunction_('list_string_split', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(input, delim)\n local t = {}\n local pos = 1\n while true do\n next_delim = string.find(input, delim, pos)\n if next_delim == nil then\n table.insert(t, string.sub(input, pos))\n break\n else\n table.insert(t, string.sub(input, pos, next_delim-1))\n pos = next_delim + #delim\n end\n end\n return t\nend\n`);\n } else if (mode === 'JOIN') {\n if (!input) {\n input = '{}';\n }\n functionName = 'table.concat';\n } else {\n throw Error('Unknown mode: ' + mode);\n }\n const code = functionName + '(' + input + ', ' + delimiter + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['lists_reverse'] = function(block) {\n // Block for reversing a list.\n const list = Lua.valueToCode(block, 'LIST', Lua.ORDER_NONE) || '{}';\n const functionName = Lua.provideFunction_('list_reverse', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(input)\n local reversed = {}\n for i = #input, 1, -1 do\n table.insert(reversed, input[i])\n end\n return reversed\nend\n`);\n const code = functionName + '(' + list + ')';\n return [code, Lua.ORDER_HIGH];\n};\n","/**\n * @license\n * Copyright 2016 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Generating Lua for colour blocks.\n */\n'use strict';\n\ngoog.module('Blockly.Lua.colour');\n\nconst {luaGenerator: Lua} = goog.require('Blockly.Lua');\n\n\nLua['colour_picker'] = function(block) {\n // Colour picker.\n const code = Lua.quote_(block.getFieldValue('COLOUR'));\n return [code, Lua.ORDER_ATOMIC];\n};\n\nLua['colour_random'] = function(block) {\n // Generate a random colour.\n const code = 'string.format(\"#%06x\", math.random(0, 2^24 - 1))';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['colour_rgb'] = function(block) {\n // Compose a colour from RGB components expressed as percentages.\n const functionName = Lua.provideFunction_('colour_rgb', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(r, g, b)\n r = math.floor(math.min(100, math.max(0, r)) * 2.55 + .5)\n g = math.floor(math.min(100, math.max(0, g)) * 2.55 + .5)\n b = math.floor(math.min(100, math.max(0, b)) * 2.55 + .5)\n return string.format(\"#%02x%02x%02x\", r, g, b)\nend\n`);\n const r = Lua.valueToCode(block, 'RED', Lua.ORDER_NONE) || 0;\n const g = Lua.valueToCode(block, 'GREEN', Lua.ORDER_NONE) || 0;\n const b = Lua.valueToCode(block, 'BLUE', Lua.ORDER_NONE) || 0;\n const code = functionName + '(' + r + ', ' + g + ', ' + b + ')';\n return [code, Lua.ORDER_HIGH];\n};\n\nLua['colour_blend'] = function(block) {\n // Blend two colours together.\n const functionName = Lua.provideFunction_('colour_blend', `\nfunction ${Lua.FUNCTION_NAME_PLACEHOLDER_}(colour1, colour2, ratio)\n local r1 = tonumber(string.sub(colour1, 2, 3), 16)\n local r2 = tonumber(string.sub(colour2, 2, 3), 16)\n local g1 = tonumber(string.sub(colour1, 4, 5), 16)\n local g2 = tonumber(string.sub(colour2, 4, 5), 16)\n local b1 = tonumber(string.sub(colour1, 6, 7), 16)\n local b2 = tonumber(string.sub(colour2, 6, 7), 16)\n local ratio = math.min(1, math.max(0, ratio))\n local r = math.floor(r1 * (1 - ratio) + r2 * ratio + .5)\n local g = math.floor(g1 * (1 - ratio) + g2 * ratio + .5)\n local b = math.floor(b1 * (1 - ratio) + b2 * ratio + .5)\n return string.format(\"#%02x%02x%02x\", r, g, b)\nend\n`);\n const colour1 =\n Lua.valueToCode(block, 'COLOUR1', Lua.ORDER_NONE) || \"'#000000'\";\n const colour2 =\n Lua.valueToCode(block, 'COLOUR2', Lua.ORDER_NONE) || \"'#000000'\";\n const ratio = Lua.valueToCode(block, 'RATIO', Lua.ORDER_NONE) || 0;\n const code =\n functionName + '(' + colour1 + ', ' + colour2 + ', ' + ratio + ')';\n return [code, Lua.ORDER_HIGH];\n};\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Complete helper functions for generating Lua for\n * blocks. This is the entrypoint for lua_compressed.js.\n * @suppress {extraRequire}\n */\n'use strict';\n\ngoog.module('Blockly.Lua.all');\n\nconst moduleExports = goog.require('Blockly.Lua');\ngoog.require('Blockly.Lua.colour');\ngoog.require('Blockly.Lua.lists');\ngoog.require('Blockly.Lua.logic');\ngoog.require('Blockly.Lua.loops');\ngoog.require('Blockly.Lua.math');\ngoog.require('Blockly.Lua.procedures');\ngoog.require('Blockly.Lua.texts');\ngoog.require('Blockly.Lua.variables');\ngoog.require('Blockly.Lua.variablesDynamic');\n\nexports = moduleExports;\n"]}