blockly 12.0.0-beta.2 → 12.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/blockly.min.js CHANGED
@@ -46,16 +46,16 @@ register$$module$build$src$core$field_registry,unregister$$module$build$src$core
46
46
  checkHasFunctionPair$$module$build$src$core$extensions,checkHasMutatorProperties$$module$build$src$core$extensions,getMutatorProperties$$module$build$src$core$extensions,mutatorPropertiesMatch$$module$build$src$core$extensions,runAfterPageLoad$$module$build$src$core$extensions,checkDropdownOptionsInTable$$module$build$src$core$extensions,extensionParentTooltip$$module$build$src$core$extensions,isIcon$$module$build$src$core$interfaces$i_icon,isCommentIcon$$module$build$src$core$interfaces$i_comment_icon,
47
47
  disposeUiEffect$$module$build$src$core$block_animations,disposeUiStep$$module$build$src$core$block_animations,connectionUiEffect$$module$build$src$core$block_animations,disconnectUiEffect$$module$build$src$core$block_animations,disconnectUiStep$$module$build$src$core$block_animations,disconnectUiStop$$module$build$src$core$block_animations,moveBlockToNotConflict$$module$build$src$core$clipboard$block_paster,blockOverlapsOtherExactly$$module$build$src$core$clipboard$block_paster,blockIsInSnapRadius$$module$build$src$core$clipboard$block_paster,
48
48
  bumpObjectIntoBounds$$module$build$src$core$bump_objects,bumpIntoBoundsHandler$$module$build$src$core$bump_objects,extractObjectFromEvent$$module$build$src$core$bump_objects,bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects,point$$module$build$src$core$utils$svg_paths,curve$$module$build$src$core$utils$svg_paths,moveTo$$module$build$src$core$utils$svg_paths,moveBy$$module$build$src$core$utils$svg_paths,lineTo$$module$build$src$core$utils$svg_paths,line$$module$build$src$core$utils$svg_paths,
49
- lineOnAxis$$module$build$src$core$utils$svg_paths,arc$$module$build$src$core$utils$svg_paths,getParentConnection$$module$build$src$core$keyboard_nav$ast_node,isDeletable$$module$build$src$core$interfaces$i_deletable,isDraggable$$module$build$src$core$interfaces$i_draggable,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block,isObservable$$module$build$src$core$interfaces$i_observable,allProcedures$$module$build$src$core$procedures,
50
- procTupleComparator$$module$build$src$core$procedures,isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,xmlFlyoutCategory$$module$build$src$core$procedures,internalFlyoutCategory$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures,updateMutatorFlyout$$module$build$src$core$procedures,mutatorOpenListener$$module$build$src$core$procedures,mutatorChangeListener$$module$build$src$core$procedures,getCallers$$module$build$src$core$procedures,
51
- blockIsModernCallerFor$$module$build$src$core$procedures,isDynamicShape$$module$build$src$core$renderers$common$constants,isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,register$$module$build$src$core$renderers$common$block_rendering,unregister$$module$build$src$core$renderers$common$block_rendering,init$$module$build$src$core$renderers$common$block_rendering,stringButtonClickHandler$$module$build$src$core$variables_dynamic,
49
+ lineOnAxis$$module$build$src$core$utils$svg_paths,arc$$module$build$src$core$utils$svg_paths,isDeletable$$module$build$src$core$interfaces$i_deletable,isDraggable$$module$build$src$core$interfaces$i_draggable,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block,isObservable$$module$build$src$core$interfaces$i_observable,allProcedures$$module$build$src$core$procedures,procTupleComparator$$module$build$src$core$procedures,
50
+ isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,xmlFlyoutCategory$$module$build$src$core$procedures,internalFlyoutCategory$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures,updateMutatorFlyout$$module$build$src$core$procedures,mutatorOpenListener$$module$build$src$core$procedures,mutatorChangeListener$$module$build$src$core$procedures,getCallers$$module$build$src$core$procedures,blockIsModernCallerFor$$module$build$src$core$procedures,
51
+ isDynamicShape$$module$build$src$core$renderers$common$constants,isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,getParentConnection$$module$build$src$core$keyboard_nav$ast_node,register$$module$build$src$core$renderers$common$block_rendering,unregister$$module$build$src$core$renderers$common$block_rendering,init$$module$build$src$core$renderers$common$block_rendering,stringButtonClickHandler$$module$build$src$core$variables_dynamic,
52
52
  numberButtonClickHandler$$module$build$src$core$variables_dynamic,colourButtonClickHandler$$module$build$src$core$variables_dynamic,internalFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategory$$module$build$src$core$variables_dynamic,xmlFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategoryBlocks$$module$build$src$core$variables_dynamic,resizeSvgContents$$module$build$src$core$workspace_svg,copyInternal$$module$build$src$core$clipboard,paste$$module$build$src$core$clipboard,
53
53
  pasteFromData$$module$build$src$core$clipboard,duplicateInternal$$module$build$src$core$clipboard,isCopyable$$module$build$src$core$interfaces$i_copyable,registerEscape$$module$build$src$core$shortcut_items,registerDelete$$module$build$src$core$shortcut_items,registerCopy$$module$build$src$core$shortcut_items,registerCut$$module$build$src$core$shortcut_items,registerPaste$$module$build$src$core$shortcut_items,registerUndo$$module$build$src$core$shortcut_items,registerRedo$$module$build$src$core$shortcut_items,
54
54
  registerDefaultShortcuts$$module$build$src$core$shortcut_items,saveProcedure$$module$build$src$core$serialization$procedures,loadProcedure$$module$build$src$core$serialization$procedures,save$$module$build$src$core$serialization$workspaces,load$$module$build$src$core$serialization$workspaces,inject$$module$build$src$core$inject,createDom$$module$build$src$core$inject,createMainWorkspace$$module$build$src$core$inject,init$$module$build$src$core$inject,onKeyDown$$module$build$src$core$inject,bindDocumentEvents$$module$build$src$core$inject,
55
- loadSounds$$module$build$src$core$inject,registerUndo$$module$build$src$core$contextmenu_items,registerRedo$$module$build$src$core$contextmenu_items,registerCleanup$$module$build$src$core$contextmenu_items,toggleOption_$$module$build$src$core$contextmenu_items,registerCollapse$$module$build$src$core$contextmenu_items,registerExpand$$module$build$src$core$contextmenu_items,addDeletableBlocks_$$module$build$src$core$contextmenu_items,getDeletableBlocks_$$module$build$src$core$contextmenu_items,deleteNext_$$module$build$src$core$contextmenu_items,
56
- registerDeleteAll$$module$build$src$core$contextmenu_items,registerWorkspaceOptions_$$module$build$src$core$contextmenu_items,registerDuplicate$$module$build$src$core$contextmenu_items,registerComment$$module$build$src$core$contextmenu_items,registerInline$$module$build$src$core$contextmenu_items,registerCollapseExpandBlock$$module$build$src$core$contextmenu_items,registerDisable$$module$build$src$core$contextmenu_items,registerDelete$$module$build$src$core$contextmenu_items,registerHelp$$module$build$src$core$contextmenu_items,
57
- registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,registerCommentCreate$$module$build$src$core$contextmenu_items,pixelsToWorkspaceCoords$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,
58
- isSelectable$$module$build$src$core$interfaces$i_selectable,isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item,hideChaff$$module$build$src$core$blockly,$jscomp;
55
+ loadSounds$$module$build$src$core$inject,getFocusManager$$module$build$src$core$focus_manager,registerUndo$$module$build$src$core$contextmenu_items,registerRedo$$module$build$src$core$contextmenu_items,registerCleanup$$module$build$src$core$contextmenu_items,toggleOption_$$module$build$src$core$contextmenu_items,registerCollapse$$module$build$src$core$contextmenu_items,registerExpand$$module$build$src$core$contextmenu_items,addDeletableBlocks_$$module$build$src$core$contextmenu_items,getDeletableBlocks_$$module$build$src$core$contextmenu_items,
56
+ deleteNext_$$module$build$src$core$contextmenu_items,registerDeleteAll$$module$build$src$core$contextmenu_items,registerWorkspaceOptions_$$module$build$src$core$contextmenu_items,registerDuplicate$$module$build$src$core$contextmenu_items,registerComment$$module$build$src$core$contextmenu_items,registerInline$$module$build$src$core$contextmenu_items,registerCollapseExpandBlock$$module$build$src$core$contextmenu_items,registerDisable$$module$build$src$core$contextmenu_items,registerDelete$$module$build$src$core$contextmenu_items,
57
+ registerHelp$$module$build$src$core$contextmenu_items,registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,registerCommentCreate$$module$build$src$core$contextmenu_items,pixelsToWorkspaceCoords$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,
58
+ isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,isSelectable$$module$build$src$core$interfaces$i_selectable,isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item,hideChaff$$module$build$src$core$blockly,$jscomp;
59
59
  register$$module$build$src$core$registry=function(a,b,c,d){if(!(a instanceof Type$$module$build$src$core$registry)&&"string"!==typeof a||""===`${a}`.trim())throw Error('Invalid type "'+a+'". The type must be a non-empty string or a Blockly.registry.Type.');a=`${a}`.toLowerCase();if("string"!==typeof b||""===b.trim())throw Error('Invalid name "'+b+'". The name must be a non-empty string.');const e=b.toLowerCase();if(!c)throw Error("Can not register a null value");let f=typeMap$$module$build$src$core$registry[a],
60
60
  g=nameMap$$module$build$src$core$registry[a];f||(f=typeMap$$module$build$src$core$registry[a]=Object.create(null),g=nameMap$$module$build$src$core$registry[a]=Object.create(null));validate$$module$build$src$core$registry(a,c);if(!d&&f[e]&&f[e]!==c)throw Error('Name "'+e+'" with type "'+a+'" already registered.');f[e]=c;g[e]=b};
61
61
  validate$$module$build$src$core$registry=function(a,b){switch(a){case String(Type$$module$build$src$core$registry.FIELD):if("function"!==typeof b.fromJson)throw Error('Type "'+a+'" must have a fromJson function');}};
@@ -367,9 +367,9 @@ d,e)&&!b.group&&console.warn("Moved object in bounds but there was no event grou
367
367
  extractObjectFromEvent$$module$build$src$core$bump_objects=function(a,b){let c=null;switch(b.type){case EventType$$module$build$src$core$events$type.BLOCK_CREATE:case EventType$$module$build$src$core$events$type.BLOCK_MOVE:(c=a.getBlockById(b.blockId))&&(c=c.getRootBlock());break;case EventType$$module$build$src$core$events$type.COMMENT_CREATE:case EventType$$module$build$src$core$events$type.COMMENT_MOVE:case EventType$$module$build$src$core$events$type.COMMENT_RESIZE:c=a.getCommentById(b.commentId)}return c};
368
368
  bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects=function(a){var b=a.getMetricsManager();if(b.hasFixedEdges()&&!a.isDragging()){b=b.getScrollMetrics(!0);var c=a.getTopBoundedElements();for(let d=0,e;e=c[d];d++)bumpObjectIntoBounds$$module$build$src$core$bump_objects(a,b,e)}};point$$module$build$src$core$utils$svg_paths=function(a,b){return" "+a+","+b+" "};curve$$module$build$src$core$utils$svg_paths=function(a,b){return" "+a+b.join("")};
369
369
  moveTo$$module$build$src$core$utils$svg_paths=function(a,b){return" M "+a+","+b+" "};moveBy$$module$build$src$core$utils$svg_paths=function(a,b){return" m "+a+","+b+" "};lineTo$$module$build$src$core$utils$svg_paths=function(a,b){return" l "+a+","+b+" "};line$$module$build$src$core$utils$svg_paths=function(a){return" l"+a.join("")};lineOnAxis$$module$build$src$core$utils$svg_paths=function(a,b){return" "+a+" "+b+" "};
370
- arc$$module$build$src$core$utils$svg_paths=function(a,b,c,d){return a+" "+c+" "+c+" "+b+d};getParentConnection$$module$build$src$core$keyboard_nav$ast_node=function(a){let b=a.outputConnection;if(!b||a.previousConnection&&a.previousConnection.isConnected())b=a.previousConnection;return b};isDeletable$$module$build$src$core$interfaces$i_deletable=function(a){return void 0!==a.isDeletable&&void 0!==a.dispose&&void 0!==a.setDeleteStyle};
371
- isDraggable$$module$build$src$core$interfaces$i_draggable=function(a){return void 0!==a.getRelativeToSurfaceXY&&void 0!==a.isMovable&&void 0!==a.startDrag&&void 0!==a.drag&&void 0!==a.endDrag&&void 0!==a.revertDrag};register$$module$build$src$core$icons$registry=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,a.toString(),b)};
372
- unregister$$module$build$src$core$icons$registry=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,a)};isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block=function(a){return void 0!==a.getProcedureModel&&void 0!==a.doProcedureUpdate&&void 0!==a.isProcedureDef};isObservable$$module$build$src$core$interfaces$i_observable=function(a){return void 0!==a.startPublishing&&void 0!==a.stopPublishing};
370
+ arc$$module$build$src$core$utils$svg_paths=function(a,b,c,d){return a+" "+c+" "+c+" "+b+d};isDeletable$$module$build$src$core$interfaces$i_deletable=function(a){return void 0!==a.isDeletable&&void 0!==a.dispose&&void 0!==a.setDeleteStyle};isDraggable$$module$build$src$core$interfaces$i_draggable=function(a){return void 0!==a.getRelativeToSurfaceXY&&void 0!==a.isMovable&&void 0!==a.startDrag&&void 0!==a.drag&&void 0!==a.endDrag&&void 0!==a.revertDrag};
371
+ register$$module$build$src$core$icons$registry=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,a.toString(),b)};unregister$$module$build$src$core$icons$registry=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,a)};isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block=function(a){return void 0!==a.getProcedureModel&&void 0!==a.doProcedureUpdate&&void 0!==a.isProcedureDef};
372
+ isObservable$$module$build$src$core$interfaces$i_observable=function(a){return void 0!==a.startPublishing&&void 0!==a.stopPublishing};
373
373
  allProcedures$$module$build$src$core$procedures=function(a){const b=a.getProcedureMap().getProcedures().filter(d=>!d.getReturnTypes()).map(d=>[d.getName(),d.getParameters().map(e=>e.getName()),!1]);a.getBlocksByType("procedures_defnoreturn",!1).forEach(d=>{!isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(d)&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&b.push(d.getProcedureDef())});const c=a.getProcedureMap().getProcedures().filter(d=>
374
374
  !!d.getReturnTypes()).map(d=>[d.getName(),d.getParameters().map(e=>e.getName()),!0]);a.getBlocksByType("procedures_defreturn",!1).forEach(d=>{!isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(d)&&isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(d)&&c.push(d.getProcedureDef())});b.sort(procTupleComparator$$module$build$src$core$procedures);c.sort(procTupleComparator$$module$build$src$core$procedures);return[b,c]};
375
375
  procTupleComparator$$module$build$src$core$procedures=function(a,b){return a[0].localeCompare(b[0],void 0,{sensitivity:"base"})};$.findLegalName$$module$build$src$core$procedures=function(a,b){if(b.isInFlyout)return a;for(a=a||$.Msg$$module$build$src$core$msg.UNNAMED_KEY||"unnamed";!isLegalName$$module$build$src$core$procedures(a,b.workspace,b);){const c=a.match(/^(.*?)(\d+)$/);a=c?c[1]+(parseInt(c[2])+1):a+"2"}return a};
@@ -394,10 +394,10 @@ $.mutateCallers$$module$build$src$core$procedures=function(a){const b=getRecordU
394
394
  fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(g,"mutation",null,c,e)),$.setRecordUndo$$module$build$src$core$events$utils(b))}};
395
395
  $.getDefinition$$module$build$src$core$procedures=function(a,b){for(const c of b.getAllBlocks(!1))if(isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block(c)&&c.isProcedureDef()&&$.Names$$module$build$src$core$names.equals(c.getProcedureModel().getName(),a)||isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks(c)&&$.Names$$module$build$src$core$names.equals(c.getProcedureDef()[0],a))return c;return null};
396
396
  isDynamicShape$$module$build$src$core$renderers$common$constants=function(a){return a.isDynamic};isPuzzleTab$$module$build$src$core$renderers$common$constants=function(a){return void 0!==a.pathDown&&void 0!==a.pathUp};isNotch$$module$build$src$core$renderers$common$constants=function(a){return void 0!==a.pathLeft&&void 0!==a.pathRight};
397
- register$$module$build$src$core$renderers$common$block_rendering=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a,b)};unregister$$module$build$src$core$renderers$common$block_rendering=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a)};
398
- init$$module$build$src$core$renderers$common$block_rendering=function(a,b,c){a=new (getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a))(a);a.init(b,c);return a};stringButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"String")};
399
- numberButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Number")};colourButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Colour")};
400
- internalFlyoutCategory$$module$build$src$core$variables_dynamic=function(a){return flyoutCategory$$module$build$src$core$variables_dynamic(a,!1)};
397
+ getParentConnection$$module$build$src$core$keyboard_nav$ast_node=function(a){let b=a.outputConnection;if(!b||a.previousConnection&&a.previousConnection.isConnected())b=a.previousConnection;return b};register$$module$build$src$core$renderers$common$block_rendering=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a,b)};
398
+ unregister$$module$build$src$core$renderers$common$block_rendering=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a)};init$$module$build$src$core$renderers$common$block_rendering=function(a,b,c){a=new (getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.RENDERER,a))(a);a.init(b,c);return a};
399
+ stringButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"String")};numberButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Number")};
400
+ colourButtonClickHandler$$module$build$src$core$variables_dynamic=function(a){createVariableButtonHandler$$module$build$src$core$variables(a.getTargetWorkspace(),void 0,"Colour")};internalFlyoutCategory$$module$build$src$core$variables_dynamic=function(a){return flyoutCategory$$module$build$src$core$variables_dynamic(a,!1)};
401
401
  flyoutCategory$$module$build$src$core$variables_dynamic=function(a,b=!0){Blocks$$module$build$src$core$blocks.variables_set_dynamic||Blocks$$module$build$src$core$blocks.variables_get_dynamic||console.warn("There are no dynamic variable blocks, but there is a dynamic variable category.");if(b)return warn$$module$build$src$core$utils$deprecation("The XML return value of Blockly.VariablesDynamic.flyoutCategory()","v12","v13","the same method, but handle a return type of FlyoutItemInfo[] (JSON) instead."),
402
402
  xmlFlyoutCategory$$module$build$src$core$variables_dynamic(a);a.registerButtonCallback("CREATE_VARIABLE_STRING",stringButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_NUMBER",numberButtonClickHandler$$module$build$src$core$variables_dynamic);a.registerButtonCallback("CREATE_VARIABLE_COLOUR",colourButtonClickHandler$$module$build$src$core$variables_dynamic);return[{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE,callbackkey:"CREATE_VARIABLE_STRING"},
403
403
  {kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE,callbackkey:"CREATE_VARIABLE_NUMBER"},{kind:"button",text:$.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE,callbackkey:"CREATE_VARIABLE_COLOUR"},...jsonFlyoutCategoryBlocks$$module$build$src$core$variables(a,a.getAllVariables(),!1,"variables_get_dynamic","variables_set_dynamic")]};
@@ -448,7 +448,7 @@ onKeyDown$$module$build$src$core$inject=function(a){const b=getMainWorkspace$$mo
448
448
  bindDocumentEvents$$module$build$src$core$inject=function(){documentEventsBound$$module$build$src$core$inject||(conditionalBind$$module$build$src$core$browser_events(document,"scroll",null,function(){const a=getAllWorkspaces$$module$build$src$core$common();for(let b=0,c;c=a[b];b++)c instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&c.updateInverseScreenCTM()}),bind$$module$build$src$core$browser_events(document,"touchend",null,longStop$$module$build$src$core$touch),bind$$module$build$src$core$browser_events(document,
449
449
  "touchcancel",null,longStop$$module$build$src$core$touch));documentEventsBound$$module$build$src$core$inject=!0};
450
450
  loadSounds$$module$build$src$core$inject=function(a,b){function c(){for(;e.length;){const f=e.pop();f&&unbind$$module$build$src$core$browser_events(f)}d.preload()}const d=b.getAudioManager();d.load([a+"click.mp3",a+"click.wav",a+"click.ogg"],"click");d.load([a+"disconnect.wav",a+"disconnect.mp3",a+"disconnect.ogg"],"disconnect");d.load([a+"delete.mp3",a+"delete.ogg",a+"delete.wav"],"delete");const e=[];e.push(conditionalBind$$module$build$src$core$browser_events(document,"pointermove",null,c,!0));
451
- e.push(conditionalBind$$module$build$src$core$browser_events(document,"touchstart",null,c,!0))};
451
+ e.push(conditionalBind$$module$build$src$core$browser_events(document,"touchstart",null,c,!0))};getFocusManager$$module$build$src$core$focus_manager=function(){focusManager$$module$build$src$core$focus_manager||(focusManager$$module$build$src$core$focus_manager=new FocusManager$$module$build$src$core$focus_manager(document.addEventListener));return focusManager$$module$build$src$core$focus_manager};
452
452
  registerUndo$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(){return $.Msg$$module$build$src$core$msg.UNDO},preconditionFn(a){return 0<a.workspace.getUndoStack().length?"enabled":"disabled"},callback(a){a.workspace.undo(!1)},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.WORKSPACE,id:"undoWorkspace",weight:1})};
453
453
  registerRedo$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(){return $.Msg$$module$build$src$core$msg.REDO},preconditionFn(a){return 0<a.workspace.getRedoStack().length?"enabled":"disabled"},callback(a){a.workspace.undo(!0)},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.WORKSPACE,id:"redoWorkspace",weight:2})};
454
454
  registerCleanup$$module$build$src$core$contextmenu_items=function(){ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.register({displayText(){return $.Msg$$module$build$src$core$msg.CLEAN_UP},preconditionFn(a){return a.workspace.isMovable()?1<a.workspace.getTopBlocks(!1).length?"enabled":"disabled":"hidden"},callback(a){a.workspace.cleanUp()},scopeType:ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.WORKSPACE,id:"cleanWorkspace",weight:3})};
@@ -552,7 +552,7 @@ a+'" has not been added to the ComponentManager');if(this.hasCapability(a,b))con
552
552
  b),removeElem$$module$build$src$core$utils$array(this.capabilityToComponentIds.get(b),a)):console.warn('Plugin "'+a+"doesn't have capability \""+b+'" to remove')}hasCapability(a,b){b=`${b}`.toLowerCase();return this.componentData.has(a)&&this.componentData.get(a).capabilities.includes(b)}getComponent(a){let b;return null==(b=this.componentData.get(a))?void 0:b.component}getComponents(a,b){a=`${a}`.toLowerCase();a=this.capabilityToComponentIds.get(a);if(!a)return[];const c=[];if(b){const d=[];a.forEach(e=>
553
553
  {d.push(this.componentData.get(e))});d.sort(function(e,f){return e.weight-f.weight});d.forEach(function(e){c.push(e.component)})}else a.forEach(d=>{c.push(this.componentData.get(d).component)});return c}};ComponentManager$$module$build$src$core$component_manager.Capability=Capability$$module$build$src$core$component_manager;
554
554
  (function(a){a=a.ComponentWeight||(a.ComponentWeight={});a[a.TOOLBOX_WEIGHT=0]="TOOLBOX_WEIGHT";a[a.FLYOUT_WEIGHT=1]="FLYOUT_WEIGHT";a[a.TRASHCAN_WEIGHT=2]="TRASHCAN_WEIGHT";a[a.ZOOM_CONTROLS_WEIGHT=3]="ZOOM_CONTROLS_WEIGHT"})(ComponentManager$$module$build$src$core$component_manager||(ComponentManager$$module$build$src$core$component_manager={}));
555
- var ComponentWeight$$module$build$src$core$component_manager=ComponentManager$$module$build$src$core$component_manager.ComponentWeight,module$build$src$core$component_manager={};module$build$src$core$component_manager.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$component_manager.ComponentWeight=ComponentWeight$$module$build$src$core$component_manager;var injected$$module$build$src$core$css=!1,content$$module$build$src$core$css='\n.blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n}\n\n.blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n}\n\n.injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.blocklyBlockCanvas.blocklyCanvasTransitioning,\n.blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n}\n\n.blocklyEmboss {\n filter: var(--blocklyEmbossFilter);\n}\n\n.blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n}\n\n.blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv:focus {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownContent {\n max-height: 300px; /* @todo: spec for maximum height. */\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n.blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyHighlighted>.blocklyPath {\n filter: var(--blocklyEmbossFilter);\n}\n\n.blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n}\n\n.blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n}\n\n.blocklySelected>.blocklyPathLight {\n display: none;\n}\n\n.blocklyDraggable {\n cursor: grab;\n cursor: -webkit-grab;\n}\n\n.blocklyDragging {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n /* Drag surface disables events to not block the toolbox, so we have to\n * reenable them here for the cursor values to work. */\n pointer-events: auto;\n}\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n.blocklyDraggable:active {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n.blocklyDragging.blocklyDraggingDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n}\n\n.blocklyDragging>.blocklyPath,\n.blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n}\n\n.blocklyDragging>.blocklyPathDark {\n display: none;\n}\n\n.blocklyDisabled>.blocklyPath {\n fill: var(--blocklyDisabledPattern);\n fill-opacity: .5;\n stroke-opacity: .5;\n}\n\n.blocklyDisabled>.blocklyPathLight,\n.blocklyDisabled>.blocklyPathDark {\n display: none;\n}\n\n.blocklyInsertionMarker>.blocklyPath,\n.blocklyInsertionMarker>.blocklyPathLight,\n.blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n}\n\n.blocklyNonEditableField>text {\n pointer-events: none;\n}\n\n.blocklyFlyout {\n position: absolute;\n z-index: 20;\n}\n\n.blocklyText text {\n cursor: default;\n}\n\n/*\n Don\'t allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n*/\n.blocklySvg text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n}\n\n.blocklyIconGroup {\n cursor: default;\n}\n\n.blocklyIconGroup:not(:hover),\n.blocklyIconGroupReadonly {\n opacity: .6;\n}\n\n.blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n.blocklyIconSymbol {\n fill: #fff;\n}\n\n.blocklyMinimalBody {\n margin: 0;\n padding: 0;\n height: 100%;\n}\n\n.blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n}\n\n/* Remove the increase and decrease arrows on the field number editor */\ninput.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,\ninput.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n -moz-appearance: textfield;\n}\n\n.blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n}\n\n.blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n}\n\n.blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n}\n\n.blocklyMainWorkspaceScrollbar {\n z-index: 20;\n}\n\n.blocklyFlyoutScrollbar {\n z-index: 30;\n}\n\n.blocklyScrollbarHorizontal,\n.blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n}\n\n.blocklyScrollbarBackground {\n opacity: 0;\n pointer-events: none;\n}\n\n.blocklyScrollbarHandle {\n fill: #ccc;\n}\n\n.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyScrollbarHandle:hover {\n fill: #bbb;\n}\n\n/* Darken flyout scrollbars due to being on a grey background. */\n/* By contrast, workspace scrollbars are on a white background. */\n.blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n}\n\n.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n}\n\n.blocklyInvalidInput {\n background: #faa;\n}\n\n.blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n}\n\n.blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.blocklyNoPointerEvents {\n pointer-events: none;\n}\n\n.blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n}\n\n.blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n}\n\n.blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n}\n\n/* BiDi override for the resting state. */\n.blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n}\n\n.blocklyWidgetDiv .blocklyMenu {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n.blocklyWidgetDiv .blocklyMenu:focus {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv .blocklyMenu {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px "Helvetica Neue", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n/* State: resting. */\n.blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n}\n\n/* State: disabled. */\n.blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n}\n\n/* State: hover. */\n.blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n}\n\n/* State: selected/checked. */\n.blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n}\n\n.blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n}\n\n.blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n}\n\n.blocklyMenuSeparator {\n background-color: #ccc; \n height: 1px; \n border: 0;\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.blocklyBlockDragSurface, .blocklyAnimationLayer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: visible !important;\n z-index: 80;\n pointer-events: none;\n}\n\n.blocklyField {\n cursor: default;\n}\n\n.blocklyInputField {\n cursor: text;\n}\n\n.blocklyDragging .blocklyField,\n.blocklyDragging .blocklyIconGroup {\n cursor: grabbing;\n}\n',
555
+ var ComponentWeight$$module$build$src$core$component_manager=ComponentManager$$module$build$src$core$component_manager.ComponentWeight,module$build$src$core$component_manager={};module$build$src$core$component_manager.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$component_manager.ComponentWeight=ComponentWeight$$module$build$src$core$component_manager;var injected$$module$build$src$core$css=!1,content$$module$build$src$core$css='\n.blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n}\n\n.blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n}\n\n.injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.blocklyBlockCanvas.blocklyCanvasTransitioning,\n.blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n}\n\n.blocklyEmboss {\n filter: var(--blocklyEmbossFilter);\n}\n\n.blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n}\n\n.blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv:focus {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownContent {\n max-height: 300px; /* @todo: spec for maximum height. */\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n.blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n}\n\n.blocklyHighlighted>.blocklyPath {\n filter: var(--blocklyEmbossFilter);\n}\n\n.blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n}\n\n.blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n}\n\n.blocklySelected>.blocklyPathLight {\n display: none;\n}\n\n.blocklyDraggable {\n cursor: grab;\n cursor: -webkit-grab;\n}\n\n.blocklyDragging {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n /* Drag surface disables events to not block the toolbox, so we have to\n * reenable them here for the cursor values to work. */\n pointer-events: auto;\n}\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n.blocklyDraggable:active {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n.blocklyDragging.blocklyDraggingDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n}\n\n.blocklyDragging>.blocklyPath,\n.blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n}\n\n.blocklyDragging>.blocklyPathDark {\n display: none;\n}\n\n.blocklyDisabledPattern>.blocklyPath {\n fill: var(--blocklyDisabledPattern);\n fill-opacity: .5;\n stroke-opacity: .5;\n}\n\n.blocklyDisabled>.blocklyPathLight,\n.blocklyDisabled>.blocklyPathDark {\n display: none;\n}\n\n.blocklyInsertionMarker>.blocklyPath,\n.blocklyInsertionMarker>.blocklyPathLight,\n.blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n}\n\n.blocklyNonEditableField>text {\n pointer-events: none;\n}\n\n.blocklyFlyout {\n position: absolute;\n z-index: 20;\n}\n\n.blocklyText text {\n cursor: default;\n}\n\n/*\n Don\'t allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n*/\n.blocklySvg text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n}\n\n.blocklyIconGroup {\n cursor: default;\n}\n\n.blocklyIconGroup:not(:hover),\n.blocklyIconGroupReadonly {\n opacity: .6;\n}\n\n.blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n}\n\n.blocklyIconSymbol {\n fill: #fff;\n}\n\n.blocklyMinimalBody {\n margin: 0;\n padding: 0;\n height: 100%;\n}\n\n.blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n}\n\n/* Remove the increase and decrease arrows on the field number editor */\ninput.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,\ninput.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type=number] {\n -moz-appearance: textfield;\n}\n\n.blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n}\n\n.blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n}\n\n.blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n}\n\n.blocklyMainWorkspaceScrollbar {\n z-index: 20;\n}\n\n.blocklyFlyoutScrollbar {\n z-index: 30;\n}\n\n.blocklyScrollbarHorizontal,\n.blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n}\n\n.blocklyScrollbarBackground {\n opacity: 0;\n pointer-events: none;\n}\n\n.blocklyScrollbarHandle {\n fill: #ccc;\n}\n\n.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyScrollbarHandle:hover {\n fill: #bbb;\n}\n\n/* Darken flyout scrollbars due to being on a grey background. */\n/* By contrast, workspace scrollbars are on a white background. */\n.blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n}\n\n.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n.blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n}\n\n.blocklyInvalidInput {\n background: #faa;\n}\n\n.blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n}\n\n.blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.blocklyNoPointerEvents {\n pointer-events: none;\n}\n\n.blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n}\n\n.blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n}\n\n.blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n}\n\n/* BiDi override for the resting state. */\n.blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n}\n\n.blocklyWidgetDiv .blocklyMenu {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n.blocklyWidgetDiv .blocklyMenu:focus {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n}\n\n.blocklyDropDownDiv .blocklyMenu {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px "Helvetica Neue", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n}\n\n/* State: resting. */\n.blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n}\n\n/* State: disabled. */\n.blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n}\n\n/* State: hover. */\n.blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n}\n\n/* State: selected/checked. */\n.blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n}\n\n.blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n}\n\n.blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n}\n\n.blocklyMenuSeparator {\n background-color: #ccc; \n height: 1px; \n border: 0;\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.blocklyBlockDragSurface, .blocklyAnimationLayer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: visible !important;\n z-index: 80;\n pointer-events: none;\n}\n\n.blocklyField {\n cursor: default;\n}\n\n.blocklyInputField {\n cursor: text;\n}\n\n.blocklyDragging .blocklyField,\n.blocklyDragging .blocklyIconGroup {\n cursor: grabbing;\n}\n\n.blocklyActiveFocus {\n outline-color: #2ae;\n outline-width: 2px;\n}\n.blocklyPassiveFocus {\n outline-color: #3fdfff;\n outline-width: 1.5px;\n}\n',
556
556
  module$build$src$core$css={};module$build$src$core$css.inject=inject$$module$build$src$core$css;module$build$src$core$css.register=register$$module$build$src$core$css;var Coordinate$$module$build$src$core$utils$coordinate=class{constructor(a,b){this.x=a;this.y=b}clone(){return new Coordinate$$module$build$src$core$utils$coordinate(this.x,this.y)}scale(a){this.x*=a;this.y*=a;return this}translate(a,b){this.x+=a;this.y+=b;return this}static equals(a,b){return a===b?!0:a&&b?a.x===b.x&&a.y===b.y:!1}static distance(a,b){const c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)}static magnitude(a){return Math.sqrt(a.x*a.x+a.y*a.y)}static difference(a,b){return new Coordinate$$module$build$src$core$utils$coordinate(a.x-
557
557
  b.x,a.y-b.y)}static sum(a,b){return new Coordinate$$module$build$src$core$utils$coordinate(a.x+b.x,a.y+b.y)}},module$build$src$core$utils$coordinate={};module$build$src$core$utils$coordinate.Coordinate=Coordinate$$module$build$src$core$utils$coordinate;var SVG_NS$$module$build$src$core$utils$dom="http://www.w3.org/2000/svg",HTML_NS$$module$build$src$core$utils$dom="http://www.w3.org/1999/xhtml",XLINK_NS$$module$build$src$core$utils$dom="http://www.w3.org/1999/xlink",NodeType$$module$build$src$core$utils$dom;(function(a){a[a.ELEMENT_NODE=1]="ELEMENT_NODE";a[a.TEXT_NODE=3]="TEXT_NODE";a[a.COMMENT_NODE=8]="COMMENT_NODE"})(NodeType$$module$build$src$core$utils$dom||(NodeType$$module$build$src$core$utils$dom={}));
558
558
  var cacheWidths$$module$build$src$core$utils$dom=null,cacheReference$$module$build$src$core$utils$dom=0,canvasContext$$module$build$src$core$utils$dom=null,module$build$src$core$utils$dom={HTML_NS:HTML_NS$$module$build$src$core$utils$dom};module$build$src$core$utils$dom.NodeType=NodeType$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.SVG_NS=SVG_NS$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.XLINK_NS=XLINK_NS$$module$build$src$core$utils$dom;
@@ -677,8 +677,8 @@ a?String(a):String(this.getValue())}getText_(){return null}markDirty(){this.isDi
677
677
  d.call(this,l),f=this.processValidation(l,e,b);if(!(f instanceof Error)){var g=this.sourceBlock_;if(!g||!g.disposed){var h=this.getValue();h===f?this.doValueUpdate_(f):(this.doValueUpdate_(f),b&&g&&isEnabled$$module$build$src$core$events$utils()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(g,"field",this.name||null,h,f)),this.isDirty_&&this.forceRerender())}}}}finally{$.setGroup$$module$build$src$core$events$utils(c)}}}processValidation(a,
678
678
  b,c){return null===b?(this.doValueInvalid_(a,c),this.isDirty_&&this.forceRerender(),Error()):void 0===b?a:b}getValue(){return this.value_}doClassValidation_(a){return null===a||void 0===a?null:a}doValueUpdate_(a){this.value_=a;this.isDirty_=!0}doValueInvalid_(a,b){}onMouseDown_(a){this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)}setTooltip(a){a||""===a||(a=this.sourceBlock_);const b=this.getClickTarget_();b?b.tooltip=a:this.tooltip=
679
679
  a}getTooltip(){const a=this.getClickTarget_();return a?getTooltipOfObject$$module$build$src$core$tooltip(a):getTooltipOfObject$$module$build$src$core$tooltip({tooltip:this.tooltip})}getClickTarget_(){return this.clickTarget_||this.getSvgRoot()}getAbsoluteXY_(){return getPageOffset$$module$build$src$core$utils$style(this.getClickTarget_())}referencesVariables(){return!1}refreshVariableName(){}getParentInput(){let a=null;const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;
680
- const c=b.inputList;for(let d=0;d<b.inputList.length;d++){const e=c[d],f=e.fieldRow;for(let g=0;g<f.length;g++)if(f[g]===this){a=e;break}}return a}getFlipRtl(){return!1}isTabNavigable(){return!1}onShortcut(a){return!1}setCursorSvg(a){if(a){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(a);this.cursorSvg=a}else this.cursorSvg=null}setMarkerSvg(a){if(a){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(a);
681
- this.markerSvg=a}else this.markerSvg=null}updateMarkers_(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;a=a.workspace;a.keyboardAccessibilityMode&&this.cursorSvg&&a.getCursor().draw();a.keyboardAccessibilityMode&&this.markerSvg&&a.getMarker(MarkerManager$$module$build$src$core$marker_manager.LOCAL_MARKER).draw()}static fromJson(a){throw Error("Attempted to instantiate a field from the registry that hasn't defined a 'fromJson' method.");}};
680
+ const c=b.inputList;for(let d=0;d<b.inputList.length;d++){const e=c[d],f=e.fieldRow;for(let g=0;g<f.length;g++)if(f[g]===this){a=e;break}}return a}getFlipRtl(){return!1}onShortcut(a){return!1}setCursorSvg(a){if(a){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(a);this.cursorSvg=a}else this.cursorSvg=null}setMarkerSvg(a){if(a){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(a);this.markerSvg=
681
+ a}else this.markerSvg=null}updateMarkers_(){var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;a=a.workspace;a.keyboardAccessibilityMode&&this.cursorSvg&&a.getCursor().draw();a.keyboardAccessibilityMode&&this.markerSvg&&a.getMarker(MarkerManager$$module$build$src$core$marker_manager.LOCAL_MARKER).draw()}static fromJson(a){throw Error("Attempted to instantiate a field from the registry that hasn't defined a 'fromJson' method.");}};
682
682
  Field$$module$build$src$core$field.SKIP_SETUP=Symbol("SKIP_SETUP");var UnattachedFieldError$$module$build$src$core$field=class extends Error{constructor(){super("The field has not yet been attached to its input. Call appendField to attach it.")}},module$build$src$core$field={};module$build$src$core$field.Field=Field$$module$build$src$core$field;module$build$src$core$field.UnattachedFieldError=UnattachedFieldError$$module$build$src$core$field;var owner$$module$build$src$core$widgetdiv=null,ownerWorkspace$$module$build$src$core$widgetdiv=null,dispose$$module$build$src$core$widgetdiv=null,containerClassName$$module$build$src$core$widgetdiv="blocklyWidgetDiv",rendererClassName$$module$build$src$core$widgetdiv="",themeClassName$$module$build$src$core$widgetdiv="",containerDiv$$module$build$src$core$widgetdiv,module$build$src$core$widgetdiv={};module$build$src$core$widgetdiv.createDom=createDom$$module$build$src$core$widgetdiv;
683
683
  module$build$src$core$widgetdiv.getDiv=getDiv$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.hide=hide$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.hideIfOwner=hideIfOwner$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.hideIfOwnerIsInWorkspace=hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.isVisible=isVisible$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.positionWithAnchor=positionWithAnchor$$module$build$src$core$widgetdiv;
684
684
  module$build$src$core$widgetdiv.repositionForWindowResize=repositionForWindowResize$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.show=show$$module$build$src$core$widgetdiv;module$build$src$core$widgetdiv.testOnly_setDiv=testOnly_setDiv$$module$build$src$core$widgetdiv;var currentBlock$$module$build$src$core$contextmenu=null,dummyOwner$$module$build$src$core$contextmenu={},menu_$$module$build$src$core$contextmenu=null,module$build$src$core$contextmenu={};module$build$src$core$contextmenu.callbackFactory=$.callbackFactory$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.dispose=dispose$$module$build$src$core$contextmenu;module$build$src$core$contextmenu.getCurrentBlock=getCurrentBlock$$module$build$src$core$contextmenu;
@@ -909,18 +909,19 @@ module$build$src$core$utils.array=module$build$src$core$utils$array;module$build
909
909
  module$build$src$core$utils.math=module$build$src$core$utils$math;module$build$src$core$utils.object=module$build$src$core$utils$object;module$build$src$core$utils.parsing=module$build$src$core$utils$parsing;module$build$src$core$utils.string=module$build$src$core$utils$string;module$build$src$core$utils.style=module$build$src$core$utils$style;module$build$src$core$utils.svgMath=module$build$src$core$utils$svg_math;module$build$src$core$utils.svgPaths=module$build$src$core$utils$svg_paths;
910
910
  module$build$src$core$utils.toolbox=module$build$src$core$utils$toolbox;module$build$src$core$utils.userAgent=module$build$src$core$utils$useragent;module$build$src$core$utils.xml=module$build$src$core$utils$xml;var BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy=class{constructor(a){this.block=a;this.connectionPreviewer=this.connectionCandidate=this.startLoc=this.startChildConn=this.startParentConn=null;this.dragging=!1;this.dragOffset=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.originalEventGroup="";this.workspace=a.workspace}isMovable(){if(this.block.isShadow()){let a,b;return null!=(b=null==(a=this.block.getParent())?void 0:a.isMovable())?b:!1}return this.block.isOwnMovable()&&
911
911
  !this.block.isDeadOrDying()&&!this.workspace.isReadOnly()&&!this.block.isInFlyout}startDrag(a){if(this.block.isShadow())this.startDraggingShadow(a);else{this.dragging=!0;this.fireDragStartEvent();this.startLoc=this.block.getRelativeToSurfaceXY();this.connectionCandidate=null;this.connectionPreviewer=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CONNECTION_PREVIEWER,this.workspace.options))(this.block);startTextWidthCache$$module$build$src$core$utils$dom();
912
- this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();a=!!a&&(a.altKey||a.ctrlKey||a.metaKey);this.shouldDisconnect(a)&&this.disconnectBlock(a);this.block.setDragging(!0);var b;null==(b=this.workspace.getLayerManager())||b.moveToDragLayer(this.block)}}startDraggingShadow(a){const b=this.block.getParent();if(!b)throw Error("Tried to drag a shadow block with no parent. Shadow blocks should always have parents.");this.dragOffset=Coordinate$$module$build$src$core$utils$coordinate.difference(b.getRelativeToSurfaceXY(),
913
- this.block.getRelativeToSurfaceXY());b.startDrag(a)}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){let b,c,d;this.startParentConn=null!=(d=null==(b=this.block.outputConnection)?void 0:b.targetConnection)?d:null==(c=this.block.previousConnection)?void 0:c.targetConnection;if(a){let e;this.startChildConn=null==(e=this.block.nextConnection)?void 0:e.targetConnection}this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}fireDragStartEvent(){const a=
914
- new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,!0,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireDragEndEvent(){const a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,!1,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireMoveEvent(){if(!this.block.isDeadOrDying()){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(this.block);
915
- a.setReason(["drag"]);a.oldCoordinate=this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.drag(Coordinate$$module$build$src$core$utils$coordinate.sum(a,this.dragOffset))}else this.block.moveDuringDrag(a),this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,this.startLoc))}updateConnectionPreview(a,b){var c=this.connectionCandidate;const d=this.getConnectionCandidate(a,
916
- b);if(d){this.connectionCandidate=b=c&&this.currCandidateIsBetter(c,b,d)?c:d;var {local:e,neighbour:f}=b;b=e.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||e.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;c=f.isConnected()&&!f.targetBlock().isInsertionMarker();b&&c&&!this.orphanCanConnectAtEnd(a,f.targetBlock(),e.type)?this.connectionPreviewer.previewReplacement(e,f,f.targetBlock()):this.connectionPreviewer.previewConnection(e,f)}else this.connectionPreviewer.hidePreview(),
917
- this.connectionCandidate=null}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:b.previousConnection)}currCandidateIsBetter(a,b,c){const {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);const f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,
918
- b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a,b){a=this.getLocalConnections(a);let c=this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:$.config$$module$build$src$core$config.snapRadius,d=null;for(const e of a){const {connection:f,radius:g}=e.closest(c,b);f&&(d={local:e,neighbour:f,distance:g},c=g)}return d}getLocalConnections(a){const b=a.getConnections_(!1),c=a.lastConnectionInStack(!0);c&&
919
- c!==a.nextConnection&&b.push(c);return b}endDrag(a){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.endDrag(a)}else{this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();this.fireDragEndEvent();this.fireMoveEvent();stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();this.connectionPreviewer.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let b;null==(b=this.workspace.getLayerManager())||
920
- b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.block.setDragging(!1)}this.connectionCandidate?(this.applyConnections(this.connectionCandidate),this.disposeStep()):this.block.queueRender().then(()=>this.disposeStep())}}disposeStep(){const a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);this.block.snapToGrid();this.connectionPreviewer.dispose();this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(a)}applyConnections(a){const {local:b,
921
- neighbour:c}=a;b.connect(c);const d=b.isSuperior()?c:b,e=this.block.getRootBlock();finishQueuedRenders$$module$build$src$core$render_management().then(()=>{connectionUiEffect$$module$build$src$core$block_animations(d.getSourceBlock());setTimeout(()=>{e.bringToFront()},0)})}revertDrag(){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.revertDrag()}else{var a;null==(a=this.startChildConn)||a.connect(this.block.nextConnection);if(this.startParentConn)switch(this.startParentConn.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:this.startParentConn.connect(this.block.outputConnection);
922
- break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:this.startParentConn.connect(this.block.previousConnection)}else{this.block.moveTo(this.startLoc,["drag"]);let b;null==(b=this.workspace.getLayerManager())||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace,this.workspace.getMetricsManager().getScrollMetrics(!0),this.block)}this.startParentConn=this.startChildConn=null;this.connectionPreviewer.hidePreview();
923
- this.connectionCandidate=null;this.block.setDragging(!1);this.dragging=!1}}},module$build$src$core$dragging$block_drag_strategy={};module$build$src$core$dragging$block_drag_strategy.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;var TextBubble$$module$build$src$core$bubbles$text_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d){super(b,c,d);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize();addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyTextBubble")}getText(){return this.text}setText(a){this.text=a;removeNode$$module$build$src$core$utils$dom(this.paragraph);this.paragraph=this.stringToSvg(a,
912
+ this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();a=this.shouldHealStack(a);this.shouldDisconnect(a)&&this.disconnectBlock(a);this.block.setDragging(!0);var b;null==(b=this.workspace.getLayerManager())||b.moveToDragLayer(this.block)}}shouldHealStack(a){return!!a&&(a.altKey||a.ctrlKey||a.metaKey)}startDraggingShadow(a){const b=this.block.getParent();if(!b)throw Error("Tried to drag a shadow block with no parent. Shadow blocks should always have parents.");
913
+ this.dragOffset=Coordinate$$module$build$src$core$utils$coordinate.difference(b.getRelativeToSurfaceXY(),this.block.getRelativeToSurfaceXY());b.startDrag(a)}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){let b,c,d;this.startParentConn=null!=(d=null==(b=this.block.outputConnection)?void 0:b.targetConnection)?d:null==(c=this.block.previousConnection)?void 0:c.targetConnection;if(a){let e;this.startChildConn=
914
+ null==(e=this.block.nextConnection)?void 0:e.targetConnection}this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}fireDragStartEvent(){const a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,!0,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireDragEndEvent(){const a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,
915
+ !1,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireMoveEvent(){if(!this.block.isDeadOrDying()){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(this.block);a.setReason(["drag"]);a.oldCoordinate=this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.drag(Coordinate$$module$build$src$core$utils$coordinate.sum(a,this.dragOffset))}else this.block.moveDuringDrag(a),
916
+ this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,this.startLoc))}updateConnectionPreview(a,b){var c=this.connectionCandidate;const d=this.getConnectionCandidate(a,b);if(d){this.connectionCandidate=b=c&&this.currCandidateIsBetter(c,b,d)?c:d;var {local:e,neighbour:f}=b;b=e.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||e.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;c=f.isConnected()&&
917
+ !f.targetBlock().isInsertionMarker();b&&c&&!this.orphanCanConnectAtEnd(a,f.targetBlock(),e.type)?this.connectionPreviewer.previewReplacement(e,f,f.targetBlock()):this.connectionPreviewer.previewConnection(e,f)}else this.connectionPreviewer.hidePreview(),this.connectionCandidate=null}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:b.previousConnection)}currCandidateIsBetter(a,
918
+ b,c){const {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);const f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a,b){a=this.getLocalConnections(a);let c=this.getSearchRadius(),d=null;for(const e of a){const {connection:f,
919
+ radius:g}=e.closest(c,b);f&&(d={local:e,neighbour:f,distance:g},c=g)}return d}getSearchRadius(){return this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:$.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){const b=a.getConnections_(!1),c=a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);return b}endDrag(a){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.endDrag(a)}else{this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();
920
+ this.fireDragEndEvent();this.fireMoveEvent();stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();this.connectionPreviewer.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let b;null==(b=this.workspace.getLayerManager())||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.block.setDragging(!1)}this.connectionCandidate?(this.applyConnections(this.connectionCandidate),this.disposeStep()):this.block.queueRender().then(()=>
921
+ this.disposeStep())}}disposeStep(){const a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);this.block.snapToGrid();this.connectionPreviewer.dispose();this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(a)}applyConnections(a){const {local:b,neighbour:c}=a;b.connect(c);const d=b.isSuperior()?c:b,e=this.block.getRootBlock();finishQueuedRenders$$module$build$src$core$render_management().then(()=>{connectionUiEffect$$module$build$src$core$block_animations(d.getSourceBlock());
922
+ setTimeout(()=>{e.bringToFront()},0)})}revertDrag(){if(this.block.isShadow()){let b;null==(b=this.block.getParent())||b.revertDrag()}else{var a;null==(a=this.startChildConn)||a.connect(this.block.nextConnection);if(this.startParentConn)switch(this.startParentConn.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:this.startParentConn.connect(this.block.outputConnection);break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:this.startParentConn.connect(this.block.previousConnection)}else{this.block.moveTo(this.startLoc,
923
+ ["drag"]);let b;null==(b=this.workspace.getLayerManager())||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace,this.workspace.getMetricsManager().getScrollMetrics(!0),this.block)}this.startParentConn=this.startChildConn=null;this.connectionPreviewer.hidePreview();this.connectionCandidate=null;this.block.setDragging(!1);this.dragging=!1}}},module$build$src$core$dragging$block_drag_strategy={};
924
+ module$build$src$core$dragging$block_drag_strategy.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;var TextBubble$$module$build$src$core$bubbles$text_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d){super(b,c,d);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.paragraph=this.stringToSvg(a,this.contentContainer);this.updateBubbleSize();addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyTextBubble")}getText(){return this.text}setText(a){this.text=a;removeNode$$module$build$src$core$utils$dom(this.paragraph);this.paragraph=this.stringToSvg(a,
924
925
  this.contentContainer);this.updateBubbleSize()}stringToSvg(a,b){b=this.createParagraph(b);a=this.createTextFragments(b,a);this.workspace.RTL&&this.rightAlignTextFragments(b.getBBox().width,a);return b}createParagraph(a){return createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyText blocklyBubbleText blocklyNoPointerEvents",transform:`translate(0,${Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH})`,style:`direction: ${this.workspace.RTL?
925
926
  "rtl":"ltr"}`},a)}createTextFragments(a,b){let c=1;return b.split("\n").map(d=>{const e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{y:`${c}em`,x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},a);d=document.createTextNode(d);e.appendChild(d);c+=1;return e})}rightAlignTextFragments(a,b){for(const c of b)c.setAttribute("text-anchor","start"),c.setAttribute("x",`${a+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH}`)}updateBubbleSize(){const a=
926
927
  this.paragraph.getBBox();this.setSize(new Size$$module$build$src$core$utils$size(a.width+2*Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,a.height+2*Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH),!0)}},module$build$src$core$bubbles$text_bubble={};module$build$src$core$bubbles$text_bubble.TextBubble=TextBubble$$module$build$src$core$bubbles$text_bubble;var SIZE$$module$build$src$core$icons$warning_icon=17,WarningIcon$$module$build$src$core$icons$warning_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textMap=new Map;this.textBubble=null}getType(){return WarningIcon$$module$build$src$core$icons$warning_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},
@@ -928,47 +929,7 @@ this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$buil
928
929
  a.dispose()}getWeight(){return WarningIcon$$module$build$src$core$icons$warning_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$warning_icon,SIZE$$module$build$src$core$icons$warning_icon)}applyColour(){super.applyColour();let a;null==(a=this.textBubble)||a.setColour(this.sourceBlock.getColour())}updateCollapsed(){}isShownWhenCollapsed(){return!0}onLocationChange(a){super.onLocationChange(a);let b;null==(b=this.textBubble)||b.setAnchorLocation(this.getAnchorLocation())}addMessage(a,
929
930
  b){if(this.textMap.get(b)===a)return this;a?this.textMap.set(b,a):this.textMap.delete(b);let c;null==(c=this.textBubble)||c.setText(this.getText());return this}getText(){return[...this.textMap.values()].join("\n")}onClick(){super.onClick();this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}bubbleIsVisible(){return!!this.textBubble}setBubbleVisible(a){const b=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){if(b.bubbleIsVisible()!==a){yield finishQueuedRenders$$module$build$src$core$render_management();
930
931
  if(a)b.textBubble=new TextBubble$$module$build$src$core$bubbles$text_bubble(b.getText(),b.sourceBlock.workspace,b.getAnchorLocation(),b.getBubbleOwnerRect()),b.applyColour();else{let c;null==(c=b.textBubble)||c.dispose();b.textBubble=null}fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BUBBLE_OPEN))(b.sourceBlock,a,"warning"))}})}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$warning_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,
931
- new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){const a=this.sourceBlock.getSvgRoot().getBBox();return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height,a.x,a.x+a.width)}};WarningIcon$$module$build$src$core$icons$warning_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.WARNING;WarningIcon$$module$build$src$core$icons$warning_icon.WEIGHT=2;var module$build$src$core$icons$warning_icon={};module$build$src$core$icons$warning_icon.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon;var FlyoutButton$$module$build$src$core$flyout_button=class{constructor(a,b,c,d){this.workspace=a;this.targetWorkspace=b;this.isFlyoutLabel=d;this.height=this.width=0;this.cursorSvg=this.svgText=null;this.text=c.text;this.position=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.callbackKey=c.callbackKey||c.callbackkey;this.cssClass=c["web-class"]||null;this.info=c;a=this.isFlyoutLabel?"blocklyFlyoutLabel":"blocklyFlyoutButton";this.cssClass&&(a+=" "+this.cssClass);this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,
932
- {"class":a},this.workspace.getCanvas());let e;this.isFlyoutLabel||(e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyFlyoutButtonShadow",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,x:1,y:1},this.svgGroup));a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelBackground":
933
- "blocklyFlyoutButtonBackground",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS},this.svgGroup);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup);c=replaceMessageReferences$$module$build$src$core$utils$parsing(this.text);this.workspace.RTL&&(c+="\u200f");b.textContent=
934
- c;this.isFlyoutLabel&&(this.svgText=b,this.workspace.getThemeManager().subscribe(this.svgText,"flyoutForegroundColour","fill"));d=getComputedStyle$$module$build$src$core$utils$style(b,"fontSize");const f=getComputedStyle$$module$build$src$core$utils$style(b,"fontWeight"),g=getComputedStyle$$module$build$src$core$utils$style(b,"fontFamily");this.width=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(b,d,f,g);c=measureFontMetrics$$module$build$src$core$utils$dom(c,d,f,g);this.height=
935
- this.height||c.height;if(!this.isFlyoutLabel){this.width+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X;this.height+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y;let h;null==(h=e)||h.setAttribute("width",String(this.width));let k;null==(k=e)||k.setAttribute("height",String(this.height))}a.setAttribute("width",String(this.width));a.setAttribute("height",String(this.height));b.setAttribute("x",String(this.width/2));b.setAttribute("y",String(this.height/2-c.height/
936
- 2+c.baseline));this.updateTransform();this.onMouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerdown",this,this.onMouseDown);this.onMouseUpWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerup",this,this.onMouseUp)}createDom(){return this.svgGroup}show(){this.updateTransform();this.svgGroup.setAttribute("display","block")}updateTransform(){this.svgGroup.setAttribute("transform","translate("+this.position.x+","+this.position.y+
937
- ")")}moveTo(a,b){this.position.x=a;this.position.y=b;this.updateTransform()}moveBy(a,b,c){this.moveTo(this.position.x+a,this.position.y+b)}isLabel(){return this.isFlyoutLabel}getPosition(){return this.position}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.position.y,this.position.y+this.height,this.position.x,this.position.x+this.width)}getButtonText(){return this.text}getTargetWorkspace(){return this.targetWorkspace}getWorkspace(){return this.workspace}dispose(){unbind$$module$build$src$core$browser_events(this.onMouseDownWrapper);
938
- unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper);this.svgGroup&&removeNode$$module$build$src$core$utils$dom(this.svgGroup);this.svgText&&this.workspace.getThemeManager().unsubscribe(this.svgText)}setCursorSvg(a){a?this.svgGroup&&(this.svgGroup.appendChild(a),this.cursorSvg=a):this.cursorSvg=null}setMarkerSvg(){throw Error("Attempted to set a marker on a button.");}onMouseUp(a){(a=this.targetWorkspace.getGesture(a))&&a.cancel();this.isFlyoutLabel&&this.callbackKey?console.warn("Labels should not have callbacks. Label text: "+
939
- this.text):this.isFlyoutLabel||this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.isFlyoutLabel||(a=this.targetWorkspace.getButtonCallback(this.callbackKey))&&a(this):console.warn("Buttons should have callbacks. Button text: "+this.text)}onMouseDown(a){const b=this.targetWorkspace.getGesture(a),c=this.targetWorkspace.getFlyout();b&&c&&b.handleFlyoutStart(a,c)}getSvgRoot(){return this.svgGroup}};FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X=5;
940
- FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y=2;FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS=4;register$$module$build$src$core$css("\n.blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n}\n\n.blocklyFlyoutButtonShadow {\n fill: #666;\n}\n\n.blocklyFlyoutButton:hover {\n fill: #aaa;\n}\n\n.blocklyFlyoutLabel {\n cursor: default;\n}\n\n.blocklyFlyoutLabelBackground {\n opacity: 0;\n}\n");var module$build$src$core$flyout_button={};
941
- module$build$src$core$flyout_button.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;var ASTNode$$module$build$src$core$keyboard_nav$ast_node=class{constructor(a,b,c){this.wsCoordinate=null;if(!b)throw Error("Cannot create a node without a location.");this.type=a;this.isConnectionLocation=ASTNode$$module$build$src$core$keyboard_nav$ast_node.isConnectionType(a);this.location=b;this.processParams(c||null)}processParams(a){a&&a.wsCoordinate&&(this.wsCoordinate=a.wsCoordinate)}getLocation(){return this.location}getType(){return this.type}getWsCoordinate(){return this.wsCoordinate}isConnection(){return this.isConnectionLocation}findNextForInput(){var a=
942
- this.location.getParentInput();const b=a.getSourceBlock();a=b.inputList.indexOf(a);for(a+=1;a<b.inputList.length;a++){const c=b.inputList[a],d=c.fieldRow;for(let e=0;e<d.length;e++){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}if(c.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(c)}return null}findNextForField(){var a=this.location,
943
- b=a.getParentInput();const c=a.getSourceBlock();if(!c)throw Error("The current AST location is not associated with a block");var d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)+1;d<c.inputList.length;d++){b=c.inputList[d];const e=b.fieldRow;for(;a<e.length;){if(e[a].isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(e[a]);a++}a=0;if(b.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(b)}return null}findPrevForInput(){const a=
944
- this.location.getParentInput(),b=a.getSourceBlock();for(var c=b.inputList.indexOf(a);0<=c;c--){var d=b.inputList[c];if(d.connection&&d!==a)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(d);d=d.fieldRow;for(let e=d.length-1;0<=e;e--){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}}return null}findPrevForField(){var a=this.location;const b=
945
- a.getParentInput(),c=a.getSourceBlock();if(!c)throw Error("The current AST location is not associated with a block");var d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)-1;0<=d;d--){var e=c.inputList[d];if(e.connection&&e!==b)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(e);for(e=e.fieldRow;-1<a;){if(e[a].isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(e[a]);
946
- a--}0<=d-1&&(a=c.inputList[d-1].fieldRow.length-1)}return null}navigateBetweenStacks(a){var b=this.getLocation();if(b.getSourceBlock){var c=b.getSourceBlock();c&&(b=c)}if(!b||b.isDeadOrDying())return null;if(b.workspace.isFlyout)return this.navigateFlyoutContents(a);c=b.getRootBlock();b=c.workspace.getTopBlocks(!0);for(let d=0;d<b.length;d++)if(c.id===b[d].id)return a=d+(a?1:-1),-1===a||a===b.length?null:ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(b[a]);throw Error("Couldn't find "+
947
- (a?"next":"previous")+" stack?!");}navigateFlyoutContents(a){let b;switch(this.getType()){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:b=this.getLocation();var c=b.workspace.targetWorkspace;break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:b=this.getLocation();c=b.getTargetWorkspace();break;default:return null}c=c.getFlyout();if(!c)return null;a=this.findNextLocationInFlyout(c.getContents(),b,a);if(!a)return null;a=a.getElement();return a instanceof
948
- FlyoutButton$$module$build$src$core$flyout_button?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createButtonNode(a):a instanceof BlockSvg$$module$build$src$core$block_svg?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a):null}findNextLocationInFlyout(a,b,c){var d=a.findIndex(e=>b instanceof BlockSvg$$module$build$src$core$block_svg&&e.getElement()===b||b instanceof FlyoutButton$$module$build$src$core$flyout_button&&e.getElement()===b?!0:!1);if(0>d)return null;for(d=c?
949
- d+1:d-1;0<=d&&d<a.length&&!a[d].isFocusable();)d+=c?1:-1;return-1===d||d===a.length?null:a[d]}findTopASTNodeForBlock(a){const b=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a);return b?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a)}getOutAstNodeForBlock(a){if(!a)return null;a=a.getTopStackBlock();const b=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a);return b&&
950
- b.targetConnection&&b.targetConnection.getParentInput()?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(b.targetConnection.getParentInput()):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a)}findFirstFieldOrInput(a){a=a.inputList;for(let b=0;b<a.length;b++){const c=a[b],d=c.fieldRow;for(let e=0;e<d.length;e++){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}if(c.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(c)}return null}getSourceBlock(){return this.getType()===
951
- ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK?this.getLocation():this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK?this.getLocation():this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE?null:this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON?null:this.getLocation().getSourceBlock()}next(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.navigateBetweenStacks(!0);
952
- case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:return this.findNextForField();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return this.findNextForInput();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:const a=this.location.nextConnection;if(!a)break;return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);
953
- case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(this.location.targetConnection);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:return this.navigateFlyoutContents(!0)}return null}in(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE:const a=
954
- this.location.getTopBlocks(!0);if(0<a.length)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a[0]);break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.findTopASTNodeForBlock(this.location);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:return this.findFirstFieldOrInput(this.location);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(this.location.targetConnection)}return null}prev(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.navigateBetweenStacks(!1);
955
- case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:return this.findPrevForField();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return this.findPrevForInput();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:var a=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(this.location);if(!a)break;return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:if((a=
956
- this.location.targetConnection)&&!a.getParentInput())return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:return this.navigateFlyoutContents(!1)}return null}out(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:var a=
957
- this.location,b=a.getRelativeToSurfaceXY();b=new Coordinate$$module$build$src$core$utils$coordinate(b.x,b.y+ASTNode$$module$build$src$core$keyboard_nav$ast_node.DEFAULT_OFFSET_Y);return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createWorkspaceNode(a.workspace,b);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return a=this.location,(b=a.targetConnection)?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a.getSourceBlock());
958
- case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:a=this.location.getSourceBlock();if(!a)throw Error("The current AST location is not associated with a block");return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:return this.getOutAstNodeForBlock(this.location);
959
- case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:return this.getOutAstNodeForBlock(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return this.getOutAstNodeForBlock(this.location.getSourceBlock())}return null}static isConnectionType(a){switch(a){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return!0}return!1}static createFieldNode(a){return a?
960
- new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD,a):null}static createConnectionNode(a){if(!a)return null;const b=a.type;return b===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE||b===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT&&a.getParentInput()?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(a.getParentInput()):b===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT?
961
- new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT,a):b===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT,a):b===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS,
962
- a):null}static createInputNode(a){return a&&a.connection?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT,a.connection):null}static createBlockNode(a){return a?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK,a):null}static createStackNode(a){return a?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK,
963
- a):null}static createButtonNode(a){return a?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON,a):null}static createWorkspaceNode(a,b){return b&&a?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE,a,{wsCoordinate:b}):null}static createTopNode(a){const b=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a);return b?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):
964
- ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a)}};ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS=!1;ASTNode$$module$build$src$core$keyboard_nav$ast_node.DEFAULT_OFFSET_Y=-20;
965
- (function(a){a=a.types||(a.types={});a.FIELD="field";a.BLOCK="block";a.INPUT="input";a.OUTPUT="output";a.NEXT="next";a.PREVIOUS="previous";a.STACK="stack";a.WORKSPACE="workspace";a.BUTTON="button"})(ASTNode$$module$build$src$core$keyboard_nav$ast_node||(ASTNode$$module$build$src$core$keyboard_nav$ast_node={}));var module$build$src$core$keyboard_nav$ast_node={};module$build$src$core$keyboard_nav$ast_node.ASTNode=ASTNode$$module$build$src$core$keyboard_nav$ast_node;var Marker$$module$build$src$core$keyboard_nav$marker=class{constructor(){this.drawer=this.curNode=this.colour=null;this.type="marker"}setDrawer(a){this.drawer=a}getDrawer(){return this.drawer}getCurNode(){return this.curNode}setCurNode(a){const b=this.curNode;this.curNode=a;let c;null==(c=this.drawer)||c.draw(b,this.curNode)}draw(){let a;null==(a=this.drawer)||a.draw(this.curNode,this.curNode)}hide(){let a;null==(a=this.drawer)||a.hide()}dispose(){let a;null==(a=this.drawer)||a.dispose();this.curNode=
966
- this.drawer=null}},module$build$src$core$keyboard_nav$marker={};module$build$src$core$keyboard_nav$marker.Marker=Marker$$module$build$src$core$keyboard_nav$marker;var Cursor$$module$build$src$core$keyboard_nav$cursor=class extends Marker$$module$build$src$core$keyboard_nav$marker{constructor(){super();this.type="cursor"}next(){var a=this.getCurNode();if(!a)return null;for(a=a.next();a&&a.next()&&(a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK);)a=a.next();a&&this.setCurNode(a);return a}in(){var a=this.getCurNode();if(!a)return null;if(a.getType()===
967
- ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT)a=a.next();let b,c;(a=null!=(c=null==(b=a)?void 0:b.in())?c:null)&&this.setCurNode(a);return a}prev(){var a=this.getCurNode();if(!a)return null;for(a=a.prev();a&&a.prev()&&(a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK);)a=a.prev();a&&this.setCurNode(a);
968
- return a}out(){var a=this.getCurNode();if(!a)return null;(a=a.out())&&a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK&&(a=a.prev()||a);a&&this.setCurNode(a);return a}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,DEFAULT$$module$build$src$core$registry,Cursor$$module$build$src$core$keyboard_nav$cursor);var module$build$src$core$keyboard_nav$cursor={};module$build$src$core$keyboard_nav$cursor.Cursor=Cursor$$module$build$src$core$keyboard_nav$cursor;var BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor=class extends Cursor$$module$build$src$core$keyboard_nav$cursor{constructor(){super()}next(){var a=this.getCurNode();if(!a)return null;(a=this.getNextNode_(a,this.validNode_))&&this.setCurNode(a);return a}in(){return this.next()}prev(){var a=this.getCurNode();if(!a)return null;(a=this.getPreviousNode_(a,this.validNode_))&&this.setCurNode(a);return a}out(){return this.prev()}getNextNode_(a,b){if(!a)return null;const c=a.in()||a.next();
969
- if(b(c))return c;if(c)return this.getNextNode_(c,b);a=this.findSiblingOrParent(a.out());return b(a)?a:a?this.getNextNode_(a,b):null}getPreviousNode_(a,b){if(!a)return null;let c=a.prev();c=c?this.getRightMostChild(c):a.out();return b(c)?c:c?this.getPreviousNode_(c,b):null}validNode_(a){let b=!1;a=a&&a.getType();if(a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD||
970
- a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS||a===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE)b=!0;return b}findSiblingOrParent(a){if(!a)return null;const b=a.next();return b?b:this.findSiblingOrParent(a.out())}getRightMostChild(a){if(!a.in())return a;for(a=a.in();a&&a.next();)a=a.next();return this.getRightMostChild(a)}};
971
- BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor.registrationName="basicCursor";register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor.registrationName,BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor);var module$build$src$core$keyboard_nav$basic_cursor={};module$build$src$core$keyboard_nav$basic_cursor.BasicCursor=BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor;var TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor=class extends BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor{validNode_(a){let b=!1;const c=a&&a.getType();a&&(a=a.getLocation(),c===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD&&a&&a.isTabNavigable()&&a.isClickable()&&(b=!0));return b}},module$build$src$core$keyboard_nav$tab_navigate_cursor={};module$build$src$core$keyboard_nav$tab_navigate_cursor.TabNavigateCursor=TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor;var BlockSvg$$module$build$src$core$block_svg=class extends Block$$module$build$src$core$block{constructor(a,b,c){super(a,b,c);this.childlessWidth=this.width=this.height=0;this.warningTextDb=new Map;this.mutator=null;this.rendered=!0;this.visuallyDisabled=!1;this.translation="";this.dragging=!1;this.relativeCoords=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.dragStrategy=new BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy(this);if(!a.rendered)throw TypeError("Cannot create a rendered block in a headless workspace");
932
+ new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){const a=this.sourceBlock.getSvgRoot().getBBox();return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height,a.x,a.x+a.width)}};WarningIcon$$module$build$src$core$icons$warning_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.WARNING;WarningIcon$$module$build$src$core$icons$warning_icon.WEIGHT=2;var module$build$src$core$icons$warning_icon={};module$build$src$core$icons$warning_icon.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon;var BlockSvg$$module$build$src$core$block_svg=class extends Block$$module$build$src$core$block{constructor(a,b,c){super(a,b,c);this.childlessWidth=this.width=this.height=0;this.warningTextDb=new Map;this.mutator=null;this.rendered=!0;this.visuallyDisabled=!1;this.translation="";this.dragging=!1;this.relativeCoords=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.dragStrategy=new BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy(this);if(!a.rendered)throw TypeError("Cannot create a rendered block in a headless workspace");
972
933
  this.workspace=a;this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{});b&&addClass$$module$build$src$core$utils$dom(this.svgGroup,b);this.style=a.getRenderer().getConstants().getBlockStyle(null);this.pathObject=a.getRenderer().makePathObject(this.svgGroup,this.style);a=this.pathObject.svgPath;a.tooltip=this;bindMouseEvents$$module$build$src$core$tooltip(a);this.svgGroup.setAttribute("data-id",this.id);this.doInit_()}initSvg(){if(!this.initialized){for(var a of this.inputList)a.init();
973
934
  for(const b of this.getIcons())b.initView(this.createIconPointerDownListener(b)),b.updateEditable();this.applyColour();this.pathObject.updateMovable(this.isMovable()||this.isInFlyout);(a=this.getSvgRoot())&&conditionalBind$$module$build$src$core$browser_events(a,"pointerdown",this,this.onMouseDown);a.parentNode||this.workspace.getCanvas().appendChild(a);this.initialized=!0}}getColourSecondary(){return this.style.colourSecondary}getColourTertiary(){return this.style.colourTertiary}select(){if(this.isShadow()){let a;
974
935
  null==(a=this.getParent())||a.select()}else this.addSelect()}unselect(){if(this.isShadow()){let a;null==(a=this.getParent())||a.unselect()}else this.removeSelect()}setParent(a){const b=this.parentBlock_;if(a!==b){startTextWidthCache$$module$build$src$core$utils$dom();super.setParent(a);stopTextWidthCache$$module$build$src$core$utils$dom();var c=this.getSvgRoot();if(!this.workspace.isClearing&&c){var d=this.getRelativeToSurfaceXY();a?a.getSvgRoot().appendChild(c):b&&((a=this.workspace.getCanvas().querySelector(".blocklyDragging"))?
@@ -978,16 +939,16 @@ fire$$module$build$src$core$events$utils(e));this.workspace.resizeContents()}tra
978
939
  this.updateComponentLocations(a)}snapToGrid(){if(!this.isDeadOrDying()&&!this.getParent()&&!this.isInFlyout){var a=this.workspace.getGrid();if(null!=a&&a.shouldSnap()){var b=this.getRelativeToSurfaceXY();a=a.alignXY(b);a!==b&&this.moveTo(a,["snap"])}}}getBoundingRectangle(){return this.getBoundingRectangleWithDimensions(this.getHeightWidth())}getBoundingRectangleWithoutChildren(){return this.getBoundingRectangleWithDimensions({height:this.height,width:this.childlessWidth})}getBoundingRectangleWithDimensions(a){const b=
979
940
  this.getRelativeToSurfaceXY();let c,d;this.RTL?(c=b.x-a.width,d=b.x):(c=b.x,d=b.x+a.width);return new Rect$$module$build$src$core$utils$rect(b.y,b.y+a.height,c,d)}markDirty(){this.pathObject.constants=this.workspace.getRenderer().getConstants();for(let a=0,b;b=this.inputList[a];a++)b.markDirty()}setCollapsed(a){this.collapsed_!==a&&(super.setCollapsed(a),this.updateCollapsed())}updateCollapsed(){var a=this.isCollapsed();const b=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,c=COLLAPSED_FIELD_NAME$$module$build$src$core$constants;
980
941
  for(let e=0,f;f=this.inputList[e];e++)f.name!==b&&f.setVisible(!a);for(var d of this.getIcons())d.updateCollapsed();a?(addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyCollapsed"),a=this.toString(COLLAPSE_CHARS$$module$build$src$core$internal_constants),(d=this.getField(c))?d.setValue(a):(this.getInput(b)||this.appendDummyInput(b)).appendField(new FieldLabel$$module$build$src$core$field_label(a),c)):(this.updateDisabled(),this.removeInput(b),removeClass$$module$build$src$core$utils$dom(this.svgGroup,
981
- "blocklyCollapsed"))}tab(a,b){const c=new TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor;c.setCurNode(ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(a));a=c.getCurNode();b?c.next():c.prev();(b=c.getCurNode())&&b!==a&&(b.getLocation().showEditor(),this.workspace.keyboardAccessibilityMode&&this.workspace.getCursor().setCurNode(b))}onMouseDown(a){if(!this.workspace.isReadOnly()){var b=this.workspace.getGesture(a);b&&b.handleBlockStart(a,this)}}showHelp(){const a=
982
- "function"===typeof this.helpUrl?this.helpUrl():this.helpUrl;a&&window.open(a)}generateContextMenu(){if(this.workspace.isReadOnly()||!this.contextMenu)return null;const a=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions(ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.BLOCK,{block:this});this.customContextMenu&&this.customContextMenu(a);return a}showContextMenu(a){const b=this.generateContextMenu();b&&b.length&&(show$$module$build$src$core$contextmenu(a,
983
- b,this.RTL,this.workspace),setCurrentBlock$$module$build$src$core$contextmenu(this))}updateComponentLocations(a){this.dragging||this.updateConnectionLocations(a);this.updateIconLocations(a);this.updateFieldLocations(a);for(const b of this.getChildren(!1))b.updateComponentLocations(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b.relativeCoords))}updateConnectionLocations(a){for(const b of this.getConnections_(!1))b.moveToOffset(a)}updateIconLocations(a){for(const b of this.getIcons())b.onLocationChange(a)}updateFieldLocations(a){for(const b of this.inputList)for(const c of b.fieldRow)c.onLocationChange(a)}addClass(a){addClass$$module$build$src$core$utils$dom(this.svgGroup,
984
- a)}removeClass(a){removeClass$$module$build$src$core$utils$dom(this.svgGroup,a)}setDragging(a){(this.dragging=a)?(this.translation="",draggingConnections$$module$build$src$core$common.push(...this.getConnections_(!0)),this.addClass("blocklyDragging")):(draggingConnections$$module$build$src$core$common.length=0,this.removeClass("blocklyDragging"));for(let b=0;b<this.childBlocks_.length;b++)this.childBlocks_[b].setDragging(a)}setMovable(a){super.setMovable(a);this.pathObject.updateMovable(a)}setEditable(a){super.setEditable(a);
985
- a?removeClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyNotEditable"):addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyNotEditable");a=this.getIcons();for(let b=0;b<a.length;b++)a[b].updateEditable()}setShadow(a){super.setShadow(a);this.applyColour()}setInsertionMarker(a){this.isInsertionMarker_!==a&&(this.isInsertionMarker_=a)&&(this.setColour(this.workspace.getRenderer().getConstants().INSERTION_MARKER_COLOUR),this.pathObject.updateInsertionMarker(!0))}getSvgRoot(){return this.svgGroup}dispose(a,
986
- b){this.disposing=!0;dispose$$module$build$src$core$tooltip();hide$$module$build$src$core$contextmenu();b&&(this.unplug(a),disposeUiEffect$$module$build$src$core$block_animations(this));b=getSelected$$module$build$src$core$common();if(b instanceof Block$$module$build$src$core$block){let c=b;for(;null!==c;)c===this&&b.unselect(),c=c.getParent()}super.dispose(!!a);removeNode$$module$build$src$core$utils$dom(this.svgGroup)}disposeInternal(){this.disposing=!0;super.disposeInternal();getSelected$$module$build$src$core$common()===
987
- this&&(this.unselect(),this.workspace.cancelCurrentGesture());[...this.warningTextDb.values()].forEach(a=>clearTimeout(a));this.warningTextDb.clear();this.getIcons().forEach(a=>a.dispose())}checkAndDelete(){this.workspace.isFlyout||($.setGroup$$module$build$src$core$events$utils(!0),this.workspace.hideChaff(),this.outputConnection?this.dispose(!1,!0):this.dispose(!0,!0),$.setGroup$$module$build$src$core$events$utils(!1))}toCopyData(){return this.isInsertionMarker_?null:{paster:BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE,
988
- blockState:save$$module$build$src$core$serialization$blocks(this,{addCoordinates:!0,addNextBlocks:!1}),typeCounts:getBlockTypeCounts$$module$build$src$core$common(this,!0)}}applyColour(){var a,b;null==(b=(a=this.pathObject).applyColour)||b.call(a,this);a=this.getIcons();for(b=0;b<a.length;b++)a[b].applyColour();for(const c of this.getFields())c.applyColour()}updateDisabled(){const a=!this.isEnabled()||this.getInheritedDisabled();if(this.visuallyDisabled===a){let b;null==(b=this.getNextBlock())||b.updateDisabled()}else{this.applyColour();
989
- this.visuallyDisabled=a;for(const b of this.getChildren(!1))b.updateDisabled()}}setWarningText(a,b=""){if(b)this.warningTextDb.has(b)&&(clearTimeout(this.warningTextDb.get(b)),this.warningTextDb.delete(b));else{for(var c of this.warningTextDb.values())clearTimeout(c);this.warningTextDb.clear()}if(this.workspace.isDragging())this.warningTextDb.set(b,setTimeout(()=>{this.isDeadOrDying()||(this.warningTextDb.delete(b),this.setWarningText(a,b))},100));else if(this.isInFlyout&&(a=null),c=this.getIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE),
990
- a){let d=this.getSurroundParent(),e=null;for(;d;)d.isCollapsed()&&(e=d),d=d.getSurroundParent();e&&e.setWarningText($.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING,BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID);c?c.addMessage(a,b):this.addIcon((new WarningIcon$$module$build$src$core$icons$warning_icon(this)).addMessage(a,b))}else c&&(b?(c.addMessage("",b),c.getText()||this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE)):this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE))}setMutator(a){this.removeIcon($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE);
942
+ "blocklyCollapsed"))}onMouseDown(a){if(!this.workspace.isReadOnly()){var b=this.workspace.getGesture(a);b&&b.handleBlockStart(a,this)}}showHelp(){const a="function"===typeof this.helpUrl?this.helpUrl():this.helpUrl;a&&window.open(a)}generateContextMenu(){if(this.workspace.isReadOnly()||!this.contextMenu)return null;const a=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions(ContextMenuRegistry$$module$build$src$core$contextmenu_registry.ScopeType.BLOCK,{block:this});
943
+ this.customContextMenu&&this.customContextMenu(a);return a}showContextMenu(a){const b=this.generateContextMenu();b&&b.length&&(show$$module$build$src$core$contextmenu(a,b,this.RTL,this.workspace),setCurrentBlock$$module$build$src$core$contextmenu(this))}updateComponentLocations(a){this.dragging||this.updateConnectionLocations(a);this.updateIconLocations(a);this.updateFieldLocations(a);for(const b of this.getChildren(!1))b.updateComponentLocations(Coordinate$$module$build$src$core$utils$coordinate.sum(a,
944
+ b.relativeCoords))}updateConnectionLocations(a){for(const b of this.getConnections_(!1))b.moveToOffset(a)}updateIconLocations(a){for(const b of this.getIcons())b.onLocationChange(a)}updateFieldLocations(a){for(const b of this.inputList)for(const c of b.fieldRow)c.onLocationChange(a)}addClass(a){addClass$$module$build$src$core$utils$dom(this.svgGroup,a)}removeClass(a){removeClass$$module$build$src$core$utils$dom(this.svgGroup,a)}setDragging(a){(this.dragging=a)?(this.translation="",draggingConnections$$module$build$src$core$common.push(...this.getConnections_(!0)),
945
+ this.addClass("blocklyDragging")):(draggingConnections$$module$build$src$core$common.length=0,this.removeClass("blocklyDragging"));for(let b=0;b<this.childBlocks_.length;b++)this.childBlocks_[b].setDragging(a)}setMovable(a){super.setMovable(a);this.pathObject.updateMovable(a)}setEditable(a){super.setEditable(a);a?removeClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyNotEditable"):addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyNotEditable");a=this.getIcons();for(let b=
946
+ 0;b<a.length;b++)a[b].updateEditable()}setShadow(a){super.setShadow(a);this.applyColour()}setInsertionMarker(a){this.isInsertionMarker_!==a&&(this.isInsertionMarker_=a)&&(this.setColour(this.workspace.getRenderer().getConstants().INSERTION_MARKER_COLOUR),this.pathObject.updateInsertionMarker(!0))}getSvgRoot(){return this.svgGroup}dispose(a,b){this.disposing=!0;dispose$$module$build$src$core$tooltip();hide$$module$build$src$core$contextmenu();b&&(this.unplug(a),disposeUiEffect$$module$build$src$core$block_animations(this));
947
+ b=getSelected$$module$build$src$core$common();if(b instanceof Block$$module$build$src$core$block){let c=b;for(;null!==c;)c===this&&b.unselect(),c=c.getParent()}super.dispose(!!a);removeNode$$module$build$src$core$utils$dom(this.svgGroup)}disposeInternal(){this.disposing=!0;super.disposeInternal();getSelected$$module$build$src$core$common()===this&&(this.unselect(),this.workspace.cancelCurrentGesture());[...this.warningTextDb.values()].forEach(a=>clearTimeout(a));this.warningTextDb.clear();this.getIcons().forEach(a=>
948
+ a.dispose())}checkAndDelete(){this.workspace.isFlyout||($.setGroup$$module$build$src$core$events$utils(!0),this.workspace.hideChaff(),this.outputConnection?this.dispose(!1,!0):this.dispose(!0,!0),$.setGroup$$module$build$src$core$events$utils(!1))}toCopyData(){return this.isInsertionMarker_?null:{paster:BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE,blockState:save$$module$build$src$core$serialization$blocks(this,{addCoordinates:!0,addNextBlocks:!1}),typeCounts:getBlockTypeCounts$$module$build$src$core$common(this,
949
+ !0)}}applyColour(){var a,b;null==(b=(a=this.pathObject).applyColour)||b.call(a,this);a=this.getIcons();for(b=0;b<a.length;b++)a[b].applyColour();for(const c of this.getFields())c.applyColour()}updateDisabled(){const a=!this.isEnabled()||this.getInheritedDisabled();if(this.visuallyDisabled===a){let b;null==(b=this.getNextBlock())||b.updateDisabled()}else{this.applyColour();this.visuallyDisabled=a;for(const b of this.getChildren(!1))b.updateDisabled()}}setWarningText(a,b=""){if(b)this.warningTextDb.has(b)&&
950
+ (clearTimeout(this.warningTextDb.get(b)),this.warningTextDb.delete(b));else{for(var c of this.warningTextDb.values())clearTimeout(c);this.warningTextDb.clear()}if(this.workspace.isDragging())this.warningTextDb.set(b,setTimeout(()=>{this.isDeadOrDying()||(this.warningTextDb.delete(b),this.setWarningText(a,b))},100));else if(this.isInFlyout&&(a=null),c=this.getIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE),a){let d=this.getSurroundParent(),e=null;for(;d;)d.isCollapsed()&&(e=d),d=d.getSurroundParent();
951
+ e&&e.setWarningText($.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING,BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID);c?c.addMessage(a,b):this.addIcon((new WarningIcon$$module$build$src$core$icons$warning_icon(this)).addMessage(a,b))}else c&&(b?(c.addMessage("",b),c.getText()||this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE)):this.removeIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE))}setMutator(a){this.removeIcon($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE);
991
952
  a&&this.addIcon(a)}addIcon(a){super.addIcon(a);a instanceof $.MutatorIcon$$module$build$src$core$icons$mutator_icon&&(this.mutator=a);a.initView(this.createIconPointerDownListener(a));a.applyColour();a.updateEditable();this.queueRender();return a}createIconPointerDownListener(a){return b=>{this.isDeadOrDying()||(b=this.workspace.getGesture(b))&&b.setStartIcon(a)}}removeIcon(a){const b=super.removeIcon(a);a.equals($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE)&&(this.mutator=null);this.queueRender();
992
953
  return b}setEnabled(a){warn$$module$build$src$core$utils$deprecation("setEnabled","v11","v12","the setDisabledReason method of BlockSvg");const b=this.isEnabled();super.setEnabled(a);this.isEnabled()===b||this.getInheritedDisabled()||this.updateDisabled()}setDisabledReason(a,b){const c=this.isEnabled();super.setDisabledReason(a,b);this.isEnabled()===c||this.getInheritedDisabled()||this.updateDisabled()}setDeletable(a){super.setDeletable(a);a?removeClass$$module$build$src$core$utils$dom(this.svgGroup,
993
954
  "blocklyNotDeletable"):addClass$$module$build$src$core$utils$dom(this.svgGroup,"blocklyNotDeletable")}setHighlighted(a){this.pathObject.updateHighlighted(a)}addSelect(){this.pathObject.updateSelected(!0)}removeSelect(){this.pathObject.updateSelected(!1)}setDeleteStyle(a){this.pathObject.updateDraggingDelete(a)}getColour(){return this.style.colourPrimary}setColour(a){super.setColour(a);a=this.workspace.getRenderer().getConstants().getBlockStyleForColour(this.colour_);let b,c;null==(c=(b=this.pathObject).setStyle)||
@@ -1187,21 +1148,54 @@ c=d-c;0<c&&this.addAlignmentPadding_(a,c);c=a.width;d=this.getDesiredRowWidth_(a
1187
1148
  c,d);a.hasStatement&&(c.followsStatement=!0);b.hasStatement&&(c.precedesStatement=!0);return c}getSpacerRowWidth_(a,b){return this.width-this.startX}getSpacerRowHeight_(a,b){return this.constants_.MEDIUM_PADDING}getElemCenterline_(a,b){return Types$$module$build$src$core$renderers$measurables$types.isSpacer(b)?a.yPos+b.height/2:Types$$module$build$src$core$renderers$measurables$types.isBottomRow(a)?(a=a.yPos+a.height-a.descenderHeight,Types$$module$build$src$core$renderers$measurables$types.isNextConnection(b)?
1188
1149
  a+b.height/2:a-b.height/2):Types$$module$build$src$core$renderers$measurables$types.isTopRow(a)?Types$$module$build$src$core$renderers$measurables$types.isHat(b)?a.capline-b.height/2:a.capline+b.height/2:a.yPos+a.height/2}recordElemPositions_(a){let b=a.xPos;for(let c=0,d;d=a.elements[c];c++)Types$$module$build$src$core$renderers$measurables$types.isSpacer(d)&&(d.height=a.height),d.xPos=b,d.centerline=this.getElemCenterline_(a,d),b+=d.width}finalize_(){let a=0,b=0;for(let c=0,d;d=this.rows[c];c++)d.yPos=
1189
1150
  b,d.xPos=this.startX,b+=d.height,a=Math.max(a,d.widthWithConnectedBlocks),this.recordElemPositions_(d);if(this.outputConnection&&this.block_.nextConnection){const c=this.block_.nextConnection.targetBlock();c&&(a=Math.max(a,c.getHeightWidth().width))}this.widthWithChildren=a+this.startX;this.height=b;this.startY=this.topRow.capline;this.bottomRow.baseline=b-this.bottomRow.descenderHeight}getMeasureableForConnection(a){let b;if((null==(b=this.outputConnection)?void 0:b.connectionModel)===a)return this.outputConnection;
1190
- for(const c of this.rows)for(const d of c.elements)if(d instanceof Connection$$module$build$src$core$renderers$measurables$connection&&d.connectionModel===a)return d;return null}},module$build$src$core$renderers$common$info={};module$build$src$core$renderers$common$info.RenderInfo=RenderInfo$$module$build$src$core$renderers$common$info;var MarkerMove$$module$build$src$core$events$events_marker_move=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c,d){let e=a?a.workspace.id:void 0;d&&d.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE&&(e=d.getLocation().id);super(e);this.type=EventType$$module$build$src$core$events$type.MARKER_MOVE;this.blockId=null==a?void 0:a.id;this.oldNode=c||void 0;this.newNode=d;this.isCursor=b}toJson(){const a=super.toJson();if(void 0===this.isCursor)throw Error("Whether this is a cursor event or not is undefined. Either pass a value to the constructor, or call fromJson");
1151
+ for(const c of this.rows)for(const d of c.elements)if(d instanceof Connection$$module$build$src$core$renderers$measurables$connection&&d.connectionModel===a)return d;return null}},module$build$src$core$renderers$common$info={};module$build$src$core$renderers$common$info.RenderInfo=RenderInfo$$module$build$src$core$renderers$common$info;var FlyoutButton$$module$build$src$core$flyout_button=class{constructor(a,b,c,d){this.workspace=a;this.targetWorkspace=b;this.isFlyoutLabel=d;this.height=this.width=0;this.cursorSvg=this.svgText=null;this.text=c.text;this.position=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.callbackKey=c.callbackKey||c.callbackkey;this.cssClass=c["web-class"]||null;this.info=c;a=this.isFlyoutLabel?"blocklyFlyoutLabel":"blocklyFlyoutButton";this.cssClass&&(a+=" "+this.cssClass);this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,
1152
+ {"class":a},this.workspace.getCanvas());let e;this.isFlyoutLabel||(e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyFlyoutButtonShadow",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,x:1,y:1},this.svgGroup));a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelBackground":
1153
+ "blocklyFlyoutButtonBackground",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS},this.svgGroup);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup);c=replaceMessageReferences$$module$build$src$core$utils$parsing(this.text);this.workspace.RTL&&(c+="\u200f");b.textContent=
1154
+ c;this.isFlyoutLabel&&(this.svgText=b,this.workspace.getThemeManager().subscribe(this.svgText,"flyoutForegroundColour","fill"));d=getComputedStyle$$module$build$src$core$utils$style(b,"fontSize");const f=getComputedStyle$$module$build$src$core$utils$style(b,"fontWeight"),g=getComputedStyle$$module$build$src$core$utils$style(b,"fontFamily");this.width=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(b,d,f,g);c=measureFontMetrics$$module$build$src$core$utils$dom(c,d,f,g);this.height=
1155
+ this.height||c.height;if(!this.isFlyoutLabel){this.width+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X;this.height+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y;let h;null==(h=e)||h.setAttribute("width",String(this.width));let k;null==(k=e)||k.setAttribute("height",String(this.height))}a.setAttribute("width",String(this.width));a.setAttribute("height",String(this.height));b.setAttribute("x",String(this.width/2));b.setAttribute("y",String(this.height/2-c.height/
1156
+ 2+c.baseline));this.updateTransform();this.onMouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerdown",this,this.onMouseDown);this.onMouseUpWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerup",this,this.onMouseUp)}createDom(){return this.svgGroup}show(){this.updateTransform();this.svgGroup.setAttribute("display","block")}updateTransform(){this.svgGroup.setAttribute("transform","translate("+this.position.x+","+this.position.y+
1157
+ ")")}moveTo(a,b){this.position.x=a;this.position.y=b;this.updateTransform()}moveBy(a,b,c){this.moveTo(this.position.x+a,this.position.y+b)}isLabel(){return this.isFlyoutLabel}getPosition(){return this.position}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.position.y,this.position.y+this.height,this.position.x,this.position.x+this.width)}getButtonText(){return this.text}getTargetWorkspace(){return this.targetWorkspace}getWorkspace(){return this.workspace}dispose(){unbind$$module$build$src$core$browser_events(this.onMouseDownWrapper);
1158
+ unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper);this.svgGroup&&removeNode$$module$build$src$core$utils$dom(this.svgGroup);this.svgText&&this.workspace.getThemeManager().unsubscribe(this.svgText)}setCursorSvg(a){a?this.svgGroup&&(this.svgGroup.appendChild(a),this.cursorSvg=a):this.cursorSvg=null}setMarkerSvg(){throw Error("Attempted to set a marker on a button.");}onMouseUp(a){(a=this.targetWorkspace.getGesture(a))&&a.cancel();this.isFlyoutLabel&&this.callbackKey?console.warn("Labels should not have callbacks. Label text: "+
1159
+ this.text):this.isFlyoutLabel||this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.isFlyoutLabel||(a=this.targetWorkspace.getButtonCallback(this.callbackKey))&&a(this):console.warn("Buttons should have callbacks. Button text: "+this.text)}onMouseDown(a){const b=this.targetWorkspace.getGesture(a),c=this.targetWorkspace.getFlyout();b&&c&&b.handleFlyoutStart(a,c)}getSvgRoot(){return this.svgGroup}};FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X=5;
1160
+ FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y=2;FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS=4;register$$module$build$src$core$css("\n.blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n}\n\n.blocklyFlyoutButtonShadow {\n fill: #666;\n}\n\n.blocklyFlyoutButton:hover {\n fill: #aaa;\n}\n\n.blocklyFlyoutLabel {\n cursor: default;\n}\n\n.blocklyFlyoutLabelBackground {\n opacity: 0;\n}\n");var module$build$src$core$flyout_button={};
1161
+ module$build$src$core$flyout_button.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;var ASTNode$$module$build$src$core$keyboard_nav$ast_node=class{constructor(a,b,c){this.wsCoordinate=null;if(!b)throw Error("Cannot create a node without a location.");this.type=a;this.isConnectionLocation=ASTNode$$module$build$src$core$keyboard_nav$ast_node.isConnectionType(a);this.location=b;this.processParams(c||null)}processParams(a){a&&a.wsCoordinate&&(this.wsCoordinate=a.wsCoordinate)}getLocation(){return this.location}getType(){return this.type}getWsCoordinate(){return this.wsCoordinate}isConnection(){return this.isConnectionLocation}findNextForInput(){var a=
1162
+ this.location.getParentInput();const b=null==a?void 0:a.getSourceBlock();if(!b||!a)return null;a=b.inputList.indexOf(a);for(a+=1;a<b.inputList.length;a++){const c=b.inputList[a],d=c.fieldRow;for(let e=0;e<d.length;e++){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}if(c.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(c)}return null}findNextForField(){var a=
1163
+ this.location,b=a.getParentInput();const c=a.getSourceBlock();if(!c)throw Error("The current AST location is not associated with a block");var d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)+1;d<c.inputList.length;d++){b=c.inputList[d];const e=b.fieldRow;for(;a<e.length;){if(e[a].isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(e[a]);a++}a=0;if(b.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(b)}return null}findPrevForInput(){const a=
1164
+ this.location.getParentInput(),b=null==a?void 0:a.getSourceBlock();if(!b||!a)return null;for(var c=b.inputList.indexOf(a);0<=c;c--){var d=b.inputList[c];if(d.connection&&d!==a)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(d);d=d.fieldRow;for(let e=d.length-1;0<=e;e--){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}}return null}findPrevForField(){var a=
1165
+ this.location;const b=a.getParentInput(),c=a.getSourceBlock();if(!c)throw Error("The current AST location is not associated with a block");var d=c.inputList.indexOf(b);for(a=b.fieldRow.indexOf(a)-1;0<=d;d--){var e=c.inputList[d];if(e.connection&&e!==b)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(e);for(e=e.fieldRow;-1<a;){if(e[a].isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(e[a]);
1166
+ a--}0<=d-1&&(a=c.inputList[d-1].fieldRow.length-1)}return null}navigateBetweenStacks(a){var b=this.getLocation();if(b.getSourceBlock){var c=b.getSourceBlock();c&&(b=c)}if(!b||b.isDeadOrDying())return null;if(b.workspace.isFlyout)return this.navigateFlyoutContents(a);c=b.getRootBlock();b=c.workspace.getTopBlocks(!0);for(let d=0;d<b.length;d++)if(c.id===b[d].id)return a=d+(a?1:-1),-1===a||a===b.length?null:ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(b[a]);throw Error("Couldn't find "+
1167
+ (a?"next":"previous")+" stack?!");}navigateFlyoutContents(a){let b;switch(this.getType()){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:b=this.getLocation();var c=b.workspace.targetWorkspace;break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:b=this.getLocation();c=b.getTargetWorkspace();break;default:return null}c=c.getFlyout();if(!c)return null;a=this.findNextLocationInFlyout(c.getContents(),b,a);if(!a)return null;a=a.getElement();return a instanceof
1168
+ FlyoutButton$$module$build$src$core$flyout_button?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createButtonNode(a):a instanceof BlockSvg$$module$build$src$core$block_svg?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a):null}findNextLocationInFlyout(a,b,c){var d=a.findIndex(e=>b instanceof BlockSvg$$module$build$src$core$block_svg&&e.getElement()===b||b instanceof FlyoutButton$$module$build$src$core$flyout_button&&e.getElement()===b?!0:!1);if(0>d)return null;for(d=c?
1169
+ d+1:d-1;0<=d&&d<a.length&&!a[d].isFocusable();)d+=c?1:-1;return-1===d||d===a.length?null:a[d]}findTopASTNodeForBlock(a){const b=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a);return b?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a)}getOutAstNodeForBlock(a){if(!a)return null;a=a.getTopStackBlock();let b,c;const d=null==(b=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a))?
1170
+ void 0:null==(c=b.targetConnection)?void 0:c.getParentInput();return d?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(d):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a)}findFirstFieldOrInput(a){a=a.inputList;for(let b=0;b<a.length;b++){const c=a[b],d=c.fieldRow;for(let e=0;e<d.length;e++){const f=d[e];if(f.isClickable()||ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createFieldNode(f)}if(c.connection)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(c)}return null}getSourceBlock(){return this.getType()===
1171
+ ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK?this.getLocation():this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK?this.getLocation():this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE?null:this.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON?null:this.getLocation().getSourceBlock()}next(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.navigateBetweenStacks(!0);
1172
+ case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:return this.findNextForField();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return this.findNextForInput();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:var a=this.location.nextConnection;if(!a)break;return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);
1173
+ case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return(a=this.location.targetConnection)?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a):null;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:return this.navigateFlyoutContents(!0)}return null}in(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE:var a=
1174
+ this.location.getTopBlocks(!0);if(0<a.length)return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a[0]);break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.findTopASTNodeForBlock(this.location);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:return this.findFirstFieldOrInput(this.location);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return(a=this.location.targetConnection)?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a):
1175
+ null}return null}prev(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:return this.navigateBetweenStacks(!1);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:return this.findPrevForField();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return this.findPrevForInput();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:var a=getParentConnection$$module$build$src$core$keyboard_nav$ast_node(this.location);
1176
+ if(!a)break;return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:if((a=this.location.targetConnection)&&!a.getParentInput())return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(a);break;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON:return this.navigateFlyoutContents(!1)}return null}out(){switch(this.type){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK:var a=
1177
+ this.location,b=a.getRelativeToSurfaceXY();b=new Coordinate$$module$build$src$core$utils$coordinate(b.x,b.y+ASTNode$$module$build$src$core$keyboard_nav$ast_node.DEFAULT_OFFSET_Y);return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createWorkspaceNode(a.workspace,b);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return a=this.location,(b=a.targetConnection)?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createStackNode(a.getSourceBlock());
1178
+ case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:a=this.location.getSourceBlock();if(!a)throw Error("The current AST location is not associated with a block");return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a);case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:return this.getOutAstNodeForBlock(this.location);
1179
+ case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:return this.getOutAstNodeForBlock(this.location.getSourceBlock());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return this.getOutAstNodeForBlock(this.location.getSourceBlock())}return null}static isConnectionType(a){switch(a){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT:return!0}return!1}static createFieldNode(a){return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD,
1180
+ a)}static createConnectionNode(a){const b=a.type,c=a.getParentInput();if(b!==ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE&&b!==ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||!c){if(b===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT,a);if(b===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE)return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT,
1181
+ a);if(b===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT)return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS,a)}else return ASTNode$$module$build$src$core$keyboard_nav$ast_node.createInputNode(c);return null}static createInputNode(a){return a.connection?new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT,a.connection):null}static createBlockNode(a){return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK,
1182
+ a)}static createStackNode(a){return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK,a)}static createButtonNode(a){return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON,a)}static createWorkspaceNode(a,b){return new ASTNode$$module$build$src$core$keyboard_nav$ast_node(ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE,a,{wsCoordinate:b})}static createTopNode(a){const b=
1183
+ getParentConnection$$module$build$src$core$keyboard_nav$ast_node(a);return b?ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(b):ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a)}};ASTNode$$module$build$src$core$keyboard_nav$ast_node.NAVIGATE_ALL_FIELDS=!1;ASTNode$$module$build$src$core$keyboard_nav$ast_node.DEFAULT_OFFSET_Y=-20;
1184
+ (function(a){a=a.types||(a.types={});a.FIELD="field";a.BLOCK="block";a.INPUT="input";a.OUTPUT="output";a.NEXT="next";a.PREVIOUS="previous";a.STACK="stack";a.WORKSPACE="workspace";a.BUTTON="button"})(ASTNode$$module$build$src$core$keyboard_nav$ast_node||(ASTNode$$module$build$src$core$keyboard_nav$ast_node={}));var module$build$src$core$keyboard_nav$ast_node={};module$build$src$core$keyboard_nav$ast_node.ASTNode=ASTNode$$module$build$src$core$keyboard_nav$ast_node;var MarkerMove$$module$build$src$core$events$events_marker_move=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c,d){let e=a?a.workspace.id:void 0;d&&d.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE&&(e=d.getLocation().id);super(e);this.type=EventType$$module$build$src$core$events$type.MARKER_MOVE;this.blockId=null==a?void 0:a.id;this.oldNode=c||void 0;this.newNode=d;this.isCursor=b}toJson(){const a=super.toJson();if(void 0===this.isCursor)throw Error("Whether this is a cursor event or not is undefined. Either pass a value to the constructor, or call fromJson");
1191
1185
  if(!this.newNode)throw Error("The new node is undefined. Either pass a node to the constructor, or call fromJson");a.isCursor=this.isCursor;a.blockId=this.blockId;a.oldNode=this.oldNode;a.newNode=this.newNode;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new MarkerMove$$module$build$src$core$events$events_marker_move);b.isCursor=a.isCursor;b.blockId=a.blockId;b.oldNode=a.oldNode;b.newNode=a.newNode;return b}};
1192
1186
  register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.MARKER_MOVE,MarkerMove$$module$build$src$core$events$events_marker_move);var module$build$src$core$events$events_marker_move={};module$build$src$core$events$events_marker_move.MarkerMove=MarkerMove$$module$build$src$core$events$events_marker_move;var CURSOR_CLASS$$module$build$src$core$renderers$common$marker_svg="blocklyCursor",MARKER_CLASS$$module$build$src$core$renderers$common$marker_svg="blocklyMarker",HEIGHT_MULTIPLIER$$module$build$src$core$renderers$common$marker_svg=.75,MarkerSvg$$module$build$src$core$renderers$common$marker_svg=class{constructor(a,b,c){this.workspace=a;this.marker=c;this.markerSvgRect_=this.markerSvgLine_=this.markerInput_=this.markerBlock_=this.svgGroup_=this.markerSvg_=this.currentMarkerSvg=this.parent=null;this.constants_=
1193
1187
  b;a=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR;this.colour_=c.colour||a}getSvgRoot(){return this.svgGroup_}getMarker(){return this.marker}isCursor(){return"cursor"===this.marker.type}createDom(){const a=this.isCursor()?CURSOR_CLASS$$module$build$src$core$renderers$common$marker_svg:MARKER_CLASS$$module$build$src$core$renderers$common$marker_svg;this.svgGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":a});this.createDomInternal_();
1194
1188
  return this.svgGroup_}setParent_(a){this.isCursor()?(this.parent&&this.parent.setCursorSvg(null),a.setCursorSvg(this.getSvgRoot())):(this.parent&&this.parent.setMarkerSvg(null),a.setMarkerSvg(this.getSvgRoot()));this.parent=a}draw(a,b){if(b){this.constants_=this.workspace.getRenderer().getConstants();var c=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR;this.colour_=this.marker.colour||c;this.applyColour_(b);this.showAtLocation_(b);this.fireMarkerEvent(a,b);a=this.currentMarkerSvg.childNodes[0];
1195
1189
  void 0!==a&&a.beginElement&&a.beginElement()}else this.hide()}showAtLocation_(a){const b=a.getLocation().type;a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK?this.showWithBlock_(a):a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.OUTPUT?this.showWithOutput_(a):b===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?this.showWithInput_(a):b===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT?this.showWithNext_(a):
1196
1190
  a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS?this.showWithPrevious_(a):a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD?this.showWithField_(a):a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE?this.showWithCoordinates_(a):a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.STACK?this.showWithStack_(a):a.getType()===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BUTTON&&
1197
- this.showWithButton_(a)}showWithBlockPrevOutput(a){a=a.getSourceBlock();const b=a.width;var c=a.height,d=c*HEIGHT_MULTIPLIER$$module$build$src$core$renderers$common$marker_svg;const e=this.constants_.CURSOR_BLOCK_PADDING;a.previousConnection?(c=this.constants_.shapeFor(a.previousConnection),this.positionPrevious_(b,e,d,c)):a.outputConnection?(d=this.constants_.shapeFor(a.outputConnection),this.positionOutput_(b,c,d)):this.positionBlock_(b,e,d);this.setParent_(a);this.showCurrent_()}showWithBlock_(a){this.showWithBlockPrevOutput(a)}showWithPrevious_(a){this.showWithBlockPrevOutput(a)}showWithOutput_(a){this.showWithBlockPrevOutput(a)}showWithCoordinates_(a){var b=
1198
- a.getWsCoordinate();a=b.x;b=b.y;this.workspace.RTL&&(a-=this.constants_.CURSOR_WS_WIDTH);this.positionLine_(a,b,this.constants_.CURSOR_WS_WIDTH);this.setParent_(this.workspace);this.showCurrent_()}showWithField_(a){a=a.getLocation();const b=a.getSize().width,c=a.getSize().height;this.positionRect_(0,0,b,c);this.setParent_(a);this.showCurrent_()}showWithInput_(a){a=a.getLocation();const b=a.getSourceBlock();this.positionInput_(a);this.setParent_(b);this.showCurrent_()}showWithNext_(a){var b=a.getLocation();
1199
- a=b.getSourceBlock();let c=0;b=b.getOffsetInBlock().y;const d=a.getHeightWidth().width;this.workspace.RTL&&(c=-d);this.positionLine_(c,b,d);this.setParent_(a);this.showCurrent_()}showWithStack_(a){a=a.getLocation();var b=a.getHeightWidth();const c=b.width+this.constants_.CURSOR_STACK_PADDING;b=b.height+this.constants_.CURSOR_STACK_PADDING;const d=-this.constants_.CURSOR_STACK_PADDING/2,e=-this.constants_.CURSOR_STACK_PADDING/2;let f=d;this.workspace.RTL&&(f=-(c+d));this.positionRect_(f,e,c,b);this.setParent_(a);
1200
- this.showCurrent_()}showWithButton_(a){a=a.getLocation();const b=a.width+this.constants_.CURSOR_STACK_PADDING,c=a.height+this.constants_.CURSOR_STACK_PADDING,d=-this.constants_.CURSOR_STACK_PADDING/2,e=-this.constants_.CURSOR_STACK_PADDING/2;let f=d;this.workspace.RTL&&(f=-(b+d));this.positionRect_(f,e,b,c);this.setParent_(a);this.showCurrent_()}showCurrent_(){this.hide();this.currentMarkerSvg&&(this.currentMarkerSvg.style.display="")}positionBlock_(a,b,c){a=moveBy$$module$build$src$core$utils$svg_paths(-b,
1201
- c)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",-b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",a+2*b)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",c);if(!this.markerBlock_)throw Error("createDom should be called before positioning the marker");this.markerBlock_.setAttribute("d",a);this.workspace.RTL&&this.flipRtl(this.markerBlock_);this.currentMarkerSvg=this.markerBlock_}positionInput_(a){const b=a.getOffsetInBlock().x,c=a.getOffsetInBlock().y;a=moveTo$$module$build$src$core$utils$svg_paths(0,
1202
- 0)+this.constants_.shapeFor(a).pathDown;this.markerInput_.setAttribute("d",a);this.markerInput_.setAttribute("transform","translate("+b+","+c+")"+(this.workspace.RTL?" scale(-1 1)":""));this.currentMarkerSvg=this.markerInput_}positionLine_(a,b,c){if(!this.markerSvgLine_)throw Error("createDom should be called before positioning the line");this.markerSvgLine_.setAttribute("x",`${a}`);this.markerSvgLine_.setAttribute("y",`${b}`);this.markerSvgLine_.setAttribute("width",`${c}`);this.currentMarkerSvg=
1203
- this.markerSvgLine_}positionOutput_(a,b,c){if(!this.markerBlock_)throw Error("createDom should be called before positioning the output");a=moveBy$$module$build$src$core$utils$svg_paths(a,0)+lineOnAxis$$module$build$src$core$utils$svg_paths("h",-(a-c.width))+lineOnAxis$$module$build$src$core$utils$svg_paths("v",this.constants_.TAB_OFFSET_FROM_TOP)+c.pathDown+lineOnAxis$$module$build$src$core$utils$svg_paths("V",b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",a);this.markerBlock_.setAttribute("d",
1204
- a);this.workspace.RTL&&this.flipRtl(this.markerBlock_);this.currentMarkerSvg=this.markerBlock_}positionPrevious_(a,b,c,d){if(!this.markerBlock_)throw Error("createDom should be called before positioning the previous connection marker");a=moveBy$$module$build$src$core$utils$svg_paths(-b,c)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",-b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",this.constants_.NOTCH_OFFSET_LEFT)+d.pathLeft+lineOnAxis$$module$build$src$core$utils$svg_paths("H",
1191
+ this.showWithButton_(a)}showWithBlockPrevOutput(a){a=a.getSourceBlock();const b=a.width;var c=a.height,d=c*HEIGHT_MULTIPLIER$$module$build$src$core$renderers$common$marker_svg;const e=this.constants_.CURSOR_BLOCK_PADDING;a.previousConnection?(c=this.constants_.shapeFor(a.previousConnection),this.positionPrevious_(b,e,d,c)):a.outputConnection?(d=this.constants_.shapeFor(a.outputConnection),this.positionOutput_(b,c,d)):this.positionBlock_(b,e,d);this.setParent_(a);this.showCurrent_()}showWithBlock_(a){this.showWithBlockPrevOutput(a)}showWithPrevious_(a){this.showWithBlockPrevOutput(a)}showWithOutput_(a){this.showWithBlockPrevOutput(a)}showWithCoordinates_(a){const b=
1192
+ a.getWsCoordinate();var c;a=null!=(c=null==b?void 0:b.x)?c:0;let d;c=null!=(d=null==b?void 0:b.y)?d:0;this.workspace.RTL&&(a-=this.constants_.CURSOR_WS_WIDTH);this.positionLine_(a,c,this.constants_.CURSOR_WS_WIDTH);this.setParent_(this.workspace);this.showCurrent_()}showWithField_(a){a=a.getLocation();const b=a.getSize().width,c=a.getSize().height;this.positionRect_(0,0,b,c);this.setParent_(a);this.showCurrent_()}showWithInput_(a){a=a.getLocation();const b=a.getSourceBlock();this.positionInput_(a);
1193
+ this.setParent_(b);this.showCurrent_()}showWithNext_(a){var b=a.getLocation();a=b.getSourceBlock();let c=0;b=b.getOffsetInBlock().y;const d=a.getHeightWidth().width;this.workspace.RTL&&(c=-d);this.positionLine_(c,b,d);this.setParent_(a);this.showCurrent_()}showWithStack_(a){a=a.getLocation();var b=a.getHeightWidth();const c=b.width+this.constants_.CURSOR_STACK_PADDING;b=b.height+this.constants_.CURSOR_STACK_PADDING;const d=-this.constants_.CURSOR_STACK_PADDING/2,e=-this.constants_.CURSOR_STACK_PADDING/
1194
+ 2;let f=d;this.workspace.RTL&&(f=-(c+d));this.positionRect_(f,e,c,b);this.setParent_(a);this.showCurrent_()}showWithButton_(a){a=a.getLocation();const b=a.width+this.constants_.CURSOR_STACK_PADDING,c=a.height+this.constants_.CURSOR_STACK_PADDING,d=-this.constants_.CURSOR_STACK_PADDING/2,e=-this.constants_.CURSOR_STACK_PADDING/2;let f=d;this.workspace.RTL&&(f=-(b+d));this.positionRect_(f,e,b,c);this.setParent_(a);this.showCurrent_()}showCurrent_(){this.hide();this.currentMarkerSvg&&(this.currentMarkerSvg.style.display=
1195
+ "")}positionBlock_(a,b,c){a=moveBy$$module$build$src$core$utils$svg_paths(-b,c)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",-b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",a+2*b)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",c);if(!this.markerBlock_)throw Error("createDom should be called before positioning the marker");this.markerBlock_.setAttribute("d",a);this.workspace.RTL&&this.flipRtl(this.markerBlock_);this.currentMarkerSvg=this.markerBlock_}positionInput_(a){const b=
1196
+ a.getOffsetInBlock().x,c=a.getOffsetInBlock().y;a=moveTo$$module$build$src$core$utils$svg_paths(0,0)+this.constants_.shapeFor(a).pathDown;this.markerInput_.setAttribute("d",a);this.markerInput_.setAttribute("transform","translate("+b+","+c+")"+(this.workspace.RTL?" scale(-1 1)":""));this.currentMarkerSvg=this.markerInput_}positionLine_(a,b,c){if(!this.markerSvgLine_)throw Error("createDom should be called before positioning the line");this.markerSvgLine_.setAttribute("x",`${a}`);this.markerSvgLine_.setAttribute("y",
1197
+ `${b}`);this.markerSvgLine_.setAttribute("width",`${c}`);this.currentMarkerSvg=this.markerSvgLine_}positionOutput_(a,b,c){if(!this.markerBlock_)throw Error("createDom should be called before positioning the output");a=moveBy$$module$build$src$core$utils$svg_paths(a,0)+lineOnAxis$$module$build$src$core$utils$svg_paths("h",-(a-c.width))+lineOnAxis$$module$build$src$core$utils$svg_paths("v",this.constants_.TAB_OFFSET_FROM_TOP)+c.pathDown+lineOnAxis$$module$build$src$core$utils$svg_paths("V",b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",
1198
+ a);this.markerBlock_.setAttribute("d",a);this.workspace.RTL&&this.flipRtl(this.markerBlock_);this.currentMarkerSvg=this.markerBlock_}positionPrevious_(a,b,c,d){if(!this.markerBlock_)throw Error("createDom should be called before positioning the previous connection marker");a=moveBy$$module$build$src$core$utils$svg_paths(-b,c)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",-b)+lineOnAxis$$module$build$src$core$utils$svg_paths("H",this.constants_.NOTCH_OFFSET_LEFT)+d.pathLeft+lineOnAxis$$module$build$src$core$utils$svg_paths("H",
1205
1199
  a+2*b)+lineOnAxis$$module$build$src$core$utils$svg_paths("V",c);this.markerBlock_.setAttribute("d",a);this.workspace.RTL&&this.flipRtl(this.markerBlock_);this.currentMarkerSvg=this.markerBlock_}positionRect_(a,b,c,d){if(!this.markerSvgRect_)throw Error("createDom should be called before positioning the rect");this.markerSvgRect_.setAttribute("x",`${a}`);this.markerSvgRect_.setAttribute("y",`${b}`);this.markerSvgRect_.setAttribute("width",`${c}`);this.markerSvgRect_.setAttribute("height",`${d}`);this.currentMarkerSvg=
1206
1200
  this.markerSvgRect_}flipRtl(a){a.setAttribute("transform","scale(-1 1)")}hide(){if(!(this.markerSvgLine_&&this.markerSvgRect_&&this.markerInput_&&this.markerBlock_))throw Error("createDom should be called before hiding the marker");this.markerSvgLine_.style.display="none";this.markerSvgRect_.style.display="none";this.markerInput_.style.display="none";this.markerBlock_.style.display="none"}fireMarkerEvent(a,b){const c=b.getSourceBlock();a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.MARKER_MOVE))(c,
1207
1201
  this.isCursor(),a,b);fire$$module$build$src$core$events$utils(a)}getBlinkProperties_(){return{attributeType:"XML",attributeName:"fill",dur:"1s",values:this.colour_+";transparent;transparent;",repeatCount:"indefinite"}}createDomInternal_(){this.markerSvg_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{width:this.constants_.CURSOR_WS_WIDTH,height:this.constants_.WS_CURSOR_HEIGHT},this.svgGroup_);this.markerSvgLine_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,
@@ -1210,8 +1204,8 @@ this.isCursor(),a,b);fire$$module$build$src$core$events$utils(a)}getBlinkPropert
1210
1204
  a,{attributeName:"stroke"}),this.markerBlock_)}return this.markerSvg_}applyColour_(a){if(!(this.markerSvgLine_&&this.markerSvgRect_&&this.markerInput_&&this.markerBlock_))throw Error("createDom should be called before applying color to the markerj");this.markerSvgLine_.setAttribute("fill",this.colour_);this.markerSvgRect_.setAttribute("stroke",this.colour_);this.markerInput_.setAttribute("fill",this.colour_);this.markerBlock_.setAttribute("stroke",this.colour_);this.isCursor()&&(a=this.colour_+";transparent;transparent;",
1211
1205
  this.markerSvgLine_.firstElementChild.setAttribute("values",a),this.markerInput_.firstElementChild.setAttribute("values",a),this.markerBlock_.firstElementChild.setAttribute("values",a))}dispose(){this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_)}},module$build$src$core$renderers$common$marker_svg={};module$build$src$core$renderers$common$marker_svg.MarkerSvg=MarkerSvg$$module$build$src$core$renderers$common$marker_svg;var PathObject$$module$build$src$core$renderers$common$path_object=class{constructor(a,b,c){this.markerSvg=this.cursorSvg=null;this.connectionHighlights=new WeakMap;this.highlightOffsets=new WeakMap;this.constants=c;this.style=b;this.svgRoot=a;this.svgPath=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyPath"},this.svgRoot);this.setClass_("blocklyBlock",!0)}setPath(a){this.svgPath.setAttribute("d",a)}flipRTL(){this.svgPath.setAttribute("transform",
1212
1206
  "scale(-1 1)")}setCursorSvg(a){a?(this.svgRoot.appendChild(a),this.cursorSvg=a):this.cursorSvg=null}setMarkerSvg(a){a?(this.cursorSvg?this.svgRoot.insertBefore(a,this.cursorSvg):this.svgRoot.appendChild(a),this.markerSvg=a):this.markerSvg=null}applyColour(a){this.svgPath.setAttribute("stroke",this.style.colourTertiary);this.svgPath.setAttribute("fill",this.style.colourPrimary);this.updateShadow_(a.isShadow());this.updateDisabled_(!a.isEnabled()||a.getInheritedDisabled())}setStyle(a){this.style=a}setClass_(a,
1213
- b){a&&(b?addClass$$module$build$src$core$utils$dom(this.svgRoot,a):removeClass$$module$build$src$core$utils$dom(this.svgRoot,a))}updateHighlighted(a){a?this.setClass_("blocklyHighlighted",!0):this.setClass_("blocklyHighlighted",!1)}updateShadow_(a){a?(this.setClass_("blocklyShadow",!0),this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary)):this.setClass_("blocklyShadow",!1)}updateDisabled_(a){this.setClass_("blocklyDisabled",a)}updateSelected(a){this.setClass_("blocklySelected",
1214
- a)}updateDraggingDelete(a){this.setClass_("blocklyDraggingDelete",a)}updateInsertionMarker(a){this.setClass_("blocklyInsertionMarker",a)}updateMovable(a){this.setClass_("blocklyDraggable",a)}updateReplacementFade(a){this.setClass_("blocklyReplaceable",a)}updateShapeForInputHighlight(a,b){}addConnectionHighlight(a,b,c,d){if(this.connectionHighlights.has(a)){if(this.currentHighlightMatchesNew(a,b,c))return;this.removeConnectionHighlight(a)}b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,
1207
+ b){a&&(b?addClass$$module$build$src$core$utils$dom(this.svgRoot,a):removeClass$$module$build$src$core$utils$dom(this.svgRoot,a))}updateHighlighted(a){a?this.setClass_("blocklyHighlighted",!0):this.setClass_("blocklyHighlighted",!1)}updateShadow_(a){a?(this.setClass_("blocklyShadow",!0),this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary)):this.setClass_("blocklyShadow",!1)}updateDisabled_(a){this.setClass_("blocklyDisabled",a);this.setClass_("blocklyDisabledPattern",
1208
+ a)}updateSelected(a){this.setClass_("blocklySelected",a)}updateDraggingDelete(a){this.setClass_("blocklyDraggingDelete",a)}updateInsertionMarker(a){this.setClass_("blocklyInsertionMarker",a)}updateMovable(a){this.setClass_("blocklyDraggable",a)}updateReplacementFade(a){this.setClass_("blocklyReplaceable",a)}updateShapeForInputHighlight(a,b){}addConnectionHighlight(a,b,c,d){if(this.connectionHighlights.has(a)){if(this.currentHighlightMatchesNew(a,b,c))return;this.removeConnectionHighlight(a)}b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,
1215
1209
  {"class":"blocklyHighlightedConnectionPath",d:b,transform:`translate(${c.x}, ${c.y})`+(d?" scale(-1 1)":"")},this.svgRoot);this.connectionHighlights.set(a,b)}currentHighlightMatchesNew(a,b,c){let d;const e=null==(d=this.connectionHighlights.get(a))?void 0:d.getAttribute("d");a=this.highlightOffsets.get(a);return e===b&&Coordinate$$module$build$src$core$utils$coordinate.equals(a,c)}removeConnectionHighlight(a){const b=this.connectionHighlights.get(a);b&&(removeNode$$module$build$src$core$utils$dom(b),
1216
1210
  this.connectionHighlights.delete(a))}},module$build$src$core$renderers$common$path_object={};module$build$src$core$renderers$common$path_object.PathObject=PathObject$$module$build$src$core$renderers$common$path_object;var Renderer$$module$build$src$core$renderers$common$renderer=class{constructor(a){this.overrides=null;this.name=a}getClassName(){return this.name+"-renderer"}init(a,b){this.constants_=this.makeConstants_();b&&(this.overrides=b,Object.assign(this.constants_,b));this.constants_.setTheme(a);this.constants_.init()}createDom(a,b,c){this.constants_.createDom(a,this.name+"-"+b.name,"."+this.getClassName()+"."+b.getClassName(),c)}refreshDom(a,b,c){const d=this.getConstants();d.dispose();this.constants_=
1217
1211
  this.makeConstants_();this.overrides&&Object.assign(this.constants_,this.overrides);this.constants_.randomIdentifier=d.randomIdentifier;this.constants_.setTheme(b);this.constants_.init();this.createDom(a,b,c)}dispose(){this.constants_&&this.constants_.dispose()}makeConstants_(){return new ConstantProvider$$module$build$src$core$renderers$common$constants}makeRenderInfo_(a){return new RenderInfo$$module$build$src$core$renderers$common$info(this,a)}makeDrawer_(a,b){return new Drawer$$module$build$src$core$renderers$common$drawer(a,
@@ -1267,7 +1261,7 @@ this.scale;do{const e=getRelativeXY$$module$build$src$core$utils$svg_math(a);if(
1267
1261
  this.svgGroup_;for(;a;){if((" "+(a.getAttribute("class")||"")+" ").includes(" injectionDiv ")){this.injectionDiv=a;break}a=a.parentNode}}return this.injectionDiv}getSvgGroup(){return this.svgGroup_}getBlockCanvas(){return this.getCanvas()}setResizeHandlerWrapper(a){this.resizeHandlerWrapper=a}createDom(a,b){this.injectionDiv||(this.injectionDiv=null!=b?b:null);this.svgGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyWorkspace"});a&&(this.svgBackground_=
1268
1262
  createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{height:"100%",width:"100%","class":a},this.svgGroup_),"blocklyMainBackground"===a&&this.grid?this.svgBackground_.style.fill="var(--blocklyGridPattern)":this.themeManager_.subscribe(this.svgBackground_,"workspaceBackgroundColour","fill"));this.layerManager=new LayerManager$$module$build$src$core$layer_manager(this);this.svgBlockCanvas_=this.layerManager.getBlockLayer();this.svgBubbleCanvas_=this.layerManager.getBubbleLayer();
1269
1263
  this.isFlyout||(conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,"pointerdown",this,this.onMouseDown,!1),this.dummyWheelListener=()=>{},document.body.addEventListener("wheel",this.dummyWheelListener),conditionalBind$$module$build$src$core$browser_events(this.svgGroup_,"wheel",this,this.onMouseWheel));this.options.hasCategories&&(this.toolbox=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,this.options,!0))(this));this.grid&&
1270
- this.grid.update(this.scale);this.recordDragTargets();(a=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,this.options))&&this.markerManager.setCursor(new a);a=null===this.options.parentWorkspace;this.renderer.createDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0);return this.svgGroup_}dispose(){this.rendered=!1;this.currentGesture_&&this.currentGesture_.cancel();this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_);
1264
+ this.grid.update(this.scale);this.recordDragTargets();(a=getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,this.options))&&this.markerManager.setCursor(new a(this));a=null===this.options.parentWorkspace;this.renderer.createDom(this.svgGroup_,this.getTheme(),a?this.getInjectionDiv():void 0);return this.svgGroup_}dispose(){this.rendered=!1;this.currentGesture_&&this.currentGesture_.cancel();this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_);
1271
1265
  this.toolbox&&(this.toolbox.dispose(),this.toolbox=null);this.flyout&&(this.flyout.dispose(),this.flyout=null);this.trashcan&&(this.trashcan.dispose(),this.trashcan=null);this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null);this.zoomControls_&&this.zoomControls_.dispose();this.audioManager&&this.audioManager.dispose();this.grid&&(this.grid=null);this.renderer.dispose();this.markerManager&&this.markerManager.dispose();super.dispose();this.themeManager_&&(this.themeManager_.unsubscribeWorkspace(this),
1272
1266
  this.themeManager_.unsubscribe(this.svgBackground_),this.options.parentWorkspace||this.themeManager_.dispose());this.connectionDBList.length=0;this.toolboxCategoryCallbacks.clear();this.flyoutButtonCallbacks.clear();if(!this.options.parentWorkspace){const a=this.getParentSvg();a&&a.parentNode&&removeNode$$module$build$src$core$utils$dom(a.parentNode)}this.resizeHandlerWrapper&&(unbind$$module$build$src$core$browser_events(this.resizeHandlerWrapper),this.resizeHandlerWrapper=null);this.dummyWheelListener&&
1273
1267
  (document.body.removeEventListener("wheel",this.dummyWheelListener),this.dummyWheelListener=null)}addTrashcan(){this.trashcan=WorkspaceSvg$$module$build$src$core$workspace_svg.newTrashcan(this);const a=this.trashcan.createDom();this.svgGroup_.insertBefore(a,this.getCanvas())}static newTrashcan(a){throw Error("The implementation of newTrashcan should be monkey-patched in by blockly.ts");}addZoomControls(){this.zoomControls_=new ZoomControls$$module$build$src$core$zoom_controls(this);const a=this.zoomControls_.createDom();
@@ -1301,7 +1295,8 @@ super.addTopBlock(a)}removeTopBlock(a){this.removeTopBoundedElement(a);super.rem
1301
1295
  typeof b)throw TypeError("Toolbox category callbacks must be functions.");this.toolboxCategoryCallbacks.set(a,b)}getToolboxCategoryCallback(a){return this.toolboxCategoryCallbacks.get(a)||null}removeToolboxCategoryCallback(a){this.toolboxCategoryCallbacks.delete(a)}getGesture(a){const b="pointerdown"===a.type,c=this.currentGesture_;return c?b&&c.hasStarted()?(console.warn("Tried to start the same gesture twice."),c.cancel(),null):c:b?this.currentGesture_=new Gesture$$module$build$src$core$gesture(a,
1302
1296
  this):null}clearGesture(){this.currentGesture_=null}cancelCurrentGesture(){this.currentGesture_&&this.currentGesture_.cancel()}getAudioManager(){return this.audioManager}getGrid(){return this.grid}hideChaff(a=!1){hide$$module$build$src$core$tooltip();hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv(this);hideWithoutAnimation$$module$build$src$core$dropdowndiv();this.hideComponents(a)}hideComponents(a=!1){this.getComponentManager().getComponents(ComponentManager$$module$build$src$core$component_manager.Capability.AUTOHIDEABLE,
1303
1297
  !0).forEach(b=>b.autoHide(a))}static setTopLevelWorkspaceMetrics(a){const b=this.getMetrics();"number"===typeof a.x&&(this.scrollX=-(b.scrollLeft+(b.scrollWidth-b.viewWidth)*a.x));"number"===typeof a.y&&(this.scrollY=-(b.scrollTop+(b.scrollHeight-b.viewHeight)*a.y));this.translate(this.scrollX+b.absoluteLeft,this.scrollY+b.absoluteTop)}addClass(a){this.injectionDiv&&addClass$$module$build$src$core$utils$dom(this.injectionDiv,a)}removeClass(a){this.injectionDiv&&removeClass$$module$build$src$core$utils$dom(this.injectionDiv,
1304
- a)}setIsReadOnly(a){super.setIsReadOnly(a);a?this.addClass("blocklyReadOnly"):this.removeClass("blocklyReadOnly")}},module$build$src$core$workspace_svg={};module$build$src$core$workspace_svg.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$workspace_svg.resizeSvgContents=resizeSvgContents$$module$build$src$core$workspace_svg;var VarBase$$module$build$src$core$events$events_var_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank="undefined"===typeof a;a&&(this.varId=a.getId(),this.workspaceId=a.getWorkspace().id)}toJson(){const a=super.toJson();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");a.varId=this.varId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarBase$$module$build$src$core$events$events_var_base);
1298
+ a)}setIsReadOnly(a){super.setIsReadOnly(a);a?this.addClass("blocklyReadOnly"):this.removeClass("blocklyReadOnly")}scrollBoundsIntoView(a,b=10){if(!Gesture$$module$build$src$core$gesture.inProgress()){var c=this.getScale(),d=this.getMetricsManager().getViewMetrics(!0);d=new Rect$$module$build$src$core$utils$rect(d.top,d.top+d.height,d.left,d.left+d.width);if(!(a.left>=d.left&&a.top>=d.top&&a.right<=d.right&&a.bottom<=d.bottom)){a=a.clone();a.top-=b;a.bottom+=b;a.left-=b;a.right+=b;var e=b=0;a.left<
1299
+ d.left?b=d.left-a.left:a.right>d.right&&(b=d.right-a.right);a.top<d.top?e=d.top-a.top:a.bottom>d.bottom&&(e=d.bottom-a.bottom);this.scroll(this.scrollX+b*c,this.scrollY+e*c)}}}},module$build$src$core$workspace_svg={};module$build$src$core$workspace_svg.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$workspace_svg.resizeSvgContents=resizeSvgContents$$module$build$src$core$workspace_svg;var VarBase$$module$build$src$core$events$events_var_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank="undefined"===typeof a;a&&(this.varId=a.getId(),this.workspaceId=a.getWorkspace().id)}toJson(){const a=super.toJson();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");a.varId=this.varId;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarBase$$module$build$src$core$events$events_var_base);
1305
1300
  b.varId=a.varId;return b}},module$build$src$core$events$events_var_base={};module$build$src$core$events$events_var_base.VarBase=VarBase$$module$build$src$core$events$events_var_base;var VarCreate$$module$build$src$core$events$events_var_create=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.VAR_CREATE;a&&(this.varType=a.getType(),this.varName=a.getName())}toJson(){const a=super.toJson();if(void 0===this.varType)throw Error("The var type is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");
1306
1301
  a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=super.fromJson(a,b,null!=c?c:new VarCreate$$module$build$src$core$events$events_var_create);b.varType=a.varType;b.varName=a.varName;return b}run(a){const b=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");a?b.createVariable(this.varName,
1307
1302
  this.varType,this.varId):b.deleteVariableById(this.varId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_CREATE,VarCreate$$module$build$src$core$events$events_var_create);var module$build$src$core$events$events_var_create={};module$build$src$core$events$events_var_create.VarCreate=VarCreate$$module$build$src$core$events$events_var_create;var VariableModel$$module$build$src$core$variable_model=class{constructor(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id=d||genUid$$module$build$src$core$utils$idgenerator()}getId(){return this.id}getName(){return this.name}setName(a){this.name=a;return this}getType(){return this.type}setType(a){this.type=a;return this}getWorkspace(){return this.workspace}save(){const a={name:this.getName(),id:this.getId()},b=this.getType();b&&(a.type=b);return a}static load(a,b){a=new this(b,a.name,
@@ -1376,7 +1371,7 @@ tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},b);createSvgElement$$module$bui
1376
1371
  in2:"outGlow",operator:"over"},a);this.replacementGlowFilterId=a.id;this.replacementGlowFilter=a;d&&(d.style.setProperty("--blocklySelectedGlowFilter",`url(#${this.selectedGlowFilterId})`),d.style.setProperty("--blocklyReplacementGlowFilter",`url(#${this.replacementGlowFilterId})`))}getCSS_(a){return[`${a} .blocklyText,`,`${a} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}`+`pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a} .blocklyTextInputBubble textarea {`,
1377
1372
  "font-weight: normal;","}",`${a} .blocklyText {`,"fill: #fff;","}",`${a} .blocklyNonEditableField>rect:not(.blocklyDropdownRect),`,`${a} .blocklyEditableField>rect:not(.blocklyDropdownRect) {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"}",`${a} .blocklyNonEditableField>text,`,`${a} .blocklyEditableField>text,`,`${a} .blocklyNonEditableField>g>text,`,`${a} .blocklyEditableField>g>text {`,"fill: #575E75;","}",`${a} .blocklyFlyoutLabelText {`,"fill: #575E75;","}",`${a} .blocklyText.blocklyBubbleText {`,
1378
1373
  "fill: #575E75;","}",`${a} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableField:not(.blocklyEditing):hover>rect,",`${a} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableField:not(.blocklyEditing):hover>.blocklyPath {","stroke: #fff;","stroke-width: 2;","}",`${a} .blocklyHtmlInput {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"color: #575E75;","}",`${a} .blocklyDropdownText {`,"fill: #fff !important;","}",`${a}.blocklyWidgetDiv .blocklyMenuItem,`,
1379
- `${a}.blocklyDropDownDiv .blocklyMenuItem {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a}.blocklyDropDownDiv .blocklyMenuItemContent {`,"color: #fff;","}",`${a} .blocklyHighlightedConnectionPath {`,`stroke: ${this.SELECTED_GLOW_COLOUR};`,"}",`${a} .blocklyDisabled > .blocklyOutlinePath {`,"fill: var(--blocklyDisabledPattern)","}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}",`${a} .blocklySelected>.blocklyPath.blocklyPathSelected {`,
1374
+ `${a}.blocklyDropDownDiv .blocklyMenuItem {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${a}.blocklyDropDownDiv .blocklyMenuItemContent {`,"color: #fff;","}",`${a} .blocklyHighlightedConnectionPath {`,`stroke: ${this.SELECTED_GLOW_COLOUR};`,"}",`${a} .blocklyDisabledPattern > .blocklyOutlinePath {`,"fill: var(--blocklyDisabledPattern)","}",`${a} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}",`${a} .blocklySelected>.blocklyPath.blocklyPathSelected {`,
1380
1375
  "fill: none;","filter: var(--blocklySelectedGlowFilter);","}",`${a} .blocklyReplaceable>.blocklyPath {`,"filter: var(--blocklyReplacementGlowFilter);","}"]}},module$build$src$core$renderers$zelos$constants={};module$build$src$core$renderers$zelos$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$zelos$constants;var Drawer$$module$build$src$core$renderers$zelos$drawer=class extends Drawer$$module$build$src$core$renderers$common$drawer{constructor(a,b){super(a,b)}draw(){const a=this.block_.pathObject;a.beginDrawing();this.drawOutline_();this.drawInternals_();this.updateConnectionHighlights();a.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&a.flipRTL();this.recordSizeOnBlock_();this.info_.outputConnection&&(a.outputShapeType=this.info_.outputConnection.shape.type);a.endDrawing()}drawOutline_(){this.info_.outputConnection&&
1381
1376
  this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):super.drawOutline_()}drawLeft_(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():super.drawLeft_()}drawRightSideRow_(a){if(!(0>=a.height)){if(Types$$module$build$src$core$renderers$measurables$types.isSpacer(a)){const d=
1382
1377
  a.precedesStatement;var b=a.followsStatement;if(d||b){const e=this.constants_.INSIDE_CORNERS;var c=e.rightHeight;c=a.height-(d?c:0);b=b?e.pathBottomRight:"";a=0<c?lineOnAxis$$module$build$src$core$utils$svg_paths("V",a.yPos+c):"";this.outlinePath_+=b+a+(d?e.pathTopRight:"");return}}this.outlinePath_+=lineOnAxis$$module$build$src$core$utils$svg_paths("V",a.yPos+a.height)}}drawRightDynamicConnection_(){if(!this.info_.outputConnection)throw Error("Cannot draw the output connection of a block that doesn't have one");
@@ -1402,11 +1397,11 @@ this.workspace_);this.htmlInput_=this.widgetCreate_();this.isBeingEdited_=!0;thi
1402
1397
  1*d+"px solid "+a,b.style.borderRadius=e,b.style.transition="box-shadow 0.25s ease 0s",this.getConstants().FIELD_TEXTINPUT_BOX_SHADOW&&(b.style.boxShadow="rgba(255, 255, 255, 0.3) 0 0 0 "+4*d+"px"));c.style.borderRadius=e;b.appendChild(c);c.value=c.defaultValue=this.getEditorText_(this.value_);c.setAttribute("data-untyped-default-value",String(this.value_));this.resizeEditor_();this.bindInputEvents_(c);return c}widgetDispose_(){this.isBeingEdited_=!1;this.isTextValid_=!0;this.forceRerender();this.onFinishEditing_(this.value_);
1403
1398
  this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&null!==this.valueWhenEditorWasOpened_&&this.valueWhenEditorWasOpened_!==this.value_&&(fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CHANGE))(this.sourceBlock_,"field",this.name||null,this.valueWhenEditorWasOpened_,this.value_)),this.valueWhenEditorWasOpened_=null);$.setGroup$$module$build$src$core$events$utils(!1);this.unbindInputEvents_();
1404
1399
  var a=getDiv$$module$build$src$core$widgetdiv().style;a.width="auto";a.height="auto";a.fontSize="";a.transition="";a.boxShadow="";this.htmlInput_=null;a=this.getClickTarget_();if(!a)throw Error("A click target has not been set.");removeClass$$module$build$src$core$utils$dom(a,"blocklyEditing")}onFinishEditing_(a){}bindInputEvents_(a){this.onKeyDownWrapper=conditionalBind$$module$build$src$core$browser_events(a,"keydown",this,this.onHtmlInputKeyDown_);this.onKeyInputWrapper=conditionalBind$$module$build$src$core$browser_events(a,
1405
- "input",this,this.onHtmlInputChange)}unbindInputEvents_(){this.onKeyDownWrapper&&(unbind$$module$build$src$core$browser_events(this.onKeyDownWrapper),this.onKeyDownWrapper=null);this.onKeyInputWrapper&&(unbind$$module$build$src$core$browser_events(this.onKeyInputWrapper),this.onKeyInputWrapper=null)}onHtmlInputKeyDown_(a){"Enter"===a.key?(hideIfOwner$$module$build$src$core$widgetdiv(this),hideWithoutAnimation$$module$build$src$core$dropdowndiv()):"Escape"===a.key?(this.setValue(this.htmlInput_.getAttribute("data-untyped-default-value"),
1406
- !1),hideIfOwner$$module$build$src$core$widgetdiv(this),hideWithoutAnimation$$module$build$src$core$dropdowndiv()):"Tab"===a.key&&(hideIfOwner$$module$build$src$core$widgetdiv(this),hideWithoutAnimation$$module$build$src$core$dropdowndiv(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())}onHtmlInputChange(a){a=this.value_;this.setValue(this.getValueFromEditorText_(this.htmlInput_.value),!1);this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&this.value_!==a&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE))(this.sourceBlock_,
1407
- this.name||null,a,this.value_))}setEditorValue_(a,b=!0){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a,b)}resizeEditor_(){finishQueuedRenders$$module$build$src$core$render_management().then(()=>{const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;const b=getDiv$$module$build$src$core$widgetdiv(),c=this.getScaledBBox();b.style.width=c.right-c.left+"px";b.style.height=c.bottom-c.top+"px";const d=c.top;
1408
- b.style.left=`${a.RTL?c.right-b.offsetWidth:c.left}px`;b.style.top=`${d}px`})}repositionForWindowResize(){let a;const b=null==(a=this.getSourceBlock())?void 0:a.getRootBlock();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace_,this.workspace_.getMetricsManager().getViewMetrics(!0),b)||this.resizeEditor_();return!0}isTabNavigable(){return!0}getText_(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:
1409
- null}getEditorText_(a){return`${a}`}getValueFromEditorText_(a){return a}};FieldInput$$module$build$src$core$field_input.BORDERRADIUS=4;var module$build$src$core$field_input={};module$build$src$core$field_input.FieldInput=FieldInput$$module$build$src$core$field_input;$.FieldTextInput$$module$build$src$core$field_textinput=class extends FieldInput$$module$build$src$core$field_input{constructor(a,b,c){super(a,b,c)}initView(){super.initView();this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyTextInputField")}doClassValidation_(a){return void 0===a?null:`${a}`}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};
1400
+ "input",this,this.onHtmlInputChange)}unbindInputEvents_(){this.onKeyDownWrapper&&(unbind$$module$build$src$core$browser_events(this.onKeyDownWrapper),this.onKeyDownWrapper=null);this.onKeyInputWrapper&&(unbind$$module$build$src$core$browser_events(this.onKeyInputWrapper),this.onKeyInputWrapper=null)}onHtmlInputKeyDown_(a){"Enter"===a.key?(hideIfOwner$$module$build$src$core$widgetdiv(this),hideWithoutAnimation$$module$build$src$core$dropdowndiv()):"Escape"===a.key&&(this.setValue(this.htmlInput_.getAttribute("data-untyped-default-value"),
1401
+ !1),hideIfOwner$$module$build$src$core$widgetdiv(this),hideWithoutAnimation$$module$build$src$core$dropdowndiv())}onHtmlInputChange(a){a=this.value_;this.setValue(this.getValueFromEditorText_(this.htmlInput_.value),!1);this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&this.value_!==a&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE))(this.sourceBlock_,this.name||null,
1402
+ a,this.value_))}setEditorValue_(a,b=!0){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a,b)}resizeEditor_(){finishQueuedRenders$$module$build$src$core$render_management().then(()=>{const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;const b=getDiv$$module$build$src$core$widgetdiv(),c=this.getScaledBBox();b.style.width=c.right-c.left+"px";b.style.height=c.bottom-c.top+"px";const d=c.top;b.style.left=`${a.RTL?
1403
+ c.right-b.offsetWidth:c.left}px`;b.style.top=`${d}px`})}repositionForWindowResize(){let a;const b=null==(a=this.getSourceBlock())?void 0:a.getRootBlock();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace_,this.workspace_.getMetricsManager().getViewMetrics(!0),b)||this.resizeEditor_();return!0}getText_(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null}getEditorText_(a){return`${a}`}getValueFromEditorText_(a){return a}};
1404
+ FieldInput$$module$build$src$core$field_input.BORDERRADIUS=4;var module$build$src$core$field_input={};module$build$src$core$field_input.FieldInput=FieldInput$$module$build$src$core$field_input;$.FieldTextInput$$module$build$src$core$field_textinput=class extends FieldInput$$module$build$src$core$field_input{constructor(a,b,c){super(a,b,c)}initView(){super.initView();this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyTextInputField")}doClassValidation_(a){return void 0===a?null:`${a}`}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};
1410
1405
  register$$module$build$src$core$field_registry("field_input",$.FieldTextInput$$module$build$src$core$field_textinput);$.FieldTextInput$$module$build$src$core$field_textinput.prototype.DEFAULT_VALUE="";var module$build$src$core$field_textinput={};module$build$src$core$field_textinput.FieldTextInput=$.FieldTextInput$$module$build$src$core$field_textinput;var BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row=class extends BottomRow$$module$build$src$core$renderers$measurables$bottom_row{constructor(a){super(a)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(a){return!!a.outputConnection}hasRightSquareCorner(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection}},module$build$src$core$renderers$zelos$measurables$bottom_row={};module$build$src$core$renderers$zelos$measurables$bottom_row.BottomRow=BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row;var StatementInput$$module$build$src$core$renderers$zelos$measurables$inputs=class extends StatementInput$$module$build$src$core$renderers$measurables$statement_input{constructor(a,b){super(a,b);this.connectedBottomNextConnection=!1;if(this.connectedBlock){for(a=this.connectedBlock;b=a.getNextBlock();)a=b;a.nextConnection||(this.height=this.connectedBlockHeight,this.connectedBottomNextConnection=!0)}}},module$build$src$core$renderers$zelos$measurables$inputs={};
1411
1406
  module$build$src$core$renderers$zelos$measurables$inputs.StatementInput=StatementInput$$module$build$src$core$renderers$zelos$measurables$inputs;var RightConnectionShape$$module$build$src$core$renderers$zelos$measurables$row_elements=class extends Measurable$$module$build$src$core$renderers$measurables$base{constructor(a){super(a);this.width=this.height=0;this.type|=Types$$module$build$src$core$renderers$measurables$types.getType("RIGHT_CONNECTION")}},module$build$src$core$renderers$zelos$measurables$row_elements={};module$build$src$core$renderers$zelos$measurables$row_elements.RightConnectionShape=RightConnectionShape$$module$build$src$core$renderers$zelos$measurables$row_elements;var TopRow$$module$build$src$core$renderers$zelos$measurables$top_row=class extends TopRow$$module$build$src$core$renderers$measurables$top_row{constructor(a){super(a)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(a){const b=(a.hat?"cap"===a.hat:this.constants_.ADD_START_HATS)&&!a.outputConnection&&!a.previousConnection;return!!a.outputConnection||b}hasRightSquareCorner(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection}},module$build$src$core$renderers$zelos$measurables$top_row=
1412
1407
  {};module$build$src$core$renderers$zelos$measurables$top_row.TopRow=TopRow$$module$build$src$core$renderers$zelos$measurables$top_row;var RenderInfo$$module$build$src$core$renderers$zelos$info=class extends RenderInfo$$module$build$src$core$renderers$common$info{constructor(a,b){super(a,b);this.isInline=!0;this.renderer_=a;this.constants_=this.renderer_.getConstants();this.topRow=new TopRow$$module$build$src$core$renderers$zelos$measurables$top_row(this.constants_);this.bottomRow=new BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row(this.constants_);this.isMultiRow=!b.getInputsInline()||b.isCollapsed();this.hasStatementInput=
@@ -1454,7 +1449,18 @@ d))),b.push(e))}b=b.join("\n");b=this.finish(b);b=b.replace(/^\s+\n/,"");b=b.rep
1454
1449
  a=this.blockToCode(c);if("string"!==typeof a)throw TypeError("Expecting code from statement block: "+(c&&c.type));a&&(a=this.prefixLines(a,this.INDENT));return a}addLoopTrap(a,b){this.INFINITE_LOOP_TRAP&&(a=this.prefixLines(this.injectId(this.INFINITE_LOOP_TRAP,b),this.INDENT)+a);this.STATEMENT_SUFFIX&&!b.suppressPrefixSuffix&&(a=this.prefixLines(this.injectId(this.STATEMENT_SUFFIX,b),this.INDENT)+a);this.STATEMENT_PREFIX&&!b.suppressPrefixSuffix&&(a+=this.prefixLines(this.injectId(this.STATEMENT_PREFIX,
1455
1450
  b),this.INDENT));return a}injectId(a,b){b=b.id.replace(/\$/g,"$$$$");return a.replace(/%1/g,"'"+b+"'")}addReservedWords(a){this.RESERVED_WORDS_+=a+","}provideFunction_(a,b){if(!this.definitions_[a]){const c=this.nameDB_.getDistinctName(a,$.NameType$$module$build$src$core$names.PROCEDURE);this.functionNames_[a]=c;Array.isArray(b)&&(b=b.join("\n"));b=b.trim().replace(this.FUNCTION_NAME_PLACEHOLDER_REGEXP_,c);let d;for(;d!==b;)d=b,b=b.replace(/^(( {2})*) {2}/gm,"$1\x00");b=b.replace(/\0/g,this.INDENT);
1456
1451
  this.definitions_[a]=b}return this.functionNames_[a]}getVariableName(a){return this.getName(a,$.NameType$$module$build$src$core$names.VARIABLE)}getProcedureName(a){return this.getName(a,$.NameType$$module$build$src$core$names.PROCEDURE)}getName(a,b){if(!this.nameDB_)throw Error("Name database is not defined. You must initialize `nameDB_` in your generator class and call `init` first.");return this.nameDB_.getName(a,b)}init(a){this.definitions_=Object.create(null);this.functionNames_=Object.create(null)}scrub_(a,
1457
- b,c){return b}finish(a){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);return a}scrubNakedValue(a){return a}};module$build$src$core$generator={};module$build$src$core$generator.CodeGenerator=$.CodeGenerator$$module$build$src$core$generator;var VerticalFlyout$$module$build$src$core$flyout_vertical=class extends Flyout$$module$build$src$core$flyout_base{constructor(a){super(a)}setMetrics_(a){if(this.isVisible()){var b=this.workspace_.getMetricsManager(),c=b.getScrollMetrics(),d=b.getViewMetrics();b=b.getAbsoluteMetrics();"number"===typeof a.y&&(this.workspace_.scrollY=-(c.top+(c.height-d.height)*a.y));this.workspace_.translate(this.workspace_.scrollX+b.left,this.workspace_.scrollY+b.top)}}getX(){if(!this.isVisible())return 0;var a=this.targetWorkspace.getMetricsManager();
1452
+ b,c){return b}finish(a){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);return a}scrubNakedValue(a){return a}};module$build$src$core$generator={};module$build$src$core$generator.CodeGenerator=$.CodeGenerator$$module$build$src$core$generator;var FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser=class{static findFocusedNode(a){var b=a.getRootFocusableNode().getFocusableElement();if(hasClass$$module$build$src$core$utils$dom(b,FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.ACTIVE_CLASS_NAME)||hasClass$$module$build$src$core$utils$dom(b,FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.PASSIVE_CSS_CLASS_NAME))return a.getRootFocusableNode();var c=b.querySelector(this.ACTIVE_FOCUS_NODE_CSS_SELECTOR);
1453
+ if(c instanceof HTMLElement||c instanceof SVGElement)if(c=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(c,a))return c;b=b.querySelector(this.PASSIVE_FOCUS_NODE_CSS_SELECTOR);if(b instanceof HTMLElement||b instanceof SVGElement)if(a=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(b,a))return a;return null}static findFocusableNodeFor(a,b){if(-1!==b.getNestedTrees().map(e=>FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(a,
1454
+ e)).findIndex(e=>!!e))return null;if(a===b.getRootFocusableNode().getFocusableElement())return b.getRootFocusableNode();var c;const d=null!=(c=b.lookUpFocusableNode(a.id))?c:null;if(d)return d;c=a.parentElement;return!d&&c?FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(c,b):null}};FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.ACTIVE_CLASS_NAME="blocklyActiveFocus";
1455
+ FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.PASSIVE_CSS_CLASS_NAME="blocklyPassiveFocus";FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.ACTIVE_FOCUS_NODE_CSS_SELECTOR=`.${FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.ACTIVE_CLASS_NAME}`;FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.PASSIVE_FOCUS_NODE_CSS_SELECTOR=`.${FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.PASSIVE_CSS_CLASS_NAME}`;
1456
+ var module$build$src$core$utils$focusable_tree_traverser={};module$build$src$core$utils$focusable_tree_traverser.FocusableTreeTraverser=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser;var FocusManager$$module$build$src$core$focus_manager=class{constructor(a){this.focusedNode=null;this.registeredTrees=[];this.currentlyHoldsEphemeralFocus=!1;a("focusin",b=>{if(b instanceof FocusEvent){b=document.activeElement;var c=null;if(b instanceof HTMLElement||b instanceof SVGElement)for(const d of this.registeredTrees)if(c=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(b,d))break;c?this.focusNode(c):this.defocusCurrentFocusedNode()}})}registerTree(a){if(this.isRegistered(a))throw Error(`Attempted to re-register already registered tree: ${a}.`);
1457
+ this.registeredTrees.push(a)}isRegistered(a){return-1!==this.registeredTrees.findIndex(b=>b===a)}unregisterTree(a){if(!this.isRegistered(a))throw Error(`Attempted to unregister not registered tree: ${a}.`);var b=this.registeredTrees.findIndex(c=>c===c);this.registeredTrees.splice(b,1);b=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(a);a=a.getRootFocusableNode();b&&this.removeHighlight(b);if(this.focusedNode===b||this.focusedNode===a)this.focusedNode=
1458
+ null;this.removeHighlight(a)}getFocusedTree(){let a,b;return null!=(b=null==(a=this.focusedNode)?void 0:a.getFocusableTree())?b:null}getFocusedNode(){return this.focusedNode}focusTree(a){if(!this.isRegistered(a))throw Error(`Attempted to focus unregistered tree: ${a}.`);const b=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(a);this.focusNode(null!=b?b:a.getRootFocusableNode())}focusNode(a){var b=a.getFocusableTree();if(!this.isRegistered(b))throw Error(`Attempted to focus unregistered node: ${a}.`);
1459
+ var c=this.focusedNode;c&&c.getFocusableTree()!==b&&this.setNodeToPassive(c);c=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(b);b=b.getRootFocusableNode();c&&this.removeHighlight(c);b!==a&&this.removeHighlight(b);this.currentlyHoldsEphemeralFocus||this.setNodeToActive(a);this.focusedNode=a}takeEphemeralFocus(a){if(this.currentlyHoldsEphemeralFocus)throw Error("Attempted to take ephemeral focus when it's already held, "+`with new element: ${a}.`);this.currentlyHoldsEphemeralFocus=
1460
+ !0;this.focusedNode&&this.setNodeToPassive(this.focusedNode);a.focus();let b=!1;return()=>{if(b)throw Error("Attempted to finish ephemeral focus twice for element: "+`${a}.`);b=!0;this.currentlyHoldsEphemeralFocus=!1;this.focusedNode&&this.setNodeToActive(this.focusedNode)}}defocusCurrentFocusedNode(){this.focusedNode&&!this.currentlyHoldsEphemeralFocus&&(this.setNodeToPassive(this.focusedNode),this.focusedNode=null)}setNodeToActive(a){a=a.getFocusableElement();addClass$$module$build$src$core$utils$dom(a,
1461
+ FocusManager$$module$build$src$core$focus_manager.ACTIVE_FOCUS_NODE_CSS_CLASS_NAME);removeClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME);a.focus()}setNodeToPassive(a){a=a.getFocusableElement();removeClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.ACTIVE_FOCUS_NODE_CSS_CLASS_NAME);addClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME)}removeHighlight(a){a=
1462
+ a.getFocusableElement();removeClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.ACTIVE_FOCUS_NODE_CSS_CLASS_NAME);removeClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME)}};FocusManager$$module$build$src$core$focus_manager.ACTIVE_FOCUS_NODE_CSS_CLASS_NAME="blocklyActiveFocus";FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME="blocklyPassiveFocus";
1463
+ var focusManager$$module$build$src$core$focus_manager=null,module$build$src$core$focus_manager={};module$build$src$core$focus_manager.FocusManager=FocusManager$$module$build$src$core$focus_manager;module$build$src$core$focus_manager.getFocusManager=getFocusManager$$module$build$src$core$focus_manager;var VerticalFlyout$$module$build$src$core$flyout_vertical=class extends Flyout$$module$build$src$core$flyout_base{constructor(a){super(a)}setMetrics_(a){if(this.isVisible()){var b=this.workspace_.getMetricsManager(),c=b.getScrollMetrics(),d=b.getViewMetrics();b=b.getAbsoluteMetrics();"number"===typeof a.y&&(this.workspace_.scrollY=-(c.top+(c.height-d.height)*a.y));this.workspace_.translate(this.workspace_.scrollX+b.left,this.workspace_.scrollY+b.top)}}getX(){if(!this.isVisible())return 0;var a=this.targetWorkspace.getMetricsManager();
1458
1464
  const b=a.getAbsoluteMetrics(),c=a.getViewMetrics();a=a.getToolboxMetrics();return this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?a.width:c.width-this.getWidth():this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?0:c.width:this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.LEFT?0:c.width+b.left-this.getWidth()}getY(){return 0}position(){if(this.isVisible()&&
1459
1465
  this.targetWorkspace.isVisible()){var a=this.targetWorkspace.getMetricsManager().getViewMetrics();this.height_=a.height;var b=this.getWidth()-this.CORNER_RADIUS;this.setBackgroundPath(b,a.height-2*this.CORNER_RADIUS);a=this.getX();b=this.getY();this.positionAt_(this.getWidth(),this.getHeight(),a,b)}}setBackgroundPath(a,b){const c=this.toolboxPosition_===Position$$module$build$src$core$utils$toolbox.RIGHT;var d=a+this.CORNER_RADIUS;d=["M "+(c?d:0)+",0"];d.push("h",c?-a:a);d.push("a",this.CORNER_RADIUS,
1460
1466
  this.CORNER_RADIUS,0,0,c?0:1,c?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("v",Math.max(0,b));d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,c?0:1,c?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS);d.push("h",c?a:-a);d.push("z");this.svgBackground_.setAttribute("d",d.join(" "))}scrollToStart(){let a;null==(a=this.workspace_.scrollbar)||a.setY(0)}wheel_(a){var b=getScrollDeltaPixels$$module$build$src$core$browser_events(a);if(b.y){const c=this.workspace_.getMetricsManager(),
@@ -1476,12 +1482,12 @@ var module$build$src$core$flyout_horizontal={};module$build$src$core$flyout_hori
1476
1482
  c,d,e);if(null!==e&&e!==b.getType())throw Error("Serialized variable type with id '"+b.getId()+"' had type "+b.getType()+", and does not match variable field that references it: "+domToText$$module$build$src$core$xml(a)+".");this.setValue(b.getId())}toXml(a){this.initModel();a.id=this.variable.getId();a.textContent=this.variable.getName();this.variable.getType()&&a.setAttribute("variabletype",this.variable.getType());return a}saveState(a){var b=this.saveLegacyState(FieldVariable$$module$build$src$core$field_variable);
1477
1483
  if(null!==b)return b;this.initModel();b={id:this.variable.getId()};a&&(b.name=this.variable.getName(),b.type=this.variable.getType());return b}loadState(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;this.loadLegacyState(FieldVariable$$module$build$src$core$field_variable,a)||(a=$.getOrCreateVariablePackage$$module$build$src$core$variables(b.workspace,a.id||null,a.name,a.type||""),this.setValue(a.getId()))}setSourceBlock(a){if(a.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");
1478
1484
  super.setSourceBlock(a)}getValue(){return this.variable?this.variable.getId():null}getText(){return this.variable?this.variable.getName():""}getVariable(){return this.variable}getDefaultType(){return this.defaultType}getValidator(){return this.variable?this.validator_:null}doClassValidation_(a){if(null===a)return null;var b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;b=$.getVariable$$module$build$src$core$variables(b.workspace,a);if(!b)return console.warn("Variable id doesn't point to a real variable! ID was "+
1479
- a),null;b=b.getType();return this.typeIsAllowed(b)?a:(console.warn("Variable type doesn't match this field! Type was "+b),null)}doValueUpdate_(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;this.variable=$.getVariable$$module$build$src$core$variables(b.workspace,a);super.doValueUpdate_(a)}typeIsAllowed(a){const b=this.getVariableTypes();if(!b)return!0;for(let c=0;c<b.length;c++)if(a===b[c])return!0;return!1}getVariableTypes(){var a=this.variableTypes;
1480
- if(null===a&&this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying())return this.sourceBlock_.workspace.getVariableMap().getTypes();a=a||[""];if(0===a.length)throw a=this.getText(),Error("'variableTypes' of field variable "+a+" was an empty list");return a}setTypes(a=null,b=""){if(Array.isArray(a)){let c=!1;for(let d=0;d<a.length;d++)a[d]===b&&(c=!0);if(!c)throw Error("Invalid default type '"+b+"' in the definition of a FieldVariable");}else if(null!==a)throw Error("'variableTypes' was not an array in the definition of a FieldVariable");
1481
- this.defaultType=b;this.variableTypes=a}refreshVariableName(){this.forceRerender()}onItemSelected_(a,b){a=b.getValue();if(this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()){if(a===RENAME_VARIABLE_ID$$module$build$src$core$internal_constants&&this.variable){$.renameVariable$$module$build$src$core$variables(this.sourceBlock_.workspace,this.variable);return}if(a===DELETE_VARIABLE_ID$$module$build$src$core$internal_constants&&this.variable){a=this.variable.getWorkspace();$.deleteVariable$$module$build$src$core$variables(a,
1482
- this.variable,this.sourceBlock_);a instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&a.refreshToolboxSelection();return}}this.setValue(a)}referencesVariables(){return!0}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.variable),void 0,void 0,void 0,a)}static dropdownCreate(){if(!this.variable)throw Error("Tried to call dropdownCreate on a variable field with no variable selected.");const a=this.getText();let b=[];var c=this.getSourceBlock();
1483
- if(c&&!c.isDeadOrDying()){c=c.workspace;const f=this.getVariableTypes();for(let g=0;g<f.length;g++){const h=f[g],k=c.getVariablesOfType(h);b=b.concat(k);if(c.isFlyout){var d=void 0,e=void 0;b=b.concat(null!=(e=null==(d=c.getPotentialVariableMap())?void 0:d.getVariablesOfType(h))?e:[])}}}b.sort(compareByName$$module$build$src$core$variables);d=[];for(e=0;e<b.length;e++)d[e]=[b[e].getName(),b[e].getId()];d.push([$.Msg$$module$build$src$core$msg.RENAME_VARIABLE,RENAME_VARIABLE_ID$$module$build$src$core$internal_constants]);
1484
- $.Msg$$module$build$src$core$msg.DELETE_VARIABLE&&d.push([$.Msg$$module$build$src$core$msg.DELETE_VARIABLE.replace("%1",a),DELETE_VARIABLE_ID$$module$build$src$core$internal_constants]);return d}};register$$module$build$src$core$field_registry("field_variable",FieldVariable$$module$build$src$core$field_variable);var module$build$src$core$field_variable={};module$build$src$core$field_variable.FieldVariable=FieldVariable$$module$build$src$core$field_variable;var FieldNumber$$module$build$src$core$field_number=class extends FieldInput$$module$build$src$core$field_input{constructor(a,b,c,d,e,f){super(Field$$module$build$src$core$field.SKIP_SETUP);this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces=null;this.spellcheck_=!1;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(f?this.configure_(f):this.setConstraints(b,c,d),this.setValue(a),e&&this.setValidator(e))}configure_(a){super.configure_(a);this.setMinInternal(a.min);this.setMaxInternal(a.max);
1485
+ a),null;b=b.getType();return this.typeIsAllowed(b)?a:(console.warn("Variable type doesn't match this field! Type was "+b),null)}doValueUpdate_(a){const b=this.getSourceBlock();if(!b)throw new UnattachedFieldError$$module$build$src$core$field;this.variable=$.getVariable$$module$build$src$core$variables(b.workspace,a);super.doValueUpdate_(a)}typeIsAllowed(a){const b=this.getVariableTypes();if(!b)return!0;for(let c=0;c<b.length;c++)if(a===b[c])return!0;return!1}getVariableTypes(){if(this.variableTypes)return this.variableTypes;
1486
+ if(!this.sourceBlock_||this.sourceBlock_.isDeadOrDying())return[""];let a=this.sourceBlock_.workspace.getVariableMap().getTypes();if(this.sourceBlock_.isInFlyout){const b=this.sourceBlock_.workspace.getPotentialVariableMap();if(!b)return a;a=Array.from(new Set([...a,...b.getTypes()]))}return a}setTypes(a=null,b=""){var c=this.getText();if(Array.isArray(a)){if(0===a.length)throw Error(`'variableTypes' of field variable ${c} was an empty list. If you want to include all variable types, pass 'null' instead.`);
1487
+ c=!1;for(let d=0;d<a.length;d++)a[d]===b&&(c=!0);if(!c)throw Error("Invalid default type '"+b+"' in the definition of a FieldVariable");}else if(null!==a)throw Error(`'variableTypes' was not an array or null in the definition of FieldVariable ${c}`);this.defaultType=b;this.variableTypes=a}refreshVariableName(){this.forceRerender()}onItemSelected_(a,b){a=b.getValue();if(this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()){if(a===RENAME_VARIABLE_ID$$module$build$src$core$internal_constants&&this.variable){$.renameVariable$$module$build$src$core$variables(this.sourceBlock_.workspace,
1488
+ this.variable);return}if(a===DELETE_VARIABLE_ID$$module$build$src$core$internal_constants&&this.variable){a=this.variable.getWorkspace();$.deleteVariable$$module$build$src$core$variables(a,this.variable,this.sourceBlock_);a instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&a.refreshToolboxSelection();return}}this.setValue(a)}referencesVariables(){return!0}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.variable),void 0,void 0,void 0,a)}static dropdownCreate(){if(!this.variable)throw Error("Tried to call dropdownCreate on a variable field with no variable selected.");
1489
+ const a=this.getText();let b=[];var c=this.getSourceBlock();if(c&&!c.isDeadOrDying()){c=c.workspace;const f=this.getVariableTypes();for(let g=0;g<f.length;g++){const h=f[g],k=c.getVariablesOfType(h);b=b.concat(k);if(c.isFlyout){var d=void 0,e=void 0;b=b.concat(null!=(e=null==(d=c.getPotentialVariableMap())?void 0:d.getVariablesOfType(h))?e:[])}}}b.sort(compareByName$$module$build$src$core$variables);d=[];for(e=0;e<b.length;e++)d[e]=[b[e].getName(),b[e].getId()];d.push([$.Msg$$module$build$src$core$msg.RENAME_VARIABLE,
1490
+ RENAME_VARIABLE_ID$$module$build$src$core$internal_constants]);$.Msg$$module$build$src$core$msg.DELETE_VARIABLE&&d.push([$.Msg$$module$build$src$core$msg.DELETE_VARIABLE.replace("%1",a),DELETE_VARIABLE_ID$$module$build$src$core$internal_constants]);return d}};register$$module$build$src$core$field_registry("field_variable",FieldVariable$$module$build$src$core$field_variable);var module$build$src$core$field_variable={};module$build$src$core$field_variable.FieldVariable=FieldVariable$$module$build$src$core$field_variable;var FieldNumber$$module$build$src$core$field_number=class extends FieldInput$$module$build$src$core$field_input{constructor(a,b,c,d,e,f){super(Field$$module$build$src$core$field.SKIP_SETUP);this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces=null;this.spellcheck_=!1;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(f?this.configure_(f):this.setConstraints(b,c,d),this.setValue(a),e&&this.setValidator(e))}configure_(a){super.configure_(a);this.setMinInternal(a.min);this.setMaxInternal(a.max);
1485
1491
  this.setPrecisionInternal(a.precision)}setConstraints(a,b,c){this.setMinInternal(a);this.setMaxInternal(b);this.setPrecisionInternal(c);this.setValue(this.getValue())}setMin(a){this.setMinInternal(a);this.setValue(this.getValue())}setMinInternal(a){null==a?this.min_=-Infinity:(a=Number(a),isNaN(a)||(this.min_=a))}getMin(){return this.min_}setMax(a){this.setMaxInternal(a);this.setValue(this.getValue())}setMaxInternal(a){null==a?this.max_=Infinity:(a=Number(a),isNaN(a)||(this.max_=a))}getMax(){return this.max_}setPrecision(a){this.setPrecisionInternal(a);
1486
1492
  this.setValue(this.getValue())}setPrecisionInternal(a){this.precision_=Number(a)||0;let b=String(this.precision_);b.includes("e")&&(b=this.precision_.toLocaleString("en-US",{maximumFractionDigits:20}));const c=b.indexOf(".");this.decimalPlaces=-1===c?a?0:null:b.length-c-1}getPrecision(){return this.precision_}doClassValidation_(a){if(null===a)return null;a=`${a}`.replace(/O/gi,"0");a=a.replace(/,/g,"");a=a.replace(/infinity/i,"Infinity");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,
1487
1493
  this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);null!==this.decimalPlaces&&(a=Number(a.toFixed(this.decimalPlaces)));return a}widgetCreate_(){const a=super.widgetCreate_();-Infinity<this.min_&&(a.min=`${this.min_}`,setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.VALUEMIN,this.min_));Infinity>this.max_&&(a.max=`${this.max_}`,setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.VALUEMAX,
@@ -1570,7 +1576,22 @@ this.permanentlyDisabledBlocks.add(a);a.getDescendants(!1).forEach(c=>c.isInFlyo
1570
1576
  void 0:null==(c=b.targetWorkspace)?void 0:c.isCapacityAvailable(getBlockTypeCounts$$module$build$src$core$common(a));for(;a;)a.setDisabledReason(!d,WORKSPACE_AT_BLOCK_CAPACITY_DISABLED_REASON$$module$build$src$core$block_flyout_inflater),a=a.getNextBlock()}addBlockListeners(a){const b=[];b.push(conditionalBind$$module$build$src$core$browser_events(a.getSvgRoot(),"pointerdown",a,c=>{let d,e;const f=null==(d=this.flyout)?void 0:null==(e=d.targetWorkspace)?void 0:e.getGesture(c);f&&this.flyout&&(f.setStartBlock(a),
1571
1577
  f.handleFlyoutStart(c,this.flyout))}));b.push(bind$$module$build$src$core$browser_events(a.getSvgRoot(),"pointerenter",null,()=>{let c,d;(null==(c=this.flyout)?0:null==(d=c.targetWorkspace)?0:d.isDragging())||a.addSelect()}));b.push(bind$$module$build$src$core$browser_events(a.getSvgRoot(),"pointerleave",null,()=>{let c,d;(null==(c=this.flyout)?0:null==(d=c.targetWorkspace)?0:d.isDragging())||a.removeSelect()}));this.listeners.set(a.id,b)}filterFlyoutBasedOnCapacity(a){!this.flyout||a&&a.type!==EventType$$module$build$src$core$events$type.BLOCK_CREATE&&
1572
1578
  a.type!==EventType$$module$build$src$core$events$type.BLOCK_DELETE||this.flyout.getWorkspace().getTopBlocks(!1).forEach(b=>{this.permanentlyDisabledBlocks.has(b)||this.updateStateBasedOnCapacity(b)})}getType(){return BLOCK_TYPE$$module$build$src$core$block_flyout_inflater}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUT_INFLATER,BLOCK_TYPE$$module$build$src$core$block_flyout_inflater,BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater);
1573
- var module$build$src$core$block_flyout_inflater={};module$build$src$core$block_flyout_inflater.BlockFlyoutInflater=BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater;var module$build$src$core$interfaces$i_paster={};module$build$src$core$interfaces$i_paster.isPaster=isPaster$$module$build$src$core$interfaces$i_paster;var module$build$src$core$interfaces$i_rendered_element={};module$build$src$core$interfaces$i_rendered_element.isRenderedElement=isRenderedElement$$module$build$src$core$interfaces$i_rendered_element;var module$build$src$core$interfaces$i_selectable={};module$build$src$core$interfaces$i_selectable.isSelectable=isSelectable$$module$build$src$core$interfaces$i_selectable;var ConstantProvider$$module$build$src$core$renderers$geras$constants=class extends ConstantProvider$$module$build$src$core$renderers$common$constants{constructor(){super();this.FIELD_TEXT_BASELINE_CENTER=!1;this.DARK_PATH_OFFSET=1;this.MAX_BOTTOM_WIDTH=30;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2}getCSS_(a){return super.getCSS_(a).concat([`${a} .blocklyInsertionMarker>.blocklyPathLight,`,`${a} .blocklyInsertionMarker>.blocklyPathDark {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;",
1579
+ var module$build$src$core$block_flyout_inflater={};module$build$src$core$block_flyout_inflater.BlockFlyoutInflater=BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater;var module$build$src$core$interfaces$i_paster={};module$build$src$core$interfaces$i_paster.isPaster=isPaster$$module$build$src$core$interfaces$i_paster;var module$build$src$core$interfaces$i_rendered_element={};module$build$src$core$interfaces$i_rendered_element.isRenderedElement=isRenderedElement$$module$build$src$core$interfaces$i_rendered_element;var module$build$src$core$interfaces$i_selectable={};module$build$src$core$interfaces$i_selectable.isSelectable=isSelectable$$module$build$src$core$interfaces$i_selectable;var Marker$$module$build$src$core$keyboard_nav$marker=class{constructor(){this.drawer=this.curNode=this.colour=null;this.type="marker"}setDrawer(a){this.drawer=a}getDrawer(){return this.drawer}getCurNode(){return this.curNode}setCurNode(a){const b=this.curNode;this.curNode=a;let c;null==(c=this.drawer)||c.draw(b,this.curNode)}draw(){let a;null==(a=this.drawer)||a.draw(this.curNode,this.curNode)}hide(){let a;null==(a=this.drawer)||a.hide()}dispose(){let a;null==(a=this.drawer)||a.dispose();this.curNode=
1580
+ this.drawer=null}},module$build$src$core$keyboard_nav$marker={};module$build$src$core$keyboard_nav$marker.Marker=Marker$$module$build$src$core$keyboard_nav$marker;var defaultOptions$$module$build$src$core$keyboard_nav$line_cursor={stackConnections:!0},LineCursor$$module$build$src$core$keyboard_nav$line_cursor=class extends Marker$$module$build$src$core$keyboard_nav$marker{constructor(a,b){super();this.workspace=a;this.type="cursor";this.potentialNodes=null;this.isZelos=!1;this.changeListener=this.changeListener.bind(this);this.workspace.addChangeListener(this.changeListener);this.options=Object.assign({},defaultOptions$$module$build$src$core$keyboard_nav$line_cursor,
1581
+ b);this.isZelos=a.getRenderer()instanceof Renderer$$module$build$src$core$renderers$zelos$renderer}dispose(){this.workspace.removeChangeListener(this.changeListener);super.dispose()}next(){var a=this.getCurNode();if(!a)return null;(a=this.getNextNode(a,this.validLineNode.bind(this)))&&this.setCurNode(a);return a}in(){var a=this.getCurNode();if(!a)return null;(a=this.getNextNode(a,this.validInLineNode.bind(this)))&&this.setCurNode(a);return a}prev(){var a=this.getCurNode();if(!a)return null;(a=this.getPreviousNode(a,
1582
+ this.validLineNode.bind(this)))&&this.setCurNode(a);return a}out(){var a=this.getCurNode();if(!a)return null;(a=this.getPreviousNode(a,this.validInLineNode.bind(this)))&&this.setCurNode(a);return a}atEndOfLine(){var a=this.getCurNode();if(!a)return!1;a=this.getNextNode(a,this.validInLineNode.bind(this));return this.validLineNode(a)}validLineNode(a){if(!a)return!1;const b=a.getLocation();switch(a&&a.getType()){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:let c;return!(null==
1583
+ (c=b.outputConnection)?0:c.isConnected());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return b.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT&&(this.options.stackConnections||!b.isConnected());case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.NEXT:return this.options.stackConnections||!b.isConnected();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.PREVIOUS:return this.options.stackConnections&&!b.isConnected();default:return!1}}validInLineNode(a){if(!a)return!1;
1584
+ if(this.validLineNode(a))return!0;const b=a.getLocation();switch(a&&a.getType()){case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK:return!0;case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT:return!b.isConnected();case ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.FIELD:a=a.getLocation();let c;return!((null==(c=a.getSourceBlock())?0:c.isSimpleReporter())&&a.isFullBlockField());default:return!1}}validNode(a){return!!a&&(this.validInLineNode(a)||a.getType()===
1585
+ ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.WORKSPACE)}getNextNode(a,b){if(!a)return null;const c=a.in()||a.next();if(b(c))return c;if(c)return this.getNextNode(c,b);a=this.findSiblingOrParentSibling(a.out());return b(a)?a:a?this.getNextNode(a,b):null}getPreviousNode(a,b){if(!a)return null;let c=a.prev();c=c?this.getRightMostChild(c):a.out();return b(c)?c:c?this.getPreviousNode(c,b):null}findSiblingOrParentSibling(a){if(!a)return null;const b=a.next();return b?b:this.findSiblingOrParentSibling(a.out())}getRightMostChild(a){let b=
1586
+ a.in();if(!b)return a;for(a=b;a;a=b.next())b=a;return this.getRightMostChild(b)}preDelete(a){var b=this.getCurNode();const c=b?[b]:[];var d;let e,f;const g=null!=(f=null==(d=a.previousConnection)?void 0:d.targetConnection)?f:null==(e=a.outputConnection)?void 0:e.targetConnection;g&&(d=ASTNode$$module$build$src$core$keyboard_nav$ast_node.createConnectionNode(g))&&c.push(d);(d=a.getNextBlock())&&(d=ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(d))&&c.push(d);(a=a.getParent())&&
1587
+ (a=ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(a))&&c.push(a);(b=null==b?void 0:b.getSourceBlock())&&(b=ASTNode$$module$build$src$core$keyboard_nav$ast_node.createWorkspaceNode(this.workspace,b.getRelativeToSurfaceXY()))&&c.push(b);this.potentialNodes=c}postDelete(){const a=this.potentialNodes;this.potentialNodes=null;if(!a)throw Error("must call preDelete first");for(const b of a){let c;if(this.validNode(b)&&(null==(c=b.getSourceBlock())||!c.disposed)){this.setCurNode(b);
1588
+ return}}throw Error("no valid nodes in this.potentialNodes");}getCurNode(){this.updateCurNodeFromSelection();return super.getCurNode()}setDrawer(a){const b=function(c,d){this.drawMarker(c,d,a)}.bind(this);super.setDrawer(new Proxy(a,{get(c,d){return"draw"===d?b:c[d]}}))}setCurNode(a,b=!0){b&&this.updateSelectionFromNode(a);super.setCurNode(a);(null==a?void 0:a.getType())===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK&&(a=a.getLocation(),a.workspace.scrollBoundsIntoView(a.getBoundingRectangleWithoutChildren()))}drawMarker(a,
1589
+ b,c){if((null==a?void 0:a.getType())===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK){var d=a.getLocation();d.isShadow()&&d.removeSelect()}this.isZelos&&a&&this.isValueInputConnection(a)&&this.hideAtInput(a);d=null==b?void 0:b.getType();const e=this.isZelos&&b&&this.isValueInputConnection(b);if(d===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK||e){c.hide();if(e)this.showAtInput(b);else if(b&&d===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK&&
1590
+ (d=b.getLocation(),d.isShadow())){d.addSelect();let g;null==(g=d.getParent())||g.removeSelect()}var f;null==c||null==(f=c.fireMarkerEvent)||f.call(c,a,b)}else c.draw(a,b)}isValueInputConnection(a){return(null==a?void 0:a.getType())!==ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.INPUT?!1:a.getLocation().type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE}hideAtInput(a){var b=a.getLocation();a=b.getSourceBlock();if(b=b.getParentInput())a=a.pathObject.getOutlinePath(b.name),
1591
+ removeClass$$module$build$src$core$utils$dom(a,"inputActiveFocus")}showAtInput(a){var b=a.getLocation();a=b.getSourceBlock();if(b=b.getParentInput())a=a.pathObject.getOutlinePath(b.name),addClass$$module$build$src$core$utils$dom(a,"inputActiveFocus")}changeListener(a){switch(a.type){case EventType$$module$build$src$core$events$type.SELECTED:this.updateCurNodeFromSelection();break;case EventType$$module$build$src$core$events$type.CLICK:a.workspaceId===this.workspace.id&&a.targetType===ClickTarget$$module$build$src$core$events$events_click.WORKSPACE&&
1592
+ this.setCurNode(null)}}updateCurNodeFromSelection(){const a=super.getCurNode(),b=getSelected$$module$build$src$core$common();if(null===b&&(null==a?void 0:a.getType())===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK)this.setCurNode(null,!1);else if((null==b?void 0:b.workspace)===this.workspace&&b instanceof BlockSvg$$module$build$src$core$block_svg){let c=b;if(b.isShadow()){if(a&&(a.getLocation()===c||a.getLocation()===c.getParent()))return;c=c.getParent()}c&&this.setCurNode(ASTNode$$module$build$src$core$keyboard_nav$ast_node.createBlockNode(c),
1593
+ !1)}}updateSelectionFromNode(a){(null==a?void 0:a.getType())===ASTNode$$module$build$src$core$keyboard_nav$ast_node.types.BLOCK?getSelected$$module$build$src$core$common()!==a.getLocation()&&($.disable$$module$build$src$core$events$utils(),$.setSelected$$module$build$src$core$common(a.getLocation()),$.enable$$module$build$src$core$events$utils()):getSelected$$module$build$src$core$common()&&($.disable$$module$build$src$core$events$utils(),$.setSelected$$module$build$src$core$common(null),$.enable$$module$build$src$core$events$utils())}};
1594
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.CURSOR,DEFAULT$$module$build$src$core$registry,LineCursor$$module$build$src$core$keyboard_nav$line_cursor);var module$build$src$core$keyboard_nav$line_cursor={};module$build$src$core$keyboard_nav$line_cursor.LineCursor=LineCursor$$module$build$src$core$keyboard_nav$line_cursor;var ConstantProvider$$module$build$src$core$renderers$geras$constants=class extends ConstantProvider$$module$build$src$core$renderers$common$constants{constructor(){super();this.FIELD_TEXT_BASELINE_CENTER=!1;this.DARK_PATH_OFFSET=1;this.MAX_BOTTOM_WIDTH=30;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2}getCSS_(a){return super.getCSS_(a).concat([`${a} .blocklyInsertionMarker>.blocklyPathLight,`,`${a} .blocklyInsertionMarker>.blocklyPathDark {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;",
1574
1595
  "}"])}},module$build$src$core$renderers$geras$constants={};module$build$src$core$renderers$geras$constants.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$geras$constants;var Highlighter$$module$build$src$core$renderers$geras$highlighter=class{constructor(a){this.inlineSteps_=this.steps_="";this.info_=a;this.RTL_=this.info_.RTL;a=a.getRenderer();this.constants_=a.getConstants();this.highlightConstants_=a.getHighlightConstants();this.highlightOffset=this.highlightConstants_.OFFSET;this.outsideCornerPaths_=this.highlightConstants_.OUTSIDE_CORNER;this.insideCornerPaths_=this.highlightConstants_.INSIDE_CORNER;this.puzzleTabPaths_=this.highlightConstants_.PUZZLE_TAB;this.notchPaths_=
1575
1596
  this.highlightConstants_.NOTCH;this.startPaths_=this.highlightConstants_.START_HAT;this.jaggedTeethPaths_=this.highlightConstants_.JAGGED_TEETH}getPath(){return this.steps_+"\n"+this.inlineSteps_}drawTopCorner(a){this.steps_+=moveBy$$module$build$src$core$utils$svg_paths(a.xPos,this.info_.startY);for(let b=0,c;c=a.elements[b];b++)Types$$module$build$src$core$renderers$measurables$types.isLeftSquareCorner(c)?this.steps_+=this.highlightConstants_.START_POINT:Types$$module$build$src$core$renderers$measurables$types.isLeftRoundedCorner(c)?
1576
1597
  this.steps_+=this.outsideCornerPaths_.topLeft(this.RTL_):Types$$module$build$src$core$renderers$measurables$types.isPreviousConnection(c)?this.steps_+=this.notchPaths_.pathLeft:Types$$module$build$src$core$renderers$measurables$types.isHat(c)?this.steps_+=this.startPaths_.path(this.RTL_):Types$$module$build$src$core$renderers$measurables$types.isSpacer(c)&&0!==c.width&&(this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",c.xPos+c.width-this.highlightOffset));this.steps_+=lineOnAxis$$module$build$src$core$utils$svg_paths("H",
@@ -1679,35 +1700,35 @@ a===b&&(d=null);a=new (get$$module$build$src$core$events$utils(EventType$$module
1679
1700
  !this.selectedItem_.isCollapsible())return!1;const a=this.selectedItem_;a.isExpanded()?this.selectNext():a.toggleExpanded();return!0}selectNext(){if(!this.selectedItem_)return!1;const a=[...this.contents.values()];let b=a.indexOf(this.selectedItem_)+1;if(-1<b&&b<a.length){let c=a[b];for(;c&&!c.isSelectable();)c=a[++b];if(c&&c.isSelectable())return this.setSelectedItem(c),!0}return!1}selectPrevious(){if(!this.selectedItem_)return!1;const a=[...this.contents.values()];let b=a.indexOf(this.selectedItem_)-
1680
1701
  1;if(-1<b&&b<a.length){let c=a[b];for(;c&&!c.isSelectable();)c=a[--b];if(c&&c.isSelectable())return this.setSelectedItem(c),!0}return!1}dispose(){this.workspace_.getComponentManager().removeComponent("toolbox");this.flyout.dispose();this.contents.forEach(a=>a.dispose());for(let a=0;a<this.boundEvents_.length;a++)unbind$$module$build$src$core$browser_events(this.boundEvents_[a]);this.boundEvents_=[];this.contents.clear();this.HtmlDiv&&(this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv),removeNode$$module$build$src$core$utils$dom(this.HtmlDiv))}};
1681
1702
  register$$module$build$src$core$css('\n.blocklyToolboxDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n}\n\n.blocklyToolboxGrab {\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n/* Category tree in Toolbox. */\n.blocklyToolbox {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background-color: #ddd;\n overflow-x: visible;\n overflow-y: auto;\n padding: 4px 0 4px 0;\n position: absolute;\n z-index: 70; /* so blocks go under toolbox when dragging */\n -webkit-tap-highlight-color: transparent; /* issue #1345 */\n}\n\n.blocklyToolboxCategoryGroup {\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.blocklyToolboxCategoryGroup:focus {\n outline: none;\n}\n');
1682
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var VERSION$$module$build$src$core$blockly="12.0.0-beta.2",INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE,NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,
1703
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var VERSION$$module$build$src$core$blockly="12.0.0-beta.3",INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE,NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,
1683
1704
  TOOLBOX_AT_TOP$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.TOP,TOOLBOX_AT_BOTTOM$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.BOTTOM,TOOLBOX_AT_LEFT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.LEFT,TOOLBOX_AT_RIGHT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.RIGHT,svgResize$$module$build$src$core$blockly=svgResize$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$blockly=
1684
1705
  getMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$blockly=getSelected$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$blockly=defineBlocksWithJsonArray$$module$build$src$core$common,setParentContainer$$module$build$src$core$blockly=setParentContainer$$module$build$src$core$common,COLLAPSE_CHARS$$module$build$src$core$blockly=COLLAPSE_CHARS$$module$build$src$core$internal_constants,OPPOSITE_TYPE$$module$build$src$core$blockly=OPPOSITE_TYPE$$module$build$src$core$internal_constants,
1685
1706
  RENAME_VARIABLE_ID$$module$build$src$core$blockly=RENAME_VARIABLE_ID$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID$$module$build$src$core$blockly=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,COLLAPSED_INPUT_NAME$$module$build$src$core$blockly=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,COLLAPSED_FIELD_NAME$$module$build$src$core$blockly=COLLAPSED_FIELD_NAME$$module$build$src$core$constants,VARIABLE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$variables,
1686
1707
  VARIABLE_DYNAMIC_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$variables_dynamic,PROCEDURE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$procedures;Workspace$$module$build$src$core$workspace.prototype.newBlock=function(a,b){return new Block$$module$build$src$core$block(this,a,b)};WorkspaceSvg$$module$build$src$core$workspace_svg.prototype.newBlock=function(a,b){return new BlockSvg$$module$build$src$core$block_svg(this,a,b)};
1687
1708
  Workspace$$module$build$src$core$workspace.prototype.newComment=function(a){return new WorkspaceComment$$module$build$src$core$comments$workspace_comment(this,a)};WorkspaceSvg$$module$build$src$core$workspace_svg.prototype.newComment=function(a){return new RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment(this,a)};WorkspaceSvg$$module$build$src$core$workspace_svg.newTrashcan=function(a){return new Trashcan$$module$build$src$core$trashcan(a)};
1688
1709
  MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble.prototype.newWorkspaceSvg=function(a){return new WorkspaceSvg$$module$build$src$core$workspace_svg(a)};$.Names$$module$build$src$core$names.prototype.populateProcedures=function(a){a=allProcedures$$module$build$src$core$procedures(a);a=a[0].concat(a[1]);for(let b=0;b<a.length;b++)this.getName(a[b][0],$.Names$$module$build$src$core$names.NameType.PROCEDURE)};
1689
- var DropDownDiv$$module$build$src$core$blockly=module$build$src$core$dropdowndiv,module$build$src$core$blockly={};module$build$src$core$blockly.ASTNode=ASTNode$$module$build$src$core$keyboard_nav$ast_node;module$build$src$core$blockly.BasicCursor=BasicCursor$$module$build$src$core$keyboard_nav$basic_cursor;module$build$src$core$blockly.Block=Block$$module$build$src$core$block;module$build$src$core$blockly.BlockFlyoutInflater=BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater;
1690
- module$build$src$core$blockly.BlockSvg=BlockSvg$$module$build$src$core$block_svg;module$build$src$core$blockly.Blocks=Blocks$$module$build$src$core$blocks;module$build$src$core$blockly.ButtonFlyoutInflater=ButtonFlyoutInflater$$module$build$src$core$button_flyout_inflater;module$build$src$core$blockly.COLLAPSED_FIELD_NAME=COLLAPSED_FIELD_NAME$$module$build$src$core$constants;module$build$src$core$blockly.COLLAPSED_INPUT_NAME=COLLAPSED_INPUT_NAME$$module$build$src$core$constants;
1691
- module$build$src$core$blockly.COLLAPSE_CHARS=COLLAPSE_CHARS$$module$build$src$core$internal_constants;module$build$src$core$blockly.CodeGenerator=$.CodeGenerator$$module$build$src$core$generator;module$build$src$core$blockly.CollapsibleToolboxCategory=CollapsibleToolboxCategory$$module$build$src$core$toolbox$collapsible_category;module$build$src$core$blockly.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$blockly.Connection=Connection$$module$build$src$core$connection;
1692
- module$build$src$core$blockly.ConnectionChecker=ConnectionChecker$$module$build$src$core$connection_checker;module$build$src$core$blockly.ConnectionDB=ConnectionDB$$module$build$src$core$connection_db;module$build$src$core$blockly.ConnectionType=ConnectionType$$module$build$src$core$connection_type;module$build$src$core$blockly.ContextMenu=module$build$src$core$contextmenu;module$build$src$core$blockly.ContextMenuItems=module$build$src$core$contextmenu_items;
1693
- module$build$src$core$blockly.ContextMenuRegistry=ContextMenuRegistry$$module$build$src$core$contextmenu_registry;module$build$src$core$blockly.Css=module$build$src$core$css;module$build$src$core$blockly.Cursor=Cursor$$module$build$src$core$keyboard_nav$cursor;module$build$src$core$blockly.DELETE_VARIABLE_ID=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants;module$build$src$core$blockly.DeleteArea=DeleteArea$$module$build$src$core$delete_area;module$build$src$core$blockly.DragTarget=DragTarget$$module$build$src$core$drag_target;
1694
- module$build$src$core$blockly.DropDownDiv=module$build$src$core$dropdowndiv;module$build$src$core$blockly.Events=module$build$src$core$events$events;module$build$src$core$blockly.Extensions=module$build$src$core$extensions;module$build$src$core$blockly.Field=Field$$module$build$src$core$field;module$build$src$core$blockly.FieldCheckbox=FieldCheckbox$$module$build$src$core$field_checkbox;module$build$src$core$blockly.FieldDropdown=FieldDropdown$$module$build$src$core$field_dropdown;
1695
- module$build$src$core$blockly.FieldImage=FieldImage$$module$build$src$core$field_image;module$build$src$core$blockly.FieldLabel=FieldLabel$$module$build$src$core$field_label;module$build$src$core$blockly.FieldLabelSerializable=FieldLabelSerializable$$module$build$src$core$field_label_serializable;module$build$src$core$blockly.FieldNumber=FieldNumber$$module$build$src$core$field_number;module$build$src$core$blockly.FieldTextInput=$.FieldTextInput$$module$build$src$core$field_textinput;
1696
- module$build$src$core$blockly.FieldVariable=FieldVariable$$module$build$src$core$field_variable;module$build$src$core$blockly.Flyout=Flyout$$module$build$src$core$flyout_base;module$build$src$core$blockly.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;module$build$src$core$blockly.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;module$build$src$core$blockly.FlyoutMetricsManager=FlyoutMetricsManager$$module$build$src$core$flyout_metrics_manager;
1697
- module$build$src$core$blockly.FlyoutSeparator=FlyoutSeparator$$module$build$src$core$flyout_separator;module$build$src$core$blockly.Generator=$.CodeGenerator$$module$build$src$core$generator;module$build$src$core$blockly.Gesture=Gesture$$module$build$src$core$gesture;module$build$src$core$blockly.Grid=Grid$$module$build$src$core$grid;module$build$src$core$blockly.HorizontalFlyout=HorizontalFlyout$$module$build$src$core$flyout_horizontal;module$build$src$core$blockly.INPUT_VALUE=INPUT_VALUE$$module$build$src$core$blockly;
1698
- module$build$src$core$blockly.Input=Input$$module$build$src$core$inputs$input;module$build$src$core$blockly.InsertionMarkerPreviewer=InsertionMarkerPreviewer$$module$build$src$core$insertion_marker_previewer;module$build$src$core$blockly.LabelFlyoutInflater=LabelFlyoutInflater$$module$build$src$core$label_flyout_inflater;module$build$src$core$blockly.Marker=Marker$$module$build$src$core$keyboard_nav$marker;module$build$src$core$blockly.MarkerManager=MarkerManager$$module$build$src$core$marker_manager;
1710
+ var DropDownDiv$$module$build$src$core$blockly=module$build$src$core$dropdowndiv,module$build$src$core$blockly={};module$build$src$core$blockly.ASTNode=ASTNode$$module$build$src$core$keyboard_nav$ast_node;module$build$src$core$blockly.Block=Block$$module$build$src$core$block;module$build$src$core$blockly.BlockFlyoutInflater=BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater;module$build$src$core$blockly.BlockSvg=BlockSvg$$module$build$src$core$block_svg;
1711
+ module$build$src$core$blockly.Blocks=Blocks$$module$build$src$core$blocks;module$build$src$core$blockly.ButtonFlyoutInflater=ButtonFlyoutInflater$$module$build$src$core$button_flyout_inflater;module$build$src$core$blockly.COLLAPSED_FIELD_NAME=COLLAPSED_FIELD_NAME$$module$build$src$core$constants;module$build$src$core$blockly.COLLAPSED_INPUT_NAME=COLLAPSED_INPUT_NAME$$module$build$src$core$constants;module$build$src$core$blockly.COLLAPSE_CHARS=COLLAPSE_CHARS$$module$build$src$core$internal_constants;
1712
+ module$build$src$core$blockly.CodeGenerator=$.CodeGenerator$$module$build$src$core$generator;module$build$src$core$blockly.CollapsibleToolboxCategory=CollapsibleToolboxCategory$$module$build$src$core$toolbox$collapsible_category;module$build$src$core$blockly.ComponentManager=ComponentManager$$module$build$src$core$component_manager;module$build$src$core$blockly.Connection=Connection$$module$build$src$core$connection;module$build$src$core$blockly.ConnectionChecker=ConnectionChecker$$module$build$src$core$connection_checker;
1713
+ module$build$src$core$blockly.ConnectionDB=ConnectionDB$$module$build$src$core$connection_db;module$build$src$core$blockly.ConnectionType=ConnectionType$$module$build$src$core$connection_type;module$build$src$core$blockly.ContextMenu=module$build$src$core$contextmenu;module$build$src$core$blockly.ContextMenuItems=module$build$src$core$contextmenu_items;module$build$src$core$blockly.ContextMenuRegistry=ContextMenuRegistry$$module$build$src$core$contextmenu_registry;
1714
+ module$build$src$core$blockly.Css=module$build$src$core$css;module$build$src$core$blockly.DELETE_VARIABLE_ID=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants;module$build$src$core$blockly.DeleteArea=DeleteArea$$module$build$src$core$delete_area;module$build$src$core$blockly.DragTarget=DragTarget$$module$build$src$core$drag_target;module$build$src$core$blockly.DropDownDiv=module$build$src$core$dropdowndiv;module$build$src$core$blockly.Events=module$build$src$core$events$events;
1715
+ module$build$src$core$blockly.Extensions=module$build$src$core$extensions;module$build$src$core$blockly.Field=Field$$module$build$src$core$field;module$build$src$core$blockly.FieldCheckbox=FieldCheckbox$$module$build$src$core$field_checkbox;module$build$src$core$blockly.FieldDropdown=FieldDropdown$$module$build$src$core$field_dropdown;module$build$src$core$blockly.FieldImage=FieldImage$$module$build$src$core$field_image;module$build$src$core$blockly.FieldLabel=FieldLabel$$module$build$src$core$field_label;
1716
+ module$build$src$core$blockly.FieldLabelSerializable=FieldLabelSerializable$$module$build$src$core$field_label_serializable;module$build$src$core$blockly.FieldNumber=FieldNumber$$module$build$src$core$field_number;module$build$src$core$blockly.FieldTextInput=$.FieldTextInput$$module$build$src$core$field_textinput;module$build$src$core$blockly.FieldVariable=FieldVariable$$module$build$src$core$field_variable;module$build$src$core$blockly.Flyout=Flyout$$module$build$src$core$flyout_base;
1717
+ module$build$src$core$blockly.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;module$build$src$core$blockly.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;module$build$src$core$blockly.FlyoutMetricsManager=FlyoutMetricsManager$$module$build$src$core$flyout_metrics_manager;module$build$src$core$blockly.FlyoutSeparator=FlyoutSeparator$$module$build$src$core$flyout_separator;module$build$src$core$blockly.FocusManager=FocusManager$$module$build$src$core$focus_manager;
1718
+ module$build$src$core$blockly.Generator=$.CodeGenerator$$module$build$src$core$generator;module$build$src$core$blockly.Gesture=Gesture$$module$build$src$core$gesture;module$build$src$core$blockly.Grid=Grid$$module$build$src$core$grid;module$build$src$core$blockly.HorizontalFlyout=HorizontalFlyout$$module$build$src$core$flyout_horizontal;module$build$src$core$blockly.INPUT_VALUE=INPUT_VALUE$$module$build$src$core$blockly;module$build$src$core$blockly.Input=Input$$module$build$src$core$inputs$input;
1719
+ module$build$src$core$blockly.InsertionMarkerPreviewer=InsertionMarkerPreviewer$$module$build$src$core$insertion_marker_previewer;module$build$src$core$blockly.LabelFlyoutInflater=LabelFlyoutInflater$$module$build$src$core$label_flyout_inflater;module$build$src$core$blockly.LineCursor=LineCursor$$module$build$src$core$keyboard_nav$line_cursor;module$build$src$core$blockly.Marker=Marker$$module$build$src$core$keyboard_nav$marker;module$build$src$core$blockly.MarkerManager=MarkerManager$$module$build$src$core$marker_manager;
1699
1720
  module$build$src$core$blockly.Menu=Menu$$module$build$src$core$menu;module$build$src$core$blockly.MenuItem=MenuItem$$module$build$src$core$menuitem;module$build$src$core$blockly.MetricsManager=MetricsManager$$module$build$src$core$metrics_manager;module$build$src$core$blockly.Msg=$.Msg$$module$build$src$core$msg;module$build$src$core$blockly.NEXT_STATEMENT=NEXT_STATEMENT$$module$build$src$core$blockly;module$build$src$core$blockly.Names=$.Names$$module$build$src$core$names;
1700
1721
  module$build$src$core$blockly.OPPOSITE_TYPE=OPPOSITE_TYPE$$module$build$src$core$internal_constants;module$build$src$core$blockly.OUTPUT_VALUE=OUTPUT_VALUE$$module$build$src$core$blockly;module$build$src$core$blockly.Options=Options$$module$build$src$core$options;module$build$src$core$blockly.PREVIOUS_STATEMENT=PREVIOUS_STATEMENT$$module$build$src$core$blockly;module$build$src$core$blockly.PROCEDURE_CATEGORY_NAME=CATEGORY_NAME$$module$build$src$core$procedures;
1701
1722
  module$build$src$core$blockly.Procedures=module$build$src$core$procedures;module$build$src$core$blockly.RENAME_VARIABLE_ID=RENAME_VARIABLE_ID$$module$build$src$core$internal_constants;module$build$src$core$blockly.RenderedConnection=RenderedConnection$$module$build$src$core$rendered_connection;module$build$src$core$blockly.Scrollbar=Scrollbar$$module$build$src$core$scrollbar;module$build$src$core$blockly.ScrollbarPair=ScrollbarPair$$module$build$src$core$scrollbar_pair;
1702
1723
  module$build$src$core$blockly.SeparatorFlyoutInflater=SeparatorFlyoutInflater$$module$build$src$core$separator_flyout_inflater;module$build$src$core$blockly.ShortcutItems=module$build$src$core$shortcut_items;module$build$src$core$blockly.ShortcutRegistry=ShortcutRegistry$$module$build$src$core$shortcut_registry;module$build$src$core$blockly.TOOLBOX_AT_BOTTOM=TOOLBOX_AT_BOTTOM$$module$build$src$core$blockly;module$build$src$core$blockly.TOOLBOX_AT_LEFT=TOOLBOX_AT_LEFT$$module$build$src$core$blockly;
1703
- module$build$src$core$blockly.TOOLBOX_AT_RIGHT=TOOLBOX_AT_RIGHT$$module$build$src$core$blockly;module$build$src$core$blockly.TOOLBOX_AT_TOP=TOOLBOX_AT_TOP$$module$build$src$core$blockly;module$build$src$core$blockly.TabNavigateCursor=TabNavigateCursor$$module$build$src$core$keyboard_nav$tab_navigate_cursor;module$build$src$core$blockly.Theme=Theme$$module$build$src$core$theme;module$build$src$core$blockly.ThemeManager=ThemeManager$$module$build$src$core$theme_manager;
1704
- module$build$src$core$blockly.Themes=module$build$src$core$theme$themes;module$build$src$core$blockly.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;module$build$src$core$blockly.ToolboxCategory=ToolboxCategory$$module$build$src$core$toolbox$category;module$build$src$core$blockly.ToolboxItem=ToolboxItem$$module$build$src$core$toolbox$toolbox_item;module$build$src$core$blockly.ToolboxSeparator=ToolboxSeparator$$module$build$src$core$toolbox$separator;module$build$src$core$blockly.Tooltip=module$build$src$core$tooltip;
1705
- module$build$src$core$blockly.Touch=module$build$src$core$touch;module$build$src$core$blockly.Trashcan=Trashcan$$module$build$src$core$trashcan;module$build$src$core$blockly.UnattachedFieldError=UnattachedFieldError$$module$build$src$core$field;module$build$src$core$blockly.VARIABLE_CATEGORY_NAME=CATEGORY_NAME$$module$build$src$core$variables;module$build$src$core$blockly.VARIABLE_DYNAMIC_CATEGORY_NAME=CATEGORY_NAME$$module$build$src$core$variables_dynamic;module$build$src$core$blockly.VERSION=VERSION$$module$build$src$core$blockly;
1706
- module$build$src$core$blockly.VariableMap=VariableMap$$module$build$src$core$variable_map;module$build$src$core$blockly.VariableModel=VariableModel$$module$build$src$core$variable_model;module$build$src$core$blockly.Variables=module$build$src$core$variables;module$build$src$core$blockly.VariablesDynamic=module$build$src$core$variables_dynamic;module$build$src$core$blockly.VerticalFlyout=VerticalFlyout$$module$build$src$core$flyout_vertical;module$build$src$core$blockly.WidgetDiv=module$build$src$core$widgetdiv;
1707
- module$build$src$core$blockly.Workspace=Workspace$$module$build$src$core$workspace;module$build$src$core$blockly.WorkspaceAudio=WorkspaceAudio$$module$build$src$core$workspace_audio;module$build$src$core$blockly.WorkspaceDragger=WorkspaceDragger$$module$build$src$core$workspace_dragger;module$build$src$core$blockly.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$blockly.Xml=module$build$src$core$xml;module$build$src$core$blockly.ZoomControls=ZoomControls$$module$build$src$core$zoom_controls;
1708
- module$build$src$core$blockly.blockAnimations=module$build$src$core$block_animations;module$build$src$core$blockly.blockRendering=module$build$src$core$renderers$common$block_rendering;module$build$src$core$blockly.browserEvents=module$build$src$core$browser_events;module$build$src$core$blockly.bubbles=module$build$src$core$bubbles;module$build$src$core$blockly.bumpObjects=module$build$src$core$bump_objects;module$build$src$core$blockly.clipboard=module$build$src$core$clipboard;
1709
- module$build$src$core$blockly.comments=module$build$src$core$comments;module$build$src$core$blockly.common=module$build$src$core$common;module$build$src$core$blockly.config=$.config$$module$build$src$core$config;module$build$src$core$blockly.constants=module$build$src$core$constants;module$build$src$core$blockly.defineBlocksWithJsonArray=defineBlocksWithJsonArray$$module$build$src$core$common;module$build$src$core$blockly.dialog=module$build$src$core$dialog;
1710
- module$build$src$core$blockly.dragging=module$build$src$core$dragging;module$build$src$core$blockly.fieldRegistry=module$build$src$core$field_registry;module$build$src$core$blockly.geras=module$build$src$core$renderers$geras$geras;module$build$src$core$blockly.getMainWorkspace=getMainWorkspace$$module$build$src$core$common;module$build$src$core$blockly.getSelected=getSelected$$module$build$src$core$common;module$build$src$core$blockly.hasBubble=hasBubble$$module$build$src$core$interfaces$i_has_bubble;
1724
+ module$build$src$core$blockly.TOOLBOX_AT_RIGHT=TOOLBOX_AT_RIGHT$$module$build$src$core$blockly;module$build$src$core$blockly.TOOLBOX_AT_TOP=TOOLBOX_AT_TOP$$module$build$src$core$blockly;module$build$src$core$blockly.Theme=Theme$$module$build$src$core$theme;module$build$src$core$blockly.ThemeManager=ThemeManager$$module$build$src$core$theme_manager;module$build$src$core$blockly.Themes=module$build$src$core$theme$themes;module$build$src$core$blockly.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;
1725
+ module$build$src$core$blockly.ToolboxCategory=ToolboxCategory$$module$build$src$core$toolbox$category;module$build$src$core$blockly.ToolboxItem=ToolboxItem$$module$build$src$core$toolbox$toolbox_item;module$build$src$core$blockly.ToolboxSeparator=ToolboxSeparator$$module$build$src$core$toolbox$separator;module$build$src$core$blockly.Tooltip=module$build$src$core$tooltip;module$build$src$core$blockly.Touch=module$build$src$core$touch;module$build$src$core$blockly.Trashcan=Trashcan$$module$build$src$core$trashcan;
1726
+ module$build$src$core$blockly.UnattachedFieldError=UnattachedFieldError$$module$build$src$core$field;module$build$src$core$blockly.VARIABLE_CATEGORY_NAME=CATEGORY_NAME$$module$build$src$core$variables;module$build$src$core$blockly.VARIABLE_DYNAMIC_CATEGORY_NAME=CATEGORY_NAME$$module$build$src$core$variables_dynamic;module$build$src$core$blockly.VERSION=VERSION$$module$build$src$core$blockly;module$build$src$core$blockly.VariableMap=VariableMap$$module$build$src$core$variable_map;
1727
+ module$build$src$core$blockly.VariableModel=VariableModel$$module$build$src$core$variable_model;module$build$src$core$blockly.Variables=module$build$src$core$variables;module$build$src$core$blockly.VariablesDynamic=module$build$src$core$variables_dynamic;module$build$src$core$blockly.VerticalFlyout=VerticalFlyout$$module$build$src$core$flyout_vertical;module$build$src$core$blockly.WidgetDiv=module$build$src$core$widgetdiv;module$build$src$core$blockly.Workspace=Workspace$$module$build$src$core$workspace;
1728
+ module$build$src$core$blockly.WorkspaceAudio=WorkspaceAudio$$module$build$src$core$workspace_audio;module$build$src$core$blockly.WorkspaceDragger=WorkspaceDragger$$module$build$src$core$workspace_dragger;module$build$src$core$blockly.WorkspaceSvg=WorkspaceSvg$$module$build$src$core$workspace_svg;module$build$src$core$blockly.Xml=module$build$src$core$xml;module$build$src$core$blockly.ZoomControls=ZoomControls$$module$build$src$core$zoom_controls;module$build$src$core$blockly.blockAnimations=module$build$src$core$block_animations;
1729
+ module$build$src$core$blockly.blockRendering=module$build$src$core$renderers$common$block_rendering;module$build$src$core$blockly.browserEvents=module$build$src$core$browser_events;module$build$src$core$blockly.bubbles=module$build$src$core$bubbles;module$build$src$core$blockly.bumpObjects=module$build$src$core$bump_objects;module$build$src$core$blockly.clipboard=module$build$src$core$clipboard;module$build$src$core$blockly.comments=module$build$src$core$comments;
1730
+ module$build$src$core$blockly.common=module$build$src$core$common;module$build$src$core$blockly.config=$.config$$module$build$src$core$config;module$build$src$core$blockly.constants=module$build$src$core$constants;module$build$src$core$blockly.defineBlocksWithJsonArray=defineBlocksWithJsonArray$$module$build$src$core$common;module$build$src$core$blockly.dialog=module$build$src$core$dialog;module$build$src$core$blockly.dragging=module$build$src$core$dragging;
1731
+ module$build$src$core$blockly.fieldRegistry=module$build$src$core$field_registry;module$build$src$core$blockly.geras=module$build$src$core$renderers$geras$geras;module$build$src$core$blockly.getFocusManager=getFocusManager$$module$build$src$core$focus_manager;module$build$src$core$blockly.getMainWorkspace=getMainWorkspace$$module$build$src$core$common;module$build$src$core$blockly.getSelected=getSelected$$module$build$src$core$common;module$build$src$core$blockly.hasBubble=hasBubble$$module$build$src$core$interfaces$i_has_bubble;
1711
1732
  module$build$src$core$blockly.hideChaff=hideChaff$$module$build$src$core$blockly;module$build$src$core$blockly.icons=module$build$src$core$icons;module$build$src$core$blockly.inject=inject$$module$build$src$core$inject;module$build$src$core$blockly.inputs=module$build$src$core$inputs;module$build$src$core$blockly.isCopyable=isCopyable$$module$build$src$core$interfaces$i_copyable;module$build$src$core$blockly.isDeletable=isDeletable$$module$build$src$core$interfaces$i_deletable;
1712
1733
  module$build$src$core$blockly.isDraggable=isDraggable$$module$build$src$core$interfaces$i_draggable;module$build$src$core$blockly.isIcon=isIcon$$module$build$src$core$interfaces$i_icon;module$build$src$core$blockly.isObservable=isObservable$$module$build$src$core$interfaces$i_observable;module$build$src$core$blockly.isPaster=isPaster$$module$build$src$core$interfaces$i_paster;module$build$src$core$blockly.isRenderedElement=isRenderedElement$$module$build$src$core$interfaces$i_rendered_element;
1713
1734
  module$build$src$core$blockly.isSelectable=isSelectable$$module$build$src$core$interfaces$i_selectable;module$build$src$core$blockly.isSerializable=isSerializable$$module$build$src$core$interfaces$i_serializable;module$build$src$core$blockly.isVariableBackedParameterModel=isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model;module$build$src$core$blockly.layers=module$build$src$core$layers;module$build$src$core$blockly.procedures=module$build$src$core$procedures;