"," "].join("")},a={className:["col-xs-12","col-xs-6","col-xs-4"],type:"",key:"",templateOptions:{type:"",label:"",required:"",placeholder:"",description:"",options:""}},s=[{controlType:"datepicker",properties:[{isRoot:!1,isTemplateOptions:!0,value:"datepickerPopup"}]}];this.getAllParticularControlProperties=function(){return s},this.addParticularControlProperties=function(e){if("controlType"in e&&"properties"in e){var o=!1;s.length>0&&s.forEach(function(t){t.controlType===e.controlType&&(t.properties=[].concat(e.properties),o=!0)}),o||s.push(e)}return s},this.getEasyFormListControls=function(){return e},this.addEasyFormControlToList=function(o){"undefined"!=typeof o&&e.controls.push(o)},this.getHeaderTemplates=function(){return r},this.addHeaderTemplateCssClass=function(e){"undefined"!=typeof e&&r.cssClass.push(e)},this.getFormlyControlTemplate=function(){return a},this.addformlyControlTemplatesCssClass=function(e){"undefined"!=typeof e&&a.className.push(e)},this.setFormlyControlTemplate=function(e){return"className"in e&&"type"in e&&"key"in e&&"templateOptions"in e&&(a=angular.copy(e)),!0},this.$get=[function(){var d={};return d.getEasyFormListControls=function(){return e},d.getEasyFormInitialStateConfigurationModel=function(e){var o=angular.copy(l);return"undefined"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormReloadConfigurationModel=function(e){var o=angular.copy(i);return"undefined"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormEmptyConfigurationLineModel=function(){return o},d.getEasyFormConfigurationEmptyControlModel=function(){return t},d.getRawHeaderTemplates=function(){return r},d.getHeaderTemplateForNcolumnLine=function(e,o){if("undefined"!=typeof e&&"undefined"!=typeof o&&e===parseInt(e,10)&&e<=r.cssClass.length){var t={};return t.className=r.cssClass[e-1],r.textContent=o,r.selectedClass=t.className,t.template=[r.simpleHtml1,o,r.simpleHtml2].join(""),t}},d.getRawFormlyControlTemplates=function(){return a},d.getFormlyControlTemplateForNcolumnLine=function(e,o){if("undefined"!=typeof e&&e===parseInt(e,10)&&e<=a.className.length){var t=angular.copy(a);return t.className=a.className[e-1],"undefined"!=typeof o&&s.forEach(function(e){e.controlType===o&&e.properties.forEach(function(e){e.isRoot&&(t[e.value]=""),e.isTemplateOptions&&(t.templateOptions[e.value]="")})}),t}},d}]}]),angular.module("edaApp.providers",["edaApp.providers.dragDropConfigProvider","edaApp.providers.EasyFormGenFormlyBindingModels",function(){}]),angular.module("edaApp.controllers",["edaApp.controllers.edaMainController","edaApp.controllers.edaEditController","edaApp.controllers.edaEditMODALController","edaApp.controllers.edaEditPanelController"]),angular.module("edaApp.controllers.edaEditController",[]).controller("edaEditController",["$scope","easyFormGenVersion","$filter","$anchorScroll","toaster","$timeout","$modal","$log","formFieldManage","formsByIdService","controllerModalProxy","dragDropItemDecorationService","dragDropConfig","ddModelConfModelProxyService","ddItemRightClickedManager",function(e,o,t,l,n,i,r,a,s,d,c,p,u,m,f){function g(){n.pop({type:"info",timeout:2e3,title:"should save data model if it were not a static example",body:"data :"+t("json")(e.vm.model,4),showCloseButton:!0})}function y(){s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)}e.easyFormGeneratorVERSION=o,e.tab={editTab:{active:!0},previewTab:{active:!1}},e.vm=this,e.vm.model={},e.vm.wfFormFields=[],e.vm.wfFormFieldsOnlyNeededProperties=[],e.ihm={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},e.easyFormDragDropProperties=u.getDragDropConfigModel(),e.dragDropModel=[].concat(u.getDragDropPresentationModel()),e.numberOfColumns=1,e.MaxNumberOfColumns=3,e.MinNumberOfColumns=1,e.configuration={},s.initConfigurationEditFromScratch(e.configuration,!1),c.initProxyModel(),e.collapseAllGroupControl=function(o){angular.forEach(e.easyFormDragDropProperties.containerConfig.decoration,function(t){t.WhenIndex!==o&&u.setDragDropConfigContainerDecorationCollapse(e.easyFormDragDropProperties,t.WhenIndex,!0)})},e.vm.onSubmit=g,e.resetToZeroModel=function(){return e.configuration.activeLine=1,e.configuration.lines.length>1&&e.configuration.lines.splice(1,e.configuration.lines.length-2),e.countConfigurationModelLines()},e.countConfigurationModelLines=function(){return e.configuration.lines.length},e.setActiveLineNumber=function(o){o<=e.countConfigurationModelLines()&&(e.configuration.activeLine=o)},e.upThisLine=function(o){if(o>-1&&e.configuration.lines[o-1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o-1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.downThisLine=function(o){if(o>-1&&e.configuration.lines[o+1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o+1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.removeThisLine=function(o){o>-1&&(e.configuration.lines.length>1?(e.configuration.activeLine===o+1&&(e.configuration.activeLine=1),e.configuration.lines.splice(o,1)):i(function(){n.pop({type:"warning",title:"Last line",body:"Can't delete the last line",showCloseButton:!0})},100),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields))},e.increaseNumberOfColumns=function(){if(e.configuration.lines[e.configuration.activeLine-1].columns.length1&&e.configuration.lines[e.configuration.activeLine-1].columns.splice(e.configuration.lines[e.configuration.activeLine-1].columns.length-1,1),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.saveThisForm=function(){if("undefined"==typeof e.configuration.formName)return n.pop({type:"warning",timeout:2e3,title:"Form name is undefined",body:"Form has not been saved.",showCloseButton:!0}),!1;if(""===e.configuration.formName)return n.pop({type:"warning",timeout:2e3,title:"Form name is required",body:"Form has not been saved.",showCloseButton:!0}),!1;n.pop({type:"wait",timeout:1e4,title:"Form is being saved",body:"Wait.",showCloseButton:!0});var o=new d;return o.formName=e.configuration.formName,o.submitButtonText=e.configuration.submitButtonText,o.cancelButtonText=e.configuration.cancelButtonText,o.formlyField=JSON.stringify(e.configuration.lines),n.clear(),n.pop({type:"info",timeout:2e3,title:"Form would be saved if it were not a static example",body:"",showCloseButton:!0}),!0},e.nyaSelect={},c.initNyaSelect(e.nyaSelect),e.animationsEnabled=!0,e.showModalAddCtrlToColumn=function(o,t,l){var n=r.open({animation:e.animationsEnabled,templateUrl:"editModalTemplate.html",controller:"edaEditMODALController",size:"lg",resolve:{nyaSelect:function(){return c.getNyASelectFromSelectedLineColumn(e.nyaSelect,e.configuration,t,l)}}});n.result.then(function(o){c.bindConfigurationModelFromModalReturn(t,l,o,e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},function(){a.info("Modal dismissed at: "+new Date)})},e.dragoverCallbackContainer=function(e,o,t){return 0===t?!1:!0},e.dropCallback=function(o,t,l,n,r,a){if(n){if("itemType"===a&&!l.label)return!1;if("containerType"===a&&!angular.isArray(l))return!1}var d=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return e.$on("$destroy",function(){i.cancel(d)}),l},e.dndItemMoved=function(o,t,l){o>0&&e.dragDropModel[o][t].splice(l,1)},e.dragoverCallbackItems=function(e,o,t,l){return 0===o?!1:!0},e.disableItemDropIf=function(){},e.dropCallbackItems=function(o,t,l,n,r,a,d,c,p,u){if(c){if("itemType"===u&&!d.label)return!1;if("containerType"===u&&!angular.isArray(d))return!1}var g=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return f.setUnRightClicked(d),e.$on("$destroy",function(){i.cancel(g)}),d},e.editPanelModel={toggle:!1},e.saveFromEditPanel=function(){c.bindSpecialCtrlTemporyModelsToProxyModel(),c.bindConfigurationModelFromProxyModel(c.getEditPanelModelLineIndex(),c.getEditPanelModelColumnIndex(),e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),f.resetAllDragDropItemSelectedState(e.dragDropModel)},e.closeEditPanel=function(){f.resetAllDragDropItemSelectedState(e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.debugProxyModel=c.ProxyModel,e.setRightClicked=function(e,o){o.rightCliked=!0},e.toggleEditPanel=function(o,t,l,n){if(f.resetAllDragDropItemSelectedState(e.dragDropModel),c.getEditPanelModelToggle()){if(c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),"undefined"!=typeof c.getEditPanelModelLineIndex()&&"undefined"!=typeof c.getEditPanelModelColumnIndex()&&"undefined"!=typeof c.getEditPanelModelControl())if(c.getEditPanelModelLineIndex()===t&&c.getEditPanelModelColumnIndex()===l&&angular.equals(c.getEditPanelModelControl(),n));else{n.rightCliked=!0;var r=i(function(){c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},200);e.$on("$destroy",function(){i.cancel(r)})}}else n.rightCliked=!0,c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.removeThisLine=function(o){e.dragDropModel[1].splice(o,1)},e.model=[],e.insertNewLine=function(){y(),e.dragDropModel[1].push([])}}]),angular.module("edaApp.controllers.edaEditMODALController",[]).controller("edaEditMODALController",["$scope","$modalInstance","nyaSelect","toaster","$timeout","selectOptionManage","controllerModalProxy",function(e,o,t,l,n,i,r){function a(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:""};e.radioRowCollection.rows.push(t)}}function s(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.radioRowCollection.rows.length>0)for(var t=0;t<=e.radioRowCollection.rows.length-1;t++){var l={name:e.radioRowCollection.rows[t].option,value:t,group:""};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function d(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:""};e.basicSelectRowCollection.rows.push(t)}}function c(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.basicSelectRowCollection.rows.length>0)for(var t=0;t<=e.basicSelectRowCollection.rows.length-1;t++){var l={name:e.basicSelectRowCollection.rows[t].option,value:t,group:""};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function p(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0){for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:e.nyaSelect.temporyConfig.formlyOptions[o].group};e.groupedSelectRowCollection.rows.push(t)}var l=_.uniq(_.pluck(e.groupedSelectRowCollection.rows,"group"));angular.copy(l,e.GroupedSelectGroups.list)}}function u(){e.nyaSelect.temporyConfig.formlyOptions=[];for(var o=0;o<=e.groupedSelectRowCollection.rows.length-1;o++){var t={name:e.groupedSelectRowCollection.rows[o].option,value:o,group:e.groupedSelectRowCollection.rows[o].group};e.nyaSelect.temporyConfig.formlyOptions.push(t)}}function m(){e.nyaSelect.temporyConfig.datepickerPopup=e.demodt.formats[0]}function f(){e.nyaSelect.temporyConfig={formlyLabel:"",formlyRequired:!1,formlyPlaceholder:"",formlyDesciption:"",formlyOptions:[]}}var g={rows:[]};if(e.radioRowCollection=g,e.newOptionRadio={saisie:""},e.addNewOptionRadio=function(){var o=i.addNewOptionRadio(e.radioRowCollection,e.newOptionRadio.saisie);o.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:o.details,body:"'"+e.newOptionRadio.saisie+"' cannot be added.",showCloseButton:!0}),e.newOptionRadio={saisie:""}},e.removeRadioRow=function(o){var t=i.removeOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},e.upThisRadioRow=function(o){var t=i.upthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.downThisRadioRow=function(o){var t=i.downthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.basicSelectRowCollection=g,e.newOptionBasicSelect={saisie:""},e.addNewOptionBasicSelect=function(){var o=i.addNewOptionBasicSelect(e.basicSelectRowCollection,e.newOptionBasicSelect.saisie);o.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:o.details,body:"'"+e.newOptionBasicSelect.saisie+"' cannot be added.",showCloseButton:!0}),e.newOptionBasicSelect={saisie:""}},e.removeRow=function(o){var t=i.removeOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},e.upThisRow=function(o){var t=i.upthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.downThisRow=function(o){var t=i.downthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({
type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.groupedSelectRowCollection=g,e.newOptionGroupedSelect={saisie:""},e.GroupedSelectGroups={list:[]},e.newGroupGroupedSelect={saisie:""},e.groupSelectGroupClick={showList:!1},e.showGroupListToChoose=function(){e.groupSelectGroupClick.showList=!e.groupSelectGroupClick.showList},e.addNewGroupToGroupedSelect=function(){if(""!==e.newGroupGroupedSelect.saisie){for(var o=e.GroupedSelectGroups.list.length-1;o>=0;o--)e.GroupedSelectGroups.list[o]===e.newGroupGroupedSelect.saisie&&l.pop({type:"warning",timeout:2e3,title:"Group already exists",body:"No group added.",showCloseButton:!0});e.GroupedSelectGroups.list.push(e.newGroupGroupedSelect.saisie)}else l.pop({type:"warning",timeout:2e3,title:"Not a valid group to add",body:"No group added.",showCloseButton:!0});e.newGroupGroupedSelect.saisie=""},e.addNewOptionGroupedSelect=function(){var o=i.addNewOptionGroupedSelect(e.groupedSelectRowCollection,e.newOptionGroupedSelect.saisie,"");o.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:o.details,body:"'"+e.newOptionGroupedSelect.saisie+"' cannot be added.",showCloseButton:!0}),e.newOptionGroupedSelect={saisie:""}},e.removeGroupedSelectRow=function(o){var t=i.removeOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},e.upThisGroupedSelectRow=function(o){var t=i.upthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.downThisGroupedSelectRow=function(o){var t=i.downthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},e.demodt={},e.today=function(){e.demodt.dt=new Date},e.today(),e.clear=function(){e.demodt.dt=null},e.open=function(o){o.preventDefault(),o.stopPropagation(),e.demodt.opened=!0},e.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!0,initDate:null},e.demodt.formats=["dd-MMMM-yyyy","yyyy/MM/dd","dd.MM.yyyy","shortDate"],e.nyaSelect=t,e.nyaSelect.selectedControl=e.nyaSelect.temporyConfig.selectedControl,"none"!==t.selectedControl){for(var y=e.nyaSelect.controls.length-1;y>=0;y--)e.nyaSelect.controls[y].id===t.selectedControl&&(e.modelNyaSelect=t.controls[y]);"BasicSelect"===e.nyaSelect.selectedControl&&d(),"GroupedSelect"===e.nyaSelect.selectedControl&&p(),"Radio"===e.nyaSelect.selectedControl&&a()}e.selectThisControl=function(o){e.nyaSelect.selectedControl="none",f();for(var t=e.nyaSelect.controls.length-1;t>=0;t--)e.nyaSelect.controls[t].id===o&&(e.nyaSelect.selectedControl=e.nyaSelect.controls[t].id);"Date"===e.nyaSelect.selectedControl&&m()},e.ok=function(){"BasicSelect"===e.nyaSelect.selectedControl&&c(),"GroupedSelect"===e.nyaSelect.selectedControl&&u(),"Radio"===e.nyaSelect.selectedControl&&s(),r.applyConfigToSelectedControl(e.nyaSelect),o.close(e.nyaSelect)},e.cancel=function(){o.dismiss("cancel")}}]),angular.module("edaApp.controllers.edaEditPanelController",[]).controller("edaEditPanelController",["$scope","toaster","$timeout","selectOptionManage","controllerModalProxy",function(e,o,t,l,n){function i(){a.proxyModel.temporyConfig={formlyLabel:"",formlyRequired:!1,formlyPlaceholder:"",formlyDesciption:"",formlyOptions:[]}}function r(){a.proxyModel.temporyConfig.datepickerPopup=a.demodt.formats[0]}var a=this;if(a.proxyModel=n.proxyModel,a.proxyModel.selectedControl=a.proxyModel.temporyConfig.selectedControl,a.basicSelectRowCollection=n.basicSelectRowCollection,a.newOptionBasicSelect=n.newOptionBasicSelect,a.groupedSelectRowCollection=n.groupedSelectRowCollection,a.newOptionGroupedSelect=n.newOptionGroupedSelect,a.GroupedSelectGroups=n.GroupedSelectGroups,a.newGroupGroupedSelect=n.newGroupGroupedSelect,a.groupSelectGroupClick=n.groupSelectGroupClick,a.radioRowCollection=n.radioRowCollection,a.newOptionRadio=n.newOptionRadio,n.resetAllTemporyModels(),"none"!==a.proxyModel.temporyConfig.selectedControl){for(var s=a.proxyModel.controls.length-1;s>=0;s--)a.proxyModel.controls[s].id===a.proxyModel.temporyConfig.selectedControl&&(a.modelproxyModel=a.proxyModel.controls[s]);"BasicSelect"===a.proxyModel.temporyConfig.selectedControl&&n.bindBasicSelectFromProxyModel(a.basicSelectRowCollection),"GroupedSelect"===a.proxyModel.temporyConfig.selectedControl&&n.bindGroupedSelectFromProxyModel(a.groupedSelectRowCollection,a.GroupedSelectGroups),"Radio"===a.proxyModel.temporyConfig.selectedControl&&n.bindRadioFromProxyModel(a.radioRowCollection)}a.updateSpecialControl=function(){return n.basicSelectRowCollection=a.basicSelectRowCollection,n.newOptionBasicSelect=a.newOptionBasicSelect,n.groupedSelectRowCollection=a.groupedSelectRowCollection,n.newOptionGroupedSelect=a.newOptionGroupedSelect,n.GroupedSelectGroups=a.GroupedSelectGroups,n.newGroupGroupedSelect=a.newGroupGroupedSelect,n.groupSelectGroupClick=a.groupSelectGroupClick,n.radioRowCollection=a.radioRowCollection,n.newOptionRadio=a.newOptionRadio,n.bindSpecialCtrlTemporyModelsToProxyModel(),!0},a.resetControl=function(){a.proxyModel.temporyConfig.formlyLabel="",a.proxyModel.temporyConfig.formlyRequired=!1,a.proxyModel.temporyConfig.formlyPlaceholder="",a.proxyModel.temporyConfig.formlyDesciption="",a.proxyModel.temporyConfig.formlyOptions=[],a.proxyModel.temporyConfig.datepickerPopup=r()},a.selectThisControl=function(e){a.proxyModel.selectedControl="none",i();for(var o=a.proxyModel.controls.length-1;o>=0;o--)a.proxyModel.controls[o].id===e&&(a.proxyModel.selectedControl=a.proxyModel.controls[o].id);"Date"===a.proxyModel.selectedControl&&r()},a.addNewOptionRadio=function(){var e=l.addNewOptionRadio(a.radioRowCollection,a.newOptionRadio.saisie);e.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:e.details,body:"'"+a.newOptionRadio.saisie+"' cannot be added.",showCloseButton:!0}),a.newOptionRadio={saisie:""}},a.removeRadioRow=function(e){var t=l.removeOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},a.upThisRadioRow=function(e){var t=l.upthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.downThisRadioRow=function(e){var t=l.downthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.addNewOptionBasicSelect=function(){var e=l.addNewOptionBasicSelect(a.basicSelectRowCollection,a.newOptionBasicSelect.saisie);e.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:e.details,body:"'"+a.newOptionBasicSelect.saisie+"' cannot be added.",showCloseButton:!0}),a.newOptionBasicSelect={saisie:""}},a.removeRow=function(e){var t=l.removeOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},a.upThisRow=function(e){var t=l.upthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.downThisRow=function(e){var t=l.downthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.showGroupListToChoose=function(){a.groupSelectGroupClick.showList=!a.groupSelectGroupClick.showList},a.addNewGroupToGroupedSelect=function(){if(""!==a.newGroupGroupedSelect.saisie){for(var e=a.GroupedSelectGroups.list.length-1;e>=0;e--)a.GroupedSelectGroups.list[e]===a.newGroupGroupedSelect.saisie&&o.pop({type:"warning",timeout:2e3,title:"Group already exists",body:"No group added.",showCloseButton:!0});a.GroupedSelectGroups.list.push(a.newGroupGroupedSelect.saisie)}else o.pop({type:"warning",timeout:2e3,title:"Not a valid group to add",body:"No group added.",showCloseButton:!0});a.newGroupGroupedSelect.saisie=""},a.addNewOptionGroupedSelect=function(){var e=l.addNewOptionGroupedSelect(a.groupedSelectRowCollection,a.newOptionGroupedSelect.saisie,"");e.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:e.details,body:"'"+a.newOptionGroupedSelect.saisie+"' cannot be added.",showCloseButton:!0}),a.newOptionGroupedSelect={saisie:""}},a.removeGroupedSelectRow=function(e){var t=l.removeOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Delete was cancelled.",showCloseButton:!0})},a.upThisGroupedSelectRow=function(e){var t=l.upthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.downThisGroupedSelectRow=function(e){var t=l.downthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:"warning",timeout:2e3,title:t.details,body:"Operation cancelled.",showCloseButton:!0})},a.demodt={},a.today=function(){a.demodt.dt=new Date},a.today(),a.clear=function(){a.demodt.dt=null},a.open=function(e){e.preventDefault(),e.stopPropagation(),a.demodt.opened=!0},a.dateOptions={formatYear:"yy",startingDay:1,showWeeks:!0,initDate:null},a.demodt.formats=["dd-MMMM-yyyy","yyyy/MM/dd","dd.MM.yyyy","shortDate"]}]),angular.module("edaApp.controllers.edaMainController",[]).controller("edaMainController",[function(){}]),angular.module("edaApp.directives.edaDdContentCounterDirective",[]).directive("ddContentCounter",["dragDropItemCounterService","$timeout",function(e,o){return{scope:{valueWhenPlaceholder:"@ddValueWhenPlaceholder",valueWhendragging:"@ddValueWhenDragging",fullModel:"=ddFullModel",currentIndex:"@ddContentCounterCurrentIndex",parentIndex:"@ddContentCounterParentIndex",forceRefresh:"=ddContentCounterForceCssRefresh"},restrict:"A",link:function(t,l){var n;t.$watch(function(){return l[0].children.length},function(i,r){if(i!==r){for(var a=0,s=[],d=l[0].children.length-1;d>=0;d--)e.isHtmlElementToCount(l[0].children[d].classList)?(a++,s.push({item:d,isReal:!0})):s.push({item:d,isReal:!1});t.contentRealCount=a,n=o(function(){e.updateLineItemCss(t.fullModel,s,t.parentIndex,t.currentIndex,a)},20)}}),t.$on("$destroy",function(){console.warn("ddContentCounter timer destruction!"),o.cancel(n)})}}}]),angular.module("edaApp.directives.edaDdDecorContainerDirective",[]).directive("ddDecorContainer",[function(){var e=['
','
{{currentTitle}}
',"
",'
',' ',"
"].join(" ");return{scope:{styleParam:"=ddContainerProperties",isStillCollapsed:"=ddContainerIsCollpased",verboseMode:"@ddContainerVerboseMode",currentIndex:"@ddContainerCurrentIndex",collpaseAll:"&ddCollapseAll"},restrict:"A",template:e,transclude:!0,controller:function(e){e.config={isEnabled:!1},e.collapseFct=function(){e.collpaseAll({exceptThisOne:e.styleParam.WhenIndex}),e.isCollapsed=!e.isCollapsed,e.isStillCollapsed=e.isCollapsed},e.icons={closedClass:"glyphicon glyphicon-eye-open",opened:"glyphicon glyphicon-eye-close"},e.currentIconClass=function(){return e.isCollapsed?e.icons.closedClass:e.icons.opened}},link:function(e,o,t,l,n){var i=e.verboseMode,r=e.currentIndex;if(e.isCollapsed=!1,""!==i){var a=angular.lowercase(i);("true"===a||"1"===a)&&console.dir({whoAmI:"I am verbose from ddDecorContainer link",verbodeMode:a,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:r,styleParam:e.styleParam,columnindex:e.$parent.$parent.$parent.$parent.$index})}e.$watch(function(){return e.isStillCollapsed},function(o,t){o!==t&&0===e.$parent.$parent.$index&&(e.isCollapsed=o)}),e.config.isEnabled=!1,"undefined"!=typeof r&&""!==r&&"0"===r&&"undefined"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title,e.config.isEnabled=!0,e.isCollapsed=!0),n(e.$parent,function(e){var t=angular.element(o.children()[1]);t.append(e)})}}}]),angular.module("edaApp.directives.edaDdDecorDropZoneDirective",[]).directive("ddDecorDropZone",[function(){var e=['
','
','
','
','
',' '," {{currentTitle}}",'
',' ","
","
","
",'
','
','
',"
","
","
","
","
","
"].join(" ");return{scope:{styleParam:"=ddDropZoneProperties",verboseMode:"@ddDropZoneVerboseMode",currentIndex:"@ddDropZoneCurrentIndex",addNewLineFct:"&ddDropZoneAddNewLine"},restrict:"A",template:e,transclude:!0,link:function(e){var o=e.verboseMode,t=e.currentIndex;if(e.headerConfig={HeaderButtonVisible:!1,affixAttr:"bs-affix",affixEnabled:!1},""!==o){var l=angular.lowercase(o);("true"===l||"1"===l)&&console.dir({whoAmI:"I am verbose from ddDecorDropZone link",verbodeMode:l,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:t,styleParam:e.styleParam})}"undefined"!=typeof t&&""!==t&&("undefined"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title),"undefined"!=typeof e.styleParam.fontAwesomeIcon&&(e.currentFontAwesome=e.styleParam.fontAwesomeIcon),"1"===t&&(e.headerConfig.HeaderButtonVisible=!0))}}}]),angular.module("edaApp.directives.edaDdDecorItemDirective",[]).directive("ddDecorItem",["dragDropConfig",function(e){var o=["
",' ',"
"].join(" ");return{scope:{verboseMode:"@ddItemVerboseMode",currentIndex:"@ddItemCurrentIndex",parentIndex:"@ddItemParentIndex",parentParentIndex:"@ddItemParentParentIndex",lineItemsCount:"@ddItemsCount",cssClass:"@ddItemCssClass"},restrict:"A",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex,d=e.getDistinctItemCssClass();if(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(o.cssClass),o.$watch("cssClass",function(e,o){e!==o&&(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(e))}),""!==r){var c=angular.lowercase(r);("true"===c||"1"===c)&&console.dir({whoAmI:"I am verbose from ddDecorItem directive link",verbodeMode:c,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,parentParentIndex:o.parentParentIndex,currentIndex:a,lineItemsCount:o.lineItemsCount})}"0"===o.parentParentIndex&&t.addClass(d[0]),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module("edaApp.directives.edaDdDecorLineDirective",[]).directive("ddDecorLine",["$timeout",function(e){var o=['
',' ',"
",'
'].join(" ");return{scope:{verboseMode:"@ddLineVerboseMode",currentIndex:"@ddLineCurrentIndex",parentIndex:"@ddLineParentIndex",removeLine:"&ddRemoveLine"},restrict:"A",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex;if(o.deleteLine={},o.deleteLine.readyToDelete=!1,o.deleteLine.dblClickCount=0,o.isCollapsed=!1,""!==r){var d=angular.lowercase(r);("true"===d||"1"===d)&&console.dir({whoAmI:"I am verbose from ddDecorLine directive link",verbodeMode:d,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,currentIndex:a})}o.removeMe=function(t){t.preventDefault(),t.stopPropagation(),"1"===o.parentIndex&&(1===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1,o.removeLine(),e.cancel(c)),0===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=o.deleteLine.dblClickCount+1,o.deleteLine.readyToDelete=!0))};var c;o.cancelDelete=function(t){c=e(function(){o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1},500)},o.$on("$destroy",function(){e.cancel(c)}),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module("edaApp.directives.edaDdNoEditableControlDirective",[]).directive("ddNoEditableControl",[function(){return{restrict:"A",link:function(e,o){o.on("click",function(e){e.preventDefault()})}}}]),angular.module("edaApp.directives",["edaApp.directives.edaStRationDirective","edaApp.directives.edaDdDecorDropZoneDirective","edaApp.directives.edaDdDecorContainerDirective","edaApp.directives.edaDdDecorLineDirective","edaApp.directives.edaDdDecorItemDirective","edaApp.directives.edaDdNoEditableControlDirective","edaApp.directives.edaDdContentCounterDirective","edaApp.directives.edaRightClickDirective"]),angular.module("edaApp.directives.edaRightClickDirective",[]).directive("edaRightClick",["$parse",function(e){return{restrict:"A",link:function(o,t,l){var n=e(l.edaRightClick),i=e(l.edaRightClickColIndex),r=e(l.edaSetRightClicked);t.on("contextmenu",function(e){o.$apply(function(){e.preventDefault(),1===i(o)&&r(o,{}),1===i(o)&&n(o,{$event:e})})})}}}]),angular.module("edaApp.directives.edaStRationDirective",[]).directive("stRatio",[function(){return{restrict:"A",link:function(e,o,t){var l=+t.stRatio;o.css("width",l+"%")}}}]),angular.module("edaApp.services.dragDropItemCountersService",[]).factory("dragDropItemCounterService",["dragDropConfig",function(e){var o=[],t=angular.copy(e.getItemsNotToCount()),l={};return l.getItemsNotToCount=function(){return t},l.getModelItemsRealCounter=function(){return o},l.isHtmlElementToCount=function(e){var o=!0;return e.length>0&&angular.forEach(t,function(t){for(var l=e.length-1;l>=0;l--)e[l]===t&&(o&=!1)}),o},l.updateLineItemCss=function(o,t,l,n,i){if("undefined"!=typeof o&&"undefined"!=typeof t&&"undefined"!=typeof l&&"undefined"!=typeof n&&"undefined"!=typeof i){for(var r=o[l][n].length-1;r>=0;r--)for(var a=0;a=0;r--)o[t][l][r].cssClass=e.getItemCssDependingNumberItemsInRow(n);return!0}return!1},t.updateCssClassWholeColumn=function(o,t){if("undefined"!=typeof t&&"undefined"!=typeof o){for(var l=o[t].length-1;l>=0;l--)for(var n=o[t][l].length-1;n>=0;n--)o[t][l][n].cssClass=e.getItemCssDependingNumberItemsInRow(o[t][l].length);return!0}return!1},t}]),angular.module("edaApp.services.dragDropModelConfigModelProxyService",[]).factory("ddModelConfModelProxyService",["EasyFormGenFormlyBindingModels","controllerModalProxy","$parse",function(e,o,t){function l(o){var l={},n=e.getEasyFormListControls(),i=t("controls");return angular.forEach(i(n),function(e){e.id===o.control&&(l=e)}),l}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)"undefined"!=typeof o.lines[l].columns[n].control&&o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(e,o){var t=e+"-"+Date.now();return n(t,o)===!0?t:(t=e+"-"+Date.now(),n(t,o)===!0?t:t=e+"-"+Date.now())}function r(e,o,t){angular.forEach(t.lines,function(t,l){l===o&&(t.line=e)})}function a(e,o,l){t("control.selectedControl").assign(o,t("selectedControl")(e)),t("control.type").assign(o,t("formlyType")(e)),t("control.key").assign(o,i(t("control.type")(o),l)),t("control.subtype").assign(o,t("formlySubtype")(e)),t("control.templateOptions.label").assign(o,t("formlyLabel")(e)),t("control.templateOptions.required").assign(o,t("formlyRequired")(e)),t("control.templateOptions.description").assign(o,t("formlyDesciption")(e)),t("control.templateOptions.placeholder").assign(o,t("formlyPlaceholder")(e)),t("control.templateOptions.options").assign(o,t("formlyOptions")(e)),"datepicker"===t("control.type")(o)&&t("control.templateOptions.datepickerPopup").assign(o,t("datepickerPopup")(e))}var s={};return s.refreshAllConfigurationFromDragAndDropModel=function(o,t){angular.copy(o);return o.lines=[],angular.forEach(t[1],function(t,n){o.lines.push(angular.copy(e.getEasyFormEmptyConfigurationLineModel())),r(n+1,n,o),angular.forEach(t,function(i,r){var s={control:angular.copy(e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType))},d=l(t[r]);if("undefined"!=typeof i.key){console.warn("debug dragdropModel show this control key : "+i.key),s.control=angular.copy(i.configModelControl);var c=e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType);s.control.className=c.className,s.control.cssClass=c.className}else a(d,s,o);"undefined"==typeof o.lines[n].columns[r]&&o.lines[n].columns.push(angular.copy(e.getEasyFormConfigurationEmptyControlModel())),o.lines[n].columns[r].control=angular.copy(s.control),o.lines[n].columns[r].numColumn=r+1,o.lines[n].columns[r].exist=!0})}),o},s.refreshControlsKeys=function(e,o){angular.forEach(e.lines,function(e,t){angular.forEach(e.columns,function(e,l){"undefined"!=typeof o[1][t]&&o[1][t].length>0&&(o[1][t][l].key=e.control.key,o[1][t][l].configModelControl=angular.copy(e.control))})}),console.info("refreshControlsKeys"),console.dir({when:"starting","configModel is ":angular.copy(e),"dragDropModel is ":angular.copy(o)})},s}]),angular.module("edaApp.services.edaEditCtrlControllerModalProxy",[]).factory("controllerModalProxy",["EasyFormGenFormlyBindingModels",function(e){function o(o){var t=e.getEasyFormListControls();return angular.copy(t,o),!0}function t(){var o=e.getEasyFormListControls();return r.proxyModel=angular.copy(o),!0}function l(e){for(var o={selectedControl:"none",formlyType:"none",formlySubtype:"none",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[]},t=e.controls.length-1;t>=0;t--)e.selectedControl===e.controls[t].id&&(o.selectedControl=e.selectedControl,o.formlyType=e.controls[t].formlyType,o.formlySubtype=e.controls[t].formlySubtype,o.formlyLabel=e.controls[t].formlyLabel,o.formlyRequired=e.controls[t].formlyRequired,o.formlyDesciption=e.controls[t].formlyDesciption,o.formlyPlaceholder=e.controls[t].formlyPlaceholder,o.formlyOptions=e.controls[t].formlyOptions,"datepicker"===e.controls[t].formlyType&&(o.datepickerPopup=e.controls[t].datepickerPopup));return o}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(o){var t="none",l=angular.copy(e.getEasyFormListControls().controls);return l.forEach(function(e){return e.formlyType===o.type&&e.formlySubtype===o.subtype?t=e.id:void 0}),t}var r={};r.ProxyModel={},t(),r.initNyaSelect=function(e){return o(e)},r.getNyASelectFromSelectedLineColumn=function(e,t,l,n){return o(e),"undefined"!=typeof t.lines[l].columns[n].control.templateOptions&&(e.temporyConfig.selectedControl="undefined"!=typeof t.lines[l].columns[n].control.selectedControl?t.lines[l].columns[n].control.selectedControl:"none",e.temporyConfig.formlyLabel="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.label?t.lines[l].columns[n].control.templateOptions.label:"",e.temporyConfig.formlyRequired="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.required?t.lines[l].columns[n].control.templateOptions.required:"",e.temporyConfig.formlyDesciption="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.description?t.lines[l].columns[n].control.templateOptions.description:"",e.temporyConfig.formlyPlaceholder="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.placeholder?t.lines[l].columns[n].control.templateOptions.placeholder:"",e.temporyConfig.formlyOptions="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.options?t.lines[l].columns[n].control.templateOptions.options:"","Date"===e.temporyConfig.selectedControl&&(e.temporyConfig.datepickerPopup="undefined"!=typeof t.lines[l].columns[n].control.templateOptions.datepickerPopup?t.lines[l].columns[n].control.templateOptions.datepickerPopup:"")),e},r.bindConfigurationModelFromModalReturn=function(e,o,t,i){var r=l(t);i.lines[e].columns[o].control.selectedControl=r.selectedControl,i.lines[e].columns[o].control.type=r.formlyType,i.lines[e].columns[o].control.subtype=r.formlySubtype,i.lines[e].columns[o].control.templateOptions={label:"",required:!1,description:"",placeholder:"",options:[]},i.lines[e].columns[o].control.templateOptions.label=r.formlyLabel,i.lines[e].columns[o].control.templateOptions.required=r.formlyRequired,i.lines[e].columns[o].control.templateOptions.description=r.formlyDesciption,i.lines[e].columns[o].control.templateOptions.placeholder=r.formlyPlaceholder,i.lines[e].columns[o].control.templateOptions.options=r.formlyOptions,"datepicker"===i.lines[e].columns[o].control.type&&(i.lines[e].columns[o].control.templateOptions.datepickerPopup=r.datepickerPopup);var a=i.lines[e].columns[o].control.type+"-"+Date.now();n(a,i)===!0?i.lines[e].columns[o].control.key=a:(a=i.lines[e].columns[o].control.type+"-"+Date.now(),n(a,i)===!0?i.lines[e].columns[o].control.key=a:a=i.lines[e].columns[o].control.type+"-"+Date.now()),i.lines[e].columns[o].control.edited=!0},r.applyConfigToSelectedControl=function(e){for(var o=e.controls.length-1;o>=0;o--)e.controls[o].id===e.selectedControl&&(e.controls[o].formlyLabel=e.temporyConfig.formlyLabel,e.controls[o].formlyRequired=e.temporyConfig.formlyRequired,e.controls[o].formlyDesciption=e.temporyConfig.formlyDesciption,e.controls[o].formlyPlaceholder=e.temporyConfig.formlyPlaceholder,e.controls[o].formlyOptions=e.temporyConfig.formlyOptions,"Date"===e.controls[o].id&&(e.controls[o].datepickerPopup=e.temporyConfig.datepickerPopup))},r.initProxyModel=function(e){return t(e)},r.bindConfigurationModelFromProxyModel=function(e,o,t){var l=angular.copy(r.proxyModel.temporyConfig);console.warn("debug edaEditCtrlControllerModalProxy"),console.dir(l),t.lines[e].columns[o].control.selectedControl=l.selectedControl,t.lines[e].columns[o].control.type=l.formlyType,t.lines[e].columns[o].control.subtype=l.formlySubtype,t.lines[e].columns[o].control.templateOptions={label:"",required:!1,description:"",placeholder:"",options:[]},t.lines[e].columns[o].control.templateOptions.label=l.formlyLabel,t.lines[e].columns[o].control.templateOptions.required=l.formlyRequired,t.lines[e].columns[o].control.templateOptions.description=l.formlyDesciption,t.lines[e].columns[o].control.templateOptions.placeholder=l.formlyPlaceholder,t.lines[e].columns[o].control.templateOptions.options=l.formlyOptions,"datepicker"===t.lines[e].columns[o].control.type&&(t.lines[e].columns[o].control.templateOptions.datepickerPopup=l.datepickerPopup);var i=t.lines[e].columns[o].control.type+"-"+Date.now();n(i,t)===!0?t.lines[e].columns[o].control.key=i:(i=t.lines[e].columns[o].control.type+"-"+Date.now(),n(i,t)===!0?t.lines[e].columns[o].control.key=i:i=t.lines[e].columns[o].control.type+"-"+Date.now()),t.lines[e].columns[o].control.edited=!0},r.setProxyModelFromConfigurationSelection=function(e,o,t){return"undefined"!=typeof e.lines[o].columns[t].control&&(r.proxyModel.selectedControl="undefined"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):"none",r.proxyModel.temporyConfig.selectedControl="undefined"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):"none",r.proxyModel.temporyConfig.formlyType="undefined"!=typeof e.lines[o].columns[t].control.type?e.lines[o].columns[t].control.type:"none",r.proxyModel.temporyConfig.formlySubtype="undefined"!=typeof e.lines[o].columns[t].control.subtype?e.lines[o].columns[t].control.subtype:"none",r.proxyModel.temporyConfig.formlyLabel="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.label?e.lines[o].columns[t].control.templateOptions.label:"",r.proxyModel.temporyConfig.formlyRequired="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.required?e.lines[o].columns[t].control.templateOptions.required:"",r.proxyModel.temporyConfig.formlyDesciption="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.description?e.lines[o].columns[t].control.templateOptions.description:"",r.proxyModel.temporyConfig.formlyPlaceholder="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.placeholder?e.lines[o].columns[t].control.templateOptions.placeholder:"",r.proxyModel.temporyConfig.formlyOptions="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.options?e.lines[o].columns[t].control.templateOptions.options:"","Date"===r.proxyModel.temporyConfig.selectedControl&&(r.proxyModel.temporyConfig.datepickerPopup="undefined"!=typeof e.lines[o].columns[t].control.templateOptions.datepickerPopup?e.lines[o].columns[t].control.templateOptions.datepickerPopup:"")),r.proxyModel},r.getProxyModel=function(){return r.proxyModel};var a={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}};r.getEditPanelModelAllModel=function(){return a},r.setEditPanelModelControl=function(e){var o=!1;return"undefined"!=typeof e&&(a=angular.copy(e),o=!0),o},r.getEditPanelModelColumnIndex=function(){return a.columnIndex},r.setEditPanelModelColumnIndex=function(e){var o=!1;return"undefined"!=typeof e&&(a.columnIndex=e,o=!0),o},r.getEditPanelModelLineIndex=function(){return a.lineIndex},r.setEditPanelModelLineIndex=function(e){var o=!1;return"undefined"!=typeof e&&(a.lineIndex=e,o=!0),o},r.getEditPanelModelControl=function(){return a.control},r.setEditPanelModelControl=function(e){var o=!1;return"undefined"!=typeof e&&(a.control=angular.copy(e),o=!0),o},r.getEditPanelModelToggle=function(){return a.toggle},r.setEditPanelModelToggle=function(e){var o=!1;return"undefined"!=typeof e&&(a.toggle=e,o=!0),o};var s={rows:[]};return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:""}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:""}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:""}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:""}),r.resetAllTemporyModels=function(){return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:""}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:""}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:""}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:""}),!0},r.bindSpecialCtrlTemporyModelsToProxyModel=function(){
"BasicSelect"===r.proxyModel.selectedControl&&r.bindBasicSelectToProxyModel(r.basicSelectRowCollection),"GroupedSelect"===r.proxyModel.selectedControl&&r.bindGroupedSelectToProxyModel(r.groupedSelectRowCollection),"Radio"===r.proxyModel.selectedControl&&r.bindRadioToProxyModel(r.radioRowCollection)},r.bindBasicSelectFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:""};e.rows.push(t)}},r.bindBasicSelectToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:""};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r.bindGroupedSelectFromProxyModel=function(e,o){if(r.proxyModel.temporyConfig.formlyOptions.length>0){for(var t=0;t<=r.proxyModel.temporyConfig.formlyOptions.length-1;t++){var l={option:r.proxyModel.temporyConfig.formlyOptions[t].name,order:t,group:r.proxyModel.temporyConfig.formlyOptions[t].group};e.rows.push(l)}var n=_.uniq(_.pluck(e.rows,"group"));angular.copy(n,o.list)}},r.bindGroupedSelectToProxyModel=function(e){r.proxyModel.temporyConfig.formlyOptions=[];for(var o=0;o<=e.rows.length-1;o++){var t={name:e.rows[o].option,value:o,group:e.rows[o].group};r.proxyModel.temporyConfig.formlyOptions.push(t)}},r.bindRadioFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:""};e.rows.push(t)}},r.bindRadioToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:""};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r}]),angular.module("edaApp.services.formFieldManage",[]).factory("formFieldManage",["EasyFormGenFormlyBindingModels",function(e){function o(e){var o=[];angular.copy(o,e)}function t(o,t,l){var n=t.lines[l].columns.length,i=o.push({className:"row",fieldGroup:[]})-1;t.lines[l].columns.forEach(function(t,l){var r={};if("undefined"!=typeof r&&"none"!==t.control.type){if("header"===t.control.type||"subTitle"===t.control.type){var a=t.control.templateOptions.description;r.template=e.getHeaderTemplateForNcolumnLine(n,a).template,r.className=e.getRawHeaderTemplates().selectedClass}else r=e.getFormlyControlTemplateForNcolumnLine(n,t.control.type),r.className=t.control.className,r.type=t.control.type,r.key=t.control.key,r.templateOptions.type=t.control.templateOptions.type,r.templateOptions.label=t.control.templateOptions.label,r.templateOptions.required=t.control.templateOptions.required,r.templateOptions.placeholder=t.control.templateOptions.placeholder,r.templateOptions.description=t.control.templateOptions.description,r.templateOptions.options=[].concat(t.control.templateOptions.options),"undefined"!=typeof r.templateOptions.datepickerPopup&&(t.control.templateOptions.datepickerPopup=r.templateOptions.datepickerPopup);o[i].fieldGroup.push(r)}})}function l(e){var o={};return angular.copy(o,e),!0}function n(e,o){var t={noError:!1,title:"",Message:""};return t.noError=!1,t.title=e,t.Message=o,t}function i(e,o){var t={noError:!1,title:"",Message:""};return t.noError=!0,t.title=e,t.Message=o,t}var r={};return r.initConfigurationEditFromScratch=function(o,t){var l=e.getEasyFormInitialStateConfigurationModel(t);angular.copy(l,o)},r.bindConfigurationLines=function(o,t,l){if("[object Array]"===Object.prototype.toString.call(t)){var r=e.getEasyFormReloadConfigurationModel(l);return r.lines=[].concat(t),angular.copy(r,o),i("configuration model is bound","lines are bound to configuration model.")}return n("lines is not an array","Checks lines type, it is not an array.")},r.applyConfigurationToformlyModel=function(e,n,i){o(n),l(i);for(var r=e.lines.length,a=0;r>a;a++)t(n,e,a)},r}]),angular.module("edaApp.services.formsByIdService",["ngResource"]).factory("formsByIdService",["$resource",function(e){return e("/api/formGen/:id",{id:"@id"},{})}]),angular.module("edaApp.services.selectOptionManage",[]).factory("selectOptionManage",[function(){function e(e,o){var t={resultFlag:!1,details:""};if("undefined"==typeof o)return t.resultFlag=!1,t.details="Entered option is empty",t;if(""!==o){for(var l=e.rows.length-1;l>=0;l--)if(e.rows[l].option===o)return t.resultFlag=!1,t.details="Entered option is not unique",t;return t.resultFlag=!0,t.details="",t}return t.resultFlag=!1,t.details="Entered option is empty",t}function o(e){var o={rows:[]};angular.copy(o,e)}return{testMe:function(){return"selectOptionManage is here."},initModel:function(e){o(e)},isOptionUnique:function(e,o){for(var t=e.rows.length-1;t>=0;t--)if(e.rows[t].option===o)return!1;return!0},isOptionValidFormat:function(e){return""!==e?!0:!1},addNewOptionRadio:function(o,t){var l={resultFlag:!1,details:""},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details="",l}return angular.copy(n,l),l},addNewOptionBasicSelect:function(o,t){var l={resultFlag:!1,details:""},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details="",l}return angular.copy(n,l),l},addNewOptionGroupedSelect:function(o,t,l){var n={resultFlag:!1,details:""},i=e(o,t);if(i.resultFlag===!0){var r={option:t,group:l,order:o.rows.length};return o.rows.push(r),n.resultFlag=!0,n.details="",n}return angular.copy(i,n),n},removeOption:function(e,o){var t={resultFlag:!1,details:""};return-1!==o?(e.rows.splice(o,1),t.resultFlag=!0,t.details="",t):(t.resultFlag=!1,t.details="Option index not valid",t)},upthisOption:function(e,o){var t={resultFlag:!1,details:""};if(o>-1){if(o>0){if(e.rows[o-1]){var l=e.rows[o];return e.rows.splice(o,1),e.rows.splice(o-1,0,l),t.resultFlag=!0,t.details="",t}return t.resultFlag=!1,t.details="Can't retreive option from option index",t}return t.resultFlag=!0,t.details="",t}return t.resultFlag=!1,t.details="Option index not valid",t},downthisOption:function(e,o){var t={resultFlag:!1,details:""};if(o>-1){if(o'}),e.setType({name:"blank",template:""});var n='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e)}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e),e.$inject=["formlyConfigProvider"]}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}n.$inject=[];var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\",\" \"].join(\"\")},a={className:[\"col-xs-12\",\"col-xs-6\",\"col-xs-4\"],type:\"\",key:\"\",templateOptions:{type:\"\",label:\"\",required:\"\",placeholder:\"\",description:\"\",options:\"\"}},s=[{controlType:\"datepicker\",properties:[{isRoot:!1,isTemplateOptions:!0,value:\"datepickerPopup\"}]}];this.getAllParticularControlProperties=function(){return s},this.addParticularControlProperties=function(e){if(\"controlType\"in e&&\"properties\"in e){var o=!1;s.length>0&&s.forEach(function(t){t.controlType===e.controlType&&(t.properties=[].concat(e.properties),o=!0)}),o||s.push(e)}return s},this.getEasyFormListControls=function(){return e},this.addEasyFormControlToList=function(o){\"undefined\"!=typeof o&&e.controls.push(o)},this.getHeaderTemplates=function(){return r},this.addHeaderTemplateCssClass=function(e){\"undefined\"!=typeof e&&r.cssClass.push(e)},this.getFormlyControlTemplate=function(){return a},this.addformlyControlTemplatesCssClass=function(e){\"undefined\"!=typeof e&&a.className.push(e)},this.setFormlyControlTemplate=function(e){return\"className\"in e&&\"type\"in e&&\"key\"in e&&\"templateOptions\"in e&&(a=angular.copy(e)),!0},this.$get=[function(){var d={};return d.getEasyFormListControls=function(){return e},d.getEasyFormInitialStateConfigurationModel=function(e){var o=angular.copy(l);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormReloadConfigurationModel=function(e){var o=angular.copy(i);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormEmptyConfigurationLineModel=function(){return o},d.getEasyFormConfigurationEmptyControlModel=function(){return t},d.getRawHeaderTemplates=function(){return r},d.getHeaderTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&\"undefined\"!=typeof o&&e===parseInt(e,10)&&e<=r.cssClass.length){var t={};return t.className=r.cssClass[e-1],r.textContent=o,r.selectedClass=t.className,t.template=[r.simpleHtml1,o,r.simpleHtml2].join(\"\"),t}},d.getRawFormlyControlTemplates=function(){return a},d.getFormlyControlTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&e===parseInt(e,10)&&e<=a.className.length){var t=angular.copy(a);return t.className=a.className[e-1],\"undefined\"!=typeof o&&s.forEach(function(e){e.controlType===o&&e.properties.forEach(function(e){e.isRoot&&(t[e.value]=\"\"),e.isTemplateOptions&&(t.templateOptions[e.value]=\"\")})}),t}},d}]}]),angular.module(\"edaApp.providers\",[\"edaApp.providers.dragDropConfigProvider\",\"edaApp.providers.EasyFormGenFormlyBindingModels\",function(){}]),angular.module(\"edaApp.controllers\",[\"edaApp.controllers.edaMainController\",\"edaApp.controllers.edaEditController\",\"edaApp.controllers.edaEditMODALController\",\"edaApp.controllers.edaEditPanelController\"]),angular.module(\"edaApp.controllers.edaEditController\",[]).controller(\"edaEditController\",[\"$scope\",\"easyFormGenVersion\",\"$filter\",\"$anchorScroll\",\"toaster\",\"$timeout\",\"$modal\",\"$log\",\"formFieldManage\",\"formsByIdService\",\"controllerModalProxy\",\"dragDropItemDecorationService\",\"dragDropConfig\",\"ddModelConfModelProxyService\",\"ddItemRightClickedManager\",function(e,o,t,l,n,i,r,a,s,d,c,p,u,m,f){function g(){n.pop({type:\"info\",timeout:2e3,title:\"should save data model if it were not a static example\",body:\"data :\"+t(\"json\")(e.vm.model,4),showCloseButton:!0})}function y(){s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)}e.easyFormGeneratorVERSION=o,e.tab={editTab:{active:!0},previewTab:{active:!1}},e.vm=this,e.vm.model={},e.vm.wfFormFields=[],e.vm.wfFormFieldsOnlyNeededProperties=[],e.ihm={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},e.easyFormDragDropProperties=u.getDragDropConfigModel(),e.dragDropModel=[].concat(u.getDragDropPresentationModel()),e.numberOfColumns=1,e.MaxNumberOfColumns=3,e.MinNumberOfColumns=1,e.configuration={},s.initConfigurationEditFromScratch(e.configuration,!1),c.initProxyModel(),e.collapseAllGroupControl=function(o){angular.forEach(e.easyFormDragDropProperties.containerConfig.decoration,function(t){t.WhenIndex!==o&&u.setDragDropConfigContainerDecorationCollapse(e.easyFormDragDropProperties,t.WhenIndex,!0)})},e.vm.onSubmit=g,e.resetToZeroModel=function(){return e.configuration.activeLine=1,e.configuration.lines.length>1&&e.configuration.lines.splice(1,e.configuration.lines.length-2),e.countConfigurationModelLines()},e.countConfigurationModelLines=function(){return e.configuration.lines.length},e.setActiveLineNumber=function(o){o<=e.countConfigurationModelLines()&&(e.configuration.activeLine=o)},e.upThisLine=function(o){if(o>-1&&e.configuration.lines[o-1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o-1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.downThisLine=function(o){if(o>-1&&e.configuration.lines[o+1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o+1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.removeThisLine=function(o){o>-1&&(e.configuration.lines.length>1?(e.configuration.activeLine===o+1&&(e.configuration.activeLine=1),e.configuration.lines.splice(o,1)):i(function(){n.pop({type:\"warning\",title:\"Last line\",body:\"Can't delete the last line\",showCloseButton:!0})},100),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields))},e.increaseNumberOfColumns=function(){if(e.configuration.lines[e.configuration.activeLine-1].columns.length1&&e.configuration.lines[e.configuration.activeLine-1].columns.splice(e.configuration.lines[e.configuration.activeLine-1].columns.length-1,1),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.saveThisForm=function(){if(\"undefined\"==typeof e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is undefined\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;if(\"\"===e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is required\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;n.pop({type:\"wait\",timeout:1e4,title:\"Form is being saved\",body:\"Wait.\",showCloseButton:!0});var o=new d;return o.formName=e.configuration.formName,o.submitButtonText=e.configuration.submitButtonText,o.cancelButtonText=e.configuration.cancelButtonText,o.formlyField=JSON.stringify(e.configuration.lines),n.clear(),n.pop({type:\"info\",timeout:2e3,title:\"Form would be saved if it were not a static example\",body:\"\",showCloseButton:!0}),!0},e.nyaSelect={},c.initNyaSelect(e.nyaSelect),e.animationsEnabled=!0,e.showModalAddCtrlToColumn=function(o,t,l){var n=r.open({animation:e.animationsEnabled,templateUrl:\"editModalTemplate.html\",controller:\"edaEditMODALController\",size:\"lg\",resolve:{nyaSelect:function(){return c.getNyASelectFromSelectedLineColumn(e.nyaSelect,e.configuration,t,l)}}});n.result.then(function(o){c.bindConfigurationModelFromModalReturn(t,l,o,e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},function(){a.info(\"Modal dismissed at: \"+new Date)})},e.dragoverCallbackContainer=function(e,o,t){return 0===t?!1:!0},e.dropCallback=function(o,t,l,n,r,a){if(n){if(\"itemType\"===a&&!l.label)return!1;if(\"containerType\"===a&&!angular.isArray(l))return!1}var d=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return e.$on(\"$destroy\",function(){i.cancel(d)}),l},e.dndItemMoved=function(o,t,l){o>0&&e.dragDropModel[o][t].splice(l,1)},e.dragoverCallbackItems=function(e,o,t,l){return 0===o?!1:!0},e.disableItemDropIf=function(){},e.dropCallbackItems=function(o,t,l,n,r,a,d,c,p,u){if(c){if(\"itemType\"===u&&!d.label)return!1;if(\"containerType\"===u&&!angular.isArray(d))return!1}var g=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return f.setUnRightClicked(d),e.$on(\"$destroy\",function(){i.cancel(g)}),d},e.editPanelModel={toggle:!1},e.saveFromEditPanel=function(){c.bindSpecialCtrlTemporyModelsToProxyModel(),c.bindConfigurationModelFromProxyModel(c.getEditPanelModelLineIndex(),c.getEditPanelModelColumnIndex(),e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),f.resetAllDragDropItemSelectedState(e.dragDropModel)},e.closeEditPanel=function(){f.resetAllDragDropItemSelectedState(e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.debugProxyModel=c.ProxyModel,e.setRightClicked=function(e,o){o.rightCliked=!0},e.toggleEditPanel=function(o,t,l,n){if(f.resetAllDragDropItemSelectedState(e.dragDropModel),c.getEditPanelModelToggle()){if(c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),\"undefined\"!=typeof c.getEditPanelModelLineIndex()&&\"undefined\"!=typeof c.getEditPanelModelColumnIndex()&&\"undefined\"!=typeof c.getEditPanelModelControl())if(c.getEditPanelModelLineIndex()===t&&c.getEditPanelModelColumnIndex()===l&&angular.equals(c.getEditPanelModelControl(),n));else{n.rightCliked=!0;var r=i(function(){c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},200);e.$on(\"$destroy\",function(){i.cancel(r)})}}else n.rightCliked=!0,c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.removeThisLine=function(o){e.dragDropModel[1].splice(o,1)},e.model=[],e.insertNewLine=function(){y(),e.dragDropModel[1].push([])}}]),angular.module(\"edaApp.controllers.edaEditMODALController\",[]).controller(\"edaEditMODALController\",[\"$scope\",\"$modalInstance\",\"nyaSelect\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n,i,r){function a(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.radioRowCollection.rows.push(t)}}function s(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.radioRowCollection.rows.length>0)for(var t=0;t<=e.radioRowCollection.rows.length-1;t++){var l={name:e.radioRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function d(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.basicSelectRowCollection.rows.push(t)}}function c(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.basicSelectRowCollection.rows.length>0)for(var t=0;t<=e.basicSelectRowCollection.rows.length-1;t++){var l={name:e.basicSelectRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function p(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0){for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:e.nyaSelect.temporyConfig.formlyOptions[o].group};e.groupedSelectRowCollection.rows.push(t)}var l=_.uniq(_.pluck(e.groupedSelectRowCollection.rows,\"group\"));angular.copy(l,e.GroupedSelectGroups.list)}}function u(){e.nyaSelect.temporyConfig.formlyOptions=[];for(var o=0;o<=e.groupedSelectRowCollection.rows.length-1;o++){var t={name:e.groupedSelectRowCollection.rows[o].option,value:o,group:e.groupedSelectRowCollection.rows[o].group};e.nyaSelect.temporyConfig.formlyOptions.push(t)}}function m(){e.nyaSelect.temporyConfig.datepickerPopup=e.demodt.formats[0]}function f(){e.nyaSelect.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}var g={rows:[]};if(e.radioRowCollection=g,e.newOptionRadio={saisie:\"\"},e.addNewOptionRadio=function(){var o=i.addNewOptionRadio(e.radioRowCollection,e.newOptionRadio.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionRadio={saisie:\"\"}},e.removeRadioRow=function(o){var t=i.removeOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRadioRow=function(o){var t=i.upthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRadioRow=function(o){var t=i.downthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.basicSelectRowCollection=g,e.newOptionBasicSelect={saisie:\"\"},e.addNewOptionBasicSelect=function(){var o=i.addNewOptionBasicSelect(e.basicSelectRowCollection,e.newOptionBasicSelect.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionBasicSelect={saisie:\"\"}},e.removeRow=function(o){var t=i.removeOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRow=function(o){var t=i.upthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRow=function(o){var t=i.downthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({\ntype:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.groupedSelectRowCollection=g,e.newOptionGroupedSelect={saisie:\"\"},e.GroupedSelectGroups={list:[]},e.newGroupGroupedSelect={saisie:\"\"},e.groupSelectGroupClick={showList:!1},e.showGroupListToChoose=function(){e.groupSelectGroupClick.showList=!e.groupSelectGroupClick.showList},e.addNewGroupToGroupedSelect=function(){if(\"\"!==e.newGroupGroupedSelect.saisie){for(var o=e.GroupedSelectGroups.list.length-1;o>=0;o--)e.GroupedSelectGroups.list[o]===e.newGroupGroupedSelect.saisie&&l.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});e.GroupedSelectGroups.list.push(e.newGroupGroupedSelect.saisie)}else l.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});e.newGroupGroupedSelect.saisie=\"\"},e.addNewOptionGroupedSelect=function(){var o=i.addNewOptionGroupedSelect(e.groupedSelectRowCollection,e.newOptionGroupedSelect.saisie,\"\");o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionGroupedSelect={saisie:\"\"}},e.removeGroupedSelectRow=function(o){var t=i.removeOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisGroupedSelectRow=function(o){var t=i.upthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisGroupedSelectRow=function(o){var t=i.downthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.demodt={},e.today=function(){e.demodt.dt=new Date},e.today(),e.clear=function(){e.demodt.dt=null},e.open=function(o){o.preventDefault(),o.stopPropagation(),e.demodt.opened=!0},e.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},e.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"],e.nyaSelect=t,e.nyaSelect.selectedControl=e.nyaSelect.temporyConfig.selectedControl,\"none\"!==t.selectedControl){for(var y=e.nyaSelect.controls.length-1;y>=0;y--)e.nyaSelect.controls[y].id===t.selectedControl&&(e.modelNyaSelect=t.controls[y]);\"BasicSelect\"===e.nyaSelect.selectedControl&&d(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&p(),\"Radio\"===e.nyaSelect.selectedControl&&a()}e.selectThisControl=function(o){e.nyaSelect.selectedControl=\"none\",f();for(var t=e.nyaSelect.controls.length-1;t>=0;t--)e.nyaSelect.controls[t].id===o&&(e.nyaSelect.selectedControl=e.nyaSelect.controls[t].id);\"Date\"===e.nyaSelect.selectedControl&&m()},e.ok=function(){\"BasicSelect\"===e.nyaSelect.selectedControl&&c(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&u(),\"Radio\"===e.nyaSelect.selectedControl&&s(),r.applyConfigToSelectedControl(e.nyaSelect),o.close(e.nyaSelect)},e.cancel=function(){o.dismiss(\"cancel\")}}]),angular.module(\"edaApp.controllers.edaEditPanelController\",[]).controller(\"edaEditPanelController\",[\"$scope\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n){function i(){a.proxyModel.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}function r(){a.proxyModel.temporyConfig.datepickerPopup=a.demodt.formats[0]}var a=this;if(a.proxyModel=n.proxyModel,a.proxyModel.selectedControl=a.proxyModel.temporyConfig.selectedControl,a.basicSelectRowCollection=n.basicSelectRowCollection,a.newOptionBasicSelect=n.newOptionBasicSelect,a.groupedSelectRowCollection=n.groupedSelectRowCollection,a.newOptionGroupedSelect=n.newOptionGroupedSelect,a.GroupedSelectGroups=n.GroupedSelectGroups,a.newGroupGroupedSelect=n.newGroupGroupedSelect,a.groupSelectGroupClick=n.groupSelectGroupClick,a.radioRowCollection=n.radioRowCollection,a.newOptionRadio=n.newOptionRadio,n.resetAllTemporyModels(),\"none\"!==a.proxyModel.temporyConfig.selectedControl){for(var s=a.proxyModel.controls.length-1;s>=0;s--)a.proxyModel.controls[s].id===a.proxyModel.temporyConfig.selectedControl&&(a.modelproxyModel=a.proxyModel.controls[s]);\"BasicSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindBasicSelectFromProxyModel(a.basicSelectRowCollection),\"GroupedSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindGroupedSelectFromProxyModel(a.groupedSelectRowCollection,a.GroupedSelectGroups),\"Radio\"===a.proxyModel.temporyConfig.selectedControl&&n.bindRadioFromProxyModel(a.radioRowCollection)}a.updateSpecialControl=function(){return n.basicSelectRowCollection=a.basicSelectRowCollection,n.newOptionBasicSelect=a.newOptionBasicSelect,n.groupedSelectRowCollection=a.groupedSelectRowCollection,n.newOptionGroupedSelect=a.newOptionGroupedSelect,n.GroupedSelectGroups=a.GroupedSelectGroups,n.newGroupGroupedSelect=a.newGroupGroupedSelect,n.groupSelectGroupClick=a.groupSelectGroupClick,n.radioRowCollection=a.radioRowCollection,n.newOptionRadio=a.newOptionRadio,n.bindSpecialCtrlTemporyModelsToProxyModel(),!0},a.resetControl=function(){a.proxyModel.temporyConfig.formlyLabel=\"\",a.proxyModel.temporyConfig.formlyRequired=!1,a.proxyModel.temporyConfig.formlyPlaceholder=\"\",a.proxyModel.temporyConfig.formlyDesciption=\"\",a.proxyModel.temporyConfig.formlyOptions=[],a.proxyModel.temporyConfig.datepickerPopup=r()},a.selectThisControl=function(e){a.proxyModel.selectedControl=\"none\",i();for(var o=a.proxyModel.controls.length-1;o>=0;o--)a.proxyModel.controls[o].id===e&&(a.proxyModel.selectedControl=a.proxyModel.controls[o].id);\"Date\"===a.proxyModel.selectedControl&&r()},a.addNewOptionRadio=function(){var e=l.addNewOptionRadio(a.radioRowCollection,a.newOptionRadio.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionRadio={saisie:\"\"}},a.removeRadioRow=function(e){var t=l.removeOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRadioRow=function(e){var t=l.upthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRadioRow=function(e){var t=l.downthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.addNewOptionBasicSelect=function(){var e=l.addNewOptionBasicSelect(a.basicSelectRowCollection,a.newOptionBasicSelect.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionBasicSelect={saisie:\"\"}},a.removeRow=function(e){var t=l.removeOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRow=function(e){var t=l.upthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRow=function(e){var t=l.downthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.showGroupListToChoose=function(){a.groupSelectGroupClick.showList=!a.groupSelectGroupClick.showList},a.addNewGroupToGroupedSelect=function(){if(\"\"!==a.newGroupGroupedSelect.saisie){for(var e=a.GroupedSelectGroups.list.length-1;e>=0;e--)a.GroupedSelectGroups.list[e]===a.newGroupGroupedSelect.saisie&&o.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});a.GroupedSelectGroups.list.push(a.newGroupGroupedSelect.saisie)}else o.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});a.newGroupGroupedSelect.saisie=\"\"},a.addNewOptionGroupedSelect=function(){var e=l.addNewOptionGroupedSelect(a.groupedSelectRowCollection,a.newOptionGroupedSelect.saisie,\"\");e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionGroupedSelect={saisie:\"\"}},a.removeGroupedSelectRow=function(e){var t=l.removeOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisGroupedSelectRow=function(e){var t=l.upthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisGroupedSelectRow=function(e){var t=l.downthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.demodt={},a.today=function(){a.demodt.dt=new Date},a.today(),a.clear=function(){a.demodt.dt=null},a.open=function(e){e.preventDefault(),e.stopPropagation(),a.demodt.opened=!0},a.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},a.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"]}]),angular.module(\"edaApp.controllers.edaMainController\",[]).controller(\"edaMainController\",[function(){}]),angular.module(\"edaApp.directives.edaDdContentCounterDirective\",[]).directive(\"ddContentCounter\",[\"dragDropItemCounterService\",\"$timeout\",function(e,o){return{scope:{valueWhenPlaceholder:\"@ddValueWhenPlaceholder\",valueWhendragging:\"@ddValueWhenDragging\",fullModel:\"=ddFullModel\",currentIndex:\"@ddContentCounterCurrentIndex\",parentIndex:\"@ddContentCounterParentIndex\",forceRefresh:\"=ddContentCounterForceCssRefresh\"},restrict:\"A\",link:function(t,l){var n;t.$watch(function(){return l[0].children.length},function(i,r){if(i!==r){for(var a=0,s=[],d=l[0].children.length-1;d>=0;d--)e.isHtmlElementToCount(l[0].children[d].classList)?(a++,s.push({item:d,isReal:!0})):s.push({item:d,isReal:!1});t.contentRealCount=a,n=o(function(){e.updateLineItemCss(t.fullModel,s,t.parentIndex,t.currentIndex,a)},20)}}),t.$on(\"$destroy\",function(){console.warn(\"ddContentCounter timer destruction!\"),o.cancel(n)})}}}]),angular.module(\"edaApp.directives.edaDdDecorContainerDirective\",[]).directive(\"ddDecorContainer\",[function(){var e=['
','
{{currentTitle}}
',\"
\",'
',' ',\"
\"].join(\" \");return{scope:{styleParam:\"=ddContainerProperties\",isStillCollapsed:\"=ddContainerIsCollpased\",verboseMode:\"@ddContainerVerboseMode\",currentIndex:\"@ddContainerCurrentIndex\",collpaseAll:\"&ddCollapseAll\"},restrict:\"A\",template:e,transclude:!0,controller:function(e){e.config={isEnabled:!1},e.collapseFct=function(){e.collpaseAll({exceptThisOne:e.styleParam.WhenIndex}),e.isCollapsed=!e.isCollapsed,e.isStillCollapsed=e.isCollapsed},e.icons={closedClass:\"glyphicon glyphicon-eye-open\",opened:\"glyphicon glyphicon-eye-close\"},e.currentIconClass=function(){return e.isCollapsed?e.icons.closedClass:e.icons.opened}},link:function(e,o,t,l,n){var i=e.verboseMode,r=e.currentIndex;if(e.isCollapsed=!1,\"\"!==i){var a=angular.lowercase(i);(\"true\"===a||\"1\"===a)&&console.dir({whoAmI:\"I am verbose from ddDecorContainer link\",verbodeMode:a,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:r,styleParam:e.styleParam,columnindex:e.$parent.$parent.$parent.$parent.$index})}e.$watch(function(){return e.isStillCollapsed},function(o,t){o!==t&&0===e.$parent.$parent.$index&&(e.isCollapsed=o)}),e.config.isEnabled=!1,\"undefined\"!=typeof r&&\"\"!==r&&\"0\"===r&&\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title,e.config.isEnabled=!0,e.isCollapsed=!0),n(e.$parent,function(e){var t=angular.element(o.children()[1]);t.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorDropZoneDirective\",[]).directive(\"ddDecorDropZone\",[function(){var e=['
','
','
','
','
',' ',\" {{currentTitle}}\",'
',' \",\"
\",\"
\",\"
\",'
','
','
',\"
\",\"
\",\"
\",\"
\",\"
\",\"
\"].join(\" \");return{scope:{styleParam:\"=ddDropZoneProperties\",verboseMode:\"@ddDropZoneVerboseMode\",currentIndex:\"@ddDropZoneCurrentIndex\",addNewLineFct:\"&ddDropZoneAddNewLine\"},restrict:\"A\",template:e,transclude:!0,link:function(e){var o=e.verboseMode,t=e.currentIndex;if(e.headerConfig={HeaderButtonVisible:!1,affixAttr:\"bs-affix\",affixEnabled:!1},\"\"!==o){var l=angular.lowercase(o);(\"true\"===l||\"1\"===l)&&console.dir({whoAmI:\"I am verbose from ddDecorDropZone link\",verbodeMode:l,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:t,styleParam:e.styleParam})}\"undefined\"!=typeof t&&\"\"!==t&&(\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title),\"undefined\"!=typeof e.styleParam.fontAwesomeIcon&&(e.currentFontAwesome=e.styleParam.fontAwesomeIcon),\"1\"===t&&(e.headerConfig.HeaderButtonVisible=!0))}}}]),angular.module(\"edaApp.directives.edaDdDecorItemDirective\",[]).directive(\"ddDecorItem\",[\"dragDropConfig\",function(e){var o=[\"
\",' ',\"
\"].join(\" \");return{scope:{verboseMode:\"@ddItemVerboseMode\",currentIndex:\"@ddItemCurrentIndex\",parentIndex:\"@ddItemParentIndex\",parentParentIndex:\"@ddItemParentParentIndex\",lineItemsCount:\"@ddItemsCount\",cssClass:\"@ddItemCssClass\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex,d=e.getDistinctItemCssClass();if(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(o.cssClass),o.$watch(\"cssClass\",function(e,o){e!==o&&(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(e))}),\"\"!==r){var c=angular.lowercase(r);(\"true\"===c||\"1\"===c)&&console.dir({whoAmI:\"I am verbose from ddDecorItem directive link\",verbodeMode:c,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,parentParentIndex:o.parentParentIndex,currentIndex:a,lineItemsCount:o.lineItemsCount})}\"0\"===o.parentParentIndex&&t.addClass(d[0]),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorLineDirective\",[]).directive(\"ddDecorLine\",[\"$timeout\",function(e){var o=['
',' ',\"
\",'
'].join(\" \");return{scope:{verboseMode:\"@ddLineVerboseMode\",currentIndex:\"@ddLineCurrentIndex\",parentIndex:\"@ddLineParentIndex\",removeLine:\"&ddRemoveLine\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex;if(o.deleteLine={},o.deleteLine.readyToDelete=!1,o.deleteLine.dblClickCount=0,o.isCollapsed=!1,\"\"!==r){var d=angular.lowercase(r);(\"true\"===d||\"1\"===d)&&console.dir({whoAmI:\"I am verbose from ddDecorLine directive link\",verbodeMode:d,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,currentIndex:a})}o.removeMe=function(t){t.preventDefault(),t.stopPropagation(),\"1\"===o.parentIndex&&(1===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1,o.removeLine(),e.cancel(c)),0===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=o.deleteLine.dblClickCount+1,o.deleteLine.readyToDelete=!0))};var c;o.cancelDelete=function(t){c=e(function(){o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1},500)},o.$on(\"$destroy\",function(){e.cancel(c)}),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdNoEditableControlDirective\",[]).directive(\"ddNoEditableControl\",[function(){return{restrict:\"A\",link:function(e,o){o.on(\"click\",function(e){e.preventDefault()})}}}]),angular.module(\"edaApp.directives\",[\"edaApp.directives.edaStRationDirective\",\"edaApp.directives.edaDdDecorDropZoneDirective\",\"edaApp.directives.edaDdDecorContainerDirective\",\"edaApp.directives.edaDdDecorLineDirective\",\"edaApp.directives.edaDdDecorItemDirective\",\"edaApp.directives.edaDdNoEditableControlDirective\",\"edaApp.directives.edaDdContentCounterDirective\",\"edaApp.directives.edaRightClickDirective\"]),angular.module(\"edaApp.directives.edaRightClickDirective\",[]).directive(\"edaRightClick\",[\"$parse\",function(e){return{restrict:\"A\",link:function(o,t,l){var n=e(l.edaRightClick),i=e(l.edaRightClickColIndex),r=e(l.edaSetRightClicked);t.on(\"contextmenu\",function(e){o.$apply(function(){e.preventDefault(),1===i(o)&&r(o,{}),1===i(o)&&n(o,{$event:e})})})}}}]),angular.module(\"edaApp.directives.edaStRationDirective\",[]).directive(\"stRatio\",[function(){return{restrict:\"A\",link:function(e,o,t){var l=+t.stRatio;o.css(\"width\",l+\"%\")}}}]),angular.module(\"edaApp.services.dragDropItemCountersService\",[]).factory(\"dragDropItemCounterService\",[\"dragDropConfig\",function(e){var o=[],t=angular.copy(e.getItemsNotToCount()),l={};return l.getItemsNotToCount=function(){return t},l.getModelItemsRealCounter=function(){return o},l.isHtmlElementToCount=function(e){var o=!0;return e.length>0&&angular.forEach(t,function(t){for(var l=e.length-1;l>=0;l--)e[l]===t&&(o&=!1)}),o},l.updateLineItemCss=function(o,t,l,n,i){if(\"undefined\"!=typeof o&&\"undefined\"!=typeof t&&\"undefined\"!=typeof l&&\"undefined\"!=typeof n&&\"undefined\"!=typeof i){for(var r=o[l][n].length-1;r>=0;r--)for(var a=0;a=0;r--)o[t][l][r].cssClass=e.getItemCssDependingNumberItemsInRow(n);return!0}return!1},t.updateCssClassWholeColumn=function(o,t){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof o){for(var l=o[t].length-1;l>=0;l--)for(var n=o[t][l].length-1;n>=0;n--)o[t][l][n].cssClass=e.getItemCssDependingNumberItemsInRow(o[t][l].length);return!0}return!1},t}]),angular.module(\"edaApp.services.dragDropModelConfigModelProxyService\",[]).factory(\"ddModelConfModelProxyService\",[\"EasyFormGenFormlyBindingModels\",\"controllerModalProxy\",\"$parse\",function(e,o,t){function l(o){var l={},n=e.getEasyFormListControls(),i=t(\"controls\");return angular.forEach(i(n),function(e){e.id===o.control&&(l=e)}),l}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)\"undefined\"!=typeof o.lines[l].columns[n].control&&o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(e,o){var t=e+\"-\"+Date.now();return n(t,o)===!0?t:(t=e+\"-\"+Date.now(),n(t,o)===!0?t:t=e+\"-\"+Date.now())}function r(e,o,t){angular.forEach(t.lines,function(t,l){l===o&&(t.line=e)})}function a(e,o,l){t(\"control.selectedControl\").assign(o,t(\"selectedControl\")(e)),t(\"control.type\").assign(o,t(\"formlyType\")(e)),t(\"control.key\").assign(o,i(t(\"control.type\")(o),l)),t(\"control.subtype\").assign(o,t(\"formlySubtype\")(e)),t(\"control.templateOptions.label\").assign(o,t(\"formlyLabel\")(e)),t(\"control.templateOptions.required\").assign(o,t(\"formlyRequired\")(e)),t(\"control.templateOptions.description\").assign(o,t(\"formlyDesciption\")(e)),t(\"control.templateOptions.placeholder\").assign(o,t(\"formlyPlaceholder\")(e)),t(\"control.templateOptions.options\").assign(o,t(\"formlyOptions\")(e)),\"datepicker\"===t(\"control.type\")(o)&&t(\"control.templateOptions.datepickerPopup\").assign(o,t(\"datepickerPopup\")(e))}var s={};return s.refreshAllConfigurationFromDragAndDropModel=function(o,t){angular.copy(o);return o.lines=[],angular.forEach(t[1],function(t,n){o.lines.push(angular.copy(e.getEasyFormEmptyConfigurationLineModel())),r(n+1,n,o),angular.forEach(t,function(i,r){var s={control:angular.copy(e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType))},d=l(t[r]);if(\"undefined\"!=typeof i.key){console.warn(\"debug dragdropModel show this control key : \"+i.key),s.control=angular.copy(i.configModelControl);var c=e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType);s.control.className=c.className,s.control.cssClass=c.className}else a(d,s,o);\"undefined\"==typeof o.lines[n].columns[r]&&o.lines[n].columns.push(angular.copy(e.getEasyFormConfigurationEmptyControlModel())),o.lines[n].columns[r].control=angular.copy(s.control),o.lines[n].columns[r].numColumn=r+1,o.lines[n].columns[r].exist=!0})}),o},s.refreshControlsKeys=function(e,o){angular.forEach(e.lines,function(e,t){angular.forEach(e.columns,function(e,l){\"undefined\"!=typeof o[1][t]&&o[1][t].length>0&&(o[1][t][l].key=e.control.key,o[1][t][l].configModelControl=angular.copy(e.control))})}),console.info(\"refreshControlsKeys\"),console.dir({when:\"starting\",\"configModel is \":angular.copy(e),\"dragDropModel is \":angular.copy(o)})},s}]),angular.module(\"edaApp.services.edaEditCtrlControllerModalProxy\",[]).factory(\"controllerModalProxy\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(o){var t=e.getEasyFormListControls();return angular.copy(t,o),!0}function t(){var o=e.getEasyFormListControls();return r.proxyModel=angular.copy(o),!0}function l(e){for(var o={selectedControl:\"none\",formlyType:\"none\",formlySubtype:\"none\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[]},t=e.controls.length-1;t>=0;t--)e.selectedControl===e.controls[t].id&&(o.selectedControl=e.selectedControl,o.formlyType=e.controls[t].formlyType,o.formlySubtype=e.controls[t].formlySubtype,o.formlyLabel=e.controls[t].formlyLabel,o.formlyRequired=e.controls[t].formlyRequired,o.formlyDesciption=e.controls[t].formlyDesciption,o.formlyPlaceholder=e.controls[t].formlyPlaceholder,o.formlyOptions=e.controls[t].formlyOptions,\"datepicker\"===e.controls[t].formlyType&&(o.datepickerPopup=e.controls[t].datepickerPopup));return o}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(o){var t=\"none\",l=angular.copy(e.getEasyFormListControls().controls);return l.forEach(function(e){return e.formlyType===o.type&&e.formlySubtype===o.subtype?t=e.id:void 0}),t}var r={};r.ProxyModel={},t(),r.initNyaSelect=function(e){return o(e)},r.getNyASelectFromSelectedLineColumn=function(e,t,l,n){return o(e),\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions&&(e.temporyConfig.selectedControl=\"undefined\"!=typeof t.lines[l].columns[n].control.selectedControl?t.lines[l].columns[n].control.selectedControl:\"none\",e.temporyConfig.formlyLabel=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.label?t.lines[l].columns[n].control.templateOptions.label:\"\",e.temporyConfig.formlyRequired=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.required?t.lines[l].columns[n].control.templateOptions.required:\"\",e.temporyConfig.formlyDesciption=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.description?t.lines[l].columns[n].control.templateOptions.description:\"\",e.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.placeholder?t.lines[l].columns[n].control.templateOptions.placeholder:\"\",e.temporyConfig.formlyOptions=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.options?t.lines[l].columns[n].control.templateOptions.options:\"\",\"Date\"===e.temporyConfig.selectedControl&&(e.temporyConfig.datepickerPopup=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.datepickerPopup?t.lines[l].columns[n].control.templateOptions.datepickerPopup:\"\")),e},r.bindConfigurationModelFromModalReturn=function(e,o,t,i){var r=l(t);i.lines[e].columns[o].control.selectedControl=r.selectedControl,i.lines[e].columns[o].control.type=r.formlyType,i.lines[e].columns[o].control.subtype=r.formlySubtype,i.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},i.lines[e].columns[o].control.templateOptions.label=r.formlyLabel,i.lines[e].columns[o].control.templateOptions.required=r.formlyRequired,i.lines[e].columns[o].control.templateOptions.description=r.formlyDesciption,i.lines[e].columns[o].control.templateOptions.placeholder=r.formlyPlaceholder,i.lines[e].columns[o].control.templateOptions.options=r.formlyOptions,\"datepicker\"===i.lines[e].columns[o].control.type&&(i.lines[e].columns[o].control.templateOptions.datepickerPopup=r.datepickerPopup);var a=i.lines[e].columns[o].control.type+\"-\"+Date.now();n(a,i)===!0?i.lines[e].columns[o].control.key=a:(a=i.lines[e].columns[o].control.type+\"-\"+Date.now(),n(a,i)===!0?i.lines[e].columns[o].control.key=a:a=i.lines[e].columns[o].control.type+\"-\"+Date.now()),i.lines[e].columns[o].control.edited=!0},r.applyConfigToSelectedControl=function(e){for(var o=e.controls.length-1;o>=0;o--)e.controls[o].id===e.selectedControl&&(e.controls[o].formlyLabel=e.temporyConfig.formlyLabel,e.controls[o].formlyRequired=e.temporyConfig.formlyRequired,e.controls[o].formlyDesciption=e.temporyConfig.formlyDesciption,e.controls[o].formlyPlaceholder=e.temporyConfig.formlyPlaceholder,e.controls[o].formlyOptions=e.temporyConfig.formlyOptions,\"Date\"===e.controls[o].id&&(e.controls[o].datepickerPopup=e.temporyConfig.datepickerPopup))},r.initProxyModel=function(e){return t(e)},r.bindConfigurationModelFromProxyModel=function(e,o,t){var l=angular.copy(r.proxyModel.temporyConfig);console.warn(\"debug edaEditCtrlControllerModalProxy\"),console.dir(l),t.lines[e].columns[o].control.selectedControl=l.selectedControl,t.lines[e].columns[o].control.type=l.formlyType,t.lines[e].columns[o].control.subtype=l.formlySubtype,t.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},t.lines[e].columns[o].control.templateOptions.label=l.formlyLabel,t.lines[e].columns[o].control.templateOptions.required=l.formlyRequired,t.lines[e].columns[o].control.templateOptions.description=l.formlyDesciption,t.lines[e].columns[o].control.templateOptions.placeholder=l.formlyPlaceholder,t.lines[e].columns[o].control.templateOptions.options=l.formlyOptions,\"datepicker\"===t.lines[e].columns[o].control.type&&(t.lines[e].columns[o].control.templateOptions.datepickerPopup=l.datepickerPopup);var i=t.lines[e].columns[o].control.type+\"-\"+Date.now();n(i,t)===!0?t.lines[e].columns[o].control.key=i:(i=t.lines[e].columns[o].control.type+\"-\"+Date.now(),n(i,t)===!0?t.lines[e].columns[o].control.key=i:i=t.lines[e].columns[o].control.type+\"-\"+Date.now()),t.lines[e].columns[o].control.edited=!0},r.setProxyModelFromConfigurationSelection=function(e,o,t){return\"undefined\"!=typeof e.lines[o].columns[t].control&&(r.proxyModel.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.formlyType=\"undefined\"!=typeof e.lines[o].columns[t].control.type?e.lines[o].columns[t].control.type:\"none\",r.proxyModel.temporyConfig.formlySubtype=\"undefined\"!=typeof e.lines[o].columns[t].control.subtype?e.lines[o].columns[t].control.subtype:\"none\",r.proxyModel.temporyConfig.formlyLabel=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.label?e.lines[o].columns[t].control.templateOptions.label:\"\",r.proxyModel.temporyConfig.formlyRequired=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.required?e.lines[o].columns[t].control.templateOptions.required:\"\",r.proxyModel.temporyConfig.formlyDesciption=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.description?e.lines[o].columns[t].control.templateOptions.description:\"\",r.proxyModel.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.placeholder?e.lines[o].columns[t].control.templateOptions.placeholder:\"\",r.proxyModel.temporyConfig.formlyOptions=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.options?e.lines[o].columns[t].control.templateOptions.options:\"\",\"Date\"===r.proxyModel.temporyConfig.selectedControl&&(r.proxyModel.temporyConfig.datepickerPopup=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.datepickerPopup?e.lines[o].columns[t].control.templateOptions.datepickerPopup:\"\")),r.proxyModel},r.getProxyModel=function(){return r.proxyModel};var a={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}};r.getEditPanelModelAllModel=function(){return a},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a=angular.copy(e),o=!0),o},r.getEditPanelModelColumnIndex=function(){return a.columnIndex},r.setEditPanelModelColumnIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.columnIndex=e,o=!0),o},r.getEditPanelModelLineIndex=function(){return a.lineIndex},r.setEditPanelModelLineIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.lineIndex=e,o=!0),o},r.getEditPanelModelControl=function(){return a.control},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.control=angular.copy(e),o=!0),o},r.getEditPanelModelToggle=function(){return a.toggle},r.setEditPanelModelToggle=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.toggle=e,o=!0),o};var s={rows:[]};return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),r.resetAllTemporyModels=function(){return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),!0},r.bindSpecialCtrlTemporyModelsToProxyModel=function(){\n\"BasicSelect\"===r.proxyModel.selectedControl&&r.bindBasicSelectToProxyModel(r.basicSelectRowCollection),\"GroupedSelect\"===r.proxyModel.selectedControl&&r.bindGroupedSelectToProxyModel(r.groupedSelectRowCollection),\"Radio\"===r.proxyModel.selectedControl&&r.bindRadioToProxyModel(r.radioRowCollection)},r.bindBasicSelectFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindBasicSelectToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r.bindGroupedSelectFromProxyModel=function(e,o){if(r.proxyModel.temporyConfig.formlyOptions.length>0){for(var t=0;t<=r.proxyModel.temporyConfig.formlyOptions.length-1;t++){var l={option:r.proxyModel.temporyConfig.formlyOptions[t].name,order:t,group:r.proxyModel.temporyConfig.formlyOptions[t].group};e.rows.push(l)}var n=_.uniq(_.pluck(e.rows,\"group\"));angular.copy(n,o.list)}},r.bindGroupedSelectToProxyModel=function(e){r.proxyModel.temporyConfig.formlyOptions=[];for(var o=0;o<=e.rows.length-1;o++){var t={name:e.rows[o].option,value:o,group:e.rows[o].group};r.proxyModel.temporyConfig.formlyOptions.push(t)}},r.bindRadioFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindRadioToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r}]),angular.module(\"edaApp.services.formFieldManage\",[]).factory(\"formFieldManage\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(e){var o=[];angular.copy(o,e)}function t(o,t,l){var n=t.lines[l].columns.length,i=o.push({className:\"row\",fieldGroup:[]})-1;t.lines[l].columns.forEach(function(t,l){var r={};if(\"undefined\"!=typeof r&&\"none\"!==t.control.type){if(\"header\"===t.control.type||\"subTitle\"===t.control.type){var a=t.control.templateOptions.description;r.template=e.getHeaderTemplateForNcolumnLine(n,a).template,r.className=e.getRawHeaderTemplates().selectedClass}else r=e.getFormlyControlTemplateForNcolumnLine(n,t.control.type),r.className=t.control.className,r.type=t.control.type,r.key=t.control.key,r.templateOptions.type=t.control.templateOptions.type,r.templateOptions.label=t.control.templateOptions.label,r.templateOptions.required=t.control.templateOptions.required,r.templateOptions.placeholder=t.control.templateOptions.placeholder,r.templateOptions.description=t.control.templateOptions.description,r.templateOptions.options=[].concat(t.control.templateOptions.options),\"undefined\"!=typeof r.templateOptions.datepickerPopup&&(t.control.templateOptions.datepickerPopup=r.templateOptions.datepickerPopup);o[i].fieldGroup.push(r)}})}function l(e){var o={};return angular.copy(o,e),!0}function n(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!1,t.title=e,t.Message=o,t}function i(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!0,t.title=e,t.Message=o,t}var r={};return r.initConfigurationEditFromScratch=function(o,t){var l=e.getEasyFormInitialStateConfigurationModel(t);angular.copy(l,o)},r.bindConfigurationLines=function(o,t,l){if(\"[object Array]\"===Object.prototype.toString.call(t)){var r=e.getEasyFormReloadConfigurationModel(l);return r.lines=[].concat(t),angular.copy(r,o),i(\"configuration model is bound\",\"lines are bound to configuration model.\")}return n(\"lines is not an array\",\"Checks lines type, it is not an array.\")},r.applyConfigurationToformlyModel=function(e,n,i){o(n),l(i);for(var r=e.lines.length,a=0;r>a;a++)t(n,e,a)},r}]),angular.module(\"edaApp.services.formsByIdService\",[\"ngResource\"]).factory(\"formsByIdService\",[\"$resource\",function(e){return e(\"/api/formGen/:id\",{id:\"@id\"},{})}]),angular.module(\"edaApp.services.selectOptionManage\",[]).factory(\"selectOptionManage\",[function(){function e(e,o){var t={resultFlag:!1,details:\"\"};if(\"undefined\"==typeof o)return t.resultFlag=!1,t.details=\"Entered option is empty\",t;if(\"\"!==o){for(var l=e.rows.length-1;l>=0;l--)if(e.rows[l].option===o)return t.resultFlag=!1,t.details=\"Entered option is not unique\",t;return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Entered option is empty\",t}function o(e){var o={rows:[]};angular.copy(o,e)}return{testMe:function(){return\"selectOptionManage is here.\"},initModel:function(e){o(e)},isOptionUnique:function(e,o){for(var t=e.rows.length-1;t>=0;t--)if(e.rows[t].option===o)return!1;return!0},isOptionValidFormat:function(e){return\"\"!==e?!0:!1},addNewOptionRadio:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionBasicSelect:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionGroupedSelect:function(o,t,l){var n={resultFlag:!1,details:\"\"},i=e(o,t);if(i.resultFlag===!0){var r={option:t,group:l,order:o.rows.length};return o.rows.push(r),n.resultFlag=!0,n.details=\"\",n}return angular.copy(i,n),n},removeOption:function(e,o){var t={resultFlag:!1,details:\"\"};return-1!==o?(e.rows.splice(o,1),t.resultFlag=!0,t.details=\"\",t):(t.resultFlag=!1,t.details=\"Option index not valid\",t)},upthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o>0){if(e.rows[o-1]){var l=e.rows[o];return e.rows.splice(o,1),e.rows.splice(o-1,0,l),t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Can't retreive option from option index\",t}return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Option index not valid\",t},downthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o','\t\",'\t\",\"
\",\" \"].join(\"\")},a={className:[\"col-xs-12\",\"col-xs-6\",\"col-xs-4\"],type:\"\",key:\"\",templateOptions:{type:\"\",label:\"\",required:\"\",placeholder:\"\",description:\"\",options:\"\"}},s=[{controlType:\"datepicker\",properties:[{isRoot:!1,isTemplateOptions:!0,value:\"datepickerPopup\"}]}];this.getAllParticularControlProperties=function(){return s},this.addParticularControlProperties=function(e){if(\"controlType\"in e&&\"properties\"in e){var o=!1;s.length>0&&s.forEach(function(t){t.controlType===e.controlType&&(t.properties=[].concat(e.properties),o=!0)}),o||s.push(e)}return s},this.getEasyFormListControls=function(){return e},this.addEasyFormControlToList=function(o){\"undefined\"!=typeof o&&e.controls.push(o)},this.getHeaderTemplates=function(){return r},this.addHeaderTemplateCssClass=function(e){\"undefined\"!=typeof e&&r.cssClass.push(e)},this.getFormlyControlTemplate=function(){return a},this.addformlyControlTemplatesCssClass=function(e){\"undefined\"!=typeof e&&a.className.push(e)},this.setFormlyControlTemplate=function(e){return\"className\"in e&&\"type\"in e&&\"key\"in e&&\"templateOptions\"in e&&(a=angular.copy(e)),!0},this.$get=[function(){var d={};return d.getEasyFormListControls=function(){return e},d.getEasyFormInitialStateConfigurationModel=function(e){var o=angular.copy(l);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormReloadConfigurationModel=function(e){var o=angular.copy(i);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormEmptyConfigurationLineModel=function(){return o},d.getEasyFormConfigurationEmptyControlModel=function(){return t},d.getRawHeaderTemplates=function(){return r},d.getHeaderTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&\"undefined\"!=typeof o&&e===parseInt(e,10)&&e<=r.cssClass.length){var t={};return t.className=r.cssClass[e-1],r.textContent=o,r.selectedClass=t.className,t.template=[r.simpleHtml1,o,r.simpleHtml2].join(\"\"),t}},d.getRawFormlyControlTemplates=function(){return a},d.getFormlyControlTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&e===parseInt(e,10)&&e<=a.className.length){var t=angular.copy(a);return t.className=a.className[e-1],\"undefined\"!=typeof o&&s.forEach(function(e){e.controlType===o&&e.properties.forEach(function(e){e.isRoot&&(t[e.value]=\"\"),e.isTemplateOptions&&(t.templateOptions[e.value]=\"\")})}),t}},d}]}]),angular.module(\"edaApp.providers\",[\"edaApp.providers.dragDropConfigProvider\",\"edaApp.providers.EasyFormGenFormlyBindingModels\",function(){}]),angular.module(\"edaApp.controllers\",[\"edaApp.controllers.edaMainController\",\"edaApp.controllers.edaEditController\",\"edaApp.controllers.edaEditMODALController\",\"edaApp.controllers.edaEditPanelController\"]),angular.module(\"edaApp.controllers.edaEditController\",[]).controller(\"edaEditController\",[\"$scope\",\"easyFormGenVersion\",\"$filter\",\"$anchorScroll\",\"toaster\",\"$timeout\",\"$modal\",\"$log\",\"formFieldManage\",\"formsByIdService\",\"controllerModalProxy\",\"dragDropItemDecorationService\",\"dragDropConfig\",\"ddModelConfModelProxyService\",\"ddItemRightClickedManager\",function(e,o,t,l,n,i,r,a,s,d,c,p,u,m,f){function g(){n.pop({type:\"info\",timeout:2e3,title:\"should save data model if it were not a static example\",body:\"data :\"+t(\"json\")(e.vm.model,4),showCloseButton:!0})}function y(){s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)}e.easyFormGeneratorVERSION=o,e.tab={editTab:{active:!0},previewTab:{active:!1}},e.vm=this,e.vm.model={},e.vm.wfFormFields=[],e.vm.wfFormFieldsOnlyNeededProperties=[],e.ihm={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},e.easyFormDragDropProperties=u.getDragDropConfigModel(),e.dragDropModel=[].concat(u.getDragDropPresentationModel()),e.numberOfColumns=1,e.MaxNumberOfColumns=3,e.MinNumberOfColumns=1,e.configuration={},s.initConfigurationEditFromScratch(e.configuration,!1),c.initProxyModel(),e.collapseAllGroupControl=function(o){angular.forEach(e.easyFormDragDropProperties.containerConfig.decoration,function(t){t.WhenIndex!==o&&u.setDragDropConfigContainerDecorationCollapse(e.easyFormDragDropProperties,t.WhenIndex,!0)})},e.vm.onSubmit=g,e.resetToZeroModel=function(){return e.configuration.activeLine=1,e.configuration.lines.length>1&&e.configuration.lines.splice(1,e.configuration.lines.length-2),e.countConfigurationModelLines()},e.countConfigurationModelLines=function(){return e.configuration.lines.length},e.setActiveLineNumber=function(o){o<=e.countConfigurationModelLines()&&(e.configuration.activeLine=o)},e.upThisLine=function(o){if(o>-1&&e.configuration.lines[o-1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o-1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.downThisLine=function(o){if(o>-1&&e.configuration.lines[o+1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o+1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.removeThisLine=function(o){o>-1&&(e.configuration.lines.length>1?(e.configuration.activeLine===o+1&&(e.configuration.activeLine=1),e.configuration.lines.splice(o,1)):i(function(){n.pop({type:\"warning\",title:\"Last line\",body:\"Can't delete the last line\",showCloseButton:!0})},100),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields))},e.increaseNumberOfColumns=function(){if(e.configuration.lines[e.configuration.activeLine-1].columns.length1&&e.configuration.lines[e.configuration.activeLine-1].columns.splice(e.configuration.lines[e.configuration.activeLine-1].columns.length-1,1),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.saveThisForm=function(){if(\"undefined\"==typeof e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is undefined\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;if(\"\"===e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is required\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;n.pop({type:\"wait\",timeout:1e4,title:\"Form is being saved\",body:\"Wait.\",showCloseButton:!0});var o=new d;return o.formName=e.configuration.formName,o.submitButtonText=e.configuration.submitButtonText,o.cancelButtonText=e.configuration.cancelButtonText,o.formlyField=JSON.stringify(e.configuration.lines),n.clear(),n.pop({type:\"info\",timeout:2e3,title:\"Form would be saved if it were not a static example\",body:\"\",showCloseButton:!0}),!0},e.nyaSelect={},c.initNyaSelect(e.nyaSelect),e.animationsEnabled=!0,e.showModalAddCtrlToColumn=function(o,t,l){var n=r.open({animation:e.animationsEnabled,templateUrl:\"editModalTemplate.html\",controller:\"edaEditMODALController\",size:\"lg\",resolve:{nyaSelect:function(){return c.getNyASelectFromSelectedLineColumn(e.nyaSelect,e.configuration,t,l)}}});n.result.then(function(o){c.bindConfigurationModelFromModalReturn(t,l,o,e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},function(){a.info(\"Modal dismissed at: \"+new Date)})},e.dragoverCallbackContainer=function(e,o,t){return 0===t?!1:!0},e.dropCallback=function(o,t,l,n,r,a){if(n){if(\"itemType\"===a&&!l.label)return!1;if(\"containerType\"===a&&!angular.isArray(l))return!1}var d=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return e.$on(\"$destroy\",function(){i.cancel(d)}),l},e.dndItemMoved=function(o,t,l){o>0&&e.dragDropModel[o][t].splice(l,1)},e.dragoverCallbackItems=function(e,o,t,l){return 0===o?!1:!0},e.disableItemDropIf=function(){},e.dropCallbackItems=function(o,t,l,n,r,a,d,c,p,u){if(c){if(\"itemType\"===u&&!d.label)return!1;if(\"containerType\"===u&&!angular.isArray(d))return!1}var g=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return f.setUnRightClicked(d),e.$on(\"$destroy\",function(){i.cancel(g)}),d},e.editPanelModel={toggle:!1},e.saveFromEditPanel=function(){c.bindSpecialCtrlTemporyModelsToProxyModel(),c.bindConfigurationModelFromProxyModel(c.getEditPanelModelLineIndex(),c.getEditPanelModelColumnIndex(),e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),f.resetAllDragDropItemSelectedState(e.dragDropModel)},e.closeEditPanel=function(){f.resetAllDragDropItemSelectedState(e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.debugProxyModel=c.ProxyModel,e.setRightClicked=function(e,o){o.rightCliked=!0},e.toggleEditPanel=function(o,t,l,n){if(f.resetAllDragDropItemSelectedState(e.dragDropModel),c.getEditPanelModelToggle()){if(c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),\"undefined\"!=typeof c.getEditPanelModelLineIndex()&&\"undefined\"!=typeof c.getEditPanelModelColumnIndex()&&\"undefined\"!=typeof c.getEditPanelModelControl())if(c.getEditPanelModelLineIndex()===t&&c.getEditPanelModelColumnIndex()===l&&angular.equals(c.getEditPanelModelControl(),n));else{n.rightCliked=!0;var r=i(function(){c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},200);e.$on(\"$destroy\",function(){i.cancel(r)})}}else n.rightCliked=!0,c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.removeThisLine=function(o){e.dragDropModel[1].splice(o,1)},e.model=[],e.insertNewLine=function(){y(),e.dragDropModel[1].push([])}}]),angular.module(\"edaApp.controllers.edaEditMODALController\",[]).controller(\"edaEditMODALController\",[\"$scope\",\"$modalInstance\",\"nyaSelect\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n,i,r){function a(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.radioRowCollection.rows.push(t)}}function s(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.radioRowCollection.rows.length>0)for(var t=0;t<=e.radioRowCollection.rows.length-1;t++){var l={name:e.radioRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function d(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.basicSelectRowCollection.rows.push(t)}}function c(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.basicSelectRowCollection.rows.length>0)for(var t=0;t<=e.basicSelectRowCollection.rows.length-1;t++){var l={name:e.basicSelectRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function p(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0){for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:e.nyaSelect.temporyConfig.formlyOptions[o].group};e.groupedSelectRowCollection.rows.push(t)}var l=_.uniq(_.pluck(e.groupedSelectRowCollection.rows,\"group\"));angular.copy(l,e.GroupedSelectGroups.list)}}function u(){e.nyaSelect.temporyConfig.formlyOptions=[];for(var o=0;o<=e.groupedSelectRowCollection.rows.length-1;o++){var t={name:e.groupedSelectRowCollection.rows[o].option,value:o,group:e.groupedSelectRowCollection.rows[o].group};e.nyaSelect.temporyConfig.formlyOptions.push(t)}}function m(){e.nyaSelect.temporyConfig.datepickerPopup=e.demodt.formats[0]}function f(){e.nyaSelect.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}var g={rows:[]};if(e.radioRowCollection=g,e.newOptionRadio={saisie:\"\"},e.addNewOptionRadio=function(){var o=i.addNewOptionRadio(e.radioRowCollection,e.newOptionRadio.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionRadio={saisie:\"\"}},e.removeRadioRow=function(o){var t=i.removeOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRadioRow=function(o){var t=i.upthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRadioRow=function(o){var t=i.downthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.basicSelectRowCollection=g,e.newOptionBasicSelect={saisie:\"\"},e.addNewOptionBasicSelect=function(){var o=i.addNewOptionBasicSelect(e.basicSelectRowCollection,e.newOptionBasicSelect.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionBasicSelect={saisie:\"\"}},e.removeRow=function(o){var t=i.removeOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRow=function(o){var t=i.upthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRow=function(o){var t=i.downthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({\ntype:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.groupedSelectRowCollection=g,e.newOptionGroupedSelect={saisie:\"\"},e.GroupedSelectGroups={list:[]},e.newGroupGroupedSelect={saisie:\"\"},e.groupSelectGroupClick={showList:!1},e.showGroupListToChoose=function(){e.groupSelectGroupClick.showList=!e.groupSelectGroupClick.showList},e.addNewGroupToGroupedSelect=function(){if(\"\"!==e.newGroupGroupedSelect.saisie){for(var o=e.GroupedSelectGroups.list.length-1;o>=0;o--)e.GroupedSelectGroups.list[o]===e.newGroupGroupedSelect.saisie&&l.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});e.GroupedSelectGroups.list.push(e.newGroupGroupedSelect.saisie)}else l.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});e.newGroupGroupedSelect.saisie=\"\"},e.addNewOptionGroupedSelect=function(){var o=i.addNewOptionGroupedSelect(e.groupedSelectRowCollection,e.newOptionGroupedSelect.saisie,\"\");o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionGroupedSelect={saisie:\"\"}},e.removeGroupedSelectRow=function(o){var t=i.removeOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisGroupedSelectRow=function(o){var t=i.upthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisGroupedSelectRow=function(o){var t=i.downthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.demodt={},e.today=function(){e.demodt.dt=new Date},e.today(),e.clear=function(){e.demodt.dt=null},e.open=function(o){o.preventDefault(),o.stopPropagation(),e.demodt.opened=!0},e.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},e.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"],e.nyaSelect=t,e.nyaSelect.selectedControl=e.nyaSelect.temporyConfig.selectedControl,\"none\"!==t.selectedControl){for(var y=e.nyaSelect.controls.length-1;y>=0;y--)e.nyaSelect.controls[y].id===t.selectedControl&&(e.modelNyaSelect=t.controls[y]);\"BasicSelect\"===e.nyaSelect.selectedControl&&d(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&p(),\"Radio\"===e.nyaSelect.selectedControl&&a()}e.selectThisControl=function(o){e.nyaSelect.selectedControl=\"none\",f();for(var t=e.nyaSelect.controls.length-1;t>=0;t--)e.nyaSelect.controls[t].id===o&&(e.nyaSelect.selectedControl=e.nyaSelect.controls[t].id);\"Date\"===e.nyaSelect.selectedControl&&m()},e.ok=function(){\"BasicSelect\"===e.nyaSelect.selectedControl&&c(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&u(),\"Radio\"===e.nyaSelect.selectedControl&&s(),r.applyConfigToSelectedControl(e.nyaSelect),o.close(e.nyaSelect)},e.cancel=function(){o.dismiss(\"cancel\")}}]),angular.module(\"edaApp.controllers.edaEditPanelController\",[]).controller(\"edaEditPanelController\",[\"$scope\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n){function i(){a.proxyModel.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}function r(){a.proxyModel.temporyConfig.datepickerPopup=a.demodt.formats[0]}var a=this;if(a.proxyModel=n.proxyModel,a.proxyModel.selectedControl=a.proxyModel.temporyConfig.selectedControl,a.basicSelectRowCollection=n.basicSelectRowCollection,a.newOptionBasicSelect=n.newOptionBasicSelect,a.groupedSelectRowCollection=n.groupedSelectRowCollection,a.newOptionGroupedSelect=n.newOptionGroupedSelect,a.GroupedSelectGroups=n.GroupedSelectGroups,a.newGroupGroupedSelect=n.newGroupGroupedSelect,a.groupSelectGroupClick=n.groupSelectGroupClick,a.radioRowCollection=n.radioRowCollection,a.newOptionRadio=n.newOptionRadio,n.resetAllTemporyModels(),\"none\"!==a.proxyModel.temporyConfig.selectedControl){for(var s=a.proxyModel.controls.length-1;s>=0;s--)a.proxyModel.controls[s].id===a.proxyModel.temporyConfig.selectedControl&&(a.modelproxyModel=a.proxyModel.controls[s]);\"BasicSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindBasicSelectFromProxyModel(a.basicSelectRowCollection),\"GroupedSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindGroupedSelectFromProxyModel(a.groupedSelectRowCollection,a.GroupedSelectGroups),\"Radio\"===a.proxyModel.temporyConfig.selectedControl&&n.bindRadioFromProxyModel(a.radioRowCollection)}a.updateSpecialControl=function(){return n.basicSelectRowCollection=a.basicSelectRowCollection,n.newOptionBasicSelect=a.newOptionBasicSelect,n.groupedSelectRowCollection=a.groupedSelectRowCollection,n.newOptionGroupedSelect=a.newOptionGroupedSelect,n.GroupedSelectGroups=a.GroupedSelectGroups,n.newGroupGroupedSelect=a.newGroupGroupedSelect,n.groupSelectGroupClick=a.groupSelectGroupClick,n.radioRowCollection=a.radioRowCollection,n.newOptionRadio=a.newOptionRadio,n.bindSpecialCtrlTemporyModelsToProxyModel(),!0},a.resetControl=function(){a.proxyModel.temporyConfig.formlyLabel=\"\",a.proxyModel.temporyConfig.formlyRequired=!1,a.proxyModel.temporyConfig.formlyPlaceholder=\"\",a.proxyModel.temporyConfig.formlyDesciption=\"\",a.proxyModel.temporyConfig.formlyOptions=[],a.proxyModel.temporyConfig.datepickerPopup=r()},a.selectThisControl=function(e){a.proxyModel.selectedControl=\"none\",i();for(var o=a.proxyModel.controls.length-1;o>=0;o--)a.proxyModel.controls[o].id===e&&(a.proxyModel.selectedControl=a.proxyModel.controls[o].id);\"Date\"===a.proxyModel.selectedControl&&r()},a.addNewOptionRadio=function(){var e=l.addNewOptionRadio(a.radioRowCollection,a.newOptionRadio.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionRadio={saisie:\"\"}},a.removeRadioRow=function(e){var t=l.removeOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRadioRow=function(e){var t=l.upthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRadioRow=function(e){var t=l.downthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.addNewOptionBasicSelect=function(){var e=l.addNewOptionBasicSelect(a.basicSelectRowCollection,a.newOptionBasicSelect.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionBasicSelect={saisie:\"\"}},a.removeRow=function(e){var t=l.removeOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRow=function(e){var t=l.upthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRow=function(e){var t=l.downthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.showGroupListToChoose=function(){a.groupSelectGroupClick.showList=!a.groupSelectGroupClick.showList},a.addNewGroupToGroupedSelect=function(){if(\"\"!==a.newGroupGroupedSelect.saisie){for(var e=a.GroupedSelectGroups.list.length-1;e>=0;e--)a.GroupedSelectGroups.list[e]===a.newGroupGroupedSelect.saisie&&o.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});a.GroupedSelectGroups.list.push(a.newGroupGroupedSelect.saisie)}else o.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});a.newGroupGroupedSelect.saisie=\"\"},a.addNewOptionGroupedSelect=function(){var e=l.addNewOptionGroupedSelect(a.groupedSelectRowCollection,a.newOptionGroupedSelect.saisie,\"\");e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionGroupedSelect={saisie:\"\"}},a.removeGroupedSelectRow=function(e){var t=l.removeOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisGroupedSelectRow=function(e){var t=l.upthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisGroupedSelectRow=function(e){var t=l.downthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.demodt={},a.today=function(){a.demodt.dt=new Date},a.today(),a.clear=function(){a.demodt.dt=null},a.open=function(e){e.preventDefault(),e.stopPropagation(),a.demodt.opened=!0},a.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},a.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"]}]),angular.module(\"edaApp.controllers.edaMainController\",[]).controller(\"edaMainController\",[function(){}]),angular.module(\"edaApp.directives.edaDdContentCounterDirective\",[]).directive(\"ddContentCounter\",[\"dragDropItemCounterService\",\"$timeout\",function(e,o){return{scope:{valueWhenPlaceholder:\"@ddValueWhenPlaceholder\",valueWhendragging:\"@ddValueWhenDragging\",fullModel:\"=ddFullModel\",currentIndex:\"@ddContentCounterCurrentIndex\",parentIndex:\"@ddContentCounterParentIndex\",forceRefresh:\"=ddContentCounterForceCssRefresh\"},restrict:\"A\",link:function(t,l){var n;t.$watch(function(){return l[0].children.length},function(i,r){if(i!==r){for(var a=0,s=[],d=l[0].children.length-1;d>=0;d--)e.isHtmlElementToCount(l[0].children[d].classList)?(a++,s.push({item:d,isReal:!0})):s.push({item:d,isReal:!1});t.contentRealCount=a,n=o(function(){e.updateLineItemCss(t.fullModel,s,t.parentIndex,t.currentIndex,a)},20)}}),t.$on(\"$destroy\",function(){console.warn(\"ddContentCounter timer destruction!\"),o.cancel(n)})}}}]),angular.module(\"edaApp.directives.edaDdDecorContainerDirective\",[]).directive(\"ddDecorContainer\",[function(){var e=['
','
{{currentTitle}}
',\"
\",'
',' ',\"
\"].join(\" \");return{scope:{styleParam:\"=ddContainerProperties\",isStillCollapsed:\"=ddContainerIsCollpased\",verboseMode:\"@ddContainerVerboseMode\",currentIndex:\"@ddContainerCurrentIndex\",collpaseAll:\"&ddCollapseAll\"},restrict:\"A\",template:e,transclude:!0,controller:function(e){e.config={isEnabled:!1},e.collapseFct=function(){e.collpaseAll({exceptThisOne:e.styleParam.WhenIndex}),e.isCollapsed=!e.isCollapsed,e.isStillCollapsed=e.isCollapsed},e.icons={closedClass:\"glyphicon glyphicon-eye-open\",opened:\"glyphicon glyphicon-eye-close\"},e.currentIconClass=function(){return e.isCollapsed?e.icons.closedClass:e.icons.opened}},link:function(e,o,t,l,n){var i=e.verboseMode,r=e.currentIndex;if(e.isCollapsed=!1,\"\"!==i){var a=angular.lowercase(i);(\"true\"===a||\"1\"===a)&&console.dir({whoAmI:\"I am verbose from ddDecorContainer link\",verbodeMode:a,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:r,styleParam:e.styleParam,columnindex:e.$parent.$parent.$parent.$parent.$index})}e.$watch(function(){return e.isStillCollapsed},function(o,t){o!==t&&0===e.$parent.$parent.$index&&(e.isCollapsed=o)}),e.config.isEnabled=!1,\"undefined\"!=typeof r&&\"\"!==r&&\"0\"===r&&\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title,e.config.isEnabled=!0,e.isCollapsed=!0),n(e.$parent,function(e){var t=angular.element(o.children()[1]);t.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorDropZoneDirective\",[]).directive(\"ddDecorDropZone\",[function(){var e=['
','
','
','
','
',' ',\" {{currentTitle}}\",'
',' \",\"
\",\"
\",\"
\",'
','
','
',\"
\",\"
\",\"
\",\"
\",\"
\",\"
\"].join(\" \");return{scope:{styleParam:\"=ddDropZoneProperties\",verboseMode:\"@ddDropZoneVerboseMode\",currentIndex:\"@ddDropZoneCurrentIndex\",addNewLineFct:\"&ddDropZoneAddNewLine\"},restrict:\"A\",template:e,transclude:!0,link:function(e){var o=e.verboseMode,t=e.currentIndex;if(e.headerConfig={HeaderButtonVisible:!1,affixAttr:\"bs-affix\",affixEnabled:!1},\"\"!==o){var l=angular.lowercase(o);(\"true\"===l||\"1\"===l)&&console.dir({whoAmI:\"I am verbose from ddDecorDropZone link\",verbodeMode:l,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:t,styleParam:e.styleParam})}\"undefined\"!=typeof t&&\"\"!==t&&(\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title),\"undefined\"!=typeof e.styleParam.fontAwesomeIcon&&(e.currentFontAwesome=e.styleParam.fontAwesomeIcon),\"1\"===t&&(e.headerConfig.HeaderButtonVisible=!0))}}}]),angular.module(\"edaApp.directives.edaDdDecorItemDirective\",[]).directive(\"ddDecorItem\",[\"dragDropConfig\",function(e){var o=[\"
\",' ',\"
\"].join(\" \");return{scope:{verboseMode:\"@ddItemVerboseMode\",currentIndex:\"@ddItemCurrentIndex\",parentIndex:\"@ddItemParentIndex\",parentParentIndex:\"@ddItemParentParentIndex\",lineItemsCount:\"@ddItemsCount\",cssClass:\"@ddItemCssClass\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex,d=e.getDistinctItemCssClass();if(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(o.cssClass),o.$watch(\"cssClass\",function(e,o){e!==o&&(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(e))}),\"\"!==r){var c=angular.lowercase(r);(\"true\"===c||\"1\"===c)&&console.dir({whoAmI:\"I am verbose from ddDecorItem directive link\",verbodeMode:c,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,parentParentIndex:o.parentParentIndex,currentIndex:a,lineItemsCount:o.lineItemsCount})}\"0\"===o.parentParentIndex&&t.addClass(d[0]),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorLineDirective\",[]).directive(\"ddDecorLine\",[\"$timeout\",function(e){var o=['
',' ',\"
\",'
'].join(\" \");return{scope:{verboseMode:\"@ddLineVerboseMode\",currentIndex:\"@ddLineCurrentIndex\",parentIndex:\"@ddLineParentIndex\",removeLine:\"&ddRemoveLine\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex;if(o.deleteLine={},o.deleteLine.readyToDelete=!1,o.deleteLine.dblClickCount=0,o.isCollapsed=!1,\"\"!==r){var d=angular.lowercase(r);(\"true\"===d||\"1\"===d)&&console.dir({whoAmI:\"I am verbose from ddDecorLine directive link\",verbodeMode:d,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,currentIndex:a})}o.removeMe=function(t){t.preventDefault(),t.stopPropagation(),\"1\"===o.parentIndex&&(1===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1,o.removeLine(),e.cancel(c)),0===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=o.deleteLine.dblClickCount+1,o.deleteLine.readyToDelete=!0))};var c;o.cancelDelete=function(t){c=e(function(){o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1},500)},o.$on(\"$destroy\",function(){e.cancel(c)}),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdNoEditableControlDirective\",[]).directive(\"ddNoEditableControl\",[function(){return{restrict:\"A\",link:function(e,o){o.on(\"click\",function(e){e.preventDefault()})}}}]),angular.module(\"edaApp.directives\",[\"edaApp.directives.edaStRationDirective\",\"edaApp.directives.edaDdDecorDropZoneDirective\",\"edaApp.directives.edaDdDecorContainerDirective\",\"edaApp.directives.edaDdDecorLineDirective\",\"edaApp.directives.edaDdDecorItemDirective\",\"edaApp.directives.edaDdNoEditableControlDirective\",\"edaApp.directives.edaDdContentCounterDirective\",\"edaApp.directives.edaRightClickDirective\"]),angular.module(\"edaApp.directives.edaRightClickDirective\",[]).directive(\"edaRightClick\",[\"$parse\",function(e){return{restrict:\"A\",link:function(o,t,l){var n=e(l.edaRightClick),i=e(l.edaRightClickColIndex),r=e(l.edaSetRightClicked);t.on(\"contextmenu\",function(e){o.$apply(function(){e.preventDefault(),1===i(o)&&r(o,{}),1===i(o)&&n(o,{$event:e})})})}}}]),angular.module(\"edaApp.directives.edaStRationDirective\",[]).directive(\"stRatio\",[function(){return{restrict:\"A\",link:function(e,o,t){var l=+t.stRatio;o.css(\"width\",l+\"%\")}}}]),angular.module(\"edaApp.services.dragDropItemCountersService\",[]).factory(\"dragDropItemCounterService\",[\"dragDropConfig\",function(e){var o=[],t=angular.copy(e.getItemsNotToCount()),l={};return l.getItemsNotToCount=function(){return t},l.getModelItemsRealCounter=function(){return o},l.isHtmlElementToCount=function(e){var o=!0;return e.length>0&&angular.forEach(t,function(t){for(var l=e.length-1;l>=0;l--)e[l]===t&&(o&=!1)}),o},l.updateLineItemCss=function(o,t,l,n,i){if(\"undefined\"!=typeof o&&\"undefined\"!=typeof t&&\"undefined\"!=typeof l&&\"undefined\"!=typeof n&&\"undefined\"!=typeof i){for(var r=o[l][n].length-1;r>=0;r--)for(var a=0;a=0;r--)o[t][l][r].cssClass=e.getItemCssDependingNumberItemsInRow(n);return!0}return!1},t.updateCssClassWholeColumn=function(o,t){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof o){for(var l=o[t].length-1;l>=0;l--)for(var n=o[t][l].length-1;n>=0;n--)o[t][l][n].cssClass=e.getItemCssDependingNumberItemsInRow(o[t][l].length);return!0}return!1},t}]),angular.module(\"edaApp.services.dragDropModelConfigModelProxyService\",[]).factory(\"ddModelConfModelProxyService\",[\"EasyFormGenFormlyBindingModels\",\"controllerModalProxy\",\"$parse\",function(e,o,t){function l(o){var l={},n=e.getEasyFormListControls(),i=t(\"controls\");return angular.forEach(i(n),function(e){e.id===o.control&&(l=e)}),l}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)\"undefined\"!=typeof o.lines[l].columns[n].control&&o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(e,o){var t=e+\"-\"+Date.now();return n(t,o)===!0?t:(t=e+\"-\"+Date.now(),n(t,o)===!0?t:t=e+\"-\"+Date.now())}function r(e,o,t){angular.forEach(t.lines,function(t,l){l===o&&(t.line=e)})}function a(e,o,l){t(\"control.selectedControl\").assign(o,t(\"selectedControl\")(e)),t(\"control.type\").assign(o,t(\"formlyType\")(e)),t(\"control.key\").assign(o,i(t(\"control.type\")(o),l)),t(\"control.subtype\").assign(o,t(\"formlySubtype\")(e)),t(\"control.templateOptions.label\").assign(o,t(\"formlyLabel\")(e)),t(\"control.templateOptions.required\").assign(o,t(\"formlyRequired\")(e)),t(\"control.templateOptions.description\").assign(o,t(\"formlyDesciption\")(e)),t(\"control.templateOptions.placeholder\").assign(o,t(\"formlyPlaceholder\")(e)),t(\"control.templateOptions.options\").assign(o,t(\"formlyOptions\")(e)),\"datepicker\"===t(\"control.type\")(o)&&t(\"control.templateOptions.datepickerPopup\").assign(o,t(\"datepickerPopup\")(e))}var s={};return s.refreshAllConfigurationFromDragAndDropModel=function(o,t){angular.copy(o);return o.lines=[],angular.forEach(t[1],function(t,n){o.lines.push(angular.copy(e.getEasyFormEmptyConfigurationLineModel())),r(n+1,n,o),angular.forEach(t,function(i,r){var s={control:angular.copy(e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType))},d=l(t[r]);if(\"undefined\"!=typeof i.key){console.warn(\"debug dragdropModel show this control key : \"+i.key),s.control=angular.copy(i.configModelControl);var c=e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType);s.control.className=c.className,s.control.cssClass=c.className}else a(d,s,o);\"undefined\"==typeof o.lines[n].columns[r]&&o.lines[n].columns.push(angular.copy(e.getEasyFormConfigurationEmptyControlModel())),o.lines[n].columns[r].control=angular.copy(s.control),o.lines[n].columns[r].numColumn=r+1,o.lines[n].columns[r].exist=!0})}),o},s.refreshControlsKeys=function(e,o){angular.forEach(e.lines,function(e,t){angular.forEach(e.columns,function(e,l){\"undefined\"!=typeof o[1][t]&&o[1][t].length>0&&(o[1][t][l].key=e.control.key,o[1][t][l].configModelControl=angular.copy(e.control))})}),console.info(\"refreshControlsKeys\"),console.dir({when:\"starting\",\"configModel is \":angular.copy(e),\"dragDropModel is \":angular.copy(o)})},s}]),angular.module(\"edaApp.services.edaEditCtrlControllerModalProxy\",[]).factory(\"controllerModalProxy\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(o){var t=e.getEasyFormListControls();return angular.copy(t,o),!0}function t(){var o=e.getEasyFormListControls();return r.proxyModel=angular.copy(o),!0}function l(e){for(var o={selectedControl:\"none\",formlyType:\"none\",formlySubtype:\"none\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[]},t=e.controls.length-1;t>=0;t--)e.selectedControl===e.controls[t].id&&(o.selectedControl=e.selectedControl,o.formlyType=e.controls[t].formlyType,o.formlySubtype=e.controls[t].formlySubtype,o.formlyLabel=e.controls[t].formlyLabel,o.formlyRequired=e.controls[t].formlyRequired,o.formlyDesciption=e.controls[t].formlyDesciption,o.formlyPlaceholder=e.controls[t].formlyPlaceholder,o.formlyOptions=e.controls[t].formlyOptions,\"datepicker\"===e.controls[t].formlyType&&(o.datepickerPopup=e.controls[t].datepickerPopup));return o}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(o){var t=\"none\",l=angular.copy(e.getEasyFormListControls().controls);return l.forEach(function(e){return e.formlyType===o.type&&e.formlySubtype===o.subtype?t=e.id:void 0}),t}var r={};r.ProxyModel={},t(),r.initNyaSelect=function(e){return o(e)},r.getNyASelectFromSelectedLineColumn=function(e,t,l,n){return o(e),\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions&&(e.temporyConfig.selectedControl=\"undefined\"!=typeof t.lines[l].columns[n].control.selectedControl?t.lines[l].columns[n].control.selectedControl:\"none\",e.temporyConfig.formlyLabel=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.label?t.lines[l].columns[n].control.templateOptions.label:\"\",e.temporyConfig.formlyRequired=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.required?t.lines[l].columns[n].control.templateOptions.required:\"\",e.temporyConfig.formlyDesciption=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.description?t.lines[l].columns[n].control.templateOptions.description:\"\",e.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.placeholder?t.lines[l].columns[n].control.templateOptions.placeholder:\"\",e.temporyConfig.formlyOptions=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.options?t.lines[l].columns[n].control.templateOptions.options:\"\",\"Date\"===e.temporyConfig.selectedControl&&(e.temporyConfig.datepickerPopup=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.datepickerPopup?t.lines[l].columns[n].control.templateOptions.datepickerPopup:\"\")),e},r.bindConfigurationModelFromModalReturn=function(e,o,t,i){var r=l(t);i.lines[e].columns[o].control.selectedControl=r.selectedControl,i.lines[e].columns[o].control.type=r.formlyType,i.lines[e].columns[o].control.subtype=r.formlySubtype,i.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},i.lines[e].columns[o].control.templateOptions.label=r.formlyLabel,i.lines[e].columns[o].control.templateOptions.required=r.formlyRequired,i.lines[e].columns[o].control.templateOptions.description=r.formlyDesciption,i.lines[e].columns[o].control.templateOptions.placeholder=r.formlyPlaceholder,i.lines[e].columns[o].control.templateOptions.options=r.formlyOptions,\"datepicker\"===i.lines[e].columns[o].control.type&&(i.lines[e].columns[o].control.templateOptions.datepickerPopup=r.datepickerPopup);var a=i.lines[e].columns[o].control.type+\"-\"+Date.now();n(a,i)===!0?i.lines[e].columns[o].control.key=a:(a=i.lines[e].columns[o].control.type+\"-\"+Date.now(),n(a,i)===!0?i.lines[e].columns[o].control.key=a:a=i.lines[e].columns[o].control.type+\"-\"+Date.now()),i.lines[e].columns[o].control.edited=!0},r.applyConfigToSelectedControl=function(e){for(var o=e.controls.length-1;o>=0;o--)e.controls[o].id===e.selectedControl&&(e.controls[o].formlyLabel=e.temporyConfig.formlyLabel,e.controls[o].formlyRequired=e.temporyConfig.formlyRequired,e.controls[o].formlyDesciption=e.temporyConfig.formlyDesciption,e.controls[o].formlyPlaceholder=e.temporyConfig.formlyPlaceholder,e.controls[o].formlyOptions=e.temporyConfig.formlyOptions,\"Date\"===e.controls[o].id&&(e.controls[o].datepickerPopup=e.temporyConfig.datepickerPopup))},r.initProxyModel=function(e){return t(e)},r.bindConfigurationModelFromProxyModel=function(e,o,t){var l=angular.copy(r.proxyModel.temporyConfig);console.warn(\"debug edaEditCtrlControllerModalProxy\"),console.dir(l),t.lines[e].columns[o].control.selectedControl=l.selectedControl,t.lines[e].columns[o].control.type=l.formlyType,t.lines[e].columns[o].control.subtype=l.formlySubtype,t.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},t.lines[e].columns[o].control.templateOptions.label=l.formlyLabel,t.lines[e].columns[o].control.templateOptions.required=l.formlyRequired,t.lines[e].columns[o].control.templateOptions.description=l.formlyDesciption,t.lines[e].columns[o].control.templateOptions.placeholder=l.formlyPlaceholder,t.lines[e].columns[o].control.templateOptions.options=l.formlyOptions,\"datepicker\"===t.lines[e].columns[o].control.type&&(t.lines[e].columns[o].control.templateOptions.datepickerPopup=l.datepickerPopup);var i=t.lines[e].columns[o].control.type+\"-\"+Date.now();n(i,t)===!0?t.lines[e].columns[o].control.key=i:(i=t.lines[e].columns[o].control.type+\"-\"+Date.now(),n(i,t)===!0?t.lines[e].columns[o].control.key=i:i=t.lines[e].columns[o].control.type+\"-\"+Date.now()),t.lines[e].columns[o].control.edited=!0},r.setProxyModelFromConfigurationSelection=function(e,o,t){return\"undefined\"!=typeof e.lines[o].columns[t].control&&(r.proxyModel.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.formlyType=\"undefined\"!=typeof e.lines[o].columns[t].control.type?e.lines[o].columns[t].control.type:\"none\",r.proxyModel.temporyConfig.formlySubtype=\"undefined\"!=typeof e.lines[o].columns[t].control.subtype?e.lines[o].columns[t].control.subtype:\"none\",r.proxyModel.temporyConfig.formlyLabel=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.label?e.lines[o].columns[t].control.templateOptions.label:\"\",r.proxyModel.temporyConfig.formlyRequired=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.required?e.lines[o].columns[t].control.templateOptions.required:\"\",r.proxyModel.temporyConfig.formlyDesciption=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.description?e.lines[o].columns[t].control.templateOptions.description:\"\",r.proxyModel.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.placeholder?e.lines[o].columns[t].control.templateOptions.placeholder:\"\",r.proxyModel.temporyConfig.formlyOptions=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.options?e.lines[o].columns[t].control.templateOptions.options:\"\",\"Date\"===r.proxyModel.temporyConfig.selectedControl&&(r.proxyModel.temporyConfig.datepickerPopup=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.datepickerPopup?e.lines[o].columns[t].control.templateOptions.datepickerPopup:\"\")),r.proxyModel},r.getProxyModel=function(){return r.proxyModel};var a={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}};r.getEditPanelModelAllModel=function(){return a},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a=angular.copy(e),o=!0),o},r.getEditPanelModelColumnIndex=function(){return a.columnIndex},r.setEditPanelModelColumnIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.columnIndex=e,o=!0),o},r.getEditPanelModelLineIndex=function(){return a.lineIndex},r.setEditPanelModelLineIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.lineIndex=e,o=!0),o},r.getEditPanelModelControl=function(){return a.control},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.control=angular.copy(e),o=!0),o},r.getEditPanelModelToggle=function(){return a.toggle},r.setEditPanelModelToggle=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.toggle=e,o=!0),o};var s={rows:[]};return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),r.resetAllTemporyModels=function(){return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),!0},r.bindSpecialCtrlTemporyModelsToProxyModel=function(){\n\"BasicSelect\"===r.proxyModel.selectedControl&&r.bindBasicSelectToProxyModel(r.basicSelectRowCollection),\"GroupedSelect\"===r.proxyModel.selectedControl&&r.bindGroupedSelectToProxyModel(r.groupedSelectRowCollection),\"Radio\"===r.proxyModel.selectedControl&&r.bindRadioToProxyModel(r.radioRowCollection)},r.bindBasicSelectFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindBasicSelectToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r.bindGroupedSelectFromProxyModel=function(e,o){if(r.proxyModel.temporyConfig.formlyOptions.length>0){for(var t=0;t<=r.proxyModel.temporyConfig.formlyOptions.length-1;t++){var l={option:r.proxyModel.temporyConfig.formlyOptions[t].name,order:t,group:r.proxyModel.temporyConfig.formlyOptions[t].group};e.rows.push(l)}var n=_.uniq(_.pluck(e.rows,\"group\"));angular.copy(n,o.list)}},r.bindGroupedSelectToProxyModel=function(e){r.proxyModel.temporyConfig.formlyOptions=[];for(var o=0;o<=e.rows.length-1;o++){var t={name:e.rows[o].option,value:o,group:e.rows[o].group};r.proxyModel.temporyConfig.formlyOptions.push(t)}},r.bindRadioFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindRadioToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r}]),angular.module(\"edaApp.services.formFieldManage\",[]).factory(\"formFieldManage\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(e){var o=[];angular.copy(o,e)}function t(o,t,l){var n=t.lines[l].columns.length,i=o.push({className:\"row\",fieldGroup:[]})-1;t.lines[l].columns.forEach(function(t,l){var r={};if(\"undefined\"!=typeof r&&\"none\"!==t.control.type){if(\"header\"===t.control.type||\"subTitle\"===t.control.type){var a=t.control.templateOptions.description;r.template=e.getHeaderTemplateForNcolumnLine(n,a).template,r.className=e.getRawHeaderTemplates().selectedClass}else r=e.getFormlyControlTemplateForNcolumnLine(n,t.control.type),r.className=t.control.className,r.type=t.control.type,r.key=t.control.key,r.templateOptions.type=t.control.templateOptions.type,r.templateOptions.label=t.control.templateOptions.label,r.templateOptions.required=t.control.templateOptions.required,r.templateOptions.placeholder=t.control.templateOptions.placeholder,r.templateOptions.description=t.control.templateOptions.description,r.templateOptions.options=[].concat(t.control.templateOptions.options),\"undefined\"!=typeof r.templateOptions.datepickerPopup&&(t.control.templateOptions.datepickerPopup=r.templateOptions.datepickerPopup);o[i].fieldGroup.push(r)}})}function l(e){var o={};return angular.copy(o,e),!0}function n(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!1,t.title=e,t.Message=o,t}function i(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!0,t.title=e,t.Message=o,t}var r={};return r.initConfigurationEditFromScratch=function(o,t){var l=e.getEasyFormInitialStateConfigurationModel(t);angular.copy(l,o)},r.bindConfigurationLines=function(o,t,l){if(\"[object Array]\"===Object.prototype.toString.call(t)){var r=e.getEasyFormReloadConfigurationModel(l);return r.lines=[].concat(t),angular.copy(r,o),i(\"configuration model is bound\",\"lines are bound to configuration model.\")}return n(\"lines is not an array\",\"Checks lines type, it is not an array.\")},r.applyConfigurationToformlyModel=function(e,n,i){o(n),l(i);for(var r=e.lines.length,a=0;r>a;a++)t(n,e,a)},r}]),angular.module(\"edaApp.services.formsByIdService\",[\"ngResource\"]).factory(\"formsByIdService\",[\"$resource\",function(e){return e(\"/api/formGen/:id\",{id:\"@id\"},{})}]),angular.module(\"edaApp.services.selectOptionManage\",[]).factory(\"selectOptionManage\",[function(){function e(e,o){var t={resultFlag:!1,details:\"\"};if(\"undefined\"==typeof o)return t.resultFlag=!1,t.details=\"Entered option is empty\",t;if(\"\"!==o){for(var l=e.rows.length-1;l>=0;l--)if(e.rows[l].option===o)return t.resultFlag=!1,t.details=\"Entered option is not unique\",t;return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Entered option is empty\",t}function o(e){var o={rows:[]};angular.copy(o,e)}return{testMe:function(){return\"selectOptionManage is here.\"},initModel:function(e){o(e)},isOptionUnique:function(e,o){for(var t=e.rows.length-1;t>=0;t--)if(e.rows[t].option===o)return!1;return!0},isOptionValidFormat:function(e){return\"\"!==e?!0:!1},addNewOptionRadio:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionBasicSelect:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionGroupedSelect:function(o,t,l){var n={resultFlag:!1,details:\"\"},i=e(o,t);if(i.resultFlag===!0){var r={option:t,group:l,order:o.rows.length};return o.rows.push(r),n.resultFlag=!0,n.details=\"\",n}return angular.copy(i,n),n},removeOption:function(e,o){var t={resultFlag:!1,details:\"\"};return-1!==o?(e.rows.splice(o,1),t.resultFlag=!0,t.details=\"\",t):(t.resultFlag=!1,t.details=\"Option index not valid\",t)},upthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o>0){if(e.rows[o-1]){var l=e.rows[o];return e.rows.splice(o,1),e.rows.splice(o-1,0,l),t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Can't retreive option from option index\",t}return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Option index not valid\",t},downthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o'}),e.setType({name:"blank",template:""});var n='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e)}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e),e.$inject=["formlyConfigProvider"]}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}n.$inject=[];var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\"].join(\" \")}])}angular.module(\"eda.easyFormViewer\").config(e)}(),angular.module(\"eda.easyFormViewer\").run([\"$templateCache\",function(e){e.put(\"eda.easyFormViewer.Template.html\",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||\"Submit\")}function m(e,n){e!==n&&(o.vm.cancelText=e||\"Submit\")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||\"Submit\",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||\"Cancel\",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}var t={restrict:\"E\",scope:{edaEasyFormViewerDataModel:\"=?\",edaEasyFormViewerEasyFormGeneratorFieldsModel:\"=?\",edaEasyFormViewerSubmitButtonText:\"=?\",edaEasyFormViewerCancelButtonText:\"=?\",edaEasyFormViewerSubmitFormEvent:\"&?\",edaEasyFormViewerCancelFormEvent:\"&?\"},replace:!1,controller:n,controllerAs:\"vm\",templateUrl:\"eda.easyFormViewer.Template.html\",link:o};return t}angular.module(\"eda.easyFormViewer.Directive\",[]).directive(\"edaEasyFormViewer\",e),e.$inject=[\"modelsTranslator\"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:\"empty\",name:\"no control\",subtitle:\"no control\",group:\"Blank\",formlyType:\"blank\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Header\",name:\"Header\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"header\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Subtitle\",name:\"Subtitle\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"subTitle\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"TextInput\",name:\"Text input\",subtitle:\"Text input\",group:\"input\",formlyType:\"input\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Text input field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Password\",name:\"Password\",subtitle:\"Password\",group:\"input\",formlyType:\"input\",formlySubtype:\"password\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Email\",name:\"Email\",subtitle:\"Email\",group:\"input\",formlyType:\"input\",formlySubtype:\"email\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\\.[a-z.]{2,5}$/.test(n)},message:\"$viewValue + ' is not a valid email'\"}},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Email field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return n.to.required?l:void 0}}}},{id:\"Date\",name:\"Date\",subtitle:\"Date\",group:\"input\",formlyType:\"datepicker\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],datepickerPopup:\"dd-MMMM-yyyy\",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Date field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Texarea\",name:\"Textarea\",subtitle:\"Textarea\",group:\"Textarea\",formlyType:\"textarea\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Textarea field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"RichTextEditor\",name:\"RichTextEditor\",subtitle:\"RichTextEditor\",group:\"Textarea\",formlyType:\"richEditor\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this RichTextEditor field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Radio\",name:\"Radio\",subtitle:\"Radio\",options:[],group:\"Radio\",formlyType:\"radio\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Checkbox\",name:\"Checkbox\",subtitle:\"Checkbox\",group:\"Checkbox\",formlyType:\"checkbox\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Checkbox field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"BasicSelect\",name:\"Basic select\",subtitle:\"Basic select\",options:[],group:\"Select\",formlyType:\"basicSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Basic select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"GroupedSelect\",name:\"Grouped Select\",subtitle:\"Grouped Select\",options:[],group:\"Select\",formlyType:\"groupedSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Grouped Select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}}],selectedControl:\"none\",temporyConfig:{selectedControl:\"none\",formlyLabel:\"label\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}]};angular.copy(o,e)}function a(e,o){if(\"[object Array]\"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q(\"configuration model is bound\",\"lines are bound to configuration model.\")}return S(\"lines is not an array\",\"Checks lines type, it is not an array.\")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&(\"header\"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\"].join(\" \")}])}angular.module(\"eda.easyFormViewer\").config(e)}(),angular.module(\"eda.easyFormViewer\").run([\"$templateCache\",function(e){e.put(\"eda.easyFormViewer.Template.html\",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||\"Submit\")}function m(e,n){e!==n&&(o.vm.cancelText=e||\"Submit\")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||\"Submit\",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||\"Cancel\",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}n.$inject=[];var t={restrict:\"E\",scope:{edaEasyFormViewerDataModel:\"=?\",edaEasyFormViewerEasyFormGeneratorFieldsModel:\"=?\",edaEasyFormViewerSubmitButtonText:\"=?\",edaEasyFormViewerCancelButtonText:\"=?\",edaEasyFormViewerSubmitFormEvent:\"&?\",edaEasyFormViewerCancelFormEvent:\"&?\"},replace:!1,controller:n,controllerAs:\"vm\",templateUrl:\"eda.easyFormViewer.Template.html\",link:o};return t}angular.module(\"eda.easyFormViewer.Directive\",[]).directive(\"edaEasyFormViewer\",e),e.$inject=[\"modelsTranslator\"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:\"empty\",name:\"no control\",subtitle:\"no control\",group:\"Blank\",formlyType:\"blank\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Header\",name:\"Header\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"header\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Subtitle\",name:\"Subtitle\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"subTitle\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"TextInput\",name:\"Text input\",subtitle:\"Text input\",group:\"input\",formlyType:\"input\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Text input field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Password\",name:\"Password\",subtitle:\"Password\",group:\"input\",formlyType:\"input\",formlySubtype:\"password\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Email\",name:\"Email\",subtitle:\"Email\",group:\"input\",formlyType:\"input\",formlySubtype:\"email\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\\.[a-z.]{2,5}$/.test(n)},message:\"$viewValue + ' is not a valid email'\"}},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Email field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return n.to.required?l:void 0}}}},{id:\"Date\",name:\"Date\",subtitle:\"Date\",group:\"input\",formlyType:\"datepicker\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],datepickerPopup:\"dd-MMMM-yyyy\",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Date field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Texarea\",name:\"Textarea\",subtitle:\"Textarea\",group:\"Textarea\",formlyType:\"textarea\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Textarea field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"RichTextEditor\",name:\"RichTextEditor\",subtitle:\"RichTextEditor\",group:\"Textarea\",formlyType:\"richEditor\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this RichTextEditor field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Radio\",name:\"Radio\",subtitle:\"Radio\",options:[],group:\"Radio\",formlyType:\"radio\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Checkbox\",name:\"Checkbox\",subtitle:\"Checkbox\",group:\"Checkbox\",formlyType:\"checkbox\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Checkbox field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"BasicSelect\",name:\"Basic select\",subtitle:\"Basic select\",options:[],group:\"Select\",formlyType:\"basicSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Basic select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"GroupedSelect\",name:\"Grouped Select\",subtitle:\"Grouped Select\",options:[],group:\"Select\",formlyType:\"groupedSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Grouped Select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}}],selectedControl:\"none\",temporyConfig:{selectedControl:\"none\",formlyLabel:\"label\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}]};angular.copy(o,e)}function a(e,o){if(\"[object Array]\"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q(\"configuration model is bound\",\"lines are bound to configuration model.\")}return S(\"lines is not an array\",\"Checks lines type, it is not an array.\")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&(\"header\"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\",\" \"].join(\"\")},a={className:[\"col-xs-12\",\"col-xs-6\",\"col-xs-4\"],type:\"\",key:\"\",templateOptions:{type:\"\",label:\"\",required:\"\",placeholder:\"\",description:\"\",options:\"\"}},s=[{controlType:\"datepicker\",properties:[{isRoot:!1,isTemplateOptions:!0,value:\"datepickerPopup\"}]}];this.getAllParticularControlProperties=function(){return s},this.addParticularControlProperties=function(e){if(\"controlType\"in e&&\"properties\"in e){var o=!1;s.length>0&&s.forEach(function(t){t.controlType===e.controlType&&(t.properties=[].concat(e.properties),o=!0)}),o||s.push(e)}return s},this.getEasyFormListControls=function(){return e},this.addEasyFormControlToList=function(o){\"undefined\"!=typeof o&&e.controls.push(o)},this.getHeaderTemplates=function(){return r},this.addHeaderTemplateCssClass=function(e){\"undefined\"!=typeof e&&r.cssClass.push(e)},this.getFormlyControlTemplate=function(){return a},this.addformlyControlTemplatesCssClass=function(e){\"undefined\"!=typeof e&&a.className.push(e)},this.setFormlyControlTemplate=function(e){return\"className\"in e&&\"type\"in e&&\"key\"in e&&\"templateOptions\"in e&&(a=angular.copy(e)),!0},this.$get=[function(){var d={};return d.getEasyFormListControls=function(){return e},d.getEasyFormInitialStateConfigurationModel=function(e){var o=angular.copy(l);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormReloadConfigurationModel=function(e){var o=angular.copy(i);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormEmptyConfigurationLineModel=function(){return o},d.getEasyFormConfigurationEmptyControlModel=function(){return t},d.getRawHeaderTemplates=function(){return r},d.getHeaderTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&\"undefined\"!=typeof o&&e===parseInt(e,10)&&e<=r.cssClass.length){var t={};return t.className=r.cssClass[e-1],r.textContent=o,r.selectedClass=t.className,t.template=[r.simpleHtml1,o,r.simpleHtml2].join(\"\"),t}},d.getRawFormlyControlTemplates=function(){return a},d.getFormlyControlTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&e===parseInt(e,10)&&e<=a.className.length){var t=angular.copy(a);return t.className=a.className[e-1],\"undefined\"!=typeof o&&s.forEach(function(e){e.controlType===o&&e.properties.forEach(function(e){e.isRoot&&(t[e.value]=\"\"),e.isTemplateOptions&&(t.templateOptions[e.value]=\"\")})}),t}},d}]}]),angular.module(\"edaApp.providers\",[\"edaApp.providers.dragDropConfigProvider\",\"edaApp.providers.EasyFormGenFormlyBindingModels\",function(){}]),angular.module(\"edaApp.controllers\",[\"edaApp.controllers.edaMainController\",\"edaApp.controllers.edaEditController\",\"edaApp.controllers.edaEditMODALController\",\"edaApp.controllers.edaEditPanelController\"]),angular.module(\"edaApp.controllers.edaEditController\",[]).controller(\"edaEditController\",[\"$scope\",\"easyFormGenVersion\",\"$filter\",\"$anchorScroll\",\"toaster\",\"$timeout\",\"$modal\",\"$log\",\"formFieldManage\",\"formsByIdService\",\"controllerModalProxy\",\"dragDropItemDecorationService\",\"dragDropConfig\",\"ddModelConfModelProxyService\",\"ddItemRightClickedManager\",function(e,o,t,l,n,i,r,a,s,d,c,p,u,m,f){function g(){n.pop({type:\"info\",timeout:2e3,title:\"should save data model if it were not a static example\",body:\"data :\"+t(\"json\")(e.vm.model,4),showCloseButton:!0})}function y(){s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)}e.easyFormGeneratorVERSION=o,e.tab={editTab:{active:!0},previewTab:{active:!1}},e.vm=this,e.vm.model={},e.vm.wfFormFields=[],e.vm.wfFormFieldsOnlyNeededProperties=[],e.ihm={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},e.easyFormDragDropProperties=u.getDragDropConfigModel(),e.dragDropModel=[].concat(u.getDragDropPresentationModel()),e.numberOfColumns=1,e.MaxNumberOfColumns=3,e.MinNumberOfColumns=1,e.configuration={},s.initConfigurationEditFromScratch(e.configuration,!1),c.initProxyModel(),e.collapseAllGroupControl=function(o){angular.forEach(e.easyFormDragDropProperties.containerConfig.decoration,function(t){t.WhenIndex!==o&&u.setDragDropConfigContainerDecorationCollapse(e.easyFormDragDropProperties,t.WhenIndex,!0)})},e.vm.onSubmit=g,e.resetToZeroModel=function(){return e.configuration.activeLine=1,e.configuration.lines.length>1&&e.configuration.lines.splice(1,e.configuration.lines.length-2),e.countConfigurationModelLines()},e.countConfigurationModelLines=function(){return e.configuration.lines.length},e.setActiveLineNumber=function(o){o<=e.countConfigurationModelLines()&&(e.configuration.activeLine=o)},e.upThisLine=function(o){if(o>-1&&e.configuration.lines[o-1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o-1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.downThisLine=function(o){if(o>-1&&e.configuration.lines[o+1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o+1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.removeThisLine=function(o){o>-1&&(e.configuration.lines.length>1?(e.configuration.activeLine===o+1&&(e.configuration.activeLine=1),e.configuration.lines.splice(o,1)):i(function(){n.pop({type:\"warning\",title:\"Last line\",body:\"Can't delete the last line\",showCloseButton:!0})},100),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields))},e.increaseNumberOfColumns=function(){if(e.configuration.lines[e.configuration.activeLine-1].columns.length1&&e.configuration.lines[e.configuration.activeLine-1].columns.splice(e.configuration.lines[e.configuration.activeLine-1].columns.length-1,1),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.saveThisForm=function(){if(\"undefined\"==typeof e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is undefined\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;if(\"\"===e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is required\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;n.pop({type:\"wait\",timeout:1e4,title:\"Form is being saved\",body:\"Wait.\",showCloseButton:!0});var o=new d;return o.formName=e.configuration.formName,o.submitButtonText=e.configuration.submitButtonText,o.cancelButtonText=e.configuration.cancelButtonText,o.formlyField=JSON.stringify(e.configuration.lines),n.clear(),n.pop({type:\"info\",timeout:2e3,title:\"Form would be saved if it were not a static example\",body:\"\",showCloseButton:!0}),!0},e.nyaSelect={},c.initNyaSelect(e.nyaSelect),e.animationsEnabled=!0,e.showModalAddCtrlToColumn=function(o,t,l){var n=r.open({animation:e.animationsEnabled,templateUrl:\"editModalTemplate.html\",controller:\"edaEditMODALController\",size:\"lg\",resolve:{nyaSelect:function(){return c.getNyASelectFromSelectedLineColumn(e.nyaSelect,e.configuration,t,l)}}});n.result.then(function(o){c.bindConfigurationModelFromModalReturn(t,l,o,e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},function(){a.info(\"Modal dismissed at: \"+new Date)})},e.dragoverCallbackContainer=function(e,o,t){return 0===t?!1:!0},e.dropCallback=function(o,t,l,n,r,a){if(n){if(\"itemType\"===a&&!l.label)return!1;if(\"containerType\"===a&&!angular.isArray(l))return!1}var d=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return e.$on(\"$destroy\",function(){i.cancel(d)}),l},e.dndItemMoved=function(o,t,l){o>0&&e.dragDropModel[o][t].splice(l,1)},e.dragoverCallbackItems=function(e,o,t,l){return 0===o?!1:!0},e.disableItemDropIf=function(){},e.dropCallbackItems=function(o,t,l,n,r,a,d,c,p,u){if(c){if(\"itemType\"===u&&!d.label)return!1;if(\"containerType\"===u&&!angular.isArray(d))return!1}var g=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return f.setUnRightClicked(d),e.$on(\"$destroy\",function(){i.cancel(g)}),d},e.editPanelModel={toggle:!1},e.saveFromEditPanel=function(){c.bindSpecialCtrlTemporyModelsToProxyModel(),c.bindConfigurationModelFromProxyModel(c.getEditPanelModelLineIndex(),c.getEditPanelModelColumnIndex(),e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),f.resetAllDragDropItemSelectedState(e.dragDropModel)},e.closeEditPanel=function(){f.resetAllDragDropItemSelectedState(e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.debugProxyModel=c.ProxyModel,e.setRightClicked=function(e,o){o.rightCliked=!0},e.toggleEditPanel=function(o,t,l,n){if(f.resetAllDragDropItemSelectedState(e.dragDropModel),c.getEditPanelModelToggle()){if(c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),\"undefined\"!=typeof c.getEditPanelModelLineIndex()&&\"undefined\"!=typeof c.getEditPanelModelColumnIndex()&&\"undefined\"!=typeof c.getEditPanelModelControl())if(c.getEditPanelModelLineIndex()===t&&c.getEditPanelModelColumnIndex()===l&&angular.equals(c.getEditPanelModelControl(),n));else{n.rightCliked=!0;var r=i(function(){c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},200);e.$on(\"$destroy\",function(){i.cancel(r)})}}else n.rightCliked=!0,c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.removeThisLine=function(o){e.dragDropModel[1].splice(o,1)},e.model=[],e.insertNewLine=function(){y(),e.dragDropModel[1].push([])}}]),angular.module(\"edaApp.controllers.edaEditMODALController\",[]).controller(\"edaEditMODALController\",[\"$scope\",\"$modalInstance\",\"nyaSelect\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n,i,r){function a(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.radioRowCollection.rows.push(t)}}function s(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.radioRowCollection.rows.length>0)for(var t=0;t<=e.radioRowCollection.rows.length-1;t++){var l={name:e.radioRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function d(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.basicSelectRowCollection.rows.push(t)}}function c(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.basicSelectRowCollection.rows.length>0)for(var t=0;t<=e.basicSelectRowCollection.rows.length-1;t++){var l={name:e.basicSelectRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function p(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0){for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:e.nyaSelect.temporyConfig.formlyOptions[o].group};e.groupedSelectRowCollection.rows.push(t)}var l=_.uniq(_.pluck(e.groupedSelectRowCollection.rows,\"group\"));angular.copy(l,e.GroupedSelectGroups.list)}}function u(){e.nyaSelect.temporyConfig.formlyOptions=[];for(var o=0;o<=e.groupedSelectRowCollection.rows.length-1;o++){var t={name:e.groupedSelectRowCollection.rows[o].option,value:o,group:e.groupedSelectRowCollection.rows[o].group};e.nyaSelect.temporyConfig.formlyOptions.push(t)}}function m(){e.nyaSelect.temporyConfig.datepickerPopup=e.demodt.formats[0]}function f(){e.nyaSelect.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}var g={rows:[]};if(e.radioRowCollection=g,e.newOptionRadio={saisie:\"\"},e.addNewOptionRadio=function(){var o=i.addNewOptionRadio(e.radioRowCollection,e.newOptionRadio.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionRadio={saisie:\"\"}},e.removeRadioRow=function(o){var t=i.removeOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRadioRow=function(o){var t=i.upthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRadioRow=function(o){var t=i.downthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.basicSelectRowCollection=g,e.newOptionBasicSelect={saisie:\"\"},e.addNewOptionBasicSelect=function(){var o=i.addNewOptionBasicSelect(e.basicSelectRowCollection,e.newOptionBasicSelect.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionBasicSelect={saisie:\"\"}},e.removeRow=function(o){var t=i.removeOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRow=function(o){var t=i.upthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRow=function(o){var t=i.downthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({\ntype:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.groupedSelectRowCollection=g,e.newOptionGroupedSelect={saisie:\"\"},e.GroupedSelectGroups={list:[]},e.newGroupGroupedSelect={saisie:\"\"},e.groupSelectGroupClick={showList:!1},e.showGroupListToChoose=function(){e.groupSelectGroupClick.showList=!e.groupSelectGroupClick.showList},e.addNewGroupToGroupedSelect=function(){if(\"\"!==e.newGroupGroupedSelect.saisie){for(var o=e.GroupedSelectGroups.list.length-1;o>=0;o--)e.GroupedSelectGroups.list[o]===e.newGroupGroupedSelect.saisie&&l.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});e.GroupedSelectGroups.list.push(e.newGroupGroupedSelect.saisie)}else l.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});e.newGroupGroupedSelect.saisie=\"\"},e.addNewOptionGroupedSelect=function(){var o=i.addNewOptionGroupedSelect(e.groupedSelectRowCollection,e.newOptionGroupedSelect.saisie,\"\");o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionGroupedSelect={saisie:\"\"}},e.removeGroupedSelectRow=function(o){var t=i.removeOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisGroupedSelectRow=function(o){var t=i.upthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisGroupedSelectRow=function(o){var t=i.downthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.demodt={},e.today=function(){e.demodt.dt=new Date},e.today(),e.clear=function(){e.demodt.dt=null},e.open=function(o){o.preventDefault(),o.stopPropagation(),e.demodt.opened=!0},e.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},e.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"],e.nyaSelect=t,e.nyaSelect.selectedControl=e.nyaSelect.temporyConfig.selectedControl,\"none\"!==t.selectedControl){for(var y=e.nyaSelect.controls.length-1;y>=0;y--)e.nyaSelect.controls[y].id===t.selectedControl&&(e.modelNyaSelect=t.controls[y]);\"BasicSelect\"===e.nyaSelect.selectedControl&&d(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&p(),\"Radio\"===e.nyaSelect.selectedControl&&a()}e.selectThisControl=function(o){e.nyaSelect.selectedControl=\"none\",f();for(var t=e.nyaSelect.controls.length-1;t>=0;t--)e.nyaSelect.controls[t].id===o&&(e.nyaSelect.selectedControl=e.nyaSelect.controls[t].id);\"Date\"===e.nyaSelect.selectedControl&&m()},e.ok=function(){\"BasicSelect\"===e.nyaSelect.selectedControl&&c(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&u(),\"Radio\"===e.nyaSelect.selectedControl&&s(),r.applyConfigToSelectedControl(e.nyaSelect),o.close(e.nyaSelect)},e.cancel=function(){o.dismiss(\"cancel\")}}]),angular.module(\"edaApp.controllers.edaEditPanelController\",[]).controller(\"edaEditPanelController\",[\"$scope\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n){function i(){a.proxyModel.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}function r(){a.proxyModel.temporyConfig.datepickerPopup=a.demodt.formats[0]}var a=this;if(a.proxyModel=n.proxyModel,a.proxyModel.selectedControl=a.proxyModel.temporyConfig.selectedControl,a.basicSelectRowCollection=n.basicSelectRowCollection,a.newOptionBasicSelect=n.newOptionBasicSelect,a.groupedSelectRowCollection=n.groupedSelectRowCollection,a.newOptionGroupedSelect=n.newOptionGroupedSelect,a.GroupedSelectGroups=n.GroupedSelectGroups,a.newGroupGroupedSelect=n.newGroupGroupedSelect,a.groupSelectGroupClick=n.groupSelectGroupClick,a.radioRowCollection=n.radioRowCollection,a.newOptionRadio=n.newOptionRadio,n.resetAllTemporyModels(),\"none\"!==a.proxyModel.temporyConfig.selectedControl){for(var s=a.proxyModel.controls.length-1;s>=0;s--)a.proxyModel.controls[s].id===a.proxyModel.temporyConfig.selectedControl&&(a.modelproxyModel=a.proxyModel.controls[s]);\"BasicSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindBasicSelectFromProxyModel(a.basicSelectRowCollection),\"GroupedSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindGroupedSelectFromProxyModel(a.groupedSelectRowCollection,a.GroupedSelectGroups),\"Radio\"===a.proxyModel.temporyConfig.selectedControl&&n.bindRadioFromProxyModel(a.radioRowCollection)}a.updateSpecialControl=function(){return n.basicSelectRowCollection=a.basicSelectRowCollection,n.newOptionBasicSelect=a.newOptionBasicSelect,n.groupedSelectRowCollection=a.groupedSelectRowCollection,n.newOptionGroupedSelect=a.newOptionGroupedSelect,n.GroupedSelectGroups=a.GroupedSelectGroups,n.newGroupGroupedSelect=a.newGroupGroupedSelect,n.groupSelectGroupClick=a.groupSelectGroupClick,n.radioRowCollection=a.radioRowCollection,n.newOptionRadio=a.newOptionRadio,n.bindSpecialCtrlTemporyModelsToProxyModel(),!0},a.resetControl=function(){a.proxyModel.temporyConfig.formlyLabel=\"\",a.proxyModel.temporyConfig.formlyRequired=!1,a.proxyModel.temporyConfig.formlyPlaceholder=\"\",a.proxyModel.temporyConfig.formlyDesciption=\"\",a.proxyModel.temporyConfig.formlyOptions=[],a.proxyModel.temporyConfig.datepickerPopup=r()},a.selectThisControl=function(e){a.proxyModel.selectedControl=\"none\",i();for(var o=a.proxyModel.controls.length-1;o>=0;o--)a.proxyModel.controls[o].id===e&&(a.proxyModel.selectedControl=a.proxyModel.controls[o].id);\"Date\"===a.proxyModel.selectedControl&&r()},a.addNewOptionRadio=function(){var e=l.addNewOptionRadio(a.radioRowCollection,a.newOptionRadio.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionRadio={saisie:\"\"}},a.removeRadioRow=function(e){var t=l.removeOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRadioRow=function(e){var t=l.upthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRadioRow=function(e){var t=l.downthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.addNewOptionBasicSelect=function(){var e=l.addNewOptionBasicSelect(a.basicSelectRowCollection,a.newOptionBasicSelect.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionBasicSelect={saisie:\"\"}},a.removeRow=function(e){var t=l.removeOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRow=function(e){var t=l.upthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRow=function(e){var t=l.downthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.showGroupListToChoose=function(){a.groupSelectGroupClick.showList=!a.groupSelectGroupClick.showList},a.addNewGroupToGroupedSelect=function(){if(\"\"!==a.newGroupGroupedSelect.saisie){for(var e=a.GroupedSelectGroups.list.length-1;e>=0;e--)a.GroupedSelectGroups.list[e]===a.newGroupGroupedSelect.saisie&&o.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});a.GroupedSelectGroups.list.push(a.newGroupGroupedSelect.saisie)}else o.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});a.newGroupGroupedSelect.saisie=\"\"},a.addNewOptionGroupedSelect=function(){var e=l.addNewOptionGroupedSelect(a.groupedSelectRowCollection,a.newOptionGroupedSelect.saisie,\"\");e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionGroupedSelect={saisie:\"\"}},a.removeGroupedSelectRow=function(e){var t=l.removeOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisGroupedSelectRow=function(e){var t=l.upthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisGroupedSelectRow=function(e){var t=l.downthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.demodt={},a.today=function(){a.demodt.dt=new Date},a.today(),a.clear=function(){a.demodt.dt=null},a.open=function(e){e.preventDefault(),e.stopPropagation(),a.demodt.opened=!0},a.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},a.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"]}]),angular.module(\"edaApp.controllers.edaMainController\",[]).controller(\"edaMainController\",[function(){}]),angular.module(\"edaApp.directives.edaDdContentCounterDirective\",[]).directive(\"ddContentCounter\",[\"dragDropItemCounterService\",\"$timeout\",function(e,o){return{scope:{valueWhenPlaceholder:\"@ddValueWhenPlaceholder\",valueWhendragging:\"@ddValueWhenDragging\",fullModel:\"=ddFullModel\",currentIndex:\"@ddContentCounterCurrentIndex\",parentIndex:\"@ddContentCounterParentIndex\",forceRefresh:\"=ddContentCounterForceCssRefresh\"},restrict:\"A\",link:function(t,l){var n;t.$watch(function(){return l[0].children.length},function(i,r){if(i!==r){for(var a=0,s=[],d=l[0].children.length-1;d>=0;d--)e.isHtmlElementToCount(l[0].children[d].classList)?(a++,s.push({item:d,isReal:!0})):s.push({item:d,isReal:!1});t.contentRealCount=a,n=o(function(){e.updateLineItemCss(t.fullModel,s,t.parentIndex,t.currentIndex,a)},20)}}),t.$on(\"$destroy\",function(){console.warn(\"ddContentCounter timer destruction!\"),o.cancel(n)})}}}]),angular.module(\"edaApp.directives.edaDdDecorContainerDirective\",[]).directive(\"ddDecorContainer\",[function(){var e=['
','
{{currentTitle}}
',\"
\",'
',' ',\"
\"].join(\" \");return{scope:{styleParam:\"=ddContainerProperties\",isStillCollapsed:\"=ddContainerIsCollpased\",verboseMode:\"@ddContainerVerboseMode\",currentIndex:\"@ddContainerCurrentIndex\",collpaseAll:\"&ddCollapseAll\"},restrict:\"A\",template:e,transclude:!0,controller:function(e){e.config={isEnabled:!1},e.collapseFct=function(){e.collpaseAll({exceptThisOne:e.styleParam.WhenIndex}),e.isCollapsed=!e.isCollapsed,e.isStillCollapsed=e.isCollapsed},e.icons={closedClass:\"glyphicon glyphicon-eye-open\",opened:\"glyphicon glyphicon-eye-close\"},e.currentIconClass=function(){return e.isCollapsed?e.icons.closedClass:e.icons.opened}},link:function(e,o,t,l,n){var i=e.verboseMode,r=e.currentIndex;if(e.isCollapsed=!1,\"\"!==i){var a=angular.lowercase(i);(\"true\"===a||\"1\"===a)&&console.dir({whoAmI:\"I am verbose from ddDecorContainer link\",verbodeMode:a,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:r,styleParam:e.styleParam,columnindex:e.$parent.$parent.$parent.$parent.$index})}e.$watch(function(){return e.isStillCollapsed},function(o,t){o!==t&&0===e.$parent.$parent.$index&&(e.isCollapsed=o)}),e.config.isEnabled=!1,\"undefined\"!=typeof r&&\"\"!==r&&\"0\"===r&&\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title,e.config.isEnabled=!0,e.isCollapsed=!0),n(e.$parent,function(e){var t=angular.element(o.children()[1]);t.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorDropZoneDirective\",[]).directive(\"ddDecorDropZone\",[function(){var e=['
','
','
','
','
',' ',\" {{currentTitle}}\",'
',' \",\"
\",\"
\",\"
\",'
','
','
',\"
\",\"
\",\"
\",\"
\",\"
\",\"
\"].join(\" \");return{scope:{styleParam:\"=ddDropZoneProperties\",verboseMode:\"@ddDropZoneVerboseMode\",currentIndex:\"@ddDropZoneCurrentIndex\",addNewLineFct:\"&ddDropZoneAddNewLine\"},restrict:\"A\",template:e,transclude:!0,link:function(e){var o=e.verboseMode,t=e.currentIndex;if(e.headerConfig={HeaderButtonVisible:!1,affixAttr:\"bs-affix\",affixEnabled:!1},\"\"!==o){var l=angular.lowercase(o);(\"true\"===l||\"1\"===l)&&console.dir({whoAmI:\"I am verbose from ddDecorDropZone link\",verbodeMode:l,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:t,styleParam:e.styleParam})}\"undefined\"!=typeof t&&\"\"!==t&&(\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title),\"undefined\"!=typeof e.styleParam.fontAwesomeIcon&&(e.currentFontAwesome=e.styleParam.fontAwesomeIcon),\"1\"===t&&(e.headerConfig.HeaderButtonVisible=!0))}}}]),angular.module(\"edaApp.directives.edaDdDecorItemDirective\",[]).directive(\"ddDecorItem\",[\"dragDropConfig\",function(e){var o=[\"
\",' ',\"
\"].join(\" \");return{scope:{verboseMode:\"@ddItemVerboseMode\",currentIndex:\"@ddItemCurrentIndex\",parentIndex:\"@ddItemParentIndex\",parentParentIndex:\"@ddItemParentParentIndex\",lineItemsCount:\"@ddItemsCount\",cssClass:\"@ddItemCssClass\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex,d=e.getDistinctItemCssClass();if(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(o.cssClass),o.$watch(\"cssClass\",function(e,o){e!==o&&(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(e))}),\"\"!==r){var c=angular.lowercase(r);(\"true\"===c||\"1\"===c)&&console.dir({whoAmI:\"I am verbose from ddDecorItem directive link\",verbodeMode:c,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,parentParentIndex:o.parentParentIndex,currentIndex:a,lineItemsCount:o.lineItemsCount})}\"0\"===o.parentParentIndex&&t.addClass(d[0]),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorLineDirective\",[]).directive(\"ddDecorLine\",[\"$timeout\",function(e){var o=['
',' ',\"
\",'
'].join(\" \");return{scope:{verboseMode:\"@ddLineVerboseMode\",currentIndex:\"@ddLineCurrentIndex\",parentIndex:\"@ddLineParentIndex\",removeLine:\"&ddRemoveLine\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex;if(o.deleteLine={},o.deleteLine.readyToDelete=!1,o.deleteLine.dblClickCount=0,o.isCollapsed=!1,\"\"!==r){var d=angular.lowercase(r);(\"true\"===d||\"1\"===d)&&console.dir({whoAmI:\"I am verbose from ddDecorLine directive link\",verbodeMode:d,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,currentIndex:a})}o.removeMe=function(t){t.preventDefault(),t.stopPropagation(),\"1\"===o.parentIndex&&(1===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1,o.removeLine(),e.cancel(c)),0===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=o.deleteLine.dblClickCount+1,o.deleteLine.readyToDelete=!0))};var c;o.cancelDelete=function(t){c=e(function(){o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1},500)},o.$on(\"$destroy\",function(){e.cancel(c)}),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdNoEditableControlDirective\",[]).directive(\"ddNoEditableControl\",[function(){return{restrict:\"A\",link:function(e,o){o.on(\"click\",function(e){e.preventDefault()})}}}]),angular.module(\"edaApp.directives\",[\"edaApp.directives.edaStRationDirective\",\"edaApp.directives.edaDdDecorDropZoneDirective\",\"edaApp.directives.edaDdDecorContainerDirective\",\"edaApp.directives.edaDdDecorLineDirective\",\"edaApp.directives.edaDdDecorItemDirective\",\"edaApp.directives.edaDdNoEditableControlDirective\",\"edaApp.directives.edaDdContentCounterDirective\",\"edaApp.directives.edaRightClickDirective\"]),angular.module(\"edaApp.directives.edaRightClickDirective\",[]).directive(\"edaRightClick\",[\"$parse\",function(e){return{restrict:\"A\",link:function(o,t,l){var n=e(l.edaRightClick),i=e(l.edaRightClickColIndex),r=e(l.edaSetRightClicked);t.on(\"contextmenu\",function(e){o.$apply(function(){e.preventDefault(),1===i(o)&&r(o,{}),1===i(o)&&n(o,{$event:e})})})}}}]),angular.module(\"edaApp.directives.edaStRationDirective\",[]).directive(\"stRatio\",[function(){return{restrict:\"A\",link:function(e,o,t){var l=+t.stRatio;o.css(\"width\",l+\"%\")}}}]),angular.module(\"edaApp.services.dragDropItemCountersService\",[]).factory(\"dragDropItemCounterService\",[\"dragDropConfig\",function(e){var o=[],t=angular.copy(e.getItemsNotToCount()),l={};return l.getItemsNotToCount=function(){return t},l.getModelItemsRealCounter=function(){return o},l.isHtmlElementToCount=function(e){var o=!0;return e.length>0&&angular.forEach(t,function(t){for(var l=e.length-1;l>=0;l--)e[l]===t&&(o&=!1)}),o},l.updateLineItemCss=function(o,t,l,n,i){if(\"undefined\"!=typeof o&&\"undefined\"!=typeof t&&\"undefined\"!=typeof l&&\"undefined\"!=typeof n&&\"undefined\"!=typeof i){for(var r=o[l][n].length-1;r>=0;r--)for(var a=0;a=0;r--)o[t][l][r].cssClass=e.getItemCssDependingNumberItemsInRow(n);return!0}return!1},t.updateCssClassWholeColumn=function(o,t){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof o){for(var l=o[t].length-1;l>=0;l--)for(var n=o[t][l].length-1;n>=0;n--)o[t][l][n].cssClass=e.getItemCssDependingNumberItemsInRow(o[t][l].length);return!0}return!1},t}]),angular.module(\"edaApp.services.dragDropModelConfigModelProxyService\",[]).factory(\"ddModelConfModelProxyService\",[\"EasyFormGenFormlyBindingModels\",\"controllerModalProxy\",\"$parse\",function(e,o,t){function l(o){var l={},n=e.getEasyFormListControls(),i=t(\"controls\");return angular.forEach(i(n),function(e){e.id===o.control&&(l=e)}),l}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)\"undefined\"!=typeof o.lines[l].columns[n].control&&o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(e,o){var t=e+\"-\"+Date.now();return n(t,o)===!0?t:(t=e+\"-\"+Date.now(),n(t,o)===!0?t:t=e+\"-\"+Date.now())}function r(e,o,t){angular.forEach(t.lines,function(t,l){l===o&&(t.line=e)})}function a(e,o,l){t(\"control.selectedControl\").assign(o,t(\"selectedControl\")(e)),t(\"control.type\").assign(o,t(\"formlyType\")(e)),t(\"control.key\").assign(o,i(t(\"control.type\")(o),l)),t(\"control.subtype\").assign(o,t(\"formlySubtype\")(e)),t(\"control.templateOptions.label\").assign(o,t(\"formlyLabel\")(e)),t(\"control.templateOptions.required\").assign(o,t(\"formlyRequired\")(e)),t(\"control.templateOptions.description\").assign(o,t(\"formlyDesciption\")(e)),t(\"control.templateOptions.placeholder\").assign(o,t(\"formlyPlaceholder\")(e)),t(\"control.templateOptions.options\").assign(o,t(\"formlyOptions\")(e)),\"datepicker\"===t(\"control.type\")(o)&&t(\"control.templateOptions.datepickerPopup\").assign(o,t(\"datepickerPopup\")(e))}var s={};return s.refreshAllConfigurationFromDragAndDropModel=function(o,t){angular.copy(o);return o.lines=[],angular.forEach(t[1],function(t,n){o.lines.push(angular.copy(e.getEasyFormEmptyConfigurationLineModel())),r(n+1,n,o),angular.forEach(t,function(i,r){var s={control:angular.copy(e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType))},d=l(t[r]);if(\"undefined\"!=typeof i.key){console.warn(\"debug dragdropModel show this control key : \"+i.key),s.control=angular.copy(i.configModelControl);var c=e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType);s.control.className=c.className,s.control.cssClass=c.className}else a(d,s,o);\"undefined\"==typeof o.lines[n].columns[r]&&o.lines[n].columns.push(angular.copy(e.getEasyFormConfigurationEmptyControlModel())),o.lines[n].columns[r].control=angular.copy(s.control),o.lines[n].columns[r].numColumn=r+1,o.lines[n].columns[r].exist=!0})}),o},s.refreshControlsKeys=function(e,o){angular.forEach(e.lines,function(e,t){angular.forEach(e.columns,function(e,l){\"undefined\"!=typeof o[1][t]&&o[1][t].length>0&&(o[1][t][l].key=e.control.key,o[1][t][l].configModelControl=angular.copy(e.control))})}),console.info(\"refreshControlsKeys\"),console.dir({when:\"starting\",\"configModel is \":angular.copy(e),\"dragDropModel is \":angular.copy(o)})},s}]),angular.module(\"edaApp.services.edaEditCtrlControllerModalProxy\",[]).factory(\"controllerModalProxy\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(o){var t=e.getEasyFormListControls();return angular.copy(t,o),!0}function t(){var o=e.getEasyFormListControls();return r.proxyModel=angular.copy(o),!0}function l(e){for(var o={selectedControl:\"none\",formlyType:\"none\",formlySubtype:\"none\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[]},t=e.controls.length-1;t>=0;t--)e.selectedControl===e.controls[t].id&&(o.selectedControl=e.selectedControl,o.formlyType=e.controls[t].formlyType,o.formlySubtype=e.controls[t].formlySubtype,o.formlyLabel=e.controls[t].formlyLabel,o.formlyRequired=e.controls[t].formlyRequired,o.formlyDesciption=e.controls[t].formlyDesciption,o.formlyPlaceholder=e.controls[t].formlyPlaceholder,o.formlyOptions=e.controls[t].formlyOptions,\"datepicker\"===e.controls[t].formlyType&&(o.datepickerPopup=e.controls[t].datepickerPopup));return o}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(o){var t=\"none\",l=angular.copy(e.getEasyFormListControls().controls);return l.forEach(function(e){return e.formlyType===o.type&&e.formlySubtype===o.subtype?t=e.id:void 0}),t}var r={};r.ProxyModel={},t(),r.initNyaSelect=function(e){return o(e)},r.getNyASelectFromSelectedLineColumn=function(e,t,l,n){return o(e),\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions&&(e.temporyConfig.selectedControl=\"undefined\"!=typeof t.lines[l].columns[n].control.selectedControl?t.lines[l].columns[n].control.selectedControl:\"none\",e.temporyConfig.formlyLabel=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.label?t.lines[l].columns[n].control.templateOptions.label:\"\",e.temporyConfig.formlyRequired=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.required?t.lines[l].columns[n].control.templateOptions.required:\"\",e.temporyConfig.formlyDesciption=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.description?t.lines[l].columns[n].control.templateOptions.description:\"\",e.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.placeholder?t.lines[l].columns[n].control.templateOptions.placeholder:\"\",e.temporyConfig.formlyOptions=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.options?t.lines[l].columns[n].control.templateOptions.options:\"\",\"Date\"===e.temporyConfig.selectedControl&&(e.temporyConfig.datepickerPopup=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.datepickerPopup?t.lines[l].columns[n].control.templateOptions.datepickerPopup:\"\")),e},r.bindConfigurationModelFromModalReturn=function(e,o,t,i){var r=l(t);i.lines[e].columns[o].control.selectedControl=r.selectedControl,i.lines[e].columns[o].control.type=r.formlyType,i.lines[e].columns[o].control.subtype=r.formlySubtype,i.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},i.lines[e].columns[o].control.templateOptions.label=r.formlyLabel,i.lines[e].columns[o].control.templateOptions.required=r.formlyRequired,i.lines[e].columns[o].control.templateOptions.description=r.formlyDesciption,i.lines[e].columns[o].control.templateOptions.placeholder=r.formlyPlaceholder,i.lines[e].columns[o].control.templateOptions.options=r.formlyOptions,\"datepicker\"===i.lines[e].columns[o].control.type&&(i.lines[e].columns[o].control.templateOptions.datepickerPopup=r.datepickerPopup);var a=i.lines[e].columns[o].control.type+\"-\"+Date.now();n(a,i)===!0?i.lines[e].columns[o].control.key=a:(a=i.lines[e].columns[o].control.type+\"-\"+Date.now(),n(a,i)===!0?i.lines[e].columns[o].control.key=a:a=i.lines[e].columns[o].control.type+\"-\"+Date.now()),i.lines[e].columns[o].control.edited=!0},r.applyConfigToSelectedControl=function(e){for(var o=e.controls.length-1;o>=0;o--)e.controls[o].id===e.selectedControl&&(e.controls[o].formlyLabel=e.temporyConfig.formlyLabel,e.controls[o].formlyRequired=e.temporyConfig.formlyRequired,e.controls[o].formlyDesciption=e.temporyConfig.formlyDesciption,e.controls[o].formlyPlaceholder=e.temporyConfig.formlyPlaceholder,e.controls[o].formlyOptions=e.temporyConfig.formlyOptions,\"Date\"===e.controls[o].id&&(e.controls[o].datepickerPopup=e.temporyConfig.datepickerPopup))},r.initProxyModel=function(e){return t(e)},r.bindConfigurationModelFromProxyModel=function(e,o,t){var l=angular.copy(r.proxyModel.temporyConfig);console.warn(\"debug edaEditCtrlControllerModalProxy\"),console.dir(l),t.lines[e].columns[o].control.selectedControl=l.selectedControl,t.lines[e].columns[o].control.type=l.formlyType,t.lines[e].columns[o].control.subtype=l.formlySubtype,t.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},t.lines[e].columns[o].control.templateOptions.label=l.formlyLabel,t.lines[e].columns[o].control.templateOptions.required=l.formlyRequired,t.lines[e].columns[o].control.templateOptions.description=l.formlyDesciption,t.lines[e].columns[o].control.templateOptions.placeholder=l.formlyPlaceholder,t.lines[e].columns[o].control.templateOptions.options=l.formlyOptions,\"datepicker\"===t.lines[e].columns[o].control.type&&(t.lines[e].columns[o].control.templateOptions.datepickerPopup=l.datepickerPopup);var i=t.lines[e].columns[o].control.type+\"-\"+Date.now();n(i,t)===!0?t.lines[e].columns[o].control.key=i:(i=t.lines[e].columns[o].control.type+\"-\"+Date.now(),n(i,t)===!0?t.lines[e].columns[o].control.key=i:i=t.lines[e].columns[o].control.type+\"-\"+Date.now()),t.lines[e].columns[o].control.edited=!0},r.setProxyModelFromConfigurationSelection=function(e,o,t){return\"undefined\"!=typeof e.lines[o].columns[t].control&&(r.proxyModel.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.formlyType=\"undefined\"!=typeof e.lines[o].columns[t].control.type?e.lines[o].columns[t].control.type:\"none\",r.proxyModel.temporyConfig.formlySubtype=\"undefined\"!=typeof e.lines[o].columns[t].control.subtype?e.lines[o].columns[t].control.subtype:\"none\",r.proxyModel.temporyConfig.formlyLabel=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.label?e.lines[o].columns[t].control.templateOptions.label:\"\",r.proxyModel.temporyConfig.formlyRequired=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.required?e.lines[o].columns[t].control.templateOptions.required:\"\",r.proxyModel.temporyConfig.formlyDesciption=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.description?e.lines[o].columns[t].control.templateOptions.description:\"\",r.proxyModel.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.placeholder?e.lines[o].columns[t].control.templateOptions.placeholder:\"\",r.proxyModel.temporyConfig.formlyOptions=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.options?e.lines[o].columns[t].control.templateOptions.options:\"\",\"Date\"===r.proxyModel.temporyConfig.selectedControl&&(r.proxyModel.temporyConfig.datepickerPopup=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.datepickerPopup?e.lines[o].columns[t].control.templateOptions.datepickerPopup:\"\")),r.proxyModel},r.getProxyModel=function(){return r.proxyModel};var a={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}};r.getEditPanelModelAllModel=function(){return a},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a=angular.copy(e),o=!0),o},r.getEditPanelModelColumnIndex=function(){return a.columnIndex},r.setEditPanelModelColumnIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.columnIndex=e,o=!0),o},r.getEditPanelModelLineIndex=function(){return a.lineIndex},r.setEditPanelModelLineIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.lineIndex=e,o=!0),o},r.getEditPanelModelControl=function(){return a.control},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.control=angular.copy(e),o=!0),o},r.getEditPanelModelToggle=function(){return a.toggle},r.setEditPanelModelToggle=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.toggle=e,o=!0),o};var s={rows:[]};return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),r.resetAllTemporyModels=function(){return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),!0},r.bindSpecialCtrlTemporyModelsToProxyModel=function(){\n\"BasicSelect\"===r.proxyModel.selectedControl&&r.bindBasicSelectToProxyModel(r.basicSelectRowCollection),\"GroupedSelect\"===r.proxyModel.selectedControl&&r.bindGroupedSelectToProxyModel(r.groupedSelectRowCollection),\"Radio\"===r.proxyModel.selectedControl&&r.bindRadioToProxyModel(r.radioRowCollection)},r.bindBasicSelectFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindBasicSelectToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r.bindGroupedSelectFromProxyModel=function(e,o){if(r.proxyModel.temporyConfig.formlyOptions.length>0){for(var t=0;t<=r.proxyModel.temporyConfig.formlyOptions.length-1;t++){var l={option:r.proxyModel.temporyConfig.formlyOptions[t].name,order:t,group:r.proxyModel.temporyConfig.formlyOptions[t].group};e.rows.push(l)}var n=_.uniq(_.pluck(e.rows,\"group\"));angular.copy(n,o.list)}},r.bindGroupedSelectToProxyModel=function(e){r.proxyModel.temporyConfig.formlyOptions=[];for(var o=0;o<=e.rows.length-1;o++){var t={name:e.rows[o].option,value:o,group:e.rows[o].group};r.proxyModel.temporyConfig.formlyOptions.push(t)}},r.bindRadioFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindRadioToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r}]),angular.module(\"edaApp.services.formFieldManage\",[]).factory(\"formFieldManage\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(e){var o=[];angular.copy(o,e)}function t(o,t,l){var n=t.lines[l].columns.length,i=o.push({className:\"row\",fieldGroup:[]})-1;t.lines[l].columns.forEach(function(t,l){var r={};if(\"undefined\"!=typeof r&&\"none\"!==t.control.type){if(\"header\"===t.control.type||\"subTitle\"===t.control.type){var a=t.control.templateOptions.description;r.template=e.getHeaderTemplateForNcolumnLine(n,a).template,r.className=e.getRawHeaderTemplates().selectedClass}else r=e.getFormlyControlTemplateForNcolumnLine(n,t.control.type),r.className=t.control.className,r.type=t.control.type,r.key=t.control.key,r.templateOptions.type=t.control.templateOptions.type,r.templateOptions.label=t.control.templateOptions.label,r.templateOptions.required=t.control.templateOptions.required,r.templateOptions.placeholder=t.control.templateOptions.placeholder,r.templateOptions.description=t.control.templateOptions.description,r.templateOptions.options=[].concat(t.control.templateOptions.options),\"undefined\"!=typeof r.templateOptions.datepickerPopup&&(t.control.templateOptions.datepickerPopup=r.templateOptions.datepickerPopup);o[i].fieldGroup.push(r)}})}function l(e){var o={};return angular.copy(o,e),!0}function n(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!1,t.title=e,t.Message=o,t}function i(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!0,t.title=e,t.Message=o,t}var r={};return r.initConfigurationEditFromScratch=function(o,t){var l=e.getEasyFormInitialStateConfigurationModel(t);angular.copy(l,o)},r.bindConfigurationLines=function(o,t,l){if(\"[object Array]\"===Object.prototype.toString.call(t)){var r=e.getEasyFormReloadConfigurationModel(l);return r.lines=[].concat(t),angular.copy(r,o),i(\"configuration model is bound\",\"lines are bound to configuration model.\")}return n(\"lines is not an array\",\"Checks lines type, it is not an array.\")},r.applyConfigurationToformlyModel=function(e,n,i){o(n),l(i);for(var r=e.lines.length,a=0;r>a;a++)t(n,e,a)},r}]),angular.module(\"edaApp.services.formsByIdService\",[\"ngResource\"]).factory(\"formsByIdService\",[\"$resource\",function(e){return e(\"/api/formGen/:id\",{id:\"@id\"},{})}]),angular.module(\"edaApp.services.selectOptionManage\",[]).factory(\"selectOptionManage\",[function(){function e(e,o){var t={resultFlag:!1,details:\"\"};if(\"undefined\"==typeof o)return t.resultFlag=!1,t.details=\"Entered option is empty\",t;if(\"\"!==o){for(var l=e.rows.length-1;l>=0;l--)if(e.rows[l].option===o)return t.resultFlag=!1,t.details=\"Entered option is not unique\",t;return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Entered option is empty\",t}function o(e){var o={rows:[]};angular.copy(o,e)}return{testMe:function(){return\"selectOptionManage is here.\"},initModel:function(e){o(e)},isOptionUnique:function(e,o){for(var t=e.rows.length-1;t>=0;t--)if(e.rows[t].option===o)return!1;return!0},isOptionValidFormat:function(e){return\"\"!==e?!0:!1},addNewOptionRadio:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionBasicSelect:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionGroupedSelect:function(o,t,l){var n={resultFlag:!1,details:\"\"},i=e(o,t);if(i.resultFlag===!0){var r={option:t,group:l,order:o.rows.length};return o.rows.push(r),n.resultFlag=!0,n.details=\"\",n}return angular.copy(i,n),n},removeOption:function(e,o){var t={resultFlag:!1,details:\"\"};return-1!==o?(e.rows.splice(o,1),t.resultFlag=!0,t.details=\"\",t):(t.resultFlag=!1,t.details=\"Option index not valid\",t)},upthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o>0){if(e.rows[o-1]){var l=e.rows[o];return e.rows.splice(o,1),e.rows.splice(o-1,0,l),t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Can't retreive option from option index\",t}return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Option index not valid\",t},downthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o','\t\",'\t\",\"
\",\" \"].join(\"\")},a={className:[\"col-xs-12\",\"col-xs-6\",\"col-xs-4\"],type:\"\",key:\"\",templateOptions:{type:\"\",label:\"\",required:\"\",placeholder:\"\",description:\"\",options:\"\"}},s=[{controlType:\"datepicker\",properties:[{isRoot:!1,isTemplateOptions:!0,value:\"datepickerPopup\"}]}];this.getAllParticularControlProperties=function(){return s},this.addParticularControlProperties=function(e){if(\"controlType\"in e&&\"properties\"in e){var o=!1;s.length>0&&s.forEach(function(t){t.controlType===e.controlType&&(t.properties=[].concat(e.properties),o=!0)}),o||s.push(e)}return s},this.getEasyFormListControls=function(){return e},this.addEasyFormControlToList=function(o){\"undefined\"!=typeof o&&e.controls.push(o)},this.getHeaderTemplates=function(){return r},this.addHeaderTemplateCssClass=function(e){\"undefined\"!=typeof e&&r.cssClass.push(e)},this.getFormlyControlTemplate=function(){return a},this.addformlyControlTemplatesCssClass=function(e){\"undefined\"!=typeof e&&a.className.push(e)},this.setFormlyControlTemplate=function(e){return\"className\"in e&&\"type\"in e&&\"key\"in e&&\"templateOptions\"in e&&(a=angular.copy(e)),!0},this.$get=[function(){var d={};return d.getEasyFormListControls=function(){return e},d.getEasyFormInitialStateConfigurationModel=function(e){var o=angular.copy(l);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormReloadConfigurationModel=function(e){var o=angular.copy(i);return\"undefined\"!=typeof e&&e&&angular.extend(o,n),o},d.getEasyFormEmptyConfigurationLineModel=function(){return o},d.getEasyFormConfigurationEmptyControlModel=function(){return t},d.getRawHeaderTemplates=function(){return r},d.getHeaderTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&\"undefined\"!=typeof o&&e===parseInt(e,10)&&e<=r.cssClass.length){var t={};return t.className=r.cssClass[e-1],r.textContent=o,r.selectedClass=t.className,t.template=[r.simpleHtml1,o,r.simpleHtml2].join(\"\"),t}},d.getRawFormlyControlTemplates=function(){return a},d.getFormlyControlTemplateForNcolumnLine=function(e,o){if(\"undefined\"!=typeof e&&e===parseInt(e,10)&&e<=a.className.length){var t=angular.copy(a);return t.className=a.className[e-1],\"undefined\"!=typeof o&&s.forEach(function(e){e.controlType===o&&e.properties.forEach(function(e){e.isRoot&&(t[e.value]=\"\"),e.isTemplateOptions&&(t.templateOptions[e.value]=\"\")})}),t}},d}]}]),angular.module(\"edaApp.providers\",[\"edaApp.providers.dragDropConfigProvider\",\"edaApp.providers.EasyFormGenFormlyBindingModels\",function(){}]),angular.module(\"edaApp.controllers\",[\"edaApp.controllers.edaMainController\",\"edaApp.controllers.edaEditController\",\"edaApp.controllers.edaEditMODALController\",\"edaApp.controllers.edaEditPanelController\"]),angular.module(\"edaApp.controllers.edaEditController\",[]).controller(\"edaEditController\",[\"$scope\",\"easyFormGenVersion\",\"$filter\",\"$anchorScroll\",\"toaster\",\"$timeout\",\"$modal\",\"$log\",\"formFieldManage\",\"formsByIdService\",\"controllerModalProxy\",\"dragDropItemDecorationService\",\"dragDropConfig\",\"ddModelConfModelProxyService\",\"ddItemRightClickedManager\",function(e,o,t,l,n,i,r,a,s,d,c,p,u,m,f){function g(){n.pop({type:\"info\",timeout:2e3,title:\"should save data model if it were not a static example\",body:\"data :\"+t(\"json\")(e.vm.model,4),showCloseButton:!0})}function y(){s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)}e.easyFormGeneratorVERSION=o,e.tab={editTab:{active:!0},previewTab:{active:!1}},e.vm=this,e.vm.model={},e.vm.wfFormFields=[],e.vm.wfFormFieldsOnlyNeededProperties=[],e.ihm={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},e.easyFormDragDropProperties=u.getDragDropConfigModel(),e.dragDropModel=[].concat(u.getDragDropPresentationModel()),e.numberOfColumns=1,e.MaxNumberOfColumns=3,e.MinNumberOfColumns=1,e.configuration={},s.initConfigurationEditFromScratch(e.configuration,!1),c.initProxyModel(),e.collapseAllGroupControl=function(o){angular.forEach(e.easyFormDragDropProperties.containerConfig.decoration,function(t){t.WhenIndex!==o&&u.setDragDropConfigContainerDecorationCollapse(e.easyFormDragDropProperties,t.WhenIndex,!0)})},e.vm.onSubmit=g,e.resetToZeroModel=function(){return e.configuration.activeLine=1,e.configuration.lines.length>1&&e.configuration.lines.splice(1,e.configuration.lines.length-2),e.countConfigurationModelLines()},e.countConfigurationModelLines=function(){return e.configuration.lines.length},e.setActiveLineNumber=function(o){o<=e.countConfigurationModelLines()&&(e.configuration.activeLine=o)},e.upThisLine=function(o){if(o>-1&&e.configuration.lines[o-1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o-1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.downThisLine=function(o){if(o>-1&&e.configuration.lines[o+1]){var t=e.configuration.lines[o];e.configuration.lines.splice(o,1),e.configuration.lines.splice(o+1,0,t),e.configuration.activeLine=1}s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.removeThisLine=function(o){o>-1&&(e.configuration.lines.length>1?(e.configuration.activeLine===o+1&&(e.configuration.activeLine=1),e.configuration.lines.splice(o,1)):i(function(){n.pop({type:\"warning\",title:\"Last line\",body:\"Can't delete the last line\",showCloseButton:!0})},100),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields))},e.increaseNumberOfColumns=function(){if(e.configuration.lines[e.configuration.activeLine-1].columns.length1&&e.configuration.lines[e.configuration.activeLine-1].columns.splice(e.configuration.lines[e.configuration.activeLine-1].columns.length-1,1),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},e.saveThisForm=function(){if(\"undefined\"==typeof e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is undefined\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;if(\"\"===e.configuration.formName)return n.pop({type:\"warning\",timeout:2e3,title:\"Form name is required\",body:\"Form has not been saved.\",showCloseButton:!0}),!1;n.pop({type:\"wait\",timeout:1e4,title:\"Form is being saved\",body:\"Wait.\",showCloseButton:!0});var o=new d;return o.formName=e.configuration.formName,o.submitButtonText=e.configuration.submitButtonText,o.cancelButtonText=e.configuration.cancelButtonText,o.formlyField=JSON.stringify(e.configuration.lines),n.clear(),n.pop({type:\"info\",timeout:2e3,title:\"Form would be saved if it were not a static example\",body:\"\",showCloseButton:!0}),!0},e.nyaSelect={},c.initNyaSelect(e.nyaSelect),e.animationsEnabled=!0,e.showModalAddCtrlToColumn=function(o,t,l){var n=r.open({animation:e.animationsEnabled,templateUrl:\"editModalTemplate.html\",controller:\"edaEditMODALController\",size:\"lg\",resolve:{nyaSelect:function(){return c.getNyASelectFromSelectedLineColumn(e.nyaSelect,e.configuration,t,l)}}});n.result.then(function(o){c.bindConfigurationModelFromModalReturn(t,l,o,e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields)},function(){a.info(\"Modal dismissed at: \"+new Date)})},e.dragoverCallbackContainer=function(e,o,t){return 0===t?!1:!0},e.dropCallback=function(o,t,l,n,r,a){if(n){if(\"itemType\"===a&&!l.label)return!1;if(\"containerType\"===a&&!angular.isArray(l))return!1}var d=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return e.$on(\"$destroy\",function(){i.cancel(d)}),l},e.dndItemMoved=function(o,t,l){o>0&&e.dragDropModel[o][t].splice(l,1)},e.dragoverCallbackItems=function(e,o,t,l){return 0===o?!1:!0},e.disableItemDropIf=function(){},e.dropCallbackItems=function(o,t,l,n,r,a,d,c,p,u){if(c){if(\"itemType\"===u&&!d.label)return!1;if(\"containerType\"===u&&!angular.isArray(d))return!1}var g=i(function(){e.configuration=angular.copy(m.refreshAllConfigurationFromDragAndDropModel(e.configuration,e.dragDropModel)),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel)},200);return f.setUnRightClicked(d),e.$on(\"$destroy\",function(){i.cancel(g)}),d},e.editPanelModel={toggle:!1},e.saveFromEditPanel=function(){c.bindSpecialCtrlTemporyModelsToProxyModel(),c.bindConfigurationModelFromProxyModel(c.getEditPanelModelLineIndex(),c.getEditPanelModelColumnIndex(),e.configuration),s.applyConfigurationToformlyModel(e.configuration,e.vm.wfFormFields,e.vm.model),e.vm.wfFormFieldsOnlyNeededProperties=angular.copy(e.vm.wfFormFields),m.refreshControlsKeys(e.configuration,e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),f.resetAllDragDropItemSelectedState(e.dragDropModel)},e.closeEditPanel=function(){f.resetAllDragDropItemSelectedState(e.dragDropModel),c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.debugProxyModel=c.ProxyModel,e.setRightClicked=function(e,o){o.rightCliked=!0},e.toggleEditPanel=function(o,t,l,n){if(f.resetAllDragDropItemSelectedState(e.dragDropModel),c.getEditPanelModelToggle()){if(c.setEditPanelModelToggle(!1),e.editPanelModel.toggle=c.getEditPanelModelToggle(),\"undefined\"!=typeof c.getEditPanelModelLineIndex()&&\"undefined\"!=typeof c.getEditPanelModelColumnIndex()&&\"undefined\"!=typeof c.getEditPanelModelControl())if(c.getEditPanelModelLineIndex()===t&&c.getEditPanelModelColumnIndex()===l&&angular.equals(c.getEditPanelModelControl(),n));else{n.rightCliked=!0;var r=i(function(){c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},200);e.$on(\"$destroy\",function(){i.cancel(r)})}}else n.rightCliked=!0,c.setEditPanelModelLineIndex(t),c.setEditPanelModelColumnIndex(l),c.setEditPanelModelControl(n),c.setProxyModelFromConfigurationSelection(e.configuration,t,l),c.setEditPanelModelToggle(!0),e.editPanelModel.toggle=c.getEditPanelModelToggle()},e.removeThisLine=function(o){e.dragDropModel[1].splice(o,1)},e.model=[],e.insertNewLine=function(){y(),e.dragDropModel[1].push([])}}]),angular.module(\"edaApp.controllers.edaEditMODALController\",[]).controller(\"edaEditMODALController\",[\"$scope\",\"$modalInstance\",\"nyaSelect\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n,i,r){function a(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.radioRowCollection.rows.push(t)}}function s(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.radioRowCollection.rows.length>0)for(var t=0;t<=e.radioRowCollection.rows.length-1;t++){var l={name:e.radioRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function d(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0)for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.basicSelectRowCollection.rows.push(t)}}function c(){var o=[];if(e.nyaSelect.temporyConfig.formlyOptions=o,e.basicSelectRowCollection.rows.length>0)for(var t=0;t<=e.basicSelectRowCollection.rows.length-1;t++){var l={name:e.basicSelectRowCollection.rows[t].option,value:t,group:\"\"};e.nyaSelect.temporyConfig.formlyOptions.push(l)}}function p(){if(e.nyaSelect.temporyConfig.formlyOptions.length>0){for(var o=0;o<=e.nyaSelect.temporyConfig.formlyOptions.length-1;o++){var t={option:e.nyaSelect.temporyConfig.formlyOptions[o].name,order:o,group:e.nyaSelect.temporyConfig.formlyOptions[o].group};e.groupedSelectRowCollection.rows.push(t)}var l=_.uniq(_.pluck(e.groupedSelectRowCollection.rows,\"group\"));angular.copy(l,e.GroupedSelectGroups.list)}}function u(){e.nyaSelect.temporyConfig.formlyOptions=[];for(var o=0;o<=e.groupedSelectRowCollection.rows.length-1;o++){var t={name:e.groupedSelectRowCollection.rows[o].option,value:o,group:e.groupedSelectRowCollection.rows[o].group};e.nyaSelect.temporyConfig.formlyOptions.push(t)}}function m(){e.nyaSelect.temporyConfig.datepickerPopup=e.demodt.formats[0]}function f(){e.nyaSelect.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}var g={rows:[]};if(e.radioRowCollection=g,e.newOptionRadio={saisie:\"\"},e.addNewOptionRadio=function(){var o=i.addNewOptionRadio(e.radioRowCollection,e.newOptionRadio.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionRadio={saisie:\"\"}},e.removeRadioRow=function(o){var t=i.removeOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRadioRow=function(o){var t=i.upthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRadioRow=function(o){var t=i.downthisOption(e.radioRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.basicSelectRowCollection=g,e.newOptionBasicSelect={saisie:\"\"},e.addNewOptionBasicSelect=function(){var o=i.addNewOptionBasicSelect(e.basicSelectRowCollection,e.newOptionBasicSelect.saisie);o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionBasicSelect={saisie:\"\"}},e.removeRow=function(o){var t=i.removeOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisRow=function(o){var t=i.upthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisRow=function(o){var t=i.downthisOption(e.basicSelectRowCollection,o);t.resultFlag===!1&&l.pop({\ntype:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.groupedSelectRowCollection=g,e.newOptionGroupedSelect={saisie:\"\"},e.GroupedSelectGroups={list:[]},e.newGroupGroupedSelect={saisie:\"\"},e.groupSelectGroupClick={showList:!1},e.showGroupListToChoose=function(){e.groupSelectGroupClick.showList=!e.groupSelectGroupClick.showList},e.addNewGroupToGroupedSelect=function(){if(\"\"!==e.newGroupGroupedSelect.saisie){for(var o=e.GroupedSelectGroups.list.length-1;o>=0;o--)e.GroupedSelectGroups.list[o]===e.newGroupGroupedSelect.saisie&&l.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});e.GroupedSelectGroups.list.push(e.newGroupGroupedSelect.saisie)}else l.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});e.newGroupGroupedSelect.saisie=\"\"},e.addNewOptionGroupedSelect=function(){var o=i.addNewOptionGroupedSelect(e.groupedSelectRowCollection,e.newOptionGroupedSelect.saisie,\"\");o.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:o.details,body:\"'\"+e.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),e.newOptionGroupedSelect={saisie:\"\"}},e.removeGroupedSelectRow=function(o){var t=i.removeOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},e.upThisGroupedSelectRow=function(o){var t=i.upthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.downThisGroupedSelectRow=function(o){var t=i.downthisOption(e.groupedSelectRowCollection,o);t.resultFlag===!1&&l.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},e.demodt={},e.today=function(){e.demodt.dt=new Date},e.today(),e.clear=function(){e.demodt.dt=null},e.open=function(o){o.preventDefault(),o.stopPropagation(),e.demodt.opened=!0},e.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},e.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"],e.nyaSelect=t,e.nyaSelect.selectedControl=e.nyaSelect.temporyConfig.selectedControl,\"none\"!==t.selectedControl){for(var y=e.nyaSelect.controls.length-1;y>=0;y--)e.nyaSelect.controls[y].id===t.selectedControl&&(e.modelNyaSelect=t.controls[y]);\"BasicSelect\"===e.nyaSelect.selectedControl&&d(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&p(),\"Radio\"===e.nyaSelect.selectedControl&&a()}e.selectThisControl=function(o){e.nyaSelect.selectedControl=\"none\",f();for(var t=e.nyaSelect.controls.length-1;t>=0;t--)e.nyaSelect.controls[t].id===o&&(e.nyaSelect.selectedControl=e.nyaSelect.controls[t].id);\"Date\"===e.nyaSelect.selectedControl&&m()},e.ok=function(){\"BasicSelect\"===e.nyaSelect.selectedControl&&c(),\"GroupedSelect\"===e.nyaSelect.selectedControl&&u(),\"Radio\"===e.nyaSelect.selectedControl&&s(),r.applyConfigToSelectedControl(e.nyaSelect),o.close(e.nyaSelect)},e.cancel=function(){o.dismiss(\"cancel\")}}]),angular.module(\"edaApp.controllers.edaEditPanelController\",[]).controller(\"edaEditPanelController\",[\"$scope\",\"toaster\",\"$timeout\",\"selectOptionManage\",\"controllerModalProxy\",function(e,o,t,l,n){function i(){a.proxyModel.temporyConfig={formlyLabel:\"\",formlyRequired:!1,formlyPlaceholder:\"\",formlyDesciption:\"\",formlyOptions:[]}}function r(){a.proxyModel.temporyConfig.datepickerPopup=a.demodt.formats[0]}var a=this;if(a.proxyModel=n.proxyModel,a.proxyModel.selectedControl=a.proxyModel.temporyConfig.selectedControl,a.basicSelectRowCollection=n.basicSelectRowCollection,a.newOptionBasicSelect=n.newOptionBasicSelect,a.groupedSelectRowCollection=n.groupedSelectRowCollection,a.newOptionGroupedSelect=n.newOptionGroupedSelect,a.GroupedSelectGroups=n.GroupedSelectGroups,a.newGroupGroupedSelect=n.newGroupGroupedSelect,a.groupSelectGroupClick=n.groupSelectGroupClick,a.radioRowCollection=n.radioRowCollection,a.newOptionRadio=n.newOptionRadio,n.resetAllTemporyModels(),\"none\"!==a.proxyModel.temporyConfig.selectedControl){for(var s=a.proxyModel.controls.length-1;s>=0;s--)a.proxyModel.controls[s].id===a.proxyModel.temporyConfig.selectedControl&&(a.modelproxyModel=a.proxyModel.controls[s]);\"BasicSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindBasicSelectFromProxyModel(a.basicSelectRowCollection),\"GroupedSelect\"===a.proxyModel.temporyConfig.selectedControl&&n.bindGroupedSelectFromProxyModel(a.groupedSelectRowCollection,a.GroupedSelectGroups),\"Radio\"===a.proxyModel.temporyConfig.selectedControl&&n.bindRadioFromProxyModel(a.radioRowCollection)}a.updateSpecialControl=function(){return n.basicSelectRowCollection=a.basicSelectRowCollection,n.newOptionBasicSelect=a.newOptionBasicSelect,n.groupedSelectRowCollection=a.groupedSelectRowCollection,n.newOptionGroupedSelect=a.newOptionGroupedSelect,n.GroupedSelectGroups=a.GroupedSelectGroups,n.newGroupGroupedSelect=a.newGroupGroupedSelect,n.groupSelectGroupClick=a.groupSelectGroupClick,n.radioRowCollection=a.radioRowCollection,n.newOptionRadio=a.newOptionRadio,n.bindSpecialCtrlTemporyModelsToProxyModel(),!0},a.resetControl=function(){a.proxyModel.temporyConfig.formlyLabel=\"\",a.proxyModel.temporyConfig.formlyRequired=!1,a.proxyModel.temporyConfig.formlyPlaceholder=\"\",a.proxyModel.temporyConfig.formlyDesciption=\"\",a.proxyModel.temporyConfig.formlyOptions=[],a.proxyModel.temporyConfig.datepickerPopup=r()},a.selectThisControl=function(e){a.proxyModel.selectedControl=\"none\",i();for(var o=a.proxyModel.controls.length-1;o>=0;o--)a.proxyModel.controls[o].id===e&&(a.proxyModel.selectedControl=a.proxyModel.controls[o].id);\"Date\"===a.proxyModel.selectedControl&&r()},a.addNewOptionRadio=function(){var e=l.addNewOptionRadio(a.radioRowCollection,a.newOptionRadio.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionRadio.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionRadio={saisie:\"\"}},a.removeRadioRow=function(e){var t=l.removeOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRadioRow=function(e){var t=l.upthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRadioRow=function(e){var t=l.downthisOption(a.radioRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.addNewOptionBasicSelect=function(){var e=l.addNewOptionBasicSelect(a.basicSelectRowCollection,a.newOptionBasicSelect.saisie);e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionBasicSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionBasicSelect={saisie:\"\"}},a.removeRow=function(e){var t=l.removeOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisRow=function(e){var t=l.upthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisRow=function(e){var t=l.downthisOption(a.basicSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.showGroupListToChoose=function(){a.groupSelectGroupClick.showList=!a.groupSelectGroupClick.showList},a.addNewGroupToGroupedSelect=function(){if(\"\"!==a.newGroupGroupedSelect.saisie){for(var e=a.GroupedSelectGroups.list.length-1;e>=0;e--)a.GroupedSelectGroups.list[e]===a.newGroupGroupedSelect.saisie&&o.pop({type:\"warning\",timeout:2e3,title:\"Group already exists\",body:\"No group added.\",showCloseButton:!0});a.GroupedSelectGroups.list.push(a.newGroupGroupedSelect.saisie)}else o.pop({type:\"warning\",timeout:2e3,title:\"Not a valid group to add\",body:\"No group added.\",showCloseButton:!0});a.newGroupGroupedSelect.saisie=\"\"},a.addNewOptionGroupedSelect=function(){var e=l.addNewOptionGroupedSelect(a.groupedSelectRowCollection,a.newOptionGroupedSelect.saisie,\"\");e.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:e.details,body:\"'\"+a.newOptionGroupedSelect.saisie+\"' cannot be added.\",showCloseButton:!0}),a.newOptionGroupedSelect={saisie:\"\"}},a.removeGroupedSelectRow=function(e){var t=l.removeOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Delete was cancelled.\",showCloseButton:!0})},a.upThisGroupedSelectRow=function(e){var t=l.upthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.downThisGroupedSelectRow=function(e){var t=l.downthisOption(a.groupedSelectRowCollection,e);t.resultFlag===!1&&o.pop({type:\"warning\",timeout:2e3,title:t.details,body:\"Operation cancelled.\",showCloseButton:!0})},a.demodt={},a.today=function(){a.demodt.dt=new Date},a.today(),a.clear=function(){a.demodt.dt=null},a.open=function(e){e.preventDefault(),e.stopPropagation(),a.demodt.opened=!0},a.dateOptions={formatYear:\"yy\",startingDay:1,showWeeks:!0,initDate:null},a.demodt.formats=[\"dd-MMMM-yyyy\",\"yyyy/MM/dd\",\"dd.MM.yyyy\",\"shortDate\"]}]),angular.module(\"edaApp.controllers.edaMainController\",[]).controller(\"edaMainController\",[function(){}]),angular.module(\"edaApp.directives.edaDdContentCounterDirective\",[]).directive(\"ddContentCounter\",[\"dragDropItemCounterService\",\"$timeout\",function(e,o){return{scope:{valueWhenPlaceholder:\"@ddValueWhenPlaceholder\",valueWhendragging:\"@ddValueWhenDragging\",fullModel:\"=ddFullModel\",currentIndex:\"@ddContentCounterCurrentIndex\",parentIndex:\"@ddContentCounterParentIndex\",forceRefresh:\"=ddContentCounterForceCssRefresh\"},restrict:\"A\",link:function(t,l){var n;t.$watch(function(){return l[0].children.length},function(i,r){if(i!==r){for(var a=0,s=[],d=l[0].children.length-1;d>=0;d--)e.isHtmlElementToCount(l[0].children[d].classList)?(a++,s.push({item:d,isReal:!0})):s.push({item:d,isReal:!1});t.contentRealCount=a,n=o(function(){e.updateLineItemCss(t.fullModel,s,t.parentIndex,t.currentIndex,a)},20)}}),t.$on(\"$destroy\",function(){console.warn(\"ddContentCounter timer destruction!\"),o.cancel(n)})}}}]),angular.module(\"edaApp.directives.edaDdDecorContainerDirective\",[]).directive(\"ddDecorContainer\",[function(){var e=['
','
{{currentTitle}}
',\"
\",'
',' ',\"
\"].join(\" \");return{scope:{styleParam:\"=ddContainerProperties\",isStillCollapsed:\"=ddContainerIsCollpased\",verboseMode:\"@ddContainerVerboseMode\",currentIndex:\"@ddContainerCurrentIndex\",collpaseAll:\"&ddCollapseAll\"},restrict:\"A\",template:e,transclude:!0,controller:function(e){e.config={isEnabled:!1},e.collapseFct=function(){e.collpaseAll({exceptThisOne:e.styleParam.WhenIndex}),e.isCollapsed=!e.isCollapsed,e.isStillCollapsed=e.isCollapsed},e.icons={closedClass:\"glyphicon glyphicon-eye-open\",opened:\"glyphicon glyphicon-eye-close\"},e.currentIconClass=function(){return e.isCollapsed?e.icons.closedClass:e.icons.opened}},link:function(e,o,t,l,n){var i=e.verboseMode,r=e.currentIndex;if(e.isCollapsed=!1,\"\"!==i){var a=angular.lowercase(i);(\"true\"===a||\"1\"===a)&&console.dir({whoAmI:\"I am verbose from ddDecorContainer link\",verbodeMode:a,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:r,styleParam:e.styleParam,columnindex:e.$parent.$parent.$parent.$parent.$index})}e.$watch(function(){return e.isStillCollapsed},function(o,t){o!==t&&0===e.$parent.$parent.$index&&(e.isCollapsed=o)}),e.config.isEnabled=!1,\"undefined\"!=typeof r&&\"\"!==r&&\"0\"===r&&\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title,e.config.isEnabled=!0,e.isCollapsed=!0),n(e.$parent,function(e){var t=angular.element(o.children()[1]);t.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorDropZoneDirective\",[]).directive(\"ddDecorDropZone\",[function(){var e=['
','
','
','
','
',' ',\" {{currentTitle}}\",'
',' \",\"
\",\"
\",\"
\",'
','
','
',\"
\",\"
\",\"
\",\"
\",\"
\",\"
\"].join(\" \");return{scope:{styleParam:\"=ddDropZoneProperties\",verboseMode:\"@ddDropZoneVerboseMode\",currentIndex:\"@ddDropZoneCurrentIndex\",addNewLineFct:\"&ddDropZoneAddNewLine\"},restrict:\"A\",template:e,transclude:!0,link:function(e){var o=e.verboseMode,t=e.currentIndex;if(e.headerConfig={HeaderButtonVisible:!1,affixAttr:\"bs-affix\",affixEnabled:!1},\"\"!==o){var l=angular.lowercase(o);(\"true\"===l||\"1\"===l)&&console.dir({whoAmI:\"I am verbose from ddDecorDropZone link\",verbodeMode:l,ParentParentIndex:e.$parent.$parent.$index,ParentIndex:e.$parent.$index,currentIndex:t,styleParam:e.styleParam})}\"undefined\"!=typeof t&&\"\"!==t&&(\"undefined\"!=typeof e.styleParam.title&&(e.currentTitle=e.styleParam.title),\"undefined\"!=typeof e.styleParam.fontAwesomeIcon&&(e.currentFontAwesome=e.styleParam.fontAwesomeIcon),\"1\"===t&&(e.headerConfig.HeaderButtonVisible=!0))}}}]),angular.module(\"edaApp.directives.edaDdDecorItemDirective\",[]).directive(\"ddDecorItem\",[\"dragDropConfig\",function(e){var o=[\"
\",' ',\"
\"].join(\" \");return{scope:{verboseMode:\"@ddItemVerboseMode\",currentIndex:\"@ddItemCurrentIndex\",parentIndex:\"@ddItemParentIndex\",parentParentIndex:\"@ddItemParentParentIndex\",lineItemsCount:\"@ddItemsCount\",cssClass:\"@ddItemCssClass\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex,d=e.getDistinctItemCssClass();if(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(o.cssClass),o.$watch(\"cssClass\",function(e,o){e!==o&&(angular.forEach(d,function(e){t.removeClass(e)}),t.addClass(e))}),\"\"!==r){var c=angular.lowercase(r);(\"true\"===c||\"1\"===c)&&console.dir({whoAmI:\"I am verbose from ddDecorItem directive link\",verbodeMode:c,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,parentParentIndex:o.parentParentIndex,currentIndex:a,lineItemsCount:o.lineItemsCount})}\"0\"===o.parentParentIndex&&t.addClass(d[0]),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdDecorLineDirective\",[]).directive(\"ddDecorLine\",[\"$timeout\",function(e){var o=['
',' ',\"
\",'
'].join(\" \");return{scope:{verboseMode:\"@ddLineVerboseMode\",currentIndex:\"@ddLineCurrentIndex\",parentIndex:\"@ddLineParentIndex\",removeLine:\"&ddRemoveLine\"},restrict:\"A\",template:o,transclude:!0,link:function(o,t,l,n,i){var r=o.verboseMode,a=o.currentIndex,s=o.parentIndex;if(o.deleteLine={},o.deleteLine.readyToDelete=!1,o.deleteLine.dblClickCount=0,o.isCollapsed=!1,\"\"!==r){var d=angular.lowercase(r);(\"true\"===d||\"1\"===d)&&console.dir({whoAmI:\"I am verbose from ddDecorLine directive link\",verbodeMode:d,ParentParentIndex:o.$parent.$parent.$index,ParentIndex:s,currentIndex:a})}o.removeMe=function(t){t.preventDefault(),t.stopPropagation(),\"1\"===o.parentIndex&&(1===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1,o.removeLine(),e.cancel(c)),0===o.deleteLine.dblClickCount&&(o.deleteLine.dblClickCount=o.deleteLine.dblClickCount+1,o.deleteLine.readyToDelete=!0))};var c;o.cancelDelete=function(t){c=e(function(){o.deleteLine.dblClickCount=0,o.deleteLine.readyToDelete=!1},500)},o.$on(\"$destroy\",function(){e.cancel(c)}),i(o.$parent,function(e){var o=angular.element(t.children()[0]);o.append(e)})}}}]),angular.module(\"edaApp.directives.edaDdNoEditableControlDirective\",[]).directive(\"ddNoEditableControl\",[function(){return{restrict:\"A\",link:function(e,o){o.on(\"click\",function(e){e.preventDefault()})}}}]),angular.module(\"edaApp.directives\",[\"edaApp.directives.edaStRationDirective\",\"edaApp.directives.edaDdDecorDropZoneDirective\",\"edaApp.directives.edaDdDecorContainerDirective\",\"edaApp.directives.edaDdDecorLineDirective\",\"edaApp.directives.edaDdDecorItemDirective\",\"edaApp.directives.edaDdNoEditableControlDirective\",\"edaApp.directives.edaDdContentCounterDirective\",\"edaApp.directives.edaRightClickDirective\"]),angular.module(\"edaApp.directives.edaRightClickDirective\",[]).directive(\"edaRightClick\",[\"$parse\",function(e){return{restrict:\"A\",link:function(o,t,l){var n=e(l.edaRightClick),i=e(l.edaRightClickColIndex),r=e(l.edaSetRightClicked);t.on(\"contextmenu\",function(e){o.$apply(function(){e.preventDefault(),1===i(o)&&r(o,{}),1===i(o)&&n(o,{$event:e})})})}}}]),angular.module(\"edaApp.directives.edaStRationDirective\",[]).directive(\"stRatio\",[function(){return{restrict:\"A\",link:function(e,o,t){var l=+t.stRatio;o.css(\"width\",l+\"%\")}}}]),angular.module(\"edaApp.services.dragDropItemCountersService\",[]).factory(\"dragDropItemCounterService\",[\"dragDropConfig\",function(e){var o=[],t=angular.copy(e.getItemsNotToCount()),l={};return l.getItemsNotToCount=function(){return t},l.getModelItemsRealCounter=function(){return o},l.isHtmlElementToCount=function(e){var o=!0;return e.length>0&&angular.forEach(t,function(t){for(var l=e.length-1;l>=0;l--)e[l]===t&&(o&=!1)}),o},l.updateLineItemCss=function(o,t,l,n,i){if(\"undefined\"!=typeof o&&\"undefined\"!=typeof t&&\"undefined\"!=typeof l&&\"undefined\"!=typeof n&&\"undefined\"!=typeof i){for(var r=o[l][n].length-1;r>=0;r--)for(var a=0;a=0;r--)o[t][l][r].cssClass=e.getItemCssDependingNumberItemsInRow(n);return!0}return!1},t.updateCssClassWholeColumn=function(o,t){if(\"undefined\"!=typeof t&&\"undefined\"!=typeof o){for(var l=o[t].length-1;l>=0;l--)for(var n=o[t][l].length-1;n>=0;n--)o[t][l][n].cssClass=e.getItemCssDependingNumberItemsInRow(o[t][l].length);return!0}return!1},t}]),angular.module(\"edaApp.services.dragDropModelConfigModelProxyService\",[]).factory(\"ddModelConfModelProxyService\",[\"EasyFormGenFormlyBindingModels\",\"controllerModalProxy\",\"$parse\",function(e,o,t){function l(o){var l={},n=e.getEasyFormListControls(),i=t(\"controls\");return angular.forEach(i(n),function(e){e.id===o.control&&(l=e)}),l}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)\"undefined\"!=typeof o.lines[l].columns[n].control&&o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(e,o){var t=e+\"-\"+Date.now();return n(t,o)===!0?t:(t=e+\"-\"+Date.now(),n(t,o)===!0?t:t=e+\"-\"+Date.now())}function r(e,o,t){angular.forEach(t.lines,function(t,l){l===o&&(t.line=e)})}function a(e,o,l){t(\"control.selectedControl\").assign(o,t(\"selectedControl\")(e)),t(\"control.type\").assign(o,t(\"formlyType\")(e)),t(\"control.key\").assign(o,i(t(\"control.type\")(o),l)),t(\"control.subtype\").assign(o,t(\"formlySubtype\")(e)),t(\"control.templateOptions.label\").assign(o,t(\"formlyLabel\")(e)),t(\"control.templateOptions.required\").assign(o,t(\"formlyRequired\")(e)),t(\"control.templateOptions.description\").assign(o,t(\"formlyDesciption\")(e)),t(\"control.templateOptions.placeholder\").assign(o,t(\"formlyPlaceholder\")(e)),t(\"control.templateOptions.options\").assign(o,t(\"formlyOptions\")(e)),\"datepicker\"===t(\"control.type\")(o)&&t(\"control.templateOptions.datepickerPopup\").assign(o,t(\"datepickerPopup\")(e))}var s={};return s.refreshAllConfigurationFromDragAndDropModel=function(o,t){angular.copy(o);return o.lines=[],angular.forEach(t[1],function(t,n){o.lines.push(angular.copy(e.getEasyFormEmptyConfigurationLineModel())),r(n+1,n,o),angular.forEach(t,function(i,r){var s={control:angular.copy(e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType))},d=l(t[r]);if(\"undefined\"!=typeof i.key){console.warn(\"debug dragdropModel show this control key : \"+i.key),s.control=angular.copy(i.configModelControl);var c=e.getFormlyControlTemplateForNcolumnLine(t.length,l(t[r]).formlyType);s.control.className=c.className,s.control.cssClass=c.className}else a(d,s,o);\"undefined\"==typeof o.lines[n].columns[r]&&o.lines[n].columns.push(angular.copy(e.getEasyFormConfigurationEmptyControlModel())),o.lines[n].columns[r].control=angular.copy(s.control),o.lines[n].columns[r].numColumn=r+1,o.lines[n].columns[r].exist=!0})}),o},s.refreshControlsKeys=function(e,o){angular.forEach(e.lines,function(e,t){angular.forEach(e.columns,function(e,l){\"undefined\"!=typeof o[1][t]&&o[1][t].length>0&&(o[1][t][l].key=e.control.key,o[1][t][l].configModelControl=angular.copy(e.control))})}),console.info(\"refreshControlsKeys\"),console.dir({when:\"starting\",\"configModel is \":angular.copy(e),\"dragDropModel is \":angular.copy(o)})},s}]),angular.module(\"edaApp.services.edaEditCtrlControllerModalProxy\",[]).factory(\"controllerModalProxy\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(o){var t=e.getEasyFormListControls();return angular.copy(t,o),!0}function t(){var o=e.getEasyFormListControls();return r.proxyModel=angular.copy(o),!0}function l(e){for(var o={selectedControl:\"none\",formlyType:\"none\",formlySubtype:\"none\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[]},t=e.controls.length-1;t>=0;t--)e.selectedControl===e.controls[t].id&&(o.selectedControl=e.selectedControl,o.formlyType=e.controls[t].formlyType,o.formlySubtype=e.controls[t].formlySubtype,o.formlyLabel=e.controls[t].formlyLabel,o.formlyRequired=e.controls[t].formlyRequired,o.formlyDesciption=e.controls[t].formlyDesciption,o.formlyPlaceholder=e.controls[t].formlyPlaceholder,o.formlyOptions=e.controls[t].formlyOptions,\"datepicker\"===e.controls[t].formlyType&&(o.datepickerPopup=e.controls[t].datepickerPopup));return o}function n(e,o){for(var t=!0,l=o.lines.length-1;l>=0;l--)for(var n=o.lines[l].columns.length-1;n>=0;n--)o.lines[l].columns[n].control.key===e&&(t=!1);return t}function i(o){var t=\"none\",l=angular.copy(e.getEasyFormListControls().controls);return l.forEach(function(e){return e.formlyType===o.type&&e.formlySubtype===o.subtype?t=e.id:void 0}),t}var r={};r.ProxyModel={},t(),r.initNyaSelect=function(e){return o(e)},r.getNyASelectFromSelectedLineColumn=function(e,t,l,n){return o(e),\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions&&(e.temporyConfig.selectedControl=\"undefined\"!=typeof t.lines[l].columns[n].control.selectedControl?t.lines[l].columns[n].control.selectedControl:\"none\",e.temporyConfig.formlyLabel=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.label?t.lines[l].columns[n].control.templateOptions.label:\"\",e.temporyConfig.formlyRequired=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.required?t.lines[l].columns[n].control.templateOptions.required:\"\",e.temporyConfig.formlyDesciption=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.description?t.lines[l].columns[n].control.templateOptions.description:\"\",e.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.placeholder?t.lines[l].columns[n].control.templateOptions.placeholder:\"\",e.temporyConfig.formlyOptions=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.options?t.lines[l].columns[n].control.templateOptions.options:\"\",\"Date\"===e.temporyConfig.selectedControl&&(e.temporyConfig.datepickerPopup=\"undefined\"!=typeof t.lines[l].columns[n].control.templateOptions.datepickerPopup?t.lines[l].columns[n].control.templateOptions.datepickerPopup:\"\")),e},r.bindConfigurationModelFromModalReturn=function(e,o,t,i){var r=l(t);i.lines[e].columns[o].control.selectedControl=r.selectedControl,i.lines[e].columns[o].control.type=r.formlyType,i.lines[e].columns[o].control.subtype=r.formlySubtype,i.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},i.lines[e].columns[o].control.templateOptions.label=r.formlyLabel,i.lines[e].columns[o].control.templateOptions.required=r.formlyRequired,i.lines[e].columns[o].control.templateOptions.description=r.formlyDesciption,i.lines[e].columns[o].control.templateOptions.placeholder=r.formlyPlaceholder,i.lines[e].columns[o].control.templateOptions.options=r.formlyOptions,\"datepicker\"===i.lines[e].columns[o].control.type&&(i.lines[e].columns[o].control.templateOptions.datepickerPopup=r.datepickerPopup);var a=i.lines[e].columns[o].control.type+\"-\"+Date.now();n(a,i)===!0?i.lines[e].columns[o].control.key=a:(a=i.lines[e].columns[o].control.type+\"-\"+Date.now(),n(a,i)===!0?i.lines[e].columns[o].control.key=a:a=i.lines[e].columns[o].control.type+\"-\"+Date.now()),i.lines[e].columns[o].control.edited=!0},r.applyConfigToSelectedControl=function(e){for(var o=e.controls.length-1;o>=0;o--)e.controls[o].id===e.selectedControl&&(e.controls[o].formlyLabel=e.temporyConfig.formlyLabel,e.controls[o].formlyRequired=e.temporyConfig.formlyRequired,e.controls[o].formlyDesciption=e.temporyConfig.formlyDesciption,e.controls[o].formlyPlaceholder=e.temporyConfig.formlyPlaceholder,e.controls[o].formlyOptions=e.temporyConfig.formlyOptions,\"Date\"===e.controls[o].id&&(e.controls[o].datepickerPopup=e.temporyConfig.datepickerPopup))},r.initProxyModel=function(e){return t(e)},r.bindConfigurationModelFromProxyModel=function(e,o,t){var l=angular.copy(r.proxyModel.temporyConfig);console.warn(\"debug edaEditCtrlControllerModalProxy\"),console.dir(l),t.lines[e].columns[o].control.selectedControl=l.selectedControl,t.lines[e].columns[o].control.type=l.formlyType,t.lines[e].columns[o].control.subtype=l.formlySubtype,t.lines[e].columns[o].control.templateOptions={label:\"\",required:!1,description:\"\",placeholder:\"\",options:[]},t.lines[e].columns[o].control.templateOptions.label=l.formlyLabel,t.lines[e].columns[o].control.templateOptions.required=l.formlyRequired,t.lines[e].columns[o].control.templateOptions.description=l.formlyDesciption,t.lines[e].columns[o].control.templateOptions.placeholder=l.formlyPlaceholder,t.lines[e].columns[o].control.templateOptions.options=l.formlyOptions,\"datepicker\"===t.lines[e].columns[o].control.type&&(t.lines[e].columns[o].control.templateOptions.datepickerPopup=l.datepickerPopup);var i=t.lines[e].columns[o].control.type+\"-\"+Date.now();n(i,t)===!0?t.lines[e].columns[o].control.key=i:(i=t.lines[e].columns[o].control.type+\"-\"+Date.now(),n(i,t)===!0?t.lines[e].columns[o].control.key=i:i=t.lines[e].columns[o].control.type+\"-\"+Date.now()),t.lines[e].columns[o].control.edited=!0},r.setProxyModelFromConfigurationSelection=function(e,o,t){return\"undefined\"!=typeof e.lines[o].columns[t].control&&(r.proxyModel.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.selectedControl=\"undefined\"!=typeof e.lines[o].columns[t].control.type?i(e.lines[o].columns[t].control):\"none\",r.proxyModel.temporyConfig.formlyType=\"undefined\"!=typeof e.lines[o].columns[t].control.type?e.lines[o].columns[t].control.type:\"none\",r.proxyModel.temporyConfig.formlySubtype=\"undefined\"!=typeof e.lines[o].columns[t].control.subtype?e.lines[o].columns[t].control.subtype:\"none\",r.proxyModel.temporyConfig.formlyLabel=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.label?e.lines[o].columns[t].control.templateOptions.label:\"\",r.proxyModel.temporyConfig.formlyRequired=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.required?e.lines[o].columns[t].control.templateOptions.required:\"\",r.proxyModel.temporyConfig.formlyDesciption=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.description?e.lines[o].columns[t].control.templateOptions.description:\"\",r.proxyModel.temporyConfig.formlyPlaceholder=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.placeholder?e.lines[o].columns[t].control.templateOptions.placeholder:\"\",r.proxyModel.temporyConfig.formlyOptions=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.options?e.lines[o].columns[t].control.templateOptions.options:\"\",\"Date\"===r.proxyModel.temporyConfig.selectedControl&&(r.proxyModel.temporyConfig.datepickerPopup=\"undefined\"!=typeof e.lines[o].columns[t].control.templateOptions.datepickerPopup?e.lines[o].columns[t].control.templateOptions.datepickerPopup:\"\")),r.proxyModel},r.getProxyModel=function(){return r.proxyModel};var a={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}};r.getEditPanelModelAllModel=function(){return a},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a=angular.copy(e),o=!0),o},r.getEditPanelModelColumnIndex=function(){return a.columnIndex},r.setEditPanelModelColumnIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.columnIndex=e,o=!0),o},r.getEditPanelModelLineIndex=function(){return a.lineIndex},r.setEditPanelModelLineIndex=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.lineIndex=e,o=!0),o},r.getEditPanelModelControl=function(){return a.control},r.setEditPanelModelControl=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.control=angular.copy(e),o=!0),o},r.getEditPanelModelToggle=function(){return a.toggle},r.setEditPanelModelToggle=function(e){var o=!1;return\"undefined\"!=typeof e&&(a.toggle=e,o=!0),o};var s={rows:[]};return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),r.resetAllTemporyModels=function(){return r.basicSelectRowCollection=angular.copy(s),r.newOptionBasicSelect=angular.copy({saisie:\"\"}),r.groupedSelectRowCollection=angular.copy(s),r.newOptionGroupedSelect=angular.copy({saisie:\"\"}),r.GroupedSelectGroups=angular.copy({list:[]}),r.newGroupGroupedSelect=angular.copy({saisie:\"\"}),r.groupSelectGroupClick=angular.copy({showList:!1}),r.radioRowCollection=angular.copy(s),r.newOptionRadio=angular.copy({saisie:\"\"}),!0},r.bindSpecialCtrlTemporyModelsToProxyModel=function(){\n\"BasicSelect\"===r.proxyModel.selectedControl&&r.bindBasicSelectToProxyModel(r.basicSelectRowCollection),\"GroupedSelect\"===r.proxyModel.selectedControl&&r.bindGroupedSelectToProxyModel(r.groupedSelectRowCollection),\"Radio\"===r.proxyModel.selectedControl&&r.bindRadioToProxyModel(r.radioRowCollection)},r.bindBasicSelectFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindBasicSelectToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r.bindGroupedSelectFromProxyModel=function(e,o){if(r.proxyModel.temporyConfig.formlyOptions.length>0){for(var t=0;t<=r.proxyModel.temporyConfig.formlyOptions.length-1;t++){var l={option:r.proxyModel.temporyConfig.formlyOptions[t].name,order:t,group:r.proxyModel.temporyConfig.formlyOptions[t].group};e.rows.push(l)}var n=_.uniq(_.pluck(e.rows,\"group\"));angular.copy(n,o.list)}},r.bindGroupedSelectToProxyModel=function(e){r.proxyModel.temporyConfig.formlyOptions=[];for(var o=0;o<=e.rows.length-1;o++){var t={name:e.rows[o].option,value:o,group:e.rows[o].group};r.proxyModel.temporyConfig.formlyOptions.push(t)}},r.bindRadioFromProxyModel=function(e){if(r.proxyModel.temporyConfig.formlyOptions.length>0)for(var o=0;o<=r.proxyModel.temporyConfig.formlyOptions.length-1;o++){var t={option:r.proxyModel.temporyConfig.formlyOptions[o].name,order:o,group:\"\"};e.rows.push(t)}},r.bindRadioToProxyModel=function(e){var o=[];if(r.proxyModel.temporyConfig.formlyOptions=o,e.rows.length>0)for(var t=0;t<=e.rows.length-1;t++){var l={name:e.rows[t].option,value:t,group:\"\"};r.proxyModel.temporyConfig.formlyOptions.push(l)}},r}]),angular.module(\"edaApp.services.formFieldManage\",[]).factory(\"formFieldManage\",[\"EasyFormGenFormlyBindingModels\",function(e){function o(e){var o=[];angular.copy(o,e)}function t(o,t,l){var n=t.lines[l].columns.length,i=o.push({className:\"row\",fieldGroup:[]})-1;t.lines[l].columns.forEach(function(t,l){var r={};if(\"undefined\"!=typeof r&&\"none\"!==t.control.type){if(\"header\"===t.control.type||\"subTitle\"===t.control.type){var a=t.control.templateOptions.description;r.template=e.getHeaderTemplateForNcolumnLine(n,a).template,r.className=e.getRawHeaderTemplates().selectedClass}else r=e.getFormlyControlTemplateForNcolumnLine(n,t.control.type),r.className=t.control.className,r.type=t.control.type,r.key=t.control.key,r.templateOptions.type=t.control.templateOptions.type,r.templateOptions.label=t.control.templateOptions.label,r.templateOptions.required=t.control.templateOptions.required,r.templateOptions.placeholder=t.control.templateOptions.placeholder,r.templateOptions.description=t.control.templateOptions.description,r.templateOptions.options=[].concat(t.control.templateOptions.options),\"undefined\"!=typeof r.templateOptions.datepickerPopup&&(t.control.templateOptions.datepickerPopup=r.templateOptions.datepickerPopup);o[i].fieldGroup.push(r)}})}function l(e){var o={};return angular.copy(o,e),!0}function n(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!1,t.title=e,t.Message=o,t}function i(e,o){var t={noError:!1,title:\"\",Message:\"\"};return t.noError=!0,t.title=e,t.Message=o,t}var r={};return r.initConfigurationEditFromScratch=function(o,t){var l=e.getEasyFormInitialStateConfigurationModel(t);angular.copy(l,o)},r.bindConfigurationLines=function(o,t,l){if(\"[object Array]\"===Object.prototype.toString.call(t)){var r=e.getEasyFormReloadConfigurationModel(l);return r.lines=[].concat(t),angular.copy(r,o),i(\"configuration model is bound\",\"lines are bound to configuration model.\")}return n(\"lines is not an array\",\"Checks lines type, it is not an array.\")},r.applyConfigurationToformlyModel=function(e,n,i){o(n),l(i);for(var r=e.lines.length,a=0;r>a;a++)t(n,e,a)},r}]),angular.module(\"edaApp.services.formsByIdService\",[\"ngResource\"]).factory(\"formsByIdService\",[\"$resource\",function(e){return e(\"/api/formGen/:id\",{id:\"@id\"},{})}]),angular.module(\"edaApp.services.selectOptionManage\",[]).factory(\"selectOptionManage\",[function(){function e(e,o){var t={resultFlag:!1,details:\"\"};if(\"undefined\"==typeof o)return t.resultFlag=!1,t.details=\"Entered option is empty\",t;if(\"\"!==o){for(var l=e.rows.length-1;l>=0;l--)if(e.rows[l].option===o)return t.resultFlag=!1,t.details=\"Entered option is not unique\",t;return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Entered option is empty\",t}function o(e){var o={rows:[]};angular.copy(o,e)}return{testMe:function(){return\"selectOptionManage is here.\"},initModel:function(e){o(e)},isOptionUnique:function(e,o){for(var t=e.rows.length-1;t>=0;t--)if(e.rows[t].option===o)return!1;return!0},isOptionValidFormat:function(e){return\"\"!==e?!0:!1},addNewOptionRadio:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionBasicSelect:function(o,t){var l={resultFlag:!1,details:\"\"},n=e(o,t);if(n.resultFlag===!0){var i={option:t,order:o.rows.length};return o.rows.push(i),l.resultFlag=!0,l.details=\"\",l}return angular.copy(n,l),l},addNewOptionGroupedSelect:function(o,t,l){var n={resultFlag:!1,details:\"\"},i=e(o,t);if(i.resultFlag===!0){var r={option:t,group:l,order:o.rows.length};return o.rows.push(r),n.resultFlag=!0,n.details=\"\",n}return angular.copy(i,n),n},removeOption:function(e,o){var t={resultFlag:!1,details:\"\"};return-1!==o?(e.rows.splice(o,1),t.resultFlag=!0,t.details=\"\",t):(t.resultFlag=!1,t.details=\"Option index not valid\",t)},upthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o>0){if(e.rows[o-1]){var l=e.rows[o];return e.rows.splice(o,1),e.rows.splice(o-1,0,l),t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Can't retreive option from option index\",t}return t.resultFlag=!0,t.details=\"\",t}return t.resultFlag=!1,t.details=\"Option index not valid\",t},downthisOption:function(e,o){var t={resultFlag:!1,details:\"\"};if(o>-1){if(o'}),e.setType({name:"blank",template:""});var n='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e)}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
"].join(" ")}])}angular.module("eda.easyFormViewer").config(e),e.$inject=["formlyConfigProvider"]}(),angular.module("eda.easyFormViewer").run(["$templateCache",function(e){e.put("eda.easyFormViewer.Template.html",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||"Submit")}function m(e,n){e!==n&&(o.vm.cancelText=e||"Submit")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||"Submit",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||"Cancel",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}n.$inject=[];var t={restrict:"E",scope:{edaEasyFormViewerDataModel:"=?",edaEasyFormViewerEasyFormGeneratorFieldsModel:"=?",edaEasyFormViewerSubmitButtonText:"=?",edaEasyFormViewerCancelButtonText:"=?",edaEasyFormViewerSubmitFormEvent:"&?",edaEasyFormViewerCancelFormEvent:"&?"},replace:!1,controller:n,controllerAs:"vm",templateUrl:"eda.easyFormViewer.Template.html",link:o};return t}angular.module("eda.easyFormViewer.Directive",[]).directive("edaEasyFormViewer",e),e.$inject=["modelsTranslator"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:"empty",name:"no control",subtitle:"no control",group:"Blank",formlyType:"blank",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Header",name:"Header",subtitle:"no control",group:"Decoration",formlyType:"header",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"Subtitle",name:"Subtitle",subtitle:"no control",group:"Decoration",formlyType:"subTitle",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:"TextInput",name:"Text input",subtitle:"Text input",group:"input",formlyType:"input",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Text input field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Password",name:"Password",subtitle:"Password",group:"input",formlyType:"input",formlySubtype:"password",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Email",name:"Email",subtitle:"Email",group:"input",formlyType:"input",formlySubtype:"email",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\.[a-z.]{2,5}$/.test(n)},message:"$viewValue + ' is not a valid email'"}},formlyValidation:{messages:{required:function(e,o,n){var t="this Email field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return n.to.required?l:void 0}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerPopup:"dd-MMMM-yyyy",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Date field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Textarea field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this RichTextEditor field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Password field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Checkbox field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Basic select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t="this Grouped Select field is required",l="undefined"!=typeof n.to.label&&""!==n.to.label?n.to.label+" is required":t;return l}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};angular.copy(o,e)}function a(e,o){if("[object Array]"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q("configuration model is bound","lines are bound to configuration model.")}return S("lines is not an array","Checks lines type, it is not an array.")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&("header"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\"].join(\" \")}])}angular.module(\"eda.easyFormViewer\").config(e)}(),angular.module(\"eda.easyFormViewer\").run([\"$templateCache\",function(e){e.put(\"eda.easyFormViewer.Template.html\",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||\"Submit\")}function m(e,n){e!==n&&(o.vm.cancelText=e||\"Submit\")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||\"Submit\",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||\"Cancel\",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}var t={restrict:\"E\",scope:{edaEasyFormViewerDataModel:\"=?\",edaEasyFormViewerEasyFormGeneratorFieldsModel:\"=?\",edaEasyFormViewerSubmitButtonText:\"=?\",edaEasyFormViewerCancelButtonText:\"=?\",edaEasyFormViewerSubmitFormEvent:\"&?\",edaEasyFormViewerCancelFormEvent:\"&?\"},replace:!1,controller:n,controllerAs:\"vm\",templateUrl:\"eda.easyFormViewer.Template.html\",link:o};return t}angular.module(\"eda.easyFormViewer.Directive\",[]).directive(\"edaEasyFormViewer\",e),e.$inject=[\"modelsTranslator\"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:\"empty\",name:\"no control\",subtitle:\"no control\",group:\"Blank\",formlyType:\"blank\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Header\",name:\"Header\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"header\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Subtitle\",name:\"Subtitle\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"subTitle\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"TextInput\",name:\"Text input\",subtitle:\"Text input\",group:\"input\",formlyType:\"input\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Text input field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Password\",name:\"Password\",subtitle:\"Password\",group:\"input\",formlyType:\"input\",formlySubtype:\"password\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Email\",name:\"Email\",subtitle:\"Email\",group:\"input\",formlyType:\"input\",formlySubtype:\"email\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\\.[a-z.]{2,5}$/.test(n)},message:\"$viewValue + ' is not a valid email'\"}},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Email field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return n.to.required?l:void 0}}}},{id:\"Date\",name:\"Date\",subtitle:\"Date\",group:\"input\",formlyType:\"datepicker\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],datepickerPopup:\"dd-MMMM-yyyy\",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Date field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Texarea\",name:\"Textarea\",subtitle:\"Textarea\",group:\"Textarea\",formlyType:\"textarea\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Textarea field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"RichTextEditor\",name:\"RichTextEditor\",subtitle:\"RichTextEditor\",group:\"Textarea\",formlyType:\"richEditor\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this RichTextEditor field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Radio\",name:\"Radio\",subtitle:\"Radio\",options:[],group:\"Radio\",formlyType:\"radio\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Checkbox\",name:\"Checkbox\",subtitle:\"Checkbox\",group:\"Checkbox\",formlyType:\"checkbox\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Checkbox field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"BasicSelect\",name:\"Basic select\",subtitle:\"Basic select\",options:[],group:\"Select\",formlyType:\"basicSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Basic select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"GroupedSelect\",name:\"Grouped Select\",subtitle:\"Grouped Select\",options:[],group:\"Select\",formlyType:\"groupedSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Grouped Select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}}],selectedControl:\"none\",temporyConfig:{selectedControl:\"none\",formlyLabel:\"label\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}]};angular.copy(o,e)}function a(e,o){if(\"[object Array]\"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q(\"configuration model is bound\",\"lines are bound to configuration model.\")}return S(\"lines is not an array\",\"Checks lines type, it is not an array.\")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&(\"header\"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='
\"].join(\" \")}])}angular.module(\"eda.easyFormViewer\").config(e)}(),angular.module(\"eda.easyFormViewer\").run([\"$templateCache\",function(e){e.put(\"eda.easyFormViewer.Template.html\",'')}]),function(){function e(e){function o(o,n,t){function l(){return o.edaEasyFormViewerEasyFormGeneratorFieldsModel}function r(){return o.edaEasyFormViewerSubmitButtonText}function i(){return o.edaEasyFormViewerCancelButtonText}function s(){return o.vm.hasJustSumitted}function a(){return o.vm.hasJustCancelled}function c(e,n){o.vm.fields=y(e)}function u(e,n){e!==n&&(o.vm.submitText=e||\"Submit\")}function m(e,n){e!==n&&(o.vm.cancelText=e||\"Submit\")}function p(e,n){if(e===!0&&angular.isFunction(o.edaEasyFormViewerSubmitFormEvent)){var t=o.vm.model;o.edaEasyFormViewerSubmitFormEvent({dataModelSubmitted:t})}o.vm.hasJustSumitted=!1}function d(e,n){e===!0&&angular.isFunction(o.edaEasyFormViewerCancelFormEvent)&&o.edaEasyFormViewerCancelFormEvent(),o.vm.hasJustCancelled=!1}function f(){var e=angular.isArray(o.edaEasyFormViewerEasyFormGeneratorFieldsModel)?y(o.edaEasyFormViewerEasyFormGeneratorFieldsModel):{};return e}function y(n){if(angular.isArray(n)){var t=b(n),l=[];return o.configurationLoaded={},e.bindConfigurationLines(o.configurationLoaded,t),e.refreshControlFormlyExpressionProperties(o.configurationLoaded),e.refreshControlFormlyValidators(o.configurationLoaded),e.refreshControlFormlyValidation(o.configurationLoaded),o.configuration=angular.copy(o.configurationLoaded),e.applyConfigurationToformlyModel(o.configurationLoaded,l,o.vm.model),l}}function b(e){var o=angular.isArray(e)&&e.length>0?e:v();return o}function v(){var e=[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}];return e}o.vm.model={},o.vm.fields=f(),o.vm.submitText=o.edaEasyFormViewerSubmitButtonText||\"Submit\",o.vm.cancelText=o.edaEasyFormViewerCancelButtonText||\"Cancel\",o.$watch(l,c,!0),o.$watch(r,u),o.$watch(i,m),o.$watch(s,p),o.$watch(a,d)}function n(){function e(){n.hasJustSumitted=!0}function o(){n.hasJustCancelled=!0}var n=this;n.model={},n.fields={},n.hasJustSumitted=!1,n.hasJustCancelled=!1,n.edaSubmitThisDataModel=e,n.edaCancelEvent=o}n.$inject=[];var t={restrict:\"E\",scope:{edaEasyFormViewerDataModel:\"=?\",edaEasyFormViewerEasyFormGeneratorFieldsModel:\"=?\",edaEasyFormViewerSubmitButtonText:\"=?\",edaEasyFormViewerCancelButtonText:\"=?\",edaEasyFormViewerSubmitFormEvent:\"&?\",edaEasyFormViewerCancelFormEvent:\"&?\"},replace:!1,controller:n,controllerAs:\"vm\",templateUrl:\"eda.easyFormViewer.Template.html\",link:o};return t}angular.module(\"eda.easyFormViewer.Directive\",[]).directive(\"edaEasyFormViewer\",e),e.$inject=[\"modelsTranslator\"]}(),function(){function e(){var e={initNyaSelect:o,getControlsDefinition:n,refreshControlFormlyExpressionProperties:t,refreshControlFormlyValidators:l,refreshControlFormlyValidation:r,initConfigurationEditFromScratch:s,bindConfigurationLines:a,applyConfigurationToformlyModel:c};return e}function o(e){return i(e)}function n(){var e={};return i(e),e}function t(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyExpressionProperties=o.formlyExpressionProperties)})})})}function l(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidators=o.formlyValidators)})})})}function r(e){angular.isObject(e)&&angular.forEach(e.lines,function(e,o){angular.forEach(e.columns,function(e,o){var t=n();angular.forEach(t.controls,function(o,n){e.control.type===o.formlyType&&e.control.subtype===o.formlySubtype&&(e.control.formlyValidation=o.formlyValidation)})})})}function i(e){var o={controls:[{id:\"empty\",name:\"no control\",subtitle:\"no control\",group:\"Blank\",formlyType:\"blank\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Header\",name:\"Header\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"header\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"Subtitle\",name:\"Subtitle\",subtitle:\"no control\",group:\"Decoration\",formlyType:\"subTitle\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}},{id:\"TextInput\",name:\"Text input\",subtitle:\"Text input\",group:\"input\",formlyType:\"input\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Text input field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Password\",name:\"Password\",subtitle:\"Password\",group:\"input\",formlyType:\"input\",formlySubtype:\"password\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Email\",name:\"Email\",subtitle:\"Email\",group:\"input\",formlyType:\"input\",formlySubtype:\"email\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{emailShape:{expression:function(e,o){var n=o||e;return/^[a-z]+[a-z0-9._]+@[a-z]+\\.[a-z.]{2,5}$/.test(n)},message:\"$viewValue + ' is not a valid email'\"}},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Email field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return n.to.required?l:void 0}}}},{id:\"Date\",name:\"Date\",subtitle:\"Date\",group:\"input\",formlyType:\"datepicker\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],datepickerPopup:\"dd-MMMM-yyyy\",formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Date field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Texarea\",name:\"Textarea\",subtitle:\"Textarea\",group:\"Textarea\",formlyType:\"textarea\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Textarea field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"RichTextEditor\",name:\"RichTextEditor\",subtitle:\"RichTextEditor\",group:\"Textarea\",formlyType:\"richEditor\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this RichTextEditor field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Radio\",name:\"Radio\",subtitle:\"Radio\",options:[],group:\"Radio\",formlyType:\"radio\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Password field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"Checkbox\",name:\"Checkbox\",subtitle:\"Checkbox\",group:\"Checkbox\",formlyType:\"checkbox\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Checkbox field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"BasicSelect\",name:\"Basic select\",subtitle:\"Basic select\",options:[],group:\"Select\",formlyType:\"basicSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Basic select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}},{id:\"GroupedSelect\",name:\"Grouped Select\",subtitle:\"Grouped Select\",options:[],group:\"Select\",formlyType:\"groupedSelect\",formlySubtype:\"\",formlyLabel:\"\",formlyRequired:!1,formlyDesciption:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,o,n){var t=\"this Grouped Select field is required\",l=\"undefined\"!=typeof n.to.label&&\"\"!==n.to.label?n.to.label+\" is required\":t;return l}}}}],selectedControl:\"none\",temporyConfig:{selectedControl:\"none\",formlyLabel:\"label\",formlyRequired:!1,formlyDesciption:\"\",formlyPlaceholder:\"\",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(o,e),!0}function s(e){var o={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:\"none\",key:\"none\"}}]}]};angular.copy(o,e)}function a(e,o){if(\"[object Array]\"===Object.prototype.toString.call(o)){var n={activeLine:1,listConfigStep:[\"init\",\"first\",\"second\",\"third\"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:\"submit\",cancelButtonText:\"cancel\",lines:[]};return n.lines=[].concat(o),angular.copy(n,e),q(\"configuration model is bound\",\"lines are bound to configuration model.\")}return S(\"lines is not an array\",\"Checks lines type, it is not an array.\")}function c(e,o,n){u(o),O(n);for(var t=e.lines.length,l=0;t>l;l++)1===e.lines[l].columns.length&&(\"header\"===e.lines[l].columns[0].control.type?m(o,e,l):d(o,e,l)),2===e.lines[l].columns.length&&f(o,e,l),3===e.lines[l].columns.length&&y(o,e,l)}function u(e){var o=[];angular.copy(o,e)}function m(e,o,n){var t='