Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox();return new goog.math.Size(a.width*this.sourceBlock_.workspace.scale,a.height*this.sourceBlock_.workspace.scale)};Blockly.Field.prototype.getText=function(){return this.text_};Blockly.Field.prototype.setText=function(a){null!==a&&(a=String(a),a!==this.text_&&(this.text_=a,this.updateTextNode_(),this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_(),this.sourceBlock_.workspace.fireChangeEvent())))};
Blockly.WidgetDiv.position=function(a,b,c,d,e){b<d.y&&(b=d.y);e?a>c.width+d.x&&(a=c.width+d.x):a<d.x&&(a=d.x);Blockly.WidgetDiv.DIV.style.left=a+"px";Blockly.WidgetDiv.DIV.style.top=b+"px";Blockly.WidgetDiv.DIV.style.height=c.height-b+"px"};Blockly.inject=function(a,b){goog.isString(a)&&(a=document.getElementById(a));if(!goog.dom.contains(document,a))throw"Error: container is not in current document.";var c=Blockly.parseOptions_(b||{}),d,e=function(){var b=Blockly.createDom_(a,c);d=Blockly.createMainWorkspace_(b,c);Blockly.init_(d);d.markFocused();Blockly.bindEvent_(b,"focus",d,d.markFocused)};if(c.enableRealtime){var f=document.getElementById("realtime");f&&(f.style.display="block");Blockly.Realtime.startRealtime(e,a,c.realtimeOptions)}else e();