pxt-core 7.3.17 → 7.3.21

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.
Files changed (39) hide show
  1. package/built/pxt.js +9 -6
  2. package/built/pxtblockly.js +1359 -1448
  3. package/built/pxtblocks.d.ts +4 -4
  4. package/built/pxtblocks.js +35 -80
  5. package/built/pxtlib.d.ts +6 -1
  6. package/built/pxtlib.js +9 -6
  7. package/built/target.js +1 -1
  8. package/built/web/blockly.css +1 -1
  9. package/built/web/main.js +1 -1
  10. package/built/web/pxtapp.js +1 -1
  11. package/built/web/pxtasseteditor.js +1 -1
  12. package/built/web/pxtblockly.js +1 -1
  13. package/built/web/pxtblocks.js +1 -1
  14. package/built/web/pxtembed.js +1 -1
  15. package/built/web/pxtlib.js +1 -1
  16. package/built/web/pxtworker.js +1 -1
  17. package/built/web/react-common.css +10 -5
  18. package/built/web/rtlblockly.css +1 -1
  19. package/built/web/rtlsemantic.css +2 -2
  20. package/built/web/semantic.css +2 -2
  21. package/built/web/skillmap/css/main.96b1b3f1.chunk.css +1 -0
  22. package/built/web/skillmap/js/2.7dd06a3a.chunk.js +2 -0
  23. package/built/web/skillmap/js/main.bdd63c80.chunk.js +1 -0
  24. package/localtypings/blockly.d.ts +12268 -7535
  25. package/localtypings/pxtarget.d.ts +1 -0
  26. package/package.json +2 -2
  27. package/theme/blockly-core.less +22 -13
  28. package/theme/melodyeditor.less +2 -2
  29. package/theme/print.less +1 -1
  30. package/theme/pxt.less +0 -1
  31. package/theme/toolbox.less +1 -0
  32. package/webapp/public/blockly/blockly_compressed.js +1269 -1286
  33. package/webapp/public/blockly/blocks_compressed.js +47 -65
  34. package/webapp/public/blockly/msg/js/en.js +8 -17
  35. package/webapp/public/blockly/msg/json/en.json +6 -15
  36. package/webapp/public/skillmap.html +2 -2
  37. package/built/web/skillmap/css/main.ad6de34e.chunk.css +0 -1
  38. package/built/web/skillmap/js/2.c64f6be2.chunk.js +0 -2
  39. package/built/web/skillmap/js/main.0fff4916.chunk.js +0 -1
@@ -1,24 +1,16 @@
1
1
  // Do not edit this file; automatically generated by gulp.
2
- /*
3
2
 
4
- Copyright 2012 Google LLC
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- */
18
- 'use strict';
19
-
20
-
21
- Blockly.Blocks.colour={};Blockly.constants={};Blockly.Constants={};Blockly.Constants.Colour={};Blockly.Constants.Colour.HUE=20;
3
+ /* eslint-disable */
4
+ ;(function(root, factory) {
5
+ if (typeof define === 'function' && define.amd) { // AMD
6
+ define(['./blockly_compressed.js'], factory);
7
+ } else if (typeof exports === 'object') { // Node.js
8
+ module.exports = factory(require('./blockly_compressed.js'));
9
+ } else { // Browser
10
+ root.Blockly.Blocks = factory(root.Blockly);
11
+ }
12
+ }(this, function(Blockly) {
13
+ 'use strict';Blockly.Blocks.colour={};Blockly.Constants={};Blockly.Constants.Colour={};Blockly.Constants.Colour.HUE=20;
22
14
  Blockly.defineBlocksWithJsonArray([{type:"colour_picker",message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",outputShape:Blockly.OUTPUT_SHAPE_ROUND,helpUrl:"%{BKY_COLOUR_PICKER_HELPURL}",style:"field_blocks",tooltip:"%{BKY_COLOUR_PICKER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"colour_random",message0:"%{BKY_COLOUR_RANDOM_TITLE}",output:"Colour",outputShape:Blockly.OUTPUT_SHAPE_ROUND,helpUrl:"%{BKY_COLOUR_RANDOM_HELPURL}",style:"colour_blocks",
23
15
  tooltip:"%{BKY_COLOUR_RANDOM_TOOLTIP}"},{type:"colour_rgb",message0:"%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3",args0:[{type:"input_value",name:"RED",check:"Number",align:"LEFT"},{type:"input_value",name:"GREEN",check:"Number",align:"LEFT"},{type:"input_value",name:"BLUE",check:"Number",align:"LEFT"}],output:"Colour",outputShape:Blockly.OUTPUT_SHAPE_ROUND,helpUrl:"%{BKY_COLOUR_RGB_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RGB_TOOLTIP}"},
24
16
  {type:"colour_blend",message0:"%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",args0:[{type:"input_value",name:"COLOUR1",check:"Colour",align:"LEFT"},{type:"input_value",name:"COLOUR2",check:"Colour",align:"LEFT"},{type:"input_value",name:"RATIO",check:"Number",align:"LEFT"}],output:"Colour",outputShape:Blockly.OUTPUT_SHAPE_ROUND,helpUrl:"%{BKY_COLOUR_BLEND_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_BLEND_TOOLTIP}"}]);/*
@@ -36,7 +28,7 @@ Blockly.PXTBlockly.Extensions.INLINE_SVGS=function(){this.ADD_IMAGE_DATAURI="dat
36
28
  Blockly.PXTBlockly.Extensions.FUNCTION_CONTEXTMENU_EDIT={customContextMenu:function(a){a.push(Blockly.Functions.makeGoToDefinitionOption(this))}};Blockly.PXTBlockly.Extensions.OUTPUT_NUMBER=function(){this.setInputsInline(!0);this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND);this.setOutput(!0,"Number")};Blockly.PXTBlockly.Extensions.OUTPUT_STRING=function(){this.setInputsInline(!0);this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND);this.setOutput(!0,"String")};
37
29
  Blockly.PXTBlockly.Extensions.OUTPUT_BOOLEAN=function(){this.setInputsInline(!0);this.setOutputShape(Blockly.OUTPUT_SHAPE_HEXAGONAL);this.setOutput(!0,"Boolean")};Blockly.PXTBlockly.Extensions.OUTPUT_ARRAY=function(){this.setInputsInline(!0);this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND);this.setOutput(!0,"Array")};
38
30
  Blockly.PXTBlockly.Extensions.registerAll=function(){Blockly.Extensions.register("inline-svgs",this.INLINE_SVGS);Blockly.Extensions.registerMixin("function_contextmenu_edit",Blockly.PXTBlockly.Extensions.FUNCTION_CONTEXTMENU_EDIT);Blockly.Extensions.register("output_number",Blockly.PXTBlockly.Extensions.OUTPUT_NUMBER);Blockly.Extensions.register("output_string",Blockly.PXTBlockly.Extensions.OUTPUT_STRING);Blockly.Extensions.register("output_boolean",Blockly.PXTBlockly.Extensions.OUTPUT_BOOLEAN);Blockly.Extensions.register("output_array",
39
- Blockly.PXTBlockly.Extensions.OUTPUT_ARRAY)};Blockly.PXTBlockly.Extensions.registerAll();Blockly.Blocks.lists={};Blockly.Constants.Lists={};Blockly.Constants.Lists.HUE=260;
31
+ Blockly.PXTBlockly.Extensions.OUTPUT_ARRAY)};Blockly.PXTBlockly.Extensions.registerAll();Blockly.Constants.Lists={};Blockly.Constants.Lists.HUE=260;
40
32
  Blockly.defineBlocksWithJsonArray([{type:"lists_create_empty",message0:"%{BKY_LISTS_CREATE_EMPTY_TITLE}",output:"Array",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"list_blocks",tooltip:"%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_CREATE_EMPTY_HELPURL}"},{type:"lists_repeat",message0:"%{BKY_LISTS_REPEAT_TITLE}",args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"list_blocks",tooltip:"%{BKY_LISTS_REPEAT_TOOLTIP}",
41
33
  helpUrl:"%{BKY_LISTS_REPEAT_HELPURL}"},{type:"lists_reverse",message0:"%{BKY_LISTS_REVERSE_MESSAGE0}",args0:[{type:"input_value",name:"LIST",check:"Array"}],output:"Array",outputShape:Blockly.OUTPUT_SHAPE_ROUND,inputsInline:!0,style:"list_blocks",tooltip:"%{BKY_LISTS_REVERSE_TOOLTIP}",helpUrl:"%{BKY_LISTS_REVERSE_HELPURL}"},{type:"lists_isEmpty",message0:"%{BKY_LISTS_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",outputShape:Blockly.OUTPUT_SHAPE_HEXAGONAL,
42
34
  style:"list_blocks",tooltip:"%{BKY_LISTS_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_ISEMPTY_HELPURL}"},{type:"lists_length",message0:"%{BKY_LISTS_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"list_blocks",tooltip:"%{BKY_LISTS_LENGTH_TOOLTIP}",helpUrl:"%{BKY_LISTS_LENGTH_HELPURL}"}]);
@@ -95,15 +87,15 @@ Blockly.defineBlocksWithJsonArray([{type:"controls_if_if",message0:"%{BKY_CONTRO
95
87
  enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"}]);Blockly.Constants.Logic.TOOLTIPS_BY_OP={EQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}",NEQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}",LT:"%{BKY_LOGIC_COMPARE_TOOLTIP_LT}",LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"};
96
88
  Blockly.Extensions.register("logic_op_tooltip",Blockly.Extensions.buildTooltipForDropdown("OP",Blockly.Constants.Logic.TOOLTIPS_BY_OP));
97
89
  Blockly.Constants.Logic.CONTROLS_IF_MUTATOR_MIXIN={elseifCount_:0,elseCount_:0,suppressPrefixSuffix:!0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=Blockly.utils.xml.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10)||0;this.elseCount_=parseInt(a.getAttribute("else"),10)||0;this.rebuildShape_()},
98
- decompose:function(a){var b=a.newBlock("controls_if_if");b.initSvg();for(var c=b.nextConnection,d=1;d<=this.elseifCount_;d++){var e=a.newBlock("controls_if_elseif");e.initSvg();c.connect(e.previousConnection);c=e.nextConnection}this.elseCount_&&(a=a.newBlock("controls_if_else"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){a=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;for(var b=[null],c=[null],d=null;a;){switch(a.type){case "controls_if_elseif":this.elseifCount_++;
90
+ decompose:function(a){var b=a.newBlock("controls_if_if");b.initSvg();for(var c=b.nextConnection,d=1;d<=this.elseifCount_;d++){var e=a.newBlock("controls_if_elseif");e.initSvg();c.connect(e.previousConnection);c=e.nextConnection}this.elseCount_&&(a=a.newBlock("controls_if_else"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){a=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;for(var b=[null],c=[null],d=null;a&&!a.isInsertionMarker();){switch(a.type){case "controls_if_elseif":this.elseifCount_++;
99
91
  b.push(a.valueConnection_);c.push(a.statementConnection_);break;case "controls_if_else":this.elseCount_++;d=a.statementConnection_;break;default:throw TypeError("Unknown block type: "+a.type);}a=a.nextConnection&&a.nextConnection.targetBlock()}this.updateShape_();this.reconnectChildBlocks_(b,c,d)},saveConnections:function(a){a=a.nextConnection.targetBlock();for(var b=1;a;){switch(a.type){case "controls_if_elseif":var c=this.getInput("IF"+b),d=this.getInput("DO"+b);a.valueConnection_=c&&c.connection.targetConnection;
100
92
  a.statementConnection_=d&&d.connection.targetConnection;b++;break;case "controls_if_else":d=this.getInput("ELSE");a.statementConnection_=d&&d.connection.targetConnection;break;default:throw TypeError("Unknown block type: "+a.type);}a=a.nextConnection&&a.nextConnection.targetBlock()}},rebuildShape_:function(){var a=[null],b=[null],c=null;this.getInput("ELSE")&&(c=this.getInput("ELSE").connection.targetConnection);for(var d=1;this.getInput("IF"+d);){var e=this.getInput("IF"+d),f=this.getInput("DO"+
101
93
  d);a.push(e.connection.targetConnection);b.push(f.connection.targetConnection);d++}this.updateShape_();this.reconnectChildBlocks_(a,b,c)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var a=1;this.getInput("IF"+a);)this.removeInput("IF"+a),this.removeInput("DO"+a),a++;for(a=1;a<=this.elseifCount_;a++)this.appendValueInput("IF"+a).setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+a).appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);
102
94
  this.elseCount_&&this.appendStatementInput("ELSE").appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(a,b,c){for(var d=1;d<=this.elseifCount_;d++)Blockly.Mutator.reconnect(a[d],this,"IF"+d),Blockly.Mutator.reconnect(b[d],this,"DO"+d);Blockly.Mutator.reconnect(c,this,"ELSE")}};
103
95
  Blockly.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION=function(){this.setTooltip(function(){if(this.elseifCount_||this.elseCount_){if(!this.elseifCount_&&this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(this.elseifCount_&&!this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(this.elseifCount_&&this.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""}.bind(this))};Blockly.Extensions.register("controls_if_tooltip",Blockly.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION);
104
- Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN={onchange:function(a){this.prevBlocks_||(this.prevBlocks_=[null,null]);var b=this.getInputTargetBlock("A"),c=this.getInputTargetBlock("B");b&&c&&!b.outputConnection.checkType(c.outputConnection)&&(Blockly.Events.setGroup(a.group),a=this.prevBlocks_[0],a!==b&&(b.unplug(),!a||a.isDisposed()||a.isShadow()||this.getInput("A").connection.connect(a.outputConnection)),b=this.prevBlocks_[1],b!==c&&(c.unplug(),!b||b.isDisposed()||b.isShadow()||this.getInput("B").connection.connect(b.outputConnection)),
105
- this.bumpNeighbours(),Blockly.Events.setGroup(!1));this.prevBlocks_[0]=this.getInputTargetBlock("A");this.prevBlocks_[1]=this.getInputTargetBlock("B")}};Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION=function(){this.mixin(Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN)};Blockly.Extensions.register("logic_compare",Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION);
106
- Blockly.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN={prevParentConnection_:null,onchange:function(a){var b=this.getInputTargetBlock("THEN"),c=this.getInputTargetBlock("ELSE"),d=this.outputConnection.targetConnection;if((b||c)&&d)for(var e=0;2>e;e++){var f=1==e?b:c;f&&!f.outputConnection.checkType(d)&&(Blockly.Events.setGroup(a.group),d===this.prevParentConnection_?(this.unplug(),d.getSourceBlock().bumpNeighbours()):(f.unplug(),f.bumpNeighbours()),Blockly.Events.setGroup(!1))}this.prevParentConnection_=
96
+ Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN={onchange:function(a){this.prevBlocks_||(this.prevBlocks_=[null,null]);var b=this.getInputTargetBlock("A"),c=this.getInputTargetBlock("B");b&&c&&!this.workspace.connectionChecker.doTypeChecks(b.outputConnection,c.outputConnection)&&(Blockly.Events.setGroup(a.group),a=this.prevBlocks_[0],a!==b&&(b.unplug(),!a||a.isDisposed()||a.isShadow()||this.getInput("A").connection.connect(a.outputConnection)),b=this.prevBlocks_[1],b!==c&&(c.unplug(),!b||b.isDisposed()||
97
+ b.isShadow()||this.getInput("B").connection.connect(b.outputConnection)),this.bumpNeighbours(),Blockly.Events.setGroup(!1));this.prevBlocks_[0]=this.getInputTargetBlock("A");this.prevBlocks_[1]=this.getInputTargetBlock("B")}};Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION=function(){this.mixin(Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN)};Blockly.Extensions.register("logic_compare",Blockly.Constants.Logic.LOGIC_COMPARE_EXTENSION);
98
+ Blockly.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN={prevParentConnection_:null,onchange:function(a){var b=this.getInputTargetBlock("THEN"),c=this.getInputTargetBlock("ELSE"),d=this.outputConnection.targetConnection;if((b||c)&&d)for(var e=0;2>e;e++){var f=1==e?b:c;f&&!f.workspace.connectionChecker.doTypeChecks(f.outputConnection,d)&&(Blockly.Events.setGroup(a.group),d===this.prevParentConnection_?(this.unplug(),d.getSourceBlock().bumpNeighbours()):(f.unplug(),f.bumpNeighbours()),Blockly.Events.setGroup(!1))}this.prevParentConnection_=
107
99
  d}};Blockly.Extensions.registerMixin("logic_ternary",Blockly.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN);Blockly.Blocks.loops={};Blockly.Constants.Loops={};Blockly.Constants.Loops.HUE=120;
108
100
  Blockly.defineBlocksWithJsonArray([{type:"controls_repeat_ext",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"input_value",name:"TIMES",check:"Number"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_repeat",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"field_number",name:"TIMES",value:10,
109
101
  min:0,precision:1}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_whileUntil",message0:"%1 %2",args0:[{type:"field_dropdown",name:"MODE",options:[["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}","WHILE"],["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}","UNTIL"]]},{type:"input_value",name:"BOOL",check:"Boolean"}],
@@ -114,8 +106,8 @@ name:"DO"}],inputsInline:!0,previousStatement:null,nextStatement:null,style:"loo
114
106
  Blockly.Extensions.register("controls_flow_tooltip",Blockly.Extensions.buildTooltipForDropdown("FLOW",Blockly.Constants.Loops.BREAK_CONTINUE_TOOLTIPS));
115
107
  Blockly.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN={customContextMenu:function(a){if(!this.isInFlyout){var b=this.getField("VAR").getVariable(),c=b.name;if(!this.isCollapsed()&&null!=c){var d={enabled:!this.inDebugWorkspace()};d.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c);b=Blockly.Variables.generateVariableFieldDom(b);c=Blockly.utils.xml.createElement("block");c.setAttribute("type","variables_get");c.appendChild(b);d.callback=Blockly.ContextMenu.callbackFactory(this,
116
108
  c);a.push(d)}}}};Blockly.Extensions.registerMixin("contextMenu_newGetVariableBlock",Blockly.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN);Blockly.Extensions.register("controls_for_tooltip",Blockly.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOR_TOOLTIP}","VAR"));Blockly.Extensions.register("controls_forEach_tooltip",Blockly.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOREACH_TOOLTIP}","VAR"));
117
- Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN={LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"],suppressPrefixSuffix:!0,getSurroundLoop:function(a){do{if(-1!=Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.LOOP_TYPES.indexOf(a.type))return a;a=a.getSurroundParent()}while(a);return null},onchange:function(a){this.workspace.isDragging&&!this.workspace.isDragging()&&(Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(this)?
118
- (this.setWarningText(null),this.isInFlyout||this.setEnabled(!0)):(this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING),this.isInFlyout||this.getInheritedDisabled()||this.setEnabled(!1)))}};Blockly.Extensions.registerMixin("controls_flow_in_loop_check",Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN);Blockly.Blocks.math={};Blockly.Constants.Math={};Blockly.Constants.Math.HUE=230;
109
+ Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN={LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"],suppressPrefixSuffix:!0,getSurroundLoop:function(a){do{if(-1!=Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.LOOP_TYPES.indexOf(a.type))return a;a=a.getSurroundParent()}while(a);return null},onchange:function(a){if(this.workspace.isDragging&&!this.workspace.isDragging()&&a.type==Blockly.Events.BLOCK_MOVE){var b=Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(this);
110
+ this.setWarningText(b?null:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING);if(!this.isInFlyout){var c=Blockly.Events.getGroup();Blockly.Events.setGroup(a.group);this.setEnabled(b);Blockly.Events.setGroup(c)}}}};Blockly.Extensions.registerMixin("controls_flow_in_loop_check",Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN);Blockly.Blocks.math={};Blockly.Constants.Math={};Blockly.Constants.Math.HUE=230;
119
111
  Blockly.defineBlocksWithJsonArray([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"field_blocks",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_integer",message0:"%1",args0:[{type:"field_number",name:"NUM",precision:1}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"field_blocks",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",
120
112
  tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_whole_number",message0:"%1",args0:[{type:"field_number",name:"NUM",min:0,precision:1}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"field_blocks",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_positive_number",message0:"%1",args0:[{type:"field_number",name:"NUM",min:0}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,
121
113
  style:"field_blocks",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_number_minmax",message0:"%1",args0:[{type:"field_slider",name:"SLIDER",value:0,step:1,labelText:"Number"}],output:"Number",outputShape:Blockly.OUTPUT_SHAPE_ROUND,style:"field_blocks",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",mutator:"math_number_minmax_mutator",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",
@@ -140,38 +132,38 @@ Blockly.Extensions.registerMutator("math_modes_of_list_mutator",Blockly.Constant
140
132
  Blockly.Constants.Math.MATH_NUMBER_MINMAX_MIXIN={mutationToDom:function(){var a=Blockly.utils.xml.createElement("mutation");void 0!=this.inputList[0].fieldRow[0].min_&&a.setAttribute("min",this.inputList[0].fieldRow[0].min_);void 0!=this.inputList[0].fieldRow[0].max_&&a.setAttribute("max",this.inputList[0].fieldRow[0].max_);void 0!=this.inputList[0].fieldRow[0].labelText_&&a.setAttribute("label",this.inputList[0].fieldRow[0].labelText_);void 0!=this.inputList[0].fieldRow[0].step_&&a.setAttribute("step",
141
133
  this.inputList[0].fieldRow[0].step_);void 0!=this.inputList[0].fieldRow[0].sliderColor_&&a.setAttribute("color",this.inputList[0].fieldRow[0].sliderColor_);void 0!=this.inputList[0].fieldRow[0].precision_&&a.setAttribute("precision",this.inputList[0].fieldRow[0].precision_);return a},domToMutation:function(a){var b=a.getAttribute("min"),c=a.getAttribute("max"),d=a.getAttribute("step"),e=a.getAttribute("label"),f=a.getAttribute("color");a=a.getAttribute("precision");this.inputList[0].fieldRow[0].setLabel(e);
142
134
  this.inputList[0].fieldRow[0].setOptions(b,c,d,a);this.inputList[0].fieldRow[0].setColor(f)}};Blockly.Extensions.registerMutator("math_number_minmax_mutator",Blockly.Constants.Math.MATH_NUMBER_MINMAX_MIXIN);Blockly.Blocks.procedures={};
143
- Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldTextInput("",Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT);
144
- this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:function(a){this.hasStatements_!==a&&(a?(this.appendStatementInput("STACK").appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=
145
- a)},updateParams_:function(){var a="";this.arguments_.length&&(a=Blockly.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", "));Blockly.Events.disable();try{this.setFieldValue(a,"PARAMS")}finally{Blockly.Events.enable()}},mutationToDom:function(a){var b=Blockly.utils.xml.createElement("mutation");a&&b.setAttribute("name",this.getFieldValue("NAME"));for(var c=0;c<this.argumentVarModels_.length;c++){var d=Blockly.utils.xml.createElement("arg"),e=this.argumentVarModels_[c];d.setAttribute("name",
146
- e.name);d.setAttribute("varid",e.getId());a&&this.paramIds_&&d.setAttribute("paramId",this.paramIds_[c]);b.appendChild(d)}this.hasStatements_||b.setAttribute("statements","false");return b},domToMutation:function(a){this.arguments_=[];this.argumentVarModels_=[];for(var b=0,c;c=a.childNodes[b];b++)if("arg"==c.nodeName.toLowerCase()){var d=c.getAttribute("name");c=c.getAttribute("varid")||c.getAttribute("varId");this.arguments_.push(d);c=Blockly.Variables.getOrCreateVariablePackage(this.workspace,c,
147
- d,"");null!=c?this.argumentVarModels_.push(c):console.log("Failed to create a variable with name "+d+", ignoring.")}this.updateParams_();Blockly.Procedures.mutateCallers(this);this.setStatements_("false"!==a.getAttribute("statements"))},decompose:function(a){var b=Blockly.utils.xml.createElement("block");b.setAttribute("type","procedures_mutatorcontainer");var c=Blockly.utils.xml.createElement("statement");c.setAttribute("name","STACK");b.appendChild(c);for(var d=0;d<this.arguments_.length;d++){var e=
135
+ Blockly.Blocks.procedures_defnoreturn={init:function(){var a=Blockly.Procedures.findLegalName("",this);a=new Blockly.FieldTextInput(a,Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT&&
136
+ this.setCommentText(Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:function(a){this.hasStatements_!==a&&(a?(this.appendStatementInput("STACK").appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK",
137
+ "RETURN")):this.removeInput("STACK",!0),this.hasStatements_=a)},updateParams_:function(){var a="";this.arguments_.length&&(a=Blockly.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", "));Blockly.Events.disable();try{this.setFieldValue(a,"PARAMS")}finally{Blockly.Events.enable()}},mutationToDom:function(a){var b=Blockly.utils.xml.createElement("mutation");a&&b.setAttribute("name",this.getFieldValue("NAME"));for(var c=0;c<this.argumentVarModels_.length;c++){var d=Blockly.utils.xml.createElement("arg"),
138
+ e=this.argumentVarModels_[c];d.setAttribute("name",e.name);d.setAttribute("varid",e.getId());a&&this.paramIds_&&d.setAttribute("paramId",this.paramIds_[c]);b.appendChild(d)}this.hasStatements_||b.setAttribute("statements","false");return b},domToMutation:function(a){this.arguments_=[];this.argumentVarModels_=[];for(var b=0,c;c=a.childNodes[b];b++)if("arg"==c.nodeName.toLowerCase()){var d=c.getAttribute("name");c=c.getAttribute("varid")||c.getAttribute("varId");this.arguments_.push(d);c=Blockly.Variables.getOrCreateVariablePackage(this.workspace,
139
+ c,d,"");null!=c?this.argumentVarModels_.push(c):console.log("Failed to create a variable with name "+d+", ignoring.")}this.updateParams_();Blockly.Procedures.mutateCallers(this);this.setStatements_("false"!==a.getAttribute("statements"))},decompose:function(a){var b=Blockly.utils.xml.createElement("block");b.setAttribute("type","procedures_mutatorcontainer");var c=Blockly.utils.xml.createElement("statement");c.setAttribute("name","STACK");b.appendChild(c);for(var d=0;d<this.arguments_.length;d++){var e=
148
140
  Blockly.utils.xml.createElement("block");e.setAttribute("type","procedures_mutatorarg");var f=Blockly.utils.xml.createElement("field");f.setAttribute("name","NAME");var g=Blockly.utils.xml.createTextNode(this.arguments_[d]);f.appendChild(g);e.appendChild(f);f=Blockly.utils.xml.createElement("next");e.appendChild(f);c.appendChild(e);c=f}a=Blockly.Xml.domToBlock(b,a);"procedures_defreturn"==this.type?a.setFieldValue(this.hasStatements_,"STATEMENTS"):a.removeInput("STATEMENT_INPUT");Blockly.Procedures.mutateCallers(this);
149
- return a},compose:function(a){this.arguments_=[];this.paramIds_=[];this.argumentVarModels_=[];for(var b=a.getInputTargetBlock("STACK");b;){var c=b.getFieldValue("NAME");this.arguments_.push(c);c=this.workspace.getVariable(c,"");this.argumentVarModels_.push(c);this.paramIds_.push(b.id);b=b.nextConnection&&b.nextConnection.targetBlock()}this.updateParams_();Blockly.Procedures.mutateCallers(this);a=a.getFieldValue("STATEMENTS");if(null!==a&&(a="TRUE"==a,this.hasStatements_!=a))if(a)this.setStatements_(!0),
141
+ return a},compose:function(a){this.arguments_=[];this.paramIds_=[];this.argumentVarModels_=[];for(var b=a.getInputTargetBlock("STACK");b&&!b.isInsertionMarker();){var c=b.getFieldValue("NAME");this.arguments_.push(c);c=this.workspace.getVariable(c,"");this.argumentVarModels_.push(c);this.paramIds_.push(b.id);b=b.nextConnection&&b.nextConnection.targetBlock()}this.updateParams_();Blockly.Procedures.mutateCallers(this);a=a.getFieldValue("STATEMENTS");if(null!==a&&(a="TRUE"==a,this.hasStatements_!=a))if(a)this.setStatements_(!0),
150
142
  Blockly.Mutator.reconnect(this.statementConnection_,this,"STACK"),this.statementConnection_=null;else{a=this.getInput("STACK").connection;if(this.statementConnection_=a.targetConnection)a=a.targetBlock(),a.unplug(),a.bumpNeighbours();this.setStatements_(!1)}},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!1]},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},renameVarById:function(a,b){var c=this.workspace.getVariableById(a);
151
143
  if(""==c.type){c=c.name;b=this.workspace.getVariableById(b);for(var d=!1,e=0;e<this.argumentVarModels_.length;e++)this.argumentVarModels_[e].getId()==a&&(this.arguments_[e]=b.name,this.argumentVarModels_[e]=b,d=!0);d&&(this.displayRenamedVar_(c,b.name),Blockly.Procedures.mutateCallers(this))}},updateVarName:function(a){for(var b=a.name,c=!1,d=0;d<this.argumentVarModels_.length;d++)if(this.argumentVarModels_[d].getId()==a.getId()){var e=this.arguments_[d];this.arguments_[d]=b;c=!0}c&&(this.displayRenamedVar_(e,
152
144
  b),Blockly.Procedures.mutateCallers(this))},displayRenamedVar_:function(a,b){this.updateParams_();if(this.mutator&&this.mutator.isVisible())for(var c=this.mutator.workspace_.getAllBlocks(!1),d=0,e;e=c[d];d++)"procedures_mutatorarg"==e.type&&Blockly.Names.equals(a,e.getFieldValue("NAME"))&&e.setFieldValue(b,"NAME")},customContextMenu:function(a){if(!this.isInFlyout){var b={enabled:!this.options.debugMode},c=this.getFieldValue("NAME");b.text=Blockly.Msg.PROCEDURES_CREATE_DO.replace("%1",c);var d=Blockly.utils.xml.createElement("mutation");
153
145
  d.setAttribute("name",c);for(c=0;c<this.arguments_.length;c++){var e=Blockly.utils.xml.createElement("arg");e.setAttribute("name",this.arguments_[c]);d.appendChild(e)}c=Blockly.utils.xml.createElement("block");c.setAttribute("type",this.callType_);c.appendChild(d);b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b);if(!this.isCollapsed())for(c=0;c<this.argumentVarModels_.length;c++)b={enabled:!this.inDebugWorkspace()},d=this.argumentVarModels_[c],b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",
154
146
  d.name),d=Blockly.Variables.generateVariableFieldDom(d),e=Blockly.utils.xml.createElement("block"),e.setAttribute("type","variables_get"),e.appendChild(d),b.callback=Blockly.ContextMenu.callbackFactory(this,e),a.push(b)}},callType_:"procedures_callnoreturn"};
155
- Blockly.Blocks.procedures_defreturn={init:function(){var a=new Blockly.FieldTextInput("",Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.appendValueInput("RETURN").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&
156
- this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:Blockly.Blocks.procedures_defnoreturn.setStatements_,updateParams_:Blockly.Blocks.procedures_defnoreturn.updateParams_,
157
- mutationToDom:Blockly.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_defnoreturn.domToMutation,decompose:Blockly.Blocks.procedures_defnoreturn.decompose,compose:Blockly.Blocks.procedures_defnoreturn.compose,getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},getVars:Blockly.Blocks.procedures_defnoreturn.getVars,getVarModels:Blockly.Blocks.procedures_defnoreturn.getVarModels,renameVarById:Blockly.Blocks.procedures_defnoreturn.renameVarById,
158
- updateVarName:Blockly.Blocks.procedures_defnoreturn.updateVarName,displayRenamedVar_:Blockly.Blocks.procedures_defnoreturn.displayRenamedVar_,customContextMenu:Blockly.Blocks.procedures_defnoreturn.customContextMenu,callType_:"procedures_callreturn"};
147
+ Blockly.Blocks.procedures_defreturn={init:function(){var a=Blockly.Procedures.findLegalName("",this);a=new Blockly.FieldTextInput(a,Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.appendValueInput("RETURN").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||
148
+ this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:Blockly.Blocks.procedures_defnoreturn.setStatements_,
149
+ updateParams_:Blockly.Blocks.procedures_defnoreturn.updateParams_,mutationToDom:Blockly.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_defnoreturn.domToMutation,decompose:Blockly.Blocks.procedures_defnoreturn.decompose,compose:Blockly.Blocks.procedures_defnoreturn.compose,getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},getVars:Blockly.Blocks.procedures_defnoreturn.getVars,getVarModels:Blockly.Blocks.procedures_defnoreturn.getVarModels,
150
+ renameVarById:Blockly.Blocks.procedures_defnoreturn.renameVarById,updateVarName:Blockly.Blocks.procedures_defnoreturn.updateVarName,displayRenamedVar_:Blockly.Blocks.procedures_defnoreturn.displayRenamedVar_,customContextMenu:Blockly.Blocks.procedures_defnoreturn.customContextMenu,callType_:"procedures_callreturn"};
159
151
  Blockly.Blocks.procedures_mutatorcontainer={init:function(){this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE);this.appendStatementInput("STACK");this.appendDummyInput("STATEMENT_INPUT").appendField(Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS).appendField(new Blockly.FieldCheckbox("TRUE"),"STATEMENTS");this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP);this.contextMenu=!1}};
160
152
  Blockly.Blocks.procedures_mutatorarg={init:function(){var a=new Blockly.FieldTextInput(Blockly.Procedures.DEFAULT_ARG,this.validator_);a.oldShowEditorFn_=a.showEditor_;a.showEditor_=function(){this.createdVariables_=[];this.oldShowEditorFn_()};this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_MUTATORARG_TITLE).appendField(a,"NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP);this.contextMenu=
161
- !1;a.onFinishEditing_=this.deleteIntermediateVars_;a.createdVariables_=[];a.onFinishEditing_("x")},validator_:function(a){var b=this.getSourceBlock(),c=Blockly.Mutator.findParentWs(b.workspace);a=a.replace(/[\s\xa0]+/g," ").replace(/^ | $/g,"");if(!a)return null;for(var d=(b.workspace.targetWorkspace||b.workspace).getAllBlocks(!1),e=0;e<d.length;e++)if(d[e].id!=this.getSourceBlock().id&&d[e].getFieldValue("NAME")==a)return null;if(b.isInFlyout)return a;(b=c.getVariable(a,""))&&b.name!=a&&c.renameVariableById(b.getId(),
162
- a);b||(b=c.createVariable(a,""))&&this.createdVariables_&&this.createdVariables_.push(b);return a},deleteIntermediateVars_:function(a){var b=Blockly.Mutator.findParentWs(this.getSourceBlock().workspace);if(b)for(var c=0;c<this.createdVariables_.length;c++){var d=this.createdVariables_[c];d.name!=a&&b.deleteVariableById(d.getId())}}};
163
- Blockly.Blocks.procedures_callnoreturn={init:function(){this.appendDummyInput("TOPROW").appendField(this.id,"NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setStyle("procedure_blocks");this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.quarkConnections_={};this.quarkIds_=null;this.previousEnabledState_=!0},getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(a,b){Blockly.Names.equals(a,
153
+ !1;a.onFinishEditing_=this.deleteIntermediateVars_;a.createdVariables_=[];a.onFinishEditing_("x")},validator_:function(a){var b=this.getSourceBlock(),c=Blockly.Mutator.findParentWs(b.workspace);a=a.replace(/[\s\xa0]+/g," ").replace(/^ | $/g,"");if(!a)return null;for(var d=(b.workspace.targetWorkspace||b.workspace).getAllBlocks(!1),e=a.toLowerCase(),f=0;f<d.length;f++)if(d[f].id!=this.getSourceBlock().id){var g=d[f].getFieldValue("NAME");if(g&&g.toLowerCase()==e)return null}if(b.isInFlyout)return a;
154
+ (b=c.getVariable(a,""))&&b.name!=a&&c.renameVariableById(b.getId(),a);b||(b=c.createVariable(a,""))&&this.createdVariables_&&this.createdVariables_.push(b);return a},deleteIntermediateVars_:function(a){var b=Blockly.Mutator.findParentWs(this.getSourceBlock().workspace);if(b)for(var c=0;c<this.createdVariables_.length;c++){var d=this.createdVariables_[c];d.name!=a&&b.deleteVariableById(d.getId())}}};
155
+ Blockly.Blocks.procedures_callnoreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setStyle("procedure_blocks");this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.quarkConnections_={};this.quarkIds_=null;this.previousEnabledState_=!0},getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(a,b){Blockly.Names.equals(a,
164
156
  this.getProcedureCall())&&(this.setFieldValue(b,"NAME"),this.setTooltip((this.outputConnection?Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP:Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",b)))},setProcedureParameters_:function(a,b){var c=Blockly.Procedures.getDefinition(this.getProcedureCall(),this.workspace),d=c&&c.mutator&&c.mutator.isVisible();d||(this.quarkConnections_={},this.quarkIds_=null);if(b)if(a.join("\n")==this.arguments_.join("\n"))this.quarkIds_=b;else{if(b.length!=a.length)throw RangeError("paramNames and paramIds must be the same length.");
165
157
  this.setCollapsed(!1);this.quarkIds_||(this.quarkConnections_={},this.quarkIds_=[]);c=this.rendered;this.rendered=!1;for(var e=0;e<this.arguments_.length;e++){var f=this.getInput("ARG"+e);f&&(f=f.connection.targetConnection,this.quarkConnections_[this.quarkIds_[e]]=f,d&&f&&-1==b.indexOf(this.quarkIds_[e])&&(f.disconnect(),f.getSourceBlock().bumpNeighbours()))}this.arguments_=[].concat(a);this.argumentVarModels_=[];for(e=0;e<this.arguments_.length;e++)a=Blockly.Variables.getOrCreateVariablePackage(this.workspace,
166
158
  null,this.arguments_[e],""),this.argumentVarModels_.push(a);this.updateShape_();if(this.quarkIds_=b)for(e=0;e<this.arguments_.length;e++)b=this.quarkIds_[e],b in this.quarkConnections_&&(f=this.quarkConnections_[b],Blockly.Mutator.reconnect(f,this,"ARG"+e)||delete this.quarkConnections_[b]);(this.rendered=c)&&this.render()}},updateShape_:function(){for(var a=0;a<this.arguments_.length;a++){var b=this.getField("ARGNAME"+a);if(b){Blockly.Events.disable();try{b.setValue(this.arguments_[a])}finally{Blockly.Events.enable()}}else b=
167
159
  new Blockly.FieldLabel(this.arguments_[a]),this.appendValueInput("ARG"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(b,"ARGNAME"+a).init()}for(;this.getInput("ARG"+a);)this.removeInput("ARG"+a),a++;if(a=this.getInput("TOPROW"))this.arguments_.length?this.getField("WITH")||(a.appendField(Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS,"WITH"),a.init()):this.getField("WITH")&&a.removeField("WITH")},mutationToDom:function(){var a=Blockly.utils.xml.createElement("mutation");a.setAttribute("name",this.getProcedureCall());
168
- for(var b=0;b<this.arguments_.length;b++){var c=Blockly.utils.xml.createElement("arg");c.setAttribute("name",this.arguments_[b]);a.appendChild(c)}return a},domToMutation:function(a){var b=a.getAttribute("name");this.renameProcedure(this.getProcedureCall(),b);b=[];for(var c=[],d=0,e;e=a.childNodes[d];d++)"arg"==e.nodeName.toLowerCase()&&(b.push(e.getAttribute("name")),c.push(e.getAttribute("paramId")));this.setProcedureParameters_(b,c)},getVarModels:function(){return this.argumentVarModels_},onchange:function(a){if(this.workspace&&
169
- !this.workspace.isFlyout&&a.recordUndo)if(a.type==Blockly.Events.BLOCK_CREATE&&-1!=a.ids.indexOf(this.id)){var b=this.getProcedureCall();b=Blockly.Procedures.getDefinition(b,this.workspace);!b||b.type==this.defType_&&JSON.stringify(b.arguments_)==JSON.stringify(this.arguments_)||(b=null);if(!b){Blockly.Events.setGroup(a.group);a=Blockly.utils.xml.createElement("xml");b=Blockly.utils.xml.createElement("block");b.setAttribute("type",this.defType_);var c=this.getRelativeToSurfaceXY(),d=c.y+2*Blockly.SNAP_RADIUS;
170
- b.setAttribute("x",c.x+Blockly.SNAP_RADIUS*(this.RTL?-1:1));b.setAttribute("y",d);c=this.mutationToDom();b.appendChild(c);c=Blockly.utils.xml.createElement("field");c.setAttribute("name","NAME");c.appendChild(Blockly.utils.xml.createTextNode(this.getProcedureCall()));b.appendChild(c);a.appendChild(b);Blockly.Xml.domToWorkspace(a,this.workspace);Blockly.Events.setGroup(!1)}}else a.type==Blockly.Events.BLOCK_DELETE?(b=this.getProcedureCall(),b=Blockly.Procedures.getDefinition(b,this.workspace),b||(Blockly.Events.setGroup(a.group),
171
- this.dispose(!0),Blockly.Events.setGroup(!1))):a.type==Blockly.Events.CHANGE&&"disabled"==a.element&&(b=this.getProcedureCall(),(b=Blockly.Procedures.getDefinition(b,this.workspace))&&b.id==a.blockId&&((b=Blockly.Events.getGroup())&&console.log("Saw an existing group while responding to a definition change"),Blockly.Events.setGroup(a.group),a.newValue?(this.previousEnabledState_=this.isEnabled(),this.setEnabled(!1)):this.setEnabled(this.previousEnabledState_),Blockly.Events.setGroup(b)))},customContextMenu:function(a){if(this.workspace.isMovable()){var b=
172
- {enabled:!0};b.text=Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF;var c=this.getProcedureCall(),d=this.workspace;b.callback=function(){var a=Blockly.Procedures.getDefinition(c,d);a&&(d.centerOnBlock(a.id),a.select())};a.push(b)}},defType_:"procedures_defnoreturn"};
173
- Blockly.Blocks.procedures_callreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME");this.setOutput(!0);this.setStyle("procedure_blocks");this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL);this.arguments_=[];this.quarkConnections_={};this.quarkIds_=null;this.previousEnabledState_=!0},getProcedureCall:Blockly.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:Blockly.Blocks.procedures_callnoreturn.renameProcedure,setProcedureParameters_:Blockly.Blocks.procedures_callnoreturn.setProcedureParameters_,
174
- updateShape_:Blockly.Blocks.procedures_callnoreturn.updateShape_,mutationToDom:Blockly.Blocks.procedures_callnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_callnoreturn.domToMutation,getVarModels:Blockly.Blocks.procedures_callnoreturn.getVarModels,onchange:Blockly.Blocks.procedures_callnoreturn.onchange,customContextMenu:Blockly.Blocks.procedures_callnoreturn.customContextMenu,defType_:"procedures_defreturn"};
160
+ for(var b=0;b<this.arguments_.length;b++){var c=Blockly.utils.xml.createElement("arg");c.setAttribute("name",this.arguments_[b]);a.appendChild(c)}return a},domToMutation:function(a){var b=a.getAttribute("name");this.renameProcedure(this.getProcedureCall(),b);b=[];for(var c=[],d=0,e;e=a.childNodes[d];d++)"arg"==e.nodeName.toLowerCase()&&(b.push(e.getAttribute("name")),c.push(e.getAttribute("paramId")));this.setProcedureParameters_(b,c)},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},
161
+ onchange:function(a){if(this.workspace&&!this.workspace.isFlyout&&a.recordUndo)if(a.type==Blockly.Events.BLOCK_CREATE&&-1!=a.ids.indexOf(this.id)){var b=this.getProcedureCall();b=Blockly.Procedures.getDefinition(b,this.workspace);!b||b.type==this.defType_&&JSON.stringify(b.getVars())==JSON.stringify(this.arguments_)||(b=null);if(!b){Blockly.Events.setGroup(a.group);a=Blockly.utils.xml.createElement("xml");b=Blockly.utils.xml.createElement("block");b.setAttribute("type",this.defType_);var c=this.getRelativeToSurfaceXY(),
162
+ d=c.y+2*Blockly.SNAP_RADIUS;b.setAttribute("x",c.x+Blockly.SNAP_RADIUS*(this.RTL?-1:1));b.setAttribute("y",d);c=this.mutationToDom();b.appendChild(c);c=Blockly.utils.xml.createElement("field");c.setAttribute("name","NAME");d=this.getProcedureCall();d||(d=Blockly.Procedures.findLegalName("",this),this.renameProcedure("",d));c.appendChild(Blockly.utils.xml.createTextNode(d));b.appendChild(c);a.appendChild(b);Blockly.Xml.domToWorkspace(a,this.workspace);Blockly.Events.setGroup(!1)}}else a.type==Blockly.Events.BLOCK_DELETE?
163
+ (b=this.getProcedureCall(),b=Blockly.Procedures.getDefinition(b,this.workspace),b||(Blockly.Events.setGroup(a.group),this.dispose(!0),Blockly.Events.setGroup(!1))):a.type==Blockly.Events.CHANGE&&"disabled"==a.element&&(b=this.getProcedureCall(),(b=Blockly.Procedures.getDefinition(b,this.workspace))&&b.id==a.blockId&&((b=Blockly.Events.getGroup())&&console.log("Saw an existing group while responding to a definition change"),Blockly.Events.setGroup(a.group),a.newValue?(this.previousEnabledState_=this.isEnabled(),
164
+ this.setEnabled(!1)):this.setEnabled(this.previousEnabledState_),Blockly.Events.setGroup(b)))},customContextMenu:function(a){if(this.workspace.isMovable()){var b={enabled:!0};b.text=Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF;var c=this.getProcedureCall(),d=this.workspace;b.callback=function(){var a=Blockly.Procedures.getDefinition(c,d);a&&(d.centerOnBlock(a.id),a.select())};a.push(b)}},defType_:"procedures_defnoreturn"};
165
+ Blockly.Blocks.procedures_callreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME");this.setOutput(!0);this.setStyle("procedure_blocks");this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.quarkConnections_={};this.quarkIds_=null;this.previousEnabledState_=!0},getProcedureCall:Blockly.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:Blockly.Blocks.procedures_callnoreturn.renameProcedure,setProcedureParameters_:Blockly.Blocks.procedures_callnoreturn.setProcedureParameters_,
166
+ updateShape_:Blockly.Blocks.procedures_callnoreturn.updateShape_,mutationToDom:Blockly.Blocks.procedures_callnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_callnoreturn.domToMutation,getVars:Blockly.Blocks.procedures_callnoreturn.getVars,getVarModels:Blockly.Blocks.procedures_callnoreturn.getVarModels,onchange:Blockly.Blocks.procedures_callnoreturn.onchange,customContextMenu:Blockly.Blocks.procedures_callnoreturn.customContextMenu,defType_:"procedures_defreturn"};
175
167
  Blockly.Blocks.procedures_ifreturn={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_IFRETURN_HELPURL);this.hasReturnValue_=!0},mutationToDom:function(){var a=
176
168
  Blockly.utils.xml.createElement("mutation");a.setAttribute("value",Number(this.hasReturnValue_));return a},domToMutation:function(a){this.hasReturnValue_=1==a.getAttribute("value");this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(a){if(this.workspace.isDragging&&!this.workspace.isDragging()){a=!1;var b=this;do{if(-1!=this.FUNCTION_TYPES.indexOf(b.type)){a=!0;break}b=b.getSurroundParent()}while(b);
177
169
  a?("procedures_defnoreturn"==b.type&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):"procedures_defreturn"!=b.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null),this.isInFlyout||this.setEnabled(!0)):(this.setWarningText(Blockly.Msg.PROCEDURES_IFRETURN_WARNING),
@@ -211,7 +203,8 @@ a&&!a.height&&!a.width?this.updateDisplay_():!this.getFieldValue("function_name"
211
203
  Blockly.PXTBlockly.FunctionUtils.ensureIds_=function(){switch(this.type){case Blockly.FUNCTION_DEFINITION_BLOCK_TYPE:this.functionId_&&"null"!=this.functionId_||(this.functionId_=Blockly.utils.genUid());for(var a=0;a<this.arguments_.length;++a)this.arguments_[a].id||(this.arguments_[a].id=Blockly.utils.genUid());break;case Blockly.FUNCTION_CALL_OUTPUT_BLOCK_TYPE:case Blockly.FUNCTION_CALL_BLOCK_TYPE:if(a=Blockly.Functions.getDefinition(this.name_,this.workspace)){this.functionId_=a.getFunctionId();
212
204
  var b=a.getArguments();for(a=0;a<this.arguments_.length;++a)for(var c=0;c<b.length;++c)if(b[c].name==this.arguments_[a].name){this.arguments_[a].id=b[c].id;break}}}};Blockly.PXTBlockly.FunctionUtils.getName=function(){return this.name_};Blockly.PXTBlockly.FunctionUtils.getFunctionId=function(){return this.functionId_};Blockly.PXTBlockly.FunctionUtils.getArguments=function(){return this.arguments_};
213
205
  Blockly.PXTBlockly.FunctionUtils.setStatements_=function(a){this.hasStatements_!==a&&(a?this.appendStatementInput("STACK"):this.removeInput("STACK",!0),this.hasStatements_=a)};Blockly.PXTBlockly.FunctionUtils.updateDisplay_=function(){var a=this.rendered;this.rendered=!1;var b=this.disconnectOldBlocks_();this.removeValueInputs_();this.createAllInputs_(b);this.deleteShadows_(b);(this.rendered=a)&&!this.isInsertionMarker()&&this.initSvg&&(this.initSvg(),this.render())};
214
- Blockly.PXTBlockly.FunctionUtils.disconnectOldBlocks_=function(){for(var a={},b=0,c;c=this.inputList[b];b++)if("STACK"!==c.name&&c.connection){var d=c.connection.targetBlock(),e={shadow:c.connection.getShadowDom(),block:d};a[c.name]=e;c.connection.setShadowDom(null);d&&c.connection.disconnect()}return a};Blockly.PXTBlockly.FunctionUtils.removeValueInputs_=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)c.type==Blockly.INPUT_VALUE?c.dispose():a.push(c);this.inputList=a};
206
+ Blockly.PXTBlockly.FunctionUtils.disconnectOldBlocks_=function(){for(var a={},b=0,c;c=this.inputList[b];b++)if("STACK"!==c.name&&c.connection){var d=c.connection.targetBlock();d={shadow:c.connection.getShadowDom(),block:d};a[c.name]=d;c.connection.setShadowDom(null,!0);c.connection.targetConnection&&c.connection.disconnect()}return a};
207
+ Blockly.PXTBlockly.FunctionUtils.removeValueInputs_=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)c.type==Blockly.INPUT_VALUE?c.dispose():a.push(c);this.inputList=a};
215
208
  Blockly.PXTBlockly.FunctionUtils.createAllInputs_=function(a){var b=!1,c=!1,d=!1;this.inputList.forEach(function(a){"function_title"==a.name?b=!0:"function_name"==a.name?c=!0:"function_collapse"==a.name&&(d=!0)});if(!b){var e="";switch(this.type){case Blockly.FUNCTION_CALL_OUTPUT_BLOCK_TYPE:case Blockly.FUNCTION_CALL_BLOCK_TYPE:e=Blockly.Msg.FUNCTIONS_CALL_TITLE;break;case Blockly.FUNCTION_DEFINITION_BLOCK_TYPE:case Blockly.FUNCTION_DECLARATION_BLOCK_TYPE:e=Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE}this.appendDummyInput("function_title").appendField(e,
216
209
  "function_title")}c?this.updateFunctionLabel_(this.getName()):this.addFunctionLabel_(this.getName());var f=this;this.arguments_.forEach(function(b){var c=f.appendValueInput(b.id);Blockly.Functions.isCustomType(b.type)?c.setCheck(b.type):c.setCheck(b.type.charAt(0).toUpperCase()+b.type.slice(1));f.isInsertionMarker()||f.populateArgument_(b,a,c)});d&&this.moveInputBefore("function_collapse",null);this.hasStatements_&&this.moveInputBefore("STACK",null)};
217
210
  Blockly.PXTBlockly.FunctionUtils.deleteShadows_=function(a){if(a)for(var b in a){var c=a[b];c&&(c=c.block)&&c.isShadow()&&(c.dispose(),delete a[b])}};Blockly.PXTBlockly.FunctionUtils.updateLabelEditor_=function(a){Blockly.Events.disable();this.getField("function_name").setValue(a);Blockly.Events.enable()};Blockly.PXTBlockly.FunctionUtils.updateLabelField_=function(a){this.getField("function_name").setValue(a)};
@@ -221,7 +214,7 @@ Blockly.PXTBlockly.FunctionUtils.getShadowBlockInfoFromType_=function(a,b){switc
221
214
  Blockly.PXTBlockly.FunctionUtils.attachShadow_=function(a,b){var c=Blockly.PXTBlockly.FunctionUtils.getShadowBlockInfoFromType_(b,this.workspace);b=c[0];var d=c[1];c=c[2];Blockly.Events.disable();var e=null;try{e=this.workspace.newBlock(b),e.setFieldValue(c,d),e.setShadow(!0),!this.isInsertionMarker()&&e.initSvg&&(e.initSvg(),e.render(!1))}finally{Blockly.Events.enable()}e&&e.outputConnection.connect(a.connection)};
222
215
  Blockly.PXTBlockly.FunctionUtils.createArgumentReporter_=function(a){switch(a.type){case "boolean":var b="argument_reporter_boolean";break;case "number":b="argument_reporter_number";break;case "string":b="argument_reporter_string";break;case "Array":b="argument_reporter_array";break;default:b="argument_reporter_custom"}Blockly.Events.disable();try{var c="argument_reporter_custom"==b?Blockly.PXTBlockly.FunctionUtils.createCustomArgumentReporter(a.type,this.workspace):this.workspace.newBlock(b);c.setShadow(!0);
223
216
  c.setFieldValue(a.name,"VALUE");!this.isInsertionMarker()&&c.initSvg&&(c.initSvg(),c.render(!1))}finally{Blockly.Events.enable()}return c};Blockly.PXTBlockly.FunctionUtils.createCollapseIcon_=function(){var a=this;if(a.workspace&&a.workspace.getRenderer){var b=a.workspace.getRenderer().getConstants().COLLAPSE_IMAGE_DATAURI;b&&a.appendDummyInput("function_collapse").appendField(new Blockly.FieldImage(b,24,24,"",function(){a.setCollapsed(!0)},!1))}};
224
- Blockly.PXTBlockly.FunctionUtils.populateArgumentOnCaller_=function(a,b,c){var d=null,e=null;b&&a.id in b&&(e=b[a.id],d=e.block,e=e.shadow);b&&d?(b[c.name]=null,d.outputConnection.connect(c.connection),a=e||this.buildShadowDom_(a.type),c.connection.setShadowDom(a)):this.attachShadow_(c,a.type)};
217
+ Blockly.PXTBlockly.FunctionUtils.populateArgumentOnCaller_=function(a,b,c){var d=null,e=null;b&&a.id in b&&(e=b[a.id],d=e.block,e=e.shadow);b&&d&&d.outputConnection.canConnectWithReason(c.connection)===Blockly.Connection.CAN_CONNECT?(b[c.name]=null,d.outputConnection.connect(c.connection),a=e||this.buildShadowDom_(a.type),c.connection.setShadowDom(a)):(this.attachShadow_(c,a.type),d&&d.isShadow_&&d.setShadow(!1))};
225
218
  Blockly.PXTBlockly.FunctionUtils.populateArgumentOnDefinition_=function(a,b,c){var d=null;b&&a.id in b&&(d=b[a.id].block);b&&d?(d.setFieldValue(a.name,"VALUE"),b[c.name]=null):d=this.createArgumentReporter_(a);c.connection.connect(d.outputConnection)};Blockly.PXTBlockly.FunctionUtils.populateArgumentOnDeclaration_=function(a,b,c){a=this.createArgumentEditor_(a.type,a.name);c.connection.connect(a.outputConnection)};
226
219
  Blockly.PXTBlockly.FunctionUtils.createArgumentEditor_=function(a,b){Blockly.Events.disable();try{var c="";switch(a){case "boolean":c="argument_editor_boolean";break;case "number":c="argument_editor_number";break;case "string":c="argument_editor_string";break;case "Array":c="argument_editor_array";break;default:c="argument_editor_custom"}var d="argument_editor_custom"==c?Blockly.PXTBlockly.FunctionUtils.createCustomArgumentEditor(a,this.workspace):this.workspace.newBlock(c);d.setFieldValue(b,"TEXT");
227
220
  d.setShadow(!0);!this.isInsertionMarker()&&d.initSvg&&(d.initSvg(),d.render(!1))}finally{Blockly.Events.enable()}return d};
@@ -305,26 +298,15 @@ c.setAttribute("name","VAR");c.appendChild(Blockly.utils.xml.createTextNode(e));
305
298
  e),enabled:!this.inDebugWorkspace(),callback:Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this)},a.unshift(b),a.unshift(d)}};
306
299
  Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_REPORTER_MIXIN={customContextMenu:function(a){if(!this.isCollapsed()){var b={text:Blockly.Msg.RENAME_VARIABLE,enabled:!this.inDebugWorkspace(),callback:Blockly.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this)};a.unshift(b);if(!this.isInFlyout){b=this.workspace.getVariablesOfType("");0<b.length&&a.unshift({separator:!0});for(var c=b.length-1;0<=c;c--){var d={enabled:!this.inDebugWorkspace()};d.text=b[c].name;d.callback=Blockly.Constants.Variables.VARIABLE_OPTION_CALLBACK_FACTORY(this,
307
300
  d.text,b[c].getId());a.unshift(d)}}}}};Blockly.Constants.Variables.VARIABLE_OPTION_CALLBACK_FACTORY=function(a,b,c){return function(){var b=a.getField("VAR");b||console.log("Tried to get a variable field on the wrong type of block.");b.setValue(c)}};Blockly.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY=function(a){return function(){var b=a.workspace,c=a.getField("VAR").getVariable();Blockly.Variables.renameVariable(b,c)}};
308
- Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY=function(a){return function(){var b=a.workspace,c=a.getField("VAR").getVariable();b.deleteVariableById(c.getId());b.refreshToolboxSelection()}};Blockly.Extensions.registerMixin("contextMenu_variableSetterGetter",Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN);Blockly.Extensions.registerMixin("contextMenu_variableReporter",Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_REPORTER_MIXIN);/*
309
-
310
- Copyright 2017 Google LLC
311
-
312
- Licensed under the Apache License, Version 2.0 (the "License");
313
- you may not use this file except in compliance with the License.
314
- You may obtain a copy of the License at
315
-
316
- http://www.apache.org/licenses/LICENSE-2.0
317
-
318
- Unless required by applicable law or agreed to in writing, software
319
- distributed under the License is distributed on an "AS IS" BASIS,
320
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
321
- See the License for the specific language governing permissions and
322
- limitations under the License.
323
- */
324
- Blockly.Constants.VariablesDynamic={};Blockly.Constants.VariablesDynamic.HUE=310;
301
+ Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY=function(a){return function(){var b=a.workspace,c=a.getField("VAR").getVariable();b.deleteVariableById(c.getId());b.refreshToolboxSelection()}};Blockly.Extensions.registerMixin("contextMenu_variableSetterGetter",Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN);Blockly.Extensions.registerMixin("contextMenu_variableReporter",Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_REPORTER_MIXIN);Blockly.Constants.VariablesDynamic={};Blockly.Constants.VariablesDynamic.HUE=310;
325
302
  Blockly.defineBlocksWithJsonArray([{type:"variables_get_dynamic",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,style:"variable_dynamic_blocks",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableDynamicSetterGetter"]},{type:"variables_set_dynamic",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",
326
303
  name:"VALUE"}],previousStatement:null,nextStatement:null,style:"variable_dynamic_blocks",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableDynamicSetterGetter"]}]);
327
304
  Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN={customContextMenu:function(a){if(this.inDebugWorkspace())if(!this.isInFlyout){var b=this.getFieldValue("VAR");var c=this.workspace.getVariableById(b).type;if("variables_get_dynamic"==this.type){b="variables_set_dynamic";var d=Blockly.Msg.VARIABLES_GET_CREATE_SET}else b="variables_get_dynamic",d=Blockly.Msg.VARIABLES_SET_CREATE_GET;var e={enabled:0<this.workspace.remainingCapacity()},f=this.getField("VAR").getText();
328
305
  e.text=d.replace("%1",f);d=Blockly.utils.xml.createElement("field");d.setAttribute("name","VAR");d.setAttribute("variabletype",c);d.appendChild(Blockly.utils.xml.createTextNode(f));f=Blockly.utils.xml.createElement("block");f.setAttribute("type",b);f.appendChild(d);e.callback=Blockly.ContextMenu.callbackFactory(this,f);a.push(e)}else if("variables_get_dynamic"==this.type||"variables_get_reporter_dynamic"==this.type)b={text:Blockly.Msg.RENAME_VARIABLE,enabled:!this.inDebugWorkspace(),callback:Blockly.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this)},
329
306
  f=this.getField("VAR").getText(),e={text:Blockly.Msg.DELETE_VARIABLE.replace("%1",f),enabled:!this.inDebugWorkspace(),callback:Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this)},a.unshift(b),a.unshift(e)},onchange:function(a){a=this.getFieldValue("VAR");a=Blockly.Variables.getVariable(this.workspace,a);"variables_get_dynamic"==this.type?this.outputConnection.setCheck(a.type):this.getInput("VALUE").connection.setCheck(a.type)}};
330
307
  Blockly.Constants.VariablesDynamic.RENAME_OPTION_CALLBACK_FACTORY=function(a){return function(){var b=a.workspace,c=a.getField("VAR").getVariable();Blockly.Variables.renameVariable(b,c)}};Blockly.Constants.VariablesDynamic.DELETE_OPTION_CALLBACK_FACTORY=function(a){return function(){var b=a.workspace,c=a.getField("VAR").getVariable();b.deleteVariableById(c.getId());b.refreshToolboxSelection()}};Blockly.Extensions.registerMixin("contextMenu_variableDynamicSetterGetter",Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN);
308
+ return Blockly.Blocks;
309
+ }));
310
+
311
+
312
+ //# sourceMappingURL=blocks_compressed.js.map
@@ -63,6 +63,8 @@ Blockly.Msg["DELETE_BLOCK"] = "Delete Block";
63
63
  Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable";
64
64
  Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?";
65
65
  Blockly.Msg["DELETE_X_BLOCKS"] = "Delete %1 Blocks";
66
+ Blockly.Msg["DIALOG_CANCEL"] = "Cancel";
67
+ Blockly.Msg["DIALOG_OK"] = "OK";
66
68
  Blockly.Msg["DISABLE_BLOCK"] = "Disable Block";
67
69
  Blockly.Msg["DUPLICATE_BLOCK"] = "Duplicate";
68
70
  Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment";
@@ -71,6 +73,8 @@ Blockly.Msg["EXPAND_ALL"] = "Expand Blocks";
71
73
  Blockly.Msg["EXPAND_BLOCK"] = "Expand Block";
72
74
  Blockly.Msg["EXTERNAL_INPUTS"] = "External Inputs";
73
75
  Blockly.Msg["FUNCTIONS_CALL_TITLE"] = "call";
76
+ Blockly.Msg["FUNCTIONS_CREATE_CALL_OPTION"] = "Create 'call %1'";
77
+ Blockly.Msg["FUNCTIONS_DEFAULT_ARRAY_ARG_NAME"] = "list";
74
78
  Blockly.Msg["FUNCTIONS_DEFAULT_BOOLEAN_ARG_NAME"] = "bool";
75
79
  Blockly.Msg["FUNCTIONS_DEFAULT_CUSTOM_ARG_NAME"] = "arg";
76
80
  Blockly.Msg["FUNCTIONS_DEFAULT_FUNCTION_NAME"] = "do_something";
@@ -85,19 +89,6 @@ Blockly.Msg["FUNCTION_WARNING_DUPLICATE_ARG"] = "Functions cannot use the same a
85
89
  Blockly.Msg["FUNCTION_WARNING_EMPTY_NAME"] = "Function and argument names cannot be empty.";
86
90
  Blockly.Msg["HELP"] = "Help";
87
91
  Blockly.Msg["INLINE_INPUTS"] = "Inline Inputs";
88
- Blockly.Msg["IOS_CANCEL"] = "Cancel";
89
- Blockly.Msg["IOS_ERROR"] = "Error";
90
- Blockly.Msg["IOS_OK"] = "OK";
91
- Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Add Input";
92
- Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Allow statements";
93
- Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "This function has duplicate inputs.";
94
- Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "INPUTS";
95
- Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Add";
96
- Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+ Add Variable";
97
- Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Delete";
98
- Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "You can't use an empty variable name.";
99
- Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Rename";
100
- Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Variable name";
101
92
  Blockly.Msg["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
102
93
  Blockly.Msg["LISTS_CREATE_EMPTY_TITLE"] = "create empty list";
103
94
  Blockly.Msg["LISTS_CREATE_EMPTY_TOOLTIP"] = "Returns a list, of length 0, containing no data records";
@@ -435,13 +426,13 @@ Blockly.Msg["PROCEDURES_DEFRETURN_TITLE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_
435
426
  Blockly.Msg["TEXT_APPEND_VARIABLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
436
427
  Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
437
428
 
438
- Blockly.Msg["MATH_HUE"] = "230";
429
+ Blockly.Msg["LOGIC_HUE"] = "210";
439
430
  Blockly.Msg["LOOPS_HUE"] = "120";
431
+ Blockly.Msg["MATH_HUE"] = "230";
432
+ Blockly.Msg["TEXTS_HUE"] = "160";
440
433
  Blockly.Msg["LISTS_HUE"] = "260";
441
- Blockly.Msg["LOGIC_HUE"] = "210";
434
+ Blockly.Msg["COLOUR_HUE"] = "20";
442
435
  Blockly.Msg["VARIABLES_HUE"] = "330";
443
436
  Blockly.Msg["VARIABLES_DYNAMIC_HUE"] = "310";
444
- Blockly.Msg["TEXTS_HUE"] = "160";
445
437
  Blockly.Msg["PROCEDURES_HUE"] = "290";
446
- Blockly.Msg["COLOUR_HUE"] = "20";
447
438
  Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "item";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "@metadata": {
3
3
  "author": "Ellen Spertus <ellen.spertus@gmail.com>",
4
- "lastupdated": "2020-04-06 17:27:59.022688",
4
+ "lastupdated": "2021-10-29 15:38:07.999934",
5
5
  "locale": "en",
6
6
  "messagedocumentation" : "qqq"
7
7
  },
@@ -89,19 +89,6 @@
89
89
  "CONTROLS_IF_IF_TOOLTIP": "Add, remove, or reorder sections to reconfigure this if block.",
90
90
  "CONTROLS_IF_ELSEIF_TOOLTIP": "Add a condition to the if block.",
91
91
  "CONTROLS_IF_ELSE_TOOLTIP": "Add a final, catch-all condition to the if block.",
92
- "IOS_OK": "OK",
93
- "IOS_CANCEL": "Cancel",
94
- "IOS_ERROR": "Error",
95
- "IOS_PROCEDURES_INPUTS": "INPUTS",
96
- "IOS_PROCEDURES_ADD_INPUT": "+ Add Input",
97
- "IOS_PROCEDURES_ALLOW_STATEMENTS": "Allow statements",
98
- "IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR": "This function has duplicate inputs.",
99
- "IOS_VARIABLES_ADD_VARIABLE": "+ Add Variable",
100
- "IOS_VARIABLES_ADD_BUTTON": "Add",
101
- "IOS_VARIABLES_RENAME_BUTTON": "Rename",
102
- "IOS_VARIABLES_DELETE_BUTTON": "Delete",
103
- "IOS_VARIABLES_VARIABLE_NAME": "Variable name",
104
- "IOS_VARIABLES_EMPTY_NAME_ERROR": "You can't use an empty variable name.",
105
92
  "LOGIC_COMPARE_HELPURL": "https://en.wikipedia.org/wiki/Inequality_(mathematics)",
106
93
  "LOGIC_COMPARE_TOOLTIP_EQ": "Return true if both inputs equal each other.",
107
94
  "LOGIC_COMPARE_TOOLTIP_NEQ": "Return true if both inputs are not equal to each other.",
@@ -402,6 +389,7 @@
402
389
  "PROCEDURES_IFRETURN_HELPURL": "http://c2.com/cgi/wiki?GuardClause",
403
390
  "PROCEDURES_IFRETURN_WARNING": "Warning: This block may be used only within a function definition.",
404
391
  "FUNCTIONS_EDIT_OPTION": "Edit",
392
+ "FUNCTIONS_CREATE_CALL_OPTION": "Create 'call %1'",
405
393
  "FUNCTIONS_GO_TO_DEFINITION_OPTION": "Go to definition",
406
394
  "FUNCTIONS_CALL_TITLE": "call",
407
395
  "FUNCTION_CREATE_NEW": "Create a Function",
@@ -413,8 +401,11 @@
413
401
  "FUNCTIONS_DEFAULT_BOOLEAN_ARG_NAME": "bool",
414
402
  "FUNCTIONS_DEFAULT_STRING_ARG_NAME": "text",
415
403
  "FUNCTIONS_DEFAULT_NUMBER_ARG_NAME": "num",
404
+ "FUNCTIONS_DEFAULT_ARRAY_ARG_NAME": "list",
416
405
  "FUNCTIONS_DEFAULT_CUSTOM_ARG_NAME": "arg",
417
406
  "WORKSPACE_COMMENT_DEFAULT_TEXT": "Say something...",
418
407
  "WORKSPACE_ARIA_LABEL": "Blockly Workspace",
419
- "COLLAPSED_WARNINGS_WARNING": "Collapsed blocks contain warnings."
408
+ "COLLAPSED_WARNINGS_WARNING": "Collapsed blocks contain warnings.",
409
+ "DIALOG_OK": "OK",
410
+ "DIALOG_CANCEL": "Cancel"
420
411
  }
@@ -7,7 +7,7 @@
7
7
  <link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css">
8
8
  <link rel="stylesheet" href="/blb/icons.css">
9
9
  <link rel="stylesheet" href="/blb/react-common.css">
10
- <link href="/blb/skillmap/css/main.ad6de34e.chunk.css" rel="stylesheet"></head>
10
+ <link href="/blb/skillmap/css/main.96b1b3f1.chunk.css" rel="stylesheet"></head>
11
11
  <body>
12
12
  <noscript>You need to enable JavaScript to run this app.</noscript>
13
13
 
@@ -28,5 +28,5 @@
28
28
  <!-- end usabilla live embed code -->
29
29
 
30
30
  <!-- @include thin-footer.html -->
31
- <script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this.webpackJsonpskillsmap=this.webpackJsonpskillsmap||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/blb/skillmap/js/2.c64f6be2.chunk.js"></script><script src="/blb/skillmap/js/main.0fff4916.chunk.js"></script></body>
31
+ <script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this.webpackJsonpskillsmap=this.webpackJsonpskillsmap||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/blb/skillmap/js/2.7dd06a3a.chunk.js"></script><script src="/blb/skillmap/js/main.bdd63c80.chunk.js"></script></body>
32
32
  </html>
@@ -1 +0,0 @@
1
- .dropdown:focus{outline:none;background-color:rgba(0,0,0,.2)}.header-dropdown{position:relative}.dropdown-menu{position:absolute;background-color:var(--body-background-color);z-index:var(--above-frame-zindex);border:1px solid var(--dropdown-hover-color);border-top:0;right:0}.dropdown-item{width:10rem;padding:.5rem .75rem;color:var(--black);font-size:1rem;font-weight:400;cursor:pointer}.dropdown-item:hover{background-color:var(--dropdown-hover-color)}.makecode-frame,.makecode-frame-outer{width:100%;height:100%}.makecode-frame-outer{overflow:hidden;position:relative}.makecode-frame-loader{position:absolute;width:100%;height:100%;background-color:var(--body-background-color);z-index:var(--frame-loader-zindex);text-align:center;display:flex;align-items:center;flex-direction:column;justify-content:center}.makecode-frame-loader.hidden{display:none}.makecode-frame-loader img{max-width:200px;vertical-align:middle;-webkit-animation:loader-pxt 2s linear infinite;animation:loader-pxt 2s linear infinite}.makecode-frame-loader-bar{border:1px solid var(--black);width:10rem;height:1.5rem;margin-bottom:1rem}.makecode-frame-loader-fill{background-color:var(--primary-color);height:100%;width:1rem;transition:width .5s ease-out}@-webkit-keyframes loader-pxt{0%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(0deg);transform:perspective(160px) rotateX(0deg) rotateY(0deg)}15%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(-5deg);transform:perspective(160px) rotateX(0deg) rotateY(-5deg)}50%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(5deg);transform:perspective(160px) rotateX(0deg) rotateY(5deg)}to{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(0deg);transform:perspective(160px) rotateX(0deg) rotateY(0deg)}}@keyframes loader-pxt{0%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(0deg);transform:perspective(160px) rotateX(0deg) rotateY(0deg)}15%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(-5deg);transform:perspective(160px) rotateX(0deg) rotateY(-5deg)}50%{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(5deg);transform:perspective(160px) rotateX(0deg) rotateY(5deg)}to{-webkit-transform:perspective(160px) rotateX(0deg) rotateY(0deg);transform:perspective(160px) rotateX(0deg) rotateY(0deg)}}.modal-overlay{position:fixed;display:flex;align-items:center;justify-content:center;top:0;left:0;right:0;bottom:0;background-color:var(--modal-overlay-color);z-index:var(--modal-dimmer-zindex)}.modal-overlay.fullscreen{z-index:var(--fullscreen-modal-zindex)}.modal{background-color:var(--body-background-color);width:50%;max-width:40rem;border-radius:.285rem}.fullscreen>.modal{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;max-width:none;padding:0;border-radius:0}.modal-header{display:flex;font-size:1.2rem;font-weight:600;padding:1.25rem 1.5rem;border-bottom:1px solid rgba(34,36,38,.15);flex-shrink:0}.fullscreen>.modal>.modal-header{background-color:var(--primary-color);color:#fff;padding:1rem;margin-bottom:0}.modal-header i.icon{font-size:1.2rem;line-height:1.2rem;margin:0;cursor:pointer}.modal-body{min-height:4rem;padding:1.25rem 1.5rem}.fullscreen>.modal>.modal-header .modal-title{flex-grow:1;display:flex;justify-content:center;align-items:center}.fullscreen>.modal{display:flex;flex-direction:column}.fullscreen>.modal>.modal-body{flex-grow:1;background-color:var(--body-background-color);padding:1rem;max-height:unset}.modal-actions{display:grid;grid-template-columns:1fr 1fr;grid-gap:1rem;gap:1rem;padding:0 1.5rem 1.25rem}.modal-actions div:only-child{grid-column:auto/span 2}.modal-header .button{cursor:pointer}.modal-header .button:hover{-webkit-transform:scale(1.2);transform:scale(1.2);background-color:rgba(0,0,0,.1)}.modal-header .icon{padding-right:2rem}.modal-close-icon{position:relative}.modal-close-icon i.icon.close.remove.circle{position:absolute;font-size:2.15rem;line-height:2.15rem;height:2.15rem;width:2.15rem;right:0;top:-.25rem}.modal-button{border:1px solid var(--active-color);color:var(--active-color);padding:.5rem;text-align:center;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;text-transform:uppercase}.completion-reward.inverted.modal-button:hover,.modal-button:hover{background-color:var(--hover-color);color:var(--active-color);text-decoration:none}.modal-button.disabled{background-color:var(--inactive-color);color:var(--inactive-hover-color);border:1px solid var(--inactive-hover-color);cursor:auto}.modal .checkbox{-webkit-user-select:none;-ms-user-select:none;user-select:none}.share-disclaimer{box-shadow:inset 0 0 0 1px #a9d5de,0 0 0 0 transparent;background-color:#f8ffff;color:#276f86;padding:1rem;border-radius:.25rem;margin:1rem 0 1.5rem}.share-loader{display:flex;justify-content:center;align-items:center;margin-bottom:1.5rem}.share-loader .ui.loader{margin-right:.15rem}.share-loader .ui.loader,.share-loader .ui.loader:after,.share-loader .ui.loader:before{height:1.2rem;width:1.2rem}.share-input{display:flex;margin:1rem 0}.share-input input{flex:1 1;padding:0 .5rem;font:var(--body-font-family);outline:none;border:1px solid var(--inactive-color);border-right-width:0}.share-copy{padding:.5rem 1.5rem;background-color:var(--primary-color);color:var(--white);cursor:pointer}.delete .checkbox{padding-top:1rem}.sign-in .container{display:flex;align-items:center}.sign-in .container a{padding-left:.5rem}.sign-in .remember{-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;margin-top:1rem;display:flex;justify-content:center;padding-bottom:.5rem}.sign-in .modal-actions{grid-template-columns:1fr;margin-top:.5rem}.modal .icon.cloud-user{width:7rem;margin-right:2rem}.profiledialog .ui.card{margin:0 14px 14px 0;border-radius:0;color:#000;border:1px solid #000!important;background-color:#fff}.profiledialog button{margin:0}.profiledialog label.title{font-weight:700}.profiledialog p.value{white-space:nowrap}.profiledialog p.description,.profiledialog p.value{text-overflow:ellipsis;overflow:hidden}.profiledialog div.header-text{font-size:20px;white-space:nowrap;grid-row-start:1;grid-row-end:1;grid-column-start:1;grid-column-end:2;justify-self:start}.profiledialog div.profile-pic{grid-row-start:1;grid-row-end:1;grid-column-start:2;grid-column-end:2;justify-self:end}.profiledialog .ui.card.panel{width:-webkit-fit-content;width:fit-content;min-width:350px;max-width:500px;padding:14px;display:inline-grid;grid-row-gap:20px;row-gap:20px;grid-template-rows:auto;grid-template-columns:auto}.profiledialog .ui.card.panel div.row{grid-column-end:2}.profiledialog .ui.card.panel div.row,.profiledialog .ui.card.panel div.row-span-two{grid-row-start:auto;grid-row-end:auto;grid-column-start:1;justify-self:start;max-width:100%}.profiledialog .ui.card.panel div.row-span-two{grid-column-end:3}.completion-reward{display:flex;align-items:center;justify-content:center;padding:.5rem;margin:1rem 0;color:var(--white);background-color:var(--primary-color);border-radius:2rem;font-size:1.2rem;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;border:none;width:100%;font-family:var(--body-font-family);flex-grow:1}.completion-reward.inverted{color:var(--primary-color);background-color:var(--white);border:1px solid var(--primary-color)}.completion-reward i{margin-right:.5rem;font-size:2rem;line-height:2rem}.modal-button.completion-reward i{font-size:1.5rem;line-height:1.5rem;margin-left:.5rem;margin-right:0}.confetti-container{position:absolute;width:100%;height:100%;overflow:hidden;z-index:100}.confetti{width:10px;height:10px;background-color:#249ca3;position:absolute;left:50%;top:-15px;-webkit-animation:confetti 2.5s linear -2s infinite;animation:confetti 2.5s linear -2s infinite;-webkit-transform-origin:left top;transform-origin:left top;z-index:110}.confetti.reverse{-webkit-animation:confetti-reverse 2.5s linear -2s infinite;animation:confetti-reverse 2.5s linear -2s infinite}.color-0{background-color:#ff2121}.color-1{background-color:#ff93c4}.color-2{background-color:#ff8135}.color-3{background-color:#fff609}.color-4{background-color:#249ca3}.color-5{background-color:#78dc52}.color-6{background-color:#003fad}.color-7{background-color:#87f2ff}.color-8{background-color:#8e2ec4}@-webkit-keyframes confetti{0%{-webkit-transform:rotate(15deg) rotateY(0deg) translate(0);transform:rotate(15deg) rotateY(0deg) translate(0)}25%{-webkit-transform:rotate(5deg) rotateY(1turn) translate(-1vw,20vh);transform:rotate(5deg) rotateY(1turn) translate(-1vw,20vh)}50%{-webkit-transform:rotate(15deg) rotateY(2turn) translate(1vw,50vh);transform:rotate(15deg) rotateY(2turn) translate(1vw,50vh)}75%{-webkit-transform:rotate(5deg) rotateY(3turn) translate(-1vw,80vh);transform:rotate(5deg) rotateY(3turn) translate(-1vw,80vh)}to{-webkit-transform:rotate(15deg) rotateY(4turn) translate(1vw,110vh);transform:rotate(15deg) rotateY(4turn) translate(1vw,110vh)}}@keyframes confetti{0%{-webkit-transform:rotate(15deg) rotateY(0deg) translate(0);transform:rotate(15deg) rotateY(0deg) translate(0)}25%{-webkit-transform:rotate(5deg) rotateY(1turn) translate(-1vw,20vh);transform:rotate(5deg) rotateY(1turn) translate(-1vw,20vh)}50%{-webkit-transform:rotate(15deg) rotateY(2turn) translate(1vw,50vh);transform:rotate(15deg) rotateY(2turn) translate(1vw,50vh)}75%{-webkit-transform:rotate(5deg) rotateY(3turn) translate(-1vw,80vh);transform:rotate(5deg) rotateY(3turn) translate(-1vw,80vh)}to{-webkit-transform:rotate(15deg) rotateY(4turn) translate(1vw,110vh);transform:rotate(15deg) rotateY(4turn) translate(1vw,110vh)}}@-webkit-keyframes confetti-reverse{0%{-webkit-transform:rotate(5deg) rotateY(0deg) translate(0);transform:rotate(5deg) rotateY(0deg) translate(0)}25%{-webkit-transform:rotate(15deg) rotateY(1turn) translate(1vw,20vh);transform:rotate(15deg) rotateY(1turn) translate(1vw,20vh)}50%{-webkit-transform:rotate(5deg) rotateY(2turn) translate(-1vw,50vh);transform:rotate(5deg) rotateY(2turn) translate(-1vw,50vh)}75%{-webkit-transform:rotate(15deg) rotateY(3turn) translate(1vw,80vh);transform:rotate(15deg) rotateY(3turn) translate(1vw,80vh)}to{-webkit-transform:rotate(5deg) rotateY(4turn) translate(-1vw,110vh);transform:rotate(5deg) rotateY(4turn) translate(-1vw,110vh)}}@keyframes confetti-reverse{0%{-webkit-transform:rotate(5deg) rotateY(0deg) translate(0);transform:rotate(5deg) rotateY(0deg) translate(0)}25%{-webkit-transform:rotate(15deg) rotateY(1turn) translate(1vw,20vh);transform:rotate(15deg) rotateY(1turn) translate(1vw,20vh)}50%{-webkit-transform:rotate(5deg) rotateY(2turn) translate(-1vw,50vh);transform:rotate(5deg) rotateY(2turn) translate(-1vw,50vh)}75%{-webkit-transform:rotate(15deg) rotateY(3turn) translate(1vw,80vh);transform:rotate(15deg) rotateY(3turn) translate(1vw,80vh)}to{-webkit-transform:rotate(5deg) rotateY(4turn) translate(-1vw,110vh);transform:rotate(5deg) rotateY(4turn) translate(-1vw,110vh)}}.selected .highlight{stroke-width:4px;fill:transparent}.graph-icon{font-family:Icons}.graph-icon,.graph-icon-x{font-size:1.75rem;opacity:.8}.graph-icon-x{font-family:xicon}.graph-activity.hover .graph-icon,.graph-activity.hover .graph-icon-x{opacity:1}.graph-status-icon{font-family:Icons;font-size:1rem}.graph-activity{cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.skill-graph-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1 1}.skill-graph-content{position:relative;display:flex;flex-direction:column;width:90%;z-index:var(--above-graph-zindex)}.skill-graph-activities{z-index:var(--graph-backround-zindex);-webkit-user-select:none;-ms-user-select:none;user-select:none}.has-background .skill-graph-activities{position:absolute;width:100%;height:100%}.skill-graph-content:not(.has-background) .skill-graph-background{position:absolute}.skill-graph-activities svg,.skill-graph-background img{object-fit:contain;width:100%;max-height:100%}.info-panel{display:flex;flex-direction:column;align-items:stretch;width:20rem;margin:1rem;z-index:var(--above-graph-zindex);background-color:var(--body-background-color)}.info-panel>.info-panel-image{width:100%;height:12rem;display:flex;justify-content:center;align-items:center;overflow:hidden;text-align:center;background-color:var(--primary-color);border:1px solid #000}.info-panel-image img{width:100%}.info-panel-image i{color:var(--white);font-size:5rem;line-height:5rem;vertical-align:top}.info-panel-content{padding:1rem;flex-grow:100;border:1px solid #000;overflow-y:auto}.info-panel-content>div{flex-shrink:0;margin-bottom:.5rem}.info-panel-content>.info-panel-tags,.info-panel-content>.tablet-spacer{margin:0}.info-panel-content>.info-panel-label,.info-panel-content>.info-panel-link,.info-panel-content>.info-panel-title{margin-bottom:1rem}.info-panel-title{font-size:1.2rem;font-weight:700;text-align:center;overflow:hidden;text-overflow:ellipsis}.info-panel-subtitle{font-size:.8rem}.info-panel-label,.info-panel-subtitle{text-align:center;text-transform:uppercase}.info-panel-label{padding:.5rem;background-color:var(--inactive-color)}.info-panel-link{display:block;width:100%;text-align:center}.info-panel-detail{display:flex;font-size:.8rem;text-transform:uppercase;justify-content:space-between}.info-panel-tags{display:flex;flex-wrap:wrap}.info-panel-tags>div{color:var(--active-color);border:1px solid var(--active-color);padding:.2rem .5rem;font-size:.8rem;margin:0 .5rem .5rem 0;white-space:nowrap;-webkit-user-select:none;-ms-user-select:none;user-select:none}.info-panel .action-button{color:var(--active-color);border:1px solid var(--active-color);padding:.5rem;margin-bottom:.5rem;font-size:1.2rem;text-align:center;cursor:pointer;flex:1 1;-webkit-user-select:none;-ms-user-select:none;user-select:none;text-transform:uppercase}.info-panel .action-button:hover{background-color:var(--hover-color)}.locked.action-button,.locked.action-button:hover{color:var(--inactive-color);background-color:transparent;border-color:var(--inactive-color);cursor:default}.cloud-action{margin-top:1rem}.sign-in-button{color:#fff;background-color:#2ea9b0;border-radius:.4rem;padding:.5rem;text-align:center;cursor:pointer}.cloud-indicator{display:flex;color:#2ea9b0}.cloud-indicator>.xicon{margin-right:.5rem}@media only screen and (max-width:991px){.info-panel{flex-direction:row;width:unset;height:18rem}.info-panel>.info-panel-image{height:100%;width:16rem;flex-direction:column}.info-panel-image img{height:100%;width:unset}.info-panel-content{position:relative;display:flex;flex-direction:column;flex:1 1}.info-panel-content>.info-panel-title{margin-bottom:.5rem}.info-panel-content>.info-panel-subtitle{margin:0}.info-panel-content>.info-panel-label{margin:1rem}.info-panel-subtitle,.info-panel-title{text-align:left}.info-panel-label{position:absolute;right:0;top:0;width:12rem;padding:.5rem 1rem}.info-panel-link{text-align:left}.info-panel .actions{display:flex;flex-direction:row;justify-content:space-evenly;margin-bottom:0}.info-panel .actions.grid{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:.5rem;row-gap:.5rem}.info-panel .action-button{flex:0.5 1;margin-right:1rem;margin-bottom:0}.info-panel .action-button:last-child,.info-panel .grid .action-button:nth-child(2){margin-right:0}.sign-in-button{display:none}}@media only screen and (max-width:762px){.info-panel>.info-panel-image{display:none}.info-panel-label{width:unset}}:root{--black:#000;--white:#fff;--primary-color:#aa278f;--secondary-color:#eac6eb;--tertiary-color:#850a6b;--hover-color:var(--secondary-color);--active-color:var(--tertiary-color);--inactive-color:var(--secondary-color);--inactive-hover-color:#6e6e6e;--invert-active-color:#fff;--invert-hover-text-color:#850a6b;--body-background-color:#f9f9f9;--default-card-color:#ccc;--card-hover-color:#bfbfbf;--card-border-color:#e9eef2;--dropdown-hover-color:#ccc;--modal-overlay-color:rgba(0,0,0,0.5);--inverted-text-color:var(--white);--subtitle-text-color:#6e6e6e;--header-height:4rem;--header-padding-top:1rem;--body-font-family:"Share Tech Mono",Monaco,Menlo,"Ubuntu Mono",Consolas,source-code-pro,monospace;--feature-text-font:Segoe UI,Tahoma,Geneva,Verdana;--frame-loader-zindex:30;--above-frame-zindex:50;--modal-dimmer-zindex:100;--fullscreen-modal-zindex:90;--graph-backround-zindex:10;--above-graph-zindex:20}body{position:relative;margin:0;font-family:"Share Tech Mono",Monaco,Menlo,"Ubuntu Mono",Consolas,source-code-pro,monospace;font-family:var(--body-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f9f9f9;background-color:var(--body-background-color);overflow:hidden}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}#root{width:100%}#root,#root.editor{height:100%}#root>div{width:100%;height:100%}.app-container{display:flex;flex-direction:column;height:100%;width:100%}.noclick{pointer-events:none;cursor:default}.header{background-color:#850a6b;background-color:var(--tertiary-color);height:4rem;height:var(--header-height);max-height:4rem;max-height:var(--header-height);display:flex;align-items:center;font-size:2rem;color:#fff;color:var(--inverted-text-color);flex-grow:0;flex-shrink:0;z-index:50;z-index:var(--above-frame-zindex)}.header-left,.header-right{display:flex;align-items:center;height:100%}.header-logo{display:flex}.header .brand{font-size:1.5rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex}.header .brand:before{position:relative;height:1.5rem;border-left:2px solid #fff;content:" "}.ui.item.logo .name{margin-left:1rem;margin-bottom:1px}.header-logo img{height:1.4rem;margin:0 1rem}.user-menu{height:100%}.user-menu .header-button.sign-in{border-radius:6px;background-color:#f9f9f9;background-color:var(--body-background-color);color:#393939;height:80%;margin:.5rem 1rem .5rem .5rem;padding:.6rem;font-family:Segoe UI,Tahoma,Geneva,Verdana;font-family:var(--feature-text-font);font-weight:500;flex-direction:row-reverse;align-items:center}.user-menu .header-dropdown{height:inherit;cursor:pointer;width:3.5rem}.user-menu .avatar,.user-menu .header-dropdown{display:flex;align-items:center;justify-content:center}.user-menu .avatar{height:100%}.user-menu .avatar img{border:2px solid #fff;border-radius:100%;width:2.5rem;height:2.5rem}.header-org-logo{height:2rem;margin-left:1rem}.header-org-logo img{height:100%}.header-org-logo .header-org-logo-small{display:none}.header i.icon{line-height:2rem;cursor:pointer}.header-dropdown i,.header-dropdown img,.header-dropdown span{display:flex;justify-content:center;align-items:center;height:4rem;height:var(--header-height);width:3.5rem;margin:0;font-size:1.6rem}.header-button{color:#fff;color:var(--invert-active-color);height:100%;padding:1rem .5rem;padding:var(--header-padding-top) .5rem;font-size:1.2rem;text-align:center;cursor:pointer;flex:1 1;-webkit-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;font-size:1.6rem}.header-button.with-label{flex-grow:3;display:flex}.header-button.icon-only{font-size:unset;padding:1rem .5rem;padding:var(--header-padding-top) .5rem}.header-button .header-button-label{line-height:2rem;white-space:nowrap;font-size:1rem;margin-right:.4rem}.header-button:hover,.header-dropdown:hover{background-color:rgba(0,0,0,.1)}.header-button:hover>.icon,.header-dropdown:hover>.icon{-webkit-transform:scale(1.2);transform:scale(1.2)}.header-button.sign-in:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.header-button.sign-in:hover>.icon,.header-button.sign-in:hover>span{-webkit-transform:none;transform:none}.header-activity-display-name{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:10;font-size:1.2rem;font-weight:700}.avatar-initials{height:2.5rem;width:2.5rem;border-radius:100%;border:2px solid #fff;background-color:#028b9b;display:flex;align-items:center;justify-content:center;font-size:16px}.header-dropdown.user-dropdown .dropdown-menu{top:4rem;top:var(--header-height)}.banner{background-color:#eac6eb;background-color:var(--secondary-color);display:flex;align-items:center;height:12rem;margin-bottom:.5rem}.banner-card{background-color:#aa278f;background-color:var(--primary-color);min-width:24rem;width:60%;display:flex;color:#fff;color:var(--inverted-text-color)}.banner-card>i{font-size:5rem;line-height:5rem;margin:2rem 1rem;flex-shrink:0}.banner-text{display:flex;flex-direction:column;justify-content:center;padding-right:1rem}.banner-title{font-size:2rem;margin-bottom:.5rem}.banner-info i,.banner-info i:hover{margin-left:.5rem;color:#fff;color:var(--inverted-text-color);font-size:1.2rem;vertical-align:top;text-decoration:none}.skill-map-container{flex-grow:1;display:flex;flex-direction:row;justify-content:center}.skill-map-error{text-align:center;margin-top:2rem;color:red}.report-abuse-text{width:100%;height:7rem;margin:.5rem 0;padding:.5rem}.report-abuse-text::-webkit-input-placeholder{font-style:italic}.report-abuse-text:-ms-input-placeholder{font-style:italic}.report-abuse-text::placeholder{font-style:italic}.badge-modal-image{display:flex;justify-content:center}.badge-modal-image img{height:15rem}.usabilla_live_button_container{top:unset!important;bottom:9rem!important}#msccBanner{display:none}@media only screen and (max-width:991px){.skill-map-container{flex-direction:column}.tablet-spacer{flex-grow:1}.usabilla_live_button_container{bottom:14rem!important}}@media only screen and (max-height:44rem) and (min-width:767px){:root{--header-height:3rem;--header-padding-top:.5rem}.header-button.with-label{flex-grow:1}.user-menu .header-button.sign-in{padding:.2rem .8rem;margin-top:.4rem}}@media only screen and (max-width:767px){.header-org-logo .header-org-logo-large{display:none}.header-org-logo .header-org-logo-small{display:block}.user-menu .header-button.sign-in{padding-left:.6rem}.user-menu .header-button.sign-in .header-button-label{display:none}}body{background:#fdf3e0}.arcade{--primary-color:#e77038;--secondary-color:#ffeb9a;--tertiary-color:#e77038;--hover-color:var(--secondary-color);--active-color:var(--tertiary-color);--inactive-color:#bfbfbf;--invert-active-color:#fff;--invert-hover-text-color:#e77038;--body-background-color:#fdf3e0;--card-hover-color:var(--default-card-color)}.arcade .banner{background:linear-gradient(90deg,#9feffd,#fd99c2)}.arcade .dropdown-menu,.arcade .modal{background-color:var(--white)}.arcade .carousel-arrow{color:var(--primary-color)}