text: (function(){var a;a=function(a,b){var c,d;for(c in a)d=a[c],"$$hashKey"!==c&&(b[c]=d)},angular.module("builder.controller",["builder.provider","service.tree"]).controller("fbFormObjectEditableController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.setupScope=function(c){var e;return a(c,b),b.optionsText=c.options.join("\n"),b.$watch("[label, description, placeholder, required, options, validation]",function(){return c.label=b.label,c.description=b.description,c.placeholder=b.placeholder,c.required=b.required,c.options=b.options,c.validation=b.validation},!0),b.$watch("optionsText",function(a){var c;return b.options=function(){var b,d,e,f;for(e=a.split("\n"),f=[],b=0,d=e.length;d>b;b++)c=e[b],c.length>0&&f.push(c);return f}(),b.inputText=b.options[0]}),e=d.components[c.component],b.validationOptions=e.validationOptions},b.data={model:null,backup:function(){return this.model={label:b.label,description:b.description,placeholder:b.placeholder,required:b.required,optionsText:b.optionsText,validation:b.validation}},rollback:function(){return this.model?(b.label=this.model.label,b.description=this.model.description,b.placeholder=this.model.placeholder,b.required=this.model.required,b.optionsText=this.model.optionsText,b.validation=this.model.validation):void 0}}}]).controller("fbComponentsController",["$scope","$injector",function(a,b){var c;return c=b.get("$builder"),$navtree=b.get("$navtree"),$http=b.get("$http"),$templateCache=b.get("$templateCache"),$timeout=b.get("$timeout"),a.all_templates_from_URL=[],a.selectGroup=function(b,d){var e,f,g,h;null!=b&&b.preventDefault(),a.activeGroup=d,a.components=[],g=c.components,h=[];for(f in g)e=g[f],e.group===d&&h.push(a.components.push(e));return h},a.child_array_accordin=function(b,c){return null!=b&&b.preventDefault(),a.accordintitles=[],_.map(c.child,function(b,c){a.accordintitles.push(c)}),a.accordintitles},a.Template_from_URL=function(b){if(b.templateUrl||b.popoverTemplateUrl){var c=!1;_.map(a.all_templates_from_URL,function(a){a.uniqueid===b.uniqueid&&(c=!0)}),c||(b.URL_data_fetched=!1,a.all_templates_from_URL.push(b))}},a.loadTemplate_in_async_way=function(){a.all_templates_from_URL&&a.all_templates_from_URL.length>0&&async.map(a.all_templates_from_URL,function(b){b.URL_data_fetched||(a.loadTemplate(b),b.URL_data_fetched=!0)},function(){})},a.loadTemplate=function(a){return null==a.template&&$http.get(a.templateUrl,{cache:$templateCache}).success(function(b){return console.log("The template is being loaded from URL."),a.template=b}),null==a.popoverTemplate?$http.get(a.popoverTemplateUrl,{cache:$templateCache}).success(function(b){return a.popoverTemplate=b}):void 0},a.child_array_components=function(b,c,d){return null!=b&&b.preventDefault(),a.components=[],_.map(c.child,function(b,c){d===c&&_.map(b,function(b){b instanceof Array||(a.Template_from_URL(b.component),a.components.push(b.component))})}),!a.child_array_components_executed,a.loadTemplate_in_async_way(),a.components},a.child_array_tab_components=function(b,c,d,e){return null!=b&&b.preventDefault(),a.tab_components=[],_.map(c.child,function(b,c){d===c&&_.map(b,function(b){b instanceof Array&&e[0].group===b[0].group&&_.map(b,function(b){a.Template_from_URL(b.component),a.tab_components.push(b.component)})})}),!a.child_array_tab_components_executed,a.loadTemplate_in_async_way(),a.tab_components},a.child_array_tabs=function(b,c,d){return null!=b&&b.preventDefault(),a.within_accordin_tabs=[],_.map(c.child,function(b,c){d===c&&_.map(b,function(c){c instanceof Array&&(a.within_accordin_tabs=b)})}),a.within_accordin_tabs},a.according_item_is_tabs=function(a,b,c){null!=a&&a.preventDefault();var d=!1;return _.map(b.child,function(a,b){c===b&&_.map(a,function(a){a instanceof Array&&(d=!0)})}),d},a.groups=c.groups,a.nav_tree_array=$navtree.get_nav_tree_array(),a.oneAtATime=!0,a.status={isFirstOpen:!0,isFirstDisabled:!1},a.activeGroup=a.groups[0],a.allComponents=c.components,a.$watch("allComponents",function(){return a.selectGroup(null,a.activeGroup)})}]).controller("fbComponentController",["$scope",function(b){return b.copyObjectToScope=function(c){return a(c,b)}}]).controller("fbFormController",["$scope","$injector",function(a,b){var c,d;return c=b.get("$builder"),d=b.get("$timeout"),null==a.input&&(a.input=[]),a.$watch("form",function(){return a.input.length>a.form.length&&a.input.splice(a.form.length),d(function(){return a.$broadcast(c.broadcastChannel.updateInput)})},!0)}]).controller("fbFormObjectController",["$scope","$injector","$rootScope",function(b,c){var d;return d=c.get("$builder"),b.copyObjectToScope=function(c){return a(c,b)},b.updateInput=function(a){var c;return c={id:b.formObject.id,label:b.formObject.label,value:null!=a?a:"",data:b.formObject.nav_tree[0].data},b.$parent.input.splice(b.$index,1,c)}}])}).call(this),function(){angular.module("builder.directive",["componentshtmltemplate.templates","formobject.provider","builder.provider","builder.controller","builder.drag","validator","ui.bootstrap"]).directive("fbBuilder",["$injector",function(a){var b,c;return b=a.get("$builder"),c=a.get("$drag"),{restrict:"A",scope:{fbBuilder:"="},template:"<div class='form-horizontal'>\n    <div class='fb-form-object-editable' ng-repeat=\"object in formObjects\"\n        fb-form-object-editable=\"object\"></div>\n</div>",link:function(a,d,e){var f,g,h;return a.formName=e.fbBuilder,null==(g=b.forms)[h=a.formName]&&(g[h]=[]),a.formObjects=b.forms[a.formName],f=!0,$(d).addClass("fb-builder"),c.droppable($(d),{move:function(a){var b,c,e,g,h,i,j,k,l,m,n;if(f&&($("div.fb-form-object-editable").popover("hide"),f=!1),e=$(d).find(".fb-form-object-editable:not(.empty,.dragging)"),0===e.length)return void(0===$(d).find(".fb-form-object-editable.empty").length&&$(d).find(">div:first").append($("<div class='fb-form-object-editable empty'></div>")));for(j=[],j.push(-1e3),h=k=0,m=e.length;m>k;h=k+=1)c=$(e[h]),i=c.offset(),g=c.height(),j.push(i.top+g/2);for(j.push(j[j.length-1]+1e3),h=l=1,n=j.length;n>l;h=l+=1)if(a.pageY>j[h-1]&&a.pageY<=j[h]){$(d).find(".empty").remove(),b=$("<div class='fb-form-object-editable empty'></div>"),h-1<e.length?b.insertBefore($(e[h-1])):b.insertAfter($(e[h-2]));break}},out:function(){return f&&($("div.fb-form-object-editable").popover("hide"),f=!1),$(d).find(".empty").remove()},up:function(e,g,h){var i,j,k;return f=!0,c.isMouseMoved()?(g||"drag"!==h.mode?g&&("mirror"===h.mode&&b.insertFormObject(a.formName,$(d).find(".empty").index(".fb-form-object-editable"),{component:h.object.componentName}),"drag"===h.mode&&(k=h.object.formObject.index,j=$(d).find(".empty").index(".fb-form-object-editable"),j>k&&j--,b.updateFormObjectIndex(a.formName,k,j))):i=h.object.formObject,$(d).find(".empty").remove()):void $(d).find(".empty").remove()}})}}}]).directive("fbFormObjectEditable",["$injector",function(a){var b,c,d,e;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),e=a.get("$validator"),$formobject=a.get("$formobject"),{restrict:"A",controller:"fbFormObjectEditableController",scope:{formObject:"=fbFormObjectEditable"},link:function(a,f){var g;return a.inputArray=[],a.$component=b.components[a.formObject.component],a.setupScope(a.formObject),$formobject.general_external_formobjects(a),a.$watch("$component.template",function(b){var d;if(b)return d=c(b)(a),$(f).html(d)}),$(f).on("click",function(){return!1}),d.draggable($(f),{object:{formObject:a.formObject}}),a.formObject.editable?(g={},a.$watch("$component.popoverTemplate",function(d){return d?($(f).removeClass(g.id),g={id:"fb-"+Math.random().toString().substr(2),isClickedSave:!1,view:null,html:d},g.html=$(g.html).addClass(g.id),g.view=c(g.html)(a),$(f).addClass(g.id),$(f).popover({html:!0,title:a.$component.label,content:g.view,container:"body",placement:b.config.popoverPlacement})):void 0}),a.popover={save:function(b){b.preventDefault(),e.validate(a).success(function(){return g.isClickedSave=!0,$(f).popover("hide")})},remove:function(c){c.preventDefault(),b.removeFormObject(a.$parent.formName,a.$parent.$index),$(f).popover("hide")},shown:function(){return a.data.backup(),g.isClickedSave=!1},cancel:function(b){a.data.rollback(),b&&(b.preventDefault(),$(f).popover("hide"))}},$(f).on("show.bs.popover",function(){var a,b,c;return d.isMouseMoved()?!1:($("div.fb-form-object-editable:not(."+g.id+")").popover("hide"),a=$("form."+g.id).closest(".popover"),a.length>0?(b=$(f).offset().top+$(f).height()/2,c=b-a.height()/2,a.css({position:"absolute",top:c}),a.show(),setTimeout(function(){return a.addClass("in"),$(f).triggerHandler("shown.bs.popover")},0),!1):void 0)}),$(f).on("shown.bs.popover",function(){$(".popover ."+g.id+" input:first").select(),a.$apply(function(){return a.popover.shown()})}),$(f).on("hide.bs.popover",function(){var b;return b=$("form."+g.id).closest(".popover"),g.isClickedSave||(a.$$phase||a.$root.$$phase?a.popover.cancel():a.$apply(function(){return a.popover.cancel()})),b.removeClass("in"),setTimeout(function(){return b.hide()},300),!1})):void 0}}}]).directive("fbComponents",function(){return{restrict:"A",templateUrl:"templates/htmls/fbcomponents.html",controller:"fbComponentsController"}}).directive("fbComponent",["$injector",function(a){var b,c,d;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),$formobject=a.get("$formobject"),{restrict:"A",scope:{component:"=fbComponent"},controller:"fbComponentController",link:function(a,b){return a.copyObjectToScope(a.component),$formobject.general_external_formobjects(a),d.draggable($(b),{mode:"mirror",defer:!1,object:{componentName:a.component.name}}),a.$watch("component.template",function(d){var e;if(d)return e=c(d)(a),$(b).html(e)})}}}]).directive("fbForm",["$injector",function(a){return{restrict:"A",require:"ngModel",scope:{data:"@fbData",formName:"@fbForm",input:"=ngModel","default":"=fbDefault"},template:'<div class=\'fb-form-object\' ng-repeat="object in form" fb-form-object="object"></div>',controller:"fbFormController",link:function(b){var c,d,e;return c=a.get("$builder"),null==(d=c.forms)[e=b.formName]&&(d[e]=[]),b.form=c.forms[b.formName]}}}]).directive("fbFormObject",["$injector","$rootScope",function(a,b){var c,d,e;return c=a.get("$builder"),d=a.get("$compile"),e=a.get("$parse"),$formobject=a.get("$formobject"),{restrict:"A",controller:"fbFormObjectController",link:function(a,f,g){return a.formObject=e(g.fbFormObject)(a),a.$component=c.components[a.formObject.component],a.$on(c.broadcastChannel.updateInput,function(){return a.updateInput(a.inputText)}),a.inputArray_CheckBox_value_assigned=!1,$formobject.checkbox_get_values(a),$formobject.general_external_formobjects(a),a.$component.arrayToText&&(a.inputArray=[],a.$watch("inputArray",function(b,c){var d,e;if(b!==c){d=[];for(e in a.inputArray)a.inputArray[e]&&d.push(a.inputArray[e]);return a.inputText=d.join(", ")}},!0)),a.$watch("inputText",function(){return a.updateInput(a.inputText)}),b.$on("inputTextUpdated",function(b,c){return c.data&&c.elementid===a.$component.name?a.updateInput(c.data):void 0}),a.$watch(g.fbFormObject,function(){return a.copyObjectToScope(a.formObject)},!0),a.$watch("$component.template",function(b){var c,e,g;if(b)return e=$(b),c=e.find("[ng-model='inputText']"),c.attr({validator:"{{validation}}"}),g=d(e)(a),$(f).html(g)}),!a.$component.arrayToText&&a.formObject.options.length>0&&(a.inputText=a.formObject.options[0]),$formobject.checkbox_set_values(a)}}}])}.call(this),function(){angular.module("builder.drag",[]).provider("$drag",function(){var a,b,c;a=null,b=null,this.data={draggables:{},droppables:{}},this.mouseMoved=!1,this.isMouseMoved=function(a){return function(){return a.mouseMoved}}(this),this.hooks={down:{},move:{},up:{}},this.eventMouseMove=function(){},this.eventMouseUp=function(){},$(function(a){return function(){return $(document).on("mousedown",function(b){var c,d,e;a.mouseMoved=!1,e=a.hooks.down;for(d in e)(c=e[d])(b)}),$(document).on("mousemove",function(b){var c,d,e;a.mouseMoved=!0,e=a.hooks.move;for(d in e)(c=e[d])(b)}),$(document).on("mouseup",function(b){var c,d,e;e=a.hooks.up;for(d in e)(c=e[d])(b)})}}(this)),this.currentId=0,this.getNewId=function(a){return function(){return""+a.currentId++}}(this),this.setupEasing=function(){return jQuery.extend(jQuery.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})},this.setupProviders=function(c){return a=c,b=a.get("$rootScope")},this.isHover=function(){return function(a,b){var c,d,e,f,g;return d=a.offset(),e=b.offset(),f={width:a.width(),height:a.height()},g={width:b.width(),height:b.height()},c={x:!1,y:!1},c.x=d.left>e.left&&d.left<e.left+g.width,c.x=c.x||d.left+f.width>e.left&&d.left+f.width<e.left+g.width,c?(c.y=d.top>e.top&&d.top<e.top+g.height,c.y=c.y||d.top+f.height>e.top&&d.top+f.height<e.top+g.height,c.x&&c.y):!1}}(this),c=function(a,b){return setTimeout(function(){return b()},a)},this.autoScroll={up:!1,down:!1,scrolling:!1,scroll:function(a){return function(){return a.autoScroll.scrolling=!0,a.autoScroll.up?($("html, body").dequeue().animate({scrollTop:$(window).scrollTop()-50},100,"easeOutQuad"),c(100,function(){return a.autoScroll.scroll()})):a.autoScroll.down?($("html, body").dequeue().animate({scrollTop:$(window).scrollTop()+50},100,"easeOutQuad"),c(100,function(){return a.autoScroll.scroll()})):a.autoScroll.scrolling=!1}}(this),start:function(a){return function(b){if(b.clientY<50){if(a.autoScroll.up=!0,a.autoScroll.down=!1,!a.autoScroll.scrolling)return a.autoScroll.scroll()}else{if(!(b.clientY>$(window).innerHeight()-50))return a.autoScroll.up=!1,a.autoScroll.down=!1;if(a.autoScroll.up=!1,a.autoScroll.down=!0,!a.autoScroll.scrolling)return a.autoScroll.scroll()}}}(this),stop:function(a){return function(){return a.autoScroll.up=!1,a.autoScroll.down=!1}}(this)},this.dragMirrorMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"mirror",maternal:b[0],element:null,object:d},b.on("mousedown",function(d){var f;return d.preventDefault(),f=b.clone(),e.element=f[0],f.addClass("fb-draggable form-horizontal prepare-dragging"),a.hooks.move.drag=function(c,d){var g,h,i,j;if(!f.hasClass("prepare-dragging")||(f.css({width:b.width(),height:b.height()}),f.removeClass("prepare-dragging"),f.addClass("dragging"),!d)){f.offset({left:c.pageX-f.width()/2,top:c.pageY-f.height()/2}),a.autoScroll.start(c),i=a.data.droppables,j=[];for(h in i)g=i[h],j.push(a.isHover(f,$(g.element))?g.move(c,e):g.out(c,e));return j}},a.hooks.up.drag=function(b){var c,d,g,h;h=a.data.droppables;for(d in h)c=h[d],g=a.isHover(f,$(c.element)),c.up(b,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,e.element=null,f.remove(),a.autoScroll.stop()},$("body").append(f),c?void 0:a.hooks.move.drag(d,c)}),e}}(this),this.dragDragMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"drag",maternal:null,element:b[0],object:d},b.addClass("fb-draggable"),b.on("mousedown",function(d){return d.preventDefault(),b.hasClass("dragging")?void 0:(b.addClass("prepare-dragging"),a.hooks.move.drag=function(c,d){var f,g,h;if(!b.hasClass("prepare-dragging")||(b.css({width:b.width(),height:b.height()}),b.removeClass("prepare-dragging"),b.addClass("dragging"),!d)){b.offset({left:c.pageX-b.width()/2,top:c.pageY-b.height()/2}),a.autoScroll.start(c),h=a.data.droppables;for(g in h)f=h[g],a.isHover(b,$(f.element))?f.move(c,e):f.out(c,e)}},a.hooks.up.drag=function(c){var d,f,g,h;h=a.data.droppables;for(f in h)d=h[f],g=a.isHover(b,$(d.element)),d.up(c,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,b.css({width:"",height:"",left:"",top:""}),b.removeClass("dragging defer-dragging"),a.autoScroll.stop()},c?void 0:a.hooks.move.drag(d,c))}),e}}(this),this.dropMode=function(a){return function(c,d){var e;return e={id:a.getNewId(),element:c[0],move:function(a,c){return b.$apply(function(){return"function"==typeof d.move?d.move(a,c):void 0})},up:function(a,c,e){return b.$apply(function(){return"function"==typeof d.up?d.up(a,c,e):void 0})},out:function(a,c){return b.$apply(function(){return"function"==typeof d.out?d.out(a,c):void 0})}}}}(this),this.draggable=function(a){return function(b,c){var d,e,f,g,h,i,j;if(null==c&&(c={}),f=[],"mirror"===c.mode)for(g=0,i=b.length;i>g;g++)e=b[g],d=a.dragMirrorMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;else for(h=0,j=b.length;j>h;h++)e=b[h],d=a.dragDragMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;return f}}(this),this.droppable=function(a){return function(b,c){var d,e,f,g,h;for(null==c&&(c={}),f=[],g=0,h=b.length;h>g;g++)e=b[g],d=a.dropMode($(e),c),f.push(d),a.data.droppables[d.id]=d;return f}}(this),this.get=function(a){return this.setupEasing(),this.setupProviders(a),{isMouseMoved:this.isMouseMoved,data:this.data,draggable:this.draggable,droppable:this.droppable}},this.get.$inject=["$injector"],this.$get=this.get})}.call(this),function(){[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("formobject.provider",["external_formobjects.provider"]).provider("$formobject",function(){var a,b,c,d,e,f;b=null,a=null,c=null,d=null,e=null,f=null,this.general_external_formobjects=function(){return function(a){f.execute_scope_functions(a)}}(this),this.checkbox_get_values=function(){return function(a){a.$component.arrayToText&&(_.map(a.formObject.options,function(){a.inputArray_CheckBox_value_assigned||(a.inputArray_CheckBox=[],a.checked=[],a.inputArray_CheckBox.push(!1),a.checked.push(!1))}),a.$watch("inputArray_CheckBox",function(b,c){var d;if(b!==c){for(d in a.inputArray_CheckBox)a.inputArray_CheckBox[d]&&(a.checked[d]=!0);return a.inputText=a.checked.join(","),a.inputText}},!0))}}(this),this.checkbox_set_values=function(){return function(a){a.$watch("default['"+a.formObject.id+"']",function(b){return b?a.$component.arrayToText?(b=b.split(","),value_boolean=[],_.map(b,function(a){value_boolean.push("true"===a)}),a.inputArray_CheckBox=value_boolean,a.inputArray_CheckBox_value_assigned=!0,a.inputArray=b):a.inputText=b:void 0})}}(this),this.setupProviders=function(){return function(g){return b=g,a=b.get("$http"),d=b.get("$navtree"),e=b.get("$rootScope"),f=b.get("$external_formobjects"),c=b.get("$templateCache")}}(this),this.$get=["$injector",function(a){return function(b){return a.setupProviders(b),{checkbox_get_values:a.checkbox_get_values,checkbox_set_values:a.checkbox_set_values,general_external_formobjects:a.general_external_formobjects}}}(this)]})}.call(this),function(){angular.module("builder",["builder.directive"])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("builder.provider",["service.tree","navtreeModule"]).provider("$builder",function(){var b,c,d,e,f;c=null,b=null,d=null,e=null,f=null,this.config={popoverPlacement:"right"},this.nav_tree_array=[],this.components={},this.groups=[],this.broadcastChannel={updateInput:"$updateInput"},this.forms={"default":[]},this.convertComponent=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;return c={name:a,uniqueid:null!=(e=b.nav_tree[0].uniqueid)?e:"Default",group:null!=(g=b.group)?g:"Default",label:null!=(h=b.label)?h:"",description:null!=(i=b.description)?i:"",placeholder:null!=(j=b.placeholder)?j:"",editable:null!=(k=b.editable)?k:!0,required:null!=(l=b.required)?l:!1,validation:null!=(m=b.validation)?m:"/.*/",validationOptions:null!=(n=b.validationOptions)?n:[],options:null!=(o=b.options)?o:[],arrayToText:null!=(p=b.arrayToText)?p:!1,template:b.template,templateUrl:b.templateUrl,popoverTemplate:b.popoverTemplate,popoverTemplateUrl:b.popoverTemplateUrl},d={nav_tree:null!=(f=b.nav_tree)?f:[],component:c},d=_.extend(d,c),d.template||d.templateUrl||console.error("The template is empty."),d.popoverTemplate||d.popoverTemplateUrl||console.error("The popoverTemplate is empty."),d},this.convertFormObject=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(null==b&&(b={}),c=this.components[b.component],null==c)throw"The component "+b.component+" was not registered.";return d={id:b.id,nav_tree:null!=(e=b.nav_tree)?e:c.nav_tree,component:b.component,editable:null!=(f=b.editable)?f:c.editable,index:null!=(g=b.index)?g:0,label:null!=(h=b.label)?h:c.label,description:null!=(i=b.description)?i:c.description,placeholder:null!=(j=b.placeholder)?j:c.placeholder,options:null!=(k=b.options)?k:c.options,required:null!=(l=b.required)?l:c.required,validation:null!=(m=b.validation)?m:c.validation}},this.reindexFormObject=function(a){return function(b){var c,d,e,f;for(c=a.forms[b],d=e=0,f=c.length;f>e;d=e+=1)c[d].index=d}}(this),this.setupProviders=function(){return function(a){return c=a,b=c.get("$http"),e=c.get("$navtree"),f=c.get("$rootScope"),d=c.get("$templateCache")}}(this),this.setupNavtree=function(){return function(){}}(this),this.loadTemplate=function(a){return null==a.template&&b.get(a.templateUrl,{cache:d}).success(function(b){return a.template=b}),null==a.popoverTemplate?b.get(a.popoverTemplateUrl,{cache:d}).success(function(b){return a.popoverTemplate=b}):void 0},this.nav_tree_build_start=function(a){return function(b){a.nav_tree_array.push(b),null!=c&&e.nav_tree_build(a.nav_tree_array)}}(this),this.registerComponent=function(b){return function(d,e){var f,g;null==e&&(e={}),null==b.components[d]&&(f=b.convertComponent(d,e),b.components[d]=f,null!=c&&b.loadTemplate(f)),b.nav_tree_build_start(f),g=f.group,a.call(b.groups,g)<0&&b.groups.push(f.group)}}(this),this.addFormObject=function(a){return function(b,c){var d;return null==c&&(c={}),null==(d=a.forms)[b]&&(d[b]=[]),a.insertFormObject(b,a.forms[b].length,c)}}(this),this.insertFormObject=function(a){return function(b,c,d){var e;return null==d&&(d={}),null==(e=a.forms)[b]&&(e[b]=[]),c>a.forms[b].length?c=a.forms[b].length:0>c&&(c=0),a.forms[b].splice(c,0,a.convertFormObject(b,d)),a.reindexFormObject(b),a.forms[b][c]}}(this),this.removeFormObject=function(a){return function(b,c){var d;return d=a.forms[b],d.splice(c,1),a.reindexFormObject(b)}}(this),this.removeAllObjects=function(a){return function(b){a.forms[b]=[]}}(this),this.updateFormObjectIndex=function(a){return function(b,c,d){var e,f;if(c!==d)return f=a.forms[b],e=f.splice(c,1)[0],f.splice(d,0,e),a.reindexFormObject(b)}}(this),this.$get=["$injector","navtreefactory",function(a){return function(b){var c,d,e;a.setupProviders(b),a.setupNavtree(),e=a.components;for(d in e)c=e[d],a.loadTemplate(c);return{config:a.config,components:a.components,groups:a.groups,forms:a.forms,broadcastChannel:a.broadcastChannel,registerComponent:a.registerComponent,addFormObject:a.addFormObject,insertFormObject:a.insertFormObject,removeFormObject:a.removeFormObject,removeAllObjects:a.removeAllObjects,updateFormObjectIndex:a.updateFormObjectIndex}}}(this)]})}.call(this);