(function(){u8.Crm.Widgets.FieldLabel=function(e,i){if(!i.using){i.using={}}i.using.schema=[i.infoAreaId];this.Label(e,i)};u8.Crm.Widgets.FieldLabel.makeClass({name:"FieldLabel",virtual:["setValue"],deriveFrom:u8.Base.Widgets.Label});$.extend(u8.Crm.Widgets.FieldLabel.prototype,{_updateText:function(){var e=this;this._ensureFieldSchema(function(){var i=u8.services.typeConverter.toString(e._fieldSchema,e._value);var t=u8.Base.Html.escape(i||"");e.setHtml(t);var n=+e.multiLineLines;if(n&&!isNaN(n)){var s=e._computeHeight(n);e.$(e.element).css({height:s+"px",overflow:"auto"}).addClass(n!=1?"multiline":"")}}.ifAlive(this))},_computeHeight:function(e){var i=$w(this.element).getComputedStyle(this.element,null);var t;if(i.lineHeight.endsWith("px")){t=parseInt(i.lineHeight)}else{var n=0;if(i.fontSize.endsWith("px")){n=parseInt(i.fontSize)}if(i.lineHeight=="normal"){t=n*1.2}else if(i.lineHeight.endsWith("%")){t=n*parseInt(i.lineHeight)/100}else{t=n*parseFloat(i.lineHeight)}}if(t){return Math.round(t*e)}return 50},_ensureFieldSchema:function(e){if(this._fieldSchema){return e&&e()}var i=this;u8.using({schema:[this.infoAreaId],usingOptions:{synchronousIfPossible:true}},function(){if(i._isDisposed){return}i._fieldSchema=u8.services.schema.getField(i.infoAreaId,i.fieldId)}.chain(e))}})})();