blockly 13.0.0-beta.0 → 13.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/blockly.min.js +1093 -364
  2. package/blockly.mjs +1 -1
  3. package/blockly_compressed.js +1036 -364
  4. package/blockly_compressed.js.map +1 -1
  5. package/core/block_aria_composer.d.ts +119 -0
  6. package/core/block_svg.d.ts +21 -1
  7. package/core/blockly.d.ts +1 -1
  8. package/core/bubbles/mini_workspace_bubble.d.ts +4 -1
  9. package/core/bubbles/text_bubble.d.ts +4 -1
  10. package/core/dragging/block_drag_strategy.d.ts +45 -3
  11. package/core/field.d.ts +15 -17
  12. package/core/field_input.d.ts +23 -0
  13. package/core/focus_manager.d.ts +47 -2
  14. package/core/inputs/input.d.ts +15 -0
  15. package/core/interfaces/i_focusable_node.d.ts +3 -1
  16. package/core/keyboard_nav/keyboard_mover.d.ts +16 -5
  17. package/core/keyboard_nav/navigation_policies/bubble_navigation_policy.d.ts +63 -0
  18. package/core/keyboard_nav/navigation_policies/icon_navigation_policy.d.ts +2 -2
  19. package/core/keyboard_nav/navigators/flyout_navigator.d.ts +1 -1
  20. package/core/shortcut_items.d.ts +11 -1
  21. package/core/shortcut_registry.d.ts +6 -0
  22. package/core/toolbox/toolbox.d.ts +5 -11
  23. package/core/utils/aria.d.ts +9 -61
  24. package/core/utils/dom.d.ts +1 -1
  25. package/core/utils/shortcut_formatting.d.ts +5 -7
  26. package/core/variables.d.ts +1 -1
  27. package/index.mjs +1 -1
  28. package/msg/ab.js +57 -0
  29. package/msg/ab.mjs +57 -0
  30. package/msg/ace.js +57 -0
  31. package/msg/ace.mjs +57 -0
  32. package/msg/af.js +57 -0
  33. package/msg/af.mjs +57 -0
  34. package/msg/am.js +57 -0
  35. package/msg/am.mjs +57 -0
  36. package/msg/ar.js +57 -0
  37. package/msg/ar.mjs +57 -0
  38. package/msg/ast.js +57 -0
  39. package/msg/ast.mjs +57 -0
  40. package/msg/az.js +57 -0
  41. package/msg/az.mjs +57 -0
  42. package/msg/ba.js +57 -0
  43. package/msg/ba.mjs +57 -0
  44. package/msg/bcc.js +57 -0
  45. package/msg/bcc.mjs +57 -0
  46. package/msg/be-tarask.js +57 -0
  47. package/msg/be-tarask.mjs +57 -0
  48. package/msg/be.js +57 -0
  49. package/msg/be.mjs +57 -0
  50. package/msg/bg.js +57 -0
  51. package/msg/bg.mjs +57 -0
  52. package/msg/bn.js +57 -0
  53. package/msg/bn.mjs +57 -0
  54. package/msg/br.js +57 -0
  55. package/msg/br.mjs +57 -0
  56. package/msg/bs.js +57 -0
  57. package/msg/bs.mjs +57 -0
  58. package/msg/ca.js +57 -0
  59. package/msg/ca.mjs +57 -0
  60. package/msg/cdo.js +57 -0
  61. package/msg/cdo.mjs +57 -0
  62. package/msg/ce.js +57 -0
  63. package/msg/ce.mjs +57 -0
  64. package/msg/cs.js +57 -0
  65. package/msg/cs.mjs +57 -0
  66. package/msg/da.js +57 -0
  67. package/msg/da.mjs +57 -0
  68. package/msg/de.js +57 -0
  69. package/msg/de.mjs +57 -0
  70. package/msg/diq.js +57 -0
  71. package/msg/diq.mjs +57 -0
  72. package/msg/dtp.js +57 -0
  73. package/msg/dtp.mjs +57 -0
  74. package/msg/dty.js +57 -0
  75. package/msg/dty.mjs +57 -0
  76. package/msg/ee.js +57 -0
  77. package/msg/ee.mjs +57 -0
  78. package/msg/el.js +57 -0
  79. package/msg/el.mjs +57 -0
  80. package/msg/en-gb.js +57 -0
  81. package/msg/en-gb.mjs +57 -0
  82. package/msg/en.js +57 -0
  83. package/msg/en.mjs +57 -0
  84. package/msg/eo.js +57 -0
  85. package/msg/eo.mjs +57 -0
  86. package/msg/es.js +57 -0
  87. package/msg/es.mjs +57 -0
  88. package/msg/et.js +57 -0
  89. package/msg/et.mjs +57 -0
  90. package/msg/eu.js +57 -0
  91. package/msg/eu.mjs +57 -0
  92. package/msg/fa.js +57 -0
  93. package/msg/fa.mjs +57 -0
  94. package/msg/fi.js +57 -0
  95. package/msg/fi.mjs +57 -0
  96. package/msg/fo.js +57 -0
  97. package/msg/fo.mjs +57 -0
  98. package/msg/fr.js +57 -0
  99. package/msg/fr.mjs +57 -0
  100. package/msg/frr.js +57 -0
  101. package/msg/frr.mjs +57 -0
  102. package/msg/gl.js +57 -0
  103. package/msg/gl.mjs +57 -0
  104. package/msg/gn.js +57 -0
  105. package/msg/gn.mjs +57 -0
  106. package/msg/gor.js +57 -0
  107. package/msg/gor.mjs +57 -0
  108. package/msg/ha.js +57 -0
  109. package/msg/ha.mjs +57 -0
  110. package/msg/hak.js +57 -0
  111. package/msg/hak.mjs +57 -0
  112. package/msg/he.js +57 -0
  113. package/msg/he.mjs +57 -0
  114. package/msg/hi.js +57 -0
  115. package/msg/hi.mjs +57 -0
  116. package/msg/hr.js +57 -0
  117. package/msg/hr.mjs +57 -0
  118. package/msg/hrx.js +57 -0
  119. package/msg/hrx.mjs +57 -0
  120. package/msg/hsb.js +57 -0
  121. package/msg/hsb.mjs +57 -0
  122. package/msg/hu.js +57 -0
  123. package/msg/hu.mjs +57 -0
  124. package/msg/hy.js +57 -0
  125. package/msg/hy.mjs +57 -0
  126. package/msg/ia.js +57 -0
  127. package/msg/ia.mjs +57 -0
  128. package/msg/id.js +57 -0
  129. package/msg/id.mjs +57 -0
  130. package/msg/ig.js +57 -0
  131. package/msg/ig.mjs +57 -0
  132. package/msg/inh.js +57 -0
  133. package/msg/inh.mjs +57 -0
  134. package/msg/is.js +57 -0
  135. package/msg/is.mjs +57 -0
  136. package/msg/it.js +57 -0
  137. package/msg/it.mjs +57 -0
  138. package/msg/ja.js +57 -0
  139. package/msg/ja.mjs +57 -0
  140. package/msg/ka.js +57 -0
  141. package/msg/ka.mjs +57 -0
  142. package/msg/kab.js +57 -0
  143. package/msg/kab.mjs +57 -0
  144. package/msg/kbd-cyrl.js +57 -0
  145. package/msg/kbd-cyrl.mjs +57 -0
  146. package/msg/km.js +57 -0
  147. package/msg/km.mjs +57 -0
  148. package/msg/kn.js +57 -0
  149. package/msg/kn.mjs +57 -0
  150. package/msg/ko.js +57 -0
  151. package/msg/ko.mjs +57 -0
  152. package/msg/ksh.js +57 -0
  153. package/msg/ksh.mjs +57 -0
  154. package/msg/ku-latn.js +57 -0
  155. package/msg/ku-latn.mjs +57 -0
  156. package/msg/ky.js +57 -0
  157. package/msg/ky.mjs +57 -0
  158. package/msg/la.js +57 -0
  159. package/msg/la.mjs +57 -0
  160. package/msg/lb.js +57 -0
  161. package/msg/lb.mjs +57 -0
  162. package/msg/lki.js +57 -0
  163. package/msg/lki.mjs +57 -0
  164. package/msg/lo.js +57 -0
  165. package/msg/lo.mjs +57 -0
  166. package/msg/lrc.js +57 -0
  167. package/msg/lrc.mjs +57 -0
  168. package/msg/lt.js +57 -0
  169. package/msg/lt.mjs +57 -0
  170. package/msg/lv.js +57 -0
  171. package/msg/lv.mjs +57 -0
  172. package/msg/mg.js +57 -0
  173. package/msg/mg.mjs +57 -0
  174. package/msg/mk.js +57 -0
  175. package/msg/mk.mjs +57 -0
  176. package/msg/ml.js +57 -0
  177. package/msg/ml.mjs +57 -0
  178. package/msg/mnw.js +57 -0
  179. package/msg/mnw.mjs +57 -0
  180. package/msg/ms.js +57 -0
  181. package/msg/ms.mjs +57 -0
  182. package/msg/my.js +57 -0
  183. package/msg/my.mjs +57 -0
  184. package/msg/mzn.js +57 -0
  185. package/msg/mzn.mjs +57 -0
  186. package/msg/nb.js +57 -0
  187. package/msg/nb.mjs +57 -0
  188. package/msg/ne.js +57 -0
  189. package/msg/ne.mjs +57 -0
  190. package/msg/nl.js +57 -0
  191. package/msg/nl.mjs +57 -0
  192. package/msg/oc.js +57 -0
  193. package/msg/oc.mjs +57 -0
  194. package/msg/olo.js +57 -0
  195. package/msg/olo.mjs +57 -0
  196. package/msg/pa.js +57 -0
  197. package/msg/pa.mjs +57 -0
  198. package/msg/pl.js +57 -0
  199. package/msg/pl.mjs +57 -0
  200. package/msg/pms.js +57 -0
  201. package/msg/pms.mjs +57 -0
  202. package/msg/ps.js +57 -0
  203. package/msg/ps.mjs +57 -0
  204. package/msg/pt-br.js +57 -0
  205. package/msg/pt-br.mjs +57 -0
  206. package/msg/pt.js +57 -0
  207. package/msg/pt.mjs +57 -0
  208. package/msg/ro.js +57 -0
  209. package/msg/ro.mjs +57 -0
  210. package/msg/ru.js +57 -0
  211. package/msg/ru.mjs +57 -0
  212. package/msg/sc.js +57 -0
  213. package/msg/sc.mjs +57 -0
  214. package/msg/sco.js +57 -0
  215. package/msg/sco.mjs +57 -0
  216. package/msg/sd.js +57 -0
  217. package/msg/sd.mjs +57 -0
  218. package/msg/shn.js +57 -0
  219. package/msg/shn.mjs +57 -0
  220. package/msg/si.js +57 -0
  221. package/msg/si.mjs +57 -0
  222. package/msg/sk.js +57 -0
  223. package/msg/sk.mjs +57 -0
  224. package/msg/skr-arab.js +57 -0
  225. package/msg/skr-arab.mjs +57 -0
  226. package/msg/sl.js +57 -0
  227. package/msg/sl.mjs +57 -0
  228. package/msg/smn.js +57 -0
  229. package/msg/smn.mjs +57 -0
  230. package/msg/sq.js +57 -0
  231. package/msg/sq.mjs +57 -0
  232. package/msg/sr-latn.js +57 -0
  233. package/msg/sr-latn.mjs +57 -0
  234. package/msg/sr.js +57 -0
  235. package/msg/sr.mjs +57 -0
  236. package/msg/sv.js +57 -0
  237. package/msg/sv.mjs +57 -0
  238. package/msg/sw.js +57 -0
  239. package/msg/sw.mjs +57 -0
  240. package/msg/ta.js +57 -0
  241. package/msg/ta.mjs +57 -0
  242. package/msg/tcy.js +57 -0
  243. package/msg/tcy.mjs +57 -0
  244. package/msg/tdd.js +57 -0
  245. package/msg/tdd.mjs +57 -0
  246. package/msg/te.js +57 -0
  247. package/msg/te.mjs +57 -0
  248. package/msg/th.js +57 -0
  249. package/msg/th.mjs +57 -0
  250. package/msg/ti.js +57 -0
  251. package/msg/ti.mjs +57 -0
  252. package/msg/tl.js +57 -0
  253. package/msg/tl.mjs +57 -0
  254. package/msg/tlh.js +57 -0
  255. package/msg/tlh.mjs +57 -0
  256. package/msg/tr.js +57 -0
  257. package/msg/tr.mjs +57 -0
  258. package/msg/ug-arab.js +57 -0
  259. package/msg/ug-arab.mjs +57 -0
  260. package/msg/uk.js +57 -0
  261. package/msg/uk.mjs +57 -0
  262. package/msg/ur.js +57 -0
  263. package/msg/ur.mjs +57 -0
  264. package/msg/uz.js +57 -0
  265. package/msg/uz.mjs +57 -0
  266. package/msg/vi.js +57 -0
  267. package/msg/vi.mjs +57 -0
  268. package/msg/xmf.js +57 -0
  269. package/msg/xmf.mjs +57 -0
  270. package/msg/yo.js +57 -0
  271. package/msg/yo.mjs +57 -0
  272. package/msg/zgh.js +57 -0
  273. package/msg/zgh.mjs +57 -0
  274. package/msg/zh-hans.js +57 -0
  275. package/msg/zh-hans.mjs +57 -0
  276. package/msg/zh-hant.js +57 -0
  277. package/msg/zh-hant.mjs +57 -0
  278. package/package.json +1 -1
  279. package/core/keyboard_nav/navigation_policies/block_comment_navigation_policy.d.ts +0 -63
package/blockly.min.js CHANGED
@@ -16,51 +16,54 @@ shouldHandleEvent$$module$build$src$core$touch,getTouchIdentifierFromEvent$$modu
16
16
  getNextUniqueId$$module$build$src$core$utils$idgenerator,genUid$$module$build$src$core$utils$idgenerator,isBlockCreate$$module$build$src$core$events$predicates,isBlockDelete$$module$build$src$core$events$predicates,isBlockChange$$module$build$src$core$events$predicates,isBlockFieldIntermediateChange$$module$build$src$core$events$predicates,isBlockMove$$module$build$src$core$events$predicates,isVarCreate$$module$build$src$core$events$predicates,isVarDelete$$module$build$src$core$events$predicates,
17
17
  isVarRename$$module$build$src$core$events$predicates,isBlockDrag$$module$build$src$core$events$predicates,isSelected$$module$build$src$core$events$predicates,isClick$$module$build$src$core$events$predicates,isBubbleOpen$$module$build$src$core$events$predicates,isTrashcanOpen$$module$build$src$core$events$predicates,isToolboxItemSelect$$module$build$src$core$events$predicates,isThemeChange$$module$build$src$core$events$predicates,isViewportChange$$module$build$src$core$events$predicates,isCommentCreate$$module$build$src$core$events$predicates,
18
18
  isCommentDelete$$module$build$src$core$events$predicates,isCommentChange$$module$build$src$core$events$predicates,isCommentMove$$module$build$src$core$events$predicates,isCommentResize$$module$build$src$core$events$predicates,isCommentDrag$$module$build$src$core$events$predicates,isCommentCollapse$$module$build$src$core$events$predicates,isFinishedLoading$$module$build$src$core$events$predicates,getRecordUndo$$module$build$src$core$events$utils,fire$$module$build$src$core$events$utils,fireInternal$$module$build$src$core$events$utils,
19
- fireNow$$module$build$src$core$events$utils,enqueueEvent$$module$build$src$core$events$utils,filter$$module$build$src$core$events$utils,clearPendingUndo$$module$build$src$core$events$utils,isEnabled$$module$build$src$core$events$utils,setGroupInternal$$module$build$src$core$events$utils,getDescendantIds$$module$build$src$core$events$utils,fromJson$$module$build$src$core$events$utils,get$$module$build$src$core$events$utils,disableOrphans$$module$build$src$core$events$utils,createSvgElement$$module$build$src$core$utils$dom,
20
- addClass$$module$build$src$core$utils$dom,removeClasses$$module$build$src$core$utils$dom,removeClass$$module$build$src$core$utils$dom,hasClass$$module$build$src$core$utils$dom,removeNode$$module$build$src$core$utils$dom,insertAfter$$module$build$src$core$utils$dom,setCssTransform$$module$build$src$core$utils$dom,startTextWidthCache$$module$build$src$core$utils$dom,stopTextWidthCache$$module$build$src$core$utils$dom,getTextWidth$$module$build$src$core$utils$dom,getFastTextWidth$$module$build$src$core$utils$dom,
21
- getFastTextWidthWithSizeString$$module$build$src$core$utils$dom,measureFontMetrics$$module$build$src$core$utils$dom,isFocusableNode$$module$build$src$core$interfaces$i_focusable_node,isSelectable$$module$build$src$core$interfaces$i_selectable,deepMerge$$module$build$src$core$utils$object,getWorkspaceById$$module$build$src$core$common,getAllWorkspaces$$module$build$src$core$common,registerWorkspace$$module$build$src$core$common,unregisterWorkpace$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$common,
22
- setMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$common,setSelected$$module$build$src$core$common,fireSelectedEvent$$module$build$src$core$common,getParentContainer$$module$build$src$core$common,setParentContainer$$module$build$src$core$common,svgResize$$module$build$src$core$common,getBlockTypeCounts$$module$build$src$core$common,jsonInitFactory$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$common,defineBlocksWithJsonArrayInternal$$module$build$src$core$common,
23
- globalShortcutHandler$$module$build$src$core$common,removeElem$$module$build$src$core$utils$array,register$$module$build$src$core$css,inject$$module$build$src$core$css,getSize$$module$build$src$core$utils$style,getSizeInternal$$module$build$src$core$utils$style,getSizeWithDisplay$$module$build$src$core$utils$style,getComputedStyle$$module$build$src$core$utils$style,getPageOffset$$module$build$src$core$utils$style,getViewportPageOffset$$module$build$src$core$utils$style,getBorderBox$$module$build$src$core$utils$style,
24
- scrollIntoContainerView$$module$build$src$core$utils$style,getContainerOffsetToScrollInto$$module$build$src$core$utils$style,getRelativeXY$$module$build$src$core$utils$svg_math,getInjectionDivXY$$module$build$src$core$utils$svg_math,getViewportBBox$$module$build$src$core$utils$svg_math,getDocumentScroll$$module$build$src$core$utils$svg_math,screenToWsCoordinates$$module$build$src$core$utils$svg_math,wsToScreenCoordinates$$module$build$src$core$utils$svg_math,injectDependencies$$module$build$src$core$utils$xml,
25
- domToText$$module$build$src$core$utils$xml,sanitizeText$$module$build$src$core$utils$xml,convertToolboxDefToJson$$module$build$src$core$utils$toolbox,validateToolbox$$module$build$src$core$utils$toolbox,convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox,hasCategories$$module$build$src$core$utils$toolbox,hasCategoriesInternal$$module$build$src$core$utils$toolbox,isCategoryCollapsible$$module$build$src$core$utils$toolbox,convertToToolboxJson$$module$build$src$core$utils$toolbox,xmlToJsonArray$$module$build$src$core$utils$toolbox,
26
- addAttributes$$module$build$src$core$utils$toolbox,parseToolboxTree$$module$build$src$core$utils$toolbox,getStartPositionRect$$module$build$src$core$positionable_helpers,getCornerOppositeToolbox$$module$build$src$core$positionable_helpers,bumpPositionRect$$module$build$src$core$positionable_helpers,register$$module$build$src$core$serialization$registry,unregister$$module$build$src$core$serialization$registry,save$$module$build$src$core$serialization$workspace_comments,append$$module$build$src$core$serialization$workspace_comments,
27
- register$$module$build$src$core$clipboard$registry,unregister$$module$build$src$core$clipboard$registry,moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster,commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster,removeRole$$module$build$src$core$utils$aria,setRole$$module$build$src$core$utils$aria,getRole$$module$build$src$core$utils$aria,setState$$module$build$src$core$utils$aria,clearState$$module$build$src$core$utils$aria,getState$$module$build$src$core$utils$aria,
28
- initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria,announceDynamicAriaState$$module$build$src$core$utils$aria,isSerializable$$module$build$src$core$interfaces$i_serializable,queueRender$$module$build$src$core$render_management,finishQueuedRenders$$module$build$src$core$render_management,triggerQueuedRenders$$module$build$src$core$render_management,alwaysImmediatelyRender$$module$build$src$core$render_management,queueBlock$$module$build$src$core$render_management,doRenders$$module$build$src$core$render_management,
29
- dequeueBlock$$module$build$src$core$render_management,shouldRenderRootBlock$$module$build$src$core$render_management,renderBlock$$module$build$src$core$render_management,alert$$module$build$src$core$dialog,setAlert$$module$build$src$core$dialog,confirm$$module$build$src$core$dialog,setConfirm$$module$build$src$core$dialog,prompt$$module$build$src$core$dialog,setPrompt$$module$build$src$core$dialog,toast$$module$build$src$core$dialog,setToast$$module$build$src$core$dialog,isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,
30
- isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model,internalFlyoutCategory$$module$build$src$core$variables,flyoutCategory$$module$build$src$core$variables,generateVariableFieldJson$$module$build$src$core$variables,jsonFlyoutCategoryBlocks$$module$build$src$core$variables,xmlFlyoutCategory$$module$build$src$core$variables,flyoutCategoryBlocks$$module$build$src$core$variables,
31
- generateUniqueName$$module$build$src$core$variables,generateUniqueNameInternal$$module$build$src$core$variables,generateUniqueNameFromOptions$$module$build$src$core$variables,createVariableButtonHandler$$module$build$src$core$variables,promptName$$module$build$src$core$variables,nameUsedWithOtherType$$module$build$src$core$variables,nameUsedWithAnyType$$module$build$src$core$variables,nameUsedWithConflictingParam$$module$build$src$core$variables,checkForConflictingParamWithProcedureModels$$module$build$src$core$variables,
32
- checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables,generateVariableFieldDom$$module$build$src$core$variables,createVariable$$module$build$src$core$variables,getAddedVariables$$module$build$src$core$variables,compareByName$$module$build$src$core$variables,getVariableUsesById$$module$build$src$core$variables,save$$module$build$src$core$serialization$blocks,saveAttributes$$module$build$src$core$serialization$blocks,saveCoords$$module$build$src$core$serialization$blocks,saveExtraState$$module$build$src$core$serialization$blocks,
33
- saveIcons$$module$build$src$core$serialization$blocks,saveFields$$module$build$src$core$serialization$blocks,saveInputBlocks$$module$build$src$core$serialization$blocks,saveNextBlocks$$module$build$src$core$serialization$blocks,saveConnection$$module$build$src$core$serialization$blocks,append$$module$build$src$core$serialization$blocks,appendInternal$$module$build$src$core$serialization$blocks,appendPrivate$$module$build$src$core$serialization$blocks,checkNewVariables$$module$build$src$core$serialization$blocks,
34
- loadCoords$$module$build$src$core$serialization$blocks,loadAttributes$$module$build$src$core$serialization$blocks,loadExtraState$$module$build$src$core$serialization$blocks,tryToConnectParent$$module$build$src$core$serialization$blocks,loadIcons$$module$build$src$core$serialization$blocks,loadFields$$module$build$src$core$serialization$blocks,loadInputBlocks$$module$build$src$core$serialization$blocks,loadNextBlocks$$module$build$src$core$serialization$blocks,loadConnection$$module$build$src$core$serialization$blocks,
35
- initBlock$$module$build$src$core$serialization$blocks,hasBubble$$module$build$src$core$interfaces$i_has_bubble,toRadians$$module$build$src$core$utils$math,toDegrees$$module$build$src$core$utils$math,clamp$$module$build$src$core$utils$math,createDom$$module$build$src$core$dropdowndiv,setBoundsElement$$module$build$src$core$dropdowndiv,getOwner$$module$build$src$core$dropdowndiv,getContentDiv$$module$build$src$core$dropdowndiv,clearContent$$module$build$src$core$dropdowndiv,setColour$$module$build$src$core$dropdowndiv,
36
- showPositionedByBlock$$module$build$src$core$dropdowndiv,showPositionedByField$$module$build$src$core$dropdowndiv,getScaledBboxOfBlock$$module$build$src$core$dropdowndiv,getScaledBboxOfField$$module$build$src$core$dropdowndiv,showPositionedByRect$$module$build$src$core$dropdowndiv,show$$module$build$src$core$dropdowndiv,getPositionBelowMetrics$$module$build$src$core$dropdowndiv,getPositionAboveMetrics$$module$build$src$core$dropdowndiv,getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv,
37
- getPositionX$$module$build$src$core$dropdowndiv,isVisible$$module$build$src$core$dropdowndiv,hideIfOwner$$module$build$src$core$dropdowndiv,hide$$module$build$src$core$dropdowndiv,hideWithoutAnimation$$module$build$src$core$dropdowndiv,positionInternal$$module$build$src$core$dropdowndiv,repositionForWindowResize$$module$build$src$core$dropdowndiv,shortestStringLength$$module$build$src$core$utils$string,commonWordPrefix$$module$build$src$core$utils$string,commonWordSuffix$$module$build$src$core$utils$string,
38
- wrapLine$$module$build$src$core$utils$string,wrapScore$$module$build$src$core$utils$string,wrapMutate$$module$build$src$core$utils$string,wrapToText$$module$build$src$core$utils$string,setCustomTooltip$$module$build$src$core$tooltip,getCustomTooltip$$module$build$src$core$tooltip,isVisible$$module$build$src$core$tooltip,getDiv$$module$build$src$core$tooltip,getTooltipOfObject$$module$build$src$core$tooltip,getTargetObject$$module$build$src$core$tooltip,createDom$$module$build$src$core$tooltip,bindMouseEvents$$module$build$src$core$tooltip,
39
- unbindMouseEvents$$module$build$src$core$tooltip,onMouseOver$$module$build$src$core$tooltip,onMouseOut$$module$build$src$core$tooltip,onMouseMove$$module$build$src$core$tooltip,dispose$$module$build$src$core$tooltip,hide$$module$build$src$core$tooltip,block$$module$build$src$core$tooltip,unblock$$module$build$src$core$tooltip,renderContent$$module$build$src$core$tooltip,renderDefaultContent$$module$build$src$core$tooltip,getPosition$$module$build$src$core$tooltip,show$$module$build$src$core$tooltip,
40
- getHsvSaturation$$module$build$src$core$utils$colour,setHsvSaturation$$module$build$src$core$utils$colour,getHsvValue$$module$build$src$core$utils$colour,setHsvValue$$module$build$src$core$utils$colour,parse$$module$build$src$core$utils$colour,rgbToHex$$module$build$src$core$utils$colour,hexToRgb$$module$build$src$core$utils$colour,hsvToHex$$module$build$src$core$utils$colour,blend$$module$build$src$core$utils$colour,hueToHex$$module$build$src$core$utils$colour,tokenizeInterpolationInternal$$module$build$src$core$utils$parsing,
41
- tokenizeInterpolation$$module$build$src$core$utils$parsing,replaceMessageReferences$$module$build$src$core$utils$parsing,checkMessageReferences$$module$build$src$core$utils$parsing,parseBlockColour$$module$build$src$core$utils$parsing,getDiv$$module$build$src$core$widgetdiv,testOnly_setDiv$$module$build$src$core$widgetdiv,createDom$$module$build$src$core$widgetdiv,show$$module$build$src$core$widgetdiv,hide$$module$build$src$core$widgetdiv,isVisible$$module$build$src$core$widgetdiv,hideIfOwner$$module$build$src$core$widgetdiv,
42
- hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv,positionInternal$$module$build$src$core$widgetdiv,positionWithAnchor$$module$build$src$core$widgetdiv,calculateX$$module$build$src$core$widgetdiv,calculateY$$module$build$src$core$widgetdiv,isRepositionable$$module$build$src$core$widgetdiv,repositionForWindowResize$$module$build$src$core$widgetdiv,getCurrentBlock$$module$build$src$core$contextmenu,setCurrentBlock$$module$build$src$core$contextmenu,show$$module$build$src$core$contextmenu,populate_$$module$build$src$core$contextmenu,
43
- position_$$module$build$src$core$contextmenu,createWidget_$$module$build$src$core$contextmenu,haltPropagation$$module$build$src$core$contextmenu,hide$$module$build$src$core$contextmenu,dispose$$module$build$src$core$contextmenu,getMenu$$module$build$src$core$contextmenu,mouseToWorkspacePoint$$module$build$src$core$utils$drag,start$$module$build$src$core$utils$drag,move$$module$build$src$core$utils$drag,workspaceToDom$$module$build$src$core$xml,saveWorkspaceComment$$module$build$src$core$xml,variablesToDom$$module$build$src$core$xml,
44
- blockToDomWithXY$$module$build$src$core$xml,fieldToDom$$module$build$src$core$xml,allFieldsToDom$$module$build$src$core$xml,blockToDom$$module$build$src$core$xml,cloneShadow$$module$build$src$core$xml,domToText$$module$build$src$core$xml,domToPrettyText$$module$build$src$core$xml,clearWorkspaceAndLoadFromXml$$module$build$src$core$xml,loadWorkspaceComment$$module$build$src$core$xml,appendDomToWorkspace$$module$build$src$core$xml,domToBlockInternal$$module$build$src$core$xml,domToVariables$$module$build$src$core$xml,
45
- mapSupportedXmlTags$$module$build$src$core$xml,applyMutationTagNodes$$module$build$src$core$xml,applyCommentTagNodes$$module$build$src$core$xml,applyDataTagNodes$$module$build$src$core$xml,applyFieldTagNodes$$module$build$src$core$xml,findChildBlocks$$module$build$src$core$xml,applyInputTagNodes$$module$build$src$core$xml,applyNextTagNodes$$module$build$src$core$xml,domToBlockHeadless$$module$build$src$core$xml,domToField$$module$build$src$core$xml,deleteNext$$module$build$src$core$xml,isElement$$module$build$src$core$xml,
46
- register$$module$build$src$core$field_registry,unregister$$module$build$src$core$field_registry,fromJsonInternal$$module$build$src$core$field_registry,isImageProperties$$module$build$src$core$field_dropdown,unregister$$module$build$src$core$extensions,isRegistered$$module$build$src$core$extensions,apply$$module$build$src$core$extensions,checkNoMutatorProperties$$module$build$src$core$extensions,checkXmlHooks$$module$build$src$core$extensions,checkJsonHooks$$module$build$src$core$extensions,checkMutatorDialog$$module$build$src$core$extensions,
47
- 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,point$$module$build$src$core$utils$svg_paths,curve$$module$build$src$core$utils$svg_paths,moveTo$$module$build$src$core$utils$svg_paths,
48
- moveBy$$module$build$src$core$utils$svg_paths,lineTo$$module$build$src$core$utils$svg_paths,line$$module$build$src$core$utils$svg_paths,lineOnAxis$$module$build$src$core$utils$svg_paths,arc$$module$build$src$core$utils$svg_paths,connectReciprocally$$module$build$src$core$connection,getSingleConnection$$module$build$src$core$connection,getConnectionForOrphanedOutput$$module$build$src$core$connection,isIcon$$module$build$src$core$interfaces$i_icon,isCommentIcon$$module$build$src$core$interfaces$i_comment_icon,
49
- 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,
50
- 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,getShortActionShortcut$$module$build$src$core$utils$shortcut_formatting,getLongActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting,getActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting,upperCaseFirst$$module$build$src$core$utils$shortcut_formatting,
51
- modifierOrder$$module$build$src$core$utils$shortcut_formatting,showUnconstrainedMoveHint$$module$build$src$core$hints,showConstrainedMovementHint$$module$build$src$core$hints,clearMoveHints$$module$build$src$core$hints,showHelpHint$$module$build$src$core$hints,showBlockNavigationHint$$module$build$src$core$hints,showWorkspaceNavigationHint$$module$build$src$core$hints,isDraggable$$module$build$src$core$interfaces$i_draggable,isDeletable$$module$build$src$core$interfaces$i_deletable,getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,
52
- navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item,isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item,isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item,getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator,
53
- hasContextMenu$$module$build$src$core$interfaces$i_contextmenu,isAutoHideable$$module$build$src$core$interfaces$i_autohideable,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,isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,xmlFlyoutCategory$$module$build$src$core$procedures,
54
- 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,isDynamicShape$$module$build$src$core$renderers$common$constants,isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,
55
- 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,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,
56
- xmlFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategoryBlocks$$module$build$src$core$variables_dynamic,resizeSvgContents$$module$build$src$core$workspace_svg,copy$$module$build$src$core$clipboard,getLastCopiedData$$module$build$src$core$clipboard,setLastCopiedData$$module$build$src$core$clipboard,getLastCopiedWorkspace$$module$build$src$core$clipboard,setLastCopiedWorkspace$$module$build$src$core$clipboard,getLastCopiedLocation$$module$build$src$core$clipboard,setLastCopiedLocation$$module$build$src$core$clipboard,
57
- paste$$module$build$src$core$clipboard,pasteFromData$$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,isCopyable$$module$build$src$core$shortcut_items,isCuttable$$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,
58
- registerRedo$$module$build$src$core$shortcut_items,registerMovementShortcuts$$module$build$src$core$shortcut_items,registerShowContextMenu$$module$build$src$core$shortcut_items,registerArrowNavigation$$module$build$src$core$shortcut_items,registerFocusWorkspace$$module$build$src$core$shortcut_items,registerFocusToolbox$$module$build$src$core$shortcut_items,registerWorkspaceOverview$$module$build$src$core$shortcut_items,registerDisconnectBlock$$module$build$src$core$shortcut_items,registerStackNavigation$$module$build$src$core$shortcut_items,
59
- registerPerformAction$$module$build$src$core$shortcut_items,registerDefaultShortcuts$$module$build$src$core$shortcut_items,registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items,registerScreenReaderShortcuts$$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,
60
- createDom$$module$build$src$core$inject,createMainWorkspace$$module$build$src$core$inject,init$$module$build$src$core$inject,bindDocumentEvents$$module$build$src$core$inject,loadSounds$$module$build$src$core$inject,isFullBlockField$$module$build$src$core$contextmenu_items,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,
61
- 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,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,
62
- 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,registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,registerCommentCreate$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,
63
- registerDefaultOptions$$module$build$src$core$contextmenu_items,isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree,$jscomp;
19
+ fireNow$$module$build$src$core$events$utils,enqueueEvent$$module$build$src$core$events$utils,filter$$module$build$src$core$events$utils,clearPendingUndo$$module$build$src$core$events$utils,isEnabled$$module$build$src$core$events$utils,setGroupInternal$$module$build$src$core$events$utils,getDescendantIds$$module$build$src$core$events$utils,fromJson$$module$build$src$core$events$utils,get$$module$build$src$core$events$utils,disableOrphans$$module$build$src$core$events$utils,removeRole$$module$build$src$core$utils$aria,
20
+ setRole$$module$build$src$core$utils$aria,getRole$$module$build$src$core$utils$aria,setState$$module$build$src$core$utils$aria,clearState$$module$build$src$core$utils$aria,getState$$module$build$src$core$utils$aria,initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria,announceDynamicAriaState$$module$build$src$core$utils$aria,createSvgElement$$module$build$src$core$utils$dom,addClass$$module$build$src$core$utils$dom,removeClasses$$module$build$src$core$utils$dom,removeClass$$module$build$src$core$utils$dom,
21
+ hasClass$$module$build$src$core$utils$dom,removeNode$$module$build$src$core$utils$dom,insertAfter$$module$build$src$core$utils$dom,setCssTransform$$module$build$src$core$utils$dom,startTextWidthCache$$module$build$src$core$utils$dom,stopTextWidthCache$$module$build$src$core$utils$dom,getTextWidth$$module$build$src$core$utils$dom,getFastTextWidth$$module$build$src$core$utils$dom,getFastTextWidthWithSizeString$$module$build$src$core$utils$dom,measureFontMetrics$$module$build$src$core$utils$dom,isFocusableNode$$module$build$src$core$interfaces$i_focusable_node,
22
+ isSelectable$$module$build$src$core$interfaces$i_selectable,deepMerge$$module$build$src$core$utils$object,getWorkspaceById$$module$build$src$core$common,getAllWorkspaces$$module$build$src$core$common,registerWorkspace$$module$build$src$core$common,unregisterWorkpace$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$common,setMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$common,setSelected$$module$build$src$core$common,fireSelectedEvent$$module$build$src$core$common,
23
+ getParentContainer$$module$build$src$core$common,setParentContainer$$module$build$src$core$common,svgResize$$module$build$src$core$common,getBlockTypeCounts$$module$build$src$core$common,jsonInitFactory$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$common,defineBlocksWithJsonArrayInternal$$module$build$src$core$common,globalShortcutHandler$$module$build$src$core$common,removeElem$$module$build$src$core$utils$array,register$$module$build$src$core$css,inject$$module$build$src$core$css,
24
+ getSize$$module$build$src$core$utils$style,getSizeInternal$$module$build$src$core$utils$style,getSizeWithDisplay$$module$build$src$core$utils$style,getComputedStyle$$module$build$src$core$utils$style,getPageOffset$$module$build$src$core$utils$style,getViewportPageOffset$$module$build$src$core$utils$style,getBorderBox$$module$build$src$core$utils$style,scrollIntoContainerView$$module$build$src$core$utils$style,getContainerOffsetToScrollInto$$module$build$src$core$utils$style,getRelativeXY$$module$build$src$core$utils$svg_math,
25
+ getInjectionDivXY$$module$build$src$core$utils$svg_math,getViewportBBox$$module$build$src$core$utils$svg_math,getDocumentScroll$$module$build$src$core$utils$svg_math,screenToWsCoordinates$$module$build$src$core$utils$svg_math,wsToScreenCoordinates$$module$build$src$core$utils$svg_math,injectDependencies$$module$build$src$core$utils$xml,domToText$$module$build$src$core$utils$xml,sanitizeText$$module$build$src$core$utils$xml,convertToolboxDefToJson$$module$build$src$core$utils$toolbox,validateToolbox$$module$build$src$core$utils$toolbox,
26
+ convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox,hasCategories$$module$build$src$core$utils$toolbox,hasCategoriesInternal$$module$build$src$core$utils$toolbox,isCategoryCollapsible$$module$build$src$core$utils$toolbox,convertToToolboxJson$$module$build$src$core$utils$toolbox,xmlToJsonArray$$module$build$src$core$utils$toolbox,addAttributes$$module$build$src$core$utils$toolbox,parseToolboxTree$$module$build$src$core$utils$toolbox,getStartPositionRect$$module$build$src$core$positionable_helpers,
27
+ getCornerOppositeToolbox$$module$build$src$core$positionable_helpers,bumpPositionRect$$module$build$src$core$positionable_helpers,register$$module$build$src$core$serialization$registry,unregister$$module$build$src$core$serialization$registry,save$$module$build$src$core$serialization$workspace_comments,append$$module$build$src$core$serialization$workspace_comments,register$$module$build$src$core$clipboard$registry,unregister$$module$build$src$core$clipboard$registry,moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster,
28
+ commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster,isSerializable$$module$build$src$core$interfaces$i_serializable,queueRender$$module$build$src$core$render_management,finishQueuedRenders$$module$build$src$core$render_management,triggerQueuedRenders$$module$build$src$core$render_management,alwaysImmediatelyRender$$module$build$src$core$render_management,queueBlock$$module$build$src$core$render_management,doRenders$$module$build$src$core$render_management,dequeueBlock$$module$build$src$core$render_management,
29
+ shouldRenderRootBlock$$module$build$src$core$render_management,renderBlock$$module$build$src$core$render_management,alert$$module$build$src$core$dialog,setAlert$$module$build$src$core$dialog,confirm$$module$build$src$core$dialog,setConfirm$$module$build$src$core$dialog,prompt$$module$build$src$core$dialog,setPrompt$$module$build$src$core$dialog,toast$$module$build$src$core$dialog,setToast$$module$build$src$core$dialog,displayDialog$$module$build$src$core$dialog,hasBubble$$module$build$src$core$interfaces$i_has_bubble,
30
+ isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks,isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model,internalFlyoutCategory$$module$build$src$core$variables,flyoutCategory$$module$build$src$core$variables,generateVariableFieldJson$$module$build$src$core$variables,jsonFlyoutCategoryBlocks$$module$build$src$core$variables,xmlFlyoutCategory$$module$build$src$core$variables,
31
+ flyoutCategoryBlocks$$module$build$src$core$variables,generateUniqueName$$module$build$src$core$variables,generateUniqueNameInternal$$module$build$src$core$variables,generateUniqueNameFromOptions$$module$build$src$core$variables,createVariableButtonHandler$$module$build$src$core$variables,promptName$$module$build$src$core$variables,nameUsedWithOtherType$$module$build$src$core$variables,nameUsedWithAnyType$$module$build$src$core$variables,nameUsedWithConflictingParam$$module$build$src$core$variables,
32
+ checkForConflictingParamWithProcedureModels$$module$build$src$core$variables,checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables,generateVariableFieldDom$$module$build$src$core$variables,createVariable$$module$build$src$core$variables,getAddedVariables$$module$build$src$core$variables,compareByName$$module$build$src$core$variables,getVariableUsesById$$module$build$src$core$variables,save$$module$build$src$core$serialization$blocks,saveAttributes$$module$build$src$core$serialization$blocks,
33
+ saveCoords$$module$build$src$core$serialization$blocks,saveExtraState$$module$build$src$core$serialization$blocks,saveIcons$$module$build$src$core$serialization$blocks,saveFields$$module$build$src$core$serialization$blocks,saveInputBlocks$$module$build$src$core$serialization$blocks,saveNextBlocks$$module$build$src$core$serialization$blocks,saveConnection$$module$build$src$core$serialization$blocks,append$$module$build$src$core$serialization$blocks,appendInternal$$module$build$src$core$serialization$blocks,
34
+ appendPrivate$$module$build$src$core$serialization$blocks,checkNewVariables$$module$build$src$core$serialization$blocks,loadCoords$$module$build$src$core$serialization$blocks,loadAttributes$$module$build$src$core$serialization$blocks,loadExtraState$$module$build$src$core$serialization$blocks,tryToConnectParent$$module$build$src$core$serialization$blocks,loadIcons$$module$build$src$core$serialization$blocks,loadFields$$module$build$src$core$serialization$blocks,loadInputBlocks$$module$build$src$core$serialization$blocks,
35
+ loadNextBlocks$$module$build$src$core$serialization$blocks,loadConnection$$module$build$src$core$serialization$blocks,initBlock$$module$build$src$core$serialization$blocks,toRadians$$module$build$src$core$utils$math,toDegrees$$module$build$src$core$utils$math,clamp$$module$build$src$core$utils$math,createDom$$module$build$src$core$dropdowndiv,handleFocusLoss$$module$build$src$core$dropdowndiv,setBoundsElement$$module$build$src$core$dropdowndiv,getOwner$$module$build$src$core$dropdowndiv,getContentDiv$$module$build$src$core$dropdowndiv,
36
+ clearContent$$module$build$src$core$dropdowndiv,setColour$$module$build$src$core$dropdowndiv,showPositionedByBlock$$module$build$src$core$dropdowndiv,showPositionedByField$$module$build$src$core$dropdowndiv,getScaledBboxOfBlock$$module$build$src$core$dropdowndiv,getScaledBboxOfField$$module$build$src$core$dropdowndiv,showPositionedByRect$$module$build$src$core$dropdowndiv,show$$module$build$src$core$dropdowndiv,getPositionBelowMetrics$$module$build$src$core$dropdowndiv,getPositionAboveMetrics$$module$build$src$core$dropdowndiv,
37
+ getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv,getPositionX$$module$build$src$core$dropdowndiv,isVisible$$module$build$src$core$dropdowndiv,hideIfOwner$$module$build$src$core$dropdowndiv,hide$$module$build$src$core$dropdowndiv,hideWithoutAnimation$$module$build$src$core$dropdowndiv,positionInternal$$module$build$src$core$dropdowndiv,repositionForWindowResize$$module$build$src$core$dropdowndiv,shortestStringLength$$module$build$src$core$utils$string,commonWordPrefix$$module$build$src$core$utils$string,
38
+ commonWordSuffix$$module$build$src$core$utils$string,wrapLine$$module$build$src$core$utils$string,wrapScore$$module$build$src$core$utils$string,wrapMutate$$module$build$src$core$utils$string,wrapToText$$module$build$src$core$utils$string,setCustomTooltip$$module$build$src$core$tooltip,getCustomTooltip$$module$build$src$core$tooltip,isVisible$$module$build$src$core$tooltip,getDiv$$module$build$src$core$tooltip,getTooltipOfObject$$module$build$src$core$tooltip,getTargetObject$$module$build$src$core$tooltip,
39
+ createDom$$module$build$src$core$tooltip,bindMouseEvents$$module$build$src$core$tooltip,unbindMouseEvents$$module$build$src$core$tooltip,onMouseOver$$module$build$src$core$tooltip,onMouseOut$$module$build$src$core$tooltip,onMouseMove$$module$build$src$core$tooltip,dispose$$module$build$src$core$tooltip,hide$$module$build$src$core$tooltip,block$$module$build$src$core$tooltip,unblock$$module$build$src$core$tooltip,renderContent$$module$build$src$core$tooltip,renderDefaultContent$$module$build$src$core$tooltip,
40
+ getPosition$$module$build$src$core$tooltip,show$$module$build$src$core$tooltip,getHsvSaturation$$module$build$src$core$utils$colour,setHsvSaturation$$module$build$src$core$utils$colour,getHsvValue$$module$build$src$core$utils$colour,setHsvValue$$module$build$src$core$utils$colour,parse$$module$build$src$core$utils$colour,rgbToHex$$module$build$src$core$utils$colour,hexToRgb$$module$build$src$core$utils$colour,hsvToHex$$module$build$src$core$utils$colour,blend$$module$build$src$core$utils$colour,hueToHex$$module$build$src$core$utils$colour,
41
+ tokenizeInterpolationInternal$$module$build$src$core$utils$parsing,tokenizeInterpolation$$module$build$src$core$utils$parsing,replaceMessageReferences$$module$build$src$core$utils$parsing,checkMessageReferences$$module$build$src$core$utils$parsing,parseBlockColour$$module$build$src$core$utils$parsing,getDiv$$module$build$src$core$widgetdiv,testOnly_setDiv$$module$build$src$core$widgetdiv,handleFocusLoss$$module$build$src$core$widgetdiv,createDom$$module$build$src$core$widgetdiv,show$$module$build$src$core$widgetdiv,
42
+ hide$$module$build$src$core$widgetdiv,isVisible$$module$build$src$core$widgetdiv,hideIfOwner$$module$build$src$core$widgetdiv,hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv,positionInternal$$module$build$src$core$widgetdiv,positionWithAnchor$$module$build$src$core$widgetdiv,calculateX$$module$build$src$core$widgetdiv,calculateY$$module$build$src$core$widgetdiv,isRepositionable$$module$build$src$core$widgetdiv,repositionForWindowResize$$module$build$src$core$widgetdiv,getCurrentBlock$$module$build$src$core$contextmenu,
43
+ setCurrentBlock$$module$build$src$core$contextmenu,show$$module$build$src$core$contextmenu,populate_$$module$build$src$core$contextmenu,position_$$module$build$src$core$contextmenu,createWidget_$$module$build$src$core$contextmenu,haltPropagation$$module$build$src$core$contextmenu,hide$$module$build$src$core$contextmenu,dispose$$module$build$src$core$contextmenu,getMenu$$module$build$src$core$contextmenu,mouseToWorkspacePoint$$module$build$src$core$utils$drag,start$$module$build$src$core$utils$drag,
44
+ move$$module$build$src$core$utils$drag,workspaceToDom$$module$build$src$core$xml,saveWorkspaceComment$$module$build$src$core$xml,variablesToDom$$module$build$src$core$xml,blockToDomWithXY$$module$build$src$core$xml,fieldToDom$$module$build$src$core$xml,allFieldsToDom$$module$build$src$core$xml,blockToDom$$module$build$src$core$xml,cloneShadow$$module$build$src$core$xml,domToText$$module$build$src$core$xml,domToPrettyText$$module$build$src$core$xml,clearWorkspaceAndLoadFromXml$$module$build$src$core$xml,
45
+ loadWorkspaceComment$$module$build$src$core$xml,appendDomToWorkspace$$module$build$src$core$xml,domToBlockInternal$$module$build$src$core$xml,domToVariables$$module$build$src$core$xml,mapSupportedXmlTags$$module$build$src$core$xml,applyMutationTagNodes$$module$build$src$core$xml,applyCommentTagNodes$$module$build$src$core$xml,applyDataTagNodes$$module$build$src$core$xml,applyFieldTagNodes$$module$build$src$core$xml,findChildBlocks$$module$build$src$core$xml,applyInputTagNodes$$module$build$src$core$xml,
46
+ applyNextTagNodes$$module$build$src$core$xml,domToBlockHeadless$$module$build$src$core$xml,domToField$$module$build$src$core$xml,deleteNext$$module$build$src$core$xml,isElement$$module$build$src$core$xml,register$$module$build$src$core$field_registry,unregister$$module$build$src$core$field_registry,fromJsonInternal$$module$build$src$core$field_registry,isImageProperties$$module$build$src$core$field_dropdown,unregister$$module$build$src$core$extensions,isRegistered$$module$build$src$core$extensions,
47
+ apply$$module$build$src$core$extensions,checkNoMutatorProperties$$module$build$src$core$extensions,checkXmlHooks$$module$build$src$core$extensions,checkJsonHooks$$module$build$src$core$extensions,checkMutatorDialog$$module$build$src$core$extensions,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,
48
+ checkDropdownOptionsInTable$$module$build$src$core$extensions,extensionParentTooltip$$module$build$src$core$extensions,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,lineOnAxis$$module$build$src$core$utils$svg_paths,arc$$module$build$src$core$utils$svg_paths,connectReciprocally$$module$build$src$core$connection,
49
+ getSingleConnection$$module$build$src$core$connection,getConnectionForOrphanedOutput$$module$build$src$core$connection,isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item,isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item,computeAriaLabel$$module$build$src$core$block_aria_composer,configureAriaRole$$module$build$src$core$block_aria_composer,computeFieldRowLabel$$module$build$src$core$block_aria_composer,getParentInputLabel$$module$build$src$core$block_aria_composer,
50
+ getBeginStackLabel$$module$build$src$core$block_aria_composer,getInputLabels$$module$build$src$core$block_aria_composer,getInputLabelsSubset$$module$build$src$core$block_aria_composer,findStartOfStatementSection$$module$build$src$core$block_aria_composer,getParentToolboxCategoryLabel$$module$build$src$core$block_aria_composer,computeMoveLabel$$module$build$src$core$block_aria_composer,getConnectionPreposition$$module$build$src$core$block_aria_composer,getDisabledLabel$$module$build$src$core$block_aria_composer,
51
+ getCollapsedLabel$$module$build$src$core$block_aria_composer,getShadowBlockLabel$$module$build$src$core$block_aria_composer,getInputCountLabel$$module$build$src$core$block_aria_composer,isIcon$$module$build$src$core$interfaces$i_icon,isCommentIcon$$module$build$src$core$interfaces$i_comment_icon,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,
52
+ 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,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,
53
+ getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting,getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting,getKeyName$$module$build$src$core$utils$shortcut_formatting,getShortcutKeys$$module$build$src$core$utils$shortcut_formatting,upperCaseFirst$$module$build$src$core$utils$shortcut_formatting,modifierOrder$$module$build$src$core$utils$shortcut_formatting,showUnconstrainedMoveHint$$module$build$src$core$hints,showConstrainedMovementHint$$module$build$src$core$hints,
54
+ clearMoveHints$$module$build$src$core$hints,showHelpHint$$module$build$src$core$hints,showBlockNavigationHint$$module$build$src$core$hints,showWorkspaceNavigationHint$$module$build$src$core$hints,isDraggable$$module$build$src$core$interfaces$i_draggable,isDeletable$$module$build$src$core$interfaces$i_deletable,getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,
55
+ isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item,getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator,hasContextMenu$$module$build$src$core$interfaces$i_contextmenu,isAutoHideable$$module$build$src$core$interfaces$i_autohideable,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,
56
+ allProcedures$$module$build$src$core$procedures,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,
57
+ getCallers$$module$build$src$core$procedures,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,
58
+ 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,copy$$module$build$src$core$clipboard,getLastCopiedData$$module$build$src$core$clipboard,
59
+ setLastCopiedData$$module$build$src$core$clipboard,getLastCopiedWorkspace$$module$build$src$core$clipboard,setLastCopiedWorkspace$$module$build$src$core$clipboard,getLastCopiedLocation$$module$build$src$core$clipboard,setLastCopiedLocation$$module$build$src$core$clipboard,paste$$module$build$src$core$clipboard,pasteFromData$$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,
60
+ isCopyable$$module$build$src$core$shortcut_items,isCuttable$$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,registerMovementShortcuts$$module$build$src$core$shortcut_items,registerShowContextMenu$$module$build$src$core$shortcut_items,registerArrowNavigation$$module$build$src$core$shortcut_items,
61
+ registerFocusWorkspace$$module$build$src$core$shortcut_items,registerFocusToolbox$$module$build$src$core$shortcut_items,registerWorkspaceOverview$$module$build$src$core$shortcut_items,registerDisconnectBlock$$module$build$src$core$shortcut_items,registerStackNavigation$$module$build$src$core$shortcut_items,registerPerformAction$$module$build$src$core$shortcut_items,registerDuplicate$$module$build$src$core$shortcut_items,registerCleanup$$module$build$src$core$shortcut_items,registerDefaultShortcuts$$module$build$src$core$shortcut_items,
62
+ registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items,registerScreenReaderShortcuts$$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,
63
+ bindDocumentEvents$$module$build$src$core$inject,loadSounds$$module$build$src$core$inject,isFullBlockField$$module$build$src$core$contextmenu_items,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,
64
+ getDeletableBlocks_$$module$build$src$core$contextmenu_items,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,
65
+ registerDelete$$module$build$src$core$contextmenu_items,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,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,
66
+ isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree,$jscomp;
64
67
  register$$module$build$src$core$registry=function(a,b,c,d){if(!(a instanceof Type$$module$build$src$core$registry)&&typeof a!=="string"||`${a}`.trim()==="")throw Error('Invalid type "'+a+'". The type must be a non-empty string or a Blockly.registry.Type.');a=`${a}`.toLowerCase();if(typeof b!=="string"||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],
65
68
  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};
66
69
  validate$$module$build$src$core$registry=function(a,b){switch(a){case String(Type$$module$build$src$core$registry.FIELD):if(typeof b.fromJson!=="function")throw Error('Type "'+a+'" must have a fromJson function');}};
@@ -97,9 +100,15 @@ setGroupInternal$$module$build$src$core$events$utils=function(a){group$$module$b
97
100
  fromJson$$module$build$src$core$events$utils=function(a,b){const c=get$$module$build$src$core$events$utils(a.type);if(!c)throw Error("Unknown event type.");return c.fromJson(a,b)};get$$module$build$src$core$events$utils=function(a){const b=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,a);if(!b)throw Error(`Event type ${a} not found in registry.`);return b};
98
101
  disableOrphans$$module$build$src$core$events$utils=function(a){if((isBlockMove$$module$build$src$core$events$predicates(a)||isBlockCreate$$module$build$src$core$events$predicates(a))&&a.workspaceId){var b=getWorkspaceById$$module$build$src$core$common(a.workspaceId);if(!a.blockId)throw Error("Encountered a blockEvent without a proper blockId");if(a=b.getBlockById(a.blockId)){const c=recordUndo$$module$build$src$core$events$utils;try{recordUndo$$module$build$src$core$events$utils=!1;const d=a.getParent();
99
102
  if(d&&!d.hasDisabledReason(ORPHANED_BLOCK_DISABLED_REASON$$module$build$src$core$events$utils)){const e=a.getDescendants(!1);for(let f=0,g;g=e[f];f++)g.setDisabledReason(!1,ORPHANED_BLOCK_DISABLED_REASON$$module$build$src$core$events$utils)}else if((a.outputConnection||a.previousConnection)&&!b.isDragging()){do a.setDisabledReason(!0,ORPHANED_BLOCK_DISABLED_REASON$$module$build$src$core$events$utils),a=a.getNextBlock();while(a)}}finally{recordUndo$$module$build$src$core$events$utils=c}}}};
100
- createSvgElement$$module$build$src$core$utils$dom=function(a,b,c){a=document.createElementNS(SVG_NS$$module$build$src$core$utils$dom,`${a}`);for(const d in b)a.setAttribute(d,`${b[d]}`);c&&c.appendChild(a);return a};addClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>a.classList.contains(c)))return!1;a.classList.add(...b);return!0};removeClasses$$module$build$src$core$utils$dom=function(a,b){a.classList.remove(...b.split(" "))};
101
- removeClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>!a.classList.contains(c)))return!1;a.classList.remove(...b);return!0};hasClass$$module$build$src$core$utils$dom=function(a,b){return a.classList.contains(b)};removeNode$$module$build$src$core$utils$dom=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};
102
- insertAfter$$module$build$src$core$utils$dom=function(a,b){const c=b.nextSibling;b=b.parentNode;if(!b)throw Error("Reference node has no parent.");c?b.insertBefore(a,c):b.appendChild(a)};setCssTransform$$module$build$src$core$utils$dom=function(a,b){a.style.transform=b;a.style["-webkit-transform"]=b};
103
+ removeRole$$module$build$src$core$utils$aria=function(a){a.removeAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria)};setRole$$module$build$src$core$utils$aria=function(a,b){b?a.setAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria,b):removeRole$$module$build$src$core$utils$aria(a)};getRole$$module$build$src$core$utils$aria=function(a){return(a=a.getAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria))&&Object.values(Role$$module$build$src$core$utils$aria).includes(a)?a:null};
104
+ setState$$module$build$src$core$utils$aria=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));a.setAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b,`${c}`)};clearState$$module$build$src$core$utils$aria=function(a,b){a.removeAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b)};getState$$module$build$src$core$utils$aria=function(a,b){return(a=a.getAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b))?a:null};
105
+ initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria=function(a){if(!liveRegionElement$$module$build$src$core$utils$aria||!document.contains(liveRegionElement$$module$build$src$core$utils$aria)){var b=document.createElement("div");b.textContent="";b.id="blocklyAriaAnnounce";addClass$$module$build$src$core$utils$dom(b,"hiddenForAria");setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.LIVE,LiveRegionAssertiveness$$module$build$src$core$utils$aria.POLITE);
106
+ setRole$$module$build$src$core$utils$aria(b,DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria);setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.ATOMIC,!0);a.appendChild(b);liveRegionElement$$module$build$src$core$utils$aria=b}};
107
+ announceDynamicAriaState$$module$build$src$core$utils$aria=function(a,b){if(!liveRegionElement$$module$build$src$core$utils$aria)throw Error("ARIA live region not initialized.");const c=liveRegionElement$$module$build$src$core$utils$aria,{assertiveness:d=LiveRegionAssertiveness$$module$build$src$core$utils$aria.POLITE,role:e=DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria}=b||{};clearTimeout(ariaAnnounceTimeout$$module$build$src$core$utils$aria);ariaAnnounceTimeout$$module$build$src$core$utils$aria=
108
+ setTimeout(()=>{c.replaceChildren();setState$$module$build$src$core$utils$aria(c,State$$module$build$src$core$utils$aria.LIVE,d);setRole$$module$build$src$core$utils$aria(c,e);const f=document.createElement("span");f.textContent=a+(addBreakingSpace$$module$build$src$core$utils$aria?"\u00a0":"");addBreakingSpace$$module$build$src$core$utils$aria=!addBreakingSpace$$module$build$src$core$utils$aria;c.appendChild(f)},10)};
109
+ createSvgElement$$module$build$src$core$utils$dom=function(a,b,c){const d=document.createElementNS(SVG_NS$$module$build$src$core$utils$dom,`${a}`);a!==Svg$$module$build$src$core$utils$svg.SVG.toString()&&a!==Svg$$module$build$src$core$utils$svg.G.toString()&&d.tagName!==Svg$$module$build$src$core$utils$svg.SVG.toString()&&d.tagName!==Svg$$module$build$src$core$utils$svg.G.toString()||setRole$$module$build$src$core$utils$aria(d,Role$$module$build$src$core$utils$aria.GENERIC);for(const e in b)d.setAttribute(e,
110
+ `${b[e]}`);c&&c.appendChild(d);return d};addClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>a.classList.contains(c)))return!1;a.classList.add(...b);return!0};removeClasses$$module$build$src$core$utils$dom=function(a,b){a.classList.remove(...b.split(" "))};removeClass$$module$build$src$core$utils$dom=function(a,b){b=b.split(" ");if(b.every(c=>!a.classList.contains(c)))return!1;a.classList.remove(...b);return!0};
111
+ hasClass$$module$build$src$core$utils$dom=function(a,b){return a.classList.contains(b)};removeNode$$module$build$src$core$utils$dom=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};insertAfter$$module$build$src$core$utils$dom=function(a,b){const c=b.nextSibling;b=b.parentNode;if(!b)throw Error("Reference node has no parent.");c?b.insertBefore(a,c):b.appendChild(a)};setCssTransform$$module$build$src$core$utils$dom=function(a,b){a.style.transform=b;a.style["-webkit-transform"]=b};
103
112
  startTextWidthCache$$module$build$src$core$utils$dom=function(){cacheReference$$module$build$src$core$utils$dom++;cacheWidths$$module$build$src$core$utils$dom||(cacheWidths$$module$build$src$core$utils$dom=Object.create(null))};stopTextWidthCache$$module$build$src$core$utils$dom=function(){cacheReference$$module$build$src$core$utils$dom--;cacheReference$$module$build$src$core$utils$dom||(cacheWidths$$module$build$src$core$utils$dom=null)};
104
113
  getTextWidth$$module$build$src$core$utils$dom=function(a){const b=a.textContent+"\n"+a.className.baseVal;var c;if(cacheWidths$$module$build$src$core$utils$dom&&(c=cacheWidths$$module$build$src$core$utils$dom[b]))return c;c=window.getComputedStyle(a);c=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(a,c.fontSize,c.fontWeight,c.fontFamily);cacheWidths$$module$build$src$core$utils$dom&&(cacheWidths$$module$build$src$core$utils$dom[b]=c);return c};
105
114
  getFastTextWidth$$module$build$src$core$utils$dom=function(a,b,c,d){return getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(a,b+"pt",c,d)};
@@ -110,7 +119,7 @@ measureFontMetrics$$module$build$src$core$utils$dom=function(a,b,c,d){const e=do
110
119
  isSelectable$$module$build$src$core$interfaces$i_selectable=function(a){return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(a)&&typeof a.id==="string"&&typeof a.workspace==="object"&&typeof a.select==="function"&&typeof a.unselect==="function"};
111
120
  deepMerge$$module$build$src$core$utils$object=function(a,b){for(const c in b)b[c]!==null&&Array.isArray(b[c])?a[c]=deepMerge$$module$build$src$core$utils$object(a[c]||[],b[c]):a[c]=b[c]!==null&&typeof b[c]==="object"?deepMerge$$module$build$src$core$utils$object(a[c]||Object.create(null),b[c]):b[c];return a};getWorkspaceById$$module$build$src$core$common=function(a){return WorkspaceDB_$$module$build$src$core$common[a]||null};
112
121
  getAllWorkspaces$$module$build$src$core$common=function(){const a=[];for(const b in WorkspaceDB_$$module$build$src$core$common)a.push(WorkspaceDB_$$module$build$src$core$common[b]);return a};registerWorkspace$$module$build$src$core$common=function(a){WorkspaceDB_$$module$build$src$core$common[a.id]=a};unregisterWorkpace$$module$build$src$core$common=function(a){delete WorkspaceDB_$$module$build$src$core$common[a.id]};getMainWorkspace$$module$build$src$core$common=function(){return mainWorkspace$$module$build$src$core$common};
113
- setMainWorkspace$$module$build$src$core$common=function(a){mainWorkspace$$module$build$src$core$common=a};getSelected$$module$build$src$core$common=function(){const a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();return a&&isSelectable$$module$build$src$core$interfaces$i_selectable(a)?a:null};setSelected$$module$build$src$core$common=function(a){$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)};
122
+ setMainWorkspace$$module$build$src$core$common=function(a){mainWorkspace$$module$build$src$core$common=a;a.rendered&&$.getFocusManager$$module$build$src$core$focus_manager().setPopoverFocusRoot(a.getInjectionDiv())};getSelected$$module$build$src$core$common=function(){const a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();return a&&isSelectable$$module$build$src$core$interfaces$i_selectable(a)?a:null};setSelected$$module$build$src$core$common=function(a){$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)};
114
123
  fireSelectedEvent$$module$build$src$core$common=function(a){const b=getSelected$$module$build$src$core$common();let c,d,e,f;const g=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.SELECTED))((c=b==null?void 0:b.id)!=null?c:null,(d=a==null?void 0:a.id)!=null?d:null,(f=(e=a==null?void 0:a.workspace.id)!=null?e:b==null?void 0:b.workspace.id)!=null?f:"");fire$$module$build$src$core$events$utils(g)};
115
124
  getParentContainer$$module$build$src$core$common=function(a=getMainWorkspace$$module$build$src$core$common()){return parentContainer$$module$build$src$core$common?parentContainer$$module$build$src$core$common:a&&a.rendered?a.getInjectionDiv():null};setParentContainer$$module$build$src$core$common=function(a){parentContainer$$module$build$src$core$common=a};
116
125
  svgResize$$module$build$src$core$common=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;const b=a.getParentSvg(),c=a.getCachedParentSvgSize();var d=b.parentElement;if(d instanceof HTMLElement){var e=d.offsetWidth;d=d.offsetHeight;c.width!==e&&(b.setAttribute("width",e+"px"),a.setCachedParentSvgSize(e,null));c.height!==d&&(b.setAttribute("height",d+"px"),a.setCachedParentSvgSize(null,d));a.resize()}};
@@ -156,14 +165,7 @@ append$$module$build$src$core$serialization$workspace_comments=function(a,b,{rec
156
165
  a.height){e=c.getSize();let f,g;c.setSize(new Size$$module$build$src$core$utils$size((f=a.width)!=null?f:e.width,(g=a.height)!=null?g:e.height))}a.collapsed!==void 0&&c.setCollapsed(a.collapsed);a.editable!==void 0&&c.setEditable(a.editable);a.movable!==void 0&&c.setMovable(a.movable);a.deletable!==void 0&&c.setDeletable(a.deletable);$.setRecordUndo$$module$build$src$core$events$utils(d);return c};
157
166
  register$$module$build$src$core$clipboard$registry=function(a,b){register$$module$build$src$core$registry(Type$$module$build$src$core$registry.PASTER,a,b)};unregister$$module$build$src$core$clipboard$registry=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.PASTER,a)};
158
167
  moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster=function(a){const b=a.workspace,c=a.getRelativeToSurfaceXY(),d=new Coordinate$$module$build$src$core$utils$coordinate(0,0),e=b.getTopComments(!1).filter(f=>f.id!==a.id).map(f=>f.getRelativeToSurfaceXY());for(;commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster(Coordinate$$module$build$src$core$utils$coordinate.sum(c,d),e);)d.translate(b.RTL?-30:30,30);a.moveTo(Coordinate$$module$build$src$core$utils$coordinate.sum(c,
159
- d))};commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster=function(a,b){return b.some(c=>Math.abs(c.x-a.x)<=1&&Math.abs(c.y-a.y)<=1)};removeRole$$module$build$src$core$utils$aria=function(a){a.removeAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria)};setRole$$module$build$src$core$utils$aria=function(a,b){b?a.setAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria,b):removeRole$$module$build$src$core$utils$aria(a)};
160
- getRole$$module$build$src$core$utils$aria=function(a){return(a=a.getAttribute(ROLE_ATTRIBUTE$$module$build$src$core$utils$aria))&&Object.values(Role$$module$build$src$core$utils$aria).includes(a)?a:null};setState$$module$build$src$core$utils$aria=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));a.setAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b,`${c}`)};clearState$$module$build$src$core$utils$aria=function(a,b){a.removeAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b)};
161
- getState$$module$build$src$core$utils$aria=function(a,b){return(a=a.getAttribute(ARIA_PREFIX$$module$build$src$core$utils$aria+b))?a:null};
162
- initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria=function(a){if(!liveRegionElement$$module$build$src$core$utils$aria||!document.contains(liveRegionElement$$module$build$src$core$utils$aria)){var b=document.createElement("div");b.textContent="";b.id="blocklyAriaAnnounce";addClass$$module$build$src$core$utils$dom(b,"hiddenForAria");setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.LIVE,LiveRegionAssertiveness$$module$build$src$core$utils$aria.POLITE);
163
- setRole$$module$build$src$core$utils$aria(b,DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria);setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.ATOMIC,!0);a.appendChild(b);liveRegionElement$$module$build$src$core$utils$aria=b}};
164
- announceDynamicAriaState$$module$build$src$core$utils$aria=function(a,b){if(!liveRegionElement$$module$build$src$core$utils$aria)throw Error("ARIA live region not initialized.");const c=liveRegionElement$$module$build$src$core$utils$aria,{assertiveness:d=LiveRegionAssertiveness$$module$build$src$core$utils$aria.POLITE,role:e=DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria}=b||{};clearTimeout(ariaAnnounceTimeout$$module$build$src$core$utils$aria);ariaAnnounceTimeout$$module$build$src$core$utils$aria=
165
- setTimeout(()=>{c.replaceChildren();setState$$module$build$src$core$utils$aria(c,State$$module$build$src$core$utils$aria.LIVE,d);setRole$$module$build$src$core$utils$aria(c,e);const f=document.createElement("span");f.textContent=a+(addBreakingSpace$$module$build$src$core$utils$aria?"\u00a0":"");addBreakingSpace$$module$build$src$core$utils$aria=!addBreakingSpace$$module$build$src$core$utils$aria;c.appendChild(f)},10)};
166
- isSerializable$$module$build$src$core$interfaces$i_serializable=function(a){return a&&typeof a.saveState==="function"&&typeof a.loadState==="function"};
168
+ d))};commentOverlapsOtherExactly$$module$build$src$core$clipboard$workspace_comment_paster=function(a,b){return b.some(c=>Math.abs(c.x-a.x)<=1&&Math.abs(c.y-a.y)<=1)};isSerializable$$module$build$src$core$interfaces$i_serializable=function(a){return a&&typeof a.saveState==="function"&&typeof a.loadState==="function"};
167
169
  queueRender$$module$build$src$core$render_management=function(a){queueBlock$$module$build$src$core$render_management(a);if(alwaysImmediatelyRender$$module$build$src$core$render_management())return doRenders$$module$build$src$core$render_management(),Promise.resolve();afterRendersPromise$$module$build$src$core$render_management||(afterRendersPromise$$module$build$src$core$render_management=new Promise(b=>{afterRendersResolver$$module$build$src$core$render_management=b;animationRequestId$$module$build$src$core$render_management=
168
170
  window.requestAnimationFrame(()=>{doRenders$$module$build$src$core$render_management();b()})}));return afterRendersPromise$$module$build$src$core$render_management};finishQueuedRenders$$module$build$src$core$render_management=function(){return afterRendersPromise$$module$build$src$core$render_management?afterRendersPromise$$module$build$src$core$render_management:Promise.resolve()};
169
171
  triggerQueuedRenders$$module$build$src$core$render_management=function(a){a||window.cancelAnimationFrame(animationRequestId$$module$build$src$core$render_management);doRenders$$module$build$src$core$render_management(a);!a&&afterRendersResolver$$module$build$src$core$render_management&&afterRendersResolver$$module$build$src$core$render_management()};alwaysImmediatelyRender$$module$build$src$core$render_management=function(){return JavaFx$$module$build$src$core$utils$useragent};
@@ -174,8 +176,13 @@ dequeueBlock$$module$build$src$core$render_management=function(a){rootBlocks$$mo
174
176
  renderBlock$$module$build$src$core$render_management=function(a){if(dirtyBlocks$$module$build$src$core$render_management.has(a)&&a.initialized){for(const b of a.getChildren(!1))renderBlock$$module$build$src$core$render_management(b);a.renderEfficiently()}};alert$$module$build$src$core$dialog=function(a,b){alertImplementation$$module$build$src$core$dialog(a,b)};
175
177
  setAlert$$module$build$src$core$dialog=function(a=defaultAlert$$module$build$src$core$dialog){alertImplementation$$module$build$src$core$dialog=a};confirm$$module$build$src$core$dialog=function(a,b){confirmImplementation$$module$build$src$core$dialog(a,b)};setConfirm$$module$build$src$core$dialog=function(a=defaultConfirm$$module$build$src$core$dialog){confirmImplementation$$module$build$src$core$dialog=a};
176
178
  prompt$$module$build$src$core$dialog=function(a,b,c){promptImplementation$$module$build$src$core$dialog(a,b,c)};setPrompt$$module$build$src$core$dialog=function(a=defaultPrompt$$module$build$src$core$dialog){promptImplementation$$module$build$src$core$dialog=a};toast$$module$build$src$core$dialog=function(a,b){toastImplementation$$module$build$src$core$dialog(a,b)};
177
- setToast$$module$build$src$core$dialog=function(a=defaultToast$$module$build$src$core$dialog){toastImplementation$$module$build$src$core$dialog=a};isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureDef==="function"};isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureCall==="function"&&typeof a.renameProcedure==="function"};
178
- isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model=function(a){return a.getVariableModel!==void 0};$.warn$$module$build$src$core$utils$deprecation=function(a,b,c,d){a=a+" was deprecated in "+b+" and will be deleted in "+c+".";d&&(a+="\nUse "+d+" instead.");previousWarnings$$module$build$src$core$utils$deprecation.has(a)||(previousWarnings$$module$build$src$core$utils$deprecation.add(a),console.warn(a))};
179
+ setToast$$module$build$src$core$dialog=function(a=defaultToast$$module$build$src$core$dialog){toastImplementation$$module$build$src$core$dialog=a};
180
+ displayDialog$$module$build$src$core$dialog=function(...[a,b,c,d]){const e=document.createElement("dialog"),f=document.createElement("form"),g=document.createElement("label"),h=document.createElement("input"),k=document.createElement("div"),l=document.createElement("button");e.className="blocklyDialog";f.className="blocklyDialogForm";g.className="blocklyDialogPrompt";k.className="blocklyDialogButtonRow";l.className="blocklyDialogConfirmButton";f.setAttribute("method","dialog");g.textContent=b;g.setAttribute("for",
181
+ "blockly-form-input");l.textContent=$.Msg$$module$build$src$core$msg.DIALOG_OK;l.value="ok";e.appendChild(f);f.appendChild(g);a===DialogType$$module$build$src$core$dialog.PROMPT&&(h.id="blockly-form-input",h.className="blocklyDialogInput",h.type="text",h.name="input",h.autofocus=!0,d&&(h.value=d),f.appendChild(h));k.appendChild(l);if(a===DialogType$$module$build$src$core$dialog.CONFIRM||a===DialogType$$module$build$src$core$dialog.PROMPT)b=document.createElement("button"),b.className="blocklyDialogCancelButton",
182
+ b.textContent=$.Msg$$module$build$src$core$msg.DIALOG_CANCEL,b.value="cancel",k.appendChild(b);f.appendChild(k);let m;activeDialogCount$$module$build$src$core$dialog===0&&(m=$.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(e));activeDialogCount$$module$build$src$core$dialog++;e.addEventListener("close",()=>{activeDialogCount$$module$build$src$core$dialog--;if(!activeDialogCount$$module$build$src$core$dialog){let n;(n=m)==null||n()}e.remove();switch(a){case DialogType$$module$build$src$core$dialog.CONFIRM:c(e.returnValue===
183
+ "ok");break;case DialogType$$module$build$src$core$dialog.PROMPT:c(e.returnValue==="ok"?h.value:null);break;case DialogType$$module$build$src$core$dialog.ALERT:c==null||c()}});document.body.appendChild(e);e.showModal()};hasBubble$$module$build$src$core$interfaces$i_has_bubble=function(a){return typeof a.bubbleIsVisible==="function"&&typeof a.setBubbleVisible==="function"&&typeof a.getBubble==="function"};
184
+ isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureDef==="function"};isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks=function(a){return a&&typeof a.getProcedureCall==="function"&&typeof a.renameProcedure==="function"};isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model=function(a){return a.getVariableModel!==void 0};
185
+ $.warn$$module$build$src$core$utils$deprecation=function(a,b,c,d){a=a+" was deprecated in "+b+" and will be deleted in "+c+".";d&&(a+="\nUse "+d+" instead.");previousWarnings$$module$build$src$core$utils$deprecation.has(a)||(previousWarnings$$module$build$src$core$utils$deprecation.add(a),console.warn(a))};
179
186
  $.allUsedVarModels$$module$build$src$core$variables=function(a){a=a.getAllBlocks(!1);const b=new Set;for(let c=0;c<a.length;c++){const d=a[c].getVarModels();if(d)for(let e=0;e<d.length;e++){const f=d[e];f.getId()&&b.add(f)}}return Array.from(b.values())};$.allDeveloperVariables$$module$build$src$core$variables=function(a){a=a.getAllBlocks(!1);const b=new Set;for(let d=0,e;e=a[d];d++){var c=e.getDeveloperVariables;if(c){c=c();for(let f=0;f<c.length;f++)b.add(c[f])}}return Array.from(b.values())};
180
187
  internalFlyoutCategory$$module$build$src$core$variables=function(a){return flyoutCategory$$module$build$src$core$variables(a,!1)};
181
188
  flyoutCategory$$module$build$src$core$variables=function(a,b=!0){Blocks$$module$build$src$core$blocks.variables_set||Blocks$$module$build$src$core$blocks.variables_get||console.warn("There are no variable blocks, but there is a variable category.");if(b)return $.warn$$module$build$src$core$utils$deprecation("The XML return value of Blockly.Variables.flyoutCategory()","v12","v13","the same method, but handle a return type of FlyoutItemInfo[] (JSON) instead."),xmlFlyoutCategory$$module$build$src$core$variables(a);
@@ -189,9 +196,10 @@ for(let e=0,f;f=a[e];e++)c=$.createElement$$module$build$src$core$utils$xml("blo
189
196
  generateUniqueNameInternal$$module$build$src$core$variables=function(a){return generateUniqueNameFromOptions$$module$build$src$core$variables(VAR_LETTER_OPTIONS$$module$build$src$core$variables.charAt(0),a.getVariableMap().getAllVariables().map(b=>b.getName()))};
190
197
  generateUniqueNameFromOptions$$module$build$src$core$variables=function(a,b){if(!b.length)return a;const c=VAR_LETTER_OPTIONS$$module$build$src$core$variables;let d="",e=c.indexOf(a);for(;;){let f=!1;for(let g=0;g<b.length;g++)if(b[g].toLowerCase()===a){f=!0;break}if(!f)break;e++;e===c.length&&(e=0,d=`${Number(d)+1}`);a=c.charAt(e)+d}return a};
191
198
  createVariableButtonHandler$$module$build$src$core$variables=function(a,b,c){function d(f){promptName$$module$build$src$core$variables($.Msg$$module$build$src$core$msg.NEW_VARIABLE_TITLE,f,function(g){if(g){var h=nameUsedWithAnyType$$module$build$src$core$variables(g,a);if(h){if(h.getType()===e)var k=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS.replace("%1",h.getName());else k=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE,k=k.replace("%1",h.getName()).replace("%2",
192
- h.getType());alert$$module$build$src$core$dialog(k,function(){d(g)})}else a.getVariableMap().createVariable(g,e),b&&b(g)}else b&&b(null)})}const e=c||"";d("")};
193
- $.renameVariable$$module$build$src$core$variables=function(a,b,c){function d(e){const f=$.Msg$$module$build$src$core$msg.RENAME_VARIABLE_TITLE.replace("%1",b.getName());promptName$$module$build$src$core$variables(f,e,function(g){if(g){var h=nameUsedWithOtherType$$module$build$src$core$variables(g,b.getType(),a),k=nameUsedWithConflictingParam$$module$build$src$core$variables(b.getName(),g,a);if(h||k){var l="";h?l=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE.replace("%1",
194
- h.getName()).replace("%2",h.getType()):k&&(l=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER.replace("%1",g).replace("%2",k));alert$$module$build$src$core$dialog(l,function(){d(g)})}else a.getVariableMap().renameVariable(b,g),c&&c(g)}else c&&c(null)})}d("")};
199
+ h.getType());alert$$module$build$src$core$dialog(k,function(){d(g)})}else{const m=a.getVariableMap().createVariable(g,e);b&&b(g);const n=(k=a.getFlyout())==null?void 0:k.getWorkspace();if(n){var l=p=>{p.type===$.BLOCK_CREATE$$module$build$src$core$events$events&&(p=p.blockId)&&(p=n.getBlockById(p))&&p.type==="variables_set"&&p.getFieldValue("VAR")===m.getId()&&($.getFocusManager$$module$build$src$core$focus_manager().focusNode(p),n.removeChangeListener(l))};n.addChangeListener(l)}}}else b&&b(null)})}
200
+ const e=c||"";d("")};
201
+ $.renameVariable$$module$build$src$core$variables=function(a,b,c){function d(e){const f=$.Msg$$module$build$src$core$msg.RENAME_VARIABLE_TITLE.replace("%1",b.getName());promptName$$module$build$src$core$variables(f,e,function(g){if(g){var h=nameUsedWithOtherType$$module$build$src$core$variables(g,b.getType(),a),k=nameUsedWithConflictingParam$$module$build$src$core$variables(b.getName(),g,a);if(h||k){var l="";h?l=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE.replace("%1",h.getName()).replace("%2",
202
+ h.getType()):k&&(l=$.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER.replace("%1",g).replace("%2",k));alert$$module$build$src$core$dialog(l,function(){d(g)})}else a.getVariableMap().renameVariable(b,g),c&&c(g)}else c&&c(null)})}d("")};
195
203
  promptName$$module$build$src$core$variables=function(a,b,c){prompt$$module$build$src$core$dialog(a,b,function(d){d&&(d=d.replace(/[\s\xa0]+/g," ").trim(),d===$.Msg$$module$build$src$core$msg.RENAME_VARIABLE||d===$.Msg$$module$build$src$core$msg.NEW_VARIABLE)&&(d=null);c(d)})};nameUsedWithOtherType$$module$build$src$core$variables=function(a,b,c){c=c.getVariableMap().getAllVariables();a=a.toLowerCase();for(let d=0,e;e=c[d];d++)if(e.getName().toLowerCase()===a&&e.getType()!==b)return e;return null};
196
204
  nameUsedWithAnyType$$module$build$src$core$variables=function(a,b){b=b.getVariableMap().getAllVariables();a=a.toLowerCase();for(let c=0,d;d=b[c];c++)if(d.getName().toLowerCase()===a)return d;return null};nameUsedWithConflictingParam$$module$build$src$core$variables=function(a,b,c){return c.getProcedureMap().getProcedures().length?checkForConflictingParamWithProcedureModels$$module$build$src$core$variables(a,b,c):checkForConflictingParamWithLegacyProcedures$$module$build$src$core$variables(a,b,c)};
197
205
  checkForConflictingParamWithProcedureModels$$module$build$src$core$variables=function(a,b,c){a=a.toLowerCase();b=b.toLowerCase();c=c.getProcedureMap().getProcedures();for(const e of c){var d=e.getParameters().filter(isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model).map(f=>f.getVariableModel().getName());if(!d)continue;c=d.some(f=>f.toLowerCase()===a);d=d.some(f=>f.toLowerCase()===b);if(c&&d)return e.getName()}return null};
@@ -226,28 +234,30 @@ loadIcons$$module$build$src$core$serialization$blocks=function(a,b){if(b.icons){
226
234
  loadFields$$module$build$src$core$serialization$blocks=function(a,b){if(b.fields){var c=Object.keys(b.fields);for(let d=0;d<c.length;d++){const e=c[d],f=b.fields[e],g=a.getField(e);g?g.loadState(f):console.warn(`Ignoring non-existant field ${e} in block ${a.type}`)}}};
227
235
  loadInputBlocks$$module$build$src$core$serialization$blocks=function(a,b){if(b.inputs){var c=Object.keys(b.inputs);for(let d=0;d<c.length;d++){const e=c[d],f=a.getInput(e);if(!f||!f.connection)throw new MissingConnection$$module$build$src$core$serialization$exceptions(e,a,b);loadConnection$$module$build$src$core$serialization$blocks(f.connection,b.inputs[e])}}};
228
236
  loadNextBlocks$$module$build$src$core$serialization$blocks=function(a,b){if(b.next){if(!a.nextConnection)throw new MissingConnection$$module$build$src$core$serialization$exceptions("next",a,b);loadConnection$$module$build$src$core$serialization$blocks(a.nextConnection,b.next)}};loadConnection$$module$build$src$core$serialization$blocks=function(a,b){b.shadow&&a.setShadowState(b.shadow);b.block&&appendPrivate$$module$build$src$core$serialization$blocks(b.block,a.getSourceBlock().workspace,{parentConnection:a})};
229
- initBlock$$module$build$src$core$serialization$blocks=function(a,b){if(b){a.setConnectionTracking(!1);a.initSvg();a.queueRender();for(const c of a.getIcons())c.onLocationChange(a.getRelativeToSurfaceXY())}else a.initModel()};hasBubble$$module$build$src$core$interfaces$i_has_bubble=function(a){return typeof a.bubbleIsVisible==="function"&&typeof a.setBubbleVisible==="function"&&typeof a.getBubble==="function"};toRadians$$module$build$src$core$utils$math=function(a){return a*Math.PI/180};
230
- toDegrees$$module$build$src$core$utils$math=function(a){return a*180/Math.PI};clamp$$module$build$src$core$utils$math=function(a,b,c){if(c<a){const d=c;c=a;a=d}return Math.max(a,Math.min(b,c))};
237
+ initBlock$$module$build$src$core$serialization$blocks=function(a,b){if(b){a.setConnectionTracking(!1);a.initSvg();a.queueRender();for(const c of a.getIcons())c.onLocationChange(a.getRelativeToSurfaceXY())}else a.initModel()};toRadians$$module$build$src$core$utils$math=function(a){return a*Math.PI/180};toDegrees$$module$build$src$core$utils$math=function(a){return a*180/Math.PI};clamp$$module$build$src$core$utils$math=function(a,b,c){if(c<a){const d=c;c=a;a=d}return Math.max(a,Math.min(b,c))};
231
238
  createDom$$module$build$src$core$dropdowndiv=function(){document.querySelector(".blocklyDropDownDiv")||(div$$module$build$src$core$dropdowndiv=document.createElement("div"),div$$module$build$src$core$dropdowndiv.className="blocklyDropDownDiv",div$$module$build$src$core$dropdowndiv.tabIndex=-1,(getParentContainer$$module$build$src$core$common()||document.body).appendChild(div$$module$build$src$core$dropdowndiv),content$$module$build$src$core$dropdowndiv=document.createElement("div"),content$$module$build$src$core$dropdowndiv.className=
232
239
  "blocklyDropDownContent",div$$module$build$src$core$dropdowndiv.appendChild(content$$module$build$src$core$dropdowndiv),keydownListener$$module$build$src$core$dropdowndiv=conditionalBind$$module$build$src$core$browser_events(content$$module$build$src$core$dropdowndiv,"keydown",null,globalShortcutHandler$$module$build$src$core$common),arrow$$module$build$src$core$dropdowndiv=document.createElement("div"),arrow$$module$build$src$core$dropdowndiv.className="blocklyDropDownArrow",div$$module$build$src$core$dropdowndiv.appendChild(arrow$$module$build$src$core$dropdowndiv),
233
- div$$module$build$src$core$dropdowndiv.style.opacity="0",div$$module$build$src$core$dropdowndiv.style.transition="transform "+ANIMATION_TIME$$module$build$src$core$dropdowndiv+"s, opacity "+ANIMATION_TIME$$module$build$src$core$dropdowndiv+"s")};setBoundsElement$$module$build$src$core$dropdowndiv=function(a){boundsElement$$module$build$src$core$dropdowndiv=a};getOwner$$module$build$src$core$dropdowndiv=function(){return owner$$module$build$src$core$dropdowndiv};
234
- getContentDiv$$module$build$src$core$dropdowndiv=function(){return content$$module$build$src$core$dropdowndiv};clearContent$$module$build$src$core$dropdowndiv=function(){keydownListener$$module$build$src$core$dropdowndiv&&(unbind$$module$build$src$core$browser_events(keydownListener$$module$build$src$core$dropdowndiv),keydownListener$$module$build$src$core$dropdowndiv=null);div$$module$build$src$core$dropdowndiv.remove();createDom$$module$build$src$core$dropdowndiv()};
240
+ div$$module$build$src$core$dropdowndiv.style.opacity="0",div$$module$build$src$core$dropdowndiv.style.transition="transform "+ANIMATION_TIME$$module$build$src$core$dropdowndiv+"s, opacity "+ANIMATION_TIME$$module$build$src$core$dropdowndiv+"s")};handleFocusLoss$$module$build$src$core$dropdowndiv=function(){returnEphemeralFocus$$module$build$src$core$dropdowndiv&&(returnEphemeralFocus$$module$build$src$core$dropdowndiv(!1),returnEphemeralFocus$$module$build$src$core$dropdowndiv=null);hide$$module$build$src$core$dropdowndiv()};
241
+ setBoundsElement$$module$build$src$core$dropdowndiv=function(a){boundsElement$$module$build$src$core$dropdowndiv=a};getOwner$$module$build$src$core$dropdowndiv=function(){return owner$$module$build$src$core$dropdowndiv};getContentDiv$$module$build$src$core$dropdowndiv=function(){return content$$module$build$src$core$dropdowndiv};
242
+ clearContent$$module$build$src$core$dropdowndiv=function(){keydownListener$$module$build$src$core$dropdowndiv&&(unbind$$module$build$src$core$browser_events(keydownListener$$module$build$src$core$dropdowndiv),keydownListener$$module$build$src$core$dropdowndiv=null);div$$module$build$src$core$dropdowndiv.remove();createDom$$module$build$src$core$dropdowndiv()};
235
243
  setColour$$module$build$src$core$dropdowndiv=function(a,b){div$$module$build$src$core$dropdowndiv.style.backgroundColor=a;div$$module$build$src$core$dropdowndiv.style.borderColor=b};showPositionedByBlock$$module$build$src$core$dropdowndiv=function(a,b,c,d,e=!0){return showPositionedByRect$$module$build$src$core$dropdowndiv(getScaledBboxOfBlock$$module$build$src$core$dropdowndiv(b),a,e,c,d)};
236
244
  showPositionedByField$$module$build$src$core$dropdowndiv=function(a,b,c,d=!0){positionToField$$module$build$src$core$dropdowndiv=!0;return showPositionedByRect$$module$build$src$core$dropdowndiv(getScaledBboxOfField$$module$build$src$core$dropdowndiv(a),a,d,b,c)};
237
245
  getScaledBboxOfBlock$$module$build$src$core$dropdowndiv=function(a){var b=a.getSvgRoot();const c=a.workspace.scale,d=a.height*c;a=a.width*c;b=getPageOffset$$module$build$src$core$utils$style(b);return new Rect$$module$build$src$core$utils$rect(b.y,b.y+d,b.x,b.x+a)};getScaledBboxOfField$$module$build$src$core$dropdowndiv=function(a){a=a.getScaledBBox();return new Rect$$module$build$src$core$utils$rect(a.top,a.bottom,a.left,a.right)};
238
246
  showPositionedByRect$$module$build$src$core$dropdowndiv=function(a,b,c,d,e){const f=a.left+(a.right-a.left)/2,g=a.bottom;a=a.top;e&&(a+=e);e=b.getSourceBlock();let h=e.workspace;for(;h.options.parentWorkspace;)h=h.options.parentWorkspace;setBoundsElement$$module$build$src$core$dropdowndiv(h.getParentSvg().parentNode);return show$$module$build$src$core$dropdowndiv(b,e.RTL,f,g,f,a,c,d)};
239
- show$$module$build$src$core$dropdowndiv=function(a,b,c,d,e,f,g,h){let k;(k=getParentContainer$$module$build$src$core$common())==null||k.appendChild(div$$module$build$src$core$dropdowndiv);owner$$module$build$src$core$dropdowndiv=a;onHide$$module$build$src$core$dropdowndiv=h||null;div$$module$build$src$core$dropdowndiv.style.direction=b?"rtl":"ltr";a=getMainWorkspace$$module$build$src$core$common();renderedClassName$$module$build$src$core$dropdowndiv=a.getRenderer().getClassName();themeClassName$$module$build$src$core$dropdowndiv=
240
- a.getTheme().getClassName();addClass$$module$build$src$core$utils$dom(div$$module$build$src$core$dropdowndiv,renderedClassName$$module$build$src$core$dropdowndiv);addClass$$module$build$src$core$utils$dom(div$$module$build$src$core$dropdowndiv,themeClassName$$module$build$src$core$dropdowndiv);c=positionInternal$$module$build$src$core$dropdowndiv(c,d,e,f);g&&(returnEphemeralFocus$$module$build$src$core$dropdowndiv=$.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(div$$module$build$src$core$dropdowndiv));
241
- return c};getPositionBelowMetrics$$module$build$src$core$dropdowndiv=function(a,b,c,d){a=getPositionX$$module$build$src$core$dropdowndiv(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b,finalX:a.divX,finalY:b+PADDING_Y$$module$build$src$core$dropdowndiv,arrowX:a.arrowX,arrowY:-(ARROW_SIZE$$module$build$src$core$dropdowndiv/2+BORDER_SIZE$$module$build$src$core$dropdowndiv),arrowAtTop:!0,arrowVisible:!0}};
247
+ show$$module$build$src$core$dropdowndiv=function(a,b,c,d,e,f,g,h){$.getFocusManager$$module$build$src$core$focus_manager().registerPopoverFocusLossHandler(handleFocusLoss$$module$build$src$core$dropdowndiv);let k;(k=getParentContainer$$module$build$src$core$common())==null||k.appendChild(div$$module$build$src$core$dropdowndiv);owner$$module$build$src$core$dropdowndiv=a;onHide$$module$build$src$core$dropdowndiv=h||null;div$$module$build$src$core$dropdowndiv.style.direction=b?"rtl":"ltr";a=getMainWorkspace$$module$build$src$core$common();
248
+ renderedClassName$$module$build$src$core$dropdowndiv=a.getRenderer().getClassName();themeClassName$$module$build$src$core$dropdowndiv=a.getTheme().getClassName();addClass$$module$build$src$core$utils$dom(div$$module$build$src$core$dropdowndiv,renderedClassName$$module$build$src$core$dropdowndiv);addClass$$module$build$src$core$utils$dom(div$$module$build$src$core$dropdowndiv,themeClassName$$module$build$src$core$dropdowndiv);c=positionInternal$$module$build$src$core$dropdowndiv(c,d,e,f);g&&(returnEphemeralFocus$$module$build$src$core$dropdowndiv=
249
+ $.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(div$$module$build$src$core$dropdowndiv));return c};
250
+ getPositionBelowMetrics$$module$build$src$core$dropdowndiv=function(a,b,c,d){a=getPositionX$$module$build$src$core$dropdowndiv(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b,finalX:a.divX,finalY:b+PADDING_Y$$module$build$src$core$dropdowndiv,arrowX:a.arrowX,arrowY:-(ARROW_SIZE$$module$build$src$core$dropdowndiv/2+BORDER_SIZE$$module$build$src$core$dropdowndiv),arrowAtTop:!0,arrowVisible:!0}};
242
251
  getPositionAboveMetrics$$module$build$src$core$dropdowndiv=function(a,b,c,d){a=getPositionX$$module$build$src$core$dropdowndiv(a,c.left,c.right,d.width);return{initialX:a.divX,initialY:b-d.height,finalX:a.divX,finalY:b-d.height-PADDING_Y$$module$build$src$core$dropdowndiv,arrowX:a.arrowX,arrowY:d.height-BORDER_SIZE$$module$build$src$core$dropdowndiv*2-ARROW_SIZE$$module$build$src$core$dropdowndiv/2,arrowAtTop:!1,arrowVisible:!0}};
243
252
  getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv=function(a,b,c){a=getPositionX$$module$build$src$core$dropdowndiv(a,b.left,b.right,c.width);return{initialX:a.divX,initialY:0,finalX:a.divX,finalY:0,arrowAtTop:null,arrowX:null,arrowY:null,arrowVisible:!1}};
244
253
  getPositionX$$module$build$src$core$dropdowndiv=function(a,b,c,d){b=clamp$$module$build$src$core$utils$math(b,a-d/2,c-d);a=a-ARROW_SIZE$$module$build$src$core$dropdowndiv/2-b;c=ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv;a=clamp$$module$build$src$core$utils$math(c,a,d-c-ARROW_SIZE$$module$build$src$core$dropdowndiv);return{arrowX:a,divX:b}};isVisible$$module$build$src$core$dropdowndiv=function(){return!!owner$$module$build$src$core$dropdowndiv};
245
254
  hideIfOwner$$module$build$src$core$dropdowndiv=function(a,b){return owner$$module$build$src$core$dropdowndiv===a?(b?hideWithoutAnimation$$module$build$src$core$dropdowndiv():hide$$module$build$src$core$dropdowndiv(),!0):!1};
246
- hide$$module$build$src$core$dropdowndiv=function(){div$$module$build$src$core$dropdowndiv.style.transform="translate(0, 0)";div$$module$build$src$core$dropdowndiv.style.opacity="0";animateOutTimer$$module$build$src$core$dropdowndiv=setTimeout(function(){hideWithoutAnimation$$module$build$src$core$dropdowndiv()},ANIMATION_TIME$$module$build$src$core$dropdowndiv*1E3);onHide$$module$build$src$core$dropdowndiv&&(onHide$$module$build$src$core$dropdowndiv(),onHide$$module$build$src$core$dropdowndiv=null)};
255
+ hide$$module$build$src$core$dropdowndiv=function(){$.getFocusManager$$module$build$src$core$focus_manager().unregisterPopoverFocusLossHandler(handleFocusLoss$$module$build$src$core$dropdowndiv);div$$module$build$src$core$dropdowndiv.style.transform="translate(0, 0)";div$$module$build$src$core$dropdowndiv.style.opacity="0";animateOutTimer$$module$build$src$core$dropdowndiv=setTimeout(function(){hideWithoutAnimation$$module$build$src$core$dropdowndiv()},ANIMATION_TIME$$module$build$src$core$dropdowndiv*
256
+ 1E3);onHide$$module$build$src$core$dropdowndiv&&(onHide$$module$build$src$core$dropdowndiv(),onHide$$module$build$src$core$dropdowndiv=null)};
247
257
  hideWithoutAnimation$$module$build$src$core$dropdowndiv=function(){isVisible$$module$build$src$core$dropdowndiv()&&(animateOutTimer$$module$build$src$core$dropdowndiv&&clearTimeout(animateOutTimer$$module$build$src$core$dropdowndiv),onHide$$module$build$src$core$dropdowndiv&&(onHide$$module$build$src$core$dropdowndiv(),onHide$$module$build$src$core$dropdowndiv=null),clearContent$$module$build$src$core$dropdowndiv(),owner$$module$build$src$core$dropdowndiv=null,getMainWorkspace$$module$build$src$core$common().markFocused(),
248
258
  returnEphemeralFocus$$module$build$src$core$dropdowndiv&&(returnEphemeralFocus$$module$build$src$core$dropdowndiv(),returnEphemeralFocus$$module$build$src$core$dropdowndiv=null))};
249
259
  positionInternal$$module$build$src$core$dropdowndiv=function(a,b,c,d){a=internal$$module$build$src$core$dropdowndiv.getPositionMetrics(a,b,c,d);a.arrowVisible?(b=a.arrowX,c=a.arrowY,d=a.arrowAtTop?45:225,arrow$$module$build$src$core$dropdowndiv.style.display="",arrow$$module$build$src$core$dropdowndiv.style.transform=`translate(${b}px, ${c}px) rotate(${d}deg)`,arrow$$module$build$src$core$dropdowndiv.setAttribute("class","blocklyDropDownArrow")):arrow$$module$build$src$core$dropdowndiv.style.display=
250
- "none";b=Math.floor(a.initialX);c=Math.floor(a.initialY);d=Math.floor(a.finalX);let e=Math.floor(a.finalY);var f=div$$module$build$src$core$dropdowndiv.parentElement;f&&(f=f.getBoundingClientRect(),b-=f.left+window.scrollX,d-=f.left+window.scrollX,c-=f.top+window.scrollY,e-=f.top+window.scrollY);div$$module$build$src$core$dropdowndiv.style.left=b+"px";div$$module$build$src$core$dropdowndiv.style.top=c+"px";div$$module$build$src$core$dropdowndiv.style.display="block";div$$module$build$src$core$dropdowndiv.style.opacity=
260
+ "none";b=Math.floor(a.initialX);c=Math.floor(a.initialY);d=Math.floor(a.finalX);let e=Math.floor(a.finalY);var f=div$$module$build$src$core$dropdowndiv.parentElement;f&&(f=f.getBoundingClientRect(),b-=f.left+window.scrollX,d-=f.left+window.scrollX,c-=f.top+window.scrollY,e-=f.top+window.scrollY);div$$module$build$src$core$dropdowndiv.style.left=b+"px";div$$module$build$src$core$dropdowndiv.style.top=c+"px";div$$module$build$src$core$dropdowndiv.style.visibility="visible";div$$module$build$src$core$dropdowndiv.style.opacity=
251
261
  "1";div$$module$build$src$core$dropdowndiv.style.transform="translate("+(d-b)+"px,"+(e-c)+"px)";return!!a.arrowAtTop};
252
262
  repositionForWindowResize$$module$build$src$core$dropdowndiv=function(){if(owner$$module$build$src$core$dropdowndiv){var a=owner$$module$build$src$core$dropdowndiv.getSourceBlock();a=positionToField$$module$build$src$core$dropdowndiv?getScaledBboxOfField$$module$build$src$core$dropdowndiv(owner$$module$build$src$core$dropdowndiv):getScaledBboxOfBlock$$module$build$src$core$dropdowndiv(a);const b=a.left+(a.right-a.left)/2;positionInternal$$module$build$src$core$dropdowndiv(b,a.bottom,b,a.top)}else hide$$module$build$src$core$dropdowndiv()};
253
263
  shortestStringLength$$module$build$src$core$utils$string=function(a){return a.length?a.reduce(function(b,c){return b.length<c.length?b:c}).length:0};
@@ -289,14 +299,16 @@ replaceMessageReferences$$module$build$src$core$utils$parsing=function(a){if(typ
289
299
  checkMessageReferences$$module$build$src$core$utils$parsing=function(a){let b=!0;const c=$.Msg$$module$build$src$core$msg,d=a.match(/%{BKY_[A-Z]\w*}/gi);if(d)for(let e=0;e<d.length;e++){const f=d[e].toUpperCase();c[f.slice(6,-1)]===void 0&&(console.warn("No message string for "+d[e]+" in "+a),b=!1)}return b};
290
300
  parseBlockColour$$module$build$src$core$utils$parsing=function(a){const b=typeof a==="string"?replaceMessageReferences$$module$build$src$core$utils$parsing(a):a;var c=Number(b);if(!isNaN(c)&&0<=c&&c<=360)return{hue:c,hex:hsvToHex$$module$build$src$core$utils$colour(c,getHsvSaturation$$module$build$src$core$utils$colour(),getHsvValue$$module$build$src$core$utils$colour()*255)};if(c=parse$$module$build$src$core$utils$colour(b))return{hue:null,hex:c};c='Invalid colour: "'+b+'"';a!==b&&(c+=' (from "'+
291
301
  a+'")');throw Error(c);};getDiv$$module$build$src$core$widgetdiv=function(){return containerDiv$$module$build$src$core$widgetdiv};testOnly_setDiv$$module$build$src$core$widgetdiv=function(a){containerDiv$$module$build$src$core$widgetdiv=a;if(a===null){let b;(b=document.querySelector("."+containerClassName$$module$build$src$core$widgetdiv))==null||b.remove()}};
302
+ handleFocusLoss$$module$build$src$core$widgetdiv=function(){returnEphemeralFocus$$module$build$src$core$widgetdiv&&(returnEphemeralFocus$$module$build$src$core$widgetdiv(!1),returnEphemeralFocus$$module$build$src$core$widgetdiv=null);hide$$module$build$src$core$widgetdiv()};
292
303
  createDom$$module$build$src$core$widgetdiv=function(){const a=getParentContainer$$module$build$src$core$common()||document.body,b=document.querySelector("div."+containerClassName$$module$build$src$core$widgetdiv);b?containerDiv$$module$build$src$core$widgetdiv=b:(containerDiv$$module$build$src$core$widgetdiv=document.createElement("div"),containerDiv$$module$build$src$core$widgetdiv.className=containerClassName$$module$build$src$core$widgetdiv,containerDiv$$module$build$src$core$widgetdiv.tabIndex=
293
304
  -1);conditionalBind$$module$build$src$core$browser_events(containerDiv$$module$build$src$core$widgetdiv,"keydown",null,globalShortcutHandler$$module$build$src$core$common);a.appendChild(containerDiv$$module$build$src$core$widgetdiv)};
294
305
  show$$module$build$src$core$widgetdiv=function(a,b,c,d,e=!0){hide$$module$build$src$core$widgetdiv();owner$$module$build$src$core$widgetdiv=a;dispose$$module$build$src$core$widgetdiv=c;if(c=containerDiv$$module$build$src$core$widgetdiv){var f;(f=getParentContainer$$module$build$src$core$common())==null||f.appendChild(c);c.style.direction=b?"rtl":"ltr";c.style.display="block";if(!d&&a instanceof Field$$module$build$src$core$field){let k;d=(k=a.getSourceBlock())==null?void 0:k.workspace}var g;ownerWorkspace$$module$build$src$core$widgetdiv=
295
306
  (g=d)!=null?g:null;var h;a=(h=d)!=null?h:getMainWorkspace$$module$build$src$core$common();rendererClassName$$module$build$src$core$widgetdiv=a.getRenderer().getClassName();themeClassName$$module$build$src$core$widgetdiv=a.getTheme().getClassName();rendererClassName$$module$build$src$core$widgetdiv&&addClass$$module$build$src$core$utils$dom(c,rendererClassName$$module$build$src$core$widgetdiv);themeClassName$$module$build$src$core$widgetdiv&&addClass$$module$build$src$core$utils$dom(c,themeClassName$$module$build$src$core$widgetdiv);
296
- e&&(returnEphemeralFocus$$module$build$src$core$widgetdiv=$.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(c))}};
297
- hide$$module$build$src$core$widgetdiv=function(){if(isVisible$$module$build$src$core$widgetdiv()){owner$$module$build$src$core$widgetdiv=null;var a=containerDiv$$module$build$src$core$widgetdiv;a&&(a.style.display="none",a.style.left="",a.style.top="",dispose$$module$build$src$core$widgetdiv&&(dispose$$module$build$src$core$widgetdiv(),dispose$$module$build$src$core$widgetdiv=null),a.textContent="",rendererClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,
298
- rendererClassName$$module$build$src$core$widgetdiv),rendererClassName$$module$build$src$core$widgetdiv=""),themeClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,themeClassName$$module$build$src$core$widgetdiv),themeClassName$$module$build$src$core$widgetdiv=""),getMainWorkspace$$module$build$src$core$common().markFocused(),returnEphemeralFocus$$module$build$src$core$widgetdiv&&(returnEphemeralFocus$$module$build$src$core$widgetdiv(),returnEphemeralFocus$$module$build$src$core$widgetdiv=
299
- null))}};isVisible$$module$build$src$core$widgetdiv=function(){return!!owner$$module$build$src$core$widgetdiv};hideIfOwner$$module$build$src$core$widgetdiv=function(a){owner$$module$build$src$core$widgetdiv===a&&hide$$module$build$src$core$widgetdiv()};hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv=function(a){let b=ownerWorkspace$$module$build$src$core$widgetdiv===null,c=a;for(;!b&&c;){if(c===a){b=!0;break}c=a.options.parentWorkspace}b&&hide$$module$build$src$core$widgetdiv()};
307
+ e&&(returnEphemeralFocus$$module$build$src$core$widgetdiv=$.getFocusManager$$module$build$src$core$focus_manager().takeEphemeralFocus(c));$.getFocusManager$$module$build$src$core$focus_manager().registerPopoverFocusLossHandler(handleFocusLoss$$module$build$src$core$widgetdiv)}};
308
+ hide$$module$build$src$core$widgetdiv=function(){if(isVisible$$module$build$src$core$widgetdiv()){owner$$module$build$src$core$widgetdiv=null;var a=containerDiv$$module$build$src$core$widgetdiv;a&&($.getFocusManager$$module$build$src$core$focus_manager().unregisterPopoverFocusLossHandler(handleFocusLoss$$module$build$src$core$widgetdiv),a.style.display="none",a.style.left="",a.style.top="",dispose$$module$build$src$core$widgetdiv&&(dispose$$module$build$src$core$widgetdiv(),dispose$$module$build$src$core$widgetdiv=
309
+ null),a.textContent="",rendererClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,rendererClassName$$module$build$src$core$widgetdiv),rendererClassName$$module$build$src$core$widgetdiv=""),themeClassName$$module$build$src$core$widgetdiv&&(removeClass$$module$build$src$core$utils$dom(a,themeClassName$$module$build$src$core$widgetdiv),themeClassName$$module$build$src$core$widgetdiv=""),getMainWorkspace$$module$build$src$core$common().markFocused(),returnEphemeralFocus$$module$build$src$core$widgetdiv&&
310
+ (returnEphemeralFocus$$module$build$src$core$widgetdiv(),returnEphemeralFocus$$module$build$src$core$widgetdiv=null))}};isVisible$$module$build$src$core$widgetdiv=function(){return!!owner$$module$build$src$core$widgetdiv};hideIfOwner$$module$build$src$core$widgetdiv=function(a){owner$$module$build$src$core$widgetdiv===a&&hide$$module$build$src$core$widgetdiv()};
311
+ hideIfOwnerIsInWorkspace$$module$build$src$core$widgetdiv=function(a){let b=ownerWorkspace$$module$build$src$core$widgetdiv===null,c=a;for(;!b&&c;){if(c===a){b=!0;break}c=a.options.parentWorkspace}b&&hide$$module$build$src$core$widgetdiv()};
300
312
  positionInternal$$module$build$src$core$widgetdiv=function(a,b,c){if(containerDiv$$module$build$src$core$widgetdiv){var d=containerDiv$$module$build$src$core$widgetdiv.parentElement;d&&(d=d.getBoundingClientRect(),a-=d.left+window.scrollX,b-=d.top+window.scrollY);containerDiv$$module$build$src$core$widgetdiv.style.left=a+"px";containerDiv$$module$build$src$core$widgetdiv.style.top=b+"px";containerDiv$$module$build$src$core$widgetdiv.style.height=c+"px"}};
301
313
  positionWithAnchor$$module$build$src$core$widgetdiv=function(a,b,c,d){const e=calculateY$$module$build$src$core$widgetdiv(a,b,c);a=calculateX$$module$build$src$core$widgetdiv(a,b,c,d);e<0?positionInternal$$module$build$src$core$widgetdiv(a,0,c.height+e):positionInternal$$module$build$src$core$widgetdiv(a,e,c.height)};calculateX$$module$build$src$core$widgetdiv=function(a,b,c,d){return d?Math.min(Math.max(b.right-c.width,a.left),a.right-c.width):Math.max(Math.min(b.left,a.right-c.width),a.left)};
302
314
  calculateY$$module$build$src$core$widgetdiv=function(a,b,c){return b.bottom+c.height>=a.bottom?b.top-c.height:b.bottom};isRepositionable$$module$build$src$core$widgetdiv=function(a){return!(a==null||!a.repositionForWindowResize)};repositionForWindowResize$$module$build$src$core$widgetdiv=function(){isRepositionable$$module$build$src$core$widgetdiv(owner$$module$build$src$core$widgetdiv)&&owner$$module$build$src$core$widgetdiv.repositionForWindowResize()||hide$$module$build$src$core$widgetdiv()};
@@ -373,6 +385,27 @@ $.buildTooltipWithFieldText$$module$build$src$core$extensions=function(a,b){retu
373
385
  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("")};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("")};
374
386
  lineOnAxis$$module$build$src$core$utils$svg_paths=function(a,b){return" "+a+" "+b+" "};arc$$module$build$src$core$utils$svg_paths=function(a,b,c,d){return a+" "+c+" "+c+" "+b+d};connectReciprocally$$module$build$src$core$connection=function(a,b){if(!a||!b)throw Error("Cannot connect null connections.");a.targetConnection=b;b.targetConnection=a};
375
387
  getSingleConnection$$module$build$src$core$connection=function(a,b){let c=null;b=b.outputConnection;const d=b==null?void 0:b.getConnectionChecker();for(let e=0,f;f=a.inputList[e];e++){const g=f.connection;let h;if(g&&((h=d)==null?0:h.canConnect(b,g,!1))){if(c)return null;c=g}}return c};getConnectionForOrphanedOutput$$module$build$src$core$connection=function(a,b){let c;for(;c=getSingleConnection$$module$build$src$core$connection(a,b);)if(a=c.targetBlock(),!a||a.isShadow())return c;return null};
388
+ isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item=function(a){return a&&typeof a.init==="function"&&typeof a.getDiv==="function"&&typeof a.getId==="function"&&typeof a.getParent==="function"&&typeof a.getLevel==="function"&&typeof a.isSelectable==="function"&&typeof a.isCollapsible==="function"&&typeof a.dispose==="function"&&typeof a.getClickTarget==="function"&&typeof a.setVisible_==="function"&&typeof a.getParentToolbox==="function"};
389
+ isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item=function(a){return typeof a.getName==="function"&&typeof a.getContents==="function"&&typeof a.setSelected==="function"&&typeof a.onClick==="function"&&isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item(a)&&a.isSelectable()};
390
+ computeAriaLabel$$module$build$src$core$block_aria_composer=function(a,b=Verbosity$$module$build$src$core$utils$aria.STANDARD){return[b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getBeginStackLabel$$module$build$src$core$block_aria_composer(a),getParentInputLabel$$module$build$src$core$block_aria_composer(a),...getInputLabels$$module$build$src$core$block_aria_composer(a,b),b===Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS&&getParentToolboxCategoryLabel$$module$build$src$core$block_aria_composer(a),
391
+ b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getDisabledLabel$$module$build$src$core$block_aria_composer(a),b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getCollapsedLabel$$module$build$src$core$block_aria_composer(a),b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getShadowBlockLabel$$module$build$src$core$block_aria_composer(a),b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getInputCountLabel$$module$build$src$core$block_aria_composer(a)].filter(c=>!!c).join(", ")};
392
+ configureAriaRole$$module$build$src$core$block_aria_composer=function(a){setRole$$module$build$src$core$utils$aria(a.getSvgRoot(),Role$$module$build$src$core$utils$aria.PRESENTATION);const b=a.getFocusableElement();setRole$$module$build$src$core$utils$aria(b,a.isInFlyout?Role$$module$build$src$core$utils$aria.LISTITEM:Role$$module$build$src$core$utils$aria.FIGURE);let c=$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STATEMENT;a.statementInputCount?c=$.Msg$$module$build$src$core$msg.BLOCK_LABEL_CONTAINER:
393
+ a.outputConnection&&(c=$.Msg$$module$build$src$core$msg.BLOCK_LABEL_VALUE);setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.ROLEDESCRIPTION,c)};
394
+ computeFieldRowLabel$$module$build$src$core$block_aria_composer=function(a,b,c=Verbosity$$module$build$src$core$utils$aria.STANDARD){const d=c>=Verbosity$$module$build$src$core$utils$aria.STANDARD,e=a.fieldRow.filter(f=>f.isVisible()).map(f=>f.computeAriaLabel(d));if(!e.length&&b){const f=a.getSourceBlock().inputList;a=f.indexOf(a);if(a>0)return computeFieldRowLabel$$module$build$src$core$block_aria_composer(f[a-1],b,c)}return e};
395
+ getParentInputLabel$$module$build$src$core$block_aria_composer=function(a){let b,c,d;const e=(b=(d=a.outputConnection)!=null?d:a.previousConnection)==null?void 0:(c=b.targetConnection)==null?void 0:c.getParentInput();a=e==null?void 0:e.getSourceBlock();if((a==null||!a.isInsertionMarker())&&a!=null&&a.statementInputCount&&(a=a.inputList.find(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT),e&&e!==a))return a=computeFieldRowLabel$$module$build$src$core$block_aria_composer(e,
396
+ !0),e.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_PREFIX.replace("%1",a.join(" ")):a};getBeginStackLabel$$module$build$src$core$block_aria_composer=function(a){return a.workspace.isFlyout||a.getRootBlock()!==a?void 0:$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_STACK};
397
+ getInputLabels$$module$build$src$core$block_aria_composer=function(a,b=Verbosity$$module$build$src$core$utils$aria.STANDARD){return a.inputList.filter(c=>c.isVisible()).map(c=>c.getLabel(b))};
398
+ getInputLabelsSubset$$module$build$src$core$block_aria_composer=function(a,b,c=Verbosity$$module$build$src$core$utils$aria.STANDARD){const d=a.inputList.indexOf(b);if(d===-1)throw Error(`Input with name "${b.name}" not found on block with id "${a.id}".`);b=b.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?findStartOfStatementSection$$module$build$src$core$block_aria_composer(a.inputList,d):d;return a.inputList.slice(b,d+1).filter(e=>e.isVisible()).map(e=>e.getLabel(c)||$.Msg$$module$build$src$core$msg.INPUT_LABEL_INDEX.replace("%1",
399
+ (e.getIndex()+1).toString()))};findStartOfStatementSection$$module$build$src$core$block_aria_composer=function(a,b){for(--b;b>=0;b--)if(a[b].type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT)return b+1;return 0};
400
+ getParentToolboxCategoryLabel$$module$build$src$core$block_aria_composer=function(a){var b=a.workspace.getToolbox();if(b){var c=void 0;for(const d of b.getToolboxItems()){if(!isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item(d))continue;b=d.getContents();if(Array.isArray(b)&&b.some(e=>e.kind.toLowerCase()==="block"&&"type"in e&&e.type===a.type)){c=d;break}"getColour"in d&&typeof d.getColour==="function"&&d.getColour()===a.getColour()&&(c=d)}if(c)return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_TOOLBOX_CATEGORY.replace("%1",
401
+ c.getName())}};
402
+ computeMoveLabel$$module$build$src$core$block_aria_composer=function(a,b,c,d=!1){var e=getConnectionPreposition$$module$build$src$core$block_aria_composer(a,b),f=b.getSourceBlock();const g=f.getAriaLabel(Verbosity$$module$build$src$core$utils$aria.TERSE);d=d?a.getSourceBlock().getStackBlocksCountLabel():"";let h;switch(e){case ConnectionPreposition$$module$build$src$core$block_aria_composer.BEFORE:h=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_BEFORE;break;case ConnectionPreposition$$module$build$src$core$block_aria_composer.AFTER:h=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_AFTER;
403
+ break;case ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE:h=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_INSIDE;break;case ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND:h=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_AROUND;break;case ConnectionPreposition$$module$build$src$core$block_aria_composer.UNKNOWN:h=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_UNKNOWN}var k=[ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE,ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND].includes(e);
404
+ e=k&&c(!0);c=k&&c(!1);k=a.getParentInput();b=b.getParentInput();a=e&&k&&getInputLabelsSubset$$module$build$src$core$block_aria_composer(a.getSourceBlock(),k).join(", ")||"";f=c&&b&&getInputLabelsSubset$$module$build$src$core$block_aria_composer(f,b).join(", ")||"";return h.replace("%1",d).replace("%2",a).replace("%3",g).replace("%4",f)};
405
+ getConnectionPreposition$$module$build$src$core$block_aria_composer=function(a,b){switch(a.type){case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:return ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE;case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:return ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:return a===a.getSourceBlock().nextConnection?
406
+ ConnectionPreposition$$module$build$src$core$block_aria_composer.BEFORE:ConnectionPreposition$$module$build$src$core$block_aria_composer.AROUND;case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:return b===b.getSourceBlock().nextConnection?ConnectionPreposition$$module$build$src$core$block_aria_composer.AFTER:ConnectionPreposition$$module$build$src$core$block_aria_composer.INSIDE}return ConnectionPreposition$$module$build$src$core$block_aria_composer.UNKNOWN};
407
+ getDisabledLabel$$module$build$src$core$block_aria_composer=function(a){return a.isEnabled()?void 0:$.Msg$$module$build$src$core$msg.BLOCK_LABEL_DISABLED};getCollapsedLabel$$module$build$src$core$block_aria_composer=function(a){return a.isCollapsed()?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_COLLAPSED:void 0};getShadowBlockLabel$$module$build$src$core$block_aria_composer=function(a){return a.isShadow()?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_REPLACEABLE:void 0};
408
+ getInputCountLabel$$module$build$src$core$block_aria_composer=function(a){switch(a.inputList.reduce((b,c)=>{let d;return c.fieldRow.reduce((e,f)=>f.EDITABLE&&!f.isFullBlockField()?e++:e,b)+(((d=c.connection)==null?void 0:d.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?1:0)},0)){case 0:break;case 1:return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_INPUT;default:return $.Msg$$module$build$src$core$msg.BLOCK_LABEL_HAS_INPUTS}};
376
409
  isIcon$$module$build$src$core$interfaces$i_icon=function(a){return isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(a)&&typeof a.getType==="function"&&typeof a.initView==="function"&&typeof a.dispose==="function"&&typeof a.getWeight==="function"&&typeof a.getSize==="function"&&typeof a.applyColour==="function"&&typeof a.hideForInsertionMarker==="function"&&typeof a.updateEditable==="function"&&typeof a.updateCollapsed==="function"&&typeof a.isShownWhenCollapsed==="function"&&typeof a.setOffsetInBlock===
377
410
  "function"&&typeof a.onLocationChange==="function"&&typeof a.onClick==="function"};
378
411
  isCommentIcon$$module$build$src$core$interfaces$i_comment_icon=function(a){return isIcon$$module$build$src$core$interfaces$i_icon(a)&&hasBubble$$module$build$src$core$interfaces$i_has_bubble(a)&&isSerializable$$module$build$src$core$interfaces$i_serializable(a)&&typeof a.setText==="function"&&typeof a.getText==="function"&&typeof a.setBubbleSize==="function"&&typeof a.getBubbleSize==="function"&&typeof a.setBubbleLocation==="function"&&typeof a.getBubbleLocation==="function"&&a.getType()===IconType$$module$build$src$core$icons$icon_types.COMMENT};
@@ -392,24 +425,23 @@ bumpIntoBoundsHandler$$module$build$src$core$bump_objects=function(a){return b=>
392
425
  d,e)&&!b.group&&console.warn("Moved object in bounds but there was no event group. This may break undo."),$.setGroup$$module$build$src$core$events$utils(c))}else isViewportChange$$module$build$src$core$events$predicates(b)&&b.scale&&b.oldScale&&b.scale>b.oldScale&&bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects(a)}}};
393
426
  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};
394
427
  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)}};
395
- getShortActionShortcut$$module$build$src$core$utils$shortcut_formatting=function(a){a=getActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting(a,shortModifierNames$$module$build$src$core$utils$shortcut_formatting);return a.length?a[0].join(APPLE$$module$build$src$core$utils$useragent?" ":" + "):""};getLongActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting=function(a){return getActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting(a,longModifierNames$$module$build$src$core$utils$shortcut_formatting)};
396
- getActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting=function(a,b){a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.getKeyCodesByShortcutName(a);if(a.length===0)return[];a=a.map(d=>d.split("+"));a.forEach(d=>d.sort((e,f)=>{e=modifierOrder$$module$build$src$core$utils$shortcut_formatting(e);f=modifierOrder$$module$build$src$core$utils$shortcut_formatting(f);return e-f}));a.sort((d,e)=>{d=d.includes("Meta")?1:0;return(e.includes("Meta")?1:0)-d});let c=a.filter(d=>
397
- d.includes("Meta")===APPLE$$module$build$src$core$utils$useragent);c=c.length===0?a:c;c.sort((d,e)=>d.length-e.length);return(c.some(d=>d.some(e=>"Meta"===e||"Alt"===e||"Control"===e))?[c[0]]:c).map(d=>d.map(e=>Number.isFinite(+e)?String.fromCharCode(+e):e).map(e=>{let f;return upperCaseFirst$$module$build$src$core$utils$shortcut_formatting((f=b[e])!=null?f:e)}))};upperCaseFirst$$module$build$src$core$utils$shortcut_formatting=function(a){return a.charAt(0).toUpperCase()+a.substring(1)};
428
+ getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting=function(a){a=getShortcutKeys$$module$build$src$core$utils$shortcut_formatting(a,shortModifierNames$$module$build$src$core$utils$shortcut_formatting);return a.length?a[0].join(APPLE$$module$build$src$core$utils$useragent?" ":" + "):""};getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting=function(a){return getShortcutKeys$$module$build$src$core$utils$shortcut_formatting(a,longModifierNames$$module$build$src$core$utils$shortcut_formatting)};
429
+ getKeyName$$module$build$src$core$utils$shortcut_formatting=function(a){if(a>=65&&a<=90)return String.fromCharCode(a);const b=keyNames$$module$build$src$core$utils$shortcut_formatting[a];if(b)return b;console.warn("Unknown key code: "+a);return String.fromCharCode(a)};
430
+ getShortcutKeys$$module$build$src$core$utils$shortcut_formatting=function(a,b){a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.getKeyCodesByShortcutName(a);if(a.length===0)return[];a=a.map(d=>d.split("+"));a.forEach(d=>d.sort((e,f)=>{e=modifierOrder$$module$build$src$core$utils$shortcut_formatting(e);f=modifierOrder$$module$build$src$core$utils$shortcut_formatting(f);return e-f}));a.sort((d,e)=>{d=d.includes("Meta")?1:0;return(e.includes("Meta")?1:0)-d});let c=a.filter(d=>d.includes("Meta")===
431
+ APPLE$$module$build$src$core$utils$useragent);c=c.length===0?a:c;c.sort((d,e)=>d.length-e.length);return(c.some(d=>d.some(e=>"Meta"===e||"Alt"===e||"Control"===e))?[c[0]]:c).map(d=>d.map(e=>Number.isFinite(+e)?getKeyName$$module$build$src$core$utils$shortcut_formatting(+e):e).map(e=>{let f;return upperCaseFirst$$module$build$src$core$utils$shortcut_formatting((f=b[e])!=null?f:e)}))};upperCaseFirst$$module$build$src$core$utils$shortcut_formatting=function(a){return a.charAt(0).toUpperCase()+a.substring(1)};
398
432
  modifierOrder$$module$build$src$core$utils$shortcut_formatting=function(a){a=modifierOrdering$$module$build$src$core$utils$shortcut_formatting.indexOf(a);return a===-1?Number.MAX_VALUE:a};
399
433
  showUnconstrainedMoveHint$$module$build$src$core$hints=function(a,b=!1){const c=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT.replace("%1",MAC$$module$build$src$core$utils$useragent||IPAD$$module$build$src$core$utils$useragent||IPHONE$$module$build$src$core$utils$useragent?$.Msg$$module$build$src$core$msg.COMMAND_KEY:$.Msg$$module$build$src$core$msg.CONTROL_KEY).replace("%2",$.Msg$$module$build$src$core$msg.ENTER_KEY);Toast$$module$build$src$core$toast.show(a,{message:c,id:unconstrainedMoveHintId$$module$build$src$core$hints,
400
434
  oncePerSession:!b})};showConstrainedMovementHint$$module$build$src$core$hints=function(a){const b=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT.replace("%1",$.Msg$$module$build$src$core$msg.ENTER_KEY);Toast$$module$build$src$core$toast.show(a,{message:b,id:constrainedMoveHintId$$module$build$src$core$hints,oncePerSession:!0})};
401
435
  clearMoveHints$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.hide(a,constrainedMoveHintId$$module$build$src$core$hints);Toast$$module$build$src$core$toast.hide(a,unconstrainedMoveHintId$$module$build$src$core$hints)};
402
- showHelpHint$$module$build$src$core$hints=function(a){var b=getShortActionShortcut$$module$build$src$core$utils$shortcut_formatting("list_shortcuts");b&&(b=$.Msg$$module$build$src$core$msg.HELP_PROMPT.replace("%1",b),Toast$$module$build$src$core$toast.show(a,{message:b,id:helpHintId$$module$build$src$core$hints}))};
403
- showBlockNavigationHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT,id:blockNavigationHintId$$module$build$src$core$hints})};showWorkspaceNavigationHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT,id:workspaceNavigationHintId$$module$build$src$core$hints})};
436
+ showHelpHint$$module$build$src$core$hints=function(a){var b=getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting("list_shortcuts");b&&(b=$.Msg$$module$build$src$core$msg.HELP_PROMPT.replace("%1",b),Toast$$module$build$src$core$toast.show(a,{message:b,id:helpHintId$$module$build$src$core$hints}))};showBlockNavigationHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT,id:blockNavigationHintId$$module$build$src$core$hints})};
437
+ showWorkspaceNavigationHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT,id:workspaceNavigationHintId$$module$build$src$core$hints})};
404
438
  isDraggable$$module$build$src$core$interfaces$i_draggable=function(a){return a&&typeof a.getRelativeToSurfaceXY==="function"&&typeof a.isMovable==="function"&&typeof a.startDrag==="function"&&typeof a.drag==="function"&&typeof a.endDrag==="function"&&typeof a.revertDrag==="function"};isDeletable$$module$build$src$core$interfaces$i_deletable=function(a){return a&&typeof a.isDeletable==="function"&&typeof a.dispose==="function"&&typeof a.setDeleteStyle==="function"};
405
- getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=function(a){if(a.isCollapsed())return[];const b=a.getIcons();for(const d of a.inputList){if(!d.isVisible())continue;b.push(...d.fieldRow);var c=d.connection;if(!c)continue;b.push(c);c=c.targetBlock();if(!c)continue;b.push(c);(c=c.lastConnectionInStack(!1))&&b.push(c)}a.nextConnection&&b.push(a.nextConnection);return b};
406
- navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=function(a,b,c){a=getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a);b=a.indexOf(b);if(b===-1)return null;c=b+c;return c>=0&&c<a.length?a[c]:null};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)};
407
- unregister$$module$build$src$core$icons$registry=function(a){unregister$$module$build$src$core$registry(Type$$module$build$src$core$registry.ICON,a)};
408
- isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item=function(a){return a&&typeof a.init==="function"&&typeof a.getDiv==="function"&&typeof a.getId==="function"&&typeof a.getParent==="function"&&typeof a.getLevel==="function"&&typeof a.isSelectable==="function"&&typeof a.isCollapsible==="function"&&typeof a.dispose==="function"&&typeof a.getClickTarget==="function"&&typeof a.setVisible_==="function"&&typeof a.getParentToolbox==="function"};
409
- isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item=function(a){return typeof a.getName==="function"&&typeof a.getContents==="function"&&typeof a.setSelected==="function"&&typeof a.onClick==="function"&&isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item(a)&&a.isSelectable()};
439
+ getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=function(a){if(a.isCollapsed())return[];const b=[];for(var c of a.getIcons()){b.push(c);let d;hasBubble$$module$build$src$core$interfaces$i_has_bubble(c)&&c.bubbleIsVisible()&&(d=c.getBubble())&&b.push(d)}for(const d of a.inputList){if(!d.isVisible())continue;b.push(...d.fieldRow);c=d.connection;if(!c)continue;b.push(c);c=c.targetBlock();if(!c)continue;b.push(c);(c=c.lastConnectionInStack(!1))&&
440
+ b.push(c)}a.nextConnection&&b.push(a.nextConnection);return b};navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=function(a,b,c){a=getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a);b=a.indexOf(b);if(b===-1)return null;c=b+c;return c>=0&&c<a.length?a[c]:null};
410
441
  isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item=function(a){return typeof a.getChildToolboxItems==="function"&&typeof a.isExpanded==="function"&&typeof a.toggleExpanded==="function"&&isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item(a)&&a.isCollapsible()};
411
442
  getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator=function(a){const b=a.options.toolboxPosition;return a.options.RTL&&b!==Position$$module$build$src$core$utils$toolbox.TOP&&b!==Position$$module$build$src$core$utils$toolbox.BOTTOM?b===Position$$module$build$src$core$utils$toolbox.LEFT?Position$$module$build$src$core$utils$toolbox.RIGHT:Position$$module$build$src$core$utils$toolbox.LEFT:b};
412
- hasContextMenu$$module$build$src$core$interfaces$i_contextmenu=function(a){return a&&typeof a.showContextMenu==="function"};isAutoHideable$$module$build$src$core$interfaces$i_autohideable=function(a){return a&&typeof a.autoHide==="function"};isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block=function(a){return typeof a.getProcedureModel==="function"&&typeof a.doProcedureUpdate==="function"&&typeof a.isProcedureDef==="function"};
443
+ hasContextMenu$$module$build$src$core$interfaces$i_contextmenu=function(a){return a&&typeof a.showContextMenu==="function"};isAutoHideable$$module$build$src$core$interfaces$i_autohideable=function(a){return a&&typeof a.autoHide==="function"};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)};
444
+ 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 typeof a.getProcedureModel==="function"&&typeof a.doProcedureUpdate==="function"&&typeof a.isProcedureDef==="function"};
413
445
  isObservable$$module$build$src$core$interfaces$i_observable=function(a){return a&&typeof a.startPublishing==="function"&&typeof a.stopPublishing==="function"};
414
446
  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=>
415
447
  !!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]};
@@ -451,64 +483,74 @@ setLastCopiedData$$module$build$src$core$clipboard=function(a){stashedCopyData$$
451
483
  setLastCopiedLocation$$module$build$src$core$clipboard=function(a){stashedCoordinates$$module$build$src$core$clipboard=a};
452
484
  paste$$module$build$src$core$clipboard=function(a,b,c){return a&&b?pasteFromData$$module$build$src$core$clipboard(a,b,c):stashedCopyData$$module$build$src$core$clipboard&&stashedWorkspace$$module$build$src$core$clipboard?pasteFromData$$module$build$src$core$clipboard(stashedCopyData$$module$build$src$core$clipboard,stashedWorkspace$$module$build$src$core$clipboard,stashedCoordinates$$module$build$src$core$clipboard):null};
453
485
  pasteFromData$$module$build$src$core$clipboard=function(a,b,c){let d;b=b.isMutator?b:(d=b.options.parentWorkspace)!=null?d:b;let e,f;return(f=(e=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.PASTER,a.paster,!1))==null?void 0:e.paste(a,b,c))!=null?f:null};isCopyable$$module$build$src$core$interfaces$i_copyable=function(a){return a&&typeof a.toCopyData==="function"};
454
- registerEscape$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.ESCAPE,preconditionFn(a){return!a.isReadOnly()},callback(a){a.hideChaff();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ESC]})};
486
+ registerEscape$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.ESCAPE,preconditionFn(a){return!a.isReadOnly()},callback(a){a.hideChaff();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ESC],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_ESCAPE})};
455
487
  registerDelete$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DELETE,preconditionFn(a,b){b=b.focusedNode;return!a.isReadOnly()&&b!=null&&isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&b.isDeletable()&&!a.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(a,b,c,d){b.preventDefault();a=d.focusedNode;a instanceof
456
- BlockSvg$$module$build$src$core$block_svg?a.checkAndDelete():isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable()&&($.setGroup$$module$build$src$core$events$utils(!0),a.dispose(),$.setGroup$$module$build$src$core$events$utils(!1));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DELETE,KeyCodes$$module$build$src$core$utils$keycodes.BACKSPACE]})};
488
+ BlockSvg$$module$build$src$core$block_svg?a.checkAndDelete():isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable()&&($.setGroup$$module$build$src$core$events$utils(!0),a.dispose(),$.setGroup$$module$build$src$core$events$utils(!1));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DELETE,KeyCodes$$module$build$src$core$utils$keycodes.BACKSPACE],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DELETE})};
457
489
  isCopyable$$module$build$src$core$shortcut_items=function(a){return isCopyable$$module$build$src$core$interfaces$i_copyable(a)&&isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&isDraggable$$module$build$src$core$interfaces$i_draggable(a)?a.isCopyable?a.isCopyable():a instanceof BlockSvg$$module$build$src$core$block_svg||a instanceof RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment?a.isOwnDeletable()&&a.isOwnMovable():a.isDeletable()&&a.isMovable():!1};
458
490
  isCuttable$$module$build$src$core$shortcut_items=function(a){return isCopyable$$module$build$src$core$shortcut_items(a)&&isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable()};
459
491
  registerCopy$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.C,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.COPY,preconditionFn(b,c){c=c.focusedNode;b=b.isFlyout?b.targetWorkspace:b;return!!c&&!!b&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
460
- isCopyable$$module$build$src$core$shortcut_items(c)},callback(b,c,d,e){c.preventDefault();c=e.focusedNode;if(!c||!isCopyable$$module$build$src$core$interfaces$i_copyable(c)||!isCopyable$$module$build$src$core$shortcut_items(c))return!1;b=b.isFlyout?b.targetWorkspace:b;if(!b)return!1;c.workspace.isFlyout||b.hideChaff();b=isDraggable$$module$build$src$core$interfaces$i_draggable(c)&&c.workspace==b?c.getRelativeToSurfaceXY():void 0;return!!copy$$module$build$src$core$clipboard(c,b)},keyCodes:[a]})};
492
+ isCopyable$$module$build$src$core$shortcut_items(c)},callback(b,c,d,e){c.preventDefault();c=e.focusedNode;if(!c||!isCopyable$$module$build$src$core$interfaces$i_copyable(c)||!isCopyable$$module$build$src$core$shortcut_items(c))return!1;b=b.isFlyout?b.targetWorkspace:b;if(!b)return!1;c.workspace.isFlyout||b.hideChaff();b=isDraggable$$module$build$src$core$interfaces$i_draggable(c)&&c.workspace==b?c.getRelativeToSurfaceXY():void 0;return!!copy$$module$build$src$core$clipboard(c,b)},keyCodes:[a],displayText:()=>
493
+ $.Msg$$module$build$src$core$msg.COPY_SHORTCUT})};
461
494
  registerCut$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.CUT,preconditionFn(b,c){c=c.focusedNode;return!!c&&!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()&&
462
495
  isCuttable$$module$build$src$core$shortcut_items(c)},callback(b,c,d,e){b=e.focusedNode;if(!b||!isCuttable$$module$build$src$core$shortcut_items(b)||!isCopyable$$module$build$src$core$interfaces$i_copyable(b))return!1;c=isDraggable$$module$build$src$core$interfaces$i_draggable(b)?b.getRelativeToSurfaceXY():void 0;c=copy$$module$build$src$core$clipboard(b,c);b instanceof BlockSvg$$module$build$src$core$block_svg?b.checkAndDelete():isDeletable$$module$build$src$core$interfaces$i_deletable(b)&&($.setGroup$$module$build$src$core$events$utils(!0),
463
- b.dispose(),$.setGroup$$module$build$src$core$events$utils(!1));return!!c},keyCodes:[a]})};
496
+ b.dispose(),$.setGroup$$module$build$src$core$events$utils(!1));return!!c},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.CUT_SHORTCUT})};
464
497
  registerPaste$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.V,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PASTE,preconditionFn(){var b=getLastCopiedWorkspace$$module$build$src$core$clipboard();if(!b||!b.rendered)return!1;
465
498
  b=b.isFlyout?b.targetWorkspace:b;return!!getLastCopiedData$$module$build$src$core$clipboard()&&!!b&&!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(b,c){b=getLastCopiedData$$module$build$src$core$clipboard();if(!b)return!1;var d=getLastCopiedWorkspace$$module$build$src$core$clipboard();if(!d)return!1;d=d.isFlyout?d.targetWorkspace:d;if(!d||d.isReadOnly())return!1;if(c instanceof PointerEvent)return c=screenToWsCoordinates$$module$build$src$core$utils$svg_math(d,
466
499
  new Coordinate$$module$build$src$core$utils$coordinate(c.clientX,c.clientY)),!!paste$$module$build$src$core$clipboard(b,d,c);c=getLastCopiedLocation$$module$build$src$core$clipboard();if(!c)return!!paste$$module$build$src$core$clipboard(b,d);const {left:e,top:f,width:g,height:h}=d.getMetricsManager().getViewMetrics(!0);if((new Rect$$module$build$src$core$utils$rect(f,f+h,e,e+g)).contains(c.x,c.y))return!!paste$$module$build$src$core$clipboard(b,d);c=new Coordinate$$module$build$src$core$utils$coordinate(e+
467
- g/2,f+h/2);return!!paste$$module$build$src$core$clipboard(b,d,c)},keyCodes:[a]})};
500
+ g/2,f+h/2);return!!paste$$module$build$src$core$clipboard(b,d,c)},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.PASTE_SHORTCUT})};
468
501
  registerUndo$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Z,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.UNDO,preconditionFn(b){return!b.isReadOnly()&&!b.isDragging()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},
469
- callback(b,c){b.hideChaff();b.undo(!1);c.preventDefault();return!0},keyCodes:[a]})};
502
+ callback(b,c){b.hideChaff();b.undo(!1);c.preventDefault();return!0},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.UNDO})};
470
503
  registerRedo$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Z,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD,KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]),b=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Y,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL]);
471
- ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.REDO,preconditionFn(c){return!c.isDragging()&&!c.isReadOnly()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(c,d){c.hideChaff();c.undo(!0);d.preventDefault();return!0},keyCodes:[a,b]})};
504
+ ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.REDO,preconditionFn(c){return!c.isDragging()&&!c.isReadOnly()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()},callback(c,d){c.hideChaff();c.undo(!0);d.preventDefault();return!0},keyCodes:[a,b],displayText:()=>$.Msg$$module$build$src$core$msg.REDO})};
472
505
  registerMovementShortcuts$$module$build$src$core$shortcut_items=function(){const a=d=>{const e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(isDraggable$$module$build$src$core$interfaces$i_draggable(e))return e;let f;return(f=d.getNavigator().getSourceBlockFromNode($.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()))!=null?f:void 0};var b=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.M,
473
506
  [KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);const c={name:names$$module$build$src$core$shortcut_items.START_MOVE,preconditionFn:d=>{d=a(d);return!!d&&KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.canMove(d)},callback:(d,e)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);(d=a(d))&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(d);return!!d&&KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.startMove(d,
474
- e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.M]};b=[c,Object.assign({},c,{name:names$$module$build$src$core$shortcut_items.START_MOVE_STACK,keyCodes:[b]}),{name:names$$module$build$src$core$shortcut_items.FINISH_MOVE,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.finishMove(e),keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],
475
- allowCollision:!0},{name:names$$module$build$src$core$shortcut_items.ABORT_MOVE,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.abortMove(e),keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ESC],allowCollision:!0},{name:names$$module$build$src$core$shortcut_items.MOVE_LEFT,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),
476
- callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.LEFT,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.LEFT,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0},{name:names$$module$build$src$core$shortcut_items.MOVE_RIGHT,
477
- preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.RIGHT,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.RIGHT,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],
478
- allowCollision:!0},{name:names$$module$build$src$core$shortcut_items.MOVE_UP,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.UP,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.UP,
479
- [KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0},{name:names$$module$build$src$core$shortcut_items.MOVE_DOWN,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DOWN,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.DOWN,
480
- [KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0}];for(const d of b)ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(d)};
507
+ e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.M],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_START_MOVE};b=[c,Object.assign({},c,{name:names$$module$build$src$core$shortcut_items.START_MOVE_STACK,keyCodes:[b],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_START_MOVE_STACK}),{name:names$$module$build$src$core$shortcut_items.FINISH_MOVE,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.finishMove(e),
508
+ keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FINISH_MOVE},{name:names$$module$build$src$core$shortcut_items.ABORT_MOVE,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.abortMove(e),keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ESC],
509
+ allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_ABORT_MOVE},{name:names$$module$build$src$core$shortcut_items.MOVE_LEFT,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.LEFT,
510
+ ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.LEFT,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_MOVE_LEFT},{name:names$$module$build$src$core$shortcut_items.MOVE_RIGHT,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT,
511
+ e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.RIGHT,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.RIGHT,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_MOVE_RIGHT},{name:names$$module$build$src$core$shortcut_items.MOVE_UP,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),
512
+ callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.UP,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.UP,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_MOVE_UP},
513
+ {name:names$$module$build$src$core$shortcut_items.MOVE_DOWN,preconditionFn:()=>KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving(),callback:(d,e)=>{e.preventDefault();return KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.move(Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN,e)},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DOWN,ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.DOWN,
514
+ [KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD])],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_MOVE_DOWN}];for(const d of b)ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(d)};
481
515
  registerShowContextMenu$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.ENTER,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.MENU,preconditionFn:b=>!b.isDragging(),callback:(b,c)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
482
- b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(hasContextMenu$$module$build$src$core$interfaces$i_contextmenu(b)){b.showContextMenu(c);let d;(d=getMenu$$module$build$src$core$contextmenu())==null||d.highlightNext();return!0}return!1},keyCodes:[a]})};
483
- registerArrowNavigation$$module$build$src$core$shortcut_items=function(){const a={right:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_RIGHT,preconditionFn:b=>!b.isDragging(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);let d,e;b=b.RTL?(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getOutNode():(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==
484
- null?void 0:e.getNavigator().getInNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.RIGHT],allowCollision:!0},left:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_LEFT,preconditionFn:b=>!b.isDragging(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);let d,e;b=b.RTL?(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==
485
- null?void 0:d.getNavigator().getInNode():(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:e.getNavigator().getOutNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.LEFT],allowCollision:!0},down:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_DOWN,preconditionFn:b=>!b.isDragging(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
486
- let d;b=(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getNextNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DOWN],allowCollision:!0},up:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_UP,preconditionFn:b=>!b.isDragging(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
487
- let d;b=(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getPreviousNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.UP],allowCollision:!0}};for(const b of Object.values(a))ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
488
- registerFocusWorkspace$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_WORKSPACE,preconditionFn:a=>!a.isDragging(),callback:a=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(resolveWorkspace$$module$build$src$core$shortcut_items(a));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.W]})};
516
+ b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(hasContextMenu$$module$build$src$core$interfaces$i_contextmenu(b)){b.showContextMenu(c);let d;(d=getMenu$$module$build$src$core$contextmenu())==null||d.highlightNext();return!0}return!1},keyCodes:[a],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_SHOW_CONTEXT_MENU})};
517
+ registerArrowNavigation$$module$build$src$core$shortcut_items=function(){const a={right:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_RIGHT,preconditionFn:b=>!b.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);let d,e;b=b.RTL?(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==
518
+ null?void 0:d.getNavigator().getOutNode():(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:e.getNavigator().getInNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.RIGHT],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_RIGHT},left:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_LEFT,preconditionFn:b=>
519
+ !b.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);let d,e;b=b.RTL?(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getInNode():(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:e.getNavigator().getOutNode();
520
+ if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.LEFT],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_LEFT},down:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_DOWN,preconditionFn:b=>!b.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
521
+ let d;b=(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getNextNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.DOWN],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_DOWN},up:{name:names$$module$build$src$core$shortcut_items.NAVIGATE_UP,preconditionFn:b=>!b.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&
522
+ !isVisible$$module$build$src$core$widgetdiv(),callback:(b,c)=>{c.preventDefault();keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);let d;b=(d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree())==null?void 0:d.getNavigator().getPreviousNode();if(!b)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.UP],allowCollision:!0,displayText:()=>
523
+ $.Msg$$module$build$src$core$msg.SHORTCUTS_NAVIGATE_UP}};for(const b of Object.values(a))ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
524
+ registerFocusWorkspace$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_WORKSPACE,preconditionFn:a=>!a.isDragging(),callback:a=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(resolveWorkspace$$module$build$src$core$shortcut_items(a));return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.W],
525
+ displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FOCUS_WORKSPACE})};
489
526
  registerFocusToolbox$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.FOCUS_TOOLBOX,preconditionFn:a=>!a.isDragging(),callback:a=>{const b=a.getToolbox();if(b)keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0),$.getFocusManager$$module$build$src$core$focus_manager().focusTree(b);else{a=a.getFlyout();if(!a)return!1;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
490
- $.getFocusManager$$module$build$src$core$focus_manager().focusTree(a.getWorkspace())}return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.T]})};
527
+ $.getFocusManager$$module$build$src$core$focus_manager().focusTree(a.getWorkspace())}return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.T],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_FOCUS_TOOLBOX})};
491
528
  registerWorkspaceOverview$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.INFORMATION,preconditionFn:(a,b)=>b.focusedNode===a,callback:a=>{var b=resolveWorkspace$$module$build$src$core$shortcut_items(a);a=b.getTopBlocks().length;b=b.getTopComments().length;let c;c=a===0?"WORKSPACE_CONTENTS_BLOCKS_ZERO":a===1?"WORKSPACE_CONTENTS_BLOCKS_ONE":"WORKSPACE_CONTENTS_BLOCKS_MANY";
492
- let d="";b>0&&(d=$.Msg$$module$build$src$core$msg[b===1?"WORKSPACE_CONTENTS_COMMENTS_ONE":"WORKSPACE_CONTENTS_COMMENTS_MANY"].replace("%1",String(b)));a=$.Msg$$module$build$src$core$msg[c].replace("%1",String(a)).replace("%2",d);announceDynamicAriaState$$module$build$src$core$utils$aria(a);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.I]})};
529
+ let d="";b>0&&(d=$.Msg$$module$build$src$core$msg[b===1?"WORKSPACE_CONTENTS_COMMENTS_ONE":"WORKSPACE_CONTENTS_COMMENTS_MANY"].replace("%1",String(b)));a=$.Msg$$module$build$src$core$msg[c].replace("%1",String(a)).replace("%2",d);announceDynamicAriaState$$module$build$src$core$utils$aria(a);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.I],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_INFORMATION})};
493
530
  registerDisconnectBlock$$module$build$src$core$shortcut_items=function(){const a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.X,[KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DISCONNECT,preconditionFn:b=>!b.isDragging()&&!b.isReadOnly(),callback:(b,c)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
494
- b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;c=!(c instanceof KeyboardEvent&&c.shiftKey);$.setGroup$$module$build$src$core$events$utils(!0);b.unplug(c);$.setGroup$$module$build$src$core$events$utils(!1);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.X,a]})};
495
- registerStackNavigation$$module$build$src$core$shortcut_items=function(){const a=(c,d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())=>{const e=c.getNavigator();for(let f=d;f&&f!==c;f=e.getParent(f))d=f;return isSelectable$$module$build$src$core$interfaces$i_selectable(d)?d:null},b={name:names$$module$build$src$core$shortcut_items.PREVIOUS_STACK,preconditionFn:c=>!c.isDragging()&&!!a(c),callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
496
- const d=a(c);if(!d)return!1;c=a(c,c.getNavigator().navigateStacks(d,-1));if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.B]};ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.NEXT_STACK,preconditionFn:c=>!c.isDragging()&&!!a(c),callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
497
- const d=a(c);if(!d)return!1;c=c.getNavigator().navigateStacks(d,1);if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.N]});ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
498
- registerPerformAction$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PERFORM_ACTION,preconditionFn:a=>!a.isDragging(),callback:(a,b)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);if((a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())&&"performAction"in a){b.preventDefault();let c;(c=a.performAction)==
499
- null||c.call(a);return!0}return!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],allowCollision:!0})};
531
+ b=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();if(!(b instanceof BlockSvg$$module$build$src$core$block_svg))return!1;c=!(c instanceof KeyboardEvent&&c.shiftKey);$.setGroup$$module$build$src$core$events$utils(!0);b.unplug(c);$.setGroup$$module$build$src$core$events$utils(!1);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.X,a],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DISCONNECT})};
532
+ registerStackNavigation$$module$build$src$core$shortcut_items=function(){const a=(c,d=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())=>{const e=c.getNavigator();for(let f=d;f&&f!==c;f=e.getParent(f))d=f;return isSelectable$$module$build$src$core$interfaces$i_selectable(d)?d:null},b={name:names$$module$build$src$core$shortcut_items.PREVIOUS_STACK,preconditionFn:c=>!c.isDragging()&&!!a(c)&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),
533
+ callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);const d=a(c);if(!d)return!1;c=a(c,c.getNavigator().navigateStacks(d,-1));if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.B],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PREVIOUS_STACK};ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.NEXT_STACK,
534
+ preconditionFn:c=>!c.isDragging()&&!!a(c)&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);const d=a(c);if(!d)return!1;c=c.getNavigator().navigateStacks(d,1);if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.N],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NEXT_STACK});
535
+ ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
536
+ registerPerformAction$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PERFORM_ACTION,preconditionFn:a=>!a.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken(),callback:(a,b)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
537
+ if((a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())&&"performAction"in a){b.preventDefault();let c;(c=a.performAction)==null||c.call(a,b);return!0}return!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PERFORM_ACTION})};
538
+ registerDuplicate$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DUPLICATE,preconditionFn:(a,b)=>{({focusedNode:b}=b);return!a.isDragging()&&!a.isReadOnly()&&(b instanceof BlockSvg$$module$build$src$core$block_svg?b.isDuplicatable():!0)},callback:(a,b,c,d)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);b=isCopyable$$module$build$src$core$interfaces$i_copyable(d.focusedNode)&&
539
+ d.focusedNode;return b?(b=b.toCopyData())?!!paste$$module$build$src$core$clipboard(b,a):!1:!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.D],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_DUPLICATE})};
540
+ registerCleanup$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.CLEANUP,preconditionFn:a=>!a.isDragging()&&!a.isReadOnly(),callback:a=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);a.cleanUp();return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.C],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_CLEANUP})};
500
541
  registerDefaultShortcuts$$module$build$src$core$shortcut_items=function(){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()};
501
542
  registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items=function(){registerShowContextMenu$$module$build$src$core$shortcut_items();registerMovementShortcuts$$module$build$src$core$shortcut_items();registerFocusWorkspace$$module$build$src$core$shortcut_items();registerFocusToolbox$$module$build$src$core$shortcut_items();registerArrowNavigation$$module$build$src$core$shortcut_items();registerDisconnectBlock$$module$build$src$core$shortcut_items();registerStackNavigation$$module$build$src$core$shortcut_items();
502
- registerPerformAction$$module$build$src$core$shortcut_items()};registerScreenReaderShortcuts$$module$build$src$core$shortcut_items=function(){registerWorkspaceOverview$$module$build$src$core$shortcut_items()};saveProcedure$$module$build$src$core$serialization$procedures=function(a){const b=a.saveState();if(!a.getParameters().length)return b;b.parameters=a.getParameters().map(c=>c.saveState());return b};
503
- loadProcedure$$module$build$src$core$serialization$procedures=function(a,b,c,d){a=a.loadState(c,d);if(!c.parameters)return a;for(const [e,f]of c.parameters.entries())a.insertParameter(b.loadState(f,d),e);return a};save$$module$build$src$core$serialization$workspaces=function(a){const b=Object.create(null),c=getAllItems$$module$build$src$core$registry(Type$$module$build$src$core$registry.SERIALIZER,!0);for(const d in c){let e;const f=(e=c[d])==null?void 0:e.save(a);f&&(b[d]=f)}return b};
543
+ registerPerformAction$$module$build$src$core$shortcut_items();registerDuplicate$$module$build$src$core$shortcut_items();registerCleanup$$module$build$src$core$shortcut_items()};registerScreenReaderShortcuts$$module$build$src$core$shortcut_items=function(){registerWorkspaceOverview$$module$build$src$core$shortcut_items()};
544
+ saveProcedure$$module$build$src$core$serialization$procedures=function(a){const b=a.saveState();if(!a.getParameters().length)return b;b.parameters=a.getParameters().map(c=>c.saveState());return b};loadProcedure$$module$build$src$core$serialization$procedures=function(a,b,c,d){a=a.loadState(c,d);if(!c.parameters)return a;for(const [e,f]of c.parameters.entries())a.insertParameter(b.loadState(f,d),e);return a};
545
+ save$$module$build$src$core$serialization$workspaces=function(a){const b=Object.create(null),c=getAllItems$$module$build$src$core$registry(Type$$module$build$src$core$registry.SERIALIZER,!0);for(const d in c){let e;const f=(e=c[d])==null?void 0:e.save(a);f&&(b[d]=f)}return b};
504
546
  load$$module$build$src$core$serialization$workspaces=function(a,b,{recordUndo:c=!1}={}){var d=getAllItems$$module$build$src$core$registry(Type$$module$build$src$core$registry.SERIALIZER,!0);if(d){d=Object.entries(d).sort((f,g)=>g[1].priority-f[1].priority);var e=getRecordUndo$$module$build$src$core$events$utils();$.setRecordUndo$$module$build$src$core$events$utils(c);(c=$.getGroup$$module$build$src$core$events$utils())||$.setGroup$$module$build$src$core$events$utils(!0);startTextWidthCache$$module$build$src$core$utils$dom();
505
547
  b instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&b.setResizesEnabled(!1);for(const [,f]of d.reverse()){let g;(g=f)==null||g.clear(b)}for(const [f,g]of d.reverse())if(a[f]){let h;(h=g)==null||h.load(a[f],b)}b instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&b.setResizesEnabled(!0);stopTextWidthCache$$module$build$src$core$utils$dom();fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.FINISHED_LOADING))(b));
506
548
  $.setGroup$$module$build$src$core$events$utils(c);$.setRecordUndo$$module$build$src$core$events$utils(e)}};
507
- inject$$module$build$src$core$inject=function(a,b){let c=null;c=typeof a==="string"?document.getElementById(a)||document.querySelector(a):a;var d;if(!document.contains(c)&&document!==((d=c)==null?void 0:d.ownerDocument))throw Error("Error: container is not in current document");a=new Options$$module$build$src$core$options(b||{});d=document.createElement("div");addClass$$module$build$src$core$utils$dom(d,"injectionDiv");(b==null?0:b.rtl)&&addClass$$module$build$src$core$utils$dom(d,"blocklyRTL");c.appendChild(d);
508
- b=createDom$$module$build$src$core$inject(d,a);const e=createMainWorkspace$$module$build$src$core$inject(d,b,a);init$$module$build$src$core$inject(e);setMainWorkspace$$module$build$src$core$common(e);svgResize$$module$build$src$core$common(e);d.addEventListener("focusin",function(){setMainWorkspace$$module$build$src$core$common(e)});conditionalBind$$module$build$src$core$browser_events(d,"keydown",null,globalShortcutHandler$$module$build$src$core$common);initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria(d);
509
- return e};
510
- createDom$$module$build$src$core$inject=function(a,b){a.setAttribute("dir","LTR");inject$$module$build$src$core$css(a,b.hasCss,b.pathToMedia);const c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.SVG,{xmlns:SVG_NS$$module$build$src$core$utils$dom,"xmlns:html":HTML_NS$$module$build$src$core$utils$dom,"xmlns:xlink":XLINK_NS$$module$build$src$core$utils$dom,version:"1.1","class":"blocklySvg"},a),d=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.DEFS,{},
511
- c),e=String(Math.random()).substring(2);b.gridPattern=Grid$$module$build$src$core$grid.createDom(e,b.gridOptions,d,a);return c};
549
+ inject$$module$build$src$core$inject=function(a,b){let c=null;c=typeof a==="string"?document.getElementById(a)||document.querySelector(a):a;var d;if(!document.contains(c)&&document!==((d=c)==null?void 0:d.ownerDocument))throw Error("Error: container is not in current document");a=new Options$$module$build$src$core$options(b||{});d=document.createElement("div");addClass$$module$build$src$core$utils$dom(d,"injectionDiv");(b==null?0:b.rtl)&&addClass$$module$build$src$core$utils$dom(d,"blocklyRTL");setRole$$module$build$src$core$utils$aria(d,
550
+ Role$$module$build$src$core$utils$aria.APPLICATION);c.appendChild(d);b=createDom$$module$build$src$core$inject(d,a);const e=createMainWorkspace$$module$build$src$core$inject(d,b,a);init$$module$build$src$core$inject(e);setMainWorkspace$$module$build$src$core$common(e);svgResize$$module$build$src$core$common(e);d.addEventListener("focusin",function(){setMainWorkspace$$module$build$src$core$common(e)});conditionalBind$$module$build$src$core$browser_events(d,"keydown",null,globalShortcutHandler$$module$build$src$core$common);
551
+ initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria(d);return e};
552
+ createDom$$module$build$src$core$inject=function(a,b){a.setAttribute("dir","LTR");inject$$module$build$src$core$css(a,b.hasCss,b.pathToMedia);const c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.SVG,{xmlns:SVG_NS$$module$build$src$core$utils$dom,"xmlns:html":HTML_NS$$module$build$src$core$utils$dom,"xmlns:xlink":XLINK_NS$$module$build$src$core$utils$dom,version:"1.1","class":"blocklySvg"},a),d=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.DEFS,
553
+ {},c),e=String(Math.random()).substring(2);b.gridPattern=Grid$$module$build$src$core$grid.createDom(e,b.gridOptions,d,a);return c};
512
554
  createMainWorkspace$$module$build$src$core$inject=function(a,b,c){c.parentWorkspace=null;c=new WorkspaceSvg$$module$build$src$core$workspace_svg(c);const d=c.options;c.scale=d.zoomOptions.startScale;b.appendChild(c.createDom("blocklyMainBackground",a));var e=c.getRenderer().getClassName();e&&addClass$$module$build$src$core$utils$dom(a,e);(e=c.getTheme().getClassName())&&addClass$$module$build$src$core$utils$dom(a,e);!d.hasCategories&&d.languageTree&&(a=c.addFlyout(Svg$$module$build$src$core$utils$svg.SVG),
513
555
  insertAfter$$module$build$src$core$utils$dom(a,b));d.hasTrashcan&&c.addTrashcan();d.zoomOptions&&d.zoomOptions.controls&&c.addZoomControls();c.getThemeManager().subscribe(b,"workspaceBackgroundColour","background-color");c.translate(0,0);c.addChangeListener(bumpIntoBoundsHandler$$module$build$src$core$bump_objects(c));svgResize$$module$build$src$core$common(c);createDom$$module$build$src$core$widgetdiv();createDom$$module$build$src$core$dropdowndiv();createDom$$module$build$src$core$tooltip();return c};
514
556
  init$$module$build$src$core$inject=function(a){const b=a.options;var c=a.getParentSvg();conditionalBind$$module$build$src$core$browser_events(c.parentNode,"contextmenu",null,function(d){isTargetInput$$module$build$src$core$browser_events(d)||d.preventDefault()});c=conditionalBind$$module$build$src$core$browser_events(window,"resize",null,function(){hide$$module$build$src$core$tooltip();a.hideComponents(!0);repositionForWindowResize$$module$build$src$core$dropdowndiv();repositionForWindowResize$$module$build$src$core$widgetdiv();
@@ -582,11 +624,11 @@ $jscomp.generator.Engine_.prototype.yieldAllStep_=function(a,b,c){try{var d=a.ca
582
624
  $jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var a=this.program_(this.context_);if(a)return this.context_.stop_(),{value:a.value,done:!1}}catch(b){this.context_.yieldResult=void 0,this.context_.throw_(b)}this.context_.stop_();if(this.context_.abruptCompletion_){a=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(a.isException)throw a.exception;return{value:a.return,done:!0}}return{value:void 0,done:!0}};
583
625
  $jscomp.generator.Generator_=function(a){this.next=function(b){return a.next_(b)};this.throw=function(b){return a.throw_(b)};this.return=function(b){return a.return_(b)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(a,b){b=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b));$jscomp.setPrototypeOf&&a.prototype&&$jscomp.setPrototypeOf(b,a.prototype);return b};
584
626
  $jscomp.asyncExecutePromiseGenerator=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(a){return $jscomp.asyncExecutePromiseGenerator(a())};$jscomp.asyncExecutePromiseGeneratorProgram=function(a){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(a)))};
585
- $jscomp.polyfill("globalThis",function(a){return a||$jscomp.global},"es_2020","es3");$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}},"es7","es3");
586
- $jscomp.checkEs6ConformanceViaProxy=function(){try{var a={},b=Object.create(new $jscomp.global.Proxy(a,{get:function(c,d,e){return c==a&&d=="q"&&e==b}}));return b.q===!0}catch(c){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};
587
- $jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.MapEntry=function(){};$jscomp.polyfill("Set.prototype.difference",function(a){return a?a:function(b){$jscomp.checkIsSetInstance(this);$jscomp.checkIsSetLike(b);var c=$jscomp.getSmallerAndLargerSets(this,b);b=new Set(this);var d=c.smallerSetIterator;c=c.largerSet;for(var e=d.next();!e.done;)c.has(e.value)&&b.delete(e.value),e=d.next();return b}},"es_next","es6");
627
+ $jscomp.polyfill("globalThis",function(a){return a||$jscomp.global},"es_2020","es3");$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}},"es7","es3");$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
628
+ $jscomp.polyfill("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)$jscomp.owns(b,d)&&c.push(b[d]);return c}},"es8","es3");$jscomp.checkEs6ConformanceViaProxy=function(){try{var a={},b=Object.create(new $jscomp.global.Proxy(a,{get:function(c,d,e){return c==a&&d=="q"&&e==b}}));return b.q===!0}catch(c){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();
629
+ $jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};$jscomp.MapEntry=function(){};$jscomp.polyfill("Set.prototype.difference",function(a){return a?a:function(b){$jscomp.checkIsSetInstance(this);$jscomp.checkIsSetLike(b);var c=$jscomp.getSmallerAndLargerSets(this,b);b=new Set(this);var d=c.smallerSetIterator;c=c.largerSet;for(var e=d.next();!e.done;)c.has(e.value)&&b.delete(e.value),e=d.next();return b}},"es_next","es6");
588
630
  $jscomp.checkIsSetLike=function(a){if(typeof a!=="object"||a===null||typeof a.size!=="number"||a.size<0||typeof a.keys!=="function"||typeof a.has!=="function")throw new TypeError("Argument must be set-like");};$jscomp.checkIsValidIterator=function(a){if(typeof a!=="object"||a===null||typeof a.next!=="function")throw new TypeError("Invalid iterator.");return a};
589
- $jscomp.getSmallerAndLargerSets=function(a,b){return a.size<=b.size?{smallerSetIterator:a.keys(),largerSet:b}:{smallerSetIterator:$jscomp.checkIsValidIterator(b.keys()),largerSet:a}};$jscomp.checkIsSetInstance=function(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");};$jscomp.polyfill("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)$jscomp.owns(b,d)&&c.push(b[d]);return c}},"es8","es3");
631
+ $jscomp.getSmallerAndLargerSets=function(a,b){return a.size<=b.size?{smallerSetIterator:a.keys(),largerSet:b}:{smallerSetIterator:$jscomp.checkIsValidIterator(b.keys()),largerSet:a}};$jscomp.checkIsSetInstance=function(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");};
590
632
  $jscomp.iteratorFromArray=function(a,b){if($jscomp.ASSUME_ES6)return a[Symbol.iterator]();a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.values",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(b,c){return c})}},"es8","es3");
591
633
  $jscomp.polyfill("Array.prototype.flatMap",function(a){return a?a:function(b,c){var d=[];Array.prototype.forEach.call(this,function(e,f){e=b.call(c,e,f,this);Array.isArray(e)?d.push.apply(d,e):d.push(e)});return d}},"es9","es5");$jscomp.polyfill("Array.prototype.flat",function(a){return a?a:function(b){b=b===void 0?1:b;var c=[];Array.prototype.forEach.call(this,function(d){Array.isArray(d)&&b>0?(d=Array.prototype.flat.call(d,b-1),c.push.apply(c,d)):c.push(d)});return c}},"es9","es5");
592
634
  $jscomp.polyfill("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)$jscomp.owns(b,d)&&c.push([d,b[d]]);return c}},"es8","es3");var typeMap$$module$build$src$core$registry=Object.create(null),TEST_ONLY$$module$build$src$core$registry={typeMap:typeMap$$module$build$src$core$registry},nameMap$$module$build$src$core$registry=Object.create(null),DEFAULT$$module$build$src$core$registry="default",Type$$module$build$src$core$registry=class{constructor(a){this.name=a}toString(){return this.name}};
@@ -616,7 +658,17 @@ module$build$src$core$events$predicates.isThemeChange=isThemeChange$$module$buil
616
658
  module$build$src$core$events$predicates.isVarRename=isVarRename$$module$build$src$core$events$predicates;module$build$src$core$events$predicates.isViewportChange=isViewportChange$$module$build$src$core$events$predicates;var group$$module$build$src$core$events$utils="",recordUndo$$module$build$src$core$events$utils=!0,disabled$$module$build$src$core$events$utils=0,ORPHANED_BLOCK_DISABLED_REASON$$module$build$src$core$events$utils="ORPHANED_BLOCK",FIRE_QUEUE$$module$build$src$core$events$utils=[],TEST_ONLY$$module$build$src$core$events$utils={FIRE_QUEUE:FIRE_QUEUE$$module$build$src$core$events$utils,enqueueEvent:enqueueEvent$$module$build$src$core$events$utils,fireNow:fireNow$$module$build$src$core$events$utils,fireInternal:fireInternal$$module$build$src$core$events$utils,
617
659
  setGroupInternal:setGroupInternal$$module$build$src$core$events$utils},module$build$src$core$events$utils={TEST_ONLY:TEST_ONLY$$module$build$src$core$events$utils};module$build$src$core$events$utils.clearPendingUndo=clearPendingUndo$$module$build$src$core$events$utils;module$build$src$core$events$utils.disable=$.disable$$module$build$src$core$events$utils;module$build$src$core$events$utils.disableOrphans=disableOrphans$$module$build$src$core$events$utils;
618
660
  module$build$src$core$events$utils.enable=$.enable$$module$build$src$core$events$utils;module$build$src$core$events$utils.filter=filter$$module$build$src$core$events$utils;module$build$src$core$events$utils.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$utils.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$utils.get=get$$module$build$src$core$events$utils;module$build$src$core$events$utils.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils;
619
- module$build$src$core$events$utils.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;module$build$src$core$events$utils.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$utils.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.setRecordUndo=$.setRecordUndo$$module$build$src$core$events$utils;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={}));
661
+ module$build$src$core$events$utils.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;module$build$src$core$events$utils.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$utils.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$utils.setRecordUndo=$.setRecordUndo$$module$build$src$core$events$utils;var ARIA_PREFIX$$module$build$src$core$utils$aria="aria-",ROLE_ATTRIBUTE$$module$build$src$core$utils$aria="role",LiveRegionAssertiveness$$module$build$src$core$utils$aria;(function(a){a.ASSERTIVE="assertive";a.OFF="off";a.POLITE="polite"})(LiveRegionAssertiveness$$module$build$src$core$utils$aria||(LiveRegionAssertiveness$$module$build$src$core$utils$aria={}));var Role$$module$build$src$core$utils$aria;
662
+ (function(a){a.APPLICATION="application";a.BUTTON="button";a.CHECKBOX="checkbox";a.DIALOG="dialog";a.FIGURE="figure";a.GENERIC="generic";a.GRID="grid";a.GRIDCELL="gridcell";a.GROUP="group";a.LIST="list";a.LISTBOX="listbox";a.LISTITEM="listitem";a.MENU="menu";a.MENUITEM="menuitem";a.OPTION="option";a.PRESENTATION="presentation";a.REGION="region";a.ROW="row";a.SEPARATOR="separator";a.STATUS="status";a.TEXTBOX="textbox";a.TREE="tree";a.TREEITEM="treeitem"})(Role$$module$build$src$core$utils$aria||(Role$$module$build$src$core$utils$aria=
663
+ {}));var DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria=Role$$module$build$src$core$utils$aria.STATUS,State$$module$build$src$core$utils$aria;
664
+ (function(a){a.ACTIVEDESCENDANT="activedescendant";a.ATOMIC="atomic";a.CHECKED="checked";a.CONTROLS="controls";a.DISABLED="disabled";a.EXPANDED="expanded";a.HASPOPUP="haspopup";a.HIDDEN="hidden";a.INVALID="invalid";a.LABEL="label";a.LABELLEDBY="labelledby";a.LEVEL="level";a.LIVE="live";a.ROLEDESCRIPTION="roledescription";a.SELECTED="selected";a.VALUEMAX="valuemax";a.VALUEMIN="valuemin"})(State$$module$build$src$core$utils$aria||(State$$module$build$src$core$utils$aria={}));var Verbosity$$module$build$src$core$utils$aria;
665
+ (function(a){a[a.TERSE=0]="TERSE";a[a.STANDARD=1]="STANDARD";a[a.LOQUACIOUS=2]="LOQUACIOUS"})(Verbosity$$module$build$src$core$utils$aria||(Verbosity$$module$build$src$core$utils$aria={}));var liveRegionElement$$module$build$src$core$utils$aria=null,ariaAnnounceTimeout$$module$build$src$core$utils$aria,addBreakingSpace$$module$build$src$core$utils$aria=!1,module$build$src$core$utils$aria={};module$build$src$core$utils$aria.LiveRegionAssertiveness=LiveRegionAssertiveness$$module$build$src$core$utils$aria;
666
+ module$build$src$core$utils$aria.Role=Role$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.State=State$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.Verbosity=Verbosity$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.announceDynamicAriaState=announceDynamicAriaState$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.clearState=clearState$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.getRole=getRole$$module$build$src$core$utils$aria;
667
+ module$build$src$core$utils$aria.getState=getState$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.initializeGlobalAriaLiveRegion=initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.removeRole=removeRole$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.setRole=setRole$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.setState=setState$$module$build$src$core$utils$aria;var Svg$$module$build$src$core$utils$svg=class{constructor(a){this.tagName=a}toString(){return this.tagName}};Svg$$module$build$src$core$utils$svg.ANIMATE=new Svg$$module$build$src$core$utils$svg("animate");Svg$$module$build$src$core$utils$svg.CIRCLE=new Svg$$module$build$src$core$utils$svg("circle");Svg$$module$build$src$core$utils$svg.CLIPPATH=new Svg$$module$build$src$core$utils$svg("clipPath");Svg$$module$build$src$core$utils$svg.DEFS=new Svg$$module$build$src$core$utils$svg("defs");
668
+ Svg$$module$build$src$core$utils$svg.FECOMPOSITE=new Svg$$module$build$src$core$utils$svg("feComposite");Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER=new Svg$$module$build$src$core$utils$svg("feComponentTransfer");Svg$$module$build$src$core$utils$svg.FEFLOOD=new Svg$$module$build$src$core$utils$svg("feFlood");Svg$$module$build$src$core$utils$svg.FEFUNCA=new Svg$$module$build$src$core$utils$svg("feFuncA");Svg$$module$build$src$core$utils$svg.FEGAUSSIANBLUR=new Svg$$module$build$src$core$utils$svg("feGaussianBlur");
669
+ Svg$$module$build$src$core$utils$svg.FEPOINTLIGHT=new Svg$$module$build$src$core$utils$svg("fePointLight");Svg$$module$build$src$core$utils$svg.FESPECULARLIGHTING=new Svg$$module$build$src$core$utils$svg("feSpecularLighting");Svg$$module$build$src$core$utils$svg.FILTER=new Svg$$module$build$src$core$utils$svg("filter");Svg$$module$build$src$core$utils$svg.FOREIGNOBJECT=new Svg$$module$build$src$core$utils$svg("foreignObject");Svg$$module$build$src$core$utils$svg.G=new Svg$$module$build$src$core$utils$svg("g");
670
+ Svg$$module$build$src$core$utils$svg.IMAGE=new Svg$$module$build$src$core$utils$svg("image");Svg$$module$build$src$core$utils$svg.LINE=new Svg$$module$build$src$core$utils$svg("line");Svg$$module$build$src$core$utils$svg.PATH=new Svg$$module$build$src$core$utils$svg("path");Svg$$module$build$src$core$utils$svg.PATTERN=new Svg$$module$build$src$core$utils$svg("pattern");Svg$$module$build$src$core$utils$svg.POLYGON=new Svg$$module$build$src$core$utils$svg("polygon");
671
+ Svg$$module$build$src$core$utils$svg.RECT=new Svg$$module$build$src$core$utils$svg("rect");Svg$$module$build$src$core$utils$svg.SVG=new Svg$$module$build$src$core$utils$svg("svg");Svg$$module$build$src$core$utils$svg.TEXT=new Svg$$module$build$src$core$utils$svg("text");Svg$$module$build$src$core$utils$svg.TSPAN=new Svg$$module$build$src$core$utils$svg("tspan");var module$build$src$core$utils$svg={};module$build$src$core$utils$svg.Svg=Svg$$module$build$src$core$utils$svg;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={}));
620
672
  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;
621
673
  module$build$src$core$utils$dom.addClass=addClass$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.createSvgElement=createSvgElement$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.getFastTextWidth=getFastTextWidth$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.getFastTextWidthWithSizeString=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.getTextWidth=getTextWidth$$module$build$src$core$utils$dom;
622
674
  module$build$src$core$utils$dom.hasClass=hasClass$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.insertAfter=insertAfter$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.measureFontMetrics=measureFontMetrics$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.removeClass=removeClass$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.removeClasses=removeClasses$$module$build$src$core$utils$dom;module$build$src$core$utils$dom.removeNode=removeNode$$module$build$src$core$utils$dom;
@@ -624,21 +676,21 @@ module$build$src$core$utils$dom.setCssTransform=setCssTransform$$module$build$sr
624
676
  b=c.querySelector(this.ACTIVE_FOCUS_NODE_CSS_SELECTOR);if(b instanceof HTMLElement||b instanceof SVGElement)if(b=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(b,a))return b;c=c.querySelector(this.PASSIVE_FOCUS_NODE_CSS_SELECTOR);if(c instanceof HTMLElement||c instanceof SVGElement)if(a=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(c,a))return a;return null}static findFocusableNodeFor(a,b){if(!a.id||
625
677
  a.id==="null"||b.getNestedTrees().map(e=>FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(a,e)).findIndex(e=>!!e)!==-1)return null;var c=b.getRootFocusableNode();if(c.canBeFocused()&&a===c.getFocusableElement())return c;var d;if(c=(d=b.lookUpFocusableNode(a.id))!=null?d:null)return c;d=a.parentElement;return!c&&d?FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(d,b):null}};
626
678
  FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.ACTIVE_CLASS_NAME="blocklyActiveFocus";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}`;
627
- 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}`;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 TreeRegistration$$module$build$src$core$focus_manager=class{constructor(a,b){this.tree=a;this.rootShouldBeAutoTabbable=b}},FocusManager$$module$build$src$core$focus_manager=class{constructor(a){this.previouslyFocusedNode=this.focusedNode=null;this.registeredTrees=[];this.isUpdatingFocusedNode=this.recentlyLostAllFocus=this.lockFocusStateChanges=this.currentlyHoldsEphemeralFocus=!1;const b=c=>{if(!this.isUpdatingFocusedNode){this.recentlyLostAllFocus=!c;var d=null;if(c instanceof HTMLElement||
628
- c instanceof SVGElement)for(var e of this.registeredTrees)if(d=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(c,e.tree))break;if(d&&d.canBeFocused()){c=d.getFocusableTree();let f;e=(f=this.focusedNode)==null?void 0:f.getFocusableTree();d===c.getRootFocusableNode()&&c!==e?this.focusTree(c):this.focusNode(d)}else this.defocusCurrentFocusedNode()}};a("focusin",c=>{c instanceof FocusEvent&&b(document.activeElement)});a("focusout",c=>{c instanceof FocusEvent&&
629
- b(c.relatedTarget)})}registerTree(a,b=!1){this.ensureManagerIsUnlocked();if(this.isRegistered(a))throw Error(`Attempted to re-register already registered tree: ${a}.`);this.registeredTrees.push(new TreeRegistration$$module$build$src$core$focus_manager(a,b));const c=a.getRootFocusableNode().getFocusableElement();if(!c.id||c.id==="null")throw Error(`Attempting to register a tree with a root element that has an invalid ID: ${a}.`);b&&(c.tabIndex=0)}isRegistered(a){return!!this.lookUpRegistration(a)}lookUpRegistration(a){let b;
630
- return(b=this.registeredTrees.find(c=>c.tree===a))!=null?b:null}unregisterTree(a){this.ensureManagerIsUnlocked();if(!this.isRegistered(a))throw Error(`Attempted to unregister not registered tree: ${a}.`);var b=this.registeredTrees.findIndex(e=>e.tree===a);const c=this.registeredTrees[b];this.registeredTrees.splice(b,1);b=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(a);const d=a.getRootFocusableNode();b&&this.removeHighlight(b);this.focusedNode!==b&&
631
- this.focusedNode!==d||this.updateFocusedNode(null);this.removeHighlight(d);c.rootShouldBeAutoTabbable&&a.getRootFocusableNode().getFocusableElement().removeAttribute("tabindex")}getFocusedTree(){let a,b;return(b=(a=this.focusedNode)==null?void 0:a.getFocusableTree())!=null?b:null}getFocusedNode(){return this.focusedNode}focusTree(a){this.ensureManagerIsUnlocked();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),
632
- c=a.getRestoredFocusableNode(b);a=a.getRootFocusableNode();let d;this.focusNode((d=c!=null?c:b)!=null?d:a)}focusNode(a){this.ensureManagerIsUnlocked();const b=!this.currentlyHoldsEphemeralFocus;b&&(this.isUpdatingFocusedNode=!0);var c,d=((c=this.focusedNode)==null?void 0:c.getFocusableElement())!==document.activeElement;if(this.focusedNode!==a||d)if(a.canBeFocused()){c=a.getFocusableTree();if(!this.isRegistered(c))throw Error(`Attempted to focus unregistered node: ${a}.`);d=a.getFocusableElement();
633
- d.id&&d.id!=="null"||console.warn("Trying to focus a node that has an invalid ID.");var e=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(d,c);d=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(c);var f=a;if(e!==a){f=c.getRestoredFocusableNode(d);a=c.getRootFocusableNode();var g;f=(g=f!=null?f:d)!=null?g:a}a=this.focusedNode;g=a==null?void 0:a.getFocusableTree();a&&this.passivelyFocusNode(a,c);c=c.getRootFocusableNode();
634
- d&&this.removeHighlight(d);c!==f&&this.removeHighlight(c);this.currentlyHoldsEphemeralFocus||this.activelyFocusNode(f,g!=null?g:null);this.updateFocusedNode(f)}else console.warn("Trying to focus a node that can't be focused.");b&&(this.isUpdatingFocusedNode=!1)}takeEphemeralFocus(a){this.ensureManagerIsUnlocked();if(this.currentlyHoldsEphemeralFocus)throw Error(`Attempted to take ephemeral focus when it's already held, with new element: ${a}.`);this.currentlyHoldsEphemeralFocus=!0;this.focusedNode&&
635
- this.passivelyFocusNode(this.focusedNode,null);a.focus({preventScroll:!0});let b=!1;return()=>{if(b)throw Error(`Attempted to finish ephemeral focus twice for element: ${a}.`);b=!0;this.currentlyHoldsEphemeralFocus=!1;if(this.focusedNode){this.activelyFocusNode(this.focusedNode,null);const c=this.focusedNode;setTimeout(()=>{!this.focusedNode&&this.previouslyFocusedNode===c&&this.recentlyLostAllFocus&&this.focusNode(c)},0)}}}ephemeralFocusTaken(){return this.currentlyHoldsEphemeralFocus}ensureManagerIsUnlocked(){if(this.lockFocusStateChanges)throw Error("FocusManager state changes cannot happen in a tree/node focus/blur callback.");
679
+ 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}`;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 TreeRegistration$$module$build$src$core$focus_manager=class{constructor(a,b){this.tree=a;this.rootShouldBeAutoTabbable=b}},FocusManager$$module$build$src$core$focus_manager=class{constructor(a){this.previouslyFocusedNode=this.focusedNode=null;this.registeredTrees=[];this.isUpdatingFocusedNode=this.recentlyLostAllFocus=this.lockFocusStateChanges=this.currentlyHoldsEphemeralFocus=!1;this.popoverFocusLossHandlers=new Set;this.popoverFocusOutHandler=c=>{c=c.relatedTarget;let d;if(c===null||c instanceof
680
+ Node&&((d=this.popoverFocusRoot)==null||!d.contains(c)))for(const e of this.popoverFocusLossHandlers)e()};const b=c=>{if(!this.isUpdatingFocusedNode){this.recentlyLostAllFocus=!c;var d=null;if(c instanceof HTMLElement||c instanceof SVGElement)for(var e of this.registeredTrees)if(d=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(c,e.tree))break;if(d&&d.canBeFocused()){c=d.getFocusableTree();let f;e=(f=this.focusedNode)==null?void 0:f.getFocusableTree();
681
+ d===c.getRootFocusableNode()&&c!==e?this.focusTree(c):this.focusNode(d)}else this.defocusCurrentFocusedNode()}};a("focusin",c=>{c instanceof FocusEvent&&b(document.activeElement)});a("focusout",c=>{c instanceof FocusEvent&&b(c.relatedTarget)})}registerTree(a,b=!1){this.ensureManagerIsUnlocked();if(this.isRegistered(a))throw Error(`Attempted to re-register already registered tree: ${a}.`);this.registeredTrees.push(new TreeRegistration$$module$build$src$core$focus_manager(a,b));const c=a.getRootFocusableNode().getFocusableElement();
682
+ if(!c.id||c.id==="null")throw Error(`Attempting to register a tree with a root element that has an invalid ID: ${a}.`);b&&(c.tabIndex=0)}isRegistered(a){return!!this.lookUpRegistration(a)}lookUpRegistration(a){let b;return(b=this.registeredTrees.find(c=>c.tree===a))!=null?b:null}unregisterTree(a){this.ensureManagerIsUnlocked();if(!this.isRegistered(a))throw Error(`Attempted to unregister not registered tree: ${a}.`);var b=this.registeredTrees.findIndex(e=>e.tree===a);const c=this.registeredTrees[b];
683
+ this.registeredTrees.splice(b,1);b=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(a);const d=a.getRootFocusableNode();b&&this.removeHighlight(b);this.focusedNode!==b&&this.focusedNode!==d||this.updateFocusedNode(null);this.removeHighlight(d);c.rootShouldBeAutoTabbable&&a.getRootFocusableNode().getFocusableElement().removeAttribute("tabindex")}getFocusedTree(){let a,b;return(b=(a=this.focusedNode)==null?void 0:a.getFocusableTree())!=null?b:null}getFocusedNode(){return this.focusedNode}focusTree(a){this.ensureManagerIsUnlocked();
684
+ 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),c=a.getRestoredFocusableNode(b);a=a.getRootFocusableNode();let d;this.focusNode((d=c!=null?c:b)!=null?d:a)}focusNode(a){this.ensureManagerIsUnlocked();const b=!this.currentlyHoldsEphemeralFocus;b&&(this.isUpdatingFocusedNode=!0);var c,d=((c=this.focusedNode)==null?void 0:c.getFocusableElement())!==document.activeElement;
685
+ if(this.focusedNode!==a||d)if(a.canBeFocused()){c=a.getFocusableTree();if(!this.isRegistered(c))throw Error(`Attempted to focus unregistered node: ${a}.`);d=a.getFocusableElement();d.id&&d.id!=="null"||console.warn("Trying to focus a node that has an invalid ID.");var e=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusableNodeFor(d,c);d=FocusableTreeTraverser$$module$build$src$core$utils$focusable_tree_traverser.findFocusedNode(c);var f=a;if(e!==a){f=c.getRestoredFocusableNode(d);
686
+ a=c.getRootFocusableNode();var g;f=(g=f!=null?f:d)!=null?g:a}a=this.focusedNode;g=a==null?void 0:a.getFocusableTree();a&&this.passivelyFocusNode(a,c);c=c.getRootFocusableNode();d&&this.removeHighlight(d);c!==f&&this.removeHighlight(c);this.currentlyHoldsEphemeralFocus||this.activelyFocusNode(f,g!=null?g:null);this.updateFocusedNode(f)}else console.warn("Trying to focus a node that can't be focused.");b&&(this.isUpdatingFocusedNode=!1)}takeEphemeralFocus(a){this.ensureManagerIsUnlocked();if(this.currentlyHoldsEphemeralFocus)throw Error(`Attempted to take ephemeral focus when it's already held, with new element: ${a}.`);
687
+ this.currentlyHoldsEphemeralFocus=!0;this.focusedNode&&this.passivelyFocusNode(this.focusedNode,null);a.focus({preventScroll:!0});let b=!1;return(c=!0)=>{if(b)throw Error(`Attempted to finish ephemeral focus twice for element: ${a}.`);b=!0;this.currentlyHoldsEphemeralFocus=!1;if(this.focusedNode&&c){this.activelyFocusNode(this.focusedNode,null);const d=this.focusedNode;setTimeout(()=>{!this.focusedNode&&this.previouslyFocusedNode===d&&this.recentlyLostAllFocus&&this.focusNode(d)},0)}}}ephemeralFocusTaken(){return this.currentlyHoldsEphemeralFocus}ensureManagerIsUnlocked(){if(this.lockFocusStateChanges)throw Error("FocusManager state changes cannot happen in a tree/node focus/blur callback.");
636
688
  }updateFocusedNode(a){this.previouslyFocusedNode=this.focusedNode;this.focusedNode=a}defocusCurrentFocusedNode(){this.focusedNode&&!this.currentlyHoldsEphemeralFocus&&(this.passivelyFocusNode(this.focusedNode,null),this.updateFocusedNode(null))}activelyFocusNode(a,b){this.lockFocusStateChanges=!0;const c=a.getFocusableTree(),d=a.getFocusableElement();let e;const f=(e=this.lookUpRegistration(c))==null?void 0:e.rootShouldBeAutoTabbable;c!==b&&(c.onTreeFocus(a,b),f&&(c.getRootFocusableNode().getFocusableElement().tabIndex=
637
689
  -1));a.onNodeFocus();this.lockFocusStateChanges=!1;f&&a===c.getRootFocusableNode()||d.hasAttribute("tabindex")||(d.tabIndex=-1);this.setNodeToVisualActiveFocus(a);d.focus({preventScroll:!0})}passivelyFocusNode(a,b){this.lockFocusStateChanges=!0;const c=a.getFocusableTree();if(c!==b){c.onTreeBlur(b);let d;if((d=this.lookUpRegistration(c))==null?0:d.rootShouldBeAutoTabbable)c.getRootFocusableNode().getFocusableElement().tabIndex=0}a.onNodeBlur();this.lockFocusStateChanges=!1;c!==b&&this.setNodeToVisualPassiveFocus(a)}setNodeToVisualActiveFocus(a){a=
638
690
  a.getFocusableElement();addClass$$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)}setNodeToVisualPassiveFocus(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,
639
691
  FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME)}removeHighlight(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);removeClass$$module$build$src$core$utils$dom(a,FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME)}static getFocusManager(){FocusManager$$module$build$src$core$focus_manager.focusManager||(FocusManager$$module$build$src$core$focus_manager.focusManager=
640
- new FocusManager$$module$build$src$core$focus_manager(document.addEventListener));return FocusManager$$module$build$src$core$focus_manager.focusManager}};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";FocusManager$$module$build$src$core$focus_manager.focusManager=null;var module$build$src$core$focus_manager={};
641
- 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 module$build$src$core$interfaces$i_focusable_node={};module$build$src$core$interfaces$i_focusable_node.isFocusableNode=isFocusableNode$$module$build$src$core$interfaces$i_focusable_node;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 module$build$src$core$utils$object={};module$build$src$core$utils$object.deepMerge=deepMerge$$module$build$src$core$utils$object;var ShortcutRegistry$$module$build$src$core$shortcut_registry=class{constructor(){this.shortcuts=new Map;this.keyMap=new Map;this.reset()}reset(){this.shortcuts.clear();this.keyMap.clear()}register(a,b){if(this.shortcuts.get(a.name)&&!b)throw Error(`Shortcut named "${a.name}" already exists.`);this.shortcuts.set(a.name,a);b=a.keyCodes;if(b==null?0:b.length)for(const c of b)this.addKeyMapping(c,a.name,!!a.allowCollision)}unregister(a){if(!this.shortcuts.get(a))return console.warn(`Keyboard shortcut named "${a}" not found.`),
692
+ new FocusManager$$module$build$src$core$focus_manager(document.addEventListener));return FocusManager$$module$build$src$core$focus_manager.focusManager}setPopoverFocusRoot(a){let b;(b=this.popoverFocusRoot)==null||b.removeEventListener("focusout",this.popoverFocusOutHandler);this.popoverFocusRoot=a;this.popoverFocusRoot.addEventListener("focusout",this.popoverFocusOutHandler)}registerPopoverFocusLossHandler(a){this.popoverFocusLossHandlers.add(a)}unregisterPopoverFocusLossHandler(a){this.popoverFocusLossHandlers.delete(a)}};
693
+ 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";FocusManager$$module$build$src$core$focus_manager.focusManager=null;var 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 module$build$src$core$interfaces$i_focusable_node={};module$build$src$core$interfaces$i_focusable_node.isFocusableNode=isFocusableNode$$module$build$src$core$interfaces$i_focusable_node;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 module$build$src$core$utils$object={};module$build$src$core$utils$object.deepMerge=deepMerge$$module$build$src$core$utils$object;var ShortcutRegistry$$module$build$src$core$shortcut_registry=class{constructor(){this.shortcuts=new Map;this.keyMap=new Map;this.reset()}reset(){this.shortcuts.clear();this.keyMap.clear()}register(a,b){if(this.shortcuts.get(a.name)&&!b)throw Error(`Shortcut named "${a.name}" already exists.`);this.shortcuts.set(a.name,a);b=a.keyCodes;if(b==null?0:b.length)for(const c of b)this.addKeyMapping(c,a.name,!!a.allowCollision)}unregister(a){if(!this.shortcuts.get(a))return console.warn(`Keyboard shortcut named "${a}" not found.`),
642
694
  !1;this.removeAllKeyMappings(a);this.shortcuts.delete(a);return!0}addKeyMapping(a,b,c){a=`${a}`;const d=this.keyMap.get(a);if(d&&!c)throw Error(`Shortcut named "${b}" collides with shortcuts "${d}"`);d&&c?d.unshift(b):this.keyMap.set(a,[b])}removeKeyMapping(a,b,c){const d=this.keyMap.get(a);if(!d)return c||console.warn(`No keyboard shortcut named "${b}" registered with key code "${a}"`),!1;const e=d.indexOf(b);if(e>-1)return d.splice(e,1),d.length===0&&this.keyMap.delete(a),!0;c||console.warn(`No keyboard shortcut named "${b}" registered with key code "${a}"`);
643
695
  return!1}removeAllKeyMappings(a){for(const b of this.keyMap.keys())this.removeKeyMapping(b,a,!0)}setKeyMap(a){this.keyMap.clear();for(const b in a)this.keyMap.set(b,a[b])}getKeyMap(){const a=Object.create(null);for(const [b,c]of this.keyMap)a[b]=c;return a}getRegistry(){const a=Object.create(null);for(const [b,c]of this.shortcuts)a[b]=c;return deepMerge$$module$build$src$core$utils$object(Object.create(null),a)}onKeyDown(a,b){var c=this.serializeKeyEvent(b);c=this.getShortcutNamesByKeyCode(c);if(!c)return!1;
644
696
  for(const d of c){c=this.shortcuts.get(d);let e;if(!c||c.preconditionFn&&!c.preconditionFn(a,{focusedNode:(e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())!=null?e:void 0}))continue;let f,g,h;if((g=(f=c).callback)==null?0:g.call(f,a,b,c,{focusedNode:(h=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())!=null?h:void 0}))return!0}return!1}getShortcutNamesByKeyCode(a){let b;return((b=this.keyMap.get(a))==null?void 0:b.slice())||[]}getKeyCodesByShortcutName(a){const b=
@@ -659,13 +711,620 @@ a+'" has not been added to the ComponentManager');if(this.hasCapability(a,b))con
659
711
  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(b=this.componentData.get(a))==null?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=>
660
712
  {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;
661
713
  (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={}));
662
- 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 injectionSites$$module$build$src$core$css=new WeakSet,registeredStyleSheets$$module$build$src$core$css=[],content$$module$build$src$core$css='\n:is(\n .injectionDiv,\n .blocklyWidgetDiv,\n .blocklyDropdownDiv,\n .blocklyTooltipDiv,\n) * {\n box-sizing: border-box;\n}\n\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}\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.blocklyDragging.blocklyDraggingDelete .blocklyField {\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):not(:focus),\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 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/* 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.blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<<PATH>>>/sprites.svg) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n width: 16px;\n height: 16px;\n position: static; /* Scroll with the menu. */\n display: block;\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:is(\n .blocklyFlyout,\n .blocklyWorkspace,\n .blocklyField,\n .blocklyPath,\n .blocklyHighlightedConnectionPath,\n .blocklyComment,\n .blocklyBubble,\n .blocklyIconGroup,\n .blocklyTextarea\n) {\n outline: none;\n}\n.hiddenForAria {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.injectionDiv {\n --blockly-active-node-color: #fff200;\n --blockly-active-tree-color: #60a5fa;\n --blockly-selection-width: 3px;\n}\n\n/* Active focus cases: */\n/* Blocks with active focus. */\n.blocklyKeyboardNavigation\n .blocklyActiveFocus:is(.blocklyPath, .blocklyHighlightedConnectionPath),\n/* Fields with active focus, */\n.blocklyKeyboardNavigation\n .blocklyActiveFocus.blocklyField\n > .blocklyFieldRect,\n/* Icons with active focus. */\n.blocklyKeyboardNavigation\n .blocklyActiveFocus.blocklyIconGroup\n > .blocklyIconShape:first-child {\n stroke: var(--blockly-active-node-color);\n stroke-width: var(--blockly-selection-width);\n}\n\n/* Passive focus cases: */\n/* Blocks with passive focus except when widget/dropdown div in use. */\n.blocklyKeyboardNavigation:not(\n :has(\n .blocklyDropDownDiv:focus-within,\n .blocklyWidgetDiv:focus-within\n )\n )\n .blocklyPassiveFocus:is(\n .blocklyPath:not(.blocklyFlyout .blocklyPath),\n .blocklyHighlightedConnectionPath\n ),\n/* Fields with passive focus except when widget/dropdown div in use. */\n.blocklyKeyboardNavigation:not(\n :has(\n .blocklyDropDownDiv:focus-within,\n .blocklyWidgetDiv:focus-within\n )\n )\n .blocklyPassiveFocus.blocklyField\n > .blocklyFieldRect,\n/* Icons with passive focus except when widget/dropdown div in use. */\n.blocklyKeyboardNavigation:not(\n :has(\n .blocklyDropDownDiv:focus-within,\n .blocklyWidgetDiv:focus-within\n )\n )\n .blocklyPassiveFocus.blocklyIconGroup\n > .blocklyIconShape:first-child {\n stroke: var(--blockly-active-node-color);\n stroke-dasharray: 5px 3px;\n stroke-width: var(--blockly-selection-width);\n}\n\n/* Workaround for unexpectedly hidden connection path due to core style. */\n.blocklyKeyboardNavigation\n .blocklyPassiveFocus.blocklyHighlightedConnectionPath {\n display: unset !important;\n}\n\n/* Different ways for toolbox/flyout to be the active tree: */\n/* Active focus in the flyout. */\n.blocklyKeyboardNavigation .blocklyFlyout:has(.blocklyActiveFocus),\n/* Active focus in the toolbox. */\n.blocklyKeyboardNavigation .blocklyToolbox:has(.blocklyActiveFocus),\n/* Active focus on the toolbox/flyout. */\n.blocklyKeyboardNavigation\n .blocklyActiveFocus:is(.blocklyFlyout, .blocklyToolbox) {\n outline-offset: calc(var(--blockly-selection-width) * -1);\n outline: var(--blockly-selection-width) solid\n var(--blockly-active-tree-color);\n}\n\n/* Suppress default outline. */\n.blocklyKeyboardNavigation\n .blocklyToolboxCategoryContainer:focus-visible {\n outline: none;\n}\n\n /* Different ways for the workspace to be the active tree: */\n/* Active focus within workspace. */\n.blocklyKeyboardNavigation\n .blocklyWorkspace:has(.blocklyActiveFocus)\n .blocklyWorkspaceFocusRing,\n/* Active focus within drag layer. */\n.blocklyKeyboardNavigation\n .blocklySvg:has(~ .blocklyBlockDragSurface .blocklyActiveFocus)\n .blocklyWorkspaceFocusRing,\n/* Active focus on workspace. */\n.blocklyKeyboardNavigation\n .blocklyWorkspace.blocklyActiveFocus\n .blocklyWorkspaceFocusRing,\n/* Focus in widget/dropdown div considered to be in workspace. */\n.blocklyKeyboardNavigation:has(\n .blocklyWidgetDiv:focus-within,\n .blocklyDropDownDiv:focus-within\n)\n .blocklyWorkspace\n .blocklyWorkspaceFocusRing {\n stroke: var(--blockly-active-tree-color);\n stroke-width: calc(var(--blockly-selection-width) * 2);\n}\n\n/* The workspace itself is the active node. */\n.blocklyKeyboardNavigation\n .blocklyWorkspace.blocklyActiveFocus\n .blocklyWorkspaceSelectionRing {\n stroke: var(--blockly-active-node-color);\n stroke-width: var(--blockly-selection-width);\n}\n\n/* The workspace itself is the active node. */\n.blocklyKeyboardNavigation\n .blocklyBubble.blocklyActiveFocus\n .blocklyDraggable {\n stroke: var(--blockly-active-node-color);\n stroke-width: var(--blockly-selection-width);\n}\n/* Flyout buttons and labels */\n.blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutLabel.blocklyActiveFocus,\n.blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutButton.blocklyActiveFocus {\n outline: none;\n}\n.blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutLabel.blocklyActiveFocus > .blocklyFlyoutLabelText,\n.blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutButton.blocklyActiveFocus > .blocklyFlyoutButtonBackground {\n outline-offset: 2px;\n outline: var(--blockly-selection-width) solid var(--blockly-active-node-color);\n border-radius: 2px;\n}\n',
663
- 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-
664
- 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$$module$build$src$core$utils$svg=class{constructor(a){this.tagName=a}toString(){return this.tagName}};Svg$$module$build$src$core$utils$svg.ANIMATE=new Svg$$module$build$src$core$utils$svg("animate");Svg$$module$build$src$core$utils$svg.CIRCLE=new Svg$$module$build$src$core$utils$svg("circle");Svg$$module$build$src$core$utils$svg.CLIPPATH=new Svg$$module$build$src$core$utils$svg("clipPath");Svg$$module$build$src$core$utils$svg.DEFS=new Svg$$module$build$src$core$utils$svg("defs");
665
- Svg$$module$build$src$core$utils$svg.FECOMPOSITE=new Svg$$module$build$src$core$utils$svg("feComposite");Svg$$module$build$src$core$utils$svg.FECOMPONENTTRANSFER=new Svg$$module$build$src$core$utils$svg("feComponentTransfer");Svg$$module$build$src$core$utils$svg.FEFLOOD=new Svg$$module$build$src$core$utils$svg("feFlood");Svg$$module$build$src$core$utils$svg.FEFUNCA=new Svg$$module$build$src$core$utils$svg("feFuncA");Svg$$module$build$src$core$utils$svg.FEGAUSSIANBLUR=new Svg$$module$build$src$core$utils$svg("feGaussianBlur");
666
- Svg$$module$build$src$core$utils$svg.FEPOINTLIGHT=new Svg$$module$build$src$core$utils$svg("fePointLight");Svg$$module$build$src$core$utils$svg.FESPECULARLIGHTING=new Svg$$module$build$src$core$utils$svg("feSpecularLighting");Svg$$module$build$src$core$utils$svg.FILTER=new Svg$$module$build$src$core$utils$svg("filter");Svg$$module$build$src$core$utils$svg.FOREIGNOBJECT=new Svg$$module$build$src$core$utils$svg("foreignObject");Svg$$module$build$src$core$utils$svg.G=new Svg$$module$build$src$core$utils$svg("g");
667
- Svg$$module$build$src$core$utils$svg.IMAGE=new Svg$$module$build$src$core$utils$svg("image");Svg$$module$build$src$core$utils$svg.LINE=new Svg$$module$build$src$core$utils$svg("line");Svg$$module$build$src$core$utils$svg.PATH=new Svg$$module$build$src$core$utils$svg("path");Svg$$module$build$src$core$utils$svg.PATTERN=new Svg$$module$build$src$core$utils$svg("pattern");Svg$$module$build$src$core$utils$svg.POLYGON=new Svg$$module$build$src$core$utils$svg("polygon");
668
- Svg$$module$build$src$core$utils$svg.RECT=new Svg$$module$build$src$core$utils$svg("rect");Svg$$module$build$src$core$utils$svg.SVG=new Svg$$module$build$src$core$utils$svg("svg");Svg$$module$build$src$core$utils$svg.TEXT=new Svg$$module$build$src$core$utils$svg("text");Svg$$module$build$src$core$utils$svg.TSPAN=new Svg$$module$build$src$core$utils$svg("tspan");var module$build$src$core$utils$svg={};module$build$src$core$utils$svg.Svg=Svg$$module$build$src$core$utils$svg;var Rect$$module$build$src$core$utils$rect=class{constructor(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d}static from(a){return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height,a.x,a.x+a.width)}clone(){return new Rect$$module$build$src$core$utils$rect(this.top,this.bottom,this.left,this.right)}getHeight(){return this.bottom-this.top}getWidth(){return this.right-this.left}getOrigin(){return new Coordinate$$module$build$src$core$utils$coordinate(this.left,this.top)}contains(a,
714
+ 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 injectionSites$$module$build$src$core$css=new WeakSet,registeredStyleSheets$$module$build$src$core$css=[],content$$module$build$src$core$css=`
715
+ :is(
716
+ .injectionDiv,
717
+ .blocklyWidgetDiv,
718
+ .blocklyDropdownDiv,
719
+ .blocklyTooltipDiv,
720
+ ) * {
721
+ box-sizing: border-box;
722
+ }
723
+
724
+ .blocklySvg {
725
+ background-color: #fff;
726
+ outline: none;
727
+ overflow: hidden; /* IE overflows by default. */
728
+ position: absolute;
729
+ display: block;
730
+ }
731
+
732
+ .blocklyWidgetDiv {
733
+ display: none;
734
+ position: absolute;
735
+ z-index: 99999; /* big value for bootstrap3 compatibility */
736
+ }
737
+
738
+ .injectionDiv {
739
+ height: 100%;
740
+ position: relative;
741
+ overflow: hidden; /* So blocks in drag surface disappear at edges */
742
+ touch-action: none;
743
+ user-select: none;
744
+ -webkit-user-select: none;
745
+ }
746
+
747
+ .blocklyBlockCanvas.blocklyCanvasTransitioning,
748
+ .blocklyBubbleCanvas.blocklyCanvasTransitioning {
749
+ transition: transform .5s;
750
+ }
751
+
752
+ .blocklyEmboss {
753
+ filter: var(--blocklyEmbossFilter);
754
+ }
755
+
756
+ .blocklyTooltipDiv {
757
+ background-color: #ffffc7;
758
+ border: 1px solid #ddc;
759
+ box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
760
+ color: #000;
761
+ display: none;
762
+ font: 9pt sans-serif;
763
+ opacity: .9;
764
+ padding: 2px;
765
+ position: absolute;
766
+ z-index: 100000; /* big value for bootstrap3 compatibility */
767
+ }
768
+
769
+ .blocklyDropDownDiv {
770
+ position: absolute;
771
+ left: 0;
772
+ top: 0;
773
+ z-index: 1000;
774
+ visibility: hidden;
775
+ border: 1px solid;
776
+ border-color: #dadce0;
777
+ background-color: #fff;
778
+ border-radius: 2px;
779
+ padding: 4px;
780
+ box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
781
+ }
782
+
783
+ .blocklyDropDownDiv:focus {
784
+ box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
785
+ }
786
+
787
+ .blocklyDropDownContent {
788
+ max-height: 300px; /* @todo: spec for maximum height. */
789
+ }
790
+
791
+ .blocklyDropDownArrow {
792
+ position: absolute;
793
+ left: 0;
794
+ top: 0;
795
+ width: 16px;
796
+ height: 16px;
797
+ z-index: -1;
798
+ background-color: inherit;
799
+ border-color: inherit;
800
+ border-top: 1px solid;
801
+ border-left: 1px solid;
802
+ border-top-left-radius: 4px;
803
+ border-color: inherit;
804
+ }
805
+
806
+ .blocklyHighlighted>.blocklyPath {
807
+ filter: var(--blocklyEmbossFilter);
808
+ }
809
+
810
+ .blocklyHighlightedConnectionPath {
811
+ fill: none;
812
+ stroke: #fc3;
813
+ stroke-width: 4px;
814
+ }
815
+
816
+ .blocklyPathLight {
817
+ fill: none;
818
+ stroke-linecap: round;
819
+ stroke-width: 1;
820
+ }
821
+
822
+ .blocklySelected>.blocklyPathLight {
823
+ display: none;
824
+ }
825
+
826
+ .blocklyDraggable {
827
+ cursor: grab;
828
+ cursor: -webkit-grab;
829
+ }
830
+
831
+ .blocklyDragging {
832
+ cursor: grabbing;
833
+ cursor: -webkit-grabbing;
834
+ /* Drag surface disables events to not block the toolbox, so we have to
835
+ * reenable them here for the cursor values to work. */
836
+ pointer-events: auto;
837
+ }
838
+
839
+ /* Changes cursor on mouse down. Not effective in Firefox because of
840
+ https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
841
+ .blocklyDraggable:active {
842
+ cursor: grabbing;
843
+ cursor: -webkit-grabbing;
844
+ }
845
+
846
+ .blocklyDragging.blocklyDraggingDelete,
847
+ .blocklyDragging.blocklyDraggingDelete .blocklyField {
848
+ cursor: url("<<<PATH>>>/handdelete.cur"), auto;
849
+ }
850
+
851
+ .blocklyDragging>.blocklyPath,
852
+ .blocklyDragging>.blocklyPathLight {
853
+ fill-opacity: .8;
854
+ stroke-opacity: .8;
855
+ }
856
+
857
+ .blocklyDragging>.blocklyPathDark {
858
+ display: none;
859
+ }
860
+
861
+ .blocklyDisabledPattern>.blocklyPath {
862
+ fill: var(--blocklyDisabledPattern);
863
+ fill-opacity: .5;
864
+ stroke-opacity: .5;
865
+ }
866
+
867
+ .blocklyDisabled>.blocklyPathLight,
868
+ .blocklyDisabled>.blocklyPathDark {
869
+ display: none;
870
+ }
871
+
872
+ .blocklyInsertionMarker>.blocklyPath,
873
+ .blocklyInsertionMarker>.blocklyPathLight,
874
+ .blocklyInsertionMarker>.blocklyPathDark {
875
+ fill-opacity: .2;
876
+ stroke: none;
877
+ }
878
+
879
+ .blocklyNonEditableField>text {
880
+ pointer-events: none;
881
+ }
882
+
883
+ .blocklyFlyout {
884
+ position: absolute;
885
+ z-index: 20;
886
+ }
887
+
888
+ .blocklyText text {
889
+ cursor: default;
890
+ }
891
+
892
+ /*
893
+ Don't allow users to select text. It gets annoying when trying to
894
+ drag a block and selected text moves instead.
895
+ */
896
+ .blocklySvg text {
897
+ user-select: none;
898
+ -ms-user-select: none;
899
+ -webkit-user-select: none;
900
+ cursor: inherit;
901
+ }
902
+
903
+ .blocklyIconGroup {
904
+ cursor: default;
905
+ }
906
+
907
+ .blocklyIconGroup:not(:hover):not(:focus),
908
+ .blocklyIconGroupReadonly {
909
+ opacity: .6;
910
+ }
911
+
912
+ .blocklyIconShape {
913
+ fill: #00f;
914
+ stroke: #fff;
915
+ stroke-width: 1px;
916
+ }
917
+
918
+ .blocklyIconSymbol {
919
+ fill: #fff;
920
+ }
921
+
922
+ .blocklyMinimalBody {
923
+ margin: 0;
924
+ padding: 0;
925
+ height: 100%;
926
+ }
927
+
928
+ .blocklyHtmlInput {
929
+ border: none;
930
+ border-radius: 4px;
931
+ height: 100%;
932
+ margin: 0;
933
+ outline: none;
934
+ padding: 0;
935
+ width: 100%;
936
+ text-align: center;
937
+ display: block;
938
+ box-sizing: border-box;
939
+ }
940
+
941
+ /* Remove the increase and decrease arrows on the field number editor */
942
+ input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
943
+ input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
944
+ -webkit-appearance: none;
945
+ margin: 0;
946
+ }
947
+
948
+ input[type=number] {
949
+ -moz-appearance: textfield;
950
+ }
951
+
952
+ .blocklyMainBackground {
953
+ stroke-width: 1;
954
+ stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
955
+ }
956
+
957
+ .blocklyMutatorBackground {
958
+ fill: #fff;
959
+ stroke: #ddd;
960
+ stroke-width: 1;
961
+ }
962
+
963
+ .blocklyFlyoutBackground {
964
+ fill: #ddd;
965
+ fill-opacity: .8;
966
+ }
967
+
968
+ .blocklyMainWorkspaceScrollbar {
969
+ z-index: 20;
970
+ }
971
+
972
+ .blocklyFlyoutScrollbar {
973
+ z-index: 30;
974
+ }
975
+
976
+ .blocklyScrollbarHorizontal,
977
+ .blocklyScrollbarVertical {
978
+ position: absolute;
979
+ outline: none;
980
+ }
981
+
982
+ .blocklyScrollbarBackground {
983
+ opacity: 0;
984
+ pointer-events: none;
985
+ }
986
+
987
+ .blocklyScrollbarHandle {
988
+ fill: #ccc;
989
+ }
990
+
991
+ .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
992
+ .blocklyScrollbarHandle:hover {
993
+ fill: #bbb;
994
+ }
995
+
996
+ /* Darken flyout scrollbars due to being on a grey background. */
997
+ /* By contrast, workspace scrollbars are on a white background. */
998
+ .blocklyFlyout .blocklyScrollbarHandle {
999
+ fill: #bbb;
1000
+ }
1001
+
1002
+ .blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
1003
+ .blocklyFlyout .blocklyScrollbarHandle:hover {
1004
+ fill: #aaa;
1005
+ }
1006
+
1007
+ .blocklyInvalidInput {
1008
+ background: #faa;
1009
+ }
1010
+
1011
+ .blocklyVerticalMarker {
1012
+ stroke-width: 3px;
1013
+ fill: rgba(255,255,255,.5);
1014
+ pointer-events: none;
1015
+ }
1016
+
1017
+ .blocklyComputeCanvas {
1018
+ position: absolute;
1019
+ width: 0;
1020
+ height: 0;
1021
+ }
1022
+
1023
+ .blocklyNoPointerEvents {
1024
+ pointer-events: none;
1025
+ }
1026
+
1027
+ .blocklyContextMenu {
1028
+ border-radius: 4px;
1029
+ max-height: 100%;
1030
+ }
1031
+
1032
+ .blocklyDropdownMenu {
1033
+ border-radius: 2px;
1034
+ padding: 0 !important;
1035
+ }
1036
+
1037
+ .blocklyDropdownMenu .blocklyMenuItem {
1038
+ /* 28px on the left for icon or checkbox. */
1039
+ padding-left: 28px;
1040
+ }
1041
+
1042
+ /* BiDi override for the resting state. */
1043
+ .blocklyDropdownMenu .blocklyMenuItemRtl {
1044
+ /* Flip left/right padding for BiDi. */
1045
+ padding-left: 5px;
1046
+ padding-right: 28px;
1047
+ }
1048
+
1049
+ .blocklyWidgetDiv .blocklyMenu {
1050
+ user-select: none;
1051
+ -ms-user-select: none;
1052
+ -webkit-user-select: none;
1053
+ background: #fff;
1054
+ border: 1px solid transparent;
1055
+ box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
1056
+ font: normal 13px Arial, sans-serif;
1057
+ margin: 0;
1058
+ outline: none;
1059
+ padding: 4px 0;
1060
+ position: absolute;
1061
+ overflow-y: auto;
1062
+ overflow-x: hidden;
1063
+ max-height: 100%;
1064
+ z-index: 20000; /* Arbitrary, but some apps depend on it... */
1065
+ }
1066
+
1067
+ .blocklyWidgetDiv .blocklyMenu:focus {
1068
+ box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
1069
+ }
1070
+
1071
+ .blocklyDropDownDiv .blocklyMenu {
1072
+ user-select: none;
1073
+ -ms-user-select: none;
1074
+ -webkit-user-select: none;
1075
+ background: inherit; /* Compatibility with gapi, reset from goog-menu */
1076
+ border: inherit; /* Compatibility with gapi, reset from goog-menu */
1077
+ font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
1078
+ outline: none;
1079
+ overflow-y: auto;
1080
+ overflow-x: hidden;
1081
+ max-height: 100%;
1082
+ z-index: 20000; /* Arbitrary, but some apps depend on it... */
1083
+ }
1084
+
1085
+ /* State: resting. */
1086
+ .blocklyMenuItem {
1087
+ border: none;
1088
+ color: #000;
1089
+ cursor: pointer;
1090
+ list-style: none;
1091
+ margin: 0;
1092
+ /* 7em on the right for shortcut. */
1093
+ min-width: 7em;
1094
+ padding: 6px 15px;
1095
+ white-space: nowrap;
1096
+ }
1097
+
1098
+ /* State: disabled. */
1099
+ .blocklyMenuItemDisabled {
1100
+ color: #ccc;
1101
+ cursor: inherit;
1102
+ }
1103
+
1104
+ /* State: hover. */
1105
+ .blocklyMenuItemHighlight {
1106
+ background-color: rgba(0,0,0,.1);
1107
+ }
1108
+
1109
+ /* State: selected/checked. */
1110
+ .blocklyMenuItemSelected .blocklyMenuItemCheckbox {
1111
+ background: url(<<<PATH>>>/sprites.svg) no-repeat -48px -16px;
1112
+ float: left;
1113
+ margin-left: -24px;
1114
+ width: 16px;
1115
+ height: 16px;
1116
+ position: static; /* Scroll with the menu. */
1117
+ display: block;
1118
+ }
1119
+
1120
+ .blocklyMenuItemRtl .blocklyMenuItemCheckbox {
1121
+ float: right;
1122
+ margin-right: -24px;
1123
+ }
1124
+
1125
+ .blocklyMenuSeparator {
1126
+ background-color: #ccc;
1127
+ height: 1px;
1128
+ border: 0;
1129
+ margin-left: 4px;
1130
+ margin-right: 4px;
1131
+ }
1132
+
1133
+ .blocklyBlockDragSurface, .blocklyAnimationLayer {
1134
+ position: absolute;
1135
+ top: 0;
1136
+ left: 0;
1137
+ right: 0;
1138
+ bottom: 0;
1139
+ overflow: visible !important;
1140
+ z-index: 80;
1141
+ pointer-events: none;
1142
+ }
1143
+
1144
+ .blocklyField {
1145
+ cursor: default;
1146
+ }
1147
+
1148
+ .blocklyInputField {
1149
+ cursor: text;
1150
+ }
1151
+
1152
+ .blocklyDragging .blocklyField,
1153
+ .blocklyDragging .blocklyIconGroup {
1154
+ cursor: grabbing;
1155
+ }
1156
+
1157
+ .blocklyActiveFocus:is(
1158
+ .blocklyFlyout,
1159
+ .blocklyWorkspace,
1160
+ .blocklyField,
1161
+ .blocklyPath,
1162
+ .blocklyHighlightedConnectionPath,
1163
+ .blocklyComment,
1164
+ .blocklyBubble,
1165
+ .blocklyIconGroup,
1166
+ .blocklyTextarea
1167
+ ) {
1168
+ outline: none;
1169
+ }
1170
+ .hiddenForAria {
1171
+ position: absolute;
1172
+ left: -9999px;
1173
+ width: 1px;
1174
+ height: 1px;
1175
+ overflow: hidden;
1176
+ }
1177
+
1178
+ .injectionDiv {
1179
+ --blockly-active-node-color: #fff200;
1180
+ --blockly-active-tree-color: #1379f6;
1181
+ --blockly-selection-width: 3px;
1182
+ }
1183
+
1184
+ /* Active focus cases: */
1185
+ /* Blocks with active focus. */
1186
+ .blocklyKeyboardNavigation
1187
+ .blocklyActiveFocus:is(.blocklyPath, .blocklyHighlightedConnectionPath),
1188
+ /* Fields with active focus, */
1189
+ .blocklyKeyboardNavigation
1190
+ .blocklyActiveFocus.blocklyField
1191
+ > .blocklyFieldRect,
1192
+ /* Icons with active focus. */
1193
+ .blocklyKeyboardNavigation
1194
+ .blocklyActiveFocus.blocklyIconGroup
1195
+ > .blocklyIconShape:first-child {
1196
+ stroke: var(--blockly-active-node-color);
1197
+ stroke-width: var(--blockly-selection-width);
1198
+ }
1199
+
1200
+ /* Passive focus cases: */
1201
+ /* Blocks with passive focus except when widget/dropdown div in use. */
1202
+ .blocklyKeyboardNavigation:not(
1203
+ :has(
1204
+ .blocklyDropDownDiv:focus-within,
1205
+ .blocklyWidgetDiv:focus-within
1206
+ )
1207
+ )
1208
+ .blocklyPassiveFocus:is(
1209
+ .blocklyPath:not(.blocklyFlyout .blocklyPath),
1210
+ .blocklyHighlightedConnectionPath
1211
+ ),
1212
+ /* Fields with passive focus except when widget/dropdown div in use. */
1213
+ .blocklyKeyboardNavigation:not(
1214
+ :has(
1215
+ .blocklyDropDownDiv:focus-within,
1216
+ .blocklyWidgetDiv:focus-within
1217
+ )
1218
+ )
1219
+ .blocklyPassiveFocus.blocklyField
1220
+ > .blocklyFieldRect,
1221
+ /* Icons with passive focus except when widget/dropdown div in use. */
1222
+ .blocklyKeyboardNavigation:not(
1223
+ :has(
1224
+ .blocklyDropDownDiv:focus-within,
1225
+ .blocklyWidgetDiv:focus-within
1226
+ )
1227
+ )
1228
+ .blocklyPassiveFocus.blocklyIconGroup
1229
+ > .blocklyIconShape:first-child {
1230
+ stroke: var(--blockly-active-node-color);
1231
+ stroke-dasharray: 5px 3px;
1232
+ stroke-width: var(--blockly-selection-width);
1233
+ }
1234
+
1235
+ /* Workaround for unexpectedly hidden connection path due to core style. */
1236
+ .blocklyKeyboardNavigation
1237
+ .blocklyPassiveFocus.blocklyHighlightedConnectionPath {
1238
+ display: unset !important;
1239
+ }
1240
+
1241
+ /* Different ways for toolbox/flyout to be the active tree: */
1242
+ /* Active focus in the flyout. */
1243
+ .blocklyKeyboardNavigation .blocklyFlyout:has(.blocklyActiveFocus),
1244
+ /* Active focus in the toolbox. */
1245
+ .blocklyKeyboardNavigation .blocklyToolbox:has(.blocklyActiveFocus),
1246
+ /* Active focus on the toolbox/flyout. */
1247
+ .blocklyKeyboardNavigation
1248
+ .blocklyActiveFocus:is(.blocklyFlyout, .blocklyToolbox) {
1249
+ outline-offset: calc(var(--blockly-selection-width) * -1);
1250
+ outline: var(--blockly-selection-width) solid
1251
+ var(--blockly-active-tree-color);
1252
+ }
1253
+
1254
+ /* Suppress default outline. */
1255
+ .blocklyKeyboardNavigation
1256
+ .blocklyToolboxCategoryContainer:focus-visible {
1257
+ outline: none;
1258
+ }
1259
+
1260
+ /* Different ways for the workspace to be the active tree: */
1261
+ /* Active focus within workspace. */
1262
+ .blocklyKeyboardNavigation
1263
+ .blocklyWorkspace:has(.blocklyActiveFocus)
1264
+ .blocklyWorkspaceFocusRing,
1265
+ /* Active focus within drag layer. */
1266
+ .blocklyKeyboardNavigation
1267
+ .blocklySvg:has(~ .blocklyBlockDragSurface .blocklyActiveFocus)
1268
+ .blocklyWorkspaceFocusRing,
1269
+ /* Active focus on workspace. */
1270
+ .blocklyKeyboardNavigation
1271
+ .blocklyWorkspace.blocklyActiveFocus
1272
+ .blocklyWorkspaceFocusRing,
1273
+ /* Focus in widget/dropdown div considered to be in workspace. */
1274
+ .blocklyKeyboardNavigation:has(
1275
+ .blocklyWidgetDiv:focus-within,
1276
+ .blocklyDropDownDiv:focus-within
1277
+ )
1278
+ .blocklyWorkspace
1279
+ .blocklyWorkspaceFocusRing {
1280
+ stroke: var(--blockly-active-tree-color);
1281
+ stroke-width: calc(var(--blockly-selection-width) * 2);
1282
+ }
1283
+
1284
+ /* The workspace itself is the active node. */
1285
+ .blocklyKeyboardNavigation
1286
+ .blocklyWorkspace.blocklyActiveFocus
1287
+ .blocklyWorkspaceSelectionRing {
1288
+ stroke: var(--blockly-active-node-color);
1289
+ stroke-width: var(--blockly-selection-width);
1290
+ }
1291
+
1292
+ /* The workspace itself is the active node. */
1293
+ .blocklyKeyboardNavigation
1294
+ .blocklyBubble.blocklyActiveFocus
1295
+ .blocklyEmboss .blocklyDraggable {
1296
+ stroke: var(--blockly-active-node-color);
1297
+ stroke-width: var(--blockly-selection-width);
1298
+ }
1299
+ /* Flyout buttons and labels */
1300
+ .blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutLabel.blocklyActiveFocus,
1301
+ .blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutButton.blocklyActiveFocus {
1302
+ outline: none;
1303
+ }
1304
+ .blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutLabel.blocklyActiveFocus > .blocklyFlyoutLabelText,
1305
+ .blocklyKeyboardNavigation .blocklyFlyout .blocklyFlyoutButton.blocklyActiveFocus > .blocklyFlyoutButtonBackground {
1306
+ outline-offset: 2px;
1307
+ outline: var(--blockly-selection-width) solid var(--blockly-active-node-color);
1308
+ border-radius: 2px;
1309
+ }
1310
+ .blocklyDialog {
1311
+ min-width: 300px;
1312
+ border-radius: 16px;
1313
+ box-shadow: 0 8px 8px rgba(0, 0, 0, 0.2);
1314
+ border: 1px solid #999;
1315
+ }
1316
+ .blocklyDialogForm {
1317
+ display: flex;
1318
+ flex-direction: column;
1319
+ row-gap: 8px;
1320
+ }
1321
+ .blocklyDialogButtonRow {
1322
+ display: flex;
1323
+ flex-direction: ${MOBILE$$module$build$src$core$utils$useragent||APPLE$$module$build$src$core$utils$useragent?"row-reverse":"row"};
1324
+ column-gap: 8px;
1325
+ }
1326
+ `,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-
1327
+ 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 Rect$$module$build$src$core$utils$rect=class{constructor(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d}static from(a){return new Rect$$module$build$src$core$utils$rect(a.y,a.y+a.height,a.x,a.x+a.width)}clone(){return new Rect$$module$build$src$core$utils$rect(this.top,this.bottom,this.left,this.right)}getHeight(){return this.bottom-this.top}getWidth(){return this.right-this.left}getOrigin(){return new Coordinate$$module$build$src$core$utils$coordinate(this.left,this.top)}contains(a,
669
1328
  b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom}intersects(a){return this.left<=a.right&&this.right>=a.left&&this.bottom>=a.top&&this.top<=a.bottom}static equals(a,b){return a===b?!0:a&&b?a.top===b.top&&a.bottom===b.bottom&&a.left===b.left&&a.right===b.right:!1}static createFromPoint(a,b,c){const d=a.x;a=a.y;return new Rect$$module$build$src$core$utils$rect(a,a+c,d,d+b)}},module$build$src$core$utils$rect={};module$build$src$core$utils$rect.Rect=Rect$$module$build$src$core$utils$rect;var Size$$module$build$src$core$utils$size=class{constructor(a,b){this.width=a;this.height=b}static equals(a,b){return a===b?!0:a&&b?a.width===b.width&&a.height===b.height:!1}static max(a,b){return new Size$$module$build$src$core$utils$size(Math.max(a.width,b.width),Math.max(a.height,b.height))}static min(a,b){return new Size$$module$build$src$core$utils$size(Math.min(a.width,b.width),Math.min(a.height,b.height))}},module$build$src$core$utils$size={};module$build$src$core$utils$size.Size=Size$$module$build$src$core$utils$size;var TEST_ONLY$$module$build$src$core$utils$style={getSizeInternal:getSizeInternal$$module$build$src$core$utils$style},module$build$src$core$utils$style={TEST_ONLY:TEST_ONLY$$module$build$src$core$utils$style};module$build$src$core$utils$style.getBorderBox=getBorderBox$$module$build$src$core$utils$style;module$build$src$core$utils$style.getComputedStyle=getComputedStyle$$module$build$src$core$utils$style;module$build$src$core$utils$style.getContainerOffsetToScrollInto=getContainerOffsetToScrollInto$$module$build$src$core$utils$style;
670
1329
  module$build$src$core$utils$style.getPageOffset=getPageOffset$$module$build$src$core$utils$style;module$build$src$core$utils$style.getSize=getSize$$module$build$src$core$utils$style;module$build$src$core$utils$style.getViewportPageOffset=getViewportPageOffset$$module$build$src$core$utils$style;module$build$src$core$utils$style.scrollIntoContainerView=scrollIntoContainerView$$module$build$src$core$utils$style;var XY_REGEX$$module$build$src$core$utils$svg_math=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*)?/,XY_STYLE_REGEX$$module$build$src$core$utils$svg_math=/transform:\s*translate(?:3d)?\(\s*([-+\d.e]+)\s*px([ ,]\s*([-+\d.e]+)\s*px)?/,TEST_ONLY$$module$build$src$core$utils$svg_math={XY_REGEX:XY_REGEX$$module$build$src$core$utils$svg_math,XY_STYLE_REGEX:XY_STYLE_REGEX$$module$build$src$core$utils$svg_math},module$build$src$core$utils$svg_math={TEST_ONLY:TEST_ONLY$$module$build$src$core$utils$svg_math};
671
1330
  module$build$src$core$utils$svg_math.getDocumentScroll=getDocumentScroll$$module$build$src$core$utils$svg_math;module$build$src$core$utils$svg_math.getInjectionDivXY=getInjectionDivXY$$module$build$src$core$utils$svg_math;module$build$src$core$utils$svg_math.getRelativeXY=getRelativeXY$$module$build$src$core$utils$svg_math;module$build$src$core$utils$svg_math.getViewportBBox=getViewportBBox$$module$build$src$core$utils$svg_math;module$build$src$core$utils$svg_math.screenToWsCoordinates=screenToWsCoordinates$$module$build$src$core$utils$svg_math;
@@ -712,13 +1371,7 @@ WORKSPACE_COMMENTS:WORKSPACE_COMMENTS$$module$build$src$core$serialization$prior
712
1371
  b){for(const c of a)append$$module$build$src$core$serialization$workspace_comments(c,b,{recordUndo:getRecordUndo$$module$build$src$core$events$utils()})}clear(a){for(const b of a.getTopComments())b.dispose()}};register$$module$build$src$core$serialization$registry("workspaceComments",new WorkspaceCommentSerializer$$module$build$src$core$serialization$workspace_comments);var module$build$src$core$serialization$workspace_comments={};
713
1372
  module$build$src$core$serialization$workspace_comments.WorkspaceCommentSerializer=WorkspaceCommentSerializer$$module$build$src$core$serialization$workspace_comments;module$build$src$core$serialization$workspace_comments.append=append$$module$build$src$core$serialization$workspace_comments;module$build$src$core$serialization$workspace_comments.save=save$$module$build$src$core$serialization$workspace_comments;var module$build$src$core$clipboard$registry={};module$build$src$core$clipboard$registry.register=register$$module$build$src$core$clipboard$registry;module$build$src$core$clipboard$registry.unregister=unregister$$module$build$src$core$clipboard$registry;var WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster=class{paste(a,b,c){a=a.commentState;c&&(a.x=c.x,a.y=c.y);$.disable$$module$build$src$core$events$utils();let d;try{d=append$$module$build$src$core$serialization$workspace_comments(a,b),moveCommentToNotConflict$$module$build$src$core$clipboard$workspace_comment_paster(d)}finally{$.enable$$module$build$src$core$events$utils()}if(!d)return null;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.COMMENT_CREATE))(d));
714
1373
  $.getFocusManager$$module$build$src$core$focus_manager().focusNode(d);return d}};WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster.TYPE="workspace-comment";register$$module$build$src$core$clipboard$registry(WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster.TYPE,new WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster);var module$build$src$core$clipboard$workspace_comment_paster={};
715
- module$build$src$core$clipboard$workspace_comment_paster.WorkspaceCommentPaster=WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster;var DEFAULT_SNAP_RADIUS$$module$build$src$core$config,module$build$src$core$config;DEFAULT_SNAP_RADIUS$$module$build$src$core$config=28;$.config$$module$build$src$core$config={dragRadius:5,flyoutDragRadius:10,snapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,connectingSnapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,currentConnectionPreference:8,bumpDelay:250};module$build$src$core$config={config:$.config$$module$build$src$core$config};var ARIA_PREFIX$$module$build$src$core$utils$aria="aria-",ROLE_ATTRIBUTE$$module$build$src$core$utils$aria="role",LiveRegionAssertiveness$$module$build$src$core$utils$aria;(function(a){a.ASSERTIVE="assertive";a.OFF="off";a.POLITE="polite"})(LiveRegionAssertiveness$$module$build$src$core$utils$aria||(LiveRegionAssertiveness$$module$build$src$core$utils$aria={}));var Role$$module$build$src$core$utils$aria;
716
- (function(a){a.APPLICATION="application";a.BUTTON="button";a.CHECKBOX="checkbox";a.DIALOG="dialog";a.FIGURE="figure";a.GENERIC="generic";a.GRID="grid";a.GRIDCELL="gridcell";a.GROUP="group";a.LIST="list";a.LISTBOX="listbox";a.LISTITEM="listitem";a.MENU="menu";a.MENUITEM="menuitem";a.OPTION="option";a.PRESENTATION="presentation";a.REGION="region";a.ROW="row";a.SEPARATOR="separator";a.STATUS="status";a.TEXTBOX="textbox";a.TREE="tree";a.TREEITEM="treeitem"})(Role$$module$build$src$core$utils$aria||(Role$$module$build$src$core$utils$aria=
717
- {}));var DEFAULT_LIVE_REGION_ROLE$$module$build$src$core$utils$aria=Role$$module$build$src$core$utils$aria.STATUS,State$$module$build$src$core$utils$aria;
718
- (function(a){a.ACTIVEDESCENDANT="activedescendant";a.ATOMIC="ATOMIC";a.CHECKED="checked";a.COLCOUNT="colcount";a.CONTROLS="controls";a.DISABLED="disabled";a.EXPANDED="expanded";a.HASPOPUP="haspopup";a.HIDDEN="hidden";a.INVALID="invalid";a.LABEL="label";a.LABELLEDBY="labelledby";a.LEVEL="level";a.LIVE="live";a.ORIENTATION="orientation";a.POSINSET="posinset";a.PRESSED="pressed";a.READONLY="readonly";a.REQUIRED="required";a.ROLEDESCRIPTION="roledescription";a.ROWCOUNT="rowcount";a.ROWINDEX="rowindex";
719
- a.ROWSPAN="rowspan";a.SELECTED="selected";a.SETSIZE="setsize";a.VALUEMAX="valuemax";a.VALUEMIN="valuemin"})(State$$module$build$src$core$utils$aria||(State$$module$build$src$core$utils$aria={}));var liveRegionElement$$module$build$src$core$utils$aria=null,ariaAnnounceTimeout$$module$build$src$core$utils$aria,addBreakingSpace$$module$build$src$core$utils$aria=!1,module$build$src$core$utils$aria={};module$build$src$core$utils$aria.LiveRegionAssertiveness=LiveRegionAssertiveness$$module$build$src$core$utils$aria;
720
- module$build$src$core$utils$aria.Role=Role$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.State=State$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.announceDynamicAriaState=announceDynamicAriaState$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.clearState=clearState$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.getRole=getRole$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.getState=getState$$module$build$src$core$utils$aria;
721
- module$build$src$core$utils$aria.initializeGlobalAriaLiveRegion=initializeGlobalAriaLiveRegion$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.removeRole=removeRole$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.setRole=setRole$$module$build$src$core$utils$aria;module$build$src$core$utils$aria.setState=setState$$module$build$src$core$utils$aria;var MenuItem$$module$build$src$core$menuitem=class{constructor(a,b){this.content=a;this.opt_value=b;this.enabled=!0;this.element=null;this.rightToLeft=!1;this.roleName=null;this.highlight=this.checked=this.checkable=!1;this.actionHandler=null}createDom(){const a=document.createElement("div");a.id=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.element=a;a.className="blocklyMenuItem "+(this.enabled?"":"blocklyMenuItemDisabled ")+(this.checked?"blocklyMenuItemSelected ":"")+(this.highlight?
1374
+ module$build$src$core$clipboard$workspace_comment_paster.WorkspaceCommentPaster=WorkspaceCommentPaster$$module$build$src$core$clipboard$workspace_comment_paster;var DEFAULT_SNAP_RADIUS$$module$build$src$core$config,module$build$src$core$config;DEFAULT_SNAP_RADIUS$$module$build$src$core$config=28;$.config$$module$build$src$core$config={dragRadius:5,flyoutDragRadius:10,snapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,connectingSnapRadius:DEFAULT_SNAP_RADIUS$$module$build$src$core$config,currentConnectionPreference:8,bumpDelay:250};module$build$src$core$config={config:$.config$$module$build$src$core$config};var MenuItem$$module$build$src$core$menuitem=class{constructor(a,b){this.content=a;this.opt_value=b;this.enabled=!0;this.element=null;this.rightToLeft=!1;this.roleName=null;this.highlight=this.checked=this.checkable=!1;this.actionHandler=null}createDom(){const a=document.createElement("div");a.id=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.element=a;a.className="blocklyMenuItem "+(this.enabled?"":"blocklyMenuItemDisabled ")+(this.checked?"blocklyMenuItemSelected ":"")+(this.highlight?
722
1375
  "blocklyMenuItemHighlight ":"")+(this.rightToLeft?"blocklyMenuItemRtl ":"");const b=document.createElement("div");b.className="blocklyMenuItemContent";let c=this.content;typeof this.content==="string"&&(c=document.createTextNode(this.content));b.appendChild(c);a.appendChild(b);this.checkable&&this.toggleHasCheckbox(!0);this.roleName&&setRole$$module$build$src$core$utils$aria(a,this.roleName);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.SELECTED,this.checkable&&
723
1376
  this.checked||!1);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.DISABLED,!this.enabled);return a}dispose(){this.element=null}getElement(){return this.element}getId(){return this.element.id}getValue(){let a;return(a=this.opt_value)!=null?a:null}setRightToLeft(a){this.rightToLeft=a;let b;(b=this.getElement())==null||b.classList.toggle("blocklyMenuItemRtl",this.rightToLeft)}setRole(a){this.roleName=a}setCheckable(a){(this.checkable=a)||this.setChecked(!1);this.toggleHasCheckbox(a)}setChecked(a){if(!a||
724
1377
  this.checkable)if(this.checked=a,a=this.getElement())a.classList.toggle("blocklyMenuItemSelected",this.checked),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.SELECTED,this.checked)}setHighlighted(a){this.highlight=a;if(this.isEnabled()){let b;(b=this.getElement())==null||b.classList.toggle("blocklyMenuItemHighlight",this.highlight)}}isEnabled(){return this.enabled}setEnabled(a){this.enabled=a;if(a=this.getElement())a.classList.toggle("blocklyMenuItemDisabled",
@@ -767,9 +1420,101 @@ return f}static hide(a,b){a=a.getInjectionDiv().querySelector(`.${CLASS_NAME$$mo
767
1420
  border: none;
768
1421
  cursor: pointer;
769
1422
  }
770
- `);var module$build$src$core$toast={};module$build$src$core$toast.Toast=Toast$$module$build$src$core$toast;var defaultAlert$$module$build$src$core$dialog=function(a,b){window.alert(a);b&&b()},alertImplementation$$module$build$src$core$dialog=defaultAlert$$module$build$src$core$dialog,defaultConfirm$$module$build$src$core$dialog=function(a,b){b(window.confirm(a))},confirmImplementation$$module$build$src$core$dialog=defaultConfirm$$module$build$src$core$dialog,defaultPrompt$$module$build$src$core$dialog=function(a,b,c){c(window.prompt(a,b))},promptImplementation$$module$build$src$core$dialog=defaultPrompt$$module$build$src$core$dialog,
771
- defaultToast$$module$build$src$core$dialog=Toast$$module$build$src$core$toast.show.bind(Toast$$module$build$src$core$toast),toastImplementation$$module$build$src$core$dialog=defaultToast$$module$build$src$core$dialog,module$build$src$core$dialog={};module$build$src$core$dialog.alert=alert$$module$build$src$core$dialog;module$build$src$core$dialog.confirm=confirm$$module$build$src$core$dialog;module$build$src$core$dialog.prompt=prompt$$module$build$src$core$dialog;
772
- module$build$src$core$dialog.setAlert=setAlert$$module$build$src$core$dialog;module$build$src$core$dialog.setConfirm=setConfirm$$module$build$src$core$dialog;module$build$src$core$dialog.setPrompt=setPrompt$$module$build$src$core$dialog;module$build$src$core$dialog.setToast=setToast$$module$build$src$core$dialog;module$build$src$core$dialog.toast=toast$$module$build$src$core$dialog;var module$build$src$core$interfaces$i_legacy_procedure_blocks={};module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureCallBlock=isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureDefBlock=isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;var module$build$src$core$interfaces$i_variable_backed_parameter_model={};module$build$src$core$interfaces$i_variable_backed_parameter_model.isVariableBackedParameterModel=isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model;var previousWarnings$$module$build$src$core$utils$deprecation=new Set,module$build$src$core$utils$deprecation={};module$build$src$core$utils$deprecation.warn=$.warn$$module$build$src$core$utils$deprecation;var CATEGORY_NAME$$module$build$src$core$variables="VARIABLE",VAR_LETTER_OPTIONS$$module$build$src$core$variables="ijkmnopqrstuvwxyzabcdefgh",TEST_ONLY$$module$build$src$core$variables={generateUniqueNameInternal:generateUniqueNameInternal$$module$build$src$core$variables},module$build$src$core$variables={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables,TEST_ONLY:TEST_ONLY$$module$build$src$core$variables,VAR_LETTER_OPTIONS:VAR_LETTER_OPTIONS$$module$build$src$core$variables};
1423
+ `);var module$build$src$core$toast={};module$build$src$core$toast.Toast=Toast$$module$build$src$core$toast;var DialogType$$module$build$src$core$dialog;(function(a){a[a.ALERT=1]="ALERT";a[a.CONFIRM=2]="CONFIRM";a[a.PROMPT=3]="PROMPT"})(DialogType$$module$build$src$core$dialog||(DialogType$$module$build$src$core$dialog={}));
1424
+ var activeDialogCount$$module$build$src$core$dialog=0,defaultAlert$$module$build$src$core$dialog=function(a,b){displayDialog$$module$build$src$core$dialog(DialogType$$module$build$src$core$dialog.ALERT,a,b,void 0)},alertImplementation$$module$build$src$core$dialog=defaultAlert$$module$build$src$core$dialog,defaultConfirm$$module$build$src$core$dialog=function(a,b){displayDialog$$module$build$src$core$dialog(DialogType$$module$build$src$core$dialog.CONFIRM,a,b,void 0)},confirmImplementation$$module$build$src$core$dialog=
1425
+ defaultConfirm$$module$build$src$core$dialog,defaultPrompt$$module$build$src$core$dialog=function(a,b,c){displayDialog$$module$build$src$core$dialog(DialogType$$module$build$src$core$dialog.PROMPT,a,c,b)},promptImplementation$$module$build$src$core$dialog=defaultPrompt$$module$build$src$core$dialog,defaultToast$$module$build$src$core$dialog=Toast$$module$build$src$core$toast.show.bind(Toast$$module$build$src$core$toast),toastImplementation$$module$build$src$core$dialog=defaultToast$$module$build$src$core$dialog,
1426
+ module$build$src$core$dialog={};module$build$src$core$dialog.alert=alert$$module$build$src$core$dialog;module$build$src$core$dialog.confirm=confirm$$module$build$src$core$dialog;module$build$src$core$dialog.prompt=prompt$$module$build$src$core$dialog;module$build$src$core$dialog.setAlert=setAlert$$module$build$src$core$dialog;module$build$src$core$dialog.setConfirm=setConfirm$$module$build$src$core$dialog;module$build$src$core$dialog.setPrompt=setPrompt$$module$build$src$core$dialog;
1427
+ module$build$src$core$dialog.setToast=setToast$$module$build$src$core$dialog;module$build$src$core$dialog.toast=toast$$module$build$src$core$dialog;var BlockBase$$module$build$src$core$events$events_block_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.isBlank=!a;a&&(this.blockId=a.id,this.workspaceId=a.workspace.id)}toJson(){const a=super.toJson();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");a.blockId=this.blockId;return a}static fromJson(a,b,c){b=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,
1428
+ b,c!=null?c:new BlockBase$$module$build$src$core$events$events_block_base);b.blockId=a.blockId;return b}},module$build$src$core$events$events_block_base={};module$build$src$core$events$events_block_base.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;var IconType$$module$build$src$core$icons$icon_types=class{constructor(a){this.name=a}toString(){return this.name}equals(a){return this.name===a.toString()}};IconType$$module$build$src$core$icons$icon_types.MUTATOR=new IconType$$module$build$src$core$icons$icon_types("mutator");IconType$$module$build$src$core$icons$icon_types.WARNING=new IconType$$module$build$src$core$icons$icon_types("warning");IconType$$module$build$src$core$icons$icon_types.COMMENT=new IconType$$module$build$src$core$icons$icon_types("comment");
1429
+ var module$build$src$core$icons$icon_types={};module$build$src$core$icons$icon_types.IconType=IconType$$module$build$src$core$icons$icon_types;var module$build$src$core$interfaces$i_has_bubble={};module$build$src$core$interfaces$i_has_bubble.hasBubble=hasBubble$$module$build$src$core$interfaces$i_has_bubble;var BlockChange$$module$build$src$core$events$events_block_change=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a,b,c,d,e){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;a&&(this.element=b,this.name=c||void 0,this.oldValue=d,this.newValue=e)}toJson(){const a=super.toJson();if(!this.element)throw Error("The changed element is undefined. Either pass an element to the constructor, or call fromJson");a.element=this.element;a.name=this.name;
1430
+ a.oldValue=this.oldValue;a.newValue=this.newValue;this.disabledReason&&(a.disabledReason=this.disabledReason);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockChange$$module$build$src$core$events$events_block_change);b.element=a.element;b.name=a.name;b.oldValue=a.oldValue;b.newValue=a.newValue;a.disabledReason!==void 0&&(b.disabledReason=a.disabledReason);return b}setDisabledReason(a){if(this.element!=="disabled")throw Error('Cannot set the disabled reason for a BlockChange event if the element is not "disabled".');
1431
+ this.disabledReason=a}isNull(){return this.oldValue===this.newValue}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");b=b.getBlockById(this.blockId);if(!b)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");const c=b.getIcon(IconType$$module$build$src$core$icons$icon_types.MUTATOR);c&&hasBubble$$module$build$src$core$interfaces$i_has_bubble(c)&&
1432
+ c.bubbleIsVisible()&&c.setBubbleVisible(!1);a=a?this.newValue:this.oldValue;switch(this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name);break;case "comment":b.setCommentText(a!=null?a:null);break;case "collapsed":b.setCollapsed(!!a);break;case "disabled":var d;b.setDisabledReason(!!a,(d=this.disabledReason)!=null?d:MANUALLY_DISABLED$$module$build$src$core$constants);break;case "inline":b.setInputsInline(!!a);break;case "mutation":d=
1433
+ BlockChange$$module$build$src$core$events$events_block_change.getExtraBlockState_(b);b.loadExtraState?b.loadExtraState(JSON.parse(a||"{}")):b.domToMutation&&b.domToMutation($.textToDom$$module$build$src$core$utils$xml(a||"<mutation/>"));fire$$module$build$src$core$events$utils(new BlockChange$$module$build$src$core$events$events_block_change(b,"mutation",null,d,a));break;default:console.warn("Unknown change type: "+this.element)}}static getExtraBlockState_(a){return a.saveExtraState?(a=a.saveExtraState(!0))?
1434
+ JSON.stringify(a):"":a.mutationToDom?(a=a.mutationToDom())?domToText$$module$build$src$core$xml(a):"":""}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_CHANGE,BlockChange$$module$build$src$core$events$events_block_change);var module$build$src$core$events$events_block_change={};module$build$src$core$events$events_block_change.BlockChange=BlockChange$$module$build$src$core$events$events_block_change;var BlockCreate$$module$build$src$core$events$events_block_create=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_CREATE;a&&(a.isShadow()&&(this.recordUndo=!1),this.ids=getDescendantIds$$module$build$src$core$events$utils(a),this.json=save$$module$build$src$core$serialization$blocks(a,{addCoordinates:!0}))}toJson(){const a=super.toJson();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");
1435
+ if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");a.ids=this.ids;a.json=this.json;this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockCreate$$module$build$src$core$events$events_block_create);b.ids=a.ids;b.json=a.json;a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();
1436
+ if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!allShadowBlocks$$module$build$src$core$events$events_block_create(b,this.ids))if(a)append$$module$build$src$core$serialization$blocks(this.json,b);else for(a=0;a<this.ids.length;a++){const c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't uncreate non-existent block: "+
1437
+ c)}}},allShadowBlocks$$module$build$src$core$events$events_block_create=function(a,b){return b.map(c=>a.getBlockById(c)).filter(c=>c&&c.isShadow()).length===b.length};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_CREATE,BlockCreate$$module$build$src$core$events$events_block_create);var module$build$src$core$events$events_block_create={};module$build$src$core$events$events_block_create.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;var BlockDelete$$module$build$src$core$events$events_block_delete=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_DELETE;if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");a.isShadow()&&(this.recordUndo=!1);this.ids=getDescendantIds$$module$build$src$core$events$utils(a);this.wasShadow=a.isShadow();this.oldJson=save$$module$build$src$core$serialization$blocks(a,{addCoordinates:!0})}}toJson(){const a=
1438
+ super.toJson();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(this.wasShadow===void 0)throw Error("Whether the block was a shadow is undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");a.ids=this.ids;a.wasShadow=this.wasShadow;a.oldJson=this.oldJson;this.recordUndo||(a.recordUndo=this.recordUndo);
1439
+ return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockDelete$$module$build$src$core$events$events_block_delete);b.ids=a.ids;b.wasShadow=a.wasShadow;b.oldJson=a.oldJson;a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");
1440
+ if(a)for(a=0;a<this.ids.length;a++){const c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't delete non-existent block: "+c)}else append$$module$build$src$core$serialization$blocks(this.oldJson,b)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_DELETE,BlockDelete$$module$build$src$core$events$events_block_delete);var module$build$src$core$events$events_block_delete={};
1441
+ module$build$src$core$events$events_block_delete.BlockDelete=BlockDelete$$module$build$src$core$events$events_block_delete;var BlockDrag$$module$build$src$core$events$events_block_drag=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.BLOCK_DRAG;a&&(this.blockId=a.id,this.isStart=b,this.blocks=c)}toJson(){const a=super.toJson();if(this.isStart===void 0)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(this.blockId===
1442
+ void 0)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");a.isStart=this.isStart;a.blockId=this.blockId;a.blocks=this.blocks;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new BlockDrag$$module$build$src$core$events$events_block_drag);b.isStart=a.isStart;b.blockId=a.blockId;b.blocks=a.blocks;return b}};
1443
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_DRAG,BlockDrag$$module$build$src$core$events$events_block_drag);var module$build$src$core$events$events_block_drag={};module$build$src$core$events$events_block_drag.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;var BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a,b,c,d){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE;this.recordUndo=!1;a&&(this.name=b,this.oldValue=c,this.newValue=d)}toJson(){const a=super.toJson();if(!this.name)throw Error("The changed field name is undefined. Either pass a name to the constructor, or call fromJson.");
1444
+ a.name=this.name;a.oldValue=this.oldValue;a.newValue=this.newValue;return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change);b.name=a.name;b.oldValue=a.oldValue;b.newValue=a.newValue;return b}isNull(){return this.oldValue===this.newValue}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");
1445
+ b=b.getBlockById(this.blockId);if(!b)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");a=a?this.newValue:this.oldValue;(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE,BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change);
1446
+ var module$build$src$core$events$events_block_field_intermediate_change={};module$build$src$core$events$events_block_field_intermediate_change.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change;var ConnectionType$$module$build$src$core$connection_type;(function(a){a[a.INPUT_VALUE=1]="INPUT_VALUE";a[a.OUTPUT_VALUE=2]="OUTPUT_VALUE";a[a.NEXT_STATEMENT=3]="NEXT_STATEMENT";a[a.PREVIOUS_STATEMENT=4]="PREVIOUS_STATEMENT"})(ConnectionType$$module$build$src$core$connection_type||(ConnectionType$$module$build$src$core$connection_type={}));var module$build$src$core$connection_type={};module$build$src$core$connection_type.ConnectionType=ConnectionType$$module$build$src$core$connection_type;var BlockMove$$module$build$src$core$events$events_block_move=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_MOVE;a&&(a.isShadow()&&(this.recordUndo=!1),a=this.currentLocation(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)}toJson(){const a=super.toJson();a.oldParentId=this.oldParentId;a.oldInputName=this.oldInputName;this.oldCoordinate&&(a.oldCoordinate=
1447
+ `${Math.round(this.oldCoordinate.x)}, ${Math.round(this.oldCoordinate.y)}`);a.newParentId=this.newParentId;a.newInputName=this.newInputName;this.newCoordinate&&(a.newCoordinate=`${Math.round(this.newCoordinate.x)}, ${Math.round(this.newCoordinate.y)}`);this.reason&&(a.reason=this.reason);this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockMove$$module$build$src$core$events$events_block_move);
1448
+ b.oldParentId=a.oldParentId;b.oldInputName=a.oldInputName;a.oldCoordinate&&(c=a.oldCoordinate.split(","),b.oldCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));b.newParentId=a.newParentId;b.newInputName=a.newInputName;a.newCoordinate&&(c=a.newCoordinate.split(","),b.newCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));a.reason!==void 0&&(b.reason=a.reason);a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}recordNew(){const a=
1449
+ this.currentLocation();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate}setReason(a){this.reason=a}currentLocation(){var a=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var b=a.getBlockById(this.blockId);if(!b)throw Error("The block associated with the block move event could not be found");a={};const c=b.getParent();if(c){if(a.parentId=c.id,b=c.getInputWithBlock(b))a.inputName=
1450
+ b.name}else a.coordinate=b.getRelativeToSurfaceXY();return a}isNull(){return this.oldParentId===this.newParentId&&this.oldInputName===this.newInputName&&Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate,this.newCoordinate)}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:
1451
+ this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;if(d){var f=b.getBlockById(d);if(!f){console.warn("Can't connect to non-existent block: "+d);return}}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y,this.reason);else{b=c.outputConnection;if(!b||c.previousConnection&&c.previousConnection.isConnected())b=c.previousConnection;let g,h;c=(h=b)==null?void 0:h.type;if(e){if(c=f.getInput(e))g=c.connection}else c===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT&&
1452
+ (g=f.nextConnection);g&&b?b.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_MOVE,BlockMove$$module$build$src$core$events$events_block_move);var module$build$src$core$events$events_block_move={};module$build$src$core$events$events_block_move.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;var BubbleOpen$$module$build$src$core$events$events_bubble_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.BUBBLE_OPEN;a&&(this.blockId=a.id,this.isOpen=b,this.bubbleType=c)}toJson(){const a=super.toJson();if(this.isOpen===void 0)throw Error("Whether this event is for opening the bubble is undefined. Either pass the value to the constructor, or call fromJson");if(!this.bubbleType)throw Error("The type of bubble is undefined. Either pass the value to the constructor, or call fromJson");
1453
+ a.isOpen=this.isOpen;a.bubbleType=this.bubbleType;a.blockId=this.blockId||"";return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new BubbleOpen$$module$build$src$core$events$events_bubble_open);b.isOpen=a.isOpen;b.bubbleType=a.bubbleType;b.blockId=a.blockId;return b}},BubbleType$$module$build$src$core$events$events_bubble_open;
1454
+ (function(a){a.MUTATOR="mutator";a.COMMENT="comment";a.WARNING="warning"})(BubbleType$$module$build$src$core$events$events_bubble_open||(BubbleType$$module$build$src$core$events$events_bubble_open={}));register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BUBBLE_OPEN,BubbleOpen$$module$build$src$core$events$events_bubble_open);var module$build$src$core$events$events_bubble_open={};
1455
+ module$build$src$core$events$events_bubble_open.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events_bubble_open.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;var CommentBase$$module$build$src$core$events$events_comment_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.isBlank=!a;a&&(this.commentId=a.id,this.workspaceId=a.workspace.id,this.group=$.getGroup$$module$build$src$core$events$utils(),this.recordUndo=getRecordUndo$$module$build$src$core$events$utils())}toJson(){const a=super.toJson();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1456
+ a.commentId=this.commentId;return a}static fromJson(a,b,c){b=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,b,c!=null?c:new CommentBase$$module$build$src$core$events$events_comment_base);b.commentId=a.commentId;return b}static CommentCreateDeleteHelper(a,b){const c=a.getEventWorkspace_();if(b){if(!a.json)throw Error("Encountered a comment event without proper json");append$$module$build$src$core$serialization$workspace_comments(a.json,c)}else{if(!a.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1457
+ (b=c.getCommentById(a.commentId))?b.dispose():console.warn("Can't delete non-existent comment: "+a.commentId)}}},module$build$src$core$events$events_comment_base={};module$build$src$core$events$events_comment_base.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;var CommentChange$$module$build$src$core$events$events_comment_change=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a,b,c){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_CHANGE;a&&(this.oldContents_=typeof b==="undefined"?"":b,this.newContents_=typeof c==="undefined"?"":c)}toJson(){const a=super.toJson();if(!this.oldContents_)throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");if(!this.newContents_)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");
1458
+ a.oldContents=this.oldContents_;a.newContents=this.newContents_;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentChange$$module$build$src$core$events$events_comment_change);b.oldContents_=a.oldContents;b.newContents_=a.newContents;return b}isNull(){return this.oldContents_===this.newContents_}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1459
+ if(b=b.getCommentById(this.commentId)){var c=a?this.newContents_:this.oldContents_;if(c===void 0){if(a)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");}b.setText(c)}else console.warn("Can't change non-existent comment: "+this.commentId)}};
1460
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_CHANGE,CommentChange$$module$build$src$core$events$events_comment_change);var module$build$src$core$events$events_comment_change={};module$build$src$core$events$events_comment_change.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;var CommentCollapse$$module$build$src$core$events$events_comment_collapse=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a,b){super(a);this.newCollapsed=b;this.type=EventType$$module$build$src$core$events$type.COMMENT_COLLAPSE}toJson(){const a=super.toJson();if(this.newCollapsed===void 0)throw Error("The new collapse value undefined. Either call recordNew, or call fromJson");a.newCollapsed=this.newCollapsed;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,
1461
+ b,c!=null?c:new CommentCollapse$$module$build$src$core$events$events_comment_collapse);b.newCollapsed=a.newCollapsed;return b}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");(b=b.getCommentById(this.commentId))?b.setCollapsed(a?!!this.newCollapsed:!this.newCollapsed):console.warn("Can't collapse or uncollapse non-existent comment: "+this.commentId)}};
1462
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_COLLAPSE,CommentCollapse$$module$build$src$core$events$events_comment_collapse);var module$build$src$core$events$events_comment_collapse={};module$build$src$core$events$events_comment_collapse.CommentCollapse=CommentCollapse$$module$build$src$core$events$events_comment_collapse;var CommentCreate$$module$build$src$core$events$events_comment_create=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_CREATE;a&&(this.json=save$$module$build$src$core$serialization$workspace_comments(a,{addCoordinates:!0}))}toJson(){const a=super.toJson();if(!this.json)throw Error("The comment JSON is undefined. Either pass a block to the constructor, or call fromJson");a.json=this.json;
1463
+ return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentCreate$$module$build$src$core$events$events_comment_create);b.json=a.json;return b}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,a)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_CREATE,CommentCreate$$module$build$src$core$events$events_comment_create);
1464
+ var module$build$src$core$events$events_comment_create={};module$build$src$core$events$events_comment_create.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create;var CommentDelete$$module$build$src$core$events$events_comment_delete=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_DELETE;a&&(this.json=save$$module$build$src$core$serialization$workspace_comments(a,{addCoordinates:!0}))}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,!a)}toJson(){const a=super.toJson();if(!this.json)throw Error("The comment JSON is undefined. Either pass a block to the constructor, or call fromJson");
1465
+ a.json=this.json;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentDelete$$module$build$src$core$events$events_comment_delete);b.json=a.json;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_DELETE,CommentDelete$$module$build$src$core$events$events_comment_delete);var module$build$src$core$events$events_comment_delete={};
1466
+ module$build$src$core$events$events_comment_delete.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;var CommentDrag$$module$build$src$core$events$events_comment_drag=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.COMMENT_DRAG;a&&(this.commentId=a.id,this.isStart=b)}toJson(){const a=super.toJson();if(this.isStart===void 0)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(this.commentId===void 0)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1467
+ a.isStart=this.isStart;a.commentId=this.commentId;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new CommentDrag$$module$build$src$core$events$events_comment_drag);b.isStart=a.isStart;b.commentId=a.commentId;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_DRAG,CommentDrag$$module$build$src$core$events$events_comment_drag);
1468
+ var module$build$src$core$events$events_comment_drag={};module$build$src$core$events$events_comment_drag.CommentDrag=CommentDrag$$module$build$src$core$events$events_comment_drag;var CommentMove$$module$build$src$core$events$events_comment_move=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_MOVE;a&&(this.comment_=a,this.oldCoordinate_=a.getRelativeToSurfaceXY())}recordNew(){if(this.newCoordinate_)throw Error("Tried to record the new position of a comment on the same event twice.");if(!this.comment_)throw Error("The comment is undefined. Pass a comment to the constructor if you want to use the record functionality");
1469
+ this.newCoordinate_=this.comment_.getRelativeToSurfaceXY()}setReason(a){this.reason=a}setOldCoordinate(a){this.oldCoordinate_=a}toJson(){const a=super.toJson();if(!this.oldCoordinate_)throw Error("The old comment position is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newCoordinate_)throw Error("The new comment position is undefined. Either call recordNew, or call fromJson");a.oldCoordinate=`${Math.round(this.oldCoordinate_.x)}, ${Math.round(this.oldCoordinate_.y)}`;
1470
+ a.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y);return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentMove$$module$build$src$core$events$events_comment_move);c=a.oldCoordinate.split(",");b.oldCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1]));c=a.newCoordinate.split(",");b.newCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),
1471
+ Number(c[1]));return b}isNull(){return Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate_,this.newCoordinate_)}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){a=a?this.newCoordinate_:this.oldCoordinate_;if(!a)throw Error("Either oldCoordinate_ or newCoordinate_ is undefined. Either pass a comment to the constructor and call recordNew, or call fromJson");
1472
+ b.moveTo(a)}else console.warn("Can't move non-existent comment: "+this.commentId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_MOVE,CommentMove$$module$build$src$core$events$events_comment_move);var module$build$src$core$events$events_comment_move={};module$build$src$core$events$events_comment_move.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;var CommentResize$$module$build$src$core$events$events_comment_resize=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_RESIZE;a&&(this.oldSize=a.getSize())}recordCurrentSizeAsNewSize(){if(this.newSize)throw Error("Tried to record the new size of a comment on the same event twice.");var a=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1473
+ a=a.getCommentById(this.commentId);if(!a)throw Error("The comment associated with the comment resize event could not be found");this.newSize=a.getSize()}toJson(){const a=super.toJson();if(!this.oldSize)throw Error("The old comment size is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newSize)throw Error("The new comment size is undefined. Either call recordCurrentSizeAsNewSize, or call fromJson");a.oldWidth=Math.round(this.oldSize.width);a.oldHeight=Math.round(this.oldSize.height);
1474
+ a.newWidth=Math.round(this.newSize.width);a.newHeight=Math.round(this.newSize.height);return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentResize$$module$build$src$core$events$events_comment_resize);b.oldSize=new Size$$module$build$src$core$utils$size(a.oldWidth,a.oldHeight);b.newSize=new Size$$module$build$src$core$utils$size(a.newWidth,a.newHeight);return b}isNull(){return Size$$module$build$src$core$utils$size.equals(this.oldSize,
1475
+ this.newSize)}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){a=a?this.newSize:this.oldSize;if(!a)throw Error("Either oldSize or newSize is undefined. Either pass a comment to the constructor and call recordCurrentSizeAsNewSize, or call fromJson");b.setSize(a)}else console.warn("Can't resize non-existent comment: "+this.commentId)}};
1476
+ register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_RESIZE,CommentResize$$module$build$src$core$events$events_comment_resize);var module$build$src$core$events$events_comment_resize={};module$build$src$core$events$events_comment_resize.CommentResize=CommentResize$$module$build$src$core$events$events_comment_resize;var Selected$$module$build$src$core$events$events_selected=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=EventType$$module$build$src$core$events$type.SELECTED;this.oldElementId=a!=null?a:void 0;this.newElementId=b!=null?b:void 0}toJson(){const a=super.toJson();a.oldElementId=this.oldElementId;a.newElementId=this.newElementId;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new Selected$$module$build$src$core$events$events_selected);
1477
+ b.oldElementId=a.oldElementId;b.newElementId=a.newElementId;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.SELECTED,Selected$$module$build$src$core$events$events_selected);var module$build$src$core$events$events_selected={};module$build$src$core$events$events_selected.Selected=Selected$$module$build$src$core$events$events_selected;var ThemeChange$$module$build$src$core$events$events_theme_change=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=EventType$$module$build$src$core$events$type.THEME_CHANGE;this.themeName=a}toJson(){const a=super.toJson();if(!this.themeName)throw Error("The theme name is undefined. Either pass a theme name to the constructor, or call fromJson");a.themeName=this.themeName;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,
1478
+ b,c!=null?c:new ThemeChange$$module$build$src$core$events$events_theme_change);b.themeName=a.themeName;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.THEME_CHANGE,ThemeChange$$module$build$src$core$events$events_theme_change);var module$build$src$core$events$events_theme_change={};module$build$src$core$events$events_theme_change.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;var ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT;this.oldItem=a!=null?a:void 0;this.newItem=b!=null?b:void 0}toJson(){const a=super.toJson();a.oldItem=this.oldItem;a.newItem=this.newItem;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select);
1479
+ b.oldItem=a.oldItem;b.newItem=a.newItem;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT,ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select);var module$build$src$core$events$events_toolbox_item_select={};module$build$src$core$events$events_toolbox_item_select.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select;var TrashcanOpen$$module$build$src$core$events$events_trashcan_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=EventType$$module$build$src$core$events$type.TRASHCAN_OPEN;this.isOpen=a}toJson(){const a=super.toJson();if(this.isOpen===void 0)throw Error("Whether this is already open or not is undefined. Either pass a value to the constructor, or call fromJson");a.isOpen=this.isOpen;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,
1480
+ b,c!=null?c:new TrashcanOpen$$module$build$src$core$events$events_trashcan_open);b.isOpen=a.isOpen;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.TRASHCAN_OPEN,TrashcanOpen$$module$build$src$core$events$events_trashcan_open);var module$build$src$core$events$events_trashcan_open={};module$build$src$core$events$events_trashcan_open.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;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=!0;this.isBlank=typeof a==="undefined";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=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,
1481
+ b,c!=null?c:new VarBase$$module$build$src$core$events$events_var_base);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(this.varType===void 0)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");
1482
+ a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarCreate$$module$build$src$core$events$events_var_create);b.varType=a.varType;b.varName=a.varName;return b}run(a){var 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");
1483
+ b=b.getVariableMap();a?b.createVariable(this.varName,this.varType,this.varId):(a=b.getVariableById(this.varId))&&b.deleteVariable(a)}};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 VarDelete$$module$build$src$core$events$events_var_delete=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_DELETE;a&&(this.varType=a.getType(),this.varName=a.getName())}toJson(){const a=super.toJson();if(this.varType===void 0)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");
1484
+ a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarDelete$$module$build$src$core$events$events_var_delete);b.varType=a.varType;b.varName=a.varName;return b}run(a){var 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");
1485
+ b=b.getVariableMap();a?(a=b.getVariableById(this.varId))&&b.deleteVariable(a):b.createVariable(this.varName,this.varType,this.varId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_DELETE,VarDelete$$module$build$src$core$events$events_var_delete);var module$build$src$core$events$events_var_delete={};module$build$src$core$events$events_var_delete.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete;var VarRename$$module$build$src$core$events$events_var_rename=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a,b){super(a);this.type=EventType$$module$build$src$core$events$type.VAR_RENAME;a&&(this.oldName=a.getName(),this.newName=typeof b==="undefined"?"":b)}toJson(){const a=super.toJson();if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");
1486
+ a.oldName=this.oldName;a.newName=this.newName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarRename$$module$build$src$core$events$events_var_rename);b.oldName=a.oldName;b.newName=a.newName;return b}run(a){var 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.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");
1487
+ if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");b=b.getVariableMap();const c=b.getVariableById(this.varId);a?c&&b.renameVariable(c,this.newName):c&&b.renameVariable(c,this.oldName)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_RENAME,VarRename$$module$build$src$core$events$events_var_rename);
1488
+ var module$build$src$core$events$events_var_rename={};module$build$src$core$events$events_var_rename.VarRename=VarRename$$module$build$src$core$events$events_var_rename;var VarTypeChange$$module$build$src$core$events$events_var_type_change=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a,b,c){super(a);this.oldType=b;this.newType=c;this.type=EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE}toJson(){const a=super.toJson();if(!this.oldType||!this.newType)throw Error("The variable's types are undefined. Either pass them to the constructor, or call fromJson");a.oldType=this.oldType;a.newType=this.newType;return a}static fromJson(a,
1489
+ b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarTypeChange$$module$build$src$core$events$events_var_type_change);b.oldType=a.oldType;b.newType=a.newType;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.oldType||!this.newType)throw Error("The variable's types are undefined. Either pass them to the constructor, or call fromJson");const c=
1490
+ b.getVariableMap().getVariableById(this.varId);c&&(a?b.getVariableMap().changeVariableType(c,this.newType):b.getVariableMap().changeVariableType(c,this.oldType))}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE,VarTypeChange$$module$build$src$core$events$events_var_type_change);var module$build$src$core$events$events_var_type_change={};
1491
+ module$build$src$core$events$events_var_type_change.VarTypeChange=VarTypeChange$$module$build$src$core$events$events_var_type_change;var ViewportChange$$module$build$src$core$events$events_viewport=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c,d,e){super(d);this.type=EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE;this.viewTop=a;this.viewLeft=b;this.scale=c;this.oldScale=e}toJson(){const a=super.toJson();if(this.viewTop===void 0)throw Error("The view top is undefined. Either pass a value to the constructor, or call fromJson");if(this.viewLeft===void 0)throw Error("The view left is undefined. Either pass a value to the constructor, or call fromJson");
1492
+ if(this.scale===void 0)throw Error("The scale is undefined. Either pass a value to the constructor, or call fromJson");if(this.oldScale===void 0)throw Error("The old scale is undefined. Either pass a value to the constructor, or call fromJson");a.viewTop=this.viewTop;a.viewLeft=this.viewLeft;a.scale=this.scale;a.oldScale=this.oldScale;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new ViewportChange$$module$build$src$core$events$events_viewport);
1493
+ b.viewTop=a.viewTop;b.viewLeft=a.viewLeft;b.scale=a.scale;b.oldScale=a.oldScale;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE,ViewportChange$$module$build$src$core$events$events_viewport);var module$build$src$core$events$events_viewport={};module$build$src$core$events$events_viewport.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;var FinishedLoading$$module$build$src$core$events$workspace_events=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.recordUndo=!1;this.type=EventType$$module$build$src$core$events$type.FINISHED_LOADING;this.isBlank=!!a;a&&(this.workspaceId=a.id)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.FINISHED_LOADING,FinishedLoading$$module$build$src$core$events$workspace_events);
1494
+ var module$build$src$core$events$workspace_events={};module$build$src$core$events$workspace_events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events;var BLOCK_DRAG$$module$build$src$core$events$events,BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events,BUBBLE_OPEN$$module$build$src$core$events$events,CHANGE$$module$build$src$core$events$events,CLICK$$module$build$src$core$events$events,COMMENT_CHANGE$$module$build$src$core$events$events,COMMENT_CREATE$$module$build$src$core$events$events,COMMENT_DELETE$$module$build$src$core$events$events,COMMENT_MOVE$$module$build$src$core$events$events,COMMENT_RESIZE$$module$build$src$core$events$events,
1495
+ COMMENT_DRAG$$module$build$src$core$events$events,CREATE$$module$build$src$core$events$events,DELETE$$module$build$src$core$events$events,FINISHED_LOADING$$module$build$src$core$events$events,MOVE$$module$build$src$core$events$events,SELECTED$$module$build$src$core$events$events,THEME_CHANGE$$module$build$src$core$events$events,TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events,TRASHCAN_OPEN$$module$build$src$core$events$events,UI$$module$build$src$core$events$events,VAR_CREATE$$module$build$src$core$events$events,
1496
+ VAR_DELETE$$module$build$src$core$events$events,VAR_RENAME$$module$build$src$core$events$events,VIEWPORT_CHANGE$$module$build$src$core$events$events,module$build$src$core$events$events;$.BLOCK_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;$.BLOCK_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CREATE;$.BLOCK_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DELETE;
1497
+ BLOCK_DRAG$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DRAG;$.BLOCK_MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_MOVE;BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE;BUBBLE_OPEN$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BUBBLE_OPEN;
1498
+ CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;CLICK$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.CLICK;COMMENT_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_CHANGE;COMMENT_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_CREATE;COMMENT_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_DELETE;
1499
+ COMMENT_MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_MOVE;COMMENT_RESIZE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_RESIZE;COMMENT_DRAG$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_DRAG;CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CREATE;DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DELETE;
1500
+ FINISHED_LOADING$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.FINISHED_LOADING;MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_MOVE;SELECTED$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.SELECTED;THEME_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.THEME_CHANGE;TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT;
1501
+ TRASHCAN_OPEN$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.TRASHCAN_OPEN;UI$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.UI;VAR_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_CREATE;VAR_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_DELETE;VAR_RENAME$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_RENAME;
1502
+ VIEWPORT_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE;module$build$src$core$events$events={};module$build$src$core$events$events.Abstract=Abstract$$module$build$src$core$events$events_abstract;module$build$src$core$events$events.BLOCK_CHANGE=$.BLOCK_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_CREATE=$.BLOCK_CREATE$$module$build$src$core$events$events;
1503
+ module$build$src$core$events$events.BLOCK_DELETE=$.BLOCK_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_DRAG=BLOCK_DRAG$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_FIELD_INTERMEDIATE_CHANGE=BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_MOVE=$.BLOCK_MOVE$$module$build$src$core$events$events;module$build$src$core$events$events.BUBBLE_OPEN=BUBBLE_OPEN$$module$build$src$core$events$events;
1504
+ module$build$src$core$events$events.BUMP_EVENTS=BUMP_EVENTS$$module$build$src$core$events$type;module$build$src$core$events$events.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;module$build$src$core$events$events.BlockChange=BlockChange$$module$build$src$core$events$events_block_change;module$build$src$core$events$events.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;module$build$src$core$events$events.BlockDelete=BlockDelete$$module$build$src$core$events$events_block_delete;
1505
+ module$build$src$core$events$events.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;module$build$src$core$events$events.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change;module$build$src$core$events$events.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;module$build$src$core$events$events.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;
1506
+ module$build$src$core$events$events.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events.CHANGE=CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.CLICK=CLICK$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_CHANGE=COMMENT_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_CREATE=COMMENT_CREATE$$module$build$src$core$events$events;
1507
+ module$build$src$core$events$events.COMMENT_DELETE=COMMENT_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_DRAG=COMMENT_DRAG$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_MOVE=COMMENT_MOVE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_RESIZE=COMMENT_RESIZE$$module$build$src$core$events$events;module$build$src$core$events$events.CREATE=CREATE$$module$build$src$core$events$events;
1508
+ module$build$src$core$events$events.Click=Click$$module$build$src$core$events$events_click;module$build$src$core$events$events.ClickTarget=ClickTarget$$module$build$src$core$events$events_click;module$build$src$core$events$events.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;module$build$src$core$events$events.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;module$build$src$core$events$events.CommentCollapse=CommentCollapse$$module$build$src$core$events$events_comment_collapse;
1509
+ module$build$src$core$events$events.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create;module$build$src$core$events$events.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;module$build$src$core$events$events.CommentDrag=CommentDrag$$module$build$src$core$events$events_comment_drag;module$build$src$core$events$events.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;
1510
+ module$build$src$core$events$events.CommentResize=CommentResize$$module$build$src$core$events$events_comment_resize;module$build$src$core$events$events.DELETE=DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.FINISHED_LOADING=FINISHED_LOADING$$module$build$src$core$events$events;module$build$src$core$events$events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events;module$build$src$core$events$events.MOVE=MOVE$$module$build$src$core$events$events;
1511
+ module$build$src$core$events$events.SELECTED=SELECTED$$module$build$src$core$events$events;module$build$src$core$events$events.Selected=Selected$$module$build$src$core$events$events_selected;module$build$src$core$events$events.THEME_CHANGE=THEME_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.TOOLBOX_ITEM_SELECT=TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events;module$build$src$core$events$events.TRASHCAN_OPEN=TRASHCAN_OPEN$$module$build$src$core$events$events;
1512
+ module$build$src$core$events$events.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;module$build$src$core$events$events.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select;module$build$src$core$events$events.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;module$build$src$core$events$events.UI=UI$$module$build$src$core$events$events;module$build$src$core$events$events.UiBase=UiBase$$module$build$src$core$events$events_ui_base;
1513
+ module$build$src$core$events$events.VAR_CREATE=VAR_CREATE$$module$build$src$core$events$events;module$build$src$core$events$events.VAR_DELETE=VAR_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.VAR_RENAME=VAR_RENAME$$module$build$src$core$events$events;module$build$src$core$events$events.VIEWPORT_CHANGE=VIEWPORT_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.VarBase=VarBase$$module$build$src$core$events$events_var_base;
1514
+ module$build$src$core$events$events.VarCreate=VarCreate$$module$build$src$core$events$events_var_create;module$build$src$core$events$events.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete;module$build$src$core$events$events.VarRename=VarRename$$module$build$src$core$events$events_var_rename;module$build$src$core$events$events.VarTypeChange=VarTypeChange$$module$build$src$core$events$events_var_type_change;module$build$src$core$events$events.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;
1515
+ module$build$src$core$events$events.clearPendingUndo=clearPendingUndo$$module$build$src$core$events$utils;module$build$src$core$events$events.disable=$.disable$$module$build$src$core$events$utils;module$build$src$core$events$events.disableOrphans=disableOrphans$$module$build$src$core$events$utils;module$build$src$core$events$events.enable=$.enable$$module$build$src$core$events$utils;module$build$src$core$events$events.filter=filter$$module$build$src$core$events$utils;
1516
+ module$build$src$core$events$events.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$events.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$events.get=get$$module$build$src$core$events$utils;module$build$src$core$events$events.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils;module$build$src$core$events$events.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;
1517
+ module$build$src$core$events$events.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$events.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.setRecordUndo=$.setRecordUndo$$module$build$src$core$events$utils;var module$build$src$core$interfaces$i_legacy_procedure_blocks={};module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureCallBlock=isLegacyProcedureCallBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;module$build$src$core$interfaces$i_legacy_procedure_blocks.isLegacyProcedureDefBlock=isLegacyProcedureDefBlock$$module$build$src$core$interfaces$i_legacy_procedure_blocks;var module$build$src$core$interfaces$i_variable_backed_parameter_model={};module$build$src$core$interfaces$i_variable_backed_parameter_model.isVariableBackedParameterModel=isVariableBackedParameterModel$$module$build$src$core$interfaces$i_variable_backed_parameter_model;var previousWarnings$$module$build$src$core$utils$deprecation=new Set,module$build$src$core$utils$deprecation={};module$build$src$core$utils$deprecation.warn=$.warn$$module$build$src$core$utils$deprecation;var CATEGORY_NAME$$module$build$src$core$variables="VARIABLE",VAR_LETTER_OPTIONS$$module$build$src$core$variables="ijkmnopqrstuvwxyzabcdefgh",TEST_ONLY$$module$build$src$core$variables={generateUniqueNameInternal:generateUniqueNameInternal$$module$build$src$core$variables},module$build$src$core$variables={CATEGORY_NAME:CATEGORY_NAME$$module$build$src$core$variables,TEST_ONLY:TEST_ONLY$$module$build$src$core$variables,VAR_LETTER_OPTIONS:VAR_LETTER_OPTIONS$$module$build$src$core$variables};
773
1518
  module$build$src$core$variables.allDeveloperVariables=$.allDeveloperVariables$$module$build$src$core$variables;module$build$src$core$variables.allUsedVarModels=$.allUsedVarModels$$module$build$src$core$variables;module$build$src$core$variables.compareByName=compareByName$$module$build$src$core$variables;module$build$src$core$variables.createVariableButtonHandler=createVariableButtonHandler$$module$build$src$core$variables;module$build$src$core$variables.deleteVariable=$.deleteVariable$$module$build$src$core$variables;
774
1519
  module$build$src$core$variables.flyoutCategory=flyoutCategory$$module$build$src$core$variables;module$build$src$core$variables.flyoutCategoryBlocks=flyoutCategoryBlocks$$module$build$src$core$variables;module$build$src$core$variables.generateUniqueName=generateUniqueName$$module$build$src$core$variables;module$build$src$core$variables.generateUniqueNameFromOptions=generateUniqueNameFromOptions$$module$build$src$core$variables;module$build$src$core$variables.generateVariableFieldDom=generateVariableFieldDom$$module$build$src$core$variables;
775
1520
  module$build$src$core$variables.getAddedVariables=getAddedVariables$$module$build$src$core$variables;module$build$src$core$variables.getOrCreateVariablePackage=$.getOrCreateVariablePackage$$module$build$src$core$variables;module$build$src$core$variables.getVariable=$.getVariable$$module$build$src$core$variables;module$build$src$core$variables.getVariableUsesById=getVariableUsesById$$module$build$src$core$variables;module$build$src$core$variables.internalFlyoutCategory=internalFlyoutCategory$$module$build$src$core$variables;
@@ -780,14 +1525,7 @@ ${b} to its parent, because: ${a}`);this.childBlock=c;this.childState=d}},RealCh
780
1525
  b,c){super(`Cannot add an icon of type '${a}' to the block ${b.toDevString()}, because there is no icon registered with type '${a}'. Make sure that all of your icons have been registered.`);this.block=b;this.state=c}},module$build$src$core$serialization$exceptions={};module$build$src$core$serialization$exceptions.BadConnectionCheck=BadConnectionCheck$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.DeserializationError=DeserializationError$$module$build$src$core$serialization$exceptions;
781
1526
  module$build$src$core$serialization$exceptions.MissingBlockType=MissingBlockType$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.MissingConnection=MissingConnection$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.RealChildOfShadow=RealChildOfShadow$$module$build$src$core$serialization$exceptions;module$build$src$core$serialization$exceptions.UnregisteredIcon=UnregisteredIcon$$module$build$src$core$serialization$exceptions;var saveBlock$$module$build$src$core$serialization$blocks=save$$module$build$src$core$serialization$blocks,BlockSerializer$$module$build$src$core$serialization$blocks=class{constructor(){this.priority=BLOCKS$$module$build$src$core$serialization$priorities}save(a){const b=[];for(const c of a.getTopBlocks(!1))(a=save$$module$build$src$core$serialization$blocks(c,{addCoordinates:!0,doFullSerialization:!1}))&&b.push(a);return b.length?{languageVersion:0,blocks:b}:null}load(a,b){a=a.blocks;for(const c of a)append$$module$build$src$core$serialization$blocks(c,
782
1527
  b,{recordUndo:getRecordUndo$$module$build$src$core$events$utils()})}clear(a){for(const b of a.getTopBlocks(!1))b.dispose(!1)}};register$$module$build$src$core$serialization$registry("blocks",new BlockSerializer$$module$build$src$core$serialization$blocks);var module$build$src$core$serialization$blocks={};module$build$src$core$serialization$blocks.BlockSerializer=BlockSerializer$$module$build$src$core$serialization$blocks;module$build$src$core$serialization$blocks.append=append$$module$build$src$core$serialization$blocks;
783
- module$build$src$core$serialization$blocks.appendInternal=appendInternal$$module$build$src$core$serialization$blocks;module$build$src$core$serialization$blocks.save=save$$module$build$src$core$serialization$blocks;var IconType$$module$build$src$core$icons$icon_types=class{constructor(a){this.name=a}toString(){return this.name}equals(a){return this.name===a.toString()}};IconType$$module$build$src$core$icons$icon_types.MUTATOR=new IconType$$module$build$src$core$icons$icon_types("mutator");IconType$$module$build$src$core$icons$icon_types.WARNING=new IconType$$module$build$src$core$icons$icon_types("warning");IconType$$module$build$src$core$icons$icon_types.COMMENT=new IconType$$module$build$src$core$icons$icon_types("comment");
784
- var module$build$src$core$icons$icon_types={};module$build$src$core$icons$icon_types.IconType=IconType$$module$build$src$core$icons$icon_types;var module$build$src$core$interfaces$i_has_bubble={};module$build$src$core$interfaces$i_has_bubble.hasBubble=hasBubble$$module$build$src$core$interfaces$i_has_bubble;var BlockBase$$module$build$src$core$events$events_block_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.isBlank=!a;a&&(this.blockId=a.id,this.workspaceId=a.workspace.id)}toJson(){const a=super.toJson();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");a.blockId=this.blockId;return a}static fromJson(a,b,c){b=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,
785
- b,c!=null?c:new BlockBase$$module$build$src$core$events$events_block_base);b.blockId=a.blockId;return b}},module$build$src$core$events$events_block_base={};module$build$src$core$events$events_block_base.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;var BlockChange$$module$build$src$core$events$events_block_change=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a,b,c,d,e){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;a&&(this.element=b,this.name=c||void 0,this.oldValue=d,this.newValue=e)}toJson(){const a=super.toJson();if(!this.element)throw Error("The changed element is undefined. Either pass an element to the constructor, or call fromJson");a.element=this.element;a.name=this.name;
786
- a.oldValue=this.oldValue;a.newValue=this.newValue;this.disabledReason&&(a.disabledReason=this.disabledReason);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockChange$$module$build$src$core$events$events_block_change);b.element=a.element;b.name=a.name;b.oldValue=a.oldValue;b.newValue=a.newValue;a.disabledReason!==void 0&&(b.disabledReason=a.disabledReason);return b}setDisabledReason(a){if(this.element!=="disabled")throw Error('Cannot set the disabled reason for a BlockChange event if the element is not "disabled".');
787
- this.disabledReason=a}isNull(){return this.oldValue===this.newValue}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");b=b.getBlockById(this.blockId);if(!b)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");const c=b.getIcon(IconType$$module$build$src$core$icons$icon_types.MUTATOR);c&&hasBubble$$module$build$src$core$interfaces$i_has_bubble(c)&&
788
- c.bubbleIsVisible()&&c.setBubbleVisible(!1);a=a?this.newValue:this.oldValue;switch(this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name);break;case "comment":b.setCommentText(a!=null?a:null);break;case "collapsed":b.setCollapsed(!!a);break;case "disabled":var d;b.setDisabledReason(!!a,(d=this.disabledReason)!=null?d:MANUALLY_DISABLED$$module$build$src$core$constants);break;case "inline":b.setInputsInline(!!a);break;case "mutation":d=
789
- BlockChange$$module$build$src$core$events$events_block_change.getExtraBlockState_(b);b.loadExtraState?b.loadExtraState(JSON.parse(a||"{}")):b.domToMutation&&b.domToMutation($.textToDom$$module$build$src$core$utils$xml(a||"<mutation/>"));fire$$module$build$src$core$events$utils(new BlockChange$$module$build$src$core$events$events_block_change(b,"mutation",null,d,a));break;default:console.warn("Unknown change type: "+this.element)}}static getExtraBlockState_(a){return a.saveExtraState?(a=a.saveExtraState(!0))?
790
- JSON.stringify(a):"":a.mutationToDom?(a=a.mutationToDom())?domToText$$module$build$src$core$xml(a):"":""}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_CHANGE,BlockChange$$module$build$src$core$events$events_block_change);var module$build$src$core$events$events_block_change={};module$build$src$core$events$events_block_change.BlockChange=BlockChange$$module$build$src$core$events$events_block_change;var module$build$src$core$utils$math={};module$build$src$core$utils$math.clamp=clamp$$module$build$src$core$utils$math;module$build$src$core$utils$math.toDegrees=toDegrees$$module$build$src$core$utils$math;module$build$src$core$utils$math.toRadians=toRadians$$module$build$src$core$utils$math;var ARROW_SIZE$$module$build$src$core$dropdowndiv=16,BORDER_SIZE$$module$build$src$core$dropdowndiv=1,ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv=12,PADDING_Y$$module$build$src$core$dropdowndiv=16,ANIMATION_TIME$$module$build$src$core$dropdowndiv=.25,animateOutTimer$$module$build$src$core$dropdowndiv=null,onHide$$module$build$src$core$dropdowndiv=null,renderedClassName$$module$build$src$core$dropdowndiv="",themeClassName$$module$build$src$core$dropdowndiv="",div$$module$build$src$core$dropdowndiv,
1528
+ module$build$src$core$serialization$blocks.appendInternal=appendInternal$$module$build$src$core$serialization$blocks;module$build$src$core$serialization$blocks.save=save$$module$build$src$core$serialization$blocks;var module$build$src$core$utils$math={};module$build$src$core$utils$math.clamp=clamp$$module$build$src$core$utils$math;module$build$src$core$utils$math.toDegrees=toDegrees$$module$build$src$core$utils$math;module$build$src$core$utils$math.toRadians=toRadians$$module$build$src$core$utils$math;var ARROW_SIZE$$module$build$src$core$dropdowndiv=16,BORDER_SIZE$$module$build$src$core$dropdowndiv=1,ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv=12,PADDING_Y$$module$build$src$core$dropdowndiv=16,ANIMATION_TIME$$module$build$src$core$dropdowndiv=.25,animateOutTimer$$module$build$src$core$dropdowndiv=null,onHide$$module$build$src$core$dropdowndiv=null,renderedClassName$$module$build$src$core$dropdowndiv="",themeClassName$$module$build$src$core$dropdowndiv="",div$$module$build$src$core$dropdowndiv,
791
1529
  content$$module$build$src$core$dropdowndiv,arrow$$module$build$src$core$dropdowndiv,boundsElement$$module$build$src$core$dropdowndiv=null,owner$$module$build$src$core$dropdowndiv=null,positionToField$$module$build$src$core$dropdowndiv=null,returnEphemeralFocus$$module$build$src$core$dropdowndiv=null,keydownListener$$module$build$src$core$dropdowndiv=null,internal$$module$build$src$core$dropdowndiv={getBoundsInfo:function(){const a=getPageOffset$$module$build$src$core$utils$style(boundsElement$$module$build$src$core$dropdowndiv),
792
1530
  b=getSize$$module$build$src$core$utils$style(boundsElement$$module$build$src$core$dropdowndiv);return{left:a.x,right:a.x+b.width,top:a.y,bottom:a.y+b.height,width:b.width,height:b.height}},getPositionMetrics:function(a,b,c,d){const e=internal$$module$build$src$core$dropdowndiv.getBoundsInfo(),f=getSize$$module$build$src$core$utils$style(div$$module$build$src$core$dropdowndiv);return b+f.height<e.bottom?getPositionBelowMetrics$$module$build$src$core$dropdowndiv(a,b,e,f):d-f.height>e.top?getPositionAboveMetrics$$module$build$src$core$dropdowndiv(c,
793
1531
  d,e,f):b+f.height<document.documentElement.clientHeight?getPositionBelowMetrics$$module$build$src$core$dropdowndiv(a,b,e,f):d-f.height>document.documentElement.clientTop?getPositionAboveMetrics$$module$build$src$core$dropdowndiv(c,d,e,f):getPositionTopOfPageMetrics$$module$build$src$core$dropdowndiv(a,e,f)}},TEST_ONLY$$module$build$src$core$dropdowndiv=internal$$module$build$src$core$dropdowndiv,module$build$src$core$dropdowndiv={ANIMATION_TIME:ANIMATION_TIME$$module$build$src$core$dropdowndiv,ARROW_HORIZONTAL_PADDING:ARROW_HORIZONTAL_PADDING$$module$build$src$core$dropdowndiv,
@@ -802,11 +1540,11 @@ module$build$src$core$utils$colour.getHsvSaturation=getHsvSaturation$$module$bui
802
1540
  module$build$src$core$utils$colour.names=names$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.parse=parse$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.rgbToHex=rgbToHex$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.setHsvSaturation=setHsvSaturation$$module$build$src$core$utils$colour;module$build$src$core$utils$colour.setHsvValue=setHsvValue$$module$build$src$core$utils$colour;var module$build$src$core$utils$parsing={};module$build$src$core$utils$parsing.checkMessageReferences=checkMessageReferences$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.parseBlockColour=parseBlockColour$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.replaceMessageReferences=replaceMessageReferences$$module$build$src$core$utils$parsing;module$build$src$core$utils$parsing.tokenizeInterpolation=tokenizeInterpolation$$module$build$src$core$utils$parsing;var Field$$module$build$src$core$field=class{get size_(){return this.size}set size_(a){this.size=a}constructor(a,b,c){this.DEFAULT_VALUE=null;this.name=void 0;this.tooltip=this.ariaTypeName=this.validator_=null;this.size=new Size$$module$build$src$core$utils$size(0,0);this.constants_=this.mouseDownWrapper=this.textContent_=this.textElement_=this.borderRect_=this.fieldGroup_=null;this.disposed=!1;this.maxDisplayLength=50;this.sourceBlock_=null;this.enabled_=this.visible_=this.isDirty_=!0;this.suffixField=
803
1541
  this.prefixField=this.clickTarget_=null;this.EDITABLE=!0;this.SERIALIZABLE=!1;this.id_=null;this.value_="DEFAULT_VALUE"in new.target.prototype?new.target.prototype.DEFAULT_VALUE:this.DEFAULT_VALUE;this.size_=new Size$$module$build$src$core$utils$size(0,0);a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){a.tooltip&&this.setTooltip(replaceMessageReferences$$module$build$src$core$utils$parsing(a.tooltip));a.ariaTypeName&&
804
1542
  (this.ariaTypeName=a.ariaTypeName)}setSourceBlock(a){if(this.sourceBlock_)throw Error("Field already bound to a block");this.sourceBlock_=a;if(a.id.includes("_field"))throw Error(`Field ID indicator is contained in block ID. This may cause problems with focus: ${a.id}.`);this.id_=`${a.id}_field_${getNextUniqueId$$module$build$src$core$utils$idgenerator()}`}getConstants(){!this.constants_&&this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&this.sourceBlock_.workspace.rendered&&(this.constants_=
805
- this.sourceBlock_.workspace.getRenderer().getConstants());return this.constants_}getSourceBlock(){return this.sourceBlock_}getAriaTypeName(){return this.ariaTypeName}getAriaValue(){const a=this.getValue();return a===null||a===void 0?null:String(a)}computeAriaLabel(a=!1){a=a?this.getAriaTypeName():null;const b=this.getAriaValue();if(!a&&!b)return"";if(a&&b)return`${a}: ${b}`;let c;return(c=a!=null?a:b)!=null?c:""}init(){if(!this.fieldGroup_){var a=this.id_;if(!a)throw Error("Expected ID to be defined prior to init.");
1543
+ this.sourceBlock_.workspace.getRenderer().getConstants());return this.constants_}getSourceBlock(){return this.sourceBlock_}getAriaTypeName(){return this.ariaTypeName||null}getAriaValue(){return this.getValue()==null?null:this.getText()}computeAriaLabel(a=!1){a=a?this.getAriaTypeName():null;let b=this.getAriaValue();if(b===null||b==="")b=$.Msg$$module$build$src$core$msg.FIELD_LABEL_EMPTY;return a?`${a}: ${b}`:b}init(){if(!this.fieldGroup_){var a=this.id_;if(!a)throw Error("Expected ID to be defined prior to init.");
806
1544
  this.fieldGroup_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{id:a});this.isVisible()||(this.fieldGroup_.style.display="none");this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_);this.initView();this.updateEditable();this.setTooltip(this.tooltip);this.bindEvents_();this.initModel();this.applyColour()}}initView(){this.createBorderRect_();this.createTextElement_();this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyField")}initModel(){}isFullBlockField(){return!this.borderRect_}createBorderRect_(){this.borderRect_=
807
- createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{rx:this.getConstants().FIELD_BORDER_RECT_RADIUS,ry:this.getConstants().FIELD_BORDER_RECT_RADIUS,x:0,y:0,height:this.size_.height,width:this.size_.width,"class":"blocklyFieldRect"},this.fieldGroup_)}createTextElement_(){this.textElement_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":"blocklyText blocklyFieldText"},this.fieldGroup_);this.getConstants().FIELD_TEXT_BASELINE_CENTER&&
808
- this.textElement_.setAttribute("dominant-baseline","central");this.textContent_=document.createTextNode("");this.textElement_.appendChild(this.textContent_)}bindEvents_(){const a=this.getClickTarget_();if(!a)throw Error("A click target has not been set.");bindMouseEvents$$module$build$src$core$tooltip(a);this.mouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(a,"pointerdown",this,this.onMouseDown_)}fromXml(a){this.setValue(a.textContent)}toXml(a){a.textContent=this.getValue();
809
- return a}saveState(a){a=this.saveLegacyState(Field$$module$build$src$core$field);return a!==null?a:this.getValue()}loadState(a){this.loadLegacyState(Field$$module$build$src$core$field,a)||this.setValue(a)}saveLegacyState(a){return a.prototype.saveState===this.saveState&&a.prototype.toXml!==this.toXml?(a=$.createElement$$module$build$src$core$utils$xml("field"),a.setAttribute("name",this.name||""),domToText$$module$build$src$core$utils$xml(this.toXml(a)).replace(' xmlns="https://developers.google.com/blockly/xml"',
1545
+ createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{rx:this.getConstants().FIELD_BORDER_RECT_RADIUS,ry:this.getConstants().FIELD_BORDER_RECT_RADIUS,x:0,y:0,height:this.size_.height,width:this.size_.width,"class":"blocklyFieldRect"},this.fieldGroup_)}createTextElement_(){this.textElement_=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,{"class":"blocklyText blocklyFieldText","aria-hidden":"true"},this.fieldGroup_);
1546
+ this.getConstants().FIELD_TEXT_BASELINE_CENTER&&this.textElement_.setAttribute("dominant-baseline","central");this.textContent_=document.createTextNode("");this.textElement_.appendChild(this.textContent_)}bindEvents_(){const a=this.getClickTarget_();if(!a)throw Error("A click target has not been set.");bindMouseEvents$$module$build$src$core$tooltip(a);this.mouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(a,"pointerdown",this,this.onMouseDown_)}fromXml(a){this.setValue(a.textContent)}toXml(a){a.textContent=
1547
+ this.getValue();return a}saveState(a){a=this.saveLegacyState(Field$$module$build$src$core$field);return a!==null?a:this.getValue()}loadState(a){this.loadLegacyState(Field$$module$build$src$core$field,a)||this.setValue(a)}saveLegacyState(a){return a.prototype.saveState===this.saveState&&a.prototype.toXml!==this.toXml?(a=$.createElement$$module$build$src$core$utils$xml("field"),a.setAttribute("name",this.name||""),domToText$$module$build$src$core$utils$xml(this.toXml(a)).replace(' xmlns="https://developers.google.com/blockly/xml"',
810
1548
  "")):null}loadLegacyState(a,b){return a.prototype.loadState===this.loadState&&a.prototype.fromXml!==this.fromXml?(this.fromXml($.textToDom$$module$build$src$core$utils$xml(b)),!0):!1}dispose(){hideIfOwner$$module$build$src$core$dropdowndiv(this);hideIfOwner$$module$build$src$core$widgetdiv(this);let a;((a=this.getSourceBlock())==null?0:a.isDeadOrDying())||removeNode$$module$build$src$core$utils$dom(this.fieldGroup_);this.disposed=!0}updateEditable(){const a=this.fieldGroup_,b=this.getSourceBlock();
811
1549
  this.EDITABLE&&a&&b&&(this.enabled_&&b.isEditable()?(addClass$$module$build$src$core$utils$dom(a,"blocklyEditableField"),removeClass$$module$build$src$core$utils$dom(a,"blocklyNonEditableField")):(addClass$$module$build$src$core$utils$dom(a,"blocklyNonEditableField"),removeClass$$module$build$src$core$utils$dom(a,"blocklyEditableField")))}setEnabled(a){this.enabled_=a;this.updateEditable()}isEnabled(){return this.enabled_}isClickable(){return this.enabled_&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&
812
1550
  this.showEditor_!==Field$$module$build$src$core$field.prototype.showEditor_}isClickableInFlyout(a){return!a}isCurrentlyEditable(){return this.enabled_&&this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()}isSerializable(){let a=!1;this.name&&(this.SERIALIZABLE?a=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."),a=!0));return a}isVisible(){return this.visible_}setVisible(a){if(this.visible_!==
@@ -876,13 +1614,7 @@ focusedNode:this},a);let c;c=a instanceof PointerEvent?new Coordinate$$module$bu
876
1614
  ["snap"])}}}getEditorFocusableNode(){return this.view.getEditorFocusableNode()}getFocusableElement(){return this.getSvgRoot()}getFocusableTree(){return this.workspace}onNodeFocus(){this.select();let a;(a=this.getSvgRoot().parentElement)==null||a.appendChild(this.getSvgRoot());this.workspace.scrollBoundsIntoView(this.getBoundingRectangle())}onNodeBlur(){this.unselect()}canBeFocused(){return!0}performAction(){this.setCollapsed(!1);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.getEditorFocusableNode())}},
877
1615
  module$build$src$core$comments$rendered_workspace_comment={};module$build$src$core$comments$rendered_workspace_comment.RenderedWorkspaceComment=RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment;var module$build$src$core$xml={};module$build$src$core$xml.appendDomToWorkspace=appendDomToWorkspace$$module$build$src$core$xml;module$build$src$core$xml.blockToDom=blockToDom$$module$build$src$core$xml;module$build$src$core$xml.blockToDomWithXY=blockToDomWithXY$$module$build$src$core$xml;module$build$src$core$xml.clearWorkspaceAndLoadFromXml=clearWorkspaceAndLoadFromXml$$module$build$src$core$xml;module$build$src$core$xml.deleteNext=deleteNext$$module$build$src$core$xml;
878
1616
  module$build$src$core$xml.domToBlock=$.domToBlock$$module$build$src$core$xml;module$build$src$core$xml.domToBlockInternal=domToBlockInternal$$module$build$src$core$xml;module$build$src$core$xml.domToPrettyText=domToPrettyText$$module$build$src$core$xml;module$build$src$core$xml.domToText=domToText$$module$build$src$core$xml;module$build$src$core$xml.domToVariables=domToVariables$$module$build$src$core$xml;module$build$src$core$xml.domToWorkspace=$.domToWorkspace$$module$build$src$core$xml;
879
- module$build$src$core$xml.loadWorkspaceComment=loadWorkspaceComment$$module$build$src$core$xml;module$build$src$core$xml.saveWorkspaceComment=saveWorkspaceComment$$module$build$src$core$xml;module$build$src$core$xml.variablesToDom=variablesToDom$$module$build$src$core$xml;module$build$src$core$xml.workspaceToDom=workspaceToDom$$module$build$src$core$xml;var BlockCreate$$module$build$src$core$events$events_block_create=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_CREATE;a&&(a.isShadow()&&(this.recordUndo=!1),this.ids=getDescendantIds$$module$build$src$core$events$utils(a),this.json=save$$module$build$src$core$serialization$blocks(a,{addCoordinates:!0}))}toJson(){const a=super.toJson();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");
880
- if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");a.ids=this.ids;a.json=this.json;this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockCreate$$module$build$src$core$events$events_block_create);b.ids=a.ids;b.json=a.json;a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();
881
- if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!allShadowBlocks$$module$build$src$core$events$events_block_create(b,this.ids))if(a)append$$module$build$src$core$serialization$blocks(this.json,b);else for(a=0;a<this.ids.length;a++){const c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't uncreate non-existent block: "+
882
- c)}}},allShadowBlocks$$module$build$src$core$events$events_block_create=function(a,b){return b.map(c=>a.getBlockById(c)).filter(c=>c&&c.isShadow()).length===b.length};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_CREATE,BlockCreate$$module$build$src$core$events$events_block_create);var module$build$src$core$events$events_block_create={};module$build$src$core$events$events_block_create.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;var ThemeChange$$module$build$src$core$events$events_theme_change=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=EventType$$module$build$src$core$events$type.THEME_CHANGE;this.themeName=a}toJson(){const a=super.toJson();if(!this.themeName)throw Error("The theme name is undefined. Either pass a theme name to the constructor, or call fromJson");a.themeName=this.themeName;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,
883
- b,c!=null?c:new ThemeChange$$module$build$src$core$events$events_theme_change);b.themeName=a.themeName;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.THEME_CHANGE,ThemeChange$$module$build$src$core$events$events_theme_change);var module$build$src$core$events$events_theme_change={};module$build$src$core$events$events_theme_change.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;var ViewportChange$$module$build$src$core$events$events_viewport=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c,d,e){super(d);this.type=EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE;this.viewTop=a;this.viewLeft=b;this.scale=c;this.oldScale=e}toJson(){const a=super.toJson();if(this.viewTop===void 0)throw Error("The view top is undefined. Either pass a value to the constructor, or call fromJson");if(this.viewLeft===void 0)throw Error("The view left is undefined. Either pass a value to the constructor, or call fromJson");
884
- if(this.scale===void 0)throw Error("The scale is undefined. Either pass a value to the constructor, or call fromJson");if(this.oldScale===void 0)throw Error("The old scale is undefined. Either pass a value to the constructor, or call fromJson");a.viewTop=this.viewTop;a.viewLeft=this.viewLeft;a.scale=this.scale;a.oldScale=this.oldScale;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new ViewportChange$$module$build$src$core$events$events_viewport);
885
- b.viewTop=a.viewTop;b.viewLeft=a.viewLeft;b.scale=a.scale;b.oldScale=a.oldScale;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE,ViewportChange$$module$build$src$core$events$events_viewport);var module$build$src$core$events$events_viewport={};module$build$src$core$events$events_viewport.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;var TEST_ONLY$$module$build$src$core$field_registry={fromJsonInternal:fromJsonInternal$$module$build$src$core$field_registry},module$build$src$core$field_registry={TEST_ONLY:TEST_ONLY$$module$build$src$core$field_registry};module$build$src$core$field_registry.fromJson=$.fromJson$$module$build$src$core$field_registry;module$build$src$core$field_registry.register=register$$module$build$src$core$field_registry;module$build$src$core$field_registry.unregister=unregister$$module$build$src$core$field_registry;var FieldDropdown$$module$build$src$core$field_dropdown=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.svgArrow=this.arrow=this.imageElement=this.menu_=this.selectedMenuItem=null;this.SERIALIZABLE=!0;this.clickTarget_=this.suffixField=this.prefixField=this.generatedOptions=null;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(this.setOptions(a),c&&this.configure_(c),b&&this.setValidator(b))}fromXml(a){this.isOptionListDynamic()&&
1617
+ module$build$src$core$xml.loadWorkspaceComment=loadWorkspaceComment$$module$build$src$core$xml;module$build$src$core$xml.saveWorkspaceComment=saveWorkspaceComment$$module$build$src$core$xml;module$build$src$core$xml.variablesToDom=variablesToDom$$module$build$src$core$xml;module$build$src$core$xml.workspaceToDom=workspaceToDom$$module$build$src$core$xml;var TEST_ONLY$$module$build$src$core$field_registry={fromJsonInternal:fromJsonInternal$$module$build$src$core$field_registry},module$build$src$core$field_registry={TEST_ONLY:TEST_ONLY$$module$build$src$core$field_registry};module$build$src$core$field_registry.fromJson=$.fromJson$$module$build$src$core$field_registry;module$build$src$core$field_registry.register=register$$module$build$src$core$field_registry;module$build$src$core$field_registry.unregister=unregister$$module$build$src$core$field_registry;var FieldDropdown$$module$build$src$core$field_dropdown=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.svgArrow=this.arrow=this.imageElement=this.menu_=this.selectedMenuItem=null;this.SERIALIZABLE=!0;this.clickTarget_=this.suffixField=this.prefixField=this.generatedOptions=null;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(this.setOptions(a),c&&this.configure_(c),b&&this.setValidator(b))}fromXml(a){this.isOptionListDynamic()&&
886
1618
  this.getOptions(!1);this.setValue(a.textContent)}loadState(a){this.loadLegacyState(FieldDropdown$$module$build$src$core$field_dropdown,a)||(this.isOptionListDynamic()&&this.getOptions(!1),this.setValue(a))}initView(){this.shouldAddBorderRect_()?this.createBorderRect_():this.clickTarget_=this.sourceBlock_.getSvgRoot();this.createTextElement_();this.imageElement=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{},this.fieldGroup_);this.getConstants().FIELD_DROPDOWN_SVG_ARROW?
887
1619
  this.createSVGArrow_():this.createTextArrow_();this.borderRect_&&addClass$$module$build$src$core$utils$dom(this.borderRect_,"blocklyDropdownRect");this.fieldGroup_&&(addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyField"),addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyDropdownField"))}shouldAddBorderRect_(){let a;return!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW&&!((a=this.getSourceBlock())==
888
1620
  null?0:a.isShadow())}createTextArrow_(){this.arrow=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TSPAN,{},this.textElement_);let a;this.arrow.appendChild(document.createTextNode(((a=this.getSourceBlock())==null?0:a.RTL)?FieldDropdown$$module$build$src$core$field_dropdown.ARROW_CHAR+" ":" "+FieldDropdown$$module$build$src$core$field_dropdown.ARROW_CHAR));this.getConstants().FIELD_TEXT_BASELINE_CENTER&&this.arrow.setAttribute("dominant-baseline","central");let b;
@@ -926,10 +1658,12 @@ a.workspace.options,!0);if(!c)throw Error("no Dragger registered");this.dragger=
926
1658
  KeyCodes$$module$build$src$core$utils$keycodes.UP,KeyCodes$$module$build$src$core$utils$keycodes.DOWN,KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.ESC,KeyCodes$$module$build$src$core$utils$keycodes.M].includes(typeof d==="number"?d:parseInt(`${d.split("+").pop()}`))).filter(d=>!!d);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover,preconditionFn:()=>
927
1659
  this.isMoving(),callback:()=>{this.finishMove();return!1},keyCodes:a,allowCollision:!0},!0);this.scrollCurrentElementIntoView();this.moveIndicator=new MoveIndicator$$module$build$src$core$keyboard_nav$move_indicator(this.draggable.workspace);this.repositionMoveIndicator();return!0}move(a,b){switch(a){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:this.totalDelta.y-=this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:this.totalDelta.y+=
928
1660
  this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:this.totalDelta.x-=this.stepDistance;break;case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT:this.totalDelta.x+=this.stepDistance}let c;(c=this.dragger)==null||c.onDrag(b,this.totalPixelDelta());this.updateTotalDelta();this.scrollCurrentElementIntoView();this.repositionMoveIndicator();return!0}finishMove(a){this.preDragEndCleanup();let b;(b=this.dragger)==null||b.onDragEnd(a,this.totalPixelDelta());
929
- this.postDragEndCleanup();return!0}abortMove(a){this.preDragEndCleanup();let b;(b=this.dragger)==null||b.onDragRevert(a,this.totalPixelDelta());this.postDragEndCleanup();return!0}setMoveDistance(a){this.stepDistance=a}getAllowedShortcuts(){return this.allowedShortcuts}setAllowedShortcuts(a){this.allowedShortcuts=a}repositionMoveIndicator(){let a;const b=(a=this.draggable)==null?void 0:a.getBoundingRectangle();if(b){var c,d;(d=this.moveIndicator)==null||d.moveTo(((c=this.draggable)==null?0:c.workspace.RTL)?
930
- b.left:b.right,b.top)}}preDragEndCleanup(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.unregister(COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover);let a;(a=this.draggable)==null||a.getFocusableElement().removeEventListener("blur",this.blurListener)}postDragEndCleanup(){let a;(a=this.moveIndicator)==null||a.dispose();this.startLocation=this.dragger=this.draggable=this.moveIndicator=void 0;this.totalDelta=new Coordinate$$module$build$src$core$utils$coordinate(0,
931
- 0)}totalPixelDelta(){let a,b;const c=(b=(a=this.draggable)==null?void 0:a.workspace.scale)!=null?b:1;return new Coordinate$$module$build$src$core$utils$coordinate(this.totalDelta.x*c,this.totalDelta.y*c)}scrollCurrentElementIntoView(){if(this.draggable){var a=this.draggable.getBoundingRectangle();this.draggable.workspace.scrollBoundsIntoView(a)}}updateTotalDelta(){this.draggable&&this.startLocation&&(this.totalDelta=new Coordinate$$module$build$src$core$utils$coordinate(this.draggable.getRelativeToSurfaceXY().x-
932
- this.startLocation.x,this.draggable.getRelativeToSurfaceXY().y-this.startLocation.y))}};KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover=new KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover;var module$build$src$core$keyboard_nav$keyboard_mover={};module$build$src$core$keyboard_nav$keyboard_mover.Direction=Direction$$module$build$src$core$keyboard_nav$keyboard_mover;module$build$src$core$keyboard_nav$keyboard_mover.KeyboardMover=KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover;var Theme$$module$build$src$core$theme=class{constructor(a,b,c,d){this.name=a;this.startHats=!1;this.blockStyles=b||Object.create(null);this.categoryStyles=c||Object.create(null);this.componentStyles=d||Object.create(null);this.fontStyle=Object.create(null);register$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,a,this,!0)}getClassName(){return this.name+"-theme"}setBlockStyle(a,b){this.blockStyles[a]=b}setCategoryStyle(a,b){this.categoryStyles[a]=b}getComponentStyle(a){a=
1661
+ this.postDragEndCleanup();return!0}abortMove(a){this.preDragEndCleanup();let b;(b=this.dragger)==null||b.onDragRevert(a,this.totalPixelDelta());this.postDragEndCleanup();return!0}setMoveDistance(a){this.stepDistance=a}getAllowedShortcuts(){return this.allowedShortcuts}setAllowedShortcuts(a){this.allowedShortcuts=a}repositionMoveIndicator(){finishQueuedRenders$$module$build$src$core$render_management().then(()=>{let a,b=(a=this.draggable)==null?void 0:a.getBoundingRectangle();this.draggable&&"getBoundingRectangleWithoutChildren"in
1662
+ this.draggable&&(b=this.positionForBlockMoveIndicator(this.draggable));if(b){var c,d;(d=this.moveIndicator)==null||d.moveTo(((c=this.draggable)==null?0:c.workspace.RTL)?b.left:b.right,b.top)}})}positionForBlockMoveIndicator(a){var b=a.workspace.getNavigator(),c=a;let d;for(;d=b.getInNode(c);)c=d;b=b.getSourceBlockFromNode(c);c=a.getBoundingRectangleWithoutChildren().getOrigin().y;let e;for(;((e=b)==null?void 0:e.getBoundingRectangleWithoutChildren().getOrigin().y)!==c;){let h,k;b=(k=(h=b)==null?void 0:
1663
+ h.getParent())!=null?k:null}let f,g;return(g=(f=b)==null?void 0:f.getBoundingRectangleWithoutChildren())!=null?g:a.getBoundingRectangleWithoutChildren()}preDragEndCleanup(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.unregister(COMMIT_MOVE_SHORTCUT$$module$build$src$core$keyboard_nav$keyboard_mover);let a;(a=this.draggable)==null||a.getFocusableElement().removeEventListener("blur",this.blurListener)}postDragEndCleanup(){let a;(a=this.moveIndicator)==null||a.dispose();this.startLocation=
1664
+ this.dragger=this.draggable=this.moveIndicator=void 0;this.totalDelta=new Coordinate$$module$build$src$core$utils$coordinate(0,0)}totalPixelDelta(){let a,b;const c=(b=(a=this.draggable)==null?void 0:a.workspace.scale)!=null?b:1;return new Coordinate$$module$build$src$core$utils$coordinate(this.totalDelta.x*c,this.totalDelta.y*c)}scrollCurrentElementIntoView(){if(this.draggable){var a=this.draggable.getBoundingRectangle();this.draggable.workspace.scrollBoundsIntoView(a)}}updateTotalDelta(){this.draggable&&
1665
+ this.startLocation&&(this.totalDelta=new Coordinate$$module$build$src$core$utils$coordinate(this.draggable.getRelativeToSurfaceXY().x-this.startLocation.x,this.draggable.getRelativeToSurfaceXY().y-this.startLocation.y))}};KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover=new KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover;var module$build$src$core$keyboard_nav$keyboard_mover={};module$build$src$core$keyboard_nav$keyboard_mover.Direction=Direction$$module$build$src$core$keyboard_nav$keyboard_mover;
1666
+ module$build$src$core$keyboard_nav$keyboard_mover.KeyboardMover=KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover;var Theme$$module$build$src$core$theme=class{constructor(a,b,c,d){this.name=a;this.startHats=!1;this.blockStyles=b||Object.create(null);this.categoryStyles=c||Object.create(null);this.componentStyles=d||Object.create(null);this.fontStyle=Object.create(null);register$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,a,this,!0)}getClassName(){return this.name+"-theme"}setBlockStyle(a,b){this.blockStyles[a]=b}setCategoryStyle(a,b){this.categoryStyles[a]=b}getComponentStyle(a){a=
933
1667
  this.componentStyles[a];if(!a)return null;if(typeof a==="string"){const b=this.getComponentStyle(a);if(b)return b}return`${a}`}setComponentStyle(a,b){this.componentStyles[a]=b}setFontStyle(a){this.fontStyle=a}setStartHats(a){this.startHats=a}static defineTheme(a,b){a=a.toLowerCase();const c=new Theme$$module$build$src$core$theme(a);let d=b.base;if(d){if(typeof d==="string"){let e;d=(e=getObject$$module$build$src$core$registry(Type$$module$build$src$core$registry.THEME,d))!=null?e:void 0}d instanceof
934
1668
  Theme$$module$build$src$core$theme&&(deepMerge$$module$build$src$core$utils$object(c,d),c.name=a)}deepMerge$$module$build$src$core$utils$object(c.blockStyles,b.blockStyles);deepMerge$$module$build$src$core$utils$object(c.categoryStyles,b.categoryStyles);deepMerge$$module$build$src$core$utils$object(c.componentStyles,b.componentStyles);deepMerge$$module$build$src$core$utils$object(c.fontStyle,b.fontStyle);b.startHats!==null&&(c.startHats=b.startHats);return c}},module$build$src$core$theme={};
935
1669
  module$build$src$core$theme.Theme=Theme$$module$build$src$core$theme;var defaultBlockStyles$$module$build$src$core$theme$classic={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}},categoryStyles$$module$build$src$core$theme$classic={colour_category:{colour:"20"},
@@ -957,9 +1691,9 @@ g)+" "+b+","+c)}a.push("z");let l;(l=this.tail)==null||l.setAttribute("d",a.join
957
1691
  this.getRelativeToSurfaceXY();return new Rect$$module$build$src$core$utils$rect(a.y,a.y+this.size.height,a.x,a.x+this.size.width)}getSvgRoot(){return this.svgRoot}moveDuringDrag(a){this.moveTo(a.x,a.y);this.relativeLeft=this.workspace.RTL?this.anchor.x-a.x-this.size.width:a.x-this.anchor.x;this.relativeTop=a.y-this.anchor.y;this.renderTail()}setDragging(a){}setDeleteStyle(a){}isDeletable(){return!1}showContextMenu(a){}isMovable(){return!0}startDrag(){return this.dragStrategy.startDrag()}drag(a){this.dragStrategy.drag(a)}endDrag(){this.dragStrategy.endDrag()}revertDrag(){this.dragStrategy.revertDrag()}select(){fireSelectedEvent$$module$build$src$core$common(this)}unselect(){fireSelectedEvent$$module$build$src$core$common(null)}getFocusableElement(){return this.focusableElement}getFocusableTree(){return this.workspace}onNodeFocus(){this.select();
958
1692
  this.bringToFront();var a=this.getRelativeToSurfaceXY();const b=this.getSize();a=new Rect$$module$build$src$core$utils$rect(a.y,a.y+b.height,a.x,a.x+b.width);this.workspace.scrollBoundsIntoView(a)}onNodeBlur(){this.unselect()}canBeFocused(){return!0}getOwner(){return this.owner}};_a$$module$build$src$core$bubbles$bubble=Bubble$$module$build$src$core$bubbles$bubble;Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH=6;
959
1693
  Bubble$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER=_a$$module$build$src$core$bubbles$bubble.BORDER_WIDTH*2;Bubble$$module$build$src$core$bubbles$bubble.MIN_SIZE=_a$$module$build$src$core$bubbles$bubble.DOUBLE_BORDER;Bubble$$module$build$src$core$bubbles$bubble.TAIL_THICKNESS=1;Bubble$$module$build$src$core$bubbles$bubble.TAIL_ANGLE=20;Bubble$$module$build$src$core$bubbles$bubble.TAIL_BEND=4;Bubble$$module$build$src$core$bubbles$bubble.ANCHOR_RADIUS=8;
960
- var module$build$src$core$bubbles$bubble={};module$build$src$core$bubbles$bubble.Bubble=Bubble$$module$build$src$core$bubbles$bubble;var MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d){super(b,c,d);this.workspace=b;this.anchor=c;this.ownerRect=d;this.autoLayout=!0;b=new Options$$module$build$src$core$options(a);this.validateWorkspaceOptions(b);this.svgDialog=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.SVG,{x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,y:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},
961
- this.contentContainer);a.parentWorkspace=this.workspace;this.miniWorkspace=this.newWorkspaceSvg(new Options$$module$build$src$core$options(a));this.miniWorkspace.internalIsMutator=!0;a=this.miniWorkspace.createDom("blocklyMutatorBackground");this.svgDialog.appendChild(a);b.languageTree&&(a.insertBefore(this.miniWorkspace.addFlyout(Svg$$module$build$src$core$utils$svg.G),this.miniWorkspace.getCanvas()),a=this.miniWorkspace.getFlyout(),a==null||a.init(this.miniWorkspace),a==null||a.show(b.languageTree));
962
- addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyMiniWorkspaceBubble");this.miniWorkspace.addChangeListener(this.onWorkspaceChange.bind(this));let e,f;(e=this.miniWorkspace.getFlyout())==null||(f=e.getWorkspace())==null||f.addChangeListener(this.onWorkspaceChange.bind(this));this.updateBubbleSize()}dispose(){this.miniWorkspace.dispose();super.dispose()}getWorkspace(){return this.miniWorkspace}addWorkspaceChangeListener(a){this.miniWorkspace.addChangeListener(a)}validateWorkspaceOptions(a){if(a.hasCategories)throw Error("The miniworkspace bubble does not support toolboxes with categories");
1694
+ var module$build$src$core$bubbles$bubble={};module$build$src$core$bubbles$bubble.Bubble=Bubble$$module$build$src$core$bubbles$bubble;var MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble=class extends Bubble$$module$build$src$core$bubbles$bubble{constructor(a,b,c,d,e){super(b,c,d,void 0,e);this.workspace=b;this.anchor=c;this.ownerRect=d;this.owner=e;this.autoLayout=!0;b=new Options$$module$build$src$core$options(a);this.validateWorkspaceOptions(b);this.svgDialog=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.SVG,{x:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH,
1695
+ y:Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH},this.contentContainer);a.parentWorkspace=this.workspace;this.miniWorkspace=this.newWorkspaceSvg(new Options$$module$build$src$core$options(a));this.miniWorkspace.internalIsMutator=!0;a=this.miniWorkspace.createDom("blocklyMutatorBackground");this.svgDialog.appendChild(a);b.languageTree&&(a.insertBefore(this.miniWorkspace.addFlyout(Svg$$module$build$src$core$utils$svg.G),this.miniWorkspace.getCanvas()),a=this.miniWorkspace.getFlyout(),a==
1696
+ null||a.init(this.miniWorkspace),a==null||a.show(b.languageTree));addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyMiniWorkspaceBubble");this.miniWorkspace.addChangeListener(this.onWorkspaceChange.bind(this));let f,g;(f=this.miniWorkspace.getFlyout())==null||(g=f.getWorkspace())==null||g.addChangeListener(this.onWorkspaceChange.bind(this));this.updateBubbleSize()}dispose(){this.miniWorkspace.dispose();super.dispose()}getWorkspace(){return this.miniWorkspace}addWorkspaceChangeListener(a){this.miniWorkspace.addChangeListener(a)}validateWorkspaceOptions(a){if(a.hasCategories)throw Error("The miniworkspace bubble does not support toolboxes with categories");
963
1697
  if(a.hasTrashcan)throw Error("The miniworkspace bubble does not support trashcans");if(a.zoomOptions.controls||a.zoomOptions.wheel||a.zoomOptions.pinch)throw Error("The miniworkspace bubble does not support zooming");if(a.moveOptions.scrollbars||a.moveOptions.wheel||a.moveOptions.drag)throw Error("The miniworkspace bubble does not scrolling/moving the workspace");if(a.horizontalLayout)throw Error("The miniworkspace bubble does not support horizontal layouts");}onWorkspaceChange(){this.bumpBlocksIntoBounds();
964
1698
  this.updateBubbleSize()}bumpBlocksIntoBounds(){if(!this.miniWorkspace.isDragging()||KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving())for(const a of this.miniWorkspace.getTopBlocks(!1)){const b=a.getRelativeToSurfaceXY();b.y<20&&a.moveBy(0,20-b.y);if(a.RTL){let c=-20;const d=this.miniWorkspace.getFlyout();d&&(c-=d.getWidth());b.x>c&&a.moveBy(c-b.x,0)}else b.x<20&&a.moveBy(20-b.x,0)}}updateBubbleSize(){if(!this.miniWorkspace.isDragging()||KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()){this.autoLayout&&
965
1699
  (this.autoLayout=!KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving());var a=this.getSize(),b=this.calculateWorkspaceSize();Math.abs(a.width-b.width)<MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble.MINIMUM_VIEW_CHANGE&&Math.abs(a.height-b.height)<MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble.MINIMUM_VIEW_CHANGE||(this.svgDialog.setAttribute("width",`${b.width}px`),this.svgDialog.setAttribute("height",`${b.height}px`),
@@ -977,7 +1711,7 @@ rx:"4",ry:"4",height:"16",width:"16"},this.svgRoot),createSvgElement$$module$bui
977
1711
  this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE,{"class":"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},this.svgRoot),addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyMutatorIcon"))}dispose(){super.dispose();let a;(a=this.miniWorkspaceBubble)==null||a.dispose()}getWeight(){return $.MutatorIcon$$module$build$src$core$icons$mutator_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$mutator_icon,
978
1712
  SIZE$$module$build$src$core$icons$mutator_icon)}applyColour(){super.applyColour();let a;(a=this.miniWorkspaceBubble)==null||a.setColour(this.sourceBlock.getColour());let b;(b=this.miniWorkspaceBubble)==null||b.updateBlockStyles()}updateCollapsed(){super.updateCollapsed();this.sourceBlock.isCollapsed()&&this.setBubbleVisible(!1)}onLocationChange(a){super.onLocationChange(a);let b;(b=this.miniWorkspaceBubble)==null||b.setAnchorLocation(this.getAnchorLocation())}onClick(){super.onClick();this.sourceBlock.isEditable()&&
979
1713
  this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}bubbleIsVisible(){return!!this.miniWorkspaceBubble}setBubbleVisible(a){const b=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(b.bubbleIsVisible()!==a){yield finishQueuedRenders$$module$build$src$core$render_management();if(a){b.miniWorkspaceBubble=new MiniWorkspaceBubble$$module$build$src$core$bubbles$mini_workspace_bubble(b.getMiniWorkspaceConfig(),b.sourceBlock.workspace,b.getAnchorLocation(),
980
- b.getBubbleOwnerRect());b.applyColour();b.createRootBlock();b.addSaveConnectionsListener();let c;(c=b.miniWorkspaceBubble)==null||c.addWorkspaceChangeListener(b.createMiniWorkspaceChangeListener())}else{let c;(c=b.miniWorkspaceBubble)==null||c.dispose();b.miniWorkspaceBubble=null;b.saveConnectionsListener&&b.sourceBlock.workspace.removeChangeListener(b.saveConnectionsListener);b.saveConnectionsListener=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,
1714
+ b.getBubbleOwnerRect(),b);b.applyColour();b.createRootBlock();b.addSaveConnectionsListener();let c;(c=b.miniWorkspaceBubble)==null||c.addWorkspaceChangeListener(b.createMiniWorkspaceChangeListener())}else{let c;(c=b.miniWorkspaceBubble)==null||c.dispose();b.miniWorkspaceBubble=null;b.saveConnectionsListener&&b.sourceBlock.workspace.removeChangeListener(b.saveConnectionsListener);b.saveConnectionsListener=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,
981
1715
  a,"mutator"))}})}getBubble(){return this.miniWorkspaceBubble}getMiniWorkspaceConfig(){let a;const b={disable:!1,media:this.sourceBlock.workspace.options.pathToMedia,rtl:this.sourceBlock.RTL,renderer:this.sourceBlock.workspace.options.renderer,rendererOverrides:(a=this.sourceBlock.workspace.options.rendererOverrides)!=null?a:void 0};this.flyoutBlockTypes.length&&(b.toolbox={kind:"flyoutToolbox",contents:this.flyoutBlockTypes.map(c=>({kind:"block",type:c}))});return b}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$mutator_icon/
982
1716
  2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,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)}createRootBlock(){if(!this.sourceBlock.decompose)throw Error("Blocks with mutator icons must include a decompose method");this.rootBlock=this.sourceBlock.decompose(this.miniWorkspaceBubble.getWorkspace());
983
1717
  for(var a of this.rootBlock.getDescendants(!1))a.queueRender();this.rootBlock.setMovable(!1);this.rootBlock.setDeletable(!1);let b,c,d,e;a=(e=(b=this.miniWorkspaceBubble)==null?void 0:(c=b.getWorkspace())==null?void 0:(d=c.getFlyout())==null?void 0:d.getWidth())!=null?e:0;this.rootBlock.moveBy(this.rootBlock.RTL?-(a+WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon):WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon,WORKSPACE_MARGIN$$module$build$src$core$icons$mutator_icon)}addSaveConnectionsListener(){this.sourceBlock.saveConnections&&
@@ -998,16 +1732,11 @@ d),new Size$$module$build$src$core$utils$size(0,0));this.editor.getDom().setAttr
998
1732
  this.onLocationChange()}setPositionRelativeToAnchor(a,b){super.setPositionRelativeToAnchor(a,b);this.onLocationChange()}positionByRect(a=new Rect$$module$build$src$core$utils$rect(0,0,0,0)){super.positionByRect(a);this.onLocationChange()}onResizePointerDown(a){this.bringToFront();isRightButton$$module$build$src$core$browser_events(a)||(start$$module$build$src$core$utils$drag(this.workspace,a,new Coordinate$$module$build$src$core$utils$coordinate(this.workspace.RTL?-this.getSize().width:this.getSize().width,
999
1733
  this.getSize().height)),this.resizePointerUpListener=conditionalBind$$module$build$src$core$browser_events(document,"pointerup",this,this.onResizePointerUp),this.resizePointerMoveListener=conditionalBind$$module$build$src$core$browser_events(document,"pointermove",this,this.onResizePointerMove),this.workspace.hideChaff());a.stopPropagation()}onResizePointerUp(a){clearTouchIdentifier$$module$build$src$core$touch();this.resizePointerUpListener&&(unbind$$module$build$src$core$browser_events(this.resizePointerUpListener),
1000
1734
  this.resizePointerUpListener=null);this.resizePointerMoveListener&&(unbind$$module$build$src$core$browser_events(this.resizePointerMoveListener),this.resizePointerMoveListener=null)}onResizePointerMove(a){a=move$$module$build$src$core$utils$drag(this.workspace,a);this.setSize(new Size$$module$build$src$core$utils$size(this.workspace.RTL?-a.x:a.x,a.y),!1);this.onSizeChange()}onSizeChange(){for(const a of this.sizeChangeListeners)a()}onLocationChange(){for(const a of this.locationChangeListeners)a()}getEditor(){return this.editor}performAction(){$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.getEditor())}};
1001
- register$$module$build$src$core$css("\n.blocklyTextInputBubble .blocklyTextarea {\n background-color: var(--commentFillColour);\n border: 0;\n box-sizing: border-box;\n display: block;\n outline: 0;\n padding: 5px;\n resize: none;\n width: 100%;\n height: 100%;\n}\n");var module$build$src$core$bubbles$textinput_bubble={};module$build$src$core$bubbles$textinput_bubble.TextInputBubble=TextInputBubble$$module$build$src$core$bubbles$textinput_bubble;var ConnectionType$$module$build$src$core$connection_type;(function(a){a[a.INPUT_VALUE=1]="INPUT_VALUE";a[a.OUTPUT_VALUE=2]="OUTPUT_VALUE";a[a.NEXT_STATEMENT=3]="NEXT_STATEMENT";a[a.PREVIOUS_STATEMENT=4]="PREVIOUS_STATEMENT"})(ConnectionType$$module$build$src$core$connection_type||(ConnectionType$$module$build$src$core$connection_type={}));var module$build$src$core$connection_type={};module$build$src$core$connection_type.ConnectionType=ConnectionType$$module$build$src$core$connection_type;var ConnectionDB$$module$build$src$core$connection_db=class{constructor(a){this.connectionChecker=a;this.connections=[]}addConnection(a,b){b=this.calculateIndexForYPos(b);this.connections.splice(b,0,a)}findIndexOfConnection(a,b){if(!this.connections.length)return-1;const c=this.calculateIndexForYPos(b);if(c>=this.connections.length)return-1;b=a.y;let d=c;for(;d>=0&&this.connections[d].y===b;){if(this.connections[d]===a)return d;d--}for(d=c;d<this.connections.length&&this.connections[d].y===b;){if(this.connections[d]===
1735
+ register$$module$build$src$core$css("\n.blocklyTextInputBubble .blocklyTextarea {\n background-color: var(--commentFillColour);\n border: 0;\n box-sizing: border-box;\n display: block;\n outline: 0;\n padding: 5px;\n resize: none;\n width: 100%;\n height: 100%;\n}\n");var module$build$src$core$bubbles$textinput_bubble={};module$build$src$core$bubbles$textinput_bubble.TextInputBubble=TextInputBubble$$module$build$src$core$bubbles$textinput_bubble;var ConnectionDB$$module$build$src$core$connection_db=class{constructor(a){this.connectionChecker=a;this.connections=[]}addConnection(a,b){b=this.calculateIndexForYPos(b);this.connections.splice(b,0,a)}findIndexOfConnection(a,b){if(!this.connections.length)return-1;const c=this.calculateIndexForYPos(b);if(c>=this.connections.length)return-1;b=a.y;let d=c;for(;d>=0&&this.connections[d].y===b;){if(this.connections[d]===a)return d;d--}for(d=c;d<this.connections.length&&this.connections[d].y===b;){if(this.connections[d]===
1002
1736
  a)return d;d++}return-1}calculateIndexForYPos(a){if(!this.connections.length)return 0;let b=0,c=this.connections.length;for(;b<c;){const d=Math.floor((b+c)/2);if(this.connections[d].y<a)b=d+1;else if(this.connections[d].y>a)c=d;else{b=d;break}}return b}removeConnection(a,b){a=this.findIndexOfConnection(a,b);if(a===-1)throw Error("Unable to find connection in connectionDB.");this.connections.splice(a,1)}getNeighbours(a,b){function c(l){const m=e-d[l].x,n=f-d[l].y;Math.sqrt(m*m+n*n)<=b&&k.push(d[l]);
1003
1737
  return n<b}const d=this.connections,e=a.x,f=a.y;a=0;let g=d.length-2,h=g;for(;a<h;)d[h].y<f?a=h:g=h,h=Math.floor((a+g)/2);const k=[];g=a=h;if(d.length){for(;a>=0&&c(a);)a--;do g++;while(g<d.length&&c(g))}return k}isInYRange(a,b,c){return Math.abs(this.connections[a].y-b)<=c}searchForClosest(a,b,c){if(!this.connections.length)return{connection:null,radius:b};const d=a.y,e=a.x;a.x=e+c.x;a.y=d+c.y;var f=this.calculateIndexForYPos(a.y);c=null;let g=b,h,k=f-1;for(;k>=0&&this.isInYRange(k,a.y,b);)h=this.connections[k],
1004
1738
  this.connectionChecker.canConnect(a,h,!0,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.connections.length&&this.isInYRange(f,a.y,b);)h=this.connections[f],this.connectionChecker.canConnect(a,h,!0,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x=e;a.y=d;return{connection:c,radius:g}}static init(a){const b=[];b[ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE]=new ConnectionDB$$module$build$src$core$connection_db(a);b[ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE]=new ConnectionDB$$module$build$src$core$connection_db(a);
1005
- b[ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT]=new ConnectionDB$$module$build$src$core$connection_db(a);b[ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT]=new ConnectionDB$$module$build$src$core$connection_db(a);return b}},module$build$src$core$connection_db={};module$build$src$core$connection_db.ConnectionDB=ConnectionDB$$module$build$src$core$connection_db;var Selected$$module$build$src$core$events$events_selected=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=EventType$$module$build$src$core$events$type.SELECTED;this.oldElementId=a!=null?a:void 0;this.newElementId=b!=null?b:void 0}toJson(){const a=super.toJson();a.oldElementId=this.oldElementId;a.newElementId=this.newElementId;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new Selected$$module$build$src$core$events$events_selected);
1006
- b.oldElementId=a.oldElementId;b.newElementId=a.newElementId;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.SELECTED,Selected$$module$build$src$core$events$events_selected);var module$build$src$core$events$events_selected={};module$build$src$core$events$events_selected.Selected=Selected$$module$build$src$core$events$events_selected;var BlockDelete$$module$build$src$core$events$events_block_delete=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_DELETE;if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");a.isShadow()&&(this.recordUndo=!1);this.ids=getDescendantIds$$module$build$src$core$events$utils(a);this.wasShadow=a.isShadow();this.oldJson=save$$module$build$src$core$serialization$blocks(a,{addCoordinates:!0})}}toJson(){const a=
1007
- super.toJson();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(this.wasShadow===void 0)throw Error("Whether the block was a shadow is undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");a.ids=this.ids;a.wasShadow=this.wasShadow;a.oldJson=this.oldJson;this.recordUndo||(a.recordUndo=this.recordUndo);
1008
- return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockDelete$$module$build$src$core$events$events_block_delete);b.ids=a.ids;b.wasShadow=a.wasShadow;b.oldJson=a.oldJson;a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}run(a){const b=this.getEventWorkspace_();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");
1009
- if(a)for(a=0;a<this.ids.length;a++){const c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't delete non-existent block: "+c)}else append$$module$build$src$core$serialization$blocks(this.oldJson,b)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_DELETE,BlockDelete$$module$build$src$core$events$events_block_delete);var module$build$src$core$events$events_block_delete={};
1010
- module$build$src$core$events$events_block_delete.BlockDelete=BlockDelete$$module$build$src$core$events$events_block_delete;var Connection$$module$build$src$core$connection=class{constructor(a,b){this.type=b;this.targetConnection=null;this.disposed=!1;this.shadowDom=this.check=null;this.y=this.x=0;this.shadowState=null;this.sourceBlock_=a;if(a.id.includes("_connection"))throw Error(`Connection ID indicator is contained in block ID. This will cause problems with focus: ${a.id}.`);this.id=`${a.id}_connection_${getNextUniqueId$$module$build$src$core$utils$idgenerator()}`}connect_(a){const b=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,
1739
+ b[ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT]=new ConnectionDB$$module$build$src$core$connection_db(a);b[ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT]=new ConnectionDB$$module$build$src$core$connection_db(a);return b}},module$build$src$core$connection_db={};module$build$src$core$connection_db.ConnectionDB=ConnectionDB$$module$build$src$core$connection_db;var Connection$$module$build$src$core$connection=class{constructor(a,b){this.type=b;this.targetConnection=null;this.disposed=!1;this.shadowDom=this.check=null;this.y=this.x=0;this.shadowState=null;this.sourceBlock_=a;if(a.id.includes("_connection"))throw Error(`Connection ID indicator is contained in block ID. This will cause problems with focus: ${a.id}.`);this.id=`${a.id}_connection_${getNextUniqueId$$module$build$src$core$utils$idgenerator()}`}connect_(a){const b=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,
1011
1740
  c=this.getSourceBlock();var d=a.getSourceBlock();a.isConnected()&&a.disconnectInternal(!1);let e;if(this.isConnected()){const g=this.stashShadowState(),h=this.targetBlock();h.isShadow()?h.dispose(!1):(this.disconnectInternal(),e=h);this.applyShadowState(g)}let f;isEnabled$$module$build$src$core$events$utils()&&(f=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(d),f.setReason(["connect"]));connectReciprocally$$module$build$src$core$connection(this,
1012
1741
  a);d.setParent(c);f&&(f.recordNew(),fire$$module$build$src$core$events$utils(f));if(e&&(a=this.type===b?e.outputConnection:e.previousConnection))if(d=Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(d,a))a.connect(d);else a.onFailedConnect(this)}dispose(){if(this.isConnected()){this.isSuperior()&&this.setShadowStateInternal();const a=this.targetBlock();a&&!a.isDeadOrDying()&&a.unplug()}this.disposed=!0}getSourceBlock(){return this.sourceBlock_}isSuperior(){return this.type===
1013
1742
  ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE||this.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT}isConnected(){return!!this.targetConnection}getConnectionChecker(){return this.sourceBlock_.workspace.connectionChecker}onFailedConnect(a){}connect(a){if(this.targetConnection===a)return!0;if(this.getConnectionChecker().canConnect(this,a,!1)){const b=$.getGroup$$module$build$src$core$events$utils();b||$.setGroup$$module$build$src$core$events$utils(!0);
@@ -1024,7 +1753,9 @@ blockToDom$$module$build$src$core$xml(a),this.shadowState=save$$module$build$src
1024
1753
  Connection$$module$build$src$core$connection.REASON_SELF_CONNECTION=1;Connection$$module$build$src$core$connection.REASON_WRONG_TYPE=2;Connection$$module$build$src$core$connection.REASON_TARGET_NULL=3;Connection$$module$build$src$core$connection.REASON_CHECKS_FAILED=4;Connection$$module$build$src$core$connection.REASON_DIFFERENT_WORKSPACES=5;Connection$$module$build$src$core$connection.REASON_SHADOW_PARENT=6;Connection$$module$build$src$core$connection.REASON_DRAG_CHECKS_FAILED=7;
1025
1754
  Connection$$module$build$src$core$connection.REASON_PREVIOUS_AND_OUTPUT=8;var module$build$src$core$connection={};module$build$src$core$connection.Connection=Connection$$module$build$src$core$connection;var DuplicateIconType$$module$build$src$core$icons$exceptions=class extends Error{constructor(a){super(`Tried to append an icon of type ${a.getType()} when an icon of that type already exists on the block. Use getIcon to access the existing icon.`);this.icon=a}},module$build$src$core$icons$exceptions={};module$build$src$core$icons$exceptions.DuplicateIconType=DuplicateIconType$$module$build$src$core$icons$exceptions;(function(a){a[a.LEFT=-1]="LEFT";a[a.CENTRE=0]="CENTRE";a[a.RIGHT=1]="RIGHT"})($.Align$$module$build$src$core$inputs$align||($.Align$$module$build$src$core$inputs$align={}));var module$build$src$core$inputs$align={};module$build$src$core$inputs$align.Align=$.Align$$module$build$src$core$inputs$align;var FieldLabel$$module$build$src$core$field_label=class extends Field$$module$build$src$core$field{constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.class=null;this.EDITABLE=!1;this.maxDisplayLength=Infinity;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c?this.configure_(c):this.class=b||null,this.setValue(a))}configure_(a){super.configure_(a);a.class&&(this.class=a.class)}initView(){this.createTextElement_();this.class&&addClass$$module$build$src$core$utils$dom(this.getTextElement(),
1026
1755
  this.class);this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyLabelField")}doClassValidation_(a){return a===null||a===void 0?null:`${a}`}setClass(a){this.textElement_&&(this.class&&removeClass$$module$build$src$core$utils$dom(this.textElement_,this.class),a&&addClass$$module$build$src$core$utils$dom(this.textElement_,a));this.class=a}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};
1027
- register$$module$build$src$core$field_registry("field_label",FieldLabel$$module$build$src$core$field_label);FieldLabel$$module$build$src$core$field_label.prototype.DEFAULT_VALUE="";var module$build$src$core$field_label={};module$build$src$core$field_label.FieldLabel=FieldLabel$$module$build$src$core$field_label;var COLLAPSE_CHARS$$module$build$src$core$internal_constants=30,OPPOSITE_TYPE$$module$build$src$core$internal_constants=[];OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE;OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE;
1756
+ register$$module$build$src$core$field_registry("field_label",FieldLabel$$module$build$src$core$field_label);FieldLabel$$module$build$src$core$field_label.prototype.DEFAULT_VALUE="";var module$build$src$core$field_label={};module$build$src$core$field_label.FieldLabel=FieldLabel$$module$build$src$core$field_label;var module$build$src$core$interfaces$i_toolbox_item={};module$build$src$core$interfaces$i_toolbox_item.isToolboxItem=isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item;var module$build$src$core$interfaces$i_selectable_toolbox_item={};module$build$src$core$interfaces$i_selectable_toolbox_item.isSelectableToolboxItem=isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item;var ConnectionPreposition$$module$build$src$core$block_aria_composer;(function(a){a[a.UNKNOWN=0]="UNKNOWN";a[a.BEFORE=1]="BEFORE";a[a.AFTER=2]="AFTER";a[a.AROUND=3]="AROUND";a[a.INSIDE=4]="INSIDE"})(ConnectionPreposition$$module$build$src$core$block_aria_composer||(ConnectionPreposition$$module$build$src$core$block_aria_composer={}));var module$build$src$core$block_aria_composer={};module$build$src$core$block_aria_composer.ConnectionPreposition=ConnectionPreposition$$module$build$src$core$block_aria_composer;
1757
+ module$build$src$core$block_aria_composer.computeAriaLabel=computeAriaLabel$$module$build$src$core$block_aria_composer;module$build$src$core$block_aria_composer.computeFieldRowLabel=computeFieldRowLabel$$module$build$src$core$block_aria_composer;module$build$src$core$block_aria_composer.computeMoveLabel=computeMoveLabel$$module$build$src$core$block_aria_composer;module$build$src$core$block_aria_composer.configureAriaRole=configureAriaRole$$module$build$src$core$block_aria_composer;
1758
+ module$build$src$core$block_aria_composer.getInputLabels=getInputLabels$$module$build$src$core$block_aria_composer;module$build$src$core$block_aria_composer.getInputLabelsSubset=getInputLabelsSubset$$module$build$src$core$block_aria_composer;var COLLAPSE_CHARS$$module$build$src$core$internal_constants=30,OPPOSITE_TYPE$$module$build$src$core$internal_constants=[];OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE;OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE]=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE;
1028
1759
  OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT]=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;OPPOSITE_TYPE$$module$build$src$core$internal_constants[ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT]=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT;
1029
1760
  var RENAME_VARIABLE_ID$$module$build$src$core$internal_constants="RENAME_VARIABLE_ID",DELETE_VARIABLE_ID$$module$build$src$core$internal_constants="DELETE_VARIABLE_ID",module$build$src$core$internal_constants={COLLAPSE_CHARS:COLLAPSE_CHARS$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID:DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,OPPOSITE_TYPE:OPPOSITE_TYPE$$module$build$src$core$internal_constants,RENAME_VARIABLE_ID:RENAME_VARIABLE_ID$$module$build$src$core$internal_constants};var BUMP_RANDOMNESS$$module$build$src$core$rendered_connection=10,RenderedConnection$$module$build$src$core$rendered_connection=class extends Connection$$module$build$src$core$connection{constructor(a,b){super(a,b);this.highlighted=!1;this.targetConnection=null;this.db=a.workspace.connectionDBList[b];this.dbOpposite=a.workspace.connectionDBList[OPPOSITE_TYPE$$module$build$src$core$internal_constants[b]];this.offsetInBlock=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.trackedState=
1030
1761
  RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.WILL_TRACK}dispose(){super.dispose();this.trackedState===RenderedConnection$$module$build$src$core$rendered_connection.TrackedState.TRACKED&&this.db.removeConnection(this,this.y);let a,b;(b=(a=this.sourceBlock_.pathObject).removeConnectionHighlight)==null||b.call(a,this)}getSourceBlock(){return super.getSourceBlock()}targetBlock(){return super.targetBlock()}distanceFrom(a){const b=this.x-a.x;a=this.y-a.y;return Math.sqrt(b*
@@ -1045,7 +1776,8 @@ b===""&&c))return a;typeof b==="string"&&(b=$.fromJson$$module$build$src$core$fi
1045
1776
  a)return d.dispose(),this.fieldRow.splice(c,1),this.sourceBlock.rendered&&this.sourceBlock.queueRender(),!0;if(b)return!1;throw Error('Field "'+a+'" not found.');}isVisible(){return this.visible}setVisible(a){let b=[];if(this.visible===a)return b;this.visible=a;for(let c=0,d;d=this.fieldRow[c];c++)d.setVisible(a);if(this.connection&&this.connection instanceof RenderedConnection$$module$build$src$core$rendered_connection){a?b=this.connection.startTrackingAll():this.connection.stopTrackingAll();const c=
1046
1777
  this.connection.targetBlock();c&&(c.getSvgRoot().style.display=a?"block":"none")}return b}markDirty(){for(let a=0,b;b=this.fieldRow[a];a++)b.markDirty()}setCheck(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this}setAlign(a){this.align=a;this.sourceBlock.rendered&&this.sourceBlock.queueRender();return this}setShadowDom(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setShadowDom(a);return this}getShadowDom(){if(!this.connection)throw Error("This input does not have a connection.");
1047
1778
  return this.connection.getShadowDom()}init(){for(const a of this.fieldRow)a.init()}initModel(){for(const a of this.fieldRow)a.initModel()}initField(a){this.sourceBlock.rendered?a.init():a.initModel()}dispose(){for(let a=0,b;b=this.fieldRow[a];a++)b.dispose();this.connection&&this.connection.dispose()}makeConnection(a){return this.sourceBlock.makeConnection_(a)}getRowId(){const a=this.getSourceBlock().inputList;if(this===a[0])return this.getSourceBlock().getRowId();const b=a.indexOf(this);let c;const d=
1048
- ((c=a[b-1].connection)==null?void 0:c.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT;let e;return!this.getSourceBlock().getInputsInline()||((e=this.connection)==null?void 0:e.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||d?`${this.getSourceBlock().id}-input${b}`:a[b-1].getRowId()}},module$build$src$core$inputs$input={};module$build$src$core$inputs$input.Input=Input$$module$build$src$core$inputs$input;var DummyInput$$module$build$src$core$inputs$dummy_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.DUMMY}},module$build$src$core$inputs$dummy_input={};module$build$src$core$inputs$dummy_input.DummyInput=DummyInput$$module$build$src$core$inputs$dummy_input;var EndRowInput$$module$build$src$core$inputs$end_row_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.END_ROW}},module$build$src$core$inputs$end_row_input={};module$build$src$core$inputs$end_row_input.EndRowInput=EndRowInput$$module$build$src$core$inputs$end_row_input;var StatementInput$$module$build$src$core$inputs$statement_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){if(!a)throw Error("Statement inputs must have a non-empty name");super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT;this.connection=this.makeConnection(ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)}},module$build$src$core$inputs$statement_input={};
1779
+ ((c=a[b-1].connection)==null?void 0:c.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT;let e;return!this.getSourceBlock().getInputsInline()||((e=this.connection)==null?void 0:e.type)===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||d?`${this.getSourceBlock().id}-input${b}`:a[b-1].getRowId()}getLabel(a=Verbosity$$module$build$src$core$utils$aria.STANDARD){if(!this.isVisible())return"";const b=computeFieldRowLabel$$module$build$src$core$block_aria_composer(this,
1780
+ !1,a);var c;((c=this.connection)==null?void 0:c.type)===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE&&(c=this.connection.targetBlock())&&!c.isInsertionMarker()&&b.push(getInputLabels$$module$build$src$core$block_aria_composer(c,a).join(" "));return b.join(" ")}getIndex(){return this.getSourceBlock().inputList.indexOf(this)}},module$build$src$core$inputs$input={};module$build$src$core$inputs$input.Input=Input$$module$build$src$core$inputs$input;var DummyInput$$module$build$src$core$inputs$dummy_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.DUMMY}},module$build$src$core$inputs$dummy_input={};module$build$src$core$inputs$dummy_input.DummyInput=DummyInput$$module$build$src$core$inputs$dummy_input;var EndRowInput$$module$build$src$core$inputs$end_row_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.END_ROW}},module$build$src$core$inputs$end_row_input={};module$build$src$core$inputs$end_row_input.EndRowInput=EndRowInput$$module$build$src$core$inputs$end_row_input;var StatementInput$$module$build$src$core$inputs$statement_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){if(!a)throw Error("Statement inputs must have a non-empty name");super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT;this.connection=this.makeConnection(ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT)}},module$build$src$core$inputs$statement_input={};
1049
1781
  module$build$src$core$inputs$statement_input.StatementInput=StatementInput$$module$build$src$core$inputs$statement_input;var module$build$src$core$inputs$value_input;$.ValueInput$$module$build$src$core$inputs$value_input=class extends Input$$module$build$src$core$inputs$input{constructor(a,b){if(!a)throw Error("Value inputs must have a non-empty name");super(a,b);this.name=a;this.type=$.inputTypes$$module$build$src$core$inputs$input_types.VALUE;this.connection=this.makeConnection(ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE)}};module$build$src$core$inputs$value_input={};
1050
1782
  module$build$src$core$inputs$value_input.ValueInput=$.ValueInput$$module$build$src$core$inputs$value_input;var module$build$src$core$interfaces$i_icon={};module$build$src$core$interfaces$i_icon.isIcon=isIcon$$module$build$src$core$interfaces$i_icon;var module$build$src$core$interfaces$i_comment_icon={};module$build$src$core$interfaces$i_comment_icon.isCommentIcon=isCommentIcon$$module$build$src$core$interfaces$i_comment_icon;var Block$$module$build$src$core$block=class{constructor(a,b,c){this.data=null;this.disposed=!1;this.hue=null;this.colour_="#000000";this.styleName_="";this.suppressPrefixSuffix=!1;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.icons=[];this.disabledReasons=new Set;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable=this.movable=this.deletable=!0;this.collapsed_=this.shadow=!1;this.outputShape_=null;this.rendered=
1051
1783
  this.isInsertionMarker_=this.initialized=this.disposing=!1;this.onchangeWrapper=this.helpUrl=null;this.statementInputCount=0;this.workspace=a;this.id=c&&!a.getBlockById(c)?c:genUid$$module$build$src$core$utils$idgenerator();a.setBlockById(this.id,this);this.xy=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.isInFlyout=a.isFlyout;this.isInMutator=a.isMutator;this.RTL=a.RTL;if(b){this.type=b;c=Blocks$$module$build$src$core$blocks[b];if(!c||typeof c!=="object")throw TypeError("Invalid block definition for type: "+
@@ -1094,48 +1826,56 @@ this.getNextBlock())?b.allInputsFilled(a):!0}toDevString(){let a=this.type?'"'+t
1094
1826
  module$build$src$core$block_animations.disposeUiEffect=disposeUiEffect$$module$build$src$core$block_animations;var BlockPaster$$module$build$src$core$clipboard$block_paster=class{paste(a,b,c){if(!b.isCapacityAvailable(a.typeCounts))return null;c&&(a.blockState.x=c.x,a.blockState.y=c.y);c=c||new Coordinate$$module$build$src$core$utils$coordinate(a.blockState.x||0,a.blockState.y||0);$.disable$$module$build$src$core$events$utils();let d;try{d=append$$module$build$src$core$serialization$blocks(a.blockState,b),moveBlockToNotConflict$$module$build$src$core$clipboard$block_paster(d,c)}finally{$.enable$$module$build$src$core$events$utils()}if(!d)return d;
1095
1827
  isEnabled$$module$build$src$core$events$utils()&&!d.isShadow()&&fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_CREATE))(d));const e=d;finishQueuedRenders$$module$build$src$core$render_management().then(()=>$.getFocusManager$$module$build$src$core$focus_manager().focusNode(e));return d}};BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE="block";
1096
1828
  register$$module$build$src$core$clipboard$registry(BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE,new BlockPaster$$module$build$src$core$clipboard$block_paster);var module$build$src$core$clipboard$block_paster={};module$build$src$core$clipboard$block_paster.BlockPaster=BlockPaster$$module$build$src$core$clipboard$block_paster;module$build$src$core$clipboard$block_paster.moveBlockToNotConflict=moveBlockToNotConflict$$module$build$src$core$clipboard$block_paster;var bumpIntoBounds$$module$build$src$core$bump_objects=bumpObjectIntoBounds$$module$build$src$core$bump_objects,module$build$src$core$bump_objects={};module$build$src$core$bump_objects.bumpIntoBounds=bumpObjectIntoBounds$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpIntoBoundsHandler=bumpIntoBoundsHandler$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpTopObjectsIntoBounds=bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects;var longModifierNames$$module$build$src$core$utils$shortcut_formatting={Control:$.Msg$$module$build$src$core$msg.CONTROL_KEY,Meta:$.Msg$$module$build$src$core$msg.COMMAND_KEY,Alt:APPLE$$module$build$src$core$utils$useragent?$.Msg$$module$build$src$core$msg.OPTION_KEY:$.Msg$$module$build$src$core$msg.ALT_KEY},shortModifierNames$$module$build$src$core$utils$shortcut_formatting={Control:$.Msg$$module$build$src$core$msg.CONTROL_KEY,Meta:"\u2318",Alt:APPLE$$module$build$src$core$utils$useragent?"\u2325":
1097
- $.Msg$$module$build$src$core$msg.ALT_KEY},modifierOrdering$$module$build$src$core$utils$shortcut_formatting=["Meta","Control","Alt","Shift"],module$build$src$core$utils$shortcut_formatting={};module$build$src$core$utils$shortcut_formatting.getLongActionShortcutsAsKeys=getLongActionShortcutsAsKeys$$module$build$src$core$utils$shortcut_formatting;module$build$src$core$utils$shortcut_formatting.getShortActionShortcut=getShortActionShortcut$$module$build$src$core$utils$shortcut_formatting;var unconstrainedMoveHintId$$module$build$src$core$hints="unconstrainedMoveHint",constrainedMoveHintId$$module$build$src$core$hints="constrainedMoveHint",helpHintId$$module$build$src$core$hints="helpHint",blockNavigationHintId$$module$build$src$core$hints="blockNavigationHint",workspaceNavigationHintId$$module$build$src$core$hints="workspaceNavigationHint",module$build$src$core$hints={};module$build$src$core$hints.clearMoveHints=clearMoveHints$$module$build$src$core$hints;
1829
+ $.Msg$$module$build$src$core$msg.ALT_KEY},keyNames$$module$build$src$core$utils$shortcut_formatting={8:$.Msg$$module$build$src$core$msg.BACKSPACE_KEY,9:$.Msg$$module$build$src$core$msg.TAB_KEY,13:$.Msg$$module$build$src$core$msg.ENTER_KEY,16:$.Msg$$module$build$src$core$msg.SHIFT_KEY,17:$.Msg$$module$build$src$core$msg.CTRL_KEY,18:$.Msg$$module$build$src$core$msg.ALT_KEY,19:$.Msg$$module$build$src$core$msg.PAUSE_KEY,20:$.Msg$$module$build$src$core$msg.CAPS_LOCK_KEY,27:$.Msg$$module$build$src$core$msg.ESCAPE_KEY,
1830
+ 32:$.Msg$$module$build$src$core$msg.SPACE_KEY,33:$.Msg$$module$build$src$core$msg.PAGE_UP_KEY,34:$.Msg$$module$build$src$core$msg.PAGE_DOWN_KEY,35:$.Msg$$module$build$src$core$msg.END_KEY,36:$.Msg$$module$build$src$core$msg.HOME_KEY,37:"\u2190",38:"\u2191",39:"\u2192",40:"\u2193",45:$.Msg$$module$build$src$core$msg.INSERT_KEY,46:$.Msg$$module$build$src$core$msg.DELETE_KEY,48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",93:$.Msg$$module$build$src$core$msg.CONTEXT_MENU_KEY,
1831
+ 96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"\u00d7",107:"+",109:"\u2212",110:".",111:"\u00f7",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",186:";",187:"=",189:"-",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"\u2318"},modifierOrdering$$module$build$src$core$utils$shortcut_formatting=["Meta","Control","Alt","Shift"],module$build$src$core$utils$shortcut_formatting={};
1832
+ module$build$src$core$utils$shortcut_formatting.getShortcutKeysLong=getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting;module$build$src$core$utils$shortcut_formatting.getShortcutKeysShort=getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting;var unconstrainedMoveHintId$$module$build$src$core$hints="unconstrainedMoveHint",constrainedMoveHintId$$module$build$src$core$hints="constrainedMoveHint",helpHintId$$module$build$src$core$hints="helpHint",blockNavigationHintId$$module$build$src$core$hints="blockNavigationHint",workspaceNavigationHintId$$module$build$src$core$hints="workspaceNavigationHint",module$build$src$core$hints={};module$build$src$core$hints.clearMoveHints=clearMoveHints$$module$build$src$core$hints;
1098
1833
  module$build$src$core$hints.showBlockNavigationHint=showBlockNavigationHint$$module$build$src$core$hints;module$build$src$core$hints.showConstrainedMovementHint=showConstrainedMovementHint$$module$build$src$core$hints;module$build$src$core$hints.showHelpHint=showHelpHint$$module$build$src$core$hints;module$build$src$core$hints.showUnconstrainedMoveHint=showUnconstrainedMoveHint$$module$build$src$core$hints;module$build$src$core$hints.showWorkspaceNavigationHint=showWorkspaceNavigationHint$$module$build$src$core$hints;var DragDisposition$$module$build$src$core$interfaces$i_draggable;(function(a){a[a.COMMIT=1]="COMMIT";a[a.DELETE=2]="DELETE";a[a.REVERT=3]="REVERT"})(DragDisposition$$module$build$src$core$interfaces$i_draggable||(DragDisposition$$module$build$src$core$interfaces$i_draggable={}));var module$build$src$core$interfaces$i_draggable={};module$build$src$core$interfaces$i_draggable.DragDisposition=DragDisposition$$module$build$src$core$interfaces$i_draggable;
1099
1834
  module$build$src$core$interfaces$i_draggable.isDraggable=isDraggable$$module$build$src$core$interfaces$i_draggable;var MoveMode$$module$build$src$core$dragging$block_drag_strategy;(function(a){a[a.CONSTRAINED=1]="CONSTRAINED";a[a.UNCONSTRAINED=2]="UNCONSTRAINED"})(MoveMode$$module$build$src$core$dragging$block_drag_strategy||(MoveMode$$module$build$src$core$dragging$block_drag_strategy={}));
1100
1835
  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.allConnectionPairs=[];this.moveMode=MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.originalEventGroup="";this.BLOCK_CONNECTION_OFFSET=10;this.workspace=a.workspace}isMovable(){let a;return this.block.isOwnMovable()&&!this.block.isDeadOrDying()&&
1101
- !this.workspace.isReadOnly()&&(!this.block.isInFlyout||this.block.isEnabled()&&!((a=this.block.workspace.targetWorkspace)==null?0:a.isReadOnly()))}positionNewBlock(a,b){a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(a.workspace,a.getRelativeToSurfaceXY());a=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b.workspace,a);b.moveTo(a)}getTargetBlock(){if(this.block.isShadow()){var a=this.block.getParent();if(a)return a}else if(this.block.isInFlyout&&this.block.workspace.targetWorkspace&&
1102
- (a=this.block.getRootBlock(),a=save$$module$build$src$core$serialization$blocks(a)))return a=appendInternal$$module$build$src$core$serialization$blocks(a,this.block.workspace.targetWorkspace,{recordUndo:!0}),$.setRecordUndo$$module$build$src$core$events$utils(!1),this.positionNewBlock(this.block,a),$.setRecordUndo$$module$build$src$core$events$utils(!0),a;return this.block}startDrag(a){var b=this.getTargetBlock();if(b!==this.block)return b.startDrag(a);this.dragging=!0;this.fireDragStartEvent();this.startLoc=
1103
- 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();this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();b=this.shouldHealStack(a);this.shouldDisconnect(b)&&this.disconnectBlock(b);this.block.setDragging(!0);let c;
1104
- (c=this.workspace.getLayerManager())==null||c.moveToDragLayer(this.block);this.getVisibleBubbles(this.block).forEach(d=>{let e;(e=this.workspace.getLayerManager())==null||e.moveToDragLayer(d,!1)});a instanceof KeyboardEvent&&(this.cacheAllConnectionPairs(),this.block.moveDuringDrag(this.startLoc),a=this.updateConnectionPreview(this.block,new Coordinate$$module$build$src$core$utils$coordinate(0,0)))&&(a.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?(a=this.block.getRelativeToSurfaceXY(),
1105
- a=new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y-this.BLOCK_CONNECTION_OFFSET)):a=new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y+this.BLOCK_CONNECTION_OFFSET),this.block.moveDuringDrag(a));return this.block}cacheAllConnectionPairs(){const a=this.block.workspace.connectionChecker,b=[];this.allConnectionPairs=[];const c=this.getLocalConnections(this.block);for(const d of this.block.workspace.getTopBlocks(!0))b.push(...this.getAllConnections(d));
1106
- for(const d of b)for(const e of c){let f;!a.canConnect(e,d,!0,Infinity)||((f=d.targetBlock())==null?0:f.isInsertionMarker())||this.allConnectionPairs.push({local:e,neighbour:d})}}getVisibleBubbles(a){return a.getDescendants(!1).flatMap(b=>b.getIcons()).filter(b=>hasBubble$$module$build$src$core$interfaces$i_has_bubble(b)&&b.bubbleIsVisible()).map(b=>b.getBubble()).filter(b=>!!b).sort((b,c)=>{b=b.getSvgRoot().compareDocumentPosition(c.getSvgRoot());return b&Node.DOCUMENT_POSITION_PRECEDING?1:b&Node.DOCUMENT_POSITION_FOLLOWING?
1107
- -1:0})}shouldHealStack(a){return a instanceof PointerEvent?a.ctrlKey||a.metaKey:a instanceof KeyboardEvent?!(a.shiftKey||!this.block.previousConnection):!1}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){this.storeInitialConnections(a);this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}storeInitialConnections(a){var b=null;let c=null,d;if((d=this.block.outputConnection)==
1108
- null?0:d.isConnected())b=this.block.outputConnection,c=this.block.outputConnection.targetConnection;else{let e;if((e=this.block.previousConnection)==null?0:e.isConnected())b=this.block.previousConnection,c=this.block.previousConnection.targetConnection}this.startParentConn=c;b&&c?this.connectionCandidate={local:b,neighbour:c,distance:0}:a&&(a=this.block.nextConnection,b=a==null?void 0:a.targetConnection,a&&b&&(this.connectionCandidate={local:a,neighbour:b,distance:0}),this.startChildConn=b!=null?
1109
- b:null)}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,!1,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireMoveEvent(){if(!this.block.isDeadOrDying()){var a=
1110
- 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,b){this.moveMode=b instanceof KeyboardEvent&&!b.ctrlKey&&!b.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&
1111
- this.block.moveDuringDrag(a);this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,this.startLoc));if(this.connectionCandidate){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){const {local:c,neighbour:d}=this.connectionCandidate;a=this.startLoc.x+(d.x-c.x);b=this.startLoc.y+(d.y-c.y);const e=this.BLOCK_CONNECTION_OFFSET;c.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||c.type===
1112
- ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a+=e,b+=e):(a-=e,b-=e);this.block.moveDuringDrag(new Coordinate$$module$build$src$core$utils$coordinate(a,b))}}else this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED&&(showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace,!0),this.workspace.getAudioManager().playErrorBeep())}updateConnectionPreview(a,b){var c=this.connectionCandidate;const d=this.getConnectionCandidate(b);if(d){this.connectionCandidate=
1113
- 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;var g;c=f.isConnected()&&!((g=f.targetBlock())==null?0:g.isInsertionMarker());if(b&&c&&!this.orphanCanConnectAtEnd(a,f.targetBlock(),e.type)){let k;(k=this.connectionPreviewer)==null||k.previewReplacement(e,f,f.targetBlock())}else{let k;(k=this.connectionPreviewer)==null||
1114
- k.previewConnection(e,f)}return f}let h;(h=this.connectionPreviewer)==null||h.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,b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;const {local:d,neighbour:e}=
1115
- 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){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return a=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,
1116
- a)),this.findTraversalCandidate(a);let b=this.getSearchRadius();const c=this.getLocalConnections(this.block);let d=null;for(const e of c){const {connection:f,radius:g}=e.closest(b,a);f&&(d={local:e,neighbour:f,distance:g},b=g)}return d}getSearchRadius(){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?Infinity:this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:$.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){const b=
1117
- a.getConnections_(!1);var c=a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);a=[a.outputConnection,a.previousConnection,a.nextConnection].filter(d=>!!d);c=[];for(const d of b)a.includes(d)||c.push(d);c.reverse();return[...a,...c]}endDrag(a,b){b===DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&disposeUiEffect$$module$build$src$core$block_animations(this.block);this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();this.fireDragEndEvent();this.fireMoveEvent();
1118
- stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();let c;(c=this.connectionPreviewer)==null||c.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(e=>{let f;return(f=this.workspace.getLayerManager())==null?void 0:f.moveOffDragLayer(e,BUBBLE$$module$build$src$core$layers,
1119
- !1)});this.block.setDragging(!1)}this.connectionCandidate?(this.applyConnections(this.connectionCandidate),this.disposeStep()):this.block.queueRender().then(()=>this.disposeStep());this.allConnectionPairs=[]}disposeStep(){const a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);this.block.snapToGrid();let b;(b=this.connectionPreviewer)==null||b.dispose();this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(a)}applyConnections(a){const {local:b,
1120
- 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(){let a;(a=this.connectionPreviewer)==null||a.hidePreview();this.connectionCandidate=null;if(this.block.nextConnection){let b;(b=this.startChildConn)==null||b.connect(this.block.nextConnection)}if(this.startParentConn)switch(this.startParentConn.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:this.block.outputConnection&&
1121
- this.startParentConn.connect(this.block.outputConnection);break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:this.block.previousConnection&&this.startParentConn.connect(this.block.previousConnection)}else{this.block.moveTo(this.startLoc,["drag"]);let b;(b=this.workspace.getLayerManager())==null||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(c=>{let d;return(d=this.workspace.getLayerManager())==null?void 0:
1122
- d.moveOffDragLayer(c,BUBBLE$$module$build$src$core$layers,!1)});bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace,this.workspace.getMetricsManager().getScrollMetrics(!0),this.block)}this.startParentConn=this.startChildConn=null;this.block.setDragging(!1);this.dragging=!1}findTraversalCandidate(a){const b=this.allConnectionPairs;if(a===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE||!b.length)return this.connectionCandidate;a=a===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT||
1123
- a===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN;const c=b.findIndex(d=>{let e,f;return((e=this.connectionCandidate)==null?void 0:e.local)===d.local&&((f=this.connectionCandidate)==null?void 0:f.neighbour)===d.neighbour});return a?c===-1?this.pairToCandidate(b[0]):c===b.length-1?null:this.pairToCandidate(b[c+1]):c===-1?this.pairToCandidate(b[b.length-1]):c===0?null:this.pairToCandidate(b[c-1])}pairToCandidate(a){return Object.assign({},a,{distance:0})}getDirectionToNewLocation(a){const b=
1124
- this.block.getRelativeToSurfaceXY();a=Coordinate$$module$build$src$core$utils$coordinate.difference(a,b);const {x:c,y:d}=a;if(c){if(c<0)return Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT;if(c>0)return Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT}else if(d){if(d<0)return Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP;if(d>0)return Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN}return Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE}getAllConnections(a){if(a.isShadow())return[];
1125
- const b=[];a.outputConnection&&b.push(a.outputConnection);a.previousConnection&&b.push(a.previousConnection);if(!a.isCollapsed())for(const c of a.inputList)if(c.connection&&c.isVisible()){b.push(c.connection);const d=c.connection.targetBlock();d&&b.push(...this.getAllConnections(d))}a.nextConnection&&(b.push(a.nextConnection),(a=a.nextConnection.targetBlock())&&b.push(...this.getAllConnections(a)));return b}},module$build$src$core$dragging$block_drag_strategy={};
1126
- 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,
1127
- 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?
1836
+ !this.workspace.isReadOnly()&&(!this.block.isInFlyout||this.block.isEnabled()&&!((a=this.block.workspace.targetWorkspace)==null?0:a.isReadOnly()))}positionNewBlock(a,b){a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(a.workspace,a.getRelativeToSurfaceXY());a=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b.workspace,a);b.moveDuringDrag(a)}getTargetBlock(){if(this.block.isShadow()){var a=this.block.getParent();if(a)return a}else if(this.block.isInFlyout&&this.block.workspace.targetWorkspace&&
1837
+ (a=this.block.getRootBlock(),a=save$$module$build$src$core$serialization$blocks(a)))return a=appendInternal$$module$build$src$core$serialization$blocks(a,this.block.workspace.targetWorkspace,{recordUndo:!0}),$.setRecordUndo$$module$build$src$core$events$utils(!1),this.positionNewBlock(this.block,a),$.setRecordUndo$$module$build$src$core$events$utils(!0),a;return this.block}announceMove(a=!1){if(this.connectionCandidate)a=computeMoveLabel$$module$build$src$core$block_aria_composer(this.connectionCandidate.local,
1838
+ this.connectionCandidate.neighbour,this.hasMultipleCompatibleConnections.bind(this),a);else{const b=a?this.block.getStackBlocksCountLabel():"";a=$.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_WORKSPACE;a=a.replace("%1",b)}announceDynamicAriaState$$module$build$src$core$utils$aria(a.replace(/\s+/g," "))}hasMultipleCompatibleConnections(a=!0){const b=this.connectionCandidate;if(!b)return!1;const c=a?"local":"neighbour",d=a?"neighbour":"local";return this.allConnectionPairs.filter(e=>e[d]===b[d]&&e[c]!==
1839
+ b[c].getSourceBlock().nextConnection&&e[c].getSourceBlock().id===b[c].getSourceBlock().id).length>1}startDrag(a){var b=this.getTargetBlock();if(b!==this.block)return b.startDrag(a);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();
1840
+ this.workspace.setResizesEnabled(!1);disconnectUiStop$$module$build$src$core$block_animations();b=this.shouldHealStack(a);this.shouldDisconnect(b)&&this.disconnectBlock(b);this.block.setDragging(!0);let c;(c=this.workspace.getLayerManager())==null||c.moveToDragLayer(this.block);this.getVisibleBubbles(this.block).forEach(d=>{let e;(e=this.workspace.getLayerManager())==null||e.moveToDragLayer(d,!1)});a instanceof KeyboardEvent&&(this.cacheAllConnectionPairs(),this.block.moveDuringDrag(this.startLoc),
1841
+ a=this.updateConnectionPreview(this.block,new Coordinate$$module$build$src$core$utils$coordinate(0,0)))&&(a.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT?(a=this.block.getRelativeToSurfaceXY(),a=new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y-this.BLOCK_CONNECTION_OFFSET)):a=new Coordinate$$module$build$src$core$utils$coordinate(a.x+this.BLOCK_CONNECTION_OFFSET,a.y+this.BLOCK_CONNECTION_OFFSET),this.block.moveDuringDrag(a));
1842
+ this.announceMove(!0);return this.block}cacheAllConnectionPairs(){const a=this.block.workspace.connectionChecker,b=[];this.allConnectionPairs=[];const c=this.getLocalConnections(this.block);for(const d of this.block.workspace.getTopBlocks(!0))b.push(...this.getAllConnections(d));for(const d of b)for(const e of c){let f;!a.canConnect(e,d,!0,Infinity)||((f=d.targetBlock())==null?0:f.isInsertionMarker())||this.allConnectionPairs.push({local:e,neighbour:d})}}getVisibleBubbles(a){return a.getDescendants(!1).flatMap(b=>
1843
+ b.getIcons()).filter(b=>hasBubble$$module$build$src$core$interfaces$i_has_bubble(b)&&b.bubbleIsVisible()).map(b=>b.getBubble()).filter(b=>!!b).sort((b,c)=>{b=b.getSvgRoot().compareDocumentPosition(c.getSvgRoot());return b&Node.DOCUMENT_POSITION_PRECEDING?1:b&Node.DOCUMENT_POSITION_FOLLOWING?-1:0})}shouldHealStack(a){return a instanceof PointerEvent?a.ctrlKey||a.metaKey:a instanceof KeyboardEvent?!(a.shiftKey||!this.block.previousConnection):!1}shouldDisconnect(a){return!!(this.block.getParent()||
1844
+ a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){this.storeInitialConnections(a);this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}storeInitialConnections(a){var b=null;let c=null,d;if((d=this.block.outputConnection)==null?0:d.isConnected())b=this.block.outputConnection,c=this.block.outputConnection.targetConnection;else{let e;if((e=this.block.previousConnection)==null?0:e.isConnected())b=this.block.previousConnection,
1845
+ c=this.block.previousConnection.targetConnection}this.startParentConn=c;b&&c?this.connectionCandidate={local:b,neighbour:c,distance:0}:a&&(a=this.block.nextConnection,b=a==null?void 0:a.targetConnection,a&&b&&(this.connectionCandidate={local:a,neighbour:b,distance:0}),this.startChildConn=b!=null?b:null)}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=
1846
+ 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);a.setReason(["drag"]);a.oldCoordinate=this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a,b){this.moveMode=b instanceof
1847
+ KeyboardEvent&&!b.ctrlKey&&!b.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&this.block.moveDuringDrag(a);this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,this.startLoc));if(this.connectionCandidate){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){const {local:c,
1848
+ neighbour:d}=this.connectionCandidate;a=this.startLoc.x+(d.x-c.x);b=this.startLoc.y+(d.y-c.y);const e=this.BLOCK_CONNECTION_OFFSET;c.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||c.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a+=e,b+=e):(a-=e,b-=e);this.block.moveDuringDrag(new Coordinate$$module$build$src$core$utils$coordinate(a,b))}}else this.moveMode!==MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED||this.allConnectionPairs.length||
1849
+ (showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace),this.workspace.getAudioManager().playErrorBeep());this.announceMove()}updateConnectionPreview(a,b){const c=this.connectionCandidate,d=this.getConnectionCandidate(b);if(d){var e=c&&this.currCandidateIsBetter(c,b,d)?c:d;this.connectionCandidate=e;var {local:f,neighbour:g}=e;e=f.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||f.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;
1850
+ var h,k=g.isConnected()&&!((h=g.targetBlock())==null?0:h.isInsertionMarker());if(e&&k&&!this.orphanCanConnectAtEnd(a,g.targetBlock(),f.type)){var l;(l=this.connectionPreviewer)==null||l.previewReplacement(f,g,g.targetBlock())}else{let n;(n=this.connectionPreviewer)==null||n.previewConnection(f,g)}return g}l=c==null?void 0:c.neighbour.getSourceBlock();let m;h=(m=l==null?void 0:l.getRootBlock())!=null?m:l;h===a&&(h=l);l=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,
1851
+ b));if(h=(k=h)==null?void 0:k.getBoundingRectangle()){switch(l){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:k=new Coordinate$$module$build$src$core$utils$coordinate(h.getOrigin().x,h.getOrigin().y-this.BLOCK_CONNECTION_OFFSET*2-a.getHeightWidth().height);break;default:k=new Coordinate$$module$build$src$core$utils$coordinate(h.getOrigin().x,h.getOrigin().y+h.getHeight()+this.BLOCK_CONNECTION_OFFSET*2)}a.moveDuringDrag(k);
1852
+ (e=this.connectionPreviewer)==null||e.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,b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;const {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,
1853
+ 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){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?this.findTraversalCandidate(a):this.getClosestCandidate(this.block,a)}getClosestCandidate(a,
1854
+ b){let c=this.getSearchRadius();a=this.getLocalConnections(a);let 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}getSearchRadius(){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?Infinity:this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:$.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){const b=a.getConnections_(!1);var c=
1855
+ a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);a=[a.outputConnection,a.previousConnection,a.nextConnection].filter(d=>!!d);c=[];for(const d of b)a.includes(d)||c.push(d);c.reverse();return[...a,...c]}endDrag(a,b){b===DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&disposeUiEffect$$module$build$src$core$block_animations(this.block);this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();this.fireDragEndEvent();this.fireMoveEvent();stopTextWidthCache$$module$build$src$core$utils$dom();
1856
+ disconnectUiStop$$module$build$src$core$block_animations();let c;(c=this.connectionPreviewer)==null||c.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(e=>{let f;return(f=this.workspace.getLayerManager())==null?void 0:f.moveOffDragLayer(e,BUBBLE$$module$build$src$core$layers,!1)});this.block.setDragging(!1)}this.connectionCandidate?
1857
+ (this.applyConnections(this.connectionCandidate),this.disposeStep()):this.block.queueRender().then(()=>this.disposeStep());this.allConnectionPairs=[]}disposeStep(){const a=$.getGroup$$module$build$src$core$events$utils();$.setGroup$$module$build$src$core$events$utils(this.originalEventGroup);this.block.snapToGrid();let b;(b=this.connectionPreviewer)==null||b.dispose();this.workspace.setResizesEnabled(!0);$.setGroup$$module$build$src$core$events$utils(a)}applyConnections(a){const {local:b,neighbour:c}=
1858
+ 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(){let a;(a=this.connectionPreviewer)==null||a.hidePreview();this.connectionCandidate=null;if(this.block.nextConnection){let b;(b=this.startChildConn)==null||b.connect(this.block.nextConnection)}if(this.startParentConn)switch(this.startParentConn.type){case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:this.block.outputConnection&&
1859
+ this.startParentConn.connect(this.block.outputConnection);break;case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:this.block.previousConnection&&this.startParentConn.connect(this.block.previousConnection)}else{this.block.moveDuringDrag(this.startLoc);let b;(b=this.workspace.getLayerManager())==null||b.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(c=>{let d;return(d=this.workspace.getLayerManager())==null?void 0:
1860
+ d.moveOffDragLayer(c,BUBBLE$$module$build$src$core$layers,!1)});bumpObjectIntoBounds$$module$build$src$core$bump_objects(this.workspace,this.workspace.getMetricsManager().getScrollMetrics(!0),this.block)}this.startParentConn=this.startChildConn=null;this.block.setDragging(!1);this.dragging=!1;announceDynamicAriaState$$module$build$src$core$utils$aria($.Msg$$module$build$src$core$msg.ANNOUNCE_MOVE_CANCELED)}findTraversalCandidate(a){var b=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,
1861
+ a));const c=this.allConnectionPairs;if(b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE||!c.length)return this.connectionCandidate;var d=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT||b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN;const e=c.findIndex(f=>{let g,h;return((g=this.connectionCandidate)==null?void 0:g.local)===f.local&&((h=this.connectionCandidate)==null?void 0:h.neighbour)===f.neighbour});b=this.block.workspace.getNavigator();
1862
+ return d?e===-1?(d=this.isInTerminalPosition(this.block,Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN),b.getNavigationLoops()?this.pairToCandidate(c[0]):d?null:this.getClosestCandidate(this.block,a)):e===c.length-1?null:this.pairToCandidate(c[e+1]):e===-1?(d=this.isInTerminalPosition(this.block,Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP),b.getNavigationLoops()?this.pairToCandidate(c[c.length-1]):d?null:this.getClosestCandidate(this.block,a)):e===0?null:this.pairToCandidate(c[e-
1863
+ 1])}isInTerminalPosition(a,b){if(a.getParent())return!1;const c=a.workspace.getTopBlocks(!0);var d=c.indexOf(a);b=b===Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP?-1:1;var e=d+b;for(d=a.getConnections_(!1);e>=0&&e<c.length;e+=b){const f=c[e];for(const g of d)for(const h of f.getConnections_(!1))if(a.workspace.connectionChecker.canConnect(g,h,!0,Infinity))return!1}return!0}pairToCandidate(a){return Object.assign({},a,{distance:0})}getDirectionToNewLocation(a){const b=this.block.getRelativeToSurfaceXY();
1864
+ a=Coordinate$$module$build$src$core$utils$coordinate.difference(a,b);const {x:c,y:d}=a;return c<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:c>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.RIGHT:d<0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:d>0?Direction$$module$build$src$core$keyboard_nav$keyboard_mover.DOWN:Direction$$module$build$src$core$keyboard_nav$keyboard_mover.NONE}getAllConnections(a){if(a.isShadow())return[];const b=[];a.outputConnection&&
1865
+ b.push(a.outputConnection);a.previousConnection&&b.push(a.previousConnection);if(!a.isCollapsed())for(const c of a.inputList)if(c.connection&&c.isVisible()){b.push(c.connection);const d=c.connection.targetBlock();d&&b.push(...this.getAllConnections(d))}a.nextConnection&&(b.push(a.nextConnection),(a=a.nextConnection.targetBlock())&&b.push(...this.getAllConnections(a)));return b}},module$build$src$core$dragging$block_drag_strategy={};
1866
+ 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,e){super(b,c,d,void 0,e);this.text=a;this.workspace=b;this.anchor=c;this.ownerRect=d;this.owner=e;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);
1867
+ this.paragraph=this.stringToSvg(a,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?
1128
1868
  "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=
1129
1869
  this.paragraph.getBBox();this.setSize(new Size$$module$build$src$core$utils$size(a.width+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH*2,a.height+Bubble$$module$build$src$core$bubbles$bubble.BORDER_WIDTH*2),!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"},
1130
1870
  this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},this.svgRoot),addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyWarningIcon"))}dispose(){super.dispose();let a;(a=this.textBubble)==null||
1131
1871
  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;(a=this.textBubble)==null||a.setColour(this.sourceBlock.getColour())}updateCollapsed(){}isShownWhenCollapsed(){return!0}onLocationChange(a){super.onLocationChange(a);let b;(b=this.textBubble)==null||b.setAnchorLocation(this.getAnchorLocation())}addMessage(a,
1132
1872
  b){if(this.textMap.get(b)===a)return this;a?this.textMap.set(b,a):this.textMap.delete(b);let c;(c=this.textBubble)==null||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(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){if(b.bubbleIsVisible()!==a){yield finishQueuedRenders$$module$build$src$core$render_management();
1133
- 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;(c=b.textBubble)==null||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"))}})}getBubble(){return this.textBubble}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$warning_icon/
1873
+ if(a)b.textBubble=new TextBubble$$module$build$src$core$bubbles$text_bubble(b.getText(),b.sourceBlock.workspace,b.getAnchorLocation(),b.getBubbleOwnerRect(),b),b.applyColour();else{let c;(c=b.textBubble)==null||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"))}})}getBubble(){return this.textBubble}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$warning_icon/
1134
1874
  2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,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;
1135
1875
  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.previousConnection=this.nextConnection=this.outputConnection=null;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);
1136
1876
  if(!a.rendered)throw TypeError("Cannot create a rendered block in a headless workspace");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);
1137
1877
  this.svgGroup.setAttribute("data-id",this.id);a.id=getNextUniqueId$$module$build$src$core$utils$idgenerator();this.doInit_()}initSvg(){if(!this.initialized){for(var a of this.inputList)a.init();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||
1138
- this.workspace.getCanvas().appendChild(a);this.initialized=!0}}getColourSecondary(){return this.style.colourSecondary}getColourTertiary(){return this.style.colourTertiary}select(){this.addSelect();fireSelectedEvent$$module$build$src$core$common(this)}unselect(){this.removeSelect();fireSelectedEvent$$module$build$src$core$common(null)}setParent(a){var b=this.parentBlock_;if(a!==b){startTextWidthCache$$module$build$src$core$utils$dom();super.setParent(a);stopTextWidthCache$$module$build$src$core$utils$dom();
1878
+ this.workspace.getCanvas().appendChild(a);this.recomputeAriaAttributes();this.initialized=!0}}getColourSecondary(){return this.style.colourSecondary}getColourTertiary(){return this.style.colourTertiary}select(){this.addSelect();fireSelectedEvent$$module$build$src$core$common(this)}unselect(){this.removeSelect();fireSelectedEvent$$module$build$src$core$common(null)}setParent(a){var b=this.parentBlock_;if(a!==b){startTextWidthCache$$module$build$src$core$utils$dom();super.setParent(a);stopTextWidthCache$$module$build$src$core$utils$dom();
1139
1879
  var c=this.getSvgRoot();if(!this.workspace.isClearing&&c){var d=this.getRelativeToSurfaceXY(),e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode(),f,g=this.getSvgRoot().contains((f=e==null?void 0:e.getFocusableElement())!=null?f:null);a?(a.getSvgRoot().appendChild(c),g&&e&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(e)):b&&(a=this.workspace.getCanvas().querySelector(".blocklyDragging"),b=a==null?void 0:a.parentElement,f=this.workspace.getCanvas(),b===
1140
1880
  f?f.insertBefore(c,a):(f.appendChild(c),g&&e&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(e)),this.translate(d.x,d.y));this.applyColour()}}}getRelativeToSurfaceXY(){const a=this.workspace.getLayerManager();if(!a)throw Error("Cannot calculate position because the workspace has not been appended");let b=0,c=0,d=this.getSvgRoot();if(d){do{const e=getRelativeXY$$module$build$src$core$utils$svg_math(d);b+=e.x;c+=e.y;d=d.parentNode}while(d&&!a.hasLayer(d))}return new Coordinate$$module$build$src$core$utils$coordinate(b,
1141
1881
  c)}moveBy(a,b,c){if(this.parentBlock_)throw Error("Block has parent");const d=isEnabled$$module$build$src$core$events$utils();let e=null;d&&(e=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(this),c&&e.setReason(c));a=new Coordinate$$module$build$src$core$utils$coordinate(a,b);b=this.getRelativeToSurfaceXY();a=Coordinate$$module$build$src$core$utils$coordinate.sum(b,a);this.translate(a.x,a.y);this.updateComponentLocations(a);d&&e&&(e.recordNew(),
@@ -1143,18 +1883,18 @@ fire$$module$build$src$core$events$utils(e));this.workspace.resizeContents()}tra
1143
1883
  this.updateComponentLocations(a)}snapToGrid(){if(!this.isDeadOrDying()&&!this.getParent()&&!this.isInFlyout){var a=this.workspace.getGrid();if(a!=null&&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=
1144
1884
  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())}childHasWarning(){var a=this.getNextBlock();a=a?new Set(a.getDescendants(!1)):null;const b=this.getDescendants(!1);for(const c of b){if(c===
1145
1885
  this)continue;let d;if(((d=a)==null||!d.has(c))&&c.getIcon(WarningIcon$$module$build$src$core$icons$warning_icon.TYPE))return!0}return!1}updateCollapsed(){var a=this.isCollapsed();const b=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,c=COLLAPSED_FIELD_NAME$$module$build$src$core$constants;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"),this.childHasWarning()&&
1146
- this.setWarningText($.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING,BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID),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,"blocklyCollapsed"),this.setWarningText(null,
1147
- BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID))}onMouseDown(a){if(!this.workspace.isReadOnly()){var b=this.workspace.getGesture(a);b&&b.handleBlockStart(a,this)}}showHelp(){const a=typeof this.helpUrl==="function"?this.helpUrl():this.helpUrl;a&&window.open(a)}generateContextMenu(a){if(this.workspace.isReadOnly()||!this.contextMenu)return null;a=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions({block:this,focusedNode:this},a);this.customContextMenu&&
1148
- this.customContextMenu(a);return a}calculateContextMenuLocation(a){if(a instanceof PointerEvent)return new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this.workspace,this.getRelativeToSurfaceXY());let b,c;const d=(b=this.inputList.filter(e=>e.isVisible()).flatMap(e=>e.fieldRow).find(e=>e.isVisible()))==null?void 0:(c=b.getSvgRoot())==null?void 0:c.getBoundingClientRect();return new Coordinate$$module$build$src$core$utils$coordinate(this.RTL?
1149
- a.x-5:a.x+5,(d&&d.height?d.y+d.height:a.y+this.height)+5)}showContextMenu(a){const b=this.generateContextMenu(a),c=this.calculateContextMenuLocation(a);b&&b.length&&(show$$module$build$src$core$contextmenu(a,b,this.RTL,this.workspace,c),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,
1886
+ this.setWarningText($.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING,BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID),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.recomputeAriaAttributes())):(this.updateDisabled(),this.removeInput(b),removeClass$$module$build$src$core$utils$dom(this.svgGroup,
1887
+ "blocklyCollapsed"),this.setWarningText(null,BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID))}onMouseDown(a){if(!this.workspace.isReadOnly()){var b=this.workspace.getGesture(a);b&&b.handleBlockStart(a,this)}}showHelp(){const a=typeof this.helpUrl==="function"?this.helpUrl():this.helpUrl;a&&window.open(a)}generateContextMenu(a){if(this.workspace.isReadOnly()||!this.contextMenu)return null;a=ContextMenuRegistry$$module$build$src$core$contextmenu_registry.registry.getContextMenuOptions({block:this,
1888
+ focusedNode:this},a);this.customContextMenu&&this.customContextMenu(a);return a}calculateContextMenuLocation(a){if(a instanceof PointerEvent)return new Coordinate$$module$build$src$core$utils$coordinate(a.clientX,a.clientY);a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this.workspace,this.getRelativeToSurfaceXY());let b,c;const d=(b=this.inputList.filter(e=>e.isVisible()).flatMap(e=>e.fieldRow).find(e=>e.isVisible()))==null?void 0:(c=b.getSvgRoot())==null?void 0:c.getBoundingClientRect();
1889
+ return new Coordinate$$module$build$src$core$utils$coordinate(this.RTL?a.x-5:a.x+5,(d&&d.height?d.y+d.height:a.y+this.height)+5)}showContextMenu(a){const b=this.generateContextMenu(a),c=this.calculateContextMenuLocation(a);b&&b.length&&(show$$module$build$src$core$contextmenu(a,b,this.RTL,this.workspace,c),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,
1150
1890
  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)),
1151
1891
  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)}isDragging(){return this.dragging}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");
1152
- 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}getNearestNeighbour(){if(!this.workspace.rendered)return null;var a=this.workspace.getAllBlocks(!1).filter(e=>!e.isDeadOrDying());let b=null,
1153
- c=Number.MAX_SAFE_INTEGER;const d=this.getRelativeToSurfaceXY();for(const e of a)a=e.getRelativeToSurfaceXY(),a=Math.sqrt(Math.pow(a.x-d.x,2)+Math.pow(a.y-d.y,2)),a<c&&(b=e,c=a);return b}dispose(a,b){this.disposing=!0;dispose$$module$build$src$core$tooltip();hide$$module$build$src$core$contextmenu();const c=$.getFocusManager$$module$build$src$core$focus_manager();var d,e;if(this.getSvgRoot().contains((e=(d=c.getFocusedNode())==null?void 0:d.getFocusableElement())!=null?e:null)){d=this.getParent();
1154
- if(!d){var f;if(e=(f=this.outputConnection)!=null?f:this.previousConnection){let g;d=(g=e.closest(0,new Coordinate$$module$build$src$core$utils$coordinate(0,0)).connection)==null?void 0:g.getSourceBlock()}}d?c.focusNode(d):(f=this.getNearestNeighbour())?c.focusNode(f):setTimeout(()=>{this.workspace.rendered&&c.focusTree(this.workspace)},0)}b&&(this.unplug(a),disposeUiEffect$$module$build$src$core$block_animations(this));super.dispose(!!a);removeNode$$module$build$src$core$utils$dom(this.svgGroup)}disposeInternal(){this.disposing=
1892
+ a=this.getIcons();for(let b=0;b<a.length;b++)a[b].updateEditable()}setShadow(a){super.setShadow(a);this.applyColour();this.recomputeAriaAttributes()}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}getNearestNeighbour(){if(!this.workspace.rendered)return null;var a=this.workspace.getAllBlocks(!1).filter(e=>
1893
+ !e.isDeadOrDying());let b=null,c=Number.MAX_SAFE_INTEGER;const d=this.getRelativeToSurfaceXY();for(const e of a)a=e.getRelativeToSurfaceXY(),a=Math.sqrt(Math.pow(a.x-d.x,2)+Math.pow(a.y-d.y,2)),a<c&&(b=e,c=a);return b}dispose(a,b){this.disposing=!0;dispose$$module$build$src$core$tooltip();hide$$module$build$src$core$contextmenu();const c=$.getFocusManager$$module$build$src$core$focus_manager();var d,e;if(this.getSvgRoot().contains((e=(d=c.getFocusedNode())==null?void 0:d.getFocusableElement())!=null?
1894
+ e:null)){d=this.getParent();if(!d){var f;if(e=(f=this.outputConnection)!=null?f:this.previousConnection){let g;d=(g=e.closest(0,new Coordinate$$module$build$src$core$utils$coordinate(0,0)).connection)==null?void 0:g.getSourceBlock()}}d?c.focusNode(d):(f=this.getNearestNeighbour())?c.focusNode(f):setTimeout(()=>{this.workspace.rendered&&c.focusTree(this.workspace)},0)}b&&(this.unplug(a),disposeUiEffect$$module$build$src$core$block_animations(this));super.dispose(!!a);removeNode$$module$build$src$core$utils$dom(this.svgGroup)}disposeInternal(){this.disposing=
1155
1895
  !0;super.disposeInternal();$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()===this&&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(a=
1156
1896
  !1){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:a,saveIds:!1}),typeCounts:getBlockTypeCounts$$module$build$src$core$common(this,!0)}}applyColour(){var a,b;(b=(a=this.pathObject).applyColour)==null||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=
1157
- !this.isEnabled()||this.getInheritedDisabled();if(this.visuallyDisabled===a){let b;(b=this.getNextBlock())==null||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)&&(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,
1897
+ !this.isEnabled()||this.getInheritedDisabled();if(this.visuallyDisabled===a){let b;(b=this.getNextBlock())==null||b.updateDisabled()}else{this.applyColour();this.visuallyDisabled=a;for(const b of this.getChildren(!1))b.updateDisabled();this.recomputeAriaAttributes()}}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,
1158
1898
  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();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,
1159
1899
  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);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();
1160
1900
  this.queueRender();return a}createIconPointerDownListener(a){return b=>{!this.isDeadOrDying()&&(b=this.workspace.getGesture(b))&&(this.bringToFront(),b.setStartIcon(a),$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a))}}removeIcon(a){const b=super.removeIcon(a);a.equals($.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE)&&(this.mutator=null);this.queueRender();return b}setDisabledReason(a,b){const c=this.isEnabled();super.setDisabledReason(a,b);this.isEnabled()===c||
@@ -1168,11 +1908,12 @@ this.getRootBlock();if(!(this.isDeadOrDying()||this.workspace.isDragging()||a.is
1168
1908
  b,c){if(a.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||a.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE){let d=b.x;b=b.y;d+=c.x-a.getOffsetInBlock().x;b+=c.y-a.getOffsetInBlock().y;this.moveBy(d,b)}}getChildren(a){return super.getChildren(a)}queueRender(){return queueRender$$module$build$src$core$render_management(this)}render(){this.queueRender();triggerQueuedRenders$$module$build$src$core$render_management()}renderEfficiently(){startTextWidthCache$$module$build$src$core$utils$dom();
1169
1909
  this.isCollapsed()&&this.updateCollapsed();this.isEnabled()||this.updateDisabled();this.workspace.getRenderer().render(this);this.tightenChildrenEfficiently();stopTextWidthCache$$module$build$src$core$utils$dom()}tightenChildrenEfficiently(){for(const a of this.inputList){const b=a.connection;b&&b.tightenEfficiently()}this.nextConnection&&this.nextConnection.tightenEfficiently()}getHeightWidth(){let a=this.height,b=this.width;var c=this.getNextBlock();if(c){c=c.getHeightWidth();const d=this.workspace.getRenderer().getConstants().NOTCH_HEIGHT;
1170
1910
  a+=c.height-d;b=Math.max(b,c.width)}return{height:a,width:b}}fadeForReplacement(a){let b,c;(c=(b=this.pathObject).updateReplacing)==null||c.call(b,a)}getDragStrategy(){return this.dragStrategy}setDragStrategy(a){this.dragStrategy=a}isCopyable(){return this.isOwnDeletable()&&this.isOwnMovable()}isMovable(){return this.dragStrategy.isMovable()}startDrag(a){return this.dragStrategy.startDrag(a)}drag(a,b){this.dragStrategy.drag(a,b)}endDrag(a,b){this.dragStrategy.endDrag(a,b)}revertDrag(){this.dragStrategy.revertDrag()}toFlyoutInfo(){const a=
1171
- Object.assign({},{kind:"BLOCK"},save$$module$build$src$core$serialization$blocks(this)),b=new Set(["id","height","width","pinned","enabled"]),c=function(d){for(const e in d)b.has(e)?delete d[e]:typeof d[e]==="object"&&c(d[e])};c(a);return[a]}jsonInit(a){super.jsonInit(a);a.classes&&this.addClass(Array.isArray(a.classes)?a.classes.join(" "):a.classes)}getFocusableElement(){return this.pathObject.svgPath}getFocusableTree(){return this.workspace}onNodeFocus(){this.select();$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()!==
1172
- this&&finishQueuedRenders$$module$build$src$core$render_management().then(()=>{this.workspace.scrollBoundsIntoView(this.getBoundingRectangleWithoutChildren())})}onNodeBlur(){this.unselect()}canBeFocused(){return!0}performAction(){if(this.workspace.isFlyout)KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.startMove(this);else{if(this.isSimpleReporter())for(const a of this.inputList)for(const b of a.fieldRow)if(b.isClickable()&&b.isFullBlockField()){b.showEditor();return}this.workspace.getNavigator().getFirstChild(this)?
1173
- showBlockNavigationHint$$module$build$src$core$hints(this.workspace):showHelpHint$$module$build$src$core$hints(this.workspace)}}getParents(){const a=new Set;let b=this.getParent();for(;b;)a.add(b),b=b.getParent();return a}getOutputParents(){const a=new Set;a.add(this);let b,c=(b=this.outputConnection)==null?void 0:b.targetBlock();for(;c;){a.add(c);let d;c=(d=c.outputConnection)==null?void 0:d.targetBlock()}return a}getRowId(){let a,b;const c=(a=this.outputConnection)==null?void 0:(b=a.targetConnection)==
1174
- null?void 0:b.getParentInput();return c?c.getRowId():this.id}};BlockSvg$$module$build$src$core$block_svg.INLINE=-1;BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var module$build$src$core$block_svg={};module$build$src$core$block_svg.BlockSvg=BlockSvg$$module$build$src$core$block_svg;var DragTarget$$module$build$src$core$drag_target=class{constructor(){}onDragEnter(a){}onDragOver(a){}onDragExit(a){}onDrop(a){}getClientRect(){return null}shouldPreventMove(a){return!1}},module$build$src$core$drag_target={};module$build$src$core$drag_target.DragTarget=DragTarget$$module$build$src$core$drag_target;var module$build$src$core$interfaces$i_deletable={};module$build$src$core$interfaces$i_deletable.isDeletable=isDeletable$$module$build$src$core$interfaces$i_deletable;var DeleteArea$$module$build$src$core$delete_area=class extends DragTarget$$module$build$src$core$drag_target{constructor(){super();this.wouldDelete_=!1}wouldDelete(a){a instanceof BlockSvg$$module$build$src$core$block_svg?(a=!a.getParent()&&a.isDeletable(),this.updateWouldDelete_(a)):this.updateWouldDelete_(isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable());return this.wouldDelete_}updateWouldDelete_(a){this.wouldDelete_=a}},module$build$src$core$delete_area={};
1175
- module$build$src$core$delete_area.DeleteArea=DeleteArea$$module$build$src$core$delete_area;var FlyoutItem$$module$build$src$core$flyout_item=class{constructor(a,b){this.element=a;this.type=b}getElement(){return this.element}getType(){return this.type}},module$build$src$core$flyout_item={};module$build$src$core$flyout_item.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;var MetricsManager$$module$build$src$core$metrics_manager=class{constructor(a){this.workspace_=a}getDimensionsPx_(a){let b=0,c=0;a&&(b=a.getWidth(),c=a.getHeight());return new Size$$module$build$src$core$utils$size(b,c)}getFlyoutMetrics(a){a=this.getDimensionsPx_(this.workspace_.getFlyout(a));return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){const a=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){let a=
1911
+ Object.assign({},{kind:"BLOCK"},save$$module$build$src$core$serialization$blocks(this)),b=new Set(["id","height","width","pinned","enabled"]),c=function(d){for(const e in d)b.has(e)?delete d[e]:typeof d[e]==="object"&&c(d[e])};c(a);return[a]}jsonInit(a){super.jsonInit(a);a.classes&&this.addClass(Array.isArray(a.classes)?a.classes.join(" "):a.classes)}getFocusableElement(){return this.pathObject.svgPath}getFocusableTree(){return this.workspace}onNodeFocus(){this.recomputeAriaAttributes();this.select();
1912
+ $.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()!==this&&finishQueuedRenders$$module$build$src$core$render_management().then(()=>{this.workspace.scrollBoundsIntoView(this.getBoundingRectangleWithoutChildren())})}onNodeBlur(){this.unselect()}canBeFocused(){return!0}performAction(a){if(this.workspace.isFlyout)KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.startMove(this,a);else{if(this.isSimpleReporter())for(const b of this.inputList)for(const c of b.fieldRow)if(c.isClickable()&&
1913
+ c.isFullBlockField()){c.showEditor();return}this.workspace.getNavigator().getInNode(this)?showBlockNavigationHint$$module$build$src$core$hints(this.workspace):showHelpHint$$module$build$src$core$hints(this.workspace)}}getParents(){const a=new Set;let b=this.getParent();for(;b;)a.add(b),b=b.getParent();return a}getOutputParents(){const a=new Set;a.add(this);let b,c=(b=this.outputConnection)==null?void 0:b.targetBlock();for(;c;){a.add(c);let d;c=(d=c.outputConnection)==null?void 0:d.targetBlock()}return a}getRowId(){let a,
1914
+ b;const c=(a=this.outputConnection)==null?void 0:(b=a.targetConnection)==null?void 0:b.getParentInput();return c?c.getRowId():this.id}recomputeAriaAttributes(){setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,computeAriaLabel$$module$build$src$core$block_aria_composer(this));configureAriaRole$$module$build$src$core$block_aria_composer(this)}getAriaLabel(a){return computeAriaLabel$$module$build$src$core$block_aria_composer(this,a)}getStackBlocksCountLabel(){let a=
1915
+ 1,b=this.getNextBlock();for(;b;)a++,b=b.getNextBlock();return a<=1?this.getAriaLabel(Verbosity$$module$build$src$core$utils$aria.TERSE):$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STACK_BLOCKS.replace("%1",a.toString())}};BlockSvg$$module$build$src$core$block_svg.INLINE=-1;BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var module$build$src$core$block_svg={};module$build$src$core$block_svg.BlockSvg=BlockSvg$$module$build$src$core$block_svg;var DragTarget$$module$build$src$core$drag_target=class{constructor(){}onDragEnter(a){}onDragOver(a){}onDragExit(a){}onDrop(a){}getClientRect(){return null}shouldPreventMove(a){return!1}},module$build$src$core$drag_target={};module$build$src$core$drag_target.DragTarget=DragTarget$$module$build$src$core$drag_target;var module$build$src$core$interfaces$i_deletable={};module$build$src$core$interfaces$i_deletable.isDeletable=isDeletable$$module$build$src$core$interfaces$i_deletable;var DeleteArea$$module$build$src$core$delete_area=class extends DragTarget$$module$build$src$core$drag_target{constructor(){super();this.wouldDelete_=!1}wouldDelete(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()?this.updateWouldDelete_(!1):a instanceof BlockSvg$$module$build$src$core$block_svg?(a=!a.getParent()&&a.isDeletable(),this.updateWouldDelete_(a)):this.updateWouldDelete_(isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable());return this.wouldDelete_}updateWouldDelete_(a){this.wouldDelete_=
1916
+ a}},module$build$src$core$delete_area={};module$build$src$core$delete_area.DeleteArea=DeleteArea$$module$build$src$core$delete_area;var FlyoutItem$$module$build$src$core$flyout_item=class{constructor(a,b){this.element=a;this.type=b}getElement(){return this.element}getType(){return this.type}},module$build$src$core$flyout_item={};module$build$src$core$flyout_item.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;var MetricsManager$$module$build$src$core$metrics_manager=class{constructor(a){this.workspace_=a}getDimensionsPx_(a){let b=0,c=0;a&&(b=a.getWidth(),c=a.getHeight());return new Size$$module$build$src$core$utils$size(b,c)}getFlyoutMetrics(a){a=this.getDimensionsPx_(this.workspace_.getFlyout(a));return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){const a=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){let a=
1176
1917
  0,b=0;const c=this.getToolboxMetrics(),d=this.getFlyoutMetrics(),e=!!this.workspace_.getToolbox();var f;const g=!((f=this.workspace_.getFlyout())==null?0:f.autoClose);f=e?c.position:d.position;const h=f===Position$$module$build$src$core$utils$toolbox.TOP;f===Position$$module$build$src$core$utils$toolbox.LEFT&&(e&&(a+=c.width),g&&(a+=d.width));h&&(e&&(b+=c.height),g&&(b+=d.height));return{top:b,left:a}}getViewMetrics(a){a=a?this.workspace_.scale:1;const b=this.getSvgMetrics(),c=this.getToolboxMetrics(),
1177
1918
  d=this.getFlyoutMetrics(),e=!!this.workspace_.getToolbox();var f;const g=!((f=this.workspace_.getFlyout())==null?0:f.autoClose);f=e?c.position:d.position;const h=f===Position$$module$build$src$core$utils$toolbox.LEFT||f===Position$$module$build$src$core$utils$toolbox.RIGHT;if(f===Position$$module$build$src$core$utils$toolbox.TOP||f===Position$$module$build$src$core$utils$toolbox.BOTTOM)e&&(b.height-=c.height),g&&(b.height-=d.height);h&&(e&&(b.width-=c.width),g&&(b.width-=d.width));return{height:b.height/
1178
1919
  a,width:b.width/a,top:-this.workspace_.scrollY/a,left:-this.workspace_.scrollX/a}}getContentMetrics(a){a=a?1:this.workspace_.scale;const b=this.workspace_.getBlocksBoundingBox();return{height:(b.bottom-b.top)*a,width:(b.right-b.left)*a,top:b.top*a,left:b.left*a}}hasFixedEdges(){return!this.workspace_.isMovableHorizontally()||!this.workspace_.isMovableVertically()}getComputedFixedEdges_(a){if(!this.hasFixedEdges())return{};const b=this.workspace_.isMovableHorizontally(),c=this.workspace_.isMovableVertically();
@@ -1193,38 +1934,24 @@ this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.
1193
1934
  a=new Rect$$module$build$src$core$utils$rect(a.y,a.y+this.height,a.x,a.x+this.width);this.workspace.scrollBoundsIntoView(a)}onNodeBlur(){}canBeFocused(){return!0}getId(){return this.id}performAction(){if(!this.isFlyoutLabel){const a=this.targetWorkspace.getButtonCallback(this.callbackKey);a&&a(this)}}};FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X=5;FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y=2;FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS=4;
1194
1935
  register$$module$build$src$core$css("\n.blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n}\n\n.blocklyFlyoutButtonShadow {\n fill: #666;\n}\n\n@media (hover: hover) {\n .blocklyFlyoutButton:hover {\n fill: #aaa;\n }\n}\n\n.blocklyFlyoutButton:active {\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={};module$build$src$core$flyout_button.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;var FlyoutButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getWorkspace()}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.getId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof FlyoutButton$$module$build$src$core$flyout_button}},module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy={};
1195
1936
  module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy.FlyoutButtonNavigationPolicy=FlyoutButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy;var FlyoutSeparatorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy=class{getFirstChild(a){return null}getParent(a){return null}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(){return"error"}isNavigable(a){return!1}isApplicable(a){return a instanceof FlyoutSeparator$$module$build$src$core$flyout_separator}},module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy={};
1196
- module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy.FlyoutSeparatorNavigationPolicy=FlyoutSeparatorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy;var BlockCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy=class{getFirstChild(a){return a.getEditor()}getParent(a){let b;return(b=a.getOwner())!=null?b:null}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.id}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof TextInputBubble$$module$build$src$core$bubbles$textinput_bubble}},module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy=
1197
- {};module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy.BlockCommentNavigationPolicy=BlockCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy;var BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=class{getFirstChild(a){return getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a)[0]}getParent(a){var b;if((b=a.previousConnection)==null?0:b.targetBlock()){if(b=a.getSurroundParent())return b}else{let c;if((c=a.outputConnection)==null?0:c.targetBlock())return a.outputConnection.targetBlock()}return a.workspace}getNextSibling(a){if(a.nextConnection){let c;
1937
+ module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy.FlyoutSeparatorNavigationPolicy=FlyoutSeparatorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy;var BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=class{getFirstChild(a){return getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a)[0]}getParent(a){var b;if((b=a.previousConnection)==null?0:b.targetBlock()){if(b=a.getSurroundParent())return b}else{let c;if((c=a.outputConnection)==null?0:c.targetBlock())return a.outputConnection.targetBlock()}return a.workspace}getNextSibling(a){if(a.nextConnection){let c;
1198
1938
  return(c=a.nextConnection.targetBlock())!=null?c:a.nextConnection}var b;return((b=a.outputConnection)==null?0:b.targetConnection)?(b=this.getParent(a),navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(b,a,1)):null}getPreviousSibling(a){let b;if((b=a.previousConnection)==null?0:b.targetBlock())return a.previousConnection;let c;return((c=a.outputConnection)==null?0:c.targetBlock())?navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.outputConnection.targetBlock(),
1199
1939
  a,-1):null}getRowId(a){return a.getRowId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof BlockSvg$$module$build$src$core$block_svg}},module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy.BlockNavigationPolicy=BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy;
1200
- module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy.navigateBlock=navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy;var CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getCommentView().workspace.getCommentById(a.getCommentView().commentId)}getNextSibling(a){const b=a.getCommentView().getCommentBarButtons();a=b.indexOf(a);return a>=0&&a+1<b.length?b[a+1]:null}getPreviousSibling(a){const b=a.getCommentView().getCommentBarButtons();a=b.indexOf(a);return a>0?b[a-1]:null}getRowId(a){return a.getCommentView().commentId}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof
1940
+ module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy.navigateBlock=navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy;var BubbleNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy=class{getFirstChild(a){return null}getParent(a){let b;return(b=a.getOwner())!=null?b:null}getNextSibling(a){let b;return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy((b=a.getOwner())==null?void 0:b.getSourceBlock(),a,1)}getPreviousSibling(a){let b;return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy((b=
1941
+ a.getOwner())==null?void 0:b.getSourceBlock(),a,-1)}getRowId(a){let b,c,d;return(d=(b=a.getOwner())==null?void 0:(c=b.getSourceBlock())==null?void 0:c.getRowId())!=null?d:""}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof Bubble$$module$build$src$core$bubbles$bubble}},module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy.BubbleNavigationPolicy=BubbleNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy;var CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getCommentView().workspace.getCommentById(a.getCommentView().commentId)}getNextSibling(a){const b=a.getCommentView().getCommentBarButtons();a=b.indexOf(a);return a>=0&&a+1<b.length?b[a+1]:null}getPreviousSibling(a){const b=a.getCommentView().getCommentBarButtons();a=b.indexOf(a);return a>0?b[a-1]:null}getRowId(a){return a.getCommentView().commentId}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof
1201
1942
  CommentBarButton$$module$build$src$core$comments$comment_bar_button}},module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy.CommentBarButtonNavigationPolicy=CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy;var CommentEditorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy=class{getFirstChild(a){return null}getParent(a){return null}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.id}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof CommentEditor$$module$build$src$core$comments$comment_editor}},module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy={};
1202
1943
  module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy.CommentEditorNavigationPolicy=CommentEditorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy;var ConnectionNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy=class{getFirstChild(){return null}getParent(a){return a.getSourceBlock()}getNextSibling(a){if(a.getParentInput())return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,1);if(a.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT&&a.getSourceBlock().getSurroundParent()&&!a.targetConnection)return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock().getSurroundParent(),
1203
1944
  a,1);switch(a.type){case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:return a.targetConnection;case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:return a.getSourceBlock()}return null}getPreviousSibling(a){if(a.getParentInput())return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getParentInput().getSourceBlock(),a,-1);switch(a.type){case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:return a.getSourceBlock();
1204
1945
  case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:case ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE:return a.targetConnection}return null}getRowId(a){switch(a.type){case ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT:case ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT:return a.id;case ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE:return a.getParentInput().getRowId();default:return a.getSourceBlock().getRowId()}}isNavigable(a){if(!a.canBeFocused())return!1;
1205
1946
  if(a.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT){if(a.targetBlock())return!1;let b;const c=(b=a.getSourceBlock().getRootBlock())!=null?b:a.getSourceBlock();return a===c.lastConnectionInStack(!1)?!1:!0}return a.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE&&!a.targetBlock()}isApplicable(a){return a instanceof RenderedConnection$$module$build$src$core$rendered_connection}},module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy=
1206
1947
  {};module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy.ConnectionNavigationPolicy=ConnectionNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy;var FieldNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getSourceBlock()}getNextSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,1)}getPreviousSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,-1)}getRowId(a){return a.getParentInput().getRowId()}isNavigable(a){let b;
1207
- return a.canBeFocused()&&a.isVisible()&&(a.isClickable()||a.isCurrentlyEditable())&&!(((b=a.getSourceBlock())==null?0:b.isSimpleReporter())&&a.isFullBlockField())&&a.getParentInput().isVisible()}isApplicable(a){return a instanceof Field$$module$build$src$core$field}},module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy.FieldNavigationPolicy=FieldNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy;var module$build$src$core$icons$registry={};module$build$src$core$icons$registry.register=register$$module$build$src$core$icons$registry;module$build$src$core$icons$registry.unregister=unregister$$module$build$src$core$icons$registry;var SIZE$$module$build$src$core$icons$comment_icon=17,DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon=160,DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon=80,CommentIcon$$module$build$src$core$icons$comment_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textInputBubble=null;this.text="";this.bubbleSize=new Size$$module$build$src$core$utils$size(DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon,DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);
1208
- this.bubbleVisiblity=!1}getType(){return CommentIcon$$module$build$src$core$icons$comment_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE,{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},
1209
- this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},this.svgRoot),addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyCommentIcon"))}dispose(){super.dispose();let a;(a=this.textInputBubble)==null||a.dispose()}getWeight(){return CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$comment_icon,
1210
- SIZE$$module$build$src$core$icons$comment_icon)}applyColour(){super.applyColour();const a=this.sourceBlock.getColour();let b;(b=this.textInputBubble)==null||b.setColour(a)}updateEditable(){const a=this,b=()=>super.updateEditable;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){b().call(a);a.bubbleIsVisible()&&(yield a.setBubbleVisible(!1),yield a.setBubbleVisible(!0))})}onLocationChange(a){const b=this.workspaceLocation;super.onLocationChange(a);this.bubbleLocation&&(a=Coordinate$$module$build$src$core$utils$coordinate.difference(this.workspaceLocation,
1211
- b),this.bubbleLocation=Coordinate$$module$build$src$core$utils$coordinate.sum(this.bubbleLocation,a));a=this.getAnchorLocation();let c;(c=this.textInputBubble)==null||c.setAnchorLocation(a)}setText(a){const b=this.text;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,"comment",null,b,a));this.text=a;let c;(c=this.textInputBubble)==null||c.setText(this.text)}getText(){return this.text}setBubbleSize(a){this.bubbleSize=
1212
- a;let b;(b=this.textInputBubble)==null||b.setSize(this.bubbleSize,!0)}getBubbleSize(){return this.bubbleSize}setBubbleLocation(a){this.bubbleLocation=a;let b;(b=this.textInputBubble)==null||b.moveDuringDrag(a)}getBubbleLocation(){return this.bubbleLocation}saveState(){if(this.text){const a={text:this.text,pinned:this.bubbleIsVisible(),height:this.bubbleSize.height,width:this.bubbleSize.width},b=this.getBubbleLocation();b&&(a.x=this.sourceBlock.workspace.RTL?this.sourceBlock.workspace.getWidth()-(b.x+
1213
- this.bubbleSize.width):b.x,a.y=b.y);return a}return null}loadState(a){let b;this.text=(b=a.text)!=null?b:"";let c,d;this.bubbleSize=new Size$$module$build$src$core$utils$size((c=a.width)!=null?c:DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon,(d=a.height)!=null?d:DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);let e;this.bubbleVisiblity=(e=a.pinned)!=null?e:!1;this.setBubbleVisible(this.bubbleVisiblity);let f=a.x;const g=a.y;finishQueuedRenders$$module$build$src$core$render_management().then(()=>
1214
- {f&&g&&(f=this.sourceBlock.workspace.RTL?this.sourceBlock.workspace.getWidth()-(f+this.bubbleSize.width):f,this.setBubbleLocation(new Coordinate$$module$build$src$core$utils$coordinate(f,g)))})}onClick(){super.onClick();this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}onTextChange(){if(this.textInputBubble){var a=this.textInputBubble.getText();this.text!==a&&(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,
1215
- "comment",null,this.text,a)),this.text=a)}}onSizeChange(){this.textInputBubble&&(this.bubbleSize=this.textInputBubble.getSize())}onBubbleLocationChange(){this.textInputBubble&&(this.bubbleLocation=this.textInputBubble.getRelativeToSurfaceXY())}bubbleIsVisible(){return this.bubbleVisiblity}setBubbleVisible(a){const b=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){b.bubbleVisiblity!==a&&(b.bubbleVisiblity=a,yield finishQueuedRenders$$module$build$src$core$render_management(),
1216
- !b.sourceBlock.rendered||b.sourceBlock.isInFlyout||b.sourceBlock.isInsertionMarker()||(a?(b.sourceBlock.isEditable()?b.showEditableBubble():b.showNonEditableBubble(),b.applyColour()):b.hideBubble(),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,"comment"))))})}getBubble(){return this.textInputBubble}showEditableBubble(){this.createBubble();let a;(a=this.textInputBubble)==null||a.addTextChangeListener(()=>
1217
- this.onTextChange());let b;(b=this.textInputBubble)==null||b.addSizeChangeListener(()=>this.onSizeChange())}showNonEditableBubble(){this.createBubble();let a;(a=this.textInputBubble)==null||a.setEditable(!1)}createBubble(){this.textInputBubble=new TextInputBubble$$module$build$src$core$bubbles$textinput_bubble(this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect(),this);this.textInputBubble.setText(this.getText());this.textInputBubble.setSize(this.bubbleSize,!0);this.bubbleLocation&&
1218
- this.textInputBubble.moveDuringDrag(this.bubbleLocation);this.textInputBubble.addTextChangeListener(()=>this.onTextChange());this.textInputBubble.addSizeChangeListener(()=>this.onSizeChange());this.textInputBubble.addLocationChangeListener(()=>this.onBubbleLocationChange())}hideBubble(){let a;(a=this.textInputBubble)==null||a.dispose();this.textInputBubble=null}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$comment_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,
1219
- new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){return this.sourceBlock.getBoundingRectangleWithoutChildren()}};CommentIcon$$module$build$src$core$icons$comment_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.COMMENT;CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT=3;register$$module$build$src$core$icons$registry(CommentIcon$$module$build$src$core$icons$comment_icon.TYPE,CommentIcon$$module$build$src$core$icons$comment_icon);
1220
- var module$build$src$core$icons$comment_icon={};module$build$src$core$icons$comment_icon.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;var IconNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy=class{getFirstChild(a){if(a instanceof $.MutatorIcon$$module$build$src$core$icons$mutator_icon&&a.bubbleIsVisible()&&$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()===a){let b,c;return(c=(b=a.getBubble())==null?void 0:b.getWorkspace())!=null?c:null}if(a instanceof CommentIcon$$module$build$src$core$icons$comment_icon&&a.bubbleIsVisible()&&$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()===
1221
- a){let b,c;return(c=(b=a.getBubble())==null?void 0:b.getEditor())!=null?c:null}return null}getParent(a){return a.getSourceBlock()}getNextSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,1)}getPreviousSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,-1)}getRowId(a){return a.getSourceBlock().getRowId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof
1948
+ return a.canBeFocused()&&a.isVisible()&&(a.isClickable()||a.isCurrentlyEditable())&&!(((b=a.getSourceBlock())==null?0:b.isSimpleReporter())&&a.isFullBlockField())&&a.getParentInput().isVisible()}isApplicable(a){return a instanceof Field$$module$build$src$core$field}},module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy.FieldNavigationPolicy=FieldNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy;var IconNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getSourceBlock()}getNextSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,1)}getPreviousSibling(a){return navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.getSourceBlock(),a,-1)}getRowId(a){return a.getSourceBlock().getRowId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof
1222
1949
  Icon$$module$build$src$core$icons$icon}},module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy={};module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy.IconNavigationPolicy=IconNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy;var WorkspaceCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy=class{getFirstChild(a){return a.view.getCommentBarButtons()[0]}getParent(a){return a.workspace}getNextSibling(){return null}getPreviousSibling(){return null}getRowId(a){return a.id}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment}},module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy=
1223
1950
  {};module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy.WorkspaceCommentNavigationPolicy=WorkspaceCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy;var WorkspaceNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_navigation_policy=class{getFirstChild(a){a=a.getTopBlocks(!0);return a.length?a[0]:null}getParent(a){return null}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.id}isNavigable(a){return a.canBeFocused()&&!a.isMutator}isApplicable(a){return a instanceof WorkspaceSvg$$module$build$src$core$workspace_svg}},module$build$src$core$keyboard_nav$navigation_policies$workspace_navigation_policy=
1224
1951
  {};module$build$src$core$keyboard_nav$navigation_policies$workspace_navigation_policy.WorkspaceNavigationPolicy=WorkspaceNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_navigation_policy;var NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator;(function(a){a[a.NEXT=0]="NEXT";a[a.PREVIOUS=1]="PREVIOUS";a[a.IN=2]="IN";a[a.OUT=3]="OUT"})(NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator||(NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator={}));
1225
1952
  var Navigator$$module$build$src$core$keyboard_nav$navigators$navigator=class{constructor(){this.rules=[new BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,new FieldNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$field_navigation_policy,new ConnectionNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy,new WorkspaceNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_navigation_policy,
1226
- new IconNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy,new WorkspaceCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy,new CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy,new BlockCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy,new CommentEditorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy];
1227
- this.navigationLoops=!1}addNavigationPolicy(a){this.rules.push(a)}get(a){return this.rules.find(b=>b.isApplicable(a))}getFirstChild(a){let b;const c=(b=this.get(a))==null?void 0:b.getFirstChild(a);return c?this.isNavigable(c)?c:this.getFirstChild(c)||this.getNextSibling(c):null}getParent(a){let b;const c=(b=this.get(a))==null?void 0:b.getParent(a);return c?this.isNavigable(c)?c:this.getParent(c):null}getNextSibling(a){let b;const c=(b=this.get(a))==null?void 0:b.getNextSibling(a);return c?this.isNavigable(c)?
1953
+ new IconNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$icon_navigation_policy,new WorkspaceCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$workspace_comment_navigation_policy,new CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy,new BubbleNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy,new CommentEditorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy];
1954
+ this.navigationLoops=!0}addNavigationPolicy(a){this.rules.push(a)}get(a){return this.rules.find(b=>b.isApplicable(a))}getFirstChild(a){let b;const c=(b=this.get(a))==null?void 0:b.getFirstChild(a);return c?this.isNavigable(c)?c:this.getFirstChild(c)||this.getNextSibling(c):null}getParent(a){let b;const c=(b=this.get(a))==null?void 0:b.getParent(a);return c?this.isNavigable(c)?c:this.getParent(c):null}getNextSibling(a){let b;const c=(b=this.get(a))==null?void 0:b.getNextSibling(a);return c?this.isNavigable(c)?
1228
1955
  c:this.getNextSibling(c):null}getPreviousSibling(a){let b;const c=(b=this.get(a))==null?void 0:b.getPreviousSibling(a);return c?this.isNavigable(c)?c:this.getPreviousSibling(c):null}getPreviousNode(a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()){if(!a)return null;var b=this.getPreviousNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.PREVIOUS);if(!b||b===a.getFocusableTree()){b=this.navigateStacks(a,-1);if(!b)return null;b=this.getLastNodeInStack(b,
1229
1956
  a)}return this.getLeftmostSibling(b)}getOutNode(a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()){let b;const c=a instanceof BlockSvg$$module$build$src$core$block_svg?(b=a.outputConnection)==null?void 0:b.targetConnection:a instanceof RenderedConnection$$module$build$src$core$rendered_connection&&a.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE?a:null;return c&&!c.getSourceBlock().getInputsInline()&&c!==c.getSourceBlock().inputList[0].connection?
1230
1957
  c.getSourceBlock():this.getPreviousNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.OUT)}getNextNode(a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()){const b=this.getNextNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.NEXT);return a&&b===null?this.navigateStacks(a,1):b}getInNode(a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()){return this.getNextNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.IN)}getPreviousNodeImpl(a,
@@ -1233,7 +1960,7 @@ b){if(!a)return a;let c=this.getFirstChild(a);if(!c||c===b)return a;for(a=c;a&&a
1233
1960
  null?void 0:a.getRootFocusableNode();return b?this.getTopLevelItems(b).slice(-1)[0]:null}transitionAllowed(a,b,c){switch(c){case NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.IN:case NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.OUT:return this.getRowId(a)===this.getRowId(b);case NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.NEXT:case NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.PREVIOUS:return this.getRowId(a)!==
1234
1961
  this.getRowId(b)}}getLeftmostSibling(a){if(!a)return null;let b;for(;b=this.getPreviousNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.OUT);)a=b;return a}getLastNodeInStack(a,b){let c;for(;(c=this.getNextNodeImpl(a,a,NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator.NEXT))&&c!==b;)a=c;return a}getRowId(a){let b;return(b=this.get(a))==null?void 0:b.getRowId(a)}navigateStacks(a,b){const c=this.getTopLevelItems(a);let d,e;const f=(e=
1235
1962
  (d=this.getSourceBlockFromNode(a))==null?void 0:d.getRootBlock())!=null?e:a;a=c.indexOf(f)+b;b=null;a>=0&&a<c.length?b=c[a]:a<0&&this.getNavigationLoops()?b=c[c.length-1]:a>=c.length&&this.getNavigationLoops()&&(b=c[0]);return b}getTopLevelItems(a){return a.getFocusableTree().getTopBoundedElements(!0)}isNavigable(a){let b;return(b=this.get(a))==null?void 0:b.isNavigable(a)}getSourceBlockFromNode(a){return a instanceof BlockSvg$$module$build$src$core$block_svg?a:a instanceof Field$$module$build$src$core$field||
1236
- a instanceof RenderedConnection$$module$build$src$core$rendered_connection||a instanceof Icon$$module$build$src$core$icons$icon?a.getSourceBlock():null}},module$build$src$core$keyboard_nav$navigators$navigator={};module$build$src$core$keyboard_nav$navigators$navigator.NavigationDirection=NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator;module$build$src$core$keyboard_nav$navigators$navigator.Navigator=Navigator$$module$build$src$core$keyboard_nav$navigators$navigator;var module$build$src$core$interfaces$i_toolbox_item={};module$build$src$core$interfaces$i_toolbox_item.isToolboxItem=isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item;var module$build$src$core$interfaces$i_selectable_toolbox_item={};module$build$src$core$interfaces$i_selectable_toolbox_item.isSelectableToolboxItem=isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item;var module$build$src$core$interfaces$i_collapsible_toolbox_item={};module$build$src$core$interfaces$i_collapsible_toolbox_item.isCollapsibleToolboxItem=isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item;var ToolboxItemNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy=class{getFirstChild(a){return isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item(a)?a.getChildToolboxItems()[0]:null}getParent(a){return a.getParent()}getNextSibling(a){const b=a.getParentToolbox().getToolboxItems();a=b.indexOf(a);let c;return(c=b[a+1])!=null?c:null}getPreviousSibling(a){const b=a.getParentToolbox().getToolboxItems();a=b.indexOf(a);
1963
+ a instanceof RenderedConnection$$module$build$src$core$rendered_connection||a instanceof Icon$$module$build$src$core$icons$icon?a.getSourceBlock():null}},module$build$src$core$keyboard_nav$navigators$navigator={};module$build$src$core$keyboard_nav$navigators$navigator.NavigationDirection=NavigationDirection$$module$build$src$core$keyboard_nav$navigators$navigator;module$build$src$core$keyboard_nav$navigators$navigator.Navigator=Navigator$$module$build$src$core$keyboard_nav$navigators$navigator;var module$build$src$core$interfaces$i_collapsible_toolbox_item={};module$build$src$core$interfaces$i_collapsible_toolbox_item.isCollapsibleToolboxItem=isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item;var ToolboxItemNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy=class{getFirstChild(a){return isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item(a)?a.getChildToolboxItems()[0]:null}getParent(a){return a.getParent()}getNextSibling(a){const b=a.getParentToolbox().getToolboxItems();a=b.indexOf(a);let c;return(c=b[a+1])!=null?c:null}getPreviousSibling(a){const b=a.getParentToolbox().getToolboxItems();a=b.indexOf(a);
1237
1964
  let c;return(c=b[a-1])!=null?c:null}getRowId(a){return a.getId()}isNavigable(a){return a.canBeFocused()&&this.allParentsExpanded(a)}allParentsExpanded(a){return(a=a.getParent())&&isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item(a)?a.isExpanded()&&this.allParentsExpanded(a):!0}isApplicable(a){return isToolboxItem$$module$build$src$core$interfaces$i_toolbox_item(a)}},module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy={};
1238
1965
  module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy.ToolboxItemNavigationPolicy=ToolboxItemNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy;var ToolboxNavigator$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator=class extends Navigator$$module$build$src$core$keyboard_nav$navigators$navigator{constructor(a){super();this.toolbox=a;this.rules=[new ToolboxItemNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$toolbox_item_navigation_policy]}getInNode(a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode(),b=!1){const c=getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator(this.toolbox.getWorkspace());
1239
1966
  if(!b)switch(c){case Position$$module$build$src$core$utils$toolbox.TOP:case Position$$module$build$src$core$utils$toolbox.BOTTOM:return this.getNextNode(a,!0);case Position$$module$build$src$core$utils$toolbox.RIGHT:return this.getOutNode(a,!0)}if(isSelectableToolboxItem$$module$build$src$core$interfaces$i_selectable_toolbox_item(a)&&!a.getContents().length)return null;let d;return(a=(d=this.toolbox.getFlyout())==null?void 0:d.getWorkspace().getNavigator())?!this.toolbox.getWorkspace().RTL||c!==Position$$module$build$src$core$utils$toolbox.TOP&&
@@ -1260,12 +1987,13 @@ capabilities:[ComponentManager$$module$build$src$core$component_manager.Capabili
1260
1987
  this.workspace_.dispose());this.svgGroup_&&removeNode$$module$build$src$core$utils$dom(this.svgGroup_)}getWidth(){return this.width_}getHeight(){return this.height_}getFlyoutScale(){return this.targetWorkspace.scale}getWorkspace(){return this.workspace_}setAutoClose(a){this.autoClose=a;this.targetWorkspace.recordDragTargets();this.targetWorkspace.resizeContents()}autoHide(a){!a&&this.targetWorkspace.getFlyout(!0)===this&&this.autoClose&&this.hide()}getTargetWorkspace(){return this.targetWorkspace}isVisible(){return this.visible}setVisible(a){const b=
1261
1988
  a!==this.isVisible();this.visible=a;b&&(this.autoClose||this.targetWorkspace.recordDragTargets(),this.updateDisplay())}setContainerVisible(a){const b=a!==this.containerVisible;this.containerVisible=a;b&&this.updateDisplay()}getContents(){return this.contents}setContents(a){this.contents=a}updateDisplay(){let a;a=this.containerVisible?this.isVisible():!1;this.svgGroup_&&(this.svgGroup_.style.display=a?"block":"none");let b;(b=this.workspace_.scrollbar)==null||b.setContainerVisible(a)}positionAt_(a,
1262
1989
  b,c,d){let e;(e=this.svgGroup_)==null||e.setAttribute("width",`${a}`);let f;(f=this.svgGroup_)==null||f.setAttribute("height",`${b}`);this.workspace_.setCachedParentSvgSize(a,b);this.svgGroup_&&setCssTransform$$module$build$src$core$utils$dom(this.svgGroup_,"translate("+c+"px,"+d+"px)");if(a=this.workspace_.scrollbar)a.setOrigin(c,d),a.resize(),a.hScroll&&a.hScroll.setPosition(a.hScroll.position.x,a.hScroll.position.y),a.vScroll&&a.vScroll.setPosition(a.vScroll.position.x,a.vScroll.position.y)}hide(){this.isVisible()&&
1263
- (this.setVisible(!1),this.reflowWrapper&&(this.workspace_.removeChangeListener(this.reflowWrapper),this.reflowWrapper=null))}show(a){this.workspace_.setResizesEnabled(!1);$.setRecordUndo$$module$build$src$core$events$utils(!1);this.hide();this.clearOldBlocks();typeof a==="string"&&(a=this.getDynamicCategoryContents(a));this.setVisible(!0);a=convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox(a);a=this.createFlyoutInfo(a);triggerQueuedRenders$$module$build$src$core$render_management(this.workspace_);
1264
- this.setContents(a);this.layout_(a);this.horizontalLayout?this.height_=0:this.width_=0;this.reflow();$.setRecordUndo$$module$build$src$core$events$utils(!0);this.workspace_.setResizesEnabled(!0);this.reflowWrapper=b=>{this.inhibitReflowWrapper||b.type!==EventType$$module$build$src$core$events$type.BLOCK_CHANGE&&b.type!==EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE||this.reflow()};this.workspace_.addChangeListener(this.reflowWrapper)}createFlyoutInfo(a){const b=[],c=
1265
- this.horizontalLayout?this.GAP_X:this.GAP_Y;for(const d of a)if("custom"in d&&(a=this.getDynamicCategoryContents(d.custom),a=convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox(a),b.push(...this.createFlyoutInfo(a))),a=d.kind.toLowerCase(),a=this.getInflaterForType(a))b.push(a.load(d,this)),(a=a.gapForItem(d,c))&&b.push(new FlyoutItem$$module$build$src$core$flyout_item(new FlyoutSeparator$$module$build$src$core$flyout_separator(a,this.horizontalLayout?"x":"y"),SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater));
1266
- return this.normalizeSeparators(b)}normalizeSeparators(a){for(let b=a.length-1;b>0;b--){const c=a[b].getType().toLowerCase(),d=a[b-1].getType().toLowerCase();c===SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater&&d===SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater&&a.splice(b-1,1)}return a}getDynamicCategoryContents(a){a=this.workspace_.targetWorkspace.getToolboxCategoryCallback(a);if(typeof a!=="function")throw TypeError("Couldn't find a callback function when opening a toolbox category.");
1267
- return a(this.workspace_.targetWorkspace)}clearOldBlocks(){this.getContents().forEach(b=>{let c;(c=this.getInflaterForType(b.getType()))==null||c.disposeItem(b)});let a;(a=this.workspace_.getPotentialVariableMap())==null||a.clear()}onMouseDown(a){const b=this.targetWorkspace.getGesture(a);b&&b.handleFlyoutStart(a,this)}reflow(){this.inhibitReflowWrapper=!0;this.reflowInternal_();this.inhibitReflowWrapper=!1}isScrollable(){return this.workspace_.scrollbar?this.workspace_.scrollbar.isVisible():!1}getInflaterForType(a){if(this.inflaters.has(a)){var b;
1268
- return(b=this.inflaters.get(a))!=null?b:null}return(b=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUT_INFLATER,a))?(b=new b,this.inflaters.set(a,b),b):null}},module$build$src$core$flyout_base={};module$build$src$core$flyout_base.Flyout=Flyout$$module$build$src$core$flyout_base;var module$build$src$core$interfaces$i_contextmenu={};module$build$src$core$interfaces$i_contextmenu.hasContextMenu=hasContextMenu$$module$build$src$core$interfaces$i_contextmenu;var KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=class{constructor(){this.isActive=!1;this.activeClassName="blocklyKeyboardNavigation"}setIsActive(a=!0){this.isActive=a;this.updateActiveVisualization()}getIsActive(){return this.isActive}updateActiveVisualization(){this.isActive?document.body.classList.add(this.activeClassName):document.body.classList.remove(this.activeClassName)}},keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=
1990
+ (this.setVisible(!1),this.reflowWrapper&&(this.workspace_.removeChangeListener(this.reflowWrapper),this.reflowWrapper=null))}show(a){$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree()===this.workspace_&&$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode()!==this.workspace_&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.workspace_);this.workspace_.setResizesEnabled(!1);$.setRecordUndo$$module$build$src$core$events$utils(!1);this.hide();
1991
+ this.clearOldBlocks();typeof a==="string"&&(a=this.getDynamicCategoryContents(a));this.setVisible(!0);a=convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox(a);a=this.createFlyoutInfo(a);triggerQueuedRenders$$module$build$src$core$render_management(this.workspace_);this.setContents(a);this.layout_(a);this.horizontalLayout?this.height_=0:this.width_=0;this.reflow();$.setRecordUndo$$module$build$src$core$events$utils(!0);this.workspace_.setResizesEnabled(!0);this.reflowWrapper=b=>{this.inhibitReflowWrapper||
1992
+ b.type!==EventType$$module$build$src$core$events$type.BLOCK_CHANGE&&b.type!==EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE||this.reflow()};this.workspace_.addChangeListener(this.reflowWrapper)}createFlyoutInfo(a){const b=[],c=this.horizontalLayout?this.GAP_X:this.GAP_Y;for(const d of a)if("custom"in d&&(a=this.getDynamicCategoryContents(d.custom),a=convertFlyoutDefToJsonArray$$module$build$src$core$utils$toolbox(a),b.push(...this.createFlyoutInfo(a))),a=d.kind.toLowerCase(),
1993
+ a=this.getInflaterForType(a))b.push(a.load(d,this)),(a=a.gapForItem(d,c))&&b.push(new FlyoutItem$$module$build$src$core$flyout_item(new FlyoutSeparator$$module$build$src$core$flyout_separator(a,this.horizontalLayout?"x":"y"),SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater));return this.normalizeSeparators(b)}normalizeSeparators(a){for(let b=a.length-1;b>0;b--){const c=a[b].getType().toLowerCase(),d=a[b-1].getType().toLowerCase();c===SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater&&
1994
+ d===SEPARATOR_TYPE$$module$build$src$core$separator_flyout_inflater&&a.splice(b-1,1)}return a}getDynamicCategoryContents(a){a=this.workspace_.targetWorkspace.getToolboxCategoryCallback(a);if(typeof a!=="function")throw TypeError("Couldn't find a callback function when opening a toolbox category.");return a(this.workspace_.targetWorkspace)}clearOldBlocks(){this.getContents().forEach(b=>{let c;(c=this.getInflaterForType(b.getType()))==null||c.disposeItem(b)});let a;(a=this.workspace_.getPotentialVariableMap())==
1995
+ null||a.clear()}onMouseDown(a){const b=this.targetWorkspace.getGesture(a);b&&b.handleFlyoutStart(a,this)}reflow(){this.inhibitReflowWrapper=!0;this.reflowInternal_();this.inhibitReflowWrapper=!1}isScrollable(){return this.workspace_.scrollbar?this.workspace_.scrollbar.isVisible():!1}getInflaterForType(a){if(this.inflaters.has(a)){var b;return(b=this.inflaters.get(a))!=null?b:null}return(b=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUT_INFLATER,a))?(b=new b,this.inflaters.set(a,
1996
+ b),b):null}},module$build$src$core$flyout_base={};module$build$src$core$flyout_base.Flyout=Flyout$$module$build$src$core$flyout_base;var module$build$src$core$interfaces$i_contextmenu={};module$build$src$core$interfaces$i_contextmenu.hasContextMenu=hasContextMenu$$module$build$src$core$interfaces$i_contextmenu;var KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=class{constructor(){this.isActive=!1;this.activeClassName="blocklyKeyboardNavigation"}setIsActive(a=!0){this.isActive=a;this.updateActiveVisualization()}getIsActive(){return this.isActive}updateActiveVisualization(){this.isActive?document.body.classList.add(this.activeClassName):document.body.classList.remove(this.activeClassName)}},keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller=
1269
1997
  new KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller,module$build$src$core$keyboard_navigation_controller={};module$build$src$core$keyboard_navigation_controller.KeyboardNavigationController=KeyboardNavigationController$$module$build$src$core$keyboard_navigation_controller;module$build$src$core$keyboard_navigation_controller.keyboardNavigationController=keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller;var WorkspaceDragger$$module$build$src$core$workspace_dragger=class{constructor(a){this.workspace=a;this.horizontalScrollEnabled=this.workspace.isMovableHorizontally();this.verticalScrollEnabled=this.workspace.isMovableVertically();this.startScrollXY_=new Coordinate$$module$build$src$core$utils$coordinate(a.scrollX,a.scrollY)}startDrag(){}endDrag(a){this.drag(a)}drag(a){a=Coordinate$$module$build$src$core$utils$coordinate.sum(this.startScrollXY_,a);if(this.horizontalScrollEnabled&&this.verticalScrollEnabled)this.workspace.scroll(a.x,
1270
1998
  a.y);else if(this.horizontalScrollEnabled)this.workspace.scroll(a.x,this.workspace.scrollY);else if(this.verticalScrollEnabled)this.workspace.scroll(this.workspace.scrollX,a.y);else throw new TypeError("Invalid state.");}},module$build$src$core$workspace_dragger={};module$build$src$core$workspace_dragger.WorkspaceDragger=WorkspaceDragger$$module$build$src$core$workspace_dragger;var ZOOM_IN_MULTIPLIER$$module$build$src$core$gesture=5,ZOOM_OUT_MULTIPLIER$$module$build$src$core$gesture=6,Gesture$$module$build$src$core$gesture=class{constructor(a,b){this.creatorWorkspace=b;this.mouseDownXY=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.startWorkspace_=this.targetBlock=this.startComment=this.startBlock=this.startIcon=this.startField=this.startBubble=null;this.hasExceededDragRadius=!1;this.boundEvents=[];this.workspaceDragger=this.dragger=null;this.dragging=
1271
1999
  !1;this.flyout=null;this.multiTouch=this.isEnding_=this.gestureHasStarted=this.calledUpdateIsDragging=!1;this.cachedPoints=new Map;this.startDistance=this.previousScale=0;this.currentDropdownOwner=this.isPinchZoomEnabled=null;this.mostRecentEvent=a;this.currentDragDeltaXY=new Coordinate$$module$build$src$core$utils$coordinate(0,0)}dispose(){clearTouchIdentifier$$module$build$src$core$touch();unblock$$module$build$src$core$tooltip();this.creatorWorkspace.clearGesture();for(const a of this.boundEvents)unbind$$module$build$src$core$browser_events(a);
@@ -1289,7 +2017,7 @@ this.setStartBubble(b);this.mostRecentEvent=a}handleCommentStart(a,b){if(this.ge
1289
2017
  this.startIcon.onClick()}doBlockClick(){if(this.flyout&&this.flyout.autoClose){if(!this.targetBlock)throw Error("Cannot do a block click because the target block is undefined");var a=save$$module$build$src$core$serialization$blocks(this.targetBlock);const c=this.flyout.targetWorkspace;if(a&&c){var b=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(this.flyout.getWorkspace(),this.targetBlock.getRelativeToSurfaceXY());b=screenToWsCoordinates$$module$build$src$core$utils$svg_math(c,b);a.x=
1290
2018
  b.x;a.y=b.y;appendInternal$$module$build$src$core$serialization$blocks(a,c,{recordUndo:!0});c.hideChaff(!1)}}else{if(!this.startWorkspace_)throw Error("Cannot do a block click because the start workspace is undefined");a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.CLICK))(this.startBlock,this.startWorkspace_.id,"block");fire$$module$build$src$core$events$utils(a)}$.setGroup$$module$build$src$core$events$utils(!1)}doWorkspaceClick(a){this.fireWorkspaceClick(this.startWorkspace_||
1291
2019
  this.creatorWorkspace)}setStartField(a){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField||(this.startField=a)}setStartIcon(a){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartIcon, but the gesture had already been started.");this.startIcon||(this.startIcon=a)}setStartBubble(a){this.startBubble||(this.startBubble=a)}setStartComment(a){this.startComment||(this.startComment=a)}setStartBlock(a){this.startBlock||
1292
- this.startBubble||this.startIcon||(this.startBlock=a,a.isInFlyout&&a!==a.getRootBlock()?this.setTargetBlock(a.getRootBlock()):this.setTargetBlock(a))}setTargetBlock(a){a.isShadow()?this.setTargetBlock(a.getParent()):(this.targetBlock=a,$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.targetBlock),this.targetBlock.bringToFront())}setStartWorkspace(a){this.startWorkspace_||(this.startWorkspace_=a)}setStartFlyout(a){this.flyout||(this.flyout=a)}isBubbleClick(){return!!this.startBubble&&
2020
+ this.startBubble||this.startIcon||(this.startBlock=a,a.isInFlyout&&a!==a.getRootBlock()?this.setTargetBlock(a.getRootBlock()):this.setTargetBlock(a))}setTargetBlock(a){a.isShadow()?this.setTargetBlock(a.getParent()):(this.targetBlock=a,this.targetBlock.bringToFront(),$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.targetBlock))}setStartWorkspace(a){this.startWorkspace_||(this.startWorkspace_=a)}setStartFlyout(a){this.flyout||(this.flyout=a)}isBubbleClick(){return!!this.startBubble&&
1293
2021
  !this.hasExceededDragRadius}isCommentClick(){return!!this.startComment&&!this.hasExceededDragRadius}isBlockClick(){return!!this.startBlock&&!this.hasExceededDragRadius&&!this.isFieldClick()&&!this.isIconClick()}isFieldClick(){return this.startField?this.startField.isClickable()&&!this.hasExceededDragRadius&&(!this.flyout||this.startField.isClickableInFlyout(this.flyout.autoClose)):!1}isIconClick(){if(!this.startIcon)return!1;const a=!this.flyout||!this.startIcon.isClickableInFlyout||this.startIcon.isClickableInFlyout(this.flyout.autoClose);
1294
2022
  return!this.hasExceededDragRadius&&a}isWorkspaceClick(){return!this.startBlock&&!this.startBubble&&!this.startField&&!this.hasExceededDragRadius}getCurrentDragger(){let a,b;return(b=(a=this.workspaceDragger)!=null?a:this.dragger)!=null?b:null}isDragging(){return this.dragging}hasStarted(){return this.gestureHasStarted}static inProgress(){const a=getAllWorkspaces$$module$build$src$core$common();for(let b=0,c;c=a[b];b++)if(c.currentGesture_)return!0;return!1}},module$build$src$core$gesture={};
1295
2023
  module$build$src$core$gesture.Gesture=Gesture$$module$build$src$core$gesture;var Grid$$module$build$src$core$grid=class{constructor(a,b){this.pattern=a;this.scale=1;let c;this.spacing=(c=b.spacing)!=null?c:0;let d;this.length=(d=b.length)!=null?d:1;this.line2=(this.line1=a.firstChild)&&this.line1.nextSibling;let e;this.snapToGrid=(e=b.snap)!=null?e:!1}setSpacing(a){this.spacing=a;this.update(this.scale)}getSpacing(){return this.spacing}setLength(a){this.length=a;this.update(this.scale)}getLength(){return this.length}setSnapToGrid(a){this.snapToGrid=a}shouldSnap(){return this.snapToGrid}getPatternId(){return this.pattern.id}update(a){this.scale=
@@ -1301,7 +2029,20 @@ module$build$src$core$grid.Grid=Grid$$module$build$src$core$grid;var module$buil
1301
2029
  "xmlns:html":HTML_NS$$module$build$src$core$utils$dom,"xmlns:xlink":XLINK_NS$$module$build$src$core$utils$dom,version:"1.1"});a.append(b);return createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{},b)}appendToAnimationLayer(a){let b;const c=(b=this.dragLayer)==null?void 0:b.getAttribute("transform");if(c){let e;(e=this.animationLayer)==null||e.setAttribute("transform",c)}let d;(d=this.animationLayer)==null||d.appendChild(a.getSvgRoot())}translateLayers(a,b){a=
1302
2030
  `translate(${a.x}, ${a.y}) scale(${b})`;let c;(c=this.dragLayer)==null||c.setAttribute("transform",a);for(const [,d]of this.layers)d.setAttribute("transform",a)}moveToDragLayer(a,b=!0){let c;(c=this.dragLayer)==null||c.appendChild(a.getSvgRoot());b&&a.canBeFocused()&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)}moveOffDragLayer(a,b,c=!0){this.append(a,b);c&&a.canBeFocused()&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(a)}append(a,b){this.layers.has(b)||
1303
2031
  this.createLayer(b);a=a.getSvgRoot();let c;if(((c=this.layers.get(b))==null?void 0:c.lastChild)!==a){let d;(d=this.layers.get(b))==null||d.appendChild(a)}}createLayer(a){const b=this.workspace.getSvgGroup(),c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{});let d=!1;const e=[...this.layers].sort((f,g)=>f[0]-g[0]);for(const [f,g]of e)if(a<f){b.insertBefore(c,g);d=!0;break}d||b.appendChild(c);this.layers.set(a,c);return c}hasLayer(a){return a===this.dragLayer||
1304
- (new Set(this.layers.values())).has(a)}getBlockLayer(){return this.layers.get(BLOCK$$module$build$src$core$layers)}getBubbleLayer(){return this.layers.get(BUBBLE$$module$build$src$core$layers)}getDragLayer(){return this.dragLayer}},module$build$src$core$layer_manager={};module$build$src$core$layer_manager.LayerManager=LayerManager$$module$build$src$core$layer_manager;var module$build$src$core$icons={};module$build$src$core$icons.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;module$build$src$core$icons.Icon=Icon$$module$build$src$core$icons$icon;module$build$src$core$icons.IconType=IconType$$module$build$src$core$icons$icon_types;module$build$src$core$icons.MutatorIcon=$.MutatorIcon$$module$build$src$core$icons$mutator_icon;module$build$src$core$icons.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon;
2032
+ (new Set(this.layers.values())).has(a)}getBlockLayer(){return this.layers.get(BLOCK$$module$build$src$core$layers)}getBubbleLayer(){return this.layers.get(BUBBLE$$module$build$src$core$layers)}getDragLayer(){return this.dragLayer}},module$build$src$core$layer_manager={};module$build$src$core$layer_manager.LayerManager=LayerManager$$module$build$src$core$layer_manager;var module$build$src$core$icons$registry={};module$build$src$core$icons$registry.register=register$$module$build$src$core$icons$registry;module$build$src$core$icons$registry.unregister=unregister$$module$build$src$core$icons$registry;var SIZE$$module$build$src$core$icons$comment_icon=17,DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon=160,DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon=80,CommentIcon$$module$build$src$core$icons$comment_icon=class extends Icon$$module$build$src$core$icons$icon{constructor(a){super(a);this.sourceBlock=a;this.textInputBubble=null;this.text="";this.bubbleSize=new Size$$module$build$src$core$utils$size(DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon,DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);
2033
+ this.bubbleVisiblity=!1}getType(){return CommentIcon$$module$build$src$core$icons$comment_icon.TYPE}initView(a){this.svgRoot||(super.initView(a),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CIRCLE,{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},
2034
+ this.svgRoot),createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},this.svgRoot),addClass$$module$build$src$core$utils$dom(this.svgRoot,"blocklyCommentIcon"))}dispose(){super.dispose();let a;(a=this.textInputBubble)==null||a.dispose()}getWeight(){return CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT}getSize(){return new Size$$module$build$src$core$utils$size(SIZE$$module$build$src$core$icons$comment_icon,
2035
+ SIZE$$module$build$src$core$icons$comment_icon)}applyColour(){super.applyColour();const a=this.sourceBlock.getColour();let b;(b=this.textInputBubble)==null||b.setColour(a)}updateEditable(){const a=this,b=()=>super.updateEditable;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){b().call(a);a.bubbleIsVisible()&&(yield a.setBubbleVisible(!1),yield a.setBubbleVisible(!0))})}onLocationChange(a){const b=this.workspaceLocation;super.onLocationChange(a);this.bubbleLocation&&(a=Coordinate$$module$build$src$core$utils$coordinate.difference(this.workspaceLocation,
2036
+ b),this.bubbleLocation=Coordinate$$module$build$src$core$utils$coordinate.sum(this.bubbleLocation,a));a=this.getAnchorLocation();let c;(c=this.textInputBubble)==null||c.setAnchorLocation(a)}setText(a){const b=this.text;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,"comment",null,b,a));this.text=a;let c;(c=this.textInputBubble)==null||c.setText(this.text)}getText(){return this.text}setBubbleSize(a){this.bubbleSize=
2037
+ a;let b;(b=this.textInputBubble)==null||b.setSize(this.bubbleSize,!0)}getBubbleSize(){return this.bubbleSize}setBubbleLocation(a){this.bubbleLocation=a;let b;(b=this.textInputBubble)==null||b.moveDuringDrag(a)}getBubbleLocation(){return this.bubbleLocation}saveState(){if(this.text){const a={text:this.text,pinned:this.bubbleIsVisible(),height:this.bubbleSize.height,width:this.bubbleSize.width},b=this.getBubbleLocation();b&&(a.x=this.sourceBlock.workspace.RTL?this.sourceBlock.workspace.getWidth()-(b.x+
2038
+ this.bubbleSize.width):b.x,a.y=b.y);return a}return null}loadState(a){let b;this.text=(b=a.text)!=null?b:"";let c,d;this.bubbleSize=new Size$$module$build$src$core$utils$size((c=a.width)!=null?c:DEFAULT_BUBBLE_WIDTH$$module$build$src$core$icons$comment_icon,(d=a.height)!=null?d:DEFAULT_BUBBLE_HEIGHT$$module$build$src$core$icons$comment_icon);let e;this.bubbleVisiblity=(e=a.pinned)!=null?e:!1;this.setBubbleVisible(this.bubbleVisiblity);let f=a.x;const g=a.y;finishQueuedRenders$$module$build$src$core$render_management().then(()=>
2039
+ {f&&g&&(f=this.sourceBlock.workspace.RTL?this.sourceBlock.workspace.getWidth()-(f+this.bubbleSize.width):f,this.setBubbleLocation(new Coordinate$$module$build$src$core$utils$coordinate(f,g)))})}onClick(){super.onClick();this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}onTextChange(){if(this.textInputBubble){var a=this.textInputBubble.getText();this.text!==a&&(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,
2040
+ "comment",null,this.text,a)),this.text=a)}}onSizeChange(){this.textInputBubble&&(this.bubbleSize=this.textInputBubble.getSize())}onBubbleLocationChange(){this.textInputBubble&&(this.bubbleLocation=this.textInputBubble.getRelativeToSurfaceXY())}bubbleIsVisible(){return this.bubbleVisiblity}setBubbleVisible(a){const b=this;return(0,$jscomp.asyncExecutePromiseGeneratorFunction)(function*(){b.bubbleVisiblity!==a&&(b.bubbleVisiblity=a,yield finishQueuedRenders$$module$build$src$core$render_management(),
2041
+ !b.sourceBlock.rendered||b.sourceBlock.isInFlyout||b.sourceBlock.isInsertionMarker()||(a?(b.sourceBlock.isEditable()?b.showEditableBubble():b.showNonEditableBubble(),b.applyColour()):b.hideBubble(),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,"comment"))))})}getBubble(){return this.textInputBubble}showEditableBubble(){this.createBubble();let a;(a=this.textInputBubble)==null||a.addTextChangeListener(()=>
2042
+ this.onTextChange());let b;(b=this.textInputBubble)==null||b.addSizeChangeListener(()=>this.onSizeChange())}showNonEditableBubble(){this.createBubble();let a;(a=this.textInputBubble)==null||a.setEditable(!1)}createBubble(){this.textInputBubble=new TextInputBubble$$module$build$src$core$bubbles$textinput_bubble(this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect(),this);this.textInputBubble.setText(this.getText());this.textInputBubble.setSize(this.bubbleSize,!0);this.bubbleLocation&&
2043
+ this.textInputBubble.moveDuringDrag(this.bubbleLocation);this.textInputBubble.addTextChangeListener(()=>this.onTextChange());this.textInputBubble.addSizeChangeListener(()=>this.onSizeChange());this.textInputBubble.addLocationChangeListener(()=>this.onBubbleLocationChange())}hideBubble(){let a;(a=this.textInputBubble)==null||a.dispose();this.textInputBubble=null}getAnchorLocation(){const a=SIZE$$module$build$src$core$icons$comment_icon/2;return Coordinate$$module$build$src$core$utils$coordinate.sum(this.workspaceLocation,
2044
+ new Coordinate$$module$build$src$core$utils$coordinate(a,a))}getBubbleOwnerRect(){return this.sourceBlock.getBoundingRectangleWithoutChildren()}};CommentIcon$$module$build$src$core$icons$comment_icon.TYPE=IconType$$module$build$src$core$icons$icon_types.COMMENT;CommentIcon$$module$build$src$core$icons$comment_icon.WEIGHT=3;register$$module$build$src$core$icons$registry(CommentIcon$$module$build$src$core$icons$comment_icon.TYPE,CommentIcon$$module$build$src$core$icons$comment_icon);
2045
+ var module$build$src$core$icons$comment_icon={};module$build$src$core$icons$comment_icon.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;var module$build$src$core$icons={};module$build$src$core$icons.CommentIcon=CommentIcon$$module$build$src$core$icons$comment_icon;module$build$src$core$icons.Icon=Icon$$module$build$src$core$icons$icon;module$build$src$core$icons.IconType=IconType$$module$build$src$core$icons$icon_types;module$build$src$core$icons.MutatorIcon=$.MutatorIcon$$module$build$src$core$icons$mutator_icon;module$build$src$core$icons.WarningIcon=WarningIcon$$module$build$src$core$icons$warning_icon;
1305
2046
  module$build$src$core$icons.exceptions=module$build$src$core$icons$exceptions;module$build$src$core$icons.registry=module$build$src$core$icons$registry;var module$build$src$core$interfaces$i_procedure_block={};module$build$src$core$interfaces$i_procedure_block.isProcedureBlock=isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block;$.Names$$module$build$src$core$names=class{constructor(a,b){this.db=new Map;this.dbReverse=new Set;this.variableMap=null;this.variablePrefix=b||"";this.reservedWords=new Set(a?a.split(","):[])}reset(){this.db.clear();this.dbReverse.clear();this.variableMap=null}setVariableMap(a){this.variableMap=a}getNameForUserVariable(a){return this.variableMap?(a=this.variableMap.getVariableById(a))?a.getName():null:(console.warn("Deprecated call to Names.prototype.getName without defining a variable map. To fix, add the following code in your generator's init() function:\nBlockly.YourGeneratorName.nameDB_.setVariableMap(workspace.getVariableMap());"),
1306
2047
  null)}populateVariables(a){a=$.allUsedVarModels$$module$build$src$core$variables(a);for(let b=0;b<a.length;b++)this.getName(a[b].getId(),$.NameType$$module$build$src$core$names.VARIABLE)}populateProcedures(a){throw Error("The implementation of populateProcedures should be monkey-patched in by blockly.ts");}getName(a,b){let c=a;b===$.NameType$$module$build$src$core$names.VARIABLE&&(a=this.getNameForUserVariable(a))&&(c=a);a=c.toLowerCase();const d=b===$.NameType$$module$build$src$core$names.VARIABLE||
1307
2048
  b===$.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE?this.variablePrefix:"";this.db.has(b)||this.db.set(b,new Map);const e=this.db.get(b);if(e.has(a))return d+e.get(a);b=this.getDistinctName(c,b);e.set(a,b.substr(d.length));return b}getUserNames(a){let b;return(a=(b=this.db.get(a))==null?void 0:b.keys())?Array.from(a):[]}getDistinctName(a,b){a=this.safeName(a);let c=null,d,e;for(;this.dbReverse.has(a+((d=c)!=null?d:""))||this.reservedWords.has(a+((e=c)!=null?e:""));)c=c?c+1:2;let f;a+=(f=
@@ -1501,16 +2242,8 @@ RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comm
1501
2242
  d);if(e=this.getBlockById(e))for(var f of e.getFields())if(f.canBeFocused()&&f.getFocusableElement().id===a)return f;return null}if(b!==-1){e=a.substring(0,b);if(e=this.getBlockById(e))for(const h of e.getConnections_(!0))if(h.id===a)return h;return null}f=Math.max(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor),a.indexOf(COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$collapse_comment_bar_button),a.indexOf(COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER$$module$build$src$core$comments$delete_comment_bar_button));
1502
2243
  if(f!==-1&&(f=a.substring(0,f),f=this.searchForWorkspaceComment(f))){if(a.indexOf(COMMENT_EDITOR_FOCUS_IDENTIFIER$$module$build$src$core$comments$comment_editor)>-1)return f.getEditorFocusableNode();var g;return(g=f.view.getCommentBarButtons().find(h=>h.getFocusableElement().id.includes(a)))!=null?g:null}if((g=this.getAllBlocks(!1).find(h=>h.getFocusableElement().id===a))||(g=this.searchForWorkspaceComment(a)))return g;g=this.getAllBlocks().map(h=>h.getIcons()).flat();for(e of g){if(e.canBeFocused()&&
1503
2244
  e.getFocusableElement().id===a)return e;if(hasBubble$$module$build$src$core$interfaces$i_has_bubble(e)){if((g=e.getBubble())&&g.canBeFocused()&&g.getFocusableElement().id===a)return g;if(g instanceof TextInputBubble$$module$build$src$core$bubbles$textinput_bubble&&g.getEditor().getFocusableElement().id===a)return g.getEditor()}}return null}onTreeFocus(a,b){}onTreeBlur(a){if(this.isFlyout&&this.targetWorkspace&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken()){var b=
1504
- this.targetWorkspace.getToolbox();b&&a===b||isAutoHideable$$module$build$src$core$interfaces$i_autohideable(b)&&b.autoHide(!1)}}performAction(){showWorkspaceNavigationHint$$module$build$src$core$hints(this)}getNavigator(){return this.navigator}setNavigator(a){this.navigator=a}},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=!0;this.isBlank=typeof a==="undefined";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=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,
1505
- b,c!=null?c:new VarBase$$module$build$src$core$events$events_var_base);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(this.varType===void 0)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");
1506
- a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarCreate$$module$build$src$core$events$events_var_create);b.varType=a.varType;b.varName=a.varName;return b}run(a){var 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");
1507
- b=b.getVariableMap();a?b.createVariable(this.varName,this.varType,this.varId):(a=b.getVariableById(this.varId))&&b.deleteVariable(a)}};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,
1508
- a.type,a.id);b.getVariableMap().addVariable(a);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_CREATE))(a))}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MODEL,DEFAULT$$module$build$src$core$registry,VariableModel$$module$build$src$core$variable_model);var module$build$src$core$variable_model={};module$build$src$core$variable_model.VariableModel=VariableModel$$module$build$src$core$variable_model;var VarDelete$$module$build$src$core$events$events_var_delete=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_DELETE;a&&(this.varType=a.getType(),this.varName=a.getName())}toJson(){const a=super.toJson();if(this.varType===void 0)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");
1509
- a.varType=this.varType;a.varName=this.varName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarDelete$$module$build$src$core$events$events_var_delete);b.varType=a.varType;b.varName=a.varName;return b}run(a){var 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");
1510
- b=b.getVariableMap();a?(a=b.getVariableById(this.varId))&&b.deleteVariable(a):b.createVariable(this.varName,this.varType,this.varId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_DELETE,VarDelete$$module$build$src$core$events$events_var_delete);var module$build$src$core$events$events_var_delete={};module$build$src$core$events$events_var_delete.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete;var VarRename$$module$build$src$core$events$events_var_rename=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a,b){super(a);this.type=EventType$$module$build$src$core$events$type.VAR_RENAME;a&&(this.oldName=a.getName(),this.newName=typeof b==="undefined"?"":b)}toJson(){const a=super.toJson();if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");
1511
- a.oldName=this.oldName;a.newName=this.newName;return a}static fromJson(a,b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarRename$$module$build$src$core$events$events_var_rename);b.oldName=a.oldName;b.newName=a.newName;return b}run(a){var 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.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");
1512
- if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");b=b.getVariableMap();const c=b.getVariableById(this.varId);a?c&&b.renameVariable(c,this.newName):c&&b.renameVariable(c,this.oldName)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_RENAME,VarRename$$module$build$src$core$events$events_var_rename);
1513
- var module$build$src$core$events$events_var_rename={};module$build$src$core$events$events_var_rename.VarRename=VarRename$$module$build$src$core$events$events_var_rename;var VariableMap$$module$build$src$core$variable_map=class{constructor(a,b=!1){this.workspace=a;this.potentialMap=b;this.variableMap=new Map}clear(){for(const a of this.variableMap.values())for(const b of a.values())this.deleteVariable(b);if(this.variableMap.size!==0)throw Error("Non-empty variable map");}renameVariable(a,b){if(a.getName()===b)return a;var c=a.getType();c=this.getVariable(b,c);const d=this.workspace.getAllBlocks(!1);let e="";this.potentialMap||(e=$.getGroup$$module$build$src$core$events$utils())||
2245
+ this.targetWorkspace.getToolbox();b&&a===b||isAutoHideable$$module$build$src$core$interfaces$i_autohideable(b)&&b.autoHide(!1)}}performAction(){showWorkspaceNavigationHint$$module$build$src$core$hints(this)}getNavigator(){return this.navigator}setNavigator(a){this.navigator=a}},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 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,
2246
+ a.type,a.id);b.getVariableMap().addVariable(a);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_CREATE))(a))}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MODEL,DEFAULT$$module$build$src$core$registry,VariableModel$$module$build$src$core$variable_model);var module$build$src$core$variable_model={};module$build$src$core$variable_model.VariableModel=VariableModel$$module$build$src$core$variable_model;var VariableMap$$module$build$src$core$variable_map=class{constructor(a,b=!1){this.workspace=a;this.potentialMap=b;this.variableMap=new Map}clear(){for(const a of this.variableMap.values())for(const b of a.values())this.deleteVariable(b);if(this.variableMap.size!==0)throw Error("Non-empty variable map");}renameVariable(a,b){if(a.getName()===b)return a;var c=a.getType();c=this.getVariable(b,c);const d=this.workspace.getAllBlocks(!1);let e="";this.potentialMap||(e=$.getGroup$$module$build$src$core$events$utils())||
1514
2247
  $.setGroup$$module$build$src$core$events$utils(!0);try{c&&c.getId()!==a.getId()?this.renameVariableWithConflict(a,b,c,d):this.renameVariableAndUses(a,b,d)}finally{this.potentialMap||$.setGroup$$module$build$src$core$events$utils(e)}return a}changeVariableType(a,b){const c=a.getType();if(c===b)return a;var d=this.variableMap.get(c);d==null||d.delete(a.getId());(d==null?void 0:d.size)===0&&this.variableMap.delete(c);a.setType(b);let e;d=(e=this.variableMap.get(b))!=null?e:new Map;d.set(a.getId(),a);
1515
2248
  this.variableMap.has(b)||this.variableMap.set(b,d);fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE))(a,c,b));return a}renameVariableById(a,b){$.warn$$module$build$src$core$utils$deprecation("VariableMap.renameVariableById","v12","v13","VariableMap.renameVariable");const c=this.getVariableById(a);if(!c)throw Error("Tried to rename a variable that didn't exist. ID: "+a);this.renameVariable(c,b)}renameVariableAndUses(a,
1516
2249
  b,c){this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_RENAME))(a,b));a.setName(b);for(b=0;b<c.length;b++)c[b].updateVarName(a)}renameVariableWithConflict(a,b,c,d){const e=a.getType(),f=c.getName();b!==f&&this.renameVariableAndUses(c,b,d);for(b=0;b<d.length;b++)d[b].renameVarById(a.getId(),c.getId());this.potentialMap||fire$$module$build$src$core$events$utils(new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.VAR_DELETE))(a));
@@ -1520,8 +2253,7 @@ let c;(c=this.variableMap.get(b))==null||c.set(a.getId(),a)}deleteVariable(a){co
1520
2253
  d.size===0&&this.variableMap.delete(a.getType()))}finally{this.potentialMap||$.setGroup$$module$build$src$core$events$utils(c)}}deleteVariableById(a){$.warn$$module$build$src$core$utils$deprecation("VariableMap.deleteVariableById","v12","v13","Blockly.Variables.deleteVariable");(a=this.getVariableById(a))&&$.deleteVariable$$module$build$src$core$variables(this.workspace,a)}getVariable(a,b){b=this.variableMap.get(b||"");if(!b)return null;let c;return(c=[...b.values()].find(d=>$.Names$$module$build$src$core$names.equals(d.getName(),
1521
2254
  a)))!=null?c:null}getVariableById(a){for(const b of this.variableMap.values())if(b.has(a)){let c;return(c=b.get(a))!=null?c:null}return null}getVariablesOfType(a){return(a=this.variableMap.get(a||""))?[...a.values()]:[]}getTypes(){return[...this.variableMap.keys()]}getAllVariables(){let a=[];for(const b of this.variableMap.values())a=a.concat(...b.values());return a}getAllVariableNames(){$.warn$$module$build$src$core$utils$deprecation("VariableMap.getAllVariableNames","v12","v13","Blockly.Variables.getAllVariables");
1522
2255
  const a=[];for(const b of this.variableMap.values())for(const c of b.values())a.push(c.getName());return a}getVariableUsesById(a){$.warn$$module$build$src$core$utils$deprecation("VariableMap.getVariableUsesById","v12","v13","Blockly.Variables.getVariableUsesById");return getVariableUsesById$$module$build$src$core$variables(this.workspace,a)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.VARIABLE_MAP,DEFAULT$$module$build$src$core$registry,VariableMap$$module$build$src$core$variable_map);
1523
- var module$build$src$core$variable_map={};module$build$src$core$variable_map.VariableMap=VariableMap$$module$build$src$core$variable_map;var TrashcanOpen$$module$build$src$core$events$events_trashcan_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(b);this.type=EventType$$module$build$src$core$events$type.TRASHCAN_OPEN;this.isOpen=a}toJson(){const a=super.toJson();if(this.isOpen===void 0)throw Error("Whether this is already open or not is undefined. Either pass a value to the constructor, or call fromJson");a.isOpen=this.isOpen;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,
1524
- b,c!=null?c:new TrashcanOpen$$module$build$src$core$events$events_trashcan_open);b.isOpen=a.isOpen;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.TRASHCAN_OPEN,TrashcanOpen$$module$build$src$core$events$events_trashcan_open);var module$build$src$core$events$events_trashcan_open={};module$build$src$core$events$events_trashcan_open.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;var Trashcan$$module$build$src$core$trashcan=class extends DeleteArea$$module$build$src$core$delete_area{constructor(a){super();this.workspace=a;this.id="trashcan";this.contents=[];this.flyout=null;this.isLidOpen=!1;this.minOpenness=0;this.lidTask=this.svgLid=this.svgGroup=null;this.top=this.left=this.lidOpen=0;this.initialized=!1;this.workspace.options.maxTrashcanContents<=0||(a=this.workspace.copyOptionsForFlyout(),this.workspace.horizontalLayout?(a.toolboxPosition=this.workspace.toolboxPosition===
2256
+ var module$build$src$core$variable_map={};module$build$src$core$variable_map.VariableMap=VariableMap$$module$build$src$core$variable_map;var Trashcan$$module$build$src$core$trashcan=class extends DeleteArea$$module$build$src$core$delete_area{constructor(a){super();this.workspace=a;this.id="trashcan";this.contents=[];this.flyout=null;this.isLidOpen=!1;this.minOpenness=0;this.lidTask=this.svgLid=this.svgGroup=null;this.top=this.left=this.lidOpen=0;this.initialized=!1;this.workspace.options.maxTrashcanContents<=0||(a=this.workspace.copyOptionsForFlyout(),this.workspace.horizontalLayout?(a.toolboxPosition=this.workspace.toolboxPosition===
1525
2257
  Position$$module$build$src$core$utils$toolbox.TOP?Position$$module$build$src$core$utils$toolbox.BOTTOM:Position$$module$build$src$core$utils$toolbox.TOP,this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace.options,!0))(a)):(a.toolboxPosition=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT?Position$$module$build$src$core$utils$toolbox.LEFT:Position$$module$build$src$core$utils$toolbox.RIGHT,
1526
2258
  this.flyout=new (getClassFromOptions$$module$build$src$core$registry(Type$$module$build$src$core$registry.FLYOUTS_VERTICAL_TOOLBOX,this.workspace.options,!0))(a)),this.workspace.addChangeListener(this.onDelete.bind(this)))}createDom(){this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{"class":"blocklyTrash"});let a;const b=String(Math.random()).substring(2);a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.CLIPPATH,
1527
2259
  {id:"blocklyTrashBodyClipPath"+b},this.svgGroup);createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{width:WIDTH$$module$build$src$core$trashcan,height:BODY_HEIGHT$$module$build$src$core$trashcan,y:LID_HEIGHT$$module$build$src$core$trashcan},a);const c=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.IMAGE,{width:SPRITE$$module$build$src$core$sprites.width,x:-SPRITE_LEFT$$module$build$src$core$trashcan,height:SPRITE$$module$build$src$core$sprites.height,
@@ -1534,21 +2266,22 @@ this.flyout.isVisible()}openFlyout(){if(!this.contentsIsOpen()){var a=this.conte
1534
2266
  this.flyout&&this.closeFlyout()}emptyContents(){this.hasContents()&&(this.contents.length=0,this.setMinOpenness(0),this.closeFlyout())}position(a,b){if(this.initialized){var c=getCornerOppositeToolbox$$module$build$src$core$positionable_helpers(this.workspace,a);a=getStartPositionRect$$module$build$src$core$positionable_helpers(c,new Size$$module$build$src$core$utils$size(WIDTH$$module$build$src$core$trashcan,BODY_HEIGHT$$module$build$src$core$trashcan+LID_HEIGHT$$module$build$src$core$trashcan),
1535
2267
  MARGIN_HORIZONTAL$$module$build$src$core$trashcan,MARGIN_VERTICAL$$module$build$src$core$trashcan,a,this.workspace);b=bumpPositionRect$$module$build$src$core$positionable_helpers(a,MARGIN_VERTICAL$$module$build$src$core$trashcan,c.vertical===verticalPosition$$module$build$src$core$positionable_helpers.TOP?bumpDirection$$module$build$src$core$positionable_helpers.DOWN:bumpDirection$$module$build$src$core$positionable_helpers.UP,b);this.top=b.top;this.left=b.left;var d;(d=this.svgGroup)==null||d.setAttribute("transform",
1536
2268
  "translate("+this.left+","+this.top+")");var e;(e=this.flyout)==null||e.position()}}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.top,this.top+BODY_HEIGHT$$module$build$src$core$trashcan+LID_HEIGHT$$module$build$src$core$trashcan,this.left,this.left+WIDTH$$module$build$src$core$trashcan)}getClientRect(){if(!this.svgGroup)return null;var a=this.svgGroup.getBoundingClientRect();const b=a.top+SPRITE_TOP$$module$build$src$core$trashcan-MARGIN_HOTSPOT$$module$build$src$core$trashcan;
1537
- a=a.left+SPRITE_LEFT$$module$build$src$core$trashcan-MARGIN_HOTSPOT$$module$build$src$core$trashcan;return new Rect$$module$build$src$core$utils$rect(b,b+LID_HEIGHT$$module$build$src$core$trashcan+BODY_HEIGHT$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan,a,a+WIDTH$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan)}onDragOver(a){this.setLidOpen(this.wouldDelete_)}onDragExit(a){this.setLidOpen(!1)}onDrop(a){setTimeout(this.setLidOpen.bind(this,
1538
- !1),100)}setLidOpen(a){this.isLidOpen!==a&&(this.lidTask&&clearTimeout(this.lidTask),this.isLidOpen=a,this.animateLid())}animateLid(){const a=ANIMATION_FRAMES$$module$build$src$core$trashcan;var b=1/(a+1);this.lidOpen+=this.isLidOpen?b:-b;this.lidOpen=Math.min(Math.max(this.lidOpen,this.minOpenness),1);this.setLidAngle(this.lidOpen*MAX_LID_ANGLE$$module$build$src$core$trashcan);b=OPACITY_MIN$$module$build$src$core$trashcan+this.lidOpen*(OPACITY_MAX$$module$build$src$core$trashcan-OPACITY_MIN$$module$build$src$core$trashcan);
1539
- this.svgGroup&&(this.svgGroup.style.opacity=`${b}`);this.lidOpen>this.minOpenness&&this.lidOpen<1&&(this.lidTask=setTimeout(this.animateLid.bind(this),ANIMATION_LENGTH$$module$build$src$core$trashcan/a))}setLidAngle(a){const b=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT||this.workspace.horizontalLayout&&this.workspace.RTL;let c;(c=this.svgLid)==null||c.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:WIDTH$$module$build$src$core$trashcan-4)+","+(LID_HEIGHT$$module$build$src$core$trashcan-
1540
- 2)+")")}setMinOpenness(a){this.minOpenness=a;this.isLidOpen||this.setLidAngle(a*MAX_LID_ANGLE$$module$build$src$core$trashcan)}closeLid(){this.setLidOpen(!1)}click(){this.hasContents()&&!this.workspace.isDragging()&&this.openFlyout()}fireUiEvent(a){a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.TRASHCAN_OPEN))(a,this.workspace.id);fire$$module$build$src$core$events$utils(a)}blockMouseDownWhenOpenable(a){!this.contentsIsOpen()&&this.hasContents()&&a.stopPropagation()}mouseOver(){this.hasContents()&&
1541
- this.setLidOpen(!0)}mouseOut(){this.setLidOpen(!1)}onDelete(a){if(!(this.workspace.options.maxTrashcanContents<=0||!isBlockDelete$$module$build$src$core$events$predicates(a)||a.wasShadow)){if(!a.oldJson)throw Error("Encountered a delete event without proper oldJson");a=JSON.stringify(this.cleanBlockJson(a.oldJson));if(!this.contents.includes(a)){for(this.contents.unshift(a);this.contents.length>this.workspace.options.maxTrashcanContents;)this.contents.pop();this.setMinOpenness(HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan)}}}cleanBlockJson(a){function b(c){if(c){delete c.id;
1542
- delete c.x;delete c.y;delete c.enabled;delete c.disabledReasons;if(c.icons&&c.icons.comment){var d=c.icons.comment;delete d.height;delete d.width;delete d.pinned}d=c.inputs;for(var e in d){var f=d[e];const g=f.block;f=f.shadow;g&&b(g);f&&b(f)}c.next&&(e=c.next,c=e.block,e=e.shadow,c&&b(c),e&&b(e))}}a=JSON.parse(JSON.stringify(a));b(a);return Object.assign({},{kind:"BLOCK"},a)}},WIDTH$$module$build$src$core$trashcan=47,BODY_HEIGHT$$module$build$src$core$trashcan=44,LID_HEIGHT$$module$build$src$core$trashcan=
1543
- 16,MARGIN_VERTICAL$$module$build$src$core$trashcan=20,MARGIN_HORIZONTAL$$module$build$src$core$trashcan=20,MARGIN_HOTSPOT$$module$build$src$core$trashcan=10,SPRITE_LEFT$$module$build$src$core$trashcan=0,SPRITE_TOP$$module$build$src$core$trashcan=32,HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan=.1,ANIMATION_LENGTH$$module$build$src$core$trashcan=80,ANIMATION_FRAMES$$module$build$src$core$trashcan=4,OPACITY_MIN$$module$build$src$core$trashcan=.4,OPACITY_MAX$$module$build$src$core$trashcan=.8,
1544
- MAX_LID_ANGLE$$module$build$src$core$trashcan=45,module$build$src$core$trashcan={};module$build$src$core$trashcan.Trashcan=Trashcan$$module$build$src$core$trashcan;var stashedCopyData$$module$build$src$core$clipboard=null,stashedWorkspace$$module$build$src$core$clipboard=null,stashedCoordinates$$module$build$src$core$clipboard=void 0,module$build$src$core$clipboard={};module$build$src$core$clipboard.BlockPaster=BlockPaster$$module$build$src$core$clipboard$block_paster;module$build$src$core$clipboard.copy=copy$$module$build$src$core$clipboard;module$build$src$core$clipboard.getLastCopiedData=getLastCopiedData$$module$build$src$core$clipboard;
2269
+ a=a.left+SPRITE_LEFT$$module$build$src$core$trashcan-MARGIN_HOTSPOT$$module$build$src$core$trashcan;return new Rect$$module$build$src$core$utils$rect(b,b+LID_HEIGHT$$module$build$src$core$trashcan+BODY_HEIGHT$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan,a,a+WIDTH$$module$build$src$core$trashcan+2*MARGIN_HOTSPOT$$module$build$src$core$trashcan)}onDragOver(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.setLidOpen(this.wouldDelete_)}onDragExit(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||
2270
+ this.setLidOpen(!1)}onDrop(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||setTimeout(this.setLidOpen.bind(this,!1),100)}setLidOpen(a){this.isLidOpen!==a&&(this.lidTask&&clearTimeout(this.lidTask),this.isLidOpen=a,this.animateLid())}animateLid(){const a=ANIMATION_FRAMES$$module$build$src$core$trashcan;var b=1/(a+1);this.lidOpen+=this.isLidOpen?b:-b;this.lidOpen=Math.min(Math.max(this.lidOpen,this.minOpenness),1);this.setLidAngle(this.lidOpen*MAX_LID_ANGLE$$module$build$src$core$trashcan);
2271
+ b=OPACITY_MIN$$module$build$src$core$trashcan+this.lidOpen*(OPACITY_MAX$$module$build$src$core$trashcan-OPACITY_MIN$$module$build$src$core$trashcan);this.svgGroup&&(this.svgGroup.style.opacity=`${b}`);this.lidOpen>this.minOpenness&&this.lidOpen<1&&(this.lidTask=setTimeout(this.animateLid.bind(this),ANIMATION_LENGTH$$module$build$src$core$trashcan/a))}setLidAngle(a){const b=this.workspace.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT||this.workspace.horizontalLayout&&this.workspace.RTL;
2272
+ let c;(c=this.svgLid)==null||c.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:WIDTH$$module$build$src$core$trashcan-4)+","+(LID_HEIGHT$$module$build$src$core$trashcan-2)+")")}setMinOpenness(a){this.minOpenness=a;this.isLidOpen||this.setLidAngle(a*MAX_LID_ANGLE$$module$build$src$core$trashcan)}closeLid(){this.setLidOpen(!1)}click(){this.hasContents()&&!this.workspace.isDragging()&&this.openFlyout()}fireUiEvent(a){a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.TRASHCAN_OPEN))(a,
2273
+ this.workspace.id);fire$$module$build$src$core$events$utils(a)}blockMouseDownWhenOpenable(a){!this.contentsIsOpen()&&this.hasContents()&&a.stopPropagation()}mouseOver(){this.hasContents()&&this.setLidOpen(!0)}mouseOut(){this.setLidOpen(!1)}onDelete(a){if(!(this.workspace.options.maxTrashcanContents<=0||!isBlockDelete$$module$build$src$core$events$predicates(a)||a.wasShadow)){if(!a.oldJson)throw Error("Encountered a delete event without proper oldJson");a=JSON.stringify(this.cleanBlockJson(a.oldJson));
2274
+ if(!this.contents.includes(a)){for(this.contents.unshift(a);this.contents.length>this.workspace.options.maxTrashcanContents;)this.contents.pop();this.setMinOpenness(HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan)}}}cleanBlockJson(a){function b(c){if(c){delete c.id;delete c.x;delete c.y;delete c.enabled;delete c.disabledReasons;if(c.icons&&c.icons.comment){var d=c.icons.comment;delete d.height;delete d.width;delete d.pinned}d=c.inputs;for(var e in d){var f=d[e];const g=f.block;f=f.shadow;g&&
2275
+ b(g);f&&b(f)}c.next&&(e=c.next,c=e.block,e=e.shadow,c&&b(c),e&&b(e))}}a=JSON.parse(JSON.stringify(a));b(a);return Object.assign({},{kind:"BLOCK"},a)}},WIDTH$$module$build$src$core$trashcan=47,BODY_HEIGHT$$module$build$src$core$trashcan=44,LID_HEIGHT$$module$build$src$core$trashcan=16,MARGIN_VERTICAL$$module$build$src$core$trashcan=20,MARGIN_HORIZONTAL$$module$build$src$core$trashcan=20,MARGIN_HOTSPOT$$module$build$src$core$trashcan=10,SPRITE_LEFT$$module$build$src$core$trashcan=0,SPRITE_TOP$$module$build$src$core$trashcan=
2276
+ 32,HAS_BLOCKS_LID_ANGLE$$module$build$src$core$trashcan=.1,ANIMATION_LENGTH$$module$build$src$core$trashcan=80,ANIMATION_FRAMES$$module$build$src$core$trashcan=4,OPACITY_MIN$$module$build$src$core$trashcan=.4,OPACITY_MAX$$module$build$src$core$trashcan=.8,MAX_LID_ANGLE$$module$build$src$core$trashcan=45,module$build$src$core$trashcan={};module$build$src$core$trashcan.Trashcan=Trashcan$$module$build$src$core$trashcan;var stashedCopyData$$module$build$src$core$clipboard=null,stashedWorkspace$$module$build$src$core$clipboard=null,stashedCoordinates$$module$build$src$core$clipboard=void 0,module$build$src$core$clipboard={};module$build$src$core$clipboard.BlockPaster=BlockPaster$$module$build$src$core$clipboard$block_paster;module$build$src$core$clipboard.copy=copy$$module$build$src$core$clipboard;module$build$src$core$clipboard.getLastCopiedData=getLastCopiedData$$module$build$src$core$clipboard;
1545
2277
  module$build$src$core$clipboard.getLastCopiedLocation=getLastCopiedLocation$$module$build$src$core$clipboard;module$build$src$core$clipboard.getLastCopiedWorkspace=getLastCopiedWorkspace$$module$build$src$core$clipboard;module$build$src$core$clipboard.paste=paste$$module$build$src$core$clipboard;module$build$src$core$clipboard.registry=module$build$src$core$clipboard$registry;module$build$src$core$clipboard.setLastCopiedData=setLastCopiedData$$module$build$src$core$clipboard;
1546
2278
  module$build$src$core$clipboard.setLastCopiedLocation=setLastCopiedLocation$$module$build$src$core$clipboard;module$build$src$core$clipboard.setLastCopiedWorkspace=setLastCopiedWorkspace$$module$build$src$core$clipboard;var module$build$src$core$comments={};module$build$src$core$comments.CollapseCommentBarButton=CollapseCommentBarButton$$module$build$src$core$comments$collapse_comment_bar_button;module$build$src$core$comments.CommentBarButton=CommentBarButton$$module$build$src$core$comments$comment_bar_button;module$build$src$core$comments.CommentEditor=CommentEditor$$module$build$src$core$comments$comment_editor;module$build$src$core$comments.CommentView=CommentView$$module$build$src$core$comments$comment_view;
1547
2279
  module$build$src$core$comments.DeleteCommentBarButton=DeleteCommentBarButton$$module$build$src$core$comments$delete_comment_bar_button;module$build$src$core$comments.RenderedWorkspaceComment=RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment;module$build$src$core$comments.WorkspaceComment=WorkspaceComment$$module$build$src$core$comments$workspace_comment;var module$build$src$core$interfaces$i_copyable={};module$build$src$core$interfaces$i_copyable.isCopyable=isCopyable$$module$build$src$core$interfaces$i_copyable;var names$$module$build$src$core$shortcut_items;
1548
2280
  (function(a){a.ESCAPE="escape";a.DELETE="delete";a.COPY="copy";a.CUT="cut";a.PASTE="paste";a.UNDO="undo";a.REDO="redo";a.MENU="menu";a.FOCUS_WORKSPACE="focus_workspace";a.FOCUS_TOOLBOX="focus_toolbox";a.START_MOVE="start_move";a.START_MOVE_STACK="start_move_stack";a.FINISH_MOVE="finish_move";a.ABORT_MOVE="abort_move";a.MOVE_UP="move_up";a.MOVE_DOWN="move_down";a.MOVE_LEFT="move_left";a.MOVE_RIGHT="move_right";a.NAVIGATE_RIGHT="right";a.NAVIGATE_LEFT="left";a.NAVIGATE_UP="up";a.NAVIGATE_DOWN="down";
1549
- a.DISCONNECT="disconnect";a.NEXT_STACK="next_stack";a.PREVIOUS_STACK="previous_stack";a.INFORMATION="information";a.PERFORM_ACTION="perform_action"})(names$$module$build$src$core$shortcut_items||(names$$module$build$src$core$shortcut_items={}));var resolveWorkspace$$module$build$src$core$shortcut_items=a=>{if(a.isFlyout){const c=a.targetWorkspace;if(c)return resolveWorkspace$$module$build$src$core$shortcut_items(c)}let b;return(b=a.getRootWorkspace())!=null?b:a};registerDefaultShortcuts$$module$build$src$core$shortcut_items();
1550
- registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items();registerScreenReaderShortcuts$$module$build$src$core$shortcut_items();var module$build$src$core$shortcut_items={};module$build$src$core$shortcut_items.names=names$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerArrowNavigation=registerArrowNavigation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCopy=registerCopy$$module$build$src$core$shortcut_items;
1551
- module$build$src$core$shortcut_items.registerCut=registerCut$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDefaultShortcuts=registerDefaultShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDelete=registerDelete$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDisconnectBlock=registerDisconnectBlock$$module$build$src$core$shortcut_items;
2281
+ a.DISCONNECT="disconnect";a.NEXT_STACK="next_stack";a.PREVIOUS_STACK="previous_stack";a.INFORMATION="information";a.PERFORM_ACTION="perform_action";a.DUPLICATE="duplicate";a.CLEANUP="cleanup"})(names$$module$build$src$core$shortcut_items||(names$$module$build$src$core$shortcut_items={}));
2282
+ var resolveWorkspace$$module$build$src$core$shortcut_items=a=>{if(a.isFlyout){const c=a.targetWorkspace;if(c)return resolveWorkspace$$module$build$src$core$shortcut_items(c)}let b;return(b=a.getRootWorkspace())!=null?b:a};registerDefaultShortcuts$$module$build$src$core$shortcut_items();registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items();registerScreenReaderShortcuts$$module$build$src$core$shortcut_items();var module$build$src$core$shortcut_items={};
2283
+ module$build$src$core$shortcut_items.names=names$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerArrowNavigation=registerArrowNavigation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCleanup=registerCleanup$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCopy=registerCopy$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCut=registerCut$$module$build$src$core$shortcut_items;
2284
+ module$build$src$core$shortcut_items.registerDefaultShortcuts=registerDefaultShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDelete=registerDelete$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDisconnectBlock=registerDisconnectBlock$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDuplicate=registerDuplicate$$module$build$src$core$shortcut_items;
1552
2285
  module$build$src$core$shortcut_items.registerEscape=registerEscape$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusToolbox=registerFocusToolbox$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusWorkspace=registerFocusWorkspace$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerKeyboardNavigationShortcuts=registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items;
1553
2286
  module$build$src$core$shortcut_items.registerMovementShortcuts=registerMovementShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerPaste=registerPaste$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerPerformAction=registerPerformAction$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerRedo=registerRedo$$module$build$src$core$shortcut_items;
1554
2287
  module$build$src$core$shortcut_items.registerScreenReaderShortcuts=registerScreenReaderShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerShowContextMenu=registerShowContextMenu$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerStackNavigation=registerStackNavigation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerUndo=registerUndo$$module$build$src$core$shortcut_items;
@@ -1593,11 +2326,11 @@ a.flipRtl&&(this.flipRtl=a.flipRtl);a.alt&&(this.altText=replaceMessageReference
1593
2326
  this.clickHandler(this)}setOnClickHandler(a){this.clickHandler=a}getText_(){return this.altText}static fromJson(a){if(!a.src||!a.width||!a.height)throw Error("src, width, and height values for an image field arerequired. The width and height must be non-zero.");return new this(a.src,a.width,a.height,void 0,void 0,void 0,a)}};FieldImage$$module$build$src$core$field_image.Y_PADDING=1;register$$module$build$src$core$field_registry("field_image",FieldImage$$module$build$src$core$field_image);
1594
2327
  FieldImage$$module$build$src$core$field_image.prototype.DEFAULT_VALUE="";var module$build$src$core$field_image={};module$build$src$core$field_image.FieldImage=FieldImage$$module$build$src$core$field_image;var MINIMUM_WIDTH$$module$build$src$core$field_input=14,FieldInput$$module$build$src$core$field_input=class extends Field$$module$build$src$core$field{set size_(a){super.size_=a}get size_(){const a=super.size_;a.width<MINIMUM_WIDTH$$module$build$src$core$field_input&&(a.width=MINIMUM_WIDTH$$module$build$src$core$field_input);return a}constructor(a,b,c){super(Field$$module$build$src$core$field.SKIP_SETUP);this.spellcheck_=!0;this.htmlInput_=null;this.isTextValid_=this.isBeingEdited_=!1;this.onInputWrapper=
1595
2328
  this.onKeyDownWrapper=this.valueWhenEditorWasOpened_=null;this.fullBlockClickTarget_=!1;this.workspace_=null;this.SERIALIZABLE=!0;a!==Field$$module$build$src$core$field.SKIP_SETUP&&(c&&this.configure_(c),this.setValue(a),b&&this.setValidator(b))}configure_(a){super.configure_(a);a.spellcheck!==void 0&&(this.spellcheck_=a.spellcheck)}initView(){if(!this.getSourceBlock())throw new UnattachedFieldError$$module$build$src$core$field;super.initView();this.isFullBlockField()&&(this.clickTarget_=this.sourceBlock_.getSvgRoot());
1596
- this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyInputField")}isFullBlockField(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;let b;return this.fullBlockClickTarget_=!((b=this.getConstants())==null||!b.FULL_BLOCK_FIELDS)&&a.isSimpleReporter()}doValueInvalid_(a,b=!0){this.isBeingEdited_&&(this.isDirty_=!0,this.isTextValid_=!1,a=this.value_,this.value_=this.valueWhenEditorWasOpened_,this.sourceBlock_&&isEnabled$$module$build$src$core$events$utils()&&
1597
- this.value_!==a&&b&&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,a,this.value_)))}doValueUpdate_(a){this.isTextValid_=this.isDirty_=!0;this.value_=a}applyColour(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.getConstants().FULL_BLOCK_FIELDS&&this.fieldGroup_&&(!this.isFullBlockField()&&this.borderRect_?
1598
- (this.borderRect_.style.display="block",this.borderRect_.setAttribute("stroke",a.getColourTertiary())):(this.borderRect_.style.display="none",a.pathObject.svgPath.setAttribute("fill",this.getConstants().FIELD_BORDER_RECT_COLOUR)))}getSize(){let a;if((a=this.getConstants())==null?0:a.FULL_BLOCK_FIELDS)this.render_(),this.isDirty_=!1;return super.getSize()}onLocationChange(){this.isBeingEdited_&&this.resizeEditor_()}render_(){super.render_();if(this.isBeingEdited_){var a=this.htmlInput_;this.isTextValid_?
1599
- (removeClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID,!1)):(addClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID,!0))}a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.getConstants().FULL_BLOCK_FIELDS&&a.applyColour()}setSpellcheck(a){a!==
1600
- this.spellcheck_&&(this.spellcheck_=a,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))}showEditor_(a,b=!1,c=!0){this.workspace_=this.sourceBlock_.workspace;!b&&this.workspace_.options.modalInputs&&(MOBILE$$module$build$src$core$utils$useragent||ANDROID$$module$build$src$core$utils$useragent||IPAD$$module$build$src$core$utils$useragent)?this.showPromptEditor():this.showInlineEditor(b,c)}showPromptEditor(){prompt$$module$build$src$core$dialog($.Msg$$module$build$src$core$msg.CHANGE_VALUE_TITLE,
2329
+ this.fieldGroup_&&addClass$$module$build$src$core$utils$dom(this.fieldGroup_,"blocklyInputField");this.recomputeAriaContext()}isFullBlockField(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;let b;return this.fullBlockClickTarget_=!((b=this.getConstants())==null||!b.FULL_BLOCK_FIELDS)&&a.isSimpleReporter()}doValueInvalid_(a,b=!0){this.isBeingEdited_&&(this.isDirty_=!0,this.isTextValid_=!1,a=this.value_,this.value_=this.valueWhenEditorWasOpened_,this.sourceBlock_&&
2330
+ isEnabled$$module$build$src$core$events$utils()&&this.value_!==a&&b&&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,a,this.value_)));this.recomputeAriaContext()}doValueUpdate_(a){this.isTextValid_=this.isDirty_=!0;this.value_=a;this.recomputeAriaContext()}applyColour(){const a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;
2331
+ this.getConstants().FULL_BLOCK_FIELDS&&this.fieldGroup_&&(!this.isFullBlockField()&&this.borderRect_?(this.borderRect_.style.display="block",this.borderRect_.setAttribute("stroke",a.getColourTertiary())):(this.borderRect_.style.display="none",a.pathObject.svgPath.setAttribute("fill",this.getConstants().FIELD_BORDER_RECT_COLOUR)))}getSize(){let a;if((a=this.getConstants())==null?0:a.FULL_BLOCK_FIELDS)this.render_(),this.isDirty_=!1;return super.getSize()}onLocationChange(){this.isBeingEdited_&&this.resizeEditor_()}render_(){super.render_();
2332
+ if(this.isBeingEdited_){var a=this.htmlInput_;this.isTextValid_?(removeClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID,!1)):(addClass$$module$build$src$core$utils$dom(a,"blocklyInvalidInput"),setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.INVALID,!0))}a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;this.getConstants().FULL_BLOCK_FIELDS&&
2333
+ a.applyColour()}setSpellcheck(a){a!==this.spellcheck_&&(this.spellcheck_=a,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))}showEditor_(a,b=!1,c=!0){this.workspace_=this.sourceBlock_.workspace;!b&&this.workspace_.options.modalInputs&&(MOBILE$$module$build$src$core$utils$useragent||ANDROID$$module$build$src$core$utils$useragent||IPAD$$module$build$src$core$utils$useragent)?this.showPromptEditor():this.showInlineEditor(b,c)}showPromptEditor(){prompt$$module$build$src$core$dialog($.Msg$$module$build$src$core$msg.CHANGE_VALUE_TITLE,
1601
2334
  this.getText(),a=>{a!==null&&this.setValue(this.getValueFromEditorText_(a));this.onFinishEditing_(this.value_)})}showInlineEditor(a,b){const c=this.getSourceBlock();if(!c)throw new UnattachedFieldError$$module$build$src$core$field;show$$module$build$src$core$widgetdiv(this,c.RTL,this.widgetDispose_.bind(this),this.workspace_,b);this.htmlInput_=this.widgetCreate_();this.isBeingEdited_=!0;this.valueWhenEditorWasOpened_=this.value_;a||(this.htmlInput_.focus({preventScroll:!0}),this.htmlInput_.select())}widgetCreate_(){var a=
1602
2335
  this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;$.setGroup$$module$build$src$core$events$utils(!0);const b=getDiv$$module$build$src$core$widgetdiv();var c=this.getClickTarget_();if(!c)throw Error("A click target has not been set.");addClass$$module$build$src$core$utils$dom(c,"blocklyEditing");c=document.createElement("input");c.className="blocklyHtmlInput";c.setAttribute("spellcheck",this.spellcheck_);const d=this.workspace_.getAbsoluteScale();var e=this.getConstants().FIELD_TEXT_FONTSIZE*
1603
2336
  d+"pt";b.style.fontSize=e;c.style.fontSize=e;e=FieldInput$$module$build$src$core$field_input.BORDERRADIUS*d+"px";this.isFullBlockField()&&(e=this.getScaledBBox(),e=(e.bottom-e.top)/2+"px",a=a.getParent()?a.getParent().getColourTertiary():this.sourceBlock_.getColourTertiary(),c.style.border=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=
@@ -1609,7 +2342,9 @@ e!==this.getSourceBlock();b=this;do{let e,f;b=a.shiftKey?(e=c)==null?void 0:e.ge
1609
2342
  $.getFocusManager$$module$build$src$core$focus_manager().focusNode(a):$.getFocusManager$$module$build$src$core$focus_manager().focusNode(b),b.showEditor())}}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_,
1610
2343
  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(()=>{var a=this.getSourceBlock();if(!a)throw new UnattachedFieldError$$module$build$src$core$field;const b=getDiv$$module$build$src$core$widgetdiv();var c=this.getScaledBBox();b.style.width=c.right-c.left+"px";b.style.height=c.bottom-c.top+"px";a=a.RTL?c.right-
1611
2344
  b.offsetWidth:c.left;c=c.top;var d=b==null?void 0:b.parentElement;d&&(d=d.getBoundingClientRect(),a-=d.left+window.scrollX,c-=d.top+window.scrollY);b.style.left=`${a}px`;b.style.top=`${c}px`})}repositionForWindowResize(){let a;const b=(a=this.getSourceBlock())==null?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_();
1612
- return!0}positionTextElement_(a,b){const c=a*2+b;super.positionTextElement_(a+(c<MINIMUM_WIDTH$$module$build$src$core$field_input?(MINIMUM_WIDTH$$module$build$src$core$field_input-c)/2:0),b)}getText_(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value: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 a===void 0?null:`${a}`}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};
2345
+ return!0}positionTextElement_(a,b){const c=a*2+b;super.positionTextElement_(a+(c<MINIMUM_WIDTH$$module$build$src$core$field_input?(MINIMUM_WIDTH$$module$build$src$core$field_input-c)/2:0),b)}getText_(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null}getEditorText_(a){return`${a}`}getValueFromEditorText_(a){return a}getAriaTypeName(){return this.ariaTypeName||$.Msg$$module$build$src$core$msg.ARIA_TYPE_FIELD_INPUT}getAriaValue(){return this.getText()||$.Msg$$module$build$src$core$msg.FIELD_LABEL_EMPTY}recomputeAriaContext(){const a=
2346
+ this.getClickTarget_();if(a){var b;if((b=this.getSourceBlock())==null?0:b.isInFlyout)setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.HIDDEN,!0);else{setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.HIDDEN,!1);setRole$$module$build$src$core$utils$aria(a,Role$$module$build$src$core$utils$aria.BUTTON);b=this.computeAriaLabel(!1);var c;if((c=this.isCurrentlyEditable)==null?0:c.call(this))b=$.Msg$$module$build$src$core$msg.FIELD_LABEL_EDIT_PREFIX.replace("%1",
2347
+ b);setState$$module$build$src$core$utils$aria(a,State$$module$build$src$core$utils$aria.LABEL,b)}}}};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 a===void 0?null:`${a}`}static fromJson(a){return new this(replaceMessageReferences$$module$build$src$core$utils$parsing(a.text),void 0,a)}};
1613
2348
  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={};
1614
2349
  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?a.hat==="cap":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=
1615
2350
  {};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=
@@ -1633,10 +2368,10 @@ e?e.pathObject.outputShapeType:a.shape.type;return a==null||e&&e.outputConnectio
1633
2368
  this.constants_.SMALL_PADDING:0}finalizeVerticalAlignment_(){if(!this.outputConnection)for(let d=2;d<this.rows.length-1;d+=2){const e=this.rows[d-1],f=this.rows[d],g=this.rows[d+1];var a=d===2,b=d+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!g.precedesStatement;if(a?this.topRow.hasPreviousConnection:e.followsStatement){var c=f.elements[1];c=f.elements.length===3&&c instanceof Field$$module$build$src$core$renderers$measurables$field&&(c.field instanceof FieldLabel$$module$build$src$core$field_label||
1634
2369
  c.field instanceof FieldImage$$module$build$src$core$field_image);if(!a&&c)e.height-=this.constants_.SMALL_PADDING,g.height-=this.constants_.SMALL_PADDING,f.height-=this.constants_.MEDIUM_PADDING;else if(!a&&!b)e.height+=this.constants_.SMALL_PADDING;else if(b){a=!1;for(b=0;b<f.elements.length;b++)if(c=f.elements[b],Types$$module$build$src$core$renderers$measurables$types.isInlineInput(c)&&c.connectedBlock&&!c.connectedBlock.isShadow()&&c.connectedBlock.getHeightWidth().height>=40){a=!0;break}a&&
1635
2370
  (e.height-=this.constants_.SMALL_PADDING,g.height-=this.constants_.SMALL_PADDING)}}}}finalize_(){this.finalizeOutputConnection_();this.finalizeHorizontalAlignment_();this.finalizeVerticalAlignment_();super.finalize_();this.rightSide&&(this.widthWithChildren+=this.rightSide.width)}},module$build$src$core$renderers$zelos$info={};module$build$src$core$renderers$zelos$info.RenderInfo=RenderInfo$$module$build$src$core$renderers$zelos$info;var PathObject$$module$build$src$core$renderers$zelos$path_object=class extends PathObject$$module$build$src$core$renderers$common$path_object{constructor(a,b,c){super(a,b,c);this.svgPathSelected=null;this.outlines=new Map;this.remainingOutlines=new Set;this.outputShapeType=null;this.constants=c}setPath(a){super.setPath(a);this.svgPathSelected&&this.svgPathSelected.setAttribute("d",a)}applyColour(a){super.applyColour(a);const b=a.getParent();a.isShadow()&&b&&this.svgPath.setAttribute("stroke",b.getColourTertiary());
1636
- for(const c of this.outlines.values())c.setAttribute("fill",this.style.colourTertiary)}flipRTL(){super.flipRTL();for(const a of this.outlines.values())a.setAttribute("transform","scale(-1 1)")}updateSelected(a){this.setClass_("blocklySelected",a);a?this.svgPathSelected||(this.svgPathSelected=this.svgPath.cloneNode(!0),this.svgPathSelected.classList.add("blocklyPathSelected"),removeClass$$module$build$src$core$utils$dom(this.svgPathSelected,FocusManager$$module$build$src$core$focus_manager.ACTIVE_FOCUS_NODE_CSS_CLASS_NAME),
1637
- removeClass$$module$build$src$core$utils$dom(this.svgPathSelected,FocusManager$$module$build$src$core$focus_manager.PASSIVE_FOCUS_NODE_CSS_CLASS_NAME),this.svgPathSelected.removeAttribute("tabindex"),this.svgPathSelected.removeAttribute("id"),this.svgRoot.appendChild(this.svgPathSelected)):this.svgPathSelected&&(this.svgRoot.removeChild(this.svgPathSelected),this.svgPathSelected=null)}beginDrawing(){this.remainingOutlines.clear();for(const a of this.outlines.keys())this.remainingOutlines.add(a)}endDrawing(){if(this.remainingOutlines.size)for(const a of this.remainingOutlines)this.removeOutlinePath(a);
1638
- this.remainingOutlines.clear()}setOutlinePath(a,b){a=this.getOutlinePath(a);a.setAttribute("d",b);a.setAttribute("fill",this.style.colourTertiary)}getOutlinePath(a){this.outlines.has(a)||this.outlines.set(a,createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyOutlinePath",d:""},this.svgRoot));this.remainingOutlines.delete(a);return this.outlines.get(a)}removeOutlinePath(a){let b,c;(b=this.outlines.get(a))==null||(c=b.parentNode)==null||c.removeChild(this.outlines.get(a));
1639
- this.outlines.delete(a)}},module$build$src$core$renderers$zelos$path_object={};module$build$src$core$renderers$zelos$path_object.PathObject=PathObject$$module$build$src$core$renderers$zelos$path_object;var Renderer$$module$build$src$core$renderers$zelos$renderer=class extends Renderer$$module$build$src$core$renderers$common$renderer{constructor(a){super(a)}makeConstants_(){return new ConstantProvider$$module$build$src$core$renderers$zelos$constants}makeRenderInfo_(a){return new RenderInfo$$module$build$src$core$renderers$zelos$info(this,a)}makeDrawer_(a,b){return new Drawer$$module$build$src$core$renderers$zelos$drawer(a,b)}makePathObject(a,b){return new PathObject$$module$build$src$core$renderers$zelos$path_object(a,
2371
+ for(const c of this.outlines.values())c.setAttribute("fill",this.style.colourTertiary)}flipRTL(){super.flipRTL();for(const a of this.outlines.values())a.setAttribute("transform","scale(-1 1)")}updateSelected(a){this.setClass_("blocklySelected",a);a?this.svgPathSelected||(this.svgPathSelected=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyPath blocklyPathSelected",stroke:this.svgPath.getAttribute("stroke")||"",fill:this.svgPath.getAttribute("fill")||
2372
+ "",d:this.svgPath.getAttribute("d")||"",role:Role$$module$build$src$core$utils$aria.PRESENTATION},this.svgRoot),this.svgRoot.appendChild(this.svgPathSelected)):this.svgPathSelected&&(this.svgRoot.removeChild(this.svgPathSelected),this.svgPathSelected=null)}beginDrawing(){this.remainingOutlines.clear();for(const a of this.outlines.keys())this.remainingOutlines.add(a)}endDrawing(){if(this.remainingOutlines.size)for(const a of this.remainingOutlines)this.removeOutlinePath(a);this.remainingOutlines.clear()}setOutlinePath(a,
2373
+ b){a=this.getOutlinePath(a);a.setAttribute("d",b);a.setAttribute("fill",this.style.colourTertiary)}getOutlinePath(a){this.outlines.has(a)||this.outlines.set(a,createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.PATH,{"class":"blocklyOutlinePath",d:""},this.svgRoot));this.remainingOutlines.delete(a);return this.outlines.get(a)}removeOutlinePath(a){let b,c;(b=this.outlines.get(a))==null||(c=b.parentNode)==null||c.removeChild(this.outlines.get(a));this.outlines.delete(a)}},
2374
+ module$build$src$core$renderers$zelos$path_object={};module$build$src$core$renderers$zelos$path_object.PathObject=PathObject$$module$build$src$core$renderers$zelos$path_object;var Renderer$$module$build$src$core$renderers$zelos$renderer=class extends Renderer$$module$build$src$core$renderers$common$renderer{constructor(a){super(a)}makeConstants_(){return new ConstantProvider$$module$build$src$core$renderers$zelos$constants}makeRenderInfo_(a){return new RenderInfo$$module$build$src$core$renderers$zelos$info(this,a)}makeDrawer_(a,b){return new Drawer$$module$build$src$core$renderers$zelos$drawer(a,b)}makePathObject(a,b){return new PathObject$$module$build$src$core$renderers$zelos$path_object(a,
1640
2375
  b,this.getConstants())}getConstants(){return this.constants_}shouldHighlightConnection(a){return super.shouldHighlightConnection(a)||a.type===ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE}};register$$module$build$src$core$renderers$common$block_rendering("zelos",Renderer$$module$build$src$core$renderers$zelos$renderer);var module$build$src$core$renderers$zelos$renderer={};module$build$src$core$renderers$zelos$renderer.Renderer=Renderer$$module$build$src$core$renderers$zelos$renderer;var InsertionMarkerPreviewer$$module$build$src$core$insertion_marker_previewer=class{constructor(a){this.staticConn=this.draggedConn=this.markerConn=this.fadedBlock=null;this.workspace=a.workspace}previewReplacement(a,b,c){$.disable$$module$build$src$core$events$utils();try{this.hidePreview(),this.fadedBlock=c,c.fadeForReplacement(!0),this.workspace.getRenderer().shouldHighlightConnection(b)&&(b.highlight(),this.staticConn=b)}finally{$.enable$$module$build$src$core$events$utils()}}previewConnection(a,
1641
2376
  b){if(a!==this.draggedConn||b!==this.staticConn){$.disable$$module$build$src$core$events$utils();try{this.hidePreview(),this.shouldUseMarkerPreview(a,b)&&(this.markerConn=this.previewMarker(a,b)),this.workspace.getRenderer().shouldHighlightConnection(b)&&b.highlight(),this.workspace.getRenderer().shouldHighlightConnection(a)&&a.highlight(),this.draggedConn=a,this.staticConn=b}finally{$.enable$$module$build$src$core$events$utils()}}}shouldUseMarkerPreview(a,b){return b.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||
1642
2377
  b.type===ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT||!(this.workspace.getRenderer()instanceof Renderer$$module$build$src$core$renderers$zelos$renderer)}previewMarker(a,b){const c=a.getSourceBlock(),d=this.createInsertionMarker(c),e=this.getMatchingConnection(c,d,a);if(!e)return null;d.queueRender();triggerQueuedRenders$$module$build$src$core$render_management();e.connect(b);const f={x:b.x-e.x,y:b.y-e.y},g=e.getOffsetInBlock().clone();finishQueuedRenders$$module$build$src$core$render_management().then(()=>
@@ -1694,70 +2429,7 @@ this.draggable.workspace.getDragTarget(a))&&this.draggable.workspace.getComponen
1694
2429
  (c=!0,this.draggable.revertDrag());const d=isDeletable$$module$build$src$core$interfaces$i_deletable(this.draggable)&&this.wouldDeleteDraggable(this.draggable.getRelativeToSurfaceXY(),this.draggable);d&&isDeletable$$module$build$src$core$interfaces$i_deletable(this.draggable)?(this.draggable.endDrag(a,DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE),$.setGroup$$module$build$src$core$events$utils(b),this.draggable.dispose()):this.draggable.endDrag(a,c?DragDisposition$$module$build$src$core$interfaces$i_draggable.REVERT:
1695
2430
  DragDisposition$$module$build$src$core$interfaces$i_draggable.COMMIT);$.setGroup$$module$build$src$core$events$utils(!1);!d&&isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(this.draggable)&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.draggable)}onDragRevert(){this.draggable.revertDrag();isFocusableNode$$module$build$src$core$interfaces$i_focusable_node(this.draggable)&&$.getFocusManager$$module$build$src$core$focus_manager().focusNode(this.draggable)}shouldReturnToStart(a,
1696
2431
  b){return(a=this.draggable.workspace.getDragTarget(a))?a.shouldPreventMove(b):!1}pixelsToWorkspaceUnits(a){a=new Coordinate$$module$build$src$core$utils$coordinate(a.x/this.draggable.workspace.scale,a.y/this.draggable.workspace.scale);this.draggable.workspace.isMutator&&a.scale(1/this.draggable.workspace.options.parentWorkspace.scale);return a}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.BLOCK_DRAGGER,DEFAULT$$module$build$src$core$registry,Dragger$$module$build$src$core$dragging$dragger);
1697
- var module$build$src$core$dragging$dragger={};module$build$src$core$dragging$dragger.Dragger=Dragger$$module$build$src$core$dragging$dragger;var module$build$src$core$dragging={};module$build$src$core$dragging.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;module$build$src$core$dragging.BubbleDragStrategy=BubbleDragStrategy$$module$build$src$core$dragging$bubble_drag_strategy;module$build$src$core$dragging.CommentDragStrategy=CommentDragStrategy$$module$build$src$core$dragging$comment_drag_strategy;module$build$src$core$dragging.Dragger=Dragger$$module$build$src$core$dragging$dragger;var BlockDrag$$module$build$src$core$events$events_block_drag=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.BLOCK_DRAG;a&&(this.blockId=a.id,this.isStart=b,this.blocks=c)}toJson(){const a=super.toJson();if(this.isStart===void 0)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(this.blockId===
1698
- void 0)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");a.isStart=this.isStart;a.blockId=this.blockId;a.blocks=this.blocks;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new BlockDrag$$module$build$src$core$events$events_block_drag);b.isStart=a.isStart;b.blockId=a.blockId;b.blocks=a.blocks;return b}};
1699
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_DRAG,BlockDrag$$module$build$src$core$events$events_block_drag);var module$build$src$core$events$events_block_drag={};module$build$src$core$events$events_block_drag.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;var BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a,b,c,d){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE;this.recordUndo=!1;a&&(this.name=b,this.oldValue=c,this.newValue=d)}toJson(){const a=super.toJson();if(!this.name)throw Error("The changed field name is undefined. Either pass a name to the constructor, or call fromJson.");
1700
- a.name=this.name;a.oldValue=this.oldValue;a.newValue=this.newValue;return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change);b.name=a.name;b.oldValue=a.oldValue;b.newValue=a.newValue;return b}isNull(){return this.oldValue===this.newValue}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");
1701
- b=b.getBlockById(this.blockId);if(!b)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");a=a?this.newValue:this.oldValue;(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE,BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change);
1702
- var module$build$src$core$events$events_block_field_intermediate_change={};module$build$src$core$events$events_block_field_intermediate_change.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change;var BlockMove$$module$build$src$core$events$events_block_move=class extends BlockBase$$module$build$src$core$events$events_block_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.BLOCK_MOVE;a&&(a.isShadow()&&(this.recordUndo=!1),a=this.currentLocation(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)}toJson(){const a=super.toJson();a.oldParentId=this.oldParentId;a.oldInputName=this.oldInputName;this.oldCoordinate&&(a.oldCoordinate=
1703
- `${Math.round(this.oldCoordinate.x)}, ${Math.round(this.oldCoordinate.y)}`);a.newParentId=this.newParentId;a.newInputName=this.newInputName;this.newCoordinate&&(a.newCoordinate=`${Math.round(this.newCoordinate.x)}, ${Math.round(this.newCoordinate.y)}`);this.reason&&(a.reason=this.reason);this.recordUndo||(a.recordUndo=this.recordUndo);return a}static fromJson(a,b,c){b=BlockBase$$module$build$src$core$events$events_block_base.fromJson(a,b,c!=null?c:new BlockMove$$module$build$src$core$events$events_block_move);
1704
- b.oldParentId=a.oldParentId;b.oldInputName=a.oldInputName;a.oldCoordinate&&(c=a.oldCoordinate.split(","),b.oldCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));b.newParentId=a.newParentId;b.newInputName=a.newInputName;a.newCoordinate&&(c=a.newCoordinate.split(","),b.newCoordinate=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1])));a.reason!==void 0&&(b.reason=a.reason);a.recordUndo!==void 0&&(b.recordUndo=a.recordUndo);return b}recordNew(){const a=
1705
- this.currentLocation();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate}setReason(a){this.reason=a}currentLocation(){var a=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var b=a.getBlockById(this.blockId);if(!b)throw Error("The block associated with the block move event could not be found");a={};const c=b.getParent();if(c){if(a.parentId=c.id,b=c.getInputWithBlock(b))a.inputName=
1706
- b.name}else a.coordinate=b.getRelativeToSurfaceXY();return a}isNull(){return this.oldParentId===this.newParentId&&this.oldInputName===this.newInputName&&Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate,this.newCoordinate)}run(a){var b=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:
1707
- this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;if(d){var f=b.getBlockById(d);if(!f){console.warn("Can't connect to non-existent block: "+d);return}}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y,this.reason);else{b=c.outputConnection;if(!b||c.previousConnection&&c.previousConnection.isConnected())b=c.previousConnection;let g,h;c=(h=b)==null?void 0:h.type;if(e){if(c=f.getInput(e))g=c.connection}else c===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT&&
1708
- (g=f.nextConnection);g&&b?b.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BLOCK_MOVE,BlockMove$$module$build$src$core$events$events_block_move);var module$build$src$core$events$events_block_move={};module$build$src$core$events$events_block_move.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;var BubbleOpen$$module$build$src$core$events$events_bubble_open=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.BUBBLE_OPEN;a&&(this.blockId=a.id,this.isOpen=b,this.bubbleType=c)}toJson(){const a=super.toJson();if(this.isOpen===void 0)throw Error("Whether this event is for opening the bubble is undefined. Either pass the value to the constructor, or call fromJson");if(!this.bubbleType)throw Error("The type of bubble is undefined. Either pass the value to the constructor, or call fromJson");
1709
- a.isOpen=this.isOpen;a.bubbleType=this.bubbleType;a.blockId=this.blockId||"";return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new BubbleOpen$$module$build$src$core$events$events_bubble_open);b.isOpen=a.isOpen;b.bubbleType=a.bubbleType;b.blockId=a.blockId;return b}},BubbleType$$module$build$src$core$events$events_bubble_open;
1710
- (function(a){a.MUTATOR="mutator";a.COMMENT="comment";a.WARNING="warning"})(BubbleType$$module$build$src$core$events$events_bubble_open||(BubbleType$$module$build$src$core$events$events_bubble_open={}));register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.BUBBLE_OPEN,BubbleOpen$$module$build$src$core$events$events_bubble_open);var module$build$src$core$events$events_bubble_open={};
1711
- module$build$src$core$events$events_bubble_open.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events_bubble_open.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;var CommentBase$$module$build$src$core$events$events_comment_base=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.isBlank=!a;a&&(this.commentId=a.id,this.workspaceId=a.workspace.id,this.group=$.getGroup$$module$build$src$core$events$utils(),this.recordUndo=getRecordUndo$$module$build$src$core$events$utils())}toJson(){const a=super.toJson();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1712
- a.commentId=this.commentId;return a}static fromJson(a,b,c){b=Abstract$$module$build$src$core$events$events_abstract.fromJson(a,b,c!=null?c:new CommentBase$$module$build$src$core$events$events_comment_base);b.commentId=a.commentId;return b}static CommentCreateDeleteHelper(a,b){const c=a.getEventWorkspace_();if(b){if(!a.json)throw Error("Encountered a comment event without proper json");append$$module$build$src$core$serialization$workspace_comments(a.json,c)}else{if(!a.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1713
- (b=c.getCommentById(a.commentId))?b.dispose():console.warn("Can't delete non-existent comment: "+a.commentId)}}},module$build$src$core$events$events_comment_base={};module$build$src$core$events$events_comment_base.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;var CommentChange$$module$build$src$core$events$events_comment_change=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a,b,c){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_CHANGE;a&&(this.oldContents_=typeof b==="undefined"?"":b,this.newContents_=typeof c==="undefined"?"":c)}toJson(){const a=super.toJson();if(!this.oldContents_)throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");if(!this.newContents_)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");
1714
- a.oldContents=this.oldContents_;a.newContents=this.newContents_;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentChange$$module$build$src$core$events$events_comment_change);b.oldContents_=a.oldContents;b.newContents_=a.newContents;return b}isNull(){return this.oldContents_===this.newContents_}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1715
- if(b=b.getCommentById(this.commentId)){var c=a?this.newContents_:this.oldContents_;if(c===void 0){if(a)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");}b.setText(c)}else console.warn("Can't change non-existent comment: "+this.commentId)}};
1716
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_CHANGE,CommentChange$$module$build$src$core$events$events_comment_change);var module$build$src$core$events$events_comment_change={};module$build$src$core$events$events_comment_change.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;var CommentCollapse$$module$build$src$core$events$events_comment_collapse=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a,b){super(a);this.newCollapsed=b;this.type=EventType$$module$build$src$core$events$type.COMMENT_COLLAPSE}toJson(){const a=super.toJson();if(this.newCollapsed===void 0)throw Error("The new collapse value undefined. Either call recordNew, or call fromJson");a.newCollapsed=this.newCollapsed;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,
1717
- b,c!=null?c:new CommentCollapse$$module$build$src$core$events$events_comment_collapse);b.newCollapsed=a.newCollapsed;return b}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");(b=b.getCommentById(this.commentId))?b.setCollapsed(a?!!this.newCollapsed:!this.newCollapsed):console.warn("Can't collapse or uncollapse non-existent comment: "+this.commentId)}};
1718
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_COLLAPSE,CommentCollapse$$module$build$src$core$events$events_comment_collapse);var module$build$src$core$events$events_comment_collapse={};module$build$src$core$events$events_comment_collapse.CommentCollapse=CommentCollapse$$module$build$src$core$events$events_comment_collapse;var CommentCreate$$module$build$src$core$events$events_comment_create=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_CREATE;a&&(this.json=save$$module$build$src$core$serialization$workspace_comments(a,{addCoordinates:!0}))}toJson(){const a=super.toJson();if(!this.json)throw Error("The comment JSON is undefined. Either pass a block to the constructor, or call fromJson");a.json=this.json;
1719
- return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentCreate$$module$build$src$core$events$events_comment_create);b.json=a.json;return b}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,a)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_CREATE,CommentCreate$$module$build$src$core$events$events_comment_create);
1720
- var module$build$src$core$events$events_comment_create={};module$build$src$core$events$events_comment_create.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create;var CommentDelete$$module$build$src$core$events$events_comment_delete=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_DELETE;a&&(this.json=save$$module$build$src$core$serialization$workspace_comments(a,{addCoordinates:!0}))}run(a){CommentBase$$module$build$src$core$events$events_comment_base.CommentCreateDeleteHelper(this,!a)}toJson(){const a=super.toJson();if(!this.json)throw Error("The comment JSON is undefined. Either pass a block to the constructor, or call fromJson");
1721
- a.json=this.json;return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentDelete$$module$build$src$core$events$events_comment_delete);b.json=a.json;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_DELETE,CommentDelete$$module$build$src$core$events$events_comment_delete);var module$build$src$core$events$events_comment_delete={};
1722
- module$build$src$core$events$events_comment_delete.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;var CommentDrag$$module$build$src$core$events$events_comment_drag=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b){super(a?a.workspace.id:void 0);this.type=EventType$$module$build$src$core$events$type.COMMENT_DRAG;a&&(this.commentId=a.id,this.isStart=b)}toJson(){const a=super.toJson();if(this.isStart===void 0)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(this.commentId===void 0)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1723
- a.isStart=this.isStart;a.commentId=this.commentId;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new CommentDrag$$module$build$src$core$events$events_comment_drag);b.isStart=a.isStart;b.commentId=a.commentId;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_DRAG,CommentDrag$$module$build$src$core$events$events_comment_drag);
1724
- var module$build$src$core$events$events_comment_drag={};module$build$src$core$events$events_comment_drag.CommentDrag=CommentDrag$$module$build$src$core$events$events_comment_drag;var CommentMove$$module$build$src$core$events$events_comment_move=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_MOVE;a&&(this.comment_=a,this.oldCoordinate_=a.getRelativeToSurfaceXY())}recordNew(){if(this.newCoordinate_)throw Error("Tried to record the new position of a comment on the same event twice.");if(!this.comment_)throw Error("The comment is undefined. Pass a comment to the constructor if you want to use the record functionality");
1725
- this.newCoordinate_=this.comment_.getRelativeToSurfaceXY()}setReason(a){this.reason=a}setOldCoordinate(a){this.oldCoordinate_=a}toJson(){const a=super.toJson();if(!this.oldCoordinate_)throw Error("The old comment position is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newCoordinate_)throw Error("The new comment position is undefined. Either call recordNew, or call fromJson");a.oldCoordinate=`${Math.round(this.oldCoordinate_.x)}, ${Math.round(this.oldCoordinate_.y)}`;
1726
- a.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y);return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentMove$$module$build$src$core$events$events_comment_move);c=a.oldCoordinate.split(",");b.oldCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),Number(c[1]));c=a.newCoordinate.split(",");b.newCoordinate_=new Coordinate$$module$build$src$core$utils$coordinate(Number(c[0]),
1727
- Number(c[1]));return b}isNull(){return Coordinate$$module$build$src$core$utils$coordinate.equals(this.oldCoordinate_,this.newCoordinate_)}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){a=a?this.newCoordinate_:this.oldCoordinate_;if(!a)throw Error("Either oldCoordinate_ or newCoordinate_ is undefined. Either pass a comment to the constructor and call recordNew, or call fromJson");
1728
- b.moveTo(a)}else console.warn("Can't move non-existent comment: "+this.commentId)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_MOVE,CommentMove$$module$build$src$core$events$events_comment_move);var module$build$src$core$events$events_comment_move={};module$build$src$core$events$events_comment_move.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;var CommentResize$$module$build$src$core$events$events_comment_resize=class extends CommentBase$$module$build$src$core$events$events_comment_base{constructor(a){super(a);this.type=EventType$$module$build$src$core$events$type.COMMENT_RESIZE;a&&(this.oldSize=a.getSize())}recordCurrentSizeAsNewSize(){if(this.newSize)throw Error("Tried to record the new size of a comment on the same event twice.");var a=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");
1729
- a=a.getCommentById(this.commentId);if(!a)throw Error("The comment associated with the comment resize event could not be found");this.newSize=a.getSize()}toJson(){const a=super.toJson();if(!this.oldSize)throw Error("The old comment size is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newSize)throw Error("The new comment size is undefined. Either call recordCurrentSizeAsNewSize, or call fromJson");a.oldWidth=Math.round(this.oldSize.width);a.oldHeight=Math.round(this.oldSize.height);
1730
- a.newWidth=Math.round(this.newSize.width);a.newHeight=Math.round(this.newSize.height);return a}static fromJson(a,b,c){b=CommentBase$$module$build$src$core$events$events_comment_base.fromJson(a,b,c!=null?c:new CommentResize$$module$build$src$core$events$events_comment_resize);b.oldSize=new Size$$module$build$src$core$utils$size(a.oldWidth,a.oldHeight);b.newSize=new Size$$module$build$src$core$utils$size(a.newWidth,a.newHeight);return b}isNull(){return Size$$module$build$src$core$utils$size.equals(this.oldSize,
1731
- this.newSize)}run(a){var b=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(b=b.getCommentById(this.commentId)){a=a?this.newSize:this.oldSize;if(!a)throw Error("Either oldSize or newSize is undefined. Either pass a comment to the constructor and call recordCurrentSizeAsNewSize, or call fromJson");b.setSize(a)}else console.warn("Can't resize non-existent comment: "+this.commentId)}};
1732
- register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.COMMENT_RESIZE,CommentResize$$module$build$src$core$events$events_comment_resize);var module$build$src$core$events$events_comment_resize={};module$build$src$core$events$events_comment_resize.CommentResize=CommentResize$$module$build$src$core$events$events_comment_resize;var ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select=class extends UiBase$$module$build$src$core$events$events_ui_base{constructor(a,b,c){super(c);this.type=EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT;this.oldItem=a!=null?a:void 0;this.newItem=b!=null?b:void 0}toJson(){const a=super.toJson();a.oldItem=this.oldItem;a.newItem=this.newItem;return a}static fromJson(a,b,c){b=UiBase$$module$build$src$core$events$events_ui_base.fromJson(a,b,c!=null?c:new ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select);
1733
- b.oldItem=a.oldItem;b.newItem=a.newItem;return b}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT,ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select);var module$build$src$core$events$events_toolbox_item_select={};module$build$src$core$events$events_toolbox_item_select.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select;var VarTypeChange$$module$build$src$core$events$events_var_type_change=class extends VarBase$$module$build$src$core$events$events_var_base{constructor(a,b,c){super(a);this.oldType=b;this.newType=c;this.type=EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE}toJson(){const a=super.toJson();if(!this.oldType||!this.newType)throw Error("The variable's types are undefined. Either pass them to the constructor, or call fromJson");a.oldType=this.oldType;a.newType=this.newType;return a}static fromJson(a,
1734
- b,c){b=VarBase$$module$build$src$core$events$events_var_base.fromJson(a,b,c!=null?c:new VarTypeChange$$module$build$src$core$events$events_var_type_change);b.oldType=a.oldType;b.newType=a.newType;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.oldType||!this.newType)throw Error("The variable's types are undefined. Either pass them to the constructor, or call fromJson");const c=
1735
- b.getVariableMap().getVariableById(this.varId);c&&(a?b.getVariableMap().changeVariableType(c,this.newType):b.getVariableMap().changeVariableType(c,this.oldType))}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.VAR_TYPE_CHANGE,VarTypeChange$$module$build$src$core$events$events_var_type_change);var module$build$src$core$events$events_var_type_change={};
1736
- module$build$src$core$events$events_var_type_change.VarTypeChange=VarTypeChange$$module$build$src$core$events$events_var_type_change;var FinishedLoading$$module$build$src$core$events$workspace_events=class extends Abstract$$module$build$src$core$events$events_abstract{constructor(a){super();this.isBlank=!0;this.recordUndo=!1;this.type=EventType$$module$build$src$core$events$type.FINISHED_LOADING;this.isBlank=!!a;a&&(this.workspaceId=a.id)}};register$$module$build$src$core$registry(Type$$module$build$src$core$registry.EVENT,EventType$$module$build$src$core$events$type.FINISHED_LOADING,FinishedLoading$$module$build$src$core$events$workspace_events);
1737
- var module$build$src$core$events$workspace_events={};module$build$src$core$events$workspace_events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events;var BLOCK_DRAG$$module$build$src$core$events$events,BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events,BUBBLE_OPEN$$module$build$src$core$events$events,CHANGE$$module$build$src$core$events$events,CLICK$$module$build$src$core$events$events,COMMENT_CHANGE$$module$build$src$core$events$events,COMMENT_CREATE$$module$build$src$core$events$events,COMMENT_DELETE$$module$build$src$core$events$events,COMMENT_MOVE$$module$build$src$core$events$events,COMMENT_RESIZE$$module$build$src$core$events$events,
1738
- COMMENT_DRAG$$module$build$src$core$events$events,CREATE$$module$build$src$core$events$events,DELETE$$module$build$src$core$events$events,FINISHED_LOADING$$module$build$src$core$events$events,MOVE$$module$build$src$core$events$events,SELECTED$$module$build$src$core$events$events,THEME_CHANGE$$module$build$src$core$events$events,TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events,TRASHCAN_OPEN$$module$build$src$core$events$events,UI$$module$build$src$core$events$events,VAR_CREATE$$module$build$src$core$events$events,
1739
- VAR_DELETE$$module$build$src$core$events$events,VAR_RENAME$$module$build$src$core$events$events,VIEWPORT_CHANGE$$module$build$src$core$events$events,module$build$src$core$events$events;$.BLOCK_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;$.BLOCK_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CREATE;$.BLOCK_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DELETE;
1740
- BLOCK_DRAG$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DRAG;$.BLOCK_MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_MOVE;BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_FIELD_INTERMEDIATE_CHANGE;BUBBLE_OPEN$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BUBBLE_OPEN;
1741
- CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CHANGE;CLICK$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.CLICK;COMMENT_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_CHANGE;COMMENT_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_CREATE;COMMENT_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_DELETE;
1742
- COMMENT_MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_MOVE;COMMENT_RESIZE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_RESIZE;COMMENT_DRAG$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.COMMENT_DRAG;CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_CREATE;DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_DELETE;
1743
- FINISHED_LOADING$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.FINISHED_LOADING;MOVE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.BLOCK_MOVE;SELECTED$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.SELECTED;THEME_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.THEME_CHANGE;TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.TOOLBOX_ITEM_SELECT;
1744
- TRASHCAN_OPEN$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.TRASHCAN_OPEN;UI$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.UI;VAR_CREATE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_CREATE;VAR_DELETE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_DELETE;VAR_RENAME$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VAR_RENAME;
1745
- VIEWPORT_CHANGE$$module$build$src$core$events$events=EventType$$module$build$src$core$events$type.VIEWPORT_CHANGE;module$build$src$core$events$events={};module$build$src$core$events$events.Abstract=Abstract$$module$build$src$core$events$events_abstract;module$build$src$core$events$events.BLOCK_CHANGE=$.BLOCK_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_CREATE=$.BLOCK_CREATE$$module$build$src$core$events$events;
1746
- module$build$src$core$events$events.BLOCK_DELETE=$.BLOCK_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_DRAG=BLOCK_DRAG$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_FIELD_INTERMEDIATE_CHANGE=BLOCK_FIELD_INTERMEDIATE_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.BLOCK_MOVE=$.BLOCK_MOVE$$module$build$src$core$events$events;module$build$src$core$events$events.BUBBLE_OPEN=BUBBLE_OPEN$$module$build$src$core$events$events;
1747
- module$build$src$core$events$events.BUMP_EVENTS=BUMP_EVENTS$$module$build$src$core$events$type;module$build$src$core$events$events.BlockBase=BlockBase$$module$build$src$core$events$events_block_base;module$build$src$core$events$events.BlockChange=BlockChange$$module$build$src$core$events$events_block_change;module$build$src$core$events$events.BlockCreate=BlockCreate$$module$build$src$core$events$events_block_create;module$build$src$core$events$events.BlockDelete=BlockDelete$$module$build$src$core$events$events_block_delete;
1748
- module$build$src$core$events$events.BlockDrag=BlockDrag$$module$build$src$core$events$events_block_drag;module$build$src$core$events$events.BlockFieldIntermediateChange=BlockFieldIntermediateChange$$module$build$src$core$events$events_block_field_intermediate_change;module$build$src$core$events$events.BlockMove=BlockMove$$module$build$src$core$events$events_block_move;module$build$src$core$events$events.BubbleOpen=BubbleOpen$$module$build$src$core$events$events_bubble_open;
1749
- module$build$src$core$events$events.BubbleType=BubbleType$$module$build$src$core$events$events_bubble_open;module$build$src$core$events$events.CHANGE=CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.CLICK=CLICK$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_CHANGE=COMMENT_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_CREATE=COMMENT_CREATE$$module$build$src$core$events$events;
1750
- module$build$src$core$events$events.COMMENT_DELETE=COMMENT_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_DRAG=COMMENT_DRAG$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_MOVE=COMMENT_MOVE$$module$build$src$core$events$events;module$build$src$core$events$events.COMMENT_RESIZE=COMMENT_RESIZE$$module$build$src$core$events$events;module$build$src$core$events$events.CREATE=CREATE$$module$build$src$core$events$events;
1751
- module$build$src$core$events$events.Click=Click$$module$build$src$core$events$events_click;module$build$src$core$events$events.ClickTarget=ClickTarget$$module$build$src$core$events$events_click;module$build$src$core$events$events.CommentBase=CommentBase$$module$build$src$core$events$events_comment_base;module$build$src$core$events$events.CommentChange=CommentChange$$module$build$src$core$events$events_comment_change;module$build$src$core$events$events.CommentCollapse=CommentCollapse$$module$build$src$core$events$events_comment_collapse;
1752
- module$build$src$core$events$events.CommentCreate=CommentCreate$$module$build$src$core$events$events_comment_create;module$build$src$core$events$events.CommentDelete=CommentDelete$$module$build$src$core$events$events_comment_delete;module$build$src$core$events$events.CommentDrag=CommentDrag$$module$build$src$core$events$events_comment_drag;module$build$src$core$events$events.CommentMove=CommentMove$$module$build$src$core$events$events_comment_move;
1753
- module$build$src$core$events$events.CommentResize=CommentResize$$module$build$src$core$events$events_comment_resize;module$build$src$core$events$events.DELETE=DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.FINISHED_LOADING=FINISHED_LOADING$$module$build$src$core$events$events;module$build$src$core$events$events.FinishedLoading=FinishedLoading$$module$build$src$core$events$workspace_events;module$build$src$core$events$events.MOVE=MOVE$$module$build$src$core$events$events;
1754
- module$build$src$core$events$events.SELECTED=SELECTED$$module$build$src$core$events$events;module$build$src$core$events$events.Selected=Selected$$module$build$src$core$events$events_selected;module$build$src$core$events$events.THEME_CHANGE=THEME_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.TOOLBOX_ITEM_SELECT=TOOLBOX_ITEM_SELECT$$module$build$src$core$events$events;module$build$src$core$events$events.TRASHCAN_OPEN=TRASHCAN_OPEN$$module$build$src$core$events$events;
1755
- module$build$src$core$events$events.ThemeChange=ThemeChange$$module$build$src$core$events$events_theme_change;module$build$src$core$events$events.ToolboxItemSelect=ToolboxItemSelect$$module$build$src$core$events$events_toolbox_item_select;module$build$src$core$events$events.TrashcanOpen=TrashcanOpen$$module$build$src$core$events$events_trashcan_open;module$build$src$core$events$events.UI=UI$$module$build$src$core$events$events;module$build$src$core$events$events.UiBase=UiBase$$module$build$src$core$events$events_ui_base;
1756
- module$build$src$core$events$events.VAR_CREATE=VAR_CREATE$$module$build$src$core$events$events;module$build$src$core$events$events.VAR_DELETE=VAR_DELETE$$module$build$src$core$events$events;module$build$src$core$events$events.VAR_RENAME=VAR_RENAME$$module$build$src$core$events$events;module$build$src$core$events$events.VIEWPORT_CHANGE=VIEWPORT_CHANGE$$module$build$src$core$events$events;module$build$src$core$events$events.VarBase=VarBase$$module$build$src$core$events$events_var_base;
1757
- module$build$src$core$events$events.VarCreate=VarCreate$$module$build$src$core$events$events_var_create;module$build$src$core$events$events.VarDelete=VarDelete$$module$build$src$core$events$events_var_delete;module$build$src$core$events$events.VarRename=VarRename$$module$build$src$core$events$events_var_rename;module$build$src$core$events$events.VarTypeChange=VarTypeChange$$module$build$src$core$events$events_var_type_change;module$build$src$core$events$events.ViewportChange=ViewportChange$$module$build$src$core$events$events_viewport;
1758
- module$build$src$core$events$events.clearPendingUndo=clearPendingUndo$$module$build$src$core$events$utils;module$build$src$core$events$events.disable=$.disable$$module$build$src$core$events$utils;module$build$src$core$events$events.disableOrphans=disableOrphans$$module$build$src$core$events$utils;module$build$src$core$events$events.enable=$.enable$$module$build$src$core$events$utils;module$build$src$core$events$events.filter=filter$$module$build$src$core$events$utils;
1759
- module$build$src$core$events$events.fire=fire$$module$build$src$core$events$utils;module$build$src$core$events$events.fromJson=fromJson$$module$build$src$core$events$utils;module$build$src$core$events$events.get=get$$module$build$src$core$events$utils;module$build$src$core$events$events.getDescendantIds=getDescendantIds$$module$build$src$core$events$utils;module$build$src$core$events$events.getGroup=$.getGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.getRecordUndo=getRecordUndo$$module$build$src$core$events$utils;
1760
- module$build$src$core$events$events.isEnabled=isEnabled$$module$build$src$core$events$utils;module$build$src$core$events$events.setGroup=$.setGroup$$module$build$src$core$events$utils;module$build$src$core$events$events.setRecordUndo=$.setRecordUndo$$module$build$src$core$events$utils;var module$build$src$core$renderers$zelos$zelos={};module$build$src$core$renderers$zelos$zelos.BottomRow=BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row;module$build$src$core$renderers$zelos$zelos.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$zelos$constants;module$build$src$core$renderers$zelos$zelos.Drawer=Drawer$$module$build$src$core$renderers$zelos$drawer;module$build$src$core$renderers$zelos$zelos.PathObject=PathObject$$module$build$src$core$renderers$zelos$path_object;
2432
+ var module$build$src$core$dragging$dragger={};module$build$src$core$dragging$dragger.Dragger=Dragger$$module$build$src$core$dragging$dragger;var module$build$src$core$dragging={};module$build$src$core$dragging.BlockDragStrategy=BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy;module$build$src$core$dragging.BubbleDragStrategy=BubbleDragStrategy$$module$build$src$core$dragging$bubble_drag_strategy;module$build$src$core$dragging.CommentDragStrategy=CommentDragStrategy$$module$build$src$core$dragging$comment_drag_strategy;module$build$src$core$dragging.Dragger=Dragger$$module$build$src$core$dragging$dragger;var module$build$src$core$renderers$zelos$zelos={};module$build$src$core$renderers$zelos$zelos.BottomRow=BottomRow$$module$build$src$core$renderers$zelos$measurables$bottom_row;module$build$src$core$renderers$zelos$zelos.ConstantProvider=ConstantProvider$$module$build$src$core$renderers$zelos$constants;module$build$src$core$renderers$zelos$zelos.Drawer=Drawer$$module$build$src$core$renderers$zelos$drawer;module$build$src$core$renderers$zelos$zelos.PathObject=PathObject$$module$build$src$core$renderers$zelos$path_object;
1761
2433
  module$build$src$core$renderers$zelos$zelos.RenderInfo=RenderInfo$$module$build$src$core$renderers$zelos$info;module$build$src$core$renderers$zelos$zelos.Renderer=Renderer$$module$build$src$core$renderers$zelos$renderer;module$build$src$core$renderers$zelos$zelos.RightConnectionShape=RightConnectionShape$$module$build$src$core$renderers$zelos$measurables$row_elements;module$build$src$core$renderers$zelos$zelos.StatementInput=StatementInput$$module$build$src$core$renderers$zelos$measurables$inputs;
1762
2434
  module$build$src$core$renderers$zelos$zelos.TopRow=TopRow$$module$build$src$core$renderers$zelos$measurables$top_row;registerDefaultOptions$$module$build$src$core$contextmenu_items();var module$build$src$core$contextmenu_items={};module$build$src$core$contextmenu_items.registerCleanup=registerCleanup$$module$build$src$core$contextmenu_items;module$build$src$core$contextmenu_items.registerCollapse=registerCollapse$$module$build$src$core$contextmenu_items;module$build$src$core$contextmenu_items.registerCollapseExpandBlock=registerCollapseExpandBlock$$module$build$src$core$contextmenu_items;
1763
2435
  module$build$src$core$contextmenu_items.registerComment=registerComment$$module$build$src$core$contextmenu_items;module$build$src$core$contextmenu_items.registerCommentCreate=registerCommentCreate$$module$build$src$core$contextmenu_items;module$build$src$core$contextmenu_items.registerCommentDelete=registerCommentDelete$$module$build$src$core$contextmenu_items;module$build$src$core$contextmenu_items.registerCommentDuplicate=registerCommentDuplicate$$module$build$src$core$contextmenu_items;
@@ -1869,7 +2541,7 @@ b.toolboxPosition=a.options.toolboxPosition;return new (a.horizontalLayout?getCl
1869
2541
  document.createDocumentFragment();for(let d=0;d<a.length;d++)this.createToolboxItem(a[d],b);let c;(c=this.contentsDiv_)==null||c.appendChild(b)}createToolboxItem(a,b){var c=a.kind;c.toUpperCase()==="CATEGORY"&&isCategoryCollapsible$$module$build$src$core$utils$toolbox(a)&&(c=CollapsibleToolboxCategory$$module$build$src$core$toolbox$collapsible_category.registrationName);if(c=getClass$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX_ITEM,c.toLowerCase())){a=new c(a,this);
1870
2542
  a.init();this.addToolboxItem_(a);(c=a.getDiv())&&b.appendChild(c);let d;(d=a.getClickTarget())==null||d.setAttribute("id",a.getId())}}addToolboxItem_(a){this.contents.set(a.getId(),a);if(a.isCollapsible()){a=a.getChildToolboxItems();for(let b=0;b<a.length;b++)this.addToolboxItem_(a[b])}}getToolboxItems(){return[...this.contents.values()]}addStyle(a){a&&this.HtmlDiv&&addClass$$module$build$src$core$utils$dom(this.HtmlDiv,a)}removeStyle(a){a&&this.HtmlDiv&&removeClass$$module$build$src$core$utils$dom(this.HtmlDiv,
1871
2543
  a)}getClientRect(){if(!this.HtmlDiv||!this.isVisible_)return null;var a=this.HtmlDiv.getBoundingClientRect();const b=a.top,c=b+a.height,d=a.left;a=d+a.width;return this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.TOP?new Rect$$module$build$src$core$utils$rect(-1E7,c,-1E7,1E7):this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.BOTTOM?new Rect$$module$build$src$core$utils$rect(b,1E7,-1E7,1E7):this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.LEFT?
1872
- new Rect$$module$build$src$core$utils$rect(-1E7,1E7,-1E7,a):new Rect$$module$build$src$core$utils$rect(-1E7,1E7,d,1E7)}wouldDelete(a){a instanceof BlockSvg$$module$build$src$core$block_svg?this.updateWouldDelete_(!a.getParent()&&a.isDeletable()):this.updateWouldDelete_(isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable());return this.wouldDelete_}onDragEnter(a){this.updateCursorDeleteStyle_(!0)}onDragExit(a){this.updateCursorDeleteStyle_(!1)}onDrop(a){this.updateCursorDeleteStyle_(!1)}updateWouldDelete_(a){a!==
2544
+ new Rect$$module$build$src$core$utils$rect(-1E7,1E7,-1E7,a):new Rect$$module$build$src$core$utils$rect(-1E7,1E7,d,1E7)}onDragEnter(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.updateCursorDeleteStyle_(!0)}onDragExit(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.updateCursorDeleteStyle_(!1)}onDrop(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()||this.updateCursorDeleteStyle_(!1)}updateWouldDelete_(a){a!==
1873
2545
  this.wouldDelete_&&(this.updateCursorDeleteStyle_(!1),this.wouldDelete_=a,this.updateCursorDeleteStyle_(!0))}updateCursorDeleteStyle_(a){const b=this.wouldDelete_?"blocklyToolboxDelete":"blocklyToolboxGrab";a?this.addStyle(b):this.removeStyle(b)}getToolboxItemById(a){return this.contents.get(a)||null}getWidth(){return this.width_}getHeight(){return this.height_}getFlyout(){return this.flyout}getWorkspace(){return this.workspace_}getSelectedItem(){return this.selectedItem_}getPreviouslySelectedItem(){return this.previouslySelectedItem_}isHorizontal(){return this.horizontalLayout}position(){const a=
1874
2546
  this.workspace_.getMetrics(),b=this.HtmlDiv;if(b){this.horizontalLayout?(b.style.left="0",b.style.height="auto",b.style.width="100%",this.height_=b.offsetHeight,this.width_=a.viewWidth,this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.TOP?b.style.top="0":b.style.bottom="0"):(this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.RIGHT?b.style.right="0":b.style.left="0",b.style.height="100%",this.width_=b.offsetWidth,this.height_=a.viewHeight);var c;(c=this.flyout)==
1875
2547
  null||c.position()}}handleToolboxItemResize(){if(this.HtmlDiv){var a=this.workspace_,b=this.HtmlDiv.getBoundingClientRect(),c=this.getFlyout(),d=this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.LEFT?a.scrollX+b.width+((c==null?0:c.isVisible())?c.getWidth():0):a.scrollX;b=this.toolboxPosition===Position$$module$build$src$core$utils$toolbox.TOP?a.scrollY+b.height+((c==null?0:c.isVisible())?c.getHeight():0):a.scrollY;a.translate(d,b);svgResize$$module$build$src$core$common(a)}}clearSelection(){this.setSelectedItem(null)}refreshTheme(){this.contents.forEach(a=>
@@ -1880,15 +2552,15 @@ null||d.scrollToStart()}else{let c;(c=this.flyout)==null||c.hide()}}fireSelectEv
1880
2552
  0:b.isCollapsible())&&((c=this.selectedItem_)==null?void 0:c.isExpanded())!==a?(this.selectedItem_.toggleExpanded(),!0):!1}dispose(){this.workspace_.getComponentManager().removeComponent("toolbox");var a;(a=this.flyout)==null||a.dispose();this.contents.forEach(b=>b.dispose());for(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),
1881
2553
  removeNode$$module$build$src$core$utils$dom(this.HtmlDiv));$.getFocusManager$$module$build$src$core$focus_manager().unregisterTree(this)}getFocusableElement(){if(!this.HtmlDiv)throw Error("Toolbox DOM has not yet been created.");return this.HtmlDiv}getFocusableTree(){return this}onNodeFocus(){}onNodeBlur(){}canBeFocused(){return!0}getRootFocusableNode(){return this}getRestoredFocusableNode(a){if(!a||a===this){let b;return(b=this.getToolboxItems().find(c=>c.isSelectable()))!=null?b:null}return null}getNestedTrees(){return[]}lookUpFocusableNode(a){return this.getToolboxItemById(a)}onTreeFocus(a,
1882
2554
  b){a!==this?this.getSelectedItem()===a||this.mouseDown||this.setSelectedItem(a):this.clearSelection()}onTreeBlur(a){let b;a&&a===((b=this.flyout)==null?void 0:b.getWorkspace())||this.autoHide(!1)}getNavigator(){return this.navigator}};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 box-sizing: border-box;\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');
1883
- 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 module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.0",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,
2555
+ 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 module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.1",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,
1884
2556
  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=
1885
2557
  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,
1886
2558
  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,
1887
2559
  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)};
1888
2560
  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)};
1889
2561
  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)};
1890
- var DropDownDiv$$module$build$src$core$blockly=module$build$src$core$dropdowndiv,module$build$src$core$blockly={};module$build$src$core$blockly.Block=Block$$module$build$src$core$block;module$build$src$core$blockly.BlockCommentNavigationPolicy=BlockCommentNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_comment_navigation_policy;module$build$src$core$blockly.BlockFlyoutInflater=BlockFlyoutInflater$$module$build$src$core$block_flyout_inflater;
1891
- module$build$src$core$blockly.BlockNavigationPolicy=BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy;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;
2562
+ var DropDownDiv$$module$build$src$core$blockly=module$build$src$core$dropdowndiv,module$build$src$core$blockly={};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.BlockNavigationPolicy=BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy;module$build$src$core$blockly.BlockSvg=BlockSvg$$module$build$src$core$block_svg;
2563
+ module$build$src$core$blockly.Blocks=Blocks$$module$build$src$core$blocks;module$build$src$core$blockly.BubbleNavigationPolicy=BubbleNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$bubble_navigation_policy;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;
1892
2564
  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;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.CommentBarButtonNavigationPolicy=CommentBarButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_bar_button_navigation_policy;
1893
2565
  module$build$src$core$blockly.CommentEditorNavigationPolicy=CommentEditorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$comment_editor_navigation_policy;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;
1894
2566
  module$build$src$core$blockly.ConnectionDB=ConnectionDB$$module$build$src$core$connection_db;module$build$src$core$blockly.ConnectionNavigationPolicy=ConnectionNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$connection_navigation_policy;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;
@@ -1948,7 +2620,29 @@ var Blockly = Blockly || { Msg: Object.create(null) };
1948
2620
 
1949
2621
  Blockly.Msg["ADD_COMMENT"] = "Add Comment";
1950
2622
  Blockly.Msg["ALT_KEY"] = "Alt";
2623
+ Blockly.Msg["ANNOUNCE_MOVE_AFTER"] = "moving %1 after %3";
2624
+ Blockly.Msg["ANNOUNCE_MOVE_AROUND"] = "moving %1 %2 around %3";
2625
+ Blockly.Msg["ANNOUNCE_MOVE_BEFORE"] = "moving %1 before %3";
2626
+ Blockly.Msg["ANNOUNCE_MOVE_CANCELED"] = "Canceled movement";
2627
+ Blockly.Msg["ANNOUNCE_MOVE_INSIDE"] = "moving %1 inside %3 %4";
2628
+ Blockly.Msg["ANNOUNCE_MOVE_TO"] = "moving %1 %2 to %3 %4";
2629
+ Blockly.Msg["ANNOUNCE_MOVE_WORKSPACE"] = "moving %1 on workspace";
2630
+ Blockly.Msg["ARIA_TYPE_FIELD_INPUT"] = "input field";
2631
+ Blockly.Msg["BACKSPACE_KEY"] = "Backspace";
2632
+ Blockly.Msg["BLOCK_LABEL_BEGIN_PREFIX"] = "Begin %1";
2633
+ Blockly.Msg["BLOCK_LABEL_BEGIN_STACK"] = "Begin stack";
2634
+ Blockly.Msg["BLOCK_LABEL_COLLAPSED"] = "collapsed";
2635
+ Blockly.Msg["BLOCK_LABEL_CONTAINER"] = "container";
2636
+ Blockly.Msg["BLOCK_LABEL_DISABLED"] = "disabled";
2637
+ Blockly.Msg["BLOCK_LABEL_HAS_INPUT"] = "has input";
2638
+ Blockly.Msg["BLOCK_LABEL_HAS_INPUTS"] = "has inputs";
2639
+ Blockly.Msg["BLOCK_LABEL_REPLACEABLE"] = "replaceable";
2640
+ Blockly.Msg["BLOCK_LABEL_STACK_BLOCKS"] = "%1 stack blocks";
2641
+ Blockly.Msg["BLOCK_LABEL_STATEMENT"] = "statement";
2642
+ Blockly.Msg["BLOCK_LABEL_TOOLBOX_CATEGORY"] = "%1 category";
2643
+ Blockly.Msg["BLOCK_LABEL_VALUE"] = "value";
1951
2644
  Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'";
2645
+ Blockly.Msg["CAPS_LOCK_KEY"] = "Caps Lock";
1952
2646
  Blockly.Msg["CHANGE_VALUE_TITLE"] = "Change value:";
1953
2647
  Blockly.Msg["CHROME_OS"] = "ChromeOS";
1954
2648
  Blockly.Msg["CLEAN_UP"] = "Clean up Blocks";
@@ -1974,6 +2668,7 @@ Blockly.Msg["COLOUR_RGB_RED"] = "red";
1974
2668
  Blockly.Msg["COLOUR_RGB_TITLE"] = "colour with";
1975
2669
  Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.";
1976
2670
  Blockly.Msg["COMMAND_KEY"] = "⌘ Command";
2671
+ Blockly.Msg["CONTEXT_MENU_KEY"] = "≣ Menu";
1977
2672
  Blockly.Msg["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#loop-termination-blocks";
1978
2673
  Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "break out of loop";
1979
2674
  Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "continue with next iteration of loop";
@@ -2011,6 +2706,7 @@ Blockly.Msg["COPY_SHORTCUT"] = "Copy";
2011
2706
  Blockly.Msg["CUT_SHORTCUT"] = "Cut";
2012
2707
  Blockly.Msg["DELETE_ALL_BLOCKS"] = "Delete all %1 blocks?";
2013
2708
  Blockly.Msg["DELETE_BLOCK"] = "Delete Block";
2709
+ Blockly.Msg["DELETE_KEY"] = "Delete";
2014
2710
  Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable";
2015
2711
  Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?";
2016
2712
  Blockly.Msg["DELETE_X_BLOCKS"] = "Delete %1 Blocks";
@@ -2021,13 +2717,20 @@ Blockly.Msg["DUPLICATE_BLOCK"] = "Duplicate";
2021
2717
  Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment";
2022
2718
  Blockly.Msg["EDIT_BLOCK_CONTENTS"] = "Edit Block contents";
2023
2719
  Blockly.Msg["ENABLE_BLOCK"] = "Enable Block";
2720
+ Blockly.Msg["END_KEY"] = "End";
2024
2721
  Blockly.Msg["ENTER_KEY"] = "Enter";
2722
+ Blockly.Msg["ESCAPE"] = "Esc";
2025
2723
  Blockly.Msg["EXPAND_ALL"] = "Expand Blocks";
2026
2724
  Blockly.Msg["EXPAND_BLOCK"] = "Expand Block";
2027
2725
  Blockly.Msg["EXTERNAL_INPUTS"] = "External Inputs";
2726
+ Blockly.Msg["FIELD_LABEL_EDIT_PREFIX"] = "Edit %1";
2727
+ Blockly.Msg["FIELD_LABEL_EMPTY"] = "empty";
2028
2728
  Blockly.Msg["HELP"] = "Help";
2029
2729
  Blockly.Msg["HELP_PROMPT"] = "Press %1 for help on keyboard controls";
2730
+ Blockly.Msg["HOME_KEY"] = "Home";
2030
2731
  Blockly.Msg["INLINE_INPUTS"] = "Inline Inputs";
2732
+ Blockly.Msg["INPUT_LABEL_INDEX"] = "input %1";
2733
+ Blockly.Msg["INSERT_KEY"] = "Insert";
2031
2734
  Blockly.Msg["KEYBOARD_NAV_BLOCK_NAVIGATION_HINT"] = "Use the right arrow key to navigate inside of blocks";
2032
2735
  Blockly.Msg["KEYBOARD_NAV_CONSTRAINED_MOVE_HINT"] = "Use the arrow keys to move, then %1 to accept the position";
2033
2736
  Blockly.Msg["KEYBOARD_NAV_COPIED_HINT"] = "Copied. Press %1 to paste.";
@@ -2243,7 +2946,10 @@ Blockly.Msg["NEW_VARIABLE_TITLE"] = "New variable name:";
2243
2946
  Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "New variable type:";
2244
2947
  Blockly.Msg["OPTION_KEY"] = "⌥ Option";
2245
2948
  Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = "";
2949
+ Blockly.Msg["PAGE_DOWN_KEY"] = "Page Down";
2950
+ Blockly.Msg["PAGE_UP_KEY"] = "Page Up";
2246
2951
  Blockly.Msg["PASTE_SHORTCUT"] = "Paste";
2952
+ Blockly.Msg["PAUSE_KEY"] = "Pause";
2247
2953
  Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "allow statements";
2248
2954
  Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "with:";
2249
2955
  Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";
@@ -2275,9 +2981,32 @@ Blockly.Msg["REDO"] = "Redo";
2275
2981
  Blockly.Msg["REMOVE_COMMENT"] = "Remove Comment";
2276
2982
  Blockly.Msg["RENAME_VARIABLE"] = "Rename variable...";
2277
2983
  Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Rename all '%1' variables to:";
2984
+ Blockly.Msg["SHIFT_KEY"] = "Shift";
2985
+ Blockly.Msg["SHORTCUTS_ABORT_MOVE"] = "Abort move";
2986
+ Blockly.Msg["SHORTCUTS_CLEANUP"] = "Clean up workspace";
2278
2987
  Blockly.Msg["SHORTCUTS_CODE_NAVIGATION"] = "Code navigation";
2988
+ Blockly.Msg["SHORTCUTS_DELETE"] = "Delete";
2989
+ Blockly.Msg["SHORTCUTS_DISCONNECT"] = "Disconnect block";
2990
+ Blockly.Msg["SHORTCUTS_DUPLICATE"] = "Duplicate";
2279
2991
  Blockly.Msg["SHORTCUTS_EDITING"] = "Editing";
2992
+ Blockly.Msg["SHORTCUTS_ESCAPE"] = "Exit";
2993
+ Blockly.Msg["SHORTCUTS_FINISH_MOVE"] = "Finish move";
2994
+ Blockly.Msg["SHORTCUTS_FOCUS_TOOLBOX"] = "Focus toolbox";
2995
+ Blockly.Msg["SHORTCUTS_FOCUS_WORKSPACE"] = "Focus workspace";
2280
2996
  Blockly.Msg["SHORTCUTS_GENERAL"] = "General";
2997
+ Blockly.Msg["SHORTCUTS_INFORMATION"] = "Announce information";
2998
+ Blockly.Msg["SHORTCUTS_MOVE_DOWN"] = "Move down";
2999
+ Blockly.Msg["SHORTCUTS_MOVE_LEFT"] = "Move left";
3000
+ Blockly.Msg["SHORTCUTS_MOVE_RIGHT"] = "Move right";
3001
+ Blockly.Msg["SHORTCUTS_MOVE_UP"] = "Move up";
3002
+ Blockly.Msg["SHORTCUTS_NEXT_STACK"] = "Next stack";
3003
+ Blockly.Msg["SHORTCUTS_PERFORM_ACTION"] = "Edit or confirm";
3004
+ Blockly.Msg["SHORTCUTS_PREVIOUS_STACK"] = "Previous stack";
3005
+ Blockly.Msg["SHORTCUTS_SHOW_CONTEXT_MENU"] = "Show menu";
3006
+ Blockly.Msg["SHORTCUTS_START_MOVE"] = "Start move";
3007
+ Blockly.Msg["SHORTCUTS_START_MOVE_STACK"] = "Start move stack";
3008
+ Blockly.Msg["SPACE_KEY"] = "Space";
3009
+ Blockly.Msg["TAB_KEY"] = "Tab";
2281
3010
  Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/RaspberryPiFoundation/blockly/wiki/Text#text-modification";
2282
3011
  Blockly.Msg["TEXT_APPEND_TITLE"] = "to %1 append text %2";
2283
3012
  Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Append some text to variable '%1'.";