var utils,UiBusinessRules,minspecs,security,kenny,app,beyond,ctrls,sys,common,model,pub,__extends,prv;(function(n){var r=function(){function n(){}return n}(),t,i;n.PUB=r;t=function(){function n(){}return n}();n.PRIVATE=t;i=function(){function n(){}return n}();n.Test=i})(app||(app={})),function(n){var v=function(){function n(){}return n}(),r,u,f,t,i,e,o,s,h,c,l,a;n.Timestamp=v;r=function(){function n(n,t,i,r){this.key=n;this.route=t;this.view=i;this.depends=r}return n}();n.IRoute=r;u=function(){function n(){}return n.noImage="/assets/img/no-image.jpg",n}();n.imgs=u;f=function(){function n(){}return Object.defineProperty(n.prototype,"isValid",{get:function(){return this._isValid||angular.isUndefined(this.errors)||this.errors.length>0},set:function(n){this._isValid=n},enumerable:!0,configurable:!0}),n.prototype.addError=function(n){var i=new t;i.errorMessage=n;this.errors.push(i)},n}();n.ValidationResult=f;t=function(){function n(){}return n}();n.ValidationFailure=t;i=function(){function n(){}return n}();n.Cfg=i;e=function(){function n(){}return n}();n.BaseCtrl=e;i.prototype.Name=function(){};o=function(){function n(n,t){var i=this;this.$http=n;this.$q=t;this.handleError=function(n){return i.$q.reject(n.data)}}return n.prototype.handleSuccess=function(n){return n.data},n.prototype.GET=function(n,t){var i={url:n,method:"GET",params:t},r=this.$http(i);return r.then(this.handleSuccess,this.handleError)},n.prototype.POST=function(n,t){var i={url:n,method:"POST",data:t},r=this.$http(i);return r.then(this.handleSuccess,this.handleError)},n.prototype.PUT=function(n,t){var i={url:n,method:"PUT",data:t},r=this.$http(i);return r.then(this.handleSuccess,this.handleError)},n.prototype.DELETE=function(n,t){var i={url:n,method:"DELETE",data:t},r=this.$http(i);return r.then(this.handleSuccess,this.handleError)},n.prototype.GET_WITH_HEADERS=function(n,t,i,r){var u={url:n,method:"GET",params:t,data:i,headers:r},f=this.$http(u);return f.then(this.handleSuccess,this.handleError)},n.prototype.DOWNLOAD=function(n,t,i){var r={url:n,method:"POST",data:t,params:i,responseType:"arraybuffer"},u=this.$http(r);return u.then(this.handleDownload,this.handleError)},n.prototype.DOWNLOAD_WITH_RESPONSE=function(n,t,i){var r=this,u={url:n,method:"POST",data:t,params:i,responseType:"arraybuffer"},f=this.$http(u);return f.then(function(n){if(n.status==202)return n.data;r.handleDownload(n)},this.handleError)},n.prototype.DOWNLOAD_GET=function(n,t,i){var r={url:n,method:"GET",data:t,params:i,responseType:"arraybuffer"},u=this.$http(r);return u.then(this.handleDownload,this.handleError)},n.prototype.handleDownload=function(n){if(n.status!=204){var t=n.headers("Content-Disposition").replace("attachment; filename=","").replace(/"/g,""),i=new Blob([n.data],{type:"application/octet-stream"});saveAs(i,t)}},n}();n.HttpApi=o;s=function(){function n(n){this.data=n.data;this.messages=n.statusText.split(",")}return n}();n.GenericResponse=s;h=function(){function n(){}return n.createCookie=function(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"},n.isSsl=function(){return window.location.protocol==="https:"},n.createSecureCookie=function(t,i,r){var u,f;if(!n.isSsl())return n.createCookie(t,i,r);r?(u=new Date,u.setTime(u.getTime()+r*864e5),f="; expires="+u.toGMTString()):f="";document.cookie=t+"="+i+f+"; path=/"},n.readCookie=function(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null},n.eraseCookie=function(n){this.createCookie(n,"",-1)},n}();n.cookieUtils=h;c=function(){function t(){}return Object.defineProperty(t,"current",{get:function(){var t=n.cookieUtils.readCookie("culture");return angular.isDefined(t)&&t!=null||(t="ro-RO",n.cookieUtils.createCookie("culture",t,10)),t},set:function(t){n.cookieUtils.createCookie("culture",t,10)},enumerable:!0,configurable:!0}),t}();n.cultureUtils=c;l=function(){function n(){}return n.addBusinessDays=function(n,t){for(var u=0,f=t,i,r;f>0;){i=new Date;i.setDate(i.getDate()+u++);switch(i.getDay()){case 0:case 6:break;default:f--}}return r=n,n.setDate(r.getDate()+u),r},n.isBusinessDay=function(n,t){var i,r;if(this.isWeekend(n))return!0;if(t&&t.length){for(i=0;i<t.length;i++)if(r=t[i],this.datesAreEqual(n,r))return!1;return!0}return!0},n.datesAreEqual=function(n,t){var i=new Date(n),r=new Date(t);return i.getDate()==r.getDate()&&i.getMonth()==r.getMonth()&&i.getFullYear()==r.getFullYear()?!0:!1},n.isWeekend=function(n){var t=new Date(n).getDay();return t==0||t==6},n}();n.dateUtils=l;a=function(){function n(){}return n.RecordNotFound=100,n}();n.sysInfoCode=a}(sys||(sys={})),function(n){var t;(function(n){var t=function(){function n(n){this.folderName=n}return Object.defineProperty(n.prototype,"detailsFields",{get:function(){return"/template/private/reports/"+this.folderName+"/_partials/detailsFields"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"aggregateFields",{get:function(){return"/template/private/reports/"+this.folderName+"/_partials/aggregateFields"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"groupingFields",{get:function(){return"/template/private/reports/"+this.folderName+"/_partials/groupingFields"},enumerable:!0,configurable:!0}),n}();n.ReportPartialsLocation=t})(t=n.common||(n.common={}))}(model||(model={})),function(n){var i=function(){function n(){}return n.processSortProperty=function(n,t){var r=n.filter(function(n){return n.sortProperty==t}),u,i;r.length==0&&(u={sortProperty:t,descending:!0},n.push(u));r.length>0&&(i=r[0],i.descending==!0?i.descending=!1:i.descending==!1&&n.splice(n.indexOf(i),1))},n}(),t;n.SortUtils=i;t=function(){function n(){}return n.genericItem_to_cpvCodeItem=function(n){var t=n.text.split(" ");return{cPVCodeID:n.id,name:n.text}},n.cpvCodeItem_to_genericItem=function(n){return{id:n.cpvCodeID,text:n.code+" "+n.name}},n}();n.CpvUtils=t}(utils||(utils={})),function(n){var r,u,f,t,i;(function(n){n[n.Excel=0]="Excel";n[n.Pdf=1]="Pdf";n[n.Csv=2]="Csv"})(n.ExportType||(n.ExportType={}));r=n.ExportType,function(n){n[n.Radio1=1]="Radio1";n[n.Radio1_CheckBox1=2]="Radio1_CheckBox1";n[n.Radio1_CheckBox2=3]="Radio1_CheckBox2";n[n.Radio1_CheckBox2_1=4]="Radio1_CheckBox2_1";n[n.Radio1_CheckBox2_1_text=5]="Radio1_CheckBox2_1_text";n[n.Radio1_CheckBox2_2=6]="Radio1_CheckBox2_2";n[n.Radio1_CheckBox2_2_text=7]="Radio1_CheckBox2_2_text";n[n.Radio1_CheckBox3=8]="Radio1_CheckBox3";n[n.Radio1_CheckBox3_text=9]="Radio1_CheckBox3_text";n[n.Radio1_CheckBox4=10]="Radio1_CheckBox4";n[n.Radio1_CheckBox4_text=11]="Radio1_CheckBox4_text";n[n.Radio2=12]="Radio2";n[n.Radio2_text=13]="Radio2_text";n[n.Radio2_YesNo1=14]="Radio2_YesNo1";n[n.Radio2_YesNo2=15]="Radio2_YesNo2";n[n.Radio2_YesNo3=16]="Radio2_YesNo3";n[n.Radio2_YesNo4=17]="Radio2_YesNo4";n[n.Radio2_text2=18]="Radio2_text2";n[n.Radio3=19]="Radio3";n[n.Radio3_CheckBox1=20]="Radio3_CheckBox1";n[n.Radio3_CheckBox2=21]="Radio3_CheckBox2";n[n.Radio3_YesNo1=22]="Radio3_YesNo1";n[n.Radio3_YesNo2=23]="Radio3_YesNo2";n[n.Radio3_YesNo3=24]="Radio3_YesNo3";n[n.Radio3_CheckBox3=25]="Radio3_CheckBox3";n[n.Radio4=26]="Radio4";n[n.Radio4_CheckBox1=27]="Radio4_CheckBox1";n[n.Radio4_YesNo1=28]="Radio4_YesNo1";n[n.Radio4_YesNo2=29]="Radio4_YesNo2";n[n.Radio4_YesNo3=30]="Radio4_YesNo3";n[n.Radio4_CheckBox2=31]="Radio4_CheckBox2";n[n.Radio4_YesNo4=32]="Radio4_YesNo4";n[n.Radio4_YesNo5=33]="Radio4_YesNo5"}(n.SysModNoticeReason||(n.SysModNoticeReason={}));u=n.SysModNoticeReason,function(n){n[n.RPT_PrcProcOnline26131=0]="RPT_PrcProcOnline26131";n[n.RPT_PartOfLaProcedura=1]="RPT_PartOfLaProcedura";n[n.RPT_ProceduriInitiate=2]="RPT_ProceduriInitiate";n[n.RPT_Proceduri_atribuite=3]="RPT_Proceduri_atribuite";n[n.RPT_CumparariDirecte=4]="RPT_CumparariDirecte";n[n.RPT_PrcProcOnline26136=5]="RPT_PrcProcOnline26136";n[n.RPT_Achiz_CentralizateCom=6]="RPT_Achiz_CentralizateCom";n[n.RPT_Raport_cu_privire_la_participarea_la_proceduri_a_ofertantului=7]="RPT_Raport_cu_privire_la_participarea_la_proceduri_a_ofertantului";n[n.RPT_cumparari_directe_repere=8]="RPT_cumparari_directe_repere";n[n.RPT_cumparari_directe_agregat=9]="RPT_cumparari_directe_agregat";n[n.RPT_Raport_privire_la_platile_efectuate_de_ofertant=10]="RPT_Raport_privire_la_platile_efectuate_de_ofertant";n[n.RPT_Analiza_sintetica_participari_la_proceduri_desfasurate_prin_elicitatie=11]="RPT_Analiza_sintetica_participari_la_proceduri_desfasurate_prin_elicitatie";n[n.Rpt_Raport_ANI=12]="Rpt_Raport_ANI";n[n.Rpt_Raport_ANI_anunturi=13]="Rpt_Raport_ANI_anunturi";n[n.Rpt_Raport_ANI_CmpDir=14]="Rpt_Raport_ANI_CmpDir";n[n.RPT_Raport_proceduri_atribuite_de_AC=15]="RPT_Raport_proceduri_atribuite_de_AC";n[n.RPT_Raport_cumparari_directe=16]="RPT_Raport_cumparari_directe";n[n.RPT_Raport_cu_privire_la_participarea_unui_ofertant_la_proceduri=17]="RPT_Raport_cu_privire_la_participarea_unui_ofertant_la_proceduri";n[n.RPT_Raport_Top_100_platitori_servicii_oferite_de_sistem=18]="RPT_Raport_Top_100_platitori_servicii_oferite_de_sistem";n[n.RPT_Raport_cu_privire_la_platile_efectuate_de_utilizatori=19]="RPT_Raport_cu_privire_la_platile_efectuate_de_utilizatori";n[n.RPT_Analiza_sintetica_proceduri_derulate_prin_elicitatie=20]="RPT_Analiza_sintetica_proceduri_derulate_prin_elicitatie";n[n.RPT_Clarificari_AC=21]="RPT_Clarificari_AC";n[n.RPT_Statistica_anunturi_In_asteptare_validare=22]="RPT_Statistica_anunturi_In_asteptare_validare";n[n.RPT_Statistica_generala_documentatii_de_atribuire=23]="RPT_Statistica_generala_documentatii_de_atribuire";n[n.RPT_Statistica_proceduri_pe_fonduri_europene_in_asteptare_validare=24]="RPT_Statistica_proceduri_pe_fonduri_europene_in_asteptare_validare";n[n.RPT_Raport_proceduri_initiate_de_AC=25]="RPT_Raport_proceduri_initiate_de_AC";n[n.RPT_Statistica_ANRMAP_cu_privire_la_verificarea_anunturilor_si_fiselor=26]="RPT_Statistica_ANRMAP_cu_privire_la_verificarea_anunturilor_si_fiselor";n[n.RPT_Stat_Det_DF_AsteptareVal=27]="RPT_Stat_Det_DF_AsteptareVal";n[n.RPT_Statistica_Anunturi_de_atribuire=28]="RPT_Statistica_Anunturi_de_atribuire";n[n.RPT_Documentatii_atribuire_POS_CCE=29]="RPT_Documentatii_atribuire_POS_CCE";n[n.RPT_documente_constatatoare=30]="RPT_documente_constatatoare";n[n.RPT_Proceduri_initiate=31]="RPT_Proceduri_initiate";n[n.RPT_Raport_declaratii_33=32]="RPT_Raport_declaratii_33";n[n.RPT_Stat_anunturi_In_asteptare_validare_det=33]="RPT_Stat_anunturi_In_asteptare_validare_det";n[n.RPT_Anunturi_asteptare=34]="RPT_Anunturi_asteptare";n[n.RPT_Anunturi_asteptare_detaliata=35]="RPT_Anunturi_asteptare_detaliata";n[n.RPT_Raport_activitate26251=36]="RPT_Raport_activitate26251"}(n.StaticReportsType||(n.StaticReportsType={}));f=n.StaticReportsType;t=function(){function n(){var n=this;this.advFiltersCollapsed=!0;this.searchOn=!0;this.autoRefresh=!1;this.isLoading=!1;this.data={};this.numberOfPages=1;this.PAGESIZE=18;this.preSearchList=!1;this.search=function(){n.isFilterValid()&&(n.prepareSearch(),n.data={items:[],total:0},n.total=0,n.initReady=!0,n.preSearchList?n.preSearch():n.addMoreItems())};this.clearFilters=function(){n.reset();n.data={};n.total=0;n.clearDatePicker()};this.clearData=function(){n.data={};n.total=0};this.clearDatePicker=function(){for(var t=$("[data-role='datepicker']"),n=0;n<t.length;n++)$(t[n]).data("kendoDatePicker").value("")};this.initReady=!1;this.preSearch=function(){var t=n,i;t.isLoading||t.searchOn&&(n.populateFilter(),n.isLoading=!0,n.initReady=!0,i=n.preSearchItems(n.filter),i!=null?i.then(function(n){t.isLoading=!1;t.total=n;t.addMoreItems()},function(n){t.svc.log.error(n);t.svc.modalService.showValidationResult(n)}).finally(function(){t.isLoading=!1}):t.isLoading=!1)};this.addMoreItems=function(){var t=n,i;if(!t.isLoading&&t.searchOn){if(!t.initReady){t.reset();t.initReady=!0;t.search();return}n.filter.pageIndex++;n.populateFilter();(n.filter.pageIndex==0||n.data.items.length<n.total)&&(n.isLoading=!0,i=n.getAll(n.filter),i!=null?i.then(function(n){t.pageReady(n.items);t.data.items.push.apply(t.data.items,n.items);t.total=n.total;t.numberOfPages=Math.ceil(n.total/t.filter.pageSize);for(var i in n)i!="items"&&(t[i]=n[i])},function(n){t.svc.log.error(n);t.svc.modalService.showValidationResult(n)}).finally(function(){t.isLoading=!1}):t.isLoading=!1)}};this.reset()}return n.prototype.reset=function(){this.filter={pageIndex:-1,pageSize:this.PAGESIZE,sortProperties:[]};this.searchOn=!1},n.prototype.isFilterValid=function(){return!0},n.prototype.prepareSearch=function(){this.filter.pageIndex=-1;this.searchOn=!0;this.numberOfPages=1},n.prototype.populateFilter=function(){},n.prototype.pageReady=function(){},n.prototype.checkFilterDatesAreValid=function(n,t){return n!=null&&t!=null&&new Date(n)>new Date(t)?!0:!1},n.prototype.checkDifferenceBetweenDate=function(n,t){if(n==null)return 0;t==null&&(t=new Date);var i=Math.abs(t.getTime()-n.getTime());return Math.ceil(i/864e5)},n.prototype.checkFilterNumbersAreValid=function(n,t){return n!=null&&t!=null&&new Number(n)>new Number(t)?!0:!1},n}();n.BaseList=t;i=function(){function n(){this.isLoading=!1;this.rowCollection=[];this.datePickerOptions={parseFormats:["yyyy-MM-ddTHH:mm:ss"]};this.numberOfPages=1;this.isAggregate=!1;this.selectAllDisplayFields=!1;this.selectAllGroupingFields=!1;this.selectedColumns=0;this.selectedGroupColumns=0;this.data={};this.isPreview=!1}return n.prototype.countSelectedColumns=function(){var n=this;this.selectedColumns=0;this.isAggregate?this.columnsReportAggregate.forEach(function(t){t.show&&n.selectedColumns++}):this.columnsReportDetailed.forEach(function(t){t.show&&n.selectedColumns++})},n.prototype.initializeDetailedReportColumns=function(){},n.prototype.initializeAggregateReportColumns=function(){},n.prototype.initializeAggregateReportGroupColumns=function(n){n===void 0&&(n=!1)},n.prototype.selectAllFields=function(){var n=this;this.isAggregate?this.columnsReportAggregate.forEach(function(t){t.showAlways||(t.show=n.selectAllDisplayFields)}):this.columnsReportDetailed.forEach(function(t){t.showAlways||(t.show=n.selectAllDisplayFields)})},n.prototype.selectAllAggregateGroupFields=function(){var n=this;n.selectAllGroupingFields?(n.selectedGroupColumns=0,n.columnsGroupReportAggregate.forEach(function(t){t.show=!0;n.selectedGroupColumns++;n.checkFilter(t.name,!0)}),n.columnsReportAggregate.forEach(function(t){t.showAlways=!1;n.columnsGroupReportAggregate.forEach(function(n){n.name==t.name&&(t.show=!0,t.showAlways=!0)})}),n.isAggregate=!0,n.search()):(n.initializeAggregateReportGroupColumns(!0),n.columnsGroupReportAggregate.forEach(function(t){n.checkFilter(t.name,!1)}))},n.prototype.change=function(){this.search()},n.prototype.showFieldsChecklist=function(n,t){var i;if(n===void 0&&(n=""),t===void 0&&(t=""),i=$(".dropdown-content"),i.hide(),this.isPreview=!1,n!==""&&t!==""){i=$("#"+t);var r=$("#"+n),u=r.position(),f=r.outerWidth()+r.offset().left-50;i.is(":visible")?i.hide():(i.css("left",f+"px"),i.css("top",u.top+"px"),i.show());this.filterColumnName="";this.filterGroupColumnName="";$(".columnName").parent().parent().show();$(".groupColumnName").parent().parent().show()}},n.prototype.selectField=function(n){var t=this,i;this.countSelectedColumns();this.isAggregate&&(i=!1,this.columnsReportAggregate.forEach(function(r){r.name==n&&r.show==!1&&t.columnsGroupReportAggregate.forEach(function(n){n.name==r.name&&(n.show&&(i=!0,t.checkFilter(n.name,!1)),n.show=!1,n.showAlways=!0)});r.name==n&&r.show==!0&&t.columnsGroupReportAggregate.forEach(function(n){n.name==r.name&&(n.showAlways=!1)})}),i&&this.selectGroupField(n));this.columnsGroupReportAggregate.forEach(function(n){n.show&&t.selectedGroupColumns++})},n.prototype.selectGroupField=function(n){var t=this,i=[];t.isAggregate=!1;t.selectedGroupColumns=0;t.selectAllGroupingFields=!0;t.columnsGroupReportAggregate.forEach(function(r){r.show?(t.isAggregate=!0,t.selectedGroupColumns++,i.push(r.name)):t.selectAllGroupingFields=!1;r.name==n&&t.checkFilter(r.name,r.show)});t.columnsReportAggregate.forEach(function(n){i.indexOf(n.name)>-1?(n.show=!0,n.showAlways=!0):(n.showAlways=!1,t.columnsGroupReportAggregate.forEach(function(t){i.indexOf(t.name)==-1&&t.name==n.name&&(n.show=!1);t.name==n.name&&(n.showAlways=!0)}))})},n.prototype.isVisible=function(n){var t;return this.columnsReportAggregate&&this.columnsReportDetailed&&(this.isAggregate?this.columnsReportAggregate.forEach(function(i){i.name===n&&(t=i.show)}):this.columnsReportDetailed.forEach(function(i){i.name===n&&(t=i.show)})),t},n.prototype.search=function(n){(n===void 0&&(n=!1),!this.isLoading||n)&&(this.numberOfPages=1)},n.prototype.checkFilter=function(){},n.prototype.findColumn=function(){$(".columnName").parent().parent().hide();$('.columnName:contains("'+this.filterColumnName+'")').parent().parent().show()},n.prototype.findGroupColumn=function(){$(".groupColumnName").parent().parent().hide();$('.groupColumnName:contains("'+this.filterGroupColumnName+'")').parent().parent().show()},n.prototype.reset=function(n){n=="fields"&&(this.isAggregate?this.initializeAggregateReportColumns():this.initializeDetailedReportColumns(),this.selectAllDisplayFields=!1,this.filterColumnName="",$(".columnName").parent().parent().show());n=="group"&&(this.initializeAggregateReportGroupColumns(!0),this.selectAllGroupingFields=!1,this.filterGroupColumnName="",$(".groupColumnName").parent().parent().show())},n}();n.DynamicReport=i}(common||(common={})),function(n){var u=function(){function n(){}return n.getHtmlElementVal=function(n){var t=document.getElementsByName(n)[0];return t?angular.element(t).val():!1},n.asNumeric=function(n){if(n){var t=Number(n);if(t!=NaN)return t}return null},n.getHtmlFieldNumericValue=function(t){var i=n.getHtmlElementVal(t);if(i)return n.asNumeric(i)},n.Not_StrUndefinedNullEmpty=function(n){return n&&n!=""},n}(),t,i,r;n.Utils=u;t=function(){function n(n){this.vm=null;this.vm=n}return Object.defineProperty(n.prototype,"RULES_DESCRIPTOR",{get:function(){throw new Error("Abstract method! Override it!");},enumerable:!0,configurable:!0}),n}();n.AbstractBusinessRulesDescriptor=t;i=function(){function n(){}return n.Requires=function(t){return n.brValidate==null&&(n.brValidate=new r(t)),n.brValidate},n.brValidate=null,n}();n.Validator=i;r=function(){function n(n){var t=this;this.businessRulesDescriptor=n;this.appliedRules=[];this.validateFor=function(n){var i=!0,r=t.getRulesToApply(n);return r.forEach(function(n){var u,f,e,o;if(n){var h=n.name,c=n.error,r=n.rule,s="";r?(u=r.when,f=r.then,t.isFunction(u)&&(e=u(),e&&t.isFunction(f)&&(o=f(),o||(i=!1,s=r.error)))):s="Rule is invalid"}}),i};this.getRulesToApply=function(n){var i=[];return t.businessRulesDescriptor.RULES_DESCRIPTOR.forEach(function(t){t.applyFor.indexOf(n)>=0&&i.push(t)}),i};this.isFunction=function(n){return n&&typeof n=="function"?!0:!1};this.addRuleValidationResult=function(n,i,r){var u={ruleName:n,ruleResult:i,ruleExplain:r};t.appliedRules.push(u)}}return n}()}(UiBusinessRules||(UiBusinessRules={})),function(n){var u=function(){function n(){}return n}(),t,i,r;n.ControllerBridge=u;t=function(){function n(n,t){this.base=n;this.code=t;this.modeView=!0;this.canEdit=!0;this.isEditable=!0;this.validationErrors=[];this.codeFirst=!0;this.disabledSectionActions=!1}return Object.defineProperty(n.prototype,"view",{get:function(){return this.codeFirst?this.base+this.code+"/view":this.base+"view/"+this.code},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"edit",{get:function(){return this.codeFirst?this.base+this.code+"/edit":this.base+"edit/"+this.code},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tpl",{get:function(){return this.modeView?this.view:this.edit},enumerable:!0,configurable:!0}),n.prototype.onEdit=function(){},n.prototype.onCancel=function(){},n.prototype.onSave=function(){},n}();n.SectionModel=t;i=function(){function n(){this.sections=[];this.isInEditMode=!1}return n.prototype.getSectionByCode=function(n){return this.sections.filter(function(t){return t.code==n})[0]},n.prototype.canEdit=function(n){for(var i,t=0;t<this.sections.length;t++)i=this.sections[t],i.canEdit=n},n.prototype.viewSection=function(n){this.current&&(this.current.modeView=!0);var t=this.getSectionByCode(n);t.modeView=!0},n.prototype.editSection=function(n){var i=this,t;this.canEdit(!1);this.current&&(this.current.modeView=!0);t=this.getSectionByCode(n);t.onEdit();t.modeView=!1;this.current=t;i.isInEditMode=!0},n.prototype.cancelSection=function(){this.current&&(this.current.modeView=!0,this.current.validationErrors=[],this.current=null);this.canEdit(!0);this.isInEditMode=!1},n.prototype.saveSection=function(n){var t=this,i=this.getSectionByCode(n),r=function(){return t.cancelSection(n)};i.onSave(r)},n.prototype.enableEdit=function(){for(var n,t=0;t<this.sections.length;t++)n=this.sections[t],n.canEdit=!0,n.isEditable=!0},n.prototype.disableEdit=function(){for(var n,t=0;t<this.sections.length;t++)n=this.sections[t],n.canEdit=!1,n.isEditable=!1},n}();n.SectionContainerBase=i;r=function(){function n(n,t,i){this.svc=n;this.$routeParams=t;this.$timeout=i;this.init()}return n.prototype.init=function(){this.svc&&this.$timeout},n}();n.BaseNoticesController=r}(common||(common={})),function(){var n=function(){function n(){}return n.prototype.display=function(n,t){console.log(n);t?document.write("<strong>"+n+"<\/strong><br />"):document.write(n+"<br />")},n.prototype.JavaVersion=function(){for(var t=null,n=0,i=navigator.mimeTypes.length;n<i;n++)if((t=navigator.mimeTypes[n].type.match(/^application\/x-java-applet;jpi-version=(.*)$/))!==null)return t[1];return null},n.prototype.checkBrowserSpecs=function(n,t){var i=!0;return n=="Chrome"&&t>45?(i=!1,this.display("Chrome versiunea "+t+" nu este suportat. Chrome este suportat pana la versiunea 45 datorita NAPI.",!1),!1):n=="Mozilla"&&t<11?(i=!1,this.display("Internet explorer versiunea "+t+" nu este suportat. Chrome este suportat pana la versiunea 42 datorita NAPI.",!1),!1):n=="Firefox"&&t>=42?(i=!1,this.display("Firefox versiunea "+t+" nu este suportat. Firefox este suportat pana la versiunea 42 datorita NAPI.",!1),!1):void 0},n.prototype.checkJava=function(){var n=deployJava.getJREs();n==null||n.length==0?this.display("Java nu este instalat",!1):this.display("Aveti instalate urmatoarele versiuni de java: "+n,!1)},n.prototype.initSession=function(){window.session={options:{gapi_location:!0},start:function(n){n.browser&&(this.display("Verificare browser",!0),this.display("Utilizati "+n.browser.browser+" "+n.browser.version,!1),this.checkBrowserSpecs(n.browser.browser,n.browser.version));this.display("Verificare java",!0);n.plugins&&(n.plugins.java?this.display("Java OK",!1):this.display("Activati Java pentru a putea folosi facilitatile de semnare",!1));n.plugins&&this.display(n.plugins.flash)}}},n.prototype.checkAll=function(){this.initSession();this.checkJava()},n}()}(minspecs||(minspecs={})),function(n){var u=function(){function n(){this.home={key:"HOME",route:"/pub",view:"/pub/home/home",depends:["/pub/home/service"]};this.login={key:"LOGIN",route:"/pub/login",view:"/pub/login/login",noLazy:!0};this.howToSign={key:"HOW-TO-SIGN",route:"/pub/how-to-sign",view:"/pub/how-to-sign/view"};this.demo={key:"DEMO",route:"/pub/demo",view:"/pub/demo/demo"};this.was={key:"WAS_VIEW",route:"/pub/was",view:"/pub/was/was"};this.demoSlider={key:"DEMO-SLIDER",route:"/pub/demo-slider",view:"/pub/demo/demo-slider"};this.demoSignal={key:"DEMO-SIGNAL",route:"/pub/demo-signal",view:"/pub/demo/demo-signal"};this.demoCombo={key:"DEMO-COMBO",route:"/pub/demo-combo",view:"/pub/demo/demo-combo"};this.demoPdf={key:"DEMO-PDF",route:"/pub/demo-pdf",view:"/pub/demo/pdf/view"};this.demoUpload={key:"DEMO-UPLOAD",route:"/pub/demo-upload",view:"/pub/demo/demo-upload",depends:["/pub/demo/services/service"]};this.demoGenericAddress={key:"DEMO-GENERIC-ADDRESS",route:"/pub/demo-generic-address",view:"/pub/demo/demo-generic-address"};this.demoOnrc={key:"DEMO-ONRC",route:"/pub/demo-onrc",view:"/pub/demo/demo-onrc",depends:["/pub/demo/services/service"]};this.demoSigner={key:"DEMO-SIGNER",route:"/pub/demo-signer",view:"/pub/demo/demo-signer/demo-signer",depends:["/pub/demo/services/service"]};this.demoFlood={key:"DEMO-FLOOD",route:"/pub/demo-flood",view:"/pub/demo/demo-flood/demo-flood",depends:[]};this.Manual_Ca={key:"MANUAL-CA",route:"/pub/manual/ca/:id?",view:"/pub/home/manual/ca/manual"};this.Manual_Su={key:"MANUAL-SU",route:"/pub/manual/su/:id?",view:"/pub/home/manual/su/manual"};this.PubReport_List={key:"PUB-REPORT-LIST",route:"/pub/reports",view:"/pub/home/reports/list/list",depends:["/pub/home/service"]};this.PubReport_01={key:"PUB-REPORT-01",route:"/pub/report/01-top-10-procedures",view:"/pub/home/reports/01-top-10-procedures/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_02={key:"PUB-REPORT-02",route:"/pub/report/02-top-5-procedures",view:"/pub/home/reports/02-top-5-procedures/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_03={key:"PUB-REPORT-03",route:"/pub/report/03-top-5-direct-acq",view:"/pub/home/reports/03-top-5-direct-acq/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_04={key:"PUB-REPORT-04",route:"/pub/report/04-top-ac-online-award",view:"/pub/home/reports/04-top-ac-online-award/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_05={key:"PUB-REPORT-05",route:"/pub/report/05-su-prejudice-ack-doc",view:"/pub/home/reports/05-su-prejudice-ack-doc/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_06={key:"PUB-REPORT-06",route:"/pub/report/06-online-proc-percent",view:"/pub/home/reports/06-online-proc-percent/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_07={key:"PUB-REPORT-07",route:"/pub/report/07-contracts-agree-sad",view:"/pub/home/reports/07-contracts-agree-sad/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_08={key:"PUB-REPORT-08",route:"/pub/report/08-rfq-invitations",view:"/pub/home/reports/08-rfq-invitations/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_09={key:"PUB-REPORT-09",route:"/pub/report/09-da-award-notices",view:"/pub/home/reports/09-da-award-notices/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_10={key:"PUB-REPORT-10",route:"/pub/report/10-registered-ac-su",view:"/pub/home/reports/10-registered-ac-su/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_11={key:"PUB-REPORT-11",route:"/pub/report/11-published-notices",view:"/pub/home/reports/11-published-notices/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_12={key:"PUB-REPORT-12",route:"/pub/report/12-joue-notices",view:"/pub/home/reports/12-joue-notices/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_13={key:"PUB-REPORT-13",route:"/pub/report/13-catalog-items",view:"/pub/home/reports/13-catalog-items/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_14={key:"PUB-REPORT-14",route:"/pub/report/14-direct-acq-2007-present",view:"/pub/home/reports/14-direct-acq-2007-present/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_15={key:"PUB-REPORT-15",route:"/pub/report/15-total-acq-2007-present",view:"/pub/home/reports/15-total-acq-2007-present/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.PubReport_16={key:"PUB-REPORT-16",route:"/pub/report/16-numar-valoare-proc",view:"/pub/home/reports/16-numar-valoare-proc/report",depends:["/pub/home/service","/pub/home/reports/reportBase"]};this.invalidLink={key:"INVALID-LINK",route:"/pub/invalid/:error",view:"/pub/account/common/invalid-link/invalid-link"};this.staticPages={key:"STATICPAGES-VIEW",route:"/pub/staticpages/:code",view:"/pub/staticpages/view/view",depends:["/pub/staticpages/service"]};this.newsArchive={key:"ARCHIVE-NEWS",route:"/pub/archive/news",view:"/pub/archive/news/list/list",depends:["/pub/archive/service"]};this.newsArchiveView={key:"ARCHIVE-NEWS-VIEW",route:"/pub/archive/news/:id",view:"/pub/archive/news/view/view",depends:["/pub/archive/service"]};this.newsFeedArchive={key:"ARCHIVE-NEWS-FEED",route:"/pub/archive/news-feed",view:"/pub/archive/news-feed/list/list",depends:["/pub/archive/service"]};this.newsFeedArchiveView={key:"ARCHIVE-NEWS-FEED-VIEW",route:"/pub/archive/news-feed/:id",view:"/pub/archive/news-feed/view/view",depends:["/pub/archive/service"]};this.manualAndVideoArchive={key:"ARCHIVE-MANUAL-AND-VIDEO",route:"/pub/archive/manual-and-video-archive/:id?",view:"/pub/archive/manual-and-video/list/list",depends:["/pub/archive/service"]};this.manualAndVideoArchiveView={key:"ARCHIVE-MANUAL-AND-VIDEO-VIEW",route:"/pub/archive/manual-and-video/:id/:isDirectDownload",view:"/pub/archive/manual-and-video/view/view",depends:["/pub/archive/service"]};this.dayExchangeRates={key:"ARCHIVE-EXCHANGE-RATES-DAY",route:"/pub/archive/exchange-rates/day",view:"/pub/archive/exchange-rates/list/day/list",depends:["/pub/archive/service"]};this.monthExchangeRates={key:"ARCHIVE-EXCHANGE-RATES-MONTH",route:"/pub/archive/exchange-rates/month",view:"/pub/archive/exchange-rates/list/month/list",depends:["/pub/archive/service"]};this.Ctrl_PUBLIC_UsefulLinks={key:"PUBLIC-USEFULLINKSVIEW",route:"/pub/usefulLinks",view:"/pub/usefulLinks/view/view"};this.PUB_Participant_List={key:"PUB_PARTICIPANT_LIST",route:"/pub/participants",view:"/pub/participants/list/list",depends:["/pub/participants/service"]};this.PUB_Participant_SU_View={key:"PUB_PARTICIPANT_VIEW_SU",route:"/pub/participants/view/su/:id",view:"/pub/participants/view/viewSU",depends:["/pub/participants/service"]};this.PUB_Participant_AC_View={key:"PUB_PARTICIPANT_VIEW_AC",route:"/pub/participants/view/ac/:id",view:"/pub/participants/view/viewAC",depends:["/pub/participants/service"]};this.FAQ_Add_View={key:"FAQ_ADD_VIEW",route:"/pub/faq/add",view:"/pub/faq/add/addQuestion",depends:["/pub/faq/service"]};this.DA_AwardNoticeView={key:"DA-PUBLIC-AWARD-NOTICE-VIEW",route:"/pub/direct-acquisition/award-notice/view/:id",view:"/pub/direct-acquisition/award-notice/view/view",depends:["/pub/direct-acquisition/award-notice/service"]};this.AdvNoticePUBList={key:"ADVNOTICE-PUBLIC-LIST",route:"/pub/notices/adv-notices/",view:"/pub/notices/adv-notice/list/list",depends:["/pub/notices/adv-notice/service"]};this.AdvNoticePUBView={key:"ADVNOTICE-PUBLIC-VIEW",route:"/pub/notices/adv-notices/view/:id",view:"/pub/notices/adv-notice/view/view",depends:["/pub/notices/adv-notice/service"]};this.CNoticeList={key:"CNOTICE-PUBLIC-LISTVIEW",route:"/pub/notices/c-notices",view:"",depends:["/pub/notices/c-notice/service","/pub/procedure/service"]};this.CNoticeViewV1={key:"CNOTICE-PUB-VIEW-v1",route:"/pub/notices/c-notice/v1/view/:id",view:"/pub/notices/c-notice/view/view-v1",depends:["/pub/notices/c-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list"]};this.CNoticeViewV2={key:"CNOTICE-PUB-VIEW-v2",route:"/pub/notices/c-notice/v2/view/:id",view:"/pub/notices/c-notice/view/view-v2",depends:["/pub/notices/c-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/simplified-notice/service"]};this.CNoticeSADView={key:"CNOTICE-PUB-VIEW-v2",route:"/pub/sad/cnotice/view/:id",view:"/pub/notices/c-notice/view/view-v2",depends:["/pub/notices/c-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/simplified-notice/service"]};this.DCNoticeList={key:"DCNOTICE-PUBLIC-LISTVIEW",route:"/pub/notices/dc-notices",view:"",depends:["/pub/notices/dc-notice/service"]};this.RFQInvitationList={key:"PUBLIC-RFQ-INVITATION-LIST",route:"/pub/notices/rfq-invitations",view:"",depends:["/pub/notices/rfq-invitation/service"]};this.RFQInvitationView={key:"PUBLIC-RFQ-INVITATION-VIEWV2",route:"/pub/notices/rfq-invitation/v1/view/:id",view:"/pub/notices/rfq-invitation/view/viewV2",depends:["/pub/notices/rfq-invitation/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/rfq-invitation/list/list"]};this.RFQInvitationViewV2={key:"PUBLIC-RFQ-INVITATION-VIEWV2",route:"/pub/notices/rfq-invitation/v2/view/:id",view:"/pub/notices/rfq-invitation/view/viewV2",depends:["/pub/notices/rfq-invitation/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/rfq-invitation/list/list"]};this.DA_AcqPublicList={key:"DA-ACQ-PUBLIC-LIST",route:"/pub/direct-acquisition/list",view:"/pub/direct-acquisition/direct-acquisition/list/list",depends:["/pub/direct-acquisition/direct-acquisition/service"]};this.DA_AcqPublicView={key:"DA-ACQ-PUBLIC-VIEW",route:"/pub/direct-acquisition/view/:id",view:"/pub/direct-acquisition/direct-acquisition/view/view",depends:["/pub/direct-acquisition/direct-acquisition/service","/pub/direct-acquisition/award-notice/service"]};this.ForgotPassword={key:"FORGOT-PASSWORD",route:"/reg/account/forgot-password",view:"/pub/account/password/forgot-password/forgot-password",depends:["/pub/account/service"]};this.RecoveryPassword={key:"RECOVERY-PASSWORD",route:"/reg/account/recovery-password/:guid",view:"/pub/account/password/recovery-password/recovery-password",depends:["/pub/account/service"]};this.REGISTER_PUBLIC_CA_EDIT={key:"REGISTER-PUBLIC-CA-EDIT",route:"/reg/account/ca/edit/:id",view:"/pub/account/register/ca/edit/edit",depends:["/pub/account/service","/pub/account/common/select/select","/pub/account/common/viewCertifReq/viewCertifReq"]};this.REGISTER_PUBLIC_SU_EDIT={key:"REGISTER-PUBLIC-SU-EDIT",route:"/reg/account/su/edit/:id",view:"/pub/account/register/su/edit/edit",depends:["/pub/account/service","/pub/account/common/viewCertifReq/viewCertifReq"]};this.RECOVERY_PUBLIC_CA_EDIT={key:"RECOVERY-PUBLIC-CA-EDIT",route:"/reg/recovery/ca",view:"/pub/account/recovery/ca/edit/edit",depends:["/pub/account/service","/pub/account/common/viewCertifReq/viewCertifReq"]};this.RECOVERY_PUBLIC_SU_EDIT={key:"RECOVERY-PUBLIC-SU-EDIT",route:"/reg/recovery/su",view:"/pub/account/recovery/su/edit/edit",depends:["/pub/account/service","/pub/account/common/viewCertifReq/viewCertifReq"]};this.REGISTER_PUBLIC_UPLOAD={key:"REGISTER-PUBLIC-UPLOAD",route:"/reg/update-request/:id/:guid",view:"/pub/account/common/uploadMoreFiles/uploadMoreFiles",depends:["/pub/account/service"]};this.REGISTER_PUBLIC_REG_PAGE={key:"REGISTER-PUBLIC-REG-PAGE",route:"/reg/account/register",view:"/pub/account/common/register/register",depends:["/pub/account/service"]};this.REGISTER_PUBLIC_STEP_REGISTER={key:"REGISTER-PUBLIC-STEP-REGISTER",route:"/reg/account/register/stepRegister/:id",view:"/pub/account/common/stepRegister/stepRegister",depends:["/pub/account/service"]};this.REGISTER_PUBLIC_STEP_RECOVERY={key:"REGISTER-PUBLIC-STEP-RECOVERY",route:"/reg/account/register/stepRecovery/:id",view:"/pub/account/common/stepRecovery/stepRecovery",depends:["/pub/account/service"]};this.REGISTER_SHOW_OPTIONS={key:"REGISTER-SHOW-OPTIONS",route:"/reg/request/:id/:guid",view:"/pub/account/common/requests/options/options",depends:["/pub/account/common/requests/service"]};this.REGISTER_SICAP_SIGN={key:"REGISTER-SICAP-SIGN",route:"/reg/request/sicap-sign/:id/:guid",view:"/pub/account/common/requests/sicap-sign/sicap-sign",depends:["/pub/account/common/requests/service"]};this.REGISTER_EXTERN_SIGN={key:"REGISTER-EXTERN-SIGN",route:"/reg/request/extern-sign/:id/:guid",view:"/pub/account/common/requests/extern-sign/extern-sign",depends:["/pub/account/common/requests/service"]};this.UPLOAD_EXTERN_SIGN={key:"UPLOAD-EXTERN-SIGN",route:"/reg/upload-extern-sign/:id/:guid",view:"/pub/account/common/requests/extern-sign/upload-extern-sign/upload-extern-sign",depends:["/pub/account/common/requests/service"]};this.REGISTER_OTHER_SIGN={key:"REGISTER-OTHER-SIGN",route:"/reg/request/other-sign/:id/:guid",view:"/pub/account/common/requests/other-sign/other-sign",depends:["/pub/account/common/requests/service"]};this.PCNOTICE_PUBLIC_List={key:"PCNOTICE-PUBLIC-LIST",route:"/pub/notices/pc-notices",view:"",depends:["/pub/notices/pc-notice/service"]};this.PCNOTICE_PUBLIC_VIEW={key:"PCNOTICE-PUBLIC-VIEWV2",route:"/pub/notices/pc-notice/v1/view/:id",view:"/pub/notices/pc-notice/view/viewV2",depends:["/pub/notices/pc-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.PCNOTICE_PUBLIC_VIEWV2={key:"PCNOTICE-PUBLIC-VIEWV2",route:"/pub/notices/pc-notice/v2/view/:id",view:"/pub/notices/pc-notice/view/viewV2",depends:["/pub/notices/pc-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.Ctrl_ProcedureClassifCPV_SU_List={key:"PUB-PROCEDURECLASSIFCPV-LIST",route:"/pub/procedure-classification/:idCPV?/:countyCode?",view:"/pub/home/classif-procedure/list/list",depends:["/pub/home/service"]};this.CPV_CODE_CATEGORY_LIST={key:"PUB-CPVCODECATEGORYLIST",route:"/pub/cpvcodes",view:"/pub/home/cpvcodes/codes",depends:["/pub/home/service"]};this.BROWSE_CPV_CODE_LIST={key:"PUB-BROWSECPVCODELIST",route:"/pub/browsecpvcodes",view:"/pub/home/cpvcodes/browse-cpv",depends:["/pub/home/service"]};this.PINOTICE_PUB_List={key:"PI-NOTICE-PUB-LIST",route:"/pub/notices/pi-notices",view:"/pub/notices/pi-notice/list/list",depends:["/pub/notices/pi-notice/service"]};this.PINOTICE_PUB_View_v1={key:"PI-NOTICE-PUB-VIEW-V1",route:"/pub/notices/pi-notice/view/v1/:id",view:"/pub/notices/pi-notice/view/view-v1",depends:["/pub/notices/pi-notice/service","/private/notices/pi-notice/container-v1","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.PINOTICE_PUB_View_v2={key:"PI-NOTICE-PUB-VIEW-V2",route:"/pub/notices/pi-notice/view/v2/:id",view:"/pub/notices/pi-notice/view/view-v2",depends:["/pub/notices/pi-notice/service","/private/notices/pi-notice/container-v2","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.ENOTICE_PUBLIC_LIST={key:"ENOTICE-PUBLIC-LIST",route:"/pub/notices/e-notices",view:"/pub/notices/e-notice/list/list",depends:["/pub/notices/e-notice/service"]};this.ENOTICE_PUBLIC_VIEW={key:"ENOTICE-PUBLIC-VIEW",route:"/pub/notices/e-notice/v1/view/:id",view:"/pub/notices/e-notice/view/view",depends:["/pub/notices/e-notice/service"]};this.ENOTICE_PUBLIC_VIEWV2={key:"ENOTICE-PUBLIC-VIEWV2",route:"/pub/notices/e-notice/v2/view/:id",view:"/pub/notices/e-notice/view/viewV2",depends:["/pub/notices/e-notice/service"]};this.CANOTICE_PUB_List_C={key:"CANOTICE-PUB-LIST-C",route:"/pub/notices/ca-notices-c",view:"/pub/notices/ca-notice/list-c/list",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_List_PC={key:"CANOTICE-PUB-LIST-PC",route:"/pub/notices/ca-notices-pc",view:"/pub/notices/ca-notice/list-pc/list",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_List_DC={key:"CANOTICE-PUB-LIST-DC",route:"/pub/notices/ca-notices-dc",view:"/pub/notices/ca-notice/list-dc/list",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_List_RFQ={key:"CANOTICE-PUB-LIST-RFQ",route:"/pub/notices/ca-notices-rfq",view:"/pub/notices/ca-notice/list-rfq/list",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_List_SNC={key:"CANOTICE-PUB-LIST-SNC",route:"/pub/notices/ca-notices-snc",view:"/pub/notices/ca-notice/list-snc/list",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_VIEW_C={key:"CANOTICE-PUB-VIEW-C",route:"/pub/notices/ca-notices/view-c/:id",view:"/pub/notices/ca-notice/view-c/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/canotices/service","/private/notices/paapdetail-select/paapdetail-select","/common/notices/common/service"]};this.CANOTICE_PUB_VIEW_C_V1={key:"CANOTICE-CA-VIEW-C-PUBLIC-V1",route:"/pub/notices/ca-notices/view-c/v1/:id",view:"/pub/notices/ca-notice/view-c-v1/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/canotices/service"]};this.CANOTICE_PUB_VIEW_DC_V1={key:"CANOTICE-PUB-VIEW-DC-V1",route:"/pub/notices/ca-notices/view-dc/v1/:id",view:"/pub/notices/ca-notice/view-dc-v1/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/common/notices/canotices/service","/pub/notices/e-notice/service","/pub/notices/ca-notice/common/erata/errata"]};this.CANOTICE_PUB_VIEW_PC_V1={key:"CANOTICE-CA-VIEW-PC-PUBLIC-V1",route:"/pub/notices/ca-notices/view-pc/v1/:id",view:"/pub/notices/ca-notice/view-pc-v1/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/canotices/service"]};this.CANOTICE_PUB_VIEW_SNC_V1={key:"CANOTICE-CA-VIEW-SNC-PUBLIC-V1",route:"/pub/notices/ca-notices/view-scn/v1/:id",view:"/pub/notices/ca-notice/view-snc-v1/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/canotices/service"]};this.CANOTICE_PUB_VIEW_RFQ_V1={key:"CANOTICE-CA-VIEW-RFQ-PUBLIC-V1",route:"/pub/notices/ca-notices/view-rfq/v1/:id",view:"/pub/notices/ca-notice/view-rfq-v1/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/canotices/service"]};this.CANOTICE_PUB_EDIT_C_OLD={key:"CANOTICE-PUB-EDIT-C-OLD",route:"/pub/notices/ca-notices-c/view/v1/:id",view:"/pub/notices/ca-notice/edit-c/old/edit-old",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_VIEW_RFQ={key:"CANOTICE-PUB-VIEW-RFQ",route:"/pub/notices/ca-notices/view-rfq/:id",view:"/pub/notices/ca-notice/view-rfq/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/common/service"]};this.CANOTICE_PUB_VIEW_SNC={key:"CANOTICE-PUB-VIEW-SNC",route:"/pub/notices/ca-notices/view-snc/:id",view:"/pub/notices/ca-notice/view-snc/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/pub/notices/ca-notice/view-rfq/view","/common/notices/common/service"]};this.CANOTICE_PUB_VIEW_PC={key:"CANOTICE-PUB-VIEW-PC",route:"/pub/notices/ca-notices-pc/view/:id",view:"/pub/notices/ca-notice/view-pc/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/common/service"]};this.CANOTICE_PUB_View_DC={key:"CANOTICE-PUB-VIEW-DC",route:"/pub/notices/ca-notices-dc/view/:id",view:"/pub/notices/ca-notice/view-dc/view",depends:["/pub/notices/ca-notice/service","/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service","/common/notices/common/service"]};this.CANOTICE_PUB_VIEW_PC_OLD={key:"CANOTICE-PUB-EDIT-PC-OLD",route:"/pub/notices/ca-notices/view-pc/v1/:id",view:"/pub/notices/ca-notice/edit-pc/old/edit-old",depends:["/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_VIEW_DC_OLD={key:"CANOTICE-PUB-EDIT-DC-OLD",route:"/pub/notices/ca-notices/view-dc/v1/:id",view:"/pub/notices/ca-notice/view-dc/old/edit-old",depends:["/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_VIEW_C_OLD={key:"CANOTICE-PUB-EDIT-C-OLD",route:"/pub/notices/ca-notices/view-c/v1/:id",view:"/pub/notices/ca-notice/edit-c/old/edit-old",depends:["/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.CANOTICE_PUB_VIEW_RFQ_OLD={key:"CANOTICE-PUB-EDIT-RFQ-OLD",route:"/pub/notices/ca-notices/view-rfq/v1/:id",view:"/pub/notices/ca-notice/edit-rfq/old/edit-old",depends:["/pub/notices/ca-notice/SectionContainer","/pub/notices/ca-notice/service","/pub/notices/ca-notice/common/erata/errata","/pub/notices/e-notice/service"]};this.DCNOTICE_PUB_View={key:"DCNOTICE-PUB-VIEW",route:"/pub/notices/dc-notice/v1/view/:id",view:"/pub/notices/dc-notice/view/view",depends:["/pub/notices/dc-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.DCNOTICE_PUB_ViewV2={key:"DCNOTICE-PUB-VIEWV2",route:"/pub/notices/dc-notice/v2/view/:id",view:"/pub/notices/dc-notice/view/viewV2",depends:["/pub/notices/dc-notice/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.OCDS_PUB_View={key:"OCDS-PUB-VIEW",route:"/pub/ocds/view/:id",view:"/pub/ocds/view/view",depends:["/pub/ocds/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list"]};this.OcdsList={key:"OCDS-PUBLIC-LISTVIEW",route:"/pub/ocds",view:"/pub/ocds/list/list",depends:["/pub/ocds/service"]};this.SimplifiedNotice_PUBLIC_View={key:"PUBLIC-RFQ-INVITATION-VIEWV2",route:"/pub/notices/simplified-notice/v1/view/:id",view:"/pub/notices/rfq-invitation/view/viewV2",depends:["/pub/notices/rfq-invitation/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/rfq-invitation/list/list"]};this.SimplifiedNotice_PUBLIC_ViewV2={key:"PUBLIC-RFQ-INVITATION-VIEWV2",route:"/pub/notices/simplified-notice/v2/view/:id",view:"/pub/notices/rfq-invitation/view/viewV2",depends:["/pub/notices/rfq-invitation/service","/pub/notices/e-notice/service","/pub/notices/e-notice/list/list","/pub/documents/ack/service","/pub/documents/ack/list/list","/pub/notices/rfq-invitation/list/list"]};this.SimplifiedNotice_PUBLIC_List={key:"PUBLIC-RFQ-INVITATION-LIST",route:"/pub/notices/simplified-notices",view:"",depends:["/pub/notices/rfq-invitation/service"]};this.SimplifiedNoticeDps_PUBLIC_View={key:"SIMPLIFIEDNOTICE-DPS-PUB-VIEW",route:"/pub/notices/simplified-notice-dps/view/:id",view:"/pub/notices/simplified-notice/view/view",depends:["/private/notices/simplified-notice/common/base","/pub/notices/simplified-notice/service","/pub/notices/e-notice/service"]};this.PUBLICProcedureView={key:"PROC-PUB-VIEW",route:"/pub/procedure/view/:idProcedure/:idProcedureLot?",view:"/pub/procedure/view/view",depends:["/pub/procedure/service"]};this.PUBLICProcedureStatementView={key:"PROC-STATEMENT-PUB-VIEW",route:"/pub/procedure/statement/view/:id",view:"/pub/procedure/procedure-statement/view",depends:["/pub/procedure/service"]};this.PUBLICProcedureViewDps={key:"PROC-PUB-VIEWDPS",route:"/pub/procedure/viewdps/:idProcedure/:idProcedureLot?",view:"/pub/procedure/view/viewdps",depends:["/pub/procedure/service","/pub/notices/simplified-notice/service"]};this.PUBLICEAView={key:"PUBLIC-EA-VIEW",route:"/pub/electronic-auction/view/:id",view:"/pub/electronic-auction/view/view",depends:["/pub/electronic-auction/service","/private/electronic-auction/common/base"]};this.ContractsPubList={key:"CONTRACT-PUB-LIST",route:"/pub/contracts",view:"/pub/contracts/list/list",depends:["/pub/contracts/service"]};this.ContractsPubView={key:"CONTRACT-PUB-VIEW",route:"/pub/contracts/view/:id",view:"/pub/contracts/view/view",depends:["/pub/contracts/service"]};this.ACKDOCUMENTPubList={key:"ACK-PUB-LIST",route:"/pub/ack-docs",view:"/pub/documents/ack/list/list",depends:["/pub/documents/ack/service"]};this.ACKDOCUMENTPubList_Id={key:"ACK-PUB-LIST",route:"/pub/ack-docs/:id",view:"/pub/documents/ack/list/list",depends:["/pub/documents/ack/service"]};this.ACKDOCUMENTPubView={key:"ACK-PUB-VIEW",route:"/pub/ack-docs/view/:id",view:"/pub/documents/ack/view/view",depends:["/pub/documents/ack/service"]};this.PaapList={key:"PAAP-PUBLIC-LISTVIEW",route:"/pub/acquisition-plans",view:"/pub/acquisition-plan/list/list",depends:["/pub/acquisition-plan/service"]};this.PaapView={key:"PAAP-PUB-VIEW",route:"/pub/acquisition-plan/view/:id",view:"/pub/acquisition-plan/view/view",depends:["/pub/acquisition-plan/service"]};this.StaticPageSearchResults={key:"STATIC-PAGE-SEARCH-RESULTS",route:"/pub/search/:searchTerm",view:"/pub/search/staticPageSearchResults",depends:["/pub/search/service"]};this.SubsequentContractList={key:"SUBSEQUENT-CONTRACT-LIST",route:"/pub/subsequent-contracts/:id",view:"/pub/subsequent-contract/list/list",depends:["/pub/subsequent-contract/service"]};this.McNoticeList={key:"MCNOTICE-PUBLIC-LISTVIEW",route:"/pub/notices/mc-notices",view:"/pub/notices/mc-notice/list/list",depends:["/pub/notices/mc-notice/service"]};this.McNoticeView={key:"MCNOTICE-PUB-VIEW",route:"/pub/notices/mc-notice/view/:id",view:"/pub/notices/mc-notice/view/view",depends:["/pub/notices/mc-notice/service"]};this.CaNoticeContractView_PUB={key:"CANOTICE-CONTRACT-VIEW-PUB",route:"/pub/ca-notice/contract/view/:id",view:"/pub/notices/ca-notice/common/contract/contract-view",depends:["/pub/notices/ca-notice/service"]};this.MODIFICATION_NOTICE_VIEW={key:"MODIFICATION-NOTICE-VIEW",route:"/pub/notices/ca-notices/modification-notice-view/:contractId",view:"/pub/notices/ca-notice/common/modification-notice-view/modification-notice-view",depends:[]};this.SAD_PUB_VIEW={key:"SAD-VIEW-PUB",route:"/pub/sad/view/:id",view:"/pub/sad/view/view",depends:["/pub/sad/service"]};this.Additional_CA_List={key:"Additional_CA_List",route:"/pub/sad/additional-ca/:id",view:"/private/sad/view/ca/additional-ca/view",depends:["/private/sad/service","/private/sad/view/ca/additional-ca/common/view-common"]};this.SadList_CNotice_Pub={key:"SAD-LIST-CNOTICE",route:"/pub/sad/sadList/:resetFilter",view:"/common/sad/common/cnoticeList",depends:["/common/notices/common/service","/common/notices/common/df-select/df-select"]};this.RFQ_INVITATION_SAD_VIEW={key:"RFQINVITATION-SAD-PUB-VIEW",route:"/pub/rfqInvitationSad/view/:id",view:"/pub/sad/rfqInvitationSad/view/view",depends:["/pub/sad/service","/common/notices/common/service"]};this.ContractNoticeSADList_Pub={key:"CNOTICE-SAD-LIST",route:"/pub/sad/contract-notices/list/:noticeTypeId/:resetFilter",view:"/common/notices/common/list/sad/cnoticeList",depends:["/common/notices/common/service"]};this.ContractNoticeList_Pub={key:"CONTRACT-NOTICE-LIST",route:"/pub/notices/contract-notices/list/:noticeTypeId/:resetFilter",view:"/common/notices/common/list/noticeList",depends:["/common/notices/common/service"]};this.DirectAcquisitionList_Pub={key:"DIRECT-ACQUISITION-LIST",route:"/pub/direct-acquisitions/list/:isFromMenu",view:"/common/direct-acquisition/list/direct-acquisition-list",depends:["/common/direct-acquisition/service"]};this.DaAwardNoticeList_Pub={key:"DA-AWARD-NOTICE-LIST",route:"/pub/da-award-notices/list/:isFromMenu",view:"/common/da-award-notice/list/da-award-notice-list",depends:["/common/da-award-notice/service"]};this.ContractAwardNoticeList_Pub={key:"CONTRACT-AWARD-NOTICE-LIST",route:"/pub/notices/contract-award-notices/list/:noticeTypeId/:resetFilter",view:"/common/notices/common/list/caNotice/caNoticeList",depends:["/common/notices/common/service"]};this.AdvNoticeList_Pub={key:"ADV-NOTICE-LIST",route:"/pub/adv-notices/list/:isFromMenu",view:"/common/notices/advNotice/list/adv-notice-list",depends:["/common/notices/advNotice/service"]};this.McNoticeList_Pub={key:"MC-NOTICE-LIST",route:"/pub/mc-notices/list/:isFromMenu",view:"/common/notices/mcNotice/list/mc-notice-list",depends:["/common/notices/mcNotice/service"]};this.CentralNotifList_Pub={key:"CENTRAL-NOTIF-LIST",route:"/pub/centralised-notification/list/:isFromMenu",view:"/common/direct-acquisition/centralised-notification/centralised-notification-list/centralised-notification-list",depends:["/common/direct-acquisition/centralised-notification/service"]};this.CentralNotifView_Pub={key:"CENTRAL-NOTIF-VIEW",route:"/pub/centralised-notification/view/:centralNotifId",view:"/common/direct-acquisition/centralised-notification/centralised-notification-view/centralised-notification-view",depends:["/common/direct-acquisition/centralised-notification/service"]};this.REGISTRATION_PANEL={key:"REGISTRATION-PANEL",route:"/reg/options",view:"/pub/registration/common/registration-panel/registration-panel",depends:["/pub/registration/service"]};this.REG_TERMS_AND_CONDITIONS={key:"REG-TERMS-AND-CONDITIONS",route:"/reg/eula",view:"/pub/registration/common/terms-and-conditions/terms-and-conditions",depends:["/pub/registration/service"]};this.PREREGISTER_PUBLIC_SU={key:"PREREGISTER-PUBLIC-SU",route:"/reg/preRegister/su",view:"/pub/registration/registration/su/preRegister/preRegister",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.PREREGISTER_PUBLIC_CA={key:"PREREGISTER-PUBLIC-CA",route:"/reg/preRegister/ca",view:"/pub/registration/registration/ca/preRegister/preRegister",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.PREREGISTER_PUBLIC_EUMON={key:"PREREGISTER-PUBLIC-CA",route:"/reg/preRegister/eu-mon",view:"/pub/registration/registration/ca/preRegister/preRegister",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.PRERECOVERY_PUBLIC={key:"PRERECOVERY-PUBLIC",route:"/reg/preRecovery",view:"/pub/registration/recovery/common/pre-recovery/pre-recovery",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.FINALIZE_REGISTRATION_PUBLIC_SU={key:"FINALIZE-REGISTRATION-PUBLIC-SU",route:"/reg/finalizeRegistration/su",view:"/pub/registration/registration/su/finalizeRegistration/finalizeRegistration",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.FINALIZE_REGISTRATION_PUBLIC_CA={key:"FINALIZE-REGISTRATION-PUBLIC-CA",route:"/reg/finalizeRegistration/ca",view:"/pub/registration/registration/ca/finalizeRegistration/finalizeRegistration",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.REGISTER_PUBLIC_SU={key:"REGISTER-PUBLIC-SU",route:"/reg/register/su",view:"/pub/registration/registration/su/registration-su",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.REGISTER_PUBLIC_CA={key:"REGISTER-PUBLIC-CA",route:"/reg/register/ca",view:"/pub/registration/registration/ca/registration-ca",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.REGISTER_PUBLIC_EUMON={key:"REGISTER-PUBLIC-CA",route:"/reg/register/eu-mon",view:"/pub/registration/registration/ca/registration-ca",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.RECOVERY_PUBLIC_CA={key:"RECOVERY-PUBLIC-CA",route:"/reg/recover/ca",view:"/pub/registration/recovery/ca/recovery-ca",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.RECOVERY_PUBLIC_SU={key:"RECOVERY-PUBLIC-SU",route:"/reg/recover/su",view:"/pub/registration/recovery/su/recovery-su",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.FORGOT_CERTIFICATE={key:"FORGOT-CERTIFICATE",route:"/reg/recovery/certificate",view:"/pub/registration/recovery/common/forgot-certificate/forgot-certificate",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.FORGOT_USERNAME={key:"FORGOT-USERNAME",route:"/reg/recovery/user",view:"/pub/registration/recovery/common/forgot-username/forgot-username",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.FORGOT_PASSWORD={key:"FORGOT-PASSWORD",route:"/reg/recovery/password",view:"/pub/registration/recovery/common/forgot-password/forgot-password",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.RESET_PASSWORD={key:"RESET-PASSWORD",route:"/reg/recovery/reset-password/:id",view:"/pub/registration/recovery/common/forgot-password/reset-password/reset-password",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.FORGOT_EVERYTHING={key:"FORGOT-EVERYTHING",route:"/reg/preRecovery",view:"/pub/registration/recovery/common/forgot-everything/forgot-everything",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.RECOVERY_PAYMENT={key:"RECOVERY-PAYMENT",route:"/reg/recovery/payment",view:"/pub/registration/recovery/su/payment/recovery-payment",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.VALIDATION_CODE={key:"VALIDATION-CODE",route:"/reg/recovery/code",view:"/pub/registration/recovery/common/validation-code/validation-code",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.RECOVERY_PAYMENT_RETURN={key:"RECOVERY-PAYMENT-RETURN",route:"/reg/recovery/payment/return/:id",view:"/pub/registration/recovery/su/payment-return/recovery-payment-return",depends:["/pub/registration/service"]};this.FINAL_PAGE={key:"FINAL-PAGE",route:"/reg/recovery/final-page/:id",view:"/pub/registration/recovery/common/finalPage/finalPage",depends:["/pub/registration/service"]};this.SIGNATURE_VALIDATION_RESULT={key:"SIGNATURE-VALIDATION-RESULT",route:"/reg/recover/signature-validation-result/:id",view:"/pub/registration/common/signature-validation-result/signature-validation-result",depends:["/pub/registration/service","/pub/registration/recovery/common/recovery-common"]};this.REGISTRATION_SUCCESS={key:"REGISTER-SUCCESS",route:"/reg/registration/success",view:"/pub/registration/registration/common/registration-success/registration-success",depends:["/pub/registration/service","/pub/registration/registration/common/registration-common"]};this.NoticeChangeView={key:"NoticeChangeViewController",route:"/pub/notices/chg-notice/view/:id/:isNoticeChange",view:"/common/notices/common/changeNotice/view/noticeChangeView",depends:["/common/notices/errata/errata","/common/notices/common/service"]}}return n}(),t,i,r;n.pubRouteInfo=u;t=function(){function n(){}return n}();n.prvRouteInfo=t;i=function(){function t(){}return t.routes=new n.pubRouteInfo,t}();n.pub=i;r=function(){function t(){}return t.routes=new n.prvRouteInfo,t}();n.prv=r}(sys||(sys={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)};angular.module("app.security",["ngResource","ngCookies","LocalStorageModule"]),function(n){var u=function(){function n(n,t,i,r,u,f,e){this.$http=n;this.$cookies=t;this.$cookieStore=i;this.$location=r;this.$interval=u;this.localStorageService=f;this.cfgService=e;this.lastRefresh=null}return Object.defineProperty(n.prototype,"isAuthenticated",{get:function(){return this.currentUser!=null&&this.currentUser.userId>0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentUser",{get:function(){return angular.fromJson(this.localStorageService.get("currentUser"))},set:function(n){config=typeof config=="undefined"?{}:config;config.entityType=n&&n.entity?n.entity.entityType:null;this.localStorageService.set("currentUser",angular.toJson(n))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"localAccessToken",{get:function(){return sys.cookieUtils.readCookie("_Token")},set:function(n){n==null?sys.cookieUtils.eraseCookie("_Token"):sys.cookieUtils.createSecureCookie("_Token",n,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"localRefreshToken",{get:function(){return sys.cookieUtils.readCookie("_RefreshToken")},set:function(n){n==null?sys.cookieUtils.eraseCookie("_RefreshToken"):sys.cookieUtils.createSecureCookie("_RefreshToken",n,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"httpSessionID",{get:function(){return sys.cookieUtils.readCookie("_HttpSessionID")},set:function(n){n==null?sys.cookieUtils.eraseCookie("_HttpSessionID"):sys.cookieUtils.createSecureCookie("_HttpSessionID",n,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"HomeURL",{get:function(){return this.cfgService.cfg.basePrv+this.RelativeHomeURL},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"LoginURL",{get:function(){return this.cfgService.cfg.basePrv+"pub/login"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"returnUrl",{get:function(){return this.$location.search().returnUrl},set:function(n){this.$location.search("returnUrl")!=null&&this.$location.search("returnUrl",n)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"RelativeHomeURL",{get:function(){var n=this.currentUser;if(n!=null)switch(n.entity.entityType){case 1:return"seap/home";case 2:return"ca/home";case 3:return"su/home";case 4:return"mon/home";case 6:return"mon/home";case 7:return"mon/home";case 8:return"mon/home";case 9:return"mon/home";case 11:return"mon/home";case 12:return"mon/home";case 13:return"mon/home";case 14:return"mon/home";case 15:return"mon/home";case 16:return"mon/home";case 17:return"mon/home";case 18:return"mon/home"}return"pub"},enumerable:!0,configurable:!0}),n.prototype.signIn=function(n,t,i,r,u){var e=this,f,o;this.clearAll();f=this;o="grant_type=password&username="+t+"&password="+i;this.$http({url:"Token",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:o}).success(function(n){if(f.setHeaders(n.access_token,n.refresh_token),e.currentUser===undefined||e.currentUser==null)f.loadFullUser().then(function(n){f.currentUser=n.data;f.goToReturnUrl();r()});else{var t=f.$location.search().returnUrl;if(t){window.location.href=t;return}r()}}).error(function(n){u(n.error_description?n.error_description.replace(/["']{1}/gi,""):"auth internal error")})},n.prototype.signInQRCode=function(){var t=this,n=this;this.$http({url:"Token",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:"grant_type=qrcode"}).success(function(i){if(n.setHeaders(i.access_token,i.refresh_token),t.currentUser===undefined||t.currentUser==null)n.loadFullUser().then(function(t){n.currentUser=t.data;n.goToReturnUrl()});else{var r=n.$location.search().returnUrl;if(r){window.location.href=r;return}}}).error(function(){})},n.prototype.refreshToken=function(n,t){var i=this,r=this.localRefreshToken;this.$http({url:"Token",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:"grant_type=refresh_token&refresh_token="+r+"&client_id=sicap_portal"}).success(function(t){i.setHeaders(t.access_token,t.refresh_token);i.currentUser===undefined||i.currentUser==null?i.loadFullUser().then(function(t){i.currentUser=t.data;n()}):n()}).error(function(){i.clearLocalData();t()})},n.prototype.clearAll=function(){this.$http.defaults.headers.common.Authorization=null;this.$http.defaults.headers.common.RefreshToken=null;this.$http.defaults.headers.common.HttpSessionID=this.httpSessionID;this.localAccessToken=null;this.localRefreshToken=null;this.currentUser=null;this.localStorageService.clearAll();this.clearLocalData()},n.prototype.signOut=function(){var n=this;this.$http.post("api-reg/account/logout",null).success(function(){n.clearAll();n.clearLocalData();n.localStorageService.clearAll();window.location.href="/pub"})},n.prototype.setDefaultHeaders=function(){this.httpSessionID==null&&(this.httpSessionID=i.newGuid().toUpperCase());this.$http.defaults.headers.common.Authorization="Bearer "+this.localAccessToken;this.$http.defaults.headers.common.RefreshToken=this.localRefreshToken;this.$http.defaults.headers.common.Culture=sys.cultureUtils.current;this.$http.defaults.headers.common.HttpSessionID=this.httpSessionID;this.$http.defaults.headers.get={"cache-control":"no-cache",pragma:"no-cache","max-age":"86400"}},n.prototype.saveReturnUrlThenShowLogin=function(){this.returnUrl=this.$location.path();window.location.href=this.LoginURL},n.prototype.goToReturnUrl=function(){window.location.href=this.returnUrl?this.returnUrl:this.HomeURL},n.prototype.clearLocalData=function(){this.localAccessToken=null;this.localRefreshToken=null;this.currentUser=null},n.prototype.loadFullUser=function(){return this.$http({url:"api-reg/account/getCurrentUser",method:"GET"})},n.prototype.setHeaders=function(n,t){this.$http.defaults.headers.common.Authorization="Bearer "+n;this.$http.defaults.headers.common.RefreshToken=t;this.$http.defaults.headers.common.HttpSessionID=this.httpSessionID;this.localAccessToken=n;this.localRefreshToken=t},n.$inject=["$http","$cookies","$cookieStore","$location","$interval","localStorageService","cfgService"],n}(),i=function(){function n(){}return n.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})},n}(),r,t;n.Guid=i;angular.module("app.security").service("authService",u);r=function(){function n(){typeof config!="undefined"&&(this.cfg=config)}return n}();angular.module("app.security").service("cfgService",r);t=function(n){function t(t,i){n.call(this,t,i)}return __extends(t,n),t.prototype.login=function(n){return this.POST("api-reg/QRCode/login/"+n)},t.$inject=["$http","$q"],t}(sys.HttpApi);n.QRCodeApi=t;angular.module("app.security").service("QRCodeApi",t)}(security||(security={}));angular.module("app.controls",["ngResource","ngCookies","ngTable","ngCookies","angularFileUpload","angularSpinner","chieffancypants.loadingBar","lrInfiniteScroll","infinite-scroll","ui.bootstrap","ng-breadcrumbs","ngPasswordStrength","LocalStorageModule","kendo.directives","blockUI","vcRecaptcha","wst"]).directive("sicapNoSticky",function(){return{restrict:"AE",link:function(){}}}).config(["blockUIConfig",function(n){n.message="Se incarca...";n.delay=100;n.autoBlock=!1;n.resetOnException=!1;n.template='<div class="block-ui-overlay"><\/div><div class="block-ui-message-container" aria-live="assertive" aria-atomic="true"><div class="spinner-3bounce"><div class="bounce1"><\/div><div class="bounce2"><\/div><div class="bounce3"><\/div><\/div><\/div>'}]).run(function(){function n(n){return 100*parseFloat($(n).css("width"))/parseFloat($(n).parent().css("width"))}(window.location.pathname!=="/pub"||window.location.pathname!=="/reg")&&setInterval(function(){$(".navbar .navbar-inner-homepage").hasClass("shrink")?$(".navbar .navbar-inner-homepage-UE-flags").addClass("hide-flags-pub"):n($(".navbar .navbar-inner-homepage"))<=80.03&&$(".navbar .navbar-inner-homepage-UE-flags").removeClass("hide-flags-pub")},10);$(document).scroll(function(){var n=$(window).scrollTop(),t=$(document).height(),i=$(window).height(),r=n/(t-i)*100,u=r;$(".progress-bar-hz").css("width",u+"%")});$(document).on("mouseenter",".u-items-list__content h2",function(){var n=$(this);this.offsetWidth<this.scrollWidth&&!n.attr("title")&&(n.tooltip({title:n.text(),placement:"top"}),n.tooltip("show"))});setInterval(function(){/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?($("#container-sizing").css({"padding-top":"20px"}),$("#procedure-tk").removeClass("procedure-padding"),window.location.pathname.indexOf("/pub")>=0||window.location.pathname.indexOf("/reg")>=0?($(".container-login-bar-pub").addClass("padding-top-0"),$(".navbar-brand logo-homepage").addClass("hidden"),$(".page-header").attr("style","top: 44px!important"),$(".navbar").addClass("navbar-shrink-pub"),$(".navbar-account").addClass("account-absolute"),$("#logoPub").attr("src","assets/home/img/mini-logo-homepage.png"),$("#logoPub").attr("style","height:31px"),$("#logoPub").addClass("img-change-mobile"),$("#nav-toggle").attr("style","top:6px"),$(".system-acces-fix").addClass("system-acces-fix-mobile")):window.location.pathname.indexOf("/ca/")==-1&&window.location.pathname.indexOf("/su/")==-1&&window.location.pathname.indexOf("/seap/")==-1&&window.location.pathname.indexOf("/mon/")==-1&&($(".container-login-bar-pub").removeClass("padding-top-0"),$(".navbar-brand logo-homepage").removeClass("hidden"),$(".page-header").attr("style","top: 124px!important"),$(".navbar").removeClass("navbar-shrink-pub"),$(".navbar-account").removeClass("account-absolute"),$("#logoPub").attr("src","assets/home/img/logo_homepage.png"),$("#logoPub").attr("style","height:55px"),$("#logoPub").removeClass("img-change-mobile"),$("#nav-toggle").attr("style","top:21px"),$(".system-acces-fix").removeClass("system-acces-fix-mobile"))):$("#container-sizing").css({"padding-top":"30px"});window.location.pathname.indexOf("/pub/")==-1&&window.location.pathname.indexOf("/reg/")==-1&&window.location.pathname!=="/ca/home"&&window.location.pathname!=="/su/home"&&window.location.pathname!=="/seap/home"&&window.location.pathname!=="/mon/home"?($("body > div:nth-child(2) > div > div.navbar-inner").addClass("shrink"),$("#nav-logo").addClass("shrinklogo"),$("#nav-text-caps").addClass("shrinktext"),$("#nav-text-logo").addClass("shrinktext-logo"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.page-breadcrumbs.breadcrumbs-fixed.ng-scope").addClass("move-breadcrums"),$("#sidebar-collapse3").addClass("move-menuicon"),$(".navbar .navbar-inner .navbar-header .navbar-account .connected").addClass("move-headermenu"),$(".navbar .navbar-inner .navbar-header .languages").addClass("move-languages"),$(".page-header.page-header-fixed").addClass("move-toolbar"),$(".page-sidebar.sidebar-fixed").addClass("move-sidebar"),$(".c-sticky-header").addClass("move-stickyheader"),$(".navbar").addClass("move-navbar"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(5)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(6)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(7)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(8)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(9)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(10)").addClass("button-position-show"),$(".background-pub-bottom ").addClass("height-fix"),$(".background-pub-bottom ").addClass("background-image-none"),$(".navbar .navbar-inner").addClass("height-fix"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-left.ng-scope > a > small > img").addClass("shrinklogo"),$(".navbar .navbar-inner .navbar-header .navbar-account .account-area").addClass("move-search-pub"),$(".navbar .navbar-inner .navbar-header .navbar-account > div").addClass("move-account"),$("#demo-hidden > div > a").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(1)").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(2)").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(2) > div").addClass("searchinput-bknone"),$("#progress-scroll-hide").removeClass("hidden"),$(".this-is-a-demo").addClass("move-this-is-a-demo")):(window.location.pathname==="/ca/home"||window.location.pathname==="/su/home"||window.location.pathname==="/seap/home"||window.location.pathname==="/mon/home")&&($("body > div:nth-child(2) > div > div.navbar-inner").removeClass("shrink"),$("#nav-logo").removeClass("shrinklogo"),$("#nav-text-caps").removeClass("shrinktext"),$("#nav-text-logo").removeClass("shrinktext-logo"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.page-breadcrumbs.breadcrumbs-fixed.ng-scope").removeClass("move-breadcrums"),$("#sidebar-collapse3").removeClass("move-menuicon"),$(".navbar .navbar-inner .navbar-header .navbar-account .connected").removeClass("move-headermenu"),$(".navbar .navbar-inner .navbar-header .languages").removeClass("move-languages"),$(".page-header.page-header-fixed").removeClass("move-toolbar"),$(".page-sidebar.sidebar-fixed").removeClass("move-sidebar"),$(".c-sticky-header").removeClass("move-stickyheader"),$(".navbar").removeClass("move-navbar"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(5)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(6)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(7)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(8)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(9)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(10)").removeClass("button-position-show"),$(".background-pub-bottom ").removeClass("height-fix"),$(".background-pub-bottom ").removeClass("background-image-none"),$(".navbar .navbar-inner").removeClass("height-fix"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-left.ng-scope > a > small > img").removeClass("shrinklogo"),$(".navbar .navbar-inner .navbar-header .navbar-account .account-area").removeClass("move-search-pub"),$(".navbar .navbar-inner .navbar-header .navbar-account > div").removeClass("move-account"),$("#demo-hidden > div > a").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(1)").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(2)").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(2) > div").removeClass("searchinput-bknone"),$("#progress-scroll-hide").removeClass("hidden"),$(".this-is-a-demo").removeClass("move-this-is-a-demo"));window.location.pathname.indexOf("/pub")>=0||window.location.pathname.indexOf("/reg")>=0?($("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage").addClass("shrink"),$("#nav-logo").addClass("shrinklogo"),$("#nav-text-caps").addClass("shrinktext"),$("#nav-text-logo").addClass("shrinktext-logo"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.page-breadcrumbs.breadcrumbs-fixed.ng-scope").addClass("move-breadcrums"),$("#sidebar-collapse3").addClass("move-menuicon"),$(".navbar .navbar-inner .navbar-header .navbar-account .connected").addClass("move-headermenu"),$(".navbar .navbar-inner .navbar-header .languages").addClass("move-languages"),$(".page-header.page-header-fixed").addClass("move-toolbar"),$(".page-sidebar.sidebar-fixed").addClass("move-sidebar"),$(".c-sticky-header").addClass("move-stickyheader"),$(".navbar").addClass("move-navbar"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(5)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(6)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(7)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(8)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(9)").addClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(10)").addClass("button-position-show"),$(".background-pub-bottom ").addClass("height-fix"),$(".background-pub-bottom ").addClass("background-image-none"),$(".navbar .navbar-inner").addClass("height-fix"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-left.ng-scope > a > small > img").addClass("shrinklogo"),$(".navbar .navbar-inner .navbar-header .navbar-account .account-area").addClass("move-search-pub"),$(".navbar .navbar-inner .navbar-header .navbar-account > div").addClass("move-account"),$("#demo-hidden > div > a").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(1)").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(2)").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div").addClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope.move-navbar > div.row.background-pub-bottom.height-fix.background-image-none > div.background-pub.navbar-inner.navbar-inner-homepage.shrink.height-fix > div > div.navbar-header.pull-right > div > ul > li:nth-child(2) > div").addClass("searchinput-bknone"),$("#progress-scroll-hide").removeClass("hidden"),$(".this-is-a-demo-pub").addClass("move-demo-pub")):window.location.pathname.indexOf("/ca/")==-1&&window.location.pathname.indexOf("/su/")==-1&&window.location.pathname.indexOf("/seap/")==-1&&window.location.pathname.indexOf("/mon/")==-1&&($("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage").removeClass("shrink"),$("#nav-logo").removeClass("shrinklogo"),$("#nav-text-caps").removeClass("shrinktext"),$("#nav-text-logo").removeClass("shrinktext-logo"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.page-breadcrumbs.breadcrumbs-fixed.ng-scope").removeClass("move-breadcrums"),$("#sidebar-collapse3").removeClass("move-menuicon"),$(".navbar .navbar-inner .navbar-header .navbar-account .connected").removeClass("move-headermenu"),$(".navbar .navbar-inner .navbar-header .languages").removeClass("move-languages"),$(".page-header.page-header-fixed").removeClass("move-toolbar"),$(".page-sidebar.sidebar-fixed").removeClass("move-sidebar"),$(".c-sticky-header").removeClass("move-stickyheader"),$(".navbar").removeClass("move-navbar"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(5)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(6)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(7)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(8)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(9)").removeClass("button-position-show"),$("body > div:nth-child(2) > div > div.navbar-inner > div.navbar-header.pull-right.margin-right-50.margin-top-10 > ul > li:nth-child(10)").removeClass("button-position-show"),$(".background-pub-bottom ").removeClass("height-fix"),$(".background-pub-bottom ").removeClass("background-image-none"),$(".navbar .navbar-inner").removeClass("height-fix"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-left.ng-scope > a > small > img").removeClass("shrinklogo"),$(".navbar .navbar-inner .navbar-header .navbar-account .account-area").removeClass("move-search-pub"),$(".navbar .navbar-inner .navbar-header .navbar-account > div").removeClass("move-account"),$("#demo-hidden > div > a").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(1)").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(3) > div > span:nth-child(2)").removeClass("move-account-color"),$("body > div.main-container.container-fluid > div > div.page-content > div > div.container-fluid.navbar.navbar-fixed-top.ng-scope > div.row.background-pub-bottom > div.background-pub.navbar-inner.navbar-inner-homepage > div > div.navbar-header.pull-right > div > ul > li:nth-child(2) > div").removeClass("searchinput-bknone"),$("#progress-scroll-hide").addClass("hidden"),$(".this-is-a-demo-pub").removeClass("move-demo-pub"))},10)}).config(["$provide",function(n){n.decorator("tabsetDirective",["$delegate",function(n){return n[0].templateUrl="template/common/controls/tabset",n}]);n.decorator("tabDirective",["$delegate",function(n){return n[0].templateUrl="template/common/controls/tab",n}])}]).config(["$provide",function(n){n.decorator("dateFilter",["$delegate",function(n){var t=n;return function(){var n=arguments;if(arguments.length==0||!arguments[0])return t.apply(this,arguments);var i=moment.parseZone(moment(arguments[0]).tz("Europe/Bucharest").format()),r=i.utcOffset()/60,u="+"+r+"00";return arguments.length==0&&(n=arguments),arguments.length==1&&(n=[arguments[0],null,null]),arguments.length==2&&(n=[arguments[0],arguments[1],u]),t.apply(this,n)}}])}]).run(["$filter",function(n){window.toCurrency=function(t){return n("currency")(t,"",2)}}]);angular.module("app.controls").filter("img",function(){return function(n){return n?n:sys.imgs.noImage}}).filter("absurl",function(){return function(n){if(n){if(n.indexOf("http")==0)return n;if(n.indexOf("www")==0)return"http://"+n}else return"#";return n}}).filter("sicapDateFormat",["$filter",function(n){var t=n("date");return function(n){return t(n,"dd.MM.yyyy HH:mm")}}]).filter("sicapDateFormatNoHour",["$filter",function(n){var t=n("date");return function(n){return t(n,"dd.MM.yyyy")}}]).filter("length",function(){return function(n){return n?n.length:0}}).filter("lengthcr",function(){return function(n){return n?n.replace(/(\r\n|\n|\r)/g,"  ").length:0}}).filter("range",function(){return function(n,t){t=parseInt(t);for(var i=0;i<t;i++)n.push(i);return n}}).filter("percentage",["$filter",function(n){return function(t,i){return n("number")(t*100,i)+" %"}}]).filter("floor",["$filter",function(){return function(n){return Math.floor(n)}}]).filter("decimals",["$filter",function(){return function(n){if(n){var t=n.toFixed(2);return t.substring(t.length-2,t.length)}return""}}]).filter("int",function(){function n(n){for(var t=n,i=/(\d+)(\d{3})/;i.test(t);)t=t.replace(i,"$1.$2");return t}return function(t){var i=parseInt(t,10);return n(i+"")}}).filter("joinCpvs",["$filter",function(){return function(n){return n.map(function(n){return n.code+" - "+n.name}).join(", ")}}]).filter("joinGenericItems",["$filter",function(){return function(n,t,i){var r=n.map(function(n){return n.text}).join(t);return i&&(r=r?r+t+i:i),r}}]).filter("yesNo",["svc",function(n){return function(t){return t==!0?n.locale.key["Common.Label.Yes"]:n.locale.key["Common.Label.No"]}}]).filter("sum",["$filter",function(){return function(n,t){var i=0,r=t;return angular.forEach(n,function(n){i+=n[r]*1}),i}}]).filter("sum1",function(){return function(n,t){var i=0,r=t;return angular.forEach(n,function(n){angular.forEach(n,function(n){i+=n[r]*1})}),i}}).filter("percentOnline",function(){return function(n){var u=0,t,f,e,i,r,o,s;return angular.forEach(n,function(n){u+=n.valueRonOnlineNotExternalDeclared*1}),t=0,angular.forEach(n,function(n){t+=n.valueRonOnlineExternalDeclared*1}),f=0,angular.forEach(n,function(n){f+=n.valueRonOfflineNotExternalDeclared*1}),e=0,angular.forEach(n,function(n){e+=n.valueRonOfflineExternalDeclared*1}),i=0,angular.forEach(n,function(n){i+=n.valueEurOnlineNotExternalDeclared*1}),r=0,angular.forEach(n,function(n){r+=n.valueEurOnlineExternalDeclared*1}),o=0,angular.forEach(n,function(n){o+=n.valueEurOfflineNotExternalDeclared*1}),s=0,angular.forEach(n,function(n){s+=n.valueEurOfflineExternalDeclared*1}),u*1+t*1+f*1+e*1+i*1+r*1+o*1+s*1!=0?(u*1+t*1+i*1+r*1)/(u*1+t*1+f*1+e*1+i*1+r*1+o*1+s*1):0}}).filter("percentOnline1",function(){return function(n){var u=0,t,f,e,i,r,o,s;return angular.forEach(n,function(n){angular.forEach(n,function(n){u+=n.valueRonOnlineNotExternalDeclared*1})}),t=0,angular.forEach(n,function(n){angular.forEach(n,function(n){t+=n.valueRonOnlineExternalDeclared*1})}),f=0,angular.forEach(n,function(n){angular.forEach(n,function(n){f+=n.valueRonOfflineNotExternalDeclared*1})}),e=0,angular.forEach(n,function(n){angular.forEach(n,function(n){e+=n.valueRonOfflineExternalDeclared*1})}),i=0,angular.forEach(n,function(n){angular.forEach(n,function(n){i+=n.valueEurOnlineNotExternalDeclared*1})}),r=0,angular.forEach(n,function(n){angular.forEach(n,function(n){r+=n.valueEurOnlineExternalDeclared*1})}),o=0,angular.forEach(n,function(n){angular.forEach(n,function(n){o+=n.valueEurOfflineNotExternalDeclared*1})}),s=0,angular.forEach(n,function(n){angular.forEach(n,function(n){s+=n.valueEurOfflineExternalDeclared*1})}),u*1+t*1+f*1+e*1+i*1+r*1+o*1+s*1!=0?(u*1+t*1+i*1+r*1)/(u*1+t*1+f*1+e*1+i*1+r*1+o*1+s*1):0}}).filter("percentOnlineByLine",function(){return function(n){return n.valueRonOnlineNotExternalDeclared*1+n.valueRonOnlineExternalDeclared*1+n.valueRonOfflineNotExternalDeclared*1+n.valueRonOfflineExternalDeclared*1+n.valueEurOnlineNotExternalDeclared*1+n.valueEurOnlineExternalDeclared*1+n.valueEurOfflineNotExternalDeclared*1+n.valueEurOfflineExternalDeclared*1!=0?(n.valueRonOnlineNotExternalDeclared*1+n.valueRonOnlineExternalDeclared*1+n.valueEurOnlineNotExternalDeclared*1+n.valueEurOnlineExternalDeclared*1)/(n.valueRonOnlineNotExternalDeclared*1+n.valueRonOnlineExternalDeclared*1+n.valueRonOfflineNotExternalDeclared*1+n.valueRonOfflineExternalDeclared*1+n.valueEurOnlineNotExternalDeclared*1+n.valueEurOnlineExternalDeclared*1+n.valueEurOfflineNotExternalDeclared*1+n.valueEurOfflineExternalDeclared*1):0}}),function(){"use strict";function n(n,t,i,r){return{link:function(i,u,f){function h(n,i,r,u,f,e){function l(n){var t=null;return n!==null&&n.length>0&&!isNaN(n)&&(t=parseInt(n)),t}var h=function(){var t=n.value(),i=n.text();return t!=""&&l(t)==null?n.previousValidItem:n.$angular_getLogicValue()},s=function(t){t&&!t.id&&(t=null);n.previousValidItem=t;n.$angular_setLogicValue(t==null?null:t);n.input.val(t==null?null:t.text)},c=function(){return t(r)(i)},a=function(n){return t(r).assign(i,n)},v=function(){return t(u)(i)},y=function(n){return t(u).assign(i,n)},o;f&&i.$watch(f,function(t){t===undefined&&(t=null);n.dataSource.read()});e&&i.$watch(e,function(t){t===undefined&&(t=null);n.dataSource.read()});n.first("open",function(){n.previousValidItem=null});n.first("close",function(){});o=!1;n.first("change",function(){o=!0;i.$apply(function(){u&&y(n.text());var t=h(),i=c();t!=i&&a(t)});o=!1});s(c());i.$watch(r,function(t){var i,r;(t!==undefined&&t!==null&&t.id||(t=null),o)||(s(t),t==null&&(i=h(),!i&&u&&(r=v(),n.input.val(r))))});u&&i.$watch(u,function(n){(n===null||n=="")&&s(null)})}var o=!1,c,s,e;f.id&&(u[0].id=f.id);e={highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",cascadeFrom:f.kCascadeFrom,autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var e="",o="",i,s,h,u;if(t.data.filter)for(i=0;i<t.data.filter.filters.length;i++)t.data.filter.filters[i].field=="text"&&(e=t.data.filter.filters[i].value),t.data.filter.filters[i].field=="id"&&(o=t.data.filter.filters[i].value);f.cascadeid&&(h=$("#"+f.cascadeid).data("kendoComboBox"),u=h.$angular_getLogicValue(),s=u&&u.id?u.id:null);n({url:r,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:e,parentId:o,entitytype:f.entitytype,cascadeid:s,ops:f.ops,opss:f.opss,sysNoticeTypeId:f.sysNoticeTypeId,sysAcqAreaId:f.sysAcqAreaId,sysNoticeFieldTypeId:f.sysNoticeFieldTypeId,sysLegislationTypeId:f.sysLegislationTypeId,noticeId:f.noticeId,canoticeContractId:f.canoticeContractId,procedureEvaluationId:f.procedureEvaluationId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:50,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(n){var u=n.sender,s=this.dataSource.data(),e,r;f.kInitialized&&!o&&(e=t(f.kInitialized),e(i),o=!0);u.previousValidItem!=null&&(r=u.previousValidItem,u.value(r==null?null:r.id),u.input.val(r==null?null:r.text))},minLength:2,template:null};f.kTmpl&&(e.template=f.kTmpl);f.kItemHeight&&(e.virtual.itemHeight=f.kItemHeight);c=$(u).kendoComboBox(e);s=$(u).data("kendoComboBox");(f.kNgModel||f.kFreeText)&&h(s,i,f.kNgModel,f.kFreeText,f.kOps,f.kOpss)}}}function i(n,t,i,r){return{controller:function(t){var i=this;i.comboOptions={select:function(n){for(var r,f=t.$parent.$eval(i.fullModelPath),e=n.item.text(),u=0;u<this.dataSource._ranges.length;u++)for(r=0;r<this.dataSource._ranges[u].data.length;r++)if(this.dataSource._ranges[u].data[r].text==e){f.push(this.dataSource._ranges[u].data[r]);t.$parent.$apply();return}},change:function(){this.value(null)},dataTextField:"text",dataValueField:"id",highlightFirst:!1,autoBind:!1,filter:"contains",virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var u=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:r,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{tableName:i.tableName,valueField:i.valueField,displayField:i.displayField,sortByField:i.sortByField,pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:u}}).success(function(n){t.success(n)}).error(function(){t.error()})}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}}}},template:'<select kendo-combo-box placeholder="cvm.placeholderValue" style="width:100%" k-options="cvm.comboOptions"> <option><\/option><\/select>',scope:{placeholderValue:"@",tableName:"@",valueField:"@",displayField:"@",sortByField:"@",fullModelPath:"@"},restrict:"E",replace:!0,transclude:!0,controllerAs:"cvm",bindToController:!0}}function t(n,t,i,r){return{link:function(i,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1;n.$angular_setLogicValue(f(i));i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.text)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});i.changed&&i.changed.apply(i.$parent.$parent.vm);u=!1})}var s=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var u=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:r,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:u,filterId:i.filterid,currentLotId:i.currentLotId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})},filtering:function(n){var t=n.filter;t.value?isNaN(t.value)&&t.value.length<3&&n.preventDefault():n.preventDefault()}}),o=$(u).data("kendoComboBox");f.kNgModel&&e(o,i,f.kNgModel)},scope:{filterid:"=",changed:"=",currentLotId:"="}}}angular.module("app.controls").directive("kSelectMock",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/mock/getComboPaged")}]).directive("kSelectCurrentEntityUser",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getCurrentEntityUsers")}]).directive("kSelectNaturalPerson",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getNaturalPersons")}]).directive("kSelectEvalCommitteeMemberRole",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysEvalCommitteeMemberRole")}]).directive("kSelectCurrencies",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getCurrenciesList")}]).directive("kSelectUsers",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchUsers")}]).directive("kSelectContractWinnerUser",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/searchContractWinnerUsers")}]).directive("kSelectCaNoticeWinners",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getAllCaNoticeWinners")}]).directive("kSelectEntity",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchEntities")}]).directive("kSelectEntitySeap",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchEntitiesForSeap")}]).directive("kSelectEntityWithAddress",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchEntitiesWithAddress")}]).directive("kSelectLegalBuyerType",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchLegalBuyerType")}]).directive("kSelectSupOrd",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSupOrd")}]).directive("kSelectSu",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSuppliers")}]).directive("kSelectNoticeEntityAddress",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/SearchNoticeEntityAddresses")}]).directive("kSelectSuCatalogItems",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSupplierCatalogItems")}]).directive("kSelectCounty",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCounty")}]).directive("kSelectCity",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCity")}]).directive("kSelectAddressCounty",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAddressCounty")}]).directive("kSelectAddressCity",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAddressCity")}]).directive("kSelectAddressStreet",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAddressStreet")}]).directive("kSelectDc",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAcquisitionDocTypes")}]).directive("kSelectActype",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchActivityType")}]).directive("kSelectCityCounty",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCityCounty")}]).directive("kSelectCountry",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCountry")}]).directive("kSelectStreet",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchStreet")}]).directive("kSelectPostalCode",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchPostalCode")}]).directive("kSelectCreditRelAuth",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCreditReleaseAuthorityType")}]).directive("kSelectAdditionalPurchasers",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/SearchAdditionalPurchasers")}]).directive("kSelectSadPurchasers",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/SearchSadPurchasers")}]).directive("kSelectSadCa",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/SearchSadCa")}]).directive("kSelectCa",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractingAuthorities")}]).directive("kSelectOtherCa",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchOtherContractingAuthorities")}]).directive("kSelectCatype",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractingAuthorityType")}]).directive("kSelectCpv",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCpvs")}]).directive("kSelectSecondaryCpv",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSecondaryCpvs")}]).directive("kSelectCt",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractType")}]).directive("kSelectCtStandard",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractTypeStandard")}]).directive("kSelectSqt",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSurveyQuestionType")}]).directive("kSelectNuts",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchNuts")}]).directive("kSelectNutsRo",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchNutsRo")}]).directive("kSelectNutsByCountry",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/SearchNutsCodesByCountry")}]).directive("kSelectCaenCode",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCAENCodes")}]).directive("kSelectAnapUser",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAnapUser")}]).directive("kSelectContractPhases",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractPhases")}]).directive("kSelectContractStates",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractStates")}]).directive("kSelectContractTemplates",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractTemplates")}]).directive("kSelectSysAcquisitionContractTypes",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAcquisitionContractTypes")}]).directive("kSelectSysContractChange",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getSysContractChanges")}]).directive("kSelectCpvCt",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCpvCategories")}]).directive("kSelectEuf",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSysEuropeanFunds")}]).directive("kSelectLang",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSysLanguages")}]).directive("kSelectCta",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchContractAssignmentType")}]).directive("kSelectAct",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchAwardCriteriaType")}]).directive("kSelectNoticeWgsContract",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchNoticeWgsContract")}]).directive("kSelectOrdtype",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchOrdinatorType")}]).directive("kSelectStaticPage",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchStaticPage")}]).directive("kSelectStaticPage",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchStaticPage")}]).directive("kSelectAddrtype",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSysAddressType")}]).directive("kSelectSupplierType",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchSupplierType")}]).directive("kDynamicMultiSelect",["$http","$parse","$timeout",function(n,t,r){return i(n,t,r,"api-pub/InterestNotification/getDynamicMultiSelectContent")}]).directive("kSelectProcedureLot",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/searchProcedureLots")}]).directive("kSelectEaLot",["$http","$parse","$timeout",function(n,i,r){return t(n,i,r,"api-pub/ComboPub/searchEaLots")}]).directive("kSelectOperationType",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchOperationType")}]).directive("kSelectFinancingType",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchFinancingTypes")}]).directive("kSelectFinancingTypeRelated",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchFinancingTypesRelated")}]).directive("kSelectEuropeanFund",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchEuropeanFund")}]).directive("kSelectEuropeanFundV2",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchEuropeanFundV2")}]).directive("kSelectCompFile",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchCompanyFileType")}]).directive("kSelectCaTypesFirstTier",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getCaTypes_Tier1")}]).directive("kSelectCaTypesSecondTier",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getCaTypes_Tier2")}]).directive("kSelectCaTypesThirdTier",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/getCaTypes_Tier3")}]).directive("kSelectGroupEntity",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/searchGroupMemberInvites")}]).directive("kSelectNoticeSectionErrata",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysNoticeSectionErrata")}]).directive("kSelectNoticeLotErrata",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetNoticeLotErrata")}]).directive("kSelectMinistry",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetMinistries")}]).directive("kSelectManagementAuth",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetManagementAuthFromMinistry")}]).directive("kSelectEquipAvailPeriod",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetEquipAvailPeriod")}]).directive("kSelectSubcontractObligation",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysSubcontractObligations")}]).directive("kSelectSubcontractIndication",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysSubcontractIndications")}]).directive("kSelectCvdContractType",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysCvdContractType")}]).directive("kSelectVehicleCategory",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysVehicleCategory")}]).directive("kModalWindow",function(){return{restrict:"E",scope:{title:"@",linkedURL:"@"},template:'<div kendo-window="win2" k-title="{{ title }}" k-width="600" k-height="400" k-visible="false"  k-content= "{ url: \'{{linkedURL}}\' }"  k-on-open="win2visible = true" k-on-close="win2visible = false"><\/div>',replace:!0}}).directive("kSelectPage",["$http","$parse","$timeout",function(n,t,i){return{scope:{api:"@",ops:"="},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.text)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var s=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:r.api,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,ops:r.ops}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),o=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(o,r.$parent,f.kNgModel)})}}}]).directive("kSelectAwardingSuppliers",["$http","$parse","$timeout",function(n,t,i){return{scope:{caNoticeContractId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api/C_CA_CANotice/GetAwardingSuppliers",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"caption",dataValueField:"",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,caNoticeContractId:r.caNoticeContractId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectCountryWithParam",["$http","$parse","$timeout",function(n,t,i){return{scope:{isEu:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/SearchCountryWithParam",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,isEu:r.isEu}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectCountryWithoutRomania",["$http","$parse","$timeout",function(n,t,i){return{scope:{},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/SearchCountryWithoutRomania",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectEquipmentCategory",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetEquipmentCategory")}]).directive("kSelectEquipmentCategoryParent",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetEquipmentCategoryListParent")}]).directive("kSelectJustificationReason",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetJustificationReason")}]).directive("kSelectOrganisationRole",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetOrganisationRole")}]).directive("kSelectEquipmentOwnedBy",["$http","$parse","$timeout",function(n,t,i){return{scope:{canoticeContractId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/GetEquipmentOwners",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,canoticeContractId:r.canoticeContractId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectEquipmentOwnedByListView",["$http","$parse","$timeout",function(n,t,i){return{scope:{procedureLotId:"@",supplierId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/GetEquipmentOwnersListView",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,procedureLotId:r.procedureLotId,supplierId:r.supplierId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectEquipmentFilledBy",["$http","$parse","$timeout",function(n,t,i){return{scope:{canoticeContractId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/GetEquipmentFilledBy",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,canoticeContractId:r.canoticeContractId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectSuppliersSearch",["$http","$parse","$timeout",function(n,t,i){return{scope:{canoticeContractId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api/Equipment/SearchSuppliers",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,canoticeContractId:r.canoticeContractId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSearchSuppliersForProcedure",["$http","$parse","$timeout",function(n,t,i){return{scope:{canoticeContractId:"@"},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api/Equipment/SearchSuppliersForProcedure",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,canoticeContractId:r.canoticeContractId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectUniqueIdentifierSearch",["$http","$parse","$timeout",function(n,t,i){return{scope:{entityId:"@"},link:function(r,u,f){function o(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var s="api/Equipment/SearchEquipUniqueIdentifier",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:s,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i,entityId:r.entityId}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),e=$(u).data("kendoComboBox");r.$watch(function(n){return n.entityId},function(n){((n===undefined||n==="")&&(n=null),n!=null)&&e.dataSource.read()});f.kNgModel&&i(function(){return o(e,r.$parent,f.kNgModel)})}}}]).directive("kSelectEquipmentOwnedByForAddEquipment",["$http","$parse","$timeout",function(n,t,i){return{scope:{},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/getEquipmentOwnersForAddEquipment",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectUsageEquipmentAuthority",["$http","$parse","$timeout",function(n,t,i){return{scope:{},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/getUsageEquipmentAuthorityOnContract",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectUsageEquipmentSupplier",["$http","$parse","$timeout",function(n,t,i){return{scope:{},link:function(r,u,f){function e(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var o="api-pub/ComboPub/getUsageEquipmentSupplierOnContract",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:o,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),s=$(u).data("kendoComboBox");f.kNgModel&&i(function(){return e(s,r.$parent,f.kNgModel)})}}}]).directive("kSelectChangeReason",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysChangeReason")}]).directive("kSelectComJustification",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api-pub/ComboPub/GetSysComJustification")}]).directive("kSelectEformsField",["$http","$parse","$timeout",function(n,t,i){return{scope:{sysNoticeSubTypeId:"@"},link:function(r,u,f){function o(n,i,r){var f=t(r),e=f.assign,u=!1,o=f(i);n.$angular_setLogicValue(o);i.$watch(r,function(t){(t===undefined&&(t=null),u)||(n.$angular_setLogicValue(t),t!=null)&&n.text(t.caption)});n.first("change",function(){u=!0;i.$apply(function(){var t=n.$angular_getLogicValue();e(i,t)});u=!1})}var s="api-pub/ComboPub/GetSysEformsField",h=$(u).kendoComboBox({highlightFirst:!1,dataTextField:"text",dataValueField:"id",placeholder:f.kPlaceholder,filter:"contains",autoBind:!1,virtual:{itemHeight:26,valueMapper:function(n){n.success(-1)}},dataSource:{type:"json",transport:{read:function(t){var i=t.data.filter?t.data.filter.filters[0]?t.data.filter.filters[0].value:"":"";n({url:s,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"},params:{pageIndex:t.data.page-1,pageSize:t.data.pageSize,filter:i}}).success(function(n){t.success(n)}).error(function(){t.error()})},parameterMap:function(n){var t=n.data.filter?n.data.filter.filters[0]?n.data.filter.filters[0].value:"":"";return"filter="+t+"&pageIndex="+(n.page-1)+"&pageSize="+n.pageSize}},pageSize:20,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return n.total}}},dataBound:function(){},open:function(){var n=this.dataSource.filter();n&&this.dataSource.filter({})}}),e=$(u).data("kendoComboBox");r.$watch(function(n){return n.sysNoticeSubTypeId},function(n){((n===undefined||n==="")&&(n=null),n!=null)&&e.dataSource.read()});f.kNgModel&&i(function(){return o(e,r.$parent,f.kNgModel)})}}}]).directive("kSelectLotsToEvaluate",["$http","$parse","$timeout",function(t,i,r){return n(t,i,r,"api/CAProcedure/GetProcedureLotsToEvaluate")}])}(kenny||(kenny={})),function(n){var t=function(){function n(n){this.id="#"+n}return n.prototype.init=function(n){var t=this;return t.cfg=n,t.gridOptions={autoBind:!1,dataSource:{type:"json",transport:{read:function(t){var i=n.getFilter();i.pageIndex=t.data.page-1;i.pageSize=t.data.pageSize;n.getAll(i).then(function(i){n.total=i.total;t.success(i)},function(){t.error()})}},page:1,pageSize:n.pageSize,serverPaging:!0,serverSorting:!1,schema:{data:function(n){return n.items},total:function(n){return n.total}}},sortable:!1,height:300,scrollable:{virtual:!0},columns:n.columns},n.selectMultiple==!0?t.gridOptions.selectable="multiple, row":n.selectSimple==!0&&(t.gridOptions.selectable="row"),$(t.id).kendoGrid(t.gridOptions),t.grid=$(t.id).data("kendoGrid"),t},n.prototype.select=function(){var n=this,t=[],i=n.grid.select();return i.each(function(i,r){var u=n.grid.dataItem(r);t.push(u)}),t},n.prototype.clearSelection=function(){this.grid.clearSelection()},n.prototype.search=function(){this.grid.dataSource.page(1)},n.prototype.reset=function(){this.cfg.total=0;this.cfg.setFilter({});this.grid.dataSource.data([])},n}();n.kendoGridBuilder=t}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)};angular.module("app.controls").directive("footable",function(){return{restrict:"A",link:function(n,t,i){var r=angular.element(t);r.footable();i.stTable&&n.$watch(i.stTable,function(n){if(n&&n.length>0){var t=$(".footable");t.trigger("footable_initialize")}})}}}).directive("onInit",["$parse",function(){return{restrict:"E",scope:!1,link:function(n,t,i){var r=i.calljs;window[r]()}}}]).directive("onReadFile",["$parse",function(n){return{restrict:"A",scope:!1,link:function(t,i,r){var u=n(r.onReadFile);i.on("change",function(n){var i=new FileReader;i.onload=function(n){t.$apply(function(){u(t,{$fileContent:n.target.result})})};i.readAsText((n.srcElement||n.target).files[0])})}}}]).directive("customSort",["$parse",function(){return{restrict:"A",scope:{sortProperties:"=",sort:"@",onSort:"&"},link:function(n,t){function i(){t.removeClass("active");t.removeClass("sort-up");t.removeClass("sort-down")}function r(){t.addClass("active");t.removeClass("sort-down");t.addClass("sort-up")}function u(){t.addClass("active");t.removeClass("sort-up");t.addClass("sort-down")}t.on("click",function(t){var e=n.sort,f,o,t;n.sortProperties||(n.sortProperties=[]);f=n.sortProperties.filter(function(n){return n.sortProperty==e});f.length==0&&(o={sortProperty:e,descending:!0},n.sortProperties.push(o),u(),n.onSort());f.length>0&&(t=f[0],t.descending==!0?(t.descending=!1,r(),n.onSort()):t.descending==!1&&(n.sortProperties.splice(n.sortProperties.indexOf(t),1),i(),n.onSort()))})}}}]).directive("catalogItemWishList",function(){return{restrict:"E",replace:!0,scope:{ngModel:"="},template:'<div class="owl-carousel"><div class="item" ng-repeat="x in ngModel"><h4>{{x.catalogItemID}}<\/h4><\/div><\/div>',link:function(n,t){var i=angular.element(t);n.$watch("ngModel",function(n){n&&i.owlCarousel({margin:10,nav:!0,loop:!0,responsive:{0:{items:1},600:{items:3},1e3:{items:5}}})})}}}).directive("selectorCpv",["svc","$timeout",function(n,t){return{restrict:"E",replace:!0,scope:{onselect:"&onselect",visible:"=visible",onClose:"&onClose",cpvid:"=cpvid"},controller:"CtrlSelectorCpv",template:'<div kendo-window="cpv" k-width="\'80%\'" k-title="\''+n.locale.key["Common.Label.SearchCPVCodeTitle"]+'\'" k-visible="false" k-modal="true" k-on-close="hide()" class="k-kendo-modal" > <div ng-include="\'template/common/cpv/select-cpv/select-cpv\'" > <\/div><\/div>',link:function(n,i){n.hide=function(){n.visible=!1;n.onClose()};n.$watch("visible",function(n){if(n){var r=angular.element(i).data("kendoWindow");r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""));r.wrapper.find(".k-window-title").addClass("colored-modal-title");r.bind("refresh",function(){r.center();r.open()});t(function(){r.refresh();r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""))})}else angular.element(i).data("kendoWindow").close()});i.on("keydown",function(t){t.keyCode==13&&n.ok()});n.$on("selector:cpv",function(t,r){if(r==null&&(angular.element(i).data("kendoWindow").close(),n.visible=!1),r){n.onselect({cpv:r});angular.element(i).data("kendoWindow").close()}})}}}]).directive("browseCpv",["svc","$timeout",function(){return{restrict:"E",replace:!0,scope:{onselect:"&onselect",cpvid:"=cpvid",ispub:"=ispub"},controller:"CtrlSelectorCpv",template:"<div ng-include=\"'template/common/cpv/select-cpv/select-cpv'\" > <\/div>",link:function(){}}}]).directive("selectorNuts",["svc",function(n){return{restrict:"E",replace:!0,scope:{onselect:"&onselect",visible:"=visible"},controller:"CtrlSelectorNuts",template:'<div kendo-window="nuts" k-modal="true" k-visible="false" k-content="{ url: \'template/common/nuts/select-nuts/select-nuts\' }"><\/div>',link:function(t,i,r){r.kWidth="1024";r.kTitle=n.locale.key["Common.Label.SearchNutsCode"];t.$watch("visible",function(n){n&&(angular.element(i).data("kendoWindow").center().open(),t.visible=!1)});t.$on("selector:nuts",function(n,r){if(r==null&&angular.element(i).data("kendoWindow").close(),r){t.onselect({nuts:r});angular.element(i).data("kendoWindow").close()}})}}}]).directive("multiUpload",["svc",function(n){return{restrict:"E",replace:!0,scope:{onselect:"&onselect",visible:"=visible"},controller:"CtrlMultiUpload",template:'<div kendo-window="multiuploadwindow" k-modal="true" k-visible="false" k-title="\''+n.locale.key["Common.Label.UploadFiles"]+"'\" k-width=\"'80%'\" k-content=\"{ url: 'template/common/upload/multi-upload/multi-upload' }\"><\/div>",link:function(n,t){n.$watch("visible",function(i){i&&(angular.element(t).data("kendoWindow").center().open(),n.visible=!1)});n.$on("multi:upload",function(i,r){if(r==null&&angular.element(t).data("kendoWindow").close(),r){n.onselect({files:r});angular.element(t).data("kendoWindow").close()}})}}}]).directive("singleUpload",["svc",function(n){return{restrict:"E",replace:!0,scope:{onselect:"&onselect",visible:"=visible",remove:"=remove"},controller:"CtrlSingleUpload",templateUrl:"template/common/upload/single-upload/single-upload",link:function(t,i,r,u){r.kWidth="1024";r.kTitle=n.locale.key["Common.Label.UploadFiles"];t.$watch("visible",function(n){n&&(t.visible=!1)});t.$watch("remove",function(n){n&&(u.cancel(),t.remove=!1)});t.$on("multi:upload",function(n,i){if(i==null)t.onselect({files:i});if(i)t.onselect({files:i})})}}}]).directive("messageBox",["$timeout",function(n){return{restrict:"E",replace:!0,scope:{},controller:["$scope",function(n){n.wndTitle="";n.wndMessage=""}],template:'<div kendo-window="messageBox" k-modal="true" k-visible="false" k-title="Info"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;" ng-bind="wndMessage"><\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button class="btn btn-blue" ng-click="ok()"><i class="glyphicon glyphicon-ok"><\/i><\/button><button class="btn" ng-if="wndShowCancel == true" ng-click="cancel()"><i class="glyphicon glyphicon-remove"><\/i><\/button><\/div><\/div>',link:function(t,i,r){r.kWidth="400";r.kTitle="Info";t.ok=function(){angular.element(i).data("kendoWindow").close()};t.cancel=function(){angular.element(i).data("kendoWindow").close()};t.$on("message-box:show",function(n,r){if(r){t.wndTitle="Info";t.wndMessage=r.message;t.ok=function(){angular.element(i).data("kendoWindow").close();r.promise.resolve(!0)};t.wndShowCancel=!1;t.$apply();var u=angular.element(i).data("kendoWindow");u.refresh();u.center().open()}});t.$on("message-box:confirm-yes-no",function(r,u){var f=angular.element(i).data("kendoWindow");u&&(n(function(){t.wndTitle="Info";t.wndMessage=u.message;t.wndShowCancel=!0;t.ok=function(){u.promise.resolve(!0);f.close()}}),f.refresh(),f.center().open())});t.$on("message-box:close",function(){var n=angular.element(i).data("kendoWindow");n&&n.close()})}}}]).directive("customKendoModal",["$http","$timeout",function(n,t){return{restrict:"E",replace:!0,scope:{title:"=",width:"=?",vm:"=",modalName:"=",onClose:"&onClose",visible:"=",template:"="},template:function(n,t){return'<div kendo-window="{{modalName}}" k-width="\'{{width}}\'" k-title="\'{{title}}\'" k-visible="false" k-modal="true" k-on-close="hide()" class="k-kendo-modal"><div ng-include="\''+t.template+"'\"><\/div><\/div>"},link:function(n,i){n.datePickerOptions=n.$root.datePickerOptions;n.hide=function(){n.visible=!1;n.onClose()};angular.isUndefined(n.width)&&(n.width="90%");n.$watch("visible",function(n){if(n){var r=angular.element(i).data("kendoWindow");r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""));r.wrapper.find(".k-window-title").addClass("colored-modal-title");r.bind("refresh",function(){r.center();r.open()});t(function(){r.refresh();r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""))})}else angular.element(i).data("kendoWindow").close()})}}}]).directive("customAvizKendoModal",["$http","$timeout",function(n,t){return{restrict:"E",replace:!0,scope:{title:"=",vm:"=",modalName:"=",onClose:"&onClose",visible:"=",template:"="},template:function(n,t){return'<div kendo-window="{{modalName}}" k-width="\'60%\'"  k-title="\'{{title}}\'" k-visible="false" k-modal="true" k-on-close="hide()" class="k-kendo-modal"><div ng-include="\''+t.template+"'\"><\/div><\/div>"},link:function(n,i){n.datePickerOptions=n.$root.datePickerOptions;n.hide=function(){n.visible=!1;n.vm.cancelViewEdit();n.onClose()};n.$watch("visible",function(n){if(n){var r=angular.element(i).data("kendoWindow");r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""));r.wrapper.find(".k-window-title").addClass("colored-modal-title");r.bind("refresh",function(){r.center();r.open()});t(function(){r.refresh();r.title(r.element.context.attributes["k-title"].nodeValue.replace(/'/g,""))})}else angular.element(i).data("kendoWindow").close()})}}}]).directive("showIfFocusOn",function(){return{restrict:"A",link:function(n,t,i){angular.element(t).hide();var u=i.showIfFocusOn,r=angular.element("[name="+u+"]");r.on("focus",function(){angular.element(t).show()});r.on("blur",function(){angular.element(t).hide()})}}}).directive("numeric",function(){return function(n,t,i){var r=[8,9,37,39,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,110];t.bind("keydown",function(t){$.inArray(t.which,r)===-1&&(n.$apply(function(){n.$eval(i.onlyNum);t.preventDefault()}),t.preventDefault())})}}).directive("ngConfirmClick",["modalService","$timeout","svc",function(n,t,i){return{restrict:"A",link:function(r,u,f){u.bind("click",function(){var u=f.ngConfirmMessage;n.confirm(i.locale.key["Common.Label.Warning"],u).then(function(n){n==!0&&t(function(){r.$apply(f.ngConfirmClick)})})})}}}]).directive("ngConfirmClickLarge",["modalService","$timeout","svc",function(n,t,i){return{restrict:"A",link:function(r,u,f){u.bind("click",function(){var u=f.ngConfirmMessage;n.confirmLarge(i.locale.key["Common.Label.Warning"],u).then(function(n){n==!0&&t(function(){r.$apply(f.ngConfirmClickLarge)})})})}}}]).directive("autoSize",["svc",function(){return{restrict:"A",require:"ngModel",link:function(n,t,i,r){t.css("min-height","28px");t.autosize();n.$watch(function(){return r.$modelValue},function(n){n&&(t.data("autosize",!1),t.autosize())})}}}]).directive("yesNoIcon",function(){return{replace:!0,scope:{yes:"="},template:"<i ng-class=\"{ 'green fa fa-check': yes, 'red fa fa-remove':!yes }\" style=\"width:13px\"><\/i>"}}).filter("yesNo",["svc",function(n){return function(t,i){return i?t==!0?n.locale.key["Common.Label.Yes"]:t==!1?n.locale.key["Common.Label.No"]:i:t?n.locale.key["Common.Label.Yes"]:n.locale.key["Common.Label.No"]}}]).directive("breadcrumbs",["$rootScope",function(){return{restrict:"E",template:'<div class="page-breadcrumbs"><ul class="breadcrumb"><li ng-repeat=\'bc in breadcrumbs\' ng-class="{\'active\': {{$last}} }"><i class="fa fa-home" ng-show="$first"><\/i><a ng-click="unregisterBreadCrumb($index)" ng-href="{{bc.path}}">{{bc.label}}<\/a><\/li><\/ul><\/div>',replace:!0,link:function(){}}}]).directive("customPopover",["$http","$templateCache","$compile",function(n,t,i){return{restrict:"A",replace:!1,scope:{customPopoverModel:"="},link:function(n,r,u){var f=t.get(u.customPopover),e=i(f)(n.$parent);$(r).popover({trigger:"hover",html:!0,content:e,placement:"top"})}}}]).directive("linked",function(){return function(n,t,i){t.on("click",function(){document.getElementById(i.linked).click()})}}).directive("sicapInt",["$compile","svc",function(n){var t='<div class="input-highlightbox" data-spinners="false" k-ng-model="data" ng-model="data" ng-disabled="isDisabled" style="padding:5px 10px">{{data}}<\/div>',i='<input placeholder="" kendo-numeric-text-box k-options="intOptions" k-ng-model="data" ng-disabled="isDisabled"  k-on-change="onChange()" style="width:100%" k-min="min" k-max="max"/>',r=function(r,u,f){var e=function(f){var e=f?t:i;u.html(e).show();n(u.contents())(r)};e(f.readonly=="");f.readonly&&r.$watch(f.readonly,function(n){e(n)})};return{restrict:"E",replace:!0,scope:{data:"=",min:"=",max:"=",onChange:"&",isDisabled:"="},link:r,controller:["$scope",function(n){n.intOptions={format:"n0",decimals:0}}]}}]).directive("sicapNumericSerial",["$compile","svc","$parse",function(){var t=null,n=null,i=function(i,u,f){t=f.maxlength;t||(t=10);n=f.maxvalue;n&&(n=parseInt(n));i.onKeypress=r},r=function(i){var r=String.fromCharCode(i.which),f=angular.element(i.target).val()+r,u;if(f.length>t)return i.preventDefault(),!1;if(r>="0"&&r<="9")if(n){if(u=parseInt(angular.element(i.target).val()+r),u>n)return i.preventDefault(),!1}else return!0;else return i.preventDefault(),!1};return{restrict:"E",replace:!0,require:"ngModel",scope:{sicapModel:"=sicapModel",maxlength:"&",maxvalue:"&"},link:i,controller:["$scope",function(){}],template:'<input type="text" style="width:100%" ng-keypress="onKeypress($event)"                 ng-model="sicapModel" />'}}]).directive("sicapMoney",["$compile",function(){var n=function(n,t,i){n.width&&n.width!=""||(n.width="100");i.placeholder==""&&(n.placeholder="0,00")};return{restrict:"E",link:n,replace:!0,template:'<input type="text" maxlength="100000000000" ng-disabled="disabled" style="text-align:right;width:{{width}}%" placeholder="{{placeholder}}" money ng-model="data" ng-blur="onChange()" />',scope:{width:"=",inputclass:"=",placeholder:"@",data:"=",onChange:"&",disabled:"="}}}]).directive("sicapMoneyFourDecimal",["$compile",function(){return{restrict:"E",link:function(n,t,i){n.width&&n.width!==""||(n.width="100");i.placeholder||(n.placeholder="0,0000")},replace:!0,template:'<input type="text" maxlength="100000000000" ng-disabled="disabled" style="text-align:right;width:{{width}}%" placeholder="{{placeholder}}" ng-model="data" money4dec ng-blur="onChange()" />',scope:{width:"=",inputclass:"=",placeholder:"@",data:"=",onChange:"&",disabled:"="}}}]).directive("sicapMoneyExchange",["$compile",function(){var n=function(n,t,i){n.width&&n.width!=""||(n.width="100");i.placeholder==""&&(n.placeholder="0,00")};return{restrict:"E",link:n,replace:!0,template:'<input type="text" maxlength="100000000000"  style="text-align:right;width:{{width}}%" placeholder="{{placeholder}}" exchange ng-model="data" ng-blur="onChange()" />',scope:{width:"=",inputclass:"=",placeholder:"@",data:"=",onChange:"&"}}}]).directive("money",["$filter",function(){return{require:"?ngModel",terminal:!0,link:function(n,t,i,r){var f,u,e;r&&(f=$(t).attr("maxlength"),u=Number(i.moneydecimals),u||(u=2),e=Math.pow(10,u),r.$formatters.push(function(n){return kendo.toString(n,"n"+u)}),r.$parsers.unshift(function(n){if(n==="")return null;var i=kendo.parseFloat(n.replace(",","").replace(".",""))/e,o=kendo.parseFloat(r.$modelValue),s=f&&i>kendo.parseFloat(f),h=s?o:i;return t.priceFormat({limit:14,prefix:"",centsSeparator:kendo.culture().numberFormat["."],thousandsSeparator:kendo.culture().numberFormat[","],centsLimit:u}),h}))}}}]).directive("money4dec",["$filter",function(){return{require:"?ngModel",terminal:!0,link:function(n,t,i,r){if(r){var f=$(t).attr("maxlength"),u=parseInt(i.moneydecimals)||4;r.$formatters.push(function(n){return kendo.toString(n,"n"+u)});r.$parsers.unshift(function(n){var e,i;if(!n||(e=n.replace(",","."),i=parseFloat(e),isNaN(i)))return null;var o=Math.floor(i*Math.pow(10,u))/Math.pow(10,u),s=parseFloat(r.$modelValue),h=f&&o>parseFloat(f);return t.priceFormat({limit:20,prefix:"",centsSeparator:".",thousandsSeparator:",",centsLimit:u}),h?s:o})}}}}]).directive("moneyLong",["$filter",function(){return{require:"?ngModel",terminal:!0,link:function(n,t,i,r){var f,u,e;r&&(f=$(t).attr("maxlength"),u=Number(i.moneydecimals),u||(u=2),e=Math.pow(10,u),r.$formatters.push(function(n){return kendo.toString(n,"n"+u)}),r.$parsers.unshift(function(n){if(n==="")return null;var i=kendo.parseFloat(n.replace(",","").replace(".",""))/e,o=kendo.parseFloat(r.$modelValue),s=f&&i>kendo.parseFloat(f),h=s?o:i;return t.priceFormat({limit:30,prefix:"",centsSeparator:kendo.culture().numberFormat["."],thousandsSeparator:kendo.culture().numberFormat[","],centsLimit:u}),h}))}}}]).directive("sicapMoneyLong",["$compile",function(){var n=function(n,t,i){n.width&&n.width!=""||(n.width="100");i.placeholder==""&&(n.placeholder="0,00")};return{restrict:"E",link:n,replace:!0,template:'<input type="text" maxlength="100000000000000000000" style="text-align:right;width:{{width}}%" placeholder="{{placeholder}}" money-long ng-model="data" ng-blur="onChange()" />',scope:{width:"=",inputclass:"=",placeholder:"@",data:"=",onChange:"&"}}}]).directive("sicapMoneyLongDisabled",["$compile",function(){var n=function(n,t,i){n.width&&n.width!=""||(n.width="100");i.placeholder==""&&(n.placeholder="0,00")};return{restrict:"E",link:n,replace:!0,template:'<input type="text" maxlength="100000000000000000000" ng-disabled="disabled"  style="text-align:right;width:{{width}}%" placeholder="{{placeholder}}" money-long ng-model="data" ng-blur="onChange()" />',scope:{width:"=",inputclass:"=",placeholder:"@",data:"=",onChange:"&",disabled:"="}}}]).directive("exchange",["$filter",function(){return{require:"?ngModel",terminal:!0,link:function(n,t,i,r){var f,u,e;r&&(f=$(t).attr("maxlength"),u=Number(i.moneydecimals),u||(u=4),e=Math.pow(10,u),r.$formatters.push(function(n){return kendo.toString(n,"n"+u)}),r.$parsers.unshift(function(n){if(n==="")return null;var i=kendo.parseFloat(n.replace(",","").replace(".",""))/e,o=kendo.parseFloat(r.$modelValue),s=f&&i>kendo.parseFloat(f),h=s?o:i;return t.priceFormat({limit:12,prefix:"",centsSeparator:kendo.culture().numberFormat["."],thousandsSeparator:kendo.culture().numberFormat[","],centsLimit:u}),h}))}}}]).directive("loadingContainer",function(){return{restrict:"A",scope:!1,link:function(n,t,i){var r=angular.element('<div class="loading"><img src="/assets/img/ajax-loader.gif"  /><\/div>');t.append(r);t.addClass("loading-panel");n.$watch(i.loadingContainer,function(n){r.toggleClass("ng-hide",!n)})}}}).directive("submitButton",["locale",function(n){return{restrict:"E",replace:!0,scope:{},template:'<button class="btn shiny btn-blue" type="submit"><i class="btn-label fa fa-save"><\/i>{{text}}<\/button>',link:function(t){t.text=n["Common.Label.Action_Save"]}}}]).directive("cancelButton",["locale",function(n){return{restrict:"E",replace:!0,scope:{},template:'<button class="btn shiny btn-default" type="reset"><i class="btn-label fa fa-times"><\/i>{{text}}<\/button>',link:function(t){t.text=n.key["Common.Label.Action_Cancel"]}}}]).directive("btnSectionToggle",function(){function n(n){n.on("click",function(t){var e=n.attr("data-target");t.preventDefault();var i=$(e),o=i.find(".widget-body"),s=i.find(".widget-header .widget-buttons").find("[data-toggle]").find("i"),r=$(this).find("i"),u="fa-chevron-down",f="fa-chevron-up";i.hasClass("collapsed")&&(r&&(r.addClass(f).removeClass(u),s.addClass(f).removeClass(u)),i.removeClass("collapsed"),o.slideDown(300))})}return{restrict:"A",link:function(t,i){n(i)}}}).directive("clearButton",["svc",function(n){return{restrict:"E",replace:!0,template:'<button class="btn btn-default" type="reset"><i class="btn-label fa fa-trash-o"><\/i> '+n.locale.key["Common.Label.DeleteFilters"]+"<\/button>"}}]).directive("exportButton",[function(){return{restrict:"E",replace:!0,template:'<button class="btn shiny btn-default" type="button"><i class="btn-label fa fa-file-excel-o"><\/i> Export<\/button>'}}]).directive("exportExcelButton",[function(){return{restrict:"E",replace:!0,template:'<button class="btn shiny btn-default  btn-xs" type="button"><i class="btn-label fa fa-file-excel-o"><\/i> Excel<\/button>'}}]).directive("exportPdfButton",[function(){return{restrict:"E",replace:!0,template:'<button class="btn shiny btn-default  btn-xs" type="button"><i class="btn-label fa fa-file-pdf-o"><\/i> PDF<\/button>'}}]).directive("exportCsvButton",[function(){return{restrict:"E",replace:!0,template:'<button class="btn shiny btn-default btn-xs" type="button"><i class="btn-label fa fa-file-o"><\/i> CSV<\/button>'}}]).directive("toolbarBackButton",[function(){return{restrict:"E",replace:!0,template:'<a class="sidebar-toggler white bg-azure" href="#"><i class="fa fa-angle-left"><\/i><\/a>'}}]).directive("toolbarAddButton",[function(){return{restrict:"E",replace:!0,template:'<a class="sidebar-toggler white bg-orange" href="#"><i class="fa fa-plus"><\/i><\/a>'}}]).directive("gridEditButton",[function(){return{restrict:"E",replace:!0,template:'<a href="#" class="btn btn-blue   btn-default btn-xs"><i class="fa fa-edit"><\/i><\/a>'}}]).directive("gridDeleteButton",[function(){return{restrict:"E",replace:!0,template:'<a href="#" style="text-aling:center; " class="btn btn-danger btn-default btn-xs"><i class="fa fa-times"><\/i><\/a>'}}]).directive("gridDeleteButtonRegular",[function(){return{restrict:"E",replace:!0,template:'<a href="#" style="text-aling:center; " class="btn btn-default btn-xs"><i class="fa fa-times"><\/i><\/a>'}}]).directive("searchButton",["svc",function(n){return{restrict:"E",replace:!0,template:'<button class="btn btn-entity" type="submit"><i class="btn-label fa " ng-class="{\'fa-spinner fa-spin\': (vm.isLoading || vm.local.isLoading), \'fa-filter\': (angular.isUndefined(vm.isLoading) || vm.isLoading == false || angular.isUndefined(vm.local.isLoading) || vm.local.isLoading == false)}"><\/i> '+n.locale.key["Common.Label.Filter"]+"<\/button>",link:function(n,t,i){if(i.searchAction){var r=function(t){t.which==13&&n.$eval(i.searchAction)};$(document).keypress(r);n.$on("$destroy",function(){$(document).off("keypress",r)})}}}}]).directive("expandButton",["svc",function(n){return{restrict:"E",replace:!0,scope:{target:"@target",collapsed:"="},template:'<a id="morefilter" class="" style="color:#9d9d9d; cursor:default;"><i class="fa" ng-class=" { \'fa-plus-square-o\': collapsed == true, \'fa-minus-square-o\': collapsed == false } "><\/i> {{label}}<\/a>',link:function(t,i){function u(i){t.label=i==!0?n.locale.key["Common.Label.MoreFilters"]:n.locale.key["Common.Label.LessFilters"]}var r=$(t.target);r.length==0&&angular.element(i).hide();angular.isUndefined(t.collapsed)&&(t.collapsed=!0);t.collapsed==!1&&(u(t.collapsed),$(r).slideToggle(500,function(){}));t.label=n.locale.key["Common.Label.MoreFilters"];i.click(function(){t.collapsed=!t.collapsed;u(t.collapsed);$(r).slideToggle(500,function(){});t.$apply()})}}}]).directive("colapseButton",["svc",function(){return{restrict:"E",replace:!0,scope:{target:"@target"},template:'<button class="adv-search-button"  data-toggle="collapse" data-target="{{target}}"><i class="fa fa-angle-down"><\/i><\/button>',link:function(n,t){n.btLabel=" +";t.click(function(){var i=t.children(1);i.hasClass("fa-angle-down")?(i.removeClass("fa-angle-down"),i.addClass("fa-angle-up"),n.btLabel=" -"):(i.removeClass("fa-angle-up"),i.addClass("fa-angle-down"),n.btLabel=" +")})}}}]).directive("searchResult",["svc",function(n){return{restrict:"E",replace:!0,scope:{total:"="},template:'<div class="search-result">'+n.locale.key["Common.Label.SearchResults"]+': <span class="records">{{total}} '+n.locale.key["Common.Label.SearchRecords"]+"<\/span><\/div>"}}]).directive("listSortButton",["svc",function(){return{restrict:"E",replace:!0,template:"<button class=\"btn btn-xs btn-default\" ng-click=\"onSort({sortProperty: '{{sortPropertyName}}'})\" ng-class=\"{'btn-blue': sortProperty == '{{sortPropertyName}}' }\">                    <i class=\"fa\" ng-class=\"{'fa-sort-up': sortProperty == '{{sortPropertyName}}' && !descending, 'fa-sort-down': sortProperty == '{{sortPropertyName}}' && descending}\" > <\/i>{{title}}                <\/button>",scope:{sortPropertyName:"@",title:"@",onSort:"&",sortProperty:"=",descending:"="}}}]).directive("yesNoAll",function(){return{restrict:"E",replace:!0,template:'<div class="btn-group"> <button type="button" ng-click="targetProperty = null" ng-class="{\'active\': targetProperty == null}" class="btn btn-default btn-xs" >{{allText}} <\/button><button type="button" ng-click="targetProperty = true" ng-class="{\'active\': targetProperty}" class="btn btn-default btn-xs" >{{yesText}} <\/button><button type="button" ng-click="targetProperty = false" ng-class="{\'active\': targetProperty == false}" class="btn btn-default btn-xs" >{{noText}} <\/button><\/div>',scope:{yesText:"@",noText:"@",allText:"@",targetProperty:"="}}}).directive("op1Op2",function(){return{restrict:"E",replace:!0,template:'<div class="btn-group"> <button type="button" ng-click="targetProperty = true; targetYesAction()" ng-class="{\'active\': targetProperty == true}" class="btn btn-default " >{{op1Text}} <\/button><button type="button" ng-click="targetProperty = false; targetNoAction()" ng-class="{\'active\': targetProperty == false}" class="btn btn-default " >{{op2Text}} <\/button><\/div>',scope:{op1Text:"@",op2Text:"@",targetProperty:"=",targetYesAction:"&",targetNoAction:"&"}}}).directive("op1Op2Small",function(){return{restrict:"E",replace:!0,template:'<div class="btn-group"> <button type="button" ng-click="targetProperty = true; targetYesAction()" ng-class="{\'active\': targetProperty == true}" class="btn btn-default btn-xs " >{{op1Text}} <\/button><button type="button" ng-click="targetProperty = false; targetNoAction()" ng-class="{\'active\': targetProperty == false}" class="btn btn-default btn-xs " >{{op2Text}} <\/button><\/div>',scope:{op1Text:"@",op2Text:"@",targetProperty:"=",targetYesAction:"&",targetNoAction:"&"}}}).directive("op1Op3",function(){return{restrict:"E",replace:!0,template:'<div class="btn-group"> <button type="button" ng-click="targetProperty = true; targetYesAction()" ng-class="{\'active\': targetProperty == true,\'dangerFocusField\': notValid == true }" class="btn btn-default " >{{op1Text}} <\/button><button type="button" ng-click="targetProperty = false; targetNoAction()" ng-class="{\'active\': targetProperty == false,\'dangerFocusField\': notValid == true }" class="btn btn-default " >{{op2Text}} <\/button><\/div>',scope:{op1Text:"@",op2Text:"@",notValid:"=",targetProperty:"=",targetYesAction:"&",targetNoAction:"&"}}}).directive("yesNo",function(){return{restrict:"E",replace:!0,template:'<div class="btn-group"> <button type="button" ng-disabled="disabled" ng-click="targetProperty = true; onChange();" ng-class="{\'active\': targetProperty == true}" class="btn btn-default btn-xs" >{{yesText}} <\/button><button type="button" ng-disabled="disabled" ng-click="targetProperty = false; onChange();" ng-class="{\'active\': targetProperty == false}" class="btn btn-default btn-xs" >{{noText}} <\/button><\/div>',scope:{yesText:"@",noText:"@",onChange:"&",disabled:"=",targetProperty:"="}}}).directive("onDownload",["OnDownload","svc",function(n,t){return{restrict:"A",scope:{downLink:"@"},link:function(i,r){r.click(function(){var i=this.attributes.getNamedItem("down-link").value;n.verifyFile(i).then(function(){n.downloadFile(i)},function(n){t.modalService.showInfoMessage(n[1])})})}}}]).directive("dateValue",["$compile",function(n){var t=function(n){return n===undefined?"<span>{{target | date}}<\/span>":"<strong>{{target | date}}<\/strong>"},i=function(i,r,u){r.html(t(u.bold)).show();n(r.contents())(i)};return{restrict:"E",replace:!0,link:i,scope:{target:"="}}}]).directive("datetimeValue",["$compile",function(n){var t=function(n){return n===undefined?"<span>{{target | date: 'dd.MM.yyyy'}} {{target | date:'HH:mm'}}<\/span>":"<strong>{{target | date: 'dd.MM.yyyy'}} {{target | date:'HH:mm'}}<\/strong>"},i=function(i,r,u){r.html(t(u.bold)).show();n(r.contents())(i)};return{restrict:"E",replace:!0,link:i,scope:{target:"="}}}]).directive("kNgDisabled",[function(){return{restrict:"A",link:function(n,t,i){n.$on("kendoWidgetCreated",function(t,r){var u=n.$eval(i.kNgDisabled);$(r.body).attr("contenteditable",(!u).toString());n.$watch(i.kNgDisabled,function(n){$(r.body).attr("contenteditable",(!n).toString())})})}}}]).directive("ngModelOnblur",[function(){return{restrict:"A",require:"ngModel",priority:1,link:function(n,t,i,r){i.type!=="radio"&&i.type!=="checkbox"&&(t.unbind("input").unbind("keydown").unbind("change"),t.bind("blur",function(){n.$apply(function(){r.$setViewValue(t.val())})}))}}}]).directive("sicapIcon",[function(){return{restrict:"A",link:function(n,t,i){var r=i.sicapIcon;switch(r){case"ContractNo":t.addClass("fa fa-tag");break;case"ContractDate":t.addClass("fa fa-calendar");break;case"ContractState":t.addClass("fa fa-hourglass-start");break;case"NoticeLotNo":t.addClass("fa fa-tag");break;case"NoticeNo":t.addClass("fa fa-tag");break;case"AcquisitionContractType":t.addClass("fa fa-legal");break;case"NoticeType":t.addClass("fa fa-tags");break;case"EstimatedValue":t.addClass("fa fa-eur");break;case"NoticeState":t.addClass("fa fa-hourglass-start");break;case"PublicationDate":t.addClass("fa fa-calendar");break;case"CPVCode":t.addClass("fa fa-sitemap");break;case"Document":t.addClass("fa fa-sticky-note");break;case"Download":t.addClass("fa fa-download");break;case"ContractingAuthority":t.addClass("fa fa-briefcase");break;case"Suplier":t.addClass("fa fa-briefcase");break;case"RequestNo":t.addClass("fa fa-tag");break;case"CertificateRequestType":t.addClass("fa fa-legal");break;case"CertificateRequestState":t.addClass("fa fa-cogs");break;case"IssuedCif":t.addClass("fa fa-barcode");break;case"PublicationRejectionDateTitle":t.addClass("fa fa-calendar-o");break;case"TenderReceiptDeadline":t.addClass("fa fa-calendar-times-o");break;case"ProcedureState":t.addClass("fa fa-cogs");break;case"UtilitiesTitle":t.addClass("fa fa-check");break;case"Utilities":t.addClass("fa fa-industry");break;case"IsPPP":t.addClass("fa fa-group");break;case"PublicationSendDate":t.addClass("fa fa-calendar-check-o");break;case"ContractType":t.addClass("fa fa-balance-scale");break;case"ContractName":t.addClass("fa fa-tag");break;case"ContractTitle":t.addClass("fa fa-tag");break;case"ContractNumber":t.addClass("fa fa-tags");case"ProjectReceiptDeadline":t.addClass("fa fa-calendar-times-o");break;case"ErataNumber":t.addClass("fa fa-tags");break;case"ErataGenerationType":t.addClass("fa fa-university");break;case"ErataGenerationContext":t.addClass("fa fa-eur");break;case"ErataType":t.addClass("fa fa-legal");break;case"OriginalNoticeType":t.addClass("fa fa-file-o");break;case"OriginalNoticeNumber":t.addClass("fa fa-tags");break;case"Comment":t.addClass("fa fa-commenting");break;case"DocumentType":t.addClass("fa fa-file");break;case"ReasonDecisionCNCS":t.addClass("fa fa-gavel");break;case"NewEvaluationDate":t.addClass("fa fa-hourglass-start");break;case"PostDate":t.addClass("fa fa-calendar");break;case"NoticeDocumentName":t.addClass("fa fa-tag");break;case"CaPublicationDate":t.addClass("fa fa-calendar");break;case"Rejected":t.addClass("fa fa-calendar");break;case"IsRepublished":t.addClass("fa fa-folder-open");break;case"ContractTitle":t.addClass("fa fa-tag");break;case"PublicationText":t.addClass("fa fa-calendar");break;case"Deadline":t.addClass("fa fa-calendar-o");break;case"InvitationState":t.addClass("fa fa-hourglass-o");break;case"ContractAssignmentType":t.addClass("fa fa-file-o");break;case"Start":t.addClass("fa fa-hourglass-start");break;case"Date":t.addClass("fa fa-calendar");break;case"AutodistributionName":t.addClass("fa fa-university");break;case"AcquisitionValue":t.addClass("fa fa-tags");break;case"UniqueIdentificationCode":t.addClass("fa fa-tag");break;case"ClosingValue":t.addClass("fa fa-gavel");break;case"DirectAcquisitionState":t.addClass("fa fa-hourglass-o");break;case"PubEnd":t.addClass("fa fa-hourglass-end");break;case"OpeningDate":t.addClass("fa fa-calendar-check-o");break;case"ClosingDate":t.addClass("fa fa-calendar-times-o");break;case"SurveyState":t.addClass("fa fa-file-o");break;case"DisplayResults":t.addClass("fa fa-file-text-o");break;case"InDefinition":t.addClass("fa fa-hourglass-start");break;case"CTERejected":t.addClass("fa fa-times");break;case"Pending":t.addClass("fa fa-hourglass-half");break;case"CTEPending":t.addClass("fa fa-hourglass-half");break;case"Published":t.addClass("fa fa-calendar");break;case"PubishDate":t.addClass("fa fa-calendar");break;case"downloadDocument":t.addClass("fa fa-download");break;case"ProcedureType":t.addClass("fa fa-legal");break;case"AttrNoticeNumber":t.addClass("fa fa-tags");break;case"RFqNumber":t.addClass("fa fa-file");break;case"QuestionList":t.addClass("fa fa-list");break;case"Question":t.addClass("fa fa-question-circle");break;case"StartDate":t.addClass("fa fa-calendar");break;case"EndDate":t.addClass("fa fa-calendar-times-o");break;case"State":t.addClass("fa fa-hourglass-start");break;case"Name":t.addClass("fa fa-tags");break;case"Respondent":t.addClass("fa fa-briefcase")}}}}]).directive("basicValidation",["$rootScope",function(n){return{restrict:"A",link:function(t,i){var u={rules:{dateValidation:function(t){var u=$(t).attr("kendo-date-picker"),i,r;return angular.isDefined(u)?(i=$(t).val(),i=="")?!0:(r=kendo.parseDate(i,n.datePickerOptions.format),!r||!isNaN(i))?($(t).val(""),!0):!0:!0}}},r=$(i);kendo.init(r);r.kendoValidator(u)}}}]).directive("assignUser",["$timeout",function(n){return{restrict:"E",replace:!0,template:'<div><select k-select-current-entity-user k-ng-model="assignedUser" placeholder="Aloca utilizator"><\/select><button class="select btn btn-blue" ng-click="save()"><i class="fa fa-check"><\/i><\/button><\/div>',scope:{assignedUser:"=",onSelect:"&"},link:function(t){t.save=function(){n(function(){t.onSelect({user:t.assignedUser})})}}}}]).directive("evaluationCommittees",["ProcedureApi","svc","$window","locale","$timeout",function(n,t,i,r,u){return{templateUrl:"template/common/procedures/evaluation-committee/list",restrict:"E",scope:{procedureId:"=",isReadOnly:"=",canAddEvaluationCommittee:"=",procedureLotId:"="},controller:["$scope",function(f){this.configureAddReport=function(n){f.vm.addProcedureReportVm=n};this.reload=function(){};f.vm?(angular.extend(f.vm,new app.directives.EvaluationCommitteeList(f,f.procedureId,f.procedureLotId,f.isReadOnly,n,t,i,r,u)),angular.extend(f.vm,app.directives.EvaluationCommitteeList.prototype)):f.vm=new app.directives.EvaluationCommitteeList(f,f.procedureId,f.procedureLotId,f.isReadOnly,n,t,i,r,u);f.vm.loadEvaluationCommitteeList(!0);f.vm.isReadOnly=f.isReadOnly}],link:function(){}}}]).directive("procedureStatements",["ProcedureApi","svc","$window","locale","$timeout",function(n,t,i,r,u){return{templateUrl:"template/common/procedures/procedure-statement/list",restrict:"E",scope:{procedureId:"=",isReadOnly:"=",canAddStatement:"="},controller:["$scope",function(f){this.configureAddReport=function(n){f.vm.addProcedureReportVm=n};this.reload=function(){};f.vm?(angular.extend(f.vm,new app.directives.ProcedureStatementList(f,f.procedureId,f.isReadOnly,n,t,i,r,u)),angular.extend(f.vm,app.directives.ProcedureStatementList.prototype)):f.vm=new app.directives.ProcedureStatementList(f,f.procedureId,f.isReadOnly,n,t,i,r,u);f.vm.loadProcedureStatementList(!0);f.vm.isReadOnly=f.isReadOnly}],link:function(){}}}]).directive("viewProcedureStatement",["ProcedureApi","svc","$window","locale","$timeout",function(n,t,i,r,u){return{templateUrl:"template/common/procedures/procedure-statement/view",restrict:"E",scope:{procedureStatementId:"=",procedureStatement:"=",isDps:"="},link:function(f){f.vm?(angular.extend(f.vm,new app.directives.ViewProcedureStatement(f,n,t,i,r,u)),angular.extend(f.vm,app.directives.ViewProcedureStatement.prototype)):f.vm=new app.directives.ViewProcedureStatement(f,n,t,i,r,u)}}}]).directive("sicapEnter",function(){return{restrict:"A",link:function(n,t,i){$("#THE-SEARCH-BUTTON").length&&t.bind("keydown keypress",function(t){t.which===13&&(n.$apply(function(){n.$parent.$eval(i.sicapEnter)}),t.preventDefault())})}}}).directive("sicapEditWidget",function(){return{template:'<div widget class="widget u-section-filter" ng-class="{\'isSpin\': vm.isLoading, \'border-alert\': showWarning}" sicap-enter="vm.local.search()">   <div class="widget-header">   <div class="widget-buttons">   <a href="#" data-toggle="collapse">   <div class="widget-caption" ng-click="vm.swap( \'{{section}}\' )">   <i ng-hide="noIcon" class="fa {{varicon}}" ><\/i>   {{ title }}<\/div><i class="fa fa-chevron-up"><\/i><\/a><\/div><\/div><div class="widget-body {{bkclass}}" style=\'min-height:50px; background-color:#{{bgColor}} !important;\'><ng-transclude> <\/ng-transclude><\/div><\/div>',restrict:"E",transclude:!0,replace:!0,scope:{bkclass:"@bk",title:"@widgetTitle",noIcon:"@",varicon:"@icon",showWarning:"=",bgColor:"@"},link:function(n){angular.isUndefined(n.varicon)&&(n.varicon="fa-filter");angular.isUndefined(n.noIcon)&&(n.noIcon=!1)}}}).directive("sicapEditWidgetCollapsed",function(){return{template:'<div widget class="widget u-section-filter collapsed" ng-class="{\'isSpin\': vm.isLoading}" sicap-enter="vm.local.search()">   <div class="widget-header">   <div class="widget-buttons">   <a href="#" data-toggle="collapse">   <div class="widget-caption" ng-click="vm.swap( \'{{section}}\' )">   <i ng-hide="noIcon" class="fa {{varicon}}" ><\/i>   {{ title }}<\/div><i class="fa fa-chevron-down"><\/i><\/a><\/div><\/div><div class="widget-body" style=\'min-height:50px;\'><ng-transclude> <\/ng-transclude><\/div><\/div>',restrict:"E",transclude:!0,replace:!0,scope:{title:"@widgetTitle",noIcon:"@",varicon:"@icon"},link:function(n){angular.isUndefined(n.varicon)&&(n.varicon="fa-filter");angular.isUndefined(n.noIcon)&&(n.noIcon=!1)}}}).directive("sicapContractsWidget",function(){return{template:'<div widget class="widget u-section-filter contracts-widget margin-bottom-0" ng-class="{\'isSpin\': vm.isLoading}" sicap-enter="vm.local.search()">   <div class="widget-header">   <div id="contractsWidget" class="widget-buttons">   <a href="#" data-toggle="collapse">   <div class="contracts-widget-caption" ng-click="vm.swap( \'{{section}}\' )">   <i ng-hide="noIcon" class="fa {{varicon}}" ><\/i>   {{ title }}<\/div><i class="fa fa-chevron-up"><\/i><\/a><\/div><\/div><div class="widget-body {{extraclass}}" style=\'min-height:50px;\'><ng-transclude> <\/ng-transclude><\/div><\/div>',restrict:"E",transclude:!0,replace:!0,scope:{title:"@widgetTitle",extraclass:"@editableClass",noIcon:"@",varicon:"@icon"},link:function(n){angular.isUndefined(n.varicon)&&(n.varicon="fa-filter");angular.isUndefined(n.noIcon)&&(n.noIcon=!1)}}}).directive("sicapEditSection",function(){return{template:"<div widget class='widget c-section'><div class='widget-header'><div class='widget-buttons'><a href='#' data-toggle='collapse'><div class='widget-caption'><i ng-hide='noIcon' class='fa {{varicon}}'><\/i> {{ title }} <\/div><i class=\"fa fa-chevron-up\"><\/i><\/a><\/div><\/div><div class='widget-body c-section__content'  id=\"{{code}}\"> <div style='padding: 5px;' ng-class=\"{'section-in-edit': !section.modeView}\"> <div class='pull-right'><button class='btn btn-edit'    ng-click=\"container.editSection(section.code)\"    ng-if=\"section.modeView && section.isEditable\" ng-disabled=\"!(section.canEdit && !vm.isLoading)\" kendo-tooltip k-content=\"$root.locale['Common.Label.Action_EditSection']\"><i class='fa fa-edit'><\/i><\/button><button class='btn btn-save'    ng-click=\"container.saveSection(section.code)\"    ng-if=\"!section.modeView\" ng-disabled=\"section.disabledSectionActions\" kendo-tooltip k-content=\"$root.locale['Common.Label.Action_SaveSection']\"><i class='fa fa-check'><\/i><\/button><button class='btn btn-cancel'  ng-click=\"container.cancelSection(section.code)\"  ng-if=\"!section.modeView\" ng-disabled=\"section.disabledSectionActions\"  kendo-tooltip k-content=\"$root.locale['Common.Label.Action_Cancel']\"><i class='fa fa-times'><\/i><\/button><\/div><div class='alert alert-danger fade in alert-shadowed' ng-if=\"section.validationErrors && section.validationErrors.length > 0\"><span class='glyphicon glyphicon-exclamation-sign'><\/span><span ng-repeat=\"e in section.validationErrors\"> {{e}}<br /><\/span><button class='close' data-dismiss='alert'>×<\/button><\/div><div ng-include src=\"section.tpl\"><\/div><\/div><\/div><\/div>",restrict:"E",replace:!0,scope:{title:"@sectionTitle",section:"=",container:"=",validation:"=",varicon:"@",vm:"="},link:function(){}}}).directive("backToTop",["svc",function(n){return{restrict:"E",replace:!0,template:'<button class="back-to-top btn btn-entity white no-print"><i class="fa fa-chevron-up"><\/i> '+n.locale.key["Common.Label.Action_BackToTop"]+"<\/button>",link:function(n,t){n.last=n.show=!1;$(t).hide();$(window).scroll(function(){n.show=$(window).scrollTop()>0;n.last!=n.show&&(n.show?$(t).fadeIn():$(t).fadeOut(),n.last=n.show)});$(t).on("click",function(){$("html, body").animate({scrollTop:0},"fast")})}}}]).directive("sicapD",["svc",function(){return{template:"<span>{{data | date:'dd.MM.yyyy'}}<\/span>",replace:!0,scope:{data:"="}}}]).directive("sicapDt",["svc",function(){return{template:"<span>{{data | date:'dd.MM.yyyy HH:mm'}}<\/span>",replace:!0,scope:{data:"="}}}]).directive("sicapDts",["svc",function(){return{template:"<span>{{data | date:'dd.MM.yyyy HH:mm:ss'}}<\/span>",replace:!0,scope:{data:"="}}}]).directive("sicapDp",["svc",function(n){return{restric:"E",replace:!0,scope:{model:"=",vm:"=",placeHolder:"@"},template:'<input placeholder="{{placeHolder}}" kendo-date-picker k-options="datePickerOptions" k-ng-model="model" style="width:100%" />',link:function(t){t.placeHolder==null&&(t.placeHolder=n.locale.key["Common.Label.Date"])}}}]).directive("sicapDpExt",["svc","$rootScope","$compile",function(n,t,i){return{restrict:"E",scope:{model:"=",placeHolder:"@",startDaysFromToday:"="},link:function(t,r){if(t.datePickerOptions={},t.startDaysFromToday!=null){var u=new Date;t.datePickerOptions.min=sys.dateUtils.addBusinessDays(u,t.startDaysFromToday)}t.placeHolder==null&&(t.placeHolder=n.locale.key["Common.Label.Date"]);r.html('<input placeholder="{{placeHolder}}" kendo-date-picker k-options="datePickerOptions" k-ng-model="model" style="width:100%" />').show();i(r.contents())(t)}}}]).directive("sicapDtp",["svc",function(n){return{restric:"E",replace:!0,scope:{model:"=",vm:"=",placeHolder:"@"},template:'<input placeholder="{{placeHolder}}" kendo-date-time-picker k-options="vm.dateTimePickerOptions" k-ng-model="model" style="width:100%" />',link:function(t){t.placeHolder==null&&(t.placeHolder=n.locale.key["Common.Label.Date"])}}}]).directive("sicapActionBtn",["svc",function(n){return{template:"<button type=\"button\"><i ng-if='btnIcon' class=\"{{btnIcon}}\"><\/i> <span ng-class={'hidden-xs':!isNotHidden}> {{text?text:btnLabel}}<\/span> <\/button>",restrict:"EA",replace:!0,scope:{text:"@",buttonType:"=",clicked:"=",sicapClick:"&"},link:function(t,i,r){var f=r.buttonType,u;switch(f){case"Add":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-plus";t.btnLabel=n.locale.key["Common.Label.Action_Add"];break;case"Remove":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-ban";t.btnLabel=n.locale.key["Common.Label.Remove"];break;case"Upload":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-upload";u=n.locale.key["Common.Label.Action_Add"];t.btnLabel=u;break;case"Save":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.Action_Save"];t.btnLabel=u;break;case"Previsualize":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-eye";u=n.locale.key["Common.Label.Action_Add"];t.btnLabel=u;break;case"Delete":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.Action_Delete"];t.btnLabel=u;break;case"Cancel":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.Action_Cancel"];t.btnLabel=u;break;case"Annul":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.Action_Annul"];t.btnLabel=u;break;case"DeletePlan":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.Delete_Plan"];t.btnLabel=u;break;case"Back":i.addClass("btn btn-default carbon shutter-out-vertical");i.kendoTooltip({content:n.locale.key["Common.Label.Action_Back"],position:"top"});t.btnIcon="fa fa-angle-left";u=n.locale.key[""];t.btnLabel=u;break;case"BackToDefinition":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-angle-left";u=n.locale.key["Common.Label.Action_BackToDefinition"];t.btnLabel=u;break;case"AsignUser":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-user-plus";u=n.locale.key["Common.Label.Action_AssignUser"];t.btnLabel=u;break;case"UnAsignUser":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-user-times";u=n.locale.key["Common.Label.Action_UnAssignUser"];t.btnLabel=u;break;case"ValidationHistory":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-edit";u=n.locale.key["Common.Label.Validation_History"];t.btnLabel=u;break;case"SendToValidation":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-paper-plane";u=n.locale.key["Common.Label.SendToPublication"];t.btnLabel=u;break;case"FinalizeOffer":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.FinalizeOffer"];t.btnLabel=u;break;case"Print":i.addClass("btn btn-entity  white shutter-out-vertical");t.btnIcon="fa fa-print";u=n.locale.key["Common.Label.Action_Print"];t.btnLabel=u;break;case"SendApproval":i.addClass("btn btn-palegreen  white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.Send_for_Approval"];t.btnLabel=u;break;case"Cancel":i.addClass("btn btn-default carbon shutter-out-vertical");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.Action_Cancel"];t.btnLabel=u;break;case"Publish":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-send";u=n.locale.key["Common.Label.Action_Publish"];t.btnLabel=u;break;case"UnPublish":i.addClass("btn btn-danger white  shutter-out-vertical-dgr");t.btnIcon="fa fa-ban";u=n.locale.key["Common.Label.Action_Unpublish"];t.btnLabel=u;break;case"Refresh":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-refresh";t.btnLabel=u;break;case"AssocList":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-plus";u=n.locale.key["Common.Label.AssocList"];t.btnLabel=u;break;case"Preview":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-eye";u=n.locale.key["Common.Label.Action_Preview"];t.btnLabel=u;break;case"InitAcquisition":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.InitAcquisition"];t.btnLabel=u;break;case"FavoritesLink":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-heart";u=n.locale.key["Common.Label.FavoritesLink"];t.btnLabel=u;break;case"EmptyCart":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.EmptyCart"];t.btnLabel=u;break;case"ContinueShopping":i.addClass("btn btn-default carbon shutter-out-vertical");t.btnIcon="fa fa-angle-left";t.btnLabel=u;break;case"ShoppingCart":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-shopping-cart fafix";u=n.locale.key["Common.Label.ShoppingCart"];t.btnLabel=u;break;case"CompareAction":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-star-o";u=n.locale.key["Common.Label.CompareAction"];t.btnLabel=u;break;case"WebServiceButton":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-globe";u=n.locale.key["Common.Label.WebServiceButton"];t.btnLabel=u;break;case"CorrectContractType":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-pencil-square";u=n.locale.key["Common.Label.CorrectContractType"];t.btnLabel=u;break;case"CorrectQuantity":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-database";u=n.locale.key["Common.Label.CorrectQuantity"];t.btnLabel=u;break;case"DirectAcquisition":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.InitAcquisition"];t.btnLabel=u;break;case"Edit":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-edit";u=n.locale.key["Common.Label.Action_Edit"];t.btnLabel=u;break;case"AcceptOffer":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.AcceptOffer"];t.btnLabel=u;break;case"RejectOffer":i.addClass("btn btn-darkorange white shutter-out-vertical-ca");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.RejectOffer"];t.btnLabel=u;break;case"ContextualHelp":i.addClass("btn btn-success white  hidden-lg hidden-md shutter-out-vertical-anr");t.isNotHidden=!0;t.btnIcon="fa fa-question-circle";u=n.locale.key[""];t.btnLabel=u;break;case"AnswerToOffer":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");u=n.locale.key["Common.Label.AnswerToOffer"];t.btnLabel=u;break;case"AddAwardNotice":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-plus";u=n.locale.key["DAAwardNotice.Label.AddAwardNotice"];t.btnLabel=u;break;case"OpenForQuantityCorrection":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.OpenForQuantityCorrection"];t.btnLabel=u;break;case"RevertToPreviousState":i.addClass("btn btn-warning white shutter-out-vertical-ca");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.RevertToPreviousState"];t.btnLabel=u;break;case"AcceptRequest":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.AcceptRequest"];t.btnLabel=u;break;case"RejectRequest":i.addClass("btn btn-danger white  shutter-out-vertical-ca");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.RejectRequest"];t.btnLabel=u;break;case"AnswerToRequest":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-reply";u=n.locale.key["DirectAcquisition.Label.AnswerToRequest"];t.btnLabel=u;break;case"AddNewVersion":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-plus";u=n.locale.key["Common.Label.Action_AddNewVersion"];t.btnLabel=u;break;case"SelectDFNotice":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check-square-o";u=n.locale.key["Common.Label.SelectDFNotice"];t.btnLabel=u;break;case"SaveNotice":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.SaveNotice"];t.btnLabel=u;break;case"DeleteNotice":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.DeleteNotice"];t.btnLabel=u;break;case"SaveRole":i.addClass("btn btn-palegreen white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.SaveRole"];t.btnLabel=u;break;case"DeleteRole":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.DeleteRole"];t.btnLabel=u;break;case"SaveUser":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-check";u=n.locale.key[""];t.btnLabel=u;break;case"CancelUser":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key[""];t.btnLabel=u;break;case"ViewProcedure":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-eye";u=n.locale.key["Common.Label.ViewProcedure"];t.btnLabel=u;break;case"CompleteTEDNumber":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check-square-o";u=n.locale.key["Common.Label.CompleteTEDNumber"];t.btnLabel=u;break;case"AcceptNotice":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.AcceptNotice"];t.btnLabel=u;break;case"RejectNotice":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.RejectNotice"];t.btnLabel=u;break;case"Validate":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.Validate"];t.btnLabel=u;break;case"SubscribeToEvents":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-star";u=n.locale.key["NoticeCommon.Label.SubscribeToEventsButtonText"];t.btnLabel=u;break;case"UnsubscribeToEvents":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-star-o";u=n.locale.key["NoticeCommon.Label.UnsubscribeToEventsButtonText"];t.btnLabel=u;break;case"ResubscribeToEvents":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-star-half-o";u=n.locale.key["NoticeCommon.Label.ResubscribeToEventsButtonText"];t.btnLabel=u;break;case"SaveNoticeInv":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Common.Label.SaveNoticeInv"];t.btnLabel=u;break;case"DeleteNoticeInv":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["Common.Label.DeleteNoticeInv"];t.btnLabel=u;break;case"Send":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-paper-plane";u=n.locale.key["Common.Label.Action_Send"];t.btnLabel=u;break;case"ARGeneral":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-globe";u=n.locale.key["AccountRegister.Title.General"];t.btnLabel=u;break;case"ARAddresses":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-location-arrow";u=n.locale.key["AccountRegister.Title.Addresses"];t.btnLabel=u;break;case"ARUserAcc":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-user";u=n.locale.key["AccountRegister.Title.UserAcc"];t.btnLabel=u;break;case"ARFlSubEntities":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-users";u=n.locale.key["AccountRegister.Label.FlSubEntities"];t.btnLabel=u;break;case"DisabledDownloadDocsAndClarifications":i.addClass("btn btn-blue white shutter-out-vertical-su disabled");i.parent().kendoTooltip({content:n.locale.key["Common.Label.DisabledDownloadDocsAndClarifications"],position:"bottom"});i.on("mouseenter",function(){alert("test")});t.btnIcon="fa fa-download";u=n.locale.key["Common.Label.DownloadDocsAndClarifications"];t.btnLabel=u;break;case"DownloadDocsAndClarifications":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-download";u=n.locale.key["Common.Label.DownloadDocsAndClarifications"];t.btnLabel=u;break;case"SaveENotice":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["ENoticeView.Label.SaveENotice"];t.btnLabel=u;break;case"DeleteENotice":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["ENoticeView.Label.DeleteENotice"];t.btnLabel=u;break;case"CollapseAll":i.addClass("btn btn-default shutter-out-vertical");t.btnIcon="fa fa-chevron-up";u=n.locale.key[""];t.btnLabel=u;break;case"ImportPaap":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-location-arrow";u=n.locale.key["PAAP.Label.ImportPaap"];t.btnLabel=u;break;case"ExportPaap":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-level-up";u=n.locale.key["PAAP.Label.ExportPaap"];t.btnLabel=u;break;case"Enroll":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-file-text-o";u=n.locale.key["Procedure.Label.EnrollIntoProcedure"];t.btnLabel=u;break;case"Withdraw":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-eraser";u=n.locale.key["Procedure.Label.WithdrawFromProcedure"];t.btnLabel=u;break;case"ViewEa":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-eye";u=n.locale.key["Procedure.Label.ViewEa"];t.btnLabel=u;break;case"CreateEa":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-bars";u=n.locale.key["Procedure.Label.CreateEA"];t.btnLabel=u;break;case"CreateCompetResuming":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-bars";u=n.locale.key["Procedure.Label.CreateCompetResuming"];t.btnLabel=u;break;case"ResetWinnerProcedure":i.addClass("btn btn-warning white shutter-out-vertical-ca");t.btnIcon="fa fa-refresh";u=n.locale.key["Procedure.Label.ResetWinner"];t.btnLabel=u;break;case"ResetExtendEvaluationProcedure":i.addClass("btn btn-warning white shutter-out-vertical-ca");t.btnIcon="fa fa-refresh";u=n.locale.key["Procedure.Label.ResetExtendEvaluation"];t.btnLabel=u;break;case"UnCancelProcedure":i.addClass("btn btn-warning white shutter-out-vertical-ca");t.btnIcon="fa fa-undo";u=n.locale.key["Procedure.Label.UnCancel"];t.btnLabel=u;break;case"DownloadAcquistionPdf":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-file-pdf-o";u=n.locale.key["Procedure.Label.AcquisitionSummaryButton"];t.btnLabel=u;break;case"FinalizeCandidatureEvaluation":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.FinalizeCandidatureassessment"];t.btnLabel=u;break;case"FinalizeTechnicalEvaluation":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.FinalizeQualificationAndTechnicalassessment"];t.btnLabel=u;break;case"FinalizeFinancialEvaluation":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.FinalizeFinancialEvaluation"];t.btnLabel=u;break;case"ConfirmationFinalizeEvaluation":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.ConfirmationFinalizeEvaluation"];t.btnLabel=u;break;case"FinalizeEvaluation":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.FinalizeEvaluation"];t.btnLabel=u;break;case"SuspendProcedure":i.addClass("btn btn-warning white shutter-out-vertical");t.btnIcon="fa fa-pause";u=n.locale.key["Procedure.Label.Suspend"];t.btnLabel=u;break;case"UnSuspendProcedure":i.addClass("btn btn-warning white shutter-out-vertical");t.btnIcon="fa fa-play";u=n.locale.key["Procedure.Label.UnSuspend"];t.btnLabel=u;break;case"CancelProcedure":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-close";u=n.locale.key["Procedure.Label.CancelItem"];t.btnLabel=u;break;case"WinnerSelection":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-gavel";u=n.locale.key["Procedure.Label.ProcedureCandidatesButtonCaption"];t.btnLabel=u;break;case"EvaluationProcedure":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-refresh";u=n.locale.key["Procedure.Label.Evaluation"];t.btnLabel=u;break;case"ExtendTermsCandidature":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermsCandidature"];t.btnLabel=u;break;case"ExtendTermsCandidatureEval":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermsCandidatureEval"];t.btnLabel=u;break;case"ExtendTermsOffer":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermsOfferTitle"];t.btnLabel=u;break;case"ExtendTermsOfflineOffer":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermsOfflineOfferTitle"];t.btnLabel=u;break;case"FillTermsOfflineOffer":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.FillTermsOfflineOfferTitle"];t.btnLabel=u;break;case"ExtendTermsOfflineCandidature":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermsOfflineCandidature"];t.btnLabel=u;break;case"ReturnToFinancialEvalPhase":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-backward";u=n.locale.key["Procedure.Label.ReturnToFinancialEvalPhase"];t.btnLabel=u;break;case"ReturnToTehnicalEvalPhase":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-fast-backward";u=n.locale.key["Procedure.Label.ReturnToTehnicalEvalPhase"];t.btnLabel=u;break;case"ReturnToOfferPhase":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-step-backward";u=n.locale.key["Procedure.Label.ReturnToOfferPhase"];t.btnLabel=u;break;case"ExtendTermsOfferEval":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-calendar-plus-o";u=n.locale.key["Procedure.Label.ExtendTermOfferEvalTitle"];t.btnLabel=u;break;case"ReturnToCandidatureEvalPhase":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-step-backward";u=n.locale.key["Procedure.Label.ReturnToCandidatureEvalPhase"];t.btnLabel=u;break;case"ReturnToCandidaturePhase":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-step-backward";u=n.locale.key["Procedure.Label.ReturnToCandidaturePhase"];t.btnLabel=u;break;case"AssignProcedure":i.addClass("btn btn-success white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["Procedure.Label.ProcedureAssigning"];t.btnLabel=u;break;case"DownloadRequest":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-download";u=n.locale.key["AccountRegister.Label.DownloadRequest"];t.btnLabel=u;break;case"ViewRequest":i.addClass("btn btn-entity btn-xs white shutter-out-vertical");t.btnIcon="fa fa-eye";u=n.locale.key["Common.Label.Action_View"];t.btnLabel=u;break;case"Confirm":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["Common.Info.Confirm"];t.btnLabel=u;break;case"ConfirmAndContinue":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["AccountRegister.Label.ConfirmAndContinue"];t.btnLabel=u;break;case"RejectCertifRequest":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["AccountRegister.Label.RejectCertifRequest"];t.btnLabel=u;break;case"AcceptCertifRequest":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["AccountRegister.Label.AcceptCertifRequest"];t.btnLabel=u;break;case"ApprovedWithoutPayCertifRequest":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["AccountRegister.Label.ApprovedWithoutPayCertifRequest"];t.btnLabel=u;break;case"PartiallyAcceptCertifRequest":i.addClass("btn btn-warning white shutter-out-vertical-ca");t.btnIcon="fa fa-warning";u=n.locale.key["AccountRegister.Label.PartiallyAcceptCertifRequest"];t.btnLabel=u;break;case"CheckFormCertifRequest":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-files-o";u=n.locale.key["AccountRegister.Label.CheckFormCertifRequest"];t.btnLabel=u;break;case"Pay":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="glyphicon glyphicon-credit-card";break;case"Download":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-download";break;case"Lock":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-lock";break;case"Copy":i.addClass("btn btn-entity white shutter-out-vertical");t.btnLabel=n.locale.key["Common.Label.Action_Copy"];t.btnIcon="fa fa-files-o";break;case"ProcessRFS":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-check";u=n.locale.key["AccountRegister.Label.ProcessRFS"];t.btnLabel=u;break;case"AuditOperType":i.addClass("btn btn-palegreen white  shutter-out-vertical-anr");t.btnIcon="fa fa-tags";break;case"RejectRFS":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["AccountRegister.Label.RejectCertifRequest"];t.btnLabel=u;break;case"SendRestoreRequest":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-check";u=n.locale.key["DocumentArchive.Label.SaveArchiveRequests"];t.btnLabel=u;break;case"AddArchiveRequest":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-plus";u=n.locale.key["DocumentArchive.Label.AddArchiveRequest"];t.btnLabel=u;break;case"RemoveArchiveRequest":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["DocumentArchive.Label.RemoveArchiveRequest"];t.btnLabel=u;break;case"AddAllArchiveRequests":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-plus";u=n.locale.key["DocumentArchive.Label.AddAllArchiveRequests"];t.btnLabel=u;break;case"RemoveAllArchiveRequests":i.addClass("btn btn-danger white shutter-out-vertical-dgr");t.btnIcon="fa fa-times";u=n.locale.key["DocumentArchive.Label.RemoveAllArchiveRequests"];t.btnLabel=u;break;case"CreateVersion":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-check";t.btnLabel=n.locale.key["Contract.Label.CreateVersion"];break;case"ExportElectronicContract":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-check";t.btnLabel=n.locale.key["Contract.Label.ExportElectronicContract"];break;case"ExportElectronicContractSign":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-check";t.btnLabel=n.locale.key["Contract.Label.ExportElectronicContractSign"];break;case"SignElectronicContract":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-check";t.btnLabel=n.locale.key["Contract.Label.SignElectronicContract"];break;case"DownloadDocumentSigner":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-download";t.btnLabel=n.locale.key["Contract.Label.DownloadDocumentSigner"];break;case"SendRequest":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-times";u=n.locale.key["DocumentArchive.Label.RemoveAllArchiveRequests"];t.btnLabel=u;break;case"Export":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-download";u=n.locale.key["ProcedureCentralisator.Label.MenuExport"];t.btnLabel=u;break;case"ViewDpsProcedure":i.addClass("btn btn-palegreen  white  shutter-out-vertical-anr");t.btnIcon="fa fa-eye";u=n.locale.key["SimplifiedNotice.Label.ViewDpsProcedure"];t.btnLabel=u;break;case"ViewFirmDepositionProcedure":i.addClass("btn btn-palegreen  white  shutter-out-vertical-anr");t.btnIcon="fa fa-eye";u=n.locale.key["SimplifiedNotice.Label.ViewFirmDepositionProcedure"];t.btnLabel=u;break;case"AddSimplifiedNotice":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-plus";t.btnLabel=n.locale.key["SimplifiedNotice.Label.AddSimplifiedNotice"];break;case"GenerateAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-archive";u=n.locale.key["Procedure.Label.GenerateAQFRequest"];t.btnLabel=u;break;case"ReGenerateAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-refresh";u=n.locale.key["Procedure.Label.ReGenerateAQFRequest"];t.btnLabel=u;break;case"RequestArchiveGeneration":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-archive";u=n.locale.key["Procedure.Label.RequestArchiveFile"];t.btnLabel=u;break;case"ViewAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-archive";u=n.locale.key["Procedure.Label.ViewAQFRequest"];t.btnLabel=u;break;case"DownConfAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-download";u=n.locale.key["Procedure.Label.DownloadAqfConfidential"];t.btnLabel=u;break;case"DownAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa fa-download";u=n.locale.key["Procedure.Label.DownloadAqf"];t.btnLabel=u;break;case"UnArchiveAQFRequest":i.addClass("btn btn-blue white shutter-out-vertical-su");t.btnIcon="fa-cloud-download";u=n.locale.key["Procedure.Label.UnArchiveAQFRequest"];t.btnLabel=u;break;case"ElectronicAuctionLogs":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-external-link";u=n.locale.key["ElectronicAuction.Label.ElectronicAuctionLogs"];t.btnLabel=u;break;case"ProcedureLogs":i.addClass("btn btn-entity white shutter-out-vertical");t.btnIcon="fa fa-external-link";u=n.locale.key["Procedure.Label.ProcedureLogs"];t.btnLabel=u;break;case"GetNews":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-reply-all";t.btnLabel=n.locale.key["NewsFeed.Label.GetNews"];break;case"LoadRss":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-rss";t.btnLabel=n.locale.key["NewsFeed.Label.LoadNews"];break;case"BecomeMember":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-star-o";t.btnLabel=n.locale.key["Groups.Label.BecomeMember"];break;case"SecludeFromGroup":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-warning";t.btnLabel=n.locale.key["Groups.Label.SecludeUser"];break;case"AddNotification":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-plus";t.btnLabel=n.locale.key["Groups.Label.AddNotification"];break;case"InviteEntity":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-plus";t.btnLabel=n.locale.key["Groups.Label.InviteEntity"];break;case"AckDocList":i.addClass("btn btn-entity white  shutter-out-vertical");t.btnIcon="fa fa-eye";u=n.locale.key["NoticeCommon.Label.AckDocs"];t.btnLabel=u;break;case"Wizard":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-chevron-right";break;case"RequestLinkUpload":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-mail-o";break;case"Completion":i.addClass("btn btn-palegreen white shutter-out-vertical-anr");t.btnIcon="fa fa-folder-o";break;case"GenerateProcedureReport":i.addClass("btn btn-darkblue shutter-out-vertical");t.btnIcon="fa fa-download";u=n.locale.key["Procedure.Label.GenerateProcedureReport"];t.btnLabel=u}}}}]).directive("displayField",["$compile",function(n){var t=function(n){var t="",i;if(n.field!=null){i=" | number "+(n.noOfDecimals?": "+n.noOfDecimals.toString():":0");switch(n.typeOfField){case"date":t=' | date:"dd.MM.yyyy" ';break;case"dateTime":t=' | date:"dd.MM.yyyy HH:mm" ';break;case"number":t=i;break;case"string":t="";break;default:""}}return t},i=function(n,t){var r=n.preffix!=null?"<span class='u-displayfield__preffix'>{{preffix}}<\/span>":"",u=n.suffix!=null?" <span class='u-displayfield__suffix'>{{suffix}}<\/span>":"",e="<div class='u-displayfield s-row'>"+r+"<span class='u-displayfield__field'>{{field "+t+"}}<\/span>"+u+", <\/div>",o="<div class='u-displayfield s-row'>"+r+"<span class='u-displayfield__field'>{{field "+t+"}}<\/span>"+u+"<\/div>",s="<div class='u-displayfield s-rowend'>"+r+"<span class='u-displayfield__field'>{{field "+t+"}}<\/span>"+u+".<\/div>",f="<div class='u-displayfield s-col'>"+r+"<span class='u-displayfield__field'>{{field "+t+"}}<\/span>"+u+"<\/div>",h="<div class='u-displayfield s-bool'>"+r+"<span class='u-displayfield__field'>{{(field) ? yesValue : noValue}}<\/span>"+u+"<\/div>",i="";switch(n.mode){case"row":i=e;break;case"rowwithoutcomma":i=o;break;case"rowend":i=s;break;case"column":i=f;break;case"yesno":i=h;break;default:i=f}return i},r=function(r,u){r.$watch("field",function(f){if(f!=null&&f!==""){var e=t(r),o=i(r,e);u.html(o).show();n(u.contents())(r)}else u.html(""),n(u.contents())(r)})};return{restrict:"E",link:r,scope:{mode:"@",field:"=?",typeOfField:"@",noOfDecimals:"@",yesValue:"@",noValue:"@",suffix:"@",preffix:"@"}}}]).directive("procedureEvaluationCriterias",["ProcedureApi","svc","$window","locale","$timeout",function(n,t,i,r,u){return{templateUrl:"template/common/procedures/evaluation-criteria/list",restrict:"E",scope:{procedureId:"=",procedureLotId:"="},controller:["$scope",function(f){f.vm=new app.directives.EvaluationCriteriaList(f,n,t,i,r,u);f.vm.loadEvaluationCriteriaList(!0)}]}}]).directive("simplifiedNoticeList",["$timeout","$injector","svc","SimplifiedNoticeApi","userService",function(n,t,i,r,u){return{templateUrl:"template/private/notices/simplified-notice/common/List/simplifiedNoticeList",restrict:"E",scope:{parentCNoticeId:"=",canAddSimplifiedNotice:"=",loaded:"="},link:function(t){t.items=[];t.allowAdd=!1;t.showNotPublished=u.currentUserIsCa()||u.currentUserIsSeap()||u.currentUserIsAnrmap();t.createSimplifiedNotice=function(){r.CA.createSimplifiedNotice(t.parentCNoticeId).then(function(){i.modalService.showMessage("Info","Anuntul simplificat a fost creat cu succes");n(function(){f()})})};t.gotoSimplifiedNotice=function(n,t){var r;r=u.currentUser&&u.currentUser.entity?u.currentUserIsCa()?t?sys.prv.routes.CA.SimplifiedNoticeDps_CA_Edit:sys.prv.routes.CA.SimplifiedNoticeDps_CA_View:u.currentUserIsOf()?sys.prv.routes.SU.SimplifiedNoticeDps_SU_View:u.currentUserIsSeap()?sys.prv.routes.SEAP.SimplifiedNoticeDps_SEAP_View:u.currentUserIsMon()?sys.prv.routes.SEAP.SimplifiedNoticeDps_MON_View:sys.pub.routes.SimplifiedNoticeDps_PUBLIC_View:sys.pub.routes.SimplifiedNoticeDps_PUBLIC_View;i.nav.pathWithParam(r,n)};t.gotoProcedure=function(n){var t;t=u.currentUser&&u.currentUser.entity?u.currentUserIsCa()?sys.prv.routes.CA.ProcedureView:u.currentUserIsOf()?sys.prv.routes.SU.SUProcedureView:u.currentUserIsSeap()?sys.prv.routes.SEAP.SEAPPRocedureView:u.currentUserIsMon()?sys.prv.routes.SEAP.MONPRocedureView:sys.pub.routes.PUBLICProcedureView:sys.pub.routes.PUBLICProcedureView;i.nav.pathForProcedure(t,n,null)};var f=function(){var n;n=u.currentUser&&u.currentUser.entity?u.currentUserIsCa()?function(){return r.CA}:u.currentUserIsOf()?function(){return r.SU}:u.currentUserIsSeap()||u.currentUserIsMon()||u.currentUserIsAnrmap()?function(){return r.SEAP}:function(){return r.PUBLIC}:function(){return r.PUBLIC};n().GetSimplifiedNoticesByParentId(t.parentCNoticeId).then(function(n){t.items=n.items;t.allowAdd=n.canAddSimplifiedNotice})};t.$watch(function(){return t.loaded},function(n,t){n!=t&&n&&f()});t.loaded==undefined&&n(function(){f()})}}}]).directive("tsMaxLength",["svc","$timeout","$compile",function(n,t,i){return{restrict:"A",replace:!0,link:function(n,r,u){t(function(){var a=u.tsMaxLength,f=angular.element("[name="+a+"]"),t,v,e,h,c,o,l;if(f.length>1){for(v=r.scope(),e=0;e<f.length;e++)if(h=angular.element(f[e]),h.scope().$id===v.$id){t=h;break}}else t=f;c=t.attr("maxlength");o=angular.element(t).attr("ng-model");t.is("select")&&(o=angular.element(t).attr("k-free-text"));l='<span class="gray pull-right">{{'+o+" | lengthcr}}/"+c+"<\/span>";c||(l='<span class="gray pull-right">{{'+o+" | lengthcr}}<\/span>");var y=angular.element(l),p=i(y),s=p(n);angular.element(s).hide();r.append(s);t.is("select")&&(t=angular.element("[name="+a+"_input]"));t.on("focus",function(){angular.element(s).show()});t.on("blur",function(){angular.element(s).hide()})})}}}]).directive("tsAlertBox",function(){var n=function(n){n.type||(n.type="error");n.dismiss=function(){n.messages=[]}};return{restrict:"E",link:n,templateUrl:"template/common/controls/_alertBox",scope:{type:"@",messages:"="}}}).directive("utiNoticeAddressEditV2",["$timeout",function(n){return{restrict:"E",replace:!0,scope:{address:"=",isCaNoticeAddress:"@",buyerProfileUrlDisabled:"@",isDisabled:"@",noContactPoints:"@",noFiscalCode:"@",noContacts:"@",isOfficialAddressNameSelect:"@"},link:function(t){t.address==null&&(t.address={});t.CaNoticeAddress=!1;t.buyerProfileUrlIsDisabled=!1;t.isCaNoticeAddress=="1"&&(t.CaNoticeAddress=!0);t.buyerProfileUrlDisabled=="1"&&(t.buyerProfileUrlIsDisabled=!0);t.ShowContactPoints=!0;t.noContactPoints=="1"&&(t.ShowContactPoints=!1);t.ShowFiscalCode=!0;t.noFiscalCode=="1"&&(t.ShowFiscalCode=!1);t.ShowContacts=!0;t.noContacts=="1"&&(t.ShowContacts=!1);t.$watch(function(){return t.address&&t.address.postalCodeItem&&t.address.postalCodeItem.id},function(){t.changePostalCode()});t.$watch(function(){return t.address&&t.address.entityItem&&t.address.entityItem.id},function(){t.changeAddressEntity()});t.changeAddressEntity=function(){t.address&&t.address.entityItem&&n(function(){t.address.entityItem&&t.address.entityItem.address&&(t.address.cif=t.address.entityItem.address.cif,t.address.address=t.address.entityItem.address.address,t.address.cityItem={text:t.address.entityItem.address.cityName,id:-1},t.address.city=t.address.entityItem.address.cityName,t.address.postalCode=t.address.entityItem.address.postalCode,t.address.postalCodeItem={text:t.address.entityItem.address.postalCode,id:-1},t.address.countryItem=t.address.entityItem.address.country,t.address.country=t.address.entityItem.address.countryName,t.address.nutsCode=t.address.entityItem.address.nutsCode)})};t.isCitySelected=function(){return $("#selectCity"+t.$id).data("kendoComboBox").select()!=-1};t.changePostalCode=function(){t.address&&t.address.postalCodeItem&&n(function(){t.address.postalCodeItem&&t.address.postalCodeItem.id&&t.address.postalCodeItem.id>0&&(t.address.city=t.address.postalCodeItem.city,t.address.cityItem={text:t.address.postalCodeItem.city,id:t.address.postalCodeItem.cityId},t.address.country="Romania",t.address.countryItem={text:"Romania",id:1},t.address.nutsCode&&t.address.nutsCode.id==t.address.postalCodeItem.nutsCodeId||(t.address.nutsCode={text:t.address.postalCodeItem.nutsCode,id:t.address.postalCodeItem.nutsCodeId}),t.address.address=t.address.postalCodeItem.road,t.address.postalCode=t.address.postalCodeItem.text)})}},templateUrl:"template/common/address//_utiNoticeAddressEdit"}}]).directive("noticeAddressViewV2",["$http",function(){return{restrict:"E",replace:!0,scope:{address:"=",isCaNoticeAddress:"@"},link:function(n){n.CaNoticeAddress=!1;n.isCaNoticeAddress=="1"&&(n.CaNoticeAddress=!0)},templateUrl:"template/private/notices/df-notice/common/templates/v2/view/_noticeAddressView"}}]).directive("noticeAddressViewS12",["$http",function(){return{restrict:"E",replace:!0,scope:{address:"=",isCaNoticeAddress:"@"},link:function(n){n.CaNoticeAddress=!1;n.isCaNoticeAddress=="1"&&(n.CaNoticeAddress=!0)},templateUrl:"template/common/address/_noticeAddressView"}}]).directive("noticeAddressEditS12",["$timeout",function(n){return{restrict:"E",replace:!0,scope:{address:"=",isCaNoticeAddress:"@",buyerProfileUrlDisabled:"@",isDisabled:"@",noContactPoints:"@",noFiscalCode:"@",noContacts:"@",isOfficialAddressNameSelect:"@"},link:function(t){t.CaNoticeAddress=!1;t.buyerProfileUrlIsDisabled=!1;t.isCaNoticeAddress=="1"&&(t.CaNoticeAddress=!0);t.buyerProfileUrlDisabled=="1"&&(t.buyerProfileUrlIsDisabled=!0);t.ShowContactPoints=!0;t.noContactPoints=="1"&&(t.ShowContactPoints=!1);t.ShowFiscalCode=!0;t.noFiscalCode=="1"&&(t.ShowFiscalCode=!1);t.ShowContacts=!0;t.noContacts=="1"&&(t.ShowContacts=!1);t.$watch(function(){return t.address&&t.address.postalCodeItem&&t.address.postalCodeItem.id},function(){t.changePostalCode()});t.$watch(function(){return t.address&&t.address.entityItem&&t.address.entityItem.id},function(){t.changeAddressEntity()});t.changeAddressEntity=function(){t.address&&t.address.entityItem&&n(function(){t.address.entityItem&&t.address.entityItem.address&&(t.address.nationalIDNumber=t.address.entityItem.address.cif,t.address.address=t.address.entityItem.address.address,t.address.cityItem={text:t.address.entityItem.address.cityName,id:t.address.entityItem.address.city.id},t.address.city=t.address.entityItem.address.cityName,t.address.postalCode=t.address.entityItem.address.postalCode,t.address.postalCodeItem={text:t.address.entityItem.address.postalCode,id:-1},t.address.countryItem=t.address.entityItem.address.country,t.address.country=t.address.entityItem.address.countryName,t.address.nutsCodeItem=t.address.entityItem.address.nutsCode)})};t.changePostalCode=function(){t.address&&t.address.postalCodeItem&&n(function(){t.address.postalCodeItem&&t.address.postalCodeItem.id&&t.address.postalCodeItem.id>0&&(t.address.cityItem&&t.address.cityItem.id==t.address.postalCodeItem.cityId||(t.address.city=t.address.postalCodeItem.city,t.address.cityItem={text:t.address.postalCodeItem.city,id:t.address.postalCodeItem.cityId},t.address.country="Romania",t.address.countryItem={text:"Romania",id:1}),t.address.nutsCodeItem&&t.address.nutsCodeItem.id==t.address.postalCodeItem.nutsCodeId||(t.address.nutsCodeItem={text:t.address.postalCodeItem.nutsCode,id:t.address.postalCodeItem.nutsCodeId}),t.address.address=t.address.postalCodeItem.road)})}},templateUrl:"template/common/address/_noticeAddressEdit"}}]).directive("caNoticeAddressViewNew",["$http",function(){return{restrict:"E",replace:!0,scope:{address:"=",showFiscalCode:"=",fiscalCodeLabel:"@",showNutsCode:"=",nutsCodeLabel:"@",showContact:"=",contactLabel:"@",showAuthorityAddress:"=",authorityLabel:"@",showBuyerProfileAddress:"=",buyerProfileLabel:"@",multipleAddressesLabel:"@",showSme:"="},templateUrl:"template/common/notices/view/_CaNoticeAddressViewNew"}}]).directive("caNoticeAddressViewOld",["$http",function(){return{restrict:"E",replace:!0,scope:{address:"=",showFiscalCode:"=",fiscalCodeLabel:"@",showContact:"=",contactLabel:"@",showAuthorityAddress:"=",authorityLabel:"@",showBuyerProfileAddress:"=",buyerProfileLabel:"@",multipleAddressesLabel:"@"},templateUrl:"template/common/notices/view/_CaNoticeAddressViewOld"}}]).directive("dfNoticeViewWidget",["$http",function(){return{restrict:"E",replace:!0,transclude:!0,scope:{title:"="},templateUrl:"template/private/notices/df-notice/common/templates/v2/_DfNoticeViewWidget"}}]).directive("viewCaNoticeSection225",["$http",function(){return{restrict:"E",replace:!0,templateUrl:"template/private/notices/ca-notice/common/_viewCaNoticeSection225",scope:{data:"="}}}]).directive("assignedUser",["svc",function(){return{restrict:"E",replace:!0,scope:{caNoticeId:"@",inEdit:"@"},controller:"CtrlAssignedUser",controllerAs:"vm",templateUrl:"template/common/assigned-user/assigned-user",link:function(){}}}]),function(n){var t;(function(n){var f=function(){function n(n,t,i,r,u,f,e,o,s){var h=this;this.$scope=n;this.procedureId=t;this.procedureLotId=i;this.isReadOnly=r;this.api=u;this.svc=f;this.$window=e;this.locale=o;this.$timeout=s;this.isLoading=!1;this.validationErrors=[];this.isProcedureStatementListLoaded=!1;this.spin=this.svc.spinFactory.create("spinner-ps-list");this.$scope.$watch(function(){return h.$scope.canAddEvaluationCommittee},function(n){h.canAddEvaluationCommittee=n})}return n.prototype.loadEvaluationCommitteeList=function(n){var t=this;(!t.isProcedureStatementListLoaded||n)&&(t.spin.isLoading=t.isLoading=!0,t.svc.userService.currentUserIsCa()?t.api.CA.GetEvaluationCommitteeList(t.procedureId).then(function(n){t.evaluationCommitteesList=n;t.isProcedureStatementInProgress=n.isProcedureStatementInProgress;t.isProcedureStatementListLoaded=!0},function(n){t.svc.log.infoMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}):t.api.COMMON.GetEvaluationCommitteeList(t.procedureId).then(function(n){t.evaluationCommitteesList=n;t.isProcedureStatementInProgress=n.isProcedureStatementInProgress;t.isProcedureStatementListLoaded=!0},function(n){t.svc.log.infoMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}))},n.prototype.addEvaluationCommittee=function(){var n=this,t;n.procedureLotId?(t=[":idProcedure",n.procedureId,":idProcedureLot?",n.procedureLotId],n.svc.nav.setBackRouteWithParams(sys.prv.routes.CA.ProcedureView,t)):(t=[":idProcedure",n.procedureId,":idProcedureLot?",""],n.svc.nav.setBackRouteWithParams(sys.prv.routes.CA.ProcedureView,t));n.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.EvalCommittee_Ca,":procedureId",n.procedureId,":evalCommitteeId",0)},n.prototype.editEvaluationCommittee=function(n){var t=this;t.svc.nav.locationWithNamedParam2(sys.prv.routes.CA.EvalCommittee_Ca,":procedureId",t.procedureId,":evalCommitteeId",n.evalCommitteeMemberId)},n.prototype.deleteEvaluationCommittee=function(n){var t=this;if(n.committeeUsedInEvaluation){t.svc.modalService.showInfoMessage("Nu puteți șterge comisia deoarece este asociată la etapele de evaluare ale procedurii!");return}t.validationErrors=[];t.spin.isLoading=t.isLoading=!0;t.svc.modalService.confirm(t.svc.locale.key["Common.Info.Info"],t.svc.locale.key["Procedure.Label.ConfirmDeleteEvaluationCommittee"]).then(function(i){i&&(t.spin.isLoading=t.isLoading=!0,t.api.CA.DeleteEvaluationCommittee(n.evalCommitteeMemberId).then(function(){t.svc.modalService.showMessage("",t.svc.locale.key["Procedure.Label.SuccessfullyDeletedEvaluationCommittee"]);t.loadEvaluationCommitteeList(!0)},function(n){t.validationErrors=n;t.svc.modalService.showErrorMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}))})},n}(),i,r,t,u;n.EvaluationCommitteeList=f;i=function(){function n(n,t,i,r,u,f,e,o){var s=this;this.$scope=n;this.procedureId=t;this.isReadOnly=i;this.api=r;this.svc=u;this.$window=f;this.locale=e;this.$timeout=o;this.isLoading=!1;this.validationErrors=[];this.isProcedureStatementListLoaded=!1;this.spin=this.svc.spinFactory.create("spinner-ps-list");this.$scope.$watch(function(){return s.$scope.canAddStatement},function(n){s.canAddStatement=n})}return n.prototype.loadProcedureStatementList=function(n){var t=this;(!t.isProcedureStatementListLoaded||n)&&(t.spin.isLoading=t.isLoading=!0,t.svc.userService.currentUserIsCa()?t.api.CA.GetProcedureReports(t.procedureId).then(function(n){t.procedureReportsAndStatements=n.items;t.isProcedureStatementInProgress=n.isProcedureStatementInProgress;t.isProcedureStatementListLoaded=!0},function(n){t.svc.log.infoMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}):t.api.COMMON.GetProcedureReports(t.procedureId).then(function(n){t.procedureReportsAndStatements=n.items;t.isProcedureStatementInProgress=n.isProcedureStatementInProgress;t.isProcedureStatementListLoaded=!0},function(n){t.svc.log.infoMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}))},n.prototype.addProcedureStatement=function(){var n=this;n.svc.nav.pathForEditProcedureStatement(sys.prv.routes.CA.ProcedureStatementEdit,n.procedureId,null)},n.prototype.addProcedureReport=function(n){this.addProcedureReportVm.openWindow(n)},n.prototype.editProcedureStatement=function(n){var t=this;t.svc.nav.pathForEditProcedureStatement(sys.prv.routes.CA.ProcedureStatementEdit,t.procedureId,n.procedureStatementId)},n.prototype.viewProcedureStatement=function(n){var t=this;t.svc.userService.currentUserIsCa()?t.svc.nav.pathWithParam(sys.prv.routes.CA.ProcedureStatementCAView,n.procedureStatementId):t.svc.userService.currentUserIsSu()?t.svc.nav.pathWithParam(sys.prv.routes.SU.ProcedureStatementSUView,n.procedureStatementId):t.svc.userService.currentUserIsSeap()?t.svc.nav.pathWithParam(sys.prv.routes.SEAP.ProcedureStatementSEAPView,n.procedureStatementId):t.svc.nav.pathWithParam(sys.pub.routes.PUBLICProcedureStatementView,n.procedureStatementId)},n.prototype.downloadNoticeDocument=function(n){this.api.COMMON.DownloadNoticeDocument(n)},n.prototype.deleteProcedureStatement=function(n){var t=this;t.validationErrors=[];t.svc.modalService.confirm(t.svc.locale.key["Common.Info.Info"],t.svc.locale.key["Procedure.Label.ConfirmDeleteProcedureStatement"]).then(function(i){i&&(t.spin.isLoading=t.isLoading=!0,t.api.CA.DeleteProcedureStatement(n.procedureStatementId).then(function(){t.svc.modalService.showMessage("",t.svc.locale.key["Procedure.Label.SuccessfullyDeletedProcedureStatement"]);t.loadProcedureStatementList(!0)},function(n){t.validationErrors=n}).finally(function(){t.spin.isLoading=t.isLoading=!1}))})},n.prototype.exportProcedureStatement=function(n){var t=this;t.spin.isLoading=t.isLoading=!0;this.api.COMMON.ExportProcedureStatement(n.procedureStatementId).finally(function(){t.spin.isLoading=t.isLoading=!1})},n}();n.ProcedureStatementList=i;r=function(){function n(n,t,i,r,u,f){this.$scope=n;this.api=t;this.svc=i;this.$window=r;this.locale=u;this.$timeout=f;this.isLoading=!0;var e=this;e.procedureStatementId=n.procedureStatementId;e.spin=i.spinFactory.create("spinner-view-ps");this.$scope.$on("publishProcedureStatement",function(){e.publish()});e.$scope.$watch(function(){return e.$scope.isDps},function(n){e.isDps=n});this.loadInitialData()}return n.prototype.publish=function(){var n=this;n.spin.isLoading=n.isLoading=!0;this.api.CA.PublishProcedureStatement(n.procedureStatementId).then(function(t){t.isValid?(n.api.CA.CompleteEFormsSupplierValues(n.procedureStatementId),n.svc.modalService.showMessage("",n.svc.locale.key["Procedure.Label.SuccessfullyPublishedProcedureStatement"]).then(function(){n.isDps?n.svc.nav.path(sys.prv.routes.CA.ProcedureDps.route.replace(":idProcedure",n.item.procedureId)):n.svc.nav.pathForProcedure(sys.prv.routes.CA.ProcedureView,n.item.procedureId,null)})):n.svc.nav.pathForEditProcedureStatement(sys.prv.routes.CA.ProcedureStatementEdit,n.item.procedureId,n.procedureStatementId,!0)},function(t){n.svc.log.error(t)}).finally(function(){n.spin.isLoading=n.isLoading=!1})},n.prototype.loadInitialData=function(){var n=this;n.spin.isLoading=n.isLoading=!0;this.api.COMMON.GetProcedureStatementView(n.procedureStatementId).then(function(t){n.item=n.$scope.procedureStatement=t},function(){}).finally(function(){n.spin.isLoading=n.isLoading=!1})},n}();n.ViewProcedureStatement=r;t=function(n){function t(t,i){n.call(this,t,i)}return __extends(t,n),t.prototype.downloadFile=function(n){this.DOWNLOAD_GET(n,null)},t.prototype.verifyFile=function(n){return this.POST(n)},t.$inject=["$http","$q"],t}(sys.HttpApi);n.OnDownload=t;angular.module("app.controls").service("OnDownload",t);u=function(){function n(n,t,i,r,u,f){this.$scope=n;this.api=t;this.svc=i;this.$window=r;this.locale=u;this.$timeout=f;this.isLoading=!1;this.isListLoaded=!1;this.procedureId=n.procedureId;this.procedureLotId=n.procedureLotId;this.spin=this.svc.spinFactory.create("spinner-ac-list")}return n.prototype.loadEvaluationCriteriaList=function(n){var t=this;(!t.isListLoaded||n)&&(t.spin.isLoading=t.isLoading=!0,t.api.COMMON.GetProcedureEvaluationCriterias(t.procedureId,t.procedureLotId).then(function(n){t.items=n.items;t.isListLoaded=!0},function(n){t.svc.log.infoMessage(n)}).finally(function(){t.spin.isLoading=t.isLoading=!1}))},n}();n.EvaluationCriteriaList=u})(t=n.directives||(n.directives={}))}(app||(app={}));angular.module("smart-table").directive("stPaginationScroll",["$timeout",function(){return{require:"stTable",link:function(n,t,i,r){var u=20,f=r.tableState().pagination;f.itemsByPage=u;var e=function(){r.slice(f.start+u,u)},o=t[0],s=function(){var t=o.getBoundingClientRect();t.bottom-200<window.innerHeight&&(console.log("BOTTOM!"),n.$apply(e))};angular.element(window).bind("scroll load",s)}}}]),function(n){function t(n,t){var i=t?t.find("[data-toggle='collapse']").eq(0):null;i&&i.kendoTooltip({position:"top",content:t.hasClass("collapsed")?n.locale.key["Common.Label.Extend"]:n.locale.key["Common.Label.Collapse"]});var r=function(n){n.preventDefault();var t=$(this).parents(".widget").eq(0),i=$(this).find("i").eq(0),u="fa-compress",f="fa-expand";t.hasClass("maximized")?(i&&i.addClass(f).removeClass(u),t.removeClass("maximized"),t.find(".widget-body").css("height","auto")):(i&&i.addClass(u).removeClass(f),t.addClass("maximized"),r(t))},u=function(t){t.preventDefault();var r=$(this).parents(".widget").eq(0),o=r.find(".widget-body"),u=$(this).find("i"),s=r.find(".widget-header .widget-buttons, .dash-header .dash-buttons").find("[data-toggle]").find("i"),f="fa-chevron-down",e="fa-chevron-up",h=300;r.hasClass("collapsed")?(u&&(u.addClass(e).removeClass(f),s.addClass(e).removeClass(f)),r.removeClass("collapsed"),o.slideUp(0,function(){o.slideDown(h,function(){if(i){var t=i.data("kendoTooltip");t.popup?t.popup.wrapper.find(".k-tooltip-content").html(n.locale.key["Common.Label.Collapse"]):t.options&&(t.options.content=n.locale.key["Common.Label.Collapse"])}})})):(u&&(u.addClass(f).removeClass(e),s.addClass(f).removeClass(e)),o.slideUp(200,function(){if(r.addClass("collapsed"),i){var t=i.data("kendoTooltip");t.popup?t.popup.wrapper.find(".k-tooltip-content").html(n.locale.key["Common.Label.Extend"]):t.options&&(t.options.content=n.locale.key["Common.Label.Collapse"])}}))},f=function(n){n.preventDefault();var i=$(this),t=i.parents(".widget").eq(0);t.hide(300,function(){t.remove()})};if(t){$('.widget-buttons *[data-toggle="maximize"]',t).on("click",r);$('.widget-buttons *[data-toggle="collapse"]',t.children(".widget-header")).on("click",u);$('.widget-buttons *[data-toggle="dispose"]',t).on("click",f);$('.dash-buttons *[data-toggle="maximize"]',t).on("click",r);$('.dash-buttons *[data-toggle="collapse"]',t.children(".dash-header")).on("click",u);$('.dash-buttons *[data-toggle="dispose"]',t).on("click",f)}else{$('.widget-buttons *[data-toggle="maximize"]').unbind("click");$('.widget-buttons *[data-toggle="collapse"]').unbind("click");$('.widget-buttons *[data-toggle="dispose"]').unbind("click");$('.widget-buttons *[data-toggle="maximize"]').on("click",r);$('.widget-buttons *[data-toggle="collapse"]').on("click",u);$('.widget-buttons *[data-toggle="dispose"]').on("click",f);$('.dash-buttons *[data-toggle="maximize"]').unbind("click");$('.dash-buttons *[data-toggle="collapse"]').unbind("click");$('.dash-buttons *[data-toggle="dispose"]').unbind("click");$('.dash-buttons *[data-toggle="maximize"]').on("click",r);$('.dash-buttons *[data-toggle="collapse"]').on("click",u);$('.dash-buttons *[data-toggle="dispose"]').on("click",f)}}function i(n,t){n.kendoTooltip({position:"top",content:n.hasClass("collapsed")?t.locale.key["Common.Label.ExtendSections"]:t.locale.key["Common.Label.CollapseSections"]});$('.btn-widgets-action *[data-toggle="collapse"]').unbind("click");n.on("click",function(i){var r;i.preventDefault();var o=$(".widget"),s=o.find(".widget-body"),h=$(".widget .widget-header .widget-buttons, .widget .dash-header .dash-button").find("[data-toggle]").find("i"),u=$(this).find("i"),f="fa-chevron-down",e="fa-chevron-up",c=300;n.hasClass("collapsed")?(u&&(u.addClass(e).removeClass(f),h.addClass(e).removeClass(f)),o.removeClass("collapsed"),s.slideUp(0,function(){s.slideDown(c)}),n.removeClass("collapsed"),r=$(this).data("kendoTooltip"),r.popup.wrapper.find(".k-tooltip-content").html(t.locale.key["Common.Label.CollapseSections"])):(u&&(u.addClass(f).removeClass(e),h.addClass(f).removeClass(e),r=$(this).data("kendoTooltip"),r.popup.wrapper.find(".k-tooltip-content").html(t.locale.key["Common.Label.ExtendSections"])),s.slideUp(200,function(){o.addClass("collapsed")}),n.addClass("collapsed"))})}angular.module("app.controls").directive("widget",["svc",function(n){return{restrict:"A",link:function(){t(n)}}}]).directive("widgetv2",["svc",function(n){return{restrict:"A",link:function(i,r){t(n,r)}}}]).directive("btnWidgetsAction",["svc",function(n){return{restrict:"A",link:function(t,r){i(r,n)}}}]).directive("fullscreenToggler",["$document",function(n){return{restrict:"A",link:function(t,i){angular.element(i).bind("click",function(){var i=n[0],t=i.documentElement;$("body").hasClass("full-screen")?($("body").removeClass("full-screen"),$("#fullscreen-toggler").removeClass("active"),i.exitFullscreen?i.exitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen()):($("body").addClass("full-screen"),$("#fullscreen-toggler").addClass("active"),t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen())})}}}]);n.InitiateWidgets=t;n.ExpandCollapseAll=i}(beyond||(beyond={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){"use strict";var t,f,i,e,r,u;angular.module("app.sys",["ngResource","ngCookies","angularFileUpload","ngFileUpload","angularSpinner","ui.bootstrap","smart-table","LocalStorageModule","app.security","ngTextTruncate"]);t=function(n){function t(t,i){n.call(this,t,i);this.api="api-reg/mock"}return __extends(t,n),t.prototype.getPage=function(n){return this.GET(this.api+"/getPage/",n)},t.prototype.testSaveForm=function(n){return this.POST(this.api+"/testSaveForm/",n)},t.prototype.save=function(n){return this.POST(this.api+"/save/",n)},t.prototype.webSignerGetConfig=function(n){return this.GET(this.api+"/webSignerGetConfig/",{docid:n})},t.$inject=["$http","$q"],t}(n.HttpApi);n.MockApi=t;angular.module("app.sys").service("MockApi",t);f=function(n){function t(t,i){n.call(this,t,i);this.api="api/logging"}return __extends(t,n),t.prototype.logError=function(n){return this.POST(this.api+"/logError/",n)},t.$inject=["$http","$q"],t}(n.HttpApi);angular.module("app.sys").service("LogApi",f);i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/Entity"}return __extends(t,n),t.prototype.getSUEntityView=function(n){return this.GET(this.api+"/getSUEntityView/"+n)},t.prototype.getCAEntityView=function(n){return this.GET(this.api+"/getCAEntityView/"+n)},t.prototype.getSUEntityByCIF=function(n){return this.POST(this.api+"/getSUEntityByCIF/",n)},t.prototype.getCAGenericItem=function(n){return this.GET(this.api+"/getCAGenericItem/"+n)},t.$inject=["$http","$q"],t}(n.HttpApi);n.EntityApi=i;angular.module("app.sys").service("EntityApi",i);e=function(){function n(){}return n.setMenu=function(t){n.items=t;n.all=[];n.buildListFromTree(t)},n.getLinkByMenuEntryCode=function(n){for(var t,i=0;i<this.all.length;i++)if(t=this.all[i],t.localeCode==n)return t.menuEntryUrl;return"#"},n.buildListFromTree=function(n){var t,i;if(n)for(t=0;t<n.length;t++)i=n[t],this.all.push(i),this.buildListFromTree(i.children)},n.items=[],n.all=[],n}();n.TheMenu=e;r=function(n){function t(t,i){n.call(this,t,i);this.api="api/Mock"}return __extends(t,n),t.prototype.initPay=function(){return this.GET(this.api+"/initPay/")},t.$inject=["$http","$q"],t}(n.HttpApi);n.MobilPayApi=r;angular.module("app.sys").service("MobilPayApi",r);u=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/time"}return __extends(t,n),t.prototype.getServerTime=function(){return this.GET(this.api+"/getServerTime/")},t.$inject=["$http","$q"],t}(n.HttpApi);n.TimeApi=u;angular.module("app.sys").service("TimeApi",u)}(sys||(sys={})),function(){var n=function(){function n(n,t,i){this.$rootScope=n;this.$location=t;this.$timeout=i;this._items=[];this.locationChangeSuccess=function(){this.items=[]}}return Object.defineProperty(n.prototype,"items",{set:function(n){var t=this;this._items=n;this.$timeout(function(){t.$rootScope.$broadcast("breadcrumbs:set",n)})},enumerable:!0,configurable:!0}),n.$inject=["$rootScope","$location","$timeout"],n}();angular.module("app.sys").service("bc",n)}(sys||(sys={})),function(n){"use strict";var i=function(){function n(n,t,i){this.$window=n;this.$rootScope=t;this.localStorageService=i}return n.prototype.createAccessor=function(n){return new t(n,this.$rootScope,this.$window,this.localStorageService)},n.prototype.clearLocalStorage=function(){this.localStorageService.clearAll()},n.$inject=["$window","$rootScope","localStorageService"],n}(),t;n.CacheFactory=i;t=function(){function n(n,t,i,r){this.KEY=n;this.$rootScope=t;this.localStorageService=r;this.routeChangeComplete=!1}return n.prototype.onRouteChange=function(){},Object.defineProperty(n.prototype,"isEmpty",{get:function(){var n=this.getData();return n===undefined||n==null},enumerable:!0,configurable:!0}),n.prototype.getData=function(){return JSON.parse(this.localStorageService.get(this.KEY,!1),this.dateReviver)},n.prototype.setData=function(n){this.localStorageService.set(this.KEY,JSON.stringify(n))},n.prototype.dateReviver=function(n,t){return t},n.prototype.forProperty=function(n,t,i){var f=this,r=this,u=this.getData();return u==null?(this.setData(i),t(i)):t(u),this.$rootScope.$on("$routeChangeStart",function(){if(!r.routeChangeComplete){r.routeChangeComplete=!0;var t=n();f.setData(t)}}),this},n}();n.CacheData=t;angular.module("app.sys").service("cacheFactory",i)}(sys||(sys={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){"use strict";var t=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/comboPub";this.api_prv="api/combo"}return __extends(t,n),t.prototype.getCurrentEntityUsers=function(n){return this.GET(this.api+"/getCurrentEntityUsers/",n)},t.prototype.getNaturalPersons=function(n){return this.GET(this.api+"/GetNaturalPersons/",n)},t.prototype.getSysEvalCommitteeMemberRole=function(){return this.GET(this.api+"/GetSysEvalCommitteeMemberRole/")},t.prototype.getCurrentEntityUsersList=function(){return this.GET(this.api+"/getCurrentEntityUsersList/")},t.prototype.GetEntityInfoById=function(n){return this.GET(this.api+"/GetEntityInfoById/",{userId:n})},t.prototype.getUserById=function(n){return this.GET(this.api+"/getUserById/",{userId:n})},t.prototype.getMeasureUnits=function(){return this.GET(this.api+"/getMeasureUnits/")},t.prototype.getMeasureUnitsByUser=function(){return this.GET(this.api+"/getMeasureUnitsByUser/")},t.prototype.getCurrencies=function(){return this.GET(this.api+"/getCurrencies/")},t.prototype.getCurrenciesWithCode=function(){return this.GET(this.api+"/getCurrenciesWithCode/")},t.prototype.getDefaultCurrency=function(){return this.GET(this.api+"/getDefaultCurrency/")},t.prototype.getSysNoticeState=function(){return this.GET(this.api+"/getSysNoticeState/")},t.prototype.getSysNoticeStates=function(n){return n===void 0&&(n=null),this.GET(this.api+"/getSysNoticeStates/",{filter:n})},t.prototype.getSysAcquisitionContractType=function(){return this.GET(this.api+"/getSysAcquisitionContractType/")},t.prototype.getSysDirectAcquisitionStates=function(n){return n===void 0&&(n=null),this.GET(this.api+"/getSysDirectAcquisitionStates/")},t.prototype.getSysEuropeanFund=function(){return this.GET(this.api+"/getSysEuropeanFund/")},t.prototype.getSysEuropeanFundV2=function(){return this.GET(this.api+"/getSysEuropeanFundV2/")},t.prototype.getSysEuropeanFundTree=function(){return this.GET(this.api+"/getSysEuropeanFundTree/")},t.prototype.getSysNoticeEntityAddressType=function(){return this.GET(this.api+"/getSysNoticeEntityAddressType/")},t.prototype.getCPVCodeVersion=function(){return this.GET(this.api+"/getCPVCodeVersion/")},t.prototype.getCPVCategories=function(){return this.GET(this.api+"/getCpvCategories/")},t.prototype.getSysProcedureTypes=function(n){return n===void 0&&(n=null),this.GET(this.api+"/getSysProcedureTypes/",{filter:n})},t.prototype.getSysProcedurePhases=function(){return this.GET(this.api+"/getSysProcedurePhases/")},t.prototype.getSysContractAssignmentTypes=function(){return this.GET(this.api+"/getSysContractAssignmentTypes/")},t.prototype.getSysAwardCriteriaTypes=function(){return this.GET(this.api+"/getSysAwardCriteriaTypes/")},t.prototype.getCounty=function(){return this.GET(this.api+"/getCounty/")},t.prototype.getSysFinancingTypes=function(){return this.GET(this.api+"/getSysFinancingTypes/")},t.prototype.getSysNotReportTemplates=function(n){return n===void 0&&(n=null),this.GET(this.api+"/getSysNotReportTemplates/",{filter:n})},t.prototype.getNotReportFrequencies=function(){return this.GET(this.api+"/getNotReportFrequencies/")},t.prototype.getSysNoticeTypes=function(){return this.GET(this.api+"/getSysNoticeTypes/")},t.prototype.getSysAcquisitionContractTypes=function(){return this.GET(this.api+"/getSysAcquisitionContractTypes/")},t.prototype.getSysAddressType=function(){return this.GET(this.api+"/getSysAddressType/")},t.prototype.getSysMailMessageTypes=function(){return this.GET(this.api+"/getSysMailMessageTypes/")},t.prototype.getSysMailMessageTypesByEntityType=function(n){return this.GET(this.api+"/getSysMailMessageTypesByEntityType/",{moduleId:n})},t.prototype.getSysMailMessageModulesByEntityType=function(){return this.GET(this.api+"/getSysMailMessageModulesByEntityType/")},t.prototype.getSysNoticeType=function(){return this.GET(this.api+"/getSysNoticeTypes/")},t.prototype.getUsersByEntityID=function(){return this.GET(this.api+"/getUsersByEntityID/")},t.prototype.getSysLanguages=function(){return this.GET(this.api+"/getSysLanguages/")},t.prototype.getSysLanguagesNews=function(){return this.GET(this.api+"/getSysLanguagesNews/")},t.prototype.getSysAdvertisingNotices=function(){return this.GET(this.api+"/GetSysAdvertisingNotices/")},t.prototype.getSysLotDivisionOptions=function(){return this.GET(this.api+"/GetSysLotDivisionOptions/")},t.prototype.getSysNoticeDocumentDecisionType=function(){return this.GET(this.api+"/GetSysNoticeDocumentDecisionTypes/")},t.prototype.getActivityType=function(n){return this.GET(this.api+"/GetActivityType/?isUtility="+n)},t.prototype.getCreditReleaseAuthorityType=function(){return this.GET(this.api+"/GetCreditReleaseAuthorityType/")},t.prototype.getOugArt=function(){return this.GET(this.api+"/GetOugArt")},t.prototype.getAllNutsCodes=function(){return this.GET(this.api+"/getAllNutsCodes")},t.prototype.getNutsCodeRo=function(){return this.GET(this.api+"/getNutsCodeRo")},t.prototype.getSupplierType=function(){return this.GET(this.api+"/getSupplierType/")},t.prototype.getSysSupplierCategory=function(){return this.GET(this.api+"/getSysSupplierCategory/")},t.prototype.getCountry=function(){return this.GET(this.api+"/getCountry/")},t.prototype.getSysEntitySuffix=function(){return this.GET(this.api+"/getSysEntitySuffix/")},t.prototype.getSysEntityPrefix=function(){return this.GET(this.api+"/getSysEntityPrefix/")},t.prototype.getSysRecoveryReason=function(){return this.GET(this.api+"/getSysRecoveryReason/")},t.prototype.getSysRequestForSEAPTypes=function(){return this.GET(this.api+"/getSysRequestForSEAPTypes/")},t.prototype.getSysRequestForSEAPTypes_Rfs=function(){return this.GET(this.api+"/getSysRequestForSEAPTypes_Rfs/")},t.prototype.getSysRequestForSEAPTypes_Supplier=function(n){return this.GET(this.api+"/getSysRequestForSEAPTypes_Supplier/",{isForEdit:n})},t.prototype.getSysRequestForSEAPStates=function(){return this.GET(this.api+"/getSysRequestForSEAPStates/")},t.prototype.getSysEntityTypes=function(){return this.GET(this.api+"/getSysEntityTypes/")},t.prototype.getSysEntityStates=function(){return this.GET(this.api+"/getSysEntityStates/")},t.prototype.getSysDocumentTypes=function(){return this.GET(this.api+"/getSysDocumentTypes/")},t.prototype.getSysDocumentStates=function(){return this.GET(this.api+"/getSysDocumentStates/")},t.prototype.getSysOperationLevel=function(){return this.GET(this.api+"/getSysOperationLevel/")},t.prototype.getSysContractTypesEnum=function(){return this.GET(this.api+"/getSysContractTypesEnum")},t.prototype.getProcedureReportYears=function(){return this.GET(this.api+"/getProcedureReportYears")},t.prototype.getSysProcedureReportStates=function(){return this.GET(this.api+"/getSysProcedureReportStates")},t.prototype.getContractingAuthorities=function(){return this.GET(this.api+"/getContractingAuthorities")},t.prototype.getBooleanTypesForCombo=function(n){return n===void 0&&(n=null),this.GET(this.api+"/getBooleanTypesForCombo")},t.prototype.getSysProcedureStates=function(){return this.GET(this.api+"/getSysProcedureStates")},t.prototype.getDirectAcquistionArchivePeriod=function(){return this.GET(this.api+"/getDirectAcquistionArchivePeriod")},t.prototype.getSysPatchTypes=function(){return this.GET(this.api+"/getSysPatchTypes")},t.prototype.getSysNoticeVersions=function(){return this.GET(this.api+"/getSysNoticeVersions")},t.prototype.getSysAckDocType=function(){return this.GET(this.api+"/getSysAckDocType")},t.prototype.getSysAckDocCategory=function(){return this.GET(this.api+"/getSysAckDocCategory")},t.prototype.getSysAckDocCategoryOption=function(){return this.GET(this.api+"/getSysAckDocCategoryOption")},t.prototype.getSysContractorQuality=function(){return this.GET(this.api+"/getSysContractorQuality")},t.prototype.getSysDfNoticeValidationSections=function(){return this.GET(this.api+"/getSysDfNoticeValidationSections/")},t.prototype.getAllCaNoticeWinners=function(){return this.GET(this.api+"/getAllCaNoticeWinners/")},t.prototype.getSysSimplifiedProcedurePhases=function(){return this.GET(this.api+"/getSysSimplifiedProcedurePhases/")},t.prototype.getNonWorkingDays=function(){return this.GET(this.api+"/getNonWorkingDays/")},t.prototype.checkCaptcha=function(n){return this.GET("checkCaptcha/",n)},t.prototype.getNoticeStickyData=function(n,t){return this.GET(this.api+"/getNoticeStickyData/",{sysNoticeTypeId:n,noticeId:+t})},t.prototype.getNoticeStickyDataHistory=function(n,t){return this.GET(this.api+"/getNoticeStickyDataHistory/",{sysNoticeTypeId:n,noticeId:+t})},t.prototype.getNoticeGeneralInfo=function(n,t){return this.GET(this.api+"/getNoticeGeneralInfo/",{sysNoticeTypeId:n,noticeId:+t})},t.prototype.getProcedureStatementSuppliers=function(n){return this.GET(this.api+"/getProcedureStatementSuppliers/",{eaId:n})},t.prototype.getCountiesByCountryId=function(n){return this.GET(this.api+"/GetCountiesByCountryId/",{countryId:n})},t.prototype.getCitiesByCountyId=function(n){return this.GET(this.api+"/GetCitiesByCountyId/",{countyId:n})},t.prototype.getSysOperationModule=function(){return this.GET(this.api+"/GetSysOperationModule/")},t.prototype.getProcedureDocuments=function(n){return this.GET(this.api+"/GetProcedureDocuments/",{procedureId:n})},t.prototype.getSysSubcontractObligs=function(){return this.GET(this.api+"/GetSysSubcontractObligations/")},t.prototype.getSysSubcontractIndics=function(){return this.GET(this.api+"/GetSysSubcontractIndications/")},t.prototype.getSysEformsField=function(){return this.GET(this.api+"/GetSysEformsField/")},t.prototype.getNoticeType=function(n,t){return this.GET(this.api+"/GetNoticeType/?noticeId="+n+"&isDfNotice="+t)},t.prototype.GetEformsFieldInfo=function(n,t){return this.GET(this.api+"/GetEformsFieldInfo/?sysEformsFieldId="+n+"&noticeId="+t)},t.prototype.getNutsCodeByCountyId=function(n){return this.GET(this.api+"/GetNutsCodeByCountyId/",{countyId:n})},t.prototype.getNutsCodes=function(){return this.GET(this.api+"/GetNutsCodes/")},t.prototype.getSysNoticeDocDecisionType=function(n){return this.GET(this.api+"/GetSysNoticeDocumentDecisionTypes/?sysNoticeDocumentDecisionTypesId="+n)},t.prototype.getSysPartGuaranteeSetup=function(){return this.GET(this.api+"/getSysPartGuaranteeSetup/")},t.$inject=["$http","$q"],t}(n.HttpApi);n.ComboApi=t;angular.module("app.sys").service("ComboApi",t)}(sys||(sys={})),function(){"use strict";var t=function(){function n(){typeof config!="undefined"&&(this.cfg=config)}return n.prototype.gettime=function(){return 100},n}(),n;angular.module("app.sys").service("configService",t);n=function(){function n(n,t){var i=this;this.api=n;this.current=new Date;this.clientOffsetMs=0;n.getServerTime().then(function(n){console.log("TIME2");var r=new Date,u=r.getTime()-new Date(n).getTime();i.clientOffsetMs=u;t(function(){i.tick()},1e3)})}return n.prototype.tick=function(){var n=this,t=new Date((new Date).getTime()-this.clientOffsetMs);Math.abs(t.getTime()-this.current.getTime())>2e3&&!this.isLoading?(this.isLoading=!0,console.log("start sync"),this.api.getServerTime().then(function(t){var i=new Date,r=i.getTime()-new Date(t).getTime();n.clientOffsetMs=r;n.current=new Date(t);n.isLoading=!1;console.log("end sync")},function(){n.isLoading=!1})):this.current=t},n.$inject=["TimeApi","$interval"],n}();angular.module("app.sys").service("time",n)}(sys||(sys={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){"use strict";var r=function(){function n(n,t,i){this.$q=n;this.svc=t;this.api=i;this.isInitialized=!1;this.scriptsMin=["/assets/min/forge-master.min.js"];this.scripts=["/scripts/forge-master/js/debug.js","/scripts/forge-master/js/util.js","/scripts/forge-master/js/log.js","/scripts/forge-master/js/task.js","/scripts/forge-master/js/md5.js","/scripts/forge-master/js/sha1.js","/scripts/forge-master/js/sha256.js","/scripts/forge-master/js/cipher.js","/scripts/forge-master/js/cipherModes.js","/scripts/forge-master/js/hmac.js","/scripts/forge-master/js/pbkdf2.js","/scripts/forge-master/js/aes.js","/scripts/forge-master/js/pem.js","/scripts/forge-master/js/asn1.js","/scripts/forge-master/js/jsbn.js","/scripts/forge-master/js/prng.js","/scripts/forge-master/js/random.js","/scripts/forge-master/js/oids.js","/scripts/forge-master/js/rsa.js","/scripts/forge-master/js/pbe.js","/scripts/forge-master/js/x509.js","/scripts/forge-master/js/pki.js","/scripts/forge-master/js/tls.js","/scripts/forge-master/js/aesCipherSuites.js","/scripts/forge-master/js/des.js","/scripts/forge-master/js/pkcs7.js","/scripts/forge-master/js/pkcs7asn1.js",]}return n.prototype.encryptLotString=function(n,t){var i=this;return this.init().then(function(){return i.getPublicCert(t)}).then(function(){return i.encrypt(n)})},n.prototype.encryptLotFile=function(n,t){var i=this,r=this.$q.defer(),u=this.init().then(function(){return i.getPublicCert(t)}).then(function(){return i.readFileContent(n)}).then(function(n){return i.encryptBig(n)}).then(function(t){t.fileName=n.name;r.resolve(t)});return r.promise},n.prototype.getPublicCert=function(n){var i=this,t=this.$q.defer();return this.api.getEncryptOfferPublicCert(n).then(function(n){i.pemPublicCert=n;t.resolve(n)}),t.promise},n.prototype.encrypt=function(n){var u=this,i=this.$q.defer(),t,r;try{t=forge.pkcs7.createEnvelopedData();t.encryptedContent.algorithm=forge.pki.oids["des-EDE3-CBC"];t.addRecipient(forge.pki.certificateFromPem(u.pemPublicCert));t.content=new forge.util.ByteBuffer(n);t.encrypt();r=forge.pkcs7.messageToPem(t);i.resolve(r)}catch(f){i.reject("Crypto.encrypt() error: "+f)}return i.promise},n.prototype.encryptBig=function(n){var f=this,i=this.$q.defer(),t,r,u;try{t=forge.pkcs7.createEnvelopedData();t.encryptedContent.algorithm=forge.pki.oids["des-EDE3-CBC"];t.addRecipient(forge.pki.certificateFromPem(f.pemPublicCert));t.content=new forge.util.ByteBuffer(n);t.encrypt();r=forge.pkcs7.messageToPem(t);u={fileName:"",content:r};i.resolve(u)}catch(e){i.reject("Crypto.encryptBig() error: "+e)}return i.promise},n.prototype.readFileContent=function(n){var t=this.$q.defer(),i=new FileReader,r;return i.onload=function(n){var i=n.target;i.readyState==2&&t.resolve(i.result)},r=i.readAsArrayBuffer(n),t.promise},n.prototype.uint8ToString=function(n){for(var i="",t=0,r=n.length;t<r;t+=1)i+=String.fromCharCode(n[t]);return i},n.prototype.ab2str=function(n){return String.fromCharCode.apply(null,new Uint16Array(n))},n.prototype.str2ab=function(n){for(var i=new ArrayBuffer(n.length*2),r=new Uint16Array(i),t=0,u=n.length;t<u;t++)r[t]=n.charCodeAt(t);return i},n.prototype.encodeASCII=function(n){for(var i=[],t=0;t<n.length;++t)i.push(n.charCodeAt(t));return i},n.prototype.test_p7m=function(){var n=this;this.init().then(function(){var t,i,r;try{t=forge.pkcs7.createEnvelopedData();t.encryptedContent.algorithm=forge.pki.oids["des-EDE3-CBC"];i=forge.pki.certificateFromPem(n.pemPublicCert);t.addRecipient(i);t.content=new forge.util.ByteBuffer("the price");t.encrypt();r=forge.pkcs7.messageToPem(t)}catch(u){}})},n.prototype.init=function(){var t=this,n,r;return t.isInitialized?(n=this.$q.defer(),n.resolve(),n.promise):(r=i.loadScripts(t.scriptsMin).load(),this.$q.all([r]).then(function(){}))},n.$inject=["$q","svc","CryptoApi"],n}(),i=function(){function n(){}return n.loadScripts=function(n){return{load:function(){var t=$.Deferred();return t.resolve(),n.forEach(function(n){t=t.then(function(){return $.getScript(n,function(){})})}),t.then(function(){console.info("scriptLoader completed")}),t.promise()}}},n}(),t;n.DependencyScriptLoader=i;t=function(n){function t(t,i){n.call(this,t,i);this.api="api/crypto"}return __extends(t,n),t.prototype.getEncryptOfferPublicCert=function(n){return this.GET("api-pub/PUBLICProcedure/getEncryptOfferPublicCert/",{lotId:n})},t.prototype.testDecryptPrice=function(n){return this.POST(this.api+"/TestDecryptPrice/",n)},t.$inject=["$http","$q"],t}(n.HttpApi);n.CryptoApi=t;angular.module("app.sys").service("CryptoApi",t);angular.module("app.sys").service("crypto",r)}(sys||(sys={})),function(){"use strict";var n=function(){function n(){}return n.prototype.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})},n}();angular.module("app.sys").service("guidService",n)}(sys||(sys={})),function(n){"use strict";var i=function(){function i(n,i,r){this.$http=i;this.$q=r;this.loadedModules=[];n.locale=n.locale||{};this.rootSc=n;this.accessor=new t(this)}return i.prototype.isCurrentLanguageRomanian=function(){return n.cultureUtils.current=="ro-RO"},Object.defineProperty(i.prototype,"key",{get:function(){return this.rootSc.locale},enumerable:!0,configurable:!0}),i.prototype.getDictionary=function(){return this.refresh(),this.rootSc.locale},i.prototype.dictionaryPromise=function(){return this.promise},i.prototype.refresh=function(){typeof locale!="undefined"&&typeof locale.dictionary!="undefined"&&typeof locale.dictionary.translations!="undefined"&&(this.rootSc.locale=locale.dictionary.translations)},Object.defineProperty(i.prototype,"data",{get:function(){return this.accessor},enumerable:!0,configurable:!0}),i.prototype.loadModule=function(n){var r=this,t=this.$q.defer(),i;return r.loadedModules.some(function(t){return t===n})?(t.resolve(),t.promise):(i={},i.localeModuleId=n,i.pageIndex=0,i.pageSize=500,this.$http.get("api-pub/sysLocaleKey/getAll",{params:i}).then(function(i){var u={};angular.forEach(i.data.items,function(n){u[n.localeKeyName]=n.translation});jQuery.extend(!0,locale.dictionary.translations,u);r.refresh();r.loadedModules.some(function(t){return t===n})||r.loadedModules.push(n);t.resolve()},function(n){t.reject(n)}),t.promise)},i}(),t=function(){function n(n){this.locale=n}return Object.defineProperty(n.prototype,"Common_Label_Home",{get:function(){return this.locale.key["Common.Label.Home"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Label_Help",{get:function(){return this.locale.key["Common.Label.Help"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_Info",{get:function(){return this.locale.key["Common.Info.Info"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_Warn",{get:function(){return this.locale.key["Common.Info.Warn"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_Error",{get:function(){return this.locale.key["Common.Info.Error"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_SaveSuccess",{get:function(){return this.locale.key["Common.Info.SaveSuccess"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_ConfirmDelete",{get:function(){return this.locale.key["Common.Info.ConfirmDelete"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_NoResults",{get:function(){return this.locale.key["Common.Info.NoResults"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Common_Info_MaxDisplayedItemsForInfiniteScroll",{get:function(){return this.locale.key["Common.Info.MaxDisplayedItemsForInfiniteScroll"]},enumerable:!0,configurable:!0}),n}();n.LocaleData=t;angular.module("app.sys").service("locale",["$rootScope","$timeout","$q","$http",function(n,t,r,u){var f=new i(n,u,r),e=$.Deferred();return e.promise(f),e.resolve(f.getDictionary()),f}])}(sys||(sys={})),function(){"use strict";var n=function(){function n(n){this.LogApi=n;toastr.options.positionClass="toast-top-center toast-top-full-width";toastr.options.showMethod="fadeIn";toastr.options.hideMethod="fadeOut";toastr.options.hideEasing="linear";toastr.options.showDuration=400;toastr.options.hideDuration=1e3}return n.prototype.log=function(){},n.prototype.info=function(){},n.prototype.infoMessage=function(n){toastr.warning(n)},n.prototype.errorMessage=function(n){toastr.error(n)},n.prototype.successMessage=function(n){toastr.success(n)},n.prototype.warn=function(){},n.prototype.error=function(){},n.$inject=["LogApi"],n}();angular.module("app.sys").service("log",n)}(sys||(sys={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){"use strict";var i=function(){function t(t,i,r,u,f,e,o,s){var h=this;this.$scope=t;this.$rootScope=i;this.$location=r;this.$window=u;this.configService=f;this.userService=e;this.locale=o;this.homeLabel="Acasa";this.menuTitleFull="MENIU PRINCIPA;";this.menuTitleCompact="MENIU";this.showlogo=!0;this.isCompact=!0;e.currentUser&&(this.showlogo=!1);app.PUB.isRunning?s.getPublicMenu().then(function(t){h.configService.cfg.DemoEnvironmentRegistration?(h.menu=[],t.forEach(function(n){n.menuEntryCode!="DownloadCertificate"&&h.menu.push(n)})):h.menu=t;n.TheMenu.setMenu(h.menu)}):s.getMenu().then(function(t){h.menu=t;n.TheMenu.setMenu(h.menu)})}return t.prototype.doLocaleStuff=function(){this.homeLabel=this.locale.key["Common.Label.Home"];this.menuTitleFull=this.locale.key["Common.Label.MenuTitleFull"];this.menuTitleCompact=this.locale.key["Common.Label.MenuTitleCompact"]},t.prototype.home=function(){var n=this.configService.cfg.base+"pub",t=this.userService.currentUser;if(t!=null)switch(t.entity.entityType){case 1:n=this.configService.cfg.basePrv+"seap/home";break;case 2:n=this.configService.cfg.basePrv+"ca/home";break;case 3:n=this.configService.cfg.basePrv+"su/home";break;case 4:n=this.configService.cfg.basePrv+"mon/home"}window.location.href=n},t.prototype.navigate=function(n){if(n.menuEntryUrl&&n.menuEntryUrl=="/doxlite")return this.$window.open("/doxlite","_blank"),!1;n.menuEntryUrl&&n.menuEntryUrl!="#"&&(app.PUB.isRunning?window.location.href=n.menuEntryUrl:this.$location.path(n.menuEntryUrl))},t.prototype.goToDownloadCertif=function(n){n.menuEntryCode!=="DownloadCertificate"||this.configService.cfg.DemoEnvironmentRegistration||window.open(this.configService.cfg.cdsUrl,"_blank")},t.prototype.getMenuItemClass=function(n){if(n)switch(n.menuEntryCode){case"InitNotice":return"sprite-sicap-initnotice";case"AwardProceduresTitle":return"sprite-sicap-awardprocedures";case"AwardProceduresSEAP":return"sprite-sicap-awardprocedures";case"AwardProceduresAC":return"sprite-sicap-awardprocedures";case"AwardProcedures":return"sprite-sicap-awardprocedures";case"AwardProceduresPub":return"sprite-sicap-awardprocedures";case"GrantNotice":return"sprite-sicap-awardprocedures";case"DirectAquisitions":return"sprite-sicap-directaquisitions";case"Admin":return"sprite-sicap-admin";case"SystemAdministration":return"sprite-sicap-admin";case"AdministrationPublicInformation":return"sprite-sicap-admin2";case"GroupsNotifications":return"sprite-sicap-admin";case"Notifications":return"sprite-sicap-notification";case"Dictionaries":return"sprite-sicap-dictionaries";case"Contracts":return"sprite-sicap-contracts";case"Payments":return"sprite-sicap-payments";case"OJEU":return"sprite-sicap-ojeu";case"MyAccount":return"sprite-sicap-account";case"Reports":return"sprite-sicap-reports";case"ReportsShort":return"sprite-sicap-reports";case"UsefulLinks":return"sprite-sicap-usefullinks";case"Legal":return"sprite-sicap-legislation";case"ParticipantsList":return"sprite-sicap-participantslist";case"FAQ":return"sprite-sicap-frequentquestions";case"UsefulInformation":return"sprite-sicap-frequentquestions";case"Statistics":return"sprite-sicap-statistics";case"TermsAndConditions":return"sprite-sicap-termsandconditions";case"TechnicalRequirements":return"sprite-sicap-technicalreq";case"NewsArchive":return"sprite-sicap-newsarchive";case"DownloadCertificate":return"sprite-sicap-downloadcert";case"CostsForSuppliers":return"sprite-sicap-tarife";case"Contact":return"sprite-sicap-contact";case"Doxlite":return"sprite-sicap-contact";case"AwardProceduresOF":return"sprite-sicap-awardprocedures";case"NoticeHistory":return"sprite-sicap-noticehistory";case"Equipment":return"sprite-sicap-equipment"}return"fa-angle-right"},t.prototype.getCookieIsCompact=function(){return n.cookieUtils.readCookie("isCompact")},t.prototype.setCookieIsCompact=function(t){n.cookieUtils.createCookie("isCompact",t,1e3);this.isCompact=t},t.$inject=["$scope","$rootScope","$location","$window","configService","userService","locale","MenuEntryApi"],t}(),r=function(n){function t(t,i){n.call(this,t,i)}return __extends(t,n),t.prototype.getPublicMenu=function(){return this.GET("api-pub/MenuEntry/getPublicMenu/")},t.prototype.getMenu=function(){return this.GET("api-pub/MenuEntry/getMenu/")},t.$inject=["$http","$q"],t}(n.HttpApi),t=function(){function n(){this.isCompact=!0}return n}();n.SidebarSvc=t;angular.module("app.sys").service("SidebarSvc",t);angular.module("app.sys").service("MenuEntryApi",r).controller("menuController",i).directive("sidebarMenu",["svc","SidebarSvc",function(n,t){return{restrict:"E",replace:!0,scope:{},controller:"menuController",controllerAs:"menu",template:'<div id="sidebar" class="page-sidebar sidebar-fixed no-print"><div id="header-sidebar-menu" ng-if="menu.showlogo"><div class="menu-icon" id="mini-icon-menu"><\/div><div id="text-header-sidebar-menu"><span id="top-text" ng-class="{ \'mini-menu-top-text-s\':    menu.isCompact == true, \'mini-menu-top-text\':    menu.isCompact == false }">E - LICITATIE <\/span> <br><span id="bottom-text" ng-class="{ \'mini-menu-bottom-text-s hidden-xs\': menu.isCompact == true, \'mini-menu-bottom-text hidden-xs\': menu.isCompact == false }"> {{ menu.isCompact ? menu.menuTitleCompact : menu.menuTitleFull }}<\/span><\/div><\/div><div id="yellow-bar-sidebarmenu" ng-if="menu.showlogo"><\/div><div class="container-fixed" ><div class="container-fixed-child"><ul class="nav sidebar-menu"><li id="insubmenu2" ng-repeat="p in menu.menu"><a href="#" style="position:relative; padding-left:10px;" id="target1" class="menu-dropdown" ng-if="!p.children || p.children.length == 0" ng-click="menu.navigate(p)"><span style="float:left;" class="sicap sprite {{menu.getMenuItemClass(p)}}"><\/span><span style="float:left;cursor:pointer!important;" class="menu-text"> {{p.menuEntryName }} <\/span><i class="menu-expand"><\/i><\/a><a href="#" style="position:relative; padding-left:10px;" id="target1" class="menu-dropdown" ng-if="p.children && p.children.length > 0" ng-click="menu.goToDownloadCertif(p)"><span style="float:left;" class="sicap sprite {{menu.getMenuItemClass(p)}}"><\/span><span style="float:left;" class="menu-text"> {{p.menuEntryName }} <\/span><i class="menu-expand"><\/i><\/a><ul id="target2" class="submenu"><li class="submenu-link" ng-repeat="c in p.children"><a href="#" ng-class="{\'demo-env-disabled\': c.menuEntryUrl == \'#\'}" id="insubmenu" ng-click="menu.navigate(c)"><span class="menu-text" > {{c.menuEntryName }}<\/span><\/a><\/li> <\/ul><\/li><\/ul><\/div><\/div><div id="collapse-hide"><a class="btn m-collapse" style="z-index:99999; margin-left:5px; width: 42px;" ng-href="#" id="sidebar-collapse-bottom"> &nbsp; <i class="menu-icon fa" ng-class="{ \'fa-angle-right\': menu.isCompact == true, \'fa-angle-left\': menu.isCompact == false }"><\/i><span class="menu-text"> <\/span><\/a><\/div><\/div><\/div>',link:function(n,i,r,u){u.doLocaleStuff();var f=!0,e=u.getCookieIsCompact();e==null?u.setCookieIsCompact(f):f=e=="true";t.isCompact=f;u.isCompact=f;n.$watch(function(){return t.isCompact},function(){angular.element("#sidebar").toggleClass("menu-compact");f=angular.element("#sidebar").hasClass("menu-compact");u.setCookieIsCompact(f);f&&$(".open > .submenu").removeClass("open")});n.$watch(function(){angular.element("a#insubmenu").click(function(){f||angular.element("#sidebar").addClass("menu-compact")})});angular.element("#sidebar-collapse-bottom").bind("click",function(){angular.element("#sidebar").toggleClass("menu-compact");f=angular.element("#sidebar").hasClass("menu-compact");u.setCookieIsCompact(f);f&&$(".open > .submenu").removeClass("open")});angular.element("#sidebar-collapse-home").bind("click",function(){angular.element("#sidebar").toggleClass("menu-compact");f=angular.element("#sidebar").hasClass("menu-compact");u.setCookieIsCompact(f);f&&$(".open > .submenu").removeClass("open")});i.on("click",function(n){var t=$(n.target).closest("a"),r,i,u;if(t&&t.length!=0){if(!t.hasClass("menu-dropdown"))return f&&t.get(0).parentNode.parentNode==this&&(r=t.find(".menu-text").get(0),n.target!=r&&!$.contains(r,n.target))?!1:void 0;if(i=t.next().get(0),!$(i).is(":visible")){if(u=$(i.parentNode).closest("ul"),f&&u.hasClass("sidebar-menu"))return;u.find("> .open > .submenu").each(function(){this==i||$(this.parentNode).hasClass("active")||$(this).slideUp(200).parent().removeClass("open")})}return f&&$(i.parentNode.parentNode).hasClass("sidebar-menu")?!1:($(i).slideToggle(200).parent().toggleClass("open"),!1)}})}}}])}(sys||(sys={})),function(n){"use strict";var t=function(){function t(n,t,i,r){this.$rootScope=n;this.$timeout=t;this.log=i;this.locale=r}return t.prototype.showSuccessAndNavigateBack=function(){window.history.back()},t.prototype.checkUploadedFiles=function(n,t,i,r,u){var o="Invalid file type",s="Accepted Extensions",f,e;return(u.isCurrentLanguageRomanian()&&(o="Tip fisier invalid",s="Extensii acceptate"),f="File is too large",u.isCurrentLanguageRomanian()&&(f="Fisierul are dimensiune prea mare"),this.clearValidationErrors(),e=r.checkUploadedFiles(n,t,i),e==-1)?(this.showErrorMessage(o+": "+r.lastCheckedFile+" <br /> "+s+": "+t.join(",")),!1):e==-2?(this.showErrorMessage(f+": "+r.lastCheckedFile),!1):!0},t.prototype.checkUploadedFilesAny=function(n,t,i,r,u){var o="Invalid file type",s="Accepted Extensions",f,e;return(u.isCurrentLanguageRomanian()&&(o="Tip fisier invalid",s="Extensii acceptate"),f="File is too large",u.isCurrentLanguageRomanian()&&(f="Fisierul are dimensiune prea mare"),e=r.checkUploadedFilesAny(n,t,i),e==-1)?(this.showErrorMessage(o+": "+r.lastCheckedFile+" <br /> "+s+": "+t.join(",")),!1):e==-2?(this.showErrorMessage(f+": "+r.lastCheckedFile),!1):!0},t.prototype.checkUploadedFile=function(n,t,i,r,u){var o="Invalid file type",s="Accepted Extensions",f,e;return(u.isCurrentLanguageRomanian()&&(o="Tip fisier invalid",s="Extensii acceptate"),f="File is too large",u.isCurrentLanguageRomanian()&&(f="Fisierul are dimensiune prea mare"),e=r.checkUploadedFile(n,t,i),e==-1)?(this.showErrorMessage(o+": "+r.lastCheckedFile+" <br /> "+s+": "+t.join(",")),!1):e==-2?(this.showErrorMessage(f+": "+r.lastCheckedFile),!1):!0},t.prototype.confirmWithoutReject=function(n,t){var r=$.Deferred(),i="wnd_"+this.newGuid(),u=i+"_btnOk",f=i+"_btnCancel",e='<div id="'+i+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+u+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+"<\/button><\/div><\/div>";return $(e).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"400px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();r.resolve(!1)}}),$("#"+i).data("kendoWindow").center().open(),$("#"+u).click(function(){r.resolve(!0);$("#"+i).data("kendoWindow").close()}),$("#"+f).click(function(){r.resolve(!1);$("#"+i).data("kendoWindow").close()}),r.promise(null)},t.prototype.confirm=function(n,t){var r=$.Deferred(),i="wnd_"+this.newGuid(),u=i+"_btnOk",f=i+"_btnCancel",e='<div id="'+i+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+u+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+'<\/button><button id="'+f+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+this.locale.key["Common.Label.Action_Cancel"]+"<\/button><\/div><\/div>";return $(e).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"400px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();r.resolve(!1)}}),$("#"+i).data("kendoWindow").center().open(),$("#"+u).click(function(){r.resolve(!0);$("#"+i).data("kendoWindow").close()}),$("#"+f).click(function(){r.resolve(!1);$("#"+i).data("kendoWindow").close()}),r.promise(null)},t.prototype.confirmLarge=function(n,t){var r=$.Deferred(),i="wnd_"+this.newGuid(),u=i+"_btnOk",f=i+"_btnCancel",e='<div id="'+i+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+u+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+'<\/button><button id="'+f+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+this.locale.key["Common.Label.Action_Cancel"]+"<\/button><\/div><\/div>";return $(e).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"600px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();r.resolve(!1)}}),$("#"+i).data("kendoWindow").center().open(),$("#"+u).click(function(){r.resolve(!0);$("#"+i).data("kendoWindow").close()}),$("#"+f).click(function(){r.resolve(!1);$("#"+i).data("kendoWindow").close()}),r.promise(null)},t.prototype.confirmCustom=function(n,t,i,r){var f=$.Deferred(),u="wnd_"+this.newGuid(),e=u+"_btnOk",o=u+"_btnCancel",s='<div id="'+u+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+e+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+i+'<\/button><button id="'+o+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+r+"<\/button><\/div><\/div>";return $(s).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"400px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();f.resolve(!1)}}),$("#"+u).data("kendoWindow").center().open(),$("#"+e).click(function(){f.resolve(!0);$("#"+u).data("kendoWindow").close()}),$("#"+o).click(function(){f.resolve(!1);$("#"+u).data("kendoWindow").close()}),f.promise(null)},t.prototype.confirmNoCancel=function(n,t,i){var u=$.Deferred(),r="wnd_"+this.newGuid(),f=r+"_btnOk",e='<div id="'+r+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+f+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+i+"<\/button><\/div><\/div>";return $(e).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"400px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();u.resolve(!1)}}),$("#"+r).data("kendoWindow").center().open(),$("#"+f).click(function(){u.resolve(!0);$("#"+r).data("kendoWindow").close()}),u.promise(null)},t.prototype.confirmCustomPAAP=function(n,t,i,r){var f=$.Deferred(),u="wnd_"+this.newGuid(),e=u+"_btnOk",o=u+"_btnCancel",s='<div id="'+u+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><div class="row"><div class="col-md-6" align="left"><button id="'+e+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+i+'<\/button><\/div><div class="col-md-6" align="right"><button id="'+o+'" class="btn btn-danger btn-xs"><i class="fa fa-times"><\/i>'+r+"<\/button><\/div><\/div><\/div>";return $(s).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"600px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();f.resolve(!1)}}),$("#"+u).data("kendoWindow").center().open(),$("#"+e).click(function(){f.resolve(!0);$("#"+u).data("kendoWindow").close()}),$("#"+o).click(function(){f.resolve(!1);$("#"+u).data("kendoWindow").close()}),f.promise(null)},t.prototype.confirmCustomANAP=function(n,t,i,r,u,f,e,o,s){var c=$.Deferred(),h="wnd_"+this.newGuid(),l=h+"_btnOk",a=h+"_btnCancel",v='<div id="'+h+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><span style="background-color: yellow; color: black">'+f+'<\/span><span class="seg" style="font-size: 14px; color:#000;">'+i+'<\/span><span style="font-size:14px;font-weight:bold;color:black">'+o+'<\/span><span class="seg" style="font-size: 14px; color:#000;">'+r+'<\/span><span style="background-color: yellow; color: black">'+e+'<\/span><span style="font-size:14px;font-weight:bold;color:black">'+s+'<\/span><span class="seg" style="font-size: 14px; color:#000;">'+u+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+l+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+'<\/button><button id="'+a+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+this.locale.key["Common.Label.Action_Cancel"]+"<\/button><\/div><\/div>";return $(v).appendTo("body").kendoWindow({resizable:!0,visible:!1,width:"700px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();c.resolve(!1)}}),$("#"+h).data("kendoWindow").center().open(),$("#"+l).click(function(){c.resolve(!0);$("#"+h).data("kendoWindow").close()}),$("#"+a).click(function(){c.resolve(!1);$("#"+h).data("kendoWindow").close()}),c.promise(null)},t.prototype.confirmCustomExAnte=function(n,t,i,r){var f=$.Deferred(),u="wnd_"+this.newGuid(),e=u+"_btnOk",o=u+"_btnCancel",s='<div id="'+u+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><br/><br/><span class="seg" style="font-size: 14px; color:#000;">'+i+'<\/span><br/><br/><span class="seg" style="font-size: 14px; color:#000;">'+r+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+e+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+'<\/button><button id="'+o+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+this.locale.key["Common.Label.Action_Cancel"]+"<\/button><\/div><\/div>";return $(s).appendTo("body").kendoWindow({resizable:!0,visible:!1,width:"700px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();f.resolve(!1)}}),$("#"+u).data("kendoWindow").center().open(),$("#"+e).click(function(){f.resolve(!0);$("#"+u).data("kendoWindow").close()}),$("#"+o).click(function(){f.resolve(!1);$("#"+u).data("kendoWindow").close()}),f.promise(null)},t.prototype.confirmCustomEquipmentRegistry=function(n,t,i,r){var f=$.Deferred(),u="wnd_"+this.newGuid(),e=u+"_btnOk",o=u+"_btnCancel",s='<div id="'+u+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+e+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+i+'<\/button><button id="'+o+'" class="btn btn-danger btn-xs"><i class="fa fa-times"><\/i>'+r+"<\/button><\/div><\/div>";return $(s).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"500px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();f.resolve(!1)}}),$("#"+u).data("kendoWindow").center().open(),$("#"+e).click(function(){f.resolve(!0);$("#"+u).data("kendoWindow").close()}),$("#"+o).click(function(){f.resolve(!1);$("#"+u).data("kendoWindow").close()}),f.promise(null)},t.prototype.confirmCustomEquipmentRegistryNoCancel=function(n,t,i){var u=$.Deferred(),r="wnd_"+this.newGuid(),f=r+"_btnOk",e=r+"_btnCancel",o='<div id="'+r+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+f+'" class="btn btn-blue btn-xs"><i class="fa fa-edit"><\/i>'+i+"<\/button><\/div><\/div>";return $(o).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"500px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();u.resolve(!1)}}),$("#"+r).data("kendoWindow").center().open(),$("#"+f).click(function(){u.resolve(!0);$("#"+r).data("kendoWindow").close()}),$("#"+e).click(function(){u.resolve(!1);$("#"+r).data("kendoWindow").close()}),u.promise(null)},t.prototype.inputBox=function(n,t){var r=$.Deferred(),i="wnd_"+this.newGuid(),u=i+"_btnOk",f=i+"_btnCancel",e=i+"_inputText",o='<div id="'+i+'"><div class="padding-10"><span class="k-icon k-warning"><\/span> <span class="seg" style="font-size: 14px; color:#000;">'+t+'<\/span><\/div><div style="clear:both;"><\/div><div class="padding-10"><input type=\'text\' id="'+e+'"  style="width:100%;" /><\/div><div style="clear:both;"><\/div><div class="modal-footer"><button id="'+u+'" class="btn btn-palegreen btn-xs"><i class="fa fa-check"><\/i>'+this.locale.key["Common.Info.Confirm"]+'<\/button><button id="'+f+'" class="btn btn-default btn-xs"><i class="fa fa-times"><\/i>'+this.locale.key["Common.Label.Action_Cancel"]+"<\/button><\/div><\/div>";return $(o).appendTo("body").kendoWindow({resizable:!1,visible:!1,width:"400px",title:n==null?"Atentie":n,modal:!0,actions:["Close"],close:function(){this.destroy();r.resolve(!1)}}),$("#"+i).data("kendoWindow").center().open(),$("#"+u).click(function(){var n=$("#"+e).val();r.resolve(n);$("#"+i).data("kendoWindow").close()}),$("#"+f).click(function(){r.resolve(null);$("#"+i).data("kendoWindow").close();r.resolve(null)}),r.promise(null)},t.prototype.showSuccessMessage=function(){return this.showMessage("Success","Inregistrarea a fost salvata cu succes")},t.prototype.showInfoMessage=function(n){return this.showMessage("Info",n)},t.prototype.showInfoMessageLong=function(n){return this.showMessageLong("Info",n)},t.prototype.showErrorMessage=function(n){return this.showMessage("Error",n)},t.prototype.showSuccessMessages=function(n){return this.showMessage("Success",n)},t.prototype.showDownloadLink=function(n,t){var i=this,u='<a target="_blank" id="downArchive" class="btn btn-entity shutter-out-vertical white" href="api/files/temp/'+n+"/"+t+'/"><i class="fa fa-download"><\/i><span class="hidden-xs">'+locale.dictionary.translations["Procedure.Label.Download"]+"<\/span> <\/a>",r="api/files/temp/"+n+"/"+t+"/";i.$rootScope.archivelink=r},t.prototype.showMessage=function(n,t){var i=$.Deferred();switch(n){case"Info":this.log.infoMessage(t);break;case"Error":this.log.errorMessage(t);break;case"Success":this.log.successMessage(t);break;default:this.log.infoMessage(t)}return this.$timeout(function(){i.resolve(!0)},500),i.promise(null)},t.prototype.showMessageLong=function(n,t){var i=$.Deferred();switch(n){case"Info":this.log.infoMessage(t);break;case"Error":this.log.errorMessage(t);break;case"Success":this.log.successMessage(t);break;default:this.log.infoMessage(t)}return this.$timeout(function(){i.resolve(!0)},2e3),i.promise(null)},t.prototype.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})},t.prototype.showKendoModalDialogFromDiv=function(n,t){var u={draggable:!1,resizable:!1,width:"550px",height:"400px",title:n,iframe:!0,modal:!0,visible:!1,scrollable:!0,actions:["Close",]},i=$(t),r;i.data("kendoWindow")||(i.kendoWindow(u),r=i.data("kendoWindow"),r.center(),r.open())},t.prototype.showKendoModalDialog=function(n,t,i){var f={draggable:!1,resizable:!1,width:"550px",height:"400px",title:n,content:t,iframe:!0,modal:!0,visible:!1,scrollable:!0,actions:["Close",]},u=$("#modalDialog"),r;u.kendoWindow(f);r=u.data("kendoWindow");i||r.content(t);r.center();r.open()},t.prototype.clearValidationErrors=function(){this.showValidationResult(null)},t.prototype.showValidationResult=function(n){var t=this;t.$rootScope.validationErrors=[];(n==null||angular.isArray(n))&&t.$timeout(function(){if(t.$rootScope.validationErrors=[],n)for(var i=0;i<n.length;i++)t.$rootScope.validationErrors.push(n[i])})},t.prototype.showValidationResult_Decode=function(n){var i=new TextDecoder,t;n!=null&&(t=i.decode(n),this.showErrorMessage(t.slice(2,t.length-2)))},t.prototype.close=function(){this.$rootScope.$broadcast("message-box:close")},t.prototype.openHelpWin=function(t){var i;try{var f=config.helpBaseUrl,e=n.cultureUtils.current=="ro-RO"?"ro":"en",r=f+e+"/"+t,o={draggable:!0,resizable:!0,width:"1200px",height:"700px",title:"Help",content:{url:r,iframe:!0},url:r,iframe:!0,modal:!0,visible:!1,scrollable:!0,actions:["Close"]},u=$("#modalDialog");u.kendoWindow(o);i=u.data("kendoWindow");i.center();i.open()}catch(s){console.log(s)}},t.$inject=["$rootScope","$timeout","log","locale"],t}();angular.module("app.sys").service("modalService",t)}(sys||(sys={})),function(n){var r=function(){function t(t,i,r,u,f,e){var o=this;this.$location=t;this.$rootScope=i;this.$templateCache=r;this.$route=u;this.configService=f;this.userService=e;this.lastPath="";this.filterId=0;this.filterName="";this._backroute=null;this._backParams=[];this.getFilter=function(){return this.filterId};this.getFilterName=function(){return this.filterName};this.hasFilter=function(){return this.filterId>0};this.hasPreviousPath=function(){return this.lastPath===""||this.lastPath.lenght==0};this.homePage=function(){var t=o.userService.currentUser;t?(t.entity.entityType>4&&(window.location.href=n.prv.routes.SEAP.Dashboard_Mon.route),t.entity.entityType===2&&(window.location.href=n.prv.routes.CA.Dashboard_Ca.route),t.entity.entityType===3&&(window.location.href=n.prv.routes.SU.Dashboard_Su.route),t.entity.entityType===1&&(window.location.href=n.prv.routes.SEAP.Dashboard_Seap.route)):window.location.href=n.pub.routes.home.route}}return t.prototype.setNoticeNumberFilter=function(n){this.noticeNoFilter=n},t.prototype.getNoticeNumberFilter=function(){return this.noticeNoFilter},t.prototype.setRequestFilter=function(n){this.requestFilter=n},t.prototype.getRequestFilter=function(){return this.requestFilter},t.prototype.setEntityFilter=function(n){this.entityFilter=n},t.prototype.getEntityFilter=function(){return this.entityFilter},t.prototype.setBackRoute=function(n){this._backroute=n},t.prototype.setBackRouteWithParams=function(n,t){this._backroute=n;this._backParams=t},t.prototype.getBackRouteAndReset=function(){var n=this._backroute;return this._backroute=null,n},t.prototype.getBackParams=function(){return this._backParams},t.prototype.getBackParamsAndReset=function(){var n=this._backParams;return this._backParams=[],n},t.prototype.getBackRoute=function(){return this._backroute},t.prototype.setFilter=function(n,t){this.filterId=n;this.filterName=t},t.prototype.setPreviousPath=function(n){this.lastPath=n},t.prototype.path=function(n){this.$location.path(n.route)},t.prototype.pathWithParam=function(n,t){var i=n.route.replace(":id",t);this.$location.path(i)},t.prototype.pathWithNamedParam2=function(n,t,i,r,u){var f=n.route.replace(t,i).replace(r,u);this.$location.path(f)},t.prototype.pathWithNamedParam3=function(n,t,i,r,u,f,e){var o=n.route.replace(t,i).replace(r,u).replace(f,e);this.$location.path(o)},t.prototype.pathWithNamedParam4=function(n,t,i,r,u,f,e,o,s){var h=n.route.replace(t,i).replace(r,u).replace(f,e).replace(o,s);this.$location.path(h)},t.prototype.pathWithNullableParam=function(n,t){(t==null||typeof t=="undefined")&&(t="");var i=n.route.replace(":id?",t);this.$location.path(i)},t.prototype.location=function(n){window.location.href=n.route},t.prototype.locationWithParam=function(n,t){var i=n.route.replace(":id",t);window.location.href=i},t.prototype.locationWithNullableParam=function(n,t){(t==null||typeof t=="undefined")&&(t="");var i=n.route.replace(":id?",t);window.location.href=i},t.prototype.locationWithNamedParam=function(n,t,i){var r=n.route.replace(t,i);window.location.href=r},t.prototype.locationWithNamedParam2=function(n,t,i,r,u){var f=n.route.replace(t,i).replace(r,u);window.location.href=f},t.prototype.locationForContractNoticeList=function(n,t,i){var r=n.route.replace(":noticeTypeId",t);r=r.replace(":resetFilter",i);window.location.href=r},t.prototype.pathWithParamNoHistorySave=function(n,t){var i=n.route.replace(":id",t);this.$location.path(i).replace()},t.prototype.pathWithNamedParam=function(n,t,i){var r=n.route.replace(t,i);this.$location.path(r)},t.prototype.pathWithParamSubsequentContract_NewVersion=function(n,t){var i=n.route.replace(":id",t).replace(":param","new-version");this.$location.path(i)},t.prototype.customPath=function(n){this.$location.path(n)},t.prototype.pathForRole=function(n,t,i){var r=angular.copy(n.route);r=r.replace(":idRole",t);r=r.replace(":idParent",i);this.$location.path(r)},t.prototype.pathForProcedure=function(n,t,i){var r=n.route.replace(":idProcedure",t);r=i>0?r.replace(":idProcedureLot?",i):r.replace(":idProcedureLot?","");this.$location.path(r)},t.prototype.pathForRebidProcedure=function(n,t,i,r){var u=n.route.replace(":idRebidProcedure",t);u=i>0?u.replace(":idProcedure?",i):u.replace(":idProcedure?","");u=r>0?u.replace(":idProcedureLot?",r):u.replace(":idProcedureLot?","");this.$location.path(u)},t.prototype.pathForContractNoticeList=function(n,t,i){var r=n.route.replace(":noticeTypeId",t);r=r.replace(":resetFilter",i);this.$location.path(r)},t.prototype.pathForDecisionList=function(n,t){var i=n.route.replace(":resetFilter",t);this.$location.path(i)},t.prototype.pathForEditProcedureStatement=function(n,t,i,r){var u=n.route.replace(":procedureId",t);u=i>0?u.replace(":procedureStatementId?",i):u.replace(":procedureStatementId?","");u=r?u.replace(":validate?","1"):u.replace(":validate?","");this.$location.path(u)},t.prototype.pathForNewSubsequentContract=function(n,t,i,r){var u=n.route.replace(":basecontractid",t).replace(":canoticeid",i).replace(":canoticecontractid",r);this.$location.path(u)},t.prototype.pathForContractTemplate=function(n,t){var i=n.route.replace(":dfid",t);this.$location.path(i)},t.prototype.pathWithParamWithRefresh=function(n,t){this.$templateCache.removeAll();var i=n.route.replace(":id",t);this.$location.path(i)},t.prototype.pathWithAddParam=function(n){var t=n.route.replace(":id","new");this.$location.path(t)},t.prototype.pathWithAddParamAndDaId=function(n,t){var i=n.route.replace(":id","new");i=i.replace(":daid",t);this.$location.path(i)},t.prototype.pathWithParamsModifNotice=function(n,t){var i=n.route.replace(":contractId",t);this.$location.path(i)},t.prototype.locationForSearch=function(n,t){var i=n.route.replace(":searchTerm",t);window.location.href=i},t.prototype.reload=function(){this.$route.reload()},t.prototype.historyBack=function(){window.history.back()},t.prototype.removeTemplateCache=function(){this.$templateCache.removeAll()},t.prototype.sysInfo=function(t){var i=this.$location.path().indexOf("/ca/")==0,r=this.$location.path().indexOf("/su/")==0,f=this.$location.path().indexOf("/seap/")==0,u=i?n.prv.routes.CA.SysInfo_Ca:r?n.prv.routes.SU.SysInfo_Su:n.prv.routes.SEAP.SysInfo_Seap;this.pathWithParam(u,t)},t.prototype.hash=function(n){this.$location.hash(n)},t.prototype.exitIfIsDemoEnvironment=function(){this.configService.cfg.DemoEnvironment&&this.homePage()},t.prototype.exitIfIsDemoEnvironmentRegistration=function(){this.configService.cfg.DemoEnvironmentRegistration&&this.homePage()},t.prototype.goToRequestInfo=function(t,i){var u=this.userService.currentUser,r,f;u?(u.entity.entityType>4&&(r=n.prv.routes.SEAP.REGISTER_SHOW_OPTIONS_MON.route),u.entity.entityType===2&&(r=n.prv.routes.CA.REGISTER_SHOW_OPTIONS_CA.route),u.entity.entityType===3&&(r=n.prv.routes.SU.REGISTER_SHOW_OPTIONS_SU.route)):r=n.pub.routes.REGISTER_SHOW_OPTIONS.route;f=r.replace(":id",t).replace(":guid",i);this.$location.path(f)},t.prototype.goToRequestSign=function(n,t,i){var r=n.replace(":id",t).replace(":guid",i);this.$location.path(r)},t.prototype.goToJAVA=function(){window.open("http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html","_blank")},t.prototype.goToHowToSignPub=function(){window.open("/pub/how-to-sign","_blank")},t.$inject=["$location","$rootScope","$templateCache","$route","configService","userService"],t}(),i,t;angular.module("app.sys").service("nav",r);i=function(){function n(n){this.$timeout=n}return n.prototype.execute=function(n){this.$timeout(n)},n.prototype.executeWithTimespan=function(n,t){this.$timeout(n,t)},n.$inject=["$timeout"],n}();angular.module("app.sys").service("timeout",i);t=function(){function t(t,i,r,u,f,e,o){var s=this;this.$location=t;this.authService=i;this.svc=r;this.$rootScope=u;this.cfgService=e;this.userService=o;this.navByMenuEntryCode=function(t){var i=n.TheMenu.getLinkByMenuEntryCode(t);s.$location.path(i)};u.$on("breadcrumbs:set",function(n,t){s.items=t})}return t.prototype.home=function(){var t=this.userService.currentUser,n;t?(n="",t.entity.entityType>=4&&(n="mon"),t.entity.entityType===2&&(n="ca"),t.entity.entityType===3&&(n="su"),t.entity.entityType===1&&(n="seap"),window.location.href=n!=""?this.cfgService.cfg.basePrv+n+"/home":this.cfgService.cfg.basePub+"pub"):window.location.href=this.cfgService.cfg.basePub+"pub"},t.$inject=["$location","authService","svc","$rootScope","$timeout","cfgService","userService"],t}();n.BreadcrumbsController=t;angular.module("app.controls").controller("breadcrumbsController",t)}(sys||(sys={})),function(){"use strict";var n=function(){function n(n,t,i,r,u,f,e,o,s){this.svc=t;this.$rootScope=i;this.$location=r;this.authService=u;this.locale=f;this.modalService=e;this.SidebarSvc=o;this.cfgService=s}return Object.defineProperty(n.prototype,"helpTitle",{get:function(){return this.locale.key["Common.Label.ContextualHelp"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"helpURL",{get:function(){return"/pub/login/"},enumerable:!0,configurable:!0}),n.prototype.changeLanguage=function(n){sys.cultureUtils.current=n;window.location.href=this.$location.absUrl()},n.prototype.navigateToManualAndVideoPageBase=function(){window.location.href=this.cfgService.cfg.basePub+"pub/archive/manual-and-video-archive/2"},n.prototype.navigateToAbsHome=function(){window.location.href=this.cfgService.cfg.basePub+"pub"},n.prototype.navigateToBaseLogin=function(){window.location.href=this.cfgService.cfg.basePrv+"pub/login"},n.prototype.navigateToBaseRegister=function(){window.location.href=this.cfgService.cfg.baseReg+"reg/options"},n.prototype.navigateToBaseDash=function(){var n=this.svc.userService.currentUser;if(n!=null)switch(n.entity.entityType){case 1:return window.location.href=this.cfgService.cfg.basePrv+"seap/home";case 2:return window.location.href=this.cfgService.cfg.basePrv+"ca/home";case 3:return window.location.href=this.cfgService.cfg.basePrv+"su/home";default:return window.location.href=this.cfgService.cfg.basePrv+"mon/home"}return"pub/login"},n.prototype.navigateToHome=function(){this.svc.nav.path(sys.pub.routes.home)},n.prototype.showLogin=function(){this.navigateToBaseLogin()},n.prototype.openHelp=function(){var n,r,t,i;try{var f=$("#view-title").text(),e=config.helpBaseUrl,u=$("#helpRelativePath").text();if(u=="")return;n=e+u;console.log("showhelp -> "+n);r={draggable:!0,resizable:!0,width:"1200px",height:"700px",title:f,content:{url:n,iframe:!0},url:n,iframe:!0,modal:!0,visible:!1,scrollable:!0,actions:["Close"]};t=$("#modalDialog");t.kendoWindow(r);i=t.data("kendoWindow");i.center();i.open()}catch(o){console.log(o)}},n.prototype.signOut=function(){this.authService.signOut()},n.prototype.editProfile=function(){var n=this.svc.userService.currentUser;if(n!=null)switch(n.entity.entityType){case 1:return window.location.href=this.cfgService.cfg.basePrv+"seap/profile";case 2:return window.location.href=this.cfgService.cfg.basePrv+"ca/profile";case 3:return window.location.href=this.cfgService.cfg.basePrv+"su/profile";default:return window.location.href=this.cfgService.cfg.basePrv+"mon/profile"}return"pub/profile"},n.prototype.toggleSidebar=function(){this.SidebarSvc.isCompact=!this.SidebarSvc.isCompact},n.prototype.search=function(){var n=this;n.searchTerm&&n.svc.nav.locationForSearch(sys.pub.routes.StaticPageSearchResults,encodeURIComponent(n.searchTerm))},n.prototype.searchinput_keyPress=function(n){var t=this;n.which==13&&t.search()},n.$inject=["$scope","svc","$rootScope","$location","authService","locale","modalService","SidebarSvc","cfgService"],n}();angular.module("app.sys").controller("NavbarController",n)}(ctrls||(ctrls={})),function(n){"use strict";var t=function(){function t(n,t){this.authService=n;this.$cookieStore=t}return Object.defineProperty(t.prototype,"currentUser",{get:function(){return this.authService.currentUser},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"culture",{get:function(){return n.cultureUtils.current},enumerable:!0,configurable:!0}),t.prototype.currentUserInEntity=function(n){return this.currentUser?this.currentUser.entity.entityType===n:!1},t.prototype.currentUserIsPub=function(){return this.currentUser==null},t.prototype.currentUserIsCa=function(){return this.currentUserInEntity(2)},t.prototype.currentUserIsAnrmap=function(){return this.currentUserInEntity(4)},t.prototype.currentUserIsSu=function(){return this.currentUserInEntity(3)},t.prototype.currentUserIsOf=function(){return this.currentUserInEntity(3)},t.prototype.currentUserIsSeap=function(){return this.currentUserInEntity(1)},t.prototype.currentUserIsMon=function(){return this.currentUser?this.currentUser.entity.entityType>=4:!1},t.prototype.currentUserIsUCCPPP=function(){return this.currentUserInEntity(6)},t.prototype.currentUserIsCNSC=function(){return this.currentUserInEntity(8)},t.prototype.currentUserIsCTE=function(){return this.currentUserInEntity(9)},t.prototype.currentUserIsCC=function(){return this.currentUserInEntity(11)},t.prototype.currentUserIsUCVAP=function(){return this.currentUserInEntity(7)},t.prototype.currentUserIsCDA=function(){return this.currentUserInEntity(17)},t.prototype.currentUserIsEuMon=function(){return this.currentUserInEntity(14)||this.currentUserInEntity(15)||this.currentUserInEntity(18)||this.currentUserInEntity(16)},Object.defineProperty(t.prototype,"hasFirstLoginValid",{get:function(){return this.authService.currentUser.entity.checkGeneral&&this.authService.currentUser.entity.checkAddress&&this.authService.currentUser.entity.checkUser},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checkGeneral",{get:function(){return this.authService.currentUser.entity.checkGeneral},set:function(){var n=angular.copy(this.authService.currentUser);n.entity.checkGeneral=!0;this.authService.currentUser=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checkAddress",{get:function(){return this.authService.currentUser.entity.checkAddress},set:function(){var n=angular.copy(this.authService.currentUser);n.entity.checkAddress=!0;this.authService.currentUser=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checkUser",{get:function(){return this.authService.currentUser.entity.checkUser},set:function(){var n=angular.copy(this.authService.currentUser);n.entity.checkUser=!0;this.authService.currentUser=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasEmailOJ",{get:function(){return this.authService.currentUser.entity.hasEmailOJ},set:function(n){var t=angular.copy(this.authService.currentUser);t.entity.hasEmailOJ=n;this.authService.currentUser=t},enumerable:!0,configurable:!0}),t.$inject=["authService","$cookieStore"],t}();angular.module("app.sys").service("userService",t)}(sys||(sys={})),function(n){var i=function(){function n(){}return n}(),t;n.ISignPdfOps=i;t=function(){function n(n,t,i,r,u,f,e,o){var h=this,s;this.wss=n;this.$http=t;this.$q=i;this.$timeout=r;this.configService=u;this.sio=f;this.$window=e;this.locale=o;this.isMultiple=!1;this.localProperties={attachedSignature:"true",java_arguments:"-Xmx512m",permissions:"all-permissions",sessionId:"JSESSIONID=fllpmRVaBAzronCEhc9un8L1",language:"ro",workflow:"simple",ui:"swing",signService:"configurable",pdfSignService:"default",decodeBase64Content:"false",itemProvider:"wsdiv",signaturePublisher:"websocket",innerHtml:"true",div:"continutHTML",htmlTarget:"pkContinutHTML",signMode:"default",useStreams:"false",httpAppenderSendLater:"true",urlTimestamp:"http://services.globaltrustfinder.com/adss/tsa",callback:"signService.submitSignature",closeJvm:"true",urlSaveLog:"http://localhost:20497/api-reg/webSignerLogger/log",protocol:"http",host:"localhost",port:"8080"};this.localPdfProperties={java_arguments:"-Xmx512m",permissions:"all-permissions",sessionId:"JSESSIONID=fllpmRVaBAzronCEhc9un8L1",language:"ro",workflow:"simple",ui:"swing",signService:"configurable",pdfSignService:"default",itemProvider:"http-single-item",signaturePublisher:"http-multipart",itemId:"",urlItemData:"",urlSaveSignature:"",urlTimestamp:"http://services.globaltrustfinder.com/adss/tsa",tsHashAlg:"SHA1",signMode:"PDF",useStreams:"true",httpAppenderSendLater:"true",callback:"signService.signPdfComplete",closeJvm:"true"};this.localTstProperties={attachedSignature:"true",java_arguments:"-Xmx512m",permissions:"all-permissions",sessionId:"JSESSIONID=fllpmRVaBAzronCEhc9un8L1",language:"ro",workflow:"simple",ui:"swing",signService:"configurable",pdfSignService:"default",itemProvider:"wsdiv",signaturePublisher:"websocket",innerHtml:"true",div:"continutHTML,resolutionHTML",htmlTarget:"pkContinutHTML,pkResolutionHTML",signMode:"default",useStreams:"false",httpAppenderSendLater:"true",callback:"submitSignature",closeJvm:"true",urlSaveLog:"http://localhost:8080/wst/signLog.do?method=log"};this.handleError=function(n){return h.$q.reject(n.data)};e.signService=this;this.localProperties.urlTimestamp=u.cfg.timestampUrl;this.localPdfProperties.urlTimestamp=u.cfg.timestampUrl;u.cfg.websignerOnlyPkcs11==!0&&(this.localProperties["disable.PKCS12"]="true",this.localProperties["disable.WINDOWS"]="true");s=$("#continutHTML");s.length||($("body").append("<div style='display:none;' id='continutHTML'><\/div>"),$("body").append("<div style='display:none;' id='pkContinutHTML'><\/div>"))}return n.prototype.signPdf=function(n){console.log("WebSIGNER -> DwnUrl:"+n.urlItemData);this.localPdfProperties.itemId=n.itemId;this.localPdfProperties.urlItemData=n.urlItemData;this.localPdfProperties.urlSaveSignature=n.urlSaveSignature;var t=window.location.protocol==="https:";return this.localPdfProperties.itemProvider=t?"https-single-item":"http-single-item",this.localPdfProperties.signaturePublisher=t?"https-multipart":"http-multipart",this.defer=$.Deferred(),this.isMultiple=!0,this.runWebSocket(),this.defer.promise(null)},n.prototype.signPdfComplete=function(n){console.log("WebSIGNER -> signPdfComplete:"+n);var t=JSON.parse(n);this.defer.resolve(t.success)},n.prototype.decodeBase64Content=function(n){return this.localProperties.decodeBase64Content=n+"",this},Object.defineProperty(n.prototype,"continutHTML",{get:function(){return angular.element("#continutHTML").html()},set:function(n){angular.element("#continutHTML").html(n)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pkContinutHTML",{get:function(){return angular.element("#pkContinutHTML").html()},set:function(n){angular.element("#pkContinutHTML").html(n)},enumerable:!0,configurable:!0}),n.prototype.sign=function(n){var t,i;this.isMultiple=!1;t=this;this.defer=$.Deferred();this.continutHTML=n;var f=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),e=typeof InstallTrigger!="undefined",o=Object.prototype.toString.call(this.$window.HTMLElement).indexOf("Constructor")>0,u=window.location.protocol==="https:",r=this.isMultiple?this.localPdfProperties:this.localProperties;return r.protocol=u?"https":"http",i=this.sio.createSocketIOClient(r),i.then(function(n){n||t.alertClientNotOnline()}),this.defer.promise(null)},n.prototype.sign2=function(n){var t=this;return this.isMultiple=!1,this.defer=$.Deferred(),this.continutHTML=n,this.localProperties.protocol=window.location.protocol==="https:"?"https":"http",this.$timeout(function(){t.runWebSocket()}),this.defer.promise(null)},n.prototype.alertClientNotOnline=function(){var n="";n=this.locale?this.locale.isCurrentLanguageRomanian()?"Verificati daca aplicatia de semnare este pornita si ca aveti setarile corecte in browser":"Check that the sign application is online and that the browser is properly configured":"Verificati daca aplicatia de semnare este pornita si ca aveti setarile corecte in browser";alert(n)},n.prototype.runWebSocket=function(){var n=this,t=this.isMultiple?this.localPdfProperties:this.localProperties,i=this.wss.createWebsocketClient(t).then(function(t){t?this.showDownloadJNLP=!1:(this.isLoading=!1,this.showDownloadJNLP=!0,n.alertClientNotOnline())})},n.prototype.verifiyWebSignerIsRunning=function(){var n=this.$q.defer(),i;try{var o=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),u=typeof InstallTrigger!="undefined",f=Object.prototype.toString.call(this.$window.HTMLElement).indexOf("Constructor")>0,r=window.location.protocol==="https:",t=this.isMultiple?this.localPdfProperties:this.localProperties;t.protocol=r?"https":"http";i=r&&u||f?this.sio.testSocketIOConnection(t):this.wss.testWebsocketConnection(t);i.then(function(t){t?(console.log("OK WebSigner is started."),n.resolve(!0)):(console.log("OK WebSigner is NOT RUNNING!"),n.resolve(!1))})}catch(e){console.log(e);setTimeout(function(){return n.resolve(!1)},200)}return n.promise},n.prototype.submitSignature=function(n,t){var u=this.$window.signService,i,f,r;if(console.log("submitSignature"),console.log(n),console.log(t),i=n,i.success===!1||"false"===i.success){for(f="",r=0;r<i.errors.length;r++)f=f+i.errors[r]+" ";u.defer.reject();return}u.defer.resolve(u.pkContinutHTML)},n.prototype.downloadWebSigner=function(){return this.DOWNLOAD("/res/webSigner/",null)},n.prototype.DOWNLOAD=function(n,t,i){var r={url:n,method:"POST",data:t,params:i,responseType:"arraybuffer"},u=this.$http(r);u.then(this.handleDownload,this.handleError)},n.prototype.handleDownload=function(n){var t=n.headers("Content-Disposition").replace("attachment; filename=","").replace(/"/g,""),i=new Blob([n.data],{type:"application/octet-stream"});saveAs(i,t)},n.$inject=["WebSocketSigner","$http","$q","$timeout","configService","SocketIOSigner","$window","locale"],n}();angular.module("app.sys").service("signService",t)}(sys||(sys={})),function(){"use strict";var n=function(){function n(n,t,i,r,u,f){var e=this;this.rootScope=n;this.$interval=t;this.log=i;this.authService=r;this.modalService=u;this.configService=f;f.cfg.SignalREnabled&&(this.hub=$.connection.signalHub,$.connection.hub.disconnected(function(){return e.onDisconnected()}))}return n.prototype.start=function(){var n=this;return this.hub.client.BroadcastArchiveReadyForDownload=function(t,i){return n.onBroadcastArchiveReadyForDownload(t,i)},$.connection.hub.start({pingInterval:null}).done(function(){return n.onInitComplete()}).fail(function(t){n.log.error("Could not init signalR connection"+t)})},n.prototype.stop=function(){$.connection.hub.stop();this.log.info("signalR destroy complete")},n.prototype.onInitComplete=function(){var n=this;this.log.info("signalR init complete");this.pingInterval=this.$interval(function(){n.authService.refreshToken(function(){},function(){})},3e5)},n.prototype.onDisconnected=function(){this.$interval.cancel(this.pingInterval);this.log.info("signalR disconnected")},n.prototype.offerImproved=function(n){this.hub.server.offerImproved(n)},n.prototype.subscribeToEA=function(n){this.hub.server.subscribeToEA(n)},n.prototype.unsubscribeFromEA=function(n){this.hub.server.unsubscribeFromEA(n)},n.prototype.send=function(n,t){this.hub.server.send(n,t)},n.prototype.onBroadcastEaOfferImproved=function(n){this.hub.client.broadcastEaOfferImproved=n},n.prototype.onBroadcastEaFinishedBidding=function(n){this.hub.client.broadcastEaFinishedBidding=n},n.prototype.onBroadcastArchiveReadyForDownload=function(n,t){this.modalService.showDownloadLink(n,t)},n.prototype.subscribe=function(n){this.hub.server.subscribe(n)},n.prototype.onBroadcastMessage=function(){},n.$inject=["$rootScope","$interval","log","authService","modalService","configService"],n}();angular.module("app.sys").service("signal",n)}(sys||(sys={})),function(n){"use strict";var i=function(){function n(n){this.usSpinnerService=n;this.DEFAULT_ID="spinner-root"}return n.prototype.createDefault=function(){return new t(this.usSpinnerService,this.DEFAULT_ID)},n.prototype.create=function(n){return new t(this.usSpinnerService,n)},n.$inject=["usSpinnerService"],n}(),t;n.SpinFactory=i;t=function(){function n(n,t){this.usSpinnerService=n;this.id=t;this._isLoading=!1}return Object.defineProperty(n.prototype,"isLoading",{get:function(){return this._isLoading},set:function(n){this._isLoading=n;n?this.usSpinnerService.spin(this.id):this.usSpinnerService.stop(this.id)},enumerable:!0,configurable:!0}),n}();n.SpinService=t;angular.module("app.sys").service("spinFactory",i)}(sys||(sys={})),function(n){"use strict";var t,i,r;(function(n){n[n.NOT_STARTED=0]="NOT_STARTED";n[n.STARTED=1]="STARTED";n[n.COMPLETED=2]="COMPLETED";n[n.ERROR=3]="ERROR";n[n.CANCELED=4]="CANCELED";n[n.UPLOADING=5]="UPLOADING"})(n.UploadStatus||(n.UploadStatus={}));t=n.UploadStatus;i=function(){function n(n){this.status=t.STARTED;this.progress=0;this.filename=n.name;this.size=n.size}return n}();n.Upload=i;r=function(){function n(n,r,u,f,e,o){var s=this;this.log=n;this.$upload=r;this.$q=u;this.configService=f;this.locale=e;this.modalService=o;this.uploads=[];this.FILE_UPLOAD_API_URL="api/upload/file";this.REG_FILE_UPLOAD_API_URL="api-reg/upload/file";this.SIGNED_FILE_UPLOAD_API_URL="api-reg/upload/signed";this.IMAGE_UPLOAD_API_URL="api/upload/img";this.TEST_FILE_UPLOAD_API_URL="api/upload/test";this.getIndexOfUpload=function(n){return angular.isNumber(n)?n:s.uploads.indexOf(n)};this.uploadSignedFile=function(n,t,i){var r=s.SIGNED_FILE_UPLOAD_API_URL;return s.uploadFileInternal(n,r,t,i)};this.uploadRegFile=function(n,t,i){var r=s.REG_FILE_UPLOAD_API_URL;return s.uploadFileInternal(n,r,t,i)};this.uploadFile=function(n,t,i){var r=s.FILE_UPLOAD_API_URL;return s.uploadFileInternal(n,r,t,i)};this.uploadAllFiles=function(n,t,i,r){var u=s.FILE_UPLOAD_API_URL,f=s.SIGNED_FILE_UPLOAD_API_URL;return t?s.uploadFileInternal(n,f,i,r):s.uploadFileInternal(n,u,i,r)};this.uploadImage=function(n,t,i){var r=s.IMAGE_UPLOAD_API_URL;return s.uploadFileInternal(n,r,t,i)};this.uploadTestFile=function(n,t,i){var r=s.TEST_FILE_UPLOAD_API_URL;return s.uploadFileInternal(n,r,t,i)};this.uploadFileInternal=function(n,r,u,f){var o=s.$q.defer(),e,c,h;return s.checkExtension(n.name,null)?(e=new i(n),s.isASCII(n.name)?(s.uploads.push(e),c=s,h=e.operation=s.$upload.upload({url:r,method:"POST",headers:u,fields:f,fileName:n.name,file:n}),h.success(function(n){e.status=t.COMPLETED;e.url=n.url;e.thumbUrl=n.url;o.resolve(e)}),h.error(function(n){e.status=t.ERROR;e.remove();o.reject(n)}),h.progress(function(n){var i=Math.round(n.lengthComputable?n.loaded*100/n.total:0);e.progress=i;e.status=t.UPLOADING;o.notify(i)}),e.cancel=function(){e.operation.abort();e.status=t.CANCELED;var n=s.getIndexOfUpload(e);s.uploads.splice(n,1);o.reject()},e.remove=function(){var n=s.getIndexOfUpload(e);c.uploads.splice(n,1)}):(e.status=t.ERROR,s.modalService.showErrorMessage(s.locale.key["Common.Error.FilenameOnlyAsciiError"]),o.reject())):o.reject([s.locale.key["Upload.Validation.WrongFileType"]]),o.promise}}return n.prototype.checkExtension=function(n,t){var i,r;return(n=n.toLowerCase(),i=n.split("."),i.length<=1)?!1:(r=i[i.length-1],t&&t.indexOf(r)<0)?!1:this.configService.cfg.ExtensionsNotAllowedForUpload&&this.configService.cfg.ExtensionsNotAllowedForUpload.length>0&&this.configService.cfg.ExtensionsNotAllowedForUpload.indexOf(r)>-1?!1:!0},n.prototype.checkUploadedFiles=function(n,t,i){var f,u,r;for(f in t)t[f]=t[f].toLowerCase();for(this.lastCheckedFile="",u=0;u<n.length;u++){if(r=n[u],!this.checkExtension(r.name,t))return this.lastCheckedFile=r.name,-1;if(r.size/1024>i)return this.lastCheckedFile=r.name,-2}return this.lastCheckedFile="",0},n.prototype.checkUploadedFilesAny=function(n,t,i){var f,u,r;for(f in t)t[f]=t[f].toLowerCase();for(this.lastCheckedFile="",u=0;u<n.length;u++){if(r=n[u],!this.checkExtension(r.name,t))return this.lastCheckedFile=r.name,-1;if(r.size/1024>i)return this.lastCheckedFile=r.name,-2}return this.lastCheckedFile="",0},n.prototype.checkUploadedFile=function(n,t,i){for(var r in t)t[r]=t[r].toLowerCase();return(this.lastCheckedFile="",!this.checkExtension(n.name,t))?(this.lastCheckedFile=n.name,-1):n.size/1024>i?(this.lastCheckedFile=n.name,-2):0},n.prototype.checkSigned=function(n,t){var r,u,i,f;if(!t||t.length==0)return!1;for(r in t)t[r]=t[r].toLowerCase();return(u=n.name.toLowerCase(),i=u.split("."),i.length<=1)?!1:(f=i[i.length-1],t&&t.indexOf(f)>=0)?!0:!1},n.prototype.isASCII=function(n){return/^[\x00-\x7F]*$/.test(n)},n.$inject=["log","$upload","$q","configService","locale","modalService"],n}();n.UploadService=r;angular.module("app.sys").service("uploadService",r)}(sys||(sys={})),function(){var n=function(){function n(n,t){this.$rootScope=n;this.$parse=t}return n.prototype.ascii=function(n){return n.charCodeAt(0)},n.prototype.passwordStrength=function(n){var u=n.split("").map(this.ascii),t=!1,i=!1,r=!1;return u.forEach(function(n){n>=97&&n<=122&&(t=!0);n>=65&&n<=90&&(i=!0);n>=48&&n<=57&&(r=!0)}),t&&i&&r},n.prototype.isEanGtinValid=function(n){for(var e,f,u,o=new RegExp("[0-9]{8,14}"),r=n.split(""),i=[],t=0;t<r.length;t++)i[t]=parseInt(r[t],10);if(e=r.slice(-1)[0],f=0,$.inArray(n.length,[8,12,13,14])>-1&&o.test(n)){if(u=0,r.pop(),r.length%2==1)for(t=r.length-1;t>=0;t--)i[t]=t%2==0?i[t]*3:i[t]*1,u+=i[t];else if(r.length%2==0)for(t=r.length-1;t>=0;t--)i[t]=t%2==0?i[t]*1:i[t]*3,u+=i[t];return f=Math.ceil((u+1)/10)*10-u,console.log("loop total = ",u,", remainder: ",f),f===parseInt(e)?!0:!1}return!1},n.prototype.checkIbanValid=function(n){var t=new RegExp("[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}([a-zA-Z0-9]?){0,23}");return t.test(n)},n.prototype.numberForIban=function(n){return n=="A"?10:n=="B"?11:n=="C"?12:n=="D"?13:n=="E"?14:n=="F"?15:n=="G"?16:n=="H"?17:n=="I"?18:n=="J"?19:n=="K"?20:n=="L"?21:n=="M"?22:n=="N"?23:n=="O"?24:n=="P"?25:n=="Q"?26:n=="R"?27:n=="S"?28:n=="T"?29:n=="U"?30:n=="V"?31:n=="W"?31:n=="X"?33:n=="Y"?34:n=="Z"?35:n},n.prototype.isEmail=function(n){return/^[a-zA-Z0-9][a-zA-Z0-9._%+-]*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$/.test(n)},n.prototype.isORC=function(){return!0},n.prototype.isTedNumber=function(n){return/^\d{6}-\d{4}$/.test(n)},n.prototype.isPhone=function(n){return/^((\(\+?[0-9]+\))|\+?[0-9]+)( - |-| )?(((\(\d+\))|\d+)( - |-| )?)*(\d+)( )?$/i.test(n)},n.prototype.isUrl=function(n){return/^((((H|h)(T|t)|(F|f))(T|t)(P|p)((S|s)?)):(\/){2})(www\.)?([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,6}(\W(.)*$|$)/.test(n)},n.prototype.isStrictNumeric=function(n){return/^-?[0-9]+$/.test(n)},n.prototype.cuiValidator=function(){return!0},n.prototype.isCnp=function(){return!0},n.prototype.isValidCnp=function(n){var t,r,i;if(n.length!==13||!this.isStrictNumeric(n))return!1;t=+n[1]*10+ +n[2];switch(+n[0]){case 1:case 2:t+=1900;break;case 3:case 4:t+=1800;break;case 5:case 6:t+=2e3;break;case 7:case 8:case 9:break;default:return!1}return+n[0]<7&&t<1800&&t>2099?!1:(r=+n[0]*2+ +n[1]*7+ +n[2]*9+ +n[3]*1+ +n[4]*4+ +n[5]*6+ +n[6]*3+ +n[7]*5+ +n[8]*8+ +n[9]*2+ +n[10]*7+ +n[11]*9,i=r%11,i===10&&(i=1),i!==+n[12])?!1:!0},n.prototype.cnpStep_1_2_Rez=function(n){for(var f,r,t,o="279146358279".split(""),e=n.substring(0,12).split(""),u=[],i=0;i<e.length;i++)f=+o[i]*+e[i],u.push(f);for(r=0,t=0;t<u.length;t++)r+=u[t];return r%11},n.prototype.cnpHasDate=function(n){var t="20"+n.substring(1,7),r=t.substring(0,4),i=t.substring(4,6),u=t.substring(6,8);return+r>1850&&+r<=(new Date).getFullYear()+100?+i>0&&+i<13?this.isDayOfMonth(i,u)?!0:!1:!1:!1},n.prototype.isDayOfMonth=function(n,t){var r=+n,i=+t,u=31,f=30;if(i<1||i>u||r===2&&i>28)return!1;if(r<=7){if(r%2==0){if(i>f)return!1}else if(i>u)return!1}else if(r%2!=0){if(i>f)return!1}else if(i>u)return!1;return!0},n.$inject=["$rootScope","$parse"],n}();angular.module("app.sys").service("validator",n)}(sys||(sys={})),function(){var n=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st){et===void 0&&(et=!1);this.$rootScope=n;this.$parse=t;this.signal=i;this.blockUI=r;this.cacheFactory=u;this.modalService=f;this.configService=e;this.userService=o;this.time=s;this.locale=h;this.uploadService=c;this.log=l;this.nav=a;this.timeout=v;this.spinFactory=y;this.bc=p;this.ComboApi=w;this.MockApi=b;this.validator=k;this.guidService=d;this.signService=g;this.stickyData=nt;this.noticeGeneralInfo=tt;this.noticeFilter=it;this.noticeTypeForFilter=rt;this.procedureViewResponse=ut;this.rfqSadGeneralInfo=ft;this.isInDefinition=et;this.sadLotId=ot;this.anonymizedFilter=st;this.isValidCaptcha=!1}return n.prototype.isUsernameValid=function(n){if(n!=null)for(var t=0;t<n.length;t++)if(this.configService.cfg.Valid_Characters_Username.indexOf(n.charAt(t))<0)return!1;return!0},n.prototype.currentUserHasRight=function(n){return this.userService.currentUser?this.userService.currentUser.rights.indexOf(n)>=0:!1},n.prototype.getNoticeStickyData=function(n,t){var i=this;return this.ComboApi.getNoticeStickyData(n,t).then(function(n){n!=null&&(i.stickyData=n,i.isInDefinition=n.sysNoticeState.id==1?!0:!1)})},n.prototype.getNoticeStickyDataHistory=function(n,t){var i=this;return this.ComboApi.getNoticeStickyDataHistory(n,t).then(function(n){i.stickyData=n})},n.prototype.getNoticeGeneralInfo=function(n,t){var i=this;return this.ComboApi.getNoticeGeneralInfo(n,t).then(function(n){i.noticeGeneralInfo=n})},n.prototype.getRfqSadGeneralInfo=function(){},n.prototype.pluralizeDays=function(n){return n!="1"?this.locale.key["Common.Label.Days"].toLowerCase():this.locale.key["Common.Label.Day"].toLowerCase()},Object.defineProperty(n.prototype,"isLoading",{get:function(){return this.$rootScope.isLoading=="undefined"&&(this.$rootScope.isLoading=!1),this.$rootScope.isLoading},set:function(n){this.$rootScope.isLoading=n;n==!0?this.blockUI.start():this.blockUI.stop()},enumerable:!0,configurable:!0}),n.prototype.broadcast=function(n,t){this.$rootScope.$broadcast(n,t)},n.prototype.on=function(n,t){this.$rootScope.$on(n,t)},n.prototype.checkBotCaptcha=function(n){var t=this,u=$("#"+n).get(0),r=u.Captcha,i={captchaId:r.Id,instanceId:r.InstanceId,userInput:$("#"+n).val()};this.ComboApi.checkCaptcha(i).then(function(n){n=="True"?(t.isValidCaptcha=!0,t.captchaToken=i.captchaId+"|"+i.instanceId+"|"+i.userInput,$("#status").attr("class","correct"),$("#status").text("Check passed")):(t.isValidCaptcha=!1,t.captchaToken=null,$("#status").attr("class","incorrect"),$("#status").text("Check failed"),r.ReloadImage())})},n.prototype.resetCaptcha=function(n){var t=$("#"+n).get(0),i=t.Captcha;i.ReloadImage();this.isValidCaptcha=!1;this.captchaToken=null},n.prototype.downloadUrl=function(n){window.open(n)},n.$inject=["$rootScope","$parse","signal","blockUI","cacheFactory","modalService","configService","userService","time","locale","uploadService","log","nav","timeout","spinFactory","bc","ComboApi","MockApi","validator","guidService","signService"],n}();angular.module("app.sys").service("svc",n)}(sys||(sys={}));angular.module("app.public",["ngRoute","ngResource","ngCookies","app.security","app.controls","app.sys","duScroll","ngSanitize"]).config(function(){app.PUB.isRunning=!0}).config(["cfpLoadingBarProvider",function(n){n.includeSpinner=!1}]).run(["$rootScope","userService","svc","localStorageService",function(n,t,i,r){r.clearAll();t.authService.currentUser&&(window.location.href=sys.pub.routes.home.route,t.authService.currentUser=null);n.skin="azure"}]).run(["$rootScope",function(n){var t="?v="+Math.floor(Math.random()*6+1);n.versionStyle=t}]).run(["$http","$cookieStore",function(n){n.defaults.headers.common.Culture=sys.cultureUtils.current}]);app.PUB.mod=angular.module("app.public");angular.module("app.public").factory("authHttpResponseInterceptor",["$q","$location",function(n,t){return{response:function(t){return t.status===401&&console.log("Response 401"),t||n.when(t)},responseError:function(i){return i.status===403&&i.status===500,i.status===401&&(console.log("Response Error 401",i),t.path("/pub/login")),n.reject(i)}}}]).run(["$http","authService",function(n,t){t.setDefaultHeaders()}]).run(["$rootScope","$location","authService",function(n,t,i){n.datePickerOptions={format:"dd/MM/yyyy",parseFormats:["yyyy-MM-ddTHH:mm:ss"]};n.datePickerOptionsMaxToday={format:"dd/MM/yyyy",parseFormats:["yyyy-MM-ddTHH:mm:ss"],max:new Date};n.validatorTooltipOptions={filter:".k-invalid",messages:{required:"Campul este obligatoriu."},position:"bottom",content:function(n){var t=n.target.attr("name")||n.target.closest(".k-widget").find(".k-invalid:input").attr("name"),i=$("#theForm").find("[data-for="+t+"]");return'<span class="k-icon k-warning"> <\/span>'+i.text()},show:function(){this.refresh()}};n.$on("$viewContentLoaded",function(){$("[kendo-date-picker]").on("keydown",function(n){return n.which===13?!0:!1})});n.$on("$locationChangeSuccess",function(){t.path()!="/pub/login"&&i.isAuthenticated&&i.refreshToken(function(){},function(){})})}]);angular.module("app.public").config(["$routeProvider","$locationProvider","$httpProvider","$controllerProvider","$provide",function(n,t,i,r,u){function s(n){return{load:function(){var i,r,t;if(!config.performanceDisableNgLazy)return i=[],angular.isDefined(n.noLazy)||(r=config.performanceMinify?".min.js":".js",n.depends&&n.depends.forEach(function(n){i.push("views"+n+r)}),i.push("views"+n.view+r)),t=$.Deferred(),t.resolve(),i.forEach(function(n){t=t.then(function(){return $.getScript(n,function(t,i){console.info("Loaded: "+i+" - "+n)}).fail(function(){console.error("Could not load "+n)})})}),t.then(function(){console.info("scriptLoader completed")}),t.promise()}}}var e,o,f;app.PUB.lazy={controller:r.register,service:u.service};app.PUB.isRunning=!0;e=[];for(o in sys.pub.routes)e.push(sys.pub.routes[o]);while(e.length>0)f=e.pop(),n.when(f.route,{controller:f.key,controllerAs:"vm",templateUrl:"template"+f.view,resolve:s(f)});t.html5Mode(!0);i.interceptors.push("authHttpResponseInterceptor")}]),function(n){"use strict";var t=function(){function n(){this.inEditMode=!1;this.draft=!1}return n}(),r,i;n.AddressModel=t;r=function(){function n(n,t,i,r){this.showNutsCode=i;this.isValid=!0;this.useInternalValidation=!0;this.showAddress=!1;this.officialNameValidationMsg="";this.nutsCodeValidationMsg="";this.postalCodeValidationMsg="";this.streetValidationMsg="";this.streetAddressValidationMsg="";this.streetNameValidationMsg="";this.streetTitleValidationMsg="";this.streetNumberValidationMsg="";this.contactPointsValidationMsg="";this.cifValidationMsg="";this.countryValidationMsg="";this.countyValidationMsg="";this.cityValidationMsg="";this.phoneValidationMsg="";this.mobilePhoneValidationMsg="";this.faxValidationMsg="";this.buyerUrlValidationMsg="";this.authorityUrlValidationMsg="";this.emailValidationMsg="";this.cnpValidationMsg="";this.useInternalValidation=t||!1;this.showAddress=r||!1;this.svc=n;this.requiredFieldMsg=this.svc.locale.key["Common.Validation.RequiredFieldMsg"];this.invalidEmailFormatMsg=this.svc.locale.key["Common.Validation.InvalidEmailFormatMsg"];this.invalidPhoneFormatMsg=this.svc.locale.key["Common.Validation.InvalidPhoneFormatMsg"];this.invalidFaxFormatMsg=this.svc.locale.key["Common.Validation.InvalidFaxFormatMsg"];this.invalidMobilephoneFormatMsg=this.svc.locale.key["Common.Validation.InvalidMobilephoneFormatMsg"];this.invalidUrlFormatMsg=this.svc.locale.key["Common.Validation.InvalidUrlFormatMsg"];this.invalidCnpFormatMsg="invalid cnp"}return n.prototype.todo=function(){},n.prototype.validate=function(n){if(!this.useInternalValidation)return!0;if(n){var t=!0;this.validateAddressOfficialName(n)||(t=!1);this.validatePostalCode(n)||(t=!1);this.showAddress&&(this.validateStreetAddress(n)||(t=!1));this.validateCif(n)||(t=!1);this.validateCountry(n)||(t=!1);this.validateCounty(n)||(t=!1);this.validateCity(n)||(t=!1);this.validatePhone(n)||(t=!1);this.validateMobile(n)||(t=!1);this.validateFax(n)||(t=!1);this.validateBuyerWebsite(n)||(t=!1);this.validateAuthorityWebsite(n)||(t=!1);this.validateEmail(n)||(t=!1);this.validateNutsCode(n)||(t=!1);this.isValid=t}else this.isValid=!1;return this.isValid},n.prototype.validateAddressOfficialName=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.officialName&&n.officialName.length>0;return t?(this.officialNameValidationMsg="",!0):(this.officialNameValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateNutsCode=function(n){if(!this.useInternalValidation||!this.showNutsCode)return!0;var t=n&&n.nutsCode;return t?(this.nutsCodeValidationMsg="",!0):(this.nutsCodeValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validatePostalCode=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.postalCode&&n.postalCode.length>0;return t?(this.postalCodeValidationMsg="",!0):(this.postalCodeValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateStreetAddress=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.address&&n.address.length>0;return t?(this.streetAddressValidationMsg="",!0):(this.streetAddressValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateContactPoints=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.contactPoints&&n.contactPoints.length>0;return t?(this.contactPointsValidationMsg="",!0):(this.contactPointsValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateCif=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.cif&&n.cif.length>0;return t?(this.cifValidationMsg="",!0):(this.cifValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateCountry=function(n){var t=n&&n.country&&n.country.id>=0;return(t?($('[name="selectCountry_input"]').removeClass("dangerFocusField"),$('[name="selectCountry_input"]').parent().removeClass("dangerFocusField")):($('[name="selectCountry_input"]').addClass("dangerFocusField"),$('[name="selectCountry_input"]').parent().addClass("dangerFocusField")),!this.useInternalValidation)?!0:t?(this.countryValidationMsg="",!0):(this.countryValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateCounty=function(){return!0},n.prototype.validateCity=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.city&&n.city.id>=0&&n.cityName;return(t?($('[name="selectCity_input"]').removeClass("dangerFocusField"),$('[name="selectCity_input"]').parent().removeClass("dangerFocusField")):($('[name="selectCity_input"]').addClass("dangerFocusField"),$('[name="selectCity_input"]').parent().addClass("dangerFocusField")),t)?(this.cityValidationMsg="",!0):(this.cityValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validatePhone=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.phone&&n.phone.length>=0;return t?this.svc.validator.isPhone(n.phone)?(this.phoneValidationMsg="",!0):(this.phoneValidationMsg=this.invalidPhoneFormatMsg,!1):(this.phoneValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateMobile=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.mobile&&n.mobile.length>0;return t?this.svc.validator.isPhone(n.mobile)?(this.mobilePhoneValidationMsg="",!0):(this.mobilePhoneValidationMsg=this.invalidMobilephoneFormatMsg,!1):(this.mobilePhoneValidationMsg="",!0)},n.prototype.validateFax=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.fax&&n.fax.length>0;return t?this.svc.validator.isPhone(n.fax)?(this.faxValidationMsg="",!0):(this.faxValidationMsg=this.invalidFaxFormatMsg,!1):(this.faxValidationMsg="",!0)},n.prototype.validateBuyerWebsite=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.buyerProfileURL&&n.buyerProfileURL.length>=0;return t?this.svc.validator.isUrl(n.buyerProfileURL)?(this.buyerUrlValidationMsg="",!0):(this.buyerUrlValidationMsg=this.invalidUrlFormatMsg,!1):(this.buyerUrlValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateAuthorityWebsite=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.authorityURL&&n.authorityURL.length>=0;return t?this.svc.validator.isUrl(n.authorityURL)?(this.authorityUrlValidationMsg="",!0):(this.authorityUrlValidationMsg=this.invalidUrlFormatMsg,!1):(this.authorityUrlValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateEmail=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.email&&n.email.length>0;return t?this.svc.validator.isEmail(n.email)?(this.emailValidationMsg="",!0):(this.emailValidationMsg=this.invalidEmailFormatMsg,!1):(this.emailValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateCnp=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.cnp&&n.cnp.length>0;if(t)return this.svc.validator.isCnp(n.cnp)?(this.cnpValidationMsg="",!0):(this.cnpValidationMsg=this.invalidCnpFormatMsg,!1)},n.prototype.validateStreetTitle=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.streetTitle&&n.streetTitle.length>0;return t?(this.streetTitleValidationMsg="",!0):(this.streetTitleValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateStreetName=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.streetName&&n.streetName.length>0;return t?(this.streetNameValidationMsg="",!0):(this.streetNameValidationMsg=this.requiredFieldMsg,!1)},n.prototype.validateStreetNumber=function(n){if(!this.useInternalValidation)return!0;var t=n&&n.streetNumber&&n.streetNumber.length>0;return t?(this.streetNumberValidationMsg="",!0):(this.streetNumberValidationMsg=this.requiredFieldMsg,!1)},n.prototype.onContactPersonChange=function(n){var i=this,t=this;t.selectedCaUser&&t.svc.ComboApi.GetEntityInfoById(t.selectedCaUser.id).then(function(t){t&&(n.contactUserId=t.userID,n.phone=t.mobilePhone,n.email=t.email)},function(n){i.svc.log.info("bind error:"+n)}).finally(function(){})},n}();n.AddressValidation=r;i=function(){function n(n,t,i,u){this.svc=n;this.$scope=t;this.$attrs=i;this.$rootScope=u;this.readOnlyHeader=!1;this.addButtonPositionVal="fa-pull-right";this.useInternalValidationVal=!0;this.showAddressVal=!1;this.currentEditingLocalID=-1;this.multiple=!1;this.showAddressVal=this.convertToBoolean(i.showAddress);this.canAddVal=this.convertToBoolean(i.canAdd);this.canEditVal=this.convertToBoolean(i.canEdit);this.canDeleteVal=this.convertToBoolean(i.canDelete);typeof i.useInternalValidation!="undefined"&&i.useInternalValidation!=null&&(this.useInternalValidationVal=this.convertToBoolean(i.useInternalValidation));this.addButtonPositionVal=this.convertToBoolean(i.addButtonPosition).toString();this.showNutsCodeVal=this.convertToBoolean(i.showNutsCode);this.validator=new r(n,this.useInternalValidationVal,this.showNutsCodeVal,this.showAddressVal);this.addressId=i.id;i.addButtonPosition&&(this.addButtonPositionVal=i.addButtonPosition)}return Object.defineProperty(n.prototype,"addresses",{get:function(){return this._addresses},set:function(n){this._addresses=n;console.log("addresses set -> "+n);n&&this.init()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"address",{get:function(){return this._address},set:function(n){this._address=n;n&&this.init()},enumerable:!0,configurable:!0}),n.prototype.init=function(){var i,n,r;this.address&&(this.multiple=!1);this.multiple||this._addresses?this.address&&(this._addresses=[],this.addresses.push(this.address)):(i=angular.isDefined(this.address)&&this.address!=null,n=i?this.address:new t,i||(n.inEditMode=!0,this._address=n),this._addresses=[],this.addresses.push(n));r=this;this.currentEditingLocalID=-1},n.prototype.cancelEdit=function(n){var t=this,i=this;angular.equals(n,this.original)?this.doCancel(n):this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Confirm"],this.svc.locale.key["Common.Info.UnsavedChanges"]).then(function(i){i&&t.doCancel(n)})},n.prototype.doCancel=function(n){this.currentEditingLocalID=-1;n.inEditMode=!1;(this.multiple!=!0||n.noticeEntityAddressID)&&n.noticeEntityAddressID!==0?(this.address=this.original,this.address&&(this.address.inEditMode=!1)):this.deleteAddress(n);this.$scope.frmAddress.$setPristine();this.isValid=!0},n.prototype.enterAddressEdit=function(n){this.current&&(this.current.inEditMode=!1);this.current=n;this.current.inEditMode=!0;this.currentEditingLocalID=n.noticeEntityAddressID;this.original=angular.copy(this.current);this.isValid=!1},n.prototype.saveAddress=function(n){if(this.useInternalValidationVal)if(this.isValid=this.validator.validate(n),this.isValid)n.inEditMode=!1,this.currentEditingLocalID=-1;else return!1;else n.inEditMode=!1,this.currentEditingLocalID=-1;this.$rootScope.$broadcast("saveNoticeAddress",n);this.showAddressVal||(this.address.street=this.address.streetTitle+" "+this.address.streetName+" "+this.svc.locale.key["DFNoticeView.Label.StreetNumber"]+this.address.streetNumber)},n.prototype.deleteAddress=function(n){var t=this.addresses.indexOf(n,0);t!=undefined&&this.addresses.splice(t,1)},n.prototype.addAddress=function(){var n=new t;n.noticeEntityAddressID=0;n.inEditMode=!0;this.currentEditingLocalID=0;this.addresses&&this.addresses.push(n)},n.prototype.getGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})},Object.defineProperty(n.prototype,"GUID",{get:function(){return this.getGuid()},enumerable:!0,configurable:!0}),n.prototype.convertToBoolean=function(n){return n===null||typeof n=="undefined"?!1:typeof n=="boolean"?n:typeof n=="string"?n==="false"?!1:!0:void 0},n.prototype.createMockAddress=function(n,i){i===void 0&&(i=!1);var r=new t;return r.noticeEntityAddressID=n,r.officialName="OfficialName",r.address="address",r.city={id:1779,text:"Bucuresti"},r.postalCode="postalCode",r.country={id:1,text:"Romania"},r.email="email",r.phone="phone",r.fax="fax",r.contactPoints="contactPoints",r.attentionTo="attentionTo",r.authorityURL="authorityURL",r.buyerProfileURL="buyerProfileURL",r.cif="string",r.inEditMode=i,r.postalCodeID=0,r.county={id:4,text:"Bucuresti"},r},n.prototype.onContactPersonChange=function(){var t=this,n=this;n.selectedCaUser&&n.svc.ComboApi.GetEntityInfoById(n.selectedCaUser.id).then(function(t){t&&(n.address.contactUserId=t.userID,n.address.phone=t.mobilePhone,n.address.email=t.email)},function(n){t.svc.log.info("bind error:"+n)}).finally(function(){})},n.$inject=["svc","$scope","$attrs","$rootScope"],n}();n.Ctrl_GenericAddress=i;angular.module("app.sys").controller("Ctrl_GenericAddress",i).directive("genericAddress",function(){return{restrict:"E",replace:!0,scope:{addressId:"=",isValid:"=",addresses:"=",address:"=",canAdd:"@",canEdit:"@",canDelete:"@",useInternalValidation:"@",addButtonPosition:"@",showNutsCode:"@",showAddress:"@"},bindToController:!0,controller:i,controllerAs:"addrCtrl",templateUrl:"template/common/address/address",link:function(n,t,i,r){r.multiple=i.multiple=="true";r.readOnlyHeader=i.readOnlyHeader=="true";r.init()}}})}(common||(common={})),function(n){var t=function(){function n(t,i,r,u){var e=this,f;this.$scope=t;this.$http=i;this.$rootScope=r;this.$timeout=u;this.isPublic=!1;this.isDoubleClick=!1;this.gridOptions={dataSource:{transport:{read:{url:"",dataType:"json"}},schema:{model:{id:"cpvCodeID",fields:{parentId:{field:"parentID",nullable:!0},code:{field:"code",type:"string"},name:{field:"name",type:"string"}}}}},autobind:!1,height:402,selectable:!0,change:this.onChangeList,navigatable:!0,rowTemplate:'<tr ng-dblclick="vmx.treeSelectedNodes = new Array();"><td>#=code#<\/td><td>#=name#<\/td><\/tr>',columns:[{field:"code",title:"Cod",width:200},{field:"name",title:"Denumire"}]};this.treeOptions={dataSource:new kendo.data.TreeListDataSource({transport:{read:{url:"api-pub/Cpv/GetAll",dataType:"json"}},schema:{model:{id:"cpvCodeID",fields:{parentId:{field:"parentID",nullable:!0},code:{field:"code",type:"string",template:'<span ng-dblclick="onDblClick()">#=code#<\/span>'},name:{field:"name",type:"string",template:'<span ng-dblclick="onDblClick()">#=code#<\/span>'}}}}}),loadOnDemand:!0,selectable:!0,autobind:!1,navigatable:!0,dataBound:function(n){var t=this.$angular_scope,i,r;n.sender.$angular_scope.tree.dataItems().length==1&&(i=n.sender.table.find("tr")[0],r=n.sender.$angular_scope.tree.dataItem(i),t.expandNode(r.id,!1));t.treeSelectedNodes&&t.treeSelectedNodes.length>0&&(t.treeSelectedNodes.length==1?t.expandNode(t.treeSelectedNodes[0],!0):t.expandNode(t.treeSelectedNodes[0],!1),t.treeSelectedNodes.shift())},change:this.onChange,columns:[{field:"code",title:"Cod",width:160,template:"<span # if (code != '00000000') {#ng-dblclick=\"onDblClick()\"#} #>#=code#<\/span>"},{field:"name",title:"Denumire",width:260,template:"<span  # if (code != '00000000') {#ng-dblclick=\"onDblClick()\"#} #>#=name#<\/span>"}],height:400};this.searchString="";this.vm=t;angular.extend(t,this);angular.extend(t,n.prototype);f=this.vm;t.$watch("visible",function(n){e.vm.isPublic=t.ispub;t.cpvid!=null&&t.cpvid>0&&n&&t.$http({url:"api-pub/Cpv/GetCpvWithParent?id="+t.cpvid,method:"GET"}).success(function(n){if(n.length){f.treeSelectedNodes=[];for(var t=0;t<n.length;t++)f.treeSelectedNodes.push(n[t].cpvCodeID);f.tree.dataSource.read()}})})}return n.prototype.onDblClick=function(){this.vm.isDoubleClick=!0},n.prototype.expandNode=function(n,t){var i=this.tree,r=i.tbody.find("tr[data-uid='"+i.dataSource.get(n).uid+"']");t||i.expand(r);t&&(i.select(r),i.content.scrollTop(i.select().position().top))},n.prototype.onChangeList=function(){var t=this,r=t.select(),i=t.dataItem(r),n=t.$angular_scope;n.$timeout(function(){if(n.isDoubleClick){n.selectedCpv=i;n.ok();return}n.$http({url:"api/Cpv/GetCpvWithParent?id="+i.cpvCodeID,method:"GET"}).success(function(t){if(t.length){n.treeSelectedNodes=[];for(var i=0;i<t.length;i++)n.treeSelectedNodes.push(t[i].cpvCodeID);n.tree.dataSource.read()}})},500)},n.prototype.onChange=function(){var i=this.select(),t=this.dataItem(i),n=this.$angular_scope;n.vm.selectedCpv=t.code!=="00000000"?t:null;n.$timeout(function(){if(n.isDoubleClick){n.ok();return}},500)},n.prototype.getSelected=function(){var n=this.tree;return n.dataItem(n.select()).cpvCodeID},n.prototype.searchCpv=function(){if(!(this.searchString.length<3)){var n=this.grid;n.dataSource.options.transport.read.url="api-pub/Cpv/SearchCpv?text="+encodeURIComponent(this.searchString);n.dataSource.read()}},n.prototype.resetCpv=function(){var t=this.grid,n;t.dataSource.data([]);n=this.tree;n.dataSource.transport.options.read.url="api-pub/Cpv/GetAll";n.dataSource.read();window.isOnDemand=!0},n.prototype.ok=function(){this.vm.selectedCpv!=null&&this.vm.selectedCpv.code!=="00000000"&&(this.vm.isDoubleClick=!1,this.$rootScope.$broadcast("selector:cpv",this.vm.selectedCpv))},n.prototype.cancel=function(){this.vm.isDoubleClick=!1;this.$rootScope.$broadcast("selector:cpv",null)},n.$inject=["$scope","$http","$rootScope","$timeout"],n}();n.CtrlSelectorCpv=t;angular.module("app.controls").controller("CtrlSelectorCpv",t)}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(t){"use strict";var i=function(t){function i(i,r,u){var f=this;t.call(this);this.svc=i;this.$http=r;this.$q=u;this.getAll=function(n){return f.service.getAll(n)};this.service=new n.mc.Service(r,u);this.filter.sortProperty="publicationDate";this.filter.descending=!0}return __extends(i,t),i.prototype.reset=function(){t.prototype.reset.call(this);this.filter.descending=!0;this.filter.sortProperty="publicationDate"},i}(n.BaseList);t.MCNoticeList_LocalData=i})(t=n.mc||(n.mc={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/PUBLICMCNotice"}return __extends(t,n),t.prototype.getAll=function(n){return this.GET(this.api+"/getAll/",n)},t.prototype.downloadDocument=function(n,t){this.DOWNLOAD(this.api+"/downloadDocument/?id="+n+"&documentId="+t,{})},t.prototype.verifyDownloadDocument=function(n,t){return this.POST(this.api+"/downloadDocument/?id="+n+"&documentId="+t,{})},t.prototype.getDocuments=function(n,t){return this.POST(this.api+"/getDocuments/"+n,t)},t.prototype.getView=function(n){return this.GET(this.api+"/getView/?id="+n)},t.prototype.downloadReport=function(n){this.DOWNLOAD(this.api+"/downloadReport/?id="+n,{})},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t}(sys.HttpApi);n.Service=t})(t=n.mc||(n.mc={}))}(common||(common={})),function(n){var t=function(){function n(t,i,r){this.$scope=t;this.$http=i;this.$rootScope=r;this.treeOptions={dataSource:new kendo.data.TreeListDataSource({transport:{read:{url:"api/ComboPub/GetNutsCode/-1",dataType:"json"}},schema:{data:"results",model:{id:"nutsCodeID",fields:{parentId:{field:"nutsCodeParentID",nullable:!0},code:{field:"code",type:"string"},name:{field:"name",type:"string"}}}}}),loadOnDemand:!0,selectable:!0,autobind:!1,dataBound:function(){var n=this.$angular_scope;n.treeSelectedNodes&&n.treeSelectedNodes.length>0&&(n.treeSelectedNodes.length==1?n.expandNode(n.treeSelectedNodes[0],!0):n.expandNode(n.treeSelectedNodes[0],!1),n.treeSelectedNodes.shift())},change:this.onChange,columns:[{field:"code",title:"Cod",width:160},{field:"name",title:"Denumire",width:260}],height:400};this.vm=t;angular.extend(t,this);angular.extend(t,n.prototype)}return n.prototype.expandNode=function(n,t){var i=this.tree,r=i.tbody.find("tr[data-uid='"+i.dataSource.get(n).uid+"']");t||i.expand(r);t&&(i.select(r),i.content.scrollTop(i.select().position().top))},n.prototype.onChange=function(){var n=this.select(),t=this.dataItem(n);this.$angular_scope.vm.selectedNuts=t},n.prototype.getSelected=function(){var n=this.tree;return n.dataItem(n.select()).nutsCodeID},n.prototype.ok=function(){this.$rootScope.$broadcast("selector:nuts",this.vm.selectedNuts)},n.prototype.cancel=function(){this.$rootScope.$broadcast("selector:nuts",null)},n.$inject=["$scope","$http","$rootScope"],n}();n.CtrlSelectorNuts=t;angular.module("app.controls").controller("CtrlSelectorNuts",t)}(common||(common={})),function(n){var t=function(){function n(t,i,r,u,f){var e=this;this.$scope=t;this.$http=i;this.$rootScope=r;this.svc=u;this.uploadService=f;this.files=[];this.uploadedFiles=[];this.open=function(){angular.element("#files").click()};this.vm=t;this.UploadService=f;this.UploadStatus=sys.UploadStatus;this.DocumentMaxSizeInMB=Math.floor(u.configService.cfg.DocumentMaxSize/1024);this.TotalFilesNumberUpload=u.configService.cfg.totalFilesNumber;angular.extend(t,this);angular.extend(t,n.prototype);this.$scope.$watchCollection(function(){return e.vm.files},function(){angular.forEach(e.vm.files,function(n){if(e.svc.modalService.checkUploadedFile(n,null,e.DocumentMaxSizeInMB*1024,e.svc.uploadService,e.svc.locale)){if(e.uploadService.uploads.length>=e.vm.TotalFilesNumberUpload){e.svc.modalService.showErrorMessage(e.svc.locale.key["Common.Label.MaxNumberOfFileReached"]);return}e.vm.uploadService.uploadFile(n).then(function(n){e.vm.uploadedFiles.push(n)},function(n){e.svc.log.error(n);e.svc.modalService.showValidationResult(n)})}})})}return n.prototype.uploadsPending=function(){return this.UploadService.uploads.filter(function(n){return n.status==sys.UploadStatus.UPLOADING}).length>0},n.prototype.check=function(){this.$rootScope!==undefined&&this.$rootScope.$broadcast("multi:upload",this.uploadService.uploads)},n.prototype.ok=function(){this.$rootScope.$broadcast("multi:upload",this.uploadService.uploads);this.vm.uploadedFiles=[];this.vm.uploadService.uploads=[]},n.prototype.cancel=function(){this.$rootScope.$broadcast("multi:upload",null);this.vm.uploadedFiles=[];this.vm.uploadService.uploads=[]},n.$inject=["$scope","$http","$rootScope","svc","uploadService"],n}();n.CtrlMultiUpload=t;angular.module("app.controls").controller("CtrlMultiUpload",t)}(common||(common={})),function(n){var t=function(){function n(t,i,r,u,f){var e=this;this.$scope=t;this.$http=i;this.$rootScope=r;this.svc=u;this.uploadService=f;this.file=[];this.uploadedFiles=[];this.open=function(){angular.element("#files").click()};this.vm=t;angular.extend(t,this);angular.extend(t,n.prototype);this.UploadService=f;this.UploadStatus=sys.UploadStatus;this.vm.UploadStatus=sys.UploadStatus;this.$scope.$watch(function(){return e.vm.file},function(){angular.forEach(e.vm.file,function(n){e.vm.uploadService.uploadFile(n).then(function(n){e.vm.uploadedFiles.push(n);e.ok()},function(n){e.svc.log.error(n);e.svc.modalService.showValidationResult(n)})})})}return n.prototype.uploadsPending=function(){return this.UploadService.uploads.filter(function(n){return n.status==sys.UploadStatus.UPLOADING}).length>0},n.prototype.ok=function(){this.$rootScope.$broadcast("multi:upload",this.uploadService.uploads)},n.prototype.cancel=function(){this.$rootScope.$broadcast("multi:upload",null);this.vm.uploadedFiles=[];this.vm.uploadService.uploads=[]},n.$inject=["$scope","$http","$rootScope","svc","uploadService"],n}();n.CtrlSingleUpload=t;angular.module("app.controls").controller("CtrlSingleUpload",t)}(common||(common={})),function(){"use strict";var n=function(){function n(n,t,i,r){this.$scope=n;this.svc=t;this.uploadService=i;this.$timeout=r;this.multiple=!0;this.files=[];this.open=function(){};this.UploadStatus=sys.UploadStatus}return Object.defineProperty(n.prototype,"uploadsPending",{get:function(){return this.uploadService.uploads.filter(function(n){return n.status==sys.UploadStatus.UPLOADING}).length>0},enumerable:!0,configurable:!0}),n.prototype.uploadFiles=function(n){var t=this;angular.forEach(n,function(n){t.mode=="doc"&&t.uploadService.uploadFile(n).then(function(n){t.svc.log.info("<i>File "+n.filename+" uploaded successfully!!<\/i>");t.files=t.uploadService.uploads},function(n){t.svc.log.error(n);t.svc.modalService.showValidationResult(n)});t.mode=="img"&&t.uploadService.uploadImage(n).then(function(n){t.svc.log.info("<i>File "+n.filename+" uploaded successfully!!<\/i>");t.files=t.uploadService.uploads},function(n){t.svc.log.error(n);t.svc.modalService.showValidationResult(n)})})},n.prototype.setup=function(){this.pattern=this.mode=="doc"?".pdf":"image/*";this.accept=this.mode=="doc"?"application/pdf":"image/*"},n.$inject=["$scope","svc","uploadService","$timeout"],n}();angular.module("app.sys").directive("sicapUpload",function(){return{restrict:"E",replace:!0,scope:!0,bindToController:{mode:"@",files:"="},controller:n,controllerAs:"upCtrl",templateUrl:"template/common/upload/v2/upload",link:function(n,t,i,r){r.setup()}}})}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){"use strict";var i=function(){function n(n,t,i,r,u){this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.$route=u;var f=this;n.vm=f;f.contractId=n.contractId;f.init()}return n.prototype.openCompetResumingWindow=function(){var n=this;n.competResumingWindow.center().open()},n.prototype.closeCompetResumingWindow=function(){var n=this;n.competResumingWindow.center().close()},n.prototype.init=function(){var n=this,t=this,i;t.svc.isLoading=!0;i={caNoticContractId:t.contractId,options:1};t.api.COMMON.getCompetitionResume(i).then(function(n){t.competResumingAwarded=n},function(n){t.svc.modalService.showErrorMessage(n)}).finally(function(){t.svc.isLoading=!1});this.$rootScope.$$listeners.saveContractInfo=[];this.$rootScope.$$listeners.addMultipleLots=[];this.$rootScope.$$listeners.removeLotForContract=[];this.$rootScope.$$listeners.editLot_onSave=[];this.$rootScope.$$listeners.saveWinnerAddress=[];this.$rootScope.$$listeners.addAwardingParticipant=[];this.$rootScope.$$listeners.saveAwardingWinner=[];this.$rootScope.$$listeners.removeAwardingWinner=[];this.$rootScope.$on("saveContractInfo",function(){n.init()});this.$rootScope.$on("addMultipleLots",function(){n.init()});this.$rootScope.$on("removeLotForContract",function(){n.init()});this.$rootScope.$on("editLot_onSave",function(){n.init()});this.$rootScope.$on("saveWinnerAddress",function(){n.init()});this.$rootScope.$on("addAwardingParticipant",function(){n.init()});this.$rootScope.$on("saveAwardingWinner",function(){n.init()});this.$rootScope.$on("removeAwardingWinner",function(){n.init()})},n.prototype.loadCompetResuming=function(){var n=this,t;n.svc.isLoading=!0;t={caNoticContractId:n.contractId,options:2};n.api.COMMON.getCompetitionResume(t).then(function(t){n.competresumingAvailable=t;n.openCompetResumingWindow()},function(t){n.svc.modalService.showErrorMessage(t)}).finally(function(){n.svc.isLoading=!1})},n.prototype.saveCompetResuming=function(){var i=this,n=this,t;n.svc.isLoading=!0;t={items:[]};n.competresumingAvailable.items.forEach(function(n){n.isSelected&&t.items.push({caNoticeContractId:n.caNoticeContractId,eaId:n.eaId})});n.api.COMMON.assignCompetResuming(t).then(function(){n.closeCompetResumingWindow();n.init();i.$route.reload()},function(t){n.svc.modalService.showErrorMessage(t)}).finally(function(){n.svc.isLoading=!1;n.$rootScope.$broadcast("saveCompetResuming");n.$rootScope.$broadcast("saveCompetResumingPc")})},n.prototype.removeCompetResuming=function(n){var t=this,i;t.svc.isLoading=!0;i={items:[{caNoticeContractId:n.caNoticeContractId,eaId:n.eaId}]};t.api.COMMON.removeCompetResuming(i).then(function(){t.init()},function(n){t.svc.modalService.showErrorMessage(n)}).finally(function(){t.svc.isLoading=!1;t.$rootScope.$broadcast("removeCompetResuming");t.$rootScope.$broadcast("removeCompetResumingPc")})},n.$inject=["$scope","svc","SRDCApi","$rootScope","$route"],n}(),r,t;n.SRDC=i;r=function(n){function t(t,i){n.call(this,t,i);this.api="api/C_CA_CANotice"}return __extends(t,n),t.prototype.getCompetitionResume=function(n){return this.POST(this.api+"/GetCompetitionResume/",n)},t.prototype.assignCompetResuming=function(n){return this.POST(this.api+"/AssignCompetitionResume/",n)},t.prototype.removeCompetResuming=function(n){return this.POST(this.api+"/RemoveCompetitionResume/",n)},t}(sys.HttpApi);t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"COMMON",{get:function(){return new r(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.SRDCApi=t;angular.module("app.controls").service("SRDCApi",t);angular.module("app.controls").directive("srdc",function(){return{restrict:"E",replace:!0,scope:{contractId:"@",isPreview:"=",reload:"&"},controller:i,templateUrl:"template/common/notices/canotices/srdc/srdc",link:function(){}}})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(t){var i;(function(t){"use strict";var r=function(){function n(n,t,i){this.parent=n;this.svc=t;this.api=i;this.showView=!0}return Object.defineProperty(n.prototype,"template",{get:function(){return this.showView?this.getViewTemplate():this.getEditTemplate()},enumerable:!0,configurable:!0}),n.prototype.save=function(){var t=this,n=this;n.doSave(n.item).then(function(){t.itemCopy=null;t.showView=!0;n.parent&&n.parent.init()},function(t){n.svc.modalService.showErrorMessage(t)})},n.prototype.cancel=function(){var n=this;this.item=n.itemCopy;this.itemCopy=null;this.showView=!0},n.prototype.edit=function(){var n=this;n.itemCopy=angular.copy(n.item);this.showView=!1},n}(),i;t.SectionContext=r;i=function(n){function t(t,i,r,u){var f=this;n.call(this);this.svc=t;this.api=i;this.caNoticeId=r;this.caNoticeContractId=u;this.getAll=function(n){return f.api.CA_C.GetCaNotice_AwardedLots(n)}}return __extends(t,n),t.prototype.reset=function(){n.prototype.reset.call(this)},t.prototype.populateFilter=function(){this.filter.caNoticeId=this.caNoticeId;this.filter.caNoticeContractId=this.caNoticeContractId},t}(n.BaseList);t.CANotice_AwardedLots_LocalData=i})(i=t.caNotice||(t.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(t){var i;(function(t){"use strict";var u=function(){function n(n,t,i,r,u,f,e,o,s){this.parent=n;this.svc=t;this.api=i;this.procedureApi=r;this.caNoticeId=u;this.procedureId=f;this.isPreview=e;this.hasLots=o;this.item=s;var h=this;h.showFilter=o;h.showSorting=o;h.setup()}return n.prototype.setup=function(){var n=this;n.cancelledLots_local=new r(n.svc,n.api,n.caNoticeId);n.cancelledLots_local.search()},n}(),i,r;t.LotListCancelledContext=u;i=function(){function n(n){this.$scope=n;this.cancelledLotsCopy=[];n.vm=this}return Object.defineProperty(n.prototype,"context",{get:function(){return this.$scope.context},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"procedureApi",{get:function(){return this&&this.context?this.context.procedureApi:null},enumerable:!0,configurable:!0}),n.prototype.openCancelLotsWindow=function(){var n=this;n.context.svc.isLoading=!0;n.context.procedureApi.COMMON.AddProcedureLotsForBulkOperations({canceledLotsKey:n.context.caNoticeId}).finally(function(){n.context.svc.isLoading=!1});n.cancelLotsWindow.center().open();n.context.svc.timeout.executeWithTimespan(function(){n.callRebind=!n.callRebind},100)},n.prototype.computeCancelledLots=function(){var n=this;n.context.svc.modalService.confirm(n.context.svc.locale.key["CANotice.Info.ConfirmGetCancelledLotsTitle"],n.context.svc.locale.key["CANotice.Info.ConfirmGetCancelledLots"]).then(function(t){t&&n.context.api.ComputeCancelledLots({caNoticeId:n.context.caNoticeId}).then(function(){n.context.parent.init()},function(t){n.context.svc.modalService.showValidationResult(t)})})},n.prototype.removeCancelledLotForContract=function(n){var t=this;t.context.svc.modalService.confirm(t.context.svc.locale.key["Common.Info.Confirm"],t.context.svc.locale.key["CANotice.Info.RemoveLotQuestion"]).then(function(i){i&&(t.context.svc.isLoading=!0,t.context.api.RemoveCancelledLot(t.context.caNoticeId,n).then(function(){return t.context.parent.init()}).finally(function(){t.context.svc.isLoading=!1}))})},n.prototype.assignCancelledLots=function(){var n=this;n.context.svc.isLoading=!0;n.context.api.AssignCancelledLots(n.context.caNoticeId).then(function(){n.context.svc.modalService.showInfoMessage(n.context.svc.locale.key["CANotice.Label.CANoticeSaveSuccesful"]);n.refreshBulkData=!n.refreshBulkData;n.cancelLotsWindow.center().close();n.context.parent.init()},function(t){n.context.svc.modalService.showErrorMessage(t)}).finally(function(){n.context.svc.isLoading=!1})},n.$inject=["$scope"],n}();t.LotListCancelledController=i;r=function(n){function t(t,i,r){var u=this;n.call(this);this.svc=t;this.api=i;this.caNoticeId=r;this.getAll=function(n){return u.api.GetCaNotice_CancelledLots(n)}}return __extends(t,n),t.prototype.reset=function(){n.prototype.reset.call(this)},t.prototype.populateFilter=function(){this.filter.caNoticeId=this.caNoticeId},t}(n.BaseList);t.CANotice_CancelledLots=r;angular.module("app.controls").directive("lotlistcancelled",function(){return{restrict:"E",replace:!0,scope:{context:"="},templateUrl:"template/common/notices/canotices/awarding/lot-list-cancelled/lot-list-cancelled",controller:i,link:function(){}}})})(i=t.caNotice||(t.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t,i,r,u,f,e){n.call(this,t,i,r);this.parent=t;this.svc=i;this.api=r;this.item=u;this.currencies=f;this.canEditCurrency=e}return __extends(t,n),t.prototype.getViewTemplate=function(){return"template/common/notices/canotices/section-5-2-a/view"},t.prototype.getEditTemplate=function(){return"template/common/notices/canotices/section-5-2-a/edit"},t.prototype.doSave=function(n){var t=this;return t.api.SaveSection52A(n)},t}(n.SectionContext);n.Section52AContext=t;angular.module("app.controls").directive("canoticesection52a",function(){return{restrict:"E",replace:!0,scope:{context:"="},templateUrl:"template/common/notices/canotices/section-5-2-a/section52a"}})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o,s,h,c){this.parent=n;this.svc=t;this.api=i;this.caNoticeId=r;this.isPreview=u;this.caNoticeItem=f;this.caNoticeContractViewRoute=e;this.modificationNoticeViewRoute=o;this.modificationNoticesVersions=s;this.caNoticeContractEditRoute=h;this.contractViewRoute=c;this.selectedContractType={};var l=this;l.clearFilter();l.filter.caNoticeId=r;l.isLoading=!1;l.api&&l.search()}return n.prototype.clearFilter=function(){var n=this,t=n.filter?n.filter.caNoticeId:null;n.filter={caNoticeId:t,contractNo:null,winnerTitle:null,winnerFiscalNumber:null,contractDate:{from:null,to:null},contractValue:{from:null,to:null},contractMinOffer:{from:null,to:null},contractMaxOffer:{from:null,to:null},contractTitle:null,lots:null,sortOrder:[],sysContractFrameworkType:{},skip:0,take:5};n.currentPage=0},n.prototype.search=function(){var n=this,t=JSON.stringify({contractNo:n.filter.contractNo,winnerTitle:n.filter.winnerTitle,winnerFiscalNumber:n.filter.winnerFiscalNumber,contractDate:n.filter.contractDate,contractValue:n.filter.contractValue,contractTitle:n.filter.contractTitle,lots:n.filter.lots});t!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=t;n.filter.sysContractFrameworkType=this.selectedContractType;n.filter.skip=n.currentPage*n.filter.take;n.isLoading=!0;n.api.GetCANoticeContracts(n.filter).then(function(t){n.items=t.items;n.totalPages=Math.ceil(t.total/n.filter.take)},function(t){n.svc.modalService.showErrorMessage(t)}).finally(function(){return n.isLoading=!1})},n.prototype.view=function(n){var t=this;if(!t.caNoticeContractViewRoute){alert("Not implemented!");return}t.caNoticeContractViewRoute&&n&&n.caNoticeContractId&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(t.caNoticeContractViewRoute,n.caNoticeContractId))},n.prototype.openElectronicContract=function(n){var t=this;n.electronicContractId?(t.svc.userService.currentUser.isCa&&(n.contractType!=null&&n.contractType!=3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.CA.ContractsCaView,n.electronicContractId)),n.contractType!=null&&n.contractType==3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.CA.ContractsCaViewSubsequent,n.electronicContractId))),t.svc.userService.currentUser.isSu&&(n.contractType!=null&&n.contractType!=3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.SU.ContractsSuView,n.electronicContractId)),n.contractType!=null&&n.contractType==3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.SU.ContractsSuViewSubsequent,n.electronicContractId))),(t.svc.userService.currentUser.isSeap||t.svc.userService.currentUser.isMon)&&(n.contractType!=null&&n.contractType!=3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.SEAP.ContractsSeapView,n.electronicContractId)),n.contractType!=null&&n.contractType==3&&(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.SEAP.ContractsSeapViewSubsequent,n.electronicContractId)))):(t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(t.contractViewRoute,n.contractId))},n.prototype.createElectronicContract=function(){var n=this},n.prototype.openElectronicContractOption=function(n){this.widgetTitle="Selectie redactare contract";this.showOptionsWindow=!0;this.canoticeContractId=n.caNoticeContractId},n.prototype.cancelContractOption=function(){this.showOptionsWindow=!1;this.canoticeContractId=null},n.prototype.saveContractOption=function(){var n=this;this.showOptionsWindow=!1;n.api.CreateElectronicContract(this.canoticeContractId,this.isOffline).then(function(t){var i=t.contractId;n.svc.nav.setBackRoute(null);n.svc.nav.pathWithParam(n.contractViewRoute,i)},function(t){n.svc.modalService.showErrorMessage(t)})},n.prototype.goToModified=function(n){var t=this;if(!t.modificationNoticesVersions){console.log("Could not navigate to modifaction notices versions - route not specified");alert("Not implemented!");return}t.svc.nav.setBackRoute(null);t.svc.nav.pathWithParamsModifNotice(t.modificationNoticesVersions,n.caNoticeContractId)},n.prototype.edit=function(n){var t=this;this.api.GetCANoticeCurrency(n.caNoticeId).then(function(i){if(i){if(!n||!n.caNoticeContractId){console.log("Error : contract | caNoticeContractId null");return}if(n.actions.canCorrectContract)t.svc.nav.setBackRoute(null),t.svc.nav.pathWithParam(sys.prv.routes.CA.CaNoticeContractCorrection_CA,n.caNoticeContractId);else if(t.caNoticeContractEditRoute)t.svc.nav.setBackRoute(null),t.svc.nav.pathWithNamedParam2(t.caNoticeContractEditRoute,":id",n.caNoticeId,":caNoticeContractId",n.caNoticeContractId);else{console.log("Could not navigate to edit contract notice - route not specified");alert("Not implemented!");return}}else t.svc.modalService.showErrorMessage(t.svc.locale.key["CANotice.Error.CurrencyIsRequired"])},function(n){return t.svc.modalService.showErrorMessage(n)})},n.prototype.delete=function(n){var i=this,t=this;t.svc.modalService.confirm(this.svc.locale.key["Common.Info.Confirm"],this.svc.locale.key["CANotice.Info.RemoveContractQuestion"]).then(function(r){r&&(t.svc.isLoading=!0,t.api.RemoveCaNoticeContract(n.caNoticeId,n.caNoticeContractId).then(function(){t.parent.init()},function(n){t.svc.modalService.showInfoMessage(n[1])}).finally(function(){i.svc.isLoading=!1}))})},n.prototype.modify=function(n){var t=this;if(!t.modificationNoticeViewRoute){alert("Not implemented!");return}t.svc.nav.setBackRoute(null);t.svc.nav.pathWithParamsModifNotice(t.modificationNoticeViewRoute,n.caNoticeContractId)},n.prototype.navEquipmentRegistry=function(n){var i=this,t=this;this.svc.isLoading=!0;this.api.ValidateDeclarationRight().then(function(r){r.hasError&&(i.svc.modalService.showErrorMessage(r.responseMessage),i.svc.isLoading=!1);r.hasError||(t.svc.userService.currentUserIsCa()&&(n.noOfEquipment==0?t.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.AddEquipmentForm_Ca,":canoticeContractId",n.caNoticeContractId,":isProcedure",0):t.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",n.caNoticeContractId,":resetFilter",0,":isProcedure",0)),t.svc.userService.currentUserIsOf()&&(n.noOfEquipment==0?t.svc.nav.pathWithNamedParam2(sys.prv.routes.SU.AddEquipmentForm_Su,":canoticeContractId",n.caNoticeContractId,":isProcedure",0):t.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",n.caNoticeContractId,":resetFilter",0,":isProcedure",0)),t.svc.userService.currentUserIsSeap()&&t.svc.nav.pathWithNamedParam3(sys.prv.routes.SEAP.EquipmentRegistryList_Su,":canoticeContractId",n.caNoticeContractId,":resetFilter",0,":isProcedure",0))},function(n){i.svc.modalService.showErrorMessage(n);i.svc.isLoading=!1}).finally(function(){i.svc.isLoading=!1})},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n}();n.Section52BContext=t;angular.module("app.controls").directive("canoticesection52b",function(){return{restrict:"E",replace:!0,scope:{context:"=",datepickeroptions:"="},templateUrl:"template/common/notices/canotices/section-5-2-b/section52b"}})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var i=function(){function n(n,t,i,r,u){this.parent=n;this.svc=t;this.api=i;this.caNoticeId=r;this.procedureId=u;var f=this}return n}(),t;n.Section52GenContractsContext=i;t=function(){function n(n){this.$scope=n;n.vm=this}return n.prototype.getContext=function(){return this.$scope.context},n.prototype.openContractsWindow=function(){var t=this,n;t.isLoading=!1;n=t.getContext();n.api.GetCANoticeCurrency(n.caNoticeId).then(function(i){i?(n.svc.isLoading=!0,n.api.GetInfoForContractGeneration(n.caNoticeId,n.procedureId).then(function(i){i&&(t.generateContracts=i,n.newGenInfoList=i.newItems,n.additionalGenInfoList=i.additionalItems,t.contractsWindow.center().open())},function(t){n.svc.modalService.showErrorMessage(t)}).finally(function(){return n.svc.isLoading=!1})):n.svc.modalService.showErrorMessage(n.svc.locale.key["CANotice.Error.CurrencyIsRequired"])},function(t){return n.svc.modalService.showErrorMessage(t)})},n.prototype.cancel=function(){var n=this;n.contractsWindow.center().close()},n.prototype.ok=function(){var n=this,t=n.getContext();if(!n.anyItemSelectedForGeneration()){t.svc.modalService.showInfoMessage(t.svc.locale.key["CANotice.Info.RequireLotOrContractSelected"]);return}n.isLoading=!0;n.getContext().svc.isLoading=!0;t.api.GenerateContracts(n.generateContracts).then(function(){n.contractsWindow.center().close();t.parent.init()},function(n){return t.svc.modalService.showErrorMessage(n)}).finally(function(){n.isLoading=!1;n.getContext().svc.isLoading=!1})},n.prototype.anyItemSelectedForGeneration=function(){var t=this,n=!1;return angular.forEach(t.generateContracts.additionalItems,function(t){t.isSelected&&(n=!0)}),n||angular.forEach(t.generateContracts.newItems,function(t){t.isSelected&&(n=!0)}),n},n.$inject=["$scope"],n}();n.CANoticeSection52GCController=t;angular.module("app.controls").directive("canoticesection52gencontracts",function(){return{restrict:"E",replace:!0,scope:{context:"="},templateUrl:"template/common/notices/canotices/section-5-2-gencontracts/section52gencontracts",controller:t,link:function(){}}})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.notices.caNotice,u=function(){function n(n,t,r,u,f,e,o,s,h,c,l,a){var p;this.parent=n;this.svc=t;this.api=r;this.procedureApi=u;this.canEdit=f;this.isPreview=e;this.item=o;this.caNoticeContractViewRoute=s;this.modificationNoticeViewRoute=h;this.modificationNoticesVersions=c;this.caNoticeContractEditRoute=l;this.contractViewRoute=a;this.currencies=[{id:1,text:"RON"},{id:2,text:"EUR"},{id:3,text:"USD"}];this.datePickerOptions={format:"dd/MM/yyyy",culture:"ro-RO",parseFormats:["yyyy-MM-ddTHH:mm:sszzz"]};var v=this,y=v.item,w=null;w=y.isUtilityContract&&y.caNoticeEdit_New_U?y.caNoticeEdit_New_U.section5:y.caNoticeEdit_New.section5;v.item.actions.canGenerateAwardingSection=v.isPreview===!1&&v.item.actions.canGenerateAwardingSection;p=v.isPreview===!1&&v.item.actions.canEditCurrency;this.section52A=new i.Section52AContext(n,t,r,w.section52A,v.currencies,p);this.section52B=new i.Section52BContext(n,t,r,v.item.caNoticeID,e,v.item,s,h,c,l,a);this.section52genContracts=new i.Section52GenContractsContext(n,t,r,v.item.caNoticeID,v.item.procedureId);this.lotListCancelledContext=new i.LotListCancelledContext(n,t,r,v.procedureApi,v.item.caNoticeID,v.item.procedureId,e,v.item.conditions.hasLots,v.item)}return n}(),r;t.AwardingSectionContext=u;r=function(){function n(n){this.$scope=n;this.generateAwardingSection_executing=!1;this.isAddingContract=!1;n.vm=this;this.isLoading=!1}return Object.defineProperty(n.prototype,"context",{get:function(){return this.$scope.context},enumerable:!0,configurable:!0}),n.prototype.generateAwardingSection=function(){var n=this;n.generateAwardingSection_executing||n.context.svc.modalService.confirm(n.context.svc.locale.key["CANotice.Info.ConfirmGenerateAwardingSectionTitle"],n.context.svc.locale.key["CANotice.Info.ConfirmGenerateAwardingSection"]).then(function(t){t&&(n.generateAwardingSection_executing=!0,n.context.svc.isLoading=!0,n.context.api.GenerateAwardingSection(n.context.item.caNoticeID).then(function(){n.generateAwardingSection_executing=!1;n.context.svc.isLoading=!1;n.context.parent.init()},function(t){n.generateAwardingSection_executing=!1;n.context.svc.isLoading=!1;n.context.svc.modalService.showErrorMessage(t)}))})},n.prototype.addContract=function(n){var t=this,i;t.isAddingContract=!0;i=t.context.api.GetCANoticeCurrency(t.context.item.caNoticeID).then(function(i){i?t.addNewCaNoticeContractWithoutCurrencyCheck(n):t.context.svc.modalService.showErrorMessage(t.context.svc.locale.key["CANotice.Error.CurrencyIsRequired"])},function(n){return t.context.svc.modalService.showErrorMessage(n)}).finally(function(){return t.isAddingContract=!1})},n.prototype.addNewCaNoticeContractWithoutCurrencyCheck=function(n){var t=this;t.context.svc.isLoading=!0;t.context.api.AddCaNoticeContract(t.context.item.caNoticeID,n).then(function(){t.context.svc.modalService.showMessage("Info",t.context.svc.locale.key["CANotice.Info.ContractAssignedSuccessfully"]);t.context.parent.init()},function(n){t.context.svc.modalService.showValidationResult(n)}).finally(function(){t.context.svc.isLoading=!1})},n.$inject=["$scope"],n}();t.AwardingSectionController=r;angular.module("app.controls").directive("awardingSectionType1",function(){return{restrict:"E",replace:!0,scope:{context:"="},templateUrl:"template/common/notices/canotices/awarding/awarding-section-type-1/awarding-section",controller:r,link:function(){}}})})(i=t.caNotice||(t.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){var n=this;if(sys.prv.routes.CA){var t=sys.prv.routes.CA.ContractAwardNoticeList_Ca,i=sys.prv.routes.CA.ContractAwardNoticeList_Ca,r=sys.prv.routes.CA.ContractAwardNoticeList_Ca,u=sys.prv.routes.CA.ContractAwardNoticeList_Ca,f=sys.prv.routes.CA.ContractAwardNoticeList_Ca;t.route=t.route.replace(":noticeTypeId",3).replace(":resetFilter",0);i.route=i.route.replace(":noticeTypeId",8).replace(":resetFilter",0);r.route=r.route.replace(":noticeTypeId",16).replace(":resetFilter",0);u.route=u.route.replace(":noticeTypeId",13).replace(":resetFilter",0);f.route=f.route.replace(":noticeTypeId",18).replace(":resetFilter",0);n.AC={C:{CANotice:{getListRoute:function(){return t},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_PREVIEW_C,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_C_V1,t)},getEditRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_Edit_C,t)}}},DC:{CANotice:{getListRoute:function(){return i},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_PREVIEW_DC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_DC_OLD,t)},getEditRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_Edit_DC,t)}}},PC:{CANotice:{getListRoute:function(){return r},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_PREVIEW_PC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_PC_OLD,t)},getEditRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_Edit_PC,t)}}},RFQ:{CANotice:{getListRoute:function(){return u},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_PREVIEW_RFQ,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_RFQ_V1,t)},getEditRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_Edit_RFQ,t)}}},SNC:{CANotice:{getListRoute:function(){return f},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_SNC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_VIEW_SCN_V1,t)},getEditRoute:function(t){return n.getRouteWithParam(sys.prv.routes.CA.CANOTICE_CA_Edit_SNC,t)}}}}}sys.prv.routes.SEAP&&(t=sys.prv.routes.SEAP.ContractAwardNoticeList_Mon,i=sys.prv.routes.SEAP.ContractAwardNoticeList_Mon,r=sys.prv.routes.SEAP.ContractAwardNoticeList_Mon,u=sys.prv.routes.SEAP.ContractAwardNoticeList_Mon,f=sys.prv.routes.SEAP.ContractAwardNoticeList_Mon,t.route=t.route.replace(":noticeTypeId",3).replace(":resetFilter",0),i.route=i.route.replace(":noticeTypeId",8).replace(":resetFilter",0),r.route=r.route.replace(":noticeTypeId",16).replace(":resetFilter",0),u.route=u.route.replace(":noticeTypeId",13).replace(":resetFilter",0),f.route=f.route.replace(":noticeTypeId",18).replace(":resetFilter",0),n.ANRMAP={C:{CANotice:{getListRoute:function(){return t},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_C,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_C_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},DC:{CANotice:{getListRoute:function(){return i},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_DC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_DC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},PC:{CANotice:{getListRoute:function(){return r},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_PC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_PC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},RFQ:{CANotice:{getListRoute:function(){return u},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_RFQ,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_RFQ_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},SNC:{CANotice:{getListRoute:function(){return f},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_SNC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_SNC,t)},getEditRoute:function(){throw new Error("Not implemented");}}}},t=sys.prv.routes.SEAP.ContractAwardNoticeList_Seap,i=sys.prv.routes.SEAP.ContractAwardNoticeList_Seap,r=sys.prv.routes.SEAP.ContractAwardNoticeList_Seap,u=sys.prv.routes.SEAP.ContractAwardNoticeList_Seap,f=sys.prv.routes.SEAP.ContractAwardNoticeList_Seap,t.route=t.route.replace(":noticeTypeId",3).replace(":resetFilter",0),i.route=i.route.replace(":noticeTypeId",8).replace(":resetFilter",0),r.route=r.route.replace(":noticeTypeId",16).replace(":resetFilter",0),u.route=u.route.replace(":noticeTypeId",13).replace(":resetFilter",0),f.route=f.route.replace(":noticeTypeId",18).replace(":resetFilter",0),n.SEAP={C:{CANotice:{getListRoute:function(){return t},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_C,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_C_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},DC:{CANotice:{getListRoute:function(){return i},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_View_DC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_DC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},PC:{CANotice:{getListRoute:function(){return r},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_View_PC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_PC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},RFQ:{CANotice:{getListRoute:function(){return u},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_RFQ,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_RFQ_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},SNC:{CANotice:{getListRoute:function(){return f},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_SNC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_SNC,t)},getEditRoute:function(){throw new Error("Not implemented");}}}});sys.prv.routes.SU?(t=sys.prv.routes.SU.ContractAwardNoticeList_Su,i=sys.prv.routes.SU.ContractAwardNoticeList_Su,r=sys.prv.routes.SU.ContractAwardNoticeList_Su,u=sys.prv.routes.SU.ContractAwardNoticeList_Su,f=sys.prv.routes.SU.ContractAwardNoticeList_Su,t.route=t.route.replace(":noticeTypeId",3).replace(":resetFilter",0),i.route=i.route.replace(":noticeTypeId",8).replace(":resetFilter",0),r.route=r.route.replace(":noticeTypeId",16).replace(":resetFilter",0),u.route=u.route.replace(":noticeTypeId",13).replace(":resetFilter",0),f.route=f.route.replace(":noticeTypeId",18).replace(":resetFilter",0),n.SU={C:{CANotice:{getListRoute:function(){return t},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_C,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_C_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},DC:{CANotice:{getListRoute:function(){return i},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_View_DC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_DC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},PC:{CANotice:{getListRoute:function(){return r},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_View_PC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_PC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},RFQ:{CANotice:{getListRoute:function(){return u},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_RFQ,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_RFQ_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},SNC:{CANotice:{getListRoute:function(){return f},getViewRoute:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_SNC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.prv.routes.SU.CANOTICE_SU_VIEW_SNC,t)},getEditRoute:function(){throw new Error("Not implemented");}}}}):(t=sys.pub.routes.ContractAwardNoticeList_Pub,i=sys.pub.routes.ContractAwardNoticeList_Pub,r=sys.pub.routes.ContractAwardNoticeList_Pub,u=sys.pub.routes.ContractAwardNoticeList_Pub,f=sys.pub.routes.ContractAwardNoticeList_Pub,t.route=t.route.replace(":noticeTypeId",3).replace(":resetFilter",0),i.route=i.route.replace(":noticeTypeId",8).replace(":resetFilter",0),r.route=r.route.replace(":noticeTypeId",16).replace(":resetFilter",0),u.route=u.route.replace(":noticeTypeId",13).replace(":resetFilter",0),f.route=f.route.replace(":noticeTypeId",18).replace(":resetFilter",0),n.SU={C:{CANotice:{getListRoute:function(){return t},getViewRoute:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_C,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_C_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},DC:{CANotice:{getListRoute:function(){return i},getViewRoute:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_View_DC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_DC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},PC:{CANotice:{getListRoute:function(){return r},getViewRoute:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_PC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_PC_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},RFQ:{CANotice:{getListRoute:function(){return u},getViewRoute:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_RFQ,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_RFQ_OLD,t)},getEditRoute:function(){throw new Error("Not implemented");}}},SNC:{CANotice:{getListRoute:function(){return f},getViewRoute:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_SNC,t)},getViewRouteOld:function(t){return n.getRouteWithParam(sys.pub.routes.CANOTICE_PUB_VIEW_SNC_V1,t)},getEditRoute:function(){throw new Error("Not implemented");}}}})}return n.prototype.getRouteWithParam=function(n,t){var i=angular.copy(n);return i.route=i.route.replace(":id",t),i},n.$inject=[],n}();n.RouteManager=t;angular.module("app.controls").service("RouteManager",function(){return new t})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this.parent=n;this.svc=t;this.api=i;this.caNoticeId=r;this.routeManager=u;var f=this;f.load()}return n.prototype.load=function(){var n=this;n.getAllVersions()},n.prototype.getAllVersions=function(){var n=this;n.svc.isLoading=!0;n.api.GetAllVersions(n.caNoticeId).then(function(t){n.versions=t},function(t){n.svc.log.info("getAllVersions error:"+t)}).finally(function(){n.svc.isLoading=!1})},n.prototype.navigateToDetail=function(n){var t=this,i;if(n==null){console.error("Cannot navigate to detail - notice is null");return}i=n.sysNoticeVersion&&n.sysNoticeVersion.id===1?t.routeManager.CANotice.getViewRouteOld(n.caNoticeID):t.routeManager.CANotice.getViewRoute(n.caNoticeID);this.svc.nav.path(i)},n.prototype.removeVersion=function(n){var i=this,t=this;if(n==null){console.log("ERROR : cannot navigate to detail - notice is null");return}t.svc.modalService.confirm(t.svc.locale.key["Common.Info.Confirm"],t.svc.locale.key["CANotice.Info.DeleteCANoticeQuestion"]).then(function(r){r&&(t.svc.isLoading=!0,t.api.Delete(n.caNoticeID).then(function(){var r,n,u,f;t.svc.modalService.showMessage("Info",i.svc.locale.key["CANotice.Info.CaNoticeDeleted"]);r=t.versions;r==null?t.svc.nav.path(t.routeManager.CANotice.getListRoute()):(n=t.firstOrDefault(t.versions,function(n){return n.sysNoticeState.id!=1}),n==null?t.svc.nav.path(t.routeManager.CANotice.getListRoute()):n.caNoticeID==t.caNoticeId?t.parent.init():n.sysNoticeVersion&&n.sysNoticeVersion.id==1?(u=t.routeManager.CANotice.getViewRouteOld(n.caNoticeID),t.svc.nav.path(u)):(f=t.routeManager.CANotice.getViewRoute(n.caNoticeID),t.svc.nav.path(f)))},function(n){t.svc.log.error("CA Notice delete error:"+n);t.svc.modalService.showValidationResult(n);t.parent.init()}).finally(function(){t.svc.isLoading=!1}))})},n.prototype.firstOrDefault=function(n,t){var u,i,r;if(!n)return null;for(u=null,i=0;i<n.length;i++)if(r=n[i],t(r))return r;return null},n.prototype.any=function(n,t){return!this.firstOrDefault(n,t)},n}();n.SectionVersionsContext=t;angular.module("app.controls").directive("canoticeversions",function(){return{restrict:"E",replace:!0,scope:{context:"="},templateUrl:"template/common/notices/canotices/section-versions/versions"}})})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.$scope=n;this.svc=t;this.api=i;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getSection1View(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.model=t}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.Section1CommonController=t;angular.module("app.controls").directive("section1CommonView",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/common/section1/section1view",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){var r=this;this.$scope=n;this.svc=t;this.api=i;this.getSortingIcon=function(n,t,i){return r.lotsFilter.sortProperty===n?r.lotsFilter.descending?i:t:""};this.changeSorting=function(n){r.lotsFilter.sortProperty===n?r.lotsFilter.descending=!r.lotsFilter.descending:(r.lotsFilter.sortProperty=n,r.lotsFilter.descending=!1);r.searchLots()};n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.lotsFilter={sortProperty:"no",pageSize:5,descending:!1,initNoticeId:this.initNoticeId,sysNoticeTypeId:this.sysNoticeTypeId};this.lotsGridRebind=!1;this.isLotListLoading=!1;this.svc.isLoading=!0;this.api.Common.getSection21View(this.initNoticeId,this.sysNoticeTypeId,this.svc.noticeGeneralInfo.dfNoticeId).then(function(t){n.model=t;n.model.hasLots&&n.searchLots()}).finally(function(){n.svc.isLoading=!1})},n.prototype.searchLots=function(){var t=this,n=this,i=JSON.stringify({lotNameOrNumber:n.lotsFilter.lotNameOrNumber,cpvCode:n.lotsFilter.cpvCode,estimatedValueFrom:n.lotsFilter.estimatedValueFrom,estimatedValueTo:n.lotsFilter.estimatedValueTo});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.lotsFilter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getSection22LotList(this.lotsFilter).then(function(i){t.lotList=i.items;t.totalPages=Math.ceil(i.total/n.lotsFilter.pageSize)}).finally(function(){t.svc.isLoading=!1})},n.prototype.search=function(){this.lotsFilter.pageIndex=0;this.currentPage=0;this.searchLots()},n.prototype.resetLots=function(){this.searchLots()},n.prototype.resetFilterLots=function(){this.lotsFilter.lotNameOrNumber=null;this.lotsFilter.cpvCode=null;this.lotsFilter.estimatedValueFrom=null;this.lotsFilter.estimatedValueTo=null;this.lotsFilter.sortProperty="no";this.lotsFilter.descending=!1;this.lotsFilter.cpvCode=null;this.searchLots()},n.prototype.viewLotWindow=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.getSection22View(this.initNoticeId,this.sysNoticeTypeId,n,this.svc.noticeGeneralInfo.dfNoticeId).then(function(n){t.selectedLotForView=n;t.viewNoticeLotWindow.center().open()}).finally(function(){t.svc.isLoading=!1})},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.searchLots())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.Section2CommonController=t;angular.module("app.controls").directive("section2CommonView",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@",dfNotice:"@"},templateUrl:"template/common/notices/common/section2/section2view",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(){"use strict";angular.module("app.controls").directive("commonSection22View",function(){return{restrict:"E",replace:!0,scope:{lot:"=",noticeHasLots:"=",messageToShowInSection:"="},templateUrl:"template/common/notices/common/section2/section22view",link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.$scope=n;this.svc=t;this.api=i;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getSection3View(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.model=t}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.Section3CommonController=t;angular.module("app.controls").directive("section3CommonView",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/common/section3/section3view",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.$scope=n;this.svc=t;this.api=i;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getSection4View(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.model=t}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.Section4CommonController=t;angular.module("app.controls").directive("section4CommonView",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/common/section4/section4view",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.$scope=n;this.svc=t;this.api=i;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getSection6View(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.model=t}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.Section6CommonController=t;angular.module("app.controls").directive("section6CommonView",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/common/section6/section6view",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(){"use strict";angular.module("app.controls").directive("commonNoticeEntityAddressView",function(){return{restrict:"E",replace:!0,scope:{address:"="},templateUrl:"template/common/notices/common/noticeEntityAddressView/noticeEntityAddressView",link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/NoticeCommon";this.apiNotice="api/NoticeCommon";this.procedureApi="api/Procedure";this.dfNoticeApi="api/DFNotice"}return __extends(t,n),t.prototype.DownloadNoticeDocument=function(n){return this.DOWNLOAD_GET(this.api+"/DownloadNoticeDocument/",null,{documentId:n})},t.prototype.getSection1View=function(n,t){return this.GET(this.api+"/GetSection1View/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getSection21View=function(n,t,i){return this.GET(this.api+"/GetSection21View/",{initNoticeId:n,sysNoticeTypeId:t,dfNoticeId:i})},t.prototype.getSection22View=function(n,t,i,r){return this.GET(this.api+"/GetSection22LotView/",{initNoticeId:n,sysNoticeTypeId:t,noticeLotId:i,dfNoticeId:r})},t.prototype.getSection22LotList=function(n){return this.POST(this.api+"/GetSection22LotList/",n)},t.prototype.getSection3View=function(n,t){return this.GET(this.api+"/GetSection3View/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getSection4View=function(n,t){return this.GET(this.api+"/GetSection4View/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getSection6View=function(n,t){return this.GET(this.api+"/GetSection6View/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getPrintDocument=function(n,t,i){return this.DOWNLOAD(this.api+"/GetPrintDocument/",null,{initNoticeId:n,sysNoticeTypeId:t,dfNoticeId:i})},t.prototype.getNumberOfLots=function(n,t){return this.GET(this.api+"/GetNumberOfLots/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getNumberOfLotsCaNotice=function(n,t){return this.GET(this.api+"/GetNumberOfLotsCaNotice/",{canoticeId:n,sysNoticeTypeId:t})},t.prototype.getCANoticePrintDocument=function(n,t){return this.DOWNLOAD(this.api+"/GetCANoticePrintDocument/",null,{canoticeId:n,sysNoticeTypeId:t})},t.prototype.getENoticePrintDocument=function(n){return this.DOWNLOAD(this.api+"/GetENoticePrintDocument/",null,{enoticeId:n})},t.prototype.getPiNoticePrintDocument=function(n){return this.DOWNLOAD(this.api+"/GetPiNoticePrintDocument/",null,{pinoticeId:n})},t.prototype.getCANoticePrintDocument_V1=function(n,t){return this.DOWNLOAD(this.api+"/getCANoticePrintDocument_V1/",null,{caNoticeId:n,sysNoticeTypeId:t})},t.prototype.getNoticePrintDocument_V1=function(n,t){return this.DOWNLOAD(this.api+"/GetNoticePrintDocument_V1/",null,{noticeId:n,sysNoticeTypeId:t})},t.prototype.getNoticePrintFrame_V1=function(n,t){return this.GET(this.api+"/GetNoticePrintFrame_V1/",{noticeId:n,sysNoticeTypeId:t})},t.prototype.getPDF_V1=function(n,t){return this.GET(this.api+"/GetPDF_V1/",{noticeId:n,sysNoticeTypeId:t})},t.prototype.getPdfNoticeChange=function(n){return this.DOWNLOAD("api-pub/ENotice/GetPdfNoticeChange/",n)},t.prototype.GetChangeNoticeView=function(n){return this.POST("api-pub/ENotice/GetNoticeChangeView/",n)},t.prototype.getNoticeHistory=function(n,t){return this.GET(this.api+"/GetNoticeHistory/",{noticeId:n,sysNoticeTypeId:t})},t.prototype.getNutsCodes=function(){return this.GET(this.api+"/GetNutsCodes/")},t.prototype.getNoticeList=function(n){return this.POST(this.api+"/GetCNoticeList/",n)},t.prototype.getNoticeListFiltered=function(n){return this.POST(this.api+"/GetCNoticeListFiltered/",n)},t.prototype.getNoticeListCountFiltered=function(n){return this.POST(this.api+"/GetNoticeListCountFiltered/",n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/GetExportDocument/",n,{exportType:t})},t.prototype.getCAExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/GetCaNoticeExportDocument/",n,{exportType:t})},t.prototype.getAssignedUsers=function(){return this.GET(this.api+"/GetAssignedUsers/")},t.prototype.createNotice=function(n,t){return this.POST(this.api+"/CreateContractNotice/?dfNoticeId="+n+"&noticeTypeId="+t)},t.prototype.saveNotice=function(n){return this.POST(this.api+"/SaveNotice",n)},t.prototype.getNoticeStickyData=function(n){return this.GET(this.api+"/GetNoticeStickyData/",{noticeId:+n})},t.prototype.getNoticeGeneralInfo=function(n){return this.GET(this.api+"/GetNoticeGeneralInfo/",{noticeId:+n})},t.prototype.checkIfNoticeIsSentToJoueAutomatically=function(n){return this.GET(this.api+"/CheckIfSendableToJoue/",{noticeId:n})},t.prototype.getSpentValueFromDfNotice=function(n){return this.GET(this.api+"/GetSpentValueFromDfNotice/",{noticeId:n})},t.prototype.getEstimatedValueCurrencyFromDfNotice=function(n){return this.GET(this.api+"/GetEstimatedValueCurrencyFromDfNotice/",{noticeId:n})},t.prototype.getPriceCurrencies=function(){return this.GET(this.api+"/GetPriceCurrencies")},t.prototype.getNoticeEdit=function(n){return this.GET(this.api+"/GetNoticeEdit/",{noticeId:n})},t.prototype.getRfqInvitationSadView=function(n){return this.GET(this.api+"/GetRfqInvitationSadView/",{noticeId:n})},t.prototype.getSection1=function(n){return this.GET(this.api+"/GetSection1ForEdit/",{noticeId:n})},t.prototype.saveNoticeMainAddress=function(n){return this.POST(this.api+"/SaveNoticeMainAddress/",n)},t.prototype.deleteNotice=function(n){return this.GET(this.api+"/DeleteNotice/",{noticeId:n})},t.prototype.getSysProcedureTypeForNotice=function(n){return this.GET(this.api+"/GetSysProcedureTypeForNotice/",{noticeId:n})},t.prototype.unassociatePlanDetail=function(n){return this.POST(this.api+"/UnassociatePlanDetail/",n)},t.prototype.savePAAPSpentValue=function(n){return this.POST(this.api+"/SavePAAPSpentValue/",n)},t.prototype.assignUser=function(n,t){return this.GET(this.api+"/AssignUser/",{noticeId:n,assignedUserId:t})},t.prototype.getDfNoticeSectionFiles=function(n,t){return this.GET(this.api+"/GetDfNoticeSectionFiles/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.getCaNoticeList=function(n){return this.POST(this.api+"/GetCANoticeList/",n)},t.prototype.getCaNoticeListFiltered=function(n){return this.POST(this.api+"/GetCNoticeListFiltered/",n)},t.prototype.getCaNoticeListCountFiltered=function(n){return this.POST(this.api+"/GetNoticeListCountFiltered/",n)},t.prototype.getSuEnrolledCounter=function(){return this.GET(this.api+"/getSuEnrolledCounter/")},t.prototype.getSuDeadlineCounter=function(){return this.GET(this.api+"/getSuDeadlineCounter/")},t.prototype.getCaDeadlineCounter=function(){return this.GET(this.api+"/getCaDeadlineCounter/")},t.prototype.validateCNoticeForSAD=function(n){return this.POST(this.api+"/ValidateCNoticeForSAD",n)},t.prototype.requestProcedureMove=function(n,t){return this.GET(this.api+"/RequestProcedureMove/",{noticeId:n,sysNoticeTypeId:t})},t.prototype.checkIfRequestAlreadyMade=function(n,t){return this.GET(this.api+"/CheckIfRequestAlreadyMade/",{noticeId:n,sysNoticeTypeId:t})},t.prototype.getNoticeIdFromSpecializedNoticeId=function(n,t){return this.GET(this.api+"/GetNoticeIdFromSpecializedNoticeId/",{specializedNoticeId:n,sysNoticeTypeId:t})},t.prototype.checkIfAqfIsGenerated=function(n){return this.GET(this.api+"/CheckIfAqfIsGenerated/",{procedureId:n})},t.prototype.generateAQFRequest=function(n,t){return this.POST(this.procedureApi+"/GenerateAQFRequest/?id="+n,t)},t.prototype.checkIfEuMonHasPermission=function(n){return this.GET(this.procedureApi+"/CheckIfEuMonHasPermission/",{noticeId:n})},t.prototype.checkIfEuMonHasPermission_History=function(n){return this.GET(this.procedureApi+"/CheckIfEuMonHasPermission/",{noticeId:n,isHistory:1})},t.prototype.canAddAddress=function(n){return this.GET(this.api+"/CanAddAddress/",{noticeId:n})},t.prototype.getArchiveStatus=function(n,t){return this.GET(this.api+"/GetArchiveStatus/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.addArchiveForNotice=function(n,t){return this.GET(this.api+"/AddArchiveForNotice/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.downloadArchive=function(n,t){return this.DOWNLOAD_GET(this.api+"/DownloadArchive/",null,{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.verifyAndPublishRfqInvSad=function(n){return this.POST(this.api+"/VerifyAndPublishRfqInvSad",n)},t.prototype.checkFulfilledRequirement=function(n,t,i){return this.POST(this.apiNotice+"/CheckFulfilledRequirement/?supplierId="+n+"&lotId="+i,t)},t.prototype.getProcedurePdfDocuments=function(n,t){return this.POST(this.apiNotice+"/GetProcedurePdfDocuments/?procedureId="+n,t)},t.prototype.GetAllECatalogItems=function(n){return this.POST(this.dfNoticeApi+"/GetAllECatalogItems/",n)},t.prototype.saveQuantityForCatalogItem=function(n){return this.POST(this.apiNotice+"/SaveQuantityForCatalogItem/",n)},t}(sys.HttpApi),r=function(n){function t(t,i){n.call(this,t,i);this.api="api/NoticeCommon";this.apiPub="api-pub/NoticeCommon"}return __extends(t,n),t.prototype.addAdditionalCaAddress=function(n){return this.POST(this.api+"/AddAdditionalCaAddress/",n)},t.prototype.removeAdditionalCaAddress=function(n){return this.GET(this.api+"/RemoveAdditionalCaAddress/",{noticeEntityAddressId:n})},t.prototype.getAcAddressList=function(n){return this.POST(this.apiPub+"/GetAcAddressList/",n)},t.prototype.getEntityAddressList=function(n){return this.GET(this.api+"/GetEntityAddressList/",{entityId:n})},t}(sys.HttpApi),u=function(n){function t(t,i){n.call(this,t,i);this.api="api/NoticeCommon"}return __extends(t,n),t.prototype.checkFulfilledRequirement=function(n,t,i){return this.POST(this.api+"/CheckFulfilledRequirement/?supplierId="+n+"&lotId="+i,t)},t.prototype.checkOtherRequirement=function(n,t,i,r,u,f){return this.POST(this.api+"/CheckOtherRequirement/?dfnoticeLeftCriteriaId="+n+"&procedureEvaluationId="+t+"&supplierId="+i+"&procedureLotId="+r+"&procedureId="+u,f)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Section1",{get:function(){return new r(this.$http,this.$q)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Duae",{get:function(){return new u(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.NoticeCommonApi=t;angular.module("app.controls").service("NoticeCommonApi",t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/NoticeDocument";this.procedureApi="api/Procedure";this.apiProcedure="api-pub/PUBLICProcedure"}return __extends(t,n),t.prototype.getAll=function(n){return this.POST(this.api+"/GetAll/",n)},t.prototype.getProcedureLotQuestions=function(n){return this.POST(this.api+"/GetProcedureLotQuestions/",n)},t.prototype.saveNoticeDocument=function(n){return this.POST(this.api+"/saveNoticeDocument/",n)},t.prototype.needsValidation=function(n){return this.POST(this.api+"/NeedsValidation/",n)},t.prototype.addAvizDocument=function(n){return this.POST(this.api+"/AddAvizDocument/",n)},t.prototype.addConciliation=function(n){return this.POST(this.api+"/AddConciliation/",n)},t.prototype.modifyAndPublishDoc=function(n){return this.POST(this.api+"/ModifyAndPublishDoc/",n)},t.prototype.publishWithoutModifDoc=function(n){return this.POST(this.api+"/PublishWithoutModifDoc/",n)},t.prototype.noticeInfoForProcedure=function(n){return this.GET(this.api+"/NoticeInfoForProcedure/",{procedureid:n})},t.prototype.checkUserToAddDoc=function(n,t){return this.GET(this.api+"/CheckUserToAddDoc/",{initNoticeId:n,sysNoticeTypeId:t})},t.prototype.rollbackDfNoticeModification=function(n){return this.POST(this.api+"/RollbackDfNoticeModification/?id="+n)},t.prototype.generateErata=function(n){return this.POST(this.api+"/GenerateErata/"+n)},t.prototype.getConsolidateAnswers=function(n){return this.POST(this.api+"/GetConsolidateAnswers/",n)},t.prototype.associateAnswer=function(n,t){return this.POST(this.api+"/AssociateAnswer/?id="+n,t)},t.prototype.disassociateAnswer=function(n){return this.POST(this.api+"/DisassociateAnswer/",n)},t.prototype.GetPUBLICProcedureView=function(n,t){return this.GET(this.apiProcedure+"/GetProcedureView/?procedureId="+n+"&procedureLotId="+t)},t.prototype.getProcedurePdfDocuments=function(n,t){return this.POST(this.procedureApi+"/GetProcedurePdfDocuments/?procedureId="+n,t)},t.prototype.getEvaluationTypes=function(){return this.GET(this.procedureApi+"/GetEvaluationTypes/")},t.prototype.getEvaluationPhases=function(){return this.GET(this.procedureApi+"/GetEvaluationPhases/")},t.prototype.getEvaluationLots=function(n){return this.GET(this.procedureApi+"/GetEvaluationLots/?procedureId="+n)},t.prototype.getEvaluationDocumentTypes=function(){return this.GET(this.procedureApi+"/GetEvaluationDocumentTypes/")},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.NoticeDocumentApi=t;angular.module("app.controls").service("NoticeDocumentApi",t)})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.datePickerOptions={format:"dd/MM/yyyy",culture:"ro-RO",parseFormats:["yyyy-MM-ddTHH:mm:sszzz"]};this.avizModel={};this.files=[];this.docFileExtension="doc,pdf,docx,p7s,p7m";this.docMaxSize=this.svc.configService.cfg.DocumentMaxSize;this.uploadAvizDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.avizModel.fileModel=t;$("#uploadAvizDoc").val("")},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};this.modifiedAviz={};this.uploaModifydAvizDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.modifiedAviz={fileModel:t}},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};this.showViewEditAviz=!1;this.showViewAviz=!1;this.showEditAviz=!1;this.avizViewEdit=[];this.isForConciliation=!1;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;r.$on("saveNoticeDocument",function(){f.noticedocumentEditWindow.close();f.search()});r.$on("closeEditWindow",function(){f.noticedocumentEditWindow.close()});this.init()}return n.prototype.init=function(){var n=this;this.filter={sortProperty:"transmissionDate",pageSize:5,pageIndex:0,initNoticeId:this.initNoticeId,sysNoticeTypeId:this.sysNoticeTypeId,procedureId:null,sysNoticeDocumentState:null,sysNoticeDocumentType:null,sysValidationDocType:null,noticeDocumentPostDateFrom:null,noticeDocumentPostDateTo:null,sortProperties:null,sadId:null};this.isListLoading=!1;this.setValidPageSizes();this.search();this.api.Common.checkUserToAddDoc(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.canAddDocument=t})},n.prototype.addNoticeDocument=function(n){n==!0&&(this.newTitle="Adaugare raspuns consolidat/contestatie/decizie");n==!1&&(this.newTitle="Adaugare clarificare");this.noticedocumentEditWindow.center().open();this.$rootScope.$broadcast("addNoticeDocument",{showAllDocuments:n,newTitle:this.newTitle})},n.prototype.openFileInput=function(){angular.element("#uploadAvizDoc").click()},n.prototype.openModifyFileInput=function(){angular.element("#uploaModifydAvizDoc").click()},n.prototype.deleteDocument=function(){this.avizModel.fileModel=null},n.prototype.deleteModifyDoc=function(){this.modifiedAviz.fileModel=null},n.prototype.addAvizDocument=function(){var n=this;this.avizModel.initNoticeId=this.initNoticeId;this.avizModel.sysNoticeTypeId=this.sysNoticeTypeId;this.avizModel.noticeDocumentId=this.noticeDocumentId;this.validationMessage2=this.svc.userService.culture=="ro-RO"?"Va rugam confirmati actiunea!":"Please confirm action!";this.avizModel.sysValidationDocType!=null&&this.avizModel.sysValidationDocType.id==2&&(this.validationMessage1=this.svc.userService.culture=="ro-RO"?"Atentie! Avizul conform conditionat implica respingerea documentului transmis de autoritatea contractanta spre validare! Autoritatea contractanta va putea fie sa modifice documentul si sa-l publice, fie sa-l publice fara nici o modificare.":"Attention! The conditional approval implies the rejection of the document sent by the contracting authority for validation! The contracting authority may either amend the document and publish it, or publish it without modification.");this.avizModel.sysValidationDocType!=null&&this.avizModel.sysValidationDocType.id==1&&(this.validationMessage1=this.svc.userService.culture=="ro-RO"?"Atentie! Avizul conform neconditionat implica publicarea automata a documentului. Nu veti mai putea emite un alt aviz pentru acesta.":"Attention! The unconditional approval implies automatic publication of the document. You will not be able to emit another approval for this.");this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],this.validationMessage1,"",this.validationMessage2).then(function(t){t&&(n.svc.isLoading=!0,n.isForConciliation==!0?n.api.Common.addConciliation(n.avizModel).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.showAddAviz=!1;n.avizModel=null;n.svc.nav.reload()},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}):n.api.Common.addAvizDocument(n.avizModel).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.showAddAviz=!1;n.avizModel=null;n.svc.nav.reload()},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})},n.prototype.modifyAvizAndPublish=function(n){var t=this,i,r;n!=null&&(n.comment!=null&&(this.modifiedAviz.comment=n.comment),n.newDocumentName!=null&&(this.modifiedAviz.newDocumentName=n.newDocumentName),n.noticeDocumentId!=null&&(this.modifiedAviz.noticeDocumentId=n.noticeDocumentId),n.sysValidationDocType!=null&&(this.modifiedAviz.sysValidationDocType=n.sysValidationDocType),n.sysNoticeDocumentType!=null&&(this.modifiedAviz.sysNoticeDocumentType=n.sysNoticeDocumentType),this.modifiedAviz.initNoticeId=this.initNoticeId,i=this.svc.userService.culture=="ro-RO"?"Atentie! Va rugam sa va asigurati ca ati inclus toate observatiile primite prin avizul conform conditionat. Documentul se va publica imediat fara a mai fi retrimis la ANAP pentru revalidare.":"Attention! Please make sure that you included all of the observations received through conditional notice. The document will be published immediately without being sent back to ANAP for revalidation.",r=this.svc.userService.culture=="ro-RO"?"Va rugam confirmati publicarea!":"Please confirm publication!",this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],i,"",r).then(function(n){n&&(t.svc.isLoading=!0,t.api.Common.modifyAndPublishDoc(t.modifiedAviz).then(function(n){n==1&&(t.svc.modalService.showSuccessMessages(t.svc.locale.key["Common.Info.SavedSuccessfully"]),t.showViewEditAviz=!1,t.showEditAviz=!1,t.showViewAviz=!1,t.modifiedAviz=null,t.search())},function(n){t.svc.modalService.showValidationResult(n)}).finally(function(){t.svc.isLoading=!1}))}))},n.prototype.publishWithoutModif=function(n){var t=this,i,r;n!=null&&(this.modifiedAviz=n,this.modifiedAviz.initNoticeId=this.initNoticeId,n.sysNoticeDocumentType!=null&&(this.modifiedAviz.sysNoticeDocumentType=n.sysNoticeDocumentType),i=this.svc.userService.culture=="ro-RO"?"Atentie! Intrucat ati primit aviz conform conditionat va recomandam sa tineti seama de observatiile ANAP, in caz contrar va asumati riscurile care decurg din prevederile legale!":"Attention! As you have received a conditional notice, we recommend that you take into account the observations of ANAP, otherwise you assume the risks arising from the legal provisions!",r=this.svc.userService.culture=="ro-RO"?"Sunteti sigur ca doriti publicarea documentului fara nici o modificare?":"Are you sure you want to publish the document without any changes?",this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],i,"",r).then(function(n){n&&(t.svc.isLoading=!0,t.api.Common.publishWithoutModifDoc(t.modifiedAviz).then(function(n){n==1&&(t.svc.modalService.showSuccessMessages(t.svc.locale.key["Common.Info.SavedSuccessfully"]),t.svc.nav.reload(),t.svc.isLoading=!1)},function(n){t.svc.modalService.showValidationResult(n)}).finally(function(){t.svc.isLoading=!1}))}))},n.prototype.viewAviz=function(n){this.showViewEditAviz=!0;this.showViewAviz=!0;this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.avizViewEdit=n.approvalList;this.buildAvizTitleWidget()},n.prototype.cancelViewEdit=function(){this.showViewEditAviz=!1;this.showViewAviz=!1;this.showEditAviz=!1;this.modifiedAviz=null;this.avizViewEdit=[]},n.prototype.editAviz=function(n,t){var i=this;if(n!=null&&n.sysNoticeDocumentType!=null&&n.sysNoticeDocumentType.id===39){var r=t?this.locale.key["Common.Info.ModifyExtendTermsMessage1"]:this.locale.key["Common.Info.ModifyDfNoticeMessage"],u=t?this.locale.key["Common.Info.ModifyExtendTermsMessage2"]:this.locale.key["Common.Info.ModifyDfNoticeMessage2"],f=t?this.locale.key["Common.Info.ModifyExtendTermsMessage3"]:this.locale.key["Common.Info.ModifyDfNoticeMessage3"];this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],r,u,f).then(function(t){t&&(i.svc.isLoading=!0,i.api.Common.rollbackDfNoticeModification(n.noticeDocumentId).then(function(n){i.svc.modalService.showSuccessMessages(i.svc.locale.key["Common.Info.SavedSuccessfully"]);i.svc.isLoading=!1;i.search();n>0&&i.svc.nav.pathWithParam(sys.prv.routes.CA.DfNoticeEdit_v2,n)},function(n){i.svc.modalService.showValidationResult(n);i.svc.isLoading=!1}))})}else this.showViewEditAviz=!0,this.showEditAviz=!0,this.widgetTitle=this.svc.userService.culture=="ro-RO"?"Adaugare clarificare/decizie ca urmare a respingerii":"Add clarification / decision following rejection",this.avizViewEdit.push(n)},n.prototype.cancelAddAviz=function(){this.showAddAviz=!1;this.isForConciliation=!1;this.avizModel=null},n.prototype.appendLeadingZeroes=function(n){return n<=9?"0"+n:n},n.prototype.addConciliation=function(n){this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.buildAvizTitleWidget();this.showAddAviz=!0;this.isForConciliation=!0},n.prototype.addAvizNoticeDocument=function(n){this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.buildAvizTitleWidget();this.showAddAviz=!0;this.isForConciliation=!1},n.prototype.buildAvizTitleWidget=function(){this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en";this.widgetTitle=this.lang=="ro"?"Validare ex-ante "+this.sysNoticeDocumentType+" transmis in data de "+this.caPublicationDate:"Ex ante validation for "+this.sysNoticeDocumentType+" sent on "+this.caPublicationDate},n.prototype.search=function(){var t=this,n=this,i;this.selectedNoticeDocumentType!=null&&(this.filter.sysNoticeDocumentType=this.selectedNoticeDocumentType);this.selectedNoticeDocumentState!=null&&(this.filter.sysNoticeDocumentState=this.selectedNoticeDocumentState);this.selectedValidationDocType!=null&&(this.filter.sysValidationDocType=this.selectedValidationDocType);i=JSON.stringify({initNoticeId:n.filter.initNoticeId,sysNoticeTypeId:n.filter.sysNoticeTypeId,sysNoticeDocumentType:n.filter.sysNoticeDocumentType,sysNoticeDocumentState:n.filter.sysNoticeDocumentState,sysValidationDocType:n.filter.sysValidationDocType,noticeDocumentPostDateFrom:n.filter.noticeDocumentPostDateFrom,noticeDocumentPostDateTo:n.filter.noticeDocumentPostDateTo});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getAll(this.filter).then(function(i){t.itemList=i.items;t.canAddCa=i.canAddCa;t.canAddAnap=i.canAddAnap;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.searchNoticeDocuments=function(){this.filter.pageIndex=0;this.currentPage=0;this.search()},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.resetFilter=function(){this.filter.sysNoticeDocumentType=null;this.selectedNoticeDocumentType=null;this.filter.sysNoticeDocumentState=null;this.selectedNoticeDocumentState=null;this.filter.sysValidationDocType=null;this.selectedValidationDocType=null;this.filter.noticeDocumentPostDateFrom=null;this.filter.noticeDocumentPostDateTo=null;this.search()},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.prototype.generateErata=function(){this.api.Common.generateErata(100599189).then(function(){})},n.prototype.navigateToDfNotice=function(n,t,i){i!=null&&i!=18&&(t==2?this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v1,n));i!=null&&i===18&&this.svc.userService.currentUser!=null&&(this.svc.userService.currentUser.isCa||this.svc.userService.currentUser.isSeap||this.svc.userService.currentUser.isAnap)&&this.svc.nav.pathWithParam(sys.prv.routes.CA.DfNoticeEdit_v2,n)},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.NoticeDocumentController=t;angular.module("app.controls").directive("noticeDocumentList",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/noticeDocument/list",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.model={procedureLotQuestions:[]};this.sysNoticeDocumentDecisionTypes=[];this.files=[];this.docFileExtension="doc,pdf,docx,p7s,p7m";this.docMaxSize=this.svc.configService.cfg.DocumentMaxSize;this.validationField=!1;this.showAllDocuments=!0;this.popUpMessageForCnsdResp="";this.uploadDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.model.fileModel=t},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};console.log("controller edit");r.$on("addNoticeDocument",function(n,t){f.showAllDocuments=t.showAllDocuments;f.newTitle=t.newTitle;var i=$("#winAddNew").data("kendoWindow");i.title(f.newTitle);f.init()})}return n.prototype.init=function(){var n=this;this.validationField=null;this.model={};this.$scope.vm=this;this.initNoticeId=this.$scope.initNotice;this.sysNoticeTypeId=this.$scope.noticeType;this.filter={sortProperty:"QuestionDate",pageSize:5,descending:!1,initNoticeId:this.initNoticeId,sysNoticeTypeId:this.sysNoticeTypeId};this.svc.ComboApi.getSysNoticeDocumentDecisionType().then(function(t){n.sysNoticeDocumentDecisionTypes=n.sysNoticeDocumentDecisionTypes.concat(t.results)});this.showAllDocuments==!1&&(this.model.sysNoticeDocumentType={id:30,text:""});this.search()},n.prototype.isSelected=function(n){return this.model.procedureLotQuestions.indexOf(n)>-1},n.prototype.changeQuestionState=function(n){this.model.procedureLotQuestions||(this.model.procedureLotQuestions=[]);this.model.procedureLotQuestions.indexOf(n)>-1?this.model.procedureLotQuestions.splice(this.model.procedureLotQuestions.indexOf(n),1):this.model.procedureLotQuestions.push(n)},n.prototype.saveNoticeDocument=function(){var n=this;if(!this.validateInformation()){this.validationField=!0;return}this.model.initNoticeId=this.initNoticeId;this.model.sysNoticeTypeId=this.sysNoticeTypeId;this.api.Common.needsValidation(this.model).then(function(t){n.exAnteValidation=t}).finally(function(){n.exAnteValidation!=null&&n.exAnteValidation.needsValidation?(n.popUpMessageNotForCnsdResp=n.exAnteValidation.popUpMessageNotForCnsdResp,n.confirmMessage=n.exAnteValidation.confirmMessage,n.model.sysNoticeDocumentType!=null&&n.model.sysNoticeDocumentType.id==31,n.svc.modalService.confirmCustomExAnte(n.locale.key["Common.Info.Info"],n.popUpMessageNotForCnsdResp,n.popUpMessageForCnsdResp,n.confirmMessage).then(function(t){t&&(n.svc.isLoading=!0,n.api.Common.saveNoticeDocument(n.model).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeDocumentView.Validation.ErrorSavingDocument"]);return}n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.$rootScope.$broadcast("saveNoticeDocument")},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})):(n.svc.isLoading=!0,n.api.Common.saveNoticeDocument(n.model).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeDocumentView.Validation.ErrorSavingDocument"]);return}n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.$rootScope.$broadcast("saveNoticeDocument")},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})},n.prototype.buildPopUpMessage=function(){var n='Intrucat procedura a fost selectata pentru verificare ex-ante este necesar sa obtineti avizul conform emis de ANAP inainte de a putea publica tipul de document:<span style="font-size:14px;font-weight:bold;color:black">'+this.model.sysNoticeDocumentType.text+".<\/span"},n.prototype.validateInformation=function(){return!this.model.noticeDocumentName||this.model.noticeDocumentName.trim()==""?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.NoticeDocumentName_NotEmpty"]),!1):this.model.sysNoticeDocumentType==null||this.model.sysNoticeDocumentType.id<1?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.SysNoticeDocumentType_NotEmpty"]),!1):this.model.sysNoticeDocumentType&&(this.svc.userService.currentUserIsMon()&&this.model.sysNoticeDocumentType.id==11||this.svc.userService.currentUserIsCa()&&(this.model.sysNoticeDocumentType.id==8||this.model.sysNoticeDocumentType.id==26))&&(this.model.sysNoticeDocumentDecisionType==null||this.model.sysNoticeDocumentDecisionType.id<1)?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.SysNoticeDocumentDecisionType_NotEmpty"]),!1):this.model.sysNoticeDocumentType&&(this.model.sysNoticeDocumentType.id==8||this.model.sysNoticeDocumentType.id==26||this.model.sysNoticeDocumentType.id==11)&&!this.model.fileModel?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.AttachedDocumentNotSupplied"]),!1):!0},n.prototype.search=function(){var t=this,n=this,i=JSON.stringify({initNoticeId:n.filter.initNoticeId,sysNoticeTypeId:n.filter.sysNoticeTypeId});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getProcedureLotQuestions(this.filter).then(function(i){t.questionList=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize)}).finally(function(){t.svc.isLoading=!1})},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.openFileInput=function(){angular.element("#uploadDoc").click()},n.prototype.deleteDocument=function(){this.model.fileModel=null},n.prototype.cancel=function(){console.log("controller edit cancel");this.$rootScope.$broadcast("closeEditWindow")},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.NoticeDocumentEditController=t;angular.module("app.controls").directive("noticeDocumentEdit",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/noticeDocument/edit",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){var e=this;this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.noticeTypeSelected=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];this.sysAwardCriteriaTypes=[];this.sysFinancingTypes=[];this.sysEuropeanFunds=[];this.assignedUsers=[];this.anapUsers=[];this.codes="";this.showGenerateAqfRequest=!1;this.AQFGroupByLot=!1;this.notice={};this.onEnter=function(n){n.which===13&&this.search()};this.treelistOptions={height:500,scrollable:{virtual:!0},selectable:"multiple, row",change:function(n){var t=n.sender.$angular_scope.vm,e,i,r,u,f;for(t.selectedNuts=[],e=this.select(),i=[],r=0;r<e.length;r++)u=this.dataItem(e[r]),t.selectedNuts.push({id:u.id,code:u.code}),i.push(u.code);for(i=i.filter(t.onlyUnique),t.codes="",f=0;f<i.length;f++)t.codes+=i[f]+"; ";t.codes=t.codes.substring(0,t.codes.length-2)},columns:[{field:"name",title:"Cod nuts",width:150,headerAttributes:{style:"display: none"},template:"<span style='cursor: pointer;'>{{dataItem.name}}<\/span>"},{field:"code",title:"Cod nuts",width:150,headerAttributes:{style:"display: none"},template:"<span style='cursor: pointer;'>{{dataItem.code}}<\/span>"},]};this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.InitNotice_MaxListItems);this.noticeTypeId=parseInt(this.$routeParams.noticeTypeId);this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en";this.$rootScope.$$listeners.df_selector_save=[];this.$rootScope.$$listeners.df_selector_close=[];this.$rootScope.$on("df_selector_close",function(){e.selectDFWindow.close()});this.$rootScope.$on("df_selector_save",function(n,t){var i,r;e.selectDFWindow.close();i=t.sysNoticeTypeId;t.selectedGrid&&(r=t.selectedGrid,e.svc.isLoading=!0,e.api.Common.createNotice(r.dfNoticeId,i).then(function(n){e.svc.modalService.clearValidationErrors();n!=null&&n>0?(e.svc.getNoticeStickyData(i,+n),e.svc.isLoading=!1,e.notice.noticeId=n,e.notice.sysNoticeTypeId=i,e.navigateToEdit(e.notice)):(e.svc.isLoading=!1,e.svc.modalService.showErrorMessage(e.svc.locale.key["CNoticeView.Error.CouldNotCreateCNotice"]))},function(n){e.svc.isLoading=!1;e.svc.modalService.showValidationResult(n)}).finally(function(){e.svc.isLoading=!1}))})}return n.prototype.init=function(){var n=this,t,i;if(this.$routeParams.resetFilter>0&&(this.$cookieStore.put("sysNoticeTypeIds",null),this.resetFilter(),this.populateFilterForEntityType()),t=this.$cookieStore.get("noticeFilter"),i=this.$cookieStore.get("noticeTypeForFilter"),t!=null&&i>-1&&(this.svc.noticeFilter=t,this.svc.noticeTypeForFilter=i,this.$cookieStore.put("noticeFilter",null),this.$cookieStore.put("noticeTypeForFilter",-1)),this.svc.noticeFilter&&(this.$routeParams.noticeTypeId==this.svc.noticeTypeForFilter&&(this.filter=this.svc.noticeFilter),this.svc.noticeFilter=null,this.svc.noticeTypeForFilter=null),this.populateInitialFilters(),this.noticeTypeId>0?(this.$routeParams.resetFilter>0&&(this.noticeTypeSelected[this.$routeParams.noticeTypeId]=!0),this.filter||(this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5}),this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.indexOf(this.noticeTypeId)<0&&this.$routeParams.resetFilter>0?this.addNoticeTypeToFilter(this.noticeTypeId):this.search()):this.search(),this.noticeTypeId>0){if(this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isCa)switch(this.noticeTypeId){case 2:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)});break;case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_RFQNOTICE_LIST)});break;case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_SCNOTICE_LIST)});break;case 6:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_DCNOTICE_LIST)});break;case 7:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_PCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)})}if(this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu)switch(this.noticeTypeId){case 2:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)});break;case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_RFQNOTICE_LIST)});break;case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_SCNOTICE_LIST)});break;case 6:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_DCNOTICE_LIST)});break;case 7:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_PCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)})}if(this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSeap)switch(this.noticeTypeId){case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)})}if(this.svc.userService.currentUser!=null&&(this.svc.userService.currentUser.isAnap||this.svc.userService.currentUser.isMon||this.svc.userService.currentUser.isUccppp))switch(this.noticeTypeId){case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)})}}else this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isCa&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)}),this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)}),this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSeap&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)}),this.svc.userService.currentUser!=null&&(this.svc.userService.currentUser.isAnap||this.svc.userService.currentUser.isMon||this.svc.userService.currentUser.isUccppp)&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)});this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.svc.ComboApi.getSysAwardCriteriaTypes().then(function(t){n.sysAwardCriteriaTypes.push({id:null,text:""});n.sysAwardCriteriaTypes=n.sysAwardCriteriaTypes.concat(t.results)});this.svc.ComboApi.getSysFinancingTypes().then(function(t){n.sysFinancingTypes.push({id:null,text:""});n.sysFinancingTypes=n.sysFinancingTypes.concat(t.results)});this.svc.ComboApi.getSysEuropeanFund().then(function(t){n.sysEuropeanFunds.push({id:null,text:""});n.sysEuropeanFunds=n.sysEuropeanFunds.concat(t.results)});this.api.Common.getAssignedUsers().then(function(t){n.assignedUsers.push({id:null,text:""});n.assignedUsers=n.assignedUsers.concat(t)});this.svc.ComboApi.getUsersByEntityID().then(function(t){n.validatedByUsers=t.results});this.setValidPageSizes();(this.svc.userService.currentUserIsCa()||this.svc.userService.currentUserIsSu())&&this.filter.hasUnansweredQuestions==null&&(this.filter.hasUnansweredQuestions=!1)},n.prototype.populateInitialFilters=function(){var t,i,n,r;if(this.$cookieStore.get("selectedSysProcedureState")!=null&&(this.selectedSysProcedureState=this.$cookieStore.get("selectedSysProcedureState"),this.$cookieStore.put("selectedSysProcedureState",null)),this.$cookieStore.get("selectedSysNoticeDocState")!=null&&(this.selectedSysNoticeDocState=this.$cookieStore.get("selectedSysNoticeDocState"),this.$cookieStore.put("selectedSysNoticeDocState",null)),this.$cookieStore.get("selectedSysProcDocState")!=null&&(this.selectedSysProcDocState=this.$cookieStore.get("selectedSysProcDocState"),this.$cookieStore.put("selectedSysProcDocState",null)),this.$cookieStore.get("selectedSysProcedurePhase")!=null&&(this.selectedSysProcedurePhase=this.$cookieStore.get("selectedSysProcedurePhase"),this.$cookieStore.put("selectedSysProcedurePhase",null)),this.$cookieStore.get("selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("selectedSysProcedureType"),this.$cookieStore.put("selectedSysProcedureType",null)),this.$cookieStore.get("selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("selectedSysNoticeState"),this.$cookieStore.put("selectedSysNoticeState",null)),this.$cookieStore.get("selectedContractAssignmentType")!=null&&(this.selectedContractAssignmentType=this.$cookieStore.get("selectedContractAssignmentType"),this.$cookieStore.put("selectedContractAssignmentType",null)),this.$cookieStore.get("selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("selectedSysAwardCriteriaType"),this.$cookieStore.put("selectedSysAwardCriteriaType",null)),this.$cookieStore.get("selectedNoticeWGSContractType")!=null&&(this.selectedNoticeWGSContractType=this.$cookieStore.get("selectedNoticeWGSContractType"),this.$cookieStore.put("selectedNoticeWGSContractType",null)),this.$cookieStore.get("selectedSysFinancingType")!=null&&(this.selectedSysFinancingType=this.$cookieStore.get("selectedSysFinancingType"),this.$cookieStore.put("selectedSysFinancingType",null)),this.$cookieStore.get("selectedSysEuropeanFund")!=null&&(this.selectedSysEuropeanFund=this.$cookieStore.get("selectedSysEuropeanFund"),this.$cookieStore.put("selectedSysEuropeanFund",null)),this.$cookieStore.get("selectedCa")!=null&&(this.selectedCa=this.$cookieStore.get("selectedCa"),this.$cookieStore.put("selectedCa",null)),this.$cookieStore.get("selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("selectedCpv"),this.$cookieStore.put("selectedCpv",null)),this.$cookieStore.get("selectedCpvCat")!=null&&(this.selectedCpvCat=this.$cookieStore.get("selectedCpvCat"),this.$cookieStore.put("selectedCpvCat",null)),this.$cookieStore.get("selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("selectedAssignedUser"),this.$cookieStore.put("selectedAssignedUser",null)),this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null)),this.$cookieStore.get("selectedValidatedByUser")!=null&&this.$cookieStore.put("selectedValidatedByUser",this.selectedValidatedByUser),this.filter&&(this.filter.startNoticeState&&(this.filter.startNoticeState=new Date(this.filter.startNoticeState)),this.filter.endNoticeState&&(this.filter.endNoticeState=new Date(this.filter.endNoticeState)),this.filter.startPublicationDate&&(this.filter.startPublicationDate=new Date(this.filter.startPublicationDate)),this.filter.endPublicationDate&&(this.filter.endPublicationDate=new Date(this.filter.endPublicationDate)),this.filter.startTenderReceiptDeadline&&(this.filter.startTenderReceiptDeadline=new Date(this.filter.startTenderReceiptDeadline)),this.filter.endTenderReceiptDeadline&&(this.filter.endTenderReceiptDeadline=new Date(this.filter.endTenderReceiptDeadline))),this.filter&&this.$cookieStore.get("sysNoticeTypeIds")){if(this.filter.sysNoticeTypeIds=this.$cookieStore.get("sysNoticeTypeIds"),this.filter.sysNoticeTypeIds)for(n=0;n<this.filter.sysNoticeTypeIds.length;n++)this.noticeTypeSelected[this.filter.sysNoticeTypeIds[n]]=!0;this.$cookieStore.put("sysNoticeTypeIds",null)}if(t=this.$cookieStore.get("nutsIds"),t!=null&&t.length>0){for(this.$cookieStore.put("nutsIds",null),this.filter||(this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5}),this.filter.nutsCodeIds=t.map(function(n){return n.id}),this.selectedNuts=[],i=[],n=0;n<t.length;n++)this.selectedNuts.push({id:t[n].id,code:t[n].code}),i.push(t[n].code);for(i=i.filter(this.onlyUnique),this.codes="",r=0;r<i.length;r++)this.codes+=i[r]+"; ";this.codes=this.codes.substring(0,this.codes.length-2)}},n.prototype.populateFilterForEntityType=function(){this.svc.userService.currentUserIsPub()&&(this.filter.startPublicationDate=new Date,this.filter.startPublicationDate.setDate(this.filter.startPublicationDate.getDate()-30),this.filter.startTenderReceiptDeadline=new Date,this.selectedSysProcedureState={id:2,text:this.svc.locale.key["Common.Clasiff.SysProcedureState.InProgress"]},this.filter.sysProcedureStateId=2);(this.svc.userService.currentUserIsSu()||this.svc.userService.currentUserIsCNSC()||this.svc.userService.currentUserIsCDA()||this.svc.userService.currentUserIsEuMon())&&(this.filter.startPublicationDate=new Date,this.filter.startPublicationDate.setDate(this.filter.startPublicationDate.getDate()-30),this.selectedSysProcedureState={id:2,text:this.svc.locale.key["Common.Clasiff.SysProcedureState.InProgress"]},this.filter.sysProcedureStateId=2);this.svc.userService.currentUserIsCa()&&(this.filter.startNoticeState=new Date,this.filter.startNoticeState.setDate(this.filter.startNoticeState.getDate()-30));this.svc.userService.currentUserIsSeap()&&(this.filter.startNoticeState=new Date,this.filter.startNoticeState.setDate(this.filter.startNoticeState.getDate()-30))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysNoticeTypeIds:n.filter.sysNoticeTypeIds,number:n.filter.number,sysNoticeStateId:n.filter.sysNoticeStateId,startNoticeState:n.filter.startNoticeState,endNoticeState:n.filter.endNoticeState,contractingAuthorityId:n.filter.contractingAuthorityId,sysContractAssigmentTypeId:n.filter.sysContractAssigmentTypeId,sysAwardCriteriaTypeId:n.filter.sysAwardCriteriaTypeId,contractName:n.filter.contractName,dfNoticeNumber:n.filter.dfNoticeNumber,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,noticeWGSContractTypeId:n.filter.noticeWGSContractTypeId,sysFinancingTypeId:n.filter.sysFinancingTypeId,cPVCategoryId:n.filter.cPVCategoryId,cPVId:n.filter.cPVId,cPVText:n.filter.cPVText,sysProcedureStateId:n.filter.sysProcedureStateId,startProcedureState:n.filter.startProcedureState,endProcedureState:n.filter.endProcedureState,startPublicationDate:n.filter.startPublicationDate,endPublicationDate:n.filter.endPublicationDate,sysProcedurePhaseId:n.filter.sysProcedurePhaseId,startEstimatedValueRon:n.filter.startEstimatedValueRon,endEstimatedValueRon:n.filter.endEstimatedValueRon,startTenderReceiptDeadline:n.filter.startTenderReceiptDeadline,endTenderReceiptDeadline:n.filter.endTenderReceiptDeadline,assignToProcedure:n.filter.assignToProcedure,sysProcedureTypeId:n.filter.sysProcedureTypeId,isOnline:n.filter.isOnline,hasLots:n.filter.hasLots,hasElectronicAuction:n.filter.hasElectronicAuction,isUtilityContract:n.filter.isUtilityContract,hasErata:n.filter.hasErata,sendableToJOUE:n.filter.sendableToJOUE,isEuProgrRelated:n.filter.isEuProgrRelated,sysEuropeanFundId:n.filter.sysEuropeanFundId,isPublicPrivatePartnership:n.filter.isPublicPrivatePartnership,hasPaap:n.filter.hasPaap,isNoticeRePublish:n.filter.isNoticeRePublish,validatedByUserId:n.filter.validatedByUserId,hasCommentsAnap:n.filter.hasCommentsAnap,entityTypeId:n.filter.entityTypeId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysNoticeDocState!=null&&this.selectedSysNoticeDocState.id>0&&(this.filter.sysNoticeDocumentStateId=this.selectedSysNoticeDocState.id);this.selectedSysProcDocState!=null&&this.selectedSysProcDocState.id>0&&(this.filter.sysProcedureDocumentStateId=this.selectedSysProcDocState.id);this.selectedSysProcedureState&&this.selectedSysProcedureState.id>0&&(this.filter.sysProcedureStateId=this.selectedSysProcedureState.id);this.selectedSysProcedureState&&this.selectedSysProcedureState.id==null&&(this.filter.sysProcedureStateId=null);this.selectedSysProcedurePhase&&this.selectedSysProcedurePhase.id>0&&(this.filter.sysProcedurePhaseId=this.selectedSysProcedurePhase.id);this.selectedSysProcedureType&&this.selectedSysProcedureType.id>0&&(this.filter.sysProcedureTypeId=this.selectedSysProcedureType.id);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedSysAwardCriteriaType&&this.selectedSysAwardCriteriaType.id>0&&(this.filter.sysAwardCriteriaTypeId=this.selectedSysAwardCriteriaType.id);this.selectedNoticeWGSContractType&&this.selectedNoticeWGSContractType.id>0&&(this.filter.noticeWGSContractTypeId=this.selectedNoticeWGSContractType.id);this.selectedSysFinancingType&&this.selectedSysFinancingType.id>0&&(this.filter.sysFinancingTypeId=this.selectedSysFinancingType.id);this.selectedSysEuropeanFund&&this.selectedSysEuropeanFund.id>0&&(this.filter.sysEuropeanFundId=this.selectedSysEuropeanFund.id);this.selectedCa&&this.selectedCa.id>0&&(this.filter.contractingAuthorityId=this.selectedCa.id);this.selectedCpvCat&&this.selectedCpvCat.id>0&&(this.filter.cPVCategoryId=this.selectedCpvCat.id);this.selectedContractAssignmentType&&this.selectedContractAssignmentType.id>0&&(this.filter.sysContractAssigmentTypeId=this.selectedContractAssignmentType.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cPVId=this.selectedCpv.id);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&(this.filter.assignedUserId=this.selectedAssignedUser.id);this.selectedValidatedBy&&this.selectedValidatedBy.id>0&&(this.filter.validatedByUserId=this.selectedValidatedBy.id);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&(this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType.id);this.selectedValidatedByUser&&this.selectedValidatedByUser.id>0&&(this.filter.dfNoticeValidatedByUserId=this.selectedValidatedByUser.id)},n.prototype.resetFilter=function(){this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5};this.noticeTypeSelected=[];this.selectedNuts=[];this.codes="";this.selectedValidatedByUser=null;this.selectedSysProcedureState=null;this.selectedSysProcedurePhase=null;this.selectedSysProcedureType=null;this.selectedSysNoticeState=null;this.selectedContractAssignmentType=null;this.selectedSysAwardCriteriaType=null;this.selectedNoticeWGSContractType=null;this.selectedSysFinancingType=null;this.selectedSysEuropeanFund=null;this.selectedCa=null;this.selectedCpv=null;this.selectedCpvCat=null;this.selectedAssignedUser=null;this.selectedValidatedBy=null;this.selectedAllocatedTo=null;this.selectedSysNoticeDocState=null;this.selectedSysProcDocState=null;this.selectedValidatedByUserFreeText="";this.filter.hasUnansweredQuestions=!1},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.openDfSelector=function(n){this.selectDFWindow.center().open();this.$rootScope.$broadcast("notice_df_set_notice_type",{noticeTypeId:n});this.$rootScope.$broadcast("notice_df_selector_search",null)},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.addNoticeTypeToFilter=function(n){this.filter||this.resetFilter();this.filter.sysNoticeTypeIds&&this.filter.sysNoticeTypeIds.indexOf(n)>-1?this.filter.sysNoticeTypeIds.splice(this.filter.sysNoticeTypeIds.indexOf(n),1):(this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.push(n));this.search()},n.prototype.setBackRoute=function(){var t=[":noticeTypeId",this.$routeParams.noticeTypeId,":resetFilter","0"],n;n=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ContractNoticeList_Ca:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.ContractNoticeList_Su:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.ContractNoticeList_Seap:this.svc.userService.currentUserIsPub()?sys.pub.routes.ContractNoticeList_Pub:sys.prv.routes.SEAP.ContractNoticeList_Mon;this.svc.nav.setBackRouteWithParams(n,t);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id>0&&this.$cookieStore.put("selectedSysProcedureState",this.selectedSysProcedureState);this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id>0&&this.$cookieStore.put("selectedSysProcedurePhase",this.selectedSysProcedurePhase);this.selectedSysProcedureType!=null&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("selectedSysNoticeState",this.selectedSysNoticeState);this.selectedSysNoticeDocState!=null&&this.selectedSysNoticeDocState.id>0&&this.$cookieStore.put("selectedSysNoticeDocState",this.selectedSysNoticeDocState);this.selectedSysProcDocState!=null&&this.selectedSysProcDocState.id>0&&this.$cookieStore.put("selectedSysProcDocState",this.selectedSysProcDocState);this.selectedContractAssignmentType!=null&&this.selectedContractAssignmentType.id>0&&this.$cookieStore.put("selectedContractAssignmentType",this.selectedContractAssignmentType);this.selectedSysAwardCriteriaType!=null&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedNoticeWGSContractType!=null&&this.selectedNoticeWGSContractType.id>0&&this.$cookieStore.put("selectedNoticeWGSContractType",this.selectedNoticeWGSContractType);this.selectedSysFinancingType!=null&&this.selectedSysFinancingType.id>0&&this.$cookieStore.put("selectedSysFinancingType",this.selectedSysFinancingType);this.selectedSysEuropeanFund!=null&&this.selectedSysEuropeanFund.id>0&&this.$cookieStore.put("selectedSysEuropeanFund",this.selectedSysEuropeanFund);this.selectedCa!=null&&this.selectedCa.id>0&&this.$cookieStore.put("selectedCa",this.selectedCa);this.selectedCpv!=null&&this.selectedCpv.id>0&&this.$cookieStore.put("selectedCpv",this.selectedCpv);this.selectedCpvCat!=null&&this.selectedCpvCat.id>0&&this.$cookieStore.put("selectedCpvCat",this.selectedCpvCat);this.selectedAssignedUser!=null&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("selectedAssignedUser",this.selectedAssignedUser);this.selectedValidatedBy!=null&&this.selectedValidatedBy.id>0&&this.$cookieStore.put("selectedValidatedBy",this.selectedValidatedBy);this.selectedAllocatedTo!=null&&this.selectedAllocatedTo.id>0&&this.$cookieStore.put("selectedAllocatedTo",this.selectedAllocatedTo);this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage);this.$cookieStore.put("sysNoticeTypeIds",this.filter.sysNoticeTypeIds);this.$cookieStore.put("nutsIds",this.selectedNuts);this.$cookieStore.put("scrollPosition",window.pageYOffset)},n.prototype.navigateToEdit=function(n){if(this.setBackRoute(),this.svc.userService.currentUserIsCa())n.sysNoticeTypeId==2&&n.sysContractAssigmentType!=null&&n.sysContractAssigmentType.id==2?this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CNOTICE_SAD_CA_EDITVIEW,":noticeId",n.noticeId):n.sysNoticeTypeId==19&&n.sysContractAssigmentType!=null&&n.sysContractAssigmentType.id==2?this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.RFQ_INVITATION_SAD_EDIT,":id",n.cNoticeId):this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.ContractNoticeEdit,":noticeId",n.noticeId);else return},n.prototype.navigateToView=function(n){var t;this.setBackRoute();switch(n.sysNoticeTypeId){case 2:t=n.sysContractAssigmentType!=null&&n.sysContractAssigmentType.id!=2?this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CNOTICE_CA_ViewV1:sys.prv.routes.CA.CNOTICE_CA_ViewV2:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CNOTICE_SU_ViewV1:sys.prv.routes.SU.CNOTICE_SU_ViewV2:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CNOTICE_SEAP_ViewV1:sys.prv.routes.SEAP.CNOTICE_SEAP_ViewV2:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CNoticeViewV1:sys.pub.routes.CNoticeViewV2:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CNOTICE_MON_ViewV1:sys.prv.routes.SEAP.CNOTICE_MON_ViewV2:this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.CNOTICE_SAD_CA_View:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.CNOTICE_SAD_SU_View:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.CNOTICE_SEAP_ViewV2:this.svc.userService.currentUserIsPub()?sys.pub.routes.CNoticeSADView:sys.prv.routes.SEAP.CNOTICE_MON_SAD_View;break;case 12:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.RFQInvitationCaView:sys.prv.routes.CA.RFQInvitationCaViewV2:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.RFQInvitationSuView:sys.prv.routes.SU.RFQInvitationSuViewV2:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.RFQInvitationSeapView:sys.prv.routes.SEAP.RFQInvitationSeapViewV2:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.RFQInvitationView:sys.pub.routes.RFQInvitationViewV2:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.RFQInvitationMonView:sys.prv.routes.SEAP.RFQInvitationMonViewV2;break;case 17:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.SimplifiedNotice_CA_View:sys.prv.routes.CA.SimplifiedNotice_CA_ViewV2:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.SimplifiedNotice_SU_View:sys.prv.routes.SU.SimplifiedNotice_SU_View2:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.SimplifiedNotice_SEAP_View:sys.prv.routes.SEAP.SimplifiedNotice_SEAP_View2:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.SimplifiedNotice_PUBLIC_View:sys.pub.routes.SimplifiedNotice_PUBLIC_ViewV2:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.SimplifiedNotice_MON_View:sys.prv.routes.SEAP.SimplifiedNotice_MON_View2;break;case 7:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.PCNOTICE_CA_View:sys.prv.routes.CA.PCNOTICE_CA_ViewV2:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.PCNOTICE_SU_View:sys.prv.routes.SU.PCNOTICE_SU_ViewV2:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.PCNOTICE_SEAP_View:sys.prv.routes.SEAP.PCNOTICE_SEAP_ViewV2:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.PCNOTICE_PUBLIC_VIEW:sys.pub.routes.PCNOTICE_PUBLIC_VIEWV2:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.PCNOTICE_MON_View:sys.prv.routes.SEAP.PCNOTICE_MON_ViewV2;break;case 6:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.DCNOTICE_CA_View:sys.prv.routes.CA.DCNOTICE_CA_ViewV2:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.DCNOTICE_SU_View:sys.prv.routes.SU.DCNOTICE_SU_ViewV2:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.DCNOTICE_SEAP_View:sys.prv.routes.SEAP.DCNOTICE_SEAP_ViewV2:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.DCNOTICE_PUB_View:sys.pub.routes.DCNOTICE_PUB_ViewV2:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.DCNOTICE_MON_View:sys.prv.routes.SEAP.DCNOTICE_MON_ViewV2;break;case 19:this.svc.userService.currentUserIsCa()?t=sys.prv.routes.CA.RFQ_INVITATION_SAD_VIEW:this.svc.userService.currentUserIsSu()?t=sys.prv.routes.SU.RFQ_INVITATION_SAD_VIEW:this.svc.userService.currentUserIsSeap()?t=sys.prv.routes.SEAP.RFQ_INVITATION_SAD_VIEW_SEAP:this.svc.userService.currentUserIsPub()?t=sys.pub.routes.RFQ_INVITATION_SAD_VIEW:this.svc.userService.currentUserIsMon()&&(t=sys.prv.routes.SEAP.RFQ_INVITATION_SAD_VIEW_MON);break;default:return}this.svc.nav.pathWithParam(t,n.cNoticeId)},n.prototype.navigateToProcedure=function(n){var i=n.sysContractAssigmentType&&n.sysContractAssigmentType.id==2,r=n.sysNoticeTypeId==5,t;this.setBackRoute();t=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ProcedureView:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.SUProcedureView:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.SEAPPRocedureView:this.svc.userService.currentUserIsPub()?sys.pub.routes.PUBLICProcedureView:sys.prv.routes.SEAP.MONPRocedureView;this.svc.nav.pathForProcedure(t,n.procedureId,0)},n.prototype.navigateToSAD=function(n){var t;this.setBackRoute();this.svc.userService.currentUserIsCa()?t=sys.prv.routes.CA.SAD_CA_VIEW:this.svc.userService.currentUserIsSu()?t=sys.prv.routes.SU.SAD_VIEW_SU:this.svc.userService.currentUserIsPub()?t=sys.pub.routes.SAD_PUB_VIEW:this.svc.userService.currentUserIsSeap()?t=sys.prv.routes.SEAP.SAD_SEAP_VIEW:this.svc.userService.currentUserIsMon()&&(t=sys.prv.routes.SEAP.SAD_MON_VIEW);this.svc.nav.pathWithParam(t,n.sadId)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.openNutsSelector=function(){var n=this;this.selectedNuts=[];this.filter&&(this.filter.nutsCodeIds=[]);this.codes="";this.nutsWindow.center().open();this.api.Common.getNutsCodes().then(function(t){var r=n,i;n.tree.dataSource.data(t);n.tree.dataSource.page(1);i=$("tr.k-treelist-group",n.tree.tbody);$.each(i,function(n,t){r.tree.expand(t)})})},n.prototype.onlyUnique=function(n,t,i){return i.indexOf(n)===t},n.prototype.addSelectedNuts=function(){this.filter.nutsCodeIds=this.selectedNuts.map(function(n){return n.id});this.search();this.nutsWindow.close()},n.prototype.cancelNutsSelector=function(){this.selectedNuts=[];this.filter&&(this.filter.nutsCodeIds=[]);this.codes="";this.nutsWindow.close();this.search()},n.prototype.goToAqf=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.checkIfEuMonHasPermission(n.noticeId).then(function(i){i.hasError?t.svc.modalService.showErrorMessage(i.responseMessage):(t.svc.isLoading=!0,t.api.Common.checkIfAqfIsGenerated(n.procedureId).then(function(i){i?t.navigateToAqf(n.procedureId):(t.selectedProcedureIdForAqfGeneration=n.procedureId,n.hasLots?t.showGenerateAqfRequest=!0:t.PerformGenerateAQFRequest())}).finally(function(){return t.svc.isLoading=!1}))}).finally(function(){return t.svc.isLoading=!1})},n.prototype.PerformGenerateAQFRequest=function(){var n=this;this.svc.isLoading=!0;this.api.Common.generateAQFRequest(this.selectedProcedureIdForAqfGeneration,this.AQFGroupByLot).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Procedure.Label.AQFGenerateSuccess"]);n.AQFGroupByLot=!1;var t=n.selectedProcedureIdForAqfGeneration;n.selectedProcedureIdForAqfGeneration=null;n.navigateToAqf(t)}).finally(function(){return n.svc.isLoading=!1})},n.prototype.navigateToAqf=function(n){(this.svc.userService.currentUserIsCNSC()||this.svc.userService.currentUserIsCDA()||this.svc.userService.currentUserIsEuMon())&&this.svc.nav.pathWithNamedParam(sys.prv.routes.SEAP.ProcedureMONAQFView,":id",n)},n.prototype.scrollToLocation=function(){if(this.$cookieStore.get("scrollPosition")!=null){var n=this.$cookieStore.get("scrollPosition");this.$cookieStore.put("scrollPosition",null);n!=null&&$(document).scrollTop(parseInt(n))}},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeCommonApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"CONTRACT-NOTICE-LIST"},n}();n.NoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.noticeTypeSelected=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];this.sysAwardCriteriaTypes=[];this.sysFinancingTypes=[];this.sysEuropeanFunds=[];this.assignedUsers=[];this.anapUsers=[];this.onEnter=function(n){n.which===13&&this.search()};this.svc.isLoading=!1;this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.CaNotice_MaxListItems);this.noticeTypeId=parseInt(this.$routeParams.noticeTypeId);this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en"}return n.prototype.init=function(){var n=this,t,i;if(this.$routeParams.resetFilter>0&&(this.resetFilter(),this.populateFilterForEntityType()),t=this.$cookieStore.get("noticeFilter"),i=this.$cookieStore.get("noticeTypeForFilter"),t!=null&&i>-1&&(this.svc.noticeFilter=t,this.svc.noticeTypeForFilter=i,this.$cookieStore.put("noticeFilter",null),this.$cookieStore.put("noticeTypeForFilter",-1)),this.svc.noticeFilter&&(this.$routeParams.noticeTypeId==this.svc.noticeTypeForFilter&&(this.filter=this.svc.noticeFilter),this.svc.noticeFilter=null,this.svc.noticeTypeForFilter=null),this.populateInitialFilters(),this.noticeTypeId>0?(this.$routeParams.resetFilter>0&&(this.noticeTypeSelected[this.$routeParams.noticeTypeId]=!0),this.filter||(this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5}),this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.indexOf(this.noticeTypeId)<0&&this.$routeParams.resetFilter>0?this.addNoticeTypeToFilter(this.noticeTypeId):this.search()):this.search(),this.noticeTypeId>0){if(this.svc.userService.currentUserIsCa())switch(this.noticeTypeId){case 2:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)});break;case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_RFQNOTICE_LIST)});break;case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_SCNOTICE_LIST)});break;case 6:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_DCNOTICE_LIST)});break;case 7:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_PCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)})}if(this.svc.userService.currentUserIsSu())switch(this.noticeTypeId){case 2:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)});break;case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_RFQNOTICE_LIST)});break;case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_SCNOTICE_LIST)});break;case 6:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_DCNOTICE_LIST)});break;case 7:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_PCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)})}if(this.svc.userService.currentUserIsSeap())switch(this.noticeTypeId){case 12:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)})}if(this.svc.userService.currentUserIsAnrmap()||this.svc.userService.currentUserIsMon()||this.svc.userService.currentUserIsUCCPPP())switch(this.noticeTypeId){case 17:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)});break;default:this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)})}}else this.svc.userService.currentUserIsCa()&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)}),this.svc.userService.currentUserIsSu()&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)}),this.svc.userService.currentUserIsSeap()&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSEAP.SEAP_RFQNOTICE_LIST)}),(this.svc.userService.currentUserIsAnrmap()||this.svc.userService.currentUserIsMon()||this.svc.userService.currentUserIsUCCPPP())&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesMON.MON_SCNOTICE_LIST)});this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.svc.ComboApi.getSysAwardCriteriaTypes().then(function(t){n.sysAwardCriteriaTypes.push({id:null,text:""});n.sysAwardCriteriaTypes=n.sysAwardCriteriaTypes.concat(t.results)});this.svc.ComboApi.getSysFinancingTypes().then(function(t){n.sysFinancingTypes.push({id:null,text:""});n.sysFinancingTypes=n.sysFinancingTypes.concat(t.results)});this.svc.ComboApi.getSysEuropeanFund().then(function(t){n.sysEuropeanFunds.push({id:null,text:""});n.sysEuropeanFunds=n.sysEuropeanFunds.concat(t.results)});this.api.Common.getAssignedUsers().then(function(t){n.assignedUsers.push({id:null,text:""});n.assignedUsers=n.assignedUsers.concat(t)});this.setValidPageSizes()},n.prototype.populateInitialFilters=function(){if(this.$cookieStore.get("selectedSysProcedureState")!=null&&(this.selectedSysProcedureState=this.$cookieStore.get("selectedSysProcedureState"),this.$cookieStore.put("selectedSysProcedureState",null)),this.$cookieStore.get("selectedSysProcedurePhase")!=null&&(this.selectedSysProcedurePhase=this.$cookieStore.get("selectedSysProcedurePhase"),this.$cookieStore.put("selectedSysProcedurePhase",null)),this.$cookieStore.get("selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("selectedSysProcedureType"),this.$cookieStore.put("selectedSysProcedureType",null)),this.$cookieStore.get("selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("selectedSysNoticeState"),this.$cookieStore.put("selectedSysNoticeState",null)),this.$cookieStore.get("selectedContractAssignmentType")!=null&&(this.selectedContractAssignmentType=this.$cookieStore.get("selectedContractAssignmentType"),this.$cookieStore.put("selectedContractAssignmentType",null)),this.$cookieStore.get("selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("selectedSysAwardCriteriaType"),this.$cookieStore.put("selectedSysAwardCriteriaType",null)),this.$cookieStore.get("selectedNoticeWGSContractType")!=null&&(this.selectedNoticeWGSContractType=this.$cookieStore.get("selectedNoticeWGSContractType"),this.$cookieStore.put("selectedNoticeWGSContractType",null)),this.$cookieStore.get("selectedSysFinancingType")!=null&&(this.selectedSysFinancingType=this.$cookieStore.get("selectedSysFinancingType"),this.$cookieStore.put("selectedSysFinancingType",null)),this.$cookieStore.get("selectedSysEuropeanFund")!=null&&(this.selectedSysEuropeanFund=this.$cookieStore.get("selectedSysEuropeanFund"),this.$cookieStore.put("selectedSysEuropeanFund",null)),this.$cookieStore.get("selectedCa")!=null&&(this.selectedCa=this.$cookieStore.get("selectedCa"),this.$cookieStore.put("selectedCa",null)),this.$cookieStore.get("selectedSupplierWinner")!=null&&(this.selectedSupplierWinner=this.$cookieStore.get("selectedSupplierWinner"),this.$cookieStore.put("selectedSupplierWinner",null)),this.$cookieStore.get("selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("selectedCpv"),this.$cookieStore.put("selectedCpv",null)),this.$cookieStore.get("selectedCpvCat")!=null&&(this.selectedCpvCat=this.$cookieStore.get("selectedCpvCat"),this.$cookieStore.put("selectedCpvCat",null)),this.$cookieStore.get("selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("selectedAssignedUser"),this.$cookieStore.put("selectedAssignedUser",null)),this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null)),this.filter){if(this.filter.sysNoticeTypeIds=this.$cookieStore.get("sysNoticeTypeIds"),this.filter.sysNoticeTypeIds)for(var n=0;n<this.filter.sysNoticeTypeIds.length;n++)this.noticeTypeSelected[this.filter.sysNoticeTypeIds[n]]=!0;this.$cookieStore.put("sysNoticeTypeIds",null)}},n.prototype.populateFilterForEntityType=function(){this.svc.userService.currentUserIsPub()&&(this.filter.startPublicationDate=new Date,this.filter.startPublicationDate.setDate(this.filter.startPublicationDate.getDate()-30));this.svc.userService.currentUserIsSu()&&(this.filter.startPublicationDate=new Date,this.filter.startPublicationDate.setDate(this.filter.startPublicationDate.getDate()-30));this.svc.userService.currentUserIsCa()&&(this.filter.startNoticeState=new Date,this.filter.startNoticeState.setDate(this.filter.startNoticeState.getDate()-30));this.svc.userService.currentUserIsSeap()&&(this.filter.startNoticeState=new Date,this.filter.startNoticeState.setDate(this.filter.startNoticeState.getDate()-30));this.svc.userService.currentUserIsMon()&&(this.filter.startNoticeState=new Date,this.filter.startNoticeState.setDate(this.filter.startNoticeState.getDate()-30),this.selectedSysNoticeState={id:4,text:this.svc.locale.key["Common.Clasiff.SysNoticeState.Pending"]},this.filter.sysNoticeStateId=4)},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysNoticeTypeIds:n.filter.sysNoticeTypeIds,number:n.filter.number,sysNoticeStateId:n.filter.sysNoticeStateId,startNoticeState:n.filter.startNoticeState,endNoticeState:n.filter.endNoticeState,contractingAuthorityId:n.filter.contractingAuthorityId,contractingAuthorityText:n.filter.contractingAuthorityText,sysContractAssigmentTypeId:n.filter.sysContractAssigmentTypeId,contractName:n.filter.contractName,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,cPVCategoryId:n.filter.cPVCategoryId,cPVId:n.filter.cPVId,cPVText:n.filter.cPVText,startPublicationDate:n.filter.startPublicationDate,endPublicationDate:n.filter.endPublicationDate,isOnline:n.filter.isOnline,hasLots:n.filter.hasLots,hasElectronicAuction:n.filter.hasElectronicAuction,isUtilityContract:n.filter.isUtilityContract,hasErata:n.filter.hasErata,hasPaap:n.filter.hasPaap,entityTypeId:n.filter.entityTypeId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getCaNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.filter.sysNoticeStateId=this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0?this.selectedSysNoticeState.id:null;this.filter.contractingAuthorityId=this.selectedCa&&this.selectedCa.id>0?this.selectedCa.id:null;this.filter.winnerId=this.selectedSupplierWinner&&this.selectedSupplierWinner.id>0?this.selectedSupplierWinner.id:null;this.filter.cPVCategoryId=this.selectedCpvCat&&this.selectedCpvCat.id>0?this.selectedCpvCat.id:null;this.filter.sysContractAssigmentTypeId=this.selectedContractAssignmentType&&this.selectedContractAssignmentType.id>0?this.selectedContractAssignmentType.id:null;this.filter.cPVId=this.selectedCpv&&this.selectedCpv.id>0?this.selectedCpv.id:null;this.filter.assignedUserId=this.selectedAssignedUser&&this.selectedAssignedUser.id>0?this.selectedAssignedUser.id:null;this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0?this.selectedSysAcquisitionContractType.id:null},n.prototype.resetFilter=function(){this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5};this.noticeTypeSelected=[];this.selectedSysProcedureState=null;this.selectedSysProcedurePhase=null;this.selectedSysProcedureType=null;this.selectedSysNoticeState=null;this.selectedContractAssignmentType=null;this.selectedSysAwardCriteriaType=null;this.selectedSysAcquisitionContractType=null;this.selectedNoticeWGSContractType=null;this.selectedSysFinancingType=null;this.selectedSysEuropeanFund=null;this.selectedCa=null;this.selectedCpv=null;this.selectedCpvCat=null;this.selectedAssignedUser=null;this.selectedValidatedBy=null;this.selectedAllocatedTo=null;this.selectedSupplierWinner=null;var n=$("#filterCpvDdl").data("kendoDropDownList");n&&n.text("")},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.exportData=function(n){var t=this;this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.Common.getCAExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getCAExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getCAExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.addNoticeTypeToFilter=function(n){this.filter||this.resetFilter();this.filter.sysNoticeTypeIds&&this.filter.sysNoticeTypeIds.indexOf(n)>-1?this.filter.sysNoticeTypeIds.splice(this.filter.sysNoticeTypeIds.indexOf(n),1):(this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.push(n));this.search()},n.prototype.setBackRoute=function(){var t=[":noticeTypeId",this.$routeParams.noticeTypeId,":resetFilter","0"],n;n=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ContractAwardNoticeList_Ca:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.ContractAwardNoticeList_Su:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.ContractAwardNoticeList_Seap:this.svc.userService.currentUserIsPub()?sys.pub.routes.ContractAwardNoticeList_Pub:sys.prv.routes.SEAP.ContractAwardNoticeList_Mon;this.svc.nav.setBackRouteWithParams(n,t);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id>0&&this.$cookieStore.put("selectedSysProcedureState",this.selectedSysProcedureState);this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id>0&&this.$cookieStore.put("selectedSysProcedurePhase",this.selectedSysProcedurePhase);this.selectedSysProcedureType!=null&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractAssignmentType!=null&&this.selectedContractAssignmentType.id>0&&this.$cookieStore.put("selectedContractAssignmentType",this.selectedContractAssignmentType);this.selectedSysAwardCriteriaType!=null&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedNoticeWGSContractType!=null&&this.selectedNoticeWGSContractType.id>0&&this.$cookieStore.put("selectedNoticeWGSContractType",this.selectedNoticeWGSContractType);this.selectedSysFinancingType!=null&&this.selectedSysFinancingType.id>0&&this.$cookieStore.put("selectedSysFinancingType",this.selectedSysFinancingType);this.selectedSysEuropeanFund!=null&&this.selectedSysEuropeanFund.id>0&&this.$cookieStore.put("selectedSysEuropeanFund",this.selectedSysEuropeanFund);this.selectedCa!=null&&this.selectedCa.id>0&&this.$cookieStore.put("selectedCa",this.selectedCa);this.selectedSupplierWinner!=null&&this.selectedSupplierWinner.id>0&&this.$cookieStore.put("selectedSupplierWinner",this.selectedSupplierWinner);this.selectedCpv!=null&&this.selectedCpv.id>0&&this.$cookieStore.put("selectedCpv",this.selectedCpv);this.selectedCpvCat!=null&&this.selectedCpvCat.id>0&&this.$cookieStore.put("selectedCpvCat",this.selectedCpvCat);this.selectedAssignedUser!=null&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("selectedAssignedUser",this.selectedAssignedUser);this.selectedValidatedBy!=null&&this.selectedValidatedBy.id>0&&this.$cookieStore.put("selectedValidatedBy",this.selectedValidatedBy);this.selectedAllocatedTo!=null&&this.selectedAllocatedTo.id>0&&this.$cookieStore.put("selectedAllocatedTo",this.selectedAllocatedTo);this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage);this.$cookieStore.put("sysNoticeTypeIds",this.filter.sysNoticeTypeIds);this.$cookieStore.put("scrollPosition",window.pageYOffset)},n.prototype.navigateToEdit=function(n,t){if(this.setBackRoute(),this.svc.userService.currentUserIsCa())switch(t){case 3:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_C,":id",n);break;case 13:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_RFQ,":id",n);break;case 18:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_SNC,":id",n);break;case 8:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_DC,":id",n);break;case 16:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_PC,":id",n);break;case 20:this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CANOTICE_CA_Edit_RFQ,":id",n)}else return},n.prototype.navigateToView=function(n){var t;this.setBackRoute();switch(n.sysNoticeTypeId){case 3:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CANOTICE_CA_VIEW_C_V1:sys.prv.routes.CA.CANOTICE_CA_PREVIEW_C:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CANOTICE_SU_VIEW_C_V1:sys.prv.routes.SU.CANOTICE_SU_VIEW_C:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_C_V1:sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_C:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CANOTICE_PUB_VIEW_C_V1:sys.pub.routes.CANOTICE_PUB_VIEW_C:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_MON_VIEW_C_V1:sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_C;break;case 13:case 20:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CANOTICE_CA_VIEW_RFQ_V1:sys.prv.routes.CA.CANOTICE_CA_PREVIEW_RFQ:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CANOTICE_SU_VIEW_RFQ_V1:sys.prv.routes.SU.CANOTICE_SU_VIEW_RFQ:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_RFQ_V1:sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_RFQ:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CANOTICE_PUB_VIEW_RFQ_V1:sys.pub.routes.CANOTICE_PUB_VIEW_RFQ:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_RFQ_V1:sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_RFQ;break;case 18:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CANOTICE_CA_VIEW_SCN_V1:sys.prv.routes.CA.CANOTICE_CA_VIEW_SNC:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CANOTICE_SU_VIEW_SCN_V1:sys.prv.routes.SU.CANOTICE_SU_VIEW_SNC:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_SCN_V1:sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_SNC:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CANOTICE_PUB_VIEW_SNC_V1:sys.pub.routes.CANOTICE_PUB_VIEW_RFQ:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_MON_VIEW_SCN_V1:sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_C;break;case 16:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CANOTICE_CA_VIEW_PC_V1:sys.prv.routes.CA.CANOTICE_CA_PREVIEW_PC:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CANOTICE_SU_VIEW_PC_V1:sys.prv.routes.SU.CANOTICE_SU_View_PC:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_SEAP_VIEW_PC_V1:sys.prv.routes.SEAP.CANOTICE_SEAP_View_PC:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CANOTICE_PUB_VIEW_PC_V1:sys.pub.routes.CANOTICE_PUB_VIEW_PC:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_PC_V1:sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_PC;break;case 8:t=this.svc.userService.currentUserIsCa()?n.sysNoticeVersionId==1?sys.prv.routes.CA.CANOTICE_CA_View_DC_V1:sys.prv.routes.CA.CANOTICE_CA_PREVIEW_DC:this.svc.userService.currentUserIsSu()?n.sysNoticeVersionId==1?sys.prv.routes.SU.CANOTICE_SU_View_DC_V1:sys.prv.routes.SU.CANOTICE_SU_View_DC:this.svc.userService.currentUserIsSeap()?n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_SEAP_View_DC_V1:sys.prv.routes.SEAP.CANOTICE_SEAP_View_DC:this.svc.userService.currentUserIsPub()?n.sysNoticeVersionId==1?sys.pub.routes.CANOTICE_PUB_VIEW_DC_V1:sys.pub.routes.CANOTICE_PUB_View_DC:n.sysNoticeVersionId==1?sys.prv.routes.SEAP.CANOTICE_ANRMAP_View_DC_V1:sys.prv.routes.SEAP.CANOTICE_ANRMAP_VIEW_DC;break;default:return}this.svc.nav.pathWithParam(t,n.caNoticeId)},n.prototype.navigateToProcedure=function(n){var i=n.sysContractAssigmentType&&n.sysContractAssigmentType.id==2,r=n.sysNoticeTypeId==5,t;this.setBackRoute();t=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ProcedureView:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.SUProcedureView:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.SEAPPRocedureView:this.svc.userService.currentUserIsPub()?sys.pub.routes.PUBLICProcedureView:sys.prv.routes.SEAP.MONPRocedureView;this.svc.nav.pathForProcedure(t,n.procedureId,0)},n.prototype.navigateToAdd=function(n){if(!this.svc.userService.hasFirstLoginValid){this.svc.nav.path(sys.prv.routes.CA.PROFILE_CA_VIEW);return}this.setBackRoute();this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.CANOTICE_CA_Add,":type",n,":id",0)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.scrollToLocation=function(){if(this.$cookieStore.get("scrollPosition")!=null){var n=this.$cookieStore.get("scrollPosition");this.$cookieStore.put("scrollPosition",null);n!=null&&$(document).scrollTop(parseInt(n))}},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeCommonApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"CONTRACT-AWARD-NOTICE-LIST"},n}();n.CaNoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this,e;this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$timeout=u;this.isEdit=!0;this.validationField=!1;this.validationTenderdate=!1;this.validationOpening=!1;this.isSentToJoueAutomatically=!1;this.datePickerOptions={min:sys.dateUtils.addBusinessDays(new Date,1),format:"dd/MM/yyyy",culture:"ro-RO",parseFormats:["yyyy-MM-ddTHH:mm:sszzz"],disableDates:function(){return!1}};this.api.Common.getNoticeStickyData(this.$routeParams.noticeId).then(function(n){f.svc.stickyData=n});this.api.Common.getNoticeGeneralInfo(this.$routeParams.noticeId).then(function(n){f.svc.noticeGeneralInfo=n;f.api.Common.checkIfNoticeIsSentToJoueAutomatically(f.$routeParams.noticeId).then(function(n){f.isSentToJoueAutomatically=n;n&&(f.svc.noticeGeneralInfo?f.svc.noticeGeneralInfo.sendableToJoue=!0:f.svc.noticeGeneralInfo={sendableToJoue:!0})})});this.casInTheNameOfWhichCurrentCaActs=[];this.isVisibleUserAssign=!1;e=this;r.$$listeners.notice_paap_selector_save=[];r.$$listeners.notice_paap_selector_close=[];this.$rootScope.$on("notice_paap_selector_close",function(){e.selectPaapDetailWindow.close()});this.$rootScope.$on("notice_paap_selector_save",function(n,t){if(e.selectPaapDetailWindow.close(),t.length>0){var i=t[0];e.model.paapDetailId=i.paapDetailId;e.model.paapName=i.paapName;e.model.paapYear=i.paapYear;e.model.paapVersion=i.paapVersion;e.model.paapDetailName=i.paapDetailName;f.api.Common.getSpentValueFromDfNotice(f.$routeParams.noticeId).then(function(n){e.model.paapSpentValue=n;f.api.Common.getEstimatedValueCurrencyFromDfNotice(f.$routeParams.noticeId).then(function(n){f.paapCurrency=n})})}});this.svc.isLoading=!0;this.$timeout(function(){return e.api.Common.getPriceCurrencies().then(function(n){e.priceCurrencies=n;e.api.Common.getNoticeEdit(e.$routeParams.noticeId).then(function(n){e.$timeout(function(){if(f.svc.isLoading=!1,!n){f.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.ContractNoticeList_Ca,":noticeTypeId",0,":resetFilter",1);return}e.model=n;e.originalModel=angular.copy(n);for(var t=0;t<n.noticeAddress.casInTheNameOfWhichCurrentCaActs.length;t++)e.casInTheNameOfWhichCurrentCaActs.push(n.noticeAddress.casInTheNameOfWhichCurrentCaActs[t]);f.setBreadCrumbs()})},function(){f.svc.isLoading=!1});e.api.Common.getSection1(e.$routeParams.noticeId).then(function(n){f.section1=n},function(){f.svc.modalService.showErrorMessage("Sectiunea 1 MJK")})},function(){f.svc.isLoading=!1})});this.numericTextboxOptions={spinners:!1,min:0,decimals:0,format:"0."};this.$rootScope.$$listeners.saveNoticeAddress=[];this.$rootScope.$on("saveNoticeAddress",function(n,t){f.api.Common.saveNoticeMainAddress(t).then(function(n){n?f.svc.modalService.showSuccessMessages(f.svc.locale.key["NoticeCommon.Info.InfoSavedSuccesfully"]):f.svc.modalService.showErrorMessage(f.svc.locale.key["Common.Error.GenericDatabaseError"])})});this.detectMouseMovements()}return n.prototype.setBreadCrumbs=function(){var t=[],n="";switch(this.model.sysNoticeTypeId){case 2:n="NoticeCommon.Label.ParticipationNotice";break;case 12:n="RFQInvitation.Label.RfqInvitationTitle";break;case 17:n="RFQInvitation.Label.SimplifiedCNoticeTitle";break;case 7:n="PcNotice.Label.ViewTitle";break;case 6:n="DCNoticeView.Label.ViewTitle";break;default:return}t.push({localeKey:"NoticeCommon.Label.NoticesTitle"});t.push({localeKey:n});this.svc.bc.items=t},n.prototype.isDirty=function(){return!angular.equals(this.model,this.originalModel)},n.prototype.openAssociatedDf=function(){this.model.dfNoticeId!=null&&this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v1,this.model.dfNoticeId)},n.prototype.saveNotice=function(){var t=this,n;this.model.noticeAddress.casInTheNameOfWhichCurrentCaActs=this.casInTheNameOfWhichCurrentCaActs;n=this;this.model.sendableToJoue=n.svc.noticeGeneralInfo.sendableToJoue;this.model.sendableToJoueByDefault=this.isSentToJoueAutomatically;this.model.isSad?this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Confirm"],this.svc.locale.key["NoticeCommon.Label.SadWarningLabel"]).then(function(i){i&&(t.svc.isLoading=!0,t.api.Common.saveNotice(t.model).then(function(i){if(n.svc.modalService.clearValidationErrors(),i){n.originalModel=angular.copy(n.model);var r="";switch(t.model.sysNoticeTypeId){case 2:r="CNoticeView.Info.NoticeSaveSuccess";break;case 12:r="RFQInvitation.Info.NoticeSaveSuccess";break;case 17:r="RFQInvitation.Info.NoticeSaveSuccess_SCN";break;case 7:r="PcNotice.Info.NoticeSaveSuccess";break;case 6:r="DCNoticeView.Info.NoticeSaveSuccess";break;default:return}return n.svc.modalService.showMessage(t.svc.locale.key["Common.Info.Info"],n.svc.locale.key[r]),!0}return n.svc.modalService.showMessage(t.svc.locale.key["Common.Info.Error"],n.svc.locale.key["CNoticeView.Error.CouldNotSaveCNotice"]),!1},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){t.svc.isLoading=!1}))}):(this.svc.isLoading=!0,this.api.Common.saveNotice(this.model).then(function(i){if(n.svc.modalService.clearValidationErrors(),i){n.originalModel=angular.copy(n.model);var r="";switch(t.model.sysNoticeTypeId){case 2:r="CNoticeView.Info.NoticeSaveSuccess";break;case 12:r="RFQInvitation.Info.NoticeSaveSuccess";break;case 17:r="RFQInvitation.Info.NoticeSaveSuccess_SCN";break;case 7:r="PcNotice.Info.NoticeSaveSuccess";break;case 6:r="DCNoticeView.Info.NoticeSaveSuccess";break;default:return}return n.svc.modalService.showMessage(t.svc.locale.key["Common.Info.Info"],n.svc.locale.key[r]),!0}return n.svc.modalService.showMessage(t.svc.locale.key["Common.Info.Error"],n.svc.locale.key["CNoticeView.Error.CouldNotSaveCNotice"]),!1},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){t.svc.isLoading=!1}))},n.prototype.validateData=function(){this.validateInformation()},n.prototype.getCurrentDate=function(){var n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0)},n.prototype.getDatePartAndAddDays=function(n,t){var i=new Date(n);return new Date(i.getFullYear(),i.getMonth(),i.getDate()+t,0,0,0,0)},n.prototype.validateTenderReceiptDeadline=function(){return!0},n.prototype.validateTenderOpeningDate=function(){return!0},n.prototype.validateEvaluationDeadline=function(){return!0},n.prototype.validateTenderAvailabilityDeadline=function(){return!0},n.prototype.validateInformation=function(){var n,t;return this.validateTenderReceiptDeadline()||this.validateTenderReceiptDeadline==null?(n=this.svc.locale.key["NoticeCommon.Error.TenderReceptionDeadlineError"]+this.model.noticeInformation.tenderReceiptDeadlineDaysDifferenceParameter+" "+this.svc.pluralizeDays(this.model.isSinglePhaseProcedure?this.svc.configService.cfg.PRC_BiddingMinDaysNoForOpen:this.svc.configService.cfg.PRC_CandidatureMinDaysNoForRestricted),this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Error"],n),!1):!this.model.isSinglePhaseProcedure&&this.model.noticeInformation.tenderInvitationsDispatchDate&&new Date(this.model.noticeInformation.tenderInvitationsDispatchDate)<=new Date(this.model.noticeInformation.tenderReceiptDeadline)?(this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Error"],this.svc.locale.key["NoticeCommon.Error.TenderInvitationsDispatchDateError"]),!1):this.validateTenderOpeningDate()?this.validateEvaluationDeadline()?this.validateTenderAvailabilityDeadline()?!0:(this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Error"],this.svc.locale.key["RFQInvitation.Error.TenderAvailabilityDeadlineError"]),!1):(t=this.svc.locale.key["NoticeCommon.Error.EvaluationDateError2"],this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Error"],t),!1):(this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Error"],this.svc.locale.key["NoticeCommon.Error.TenderOpeningDateError"]),!1)},n.prototype.deleteNotice=function(){var n=this;this.api.Common.deleteNotice(this.$routeParams.noticeId).then(function(t){n.svc.modalService.clearValidationErrors();t?n.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.ContractNoticeList_Ca,":noticeTypeId",0,":resetFilter",1):n.svc.modalService.showErrorMessage(n.svc.locale.key["CNoticeView.Error.CouldNotDeleteCNotice"])},function(t){n.svc.modalService.showValidationResult(t)})},n.prototype.selectPAAPDetail=function(){var n=this;this.api.Common.getSysProcedureTypeForNotice(this.$routeParams.noticeId).then(function(t){n.selectPaapDetailWindow.center().open();n.$rootScope.$broadcast("notice_paap_selector_search",{procType:t})})},n.prototype.unselectPAAPDetail=function(){var n=this;this.api.Common.unassociatePlanDetail(this.model).then(function(t){t?(n.model.paapDetailId=null,n.model.paapName=null,n.model.paapYear=null,n.model.paapVersion=null,n.model.paapDetailName=null,n.model.paapSpentValue=null,n.svc.modalService.showSuccessMessages(n.svc.locale.key["NoticeCommon.Info.PAAPDetailSavedSuccessfully"])):n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeCommon.Error.ErrorSavingPAAPDetail"])},function(t){n.svc.modalService.showValidationResult(t)})},n.prototype.savePAAPSpentValue=function(){var n=this;if(this.svc.modalService.clearValidationErrors(),!this.model.paapDetailId){this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeCommon.Error.SelectPAAPDetail"]);return}if(this.model.paapDetailId&&(this.model.paapSpentValue==null||this.model.paapSpentValue<0)){this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeCommon.Error.SelectValidPAAPSpentValue"]);return}this.api.Common.savePAAPSpentValue(this.model).then(function(t){t?n.svc.modalService.showSuccessMessages(n.svc.locale.key["NoticeCommon.Info.PAAPDetailSavedSuccessfully"]):n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeCommon.Error.ErrorSavingPAAPDetail"])},function(t){n.svc.modalService.showValidationResult(t)})},n.prototype.showAssociateUserToNotice=function(){this.isVisibleUserAssign=!0},n.prototype.assignUser=function(){var n=this;this.model.assignedUser!=null&&this.model.assignedUser.id>0&&this.api.Common.assignUser(this.$routeParams.noticeId,this.model.assignedUser.id).then(function(t){t?(n.isVisibleUserAssign=!1,n.svc.modalService.showMessage(n.svc.locale.key["Common.Info.Info"],n.svc.locale.key["CNoticeView.Info.UserAssignedSuccessfully"])):n.svc.modalService.showMessage(n.svc.locale.key["Common.Info.Error"],n.svc.locale.key["CNoticeView.Error.CouldNotAssignUser"])},function(){n.svc.modalService.showMessage(n.svc.locale.key["Common.Info.Error"],n.svc.locale.key["CNoticeView.Error.CouldNotAssignUser"])})},n.prototype.detectMouseMovements=function(){var n=this;if(window.history&&window.history.pushState)$(window).on("popstate",function(){n.backToList()})},n.prototype.backToList=function(){var n=this,t;this.isDirty()?this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Confirm"],this.svc.locale.key["Common.Info.UnsavedChanges"]).then(function(t){if(t)if(n.svc.nav.getBackParams()){var i=n.svc.nav.getBackParamsAndReset();n.svc.nav.pathWithNamedParam2(n.svc.nav.getBackRouteAndReset(),i[0],i[1],i[2],i[3])}else n.svc.nav.path(n.svc.nav.getBackRouteAndReset())}):this.svc.nav.getBackParams()?(t=this.svc.nav.getBackParamsAndReset(),this.svc.nav.pathWithNamedParam2(this.svc.nav.getBackRouteAndReset(),t[0],t[1],t[2],t[3])):this.svc.nav.path(this.svc.nav.getBackRouteAndReset())},n.prototype.currentUserHasRight=function(n){return this.svc.userService.currentUser?this.svc.userService.currentUser.rights.indexOf(n)>=0:!1},n.prototype.checkedOption4=function(){},n.prototype.navigateToDfNotice=function(n,t){t==2?this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v1,n)},n.prototype.navigateToPiNotice=function(n,t){t==2?this.svc.nav.pathWithParam(sys.prv.routes.CA.PINOTICE_CA_View_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.CA.PINOTICE_CA_View_v2,n)},n.prototype.previewNotice=function(){var n=this;this.model.sendableToJoue=this.svc.noticeGeneralInfo.sendableToJoue;this.model.sendableToJoueByDefault=this.isSentToJoueAutomatically;this.api.Common.saveNotice(this.model).then(function(t){n.svc.modalService.clearValidationErrors();t?(n.originalModel=angular.copy(n.model),n.navigateToPreview()):n.svc.modalService.showMessage(n.svc.locale.key["Common.Info.Error"],n.svc.locale.key["CNoticeView.Error.CouldNotSaveCNotice"])},function(t){n.svc.modalService.showValidationResult(t)})},n.prototype.setBackRoute=function(){var n=[":noticeId",this.$routeParams.noticeId];this.svc.nav.setBackRouteWithParams(sys.prv.routes.CA.ContractNoticeEdit,n)},n.prototype.navigateToPreview=function(){this.setBackRoute();var t=this.model.initNoticeId,n;switch(this.model.sysNoticeTypeId){case 2:case 5:n=sys.prv.routes.CA.CNOTICE_CA_PreviewV2;break;case 12:n=sys.prv.routes.CA.RFQInvitationCaPreviewV2;break;case 17:n=sys.prv.routes.CA.SimplifiedNotice_CA_PreviewV2;break;case 7:n=sys.prv.routes.CA.PCNOTICE_CA_PreviewV2;break;case 6:n=sys.prv.routes.CA.DCNOTICE_CA_PreviewV2;break;default:return}this.svc.nav.pathWithParam(n,t)},n.prototype.setDeadlines=function(){this.model.noticeInformation.canViewTenderAvailabilityDeadline&&this.setTenderAvailabilityDeadline();this.model.noticeInformation.isOnline&&this.model.noticeInformation.canViewTenderOpeningDateAndPlace&&this.setTenderOpeningDate()},n.prototype.setTenderAvailabilityDeadline=function(){var n=angular.copy(this.model.noticeInformation.tenderReceiptDeadline);n.setMonth(n.getMonth()+this.model.tenderAvailabilityInMonths);this.model.noticeInformation.tenderAvailabilityDeadline=new Date(n.getFullYear(),n.getMonth(),n.getDate())},n.prototype.setTenderOpeningDate=function(){var n=angular.copy(this.model.noticeInformation.tenderReceiptDeadline);this.model.noticeInformation.tenderOpeningDate=new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours())},n.$inject=["svc","NoticeCommonApi","$routeParams","$rootScope","$timeout"],n.Cfg={Name:"CONTRACT-NOTICE-EDIT"},n}();n.NoticeCommonEdit=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.item={};n.vm=this;this.procedureId=n.procedureId;this.idProcedureLot=n.idProcedureLot;this.init()}return n.prototype.init=function(){this.filter={pageSize:5,pageIndex:0,documentTypeId:null,evaluationPhaseId:null,evaluationTypeId:null,lotId:null};this.loadFilter();this.setValidPageSizes();this.resetFilter();console.log("am ajuns aici in procedure pdf, list, list.ts")},n.prototype.search=function(){var t=this,n=this,i;this.selectedDocumentType!=null&&(this.filter.documentTypeId=this.selectedDocumentType.id);this.selectedEvaluationType!=null&&(this.filter.evaluationTypeId=this.selectedEvaluationType.id);this.selectedEvaluationPhase!=null&&(this.filter.evaluationPhaseId=this.selectedEvaluationPhase.id);this.selectedLot!=null&&(this.filter.lotId=this.selectedLot.id);i=JSON.stringify({documentTypeId:n.filter.documentTypeId,evaluationTypeId:n.filter.evaluationTypeId,evaluationPhaseId:n.filter.evaluationPhaseId,lotId:n.filter.lotId});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getProcedurePdfDocuments(this.procedureId,this.filter).then(function(i){console.log("rezultatul este:");console.log(i);t.itemList=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.loadFilter=function(){var n=this;this.api.Common.getEvaluationTypes().then(function(t){n.evaluationTypes=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationPhases().then(function(t){n.evaluationPhases=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationLots(this.procedureId).then(function(t){n.lots=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationDocumentTypes().then(function(t){n.documentTypes=t}).finally(function(){n.svc.isLoading=!1})},n.prototype.searchNoticeDocuments=function(){this.filter.pageIndex=0;this.currentPage=0;this.search()},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.resetFilter=function(){this.filter.documentTypeId=null;this.selectedDocumentType=null;this.filter.evaluationTypeId=null;this.selectedEvaluationType=null;this.filter.evaluationPhaseId=null;this.selectedEvaluationPhase=null;this.filter.lotId=null;this.selectedLot=null;this.search()},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.ProcedurePdfController=t;angular.module("app.controls").directive("procedurePdf",function(){return{restrict:"E",replace:!0,scope:{procedureId:"@",sadId:"@",canAddStatement:"@",isOnline:"@",isSad:"@"},templateUrl:"template/common/procedures/procedure-pdf/list/list",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(n){function t(t,i,r,u){var f=this,e,o,s;n.call(this);this.$scope=t;this.$q=i;this.svc=r;this.api=u;this.getAll=function(n){var t,i;return f.filter.parentNoticeId=f.noticeId,f.filter.caNoticeId=f.caNoticeId,t=f,f.isFilterSane(n)?(i=f.$q.defer(),t.api.search(n).then(function(n){t.searchResult=n;t.actions=n.actions;t.conditions=n.conditions;i.resolve(n.items)},function(n){return i.reject(n)}),i.promise):(console.log("Would not search errata section with both caNoticeId and noticeId empty"),null)};e=this;o=this;t.vm=this;o.caNoticeId=t.canoticeid;o.noticeId=t.noticeid;o.parentNoticeId=this.noticeId;o.init();s=e.svc.locale.key["DCNoticeView.Label.PublicationDate"];this.messageToShowOnModifyClick=this.svc.locale.key["Common.Label.ErrataEforms"];this.svc.locale.loadModule(110).then(function(){e.sortModel={sortProperties:[{columnName:"publicationDateFrom",title:s}],exportToExcel:!0,exportToCsv:!0,exportToPdf:!0,title:e.svc.locale.key["DACatalog.Label.SortingTitle"]};e.search()})}return __extends(t,n),t.prototype.init=function(){this.data.items=null;this.svc.userService.currentUser&&(this.isMon=this.svc.userService.currentUserIsMon(),this.isSeap=this.svc.userService.currentUserIsSeap(),this.isSu=this.svc.userService.currentUserIsSu(),this.isCa=this.svc.userService.currentUserIsCa())},t.prototype.isFilterSane=function(n){return n.caNoticeId||n.parentNoticeId},t.prototype.reset=function(){n.prototype.reset.call(this);this.selectedNoticeGenerationType=null;this.selectedENoticeState=null;this.selectedENoticeType=null;this.selectedNoticeProcedureState=null;this.selectedOriginalNoticeType=null;this.selectedAcquisitionContractType=null;this.selectedNoticeProcedureType=null;this.selectedContractAssignmentType=null;this.selectedGeneratingContextType=null;this.selectedAwardCriteriaType=null;this.filter.parentNoticeId=this.noticeId;this.filter.caNoticeId=this.caNoticeId},t.prototype.populateFilter=function(){this.filter.parentNoticeId=this.parentNoticeId;this.selectedNoticeGenerationType&&(this.filter.sysNoticeGenerationTypeID=this.selectedNoticeGenerationType);this.selectedENoticeState&&(this.filter.sysENoticeStateID=this.selectedENoticeState)},t.prototype.add=function(){var n=this;n.svc.isLoading=!0;n.parentNoticeId&&n.api.createENotice(this.filter.parentNoticeId).then(function(t){t>0&&n.svc.nav.pathWithParam(sys.prv.routes.CA.ENOTICE_CA_Edit_v2,t)},function(t){n.svc.modalService.showErrorMessage(t);n.svc.isLoading=!1}).finally(function(){n.svc.isLoading=!1})},t.prototype.navigateToDfNotice=function(n,t,i){i!=null&&i!=18&&(t==2?this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v1,n));i!=null&&i===18&&this.svc.userService.currentUser!=null&&(this.svc.userService.currentUser.isCa||this.svc.userService.currentUser.isSeap||this.svc.userService.currentUser.isAnap)&&this.svc.nav.pathWithParam(sys.prv.routes.CA.DfNoticeEdit_v2,n)},t.prototype.view=function(n){var i=this,t;n.actions.canView&&(t=null,this.isCa&&(t=n.sysNoticeVersionId==2?sys.prv.routes.CA.ENOTICE_CA_ViewV2:sys.prv.routes.CA.ENOTICE_CA_View),this.isMon&&(t=n.sysNoticeVersionId==2?sys.prv.routes.SEAP.ENOTICE_MON_ViewV2:sys.prv.routes.SEAP.ENOTICE_MON_View),this.isSeap&&(t=n.sysNoticeVersionId==2?sys.prv.routes.SEAP.ENOTICE_SEAP_ViewV2:sys.prv.routes.SEAP.ENOTICE_SEAP_View),this.isSu&&(t=n.sysNoticeVersionId==2?sys.prv.routes.SU.ENOTICE_SU_ViewV2:sys.prv.routes.SU.ENOTICE_SU_View),t||(t=n.sysNoticeVersionId==2?sys.pub.routes.ENOTICE_PUBLIC_VIEWV2:sys.pub.routes.ENOTICE_PUBLIC_VIEW),this.svc.nav.pathWithParam(t,n.eNoticeID))},t.prototype.edit=function(n){var i=this,t;n.actions.canEdit&&(t=sys.prv.routes.CA.ENOTICE_CA_Edit_v2,this.svc.nav.pathWithParam(t,n.eNoticeID))},t.prototype.exportData=function(n){if(this.total>this.svc.configService.cfg.MaxNumberOfFilesForExport){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxNumberOfFilesForExport);return}this.populateFilter();this.api.getExportDocument(this.filter,n,!1)},t.$inject=["$scope","$q","svc","ENOTICE_SERVICE"],t.ID="ENoticeSectionListController",t}(n.BaseList),u,f,e,r;t.ENoticeSectionListController=i;u=function(){function n(){}return n}();t.ListHeaderModelTS=u;f=function(){function n(){}return n}();t.SortColumn=f,function(n){n[n.Excel=0]="Excel";n[n.Pdf=1]="Pdf";n[n.Csv=2]="Csv"}(t.ExportOptionsEnum||(t.ExportOptionsEnum={}));e=t.ExportOptionsEnum;r=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/ENotice"}return __extends(t,n),t.prototype.search=function(n){var t=this.api+"/search";return this.POST(t,n)},t.prototype.getExportDocument=function(n,t,i){this.DOWNLOAD(this.api+"/getExportDocument/",n,{exportType:t,fullExport:i})},t.prototype.createENotice=function(n){return this.GET(this.api+"/createENotice/",{noticeId:n})},t.prototype.GetAllChangeNotices=function(n){return this.POST(this.api+"/GetAllNoticeChanges/",n)},t.prototype.GetChangeNoticeView=function(n){return this.POST(this.api+"/GetNoticeChangeView/",n)},t.prototype.getPdfNoticeChange=function(n){this.DOWNLOAD(this.api+"/GetPdfNoticeChange/",n)},t.$inject=["$http","$q"],t.ID="ENOTICE_SERVICE",t}(sys.HttpApi);t.ENoticeService=r;angular.module("app.controls").service("ENOTICE_SERVICE",r);angular.module("app.controls").controller(i.ID,i);angular.module("app.controls").directive("errataSection",function(){return{restrict:"E",replace:!0,scope:{canoticeid:"=",noticeid:"="},controller:i.ID,templateUrl:"template/common/notices/errata/errata"}})})(i=t.caNotice||(t.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.isStarting=!0,n.filter={},n.total=0,n}(),i=function(){function n(n,i,u,f,e){var o=this;this.svc=n;this.$rootScope=i;this.locale=e;this.isSad=!1;this.sysProcedureTypes=[];this.selectedGrid=[];this.gridOptions={dataSource:{type:"json",transport:{read:function(n){var i=t.filter,r,u;i.pageIndex=n.data.page-1;i.pageSize=n.data.pageSize;t.isStarting?(t.isStarting=!1,r={},u={items:[r],total:0},n.success(u)):t.api.getAllDfNotice(i).then(function(t){n.success(t)})}},pageSize:10,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return t.total=n.total,n.total}}},height:200,scrollable:{virtual:!0},sortable:!0,selectable:"row",change:function(n){var i=n.sender.$angular_scope.vm,r=this.select(),t,u;for(i.selectedGrid=[],t=0;t<r.length;t++)u=this.dataItem(r[t]),i.selectedGrid.push(u)},columns:[{field:"dfNoticeNo",title:this.locale.key["DFNoticeView.Label.NoticeNo"],width:100},{field:"contractTitle",title:this.locale.key["DFNoticeView.Label.ContractName"],width:300},{field:"acceptanceDate",title:this.locale.key["NoticeCommon.Label.AcceptanceDate"],width:150,template:"<span>{{dataItem.acceptanceDate|date}}<\/span>"},{field:"procedureType",title:this.locale.key["DFNoticeView.Label.ProcedureType"],width:150}]};t.api=new r(u,f);this.clearFilters();t.filter=this.getFilter();i.$$listeners.notice_df_selector_search=[];this.$rootScope.$on("notice_df_selector_search",function(){o.search()});i.$$listeners.notice_df_set_notice_type=[];this.$rootScope.$on("notice_df_set_notice_type",function(n,t){o.sysNoticeTypeIdForFilter=t.noticeTypeId;t.isSad!=null&&(o.isSad=t.isSad)});this.svc.ComboApi.getSysProcedureTypes().then(function(n){o.sysProcedureTypes=n.results})}return n.prototype.checkFilterNumbersAreValid=function(n,t){return n!=null&&t!=null&&new Number(n)>new Number(t)?!0:!1},Object.defineProperty(n.prototype,"total",{get:function(){return t.total},enumerable:!0,configurable:!0}),n.prototype.search=function(){t.filter=this.getFilter();this.grid!=null&&this.grid.dataSource!=null&&(this.sysNoticeTypeIdForFilter!=12&&this.sysNoticeTypeIdForFilter!=2&&this.grid.hideColumn("sysProcedureType"),this.grid.dataSource.read())},n.prototype.clearFilters=function(){t.isStarting=!0;this.grid!=null&&this.grid.dataSource!=null&&this.grid.dataSource.read();this.filter={};this.procedureType=null;this.assignedUser=null},n.prototype.exportData=function(n){if(this.total>this.svc.configService.cfg.MaxNumberOfFilesForExport){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxNumberOfFilesForExport);return}t.api.getExportDocument(this.filter,n)},n.prototype.save=function(){if(this.selectedGrid.length==0){this.svc.modalService.showMessage(this.locale.key["Common.Info.Info"],this.locale.key["DFNoticeView.Validation.ValidateSelectADFNotice"]);return}this.$rootScope.$broadcast("df_selector_save",{selectedGrid:this.selectedGrid[0],sysNoticeTypeId:this.sysNoticeTypeIdForFilter})},n.prototype.cancel=function(){this.$rootScope.$broadcast("df_selector_close",null)},n.prototype.getFilter=function(){var n=this.filter;return this.procedureType&&(n.sysProcedureTypeId=this.procedureType.id),this.assignedUser&&(n.aCAssignedUserId=this.assignedUser.id),this.isSad!=null&&this.isSad==!0&&(n.sysContractAssigmentTypeId=2),n.sysNoticeTypeId=this.sysNoticeTypeIdForFilter,n.isSelectingDF=!0,n},n.Key="Ctrl_DF_Selector",n.$inject=["svc","$rootScope","$http","$q","locale"],n}(),r;n.Ctrl_DF_Selector=i;angular.module("app.controls").controller(i.Key,i);r=function(n){function t(t,i){n.call(this,t,i);this.api="api/CADFNotice"}return __extends(t,n),t.prototype.getAllDfNotice=function(n){return this.POST(this.api+"/GetAll_InitNotice/",n)},t.prototype.getExportDocument=function(n,t){this.DOWNLOAD(this.api+"/getExportDocumentMinimal/",n,{exportType:t})},t.$inject=["$http","$q"],t}(sys.HttpApi)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isStarting=!0,n.filter={},n.total=0,n}(),f=function(n){function t(t,i){n.call(this,t,i);this.api="api/CAPaap"}return __extends(t,n),t.prototype.getAllForSelect=function(n){return this.GET(this.api+"/getAllForSelect/",n)},t}(sys.HttpApi),i=function(){function n(){}return n.isStarting=!0,n.filterppn={},n.total=0,n}(),e=function(n){function t(t,i){n.call(this,t,i);this.api="api/CAPrevPublicationNotice"}return __extends(t,n),t.prototype.getAllForSelect=function(n){return this.GET(this.api+"/getAllForSelect/",n)},t}(sys.HttpApi),u=function(){function n(n,i,r,u){var e=this;this.svc=n;this.$rootScope=i;this.$http=r;this.$q=u;this.searched=!1;this.showSysProcedureTypeFilter=!0;this.selectedGrid=[];this.gridOptions={dataSource:{type:"json",transport:{read:function(n){var i=t.filter,r,u;i.pageIndex=n.data.page-1;i.pageSize=n.data.pageSize;t.isStarting?(t.isStarting=!1,r={},u={items:[r],total:0},t.defer&&t.defer.resolve(),n.success(u)):t.api.getAllForSelect(i).then(function(i){t.defer&&t.defer.resolve();n.success(i)})}},pageSize:10,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return t.total=n.total,n.total}}},height:250,scrollable:{virtual:!0},sortable:!0,resizable:!0,selectable:"row",change:function(n){var i=n.sender.$angular_scope.vm,r=this.select(),t,u;for(i.selectedGrid=[],t=0;t<r.length;t++)u=this.dataItem(r[t]),i.selectedGrid.push(u)},columns:[{field:"uniqueIdentificationCode",title:this.svc.locale.key["PAAP.Label.PAAPDetailUniqueCode"],width:80},{field:"paapDetailName",title:this.svc.locale.key["PAAP.Label.PAAPDetailName"],width:180},{field:"cpvCode",title:this.svc.locale.key["Common.Label.CPVCodeAndName"],width:100,template:"<span>{{dataItem.cpvCode.localeKey}} {{dataItem.cpvCode.text}}<\/span>"},{field:"procedureType",title:this.svc.locale.key["PAAP.Label.ProcedureType"],width:100},{field:"acquisitionValue",title:this.svc.locale.key["PAAP.Label.AcquisitionValueRON"],width:60,template:"<span>{{dataItem.acquisitionValue|currency:''}}<\/span>"},{field:"valueLeftToAllocateRON",title:this.svc.locale.key["PAAP.Label.ValueLeftRON"],width:60,template:"<span>{{dataItem.valueLeftToAllocateRON|currency:''}}<\/span>"},{field:"currency",title:this.svc.locale.key["Common.Label.Currency"],width:60,template:"<span>{{dataItem.currency}}<\/span>"}]};t.api=new f(this.$http,this.$q);this.clearFilters();i.$$listeners.notice_paap_selector_search=[];this.$rootScope.$on("noPrevNotice_paap_selector_search",function(n,t){t&&(e.local?e.local.filter.sysProcedureTypeId=t.id:e.filter.sysProcedureTypeId=t.id,e.sysProcedureType=t);e.search()});this.$rootScope.$on("notice_paap_selector_search",function(n,t){t&&(e.procTypeId=t.procType.id,e.local?e.sysProcedureType?(e.local.filter.sysProcedureTypeId=t.procType.id,e.sysProcedureType=t.procType):(e.sysProcedureType={id:8,text:e.svc.locale.key["PAAP.Label.DirectAcquisition"]},e.local.filter.sysProcedureTypeId=8):e.sysProcedureType?(e.filter.sysProcedureTypeId=t.procType.id,e.sysProcedureType=t.procType):t.procType?(e.filter.sysProcedureTypeId=t.procType.id,e.sysProcedureType=t.procType):(e.sysProcedureType={id:8,text:e.svc.locale.key["PAAP.Label.DirectAcquisition"]},e.filter.sysProcedureTypeId=8));e.search()});this.$rootScope.$on("notice_paap_selector_checkForPaap_withcallback",function(n,i,r){var u={};i&&(e.hideSysProcedureTypeFilter(),u.sysProcedureTypeId=i);t.api.getAllForSelect(u).then(function(n){n&&r(n.total>0)})});this.$rootScope.$on("notice_paap_selector_exclude_procedureTypes",function(n,t,i){t&&(e.hideSysProcedureTypeFilter(),e.local?e.local.filter.excludedSysProcedureTypeIds=t:e.filter.excludedSysProcedureTypeIds=t);e.search();i()})}return Object.defineProperty(n.prototype,"total",{get:function(){return t.total},enumerable:!0,configurable:!0}),n.prototype.deleteSysProcedureTypeFromFilter=function(){this.local.filter.sysProcedureType!=null&&(this.local.filter.sysProcedureType=null,this.local.filter.sysProcedureTypeId=null)},n.prototype.hideSysProcedureTypeFilter=function(){this.showSysProcedureTypeFilter&&(this.showSysProcedureTypeFilter=!1,this.local!=null&&this.local.filter!=null&&this.deleteSysProcedureTypeFromFilter())},n.prototype.search=function(){return this.selectedGrid=[],this.searched=!0,this.local?(this.showSysProcedureTypeFilter&&this.local.filter.sysProcedureType!=null&&(this.local.filter.sysProcedureTypeId=this.local.filter.sysProcedureType.id),t.filter=this.local.filter):t.filter=this.filter,t.defer=$.Deferred(),this.grid!=null&&this.grid.dataSource!=null?this.grid.dataSource.read():this.svc.timeout.executeWithTimespan(function(){t.defer.resolve()},500),t.defer.promise(null)},n.prototype.clearFilters=function(){this.showSysProcedureTypeFilter=!0;t.isStarting=!0;this.grid!=null&&this.grid.dataSource!=null&&this.grid.dataSource.read();this.filter={sysProcedureTypeId:this.procTypeId};this.local&&(this.local.filter={sysProcedureTypeId:this.procTypeId})},n.prototype.save=function(){if(this.selectedGrid.length==0){this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Info"],this.svc.locale.key["PAAP.Validation.NoPAAPDetailSelected"]);return}this.$rootScope.$broadcast("notice_paap_selector_save",this.selectedGrid)},n.prototype.cancel=function(){this.$rootScope.$broadcast("notice_paap_selector_close",null)},n.$inject=["svc","$rootScope","$http","$q"],n}(),r;n.Ctrl_Window_PaapDetailSelect=u;r=function(){function n(n,t,r,u){this.svc=n;this.$rootScope=t;this.$http=r;this.$q=u;this.searched=!1;this.showSysProcedureTypeFilter=!0;this.selectedGrid=[];this.gridOptions={dataSource:{type:"json",transport:{read:function(n){var t=i.filterppn,r,u;t.pageIndex=n.data.page-1;t.pageSize=n.data.pageSize;i.isStarting?(i.isStarting=!1,r={},u={items:[r],total:0},i.defer&&i.defer.resolve(),n.success(u)):i.api.getAllForSelect(t).then(function(t){i.defer&&i.defer.resolve();n.success(t)})}},pageSize:10,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return i.total=n.total,n.total}}},height:250,scrollable:{virtual:!0},sortable:!0,resizable:!0,selectable:"row",change:function(n){var i=n.sender.$angular_scope.vm,r=this.select(),t,u;for(i.selectedGrid=[],t=0;t<r.length;t++)u=this.dataItem(r[t]),i.selectedGrid.push(u)},columns:[{field:"contractName",title:this.svc.locale.key["PreviousPublicationNotice.Label.ContractName"],width:80},{field:"noticeTypeText",title:this.svc.locale.key["PreviousPublicationNotice.Label.NoticeType"],width:100},{field:"publicationDate",title:this.svc.locale.key["PreviousPublicationNotice.Label.PublicationDate"],width:100,template:"<span>{{dataItem.publicationDate|date:''}}<\/span>"},{field:"sysAcquisitionContractTypeText",title:this.svc.locale.key["PreviousPublicationNotice.Label.AcquisitionContractType"],width:60}]};i.api=new e(this.$http,this.$q);this.clearFilters();this.search()}return n.prototype.search=function(){return this.selectedGrid=[],this.searched=!0,i.filterppn=this.filterppn,i.defer=$.Deferred(),this.grid!=null&&this.grid.dataSource!=null?this.grid.dataSource.read():this.svc.timeout.executeWithTimespan(function(){i.defer.resolve()},500),i.defer.promise(null)},n.prototype.clearFilters=function(){this.showSysProcedureTypeFilter=!0;i.isStarting=!0;this.grid!=null&&this.grid.dataSource!=null&&this.grid.dataSource.read();this.filterppn={};this.local&&(this.local.filter={})},n.prototype.save=function(){if(this.selectedGrid.length==0){this.svc.modalService.showMessage(this.svc.locale.key["Common.Info.Info"],this.svc.locale.key["PreviousPublicationNotice.Validation.NoPPNSelected"]);return}this.$rootScope.$broadcast("notice_ppn_selector_save",this.selectedGrid)},n.prototype.cancel=function(){this.$rootScope.$broadcast("notice_ppn_selector_close",null)},n.$inject=["svc","$rootScope","$http","$q"],n}();n.Ctrl_Window_PrevPublicationNoticeSelect=r;app.PRIVATE.lazy&&(app.PRIVATE.lazy.controller("Ctrl_Window_PaapDetailSelect",u),app.PRIVATE.lazy.controller("Ctrl_Window_PrevPublicationNoticeSelect",r));app.PUB.lazy&&(app.PUB.lazy.controller("Ctrl_Window_PaapDetailSelect",u),app.PUB.lazy.controller("Ctrl_Window_PrevPublicationNoticeSelect",r))})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){"use strict";var t=function(){function n(n,t,i){var f,r,u;this.$scope=n;this.$q=t;this.svc=i;f=this;r=this;n.vm=this;r.show=r.model!=null;r.fiscalCodeLabel=n.fiscalCodeLabel;r.nutsCodeLabel=n.nutsCodeLabel;r.contactLabel=n.contactLabel;r.authorityLabel=n.showAuthorityLabel;r.buyerProfileLabel=n.buyerProfileLabel;r.showFiscalCode=this.getValue(n.showFiscalCode,!0);r.showNutsCode=this.getValue(n.showNutsCode,!0);r.showContact=this.getValue(n.showContact,!0);r.showAuthorityAddress=this.getValue(n.showAuthorityAddress,!0);r.showBuyerProfileAddress=this.getValue(n.showBuyerProfileAddress,!0);r.showSme=this.getValue(n.showSme,!1);r.showAttentionTo=this.getValue(n.showAttentionTo,!1);r.showBuyerLegalType=this.getValue(n.showBuyerLegalType,!1);u=n.specialState;u&&u==="isCaNoticeAddress"&&(r.showAuthorityAddress=!1,r.showBuyerProfileAddress=!1)}return Object.defineProperty(n.prototype,"model",{get:function(){return this.$scope.address},set:function(){this.$scope.address={}},enumerable:!0,configurable:!0}),n.prototype.getValue=function(n,t){return typeof n=="undefined"?t:n},n.prototype.onPostalCodeLostFocus=function(){},n.ID="NoticeEntityAddressViewController",n.$inject=["$scope","$q","svc"],n}();n.NoticeEntityAddressViewController=t;angular.module("app.controls").controller(t.ID,t);angular.module("app.controls").directive("noticeEntityAddressView",["$http","svc",function(){return{restrict:"E",replace:!0,scope:{address:"=",showFiscalCode:"=",fiscalCodeLabel:"@",showNutsCode:"=",nutsCodeLabel:"@",showContact:"=",contactLabel:"@",showAuthorityAddress:"=",authorityLabel:"@",showBuyerProfileAddress:"=",buyerProfileLabel:"@",showAttentionTo:"=",showSme:"=",specialState:"@",showBuyerLegalType:"="},templateUrl:"template/common/address/noticeEntityAddressView",controller:t.ID,link:function(){}}}])}(common||(common={})),function(n){"use strict";var t=function(){function n(n,t,i,r,u){var o=this,s,f,e;this.$scope=n;this.$q=t;this.svc=i;this.$timeout=r;this.$rootScope=u;s=this;f=this;n.vm=this;f.isOfficialNameSelectable=this.getValue(n.isOfficialNameSelectable,!1);f.showOfficialAddressName=this.getValue(n.showOfficialAddressName,!0);f.showFiscalCode=this.getValue(n.showFiscalCode,!0);f.showNutsCode=this.getValue(n.showNutsCode,!0);f.showContact=this.getValue(n.showContact,!0);f.showInternetAddress=this.getValue(n.showInternetAddress,!0);f.showAuthorityAddress=this.getValue(n.showAuthorityAddress,!0);f.showBuyerProfileAddress=this.getValue(n.showBuyerProfileAddress,!0);f.showSme=this.getValue(n.showSme,!0);f.showPhone=this.getValue(n.showPhone,!0);f.showEmail=this.getValue(n.showEmail,!0);f.showFax=this.getValue(n.showFax,!0);f.showDropdownContactpoints=this.getValue(n.showDropdownContactpoints,!0);f.disableAddress=this.getValue(n.disableAddress,!1);f.disableFiscalCode=this.getValue(n.disableFiscalCode,!1);f.disableBuyerProfileAddress=this.getValue(n.disableBuyerProfileAddress,n.buyerProfileUrlDisabled==="1");f.showBuyerLegalType=this.getValue(n.showBuyerLegalType,!1);f.fiscalCodeLabel=n.fiscalCodeLabel;f.nutsCodeLabel=n.nutsCodeLabel;f.contactLabel=n.contactLabel;f.authorityLabel=n.showAuthorityLabel;f.buyerProfileLabel=n.buyerProfileLabel;f.multipleAddressesLabel=n.multipleAddressesLabel;f.isDisabled=this.getValue(n.isDisabled,!1);f.isModification=this.getValue(n.isModification,!1);f.showInternetAddress=f.showInternetAddress&&!f.showBuyerProfileAddress;e=n.specialState;e&&(e==="isCaNoticeAddress"&&(f.disableAddress=!0,f.disableFiscalCode=!0,f.showInternetAddress=!1,f.showSme=!1),e==="hideAllContacts"&&(f.showContact=!1,f.showEmail=!1,f.showPhone=!1,f.showFax=!1,f.showInternetAddress=!1,f.showBuyerProfileAddress=!1,f.showSme=!1));f.isOfficialNameSelectable&&(f.changeAddressEntityCallCount=0,n.$watch(function(){return f.model&&f.model.entityItem&&f.model.entityItem.id},function(){(f.changeAddressEntityCallCount++,f.changeAddressEntityCallCount!=1)&&f.changeAddressEntity()}));this.$rootScope.$$listeners.validationFieldActive=[];this.$rootScope.$on("validationFieldActive",function(){o.validationField=!0})}return Object.defineProperty(n.prototype,"model",{get:function(){return this.$scope.address},set:function(){this.$scope.address={}},enumerable:!0,configurable:!0}),n.prototype.getValue=function(n,t){return typeof n=="undefined"?t:n},n.prototype.changeAddressEntity=function(){var n=this;n.model&&n.model.entityItem&&n.$timeout(function(){n.model.entityItem&&n.model.entityItem.address&&(n.model.nationalIDNumber=n.model.entityItem.address.cif,n.model.address=n.model.entityItem.address.address,n.model.cityItem={text:n.model.entityItem.address.cityName,id:n.model.entityItem.address.city!=null?n.model.entityItem.address.city.id:-1},n.model.city=n.model.entityItem.address.cityName,n.model.postalCode=n.model.entityItem.address.postalCode,n.model.postalCodeItem={text:n.model.entityItem.address.postalCode,id:n.model.postalCodeItem!=null?n.model.postalCodeItem.id:-1},n.model.countryItem=n.model.entityItem.address.country,n.model.country=n.model.entityItem.address.countryName,n.model.nutsCodeItem=n.model.entityItem.address.nutsCode,n.model.contactPoints=n.model.entityItem.address.contactPoints,n.model.phone=n.model.entityItem.address.phone,n.model.email=n.model.entityItem.address.email,n.model.entityItem.address.nutsCode&&(n.model.nutsCode=n.model.entityItem.address.nutsCode.text),n.model.contactUserId=n.selectedCaUser.id)})},n.prototype.onPostalCodeLostFocus=function(){},n.prototype.onContactPersonChange=function(){var t=this,n=this;n.selectedCaUser&&n.svc.ComboApi.GetEntityInfoById(n.selectedCaUser.id).then(function(t){t&&(n.model.contactUserId=t.userID,n.model.contactPoints=t.userName,n.model.phone=t.mobilePhone,n.model.email=t.email)},function(n){t.svc.log.info("bind error:"+n)}).finally(function(){})},n.ID="NoticeEntityAddressEditController",n.$inject=["$scope","$q","svc","$timeout","$rootScope"],n}();n.NoticeEntityAddressEditController=t;angular.module("app.controls").controller(t.ID,t);angular.module("app.controls").directive("noticeEntityAddressEdit",["$http","svc",function(){return{restrict:"E",replace:!0,scope:{address:"=",isOfficialNameSelectable:"=",showOfficialAddressName:"=",showFiscalCode:"=",showNutsCode:"=",showAuthorityAddress:"=",showBuyerProfileAddress:"=",showPhone:"=",showEmail:"=",showFax:"=",showInternetAddress:"=",disableAddress:"=",disableFiscalCode:"=",disableBuyerProfileAddress:"=",buyerProfileUrlDisabled:"@",fiscalCodeLabel:"@",nutsCodeLabel:"@",showContact:"=",contactLabel:"@",authorityLabel:"@",buyerProfileLabel:"@",multipleAddressesLabel:"@",isDisabled:"=",showSme:"=",specialState:"@",showDropdownContactpoints:"=",showBuyerLegalType:"=",isModification:"="},templateUrl:"template/common/address/noticeEntityAddressEdit",controller:t.ID,link:function(){}}}])}(common||(common={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.$scope=n;this.svc=t;this.api=i;n.vm=this;this.initNoticeId=n.initNotice;this.sysNoticeTypeId=n.noticeType;this.init()}return n.prototype.init=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getDfNoticeSectionFiles(this.initNoticeId,this.sysNoticeTypeId).then(function(t){n.model=t}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeCommonApi"],n}();n.SectionDfFilesController=t;angular.module("app.controls").directive("sectionDfFiles",function(){return{restrict:"E",replace:!0,scope:{initNotice:"@",noticeType:"@"},templateUrl:"template/common/notices/common/sectionDfFiles/sectionDfFiles",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.svc=n;this.api=t;this.$cookieStore=i;this.$routeParams=r;this.filter={pageSize:5,showOngoingDa:!0};this.listItems=[];this.sysDirectAcquisitionStateList=[];this.canShowFinalizeDateOrderCriteria=!1;this.canShowDeadlineOrderCriteria=!1;this.autocompleteDates=!1;this.exportData=function(n){u.svc.isLoading=!0;switch(n){case"excel":u.api.Common.getExportDocument(u.filter,common.ExportType.Excel).finally(function(){return u.svc.isLoading=!1});break;case"pdf":u.api.Common.getExportDocument(u.filter,common.ExportType.Pdf).finally(function(){return u.svc.isLoading=!1});break;case"csv":u.api.Common.getExportDocument(u.filter,common.ExportType.Csv).finally(function(){return u.svc.isLoading=!1})}};this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=this.svc.locale.key["DirectAcquisition.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.DirectAcquisition_MaxListItems);r.isFromMenu==="1"&&(this.cookieContext="menu",this.autocompleteDates=!0);this.init()}return n.prototype.init=function(){this.setValidPageSizes();this.setContextFromCookie();this.setFilterComboSource();this.setFilterFromContext();this.autocompleteDates&&this.setFinalizationDate()},n.prototype.setContextFromCookie=function(){this.$cookieStore.get("directAcquisitionContext")&&(this.cookieContext=this.$cookieStore.get("directAcquisitionContext"),this.$cookieStore.put("directAcquisitionContext",null))},n.prototype.setFilterFromContext=function(){this.cookieContext&&this.cookieContext==="dashboard"&&(this.resetFilter(),this.svc.userService.currentUserIsCa()&&(this.filter.sysDirectAcquisitionStateId=5),this.svc.userService.currentUserIsSu()&&(this.filter.sysDirectAcquisitionStateId=2));this.cookieContext&&this.cookieContext==="menu"&&(this.resetFilter(),this.filter.cookieContext=this.cookieContext);this.populateInitialFilter();this.search()},n.prototype.setInitialFilter=function(){this.$cookieStore.put("daList_filter",this.filter);this.selectedSysDirectAcquisitionState&&this.selectedSysDirectAcquisitionState.id>0&&this.$cookieStore.put("daList_selectedSysDirectAcquisitionState",this.selectedSysDirectAcquisitionState);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("daList_selectedContractingAuthority",this.selectedContractingAuthority);this.selectedSupplier&&this.selectedSupplier.id>0&&this.$cookieStore.put("daList_selectedSupplier",this.selectedSupplier);this.selectedCpv&&this.selectedCpv.id>0&&this.$cookieStore.put("daList_selectedCpv",this.selectedCpv);this.selectedCpvCategory&&this.selectedCpvCategory.id>0&&this.$cookieStore.put("daList_selectedCpvCategory",this.selectedCpvCategory);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&this.$cookieStore.put("daList_selectedSysAcquisitionContractType",this.selectedSysAcquisitionContractType);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("daList_selectedAssignedUser",this.selectedAssignedUser)},n.prototype.populateInitialFilter=function(){this.$cookieStore.get("daList_filter")!=null&&(this.filter=this.$cookieStore.get("daList_filter"),this.filter.caDecisionDeadlineStart&&(this.filter.caDecisionDeadlineStart=new Date(this.filter.caDecisionDeadlineStart)),this.filter.caDecisionDeadlineEnd&&(this.filter.caDecisionDeadlineEnd=new Date(this.filter.caDecisionDeadlineEnd)),this.filter.supplierDecisionDeadlineStart&&(this.filter.supplierDecisionDeadlineStart=new Date(this.filter.supplierDecisionDeadlineStart)),this.filter.supplierDecisionDeadlineEnd&&(this.filter.supplierDecisionDeadlineEnd=new Date(this.filter.supplierDecisionDeadlineEnd)),this.filter.finalizationDateStart&&(this.filter.finalizationDateStart=new Date(this.filter.finalizationDateStart)),this.filter.finalizationDateEnd&&(this.filter.finalizationDateEnd=new Date(this.filter.finalizationDateEnd)),this.filter.publicationDateStart&&(this.filter.publicationDateStart=new Date(this.filter.publicationDateStart)),this.filter.publicationDateEnd&&(this.filter.publicationDateEnd=new Date(this.filter.publicationDateEnd)),this.currentPage=this.filter.pageIndex,this.currentPageTmp=this.filter.pageIndex,this.$cookieStore.put("daList_filter",null));this.$cookieStore.get("daList_selectedSysDirectAcquisitionState")!=null&&(this.selectedSysDirectAcquisitionState=this.$cookieStore.get("daList_selectedSysDirectAcquisitionState"),this.$cookieStore.put("daList_selectedSysDirectAcquisitionState",null));this.$cookieStore.get("daList_selectedContractingAuthority")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("daList_selectedContractingAuthority"),this.$cookieStore.put("daList_selectedContractingAuthority",null));this.$cookieStore.get("daList_selectedSupplier")!=null&&(this.selectedSupplier=this.$cookieStore.get("daList_selectedSupplier"),this.$cookieStore.put("daList_selectedSupplier",null));this.$cookieStore.get("daList_selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("daList_selectedCpv"),this.$cookieStore.put("daList_selectedCpv",null));this.$cookieStore.get("daList_selectedCpvCategory")!=null&&(this.selectedCpvCategory=this.$cookieStore.get("daList_selectedCpvCategory"),this.$cookieStore.put("daList_selectedCpvCategory",null));this.$cookieStore.get("daList_selectedSysAcquisitionContractType")!=null&&(this.selectedSysAcquisitionContractType=this.$cookieStore.get("daList_selectedSysAcquisitionContractType"),this.$cookieStore.put("daList_selectedSysAcquisitionContractType",null));this.$cookieStore.get("daList_selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("daList_selectedAssignedUser"),this.$cookieStore.put("daList_selectedAssignedUser",null))},n.prototype.search=function(){var t=this,n,i;this.validateFilterData()&&(n=this,this.populateFilter(),i=JSON.stringify({uniqueIdentificationCode:n.filter.uniqueIdentificationCode,directAcquisitionName:n.filter.directAcquisitionName,sysDirectAcquisitionStateId:n.filter.sysDirectAcquisitionStateId,caDecisionDeadlineStart:n.filter.caDecisionDeadlineStart,caDecisionDeadlineEnd:n.filter.caDecisionDeadlineEnd,supplierDecisionDeadlineStart:n.filter.supplierDecisionDeadlineStart,supplierDecisionDeadlineEnd:n.filter.supplierDecisionDeadlineEnd,contractingAuthorityId:n.filter.contractingAuthorityId,supplierId:n.filter.supplierId,cpvCodeId:n.filter.cpvCodeId,cpvCodeText:n.filter.cpvCodeText,showOngoingDa:n.filter.showOngoingDa,finalizationDateStart:n.filter.finalizationDateStart,finalizationDateEnd:n.filter.finalizationDateEnd,cpvCategoryId:n.filter.cpvCategoryId,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,isEuFunded:n.filter.isEuFunded,hasAwardNoticePublished:n.filter.hasAwardNoticePublished,isMultipleDa:n.filter.isMultipleDa,assignedUserId:n.filter.assignedUserId}),i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0),n.lastFilterHash=i,n.filter.pageIndex=n.currentPage,this.populateFilter(),this.svc.isLoading=!0,n.filter.pageSize||(n.filter.pageSize=5),this.api.Common.getDirectAcquisitionList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1;t.enableOrderCriteria()}))},n.prototype.enableOrderCriteria=function(){this.canShowFinalizeDateOrderCriteria=this.filter.showOngoingDa?!1:!0;this.svc.userService.currentUserIsCa()&&(this.canShowDeadlineOrderCriteria=this.selectedSysDirectAcquisitionState&&this.selectedSysDirectAcquisitionState.id===5?!0:!1);this.svc.userService.currentUserIsSu()&&(this.canShowDeadlineOrderCriteria=this.selectedSysDirectAcquisitionState&&this.selectedSysDirectAcquisitionState.id===2?!0:!1)},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&(this.filter.assignedUserId=this.selectedAssignedUser.id);this.selectedSysDirectAcquisitionState&&this.selectedSysDirectAcquisitionState.id>0&&(this.filter.sysDirectAcquisitionStateId=this.selectedSysDirectAcquisitionState.id);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id);this.selectedSupplier&&this.selectedSupplier.id>0&&(this.filter.supplierId=this.selectedSupplier.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cpvCodeId=this.selectedCpv.id);this.selectedCpvCategory&&this.selectedCpvCategory.id>0&&(this.filter.cpvCategoryId=this.selectedCpvCategory.id);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&(this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType.id);this.filter.cookieContext=this.cookieContext},n.prototype.resetFilter=function(){var o=this.filter.pageSize,n,t,i,r,u,f,e;this.filter={pageSize:o,showOngoingDa:!0};this.cookieContext=null;this.selectedSysDirectAcquisitionState=null;this.selectedContractingAuthority=null;this.selectedSupplier=null;this.selectedCpv=null;this.selectedCpvCategory=null;this.selectedAssignedUser=null;this.selectedSysAcquisitionContractType=null;n=$("#filterCaDdl1").data("kendoDropDownList");n&&n.text("");t=$("#filterCaDdl2").data("kendoDropDownList");t&&t.text("");i=$("#filterSuDdl").data("kendoDropDownList");i&&i.text("");r=$("#filterCpvDdl").data("kendoDropDownList");r&&r.text("");u=$("#filterCpvCatDdl").data("kendoDropDownList");u&&u.text("");f=$("#filterContractTypeDdl").data("kendoDropDownList");f&&f.text("");e=$("#filterStateCmb").data("kendoComboBox");e&&e.value("")},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.validateFilterData=function(){if(!this.filter.showOngoingDa&&(!this.filter.uniqueIdentificationCode||this.filter.uniqueIdentificationCode.trim()==="")&&(!this.filter.finalizationDateStart||!this.filter.finalizationDateEnd))return this.svc.modalService.showErrorMessage(this.svc.locale.key["DirectAcquisition.Validation.FinalizationDateFilterValidation"]),!1;if((!this.filter.uniqueIdentificationCode||this.filter.uniqueIdentificationCode.trim()==="")&&this.filter.finalizationDateStart&&this.filter.finalizationDateEnd){var n=new Date(this.filter.finalizationDateStart),t=new Date(this.filter.finalizationDateEnd);if(n.getFullYear()!==t.getFullYear())return this.svc.modalService.showErrorMessage(this.svc.locale.key["DirectAcquisition.Validation.FinalizationDateFilterValidation"]),!1}return!0},n.prototype.setFinalizationDate=function(){this.selectedSysDirectAcquisitionState=null;this.filter.sysDirectAcquisitionStateId=null;this.filter.showOngoingDa?(this.filter.finalizationDateStart=null,this.filter.finalizationDateEnd=null,(this.svc.userService.currentUserIsSeap()||this.svc.userService.currentUserIsPub())&&this.autocompleteDates&&(this.filter.publicationDateStart=this.getUtcNow(),this.filter.publicationDateStart.setHours(this.filter.publicationDateStart.getHours()-1),this.filter.publicationDateEnd=this.getUtcNow(),this.filter.publicationDateEnd.setDate(this.getUtcNow().getDate()+1),this.filter.publicationDateEnd.setHours(0,0,0,0))):(this.filter.publicationDateStart=null,this.filter.publicationDateEnd=null,this.filter.finalizationDateStart=new Date(Date.UTC((new Date).getFullYear(),0,1)),this.filter.finalizationDateEnd=this.getUtcNow());this.autocompleteDates=!1},n.prototype.getUtcNow=function(){var n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()))},n.prototype.setFilterComboSource=function(){this.sysDirectAcquisitionStateList=[];this.sysDirectAcquisitionStateList.push({id:null,text:""});this.filter.showOngoingDa?(this.populateDataSource(this.sysDirectAcquisitionStateList,2,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.Published"]),this.populateDataSource(this.sysDirectAcquisitionStateList,5,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.WaitingCAAnswer"])):(this.populateDataSource(this.sysDirectAcquisitionStateList,3,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.RefusedBySupplier"]),this.populateDataSource(this.sysDirectAcquisitionStateList,4,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.NotAnsweredBySupplier"]),this.populateDataSource(this.sysDirectAcquisitionStateList,6,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.RefusedByCA"]),this.populateDataSource(this.sysDirectAcquisitionStateList,7,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.DAAgreed"]),this.populateDataSource(this.sysDirectAcquisitionStateList,8,this.svc.locale.key["Common.Clasiff.SysDirectAcquisitionState.NotAnsweredByCA"]))},n.prototype.populateDataSource=function(n,t,i){n.push({id:t,text:i})},n.prototype.response=function(n){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AcqCaResponse,n);this.svc.userService.currentUserIsSu()&&this.svc.nav.pathWithParam(sys.prv.routes.SU.DA_AcqSuResponse,n)},n.prototype.correctQuantity=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AcqCaCorrectQuantity,n)},n.prototype.correctContractType=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AcqCaCorrectContractType,n)},n.prototype.answerToOfferEnabled=function(n){return n.sysDirectAcquisitionState&&n.sysDirectAcquisitionState.id===5&&Date.parse(n.caDecisionDeadline)>=Date.now()},n.prototype.correctQuantityEnabled=function(n){return n.sysDirectAcquisitionState&&n.sysDirectAcquisitionState.id===7&&n.isOpenForCorrection},n.prototype.correctContractTypeEnabled=function(n){return n.sysDirectAcquisitionState&&n.sysDirectAcquisitionState.id===7&&n.isOpenForContractCorrection||n.sysDirectAcquisitionState.id===5},n.prototype.answerToRequestEnabled=function(n){return n.sysDirectAcquisitionState&&n.sysDirectAcquisitionState.id===2&&Date.parse(n.supplierDecisionDeadline)>=Date.now()},n.prototype.view=function(n){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AcqCaView,n);this.svc.userService.currentUserIsSu()&&this.svc.nav.pathWithParam(sys.prv.routes.SU.DA_AcqSuView,n);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.DA_AcqSeapView,n);this.svc.userService.currentUserIsPub()&&this.svc.nav.pathWithParam(sys.pub.routes.DA_AcqPublicView,n)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","DirectAcquisitionCommonApi","$cookieStore","$routeParams"],n.Cfg={Name:"DIRECT-ACQUISITION-LIST"},n}(),i;n.DirectAcquisitionList=t;angular.module("app.controls").controller(t.Cfg.Name,t);i=function(n){function t(t,i,r,u,f,e){var o=this;n.call(this,t,i,r,u);this.svc=t;this.api=i;this.$cookieStoreCa=r;this.$routeParamsCa=u;this.cart=f;this.mostRecent=e;this.onMouseEnter=function(n){o.api.Common.getQuickView(n.directAcquisitionID).then(function(n){o.quick=n})};this.mostRecent.bindSlider()}return __extends(t,n),t.prototype.navigateToWishlist=function(){this.setInitialFilter();this.svc.nav.path(sys.prv.routes.CA.DA_CatalogCaWishList)},t.prototype.product_selected=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_CatalogCaItemView,n.catalogItemID)},t.$inject=["svc","DirectAcquisitionCommonApi","$cookieStore","$routeParams","DAShoppingCart","DAMostRecentService"],t.Cfg={Name:"DIRECT-ACQUISITION-LIST-CA"},t}(t);n.DirectAcquisitionListCa=i;angular.module("app.controls").controller(i.Cfg.Name,i)})(t=n.directAcq||(n.directAcq={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/DirectAcquisitionCommon"}return __extends(t,n),t.prototype.getDirectAcquisitionList=function(n){return this.POST(this.api+"/GetDirectAcquisitionList/",n)},t.prototype.getQuickView=function(n){return this.GET(this.api+"/getQuickView/"+n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.DirectAcquisitionCommonApi=t;angular.module("app.controls").service("DirectAcquisitionCommonApi",t)})(t=n.directAcq||(n.directAcq={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){var u=this;this.svc=n;this.api=t;this.$cookieStore=i;this.$routeParams=r;this.filter={pageSize:5};this.listItems=[];this.autoCompleteDates=!1;this.exportData=function(n){u.svc.isLoading=!0;switch(n){case"excel":u.api.Common.getExportDocument(u.filter,common.ExportType.Excel).finally(function(){return u.svc.isLoading=!1});break;case"pdf":u.api.Common.getExportDocument(u.filter,common.ExportType.Pdf).finally(function(){return u.svc.isLoading=!1});break;case"csv":u.api.Common.getExportDocument(u.filter,common.ExportType.Csv).finally(function(){return u.svc.isLoading=!1})}};this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=n.locale.key["DAAwardNotice.Info.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),n.configService.cfg.DaAwardNotice_MaxListItems);r.isFromMenu==="1"&&(this.autoCompleteDates=!0);this.init()}return n.prototype.init=function(){this.populateInitialFilter();this.setPublicationDate();this.setValidPageSizes();this.search()},n.prototype.setInitialFilter=function(){this.$cookieStore.put("daAwardNoticeList_filter",this.filter);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedContractingAuthority",this.selectedContractingAuthority);this.selectedSupplier&&this.selectedSupplier.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedSupplier",this.selectedSupplier);this.selectedCpv&&this.selectedCpv.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedCpv",this.selectedCpv);this.selectedCpvCategory&&this.selectedCpvCategory.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedCpvCategory",this.selectedCpvCategory);this.selectedEuropeanFund&&this.selectedEuropeanFund.id>0&&this.$cookieStore.put("daAwardNoticeList_selectedEuropeanFund",this.selectedEuropeanFund)},n.prototype.populateInitialFilter=function(){this.$cookieStore.get("daAwardNoticeList_filter")!=null&&(this.filter=this.$cookieStore.get("daAwardNoticeList_filter"),this.filter.publicationDateStart&&(this.filter.publicationDateStart=new Date(this.filter.publicationDateStart)),this.filter.publicationDateEnd&&(this.filter.publicationDateEnd=new Date(this.filter.publicationDateEnd)),this.currentPage=this.filter.pageIndex,this.currentPageTmp=this.filter.pageIndex,this.$cookieStore.put("daAwardNoticeList_filter",null));this.$cookieStore.get("daAwardNoticeList_selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("daAwardNoticeList_selectedSysNoticeState"),this.$cookieStore.put("daAwardNoticeList_selectedSysNoticeState",null));this.$cookieStore.get("daAwardNoticeList_selectedContractingAuthority")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("daAwardNoticeList_selectedContractingAuthority"),this.$cookieStore.put("daAwardNoticeList_selectedContractingAuthority",null));this.$cookieStore.get("daAwardNoticeList_selectedSupplier")!=null&&(this.selectedSupplier=this.$cookieStore.get("daAwardNoticeList_selectedSupplier"),this.$cookieStore.put("daAwardNoticeList_selectedSupplier",null));this.$cookieStore.get("daAwardNoticeList_selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("daAwardNoticeList_selectedCpv"),this.$cookieStore.put("daAwardNoticeList_selectedCpv",null));this.$cookieStore.get("daAwardNoticeList_selectedCpvCategory")!=null&&(this.selectedCpvCategory=this.$cookieStore.get("daAwardNoticeList_selectedCpvCategory"),this.$cookieStore.put("daAwardNoticeList_selectedCpvCategory",null));this.$cookieStore.get("daAwardNoticeList_selectedEuropeanFund")!=null&&(this.selectedEuropeanFund=this.$cookieStore.get("daAwardNoticeList_selectedEuropeanFund"),this.$cookieStore.put("daAwardNoticeList_selectedEuropeanFund",null))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({noticeNo:n.filter.noticeNo,contractObject:n.filter.contractObject,sysNoticeStateId:n.filter.sysNoticeStateId,contractingAuthorityId:n.filter.contractingAuthorityId,supplierId:n.filter.supplierId,cpvCodeId:n.filter.cpvCodeId,cpvCodeText:n.filter.cpvCodeText,cpvCategoryId:n.filter.cpvCategoryId,publicationDateStart:n.filter.publicationDateStart,publicationDateEnd:n.filter.publicationDateEnd,awardedValueStart:n.filter.awardedValueStart,awardedValueEnd:n.filter.awardedValueEnd,isOnline:n.filter.isOnline,isEuFunded:n.filter.isEuFunded,sysEuropeanFundId:n.filter.sysEuropeanFundId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getDaAwardNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1;t.enableOrderCriteria()})},n.prototype.enableOrderCriteria=function(){},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id);this.selectedSupplier&&this.selectedSupplier.id>0&&(this.filter.supplierId=this.selectedSupplier.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cpvCodeId=this.selectedCpv.id);this.selectedCpvCategory&&this.selectedCpvCategory.id>0&&(this.filter.cpvCategoryId=this.selectedCpvCategory.id);this.selectedEuropeanFund&&this.selectedEuropeanFund.id>0&&(this.filter.sysEuropeanFundId=this.selectedEuropeanFund.id)},n.prototype.resetFilter=function(){var e=this.filter.pageSize,n,t,i,r,u,f;this.filter={pageSize:e};this.selectedSysNoticeState=null;this.selectedContractingAuthority=null;this.selectedSupplier=null;this.selectedCpv=null;this.selectedCpvCategory=null;this.selectedEuropeanFund=null;n=$("#filterCaDdl").data("kendoDropDownList");n&&n.text("");this.selectedContractingAuthorityFreeText="";t=$("#filterSuDdl").data("kendoDropDownList");t&&t.text("");this.selectedSupplierFreeText="";i=$("#filterCpvDdl").data("kendoDropDownList");i&&i.text("");this.filter.cpvCodeText="";r=$("#filterCpvCatDdl").data("kendoDropDownList");r&&r.text("");this.selectedCpvCategoryFreeText="";u=$("#filterSysEuFundDdl").data("kendoDropDownList");u&&u.text("");this.selectedEuropeanFundFreeText="";f=$("#filterStateCmb").data("kendoComboBox");f&&f.value("");this.selectedSysNoticeStateFreeText=""},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.setPublicationDate=function(){this.autoCompleteDates&&(this.filter.publicationDateStart=this.getUtcNow(),this.filter.publicationDateStart.setDate(this.filter.publicationDateStart.getDate()-30),this.autoCompleteDates=!1)},n.prototype.getUtcNow=function(){var n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()))},n.prototype.navigateToView=function(n){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AwardNoticeCaView,n);this.svc.userService.currentUserIsSu()&&this.svc.nav.pathWithParam(sys.prv.routes.SU.DA_AwardNoticeSuView,n);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.DA_AwardNoticeSeapView,n);this.svc.userService.currentUserIsPub()&&this.svc.nav.pathWithParam(sys.pub.routes.DA_AwardNoticeView,n)},n.prototype.navigateToEdit=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.DA_AwardNoticeCaEdit,n)},n.prototype.navigateToAdd=function(){this.setInitialFilter();this.svc.nav.pathWithAddParam(sys.prv.routes.CA.DA_AwardNoticeCaEdit)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","DaAwardNoticeCommonApi","$cookieStore","$routeParams"],n.Cfg={Name:"DA-AWARD-NOTICE-LIST"},n}();n.DaAwardNoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.awardNotice||(n.awardNotice={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/DaAwardNoticeCommon"}return __extends(t,n),t.prototype.getDaAwardNoticeList=function(n){return this.POST(this.api+"/GetDaAwardNoticeList/",n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.DaAwardNoticeCommonApi=t;angular.module("app.controls").service("DaAwardNoticeCommonApi",t)})(t=n.awardNotice||(n.awardNotice={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){var u=this;this.svc=n;this.api=t;this.$cookieStore=i;this.$routeParams=r;this.filter={pageSize:5};this.listItems=[];this.autoCompleteDates=!1;this.exportData=function(n){u.svc.isLoading=!0;switch(n){case"excel":u.api.Common.getExportDocument(u.filter,common.ExportType.Excel).finally(function(){return u.svc.isLoading=!1});break;case"pdf":u.api.Common.getExportDocument(u.filter,common.ExportType.Pdf).finally(function(){return u.svc.isLoading=!1});break;case"csv":u.api.Common.getExportDocument(u.filter,common.ExportType.Csv).finally(function(){return u.svc.isLoading=!1})}};this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=n.locale.key["AdvNotice.Info.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),n.configService.cfg.AdvNotice_MaxListItems);r.isFromMenu==="1"&&(this.autoCompleteDates=!0);this.init()}return n.prototype.init=function(){this.populateInitialFilter();this.setPublicationDate();this.setValidPageSizes();this.search()},n.prototype.setInitialFilter=function(){this.$cookieStore.put("advNoticeList_filter",this.filter);this.selectedSysAdvNotice&&this.selectedSysAdvNotice.id>0&&this.$cookieStore.put("advNoticeList_selectedSysAdvNotice",this.selectedSysAdvNotice);this.selectedSysAcqContractType&&this.selectedSysAcqContractType.id>0&&this.$cookieStore.put("advNoticeList_selectedSysAcqContractType",this.selectedSysAcqContractType);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("advNoticeList_selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("advNoticeList_selectedContractingAuthority",this.selectedContractingAuthority);this.selectedCpv&&this.selectedCpv.id>0&&this.$cookieStore.put("advNoticeList_selectedCpv",this.selectedCpv);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("advNoticeList_selectedAssignedUser",this.selectedAssignedUser)},n.prototype.populateInitialFilter=function(){this.$cookieStore.get("advNoticeList_filter")!=null&&(this.filter=this.$cookieStore.get("advNoticeList_filter"),this.filter.publicationDateStart&&(this.filter.publicationDateStart=new Date(this.filter.publicationDateStart)),this.filter.publicationDateEnd&&(this.filter.publicationDateEnd=new Date(this.filter.publicationDateEnd)),this.filter.createDateStart&&(this.filter.createDateStart=new Date(this.filter.createDateStart)),this.filter.createDateEnd&&(this.filter.createDateEnd=new Date(this.filter.createDateEnd)),this.currentPage=this.filter.pageIndex,this.currentPageTmp=this.filter.pageIndex,this.$cookieStore.put("advNoticeList_filter",null));this.$cookieStore.get("advNoticeList_selectedSysAdvNotice")!=null&&(this.selectedSysAdvNotice=this.$cookieStore.get("advNoticeList_selectedSysAdvNotice"),this.$cookieStore.put("advNoticeList_selectedSysAdvNotice",null));this.$cookieStore.get("advNoticeList_selectedSysAcqContractType")!=null&&(this.selectedSysAcqContractType=this.$cookieStore.get("advNoticeList_selectedSysAcqContractType"),this.$cookieStore.put("advNoticeList_selectedSysAcqContractType",null));this.$cookieStore.get("advNoticeList_selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("advNoticeList_selectedSysNoticeState"),this.$cookieStore.put("advNoticeList_selectedSysNoticeState",null));this.$cookieStore.get("advNoticeList_selectedContractingAuthority")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("advNoticeList_selectedContractingAuthority"),this.$cookieStore.put("advNoticeList_selectedContractingAuthority",null));this.$cookieStore.get("advNoticeList_selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("advNoticeList_selectedCpv"),this.$cookieStore.put("advNoticeList_selectedCpv",null));this.$cookieStore.get("advNoticeList_selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("advNoticeList_selectedAssignedUser"),this.$cookieStore.put("advNoticeList_selectedAssignedUser",null))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({noticeNo:n.filter.noticeNo,contractObject:n.filter.contractObject,sysAdvertisingNoticeId:n.filter.sysAdvertisingNoticeId,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,publicationDateStart:n.filter.publicationDateStart,publicationDateEnd:n.filter.publicationDateEnd,estimatedValueStart:n.filter.estimatedValueStart,estimatedValueEnd:n.filter.estimatedValueEnd,cpvCodeId:n.filter.cpvCodeId,cpvCodeText:n.filter.cpvCodeText,contractingAuthorityId:n.filter.contractingAuthorityId,createDateStart:n.filter.createDateStart,createDateEnd:n.filter.createDateEnd,assignedUserId:n.filter.assignedUserId,sysNoticeStateId:n.filter.sysNoticeStateId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getAdvNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysAdvNotice&&this.selectedSysAdvNotice.id>0&&(this.filter.sysAdvertisingNoticeId=this.selectedSysAdvNotice.id);this.selectedSysAcqContractType&&this.selectedSysAcqContractType.id>0&&(this.filter.sysAcquisitionContractTypeId=this.selectedSysAcqContractType.id);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cpvCodeId=this.selectedCpv.id);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&(this.filter.assignedUserId=this.selectedAssignedUser.id)},n.prototype.resetFilter=function(){var e=this.filter.pageSize,n,t,i,r,u,f;this.filter={pageSize:e};this.selectedSysAdvNotice=null;this.selectedSysAcqContractType=null;this.selectedSysNoticeState=null;this.selectedContractingAuthority=null;this.selectedCpv=null;this.selectedAssignedUser=null;n=$("#filterAdvNoticeTypeCmb").data("kendoComboBox");n&&n.value("");this.selectedSysAdvNoticeFreeText="";t=$("#filterAcqContractTypeCmb").data("kendoComboBox");t&&t.value("");this.selectedSysAcqContractTypeFreeText="";i=$("#filterCaDdl").data("kendoDropDownList");i&&i.text("");this.selectedContractingAuthorityFreeText="";r=$("#filterCpvDdl").data("kendoDropDownList");r&&r.text("");this.filter.cpvCodeText="";u=$("#filterStateCmb").data("kendoComboBox");u&&u.value("");this.selectedSysNoticeStateFreeText="";f=$("#filterUserCmb").data("kendoComboBox");f&&f.value("");this.selectedAssignedUserFreeText=""},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.setPublicationDate=function(){this.autoCompleteDates&&(this.filter.publicationDateStart=this.getUtcNow(),this.filter.publicationDateStart.setDate(this.filter.publicationDateStart.getDate()-5),this.autoCompleteDates=!1)},n.prototype.getUtcNow=function(){var n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()))},n.prototype.navigateToView=function(n){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithParam(sys.prv.routes.CA.AdvNoticeCAView,n);this.svc.userService.currentUserIsSu()&&this.svc.nav.pathWithParam(sys.prv.routes.SU.AdvNoticeSUView,n);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.AdvNoticeSEAPView,n);this.svc.userService.currentUserIsPub()&&this.svc.nav.pathWithParam(sys.pub.routes.AdvNoticePUBView,n)},n.prototype.navigateToEdit=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.AdvNoticeCAEdit,n)},n.prototype.navigateToAdd=function(){this.setInitialFilter();this.svc.nav.pathWithAddParam(sys.prv.routes.CA.AdvNoticeCAEdit)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","AdvNoticeCommonApi","$cookieStore","$routeParams"],n.Cfg={Name:"ADV-NOTICE-LIST"},n}();n.AdvNoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.advNotice||(n.advNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/AdvNoticeCommon"}return __extends(t,n),t.prototype.getAdvNoticeList=function(n){return this.POST(this.api+"/GetAdvNoticeList/",n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.AdvNoticeCommonApi=t;angular.module("app.controls").service("AdvNoticeCommonApi",t)})(t=n.advNotice||(n.advNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u){var f=this;this.svc=n;this.api=t;this.$cookieStore=i;this.$routeParams=r;this.$timeout=u;this.filter={pageSize:5};this.listItems=[];this.autoCompleteDates=!1;this.assignedUsers=[];this.exportData=function(n){f.svc.isLoading=!0;switch(n){case"excel":f.api.Common.getExportDocument(f.filter,common.ExportType.Excel).finally(function(){return f.svc.isLoading=!1});break;case"pdf":f.api.Common.getExportDocument(f.filter,common.ExportType.Pdf).finally(function(){return f.svc.isLoading=!1});break;case"csv":f.api.Common.getExportDocument(f.filter,common.ExportType.Csv).finally(function(){return f.svc.isLoading=!1})}};this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=n.locale.key["MCNoticeView.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),n.configService.cfg.McNotice_MaxListItems);r.isFromMenu==="1"&&(this.autoCompleteDates=!0);this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en";this.getHelpRoutes()}return n.prototype.getHelpRoutes=function(){var t=this,n=this;n.svc.userService!=null&&n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&this.$timeout(function(){$("#helpRelativePath").text(t.helpRouteCA.CA_MCNotice_List)});n.svc.userService!=null&&n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&this.$timeout(function(){$("#helpRelativePath").text(t.helpRouteSU.SU_MCNotice_List)});n.svc.userService!=null&&n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSeap&&this.$timeout(function(){$("#helpRelativePath").text(t.helpRouteSEAP.SEAP_MCNotice_List)})},n.prototype.init=function(){this.populateInitialFilter();this.setPublicationDate();this.setValidPageSizes();this.search()},n.prototype.setInitialFilter=function(){this.$cookieStore.put("mcNoticeList_filter",this.filter);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("mcNoticeList_selectedContractingAuthority",this.selectedContractingAuthority)},n.prototype.populateInitialFilter=function(){this.$cookieStore.get("mcNoticeList_filter")!=null&&(this.filter=this.$cookieStore.get("mcNoticeList_filter"),this.filter.publicationDateStart&&(this.filter.publicationDateStart=new Date(this.filter.publicationDateStart)),this.filter.publicationDateEnd&&(this.filter.publicationDateEnd=new Date(this.filter.publicationDateEnd)),this.currentPage=this.filter.pageIndex,this.currentPageTmp=this.filter.pageIndex,this.$cookieStore.put("mcNoticeList_filter",null));this.$cookieStore.get("advNoticeList_selectedContractingAuthority")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("advNoticeList_selectedContractingAuthority"),this.$cookieStore.put("advNoticeList_selectedContractingAuthority",null))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({noticeNo:n.filter.noticeNo,consultingObject:n.filter.consultingObject,publicationDateStart:n.filter.publicationDateStart,publicationDateEnd:n.filter.publicationDateEnd,contractingAuthorityId:n.filter.contractingAuthorityId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getMcNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id)},n.prototype.resetFilter=function(){var t=this.filter.pageSize,n;this.filter={pageSize:t};this.selectedContractingAuthority=null;n=$("#filterCaDdl").data("kendoDropDownList");n&&n.text("");this.selectedContractingAuthorityFreeText=""},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.setPublicationDate=function(){this.autoCompleteDates&&(this.filter.publicationDateStart=this.getUtcNow(),this.filter.publicationDateStart.setDate(this.filter.publicationDateStart.getDate()-30),this.autoCompleteDates=!1)},n.prototype.getUtcNow=function(){var n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()))},n.prototype.navigateToView=function(n){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithParam(sys.prv.routes.CA.McNoticeView_CA,n);this.svc.userService.currentUserIsSu()&&this.svc.nav.pathWithParam(sys.prv.routes.SU.McNoticeView_SU,n);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.McNoticeView_SEAP,n);this.svc.userService.currentUserIsPub()&&this.svc.nav.pathWithParam(sys.pub.routes.McNoticeView,n)},n.prototype.navigateToEdit=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.McNoticeEdit_CA,n)},n.prototype.navigateToAdd=function(){this.setInitialFilter();this.svc.nav.pathWithNullableParam(sys.prv.routes.CA.McNoticeEdit_CA)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","McNoticeCommonApi","$cookieStore","$routeParams","$timeout"],n.Cfg={Name:"MC-NOTICE-LIST"},n}();n.McNoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.mcNotice||(n.mcNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/McNoticeCommon"}return __extends(t,n),t.prototype.getMcNoticeList=function(n){return this.POST(this.api+"/GetMcNoticeList/",n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.McNoticeCommonApi=t;angular.module("app.controls").service("McNoticeCommonApi",t)})(t=n.mcNotice||(n.mcNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.svc=n;this.api=t;this.$cookieStore=i;this.$routeParams=r;this.filter={pageSize:5};this.listItems=[];this.autoCompleteDates=!1;this.specialCategoryDisabled=!0;this.sysEuropeanFundDisabled=!0;this.exportData=function(n){u.svc.isLoading=!0;switch(n){case"excel":u.api.Common.getExportDocument(u.filter,common.ExportType.Excel).finally(function(){return u.svc.isLoading=!1});break;case"pdf":u.api.Common.getExportDocument(u.filter,common.ExportType.Pdf).finally(function(){return u.svc.isLoading=!1});break;case"csv":u.api.Common.getExportDocument(u.filter,common.ExportType.Csv).finally(function(){return u.svc.isLoading=!1})}};this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=n.locale.key["DFNoticeView.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),n.configService.cfg.DfNotice_MaxListItems);r.isFromMenu==="1"&&(this.autoCompleteDates=!0);this.init()}return n.prototype.init=function(){var n=this;this.svc.ComboApi.getSysProcedureTypes(2).then(function(t){n.sysProcedureTypes=t.results;n.sysProcedureTypes.splice(0,0,{text:""})});this.svc.ComboApi.getSysNoticeStates(2).then(function(t){n.sysNoticeStates=t.results;n.sysNoticeStates.splice(0,0,{text:""})});this.svc.ComboApi.getSysEuropeanFund().then(function(t){n.sysEuropeanFunds=t.results;n.sysEuropeanFunds.splice(0,0,{text:""})});this.svc.ComboApi.getUsersByEntityID().then(function(t){n.validatedByUsers=t.results});this.populateInitialFilter();this.setPublicationDate();this.setValidPageSizes();this.search()},n.prototype.setInitialFilter=function(){this.$cookieStore.put("dfNoticeList_filter",this.filter);this.selectedSysProcedureType&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeType&&this.selectedSysNoticeType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysNoticeType",this.selectedSysNoticeType);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("dfNoticeList_selectedContractingAuthority",this.selectedContractingAuthority);this.selectedCpv&&this.selectedCpv.id>0&&this.$cookieStore.put("dfNoticeList_selectedCpv",this.selectedCpv);this.selectedSysAwardCriteriaType&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedSysContractAssigmentType&&this.selectedSysContractAssigmentType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysContractAssigmentType",this.selectedSysContractAssigmentType);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysAcquisitionContractType",this.selectedSysAcquisitionContractType);this.selectedSysFinancingType&&this.selectedSysFinancingType.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysFinancingType",this.selectedSysFinancingType);this.selectedSysEuropeanFund&&this.selectedSysEuropeanFund.id>0&&this.$cookieStore.put("dfNoticeList_selectedSysEuropeanFund",this.selectedSysEuropeanFund);this.selectedValidatedByUser&&this.selectedValidatedByUser.id>0&&this.$cookieStore.put("dfNoticeList_selectedValidatedByUser",this.selectedValidatedByUser);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("dfNoticeList_selectedAssignedUser",this.selectedAssignedUser);this.$cookieStore.put("scrollPosition",window.pageYOffset)},n.prototype.populateInitialFilter=function(){this.$cookieStore.get("dfNoticeList_filter")!=null&&(this.filter=this.$cookieStore.get("dfNoticeList_filter"),this.filter.publicationDateStart&&(this.filter.publicationDateStart=new Date(this.filter.publicationDateStart)),this.filter.publicationDateEnd&&(this.filter.publicationDateEnd=new Date(this.filter.publicationDateEnd)),this.filter.rejectionDateStart&&(this.filter.rejectionDateStart=new Date(this.filter.rejectionDateStart)),this.filter.rejectionDateEnd&&(this.filter.rejectionDateEnd=new Date(this.filter.rejectionDateEnd)),this.filter.sendToPublicationDateStart&&(this.filter.sendToPublicationDateStart=new Date(this.filter.sendToPublicationDateStart)),this.filter.sendToPublicationDateEnd&&(this.filter.sendToPublicationDateEnd=new Date(this.filter.sendToPublicationDateEnd)),this.currentPage=this.filter.pageIndex,this.currentPageTmp=this.filter.pageIndex,this.$cookieStore.put("dfNoticeList_filter",null));this.$cookieStore.get("dfNoticeList_selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("dfNoticeList_selectedSysProcedureType"),this.$cookieStore.put("dfNoticeList_selectedSysProcedureType",null));this.$cookieStore.get("dfNoticeList_selectedSysNoticeType")!=null&&(this.selectedSysNoticeType=this.$cookieStore.get("dfNoticeList_selectedSysNoticeType"),this.$cookieStore.put("dfNoticeList_selectedSysNoticeType",null));this.$cookieStore.get("dfNoticeList_selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("dfNoticeList_selectedSysNoticeState"),this.$cookieStore.put("dfNoticeList_selectedSysNoticeState",null));this.$cookieStore.get("dfNoticeList_selectedContractingAuthority")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("dfNoticeList_selectedContractingAuthority"),this.$cookieStore.put("dfNoticeList_selectedContractingAuthority",null));this.$cookieStore.get("dfNoticeList_selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("dfNoticeList_selectedCpv"),this.$cookieStore.put("dfNoticeList_selectedCpv",null));this.$cookieStore.get("dfNoticeList_selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("dfNoticeList_selectedSysAwardCriteriaType"),this.$cookieStore.put("dfNoticeList_selectedSysAwardCriteriaType",null));this.$cookieStore.get("dfNoticeList_selectedSysContractAssigmentType")!=null&&(this.selectedSysContractAssigmentType=this.$cookieStore.get("dfNoticeList_selectedSysContractAssigmentType"),this.$cookieStore.put("dfNoticeList_selectedSysContractAssigmentType",null));this.$cookieStore.get("dfNoticeList_selectedSysAcquisitionContractType")!=null&&(this.selectedSysAcquisitionContractType=this.$cookieStore.get("dfNoticeList_selectedSysAcquisitionContractType"),this.$cookieStore.put("dfNoticeList_selectedSysAcquisitionContractType",null));this.$cookieStore.get("dfNoticeList_selectedSysFinancingType")!=null&&(this.selectedSysFinancingType=this.$cookieStore.get("dfNoticeList_selectedSysFinancingType"),this.$cookieStore.put("dfNoticeList_selectedSysFinancingType",null));this.$cookieStore.get("dfNoticeList_selectedSysEuropeanFund")!=null&&(this.selectedSysEuropeanFund=this.$cookieStore.get("dfNoticeList_selectedSysEuropeanFund"),this.$cookieStore.put("dfNoticeList_selectedSysEuropeanFund",null));this.$cookieStore.get("dfNoticeList_selectedValidatedByUser")!=null&&(this.selectedValidatedByUser=this.$cookieStore.get("dfNoticeList_selectedValidatedByUser"),this.$cookieStore.put("dfNoticeList_selectedValidatedByUser",null));this.$cookieStore.get("dfNoticeList_selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("dfNoticeList_selectedAssignedUser"),this.$cookieStore.put("dfNoticeList_selectedAssignedUser",null))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({noticeNo:n.filter.noticeNo,contractObject:n.filter.contractObject,sysProcedureTypeId:n.filter.sysProcedureTypeId,sysNoticeStateId:n.filter.sysNoticeStateId,sysNoticeTypeId:n.filter.sysNoticeTypeId,sendToPublicationDateStart:n.filter.sendToPublicationDateStart,sendToPublicationDateEnd:n.filter.sendToPublicationDateEnd,contractingAuthorityId:n.filter.contractingAuthorityId,cpvCodeId:n.filter.cpvCodeId,cpvCodeText:n.filter.cpvCodeText,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,isSpecialServiceCategory:n.filter.isSpecialServiceCategory,publicationDateStart:n.filter.publicationDateStart,publicationDateEnd:n.filter.publicationDateEnd,sysAwardCriteriaTypeId:n.filter.sysAwardCriteriaTypeId,isOnline:n.filter.isOnline,rejectionDateStart:n.filter.rejectionDateStart,rejectionDateEnd:n.filter.rejectionDateEnd,sysContractAssignmentTypeId:n.filter.sysContractAssignmentTypeId,sysFinancingTypeId:n.filter.sysFinancingTypeId,sysEuropeanFundId:n.filter.sysEuropeanFundId,assignedUserId:n.filter.assignedUserId,validatedByUserId:n.filter.validatedByUserId,estimatedValueStart:n.filter.estimatedValueStart,estimatedValueEnd:n.filter.estimatedValueEnd,hasParent:n.filter.hasParent,isUtility:n.filter.isUtility,hasLots:n.filter.hasLots,hasElectronicAuction:n.filter.hasElectronicAuction,hasAnapValidation:n.filter.hasAnapValidation,hasEuropeanFund:n.filter.hasEuropeanFund,hasComments:n.filter.hasComments});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getDfNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1;t.enableOrderCriteria()})},n.prototype.enableOrderCriteria=function(){},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysProcedureType&&this.selectedSysProcedureType.id>0&&(this.filter.sysProcedureTypeId=this.selectedSysProcedureType.id);this.selectedSysNoticeType&&this.selectedSysNoticeType.id>0&&(this.filter.sysNoticeTypeId=this.selectedSysNoticeType.id);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedContractingAuthority&&this.selectedContractingAuthority.id>0&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cpvCodeId=this.selectedCpv.id);this.selectedSysAwardCriteriaType&&this.selectedSysAwardCriteriaType>0&&(this.filter.sysAwardCriteriaTypeId=this.selectedSysAwardCriteriaType);this.selectedSysContractAssigmentType&&this.selectedSysContractAssigmentType>0&&(this.filter.sysContractAssignmentTypeId=this.selectedSysContractAssigmentType);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&(this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType.id);this.selectedSysFinancingType&&this.selectedSysFinancingType.id>0&&(this.filter.sysFinancingTypeId=this.selectedSysFinancingType.id);this.selectedSysEuropeanFund&&this.selectedSysEuropeanFund.id>0&&(this.filter.sysEuropeanFundId=this.selectedSysEuropeanFund.id);this.selectedValidatedByUser&&this.selectedValidatedByUser.id>0&&(this.filter.validatedByUserId=this.selectedValidatedByUser.id);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&(this.filter.assignedUserId=this.selectedAssignedUser.id)},n.prototype.resetFilter=function(){var y=this.filter.pageSize,n,t,i,r,u,f,e,o,s,h,c,l,a,v;this.filter={pageSize:y};this.selectedSysProcedureType=null;this.selectedSysNoticeType=null;this.selectedSysNoticeState=null;this.selectedContractingAuthority=null;this.selectedCpv=null;this.selectedSysAwardCriteriaType=null;this.selectedSysContractAssigmentType=null;this.selectedSysAcquisitionContractType=null;this.selectedSysFinancingType=null;this.selectedSysEuropeanFund=null;this.selectedValidatedByUser=null;this.selectedAssignedUser=null;n=$("#contractingAuthorityDdl").data("kendoDropDownList");n&&n.text("");this.selectedContractingAuthorityFreeText="";t=$("#cpvDdl").data("kendoDropDownList");t&&t.text("");this.filter.cpvCodeText="";i=$("#sysAcquisitionContractTypeDdl").data("kendoDropDownList");i&&i.text("");this.selectedSysAcquisitionContractTypeFreeText="";r=$("#assignedUserDdl").data("kendoDropDownList");r&&r.text("");this.selectedAssignedUserFreeText="";u=$("#sysProcedureTypeCmb").data("kendoComboBox");u&&u.value("");this.selectedSysProcedureTypeFreeText="";f=$("#sysNoticeTypeCmb").data("kendoComboBox");f&&f.value("");this.selectedSysNoticeTypeFreeText="";e=$("#sysNoticeStateCmb").data("kendoComboBox");e&&e.value("");this.selectedSysNoticeStateFreeText="";o=$("#sysAwardCriteriaTypeCmb").data("kendoComboBox");o&&o.value("");this.selectedSysAwardCriteriaTypeFreeText="";s=$("#sysContractAssignmentTypeCmb").data("kendoComboBox");s&&s.value("");this.selectedSysContractAssigmentTypeFreeText="";h=$("#sysFinancingTypeCmb").data("kendoComboBox");h&&h.value("");this.selectedSysFinancingTypeFreeText="";c=$("#sysEuropeanFundCmb").data("kendoComboBox");c&&c.value("");this.selectedSysEuropeanFundFreeText="";l=$("#validatedByCmb").data("kendoComboBox");l&&l.value("");this.selectedValidatedByUserFreeText="";a=$("#specialCategoryCmb").data("kendoComboBox");a&&a.value("");this.isSpecialServiceCategoryFreeText="";v=$("#isOnlineCmb").data("kendoComboBox");v&&v.value("");this.isOnlineFreeText=""},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.setPublicationDate=function(){this.autoCompleteDates&&!this.svc.userService.currentUserIsCa()&&(this.filter.sendToPublicationDateStart=this.getUtcNow(),this.filter.sendToPublicationDateStart.setDate(this.filter.sendToPublicationDateStart.getDate()-30),this.autoCompleteDates=!1)},n.prototype.setSpecialCategoryDisable=function(){this.specialCategoryDisabled=this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id==2?!1:!0},n.prototype.setEuropeanFundDisable=function(){this.sysEuropeanFundDisabled=this.selectedSysFinancingType&&this.selectedSysFinancingType.value==4?!1:!0},n.prototype.getUtcNow=function(){var n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()))},n.prototype.exportData_Anap=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getExportDocument_ExportAnap(this.caPublicationDateFilter).finally(function(){return n.svc.isLoading=!1})},n.prototype.navigateToView=function(n,t){this.setInitialFilter();this.svc.userService.currentUserIsCa()&&(t==2?this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v1,n));this.svc.userService.currentUserIsMon()&&(t==2?this.svc.nav.pathWithParam(sys.prv.routes.SEAP.MONDfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.SEAP.MONDfNoticeVIEW_v1,n));this.svc.userService.currentUserIsSeap()&&(t==2?this.svc.nav.pathWithParam(sys.prv.routes.SEAP.SEAPDfNoticeVIEW_v2,n):this.svc.nav.pathWithParam(sys.prv.routes.SEAP.SEAPDfNoticeVIEW_v1,n))},n.prototype.navigateToEdit=function(n){this.setInitialFilter();this.svc.nav.pathWithParam(sys.prv.routes.CA.DfNoticeEdit_v2,n)},n.prototype.navigateToAdd=function(){if(this.setInitialFilter(),!this.svc.userService.hasFirstLoginValid){this.svc.nav.path(sys.prv.routes.CA.PROFILE_CA_VIEW);return}this.svc.nav.pathWithAddParam(sys.prv.routes.CA.DfNoticeCreate_v2)},n.prototype.goToSelection=function(){(this.setInitialFilter(),this.svc.userService.currentUserIsMon())&&this.svc.nav.path(sys.prv.routes.SEAP.DF_MON_ListViewWaitingSelection)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.scrollToLocation=function(){if(this.$cookieStore.get("scrollPosition")!=null){var n=this.$cookieStore.get("scrollPosition");this.$cookieStore.put("scrollPosition",null);n!=null&&$(document).scrollTop(parseInt(n))}},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","DfNoticeCommonApi","$cookieStore","$routeParams"],n.Cfg={Name:"DF-NOTICE-LIST"},n}();n.DfNoticeCommonList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.dfNotice||(n.dfNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/DfNoticeCommon"}return __extends(t,n),t.prototype.getDfNoticeList=function(n){return this.POST(this.api+"/GetDfNoticeList/",n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/getExportDocument/?exportType="+t,n)},t.prototype.getExportDocument_ExportAnap=function(n){return this.DOWNLOAD(this.api+"/GetExportDocument_ExportAnap",n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.DfNoticeCommonApi=t;angular.module("app.controls").service("DfNoticeCommonApi",t)})(t=n.dfNotice||(n.dfNotice={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.noticeTypeSelected=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];this.sysAwardCriteriaTypes=[];this.sysFinancingTypes=[];this.sysEuropeanFunds=[];this.assignedUsers=[];this.anapUsers=[];this.codes="";this.showGenerateAqfRequest=!1;this.AQFGroupByLot=!1;this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.InitNotice_MaxListItems);this.noticeTypeId=0;this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en"}return n.prototype.init=function(){var n=this,t,i;this.$routeParams.resetFilter>0&&(this.$cookieStore.put("sysNoticeTypeIds",null),this.resetFilter(),this.populateFilterForEntityType());t=this.$cookieStore.get("noticeFilter");i=this.$cookieStore.get("noticeTypeForFilter");t!=null&&i>-1&&(this.svc.noticeFilter=t,this.svc.noticeTypeForFilter=i,this.$cookieStore.put("noticeFilter",null),this.$cookieStore.put("noticeTypeForFilter",-1));this.svc.noticeFilter&&(this.$routeParams.noticeTypeId==this.svc.noticeTypeForFilter&&(this.filter=this.svc.noticeFilter),this.svc.noticeFilter=null,this.svc.noticeTypeForFilter=null);this.populateInitialFilters();this.noticeTypeId>0?(this.$routeParams.resetFilter>0&&(this.noticeTypeSelected[this.$routeParams.noticeTypeId]=!0),this.filter||(this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5}),this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.indexOf(this.noticeTypeId)<0&&this.$routeParams.resetFilter>0?this.addNoticeTypeToFilter(this.noticeTypeId):this.search()):this.search();this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.svc.ComboApi.getSysAwardCriteriaTypes().then(function(t){n.sysAwardCriteriaTypes.push({id:null,text:""});n.sysAwardCriteriaTypes=n.sysAwardCriteriaTypes.concat(t.results)});this.svc.ComboApi.getSysFinancingTypes().then(function(t){n.sysFinancingTypes.push({id:null,text:""});n.sysFinancingTypes=n.sysFinancingTypes.concat(t.results)});this.svc.ComboApi.getSysEuropeanFund().then(function(t){n.sysEuropeanFunds.push({id:null,text:""});n.sysEuropeanFunds=n.sysEuropeanFunds.concat(t.results)});this.setValidPageSizes();(this.svc.userService.currentUserIsCa()||this.svc.userService.currentUserIsSu())&&this.filter.hasUnansweredQuestions==null&&(this.filter.hasUnansweredQuestions=!1)},n.prototype.populateInitialFilters=function(){if(this.$cookieStore.get("selectedSysProcedureState")!=null&&(this.selectedSysProcedureState=this.$cookieStore.get("selectedSysProcedureState"),this.$cookieStore.put("selectedSysProcedureState",null)),this.$cookieStore.get("selectedSysProcedurePhase")!=null&&(this.selectedSysProcedurePhase=this.$cookieStore.get("selectedSysProcedurePhase"),this.$cookieStore.put("selectedSysProcedurePhase",null)),this.$cookieStore.get("selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("selectedSysProcedureType"),this.$cookieStore.put("selectedSysProcedureType",null)),this.$cookieStore.get("selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("selectedSysNoticeState"),this.$cookieStore.put("selectedSysNoticeState",null)),this.$cookieStore.get("selectedContractAssignmentType")!=null&&(this.selectedContractAssignmentType=this.$cookieStore.get("selectedContractAssignmentType"),this.$cookieStore.put("selectedContractAssignmentType",null)),this.$cookieStore.get("selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("selectedSysAwardCriteriaType"),this.$cookieStore.put("selectedSysAwardCriteriaType",null)),this.$cookieStore.get("selectedNoticeWGSContractType")!=null&&(this.selectedNoticeWGSContractType=this.$cookieStore.get("selectedNoticeWGSContractType"),this.$cookieStore.put("selectedNoticeWGSContractType",null)),this.$cookieStore.get("selectedSysFinancingType")!=null&&(this.selectedSysFinancingType=this.$cookieStore.get("selectedSysFinancingType"),this.$cookieStore.put("selectedSysFinancingType",null)),this.$cookieStore.get("selectedSysEuropeanFund")!=null&&(this.selectedSysEuropeanFund=this.$cookieStore.get("selectedSysEuropeanFund"),this.$cookieStore.put("selectedSysEuropeanFund",null)),this.$cookieStore.get("selectedCa")!=null&&(this.selectedCa=this.$cookieStore.get("selectedCa"),this.$cookieStore.put("selectedCa",null)),this.$cookieStore.get("selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("selectedCpv"),this.$cookieStore.put("selectedCpv",null)),this.$cookieStore.get("selectedCpvCat")!=null&&(this.selectedCpvCat=this.$cookieStore.get("selectedCpvCat"),this.$cookieStore.put("selectedCpvCat",null)),this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null)),this.filter&&this.$cookieStore.get("sysNoticeTypeIds")){if(this.filter.sysNoticeTypeIds=this.$cookieStore.get("sysNoticeTypeIds"),this.filter.sysNoticeTypeIds)for(var n=0;n<this.filter.sysNoticeTypeIds.length;n++)this.noticeTypeSelected[this.filter.sysNoticeTypeIds[n]]=!0;this.$cookieStore.put("sysNoticeTypeIds",null)}},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysNoticeTypeIds:n.filter.sysNoticeTypeIds,number:n.filter.number,sysNoticeStateId:n.filter.sysNoticeStateId,startNoticeState:n.filter.startNoticeState,endNoticeState:n.filter.endNoticeState,contractingAuthorityId:n.filter.contractingAuthorityId,sysContractAssigmentTypeId:n.filter.sysContractAssigmentTypeId,sysAwardCriteriaTypeId:n.filter.sysAwardCriteriaTypeId,contractName:n.filter.contractName,dfNoticeNumber:n.filter.dfNoticeNumber,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,noticeWGSContractTypeId:n.filter.noticeWGSContractTypeId,sysFinancingTypeId:n.filter.sysFinancingTypeId,cPVCategoryId:n.filter.cPVCategoryId,cPVId:n.filter.cPVId,cPVText:n.filter.cPVText,sysProcedureStateId:n.filter.sysProcedureStateId,startProcedureState:n.filter.startProcedureState,endProcedureState:n.filter.endProcedureState,startPublicationDate:n.filter.startPublicationDate,endPublicationDate:n.filter.endPublicationDate,sysProcedurePhaseId:n.filter.sysProcedurePhaseId,startEstimatedValueRon:n.filter.startEstimatedValueRon,endEstimatedValueRon:n.filter.endEstimatedValueRon,startTenderReceiptDeadline:n.filter.startTenderReceiptDeadline,endTenderReceiptDeadline:n.filter.endTenderReceiptDeadline,assignToProcedure:n.filter.assignToProcedure,sysProcedureTypeId:n.filter.sysProcedureTypeId,isOnline:n.filter.isOnline,hasLots:n.filter.hasLots,hasElectronicAuction:n.filter.hasElectronicAuction,isUtilityContract:n.filter.isUtilityContract,hasErata:n.filter.hasErata,sendableToJOUE:n.filter.sendableToJOUE,isEuProgrRelated:n.filter.isEuProgrRelated,sysEuropeanFundId:n.filter.sysEuropeanFundId,isPublicPrivatePartnership:n.filter.isPublicPrivatePartnership,hasPaap:n.filter.hasPaap,isNoticeRePublish:n.filter.isNoticeRePublish,validatedByUserId:n.filter.validatedByUserId,hasCommentsAnap:n.filter.hasCommentsAnap,entityTypeId:n.filter.entityTypeId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysProcedureState&&this.selectedSysProcedureState.id>0&&(this.filter.sysProcedureStateId=this.selectedSysProcedureState.id);this.selectedSysProcedureState&&this.selectedSysProcedureState.id==null&&(this.filter.sysProcedureStateId=null);this.selectedSysProcedurePhase&&this.selectedSysProcedurePhase.id>0&&(this.filter.sysProcedurePhaseId=this.selectedSysProcedurePhase.id);this.selectedSysProcedureType&&this.selectedSysProcedureType.id>0&&(this.filter.sysProcedureTypeId=this.selectedSysProcedureType.id);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedSysAwardCriteriaType&&this.selectedSysAwardCriteriaType.id>0&&(this.filter.sysAwardCriteriaTypeId=this.selectedSysAwardCriteriaType.id);this.selectedNoticeWGSContractType&&this.selectedNoticeWGSContractType.id>0&&(this.filter.noticeWGSContractTypeId=this.selectedNoticeWGSContractType.id);this.selectedSysFinancingType&&this.selectedSysFinancingType.id>0&&(this.filter.sysFinancingTypeId=this.selectedSysFinancingType.id);this.selectedSysEuropeanFund&&this.selectedSysEuropeanFund.id>0&&(this.filter.sysEuropeanFundId=this.selectedSysEuropeanFund.id);this.selectedCa&&this.selectedCa.id>0&&(this.filter.contractingAuthorityId=this.selectedCa.id);this.selectedCpvCat&&this.selectedCpvCat.id>0&&(this.filter.cPVCategoryId=this.selectedCpvCat.id);this.selectedContractAssignmentType&&this.selectedContractAssignmentType.id>0&&(this.filter.sysContractAssigmentTypeId=this.selectedContractAssignmentType.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cPVId=this.selectedCpv.id);this.selectedValidatedBy&&this.selectedValidatedBy.id>0&&(this.filter.validatedByUserId=this.selectedValidatedBy.id);this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0&&(this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType.id)},n.prototype.resetFilter=function(){this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5};this.noticeTypeSelected=[];this.codes="";this.selectedSysProcedureState=null;this.selectedSysProcedurePhase=null;this.selectedSysProcedureType=null;this.selectedSysNoticeState=null;this.selectedContractAssignmentType=null;this.selectedSysAwardCriteriaType=null;this.selectedNoticeWGSContractType=null;this.selectedSysFinancingType=null;this.selectedSysEuropeanFund=null;this.selectedCa=null;this.selectedCpv=null;this.selectedCpvCat=null;this.selectedValidatedBy=null;this.selectedAllocatedTo=null;this.filter.hasUnansweredQuestions=!1},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.addNoticeTypeToFilter=function(n){this.filter||this.resetFilter();this.filter.sysNoticeTypeIds&&this.filter.sysNoticeTypeIds.indexOf(n)>-1?this.filter.sysNoticeTypeIds.splice(this.filter.sysNoticeTypeIds.indexOf(n),1):(this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.push(n));this.search()},n.prototype.setBackRoute=function(){var n;this.svc.userService.currentUserIsCa()&&(n=sys.prv.routes.CA.NoticeHistoryList_Ca);this.svc.userService.currentUserIsSeap()&&(n=sys.prv.routes.SEAP.NoticeHistoryList_Seap);(this.svc.userService.currentUserIsAnrmap()||this.svc.userService.currentUserIsCNSC()||this.svc.userService.currentUserIsCDA()||this.svc.userService.currentUser.isEuMonAuthority)&&(n=sys.prv.routes.SEAP.NoticeHistoryList_Mon);this.svc.nav.setBackRouteWithParams(n,[":resetFilter","0"]);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id>0&&this.$cookieStore.put("selectedSysProcedureState",this.selectedSysProcedureState);this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id>0&&this.$cookieStore.put("selectedSysProcedurePhase",this.selectedSysProcedurePhase);this.selectedSysProcedureType!=null&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractAssignmentType!=null&&this.selectedContractAssignmentType.id>0&&this.$cookieStore.put("selectedContractAssignmentType",this.selectedContractAssignmentType);this.selectedSysAwardCriteriaType!=null&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedNoticeWGSContractType!=null&&this.selectedNoticeWGSContractType.id>0&&this.$cookieStore.put("selectedNoticeWGSContractType",this.selectedNoticeWGSContractType);this.selectedSysFinancingType!=null&&this.selectedSysFinancingType.id>0&&this.$cookieStore.put("selectedSysFinancingType",this.selectedSysFinancingType);this.selectedSysEuropeanFund!=null&&this.selectedSysEuropeanFund.id>0&&this.$cookieStore.put("selectedSysEuropeanFund",this.selectedSysEuropeanFund);this.selectedCa!=null&&this.selectedCa.id>0&&this.$cookieStore.put("selectedCa",this.selectedCa);this.selectedCpv!=null&&this.selectedCpv.id>0&&this.$cookieStore.put("selectedCpv",this.selectedCpv);this.selectedCpvCat!=null&&this.selectedCpvCat.id>0&&this.$cookieStore.put("selectedCpvCat",this.selectedCpvCat);this.selectedValidatedBy!=null&&this.selectedValidatedBy.id>0&&this.$cookieStore.put("selectedValidatedBy",this.selectedValidatedBy);this.selectedAllocatedTo!=null&&this.selectedAllocatedTo.id>0&&this.$cookieStore.put("selectedAllocatedTo",this.selectedAllocatedTo);this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage);this.$cookieStore.put("sysNoticeTypeIds",this.filter.sysNoticeTypeIds)},n.prototype.populateFilterForEntityType=function(){var n=new Date,t=n.getFullYear(),i=n.getMonth(),r=n.getDate();this.filter.startNoticeState=new Date(t-2,i,r)},n.prototype.navigateToView=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);(this.svc.userService.currentUserIsAnrmap()||this.svc.userService.currentUserIsCNSC()||this.svc.userService.currentUserIsCDA()||this.svc.userService.currentUser.isEuMonAuthority)&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_MON,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.navigateToProcedure=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);(this.svc.userService.currentUserIsAnrmap()||this.svc.userService.currentUserIsCNSC()||this.svc.userService.currentUserIsCDA()||this.svc.userService.currentUser.isEuMonAuthority)&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_MON,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.navigateToRequestList=function(){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.MoveAcqProcedureReqList_Ca,":resetFilter",1);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam(sys.prv.routes.SEAP.MoveAcqProcedureReqList_Seap,":resetFilter",1)},n.prototype.goToAqf=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.checkIfAqfIsGenerated(n.procedureId).then(function(i){i?t.navigateToAqf(n.procedureId):(t.selectedProcedureIdForAqfGeneration=n.procedureId,n.hasLots?t.showGenerateAqfRequest=!0:t.PerformGenerateAQFRequest())}).finally(function(){return t.svc.isLoading=!1})},n.prototype.PerformGenerateAQFRequest=function(){var n=this;this.svc.isLoading=!0;this.api.Common.generateAQFRequest(this.selectedProcedureIdForAqfGeneration,this.AQFGroupByLot).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Procedure.Label.AQFGenerateSuccess"]);n.AQFGroupByLot=!1;var t=n.selectedProcedureIdForAqfGeneration;n.selectedProcedureIdForAqfGeneration=null;n.navigateToAqf(t)}).finally(function(){return n.svc.isLoading=!1})},n.prototype.navigateToAqf=function(n){this.svc.userService.currentUserIsCa()?this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.ProcedureCAAQFViewHistory,":id",n,":isHistory",1):this.svc.userService.currentUserIsSeap()?this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.ProcedureSEAPAQFViewHistory,":id",n,":isHistory",1):this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.ProcedureMONAQFViewHistory,":id",n,":isHistory",1)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.onlyUnique=function(n,t,i){return i.indexOf(n)===t},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeHistoryApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"NOTICE-HISTORY-LIST"},n}();n.NoticeHistoryList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.noticeTypeSelected=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];this.sysAwardCriteriaTypes=[];this.sysFinancingTypes=[];this.sysEuropeanFunds=[];this.assignedUsers=[];this.anapUsers=[];this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.CaNotice_MaxListItems);this.noticeTypeId=0;this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en"}return n.prototype.init=function(){var n=this,t,i;this.$routeParams.resetFilter>0&&(this.resetFilter(),this.populateFilterForEntityType());t=this.$cookieStore.get("noticeFilter");i=this.$cookieStore.get("noticeTypeForFilter");t!=null&&i>-1&&(this.svc.noticeFilter=t,this.svc.noticeTypeForFilter=i,this.$cookieStore.put("noticeFilter",null),this.$cookieStore.put("noticeTypeForFilter",-1));this.svc.noticeFilter&&(this.$routeParams.noticeTypeId==this.svc.noticeTypeForFilter&&(this.filter=this.svc.noticeFilter),this.svc.noticeFilter=null,this.svc.noticeTypeForFilter=null);this.populateInitialFilters();this.noticeTypeId>0?(this.$routeParams.resetFilter>0&&(this.noticeTypeSelected[this.$routeParams.noticeTypeId]=!0),this.filter||(this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5}),this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.indexOf(this.noticeTypeId)<0&&this.$routeParams.resetFilter>0?this.addNoticeTypeToFilter(this.noticeTypeId):this.search()):this.search();this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.svc.ComboApi.getSysAwardCriteriaTypes().then(function(t){n.sysAwardCriteriaTypes.push({id:null,text:""});n.sysAwardCriteriaTypes=n.sysAwardCriteriaTypes.concat(t.results)});this.svc.ComboApi.getSysFinancingTypes().then(function(t){n.sysFinancingTypes.push({id:null,text:""});n.sysFinancingTypes=n.sysFinancingTypes.concat(t.results)});this.svc.ComboApi.getSysEuropeanFund().then(function(t){n.sysEuropeanFunds.push({id:null,text:""});n.sysEuropeanFunds=n.sysEuropeanFunds.concat(t.results)});this.setValidPageSizes()},n.prototype.populateInitialFilters=function(){if(this.$cookieStore.get("selectedSysProcedureState")!=null&&(this.selectedSysProcedureState=this.$cookieStore.get("selectedSysProcedureState"),this.$cookieStore.put("selectedSysProcedureState",null)),this.$cookieStore.get("selectedSysProcedurePhase")!=null&&(this.selectedSysProcedurePhase=this.$cookieStore.get("selectedSysProcedurePhase"),this.$cookieStore.put("selectedSysProcedurePhase",null)),this.$cookieStore.get("selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("selectedSysProcedureType"),this.$cookieStore.put("selectedSysProcedureType",null)),this.$cookieStore.get("selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("selectedSysNoticeState"),this.$cookieStore.put("selectedSysNoticeState",null)),this.$cookieStore.get("selectedContractAssignmentType")!=null&&(this.selectedContractAssignmentType=this.$cookieStore.get("selectedContractAssignmentType"),this.$cookieStore.put("selectedContractAssignmentType",null)),this.$cookieStore.get("selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("selectedSysAwardCriteriaType"),this.$cookieStore.put("selectedSysAwardCriteriaType",null)),this.$cookieStore.get("selectedNoticeWGSContractType")!=null&&(this.selectedNoticeWGSContractType=this.$cookieStore.get("selectedNoticeWGSContractType"),this.$cookieStore.put("selectedNoticeWGSContractType",null)),this.$cookieStore.get("selectedSysFinancingType")!=null&&(this.selectedSysFinancingType=this.$cookieStore.get("selectedSysFinancingType"),this.$cookieStore.put("selectedSysFinancingType",null)),this.$cookieStore.get("selectedSysEuropeanFund")!=null&&(this.selectedSysEuropeanFund=this.$cookieStore.get("selectedSysEuropeanFund"),this.$cookieStore.put("selectedSysEuropeanFund",null)),this.$cookieStore.get("selectedCa")!=null&&(this.selectedCa=this.$cookieStore.get("selectedCa"),this.$cookieStore.put("selectedCa",null)),this.$cookieStore.get("selectedSupplierWinner")!=null&&(this.selectedSupplierWinner=this.$cookieStore.get("selectedSupplierWinner"),this.$cookieStore.put("selectedSupplierWinner",null)),this.$cookieStore.get("selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("selectedCpv"),this.$cookieStore.put("selectedCpv",null)),this.$cookieStore.get("selectedCpvCat")!=null&&(this.selectedCpvCat=this.$cookieStore.get("selectedCpvCat"),this.$cookieStore.put("selectedCpvCat",null)),this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null)),this.filter){if(this.filter.sysNoticeTypeIds=this.$cookieStore.get("sysNoticeTypeIds"),this.filter.sysNoticeTypeIds)for(var n=0;n<this.filter.sysNoticeTypeIds.length;n++)this.noticeTypeSelected[this.filter.sysNoticeTypeIds[n]]=!0;this.$cookieStore.put("sysNoticeTypeIds",null)}},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysNoticeTypeIds:n.filter.sysNoticeTypeIds,number:n.filter.number,sysNoticeStateId:n.filter.sysNoticeStateId,startNoticeState:n.filter.startNoticeState,endNoticeState:n.filter.endNoticeState,contractingAuthorityId:n.filter.contractingAuthorityId,contractingAuthorityText:n.filter.contractingAuthorityText,sysContractAssigmentTypeId:n.filter.sysContractAssigmentTypeId,contractName:n.filter.contractName,sysAcquisitionContractTypeId:n.filter.sysAcquisitionContractTypeId,cPVCategoryId:n.filter.cPVCategoryId,cPVId:n.filter.cPVId,cPVText:n.filter.cPVText,startPublicationDate:n.filter.startPublicationDate,endPublicationDate:n.filter.endPublicationDate,isOnline:n.filter.isOnline,hasLots:n.filter.hasLots,hasElectronicAuction:n.filter.hasElectronicAuction,isUtilityContract:n.filter.isUtilityContract,hasErata:n.filter.hasErata,hasPaap:n.filter.hasPaap,entityTypeId:n.filter.entityTypeId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getCaNoticeList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.filter.sysNoticeStateId=this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0?this.selectedSysNoticeState.id:null;this.filter.contractingAuthorityId=this.selectedCa&&this.selectedCa.id>0?this.selectedCa.id:null;this.filter.winnerId=this.selectedSupplierWinner&&this.selectedSupplierWinner.id>0?this.selectedSupplierWinner.id:null;this.filter.cPVCategoryId=this.selectedCpvCat&&this.selectedCpvCat.id>0?this.selectedCpvCat.id:null;this.filter.sysContractAssigmentTypeId=this.selectedContractAssignmentType&&this.selectedContractAssignmentType.id>0?this.selectedContractAssignmentType.id:null;this.filter.cPVId=this.selectedCpv&&this.selectedCpv.id>0?this.selectedCpv.id:null;this.filter.sysAcquisitionContractTypeId=this.selectedSysAcquisitionContractType&&this.selectedSysAcquisitionContractType.id>0?this.selectedSysAcquisitionContractType.id:null},n.prototype.resetFilter=function(){this.filter={sysNoticeTypeIds:[],sortProperties:[],pageSize:5};this.noticeTypeSelected=[];this.selectedSysProcedureState=null;this.selectedSysProcedurePhase=null;this.selectedSysProcedureType=null;this.selectedSysNoticeState=null;this.selectedContractAssignmentType=null;this.selectedSysAwardCriteriaType=null;this.selectedSysAcquisitionContractType=null;this.selectedNoticeWGSContractType=null;this.selectedSysFinancingType=null;this.selectedSysEuropeanFund=null;this.selectedCa=null;this.selectedCpv=null;this.selectedCpvCat=null;this.selectedValidatedBy=null;this.selectedAllocatedTo=null;this.selectedSupplierWinner=null;var n=$("#filterCpvDdl").data("kendoDropDownList");n&&n.text("")},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.exportData=function(n){var t=this;this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.Common.getCAExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getCAExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getCAExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.addNoticeTypeToFilter=function(n){this.filter||this.resetFilter();this.filter.sysNoticeTypeIds&&this.filter.sysNoticeTypeIds.indexOf(n)>-1?this.filter.sysNoticeTypeIds.splice(this.filter.sysNoticeTypeIds.indexOf(n),1):(this.filter.sysNoticeTypeIds||(this.filter.sysNoticeTypeIds=[]),this.filter.sysNoticeTypeIds.push(n));this.search()},n.prototype.setBackRoute=function(){var n;this.svc.userService.currentUserIsCa()&&(n=sys.prv.routes.CA.CaNoticeHistoryList_Ca);this.svc.userService.currentUserIsSeap()&&(n=sys.prv.routes.SEAP.CaNoticeHistoryList_Seap);this.svc.userService.currentUserIsAnrmap()&&(n=sys.prv.routes.SEAP.CaNoticeHistoryList_Mon);this.svc.nav.setBackRouteWithParams(n,[":resetFilter","0"]);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id>0&&this.$cookieStore.put("selectedSysProcedureState",this.selectedSysProcedureState);this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id>0&&this.$cookieStore.put("selectedSysProcedurePhase",this.selectedSysProcedurePhase);this.selectedSysProcedureType!=null&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractAssignmentType!=null&&this.selectedContractAssignmentType.id>0&&this.$cookieStore.put("selectedContractAssignmentType",this.selectedContractAssignmentType);this.selectedSysAwardCriteriaType!=null&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedNoticeWGSContractType!=null&&this.selectedNoticeWGSContractType.id>0&&this.$cookieStore.put("selectedNoticeWGSContractType",this.selectedNoticeWGSContractType);this.selectedSysFinancingType!=null&&this.selectedSysFinancingType.id>0&&this.$cookieStore.put("selectedSysFinancingType",this.selectedSysFinancingType);this.selectedSysEuropeanFund!=null&&this.selectedSysEuropeanFund.id>0&&this.$cookieStore.put("selectedSysEuropeanFund",this.selectedSysEuropeanFund);this.selectedCa!=null&&this.selectedCa.id>0&&this.$cookieStore.put("selectedCa",this.selectedCa);this.selectedSupplierWinner!=null&&this.selectedSupplierWinner.id>0&&this.$cookieStore.put("selectedSupplierWinner",this.selectedSupplierWinner);this.selectedCpv!=null&&this.selectedCpv.id>0&&this.$cookieStore.put("selectedCpv",this.selectedCpv);this.selectedCpvCat!=null&&this.selectedCpvCat.id>0&&this.$cookieStore.put("selectedCpvCat",this.selectedCpvCat);this.selectedValidatedBy!=null&&this.selectedValidatedBy.id>0&&this.$cookieStore.put("selectedValidatedBy",this.selectedValidatedBy);this.selectedAllocatedTo!=null&&this.selectedAllocatedTo.id>0&&this.$cookieStore.put("selectedAllocatedTo",this.selectedAllocatedTo);this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage);this.$cookieStore.put("sysNoticeTypeIds",this.filter.sysNoticeTypeIds)},n.prototype.populateFilterForEntityType=function(){var n=new Date,t=n.getFullYear(),i=n.getMonth(),r=n.getDate();this.filter.startNoticeState=new Date(t-2,i,r)},n.prototype.navigateToView=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsAnrmap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_MON,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.navigateToProcedure=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsAnrmap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_MON,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.navigateToRequestList=function(){this.setBackRoute();this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.MoveAcqProcedureReqList_Ca,":resetFilter",1)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeHistoryApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"CA-NOTICE-HISTORY-LIST"},n}();n.CaNoticeHistoryList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.onEnter=function(n){n.which===13&&this.search()};this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.InitNotice_MaxListItems);this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en"}return n.prototype.init=function(){this.$routeParams.resetFilter>0&&this.resetFilter();this.populateInitialFilters();this.setValidPageSizes()},n.prototype.populateInitialFilters=function(){this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null));this.$cookieStore.get("historyNoticeNo")!=null&&(this.filter.number=this.$cookieStore.get("historyNoticeNo"),this.$cookieStore.put("historyNoticeNo",null))},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysNoticeTypeId:n.filter.sysNoticeTypeId,number:n.filter.number,reqStartDate:n.filter.reqStartDate,reqEndDate:n.filter.reqEndDate,moveDateStart:n.filter.moveDateStart,moveDateEnd:n.filter.moveDateEnd,status:n.filter.status,userId:n.filter.userId,contractingAuthorityId:n.filter.contractingAuthorityId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.Common.getMoveAcqProcedureReqList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedMoveAcqProcedureStatus&&this.selectedMoveAcqProcedureStatus.id>0&&(this.filter.status=this.selectedMoveAcqProcedureStatus.id);this.selectedSysNoticeType&&this.selectedSysNoticeType.id>0&&(this.filter.sysNoticeTypeId=this.selectedSysNoticeType.id);this.selectedEntityUser&&this.selectedEntityUser.id>0&&(this.filter.userId=this.selectedEntityUser.id);this.selectedCa&&this.selectedCa.id>0&&(this.filter.contractingAuthorityId=this.selectedCa.id)},n.prototype.resetFilter=function(){this.filter={sortProperties:[],pageSize:5};this.selectedSysNoticeType=null;this.selectedCa=null;this.selectedEntityUser=null;this.selectedMoveAcqProcedureStatus=null},n.prototype.reset=function(){this.resetFilter()},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocument_moveAcq(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocument_moveAcq(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocument_moveAcq(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.goBack=function(){if(this.svc.nav.getBackParams()){var n=this.svc.nav.getBackParamsAndReset();this.svc.nav.pathWithNamedParam(this.svc.nav.getBackRouteAndReset(),n[0],n[1])}else this.svc.nav.path(this.svc.nav.getBackRouteAndReset())},n.prototype.setBackRoute=function(){var n;n=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.MoveAcqProcedureReqList_Ca:sys.prv.routes.SEAP.MoveAcqProcedureReqList_Seap;this.svc.nav.setBackRouteWithParams(n,[":resetFilter","0"]);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage)},n.prototype.navigateToView=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.navigateToProcedure=function(n){this.setBackRoute();this.svc.userService.currentUserIsCa()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.NoticeHistory_Ca,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId);this.svc.userService.currentUserIsSeap()&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.NoticeHistory_SEAP,":noticeId",n.noticeId,":noticeTypeId",n.sysNoticeTypeId)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.onlyUnique=function(n,t,i){return i.indexOf(n)===t},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeHistoryApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"MOVE-ACQ-PROCEDURE-REQ-LIST"},n}();n.MoveAcqProcedureReqList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.svc=n;this.api=t;this.$routeParams=i;this.$cookieStore=r;this.listItems=[];this.filter={pageSize:5};this.createModel={};this.modelIsInvalid=!1;this.onEnter=function(n){n.which===13&&this.search()};this.populateInitialFilters();this.setValidPageSizes();this.search()}return n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({startPublicationDate:n.filter.startPublicationDate,stopPublicationDate:n.filter.stopPublicationDate,includingDate:n.filter.includingDate,sysDirAcqCentralNotifStateId:n.filter.sysDirAcqCentralNotifStateId,contractingAuthorityId:n.filter.contractingAuthorityId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.setInitialFilters();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.COMMON.getCentralNotifList(this.filter).then(function(i){t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedCentralNotifState&&this.selectedCentralNotifState.value>0&&(this.filter.sysDirAcqCentralNotifStateId=this.selectedCentralNotifState.value);this.selectedContractingAuthority!=null&&(this.filter.contractingAuthorityId=this.selectedContractingAuthority.id)},n.prototype.resetFilter=function(){this.filter={pageSize:5};this.selectedCentralNotifState=null;this.selectedContractingAuthority=null},n.prototype.setInitialFilters=function(){this.filter&&this.$cookieStore.put("centralNotifListFilter",this.filter);this.selectedCentralNotifState!=null&&this.selectedCentralNotifState.value>0&&this.$cookieStore.put("centralNotifList_State",this.selectedCentralNotifState);this.selectedContractingAuthority!=null&&this.selectedContractingAuthority.id>0&&this.$cookieStore.put("centralNotifList_Ca",this.selectedContractingAuthority)},n.prototype.populateInitialFilters=function(){if(this.$cookieStore.get("centralNotifList_State")!=null&&(this.selectedCentralNotifState=this.$cookieStore.get("centralNotifList_State"),this.$cookieStore.put("centralNotifList_State",null)),this.$cookieStore.get("centralNotifList_Ca")!=null&&(this.selectedContractingAuthority=this.$cookieStore.get("centralNotifList_Ca"),this.$cookieStore.put("centralNotifList_Ca",null)),this.$cookieStore.get("centralNotifListFilter")!=null){var n=this.$cookieStore.get("centralNotifListFilter");n.includigDate&&(this.filter.includingDate=new Date(n.includingDate));n.startPublicationDate&&(this.filter.startPublicationDate=new Date(n.startPublicationDate));n.stopPublicationDate&&(this.filter.stopPublicationDate=new Date(n.stopPublicationDate));this.$cookieStore.put("centralNotifListFilter",null)}},n.prototype.reset=function(){this.resetFilter()},n.prototype.generateCentralNotif=function(){var n=this;this.generationValidation()&&this.api.CA.createCentralNotif(this.createModel).then(function(t){if(t.hasError)n.svc.modalService.showErrorMessage(t.responseMessage);else{var i={directAcqCentralNotifId:t.directAcqCentralNotifId};n.svc.isLoading=!0;n.api.CA.generateCentralNotifDetails(i).then(function(i){i?n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CentralNotifEdit,":centralNotifId",t.directAcqCentralNotifId):n.svc.modalService.showErrorMessage(n.svc.locale.key["CentralisedNotification.Error.GeneratingCentralNotifError"])}).finally(function(){n.svc.isLoading=!1})}}).finally(function(){n.svc.isLoading=!1})},n.prototype.generationValidation=function(){return!this.createModel.startDate||!this.createModel.stopDate?(this.modelIsInvalid=!0,this.svc.modalService.showErrorMessage(this.svc.locale.key["CentralisedNotification.Error.HighlightedFieldsMandatory"]),!1):this.createModel.startDate>this.createModel.stopDate?(this.modelIsInvalid=!0,this.svc.modalService.showErrorMessage(this.svc.locale.key["CentralisedNotification.Validation.DaNeedDatesValidation"]),!1):!0},n.prototype.openCreateCentralNotifWindow=function(){this.createCentralNotifWindow.center().open()},n.prototype.closeCreateCentralNotifWindow=function(){this.createCentralNotifWindow.close()},n.prototype.navigateToCentralNotif=function(n,t){if(t==1)this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CentralNotifEdit,":centralNotifId",n);else{var i=sys.pub.routes.CentralNotifView_Pub;if(this.svc.userService.currentUser!=null)switch(this.svc.userService.currentUser.entity.entityType){case 2:i=sys.prv.routes.CA.CentralNotifView_Ca;break;case 3:i=sys.prv.routes.SU.CentralNotifView_Su;break;case 1:i=sys.prv.routes.SEAP.CentralNotifView_Seap;break;case 4:i=sys.prv.routes.SEAP.CentralNotifView_Mon}this.svc.nav.pathWithNamedParam(i,":centralNotifId",n)}},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.Cfg={Name:"CENTRAL-NOTIF-LIST"},n.$inject=["svc","CentralisedNotificationApi","$routeParams","$cookieStore"],n}();n.CentralisedNotificationList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.centralNotif||(n.centralNotif={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){var u=this;this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.filter={pageSize:10,sortProperties:[]};this.gridHeaders=[];this.selfDaNeeds=[];this.acquisitionModel={currency:{id:1,text:"RON"}};this.inEditMode=!1;this.isPreview=!1;this.isAdding=!1;this.gridHistoryOptions={dataSource:{data:[]},autobind:!1,columns:[{width:5,template:"{{dataItem.directAcquisitionTypeName}}"},{field:"daNeed",width:10,title:this.svc.locale.key["CentralisedNotification.Label.DaNeedLabel"],template:"{{dataItem.directAcquisitionNeedName}}"},{field:"acquisitionDate",width:8,title:this.svc.locale.key["CentralisedNotification.Label.AcquisitionDateLabel"],template:"{{dataItem.directAcquisitionDate | date:'dd.MM.yyyy'}}"},{field:"cpvCode",width:20,title:this.svc.locale.key["Common.Label.CPVCode"],template:"{{dataItem.directAcquisitionCpv}}"},{field:"acquisitionObject",width:22,title:this.svc.locale.key["CentralisedNotification.Label.AcquisitionObjectLabel"],template:"{{dataItem.directAcquisitionObject}}"},{field:"quantity",width:10,title:this.svc.locale.key["CentralisedNotification.Label.AcquisitionedQuantityLabel"],template:"{{dataItem.quantity}}"},{field:"measureUnit",width:5,title:this.svc.locale.key["CentralisedNotification.Label.MeasureUnitLabel"],template:"{{dataItem.measureUnit}}"},{field:"value",width:8,title:this.svc.locale.key["CentralisedNotification.Label.AcquisitionedValueLabel"],template:"{{dataItem.acquisitionValue}}"},{field:"currency",width:5,title:this.svc.locale.key["Common.Label.Currency"],template:"{{dataItem.currency}}"}]};this.centralNotifId=i.centralNotifId;this.filter.directAcqCentralNotifId=this.centralNotifId;this.init(this.centralNotifId);this.$rootScope.$$listeners.gridSearch=[];this.$rootScope.$on("gridSearch",function(n,t){t.headers&&t.headers.filter(function(n){return n.isSortable}).forEach(function(n){if(n.isAscending||n.isDescending)var t=u.gridHeaders.filter(function(t){return t.sortingKey===n.sortingKey})[0];t&&(t.isAscending=n.isAscending,t.isDescending=n.isDescending)});u.filter.pageSize=t.pageSize;u.pageSize=t.pageSize;u.filter.pageIndex=t.pageIndex;u.search()});this.$rootScope.$$listeners.gridViewRow=[];this.$rootScope.$on("gridViewRow",function(){});this.$rootScope.$$listeners.gridEditRow=[];this.$rootScope.$on("gridEditRow",function(n,t){u.openEditWindow(t.uniqueId,t.rowTypeId,!1)});this.$rootScope.$$listeners.gridDeleteRow=[];this.$rootScope.$on("gridDeleteRow",function(n,t){u.deleteOfflineAcquisition(t.uniqueId)});this.$rootScope.$$listeners.gridClickAction=[];this.$rootScope.$on("gridClickAction",function(n,t){u.openAcquisitionHistory(t.rowTypeId,t.uniqueId)})}return n.prototype.init=function(){var n=this;this.setGridHeaders();this.svc.isLoading=!0;this.api.COMMON.getDaNeedsForSpecificCa(this.centralNotifId).then(function(t){t&&(n.selfDaNeeds.push({id:0,text:""}),n.selfDaNeeds=n.selfDaNeeds.concat(t))}).finally(function(){n.svc.isLoading=!1})},n.prototype.search=function(){var n=this,t;this.filter.sortProperties=[];this.populateFilter();this.gridHeaders&&this.gridHeaders.filter(function(n){return n.isSortable&&(n.isAscending||n.isDescending)}).forEach(function(t){n.filter.sortProperties.push({sortProperty:t.sortingKey,descending:t.isDescending})});t={directAcqCentralNotifId:this.centralNotifId};this.svc.isLoading=!0;this.api.COMMON.getCentralNotifById(t).then(function(t){t?(n.centralNotifModel=t,t.sysDirAcqCentralNotifStateId==1&&(n.isPreview=!0,n.setGridHeaders()),n.svc.isLoading=!0,n.api.COMMON.getCentralNotifDetailsViewById(n.filter).then(function(t){t?(t.headers=n.gridHeaders,n.$rootScope.$broadcast("updateGridSource",t)):n.svc.modalService.showErrorMessage(n.svc.locale.key["CentralisedNotification.Error.CentralNotifNotFoundError"])}).finally(function(){n.svc.isLoading=!1})):n.svc.modalService.showErrorMessage(n.svc.locale.key["CentralisedNotification.Error.CentralNotifNotFoundError"])}).finally(function(){n.svc.isLoading=!1})},n.prototype.reset=function(){this.filter={pageSize:this.pageSize,sortProperties:[],directAcqCentralNotifId:this.centralNotifId};this.selectedFilterDaNeed=null;this.selectedFilterCpv=null},n.prototype.populateFilter=function(){this.selectedFilterDaNeed&&this.selectedFilterDaNeed.id>0&&(this.filter.directAcquisitionNeedId=this.selectedFilterDaNeed.id);this.selectedFilterCpv&&this.selectedFilterCpv.id>0&&(this.filter.cpvCode=this.selectedFilterCpv.id)},n.prototype.publishCentralNotif=function(){var n=this;this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Warn"],this.svc.locale.key["CentralisedNotification.Info.CentralNotifPublishConfirmation"]).then(function(t){if(t)n.svc.isLoading=!0,n.api.CA.publishCentralNotif(n.centralNotifId).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["CentralisedNotification.Info.CentralNotifPublishSuccess"]),n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CentralNotifView_Ca,":centralNotifId",n.centralNotifId))}).finally(function(){n.svc.isLoading=!1});else return})},n.prototype.openAcquisitionHistory=function(n,t){var i=this,r={directAcqCentralNotifId:this.centralNotifId,sysDirectAcquisionType:n,id:t};this.api.COMMON.getHistoryForAcquisition(r).then(function(n){n&&(i.gridHistory.dataSource.data(n),i.acqHistWindow.center().open())})},n.prototype.closeAcquisitionHistory=function(){this.acqHistWindow.close()},n.prototype.openEditWindow=function(n,t,i){var r=this;if(this.modelIsInvalid=!1,this.inEditMode=!0,this.isAdding=i,this.acquisitionModel={currency:{id:1,text:"RON"}},this.acqTypeInEdit=3,this.selectedCpv=null,this.selectedNeed=null,n){this.svc.isLoading=!0;switch(t){case 1:this.api.COMMON.getDirectAcquisition(n).then(function(n){if(n)r.acquisitionModel=n,r.selectedCpv=n.cpvCode,n.directAcquisitionNeedId&&(r.selectedNeed=r.selfDaNeeds.filter(function(t){return t.id==n.directAcquisitionNeedId})[0]);else return}).finally(function(){r.svc.isLoading=!1});break;case 3:this.api.COMMON.getDirectAcquisitionOffline(n).then(function(n){if(n)r.acquisitionModel=n,r.selectedCpv=n.cpvCode,n.directAcquisitionNeedId&&(r.selectedNeed=r.selfDaNeeds.filter(function(t){return t.id==n.directAcquisitionNeedId})[0]);else return}).finally(function(){r.svc.isLoading=!1});break;case 2:this.api.COMMON.getDirectAcquisitionAwardNotice(n).then(function(n){if(n)r.acquisitionModel=n,r.selectedCpv=n.cpvCode,n.directAcquisitionNeedId&&(r.selectedNeed=r.selfDaNeeds.filter(function(t){return t.id==n.directAcquisitionNeedId})[0]);else return}).finally(function(){r.svc.isLoading=!1});break;default:this.svc.isLoading=!1}this.acqTypeInEdit=t}this.acqTypeInEdit||(this.acqTypeInEdit=3);this.editAcquisitionWindow.center().open()},n.prototype.saveAcquisitionInfo=function(){var n=this,t,i,r;if(this.validateAcquisition()){this.svc.isLoading=!0;switch(this.acqTypeInEdit){case 1:t={directAcquisitionItemId:this.acquisitionModel.id};this.selectedNeed&&this.selectedNeed.id>0&&(t.directAcquisitionNeedId=this.selectedNeed.id);this.api.CA.editNeedDirectAcquisition(t).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["CentralisedNotification.Info.SaveAcquisitionSuccess"]),n.search())}).finally(function(){n.svc.isLoading=!1});break;case 3:i={directAcquisitionNeedId:this.selectedNeed.id,acquisitionDate:this.acquisitionModel.acquisitionDate,acquisitionObject:this.acquisitionModel.acquisitionObject,cpvCodeId:this.selectedCpv.id,currencyId:this.acquisitionModel.currency.id,measureUnit:this.acquisitionModel.measureUnit,quantity:this.acquisitionModel.quantity,totalPrice:this.acquisitionModel.totalPrice,directAcquisitionOfflineId:this.acquisitionModel.id,directAcqCentralNotifId:this.centralNotifId};this.isAdding?this.api.CA.addDirectAcquisitionOffline(i).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["CentralisedNotification.Info.SaveAcquisitionSuccess"]),n.search())}).finally(function(){n.svc.isLoading=!1}):this.api.CA.editDirectAcquisitionOffline(i).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["CentralisedNotification.Info.SaveAcquisitionSuccess"]),n.search())}).finally(function(){n.svc.isLoading=!1});break;case 2:r={directAcquisitionNeedId:this.selectedNeed.id,directAcquisitionAwardNoticeId:this.acquisitionModel.id,measureUnit:this.acquisitionModel.measureUnit,quantity:this.acquisitionModel.quantity};this.api.CA.editNeedDirectAcquisitionAwardNotice(r).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["CentralisedNotification.Info.SaveAcquisitionSuccess"]),n.search())}).finally(function(){n.svc.isLoading=!1});break;default:this.svc.isLoading=!1;return}this.editAcquisitionWindow.close();this.acqTypeInEdit=null}},n.prototype.validateAcquisition=function(){return this.modelIsInvalid=!1,(!this.selectedNeed||this.selectedNeed.id<1)&&(this.svc.modalService.showErrorMessage(this.svc.locale.key["CentralisedNotification.Error.HighlightedFieldsMandatory"]),this.modelIsInvalid=!0),this.acqTypeInEdit==3&&(this.acquisitionModel.acquisitionDate&&this.selectedCpv&&!(this.selectedCpv.id<1)&&this.acquisitionModel.acquisitionObject&&this.acquisitionModel.acquisitionObject.trim()!==""&&this.acquisitionModel.quantity&&this.acquisitionModel.measureUnit&&this.acquisitionModel.measureUnit.trim()!==""&&this.acquisitionModel.totalPrice||(this.svc.modalService.showErrorMessage(this.svc.locale.key["CentralisedNotification.Error.HighlightedFieldsMandatory"]),this.modelIsInvalid=!0)),!this.modelIsInvalid},n.prototype.deleteOfflineAcquisition=function(n){var t=this;this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Warn"],this.svc.locale.key["CentralisedNotification.Info.OfflineAcquisitionDeleteConfirmation"]).then(function(i){if(i)t.svc.isLoading=!0,t.api.CA.deleteDirectAcqOffline(n).then(function(n){n.hasError?t.svc.modalService.showErrorMessage(t.svc.locale.key["CentralisedNotification.Error.OfflineAcquisitionDeleteError"]):(t.svc.modalService.showSuccessMessages(t.svc.locale.key["CentralisedNotification.Info.OfflineAcquisitionDeleteSuccess"]),t.search())}).finally(function(){t.svc.isLoading=!1});else return})},n.prototype.closeEditWindow=function(){this.editAcquisitionWindow.close()},n.prototype.backToList=function(){var n=sys.pub.routes.CentralNotifList_Pub;if(this.svc.userService.currentUser)switch(this.svc.userService.currentUser.entity.entityType){case 2:n=sys.prv.routes.CA.CentralNotifList_Ca;break;case 3:n=sys.prv.routes.SU.CentralNotifList_Su;break;case 1:n=sys.prv.routes.SEAP.CentralNotifList_Seap;break;case 4:n=sys.prv.routes.SEAP.CentralNotifList_Mon}this.svc.nav.pathWithNamedParam(n,":isFromMenu",1)},n.prototype.setGridHeaders=function(){var n=this.svc.userService.currentUserIsCa();this.gridHeaders=[{isSortable:!1,width:this.isPreview?6:4},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.DaNeedLabel"],width:9},{isSortable:!0,sortingKey:"acquisitiondate",text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionDateLabel"],width:9},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionCodeTitle"],width:6},{isSortable:!0,sortingKey:"cpvcode",text:"Codul CPV al achiziției",width:n?18:20},{isSortable:!0,sortingKey:"sucpvcode",text:this.svc.locale.key["CentralisedNotification.Label.ItemCpvLabel"],width:n?18:20},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionObjectLabel"],width:n?20:22},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionedQuantityLabel"],width:7},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.MeasureUnitLabel"],width:5},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionedValueLabel"],width:this.isPreview?9:7},{isSortable:!1,text:this.svc.locale.key["Common.Label.Currency"],width:5},{isSortable:!1,text:this.svc.locale.key["CentralisedNotification.Label.AcquisitionHistoryLabel"],width:6}];n&&!this.isPreview&&this.gridHeaders.push({isSortable:!1,width:4})},n.Cfg={Name:"CENTRAL-NOTIF-VIEW"},n.$inject=["svc","CentralisedNotificationApi","$routeParams","$rootScope"],n}();n.CentralisedNotificationView=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.centralNotif||(n.centralNotif={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api/CaCentralisedNotification"}return __extends(t,n),t.prototype.generateCentralisedNotification=function(n){return this.POST(this.api+"/GenerateCentralisedNotification/",n)},t.prototype.saveNeed=function(n){return this.POST(this.api+"/SaveDaNeed/",n)},t.prototype.getDaNeedList=function(n){return this.POST(this.api+"/GetDaNeedList/",n)},t.prototype.deleteDaNeed=function(n){return this.GET(this.api+"/DeleteDaNeed/",{daNeedId:n})},t.prototype.createCentralNotif=function(n){return this.POST(this.api+"/CreateCentralisedNotification/",n)},t.prototype.generateCentralNotifDetails=function(n){return this.POST(this.api+"/GenerateCentralisedNotificationDetails/",n)},t.prototype.getCentralNotifDetailsById=function(n){return this.POST(this.api+"/GetCentralisedNotificationDetailsById/",n)},t.prototype.removeKeepDatesCentralNotif=function(n){return this.GET(this.api+"/DeleteKeepDatesDirectAcqCentralNotif/",{directAcqCentralNotifId:n})},t.prototype.removeDatesCentralNotif=function(n){return this.GET(this.api+"/DeleteDatesDirectAcqCentralNotif/",{directAcqCentralNotifId:n})},t.prototype.removeDatesKeepAcqCentralNotif=function(n){return this.GET(this.api+"/DeleteDatesAndKeepDirectAcq/",{directAcqCentralNotifId:n})},t.prototype.removeKeepDatesKeepAcqCentralNotif=function(n){return this.GET(this.api+"/DeleteKeepDatesAndRestoreDirectAcq/",{directAcqCentralNotifId:n})},t.prototype.addDirectAcquisitionOffline=function(n){return this.POST(this.api+"/AddDirectAcquisitionOffline/",n)},t.prototype.editDirectAcquisitionOffline=function(n){return this.POST(this.api+"/EditDirectAcquisitionOffline/",n)},t.prototype.editNeedDirectAcquisitionAwardNotice=function(n){return this.POST(this.api+"/editNeedDirectAcquisitionAwardNotice/",n)},t.prototype.editNeedDirectAcquisition=function(n){return this.POST(this.api+"/EditNeedDirectAcquisition/",n)},t.prototype.deleteDirectAcqOffline=function(n){return this.GET(this.api+"/DeleteDirectAcquisitionOffline/",{directAcquisitionOfflineId:n})},t.prototype.publishCentralNotif=function(n){return this.GET(this.api+"/PublicationDirectAcqCentralNotif/",{directAcqCentralNotifId:n})},t}(sys.HttpApi),r=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/CentralisedNotification"}return __extends(t,n),t.prototype.getCentralNotifById=function(n){return this.POST(this.api+"/GetCentralisedNotificationById/",n)},t.prototype.getCentralNotifList=function(n){return this.POST(this.api+"/GetCentralisedNotificationList/",n)},t.prototype.getDirectAcquisition=function(n){return this.GET(this.api+"/GetDirectAcquisition/",{directAcquisitionItemId:n})},t.prototype.getDirectAcquisitionOffline=function(n){return this.GET(this.api+"/GetDirectAcquisitionOffline/",{directAcquisitionOfflineId:n})},t.prototype.getDirectAcquisitionAwardNotice=function(n){return this.GET(this.api+"/GetDirectAcquisitionAwardNotice/",{directAcquisitionAwardNoticeId:n})},t.prototype.getCentralNotifDetailsViewById=function(n){return this.POST(this.api+"/GetCentralisedNotificationDetailsViewById/",n)},t.prototype.getDaNeedsForSpecificCa=function(n){return this.GET(this.api+"/GetDaNeedsForSpecificCa/",{centralNotifId:n})},t.prototype.getHistoryForAcquisition=function(n){return this.POST(this.api+"/GetHistoryForAModifyAcq/",n)},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"COMMON",{get:function(){return new r(this.$http,this.$q)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CA",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.CentralisedNotificationApi=t;angular.module("app.controls").service("CentralisedNotificationApi",t)})(t=n.centralNotif||(n.centralNotif={}))})(t=n.directAcq||(n.directAcq={}))}(pub||(pub={})),function(n){"use strict";var t=function(){function n(n,t,i){var r=this;this.$scope=n;this.svc=t;this.$rootScope=i;this.dataSource={};this.totalPages=0;this.totalResults=0;n.vm=this;this.init();this.$rootScope.$$listeners.updateGridSource=[];this.$rootScope.$on("updateGridSource",function(n,t){r.dataSource=t;r.totalPages=Math.ceil(t.totalRows/r.pageSize)});this.$rootScope.$$listeners.updateCaGridSource=[];this.$rootScope.$on("updateCaGridSource",function(n,t){r.dataSource=t;r.totalPages=Math.ceil(t.totalRows/r.pageSize)})}return n.prototype.init=function(){this.setValidPageSizes();this.search()},n.prototype.search=function(){this.pageSize||(this.pageSize=10);this.$rootScope.$broadcast("gridSearch",{headers:this.dataSource.headers,pageIndex:this.currentPage,pageSize:this.pageSize})},n.prototype.viewRow=function(n){this.$rootScope.$broadcast("gridViewRow",n)},n.prototype.editRow=function(n){this.$rootScope.$broadcast("gridEditRow",n)},n.prototype.deleteRow=function(n){this.$rootScope.$broadcast("gridDeleteRow",n)},n.prototype.onClick=function(n){this.$rootScope.$broadcast("gridClickAction",n)},n.prototype.changeSorting=function(n){if(n.isAscending){n.isAscending=!1;this.search();return}if(n.isDescending){n.isAscending=!0;n.isDescending=!1;this.search();return}n.isAscending||n.isDescending||(n.isDescending=!0,this.search())},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.onEnter=function(n){n.which===13&&this.search()},n.$inject=["$scope","svc","$rootScope"],n}();n.SicapGridController=t;angular.module("app.controls").directive("sicapGrid",function(){return{restrict:"E",replace:!0,scope:{dataSource:"="},templateUrl:"template/common/grid/sicap-grid",controller:t,link:function(){}}})}(pub||(pub={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this,e;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.$routeParams=u;this.listItems=[];this.warningList=[];this.errorList=[];this.inLotScreen=!1;this.onEnter=function(n){n.which===13&&this.search()};n.vm=this;this.procedureId=u.idProcedure;this.setValidPageSizes();i.COMMON.getProcedureInfo(this.procedureId).then(function(n){f.hasLots=n});e=u.idProcedureLot;e!=null?(this.procedureLotId=e,this.inLotScreen=!0,i.COMMON.getProcedureLotNumber(this.procedureLotId).then(function(n){f.lotNumber=n})):(this.procedureLotId=0,this.inLotScreen=!1,i.COMMON.getFilterLotNumbers(this.procedureId).then(function(n){f.lotNumbers=n}));i.COMMON.getFilterSuppliers(this.procedureId,this.procedureLotId).then(function(n){f.filterSuppliers=n});this.search();this.$rootScope.$$listeners.closeCommGenerator=[];this.$rootScope.$on("closeCommGenerator",function(){f.communicationGeneratorWindow.close();f.search()});this.$rootScope.$$listeners.closeCommViewer=[];this.$rootScope.$on("closeCommViewer",function(){f.communicationWindow.close()});this.$rootScope.$$listeners.closePublishWindow=[];this.$rootScope.$on("closePublishWindow",function(){f.publishCommunicationsWindow.close();f.search()});this.$rootScope.$$listeners.refreshCommunications=[];this.$rootScope.$on("refreshCommunications",function(){f.publishCommunicationsWindow.close();f.search()});i.COMMON.getProcedureContractAssigmType(this.procedureId).then(function(n){f.sysContractAssigmentType=n})}return n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({sysCommunicationTypeId:n.filter.sysCommunicationTypeId,sysCommunicationStateId:n.filter.sysCommunicationStateId,createDateStart:n.filter.createDateStart,createDateEnd:n.filter.createDateEnd,lotNo:n.filter.lotNo,supplierId:n.filter.supplierId,publicationDateStart:n.filter.publicationDateStart,publicationDateEnd:n.filter.publicationDateEnd});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.api.COMMON.getCommunicationList(this.filter).then(function(i){t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysCommunicationType&&this.selectedSysCommunicationType.id>0&&(this.filter.sysCommunicationTypeId=this.selectedSysCommunicationType.id);this.selectedSysCommunicationState&&this.selectedSysCommunicationState.id>0&&(this.filter.sysCommunicationStateId=this.selectedSysCommunicationState.id);this.selectedSupplier&&this.selectedSupplier.id>0&&(this.filter.supplierId=this.selectedSupplier.id);this.selectedLot&&this.selectedLot.id>0&&(this.filter.lotNo=this.selectedLot.text);this.filter.procedureId=this.procedureId;this.procedureLotId&&(this.filter.procedureLotId=this.procedureLotId)},n.prototype.resetFilter=function(){this.filter={sortProperties:[],pageSize:5};this.selectedSysCommunicationType=null;this.selectedSysCommunicationState=null;this.selectedLot=null;this.selectedSupplier=null},n.prototype.reset=function(){this.resetFilter()},n.prototype.openCommunicationGenerator=function(n,t){this.sysCommunicationTypeId=n;switch(n){case 1:this.communicationGeneratorWindowTitle=this.svc.locale.key["Communications.Label.GenerateCandidatureAdmissionCommunications"];break;case 2:this.communicationGeneratorWindowTitle=this.svc.locale.key["Communications.Label.GenerateCandidatureRejectionCommunications"];break;case 3:this.communicationGeneratorWindowTitle=this.svc.locale.key["Communications.Label.GenerateDesignatedWinningBidCommunications"];break;case 4:this.communicationGeneratorWindowTitle=this.svc.locale.key["Communications.Label.GenerateAdmissibleButNotWinningBidCommunications"];break;case 5:this.communicationGeneratorWindowTitle=this.svc.locale.key["Communications.Label.GenerateOfferRejectedCommunications"]}this.communicationGeneratorWindow.setOptions({title:this.communicationGeneratorWindowTitle});this.getCommunicationsToGenerate(t)},n.prototype.openRegeneratorWindow=function(n){this.regeneratingSysCommunicationTypeId=n;this.regenerationWindowDynamicText=this.svc.locale.key["Communications.Info.RegenerateCommunicationsConfirm"];var t="";switch(this.regeneratingSysCommunicationTypeId){case 1:t=this.svc.locale.key["Communications.Label.CandidatureAdmissionLabel"];break;case 2:t=this.svc.locale.key["Communications.Label.CandidatureRejectionLabel"];break;case 3:t=this.svc.locale.key["Communications.Label.DesignatedWinningBidLabel"];break;case 4:t=this.svc.locale.key["Communications.Label.AdmissibleButNotWinningBidLabel"];break;case 5:t=this.svc.locale.key["Communications.Label.OfferRejectionLabel"]}this.communicationRegeneratorWindow.setOptions({title:this.svc.locale.key["Communications.Label.CommunicationRegeneration"]+": "+t.toLowerCase()});this.regenerationWindowDynamicText=this.regenerationWindowDynamicText.replace("@CommunicationType",t.toLowerCase());this.communicationRegeneratorWindow.center().open()},n.prototype.openCommunicationWindow=function(n,t){this.communicationWindowTitle=t==1?this.svc.locale.key["Communications.Label.EditCommunication"]:this.svc.locale.key["Communications.Label.ViewCommunication"];this.communicationWindow.setOptions({title:this.communicationWindowTitle});this.$rootScope.$broadcast("openCommWindow",{communicationId:n,sysCommunicationStateId:t,hasLots:this.hasLots});this.communicationWindow.center().open()},n.prototype.openPublishCommunicationsWindow=function(){this.$rootScope.$broadcast("openPublishWindow");this.publishCommunicationsWindow.center().open()},n.prototype.closeCommunicationWindow=function(){this.communicationWindow.close()},n.prototype.closeRegeneratorWindow=function(){this.communicationRegeneratorWindow.close()},n.prototype.closePublishWindow=function(){this.publishCommunicationsWindow.close()},n.prototype.regenerateCommunications=function(){var n=this;this.closeRegeneratorWindow();this.svc.isLoading=!0;this.api.COMMON.removeCommunications(this.procedureId,this.regeneratingSysCommunicationTypeId).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(t.responseMessage);return}n.openCommunicationGenerator(n.regeneratingSysCommunicationTypeId,!0)}).finally(function(){n.svc.isLoading=!1})},n.prototype.getCommunicationsToGenerate=function(n){var t=this;this.svc.isLoading=!0;this.api.COMMON.getCommunicationsToGenerate(this.procedureId,this.sysCommunicationTypeId,n).then(function(i){i&&(t.hasLots=i.hasLots,t.warningList=i.warnings,i.hasErrors&&(t.errorList=i.errors),t.communicationGeneratorWindow.center().open(),t.$rootScope.$broadcast("openCommGenerator",{sysCommunicationTypeId:t.sysCommunicationTypeId,response:i,isRegenerating:n}))}).finally(function(){t.svc.isLoading=!1})},n.prototype.deleteCommunication=function(n){var t=this;this.svc.isLoading=!0;this.api.COMMON.deleteCommunication(n).then(function(n){n.hasError?t.svc.modalService.showErrorMessage(n.responseMessage):(t.svc.modalService.showSuccessMessages(t.svc.locale.key["Communications.Info.CommunicationDeleteSuccess"]),t.search())}).finally(function(){t.svc.isLoading=!1})},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.onlyUnique=function(n,t,i){return i.indexOf(n)===t},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["$scope","svc","CommunicationApi","$rootScope","$routeParams"],n}();n.CommunicationSectionController=t;angular.module("app.controls").directive("communicationSection",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/communications/common/communication-section/communication-section",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e){var o=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.$routeParams=u;this.$timeout=f;this.uploadService=e;this.inEditMode=!1;this.file=[];this.hasLots=!1;this.gridSuppliersOptions={dataSource:{data:[]},autobind:!1,height:155,columns:[{field:"supplierName",title:this.svc.locale.key["Common.Label.Name"],width:65,template:"{{dataItem.supplierName}}"},{field:"supplierCif",title:this.svc.locale.key["Procedure.Label.CandidatesGridColumnFiscalNumber"],width:35,template:"{{dataItem.supplierCif}}"}]};this.open=function(){angular.element("#files").click()};n.vm=this;this.UploadStatus=sys.UploadStatus;this.$rootScope.$$listeners.openCommWindow=[];this.$rootScope.$on("openCommWindow",function(n,t){o.inEditMode=!1;o.uploadService.uploads=[];o.model=null;o.uploadedFile=null;o.hasLots=t.hasLots;t.sysCommunicationStateId==1&&(o.inEditMode=!0);o.svc.isLoading=!0;o.api.COMMON.getCommunicationModel(t.communicationId).then(function(n){o.model=n;o.setCommTypeLabel();o.gridSuppliers.dataSource.data(o.model.suppliers)}).finally(function(){o.svc.isLoading=!1})});this.$scope.$watch(function(){return o.file},function(){angular.forEach(o.file,function(n){if(n.size>1e7){o.svc.modalService.showErrorMessage(o.svc.locale.key["Communications.Error.MaxUploadSizeError"]);return}o.svc.isLoading=!0;o.uploadService.uploadFile(n).then(function(n){o.uploadedFile={fileName:n.filename,fileUrl:n.url,fileSize:n.size};o.ok()},function(n){o.svc.log.error(n);o.svc.modalService.showValidationResult(n)}).finally(function(){o.svc.isLoading=!1})})})}return n.prototype.setCommTypeLabel=function(){switch(this.model.sysCommunicationType.id){case 1:this.communicationTypeLabel=this.svc.locale.key["Communications.Label.CandidatureAdmissionLabel"];break;case 2:this.communicationTypeLabel=this.svc.locale.key["Communications.Label.CandidatureRejectionLabel"];break;case 3:this.communicationTypeLabel=this.svc.locale.key["Communications.Label.DesignatedWinningBidLabel"];break;case 4:this.communicationTypeLabel=this.svc.locale.key["Communications.Label.AdmissibleButNotWinningBidLabel"];break;case 5:this.communicationTypeLabel=this.svc.locale.key["Communications.Label.OfferRejectionLabel"]}},n.prototype.closeViewerWindow=function(){this.$rootScope.$broadcast("closeCommViewer")},n.prototype.saveCommunicationModel=function(){var n=this;this.uploadedFile&&(this.model.communicationDocument={fileName:this.uploadedFile.fileName,fileUrl:this.uploadedFile.fileUrl,fileSize:this.uploadedFile.fileSize},this.uploadedFile=null);this.svc.isLoading=!0;this.api.COMMON.saveCommunicationModel(this.model).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SaveSuccess"]),n.closeViewerWindow())}).finally(function(){n.svc.isLoading=!1})},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.uploadsPending=function(){return this.uploadService.uploads.filter(function(n){return n.status==sys.UploadStatus.UPLOADING}).length>0},n.prototype.ok=function(){},n.prototype.cancel=function(){this.model.communicationDocument=null;this.uploadService.uploads=[]},n.$inject=["$scope","svc","CommunicationApi","$rootScope","$routeParams","$timeout","uploadService"],n}();n.ViewCommunicationController=t;angular.module("app.controls").directive("viewCommunication",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/communications/common/view-communication/view-communication",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){var e=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.$routeParams=u;this.$timeout=f;this.warningList=[];this.errorList=[];this.gridIsEmpty=!0;this.isRegenerating=!1;this.gridCommunicationsOptions={dataSource:{data:[]},autobind:!1,height:200,columns:[]};n.vm=this;this.$rootScope.$$listeners.openCommGenerator=[];this.$rootScope.$on("openCommGenerator",function(n,t){e.procedureId=u.idProcedure;e.sysCommunicationTypeId=t.sysCommunicationTypeId;e.errorList=t.response.errors;e.warningList=t.response.warnings;e.hasLots=t.response.hasLots;e.hasErrors=t.response.hasErrors;e.isRegenerating=t.isRegenerating;e.init(t.response.communicationsList)})}return n.prototype.init=function(n){var t=this;switch(this.sysCommunicationTypeId){case 1:this.generateCommunicationLabel=this.svc.locale.key["Communications.Label.GenerateCommunicationCandidatureAdmissionLabel"];this.communicationGridTitle=this.svc.locale.key["Communications.Label.CandidatureAdmissionGridTitle"];break;case 2:this.generateCommunicationLabel=this.svc.locale.key["Communications.Label.GenerateCommunicationCandidatureRejectionLabel"];this.communicationGridTitle=this.svc.locale.key["Communications.Label.CandidatureRejectionGridTitle"];break;case 3:this.generateCommunicationLabel=this.svc.locale.key["Communications.Label.GenerateCommunicationDesignatedWinningBidLabel"];this.communicationGridTitle=this.svc.locale.key["Communications.Label.DesignatedWinningBidGridTitle"];break;case 4:this.generateCommunicationLabel=this.svc.locale.key["Communications.Label.GenerateCommunicationDesignatedWinningBidLabel"];this.communicationGridTitle=this.svc.locale.key["Communications.Label.AdmissibleButNotWinningBidGridTitle"];break;case 5:this.generateCommunicationLabel=this.svc.locale.key["Communications.Label.GenerateCommunicationCandidatureRejectionLabel"];this.communicationGridTitle=this.svc.locale.key["Communications.Label.OfferRejectedGridTitle"]}this.gridIsEmpty=n.length>0?!1:!0;this.setGridColumns();this.$timeout(function(){t.gridCommunications.dataSource.data(n)})},n.prototype.generateCommunications=function(){var n=this;this.svc.isLoading=!0;this.api.COMMON.generateCommunications(this.procedureId,this.sysCommunicationTypeId,this.isRegenerating).then(function(t){t?t.hasError||(n.svc.modalService.showSuccessMessages(n.svc.locale.key["Communications.Label.CommunicationsGenerated"]),n.closeGeneratorWindow()):n.svc.modalService.showErrorMessage(t.responseMessage)}).finally(function(){n.svc.isLoading=!1})},n.prototype.closeGeneratorWindow=function(){this.$rootScope.$broadcast("closeCommGenerator")},n.prototype.setGridColumns=function(){switch(this.sysCommunicationTypeId){case 1:this.gridCommunicationsColumns=this.hasLots?[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"admittedCandidates",title:this.svc.locale.key["Communications.Label.AdmittedCandidatesGridHeader"],width:200,template:"{{dataItem.admittedCandidates}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}]:[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"admittedCandidates",title:this.svc.locale.key["Communications.Label.AdmittedCandidatesGridHeader"],width:200,template:"{{dataItem.admittedCandidates}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}];break;case 2:this.gridCommunicationsColumns=this.hasLots?[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rejectedCandidate",title:this.svc.locale.key["Communications.Label.RejectedCandidateGridHeader"],width:200,template:"{{dataItem.rejectedCandidate}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}]:[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"rejectedCandidate",title:this.svc.locale.key["Communications.Label.RejectedCandidateGridHeader"],width:200,template:"{{dataItem.rejectedCandidate}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}];break;case 3:this.gridCommunicationsColumns=this.hasLots?[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:20,template:"{{dataItem.lotNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:'<div ng-repeat="item in dataItem.ranks track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"winner",title:this.svc.locale.key["Communications.Label.WinnerGridHeader"],width:180,template:'<div ng-repeat="item in dataItem.winners track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"<div ng-repeat=\"item in dataItem.offerDates track by $index\"><span>{{item | date: 'dd.MM.yyyy'}}<\/span><br><\/div>"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.offerPrices track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.lifecycleCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalScores track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span ng-if=\"!item.hasRankingCriteria\">-<\/span><span ng-if=\"item.hasRankingCriteria\" kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}]:[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:'<div ng-repeat="item in dataItem.ranks track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"winner",title:this.svc.locale.key["Communications.Label.WinnerGridHeader"],width:180,template:'<div ng-repeat="item in dataItem.winners track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"<div ng-repeat=\"item in dataItem.offerDates track by $index\"><span>{{item | date: 'dd.MM.yyyy'}}<\/span><br><\/div>"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.offerPrices track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.lifecycleCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalScores track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span ng-if=\"!item.hasRankingCriteria\">-<\/span><span ng-if=\"item.hasRankingCriteria\" kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}];break;case 4:this.gridCommunicationsColumns=this.hasLots?[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:"{{dataItem.rank}}"},{field:"loser",title:this.svc.locale.key["Communications.Label.LoserGridHeader"],width:180,template:"{{dataItem.loser}}"},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"{{dataItem.offerDate ? (dataItem.offerDate | date: 'dd.MM.yyyy') : '-'}}"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:"{{dataItem.offerPrice ? dataItem.offerPrice : '-'}}"},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:"{{dataItem.lifeCycleCost ? dataItem.lifeCycleCost : '-'}}"},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:"{{dataItem.totalCost ? dataItem.totalCost : '-'}}"},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:"{{dataItem.totalScore ? dataItem.totalScore : '-'}}"},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}]:[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:"{{dataItem.rank}}"},{field:"loser",title:this.svc.locale.key["Communications.Label.LoserGridHeader"],width:180,template:"{{dataItem.loser}}"},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"{{dataItem.offerDate ? (dataItem.offerDate | date: 'dd.MM.yyyy') : '-'}}"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:"{{dataItem.offerPrice ? dataItem.offerPrice : '-'}}"},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:"{{dataItem.lifeCycleCost ? dataItem.lifeCycleCost : '-'}}"},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:"{{dataItem.totalCost ? dataItem.totalCost : '-'}}"},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:"{{dataItem.totalScore ? dataItem.totalScore : '-'}}"},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}];break;case 5:this.gridCommunicationsColumns=this.hasLots?[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rejectedSupplier",title:this.svc.locale.key["Communications.Label.RejectedSupplierGridHeader"],width:200,template:"{{dataItem.rejectedSupplier}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}]:[{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"rejectedSupplier",title:this.svc.locale.key["Communications.Label.RejectedSupplierGridHeader"],width:200,template:"{{dataItem.rejectedSupplier}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date: 'dd.MM.yyyy'}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date: 'dd.MM.yyyy'}}"}]}this.gridCommunicationsOptions.columns=this.gridCommunicationsColumns},n.$inject=["$scope","svc","CommunicationApi","$rootScope","$routeParams","$timeout"],n}();n.GenerateCommunicationController=t;angular.module("app.controls").directive("generateCommunication",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/communications/ca/generate-communication/generate-communication",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e){var o=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.$routeParams=u;this.$timeout=f;this.uploadService=e;this.filter={pageSize:5};this.listItems=[];this.filterLots=[];this.selectedSysCommunicationType={id:1};this.pageSize=5;this.allCommunicationIds=[];this.selectedCommunicationIds=[];this.iAgree=!1;this.gridCommunicationsOptions={dataSource:{data:[]},autobind:!1,height:220,columns:[]};n.vm=this;this.procedureId=u.idProcedure;this.setValidPageSizes();this.publishInfo=t.locale.key["Communications.Info.PublicationInfo"].split("@SelectedCommunications");this.$rootScope.$$listeners.openPublishWindow=[];this.$rootScope.$on("openPublishWindow",function(){o.iAgree=!1;o.selectedCommunicationIds=[];o.svc.isLoading=!0;o.api.COMMON.getFilterLotNumbers(o.procedureId).then(function(n){o.filterLots=[];n.length>0&&(o.filterLots.push({id:null,text:""}),o.filterLots=o.filterLots.concat(n),o.selectedLot=o.filterLots[0]);o.getCommunicationsToPublish(!0)}).finally(function(){o.svc.isLoading=!1})})}return n.prototype.getCommunicationsToPublish=function(){var n=this,t;this.svc.isLoading=!0;this.setGridColumns();t={pageSize:this.pageSize,pageIndex:this.currentPage,procedureId:this.procedureId,lotNumber:this.selectedLot?this.selectedLot.text:"",sysCommunicationTypeId:this.selectedSysCommunicationType.id};this.api.COMMON.getCommunicationsToPublish(t).then(function(t){n.hasLots=t.hasLots;n.listItems=t.items;n.setGridColumns();n.totalPages=Math.ceil(t.total/n.pageSize);n.totalResults=t.total;n.allCommunicationIds=t.allCommunicationIds;n.$timeout(function(){n.gridCommunications.dataSource.data(t.communicationsList)})}).finally(function(){n.svc.isLoading=!1})},n.prototype.closePublishWindow=function(){this.$rootScope.$broadcast("closePublishWindow")},n.prototype.addCommunicationToSelection=function(n){this.selectedCommunicationIds&&this.selectedCommunicationIds.indexOf(n)>-1?this.selectedCommunicationIds.splice(this.selectedCommunicationIds.indexOf(n),1):this.selectedCommunicationIds.push(n)},n.prototype.selectAllCommunications=function(){this.selectedCommunicationIds=this.allCommunicationIds},n.prototype.unselectAllCommunications=function(){this.selectedCommunicationIds=[]},n.prototype.publishCommunications=function(){var n=this;this.svc.isLoading=!0;this.api.COMMON.publishCommunications(this.selectedCommunicationIds).then(function(t){t.hasError||(n.svc.modalService.showSuccessMessages(n.svc.locale.key["Communications.Info.CommunicationsPublishedInfo"]),n.closePublishWindow())}).finally(function(){n.svc.isLoading=!1})},n.prototype.setGridColumns=function(){var n=+this.selectedSysCommunicationType.id;switch(n){case 1:this.windowTitle=this.svc.locale.key["Communications.Label.CandidatureAdmissionGridTitle"];this.gridCommunicationsColumns=this.hasLots?[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"admittedCandidates",title:this.svc.locale.key["Communications.Label.AdmittedCandidatesGridHeader"],width:200,template:"{{dataItem.admittedCandidates}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}]:[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"admittedCandidates",title:this.svc.locale.key["Communications.Label.AdmittedCandidatesGridHeader"],width:200,template:"{{dataItem.admittedCandidates}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}];break;case 2:this.windowTitle=this.svc.locale.key["Communications.Label.CandidatureRejectionGridTitle"];this.gridCommunicationsColumns=this.hasLots?[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rejectedCandidate",title:this.svc.locale.key["Communications.Label.RejectedCandidateGridHeader"],width:200,template:"{{dataItem.rejectedCandidate}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}]:[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"rejectedCandidate",title:this.svc.locale.key["Communications.Label.RejectedCandidateGridHeader"],width:200,template:"{{dataItem.rejectedCandidate}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}];break;case 3:this.windowTitle=this.svc.locale.key["Communications.Label.DesignatedWinningBidGridTitle"];this.gridCommunicationsColumns=this.hasLots?[{field:"select",title:"Selectie",width:20,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:20,template:"{{dataItem.lotNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:'<div ng-repeat="item in dataItem.ranks track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"winner",title:this.svc.locale.key["Communications.Label.WinnerGridHeader"],width:180,template:'<div ng-repeat="item in dataItem.winners track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"<div ng-repeat=\"item in dataItem.offerDates track by $index\"><span>{{item | date: 'dd.MM.yyyy'}}<\/span><br><\/div>"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.offerPrices track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.lifecycleCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalScores track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span ng-if=\"!item.hasRankingCriteria\">-<\/span><span ng-if=\"item.hasRankingCriteria\" kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}]:[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:'<div ng-repeat="item in dataItem.ranks track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"winner",title:this.svc.locale.key["Communications.Label.WinnerGridHeader"],width:180,template:'<div ng-repeat="item in dataItem.winners track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"<div ng-repeat=\"item in dataItem.offerDates track by $index\"><span>{{item | date: 'dd.MM.yyyy'}}<\/span><br><\/div>"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.offerPrices track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.lifecycleCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalCosts track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:'<div ng-repeat="item in dataItem.totalScores track by $index"><span>{{item}}<\/span><br><\/div>'},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span ng-if=\"!item.hasRankingCriteria\">-<\/span><span ng-if=\"item.hasRankingCriteria\" kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}];break;case 4:this.windowTitle=this.svc.locale.key["Communications.Label.AdmissibleButNotWinningBidGridTitle"];this.gridCommunicationsColumns=this.hasLots?[{field:"select",title:"Selectie",width:20,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:"{{dataItem.rank}}"},{field:"loser",title:this.svc.locale.key["Communications.Label.LoserGridHeader"],width:180,template:"{{dataItem.loser}}"},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"{{dataItem.offerDate ? (dataItem.offerDate | date: 'dd.MM.yyyy') : '-'}}"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:"{{dataItem.offerPrice ? dataItem.offerPrice : '-'}}"},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:"{{dataItem.lifeCycleCost ? dataItem.lifeCycleCost : '-'}}"},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:"{{dataItem.totalCost ? dataItem.totalCost : '-'}}"},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:"{{dataItem.totalScore ? dataItem.totalScore : '-'}}"},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}]:[{field:"select",title:"Selectie",width:20,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:20,template:"{{dataItem.crtNo}}"},{field:"rank",title:this.svc.locale.key["Communications.Label.RankGridHeader"],width:30,template:"{{dataItem.rank}}"},{field:"loser",title:this.svc.locale.key["Communications.Label.LoserGridHeader"],width:180,template:"{{dataItem.loser}}"},{field:"offerDate",title:this.svc.locale.key["Communications.Label.OfferDateGridHeader"],width:60,template:"{{dataItem.offerDate ? (dataItem.offerDate | date: 'dd.MM.yyyy') : '-'}}"},{field:"offerPrice",title:this.svc.locale.key["Communications.Label.OfferPriceGridHeader"],width:40,template:"{{dataItem.offerPrice ? dataItem.offerPrice : '-'}}"},{field:"lifeCycleCost",title:this.svc.locale.key["Communications.Label.LifecycleCostGridHeader"],width:40,template:"{{dataItem.lifeCycleCost ? dataItem.lifeCycleCost : '-'}}"},{field:"totalCost",title:this.svc.locale.key["Communications.Label.TotalCostGridHeader"],width:40,template:"{{dataItem.totalCost ? dataItem.totalCost : '-'}}"},{field:"totalScore",title:this.svc.locale.key["Communications.Label.TotalScoreGridHeader"],width:40,template:"{{dataItem.totalScore ? dataItem.totalScore : '-'}}"},{field:"rankingCriteria",title:this.svc.locale.key["Communications.Label.RankingCriteriaLabel"],width:30,template:"<div ng-repeat=\"item in dataItem.rankingCriterias track by $index\"><span kendo-tooltip k-content=\"item.rankingCriteriaName + '<br>' + vm.svc.locale.key['NoticeCommon.Label.Weight'] + ': ' + item.rankingCriteriaWeight + '%<br>' + vm.svc.locale.key['Procedure.Label.Score'] + ': ' + item.rankingCriteriaScore\" k-position=\"'top'\"><i class=\"fa fa-eye\"><\/i><\/span><br><\/div>"}];break;case 5:this.windowTitle=this.svc.locale.key["Communications.Label.OfferRejectedGridTitle"];this.gridCommunicationsColumns=this.hasLots?[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"lotNo",title:this.svc.locale.key["Communications.Label.LotNoGridHeader"],width:30,template:"{{dataItem.lotNo}}"},{field:"rejectedSupplier",title:this.svc.locale.key["Communications.Label.RejectedSupplierGridHeader"],width:200,template:"{{dataItem.rejectedSupplier}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}]:[{field:"select",title:"Selectie",width:30,template:'<input type="checkbox" ng-model="vm.selectedCommunicationIds.indexOf(dataItem.communicationId) > -1" ng-click="vm.addCommunicationToSelection(dataItem.communicationId) " style="vertical - align: bottom;">'},{field:"crtNo",title:this.svc.locale.key["Communications.Label.CrtNoGridHeader"],width:30,template:"{{dataItem.crtNo}}"},{field:"rejectedSupplier",title:this.svc.locale.key["Communications.Label.RejectedSupplierGridHeader"],width:200,template:"{{dataItem.rejectedSupplier}}"},{field:"offerDeadline",title:this.svc.locale.key["Communications.Label.ReceiptDeadlineGridHeader"],width:100,template:"{{ dataItem.offerDeadline | date}}"},{field:"availabilityDeadline",title:this.svc.locale.key["Communications.Label.AvailabilityDeadlineGridHeader"],width:100,template:"{{ dataItem.availabilityDeadline | date}}"}]}this.gridCommunicationsOptions.columns=this.gridCommunicationsColumns},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.getCommunicationsToPublish(!1))},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["$scope","svc","CommunicationApi","$rootScope","$routeParams","$timeout","uploadService"],n}();n.PublishCommunicationsController=t;angular.module("app.controls").directive("publishCommunications",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/communications/ca/publish-communications/publish-communications",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api/Communication"}return __extends(t,n),t.prototype.getCommunicationsToGenerate=function(n,t,i){return this.GET(this.api+"/GetCommunicationsToGenerate/",{procedureId:n,sysCommunicationTypeId:t,isRegenerating:i})},t.prototype.generateCommunications=function(n,t,i){return this.GET(this.api+"/GenerateCommunications/",{procedureId:n,sysCommunicationTypeId:t,isRegenerating:i})},t.prototype.removeCommunications=function(n,t){return this.GET(this.api+"/RemoveCommunications/",{procedureId:n,sysCommunicationTypeId:t})},t.prototype.getCommunicationList=function(n){return this.POST(this.api+"/GetCommunicationList/",n)},t.prototype.getProcedureInfo=function(n){return this.GET(this.api+"/GetProcedureInfo/",{procedureId:n})},t.prototype.getProcedureLotNumber=function(n){return this.GET(this.api+"/GetProcedureLotNumber/",{procedureLotId:n})},t.prototype.getFilterLotNumbers=function(n){return this.GET(this.api+"/GetFilterLotNumbers/",{procedureId:n})},t.prototype.getFilterSuppliers=function(n,t){return this.GET(this.api+"/GetFilterSuppliers/",{procedureId:n,procedureLotId:t})},t.prototype.getCommunicationModel=function(n){return this.GET(this.api+"/GetCommunicationModel/",{communicationId:n})},t.prototype.saveCommunicationModel=function(n){return this.POST(this.api+"/SaveCommunicationModel/",n)},t.prototype.getCommunicationsToPublish=function(n){return this.POST(this.api+"/GetCommunicationsToPublish/",n)},t.prototype.publishCommunications=function(n){return this.POST(this.api+"/PublishCommunications/",n)},t.prototype.deleteCommunication=function(n){return this.GET(this.api+"/DeleteCommunication/",{communicationId:n})},t.prototype.getProcedureContractAssigmType=function(n){return this.GET(this.api+"/GetProcedureContractAssigmType/",{procedureId:n})},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"COMMON",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.CommunicationApi=t;angular.module("app.controls").service("CommunicationApi",t)})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i){var r=this,u;this.svc=n;this.api=t;this.$scope=i;this.selectedAuthorityAddresses=[];this.listItems=[];this.includedAddressTypes=[21];this.totalResults=0;this.validPageSizes=[5,10,25,50,100];i.vm=this;this.isEdit=i.isEdit;this.noticeId=i.noticeId;this.initNoticeId=i.initNoticeId;this.sysNoticeTypeId=i.sysNoticeTypeId;this.includeMainAddress=i.includeMainAddress;this.showAddSection=i.showAddSection;u=this;!this.noticeId||this.noticeId<1?t.Common.getNoticeIdFromSpecializedNoticeId(u.initNoticeId,u.sysNoticeTypeId).then(function(n){r.noticeId=n;r.isEdit==undefined&&t.Common.canAddAddress(r.noticeId).then(function(n){n&&(r.isEdit=n)});r.init()}):this.init();this.$scope.$watch(function(){return r.selectedAuthority},function(){r.updateAddressSelector()})}return n.prototype.init=function(){this.includeMainAddress&&this.includedAddressTypes.push(1);this.search()},n.prototype.search=function(){var t=this,n;this.pageSize||(this.pageSize=5);n={noticeId:this.noticeId,includedAddressTypes:this.includedAddressTypes,pageIndex:this.currentPage,pageSize:this.pageSize};this.selectedFilterContractingAuthority&&this.selectedFilterContractingAuthority.id>0&&(n.contractingAuthorityId=this.selectedFilterContractingAuthority.id,n.pageIndex=0);this.svc.isLoading=!0;this.api.Section1.getAcAddressList(n).then(function(i){t.listItems=i.addressList;t.totalPages=Math.ceil(i.total/n.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.resetFilter=function(){this.selectedFilterContractingAuthority=null;this.search()},n.prototype.updateAddressSelector=function(){var n=this;this.selectedAuthority&&this.selectedAuthority.id>0&&(this.svc.isLoading=!0,this.api.Section1.getEntityAddressList(this.selectedAuthority.id).then(function(t){t.hasError||(n.selectedAuthorityAddresses=t.addressList,n.selectedAuthorityAddress=t.addressList[0])}).finally(function(){n.svc.isLoading=!1}))},n.prototype.addSelectedAddressToList=function(){var n=this,t;this.selectedAuthorityAddress&&this.selectedAuthorityAddress.addressId>0&&(t={noticeId:this.noticeId,sysAddressTypeId:this.selectedAuthorityAddress.sysAddressTypeId,entityId:this.selectedAuthority.id},this.selectedBuyerLegalType&&(t.sysBuyerLegalType=this.selectedBuyerLegalType.id),this.svc.isLoading=!0,this.api.Section1.addAdditionalCaAddress(t).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(t.responseMessage);return}n.svc.modalService.showSuccessMessages(n.svc.locale.key["NoticeCommon.Info.CaAddressSavedSuccessfully"]);n.selectedAuthority=null;n.selectedAuthorityAddresses=[];n.selectedAuthorityAddress=null;n.search()}).finally(function(){n.svc.isLoading=!1}))},n.prototype.removeAddressFromList=function(n){var t=this;this.svc.isLoading=!0;this.api.Section1.removeAdditionalCaAddress(n).then(function(n){n.hasError||t.search()}).finally(function(){t.svc.isLoading=!1})},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeCommonApi","$scope"],n}();n.Section1AdditionalCaList=t;angular.module("app.controls").directive("s1AdditionalCaList",function(){return{restrict:"E",replace:!0,scope:{isEdit:"@",noticeId:"@",initNoticeId:"@",sysNoticeTypeId:"@",includeMainAddress:"@",showAddSection:"@"},templateUrl:"template/common/notices/common/s1-additional-ca-list/s1-additional-ca-list",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.item={};this.datePickerOptions={format:"dd/MM/yyyy",culture:"ro-RO",parseFormats:["yyyy-MM-ddTHH:mm:sszzz"]};this.canAddStatement=!1;this.isOnline=!0;this.avizModel={};this.files=[];this.docFileExtension="doc,pdf,docx,p7s,p7m";this.docMaxSize=this.svc.configService.cfg.DocumentMaxSize;this.uploadAvizDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.avizModel.fileModel=t;$("#uploadAvizDoc").val("")},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};this.modifiedAviz={};this.uploaModifydAvizDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.modifiedAviz={fileModel:t}},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};this.showViewEditAviz=!1;this.showViewAviz=!1;this.showEditAviz=!1;this.avizViewEdit=[];this.isForConciliation=!1;n.vm=this;this.procedureId=n.procedureId;this.idProcedureLot=n.idProcedureLot;this.sadId=n.sadId;this.isSad=n.isSad;this.isOnline=n.isOnline;this.isSad||this.bind(this.procedureId,this.idProcedureLot);this.canAddStatement=n.canAddStatement;r.$on("saveProcedurePvRep",function(){f.procedurePvReportsEditWindow.close();f.search()});r.$on("closeProcedurePvRepEditWindow",function(){f.procedurePvReportsEditWindow.close()});this.init()}return n.prototype.init=function(){this.filter={sortProperty:"transmissionDate",pageSize:5,pageIndex:0,initNoticeId:null,sysNoticeTypeId:null,procedureId:this.procedureId,sysNoticeDocumentState:null,sysNoticeDocumentType:null,sysValidationDocType:null,noticeDocumentPostDateFrom:null,noticeDocumentPostDateTo:null,sortProperties:null,sadId:this.sadId};this.isListLoading=!1;this.setValidPageSizes();this.search()},n.prototype.addProcedurePvReportsDocument=function(){this.procedurePvReportsEditWindow.center().open();this.$rootScope.$broadcast("addProcedurePvReportsDocument")},n.prototype.openFileInput=function(){angular.element("#uploadAvizDoc").click()},n.prototype.openModifyFileInput=function(){angular.element("#uploaModifydAvizDoc").click()},n.prototype.deleteDocument=function(){this.avizModel.fileModel=null},n.prototype.deleteModifyDoc=function(){this.modifiedAviz.fileModel=null},n.prototype.addAvizDocument=function(){var n=this;this.avizModel.initNoticeId=this.initialNoticeId;this.avizModel.sysNoticeTypeId=this.sysNoticeTypeId;this.avizModel.noticeDocumentId=this.noticeDocumentId;this.avizModel.procedureId=this.procedureId;this.avizModel.sadId=this.sadId;this.validationMessage2=this.svc.userService.culture=="ro-RO"?"Va rugam confirmati actiunea!":"Please confirm action!";this.avizModel.sysValidationDocType!=null&&this.avizModel.sysValidationDocType.id==2&&(this.validationMessage1=this.svc.userService.culture=="ro-RO"?"Atentie! Avizul conform conditionat implica respingerea documentului transmis de autoritatea contractanta spre validare! Autoritatea contractanta va putea fie sa modifice documentul si sa-l publice, fie sa-l publice fara nici o modificare.":"Attention! The conditional approval implies the rejection of the document sent by the contracting authority for validation! The contracting authority may either amend the document and publish it, or publish it without modification.");this.avizModel.sysValidationDocType!=null&&this.avizModel.sysValidationDocType.id==1&&(this.validationMessage1=this.svc.userService.culture=="ro-RO"?"Atentie! Avizul conform neconditionat implica publicarea automata a documentului. Nu veti mai putea emite un alt aviz pentru acesta.":"Attention! The unconditional approval implies automatic publication of the document. You will not be able to emit another approval for this.");this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],this.validationMessage1,"",this.validationMessage2).then(function(t){t&&(n.svc.isLoading=!0,n.isForConciliation==!0?n.api.Common.addConciliation(n.avizModel).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.showAddAviz=!1;n.avizModel=null;n.search()},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}):n.api.Common.addAvizDocument(n.avizModel).then(function(){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.showAddAviz=!1;n.avizModel=null;n.search()},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})},n.prototype.modifyAvizAndPublish=function(n){var t=this,i,r;n!=null&&(n.comment!=null&&(this.modifiedAviz.comment=n.comment),n.newDocumentName!=null&&(this.modifiedAviz.newDocumentName=n.newDocumentName),n.noticeDocumentId!=null&&(this.modifiedAviz.noticeDocumentId=n.noticeDocumentId),n.sysValidationDocType!=null&&(this.modifiedAviz.sysValidationDocType=n.sysValidationDocType),n.sysNoticeDocumentType!=null&&(this.modifiedAviz.sysNoticeDocumentType=n.sysNoticeDocumentType),this.modifiedAviz.initNoticeId=this.initialNoticeId,this.modifiedAviz.sadId=this.sadId,i=this.svc.userService.culture=="ro-RO"?"Atentie! Va rugam sa va asigurati ca ati inclus toate observatiile primite prin avizul conform conditionat. Documentul se va publica imediat fara a mai fi retrimis la ANAP pentru revalidare.":"Attention! Please make sure that you included all of the observations received through conditional notice. The document will be published immediately without being sent back to ANAP for revalidation.",r=this.svc.userService.culture=="ro-RO"?"Va rugam confirmati publicarea!":"Please confirm publication!",this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],i,"",r).then(function(n){n&&(t.svc.isLoading=!0,t.api.Common.modifyAndPublishDoc(t.modifiedAviz).then(function(n){n==1&&(t.svc.modalService.showSuccessMessages(t.svc.locale.key["Common.Info.SavedSuccessfully"]),t.showViewEditAviz=!1,t.showEditAviz=!1,t.showViewAviz=!1,t.modifiedAviz=null,t.search())},function(n){t.svc.modalService.showValidationResult(n)}).finally(function(){t.svc.isLoading=!1}))}))},n.prototype.publishWithoutModif=function(n){var t=this,i,r;n!=null&&(this.modifiedAviz=n,this.modifiedAviz.initNoticeId=this.initialNoticeId,n.sysNoticeDocumentType!=null&&(this.modifiedAviz.sysNoticeDocumentType=n.sysNoticeDocumentType),i=this.svc.userService.culture=="ro-RO"?"Atentie! Intrucat ati primit aviz conform conditionat va recomandam sa tineti seama de observatiile ANAP, in caz contrar va asumati riscurile care decurg din prevederile legale!":"Attention! As you have received a conditional notice, we recommend that you take into account the observations of ANAP, otherwise you assume the risks arising from the legal provisions!",r=this.svc.userService.culture=="ro-RO"?"Sunteti sigur ca doriti publicarea documentului fara nici o modificare?":"Are you sure you want to publish the document without any changes?",this.svc.modalService.confirmCustomExAnte(this.locale.key["Common.Info.Info"],i,"",r).then(function(n){n&&(t.svc.isLoading=!0,t.api.Common.publishWithoutModifDoc(t.modifiedAviz).then(function(n){n==1&&(t.svc.modalService.showSuccessMessages(t.svc.locale.key["Common.Info.SavedSuccessfully"]),t.search())},function(n){t.svc.modalService.showValidationResult(n)}).finally(function(){t.svc.isLoading=!1}))}))},n.prototype.viewAviz=function(n){this.showViewEditAviz=!0;this.showViewAviz=!0;this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.avizViewEdit=n.approvalList;this.buildAvizTitleWidget()},n.prototype.cancelViewEdit=function(){this.showViewEditAviz=!1;this.showViewAviz=!1;this.showEditAviz=!1;this.modifiedAviz=null;this.avizViewEdit=[]},n.prototype.editAviz=function(n){this.showViewEditAviz=!0;this.showEditAviz=!0;this.widgetTitle=this.svc.userService.culture=="ro-RO"?"Adaugare clarificare/decizie ca urmare a respingerii":"Add clarification / decision following rejection";this.avizViewEdit.push(n)},n.prototype.cancelAddAviz=function(){this.showAddAviz=!1;this.isForConciliation=!1;this.avizModel=null},n.prototype.appendLeadingZeroes=function(n){return n<=9?"0"+n:n},n.prototype.addConciliation=function(n){this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.buildAvizTitleWidget();this.showAddAviz=!0;this.isForConciliation=!0},n.prototype.addAvizNoticeDocument=function(n){this.sysNoticeDocumentType=n.sysNoticeDocumentType;this.noticeDocumentId=n.noticeDocumentId;var t=new Date(n.noticeDocumentPostDate);this.caPublicationDate=this.appendLeadingZeroes(t.getDate())+"."+this.appendLeadingZeroes(t.getMonth()+1)+"."+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes();this.buildAvizTitleWidget();this.showAddAviz=!0;this.isForConciliation=!1},n.prototype.buildAvizTitleWidget=function(){this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en";this.widgetTitle=this.lang=="ro"?"Validare ex-ante "+this.sysNoticeDocumentType+" transmis in data de "+this.caPublicationDate:"Ex ante validation for "+this.sysNoticeDocumentType+" sent on "+this.caPublicationDate},n.prototype.search=function(){var t=this,n=this,i;this.selectedNoticeDocumentType!=null&&(this.filter.sysNoticeDocumentType=this.selectedNoticeDocumentType);this.selectedNoticeDocumentState!=null&&(this.filter.sysNoticeDocumentState=this.selectedNoticeDocumentState);this.selectedValidationDocType!=null&&(this.filter.sysValidationDocType=this.selectedValidationDocType);i=JSON.stringify({initNoticeId:n.filter.initNoticeId,sysNoticeTypeId:n.filter.sysNoticeTypeId,sysNoticeDocumentType:n.filter.sysNoticeDocumentType,sysNoticeDocumentState:n.filter.sysNoticeDocumentState,sysValidationDocType:n.filter.sysValidationDocType,noticeDocumentPostDateFrom:n.filter.noticeDocumentPostDateFrom,noticeDocumentPostDateTo:n.filter.noticeDocumentPostDateTo});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getAll(this.filter).then(function(i){t.itemList=i.items;t.canAddCa=i.canAddCa;t.canAddAnap=i.canAddAnap;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.searchNoticeDocuments=function(){this.filter.pageIndex=0;this.currentPage=0;this.search()},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.resetFilter=function(){this.filter.sysNoticeDocumentType=null;this.selectedNoticeDocumentType=null;this.filter.sysNoticeDocumentState=null;this.selectedNoticeDocumentState=null;this.filter.sysValidationDocType=null;this.selectedValidationDocType=null;this.filter.noticeDocumentPostDateFrom=null;this.filter.noticeDocumentPostDateTo=null;this.search()},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.prototype.bind=function(n,t){var i=this,r;this.svc.isLoading=!0;r=this;this.api.Common.GetPUBLICProcedureView(n,t).then(function(n){r.item=n},function(n){i.svc.log.info("bind error:"+n)}).finally(function(){i.svc.isLoading=!1})},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.ProcedurePvReportsController=t;angular.module("app.controls").directive("procedurePvReportsList",function(){return{restrict:"E",replace:!0,scope:{procedureId:"=",sadId:"=",canAddStatement:"=",isOnline:"=",isSad:"="},templateUrl:"template/common/procedures/procedure-pv-reports/list/list",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.model={procedureLotQuestions:[]};this.sysNoticeDocumentDecisionTypes=[];this.files=[];this.docFileExtension="doc,pdf,docx,p7s,p7m";this.docMaxSize=this.svc.configService.cfg.DocumentMaxSize;this.validationField=!1;this.procedureDocuments=[];this.popUpMessageForCnsdResp="";this.uploadDoc=function(n){var t=f.docFileExtension.split(",");f.svc.modalService.checkUploadedFiles(n,t,f.docMaxSize,f.svc.uploadService,f.svc.locale)&&(f.svc.isLoading=!0,f.svc.uploadService.uploadFile(n[0]).then(function(n){var t={fileName:n.filename,fileSize:n.size,fileUrl:n.url};f.model.fileModel=t},function(n){f.svc.log.error(f.svc.locale.key["Common.Info.UploadError"]+": "+n);f.svc.modalService.showValidationResult(n)}).finally(function(){f.svc.isLoading=!1}))};console.log("controller edit");r.$on("addProcedurePvReportsDocument",function(){f.init()});this.locale.loadModule(140)}return n.prototype.init=function(){var n=this;this.procedureDocuments=[];this.validationField=null;this.model={};this.$scope.vm=this;this.procId=this.$scope.procId;this.isOnline=this.$scope.isOnline;this.isSad=this.$scope.isSad;this.sadId=this.$scope.sadId;this.isSad||this.api.Common.noticeInfoForProcedure(this.procId).then(function(t){t&&(n.initNoticeId=t.initNoticeId,n.noticeTypeId=t.sysNoticeTypeId,n.filter={sortProperty:"QuestionDate",pageSize:5,descending:!1,initNoticeId:n.initNoticeId,sysNoticeTypeId:n.noticeTypeId},n.search())});this.svc.ComboApi.getSysNoticeDocumentDecisionType().then(function(t){n.sysNoticeDocumentDecisionTypes=n.sysNoticeDocumentDecisionTypes.concat(t.results)});this.svc.ComboApi.getProcedureDocuments(this.procId).then(function(t){n.procedureDocuments=n.procedureDocuments.concat(t)})},n.prototype.isSelected=function(n){return this.model.procedureLotQuestions.indexOf(n)>-1},n.prototype.changeQuestionState=function(n){this.model.procedureLotQuestions||(this.model.procedureLotQuestions=[]);this.model.procedureLotQuestions.indexOf(n)>-1?this.model.procedureLotQuestions.splice(this.model.procedureLotQuestions.indexOf(n),1):this.model.procedureLotQuestions.push(n)},n.prototype.saveNoticeDocument=function(){var n=this;if(!this.validateInformation()){this.validationField=!0;return}this.model.initNoticeId=this.initNoticeId;this.model.sysNoticeTypeId=this.noticeTypeId;this.model.sadId=this.sadId;this.api.Common.needsValidation(this.model).then(function(t){n.exAnteValidation=t}).finally(function(){n.exAnteValidation!=null&&n.exAnteValidation.needsValidation?(n.popUpMessageNotForCnsdResp=n.exAnteValidation.popUpMessageNotForCnsdResp,n.confirmMessage=n.exAnteValidation.confirmMessage,n.model.sysNoticeDocumentType!=null&&n.model.sysNoticeDocumentType.id==31,n.svc.modalService.confirmCustomExAnte(n.locale.key["Common.Info.Info"],n.popUpMessageNotForCnsdResp,n.popUpMessageForCnsdResp,n.confirmMessage).then(function(t){t&&(n.svc.isLoading=!0,n.api.Common.saveNoticeDocument(n.model).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeDocumentView.Validation.ErrorSavingDocument"]);return}n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.$rootScope.$broadcast("saveProcedurePvRep")},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})):(n.svc.isLoading=!0,n.api.Common.saveNoticeDocument(n.model).then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(n.svc.locale.key["NoticeDocumentView.Validation.ErrorSavingDocument"]);return}n.svc.modalService.showSuccessMessages(n.svc.locale.key["Common.Info.SavedSuccessfully"]);n.$rootScope.$broadcast("saveProcedurePvRep")},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1}))})},n.prototype.buildPopUpMessage=function(){var n='Intrucat procedura a fost selectata pentru verificare ex-ante este necesar sa obtineti avizul conform emis de ANAP inainte de a putea publica tipul de document:<span style="font-size:14px;font-weight:bold;color:black">'+this.model.sysNoticeDocumentType.text+".<\/span"},n.prototype.validateInformation=function(){return!this.model.noticeDocumentName||this.model.noticeDocumentName.trim()==""?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.NoticeDocumentName_NotEmpty"]),!1):this.model.sysNoticeDocumentType==null||this.model.sysNoticeDocumentType.id<1?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.SysNoticeDocumentType_NotEmpty"]),!1):this.model.sysNoticeDocumentType&&(this.svc.userService.currentUserIsMon()&&this.model.sysNoticeDocumentType.id==11||this.svc.userService.currentUserIsCa()&&(this.model.sysNoticeDocumentType.id==8||this.model.sysNoticeDocumentType.id==26))&&(this.model.sysNoticeDocumentDecisionType==null||this.model.sysNoticeDocumentDecisionType.id<1)?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.SysNoticeDocumentDecisionType_NotEmpty"]),!1):this.model.sysNoticeDocumentType&&(this.model.sysNoticeDocumentType.id==8||this.model.sysNoticeDocumentType.id==26||this.model.sysNoticeDocumentType.id==11)&&!this.model.fileModel?(this.svc.modalService.showErrorMessage(this.svc.locale.key["NoticeDocumentView.Validation.AttachedDocumentNotSupplied"]),!1):!0},n.prototype.search=function(){var t=this,n=this,i=JSON.stringify({initNoticeId:n.filter.initNoticeId,sysNoticeTypeId:n.filter.sysNoticeTypeId});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getProcedureLotQuestions(this.filter).then(function(i){t.questionList=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize)}).finally(function(){t.svc.isLoading=!1})},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.openFileInputPv=function(){angular.element("#uploadDocPv").click()},n.prototype.deleteDocument=function(){this.model.fileModel=null},n.prototype.cancel=function(){console.log("controller edit cancel");this.$rootScope.$broadcast("closeProcedurePvRepEditWindow")},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.prototype.onSysDocumentTypeChange=function(){var n=this,t=n.svc.locale.isCurrentLanguageRomanian();if(n.model.sysNoticeDocumentType){n.docTypeId=String(n.model.sysNoticeDocumentType.id);switch(n.docTypeId){case"32":n.visibilityAfterPublishMessage=n.svc.locale.key["NoticeDocumentView.Validation.CATIIIMessage"];break;case"33":n.visibilityAfterPublishMessage=n.svc.locale.key["NoticeDocumentView.Validation.CATIIIMessage"];break;case"34":n.visibilityAfterPublishMessage=n.svc.locale.key["NoticeDocumentView.Validation.CATIIIMessage"];break;case"35":n.visibilityAfterPublishMessage=n.svc.locale.key["NoticeDocumentView.Validation.CATIIIMessage"];break;case"18":n.visibilityAfterPublishMessage=n.isOnline=="true"?n.svc.locale.key["NoticeDocumentView.Validation.CATIIMessage"]:n.svc.locale.key["NoticeDocumentView.Validation.ProceduraOfflineCATII"];break;case"19":n.visibilityAfterPublishMessage=n.isOnline=="true"?n.svc.locale.key["NoticeDocumentView.Validation.CATIIMessage"]:n.svc.locale.key["NoticeDocumentView.Validation.ProceduraOfflineCATII"];break;case"36":n.visibilityAfterPublishMessage=n.svc.locale.key["NoticeDocumentView.Validation.CATIIIMessage"];break;case"9":n.visibilityAfterPublishMessage=n.isOnline=="true"?n.svc.locale.key["NoticeDocumentView.Validation.CATIMessage"]:n.svc.locale.key["NoticeDocumentView.Validation.ProceduraOfflineCATI"];break;default:n.visibilityAfterPublishMessage=""}}},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.ProcedurePvReportsEditController=t;angular.module("app.controls").directive("procedurePvRepEdit",function(){return{restrict:"E",replace:!0,scope:{procId:"=",isOnline:"=",isSad:"=",sadId:"=?"},templateUrl:"template/common/procedures/procedure-pv-reports/edit/edit",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.svc=n;this.api=t;this.$scope=i;this.$interval=r;this.timeoutInstance=null;this.downloadUrl=null;i.vm=this;this.initNoticeId=i.initNoticeId;this.sysNoticeTypeId=i.sysNoticeTypeId;this.init();this.downloadUrl=window.location.origin+"/"+this.api.Common.api+"/DownloadArchive/?initNoticeId="+this.initNoticeId+"&sysNoticeTypeId="+this.sysNoticeTypeId}return n.prototype.init=function(){this.getArchiveStatus()},n.prototype.getArchiveStatus=function(){var n=this;this.svc.isLoading=!0;this.api.Common.getArchiveStatus(this.initNoticeId,this.sysNoticeTypeId).then(function(t){t.hasError?console.log(t.responseMessage):n.archiveItem=t.archiveItem}).finally(function(){return n.svc.isLoading=!1})},n.prototype.addArchiveForNotice=function(){var n=this;this.svc.isLoading=!0;this.api.Common.addArchiveForNotice(this.initNoticeId,this.sysNoticeTypeId).then(function(t){t.hasError&&console.log(t.responseMessage);n.getArchiveStatus()}).finally(function(){return n.svc.isLoading=!1})},n.prototype.downloadArchive=function(){var n=this;this.svc.isLoading=!0;this.api.Common.downloadArchive(this.initNoticeId,this.sysNoticeTypeId).catch(function(t){n.svc.modalService.showErrorMessage(t)}).finally(function(){n.svc.isLoading=!1;n.svc.modalService.showInfoMessageLong("Arhiva a fost descarcata in directorul 'Downloads'.")})},n.$inject=["svc","NoticeCommonApi","$scope","$interval"],n}();n.ArchiveDownloadCtrl=t;angular.module("app.controls").directive("archiveDownload",function(){return{restrict:"E",replace:!0,scope:{initNoticeId:"@",sysNoticeTypeId:"@",isHistory:"@"},templateUrl:"template/common/notices/common/archive-download/archive-download",controller:t,link:function(){}}})})(t=n.noticeCommon||(n.noticeCommon={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this.$scope=n;this.$rootScope=t;this.svc=i;this.$routeParams=r;this.api=u;this.candidatesDropDown=[];this.evalStatesDropDown=[];this.lotsDropDown=[];this.searchTooLong=!1;this.listItems=[];this.listItemsTest=[];this.itemsTest=[];n.vm=this;this.sadId=this.$routeParams.id;this.init();console.log("candidature list")}return n.prototype.init=function(){var n=this;this.$rootScope.$$listeners.candidatureListStateSetSearch=[];this.$rootScope.$$listeners.candidatureListResultSetSearch=[];this.getCandidatureListFilters();this.$rootScope.$on("candidatureListStateSetSearch",function(t,i){n.resetFilter();n.filter.sadCandidatureEvalState={id:i,text:""};n.search()});this.$rootScope.$on("candidatureListResultSetSearch",function(t,i){n.resetFilter();n.filter.evaluationResult={id:i,text:""};n.search()});this.search();this.setValidPageSizes()},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.search=function(){var n=this;this.populateFilter();this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.filter.pageIndex=this.currentPage;this.filter.sadId=this.sadId;this.api.COMMON.getSadCandidatureList(this.filter).then(function(t){t&&(n.searchTooLong=t.searchTooLong?!0:!1,n.listItems=t.items,n.totalPages=Math.ceil(t.total/n.filter.pageSize),n.totalResults=t.total)}).finally(function(){n.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedEvalState!=null&&this.selectedEvalState.id!=null&&(this.filter.sadCandidatureEvalState={id:this.selectedEvalState.id,text:this.selectedEvalState.text});this.selectedCandidate!=null&&this.selectedCandidate.id!=null&&(this.filter.sadCandidate={id:this.selectedCandidate.id,text:this.selectedCandidate.text});this.selectedLot!=null&&this.selectedLot.id!=null&&(this.filter.forLot={id:this.selectedLot.id,text:this.selectedLot.text});this.selectedEvaluationResult!=null&&this.selectedEvaluationResult.id!=null&&(this.filter.evaluationResult={id:this.selectedEvaluationResult.id,text:this.selectedEvaluationResult.text})},n.prototype.resetFilter=function(){this.filter={sortProperties:[],pageSize:5};this.selectedCandidate=null;this.selectedEvalState=null;this.selectedEvaluationResult=null;this.selectedLot=null},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.getCandidatureListFilters=function(){var n=this;this.api.COMMON.getCandidates(this.sadId).then(function(t){t&&(n.candidatesDropDown.push({id:null,text:""}),n.candidatesDropDown=n.candidatesDropDown.concat(t.results))});this.api.COMMON.getEvalStates().then(function(t){t&&(n.evalStatesDropDown.push({id:null,text:""}),n.evalStatesDropDown=n.evalStatesDropDown.concat(t.results))});this.api.COMMON.getSadLots(this.sadId).then(function(t){t&&(n.lotsDropDown.push({id:null,text:""}),n.lotsDropDown=n.lotsDropDown.concat(t.results))})},n.prototype.goToCandidature=function(n){this.svc.userService.currentUser.isSu&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SU.Candidature_View_SAD,":sadId",this.sadId,":candidatureId",n);this.svc.userService.currentUser.isCa&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.Candidature_View_SAD,":sadId",this.sadId,":candidatureId",n);this.svc.userService.currentUser.isSeap&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.Candidature_View_SAD,":sadId",this.sadId,":candidatureId",n)},n.prototype.goToEvaluation=function(n){this.svc.userService.currentUser.isSu;this.svc.userService.currentUser.isCa&&this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.Candidature_Evaluation_SAD_CA,":candidatureId",n)},n.prototype.removeCandidature=function(n){var t=this;this.svc.modalService.confirm("Stergere candidatura","Prin stergerea candidaturii toate datele completate vor fi sterse. Doriti sa continuati?").then(function(i){if(i)t.svc.isLoading=!0,t.api.SU.RemoveCandidature(n).then(function(n){n.hasError?(t.svc.modalService.showErrorMessage(n.responseMessage),t.init()):t.svc.nav.pathWithNamedParam(sys.prv.routes.SU.SAD_VIEW_SU,":id",t.sadId)}).finally(function(){t.svc.isLoading=!1});else return})},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.$inject=["$scope","$rootScope","svc","$routeParams","SadPrvApi"],n}();n.Ctrl_Sad_Candidature_List=t;angular.module("app.controls").directive("candidatureList",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/sad/candidatureList/candidatureList",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this.$scope=n;this.svc=t;this.$routeParams=i;this.api=r;this.$rootScope=u;this.candidatesDropDown=[];this.evalStatesDropDown=[];this.lotsDropDown=[];this.searchTooLong=!1;this.listItems=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];n.vm=this;this.sadId=this.$routeParams.id;this.init()}return n.prototype.init=function(){var n=this;this.$rootScope.$$listeners.sad_lot_selector_save=[];this.$rootScope.$$listeners.sad_lot_selector_close=[];this.$rootScope.$$listeners.rfqInvitationSetSearch=[];this.$rootScope.$on("sad_lot_selector_close",function(){n.selectSadLotWindow.close()});this.$rootScope.$on("sad_lot_selector_save",function(t,i){n.selectSadLotWindow.close();i.selectedGrid&&(n.svc.isLoading=!0,n.createRfqInvitationSad(i.selectedGrid.sadLotId))});this.$rootScope.$on("rfqInvitationSetSearch",function(t,i){n.filter.sysProcedureStateId=i;n.search()});this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.api.COMMON.getAdmittedApplicantCandidate(this.sadId).then(function(t){t&&(n.candidatesDropDown.push({id:null,text:""}),n.candidatesDropDown=n.candidatesDropDown.concat(t.results))});this.search();this.setValidPageSizes()},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.search=function(){var n=this;this.populateFilter();this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.filter.pageIndex=this.currentPage;this.filter.sadId=this.sadId;this.api.COMMON.getRfqInvitationSadList(this.filter).then(function(t){t&&(n.searchTooLong=t.searchTooLong?!0:!1,n.listItems=t.items,n.totalPages=Math.ceil(t.total/n.filter.pageSize),n.totalResults=t.total,n.hasLots=t.hasLots,n.sadLotId=t.sadLotId,n.isAdditionalPurchaser=t.isAdditionalPurchaser)}).finally(function(){n.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id!=null&&(this.filter.currentProcedureState={id:this.selectedSysProcedureState.id,text:this.selectedSysProcedureState.text});this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id!=null&&(this.filter.sysProcedurePhase={id:this.selectedSysProcedurePhase.id,text:this.selectedSysProcedurePhase.text});this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id!=null&&(this.filter.rfqInvitationSadCurrentState={id:this.selectedSysNoticeState.id,text:this.selectedSysNoticeState.text});this.selectedCandidate!=null&&this.selectedCandidate.id!=null&&(this.filter.eligibleCandidate={id:this.selectedCandidate.id,text:this.selectedCandidate.text})},n.prototype.resetFilter=function(){this.filter={sortProperties:[],pageSize:5};this.selectedSysProcedureState=null;this.selectedSysProcedurePhase=null;this.selectedSysNoticeState=null},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.createRfqInvitationSad=function(n){var t=this;this.svc.isLoading=!0;this.api.COMMON.createRfqInvitationSad(n).then(function(n){n!=0&&(t.svc.modalService.showMessage(t.svc.locale.key["Common.Info.Info"],t.svc.locale.key["Sad.Label.RfqInvitationSadSaved"]),t.svc.nav.pathWithParam(sys.prv.routes.CA.RFQ_INVITATION_SAD_EDIT,n))},function(n){t.svc.modalService.showValidationResult(n);t.svc.isLoading=!1}).finally(function(){t.svc.isLoading=!1})},n.prototype.viewRfqInvitationSad=function(n){this.svc.userService.currentUser!=null?(n.sysNoticeState!=null&&n.sysNoticeState.id==1&&this.svc.userService.currentUser.isCa?this.svc.nav.pathWithParam(sys.prv.routes.CA.RFQ_INVITATION_SAD_EDIT,n.rfqInvitationId):this.svc.userService.currentUser.isCa&&this.svc.nav.pathWithParam(sys.prv.routes.CA.RFQ_INVITATION_SAD_VIEW,n.rfqInvitationId),this.svc.userService.currentUser.isSu&&this.svc.nav.pathWithParam(sys.prv.routes.SU.RFQ_INVITATION_SAD_VIEW,n.rfqInvitationId),this.svc.userService.currentUser.isSeap&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.RFQ_INVITATION_SAD_VIEW_SEAP,n.rfqInvitationId),this.svc.userService.currentUser.isAnap&&this.svc.nav.pathWithParam(sys.prv.routes.SEAP.RFQ_INVITATION_SAD_VIEW_MON,n.rfqInvitationId)):this.svc.nav.pathWithParam(sys.pub.routes.RFQ_INVITATION_SAD_VIEW,n.rfqInvitationId)},n.prototype.viewProcedure=function(n){var t;t=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ProcedureView:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.SUProcedureView:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.SEAPPRocedureView:this.svc.userService.currentUserIsPub()?sys.pub.routes.PUBLICProcedureView:sys.prv.routes.SEAP.MONPRocedureView;this.svc.nav.pathForProcedure(t,n,0)},n.prototype.openSelectSadLot=function(){this.hasLots==!0?(this.selectSadLotWindow.center().open(),this.$rootScope.$broadcast("sad_lot_search",this.sadId)):this.createRfqInvitationSad(this.sadLotId)},n.prototype.exportData=function(n){var t=this;this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.api.COMMON.getRFQInvExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.COMMON.getRFQInvExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.COMMON.getRFQInvExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.$inject=["$scope","svc","$routeParams","SadCommonApi","$rootScope"],n}();n.Ctrl_Rfqinvitation_Sad_List=t;angular.module("app.controls").directive("rfqinvitationSadList",function(){return{restrict:"E",replace:!0,scope:{},templateUrl:"template/common/sad/rfqinvitationSadList/rfqinvitationSadList",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e){var o=this;this.svc=n;this.api=t;this.sadApi=i;this.$routeParams=r;this.$rootScope=u;this.$cookieStore=f;this.$timeout=e;this.listItems=[];this.noticeTypeSelected=[];this.sysProcedureStates=[];this.sysProcedurePhases=[];this.sysAwardCriteriaTypes=[];this.assignedUsers=[];this.codes="";this.onEnter=function(n){n.which===13&&this.search()};this.treelistOptions={height:500,scrollable:{virtual:!0},selectable:"multiple, row",change:function(n){var t=n.sender.$angular_scope.vm,e,i,r,u,f;for(t.selectedNuts=[],e=this.select(),i=[],r=0;r<e.length;r++)u=this.dataItem(e[r]),t.selectedNuts.push({id:u.id,code:u.code}),i.push(u.code);for(i=i.filter(t.onlyUnique),t.codes="",f=0;f<i.length;f++)t.codes+=i[f]+"; ";t.codes=t.codes.substring(0,t.codes.length-2)},columns:[{field:"name",title:"Cod nuts",width:150,headerAttributes:{style:"display: none"},template:"<span style='cursor: pointer;'>{{dataItem.name}}<\/span>"},{field:"code",title:"Cod nuts",width:150,headerAttributes:{style:"display: none"},template:"<span style='cursor: pointer;'>{{dataItem.code}}<\/span>"},]};this.searchTooLongText=this.svc.locale.key["NoticeCommon.Label.SearchResultTooLongPart1"].replace(new RegExp("{CacheCount}","g"),this.svc.configService.cfg.InitNotice_MaxListItems);this.init();this.lang=this.svc.userService.culture=="ro-RO"?"ro":"en";this.$rootScope.$$listeners.df_selector_save=[];this.$rootScope.$$listeners.df_selector_close=[];this.$rootScope.$on("df_selector_close",function(){o.selectDFWindow.close()});this.$rootScope.$on("df_selector_save",function(n,t){var i,r;o.selectDFWindow.close();i=t.sysNoticeTypeId;t.selectedGrid&&(r=t.selectedGrid,o.svc.isLoading=!0,o.api.Common.createNotice(r.dfNoticeId,i).then(function(n){o.svc.modalService.clearValidationErrors();n!=null&&n>0?(o.svc.getNoticeStickyData(i,+n),o.svc.isLoading=!1,o.navigateToEdit(n)):(o.svc.isLoading=!1,o.svc.modalService.showErrorMessage(o.svc.locale.key["CNoticeView.Error.CouldNotCreateCNotice"]))},function(n){o.svc.modalService.showValidationResult(n)}))})}return n.prototype.init=function(){var n=this,t,i;this.$routeParams.resetFilter>0&&(this.resetFilter(),this.populateFilterForEntityType());t=this.$cookieStore.get("noticeFilter");i=this.$cookieStore.get("noticeTypeForFilter");t!=null&&i>-1&&(this.svc.noticeFilter=t,this.svc.noticeTypeForFilter=i,this.$cookieStore.put("noticeFilter",null),this.$cookieStore.put("noticeTypeForFilter",-1));this.svc.noticeFilter&&(this.$routeParams.noticeTypeId==this.svc.noticeTypeForFilter&&(this.filter=this.svc.noticeFilter),this.svc.noticeFilter=null,this.svc.noticeTypeForFilter=null);this.populateInitialFilters();this.$routeParams.resetFilter>0&&(this.noticeTypeSelected[this.$routeParams.noticeTypeId]=!0);this.filter?this.search():this.filter={sortProperties:[],pageSize:5};this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isCa&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesCA.CA_CNOTICE_LIST)});this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&this.$timeout(function(){$("#helpRelativePath").text(n.helpRoutesSU.SU_CNOTICE_LIST)});this.svc.ComboApi.getSysProcedureStates().then(function(t){n.sysProcedureStates.push({id:null,text:""});n.sysProcedureStates=n.sysProcedureStates.concat(t.results)});this.svc.ComboApi.getSysProcedurePhases().then(function(t){n.sysProcedurePhases.push({id:null,text:""});n.sysProcedurePhases=n.sysProcedurePhases.concat(t.results)});this.svc.ComboApi.getSysAwardCriteriaTypes().then(function(t){n.sysAwardCriteriaTypes.push({id:null,text:""});n.sysAwardCriteriaTypes=n.sysAwardCriteriaTypes.concat(t.results)});this.api.Common.getAssignedUsers().then(function(t){n.assignedUsers.push({id:null,text:""});n.assignedUsers=n.assignedUsers.concat(t)});this.setValidPageSizes()},n.prototype.populateInitialFilters=function(){var u=this,n,t,i,r;if(this.$cookieStore.get("selectedAdditionalPurchaser")!=null&&(this.selectedAdditionalPurchaser=this.$cookieStore.get("selectedAdditionalPurchaser"),this.$cookieStore.put("selectedAdditionalPurchaser",null)),this.$cookieStore.get("selectedSysProcedureState")!=null&&(this.selectedSysProcedureState=this.$cookieStore.get("selectedSysProcedureState"),this.$cookieStore.put("selectedSysProcedureState",null)),this.$cookieStore.get("selectedSysSadState")!=null&&(this.selectedSysSadState=this.$cookieStore.get("selectedSysSadState"),this.$cookieStore.put("selectedSysSadState",null)),this.$cookieStore.get("selectedSysProcedurePhase")!=null&&(this.selectedSysProcedurePhase=this.$cookieStore.get("selectedSysProcedurePhase"),this.$cookieStore.put("selectedSysProcedurePhase",null)),this.$cookieStore.get("selectedSysProcedureType")!=null&&(this.selectedSysProcedureType=this.$cookieStore.get("selectedSysProcedureType"),this.$cookieStore.put("selectedSysProcedureType",null)),this.$cookieStore.get("selectedSysNoticeState")!=null&&(this.selectedSysNoticeState=this.$cookieStore.get("selectedSysNoticeState"),this.$cookieStore.put("selectedSysNoticeState",null)),this.$cookieStore.get("selectedContractAssignmentType")!=null&&(this.selectedContractAssignmentType=this.$cookieStore.get("selectedContractAssignmentType"),this.$cookieStore.put("selectedContractAssignmentType",null)),this.$cookieStore.get("selectedSysAwardCriteriaType")!=null&&(this.selectedSysAwardCriteriaType=this.$cookieStore.get("selectedSysAwardCriteriaType"),this.$cookieStore.put("selectedSysAwardCriteriaType",null)),this.$cookieStore.get("selectedCa")!=null&&(this.selectedCa=this.$cookieStore.get("selectedCa"),this.$cookieStore.put("selectedCa",null)),this.$cookieStore.get("selectedCpv")!=null&&(this.selectedCpv=this.$cookieStore.get("selectedCpv"),this.$cookieStore.put("selectedCpv",null)),this.$cookieStore.get("selectedCpvCat")!=null&&(this.selectedCpvCat=this.$cookieStore.get("selectedCpvCat"),this.$cookieStore.put("selectedCpvCat",null)),this.$cookieStore.get("selectedAssignedUser")!=null&&(this.selectedAssignedUser=this.$cookieStore.get("selectedAssignedUser"),this.$cookieStore.put("selectedAssignedUser",null)),this.$cookieStore.get("currentPage")!=null&&(this.currentPage=this.$cookieStore.get("currentPage"),this.currentPageTmp=this.currentPage,this.$cookieStore.put("currentPage",null)),n=this.$cookieStore.get("nutsIds"),n!=null&&n.length>0){for(this.$cookieStore.put("nutsIds",null),this.filter||(this.filter={sortProperties:[],pageSize:5}),this.filter.nutsCodeIds=n.map(function(n){return n.id}),this.selectedNuts=[],t=[],i=0;i<n.length;i++)this.selectedNuts.push({id:n[i].id,code:n[i].code}),t.push(n[i].code);for(t=t.filter(this.onlyUnique),this.codes="",r=0;r<t.length;r++)this.codes+=t[r]+"; ";this.codes=this.codes.substring(0,this.codes.length-2)}this.svc.userService.currentUserIsCa()&&(this.filter.contractingAuthorityId=this.svc.userService.currentUser.entity.entityID,this.$timeout(function(){var n=$("#AcDdl").data("kendoComboBox"),t;n.refresh();n.dataSource.read();n.value(u.svc.userService.currentUser.entity.fiscalNumber+" "+u.svc.userService.currentUser.entity.entityName);t=$("#AdditionalDdl").data("kendoComboBox");t.refresh();t.dataSource.read()}))},n.prototype.populateFilterForEntityType=function(){this.svc.userService.currentUserIsCa()},n.prototype.search=function(){var t=this,n=this,i;this.populateFilter();i=JSON.stringify({number:n.filter.number,sysNoticeStateId:n.filter.sysNoticeStateId,startNoticeState:n.filter.startNoticeState,endNoticeState:n.filter.endNoticeState,startSadState:n.filter.startSadState,endSadState:n.filter.endSadState,contractingAuthorityId:n.filter.contractingAuthorityId,contractName:n.filter.contractName,cPVCategoryId:n.filter.cPVCategoryId,cPVId:n.filter.cPVId,cPVText:n.filter.cPVText,sysSadStateId:n.filter.sysSadStateId,hasErata:n.filter.hasErata,hasCandidatureNotEvaluated:n.filter.hasCandidatureNotEvaluated,hasUnansweredQuestions:n.filter.hasUnansweredQuestions,hasAquisitions:n.filter.hasAquisitions,hasLots:n.filter.hasLots,sadParticipant:n.filter.sadParticipant,allowsAdditionalPurchasers:n.filter.allowsAdditionalPurchasers,selectedAdditionalPurchaser:n.filter.additionalPurchaserId});i!==n.lastFilterHash&&(this.currentPageTmp&&this.currentPageTmp!=0?this.currentPageTmp=null:n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.populateFilter();this.svc.isLoading=!0;n.filter.pageSize||(n.filter.pageSize=5);this.sadApi.COMMON.getSadList(this.filter).then(function(i){t.searchTooLong=i.searchTooLong?!0:!1;t.listItems=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.populateFilter=function(){this.filter||this.resetFilter();this.selectedSysSadState&&this.selectedSysSadState.id>0&&(this.filter.sysSadStateId=this.selectedSysSadState.id);this.selectedSysNoticeState&&this.selectedSysNoticeState.id>0&&(this.filter.sysNoticeStateId=this.selectedSysNoticeState.id);this.selectedCa&&this.selectedCa.id>0&&(this.filter.contractingAuthorityId=this.selectedCa.id);this.selectedCpvCat&&this.selectedCpvCat.id>0&&(this.filter.cPVCategoryId=this.selectedCpvCat.id);this.selectedCpv&&this.selectedCpv.id>0&&(this.filter.cPVId=this.selectedCpv.id);this.selectedAssignedUser&&this.selectedAssignedUser.id>0&&(this.filter.assignedUserId=this.selectedAssignedUser.id);this.selectedAdditionalPurchaser&&(this.filter.additionalPurchaserId=this.selectedAdditionalPurchaser.id)},n.prototype.resetFilter=function(){this.filter={sortProperties:[],pageSize:5};this.noticeTypeSelected=[];this.selectedNuts=[];this.codes="";this.selectedSysProcedureState=null;this.selectedSysSadState=null;this.selectedSysProcedurePhase=null;this.selectedSysProcedureType=null;this.selectedSysNoticeState=null;this.selectedContractAssignmentType=null;this.selectedSysAwardCriteriaType=null;this.selectedCa=null;this.selectedCpv=null;this.selectedCpvCat=null;this.selectedAssignedUser=null;this.selectedValidatedBy=null;this.selectedAllocatedTo=null;this.filter.hasUnansweredQuestions=null;this.selectedAdditionalPurchaser=null;this.filter.additionalPurchaserId=null;this.svc.userService.currentUserIsCa()&&this.$timeout(function(){var n=$("#AcDdl").data("kendoComboBox");n.value("")})},n.prototype.reset=function(){this.resetFilter();this.search()},n.prototype.openDfSelector=function(){this.selectDFWindow.center().open();this.$rootScope.$broadcast("notice_df_set_notice_type",{noticeTypeId:2,isSad:!0});this.$rootScope.$broadcast("notice_df_selector_search",null)},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilter();this.svc.isLoading=!0;n=="excel"?this.sadApi.COMMON.getExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.sadApi.COMMON.getExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.sadApi.COMMON.getExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.setBackRoute=function(){var t=[":noticeTypeId",this.$routeParams.noticeTypeId,":resetFilter","0"],n;n=this.svc.userService.currentUserIsCa()?sys.prv.routes.CA.ContractNoticeList_Ca:this.svc.userService.currentUserIsSu()?sys.prv.routes.SU.ContractNoticeList_Su:this.svc.userService.currentUserIsSeap()?sys.prv.routes.SEAP.ContractNoticeList_Seap:this.svc.userService.currentUserIsPub()?sys.pub.routes.ContractNoticeList_Pub:sys.prv.routes.SEAP.ContractNoticeList_Mon;this.svc.nav.setBackRouteWithParams(n,t);this.svc.noticeFilter=this.filter;this.svc.noticeTypeForFilter=this.$routeParams.noticeTypeId;this.setInitialFilters()},n.prototype.setInitialFilters=function(){this.selectedSysProcedureState!=null&&this.selectedSysProcedureState.id>0&&this.$cookieStore.put("selectedSysProcedureState",this.selectedSysProcedureState);this.selectedSysSadState!=null&&this.selectedSysSadState.id>0&&this.$cookieStore.put("selectedSysSadState",this.selectedSysSadState);this.selectedSysProcedurePhase!=null&&this.selectedSysProcedurePhase.id>0&&this.$cookieStore.put("selectedSysProcedurePhase",this.selectedSysProcedurePhase);this.selectedSysProcedureType!=null&&this.selectedSysProcedureType.id>0&&this.$cookieStore.put("selectedSysProcedureType",this.selectedSysProcedureType);this.selectedSysNoticeState!=null&&this.selectedSysNoticeState.id>0&&this.$cookieStore.put("selectedSysNoticeState",this.selectedSysNoticeState);this.selectedContractAssignmentType!=null&&this.selectedContractAssignmentType.id>0&&this.$cookieStore.put("selectedContractAssignmentType",this.selectedContractAssignmentType);this.selectedSysAwardCriteriaType!=null&&this.selectedSysAwardCriteriaType.id>0&&this.$cookieStore.put("selectedSysAwardCriteriaType",this.selectedSysAwardCriteriaType);this.selectedCa!=null&&this.selectedCa.id>0&&this.$cookieStore.put("selectedCa",this.selectedCa);this.selectedAdditionalPurchaser!=null&&this.selectedAdditionalPurchaser.id>0&&this.$cookieStore.put("selectedAdditionalPurchaser",this.selectedAdditionalPurchaser);this.selectedCpv!=null&&this.selectedCpv.id>0&&this.$cookieStore.put("selectedCpv",this.selectedCpv);this.selectedCpvCat!=null&&this.selectedCpvCat.id>0&&this.$cookieStore.put("selectedCpvCat",this.selectedCpvCat);this.selectedAssignedUser!=null&&this.selectedAssignedUser.id>0&&this.$cookieStore.put("selectedAssignedUser",this.selectedAssignedUser);this.selectedValidatedBy!=null&&this.selectedValidatedBy.id>0&&this.$cookieStore.put("selectedValidatedBy",this.selectedValidatedBy);this.selectedAllocatedTo!=null&&this.selectedAllocatedTo.id>0&&this.$cookieStore.put("selectedAllocatedTo",this.selectedAllocatedTo);this.currentPage>0&&this.$cookieStore.put("currentPage",this.currentPage);this.$cookieStore.put("nutsIds",this.selectedNuts)},n.prototype.navigateToEdit=function(n){this.svc.nav.pathWithNamedParam(sys.prv.routes.CA.CNOTICE_SAD_CA_EDITVIEW,":noticeId",n)},n.prototype.navigateToNotice=function(n){var t;this.setBackRoute();this.svc.userService.currentUserIsCa()?t=sys.prv.routes.CA.CNOTICE_SAD_CA_View:this.svc.userService.currentUserIsSu()?t=sys.prv.routes.SU.CNOTICE_SAD_SU_View:this.svc.userService.currentUserIsSeap()?t=sys.prv.routes.SEAP.CNOTICE_SEAP_SAD_View:this.svc.userService.currentUserIsPub()?t=sys.pub.routes.CNoticeSADView:this.svc.userService.currentUserIsMon()&&(t=sys.prv.routes.SEAP.CNOTICE_MON_SAD_View);this.svc.nav.pathWithParam(t,n.cNoticeId)},n.prototype.navigateToSAD=function(n){var t;this.setBackRoute();this.svc.userService.currentUserIsCa()?t=sys.prv.routes.CA.SAD_CA_VIEW:this.svc.userService.currentUserIsSu()?t=sys.prv.routes.SU.SAD_VIEW_SU:this.svc.userService.currentUserIsPub()?t=sys.pub.routes.SAD_PUB_VIEW:this.svc.userService.currentUserIsSeap()?t=sys.prv.routes.SEAP.SAD_SEAP_VIEW:this.svc.userService.currentUserIsMon()&&(t=sys.prv.routes.SEAP.SAD_MON_VIEW);this.svc.nav.pathWithParam(t,n.sadId)},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.openNutsSelector=function(){var n=this;this.selectedNuts=[];this.filter&&(this.filter.nutsCodeIds=[]);this.codes="";this.nutsWindow.center().open();this.api.Common.getNutsCodes().then(function(t){var r=n,i;n.tree.dataSource.data(t);n.tree.dataSource.page(1);i=$("tr.k-treelist-group",n.tree.tbody);$.each(i,function(n,t){r.tree.expand(t)})})},n.prototype.onlyUnique=function(n,t,i){return i.indexOf(n)===t},n.prototype.addSelectedNuts=function(){this.filter.nutsCodeIds=this.selectedNuts.map(function(n){return n.id});this.search();this.nutsWindow.close()},n.prototype.cancelNutsSelector=function(){this.selectedNuts=[];this.filter&&(this.filter.nutsCodeIds=[]);this.codes="";this.nutsWindow.close();this.search()},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.$inject=["svc","NoticeCommonApi","SadCommonApi","$routeParams","$rootScope","$cookieStore","$timeout"],n.Cfg={Name:"SAD-LIST-CNOTICE"},n}();n.CommonList_Notice_SAD=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.procedure||(n.procedure={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var i=function(n){function t(t,i){n.call(this,t,i);this.api="api-pub/Sad";this.apiPrv="api/SadPrv"}return __extends(t,n),t.prototype.getRfqInvitationSadList=function(n){return this.POST(this.api+"/GetRfqInvitationSadList/",n)},t.prototype.createRfqInvitationSad=function(n){return this.GET(this.apiPrv+"/CreateRfqInvitationSad/",{sadLotId:n})},t.prototype.getSadList=function(n){return this.POST(this.api+"/GetSadList/",n)},t.prototype.getExportDocument=function(n,t){return this.POST(this.DOWNLOAD(this.api+"/GetExportDocument",n,{exportType:t}))},t.prototype.getRFQInvExportDocument=function(n,t){return this.POST(this.DOWNLOAD(this.api+"/GetRFQInvExportDocument",n,{exportType:t}))},t.prototype.getAdmittedApplicantCandidate=function(n){return this.GET(this.api+"/getAdmittedApplicantCandidate/",{sadId:+n})},t.prototype.getGroupLiderForSupplier=function(n){return this.GET(this.api+"/getGroupLiderForSupplier/",{sadId:+n})},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"COMMON",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.SadCommonApi=t;angular.module("app.controls").service("SadCommonApi",t)})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.item={};this.selectedLot={};this.sadLotInfos={};this.availableLots=[];this.selectedLots=[];this.hasLotsToExtend=!1;this.filter={};this.isSaveAction=!1;this.datePickerOptions={min:sys.dateUtils.addBusinessDays(new Date,3),format:"dd/MM/yyyy",culture:"ro-RO",parseFormats:["yyyy-MM-ddTHH:mm:sszzz"],disableDates:function(){return!1}};console.log("bulkSadLotSelectorController...");r.$on("selectSadLots",function(n,t){f.sysSadLotSelectorContext=t.sysSadLotSelectorContext;f.hasLots=t.hasLots;f.noValidation=t.noValidation;f.joueValidation=t.joueValidation;f.anapValidation=t.anapValidation;f.anapAndJoueValidation=t.anapAndJoueValidation;f.init()});r.$on("saveSadActionContext",function(n,t){console.log("saveSadAction ...");f.sysSadLotSelectorContext=t.sysSadLotSelectorContext;f.hasLots=t.hasLots;f.isSaveAction=t.isSaveAction;f.init()})}return n.prototype.init=function(){var n=this;this.$scope.vm=this;this.sadId=this.$scope.sadId;this.availableLots=[];this.item={};this.svc.isLoading=!0;this.filter.sadId=this.sadId;this.filter.sysSadLotSelectorContextId=this.sysSadLotSelectorContext;this.api.COMMON.getSadLotsForSelector(this.filter).then(function(t){n.availableLots=n.availableLots.concat(t.result);n.hasLots||(n.selectedLots=n.selectedLots.concat(n.availableLots),n.hasLotsToExtend=n.checkLotsToExtend(),n.svc.isLoading=!1,n.isSaveAction&&n.doSadLotAction(n.sysSadLotSelectorContext))},function(){n.svc.isLoading=!1}).finally(function(){n.svc.isLoading=!1});this.hasLots||(this.item.allLots=!0,this.item.selectedLots=!1)},n.prototype.cancel=function(n){this.item={};this.selectedLots=[];this.hasLotsToExtend=!1;this.isSaveAction=!1;this.$rootScope.$broadcast("closeSadLotSelector",{makeRefresh:n})},n.prototype.addSadLot=function(n){this.selectedLots=this.selectedLots.concat(n);this.hasLotsToExtend=this.checkLotsToExtend();this.availableLots.length===this.selectedLots.length&&(this.item.allLots=!0,this.item.selectedLots=!1)},n.prototype.removeSadLot=function(n){this.selectedLots.splice(n,1);this.hasLotsToExtend=this.checkLotsToExtend();this.availableLots.length>this.selectedLots.length&&(this.item.allLots=!1,this.item.selectedLots=!0)},n.prototype.setSelectionType=function(n){n===1?(this.item.allLots=!0,this.selectedLots=this.selectedLots.concat(this.availableLots),this.hasLotsToExtend=this.checkLotsToExtend()):this.item.allLots=!1;n===2?(this.item.selectedLots=!0,this.selectedLots=[],this.hasLotsToExtend=!1):this.item.selectedLots=!1},n.prototype.checkLotsToExtend=function(){var n=!1;return this.selectedLots.length>0&&angular.forEach(this.selectedLots,function(t){t!=null&&t.mustGenerateErrata==!0&&(n=!0)}),n},n.prototype.doSadLotAction=function(n){var t=this;if(t.selectedLots.length>0&&(t.sadLotInfos.selectedSadLots=t.selectedLots),t.selectedLots.length==0){this.svc.modalService.showErrorMessage("Selectati cel putin un lot!");return}t.sadLotInfos.allLots=t.item.allLots;t.sadLotInfos.selectedLots=t.item.selectedLots;t.sadLotInfos.sysSadLotSelectorContext=n;t.sadLotInfos.sadId=this.sadId;t.svc.isLoading=!0;t.api.CA.doSadLotAction(t.sadLotInfos).then(function(i){if(i!=null)if(i.hasErrataGenerated)t.svc.modalService.showMessage(t.locale.key["Common.Info.Info"],i.isValidatedAutomatically?t.locale.key["Procedure.Validation.SuccessExtendTermsErrataCreatedAutoPublished"]:t.locale.key["Procedure.Validation.SuccessExtendTermsErrataCreated"]),t.cancel(!0);else{switch(n){case 4:t.svc.modalService.showSuccessMessages(t.locale.key["Sad.Validation.ExtendTermsSuccessfull"]);break;case 1:case 5:t.svc.modalService.showSuccessMessages(t.locale.key["Procedure.Validation.SuccessSuspend"]);break;case 3:t.svc.modalService.showSuccessMessages(t.locale.key["Sad.Validation.UnSuspendSadSuccessfull"]);break;case 2:t.svc.modalService.showSuccessMessages(t.locale.key["Sad.Validation.CancelSadSuccessfull"])}t.cancel(!0)}},function(n){t.svc.modalService.showValidationResult(n)}).finally(function(){t.svc.isLoading=!1})},n.$inject=["$scope","svc","SadPrvApi","$rootScope","locale"],n}();n.BulkSadLotSelectorController=t;angular.module("app.controls").directive("bulkSadLotSelector",function(){return{restrict:"E",replace:!0,scope:{sadId:"@",sysSadLotSelectorContext:"@"},templateUrl:"template/common/sad/sadLotSelector/bulkSadLotSelector",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t=function(){function n(){}return n.isStarting=!0,n.filter={},n.total=0,n}(),i=function(){function n(n,i,u,f,e){var o=this;this.svc=n;this.$rootScope=i;this.locale=e;this.sadId=0;this.selectedGrid=[];this.colorBadge="badge badge-gray";this.gridOptions={dataSource:{type:"json",transport:{read:function(n){var i=t.filter,r,u;i.pageIndex=n.data.page-1;i.pageSize=n.data.pageSize;i.sadId=t.sadId;t.isStarting?(t.isStarting=!1,r={},u={items:[r],total:0},n.success(u)):t.api.getAvailableSadLots(i).then(function(t){n.success(t)})}},pageSize:10,serverPaging:!0,serverFiltering:!0,schema:{data:function(n){return n.items},total:function(n){return t.total=n.total,n.total}}},height:200,scrollable:!0,sortable:!0,selectable:"row",change:function(n){var i=n.sender.$angular_scope.vm,r=this.select(),t,u;for(i.selectedGrid=[],t=0;t<r.length;t++)u=this.dataItem(r[t]),i.selectedGrid.push(u)},columns:[{field:"contractTitle",title:this.locale.key["DFNoticeView.Label.ContractName"],width:300,template:"<span>{{dataItem.title}}<\/span>"},{field:"action",title:this.locale.key["Common.Label.CPVCode"],width:150,template:"<span>{{dataItem.cpvCodeName}}<\/span>"},{field:"acquisitionState",title:this.locale.key["Sad.Label.AcquisitionState"],width:150,template:"<div class="+this.colorBadge+">"+this.locale.key["Sad.Label.WaitingSadLot"]+"<\/div>"}]};t.api=new r(u,f);i.$$listeners.sad_lot_search=[];this.$rootScope.$on("sad_lot_search",function(n,i){i!=null&&(t.sadId=i);o.search()});this.clearFilters();t.filter=this.getFilter()}return n.prototype.search=function(){this.filter.noticeLotNo!=null&&t.filter.noticeLotNo==this.filter.noticeLotNo;this.grid!=null&&this.grid.dataSource!=null&&this.grid.dataSource.read()},n.prototype.clearFilters=function(){t.isStarting=!0;this.filter={sadId:t.sadId,noticeLotNo:null};this.grid!=null&&this.grid.dataSource!=null&&this.grid.dataSource.read()},n.prototype.getFilter=function(){var n=this.filter;return t.sadId!=null&&(n.sadId=t.sadId),n},n.prototype.save=function(){if(this.selectedGrid.length==0){this.svc.modalService.showMessage(this.locale.key["Common.Info.Info"],this.locale.key["DFNoticeView.Validation.ValidateSelectADFNotice"]);return}this.$rootScope.$broadcast("sad_lot_selector_save",{selectedGrid:this.selectedGrid[0]})},n.prototype.cancel=function(){this.$rootScope.$broadcast("sad_lot_selector_close",null)},n.Key="Ctrl_Sad_Lot_Selector",n.$inject=["svc","$rootScope","$http","$q","locale"],n}(),r;n.Ctrl_Sad_Lot_Selector=i;angular.module("app.controls").controller(i.Key,i);r=function(n){function t(t,i){n.call(this,t,i);this.api="api/SadPrv"}return __extends(t,n),t.prototype.getAvailableSadLots=function(n){return this.POST(this.api+"/GetAvailableSadLots/",n)},t.$inject=["$http","$q"],t}(sys.HttpApi)})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.listItems=[];r.$on("sadLotListView",function(){f.init()})}return n.prototype.init=function(){this.$scope.vm=this;this.sadId=this.$scope.sadId;this.filter={sortProperties:[],pageSize:5};this.validPageSizes=[5,10,25,50,100];this.search()},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.search=function(){var n=this;this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.filter.pageIndex=this.currentPage;this.filter.sadId=this.sadId;this.api.COMMON.getSadLotList(this.filter).then(function(t){t&&(n.listItems=t.items,n.totalPages=Math.ceil(t.total/n.filter.pageSize),n.totalResults=t.total)}).finally(function(){n.svc.isLoading=!1})},n.prototype.cancel=function(){this.$rootScope.$broadcast("sadLotListClose",null)},n.prototype.reset=function(){this.filter||(this.filter={sortProperties:[],pageSize:5});this.filter.lotNo=null;this.search()},n.$inject=["$scope","svc","SadPrvApi","$rootScope","locale"],n}();n.SadLotListController=t;angular.module("app.controls").directive("sadLotList",function(){return{restrict:"E",replace:!0,scope:{sadId:"@"},templateUrl:"template/common/sad/sadLotList/sadLotList",controller:t,link:function(){}}})})(t=n.procedure||(n.procedure={}))}(prv||(prv={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){var e=this;this.$scope=n;this.svc=t;this.$rootScope=i;this.locale=r;this.api=u;this.$filter=f;this.model=[];this.wasValidatedByANAP=!1;this.isLoading=!0;this.isModification=!1;this.hideConfirm=!1;this.$rootScope.$$listeners.modificationListView=[];i.$on("modificationListView",function(n,t){e.isForPublish=t.isForPublish;e.init();$("html, body").css("overflow","hidden");$("html").css("height","100%")});this.$rootScope.$on("closePreValidationNoticeWindow",function(){e.preValidationNoticeWindow.close()})}return n.prototype.init=function(){var n=this;this.$scope.vm=this;this.dfNoticeId=this.$scope.dfNoticeId;this.svc.isLoading=!0;this.api.COMMON.GetModificationListNew(this.dfNoticeId,this.isForPublish).then(function(t){t&&(n.model=t,t!=null&&t.length>0&&(n.hideConfirm=t[0].hideConfirm),n.svc.isLoading=!1)},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1});this.WasValidatedByANAP();this.api.CAV2.getNoticeIdFromSpecializedNoticeId(this.dfNoticeId,21).then(function(t){n.noticeId=t;n.svc.ComboApi.getNoticeType(n.noticeId,!1).then(function(t){n.noticeSubType=t})});this.isModification=!0},n.prototype.cancelModification=function(){this.$rootScope.$broadcast("closeModificationListWindow")},n.prototype.publishModification=function(){var t=this,n;this.svc.isLoading=!0;n=this;this.api.COMMON.CreateChangeNotice(n.dfNoticeId,!0).then(function(i){t.changeNoticeid=i;t.svc.isLoading=!0;t.api.CAV2.CompleteEFormsValue(n.dfNoticeId).then(function(){t.svc.isLoading=!0;t.api.CAV2.publishModification(n.dfNoticeId,n.changeNoticeid,n.model).then(function(i){i!=null&&i.isSicapValidationSuccess==!0&&i.isSuccess==!0&&(n.svc.modalService.showMessage("Info","Documentatia a fost modificata cu success!"),n.cancelModification(),n.svc.nav.pathWithParam(sys.prv.routes.CA.CADfNoticeVIEW_v2,t.dfNoticeId));i==null||i.isSuccess||(n.eFormsValidationResult=i,n.cancelModification(),n.preValidationNoticeWindow.center().open(),n.$rootScope.$broadcast("preValidationView",{eFormsValidationResult:n.eFormsValidationResult,noticeSubType:n.noticeSubType,noticeType:21,isChangeNotice:!0}))},function(i){n.validationErrors=i;t.$rootScope.$broadcast("scrollModificationListWindow")}).finally(function(){n.svc.isLoading=!1})}).finally(function(){n.svc.isLoading=!1})}).finally(function(){n.svc.isLoading=!1})},n.prototype.downloadClarification=function(n){this.svc.downloadUrl(n)},n.prototype.downloadDocument=function(n){var t=this;this.api.COMMON.verifyDownloadDocument(this.dfNoticeId,n).then(function(){t.api.COMMON.downloadDocument(t.dfNoticeId,n)},function(n){t.svc.modalService.showInfoMessage(n[1])})},n.prototype.WasValidatedByANAP=function(){var n=this;this.svc.isLoading=!0;this.api.COMMON.WasValidatedByANAP(this.dfNoticeId).then(function(t){n.wasValidatedByANAP=t;n.messageToShowOnPublishModificationClick=n.wasValidatedByANAP?"Test":n.svc.locale.key["DFNoticeView.Label.Modify_DfNotice_Confirm"]}).finally(function(){n.svc.isLoading=!1})},n.prototype.preValidateNotice=function(){var n=this;this.svc.isLoading=!0;this.api.COMMON.ValidateNoticeEforms(this.noticeId,null).then(function(t){t.isSuccess&&n.svc.modalService.showMessage("Info",n.svc.locale.key["DFNoticeView.Label.VerifyDfNoticeSuccess"])},function(t){n.svc.modalService.showValidationResult(t)}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","$rootScope","locale","DFNoticeApi","$filter"],n}();n.ModificationListController=t;angular.module("app.controls").directive("modificationList",function(){return{restrict:"E",replace:!0,scope:{dfNoticeId:"@"},templateUrl:"template/common/notices/modifications/modificationList/modificationList",controller:t,link:function(){}}})})(t=n.modification||(n.modification={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){var e=this;this.$rootScope=n;this.svc=t;this.api=i;this.$routeParams=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.ownedBy=[];this.isFormContext=!1;this.canEditEquipmentList=!1;this.onEnter=function(n){n.which===13&&this.search()};this.init();n.$on("closeequipmentSelector",function(n,t){e.equipmentSelectorWindow.close();t!=null&&t.withSearch&&e.search()});n.$on("closeEquipmentWindow",function(){e.equipmentSelectorWindow.close()})}return n.prototype.init=function(){var t=this,n;this.canoticeContractId=parseInt(this.$routeParams.canoticeContractId);this.isProcedure=parseInt(this.$routeParams.isProcedure);this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&!this.isProcedure&&(this.selectedProvidedByEntity={id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName},this.ownedBy.push({id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName}));this.setValidPageSizes();this.search();this.canoticeContractId!=null&&this.canoticeContractId>0&&this.api.Common.getFormEquipmentStickyHeader(this.canoticeContractId,this.isProcedure==1?!0:!1).then(function(n){t.stickyHeader=n},function(){});this.isFormContext=this.canoticeContractId>0;(this.canoticeContractId!=null||this.canoticeContractId!=undefined)&&(n=this,n.api.Common.canEditEquipmentList(n.canoticeContractId).then(function(t){console.log();n.canEditEquipmentList=t},function(n){console.log("General DUAE error:"+n.toString())}))},n.prototype.populateFilters=function(){this.filter||this.resetFilters();this.selectedEquipmentCategory!=null&&this.selectedEquipmentCategory.id>0&&(this.filter.equipmentCategoryId=this.selectedEquipmentCategory.id);this.selectedFilledByEntity!=null&&this.selectedFilledByEntity.id>0&&(this.filter.entityId=this.selectedFilledByEntity.id);this.selectedProvidedByEntity!=null&&this.selectedProvidedByEntity.id>0&&(this.filter.supplierId=this.selectedProvidedByEntity.id);this.selectedSysEquipmentUidType!=null&&this.selectedSysEquipmentUidType.id>0&&(this.filter.sysEquipmentUIDTypeId=this.selectedSysEquipmentUidType.id);this.filter.canoticeContractId=this.canoticeContractId;this.filter.isProcedure=this.isProcedure},n.prototype.reset=function(){this.resetFilters();this.search()},n.prototype.resetFilters=function(){this.filter={sortProperties:[],pageSize:5,startLastModDate:null,endLastModDate:null};this.selectedEquipmentCategory=null;this.selectedFilledByEntity=null;this.svc.userService.currentUser.isSu||(this.selectedProvidedByEntity=null);this.selectedSysEquipmentUidType=null;this.equipmentCategoryFreeText=null;this.equipmentOwnedByFreeText=null;this.equipmentFilledByFreeText=null},n.prototype.search=function(){var n=this,t;this.populateFilters();t=JSON.stringify({sysEquipmentUIDTypeId:this.filter.sysEquipmentUIDTypeId,equipmentUid:this.filter.equipmentUid,name:this.filter.name,brand:this.filter.brand,equipmentCategoryId:this.filter.equipmentCategoryId,supplierId:this.filter.supplierId,entityId:this.filter.entityId,startLastModDate:this.filter.startLastModDate,endLastModDate:this.filter.endLastModDate});t!==this.lastFilterHash&&(this.currentPage=0);this.lastFilterHash=t;this.filter.pageIndex=this.currentPage;this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.api.Common.getEquipmentRegistryList(this.filter).then(function(t){t.searchTooLong?(n.searchTooLong=!0,n.searchTooLongText=t.searchTooLongText):n.searchTooLong=!1;n.listItems=t.items;n.totalPages=Math.ceil(t.total/n.filter.pageSize);n.totalResults=t.total}).finally(function(){n.svc.isLoading=!1})},n.prototype.openEquipmentSelector=function(){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector")},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilters();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.NavigateToAddEquipment=function(){var n=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(t.responseMessage);n.svc.isLoading=!1;return}t.hasError||(n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam(sys.prv.routes.SU.AddEquipment_Su,":equipmentId",0),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.AddEquipment_Ca,":equipmentId",0))},function(t){n.svc.modalService.showErrorMessage(t);n.svc.isLoading=!1;return}).finally(function(){n.svc.isLoading=!1})},n.prototype.navigateToView=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(i){i.hasError&&(t.svc.modalService.showErrorMessage(i.responseMessage),t.svc.isLoading=!1);i.hasError||(t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSu&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SU.EditEquipment_Su,":equipmentId",n.equipmentRegistryId),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isCa&&t.svc.nav.locationWithNamedParam2(sys.prv.routes.CA.EditEquipment_Ca,":equipmentId",n.equipmentRegistryId,":isHistory",0),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSeap&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SEAP.ViewEquipment_SEAP,":equipmentId",n.equipmentRegistryId))},function(n){t.svc.modalService.showErrorMessage(n);t.svc.isLoading=!1}).finally(function(){t.svc.isLoading=!1})},n.prototype.back=function(){this.svc.nav.historyBack()},n.prototype.editPeriod=function(n,t){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector",{canoticeContractLotId:n,isEdit:!0,equipmentRegistryId:t,isProcedure:this.isProcedure})},n.prototype.deleteEquipmentFromContract=function(n,t,i){var r=this,u="Retragere utilaj din formularul de disponibilitate la contract",f,e;i?(e="ATENTIE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. <\/br><\/br> Va rugam sa stergeti mai intai perioadele de utilizare",this.svc.modalService.confirmCustomEquipmentRegistryNoCancel(u,e,"Modifica perioade utilizare").then(function(i){i&&r.editPeriod(n,t)})):(f="ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. Acesta se va regasi in continuare la nivelul procedurii de achizitie la oferta depusa. <\/br><\/br> Este posibila re-asocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!",this.svc.modalService.confirmCustomEquipmentRegistry(u,f,"Confirma retragerea","Renunta").then(function(i){i&&(r.svc.isLoading=!0,r.api.Common.deleteEquipmentAssociation(n,t).then(function(n){n&&(r.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),r.svc.isLoading=!1,r.search())},function(n){r.svc.modalService.showErrorMessage(n);r.svc.isLoading=!1}).finally(function(){r.svc.isLoading=!1}))}))},n.prototype.deleteEquipmentFromProcedure=function(n,t){var i=this;this.svc.modalService.confirmCustomEquipmentRegistry("Retragere utilaj din formularul de disponibilitate la contract","ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu va fi utilizat la acest contract.<\/br><\/br> Este posibila reasocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!","Confirma retragerea","Renunta").then(function(r){r&&(i.svc.isLoading=!0,i.api.Common.deleteEquipmentPeriod(n,t).then(function(n){n&&(i.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),i.svc.isLoading=!1,i.search())},function(n){i.svc.modalService.showErrorMessage(n);i.svc.isLoading=!1}).finally(function(){i.svc.isLoading=!1}))})},n.prototype.cancelEquipmentSelector=function(){this.$rootScope.$broadcast("onEquipmentSelectorClose")},n.prototype.NagivateToUseOfEquipmentList=function(n){this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SU.EquipmentUsageList_Su,":equipmentId",n.equipmentRegistryId,":resetFilter",0);this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isCa&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.CA.EquipmentUsageList_Ca,":equipmentId",n.equipmentRegistryId,":resetFilter",0);this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSeap&&this.svc.nav.pathWithNamedParam2(sys.prv.routes.SEAP.EquipmentUsageList_SEAP,":equipmentId",n.equipmentRegistryId,":resetFilter",0)},n.$inject=["$rootScope","svc","EquipmentApi","$routeParams","$cookieStore","$timeout"],n.Cfg={Name:"EQUIPMENT-REGISTRY-LIST"},n}();n.EquipmentRegistryList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.availabilityPeriod=[];this.lots=[];this.periodModel={};this.canoticeContractLotId=null;this.isEdit=!1;this.equipmentRegistryId=null;this.isProcedure=!1;n.vm=this;this.$rootScope.$on("equipmentSelector",function(n,t){t!=null&&t.canoticeContractLotId!=null&&(f.canoticeContractLotId=t.canoticeContractLotId,f.isEdit=t.isEdit,f.equipmentRegistryId=t.equipmentRegistryId,f.isProcedure=t.isProcedure);f.init()});this.$rootScope.$on("onEquipmentSelectorClose",function(){f.cancelEquipmentWindow()})}return n.prototype.init=function(){var n=this;this.canoticeContractId=this.$scope.canoticeContractId;this.isProcedure=this.$scope.isProcedure==0?!1:!0;this.api.Common.getLotsList(this.canoticeContractId,this.isProcedure).then(function(t){n.lots=t;n.svc.isLoading=!1},function(){}).finally(function(){n.svc.isLoading=!1});this.availabilityModel={availabilityList:[]};this.showValidationMessage=!1;this.isEdit==!0&&(this.svc.isLoading=!0,this.api.Common.getEquipmentRegistryView(this.equipmentRegistryId,this.canoticeContractLotId,this.isProcedure).then(function(t){n.viewModel=t;n.availabilityModel.availabilityList=n.viewModel.availabilityList;n.lots.length>0&&(n.selectedLot={id:n.canoticeContractLotId,text:""})},function(){n.svc.isLoading=!1}).finally(function(){n.svc.isLoading=!1}))},n.prototype.addPeriod=function(){this.availabilityModel.availabilityList.push(this.availabilitySet);this.availabilitySet=null},n.prototype.removePeriod=function(n){this.availabilityModel.availabilityList.splice(n,1)},n.prototype.saveAvailabilityPeriod=function(){var n=this;this.selectedLot!=null&&this.selectedLot.id!=null&&(this.availabilityModel.lotId=this.selectedLot.id);this.viewModel!=null&&this.viewModel.model!=null&&this.viewModel.model.equipmentRegistryId!=null&&(this.availabilityModel.equipmentId=this.viewModel.model.equipmentRegistryId);this.availabilityModel.canoticeContractId=this.canoticeContractId;this.canoticeContractLotId!=null&&this.canoticeContractLotId>0&&(this.availabilityModel.lotId=this.canoticeContractLotId);this.svc.isLoading=!0;this.isEdit?this.api.Common.modifyAssociateEquipment(this.availabilityModel).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages("Operatia a fost salvata cu succes!"),n.cancelAfterSaveEquipmentSelector(),n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",0),n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",0))},function(t){n.svc.isLoading=!1;n.svc.modalService.showErrorMessage(t.errors)}).finally(function(){n.svc.isLoading=!1}):this.api.Common.saveAssociateEquipment(this.availabilityModel).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages("Operatia a fost salvata cu succes!"),n.cancelAfterSaveEquipmentSelector(),n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",0),n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",0))},function(t){n.svc.isLoading=!1;n.svc.modalService.showErrorMessage(t.errors)}).finally(function(){n.svc.isLoading=!1})},n.prototype.searchEquipment=function(){var n=this;this.searchModel={};this.selectedParticipant!=null&&this.selectedParticipant.id!=null&&(this.searchModel.entityId=this.selectedParticipant.id);this.selectedParticipantProcedure!=null&&this.selectedParticipantProcedure.id!=null&&(this.searchModel.entityId=this.selectedParticipantProcedure.id);this.selectedEquipmentUniqueIndentifiers!=null&&this.selectedEquipmentUniqueIndentifiers.id!=null&&(this.searchModel.equipmentRegistryId=this.selectedEquipmentUniqueIndentifiers.id);this.searchModel.entityId==null&&this.searchModel.equipmentRegistryId==null&&this.svc.modalService.showErrorMessage("Completati filtrele pentru a putea identifica utilajul!");this.svc.isLoading=!0;this.api.Common.searchEquipment(this.searchModel).then(function(t){n.viewModel=t;n.showValidationMessage=n.viewModel.model==null?!0:!1},function(t){n.svc.isLoading=!1;n.svc.modalService.showErrorMessage(t)}).finally(function(){n.svc.isLoading=!1})},n.prototype.goToEquipmentRegistry=function(){var n=this;n.svc.userService.currentUserIsCa()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",0,":resetFilter",0,":isProcedure",0);n.svc.userService.currentUserIsOf()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",0,":resetFilter",0,":isProcedure",0);n.svc.userService.currentUserIsSeap()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SEAP.EquipmentRegistryList_Su,":canoticeContractId",0,":resetFilter",0,":isProcedure",0)},n.prototype.cancelEquipmentSelector=function(){this.resetModel();this.$rootScope.$broadcast("closeequipmentSelector",{withSearch:!1})},n.prototype.cancelEquipmentWindow=function(){this.resetModel();this.$rootScope.$broadcast("closeEquipmentwindow")},n.prototype.cancelAfterSaveEquipmentSelector=function(){this.resetModel();this.$rootScope.$broadcast("closeequipmentSelector",{withSearch:!0})},n.prototype.resetModel=function(){this.availabilityModel=null;this.availabilityPeriod=null;this.viewModel=null;this.searchModel=null;this.isEdit=!1;this.showValidationMessage=!1},n.prototype.saveEquipAvailPeriod=function(){var n=this;if(this.viewModel!=null&&this.viewModel.model!=null&&this.viewModel.model.equipmentRegistryId!=null&&(this.periodModel.equipmentId=this.viewModel.model.equipmentRegistryId),this.periodModel.procedureLotId=this.canoticeContractId,this.viewModel!=null&&this.viewModel.sysEquipAvailPeriod!=null&&this.viewModel.sysEquipAvailPeriod.id!=null&&(this.periodModel.sysEquipEvalPeriodId=this.viewModel.sysEquipAvailPeriod.id),this.viewModel==null||this.viewModel.sysEquipAvailPeriod==null||this.viewModel.sysEquipAvailPeriod.id==null){this.svc.modalService.showErrorMessage("Completati perioada de disponibilitate pentru contract!");return}this.svc.isLoading=!0;this.api.Common.saveEquipmentIntervalPeriod(this.periodModel).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages("Operatia a fost salvata cu succes!"),n.cancelAfterSaveEquipmentSelector(),n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",1),n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",n.canoticeContractId,":resetFilter",0,":isProcedure",1))},function(t){n.svc.isLoading=!1;n.svc.modalService.showErrorMessage(t.errors)}).finally(function(){n.svc.isLoading=!1})},n.$inject=["$scope","svc","EquipmentApi","$rootScope","locale"],n}();n.EquipmentSelectorController=t;angular.module("app.controls").directive("equipmentSelector",function(){return{restrict:"E",replace:!0,scope:{canoticeContractId:"@",isProcedure:"@"},templateUrl:"template/common/procedures/equipment-registry/equipment-selector/equipment-selector",controller:t,link:function(){}}})})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(t){var r=function(t){function i(n,i){t.call(this,n,i);this.api="api/Equipment"}return __extends(i,t),i.prototype.getEquipmentRegistryList=function(n){return this.POST(this.api+"/GetEquipmentRegistryList/",n)},i.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/GetExportDocument/",n,{exportType:t})},i.prototype.getFormEquipmentStickyHeader=function(n,t){return this.GET(this.api+"/getFormEquipmentStickyHeader/?canoticeContractId="+n,{isProcedure:t})},i.prototype.addEquipmentRegistry=function(n){return this.POST(this.api+"/AddEquipmentRegistry/",n)},i.prototype.getEquipmentRegistryByUID=function(n){return this.GET(this.api+"/GetEquipmentRegistryByUID/",{equipmentRegistryUID:n,isActive:!0})},i.prototype.getEquipmentRegistryById=function(n){return this.GET(this.api+"/GetEquipmentRegistryById/",{equipmentRegistryID:n})},i.prototype.editEquipmentRegistry=function(n){return this.POST(this.api+"/EditEquipmentRegistry/",n)},i.prototype.deleteEquipmentRegistry=function(n){return this.POST(this.api+"/DeleteEquipmentRegistry/?equipmentRegistryId="+n)},i.prototype.deleteEquipmentCategory=function(n){return this.POST(this.api+"/DeleteEquipmentCategory/?equipmentRegistryId="+n)},i.prototype.canBeDeletedFizic=function(n){return this.GET(this.api+"/CanBeDeletedFizic/",{equipmentRegistryId:n})},i.prototype.getLotsList=function(n,t){return this.GET(this.api+"/GetLotsList/",{caNoticeContractId:n,isProcedure:t})},i.prototype.searchEquipment=function(n){return this.POST(this.api+"/SearchEquipment/",n)},i.prototype.saveAssociateEquipment=function(n){return this.POST(this.api+"/SaveAssociateEquipment/",n)},i.prototype.modifyAssociateEquipment=function(n){return this.POST(this.api+"/ModifyAssociateEquipment/",n)},i.prototype.getEquipmentRegistryByUIDAndType=function(n,t){return this.GET(this.api+"/GetEquipmentRegistryByUID/",{equipmentRegistryUID:n,identifierTypeId:t,isActive:!0})},i.prototype.getEquipmentCategory=function(n,t){return this.GET("api-pub/ComboPub/GetEquipmentCategoryList?filter=&pageIndex="+n+"&pageSize="+t+"&parentId=")},i.prototype.addEquipmentCategory=function(n){return this.POST(this.api+"/AddEquipmentCategory/",n)},i.prototype.modifyEquipmentCategory=function(n){return this.POST(this.api+"/ModifyEquipmentCategory/",n)},i.prototype.validateAddViewRight=function(){return this.GET(this.api+"/ValidateAddViewRight")},i.prototype.getEquipmentCategoryParent=function(n,t){return this.GET("api-pub/ComboPub/GetEquipmentCategoryListParent?filter=&pageIndex="+n+"&pageSize="+t+"&parentId=")},i.prototype.getEquipmentRegistryView=function(n,t,i){return this.GET(this.api+"/GetEquipmentRegistryView/",{equipmentRegistryId:n,canoticeContractLotId:t,isProcedure:i})},i.prototype.deleteEquipmentAssociation=function(n,t){return this.POST(this.api+"/DeleteEquipmentAssociation/?caNoticeContractLotId="+n+"&equipmentRegistryId="+t,{caNoticeContractLotId:n,equipmentRegistryId:t})},i.prototype.saveEquipmentIntervalPeriod=function(n){return this.POST(this.api+"/SaveEquipmentIntervalPeriod/",n)},i.prototype.deleteEquipmentPeriod=function(t,i){return this.POST(this.api+"/DeleteEquipmentPeriod/?procedureLotId="+t+"&equipmentRegistryId="+i,{caNoticeContractLotId:n,equipmentRegistryId:i})},i.prototype.canEditEquipmentList=function(n){return this.GET(this.api+"/CanEditEquipmentList/",{procedureLotId:n})},i.prototype.getEquipmentRegistryListView=function(n){return this.POST(this.api+"/GetEquipmentRegistryListView/",n)},i.prototype.getExportDocumentView=function(n,t){return this.DOWNLOAD(this.api+"/GetExportDocumentView/",n,{exportType:t})},i.prototype.getEquipmentUsageList=function(n){return this.POST(this.api+"/GetEquipmentUsageList/",n)},i.prototype.getExportDocumentUsage=function(n,t){return this.DOWNLOAD(this.api+"/GetExportDocumentUsage/",n,{exportType:t})},i.prototype.getEquipmentOverlapList=function(n){return this.POST(this.api+"/GetEquipmentOverlapList/",n)},i.prototype.getOverlapCalculationMessage=function(){return this.GET(this.api+"/GetOverlapCalculationMessage/")},i.prototype.getEquipmentRegistryHist=function(n){return this.GET(this.api+"/GetEquipmentHistory/",{equipmentRegistryId:n})},i.prototype.getEquipmentRegistryByHistId=function(n){return this.GET(this.api+"/getEquipmentRegistryByHistId/",{equipmentRegistryHistId:n})},i.prototype.equipmentHasHistory=function(n){return this.GET(this.api+"/EquipmentHasHistory/",{equipmentRegistryId:n})},i}(sys.HttpApi),i=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new r(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();t.EquipmentApi=i;angular.module("app.controls").service("EquipmentApi",i)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){this.svc=n;this.api=t;this.$routeParams=i;this.$rootScope=r;this.modelEdit={};this.modelAdd={};this.viewModel={};this.canEditEquipmentUIdType=!1;this.isEditableInfoGen=!1;this.ownedBy=[];this.showHistory=!1;this.showHistoryItem=!1;this.hasEquipmentHistory=!1;this.histModel={};var u=this;u.equipmentId=u.$routeParams.equipmentId;u.equipmentId==0?u.isEditableInfoGen=!0:u.init();u.svc.userService.currentUser!=null&&u.svc.userService.currentUser.isSu&&(this.viewModel.supplier={id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName},this.ownedBy.push({id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName}))}return n.prototype.init=function(){var n=this;n.svc.isLoading=!0;n.api.Common.getEquipmentRegistryById(n.equipmentId).then(function(t){n.viewModel=t;n.originalViewModel=angular.copy(n.viewModel);n.api.Common.canBeDeletedFizic(n.equipmentId).then(function(t){n.canEditEquipmentUIdType=t});n.ownedBy.push({id:n.viewModel.supplier.id,text:n.viewModel.supplier.text})});n.api.Common.equipmentHasHistory(this.equipmentId).then(function(t){n.hasEquipmentHistory=t});this.showHistory=!1;this.showHistoryItem=!1;n.svc.isLoading=!1},n.prototype.back=function(){var n=this;if(n.showHistory||n.showHistoryItem){n.init();return}n.equipmentId==0?(n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",0,":resetFilter",0,":isProcedure",0),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",0,":resetFilter",0,":isProcedure",0),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSeap&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SEAP.EquipmentRegistryList_Seap,":canoticeContractId",0,":resetFilter",0,":isProcedure",0)):this.svc.nav.historyBack()},n.prototype.editGenInfo=function(){this.isEditableInfoGen=!0},n.prototype.cancelEditGenInfo=function(){var n=this;angular.equals(this.viewModel,this.originalViewModel)?this.isEditableInfoGen=!1:this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Info"],this.svc.locale.key["Equipment.Validation.ChangeFieldConfirmationMessage"]).then(function(t){t&&(n.viewModel=angular.copy(n.originalViewModel),n.equipmentCategoryFreeText=n.viewModel.equipmentCategory.text,n.selectedSupplierFreeText=n.viewModel.supplier.text,n.isEditableInfoGen=!1)})},n.prototype.saveEditGenInfo=function(){var n=this;n.MapViewModelToEdit();n.equipmentId==0?n.api.Common.addEquipmentRegistry(n.modelAdd).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.api.Common.getEquipmentRegistryByUID(n.modelAdd.equipmentUid).then(function(t){n.svc.modalService.showSuccessMessages(n.svc.locale.key["Equipment.Info.SaveSuccesful"]);n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam(sys.prv.routes.SU.EditEquipment_Su,":equipmentId",t.equipmentRegistryId);n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.EditEquipment_Ca,":equipmentId",t.equipmentRegistryId)}),n.isEditableInfoGen=!1)}):n.api.Common.editEquipmentRegistry(n.modelEdit).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.isEditableInfoGen=!1,n.svc.modalService.showSuccessMessages(n.svc.locale.key["Equipment.Info.SaveSuccesful"]))})},n.prototype.MapViewModelToEdit=function(){var n=this;n.equipmentId==0?(n.viewModel.sysEquipmentUIDType&&(n.modelAdd.sysEquipmentUIDTypeId=n.viewModel.sysEquipmentUIDType.id),n.modelAdd.equipmentUid=n.viewModel.equipmentUid,n.modelAdd.name=n.viewModel.name,n.modelAdd.supplierId=n.viewModel.supplier?n.viewModel.supplier.id:null,n.modelAdd.equipmentCategoryId=n.viewModel.equipmentCategory?n.viewModel.equipmentCategory.id:null,n.modelAdd.brand=n.viewModel.brand,n.modelAdd.model=n.viewModel.model,n.modelAdd.productionYear=n.viewModel.productionYear,n.modelAdd.lastInspectionDate=n.viewModel.lastInspectionDate,n.modelAdd.ronValue=n.viewModel.ronValue,n.viewModel.sysEquipmentOwnType&&(n.modelAdd.sysEquipmentOwnTypeId=n.viewModel.sysEquipmentOwnType.id),n.modelAdd.info=n.viewModel.info):(n.modelEdit.equipmentRegistryId=n.viewModel.equipmentRegistryId,n.viewModel.equipmentCategory&&(n.modelEdit.equipmentCategoryId=n.viewModel.equipmentCategory.id),n.modelEdit.name=n.viewModel.name,n.viewModel.sysEquipmentUIDType&&(n.modelEdit.sysEquipmentUIDTypeId=n.viewModel.sysEquipmentUIDType.id),n.modelEdit.brand=n.viewModel.brand,n.modelEdit.model=n.viewModel.model,n.modelEdit.productionYear=n.viewModel.productionYear,n.modelEdit.lastInspectionDate=n.viewModel.lastInspectionDate,n.modelEdit.ronValue=n.viewModel.ronValue,n.viewModel.sysEquipmentOwnType&&(n.modelEdit.sysEquipmentOwnTypeId=n.viewModel.sysEquipmentOwnType.id),n.modelEdit.info=n.viewModel.info)},n.prototype.deleteEquipment=function(){var n=this,t;t=n.canEditEquipmentUIdType?"Utilajul urmeaza sa fie sters definitiv din registrul de utilaje. Va rugam confirmati operatiunea!":"Intrucat utilajul este declarat ca fiind disponibil la cel putin o procedura, lot sau contract acesta nu poate fi sters efectiv. Sistemul va marca utilajul ca fiind ”eliminat din registru”. Utilajele cu acest marcaj nu vor mai putea fi modificate sau declarate disponibile la proceduri, fiind considerate sterse. Va rugam confirmati operatiunea!";this.svc.modalService.confirm(this.svc.locale.key["Common.Info.Info"],t).then(function(t){t&&n.api.Common.deleteEquipmentRegistry(n.viewModel.equipmentRegistryId).then(function(t){t.hasError?n.svc.modalService.showErrorMessage(t.responseMessage):(n.svc.modalService.showSuccessMessages(n.svc.locale.key["Equipment.Info.DeleteSuccesful"]),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.path(sys.prv.routes.SU.EquipmentRegistryList_Su),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.path(sys.prv.routes.CA.EquipmentRegistryList_Ca))})})},n.prototype.searchByUID=function(){var n=this;n.api.Common.getEquipmentRegistryByUIDAndType(n.viewModel.equipmentUid,n.viewModel.sysEquipmentUIDType.id).then(function(t){n.viewModel=t;n.viewModel.addDate=null;n.viewModel.lastModDate=null;n.viewModel.isActive=null})},n.prototype.itemDisabled=function(n){return n.dataItem.localeKey=="true"},n.prototype.viewEquipmentHistory=function(){var n=this;this.showHistory=!0;this.api.Common.getEquipmentRegistryHist(this.equipmentId).then(function(t){t&&(n.histModel=t)})},n.prototype.viewEquipmentItemHist=function(n){var t=this;this.api.Common.getEquipmentRegistryByHistId(n).then(function(n){n&&(t.viewModel=n,t.showHistoryItem=!0)})},n.Cfg={Name:"ADD-EQUIPMENT"},n.$inject=["svc","EquipmentApi","$routeParams","$rootScope"],n}();n.Ctrl_Edit_Equipment=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u,f,e){this.$scope=n;this.$routeParams=t;this.svc=i;this.$window=r;this.locale=u;this.api=f;this.$rootScope=e;this.canEditEquipmentList=!1;this.init()}return n.prototype.init=function(){var t=this,n;this.canoticeContractId=parseInt(this.$routeParams.canoticeContractId);this.isProcedure=parseInt(this.$routeParams.isProcedure);this.canoticeContractId!=null&&this.canoticeContractId>0&&this.api.Common.getFormEquipmentStickyHeader(this.canoticeContractId,this.isProcedure==1?!0:!1).then(function(n){t.stickyHeader=n},function(){});(this.canoticeContractId!=null||this.canoticeContractId!=undefined)&&this.isProcedure&&(n=this,n.api.Common.canEditEquipmentList(n.canoticeContractId).then(function(t){console.log();n.canEditEquipmentList=t},function(n){console.log("General DUAE error:"+n.toString())}))},n.prototype.openEquipmentSelector=function(){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector")},n.prototype.goToEquipmentRegistry=function(){var n=this;n.svc.userService.currentUserIsCa()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.CA.EquipmentRegistryList_Ca,":canoticeContractId",0,":resetFilter",0,":isProcedure",0);n.svc.userService.currentUserIsOf()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SU.EquipmentRegistryList_Su,":canoticeContractId",0,":resetFilter",0,":isProcedure",0);n.svc.userService.currentUserIsSeap()&&n.svc.nav.pathWithNamedParam3(sys.prv.routes.SEAP.EquipmentRegistryList_Su,":canoticeContractId",0,":resetFilter",0,":isProcedure",0)},n.prototype.back=function(){this.svc.nav.historyBack()},n.Cfg={Name:"ADD-EQUIPMENT-FORM"},n.$inject=["$scope","$routeParams","svc","$window","locale","EquipmentApi","$rootScope"],n}();n.AddEquipmentFormController=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.$rootScope=n;this.svc=t;this.api=i;this.$routeParams=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.ownedBy=[];this.isFormContext=!1;this.isProcedure=!0;this.canEditEquipmentList=!1;this.onEnter=function(n){n.which===13&&this.search()};this.init()}return n.prototype.init=function(){var t=this,n;this.procedureLotId=parseInt(this.$routeParams.procedureLotId);this.supplierId=parseInt(this.$routeParams.supplierId);this.setValidPageSizes();this.search();this.procedureLotId!=null&&this.procedureLotId>0&&this.api.Common.getFormEquipmentStickyHeader(this.procedureLotId,!0).then(function(n){t.stickyHeader=n},function(){});this.isFormContext=this.procedureLotId>0;(this.procedureLotId!=null||this.procedureLotId!=undefined)&&(n=this,n.api.Common.canEditEquipmentList(n.procedureLotId).then(function(t){console.log();n.canEditEquipmentList=t},function(n){console.log("General DUAE error:"+n.toString())}))},n.prototype.populateFilters=function(){this.filter||this.resetFilters();this.selectedEquipmentCategory!=null&&this.selectedEquipmentCategory.id>0&&(this.filter.equipmentCategoryId=this.selectedEquipmentCategory.id);this.selectedFilledByEntity!=null&&this.selectedFilledByEntity.id>0&&(this.filter.entityId=this.selectedFilledByEntity.id);this.selectedProvidedByEntity!=null&&this.selectedProvidedByEntity.id>0&&(this.filter.supplierId=this.selectedProvidedByEntity.id);this.selectedSysEquipmentUidType!=null&&this.selectedSysEquipmentUidType.id>0&&(this.filter.sysEquipmentUIDTypeId=this.selectedSysEquipmentUidType.id);this.filter.procedureLotId=this.procedureLotId;this.filter.procedureLotSupplierId=this.supplierId},n.prototype.reset=function(){this.resetFilters();this.search()},n.prototype.resetFilters=function(){this.filter={sortProperties:[],pageSize:5,startLastModDate:null,endLastModDate:null};this.selectedEquipmentCategory=null;this.selectedFilledByEntity=null;this.svc.userService.currentUser.isSu||(this.selectedProvidedByEntity=null);this.selectedSysEquipmentUidType=null;this.equipmentCategoryFreeText=null;this.equipmentOwnedByFreeText=null;this.equipmentFilledByFreeText=null},n.prototype.search=function(){var n=this,t;this.populateFilters();t=JSON.stringify({sysEquipmentUIDTypeId:this.filter.sysEquipmentUIDTypeId,equipmentUid:this.filter.equipmentUid,name:this.filter.name,brand:this.filter.brand,equipmentCategoryId:this.filter.equipmentCategoryId,supplierId:this.filter.supplierId,entityId:this.filter.entityId,startLastModDate:this.filter.startLastModDate,endLastModDate:this.filter.endLastModDate});t!==this.lastFilterHash&&(this.currentPage=0);this.lastFilterHash=t;this.filter.pageIndex=this.currentPage;this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.api.Common.getEquipmentRegistryListView(this.filter).then(function(t){t.searchTooLong?(n.searchTooLong=!0,n.searchTooLongText=t.searchTooLongText):n.searchTooLong=!1;n.listItems=t.items;n.totalPages=Math.ceil(t.total/n.filter.pageSize);n.totalResults=t.total}).finally(function(){n.svc.isLoading=!1})},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilters();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocumentView(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocumentView(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocumentView(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.NavigateToAddEquipment=function(){var n=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(t.responseMessage);n.svc.isLoading=!1;return}t.hasError||(n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam(sys.prv.routes.SU.AddEquipment_Su,":equipmentId",0),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.AddEquipment_Ca,":equipmentId",0))},function(t){n.svc.modalService.showErrorMessage(t);n.svc.isLoading=!1;return}).finally(function(){n.svc.isLoading=!1})},n.prototype.navigateToView=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(i){i.hasError&&(t.svc.modalService.showErrorMessage(i.responseMessage),t.svc.isLoading=!1);i.hasError||(t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSu&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SU.EditEquipment_Su,":equipmentId",n.equipmentRegistryId),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isCa&&t.svc.nav.pathWithNamedParam(sys.prv.routes.CA.EditEquipment_Ca,":equipmentId",n.equipmentRegistryId),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSeap&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SEAP.ViewEquipment_SEAP,":equipmentId",n.equipmentRegistryId))},function(n){t.svc.modalService.showErrorMessage(n);t.svc.isLoading=!1}).finally(function(){t.svc.isLoading=!1})},n.prototype.back=function(){this.svc.nav.historyBack()},n.prototype.editPeriod=function(n,t){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector",{canoticeContractLotId:n,isEdit:!0,equipmentRegistryId:t,isProcedure:this.supplierId})},n.prototype.deleteEquipmentFromContract=function(n,t,i){var r=this,u,f,e;u="Retragere utilaj din formularul de disponibilitate la contract";i?(e="ATENTIE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. <\/br><\/br> Va rugam sa stergeti mai intai perioadele de utilizare",this.svc.modalService.confirmCustomEquipmentRegistryNoCancel(u,e,"Modifica perioade utilizare").then(function(i){i&&r.editPeriod(n,t)})):(f="ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. Acesta se va regasi in continuare la nivelul procedurii de achizitie la oferta depusa. <\/br><\/br> Este posibila re-asocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!",this.svc.modalService.confirmCustomEquipmentRegistry(u,f,"Confirma retragerea","Renunta").then(function(i){i&&(r.svc.isLoading=!0,r.api.Common.deleteEquipmentAssociation(n,t).then(function(n){n&&(r.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),r.svc.isLoading=!1,r.search())},function(n){r.svc.modalService.showErrorMessage(n);r.svc.isLoading=!1}).finally(function(){r.svc.isLoading=!1}))}))},n.prototype.deleteEquipmentFromProcedure=function(n,t){var i=this,r,u;r="Retragere utilaj din formularul de disponibilitate la contract";u="ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. Acesta se va regasi in continuare la nivelul procedurii de achizitie la oferta depusa. <\/br><\/br> Este posibila re-asocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!";this.svc.modalService.confirmCustomEquipmentRegistry(r,u,"Confirma retragerea","Renunta").then(function(r){r&&(i.svc.isLoading=!0,i.api.Common.deleteEquipmentPeriod(n,t).then(function(n){n&&(i.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),i.svc.isLoading=!1,i.search())},function(n){i.svc.modalService.showErrorMessage(n);i.svc.isLoading=!1}).finally(function(){i.svc.isLoading=!1}))})},n.$inject=["$rootScope","svc","EquipmentApi","$routeParams","$cookieStore","$timeout"],n.Cfg={Name:"EQUIPMENT-REGISTRY-LIST-VIEW"},n}();n.EquipmentRegistryListView=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.$rootScope=n;this.svc=t;this.api=i;this.$routeParams=r;this.$cookieStore=u;this.$timeout=f;this.listItems=[];this.ownedBy=[];this.isFormContext=!1;this.canEditEquipmentList=!1;this.onEnter=function(n){n.which===13&&this.search()};this.init()}return n.prototype.init=function(){this.equipmentId=parseInt(this.$routeParams.equipmentId);this.filter={sortProperties:[],pageSize:5,dateFrom:null,dateTo:null,isOverlap:!1};this.equipmentId>0&&(this.filter.equipmentId=this.equipmentId);this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&(this.selectedSupplierOnContract={id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName},this.ownedBy.push({id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName}));this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&(this.selectedProvidedByEntity={id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName},this.ownedBy.push({id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName}));this.setValidPageSizes();this.search()},n.prototype.populateFilters=function(){this.filter||this.resetFilters();this.selectedSysEquipmentUidType!=null&&this.selectedSysEquipmentUidType.id>0&&(this.filter.uIDType=this.selectedSysEquipmentUidType.id);this.selectedProvidedByEntity!=null&&this.selectedProvidedByEntity.id>0&&(this.filter.ownBy=this.selectedProvidedByEntity.id);this.selectedAuthorityOnContract!=null&&this.selectedAuthorityOnContract.id>0&&(this.filter.contractingAuthority=this.selectedAuthorityOnContract.id);this.selectedSupplierOnContract!=null&&this.selectedSupplierOnContract.id>0&&(this.filter.caNoticeContractWinner=this.selectedSupplierOnContract.id)},n.prototype.reset=function(){this.resetFilters();this.search()},n.prototype.resetFilters=function(){this.filter={sortProperties:[],pageSize:5,dateFrom:null,dateTo:null,isOverlap:this.filter.isOverlap};this.selectedEquipmentCategory=null;this.selectedAuthorityOnContract=null;this.svc.userService.currentUser.isSu||(this.ownByEntity=null,this.selectedProvidedByEntity=null);this.selectedSysEquipmentUidType=null;this.equipmentCategoryFreeText=null;this.equipmentOwnedByFreeText=null;this.equipmentAuthorityOnContractFreeText=null;this.equipmentSupplierOnContractByFreeText=null;this.selectedSupplierOnContract=null},n.prototype.search=function(){var n=this,t;this.populateFilters();t=JSON.stringify({sysEquipmentUIDTypeId:this.filter.uIDType,equipmentUid:this.filter.uID,caNoticeNumber:this.filter.caNoticeNumber,noticeNumber:this.filter.noticeNumber,ownBy:this.filter.ownBy,contractingAuthority:this.filter.contractingAuthority,caNoticeContractWinner:this.filter.caNoticeContractWinner,dateFrom:this.filter.dateFrom,dateTo:this.filter.dateTo,isOverlap:this.filter.isOverlap});t!==this.lastFilterHash&&(this.currentPage=0);this.lastFilterHash=t;this.filter.pageIndex=this.currentPage;this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=5);this.filter.isOverlap==!1?this.api.Common.getEquipmentUsageList(this.filter).then(function(t){t.searchTooLong?(n.searchTooLong=!0,n.searchTooLongText=t.searchTooLongText):n.searchTooLong=!1;n.listItems=t.items;n.totalPages=Math.ceil(t.total/n.filter.pageSize);n.totalResults=t.total}).finally(function(){n.svc.isLoading=!1}):(this.api.Common.getOverlapCalculationMessage().then(function(t){n.overlapCalculationMessage=t}),this.api.Common.getEquipmentOverlapList(this.filter).then(function(t){t.searchTooLong?(n.searchTooLong=!0,n.searchTooLongText=t.searchTooLongText):n.searchTooLong=!1;n.listItems=t.items;n.totalPages=Math.ceil(t.total/n.filter.pageSize);n.totalResults=t.total}).finally(function(){n.svc.isLoading=!1}))},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilters();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocumentUsage(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocumentUsage(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocumentUsage(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.back=function(){this.svc.nav.historyBack()},n.$inject=["$rootScope","svc","EquipmentApi","$routeParams","$cookieStore","$timeout"],n.Cfg={Name:"EQUIPMENT-USAGE-LIST"},n}();n.EquipmentUsageList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){var e=this;this.$rootScope=n;this.svc=t;this.api=i;this.$routeParams=r;this.$cookieStore=u;this.$timeout=f;this.categoryToAdd={};this.categoryToModify={};this.listItems=[];this.listItems2=[];this.listItems3=[];this.items222=[];this.list=[];this.ownedBy=[];this.isFormContext=!1;this.canEditEquipmentList=!1;this.onEnter=function(n){n.which===13&&this.search()};this.init();n.$on("closeequipmentSelector",function(n,t){e.equipmentSelectorWindow.close();t!=null&&t.withSearch&&e.search()})}return n.prototype.init=function(){var t=this,n;this.canModify=!0;this.getEquipmentCategory();this.canoticeContractId=parseInt(this.$routeParams.canoticeContractId);this.isProcedure=parseInt(this.$routeParams.isProcedure);this.svc.userService.currentUser!=null&&this.svc.userService.currentUser.isSu&&!this.isProcedure&&(this.selectedProvidedByEntity={id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName},this.ownedBy.push({id:this.svc.userService.currentUser.entity.entityID,text:this.svc.userService.currentUser.entity.fiscalNumber+" "+this.svc.userService.currentUser.entity.entityName}));this.setValidPageSizes();this.search();this.canoticeContractId!=null&&this.canoticeContractId>0&&this.api.Common.getFormEquipmentStickyHeader(this.canoticeContractId,this.isProcedure==1?!0:!1).then(function(n){t.stickyHeader=n},function(){});this.isFormContext=this.canoticeContractId>0;(this.canoticeContractId!=null||this.canoticeContractId!=undefined)&&(n=this,n.api.Common.canEditEquipmentList(n.canoticeContractId).then(function(t){console.log();n.canEditEquipmentList=t},function(n){console.log("General DUAE error:"+n.toString())}))},n.prototype.clearAddCategory=function(){this.addCode="";this.addActive={};this.addName="";this.selectedCategoryParent={};this.selectedSysEquipmentUidType2={};console.log("am curatat")},n.prototype.addCategoryToDb=function(){var n=this;this.svc.isLoading=!0;console.log("Am ajuns in add category to db");this.categoryToAdd.code=this.addCode;this.categoryToAdd.isActive=this.addActive;this.categoryToAdd.name=this.addName;this.selectedCategoryParent!=null&&(this.categoryToAdd.parentEquipmentCategoryId=this.selectedCategoryParent.id);this.selectedSysEquipmentUidType2!=null&&(this.categoryToAdd.sysEquipmentUidTypeId=this.selectedSysEquipmentUidType2.id);console.log(this.categoryToAdd);this.api.Common.addEquipmentCategory(this.categoryToAdd).then(function(t){t.hasError?(t.responseMessage.indexOf("Identificatorul")>=0||t.responseMessage.indexOf("Denumirea")>=0||t.responseMessage.indexOf("Codul")>=0?n.svc.modalService.showErrorMessage(t.responseMessage):n.svc.modalService.showErrorMessage("Eroare!"),console.log(t.responseMessage)):(n.svc.modalService.showSuccessMessages("Adaugarea a fost realizata cu succes!"),n.addCategoryView.center().close(),n.clearAddCategory())}).finally(function(){n.svc.isLoading=!1})},n.prototype.cancel=function(){console.log("Am ajuns in cancel");this.clearAddCategory();this.addCategoryView.center().close()},n.prototype.modifyCategoryToDb=function(){var t=this,n;this.svc.isLoading=!0;n=this;n.categoryToModify.code=n.modifyCode;console.log("to modify: "+n.categoryToModify.code);n.categoryToModify.isActive=n.modifyActive;console.log("to modify: "+n.categoryToModify.isActive);n.categoryToModify.name=n.modifyName;console.log("to modify: "+n.categoryToModify.name);n.modifyCategoryParent!=null&&(n.categoryToModify.parentEquipmentCategoryId=n.modifyCategoryParent.id,console.log("to modify: "+n.categoryToModify.parentEquipmentCategoryId));n.selectedSysEquipmentUidType3!=null&&(n.categoryToModify.sysEquipmentUidTypeId=n.selectedSysEquipmentUidType3.id,console.log("to modify: "+n.categoryToModify.sysEquipmentUidTypeId));n.categoryToModify.id=n.modifyId;console.log("to modify: "+n.categoryToModify.id);console.log(n.categoryToModify);this.api.Common.modifyEquipmentCategory(this.categoryToModify).then(function(n){n.hasError?(n.responseMessage.indexOf("Identificatorul")>=0||n.responseMessage.indexOf("Denumirea")>=0||n.responseMessage.indexOf("Codul")>=0?t.svc.modalService.showErrorMessage(n.responseMessage):t.svc.modalService.showErrorMessage("Eroare!"),console.log(n.responseMessage)):(t.svc.modalService.showSuccessMessages("Modificarea a fost realizata cu succes!"),t.search(),t.modifyCategory.center().close())}).finally(function(){t.svc.isLoading=!1})},n.prototype.delete=function(n){var t=this;this.svc.modalService.confirmCustomEquipmentRegistry("Doriti sa stergeti asta ?","ATENTE, utilajul va fi sters permanent.<\/br><\/br> Va rugam confirmati operatiunea!","Confirma stergerea","Renunta").then(function(i){i&&(console.log(n),t.svc.isLoading=!0,t.api.Common.deleteEquipmentCategory(n.id).then(function(n){n&&(t.svc.modalService.showSuccessMessages("Utilajul a fost sters cu succes!"),t.svc.isLoading=!1,t.search())},function(n){t.svc.modalService.showErrorMessage(n);t.svc.isLoading=!1}).finally(function(){t.svc.isLoading=!1}))})},n.prototype.cancelModify=function(){this.modifyCategory.center().close()},n.prototype.getEquipmentCategory=function(){var n=this;this.api.Common.getEquipmentCategory("0","10").then(function(t){n.listItems2=t.items;var i=0,r=[];n.listItems2.forEach(function(n){var c=n.toString(),f=n.text.split(";",5),o=f[0],s=f[1],u=f[2],h=f[3],e=f[4],t;console.log(e);t={};u==="True"?(u="Activ",console.log("da "+u)):(console.log("nu "+u),u="Inactiv ("+e+")");t.id=n.id;t.active=u;t.code=o;t.name=s;t.tip=h;r[i]=t;i++});n.list=r;console.log(n.list)}).finally(function(){})},n.prototype.populateFilters=function(){this.filter||this.resetFilters();this.selectedEquipmentCategory!=null&&this.selectedEquipmentCategory.id>0&&(this.filter.equipmentCategoryId=this.selectedEquipmentCategory.id);this.selectedFilledByEntity!=null&&this.selectedFilledByEntity.id>0&&(this.filter.entityId=this.selectedFilledByEntity.id);this.selectedProvidedByEntity!=null&&this.selectedProvidedByEntity.id>0&&(this.filter.supplierId=this.selectedProvidedByEntity.id);this.selectedSysEquipmentUidType!=null&&this.selectedSysEquipmentUidType.id>0&&(this.filter.sysEquipmentUIDTypeId=this.selectedSysEquipmentUidType.id);this.filter.canoticeContractId=this.canoticeContractId;this.filter.isProcedure=this.isProcedure},n.prototype.reset=function(){this.resetFilters();this.search()},n.prototype.resetFilters=function(){this.filter={sortProperties:[],pageSize:10,startLastModDate:null,endLastModDate:null};this.selectedEquipmentCategory=null;this.selectedFilledByEntity=null;this.svc.userService.currentUser.isSu||(this.selectedProvidedByEntity=null);this.selectedSysEquipmentUidType=null;this.equipmentCategoryFreeText=null;this.equipmentOwnedByFreeText=null;this.equipmentFilledByFreeText=null},n.prototype.search=function(){var n=this,t;this.populateFilters();t=JSON.stringify({sysEquipmentUIDTypeId:this.filter.sysEquipmentUIDTypeId,equipmentUid:this.filter.equipmentUid,name:this.filter.name,brand:this.filter.brand,equipmentCategoryId:this.filter.equipmentCategoryId,supplierId:this.filter.supplierId,entityId:this.filter.entityId,startLastModDate:this.filter.startLastModDate,endLastModDate:this.filter.endLastModDate});t!==this.lastFilterHash&&(this.currentPage=0);this.lastFilterHash=t;this.filter.pageIndex=this.currentPage;this.svc.isLoading=!0;this.filter.pageSize||(this.filter.pageSize=10);this.api.Common.getEquipmentCategory(this.currentPage.toString(),this.filter.pageSize.toString()).then(function(t){t.searchTooLong?(n.searchTooLong=!0,n.searchTooLongText=t.searchTooLongText):n.searchTooLong=!1;n.listItems2=t.items;var i=0,r=[];n.listItems2.forEach(function(n){var c=n.toString(),f=n.text.split(";",5),o=f[0],s=f[1],u=f[2],h=f[3],e=f[4],t;console.log(e);t={};u==="True"?(u="Activ",console.log("da "+u)):(u="Inactiv ("+e+")",console.log("nu "+u));t.id=n.id;t.active=u;t.code=o;t.name=s;t.tip=h;r[i]=t;i++});n.list=r;console.log(n.list);n.totalPages=Math.ceil(t.total/n.filter.pageSize);n.totalResults=t.total}).finally(function(){n.svc.isLoading=!1})},n.prototype.openEquipmentSelector=function(){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector")},n.prototype.exportData=function(n){var t=this;if(this.totalResults>this.svc.configService.cfg.MaxExportItems_NoticeList){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxExportItems_NoticeList);return}this.populateFilters();this.svc.isLoading=!0;n=="excel"?this.api.Common.getExportDocument(this.filter,common.ExportType.Excel).finally(function(){return t.svc.isLoading=!1}):n=="pdf"?this.api.Common.getExportDocument(this.filter,common.ExportType.Pdf).finally(function(){return t.svc.isLoading=!1}):n=="csv"&&this.api.Common.getExportDocument(this.filter,common.ExportType.Csv).finally(function(){return t.svc.isLoading=!1})},n.prototype.selectPage=function(n){n>=this.totalPages||n<0||(this.currentPage=n,this.search())},n.prototype.confirmModify=function(n){var e=this,i,t,r,f,u,o;this.modifyCategory.center().open();i=this;i.modifyCode=n.code;i.modifyName=n.name;i.selectedSysEquipmentUidType3={};i.modifyCategoryParent={};t=0;i.modifyId=n.id;switch(n.tip.trim()){case"Numar de serie":t=1;break;case"Serial number":t=1;break;case"Numar de serie masina de baza":t=2;break;case"Base vehicle serial number":t=2;break;case"Serie sasiu":t=3;break;case"Chassis series":t=3;break;case"Serie sasiu masina de baza":t=4;break;case"Base vehicle chassis series":t=4;break;case"Numar de fabricatie alocat de producator":t=5;break;case"Manufacturing number assigned by the manufacturer":t=5;break;case"Numar de identificare alocat de producator":t=6;break;case"Identification number assigned by the manufacturer":t=6;break;case"Numarul european al vehiculului (NEV)":t=7;break;case"European Vehicle Number (EVN)":t=7}i.selectedSysEquipmentUidType3.id=t;i.modifyActive=n.active=="Activ"?!0:!1;r="";f="";n.code.indexOf(".")>=0?(i.canModify=!0,r=n.code.split(".",2),f=r[0]):(r=n.code,i.canModify=!1,f=r);u=0;o=0;this.api.Common.getEquipmentCategoryParent("0","100").then(function(n){e.listItems3=n.items;e.listItems3.forEach(function(t){var r=t.text.split(" ",4),e=r[0],s=r[1],h=r[2],c=r[3];f==e&&i.canModify==!0&&(console.log(t.text+" "+u),o=u,i.modifyCategoryParent=n.items[u],console.log(i.modifyCategoryParent));u++})}).finally(function(){})},n.prototype.addCategory=function(){this.addCategoryView.center().open();console.log("aici in add category")},n.prototype.canSelectPreviousPage=function(){return this.currentPage&&this.totalPages&&this.currentPage>0},n.prototype.canSelectNextPage=function(){return this.currentPage&&this.totalPages&&this.currentPage<this.totalPages-1},n.prototype.setValidPageSizes=function(){this.validPageSizes=[10,25,50,100]},n.prototype.NavigateToAddEquipment=function(){var n=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(t){if(t.hasError){n.svc.modalService.showErrorMessage(t.responseMessage);n.svc.isLoading=!1;return}t.hasError||(n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isSu&&n.svc.nav.pathWithNamedParam(sys.prv.routes.SU.AddEquipment_Su,":equipmentId",0),n.svc.userService.currentUser!=null&&n.svc.userService.currentUser.isCa&&n.svc.nav.pathWithNamedParam(sys.prv.routes.CA.AddEquipment_Ca,":equipmentId",0))},function(t){n.svc.modalService.showErrorMessage(t);n.svc.isLoading=!1;return}).finally(function(){n.svc.isLoading=!1})},n.prototype.navigateToView=function(n){var t=this;this.svc.isLoading=!0;this.api.Common.validateAddViewRight().then(function(i){i.hasError&&(t.svc.modalService.showErrorMessage(i.responseMessage),t.svc.isLoading=!1);i.hasError||(t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSu&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SU.EditEquipment_Su,":equipmentId",n.equipmentRegistryId),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isCa&&t.svc.nav.pathWithNamedParam(sys.prv.routes.CA.EditEquipment_Ca,":equipmentId",n.equipmentRegistryId),t.svc.userService.currentUser!=null&&t.svc.userService.currentUser.isSeap&&t.svc.nav.pathWithNamedParam(sys.prv.routes.SEAP.ViewEquipment_SEAP,":equipmentId",n.equipmentRegistryId))},function(n){t.svc.modalService.showErrorMessage(n);t.svc.isLoading=!1}).finally(function(){t.svc.isLoading=!1})},n.prototype.back=function(){this.svc.nav.historyBack()},n.prototype.editPeriod=function(n,t){this.equipmentSelectorWindow.center().open();this.$rootScope.$broadcast("equipmentSelector",{canoticeContractLotId:n,isEdit:!0,equipmentRegistryId:t,isProcedure:this.isProcedure})},n.prototype.deleteEquipmentFromContract=function(n,t,i){var r=this,u="Retragere utilaj din formularul de disponibilitate la contract",f,e;i?(e="ATENTIE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. <\/br><\/br> Va rugam sa stergeti mai intai perioadele de utilizare",this.svc.modalService.confirmCustomEquipmentRegistryNoCancel(u,e,"Modifica perioade utilizare").then(function(i){i&&r.editPeriod(n,t)})):(f="ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu a fost utilizat si nici nu va fi utilizat la acest contract. Acesta se va regasi in continuare la nivelul procedurii de achizitie la oferta depusa. <\/br><\/br> Este posibila re-asocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!",this.svc.modalService.confirmCustomEquipmentRegistry(u,f,"Confirma retragerea","Renunta").then(function(i){i&&(r.svc.isLoading=!0,r.api.Common.deleteEquipmentAssociation(n,t).then(function(n){n&&(r.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),r.svc.isLoading=!1,r.search())},function(n){r.svc.modalService.showErrorMessage(n);r.svc.isLoading=!1}).finally(function(){r.svc.isLoading=!1}))}))},n.prototype.deleteEquipmentFromProcedure=function(n,t){var i=this;this.svc.modalService.confirmCustomEquipmentRegistry("Retragere utilaj din formularul de disponibilitate la contract","ATENTE, utilajul urmeaza sa fie retras din formularul de utilaje disponibile la contract ceea ce semnifica faptul ca nu va fi utilizat la acest contract.<\/br><\/br> Este posibila reasocierea acestuia la contract in viitor. <\/br><\/br> Va rugam confirmati operatiunea!","Confirma retragerea","Renunta").then(function(r){r&&(i.svc.isLoading=!0,i.api.Common.deleteEquipmentPeriod(n,t).then(function(n){n&&(i.svc.modalService.showSuccessMessages("Utilajul a fost dezasociat cu succes!"),i.svc.isLoading=!1,i.search())},function(n){i.svc.modalService.showErrorMessage(n);i.svc.isLoading=!1}).finally(function(){i.svc.isLoading=!1}))})},n.$inject=["$rootScope","svc","EquipmentApi","$routeParams","$cookieStore","$timeout"],n.Cfg={Name:"EQUIPMENT-CATEGORY-LIST"},n}();n.EquipmentCategoryList=t;angular.module("app.controls").controller(t.Cfg.Name,t)})(t=n.Procedure||(n.Procedure={}))})(t=n.procedure||(n.procedure={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$scope=n;this.svc=t;this.$rootScope=i;this.locale=r;this.eFormsFields=[];this.isDfNotice=!0;this.isChangeNotice=!1;this.$rootScope.$$listeners.preValidationView=[];i.$on("preValidationView",function(n,t){u.eFormsValidationResult=t.eFormsValidationResult;u.noticeSubType=t.noticeSubType;u.noticeType=t.noticeType;u.isChangeNotice=t.isChangeNotice;u.init()})}return n.prototype.init=function(){this.$scope.vm=this;this.noticeId=this.$scope.noticeId;this.currentDate=new Date},n.prototype.cancelPreValidation=function(){this.dictionary=null;this.eFormsValidationResult=null;this.$rootScope.$broadcast("closePreValidationNoticeWindow")},n.prototype.viewFieldInfo=function(){var n=this;this.sysEformsField!=undefined&&(this.svc.isLoading=!0,this.svc.ComboApi.GetEformsFieldInfo(this.sysEformsField.id,this.noticeId).then(function(t){n.dictionary=t;n.svc.isLoading=!1},function(t){n.svc.isLoading=!1;n.validationErrors=t}).finally(function(){n.svc.isLoading=!1}))},n.$inject=["$scope","svc","$rootScope","locale"],n}();n.PreValidationController=t;angular.module("app.controls").directive("preValidation",function(){return{restrict:"E",replace:!0,scope:{noticeId:"@"},templateUrl:"template/common/notices/modifications/preValidation/preValidation",controller:t,link:function(){}}})})(t=n.modification||(n.modification={}))})(t=n.notices||(n.notices={}))}(pub||(pub={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u,f){this.$q=n;this.svc=t;this.api=i;this.$routeParams=r;this.$scope=u;this.$sce=f;var e=this;e.noticeId=e.$routeParams.id;e.isNoticeChange=e.$routeParams.isNoticeChange=="1"?!0:!1;this.noticeParams={noticeId:e.noticeId,isNoticeChange:e.isNoticeChange};e.api.GetChangeNoticeView(this.noticeParams).then(function(n){e.model=n;e.html=f.trustAsHtml(n.changeNoticeHtml)})}return n.prototype.printPdf=function(){this.api.getPdfNoticeChange(this.model)},n.prototype.backToList=function(){this.svc.nav.historyBack()},n.ID="NoticeChangeViewController",n.$inject=["$q","svc","ENOTICE_SERVICE","$routeParams","$scope","$sce"],n}();n.NoticeChangeViewController=t;angular.module("app.controls").controller(t.ID,t)})(t=n.caNotice||(n.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(n){function t(t,i,r,u){var f=this,e,o,s;n.call(this);this.$scope=t;this.$q=i;this.svc=r;this.api=u;this.getAll=function(n){var i,t;return f.filter.noticeId=f.noticeId,i=f,f.isFilterSane(f.filter)?(t=f.$q.defer(),i.api.GetAllChangeNotices(n).then(function(n){i.searchResult=n;t.resolve(n.items)},function(n){return t.reject(n)}),t.promise):(console.log("Would not search errata section with both caNoticeId and noticeId empty"),null)};e=this;o=this;t.vm=this;o.caNoticeId=t.canoticeid;o.noticeId=t.noticeid;o.parentNoticeId=this.noticeId;o.init();s=e.svc.locale.key["DCNoticeView.Label.PublicationDate"];this.messageToShowOnModifyClick=this.svc.locale.key["Common.Label.ErrataEforms"];this.svc.locale.loadModule(110).then(function(){e.sortModel={sortProperties:[{columnName:"publicationDateFrom",title:s}],exportToExcel:!0,exportToCsv:!0,exportToPdf:!0,title:e.svc.locale.key["DACatalog.Label.SortingTitle"]};e.search()})}return __extends(t,n),t.prototype.init=function(){this.data.items=null},t.prototype.isFilterSane=function(n){return n.noticeId},t.prototype.reset=function(){n.prototype.reset.call(this);this.filter.noticeId=this.noticeId},t.prototype.populateFilter=function(){this.filter.noticeId=this.parentNoticeId},t.prototype.view=function(n){var i=this,t=null;this.svc.userService.currentUserIsCa()&&(t=sys.prv.routes.CA.NoticeChangeView);this.svc.userService.currentUserIsMon()&&(t=sys.prv.routes.SEAP.NoticeChangeViewMON);this.svc.userService.currentUserIsSeap()&&(t=sys.prv.routes.SEAP.NoticeChangeViewSEAP);this.svc.userService.currentUserIsSu()&&(t=sys.prv.routes.SU.NoticeChangeView);t||(t=sys.pub.routes.NoticeChangeView);this.svc.nav.pathWithNamedParam2(t,":id",n.noticeChangeId,":isNoticeChange",1)},t.prototype.exportData=function(){if(this.total>this.svc.configService.cfg.MaxNumberOfFilesForExport){this.svc.modalService.showInfoMessage(this.svc.locale.key["Common.Label.ErrorMaximumNumberOfRecordsExported"]+this.svc.configService.cfg.MaxNumberOfFilesForExport);return}this.populateFilter()},t.$inject=["$scope","$q","svc","ENOTICE_SERVICE"],t.ID="NoticeChangeSectionListController",t}(n.BaseList);t.NoticeChangeSectionListController=i;angular.module("app.controls").controller(i.ID,i);angular.module("app.controls").directive("noticeChangeSection",function(){return{restrict:"E",replace:!0,scope:{canoticeid:"=",noticeid:"="},controller:i.ID,templateUrl:"template/common/notices/common/changeNotice/noticeChange"}})})(i=t.caNotice||(t.caNotice={}))})(t=n.notices||(n.notices={}))}(common||(common={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t;(function(n){(function(n){n[n.Excel=0]="Excel";n[n.Pdf=1]="Pdf";n[n.Csv=2]="Csv"})(n.ExportType||(n.ExportType={}));var r=n.ExportType,i=function(n){function t(t,i){n.call(this,t,i);this.api="api/Profile"}return __extends(t,n),t.prototype.GetPersonRegistry=function(n){return this.POST(this.api+"/GetPersonRegistry/",n)},t.prototype.GetNaturalPersonById=function(n){return this.GET(this.api+"/GetNaturalPersonById/?personId="+n)},t.prototype.AddPersonToRegistry=function(n){return this.POST(this.api+"/AddPersonToRegistry/",n)},t.prototype.GetPersonRegistryAddressById=function(n){return this.GET(this.api+"/GetPersonRegistryAddressById/?personId="+n)},t.prototype.AddPersonRegistryAddress=function(n){return this.POST(this.api+"/AddPersonRegistryAddress/",n)},t.prototype.GetPersonRegistryFunctionsGetById=function(n){return this.GET(this.api+"/GetPersonRegistryFunctionsGetById/?personId="+n)},t.prototype.AddPersonRegistryFunctions=function(n){return this.POST(this.api+"/AddPersonRegistryFunctions/",n)},t.prototype.GetPersonRegistryAssociations=function(n){return this.GET(this.api+"/GetPersonRegistryAssociations/?personId="+n)},t.prototype.AddPersonRegistryAssociations=function(n){return this.POST(this.api+"/AddPersonRegistryAssociations/",n)},t.prototype.GetCountries=function(){return this.GET(this.api+"/GetCountries/")},t.prototype.GetFunctions=function(){return this.GET(this.api+"/GetFunctions/")},t.prototype.DeletePerson=function(n){return this.POST(this.api+"/DeletePerson/?personId="+n)},t.prototype.InactivatePerson=function(n){return this.POST(this.api+"/InactivatePerson/?personId="+n)},t.prototype.getExportDocument=function(n,t){return this.DOWNLOAD(this.api+"/GetExportDocument/",n,{exportType:t})},t}(sys.HttpApi),t=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"Common",{get:function(){return new i(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.PersonRegistryApi=t;angular.module("app.controls").service("PersonRegistryApi",t)})(t=n.PersonRegistry||(n.PersonRegistry={}))})(t=n.Notices||(n.Notices={}))}(model||(model={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this.$scope=n;this.svc=t;this.api=i;this.$rootScope=r;this.locale=u;this.item={};n.vm=this;this.procedureId=n.procedureId;this.idProcedureLot=n.idProcedureLot;this.init()}return n.prototype.init=function(){this.filter={pageSize:5,pageIndex:0,documentTypeId:null,evaluationPhaseId:null,evaluationTypeId:null,lotId:null};this.loadFilter();this.setValidPageSizes();this.resetFilter();console.log("am ajuns aici in procedure pdf, list, list.ts")},n.prototype.search=function(){var t=this,n=this,i;this.selectedDocumentType!=null&&(this.filter.documentTypeId=this.selectedDocumentType.id);this.selectedEvaluationType!=null&&(this.filter.evaluationTypeId=this.selectedEvaluationType.id);this.selectedEvaluationPhase!=null&&(this.filter.evaluationPhaseId=this.selectedEvaluationPhase.id);this.selectedLot!=null&&(this.filter.lotId=this.selectedLot.id);i=JSON.stringify({documentTypeId:n.filter.documentTypeId,evaluationTypeId:n.filter.evaluationTypeId,evaluationPhaseId:n.filter.evaluationPhaseId,lotId:n.filter.lotId});i!==n.lastFilterHash&&(n.currentPage=0);n.lastFilterHash=i;n.filter.pageIndex=n.currentPage;this.svc.isLoading=!0;this.api.Common.getProcedurePdfDocuments(this.procedureId,this.filter).then(function(i){console.log("rezultatul este:");console.log(i);t.itemList=i.items;t.totalPages=Math.ceil(i.total/n.filter.pageSize);t.totalResults=i.total}).finally(function(){t.svc.isLoading=!1})},n.prototype.loadFilter=function(){var n=this;this.api.Common.getEvaluationTypes().then(function(t){n.evaluationTypes=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationPhases().then(function(t){n.evaluationPhases=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationLots(this.procedureId).then(function(t){n.lots=t}).finally(function(){n.svc.isLoading=!1});this.api.Common.getEvaluationDocumentTypes().then(function(t){n.documentTypes=t}).finally(function(){n.svc.isLoading=!1})},n.prototype.searchNoticeDocuments=function(){this.filter.pageIndex=0;this.currentPage=0;this.search()},n.prototype.setValidPageSizes=function(){this.validPageSizes=[5,10,25,50,100]},n.prototype.resetFilter=function(){this.filter.documentTypeId=null;this.selectedDocumentType=null;this.filter.evaluationTypeId=null;this.selectedEvaluationType=null;this.filter.evaluationPhaseId=null;this.selectedEvaluationPhase=null;this.filter.lotId=null;this.selectedLot=null;this.search()},n.prototype.downloadDocument=function(n){this.svc.downloadUrl(n)},n.prototype.selectPage=function(n){var t=this;n>=t.totalPages||n<0||(t.currentPage=n,t.search())},n.prototype.canSelectPreviousPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage>0},n.prototype.canSelectNextPage=function(){var n=this;return n.currentPage&&n.totalPages&&n.currentPage<n.totalPages-1},n.$inject=["$scope","svc","NoticeDocumentApi","$rootScope","locale"],n}();n.ProcedurePdfController=t;angular.module("app.controls").directive("procedurePdf",function(){return{restrict:"E",replace:!0,scope:{procedureId:"@",sadId:"@",canAddStatement:"@",isOnline:"@",isSad:"@"},templateUrl:"template/common/procedures/procedure-pdf/list/list",controller:t,link:function(){}}})})(t=n.noticeDocument||(n.noticeDocument={}))})(t=n.notices||(n.notices={}))}(pub||(pub={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t;(function(n){var t=function(){function n(n){this.$q=n;this.api="api/CADFNoticeV2"}return Object.defineProperty(n.prototype,"CA",{get:function(){var n=this;return{Products:{fetchMockData:function(){var t=n.$q.defer();return t.resolve([{id:1,name:"Amelioratori",sortiment:"Amelioratori pr.p. culinare",ambalare:"max 1kg",spec:"Produs obținut din legume și zarzavaturi",um:"kg",cantNecesar:5e4,cantMin:1e3,cantMax:1e3,pret:.0422,total:2110,valabilitate:"1-3 luni"},{id:2,name:"Amidon",sortiment:"Amidon alimentar",ambalare:"max 1kg",spec:"SPEC_A1",um:"kg",cantNecesar:2e3,cantMin:100,cantMax:100,pret:2.8,total:2800,valabilitate:"1-3 luni"},{id:3,name:"Arome",sortiment:"Esență lămâie, migdale etc.",ambalare:"250ml",spec:"SPEC_A2",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.051,total:510,valabilitate:"3 luni"},{id:4,name:"Arome",sortiment:"Esență de rom",ambalare:"250ml",spec:"SPEC_A3",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.112,total:1120,valabilitate:"3 luni"},{id:5,name:"Amelioratori",sortiment:"Amelioratori pr.p. culinare",ambalare:"max 1kg",spec:"Produs obținut din legume și zarzavaturi",um:"kg",cantNecesar:5e4,cantMin:1e3,cantMax:1e3,pret:.0422,total:2110,valabilitate:"1-3 luni"},{id:6,name:"Amidon",sortiment:"Amidon alimentar",ambalare:"max 1kg",spec:"SPEC_A1",um:"kg",cantNecesar:2e3,cantMin:100,cantMax:100,pret:2.8,total:2800,valabilitate:"1-3 luni"},{id:7,name:"Arome",sortiment:"Esență lămâie, migdale etc.",ambalare:"250ml",spec:"SPEC_A2",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.051,total:510,valabilitate:"3 luni"},{id:8,name:"Arome",sortiment:"Esență de rom",ambalare:"250ml",spec:"SPEC_A3",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.112,total:1120,valabilitate:"3 luni"},{id:9,name:"Amelioratori",sortiment:"Amelioratori pr.p. culinare",ambalare:"max 1kg",spec:"Produs obținut din legume și zarzavaturi",um:"kg",cantNecesar:5e4,cantMin:1e3,cantMax:1e3,pret:.0422,total:2110,valabilitate:"1-3 luni"},{id:10,name:"Amidon",sortiment:"Amidon alimentar",ambalare:"max 1kg",spec:"SPEC_A1",um:"kg",cantNecesar:2e3,cantMin:100,cantMax:100,pret:2.8,total:2800,valabilitate:"1-3 luni"},{id:11,name:"Arome",sortiment:"Esență lămâie, migdale etc.",ambalare:"250ml",spec:"SPEC_A2",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.051,total:510,valabilitate:"3 luni"},{id:12,name:"Arome",sortiment:"Esență de rom",ambalare:"250ml",spec:"SPEC_A3",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.112,total:1120,valabilitate:"3 luni"},{id:13,name:"Amelioratori",sortiment:"Amelioratori pr.p. culinare",ambalare:"max 1kg",spec:"Produs obținut din legume și zarzavaturi",um:"kg",cantNecesar:5e4,cantMin:1e3,cantMax:1e3,pret:.0422,total:2110,valabilitate:"1-3 luni"},{id:14,name:"Amidon",sortiment:"Amidon alimentar",ambalare:"max 1kg",spec:"SPEC_A1",um:"kg",cantNecesar:2e3,cantMin:100,cantMax:100,pret:2.8,total:2800,valabilitate:"1-3 luni"},{id:15,name:"Arome",sortiment:"Esență lămâie, migdale etc.",ambalare:"250ml",spec:"SPEC_A2",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.051,total:510,valabilitate:"3 luni"},{id:16,name:"Arome",sortiment:"Esență de rom",ambalare:"250ml",spec:"SPEC_A3",um:"litru",cantNecesar:1e3,cantMin:100,cantMax:100,pret:.112,total:1120,valabilitate:"3 luni"},]),t.promise}},Lots:{fetchLotListMockData:function(){var t=n.$q.defer();return t.resolve([{id:101,title:"Modernizare drum județean DJ601",cpvCodes:"45233120-6",executionPlaces:"RO414 Olt",executionAddress:"Str. Constructorilor, nr. 9, Slatina, Olt",publicDescription:"Reabilitare și modernizare drum județean pe o lungime de 15 km. Lucrările includ asfaltare, drenaje și semnalizare rutieră.",contractObject:"Lucrări drumuri"}]),t.promise}}}},enumerable:!0,configurable:!0}),n.$inject=["$q"],n}();n.MockEpcApi=t;var r=function(n){function t(){n.apply(this,arguments);this.api="api/CADFNoticeV2"}return __extends(t,n),t.prototype.GetEcatalogItemById=function(n){return this.GET(this.api+"/GetEcatalogItemById/?id="+n)},t.prototype.UpdateEcatalogItem=function(n){return this.POST(this.api+"/UpdateEcatalogItem/",n)},t.prototype.importECatalogItems=function(n,t){return this.POST(this.api+"/importECatalogItems/?acqProjectId="+t,n)},t.prototype.InsertTemplateLot=function(n){return this.GET(this.api+"/InsertTemplateLot/?acqProjectId="+n)},t.prototype.DeleteEcatalogItemById=function(n){return this.GET(this.api+"/DeleteEcatalogItemById/?id="+n)},t.prototype.DeleteAllEcatalogItems=function(n){return this.GET(this.api+"/DeleteAllEcatalogItems/?id="+n)},t.prototype.AssignLots=function(n){return this.POST(this.api+"/AssignLots/",n)},t.prototype.GetLotTemplate=function(n){return this.GET(this.api+"/GetLotTemplate/?acqProjectId="+n)},t.prototype.RemoveLotAssignment=function(n){return this.POST(this.api+"/RemoveLotAssignment/?eCatalogItemId="+n)},t.prototype.RemoveAllLotAssignment=function(n){return this.POST(this.api+"/RemoveAllLotAssignment/?aqfProjectid="+n)},t}(sys.HttpApi),u=function(n){function t(){n.apply(this,arguments);this.apiCombo="api-pub/comboPub";this.apiCommon="api/DFNotice"}return __extends(t,n),t.prototype.getMeasureUnits=function(){return this.GET(this.apiCombo+"/getMeasureUnits/")},t.prototype.GetAllECatalogItems=function(n){return this.POST(this.apiCommon+"/GetAllECatalogItems/",n)},t.prototype.ExportECatalogItems=function(n,t){return this.DOWNLOAD(this.apiCommon+"/ExportECatalogItems/",n,{exportType:t})},t.prototype.GetDFNoticeLots=function(n){return this.GET(this.apiCommon+"/GetNoticeLotsForECatalogItems/?acqProjectId="+n)},t.prototype.SaveECatalogEncryptedPrices=function(n,t){return this.POST(this.apiCommon+"/SaveECatalogEncryptedPrices/?rfqInvitationSadId="+t,n)},t.prototype.SaveEncryptedPriceForSelectedCatalogItem=function(n,t){return this.POST(this.apiCommon+"/SaveEncryptedPriceForSelectedCatalogItem/?rfqInvitationSadId="+t,n)},t.prototype.GetECatalogStickyHeader=function(n){return this.GET(this.apiCommon+"/GetECatalogStickyHeader/?acqProjectId="+n)},t}(sys.HttpApi),i=function(){function n(n,t){this.$http=n;this.$q=t}return Object.defineProperty(n.prototype,"COMMON",{get:function(){return new u(this.$http,this.$q)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CA",{get:function(){return new r(this.$http,this.$q)},enumerable:!0,configurable:!0}),n.$inject=["$http","$q"],n}();n.SadECatalogApi=i;app.PRIVATE.lazy.service("SadECatalogApi",i);app.PRIVATE.lazy.service("EpcApi",t)})(t=n.epc||(n.epc={}))}(prv||(prv={}))