blockly 10.2.2 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -34
- package/blockly.min.js +295 -282
- package/blockly_compressed.js +257 -247
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +1 -1
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +2 -0
- package/core/block_dragger.d.ts +7 -3
- package/core/block_svg.d.ts +11 -13
- package/core/events/events_block_field_intermediate_change.d.ts +6 -0
- package/core/field.d.ts +18 -0
- package/core/field_input.d.ts +6 -1
- package/core/flyout_base.d.ts +9 -1
- package/core/generator.d.ts +19 -5
- package/core/gesture.d.ts +2 -2
- package/core/icons/comment_icon.d.ts +1 -0
- package/core/icons/icon.d.ts +19 -0
- package/core/icons/mutator_icon.d.ts +1 -0
- package/core/icons/warning_icon.d.ts +1 -0
- package/core/interfaces/i_icon.d.ts +8 -0
- package/core/interfaces/i_rendered_element.d.ts +19 -0
- package/core/layer_manager.d.ts +74 -0
- package/core/layers.d.ts +18 -0
- package/core/rendered_connection.d.ts +0 -6
- package/core/renderers/common/info.d.ts +4 -4
- package/core/renderers/zelos/info.d.ts +1 -1
- package/core/serialization/blocks.d.ts +2 -1
- package/core/workspace_svg.d.ts +14 -1
- package/dart_compressed.js +14 -11
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +37 -34
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +14 -13
- package/lua_compressed.js.map +1 -1
- package/package.json +2 -2
- package/php_compressed.js +26 -22
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +14 -12
- package/python_compressed.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blockly",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "Blockly is a library for building visual programming editors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blockly"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"markdown-tables-to-json": "^0.1.7",
|
|
60
60
|
"mocha": "^10.0.0",
|
|
61
61
|
"patch-package": "^8.0.0",
|
|
62
|
-
"prettier": "3.0
|
|
62
|
+
"prettier": "3.1.0",
|
|
63
63
|
"readline-sync": "^1.4.10",
|
|
64
64
|
"rimraf": "^5.0.0",
|
|
65
65
|
"typescript": "^5.0.2",
|
package/php_compressed.js
CHANGED
|
@@ -45,8 +45,8 @@ function ${b.FUNCTION_NAME_PLACEHOLDER_}($c1, $c2, $ratio) {
|
|
|
45
45
|
$hex .= str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
|
|
46
46
|
return $hex;
|
|
47
47
|
}
|
|
48
|
-
`)+"("+c+", "+d+", "+a+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_empty$$module$build$src$generators$php$lists=function(a,b){return["array()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_with$$module$build$src$generators$php$lists=function(a,b){
|
|
49
|
-
")"
|
|
48
|
+
`)+"("+c+", "+d+", "+a+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_empty$$module$build$src$generators$php$lists=function(a,b){return["array()",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_create_with$$module$build$src$generators$php$lists=function(a,b){const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$php$php_generator.NONE)||"null";return["array("+c.join(", ")+
|
|
49
|
+
")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},lists_repeat$$module$build$src$generators$php$lists=function(a,b){const c=b.provideFunction_("lists_repeat",`
|
|
50
50
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}($value, $count) {
|
|
51
51
|
$array = array();
|
|
52
52
|
for ($index = 0; $index < $count; $index++) {
|
|
@@ -160,17 +160,18 @@ Order$$module$build$src$generators$php$php_generator.LOGICAL_OR;let e=b.valueToC
|
|
|
160
160
|
$.NameType$$module$build$src$core$names.VARIABLE);let f=c;c.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(c)||(f=b.nameDB_.getDistinctName("repeat_end",$.NameType$$module$build$src$core$names.VARIABLE),a+=f+" = "+c+";\n");return a+("for ("+e+" = 0; "+e+" < "+f+"; "+e+"++) {\n"+d+"}\n")},controls_whileUntil$$module$build$src$generators$php$loops=function(a,b){const c="UNTIL"===a.getFieldValue("MODE");let d=b.valueToCode(a,"BOOL",c?Order$$module$build$src$generators$php$php_generator.LOGICAL_NOT:
|
|
161
161
|
Order$$module$build$src$generators$php$php_generator.NONE)||"false",e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);c&&(d="!"+d);return"while ("+d+") {\n"+e+"}\n"},controls_for$$module$build$src$generators$php$loops=function(a,b){var c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"0",e=b.valueToCode(a,"TO",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"0";const f=b.valueToCode(a,"BY",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||
|
|
162
162
|
"1";let g=b.statementToCode(a,"DO");g=b.addLoopTrap(g,a);if($.isNumber$$module$build$src$core$utils$string(d)&&$.isNumber$$module$build$src$core$utils$string(e)&&$.isNumber$$module$build$src$core$utils$string(f))b=Number(d)<=Number(e),a="for ("+c+" = "+d+"; "+c+(b?" <= ":" >= ")+e+"; "+c,c=Math.abs(Number(f)),a=1===c?a+(b?"++":"--"):a+((b?" += ":" -= ")+c),a+=") {\n"+g+"}\n";else{a="";let h=d;d.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(d)||(h=b.nameDB_.getDistinctName(c+"_start",
|
|
163
|
-
$.NameType$$module$build$src$core$names.VARIABLE),a+=h+" = "+d+";\n");d=e;e.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(e)||(d=b.nameDB_.getDistinctName(c+"_end",$.NameType$$module$build$src$core$names.VARIABLE),a+=d+" = "+e+";\n");e=b.nameDB_.getDistinctName(c+"_inc",$.NameType$$module$build$src$core$names.VARIABLE);a+=e+" = ";a=$.isNumber$$module$build$src$core$utils$string(f)?a+(Math.abs(f)+";\n"):a+("abs("+f+");\n");a+="if ("+h+" > "+d+") {\n";a+=b.INDENT+e+" = -"+e+
|
|
164
|
-
a+"}\nfor ("+(c+" = "+h+"; "+e+" >= 0 ? "+c+" <= "+d+" : "+c+" >= "+d+"; "+c+" += "+e+") {\n"+g+"}\n")}return a},controls_forEach$$module$build$src$generators$php$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"LIST",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"[]";let e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);return"foreach ("+d+" as "+c+") {\n"+e+"}\n"},controls_flow_statements$$module$build$src$generators$php$loops=function(a,
|
|
165
|
-
b){let c="";b.STATEMENT_PREFIX&&(c+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(c+=b.injectId(b.STATEMENT_SUFFIX,a));if(b.STATEMENT_PREFIX){const d=a.getSurroundLoop();d&&!d.suppressPrefixSuffix&&(c+=b.injectId(b.STATEMENT_PREFIX,d))}switch(a.getFieldValue("FLOW")){case "BREAK":return c+"break;\n";case "CONTINUE":return c+"continue;\n"}throw Error("Unknown flow statement.");},math_number$$module$build$src$generators$php$math=function(a,b){a=Number(a.getFieldValue("NUM"));
|
|
166
|
-
Order$$module$build$src$generators$php$php_generator.
|
|
167
|
-
POWER:[" ** ",Order$$module$build$src$generators$php$php_generator.POWER]}[a.getFieldValue("OP")];const d=c[0];c=c[1];const e=b.valueToCode(a,"A",c)||"0";a=b.valueToCode(a,"B",c)||"0";return[e+d+a,c]},math_single$$module$build$src$generators$php$math=function(a,b){const c=a.getFieldValue("OP");let d;if("NEG"===c)return a=b.valueToCode(a,
|
|
168
|
-
a="SIN"===c||"COS"===c||"TAN"===c?b.valueToCode(a,"NUM",Order$$module$build$src$generators$php$php_generator.DIVISION)||"0":b.valueToCode(a,"NUM",Order$$module$build$src$generators$php$php_generator.NONE)||"0";switch(c){case "ABS":d="abs("+a+")";break;case "ROOT":d="sqrt("+a+")";break;case "LN":d="log("+a+")";break;case "EXP":d=
|
|
169
|
-
"sin("+a+" / 180 * pi())";break;case "COS":d="cos("+a+" / 180 * pi())";break;case "TAN":d="tan("+a+" / 180 * pi())"}if(d)return[d,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL];switch(c){case "LOG10":d="log("+a+") / log(10)";break;case "ASIN":d="asin("+a+") / pi() * 180";break;case "ACOS":d="acos("+
|
|
170
|
-
math_constant$$module$build$src$generators$php$math=function(a,b){return{PI:["M_PI",Order$$module$build$src$generators$php$php_generator.ATOMIC],E:["M_E",Order$$module$build$src$generators$php$php_generator.ATOMIC],GOLDEN_RATIO:["(1 + sqrt(5)) / 2",Order$$module$build$src$generators$php$php_generator.DIVISION],
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]};const d=a.getFieldValue("PROPERTY"),[e,f,g,h]=c[d];c=b.valueToCode(a,"NUMBER_TO_CHECK",g)||"0";if("PRIME"===d)a=b.provideFunction_("math_isPrime"
|
|
163
|
+
$.NameType$$module$build$src$core$names.VARIABLE),a+=h+" = "+d+";\n");d=e;e.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(e)||(d=b.nameDB_.getDistinctName(c+"_end",$.NameType$$module$build$src$core$names.VARIABLE),a+=d+" = "+e+";\n");e=b.nameDB_.getDistinctName(c+"_inc",$.NameType$$module$build$src$core$names.VARIABLE);a+=e+" = ";a=$.isNumber$$module$build$src$core$utils$string(f)?a+(Math.abs(Number(f))+";\n"):a+("abs("+f+");\n");a+="if ("+h+" > "+d+") {\n";a+=b.INDENT+e+" = -"+e+
|
|
164
|
+
";\n";a=a+"}\nfor ("+(c+" = "+h+"; "+e+" >= 0 ? "+c+" <= "+d+" : "+c+" >= "+d+"; "+c+" += "+e+") {\n"+g+"}\n")}return a},controls_forEach$$module$build$src$generators$php$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"LIST",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"[]";let e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);return"foreach ("+d+" as "+c+") {\n"+e+"}\n"},controls_flow_statements$$module$build$src$generators$php$loops=function(a,
|
|
165
|
+
b){let c="";b.STATEMENT_PREFIX&&(c+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(c+=b.injectId(b.STATEMENT_SUFFIX,a));if(b.STATEMENT_PREFIX){const d=a.getSurroundLoop();d&&!d.suppressPrefixSuffix&&(c+=b.injectId(b.STATEMENT_PREFIX,d))}switch(a.getFieldValue("FLOW")){case "BREAK":return c+"break;\n";case "CONTINUE":return c+"continue;\n"}throw Error("Unknown flow statement.");},math_number$$module$build$src$generators$php$math=function(a,b){a=Number(a.getFieldValue("NUM"));return Infinity===
|
|
166
|
+
a?["INF",Order$$module$build$src$generators$php$php_generator.ATOMIC]:-Infinity===a?["-INF",Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION]:[String(a),0<=a?Order$$module$build$src$generators$php$php_generator.ATOMIC:Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION]},math_arithmetic$$module$build$src$generators$php$math=function(a,b){var c={ADD:[" + ",Order$$module$build$src$generators$php$php_generator.ADDITION],MINUS:[" - ",Order$$module$build$src$generators$php$php_generator.SUBTRACTION],
|
|
167
|
+
MULTIPLY:[" * ",Order$$module$build$src$generators$php$php_generator.MULTIPLICATION],DIVIDE:[" / ",Order$$module$build$src$generators$php$php_generator.DIVISION],POWER:[" ** ",Order$$module$build$src$generators$php$php_generator.POWER]}[a.getFieldValue("OP")];const d=c[0];c=c[1];const e=b.valueToCode(a,"A",c)||"0";a=b.valueToCode(a,"B",c)||"0";return[e+d+a,c]},math_single$$module$build$src$generators$php$math=function(a,b){const c=a.getFieldValue("OP");let d;if("NEG"===c)return a=b.valueToCode(a,
|
|
168
|
+
"NUM",Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION)||"0","-"===a[0]&&(a=" "+a),["-"+a,Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION];a="SIN"===c||"COS"===c||"TAN"===c?b.valueToCode(a,"NUM",Order$$module$build$src$generators$php$php_generator.DIVISION)||"0":b.valueToCode(a,"NUM",Order$$module$build$src$generators$php$php_generator.NONE)||"0";switch(c){case "ABS":d="abs("+a+")";break;case "ROOT":d="sqrt("+a+")";break;case "LN":d="log("+a+")";break;case "EXP":d=
|
|
169
|
+
"exp("+a+")";break;case "POW10":d="pow(10,"+a+")";break;case "ROUND":d="round("+a+")";break;case "ROUNDUP":d="ceil("+a+")";break;case "ROUNDDOWN":d="floor("+a+")";break;case "SIN":d="sin("+a+" / 180 * pi())";break;case "COS":d="cos("+a+" / 180 * pi())";break;case "TAN":d="tan("+a+" / 180 * pi())"}if(d)return[d,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL];switch(c){case "LOG10":d="log("+a+") / log(10)";break;case "ASIN":d="asin("+a+") / pi() * 180";break;case "ACOS":d="acos("+
|
|
170
|
+
a+") / pi() * 180";break;case "ATAN":d="atan("+a+") / pi() * 180";break;default:throw Error("Unknown math operator: "+c);}return[d,Order$$module$build$src$generators$php$php_generator.DIVISION]},math_constant$$module$build$src$generators$php$math=function(a,b){return{PI:["M_PI",Order$$module$build$src$generators$php$php_generator.ATOMIC],E:["M_E",Order$$module$build$src$generators$php$php_generator.ATOMIC],GOLDEN_RATIO:["(1 + sqrt(5)) / 2",Order$$module$build$src$generators$php$php_generator.DIVISION],
|
|
171
|
+
SQRT2:["M_SQRT2",Order$$module$build$src$generators$php$php_generator.ATOMIC],SQRT1_2:["M_SQRT1_2",Order$$module$build$src$generators$php$php_generator.ATOMIC],INFINITY:["INF",Order$$module$build$src$generators$php$php_generator.ATOMIC]}[a.getFieldValue("CONSTANT")]},math_number_property$$module$build$src$generators$php$math=function(a,b){var c={EVEN:[""," % 2 == 0",Order$$module$build$src$generators$php$php_generator.MODULUS,Order$$module$build$src$generators$php$php_generator.EQUALITY],ODD:["",
|
|
172
|
+
" % 2 == 1",Order$$module$build$src$generators$php$php_generator.MODULUS,Order$$module$build$src$generators$php$php_generator.EQUALITY],WHOLE:["is_int(",")",Order$$module$build$src$generators$php$php_generator.NONE,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL],POSITIVE:[""," > 0",Order$$module$build$src$generators$php$php_generator.RELATIONAL,Order$$module$build$src$generators$php$php_generator.RELATIONAL],NEGATIVE:[""," < 0",Order$$module$build$src$generators$php$php_generator.RELATIONAL,
|
|
173
|
+
Order$$module$build$src$generators$php$php_generator.RELATIONAL],DIVISIBLE_BY:[null,null,Order$$module$build$src$generators$php$php_generator.MODULUS,Order$$module$build$src$generators$php$php_generator.EQUALITY],PRIME:[null,null,Order$$module$build$src$generators$php$php_generator.NONE,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]};const d=a.getFieldValue("PROPERTY"),[e,f,g,h]=c[d];c=b.valueToCode(a,"NUMBER_TO_CHECK",g)||"0";if("PRIME"===d)a=b.provideFunction_("math_isPrime",
|
|
174
|
+
`
|
|
174
175
|
function ${b.FUNCTION_NAME_PLACEHOLDER_}($n) {
|
|
175
176
|
// https://en.wikipedia.org/wiki/Primality_test#Naive_methods
|
|
176
177
|
if ($n == 2 || $n == 3) {
|
|
@@ -284,14 +285,17 @@ text_trim$$module$build$src$generators$php$text=function(a,b){const c={LEFT:"ltr
|
|
|
284
285
|
function(a,b){b="readline("+(a.getField("TEXT")?b.quote_(a.getFieldValue("TEXT")):b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.NONE)||"''")+")";"NUMBER"===a.getFieldValue("TYPE")&&(b="floatval("+b+")");return[b,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},text_count$$module$build$src$generators$php$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.NONE)||"''";a=b.valueToCode(a,"SUB",Order$$module$build$src$generators$php$php_generator.NONE)||
|
|
285
286
|
"''";return["strlen("+a+") === 0 ? strlen("+c+") + 1 : substr_count("+c+", "+a+")",Order$$module$build$src$generators$php$php_generator.CONDITIONAL]},text_replace$$module$build$src$generators$php$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.NONE)||"''",d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$php$php_generator.NONE)||"''";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$php$php_generator.NONE)||"''";return["str_replace("+
|
|
286
287
|
d+", "+a+", "+c+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},text_reverse$$module$build$src$generators$php$text=function(a,b){return["strrev("+(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$php$php_generator.NONE)||"''")+")",Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL]},variables_get$$module$build$src$generators$php$variables=function(a,b){return[b.getVariableName(a.getFieldValue("VAR")),Order$$module$build$src$generators$php$php_generator.ATOMIC]},
|
|
287
|
-
variables_set$$module$build$src$generators$php$variables=function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"0";return b.getVariableName(a.getFieldValue("VAR"))+" = "+c+";\n"},Order$$module$build$src$generators$php$php_generator
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
variables_set$$module$build$src$generators$php$variables=function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$php$php_generator.ASSIGNMENT)||"0";return b.getVariableName(a.getFieldValue("VAR"))+" = "+c+";\n"},Order$$module$build$src$generators$php$php_generator;
|
|
289
|
+
(function(a){a[a.ATOMIC=0]="ATOMIC";a[a.CLONE=1]="CLONE";a[a.NEW=1]="NEW";a[a.MEMBER=2.1]="MEMBER";a[a.FUNCTION_CALL=2.2]="FUNCTION_CALL";a[a.POWER=3]="POWER";a[a.INCREMENT=4]="INCREMENT";a[a.DECREMENT=4]="DECREMENT";a[a.BITWISE_NOT=4]="BITWISE_NOT";a[a.CAST=4]="CAST";a[a.SUPPRESS_ERROR=4]="SUPPRESS_ERROR";a[a.INSTANCEOF=5]="INSTANCEOF";a[a.LOGICAL_NOT=6]="LOGICAL_NOT";a[a.UNARY_PLUS=7.1]="UNARY_PLUS";a[a.UNARY_NEGATION=7.2]="UNARY_NEGATION";a[a.MULTIPLICATION=8.1]="MULTIPLICATION";a[a.DIVISION=8.2]=
|
|
290
|
+
"DIVISION";a[a.MODULUS=8.3]="MODULUS";a[a.ADDITION=9.1]="ADDITION";a[a.SUBTRACTION=9.2]="SUBTRACTION";a[a.STRING_CONCAT=9.3]="STRING_CONCAT";a[a.BITWISE_SHIFT=10]="BITWISE_SHIFT";a[a.RELATIONAL=11]="RELATIONAL";a[a.EQUALITY=12]="EQUALITY";a[a.REFERENCE=13]="REFERENCE";a[a.BITWISE_AND=13]="BITWISE_AND";a[a.BITWISE_XOR=14]="BITWISE_XOR";a[a.BITWISE_OR=15]="BITWISE_OR";a[a.LOGICAL_AND=16]="LOGICAL_AND";a[a.LOGICAL_OR=17]="LOGICAL_OR";a[a.IF_NULL=18]="IF_NULL";a[a.CONDITIONAL=19]="CONDITIONAL";a[a.ASSIGNMENT=
|
|
291
|
+
20]="ASSIGNMENT";a[a.LOGICAL_AND_WEAK=21]="LOGICAL_AND_WEAK";a[a.LOGICAL_XOR=22]="LOGICAL_XOR";a[a.LOGICAL_OR_WEAK=23]="LOGICAL_OR_WEAK";a[a.NONE=99]="NONE"})(Order$$module$build$src$generators$php$php_generator||(Order$$module$build$src$generators$php$php_generator={}));
|
|
292
|
+
var PhpGenerator$$module$build$src$generators$php$php_generator=class extends $.CodeGenerator$$module$build$src$core$generator{constructor(a="PHP"){super(a);this.ORDER_OVERRIDES=[[Order$$module$build$src$generators$php$php_generator.MEMBER,Order$$module$build$src$generators$php$php_generator.FUNCTION_CALL],[Order$$module$build$src$generators$php$php_generator.MEMBER,Order$$module$build$src$generators$php$php_generator.MEMBER],[Order$$module$build$src$generators$php$php_generator.LOGICAL_NOT,Order$$module$build$src$generators$php$php_generator.LOGICAL_NOT],
|
|
293
|
+
[Order$$module$build$src$generators$php$php_generator.MULTIPLICATION,Order$$module$build$src$generators$php$php_generator.MULTIPLICATION],[Order$$module$build$src$generators$php$php_generator.ADDITION,Order$$module$build$src$generators$php$php_generator.ADDITION],[Order$$module$build$src$generators$php$php_generator.LOGICAL_AND,Order$$module$build$src$generators$php$php_generator.LOGICAL_AND],[Order$$module$build$src$generators$php$php_generator.LOGICAL_OR,Order$$module$build$src$generators$php$php_generator.LOGICAL_OR]];
|
|
294
|
+
this.isInitialized=!1;for(const b in Order$$module$build$src$generators$php$php_generator)a=Order$$module$build$src$generators$php$php_generator[b],"string"!==typeof a&&(this["ORDER_"+b]=a);this.addReservedWords("__halt_compiler,abstract,and,array,as,break,callable,case,catch,class,clone,const,continue,declare,default,die,do,echo,else,elseif,empty,enddeclare,endfor,endforeach,endif,endswitch,endwhile,eval,exit,extends,final,for,foreach,function,global,goto,if,implements,include,include_once,instanceof,insteadof,interface,isset,list,namespace,new,or,print,private,protected,public,require,require_once,return,static,switch,throw,trait,try,unset,use,var,while,xor,PHP_VERSION,PHP_MAJOR_VERSION,PHP_MINOR_VERSION,PHP_RELEASE_VERSION,PHP_VERSION_ID,PHP_EXTRA_VERSION,PHP_ZTS,PHP_DEBUG,PHP_MAXPATHLEN,PHP_OS,PHP_SAPI,PHP_EOL,PHP_INT_MAX,PHP_INT_SIZE,DEFAULT_INCLUDE_PATH,PEAR_INSTALL_DIR,PEAR_EXTENSION_DIR,PHP_EXTENSION_DIR,PHP_PREFIX,PHP_BINDIR,PHP_BINARY,PHP_MANDIR,PHP_LIBDIR,PHP_DATADIR,PHP_SYSCONFDIR,PHP_LOCALSTATEDIR,PHP_CONFIG_FILE_PATH,PHP_CONFIG_FILE_SCAN_DIR,PHP_SHLIB_SUFFIX,E_ERROR,E_WARNING,E_PARSE,E_NOTICE,E_CORE_ERROR,E_CORE_WARNING,E_COMPILE_ERROR,E_COMPILE_WARNING,E_USER_ERROR,E_USER_WARNING,E_USER_NOTICE,E_DEPRECATED,E_USER_DEPRECATED,E_ALL,E_STRICT,__COMPILER_HALT_OFFSET__,TRUE,FALSE,NULL,__CLASS__,__DIR__,__FILE__,__FUNCTION__,__LINE__,__METHOD__,__NAMESPACE__,__TRAIT__")}init(a){super.init(a);
|
|
291
295
|
this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.Names$$module$build$src$core$names(this.RESERVED_WORDS_,"$");this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);this.isInitialized=!0}finish(a){const b=Object.values(this.definitions_);a=super.finish(a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a}scrubNakedValue(a){return a+";\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,
|
|
292
|
-
"\\'");return"'"+a+"'"}multiline_quote_(a){return a.split(/\n/g).map(this.quote_).join(' . "\\n" .\n')}scrub_(a,b,c){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.wrap$$module$build$src$core$utils$string(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e,"// ")+"\n");for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&
|
|
293
|
-
(d+=this.prefixLines(e,"// "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}getAdjusted(a,b,c,d,e){
|
|
294
|
-
d&&(a=c?
|
|
296
|
+
"\\'");return"'"+a+"'"}multiline_quote_(a){return a.split(/\n/g).map(this.quote_).join(' . "\\n" .\n')}scrub_(a,b,c=!1){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.wrap$$module$build$src$core$utils$string(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e,"// ")+"\n");for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===$.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&
|
|
297
|
+
(d+=this.prefixLines(e,"// "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}getAdjusted(a,b,c=0,d=!1,e=Order$$module$build$src$generators$php$php_generator.NONE){a.workspace.options.oneBasedIndex&&c--;let f=a.workspace.options.oneBasedIndex?"1":"0",g=e;0<c?g=Order$$module$build$src$generators$php$php_generator.ADDITION:0>c?g=Order$$module$build$src$generators$php$php_generator.SUBTRACTION:d&&(g=Order$$module$build$src$generators$php$php_generator.UNARY_NEGATION);
|
|
298
|
+
a=this.valueToCode(a,b,g)||f;if(0===c&&!d)return a;if($.isNumber$$module$build$src$core$utils$string(a))return a=String(Number(a)+c),d&&(a=String(-Number(a))),a;0<c?a=`${a} + ${c}`:0>c&&(a=`${a} - ${-c}`);d&&(a=c?`-(${a})`:`-${a}`);Math.floor(e)>=Math.floor(g)&&(a=`(${a})`);return a}},module$build$src$generators$php$php_generator={};module$build$src$generators$php$php_generator.Order=Order$$module$build$src$generators$php$php_generator;module$build$src$generators$php$php_generator.PhpGenerator=PhpGenerator$$module$build$src$generators$php$php_generator;var module$build$src$generators$php$colour={};module$build$src$generators$php$colour.colour_blend=colour_blend$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_picker=colour_picker$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_random=colour_random$$module$build$src$generators$php$colour;module$build$src$generators$php$colour.colour_rgb=colour_rgb$$module$build$src$generators$php$colour;var module$build$src$generators$php$lists={};module$build$src$generators$php$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_create_with=lists_create_with$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$php$lists;
|
|
295
299
|
module$build$src$generators$php$lists.lists_indexOf=lists_indexOf$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_isEmpty=lists_isEmpty$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_length=lists_length$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_repeat=lists_repeat$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_reverse=lists_reverse$$module$build$src$generators$php$lists;
|
|
296
300
|
module$build$src$generators$php$lists.lists_setIndex=lists_setIndex$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_sort=lists_sort$$module$build$src$generators$php$lists;module$build$src$generators$php$lists.lists_split=lists_split$$module$build$src$generators$php$lists;var controls_ifelse$$module$build$src$generators$php$logic=controls_if$$module$build$src$generators$php$logic,module$build$src$generators$php$logic={};module$build$src$generators$php$logic.controls_if=controls_if$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.controls_ifelse=controls_if$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_boolean=logic_boolean$$module$build$src$generators$php$logic;
|
|
297
301
|
module$build$src$generators$php$logic.logic_compare=logic_compare$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_negate=logic_negate$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_null=logic_null$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_operation=logic_operation$$module$build$src$generators$php$logic;module$build$src$generators$php$logic.logic_ternary=logic_ternary$$module$build$src$generators$php$logic;var controls_repeat$$module$build$src$generators$php$loops=controls_repeat_ext$$module$build$src$generators$php$loops,module$build$src$generators$php$loops={};module$build$src$generators$php$loops.controls_flow_statements=controls_flow_statements$$module$build$src$generators$php$loops;module$build$src$generators$php$loops.controls_for=controls_for$$module$build$src$generators$php$loops;module$build$src$generators$php$loops.controls_forEach=controls_forEach$$module$build$src$generators$php$loops;
|
|
@@ -302,8 +306,8 @@ module$build$src$generators$php$math.math_trig=math_single$$module$build$src$gen
|
|
|
302
306
|
module$build$src$generators$php$procedures.procedures_defnoreturn=procedures_defreturn$$module$build$src$generators$php$procedures;module$build$src$generators$php$procedures.procedures_defreturn=procedures_defreturn$$module$build$src$generators$php$procedures;module$build$src$generators$php$procedures.procedures_ifreturn=procedures_ifreturn$$module$build$src$generators$php$procedures;var text_prompt$$module$build$src$generators$php$text=text_prompt_ext$$module$build$src$generators$php$text,module$build$src$generators$php$text={};module$build$src$generators$php$text.text=text$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_append=text_append$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_changeCase=text_changeCase$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_charAt=text_charAt$$module$build$src$generators$php$text;
|
|
303
307
|
module$build$src$generators$php$text.text_count=text_count$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_getSubstring=text_getSubstring$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_indexOf=text_indexOf$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_isEmpty=text_isEmpty$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_join=text_join$$module$build$src$generators$php$text;
|
|
304
308
|
module$build$src$generators$php$text.text_length=text_length$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_multiline=text_multiline$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_print=text_print$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt=text_prompt_ext$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$php$text;
|
|
305
|
-
module$build$src$generators$php$text.text_replace=text_replace$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_reverse=text_reverse$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_trim=text_trim$$module$build$src$generators$php$text;var module$build$src$generators$php$variables={};module$build$src$generators$php$variables.variables_get=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables.variables_set=variables_set$$module$build$src$generators$php$variables;var module$build$src$generators$php$variables_dynamic={};module$build$src$generators$php$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$php$variables;var phpGenerator$$module$build$src$generators$php=new PhpGenerator$$module$build$src$generators$php$php_generator
|
|
306
|
-
var module$build$src$generators$php={Order
|
|
309
|
+
module$build$src$generators$php$text.text_replace=text_replace$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_reverse=text_reverse$$module$build$src$generators$php$text;module$build$src$generators$php$text.text_trim=text_trim$$module$build$src$generators$php$text;var module$build$src$generators$php$variables={};module$build$src$generators$php$variables.variables_get=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables.variables_set=variables_set$$module$build$src$generators$php$variables;var module$build$src$generators$php$variables_dynamic={};module$build$src$generators$php$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$php$variables;module$build$src$generators$php$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$php$variables;var phpGenerator$$module$build$src$generators$php=new PhpGenerator$$module$build$src$generators$php$php_generator,generators$$module$build$src$generators$php=Object.assign({},module$build$src$generators$php$colour,module$build$src$generators$php$lists,module$build$src$generators$php$logic,module$build$src$generators$php$loops,module$build$src$generators$php$math,module$build$src$generators$php$procedures,module$build$src$generators$php$text,module$build$src$generators$php$variables,module$build$src$generators$php$variables_dynamic);
|
|
310
|
+
for(const a in generators$$module$build$src$generators$php)phpGenerator$$module$build$src$generators$php.forBlock[a]=generators$$module$build$src$generators$php[a];var module$build$src$generators$php={};module$build$src$generators$php.Order=Order$$module$build$src$generators$php$php_generator;module$build$src$generators$php.PhpGenerator=PhpGenerator$$module$build$src$generators$php$php_generator;module$build$src$generators$php.phpGenerator=phpGenerator$$module$build$src$generators$php;
|
|
307
311
|
module$build$src$generators$php.__namespace__=$;
|
|
308
312
|
return module$build$src$generators$php;
|
|
309
313
|
}));
|