(function(){u8.Crm.Legacy.Form=new function(){};$.extend(u8.Crm.Legacy.Form,{onPreCreate:function(r,e,o){var t=u8.services.factory.getTypesForName(o);if(!r.using.types){r.using.types=[]}for(var n=0;n<t.length;n++){r.using.types.include(t[n])}},callFormHook:function(r,e,o,t){var n=u8.Base.Widgets.Form.getForm(r);$assert(n,"Failed to determine form in legacy form hook adapter!");var m=$w(n.element);var i=new Function("sender","args","msg","param","window","addinfo","form","el",o);i(r,e,t,null,m,null,n,null)},Messages:{Initialized:0,TabDisplayed:1,TabDestroyed:2,Changed:3,SubFormDisplayed:5,SubFormDestroyed:6,RequestData:7,ApplyRecord:8,Disposed:9}});u8.Crm.Legacy.Form.NumberToStringConverter=function(){};u8.Crm.Legacy.Form.NumberToStringConverter.makeClass({name:"NumberToStringConverter"});$.extend(u8.Crm.Legacy.Form.NumberToStringConverter.prototype,{to:function(r){return r?r.toString():""},from:function(r){return r?Number(r):null}});u8.Crm.Legacy.Form.StringToNumberConverter=function(r){};u8.Crm.Legacy.Form.StringToNumberConverter.makeClass({name:"StringToNumberConverter"});$.extend(u8.Crm.Legacy.Form.StringToNumberConverter.prototype,{to:function(r){return u8.Crm.Legacy.Form.NumberToStringConverter.prototype.from.apply(this,[r])},from:function(r){return u8.Crm.Legacy.Form.NumberToStringConverter.prototype.to.apply(this,[r])}});u8.Crm.Legacy.Form.StringToUidConverter=function(){};u8.Crm.Legacy.Form.StringToUidConverter.makeClass({name:"StringToUidConverter"});$.extend(u8.Crm.Legacy.Form.StringToUidConverter.prototype,{to:function(r){if(!r){return null}var e=r.indexOf(".");return{infoAreaId:r.substring(0,e),recordId:r.substring(e+1)}},from:function(r){return r?r.infoAreaId+"."+r.recordId:""}});u8.Crm.Legacy.Form.FormGenericControlAdapter=function(r,e){e=$.extend({},u8.Crm.Legacy.Form.FormGenericControlAdapter.defaults,e);this.Widget(r,e);this._isCreated=true;this.$(this.element).text("GenericControl["+this.type+"]")};u8.Crm.Legacy.Form.FormGenericControlAdapter.makeClass({name:"FormGenericControlAdapter",deriveFrom:u8.Base.Widgets.Widget});u8.Crm.Legacy.Form.FormGenericControlAdapter.defaults={};$.extend(u8.Crm.Legacy.Form.FormGenericControlAdapter.prototype,{})})();