@senior-gestao-pessoas/payroll-core 9.4.0-f9d3c09b-0079-4f7c-94cf-dd79338e7089 → 9.5.0-d4960af2-4da8-48bf-aac1-4d553cb625ef

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +1192 -778
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +16 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-base.d.ts +27 -0
  6. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +8 -40
  7. package/components/historical-pix-account/historical-pix-account.component.d.ts +38 -8
  8. package/components/historical-pix-account/historical-pix-account.service.d.ts +1 -0
  9. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +10 -1
  10. package/components/shared/index.d.ts +1 -0
  11. package/components/shared/shared-state.service.d.ts +14 -0
  12. package/components/utils/format-utils/format-utils.service.d.ts +30 -3
  13. package/esm2015/components/historical-pix-account/historical-pix-account-base.js +173 -0
  14. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +29 -187
  15. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +223 -20
  16. package/esm2015/components/historical-pix-account/historical-pix-account.module.js +5 -1
  17. package/esm2015/components/historical-pix-account/historical-pix-account.service.js +8 -1
  18. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +42 -4
  19. package/esm2015/components/shared/index.js +2 -0
  20. package/esm2015/components/shared/shared-state.service.js +36 -0
  21. package/esm2015/components/utils/format-utils/format-utils.service.js +88 -5
  22. package/esm2015/public_api.js +2 -1
  23. package/esm2015/senior-gestao-pessoas-payroll-core.js +3 -2
  24. package/esm5/components/historical-pix-account/historical-pix-account-base.js +186 -0
  25. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +53 -201
  26. package/esm5/components/historical-pix-account/historical-pix-account.component.js +265 -49
  27. package/esm5/components/historical-pix-account/historical-pix-account.module.js +5 -1
  28. package/esm5/components/historical-pix-account/historical-pix-account.service.js +8 -1
  29. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +47 -4
  30. package/esm5/components/shared/index.js +2 -0
  31. package/esm5/components/shared/shared-state.service.js +37 -0
  32. package/esm5/components/utils/format-utils/format-utils.service.js +88 -5
  33. package/esm5/public_api.js +2 -1
  34. package/esm5/senior-gestao-pessoas-payroll-core.js +3 -2
  35. package/fesm2015/senior-gestao-pessoas-payroll-core.js +851 -478
  36. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  37. package/fesm5/senior-gestao-pessoas-payroll-core.js +1188 -775
  38. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  39. package/package.json +2 -32
  40. package/public_api.d.ts +1 -0
  41. package/senior-gestao-pessoas-payroll-core.d.ts +2 -1
  42. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -1,2 +1,17 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("primeng/blockui"),require("primeng/progressspinner"),require("@angular/router"),require("@ngx-translate/core"),require("rxjs/operators"),require("primeng/breadcrumb"),require("@angular/common"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/shared"),require("@seniorsistemas/angular-components"),require("moment"),require("rxjs"),require("primeng/tooltip"),require("primeng/table"),require("@angular/common/http"),require("primeng/api"),require("@senior-gestao-pessoas/angular-components"),require("ng2-img-cropper"),require("primeng/button"),require("primeng/dialog"),require("primeng/fileupload"),require("chance"),require("moment-business"),require("primeng/autocomplete"),require("primeng/splitbutton"),require("primeng/components/common/messageservice"),require("@seniorsistemas/senior-platform-data"),require("primeng/toast"),require("ng2-currency-mask"),require("primeng/fieldset"),require("primeng/panel"),require("primeng/confirmdialog")):"function"==typeof define&&define.amd?define("@senior-gestao-pessoas/payroll-core",["exports","@angular/core","@angular/forms","primeng/blockui","primeng/progressspinner","@angular/router","@ngx-translate/core","rxjs/operators","primeng/breadcrumb","@angular/common","primeng/dropdown","primeng/inputmask","primeng/inputtext","primeng/shared","@seniorsistemas/angular-components","moment","rxjs","primeng/tooltip","primeng/table","@angular/common/http","primeng/api","@senior-gestao-pessoas/angular-components","ng2-img-cropper","primeng/button","primeng/dialog","primeng/fileupload","chance","moment-business","primeng/autocomplete","primeng/splitbutton","primeng/components/common/messageservice","@seniorsistemas/senior-platform-data","primeng/toast","ng2-currency-mask","primeng/fieldset","primeng/panel","primeng/confirmdialog"],t):t(((e=e||self)["senior-gestao-pessoas"]=e["senior-gestao-pessoas"]||{},e["senior-gestao-pessoas"]["payroll-core"]={}),e.ng.core,e.ng.forms,e.blockui,e.progressspinner,e.ng.router,e.core$1,e.rxjs.operators,e.breadcrumb,e.ng.common,e.dropdown,e.inputmask,e.inputtext,e.shared,e.angularComponents,e.moment_,e.rxjs,e.tooltip,e.table,e.ng.common.http,e.api,e.angularComponents$1,e.ng2ImgCropper,e.button,e.dialog,e.fileupload,e.chance,e.business,e.autocomplete,e.splitbutton,e.messageservice,e.seniorPlatformData,e.toast,e.ng2CurrencyMask,e.fieldset,e.panel,e.confirmdialog)}(this,(function(e,t,o,n,i,r,a,s,l,p,c,u,d,m,h,y,f,g,b,v,I,S,_,k,w,C,D,T,F,P,A,E,x,M,L,O,R){"use strict";T=T&&T.hasOwnProperty("default")?T.default:T;var B=function(){return(B=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function N(e,t,o,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,o,a):i(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}function V(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function j(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function q(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}}function U(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return a}function Y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(U(arguments[t]));return e}var G,H,K,W,z,$,Q,J,X,Z,ee,te,oe=function(){function e(){}return e.prototype.calcChecker1=function(e){for(var t=null,o=0;o<9;++o)t+=e.toString().charAt(o)*(10-o);var n=t%11;return n<2?0:11-n},e.prototype.calcChecker2=function(e){for(var t=null,o=0;o<10;++o)t+=e.toString().charAt(o)*(11-o);var n=t%11;return n<2?0:11-n},e.prototype.checkCPF=function(e){var t=e.replace(/\.|\-|\s/g,""),o=t.substring(0,9),n=t.substring(9,11);if(11!==t.length)return!1;for(var i=0;i<10;i++)if(""+o+n===Array(12).join(i.toString()))return!1;var r=this.calcChecker1(o),a=this.calcChecker2(o+""+r);return n.toString()===r.toString()+a.toString()},e}(),ne=new oe,ie=function(){function e(){}return e.prototype.checkCNPJ=function(e){var t=e;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return!0;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;o=t.length-2,n=t.substring(0,o),i=t.substring(o),r=0,a=o-7;for(var s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);if((r%11<2?0:11-r%11)!==Number(i.charAt(0)))return!1;o+=1,n=t.substring(0,o),r=0,a=o-7;for(s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);return(r%11<2?0:11-r%11)===Number(i.charAt(1))}return!0},e}(),re=new ie,ae=function(){function e(){this.addStringFormat()}return e.prototype.addStringFormat=function(){if(!String.prototype.hasOwnProperty("format")){var e={format:function(){for(var e=this,t=0;t<arguments.length;t++){var o=new RegExp("\\{"+t+"\\}","gi");e=e.replace(o,arguments[t])}return e}};Object.assign(String.prototype,e)}},e}(),se=new ae,le=function(){function e(){}return N([t.Input()],e.prototype,"blocked",void 0),N([t.Input()],e.prototype,"target",void 0),e=N([t.Component({selector:"block-ui",template:'<p-blockUI [blocked]="blocked">\n <p-progressSpinner [strokeWidth]="5"></p-progressSpinner>\n</p-blockUI>\n',styles:[".ui-widget-overlay{background:#ccc!important;opacity:.5!important}@-webkit-keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}@keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}p-progressspinner{position:absolute!important;top:50%!important;left:50%!important}"]})],e)}(),pe=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,n.BlockUIModule,i.ProgressSpinnerModule],declarations:[le],exports:[le]})],e)}(),ce=function(){function e(e,t,o){this.activatedRoute=e,this.router=t,this.translate=o,this.items=[]}return e.prototype.ngOnInit=function(){var e=this;this.router.events.pipe(s.filter((function(e){return e instanceof r.NavigationEnd}))).subscribe((function(){var t=e.activatedRoute.root;e.items=e.getBreadcrumbs(t,[])}))},e.prototype.getBreadcrumbs=function(e,t){var o=e.children;if(0===o.length)return t;this.generateBreadcrumb(o,t);var n=t.length&&t.length-1||0;return this.title=t[n]&&t[n].label,t},e.prototype.generateBreadcrumb=function(e,t){var o=this;e.forEach((function(e,n){e.snapshot.data.hasOwnProperty("breadcrumb")&&e.snapshot.data.breadcrumb.map((function(n){var i={label:o.translate.instant(n.name),queryParams:e.snapshot.queryParams,routerLink:o.getFormattedUrl(e,n.routerLink),url:o.getFormattedUrl(e,n.url)};n.routerLink&&(i.disabled=!0,i.routerLinkActiveOptions={exact:!0}),t.push(i)})),e.children&&e.children.length&&o.generateBreadcrumb(e.children,t)}))},e.prototype.getFormattedUrl=function(e,t){return t&&(Object.keys(e.snapshot.params).forEach((function(o){t=t.replace(":"+o,e.snapshot.params[o])})),t.includes(":")&&e.parent)?this.getFormattedUrl(e.parent,t):t},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:r.Router},{type:a.TranslateService}]},e=N([t.Component({selector:"c-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [model]="items" ></p-breadcrumb>\n'})],e)}(),ue=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],exports:[p.CommonModule,a.TranslateModule]})],e)}(),de=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,l.BreadcrumbModule,ue],declarations:[ce],exports:[ce]})],e)}(),me=function(){function e(){}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){for(var e in this.control.errors)if(this.control.errors.hasOwnProperty(e)&&(this.control.touched||this.control.dirty))return this.errorList[e];return null},enumerable:!0,configurable:!0}),N([t.Input()],e.prototype,"control",void 0),N([t.Input()],e.prototype,"errorList",void 0),e=N([t.Component({selector:"control-messages-error",template:'<div class="error-message" *ngIf="errorMessage">\n {{ errorMessage | translate }}\n</div>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:13px}"]})],e)}(),he=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[me],exports:[me]})],e)}(),ye=function(){function e(){this.optionsBoolean=[{label:"Selecione",value:""},{label:"Sim",value:"true"},{label:"Não",value:"false"}]}return e.prototype.ngOnInit=function(){},N([t.Input()],e.prototype,"params",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"form",void 0),e=N([t.Component({selector:"custom-fields",template:'<div [ngSwitch]="params.type" [formGroup]="form" *ngIf="form" >\n <div *ngSwitchCase="\'date\'" >\n <input-date-calendar [form]="form" [name]="params.field" ></input-date-calendar>\n </div>\n <div *ngSwitchCase="\'boolean\'" >\n <p-dropdown [options]="optionsBoolean" [name]="params.field"\n [(ngModel)]="params.value" [formControlName]="params.field" [required]="required" [readonly]="readonly"\n [style]="{\'width\': \'100%\'}"\n ></p-dropdown>\n </div>\n <div *ngSwitchDefault >\n <input type="text" *ngIf="!params.mask" pInputText [formControlName]="params.field" />\n <p-inputMask *ngIf="params.mask" [(ngModel)]="params.value" [formControlName]="params.field" [mask]="params.mask" [required]="required" [name]="params.field" [readonly]="readonly" ></p-inputMask>\n </div>\n</div>\n',styles:[""]})],e)}(),fe=y,ge=function(){function e(e){this.localeService=e,this.unmask=!0,this.onBlurGetMoment=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.setFormat(),e.form.get(e.name).value){var o=e.form.get(e.name).value.toString(),n=fe(o,e.format||"YYYY-MM-DD");e.form.get(e.name).setValue(n.format(e.format||"L")),e._date=n}}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.setFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(e){if(e&&e.target&&e.target.value){var t=this.form.get(this.name).value;this._date=fe(t,this.format),this.onBlurGetMoment.emit(this._date)}else this._date={},this.form.get(this.name).setValue(null),this.onBlurGetMoment.emit(null)},Object.defineProperty(e.prototype,"model",{get:function(){var e=this.form.get(this.name).value;return fe(e,this.format)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDateElement",{get:function(){return this._inputDateElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.ViewChild("inputDateElement",{static:!1})],e.prototype,"_inputDateElement",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar",template:'<div [formGroup]="form" >\n <p-inputMask *ngIf="mask" [formControlName]="name"\n [mask]="mask"\n (onBlur)="onBlur($event)"\n [placeholder]="placeholder"\n [attr.disabled]="disabled"\n [unmask]="unmask"\n [inputId]="inputId"\n [readonly]="readonly"\n #inputDateElement\n ></p-inputMask>\n</div>\n'})],e)}(),be=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[ge],exports:[ge]})],e)}(),ve=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,o.ReactiveFormsModule,m.SharedModule,d.InputTextModule,be,c.DropdownModule,u.InputMaskModule],declarations:[ye],providers:[],exports:[ye]})],e)}(),Ie=function(){function e(e){this.elementRef=e,this.el=this.elementRef.nativeElement}return e.prototype.onBlur=function(e){this.cleanVar(e)},e.prototype.cleanVar=function(e){var t=e.trim().replace(/^\s+|\s+$|\s+(?=\s)/g,"");return e!==t&&(this.el.value=t),t},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("blur",["$event.target.value"])],e.prototype,"onBlur",null),e=N([t.Directive({selector:"[name-not-spaces]"})],e)}(),Se=function(){function e(e){this.el=e}return e.prototype.onKeyDown=function(e){var t=e;-1!==[46,8,9,27,13,110,190].indexOf(t.keyCode)||65===t.keyCode&&(t.ctrlKey||t.metaKey)||67===t.keyCode&&(t.ctrlKey||t.metaKey)||86===t.keyCode&&(t.ctrlKey||t.metaKey)||88===t.keyCode&&(t.ctrlKey||t.metaKey)||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=N([t.Directive({selector:"[only-number]"})],e)}(),_e=function(){function e(){}return e=N([t.NgModule({imports:[],declarations:[Se,Ie],exports:[Se,Ie],providers:[],schemas:[]})],e)}();(G=e.UsingType||(e.UsingType={})).TYPE_1="TYPE_1",G.TYPE_2="TYPE_2",G.TYPE_3="TYPE_3",G.TYPE_4="TYPE_4",G.TYPE_6="TYPE_6",G.TYPE_7="TYPE_7",G.TYPE_8="TYPE_8",G.TYPE_9="TYPE_9",G.TYPE_10="TYPE_10",G.TYPE_11="TYPE_11",G.TYPE_12="TYPE_12",G.TYPE_14="TYPE_14",G.TYPE_15="TYPE_15",G.TYPE_16="TYPE_16",G.TYPE_17="TYPE_17",G.TYPE_18="TYPE_18",G.TYPE_19="TYPE_19",G.TYPE_20="TYPE_20",G.TYPE_21="TYPE_21",(H=e.CompanyIndicationType||(e.CompanyIndicationType={})).USE_DEPENDENTS="USE_DEPENDENTS",H.VACCINATION_FREQUENCY="VACCINATION_FREQUENCY",H.APPORTIONMENT_CALCULATION="APPORTIONMENT_CALCULATION",H.USE_WORKSTATION_GROUP_EMPLOYEE="USE_WORKSTATION_GROUP_EMPLOYEE",H.STRUCTURE="STRUCTURE",H.PAY_ANNUITY="PAY_ANNUITY",H.USE_HISTORICAL_BANK_ACCOUNT="USE_HISTORICAL_BANK_ACCOUNT",(e.CoreFieldType||(e.CoreFieldType={})).searchValue="searchValue",(K=e.DirectionEnumeration||(e.DirectionEnumeration={})).ASC="ASC",K.DESC="DESC",(W=e.ModuleType||(e.ModuleType={})).MANAGEMENT_PANEL="MANAGEMENT_PANEL",W.PERFORMANCE_MANAGEMENT="PERFORMANCE_MANAGEMENT",W.CAREER_SUCCESSION="CAREER_SUCCESSION",W.RECRUIT_MANAGEMENT="RECRUIT_MANAGEMENT",W.REMUNERATION_MANAGEMENT="REMUNERATION_MANAGEMENT",W.DEVELOPMENT_MANAGEMENT="DEVELOPMENT_MANAGEMENT",W.PAYROLL="PAYROLL",W.APP="APP",W.MOODS="MOODS",(z=e.Operators||(e.Operators={})).EQUAL="eq",z.DIFFERENT="ne",z.LESS_THAN="it",z.GREATER_THAN="gt",z.LESS__EQUAL_THAN="le",z.GREATER_EQUAL_THAN="ge",z.CONTAINING="containing",z.LOWER="lower",z.AND="and",z.OR="or",($=e.CompareType||(e.CompareType={})).isBefore="isBefore",$.isAfter="isAfter",$.isSame="isSame",$.isSameOrAfter="isSameOrAfter",$.isSameOrBefore="isSameOrBefore",$.isNotSame="isNotSame",(Q=e.ServiceType||(e.ServiceType={})).ENTRY="entry",Q.GENERAL_REGISTER="general_register",Q.ORGANIZATION_REGISTER="organization_register",Q.PAYROLL="payroll",Q.DEPENDENT="dependent",(J=e.HttpRequestType||(e.HttpRequestType={})).POST="post",J.GET="get",(X=e.ReportFormat||(e.ReportFormat={})).PDF="Pdf",X.CSV="Csv",X.HTML="Html",X.XLS="Xls",X.XLSX="Xlsx",X.XML="Xml",X.ODT="Odt",X.RTF="Rtf",(Z=e.ParameterType||(e.ParameterType={})).STRING="String",Z.INTEGER="Integer",Z.DOUBLE="Double",Z.BOOLEAN="Boolean",Z.DATE="Date",Z.DATETIME="DateTime",Z.TIME="Time",Z.OBJECT="Object",(ee=e.MenuType||(e.MenuType={})).DEFAULT="DEFAULT",ee.ACTION="ACTION",(te=e.ReportStage||(e.ReportStage={})).STARTING="Starting",te.COMPILING="Compiling",te.FILLING="Filling",te.EXPORTING="Exporting",te.DONE="Done",te.CANCELLED="Cancelled",te.GENERATED="Generated",te.ERROR="Error";var ke=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.post(""+e,t)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),we=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=1,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.responsive=!0,this.scrollable=!1,this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows)+1)},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?this.dataListService.getList(this.endpoint,B({page:{current:t,size:e,orderBy:this.orderBy}},this.initParameters,this._searchParameters)).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){o.listData=e[o.keyPayload],o.totalRecords=e.countResult,o.lazy&&o.lazyLoad.emit(o.listData)})):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},Object.defineProperty(o.prototype,"parameters",{set:function(e){e&&(this._searchParameters=B({},e),this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:ke}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"totalRecords",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Input()],o.prototype,"responsive",void 0),N([t.Input()],o.prototype,"scrollable",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),o=N([t.Component({selector:"c-data-list-rest",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows" [first]="first"\n (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator" (onPage)="pagination($event)"\n [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey" [sortMode]="sortMode" [responsive]="responsive" [scrollable]="scrollable"\n pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)" [selectionMode]="selectionMode">\n \x3c!-- Colgroup --\x3e\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col *ngFor="let col of columns; let i = index"\n [ngClass]="\'col-\'+i+\' col-scroll-resize\'"/>\n <col [ngClass]="\'col-\'+ (columns?.length || 0) +\' col-scroll-resize\'"/>\n </colgroup>\n </ng-template>\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.field" [pSortableColumnDisabled]="!isSortable || !!col.icon"\n [style.width]="col.width" [pTooltip]="col.tooltip || col.label" tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style" aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default" [model]="getActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label" priority="default"\n (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,providers:[ke],styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),Ce=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[we],exports:[we]})],e)}(),De=function(){function e(e){this.http=e,this.employeeBasicInformations=new f.Subject}return e.prototype.findEmployee=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{employeeId:t})},e.prototype.findEmployeeAutoComplete=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{valueSearch:t})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setEmployeeBasicInformations=function(e){this.employeeBasicInformations.next(e)},e.prototype.getEmployeeBasicInformations=function(){return this.employeeBasicInformations.asObservable()},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Te=y,Fe=function(){function e(e,t){this.activatedRoute=e,this.employeeService=t,this.timetrackingLabel="Status",this.hireLabel="Admissão",this.registerNumberLabel="Matrícula",this.ageLabel="Idade",this.loadingLabel="...",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.emploayeeData={name:this.loadingLabel,jobPosition:this.loadingDescription},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.employeeId&&e.getInformation(t.employeeId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.employeeService.findEmployee("employeeContractualInformations",e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){t.employeeService.setEmployeeBasicInformations(e),t.emploayeeData=B({},e,{timeTrackingResumeType:e.timeTrackingResumeType&&e.timeTrackingResumeType.value});var o=[];if(e.city&&o.push(e.city),e.stateAbbreviation&&o.push(e.stateAbbreviation),t.emploayeeData.location=o.join(" - "),e.hireDate&&(t.emploayeeData.hireDate=t.hireDate?t.hireDate:Te(e.hireDate).format("L")),e.idPicture){var n={fileId:e.idPicture,ttl:2,thumbnail:!1};t.employeeService.blobServiceRequestAccess("blobServiceRequestAccess",n).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.emploayeeData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:De}]},N([t.Input()],e.prototype,"timetrackingLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"registerNumberLabel",void 0),N([t.Input()],e.prototype,"ageLabel",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-employee-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="emploayeeData?.name" [description]="emploayeeData?.jobPosition" [imageSource]="emploayeeData?.photoSource"></s-object-card-main>\n <s-object-card-field [label]="emploayeeData?.employer" [description]="emploayeeData?.location"></s-object-card-field>\n <s-object-card-field [label]="timetrackingLabel" [description]="emploayeeData?.timeTrackingResumeType"></s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="emploayeeData?.hireDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="registerNumberLabel" [description]="emploayeeData?.registernumber" iconClass="fa fa-id-card"></s-object-card-field>\n <s-object-card-field [label]="ageLabel" [description]="emploayeeData?.age" iconClass="fa fa-birthday-cake"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Pe=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Fe],exports:[Fe],providers:[De]})],e)}(),Ae=function(){function e(e){this.http=e,this.admissionDraftBasicInformations=new f.Subject}return e.prototype.findAdmissionDraft=function(e){return this.http.post("hcm/payroll/queries/admissionDraftQuery",{id:e})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setAdmissionDraftBasicInformations=function(e){this.admissionDraftBasicInformations.next(e)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Ee=function(){function e(e,t,o){this.activatedRoute=e,this.admissionDraftSummaryService=t,this.translateService=o,this.hireLabel="Admissão",this.hireDate="...",this.badgeText="Rascunho",this.loadingLabel="...",this.documentNumberLabel="Documento",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.draftData={name:this.loadingLabel,hiringDate:this.hireDate,documentNumber:this.loadingLabel,companyName:this.loadingLabel,localeOfCompany:this.loadingLabel,originDraftType:this.loadingLabel},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.draftId&&e.getInformation(t.draftId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.admissionDraftSummaryService.findAdmissionDraft(e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){if(t.admissionDraftSummaryService.setAdmissionDraftBasicInformations(e),e.hiringDate=t.hireDate,t.draftData=B({},e),t.draftData.originDraftType=t.originType,e.attachment&&e.attachment.fileId){var o={fileId:t.draftData.attachment.fileId,ttl:2,thumbnail:!1};t.admissionDraftSummaryService.blobServiceRequestAccess("blobServiceRequestAccess",o).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.draftData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:Ae},{type:a.TranslateService}]},N([t.Input()],e.prototype,"originType",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"badgeText",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"documentNumberLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-admission-draft-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="draftData?.name"\n [imageSource]="draftData?.photoSource">\n </s-object-card-main>\n <s-object-card-field [label]="draftData.companyName" [description]="draftData.localeOfCompany"></s-object-card-field>\n <s-object-card-field [label]="draftData.originDraftType">\n <span descriptionTemplate class="sds-badge sds-semantic-orange">{{badgeText}}</span>\n </s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="draftData?.hiringDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="documentNumberLabel" [description]="draftData?.documentNumber" iconClass="fa fa-id-card"></s-object-card-field>\n</s-object-card>\n'})],e)}(),xe=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Ee],exports:[Ee],providers:[Ae]})],e)}(),Me=function(){function e(){}return e.prototype.ngOnInit=function(){},e=N([t.Component({selector:"error-page",template:'<div class="ui-g">\n <div class="ui-sm-6 error-code">\n <span>403</span>\n </div>\n <div class="col-sm-6">\n <h4 class="error-title">​{{\'hcm.payroll.permission_error_page\'|translate}}</h4>\n <h5 class="error-description">{{\'hcm.payroll.permission_error_page_description\'|translate}}</h5>\n </div>\n</div>\n',styles:["@media (max-width:767px){.error-code{text-align:center}.error-code>span{color:#697882;font-size:80px;font-weight:300}}@media (min-width:768px){.error-code>span{color:#697882;font-size:128px;font-weight:300;float:right}}.error-title{padding-top:30px}.error-description{color:#999;margin-top:10px}"]})],e)}(),Le=function(){function e(){}return e=N([t.NgModule({imports:[ue],declarations:[Me],exports:[Me],providers:[]})],e)}(),Oe=function(){function e(){this.errorMessage=""}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){var t=this,o=e.inputErrors.currentValue;this.errorMessage="",o&&Object.keys(this.errorDefs).some((function(e){if(o[e])return t.errorMessage=t.errorDefs[e],!0}))},N([t.Input()],e.prototype,"inputErrors",void 0),N([t.Input()],e.prototype,"errorDefs",void 0),N([t.Input()],e.prototype,"field",void 0),N([t.Input()],e.prototype,"onlyShowAfterTouched",void 0),e=N([t.Component({selector:"field-validator",template:'<ng-content></ng-content>\n<div style="color:#a94442;font-size: 13px"\n *ngIf="(onlyShowAfterTouched&&!field.valid&&(field.dirty || field.touched)&&errorMessage) || (!onlyShowAfterTouched&&errorMessage)">\n {{errorMessage | translate}}\n</div>\n'})],e)}(),Re=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[Oe],exports:[Oe],providers:[]})],e)}(),Be=function(){function e(){this.messagesSubjectError=new f.Subject,this.messagesSubjectSuccess=new f.Subject,this.messagesSubjectWarning=new f.Subject}return e.prototype.showError=function(e,t){void 0===t&&(t=!1),this.messagesSubjectError.next({message:e,breakLine:t})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=!1),this.messagesSubjectSuccess.next({message:e,breakLine:t})},e.prototype.showWarning=function(e,t){void 0===t&&(t=!1),this.messagesSubjectWarning.next({message:e,breakLine:t})},e.prototype.loadErrorMessages=function(){return this.messagesSubjectError.asObservable()},e.prototype.loadSuccessMessages=function(){return this.messagesSubjectSuccess.asObservable()},e.prototype.loadWarningMessages=function(){return this.messagesSubjectWarning.asObservable()},e}(),Ne=function(){function o(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return o.prototype.query=function(t,o,n){var i=this;void 0===n&&(n=e.ServiceType.PAYROLL);var r="hcm/"+n+"/queries/"+t;return this.http.post(r,o).pipe(s.catchError((function(e){return e&&403===e.status&&i.messageService.add({severity:"error",summary:i.translateService.instant("hcm.payroll.error"),detail:i.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.enumQuery=function(e,t,o){var n=this;void 0===o&&(o="payroll");var i="hcm/"+o+"/queries/"+e;return this.http.post(i,t).pipe(s.catchError((function(e){return e&&403===e.status&&n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.action=function(e,t){var o=this,n="hcm/payroll/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.recruitmentAction=function(e,t){var o=this,n="hcm/recruitment/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.get=function(e){var t=this,o="hcm/payroll/entities/"+e;return this.http.get(o).pipe(s.catchError((function(e){return 403===e.status&&t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.getAutoComplete=function(t,o,n){var i=this;void 0===n&&(n=e.ServiceType.PAYROLL);var r="hcm/"+n+"/entities/"+t+"?filter="+o+"&size=10&orderby=code+asc";return this.http.get(r).pipe(s.catchError((function(e){return e&&403===e.status&&i.messageService.add({severity:"error",summary:i.translateService.instant("hcm.payroll.error"),detail:i.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.patch=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.patch(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.post=function(e,t){var o=this,n="hcm/payroll/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.put=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.put(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.delete=function(e,t){var o=this,n=t?"hcm/payroll/entities/"+e+"/"+t:"hcm/payroll/entities/"+e;return this.http.delete(n).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},o=N([t.Injectable()],o)}(),Ve=function(){function e(e){this.http=e}return e.prototype.blobServiceRequestUpload=function(e){var t={fileName:e.name,thumbnail:this.isImage(e)};return this.http.action("blobServiceRequestUpload",t)},e.prototype.blobServiceRequestAccess=function(e){var t={fileId:e,tll:2,thumbnail:!1};return this.http.action("blobServiceRequestAccess",t)},e.prototype.blobServiceFileDelete=function(e){var t={fileId:e,thumbnail:!1};return this.http.action("blobServiceDelete",t)},e.prototype.isImage=function(e){return/^image\//.test(e.type)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),je=function(){function e(e,o,n){this.service=e,this.toastService=o,this.translate=n,this.files=[],this.onUploadFile=new t.EventEmitter,this.onRemoveFile=new t.EventEmitter}return e.prototype.uploadHandler=function(e){var t=this,o=[];if(e&&e.files.length){e.files.sort(),e.files.length>10&&e.files[10]&&delete e.files[10];for(var n=this.getFilesCountAndValidate(e.files),i=0;i<n;i++){var r=this.validateFileSize(e.files[i]);i<=9&&r.isUploaded&&!r.complete&&o.push(this.saveFile(r))}f.forkJoin.apply(void 0,Y(o)).subscribe((function(){t.onUploadFile.emit(t.files)}))}},e.prototype.validateFileSize=function(e){return e.isUploaded&&!e.complete&&e.size>5e7&&(e.complete=!0,e.error=this.translate.instant("hcm.payroll.attachments_max_mb"),this.toastService.showError(this.translate.instant("hcm.payroll.attachments_alert_error"))),e},e.prototype.getFilesCountAndValidate=function(e){var t=0;return e.length&&(e.length>10?(t=10,this.toastService.showError(this.translate.instant("hcm.payroll.attachments_max_length"))):t=e.length),t},e.prototype.saveFile=function(e){var t=this;return new f.Observable((function(o){return t.service.blobServiceRequestUpload(e).pipe(s.map((function(e){return e&&e.result}))).subscribe((function(n){return t.doUpload(n,e,o)}),(function(t){e.complete=!0,e.error=t.message,e.objectURL=void 0}))}))},e.prototype.doUpload=function(e,t,o){var n=new XMLHttpRequest;return t.id=e.fileId,t.objectURL=e.locationURI,t.version=e.version,t.progress=0,n.upload.addEventListener("progress",(function(e){t.progress=Math.round(100*e.loaded/e.total)}),!1),n.onreadystatechange=function(){4===n.readyState&&(t.complete=!0,n.status<200||n.status>=300?(t.objectURL=void 0,t.error=n.statusText||"Erro ao anexar arquivo"):t.error=!1,o.next(t),o.complete())},n.open("PUT",t.objectURL,!0),n.setRequestHeader("Translate","f"),n.send(t)},e.prototype.onCancelUpload=function(e){this.files.splice(e,1)},e.prototype.removeFile=function(){this.onRemoveFile.emit(this.files)},e.ctorParameters=function(){return[{type:Ve},{type:Be},{type:a.TranslateService}]},N([t.Input()],e.prototype,"errorTooltip",void 0),N([t.Input()],e.prototype,"files",void 0),N([t.Output()],e.prototype,"onUploadFile",void 0),N([t.Output()],e.prototype,"onRemoveFile",void 0),e=N([t.Component({selector:"c-file-upload",template:'<s-file-upload-deprecated chooseLabel="{{\'hcm.payroll.file_upload_choose_label\'|translate}}"\n cancelLabel="{{\'hcm.payroll.file_upload_cancel_label\'|translate}}"\n removeLabel="{{\'hcm.payroll.file_upload_remove_label\'|translate}}"\n successTooltip="{{\'hcm.payroll.file_upload_success_tooltip\'|translate}}"\n [errorTooltip]="errorTooltip"\n [customUpload]="true" [accept]="\'*/*\'" [multiple]="true"\n (uploadHandler)="uploadHandler($event)" (onCancelUpload)="onCancelUpload($event)"\n (onRemoveFile)="removeFile()" [files]="files"\n></s-file-upload-deprecated>\n'})],e)}(),qe=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,S.FileUploadModuleDeprecated,ue],declarations:[je],providers:[Ve],exports:[je]})],e)}(),Ue=function(){function e(e){this.http=e}return e.prototype.saveImage=function(e,t,o){return V(this,void 0,void 0,(function(){var n,i,r;return j(this,(function(a){switch(a.label){case 0:return e?(n=null,e?n={fileName:e.name}:t&&(n={fileName:t.split("/")[1]}),n?[4,this.blobServiceRequestUpload(o,n).toPromise()]:[3,2]):[2];case 1:return i=a.sent(),(r=new XMLHttpRequest).open("PUT",i.result.locationURI,!0),r.setRequestHeader("Translate","f"),r.send(e),[2,i.result];case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],this.http.request("GET",e,{responseType:"arraybuffer"}).pipe(s.map((function(e){var n=new Blob([e],{type:o});return n.name=t,n})))},e.prototype.getImage=function(e,t,o){return V(this,void 0,void 0,(function(){return j(this,(function(n){switch(n.label){case 0:return e&&e.fileId?[4,this.blobServiceRequestAccess(t,e.fileId,o).toPromise()]:[3,2];case 1:return[2,n.sent().result.locationURI];case 2:return[2]}}))}))},e.prototype.buildUrl=function(e,t){return"hcm/"+e+"/"+t},e.prototype.query=function(e,t,o){var n="queries/"+t;return this.http.post(this.buildUrl(e,n),o)},e.prototype.blobServiceRequestUpload=function(e,t){var o={fileName:t.fileName,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestUpload"),o)},e.prototype.blobServiceRequestAccess=function(e,t,o){var n={fileId:t,tll:2,thumbnail:o};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestAccess"),n)},e.prototype.blobServiceFileDelete=function(e,t){var o={fileId:t,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceDelete"),o)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Ye=function(){function e(e,o){this.imageCropService=e,this.toastService=o,this.service="payroll",this.onClickSave=new t.EventEmitter,this.defaulPerson="assets/default-person.png",this.display=!1,this.imageCrop=[],this.data={},this.cropperSettings=new _.CropperSettings,this.cropperSettings.width=100,this.cropperSettings.height=100,this.cropperSettings.keepAspect=!1,this.cropperSettings.preserveSize=!0,this.cropperSettings.canvasWidth=600,this.cropperSettings.canvasHeight=450,this.cropperSettings.rounded=!0,this.cropperSettings.minWithRelativeToResolution=!1,this.cropperSettings.noFileInput=!0,this.cropperSettings.cropperDrawSettings.strokeColor="rgba(255,255,255,1)",this.cropperSettings.cropperDrawSettings.strokeWidth=1}return Object.defineProperty(e.prototype,"image",{set:function(e){var t=this;e&&e.fileId&&!this.personPhotoLink&&this.imageCropService.blobServiceRequestAccess(this.service,e.fileId,!0).subscribe((function(e){t.personPhotoLink=e.result.locationURI}))},enumerable:!0,configurable:!0}),e.prototype.onUploadHandler=function(e){var t=this;if(this.file=e.files[0],this.file&&this.file.size>5e6)return this.file=null,this.imageCrop=[],void this.toastService.showError("O tamanho máximo permitido para a imagem é de 5MB");this.display=!1;var o=new Image,n=new FileReader;n.onloadend=function(e){o.src=e.target.result,t.cropper.setImage(o)},n.readAsDataURL(this.file),this.display=!0},e.prototype.ngOnInit=function(){this.data.image=null,this.personPhotoLink=null,this.personFirstName="",this.display=!1},e.prototype.showDialog=function(){this.display=!0},e.prototype.onHide=function(){this.display=!1},e.prototype.reset=function(){this.file=null,this.data={},this.imageCrop=[],this.cropper.reset(),this.data.image=null,this.personPhotoLink=null,this.personFirstName=""},e.prototype.saveImage=function(){return V(this,void 0,void 0,(function(){var e,t,o,n=this;return j(this,(function(i){switch(i.label){case 0:return this.file?(e=this.file.name,this.cropper&&this.cropper.image?[4,this.urltoFile(this.cropper.image.image,e)]:[3,2]):(this.onClickSave.emit(null),this.onHide(),[2]);case 1:t=i.sent(),this.personPhotoLink=this.data.image,o=null,this.file?o={fileName:this.file.name}:this.data&&(o={fileName:this.data.fileId.split("/")[1]}),o&&(this,this.imageCropService.blobServiceRequestUpload(this.service,o).subscribe((function(e){var o=new XMLHttpRequest;o.open("PUT",e.result.locationURI,!0),o.setRequestHeader("Translate","f"),o.send(t),n.onClickSave.emit(e.result),n.onHide()}))),i.label=2;case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:o})}))},e.prototype.deleteImage=function(){this.imageCropService.blobServiceFileDelete(this.service,this.data&&this.data.image&&this.data.image.fileId),this.reset()},e.ctorParameters=function(){return[{type:Ue},{type:Be}]},N([t.Input()],e.prototype,"service",void 0),N([t.Output()],e.prototype,"onClickSave",void 0),N([t.ViewChild("cropper",{static:!1})],e.prototype,"cropper",void 0),N([t.Input()],e.prototype,"image",null),e=N([t.Component({selector:"image-crop",template:'<a (click)="showDialog()">\n <span class="result rounded">\n <img class="center-block" style="max-width: 100%; height: auto"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson" [alt]="personFirstName"\n width="auto" height="140">\n </span>\n</a>\n\n<p-dialog [(visible)]="display" modal="true" [minWidth]="450" (onHide)="onHide()">\n <p-header>\n {{\'hcm.payroll.employees_image_cropper_edit\' | translate}}\n </p-header>\n\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-12 img-user-modal" *ngIf="!personPhotoLink">\n <i class="fa fa-user-circle fa-5x"></i>\n <div id="txt-select-image">{{\'hcm.payroll.employees_image_cropper_viewing\' | translate}}</div>\n <div class="ui-md-4 btn-center">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\' | translate}}"></button>\n </div>\n <div class="ui-g-12 ui-md-12" *ngIf="personPhotoLink">\n <span class="result rounded">\n <img class="center-block default-image"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson"\n [alt]="personFirstName"\n width="auto"\n height="140">\n </span>\n </div>\n </div>\n <div class="ui-g" [style.display]="data.image ? \'block\' : \'none\'">\n <div class="ui-md-4 btn-left">\n <p-fileUpload chooseLabel="Selecionar foto"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\'|translate}}"></button>\n </div>\n <div class="ui-md-12">\n <img-cropper #cropper [image]="data" [settings]="cropperSettings"></img-cropper>\n </div>\n </div>\n\n <p-footer>\n <button pButton type="button" class="btn-link ui-button-link" (click)="display=false"\n label="{{\'hcm.payroll.employees_image_cropper_cancel\' | translate}}"></button>\n <button pButton type="button" (click)="saveImage()" label="{{\'hcm.payroll.employees_image_cropper_save\'|translate}}"></button>\n </p-footer>\n</p-dialog>\n',styles:[".center{float:left;position:relative;left:30%}.btn-center{float:left;position:relative;left:33%}.btn-left{float:left;position:relative}.rounded{cursor:pointer}.result.rounded>img{border-radius:50%}div.cropper{height:400px}.center-block{display:block;margin-right:auto;margin-left:auto}.ui-fileupload-choose{width:300px!important}.fa-user-circle{color:#ccc}.img-user-modal{text-align:center!important}#txt-select-image{margin:20px 0;font-weight:700;font-size:16px}"]})],e)}(),Ge=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,w.DialogModule,k.ButtonModule,C.FileUploadModule,_.ImageCropperModule,_.ImageCropperModule,h.ThumbnailModule],declarations:[Ye],providers:[Ue,h.ImageCropperService],exports:[Ye]})],e)}(),He=y,Ke=function(){function e(e){this.localeService=e,this.onBlurGetMoment=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.getFormat(),e.model){var o=e.model,n=He(o,e.format||"YYYY-MM-DD");n.isValid()?(e.model=n.format(e.format||"L"),e._date=n):e._date=null}}))},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.getFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(){var e=this.model;this._date=He(e,this.format),this.onBlurGetMoment.emit(this._date)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"styleClass",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar-model",template:'<p-inputMask *ngIf="mask"\n [mask]="mask"\n (onBlur)="onBlur()"\n [unmask]="unmask"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [(ngModel)]="model"\n [style]="style"\n [styleClass]="styleClass"\n></p-inputMask>\n'})],e)}(),We=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[Ke],exports:[Ke]})],e)}(),ze=y;function $e(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Qe(e){return!Array.isArray(e)||!e.find((function(e){return"object"==typeof e}))}function Je(e){return 0===e||"boolean"==typeof e||null!=e&&""!==e}function Xe(e,t){return void 0===t&&(t=!0),!e||!Ze(e,t)||(t?ze(e.replace(/[^\d]+/g,""),"DDMMYYYY").isValid():ze(e.replace(/[^\d]+/g,""),"MMYYYY").isValid())}function Ze(e,t){if(void 0===t&&(t=!0),e){var o=void 0;return o=t?8:6,e.replace(/[^\d]+/g,"").length===o}return!0}function et(e,t){return-1!==e.search("Date")?tt(t):t}function tt(e,t,o){if(void 0===t&&(t="DDMMYYYY"),void 0===o&&(o="YYYY-MM-DD"),Je(e)){var n=ot(e,t);return ze(e.replace(/[^\d]+/g,""),n).format(o)}}function ot(e,t){return-1!==e.search("/")?"DDMMYYYY":-1!==e.search("-")?"YYYYMMDD":t}function nt(e){return void 0===e&&(e="YYYY-MM-DD"),ze().format(e)}function it(e,t){void 0===t&&(t="DDMMYYYY");var o=ot(e,t);return ze(e.replace(/[^\d]+/g,""),o)}function rt(e,t){return t?ze(e,t):ze(e)}function at(e){var t=[];return Object.entries(e).forEach((function(e){var o=U(e,2),n=o[0],i=o[1];t.push({field:n,value:i})})),t}function st(e){var t={};return e&&e.length&&e.forEach((function(e){"date"===e.type&&e.value&&(e.value=rt(e.value).format("L")),t[e.field]=e.value})),t}function lt(){var e=this;Object.keys(this.controls).map((function(t){var n=e.get(t);n.markAsDirty(),(n instanceof o.FormGroup||n instanceof o.FormArray)&&lt.call(n)}))}function pt(e,t,n,i){n?(e.controls[t].setValidators(o.Validators.compose(i&&i.length?i:[o.Validators.required])),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function ct(e,t,o,n){t?o.forEach((function(t){return e.get(t).enable()})):(o.forEach((function(t){return e.get(t).disable()})),ht(e,n||o))}function ut(e,t,n){n&&n.length?(e.controls[t].setValidators(o.Validators.compose(n)),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function dt(e,t,o,n){void 0===n&&(n=!0),t?(e.get(o).disable(),n&&e.get(o).reset()):e.get(o).enable()}function mt(e,t){return void 0===t&&(t="ASC"),function(o,n){if(!o.hasOwnProperty(e)||!n.hasOwnProperty(e))return 0;var i="string"==typeof o[e]?o[e].toUpperCase():o[e],r="string"==typeof n[e]?n[e].toUpperCase():n[e],a=0;return i>r?a=1:i<r&&(a=-1),"DESC"===t?-1*a:a}}function ht(e,t){t.forEach((function(t){return e.get(t).reset()}))}function yt(e){if(e){var t=e.calendar.dateFormat.toString();return(t=(t=t.replace(/[y]/g,"YY")).replace(/[/]/g,"")).toUpperCase()}}function ft(e){return e?e.toString().replace(/[&\/\\#,+()$~%.'":*?<>{}-]/g,""):null}var gt=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),bt=function(){function o(o){this.service=o,this.forceSelection=!0,this.keyName="name",this.keyToExclude=[],this.usingType=[],this.minCharactersToSearch=3,this.multiple=!1,this.serviceType=e.ServiceType.PAYROLL,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<this.minCharactersToSearch))try{if(this.isTimetrackingSituation)return this.service.query("autocompleteTimetrackingSituation",{valueSearch:n,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDismissalReason){var i={valueSearch:n};return this.referenceDate&&(i.referenceDate=this.referenceDate),this.service.query("autocompleteDismissalReason",i,e.ServiceType.GENERAL_REGISTER).subscribe((function(e){return o.formaterResponce(e.result)}))}if(this.usingType&&this.usingType.length)return this.service.query("autocompleteOtherCompanyFilterUsingType",{searchText:n,usingType:this.usingType}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDepartmentFromCompany)return this.service.query("autocompleteDepartmentQuery",{searchText:n,companyId:this.companyId,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isWagetype){i={searchText:n,companyId:this.companyId};return this.service.query("autocompleteWagetypeQuery",i,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n),this.serviceType).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log(e)}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(t.isTimetrackingSituation||t.isDismissalReason||t.usingType&&t.usingType.length){if(t.keyToExclude.includes(e.fields&&e.fields[2]&&e.fields[2].value))return;var i="";e.fields.map((function(e){n[e.name]=e.value})),i+=e.fields.filter((function(e){return"code"===e.name.toLowerCase()})).map((function(e){return e?e.value+=" - ":""}))[0],!t.usingType||!t.usingType.length||i&&"undefined"!==i||(i=""),i+=e.fields.filter((function(e){return"name"===e.name.toLowerCase()})).map((function(e){return e?e.value:""}))[0],n.name=i,o.push(n)}else{e.fields.map((function(e){n[e.name]=e.value}));var r="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){(e.includes("date")||e.includes("Birthday"))&&(n[e]=rt(n[e]).format("DD/MM/YYYY")),r+=n[e]+" - "})),r=r.slice(0,-3)):(t.keyCode&&(r+=n[t.keyCode]+" - "),t.keyName&&(r+=n[t.keyName])),n.name=r,o.push(n)}})),this.suggestions=Y(o),o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e),enableEntityFilters:this.enableEntityFilters}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){(["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)||Je(e.value))&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},o.prototype.onDropdownClick=function(){this.isDropdown=!0},Object.defineProperty(o.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObject},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:gt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],o.prototype,"_autoCompleteObject",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"enableEntityFilters",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"inputId",void 0),N([t.Input()],o.prototype,"isTimetrackingSituation",void 0),N([t.Input()],o.prototype,"isDepartmentFromCompany",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"referenceDate",void 0),N([t.Input()],o.prototype,"isDismissalReason",void 0),N([t.Input()],o.prototype,"keyToExclude",void 0),N([t.Input()],o.prototype,"usingType",void 0),N([t.Input()],o.prototype,"minCharactersToSearch",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"multiple",void 0),N([t.Input()],o.prototype,"serviceType",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),o=N([t.Component({selector:"input-rest-auto-complete",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],o)}(),vt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[bt],providers:[gt],exports:[bt]})],e)}(),It=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),St=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(it(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(it(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e,enableEntityFilters:this.enableEntityFilters};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.otherContractType&&(t.otherContractType=this.otherContractType),!1===this.filterEmployeeType&&(t.filterEmployeeType=this.filterEmployeeType),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:It}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"otherContractType",void 0),N([t.Input()],e.prototype,"filterEmployeeType",void 0),N([t.Input()],e.prototype,"enableEntityFilters",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-employee",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),_t=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[St],providers:[It],exports:[St]})],e)}(),kt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),wt=function(){function e(e,o){this.service=e,this.activatedRoute=o,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[],this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow)}))},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(it(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(it(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.useWorkflow&&(t.timeTrackingResumeType={key:"FIRED"}),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:kt},{type:r.ActivatedRoute}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-employee-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n</p-autoComplete>\n',styles:[""]})],e)}(),Ct=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,F.AutoCompleteModule,o.ReactiveFormsModule],declarations:[wt],providers:[kt],exports:[wt]})],e)}(),Dt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Tt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyToExclude=[],this.keyToKeep=[],this.multiple=!1,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results[0].items}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(this.suggestions=[],!(isNaN(o)&&o.toString().length<3)){this.keyToExclude&&this.keyToExclude.length?this.payload=this.payload&&this.payload.filter((function(e){return!t.keyToExclude.includes(e.key)})):this.keyToKeep&&this.keyToKeep.length&&(this.payload=this.payload&&this.payload.filter((function(e){return t.keyToKeep.includes(e.key)})));for(var n=0;n<this.payload.length;n++){var i=this.payload[n];-1!==i.value.toLowerCase().indexOf(o.toLowerCase())&&this.suggestions.push(i)}}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.prototype.onClearItem=function(e){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},Object.defineProperty(e.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObjectEl},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:Dt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],e.prototype,"_autoCompleteObjectEl",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"keyToExclude",void 0),N([t.Input()],e.prototype,"keyToKeep",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-enum",template:'<div [formGroup]="form">\n <p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Ft=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Tt],providers:[Dt],exports:[Tt]})],e)}(),Pt=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),At=function(){function o(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.keysToExclude=[],this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<3))try{if(this.isWagetype){var i=B({searchText:n,companyId:this.companyId},this.wagetypeReferenceDates);return this.service.query("autocompleteWagetypeQuery",i,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n)).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(e.fields.map((function(e){n[e.name]=e.value})),!t.keysToExclude.includes(e&&e.tableId)){var i="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){e.includes("date")&&(n[e]=rt(n[e]).format("L")),i+=n[e]+" - "})),i=i.slice(0,-3)):(t.keyCode&&(i+=n[t.keyCode]+" - "),t.keyName&&(i+=n[t.keyName])),n.name=i,o.push(n)}})),this.suggestions=o,o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e)}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){!["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)&&Je(e.value)&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){this.onClear.emit(e)},o.prototype.onBlurItem=function(e){this.onBlur.emit(e)},o.prototype.onFocusItem=function(e){this.onFocus.emit(e)},Object.defineProperty(o.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:Pt}]},N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"style",void 0),N([t.Input()],o.prototype,"inputStyle",void 0),N([t.Input()],o.prototype,"keysToExclude",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"wagetypeReferenceDates",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onFocus",void 0),N([t.Output()],o.prototype,"modelChange",void 0),N([t.Input()],o.prototype,"model",null),o=N([t.Component({selector:"input-rest-auto-complete-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onFocus)="onFocusItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],o)}(),Et=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[At],providers:[Pt],exports:[At]})],e)}(),xt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Mt=function(){function e(e){this.service=e,this.forceSelection=!0,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=e.query;if(this.suggestions=[],!(isNaN(t)&&t.toString().length<3))for(var o=0;o<this.payload[0].items.length;o++){var n=this.payload[0].items[o];-1!==n.value.toLowerCase().indexOf(t.toLowerCase())&&this.suggestions.push(n)}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:xt}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-model-enum",template:'<p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],e)}(),Lt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Mt],providers:[xt],exports:[Mt]})],e)}(),Ot=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Rt=function(){function e(e){this.service=e,this.forceSelection=!0,this.minCharactersToSearch=3,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<this.minCharactersToSearch))try{this.service.query("autocompleteJobpositionQuery",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponse(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponse=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,name:""};e.fields.map((function(e){o[e.name]=e.value})),o.name=o.Code+" - "+o.Name,t.push(o)})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){return{searchText:e,companyId:this.companyId?this.replace(this.companyId):null,creationDate:this.creationDate?this.replace(this.creationDate):null,expirationDate:this.expirationDate?this.replace(this.expirationDate):null,jobpositionsFilter:this.jobpositionsFilter?this.replaceArray(this.jobpositionsFilter):null,ignoredJobpositions:this.ignoredJobpositions?this.replaceArray(this.ignoredJobpositions):null,order:this.order}},e.prototype.replace=function(e){return e.replace(new RegExp("'","g"),"")},e.prototype.replaceArray=function(e){var t=this;return e.map((function(e){return t.replace(e)}))},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:Ot}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"companyId",void 0),N([t.Input()],e.prototype,"creationDate",void 0),N([t.Input()],e.prototype,"expirationDate",void 0),N([t.Input()],e.prototype,"jobpositionsFilter",void 0),N([t.Input()],e.prototype,"ignoredJobpositions",void 0),N([t.Input()],e.prototype,"order",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"minCharactersToSearch",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"onFocus",void 0),e=N([t.Component({selector:"input-rest-auto-complete-jobposition",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Bt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,m.SharedModule,o.ReactiveFormsModule],declarations:[Rt],providers:[Ot],exports:[Rt]})],e)}(),Nt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.prototype.queryEntity=function(e,t){return this.http.get(e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Vt=function(){function e(e,o){this.translateService=e,this.service=o,this.arguments={page:{current:1,size:"10"}},this.alwaysShowPaginator=!1,this.onLoadPayload=new t.EventEmitter,this.loadedList=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.hasOwnProperty("arguments")&&(this.arguments=Object.assign({},e.arguments.currentValue),this.getList(1)),e.hasOwnProperty("reload")&&!0===e.reload.currentValue&&this.getList(1)},e.prototype.getList=function(e){var t=this;this.loadedList.emit(!0);try{var o=Object.assign({},this.arguments);o.page.current=e,this.isEntity?this.service.queryEntity(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o,e),t.loadedList.emit(!1)})):this.service.query(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o.result,e),t.loadedList.emit(!1)}))}catch(e){console.log("Erro ao tentar buscar lista no back")}},e.prototype.onResponseQuery=function(e,t){this.payload=this.filterValues?this.filterValues.bind(this.scope)(e[this.keyPayload]):e[this.keyPayload],this.onLoadPayload.emit({result:e[this.keyPayload],page:t}),this.totalRecords=this.isEntity?e.totalElements:e.countResult},e.prototype.onHandlePage=function(e){var t=e.first/e.rows+1;this.getList(t)},e.prototype.getRowActions=function(e){return this.getRowActionsFun.call(this.scope,e)},e.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},e.ctorParameters=function(){return[{type:a.TranslateService},{type:Nt}]},N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"urlRest",void 0),N([t.Input()],e.prototype,"keyPayload",void 0),N([t.Input()],e.prototype,"columns",void 0),N([t.Input()],e.prototype,"arguments",void 0),N([t.Input()],e.prototype,"filterValues",void 0),N([t.Input()],e.prototype,"getRowActionsFun",void 0),N([t.Input()],e.prototype,"scope",void 0),N([t.Input()],e.prototype,"reload",void 0),N([t.Input()],e.prototype,"isEntity",void 0),N([t.Input()],e.prototype,"alwaysShowPaginator",void 0),N([t.Output()],e.prototype,"onLoadPayload",void 0),N([t.Output()],e.prototype,"loadedList",void 0),e=N([t.Component({selector:"list-rest",template:'<p-table [value]="payload" reorderableColumns="true" [rows]="10" [totalRecords]="totalRecords" [paginator]="true" [pageLinks]="8"\n [alwaysShowPaginator]="alwaysShowPaginator" [responsive]="true" [lazy]="true" (onPage)="onHandlePage($event)">\n <p-column *ngFor="let col of columns;" [field]="col[\'field\']" [header]="col[\'label\']|translate" [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <span>{{data[col[\'field\']]}}</span>\n </ng-template>\n </p-column>\n\n <p-column [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\', \'overflow\': \'inherit\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <p-splitButton *ngIf="getRowActions(data).length > 1" label="{{\'hcm.payroll.action\' | translate}} &#9660;" [model]="getRowActions(data)"\n (onClick)="handleClickActions(button)" #button></p-splitButton>\n <button *ngIf="getRowActions(data).length <= 1" type="button" class="sds-button-aux aux-secondary" (click)="getRowActions(data)[0].command()">\n {{getRowActions(data)[0].label}}\n </button>\n </ng-template>\n </p-column>\n\n <ng-template pTemplate="emptymessage">\n {{ emptyMessage }}\n </ng-template>\n</p-table>\n',styles:["tr{border:1px solid #ddd!important}"]})],e)}(),jt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,b.TableModule,d.InputTextModule,k.ButtonModule,P.SplitButtonModule],declarations:[Vt],providers:[Nt],exports:[Vt]})],e)}(),qt=function(){function e(){}return e=N([t.Component({selector:"spinner-loader",template:"<p-progressSpinner></p-progressSpinner>\n"})],e)}(),Ut=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,i.ProgressSpinnerModule],declarations:[qt],exports:[qt]})],e)}(),Yt=function(){function e(){this.company={},this.contractNationality={},this.contractType={}}return e.prototype.setCompany=function(e){this.company=e},e.prototype.getCompanyId=function(){return this.company.companyId},e.prototype.setContractNationality=function(e){this.contractNationality=e},e.prototype.isBrazilianAdmission=function(){return"BR"===this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isBrazilAndforeignContract=function(){return"BR"===this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isForeignAdmission=function(){return"BR"!==this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isForeignAndforeignContract=function(){return"BR"!==this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isBrazilianCompany=function(){return"BR"===this.company.abbreviation},e.prototype.isNationalContract=function(){return"National"===this.contractNationality.key},e.prototype.getCountryID=function(){return this.company.id},Object.defineProperty(e.prototype,"contractNationalityKey",{get:function(){return this.contractNationality.key},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"abbreviation",{get:function(){return this.company.abbreviation},enumerable:!0,configurable:!0}),e.prototype.getCurrency=function(){return this.company.currency},e.prototype.getStructureID=function(){return this.company.structure},e.prototype.setContractType=function(e){this.contractType=e},Object.defineProperty(e.prototype,"contractTypeKey",{get:function(){return this.contractType?this.contractType.key:this.contractType},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Gt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[Yt]})],e)}(),Ht=y;function Kt(e){return/^\d*$/.test(e)}function Wt(e){return e||!1}function zt(e){return Kt(Wt(e))?Number.parseInt(e):0}var $t=function(){function e(e){this.http=e,this.companyUseWorkstationGroupSubject=new f.Subject}return e.prototype.getCompanyIndications=function(e,t){return this.http.query("companyIndicationQuery",{companyId:e,companyIndicationType:t}).pipe(s.map((function(e){return e.result})))},e.prototype.setCompanyUseWorkstationGroup=function(e){this.companyUseWorkstationGroupSubject.next(e)},e.prototype.setStructure=function(e){this.structure=e},e.prototype.getStructure=function(){return this.structure},e.prototype.getCompanyUseWorkstationGroup=function(){return this.companyUseWorkstationGroupSubject.asObservable()},e.prototype.setUseWorkstationGroup=function(e){this.useWorkstationGroup=e},e.prototype.getUseWorkstationGroup=function(){return this.useWorkstationGroup},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Qt=function(){function e(e){this.http=e}return e.prototype.hasModule=function(e){return this.http.query("hasModule",{module:e})},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Jt=y,Xt=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o,this._httpParams=new v.HttpParams}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.lookupRequest=function(e,t,o,n,i,r,a,s){return void 0===a&&(a=[]),void 0===s&&(s=[]),this.searchLookupFields=o,this.endpoint=t,this.parameters=s,this.concatFields=i,this.concatOtherFields=a,this.lookupDisplayField=r,this.searchFields=n,this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.searchRequest=function(e,t,o,n,i,r,a){return void 0===r&&(r=[]),void 0===a&&(a=[]),this.endpoint=t,this.parameters=a,this.concatFields=n,this.concatOtherFields=r,this.lookupDisplayField=i,this.searchFields=o,this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.getDataLookup=function(){var e=this;return this.getUrlDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(t){var o=t.contents;return e.concatFields&&e.concatFields.length&&o.map((function(t){e.convertGridFieldValue(t),t[e.lookupDisplayField]=e.generateDisplayFieldValue(B({},t))})),t})))},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=Jt(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(i.type,n,e):o=""+t.getParameterByType(i.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(i.type,n,e[n]):t.getParameterByType(i.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+Jt(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq '"+o.id+"'";default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),e.prototype.getUrlDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient),t.ɵɵinject(A.MessageService),t.ɵɵinject(a.TranslateService))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),Zt=y,eo=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,i){var r=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,r,i).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var i=this,r="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),r&&(p=" and "),(s=i.getParameterByType(c,a,t[a],n))&&(r+=" "+p+" "+s)})),r},o.prototype.getParameterByType=function(t,o,n,i){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+Zt(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,i);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,i="";if(e){try{for(var r=q(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";i+=i?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(i+=i?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}i=i?"("+i+")":""}return i},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o(t.ɵɵinject(Ne))},token:o,providedIn:"root"}),o=N([t.Injectable({providedIn:"root"})],o)}(),to="platform/report/queries/getParameters",oo="platform/report/queries/getReportUri",no="platform/report/queries/getReportStatus",io="platform/report/queries/findReportsByName",ro="platform/report/queries/getRunningReports",ao="platform/report/actions/generateReport",so=function(){function e(e){this.http=e}return e.prototype.findReportsByName=function(e){return this.http.post(""+io,{name:e}).pipe(s.map((function(e){return e.reports?e.reports:[]})))},e.prototype.findReportByName=function(e){return e=e||"",this.findReportsByName(e).pipe(s.map((function(t){var o=t&&t.filter((function(t){return t.name&&t.name===e}));return o&&1==o.length?o[0]:null})))},e.prototype.getParameters=function(e,t){return this.http.post(""+to,{id:e,reportFileId:t}).pipe(s.map((function(e){return e||null})))},e.prototype.getReportUri=function(e){return this.http.post(""+oo,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportUri})))},e.prototype.getReportStatus=function(e){return this.http.post(""+no,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportStatus})))},e.prototype.generateReport=function(e){return this.http.post(""+ao,e).pipe(s.map((function(e){return e||null})))},e.prototype.getRunningReports=function(e,t){return this.http.post(""+ro,{offset:e,limit:t,orderByDesc:!0,filterCancelled:!0})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),lo=function(){function e(){this.useWorkflowValueChange=new f.Subject,this._draftJSON=new f.BehaviorSubject(null)}return e.prototype.setUseWorkflow=function(e){this.useWorkflowValueChange.next(e)},e.prototype.getUseWorkflow=function(){return this.useWorkflowValueChange.asObservable()},e.prototype.setDraftJSON=function(e){this._draftJSON.next(e)},e.prototype.getDraftJSON=function(){return this._draftJSON.asObservable()},e=N([t.Injectable()],e)}(),po=function(){function e(){this.resetDivergentFormData()}return e.prototype.resetDivergentFormData=function(){this._divergentFormData={}},e.prototype.checkFormDisagreements=function(e){var t=this;void 0===e&&(e=!1),this.resetDivergentFormData(),this._sanitizeEmptyStrings(),e&&this._removeIdsFromFormDatas(),this._oldFormData===this._newFormData?this._throwIdenticalMessage():(Object.keys(this._oldFormData).forEach((function(e){t._oldFormData[e]!==t._newFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),Object.keys(this._newFormData).forEach((function(e){t._newFormData[e]!==t._oldFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),this._isDivergentFormDataEmpty&&this._throwIdenticalMessage())},e.prototype._removeIdsFromFormDatas=function(){[this._oldFormData,this._newFormData].forEach((function(e){delete e.id}))},e.prototype._sanitizeEmptyStrings=function(){[this._oldFormData,this._newFormData].forEach((function(e){Object.keys(e).map((function(t){""===e[t]&&(e[t]=null)}))}))},e.prototype._createDivergencePair=function(e){var t={oldValue:null,newValue:null};return t.oldValue=this._oldFormData[e],t.newValue=this._newFormData[e],t},e.prototype._throwIdenticalMessage=function(){throw new Error("The objects oldFormData and newFormData are identical")},Object.defineProperty(e.prototype,"oldFormData",{get:function(){return this._oldFormData},set:function(e){this._oldFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newFormData",{get:function(){return this._newFormData},set:function(e){this._newFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"divergentFormArray",{get:function(){var e=[];return Object.entries(this._divergentFormData).map((function(t){var o=U(t,2),n=o[0],i=o[1],r={key:null,oldValue:null,newValue:null};r.key=n,r.oldValue=i.oldValue,r.newValue=i.newValue,e.push(r)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isDivergentFormDataEmpty",{get:function(){return 0===Object.entries(this._divergentFormData).length},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),co=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[$t,Qt,Xt,eo,so,lo,po]})],e)}(),uo=function(){function e(e){var t=this;this.http=e,this.actionUrl="platform/authorization/queries/checkAccess",this.resourceAddress="res://senior.com.br/hcm/payroll/",this.defaultActions=["Visualizar","Incluir","Editar","Excluir"],this._resources=[],this._attributes=[],E.user.getAuthHeader().then((function(e){t.httpOptions={headers:new v.HttpHeaders({"Content-Type":"application/json",Accept:"application/json",Authorization:e})}})),E.service.getRestUrl().then((function(e){return t.restUrl=e}))}return e.prototype.get=function(e){var t=this;return void 0===e&&(e=""),this.permissions?this.observable=f.Observable.of(this.permissions):this.observable||(this.observable=this.getPermissions().pipe(s.map((function(e){return t.permissions=e})))),this.observable.pipe(s.map((function(t){return e?t[e]:t})))},e.prototype.getAbac=function(e,t){return this.attributes=t,this.getAbacPermission(e)},e.prototype.getAbacPermission=function(e){return this.http.post(this.actionUrl,{includeFilters:!1,permissions:[{resource:""+this.resourceAddress+e,action:"Visualizar",attributes:this._attributes.map((function(e){return{attribute:e.name,value:e.value}}))}]},this.httpOptions)},e.prototype.getPermissions=function(){var e=this,t=[];return this._resources.forEach((function(o){return e.defaultActions.forEach((function(n){return t.push({action:n,resource:""+e.resourceAddress+o})}))})),this.http.post(this.actionUrl,{includeFilters:!1,permissions:Y(t)},this.httpOptions).pipe(s.map((function(t){var o=t.permissions,n={};return o.forEach((function(t){var o=t.resource.replace(e.resourceAddress,"");n[o]=n[o]||{},n[o][t.action.toLowerCase()]=t.authorized})),n})))},Object.defineProperty(e.prototype,"attributes",{set:function(e){this._attributes=e},enumerable:!0,configurable:!0}),e.prototype.setResources=function(e){this._resources=e},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),mo=function(){function e(e,t,o){this.toastService=e,this.messageService=t,this.translateService=o,this.key="TOAST",this.breakLine=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.toastService.loadErrorMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createErrorMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadSuccessMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createSuccessMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadWarningMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createWarningMessage(t&&t.message),e.breakLine=t&&t.breakLine}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.createErrorMessage=function(e,t){this.messageService.clear(),this.messageService.add({severity:"error",summary:t||this.translateService.instant("hcm.payroll.error"),detail:e,sticky:!0,key:this.key})},e.prototype.createSuccessMessage=function(e,t){this.messageService.add({severity:"success",summary:t||this.translateService.instant("hcm.payroll.success"),detail:e,key:this.key})},e.prototype.createWarningMessage=function(e,t){this.messageService.add({severity:"warn",summary:t||this.translateService.instant("hcm.payroll.warn"),detail:e,sticky:!0,key:this.key})},e.ctorParameters=function(){return[{type:Be},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Component({selector:"c-toast",template:"\n <p-toast [ngClass]=\"breakLine ? 'ui-toast-break-line' : ''\" [key]=\"key\"></p-toast>\n "})],e)}(),ho=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,x.ToastModule],declarations:[mo],providers:[Be,I.MessageService],exports:[mo]})],e)}(),yo=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.get(""+e,{params:t})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),fo=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=0,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.totalRecordsChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows))},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?(this.configParameters(this.initParameters),this.configHttpParamsDisplayFields(),this.configHttpParamsPagination(e.toString(),t.toString()),this.configHttpParamsOrderBy(),this.dataListService.getList(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){o.listData=e.contents,o.totalRecords=e.totalElements,o.lazy&&o.lazyLoad.emit(o.listData)}))):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},o.prototype.configHttpParamsOrderBy=function(){if(this.orderBy&&this.orderBy.length){var e="";this.orderBy.map((function(t){e+=e?","+t.field+"+"+t.direction:t.field+"+"+t.direction})),this.httpParams=this.httpParams.set("orderby",e)}},o.prototype.configHttpParamsDisplayFields=function(){this.displayFields&&this.displayFields.length&&(this.httpParams=this.httpParams.set("displayfields",this.displayFields.toString()))},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},o.prototype.configParameters=function(e){var t="";e&&(e.forEach((function(e){t?t+=" and "+e.toString():t=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",t))},Object.defineProperty(o.prototype,"parameters",{set:function(e){this.configParameters(e),e&&(this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.totalRecordsChange.emit(this.totalRecords)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:yo}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"displayFields",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"totalRecordsChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),N([t.Input()],o.prototype,"totalRecords",null),o=N([t.Component({selector:"c-data-list",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows"\n [first]="first" (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator"\n (onPage)="pagination($event)" [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey"\n [sortMode]="sortMode" [responsive]="true" pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)"\n [selectionMode]="selectionMode">\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.orderBy || col.field"\n [pSortableColumnDisabled]="!isSortable || !!col.icon" [style.width]="col.width" [pTooltip]="col.tooltip || col.label"\n tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="{{id}}-col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style"\n aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="{{id}}-col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default"\n [model]="getActions(rowData, key)" [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label"\n priority="default" (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),go=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[fo],exports:[fo],providers:[yo]})],e)}(),bo=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.getDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),vo=y,Io=function(){function e(e){this.lookupService=e,this.searchTotalRecordsLabel="hcm.payroll.lookup_search_total_records_label",this.filterLabel="hcm.payroll.lookup_generic_filter_label",this.clearLabel="hcm.payroll.lookup_generic_clean_filter_label",this.cancelLabel="hcm.payroll.lookup_generic_btn_cancel_label",this.selectLabel="hcm.payroll.lookup_btn_select_label",this.lookupEmptyMessage="hcm.payroll.lookup_auto_complete_empty_message",this.lookupSuggestions=[],this.searchGridFields=[],this.searchLookupFields=[],this.searchGridData=[],this.searchFields=[],this.parameters=[],this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.lookupRequest=function(e){var t=this;this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.lookupSuggestions=e&&Y(e.contents)}))},e.prototype.searchRequest=function(e){var t=this;this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.searchGridData=e&&Y(e.contents)}))},e.prototype.getDataLookup=function(e,t){var o=this;return this.lookupService.getDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(e){var t=e.totalElements,n=e.contents;return o.searchTotalRecords=t,o.concatFields&&o.concatFields.length&&n.map((function(e){o.convertGridFieldValue(e),e[o.lookupDisplayField]=o.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=vo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.searchGridFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(i.type,n,e):o=""+t.getParameterByType(i.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(i.type,n,e[n]):t.getParameterByType(i.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+vo(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq "+o.id;default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:bo}]},N([t.Input()],e.prototype,"id",void 0),N([t.Input()],e.prototype,"dataKey",void 0),N([t.Input()],e.prototype,"concatFields",void 0),N([t.Input()],e.prototype,"searchTitle",void 0),N([t.Input()],e.prototype,"formGroup",void 0),N([t.Input()],e.prototype,"controlName",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Input()],e.prototype,"endpoint",void 0),N([t.Input()],e.prototype,"lookupDisplayField",void 0),N([t.Input()],e.prototype,"searchTotalRecordsLabel",void 0),N([t.Input()],e.prototype,"filterLabel",void 0),N([t.Input()],e.prototype,"clearLabel",void 0),N([t.Input()],e.prototype,"cancelLabel",void 0),N([t.Input()],e.prototype,"selectLabel",void 0),N([t.Input()],e.prototype,"lookupEmptyMessage",void 0),N([t.Input()],e.prototype,"searchTotalRecords",void 0),N([t.Input()],e.prototype,"lookupSuggestions",void 0),N([t.Input()],e.prototype,"searchGridFields",void 0),N([t.Input()],e.prototype,"searchLookupFields",void 0),N([t.Input()],e.prototype,"searchGridData",void 0),N([t.Input()],e.prototype,"searchFields",void 0),N([t.Input()],e.prototype,"parameters",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"c-lookup",template:'<div *ngIf="formGroup;else noForm" [formGroup]="formGroup">\n <s-lookup [id]="id" [dataKey]="dataKey" [formControlName]="controlName" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</div>\n\n<ng-template #noForm>\n <s-lookup [id]="id" [dataKey]="dataKey" [(ngModel)]="model" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</ng-template>\n'})],e)}(),So=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,a.TranslateModule],declarations:[Io],exports:[Io],providers:[bo]})],e)}(),_o=y,ko=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,i){var r=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,r,i).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var i=this,r="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),r&&(p=" and "),(s=i.getParameterByType(c,a,t[a],n))&&(r+=" "+p+" "+s)})),r},o.prototype.getParameterByType=function(t,o,n,i){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+_o(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,i);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,i="";if(e){try{for(var r=q(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";i+=i?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(i+=i?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}i=i?"("+i+")":""}return i},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),wo=y,Co=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=wo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),Do=function(){function e(e,t){var o=e.filterData;this.name=o.name||null,this.code=o.code||null,this.searchText=o.searchText||null,this.companyId=o.headoffice||null,this.companyBranchId=o.branchoffice&&o.branchoffice.id||null,this.departmentId=o.department&&o.department.tableId||null,this.costcenterId=o.costcenter&&o.costcenter.id||null,this.jobpositionIds=o.jobposition||null,this.syndicateId=o.syndicate&&o.syndicate.id||null,this.shiftId=o.workshiftScale||null,this.workshiftId=o.workshiftId&&o.workshiftId.id||null,this.workshiftGroupId=o.workshiftGroupId&&o.workshiftGroupId.id||null,this.intervalGroupId=o.intervalGroupId&&o.intervalGroupId.is||null,this.scaleTeamId=o.scaleTeamId&&o.scaleTeamId.id||null,this.scaleCategoryId=o.scaleCategoryId&&o.scaleCategoryId.id||null,this.employmentRelationshipId=o.employmentRelationshipId&&o.employmentRelationshipId.id||null,this.contractType=o.contractType||null,this.expenseNatureId=o.expenseNatureId&&o.expenseNatureId.id||null,this.allowDeficient=o.allowDeficient||null,this.disabilityIds=o.disabilityIds||null,this.listExpired=!!o.hasOwnProperty("listExpired")&&o.listExpired,this.manager=o.manager?o.manager.tableId:null,this.referenceDate=t||null,this.page={current:e.first?e.first:0,size:e.rows?e.rows:10}||null}return e.prototype.getToFilter=function(){return this.jobpositionIds=this.convertListIds(this.jobpositionIds),this.disabilityIds=this.convertListIds(this.disabilityIds),this},e.prototype.convertListIds=function(e){if(e)return e.map((function(e){return e.tableId?e.tableId:e.id}))},e}(),To=y,Fo=function(){function o(o,n,i,r){var a=this;this.translate=o,this.cd=n,this.autocompleteParametersService=i,this.lookupParametersService=r,this.currentCompanyId=null,this.currentCompanyName=null,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.companyBranchId=null,this.lookupSuggestions=[],this.searchGridData=[],this.suggestionsObservable=new f.BehaviorSubject([]),this.totalRecords=0,this.valueEnumShift=[{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FIRST_SHIFT"),value:"0",enum:"FIRST_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_SECOND_SHIFT"),value:"1",enum:"SECOND_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_THIRD_SHIFT"),value:"2",enum:"THIRD_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FOURTH_SHIFT"),value:"3",enum:"FOURTH_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_MIXED"),value:"4",enum:"MIXED"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_GENERAL"),value:"5",enum:"GENERAL"}],this.concatFieldsName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String}),new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String})],this.concatName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String})],this.gridFields=[new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String}),new h.FormField({name:"manager",label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),type:h.FieldType.String})],this.searchFields=Y(this.concatName,[{name:"name",label:this.translate.instant("hcm.payroll.movimentation_name"),type:h.FieldType.String},{name:"headoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_company"),dataKey:"id",appendTo:"body",fullWidth:!0,suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"branchoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_branch"),dataKey:"id",appendTo:"body",fullWidth:!0,onRemove:function(){return a.companyBranchId=null},onSelect:function(e){var t=e.id;return a.companyBranchId=t},onSearch:function(e){a.getAutocomplete("company",e?{companyname:e,code:e}:null,"code","companyname",{headquarter:a.currentCompanyId?a.currentCompanyId:"not null"})},suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"manager",type:h.FieldType.Autocomplete,multiple:!1,label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteManager",{valueSearch:e||"",companyId:{tableId:a.currentCompanyId},companyBranchId:{tableId:a.companyBranchId?a.companyBranchId:""}})},suggestionsObservable:this.suggestionsObservable,displayField:"manager"},{name:"department",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.movimentation_historical_department_tab"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteDepartmentQuery",{searchText:e||"",companyId:a.currentCompanyId,referenceDate:To(y.now()).format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"costcenter",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_cost_center"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(t){a.getAutocomplete("costcenter",t?{name:t,code:t}:null,"code","name",a.currentCompanyId?{company:a.currentCompanyId}:null,!0,e.ServiceType.ORGANIZATION_REGISTER)},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"jobposition",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.movimentation_historical_job_position_tab"),dataKey:"tableId",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteJobpositionQuery",{searchText:e||"",companyId:a.currentCompanyId,creationDate:To().format("YYYY-MM-DD"),expirationDate:To().format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"syndicate",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_syndicate"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("syndicate",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"workshiftScale",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.SHIFT"),showClear:!0,size:{md:12},onChange:function(){a.resetDependenciesOfShift(!0)},options:this.valueEnumShift},{name:"workshiftId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshift",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftScale").value?{workshiftScale:a.valueEnumShift[a.workstationFilterForm.get("workshiftScale").value].enum}:null)},onSelect:function(){a.resetDependenciesOfShift()},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"workshiftGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_workshift-group"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshiftGroup",e?{code:e}:null,"code","baseDate",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"baseDate"},{name:"intervalGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_class_interval"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("intervalGroup",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"scaleTeamId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_team"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleTeam",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"scaleCategoryId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_category"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleCategory",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"employmentRelationshipId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_employment_relationship"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("employmentRelationship",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"contractType",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.employees_temporary_contract_temporary_contract_type"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Employee"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Manager"),value:1},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FarmWorker"),value:2},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Retired"),value:3},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Trainee"),value:4},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Apprentice"),value:5},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FixedDueDate"),value:6},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_RetiredManager"),value:7},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_PublicAgent"),value:8},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Teacher"),value:9},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_CooperativeWorker"),value:10},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_DomesticWorker"),value:11},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_TeacherFixedDueDate"),value:12}]},{name:"expenseNatureId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_expense_nature"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("expenseNature",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"allowDeficient",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.allow_deficient"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_No"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Also"),value:1},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Only"),value:2}]},{name:"disabilityIds",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.employees_addition_disability"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("disability",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"}]),this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges();var e=this.workstationFilterForm.get("headoffice");e.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e.disable()},Object.defineProperty(o.prototype,"workstationFilterForm",{get:function(){return this.workstationgroupEl&&this.workstationgroupEl.formGroupDialog},enumerable:!0,configurable:!0}),o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return V(this,void 0,void 0,(function(){return j(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.resetDependenciesOfShift=function(e){void 0===e&&(e=!1),e&&this.workstationFilterForm.get("workshiftId").reset(),this.workstationFilterForm.get("workshiftGroupId").reset(),this.workstationFilterForm.get("intervalGroupId").reset()},o.prototype.searchRequest=function(e){var t=this,o=this.workstationFilterForm.get("headoffice"),n=e&&e.filterData;o.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e=B({},this.getValueEvent(e,n));var i=this.getHireDate().replace(/\'/g,""),r=new Do(e,i);this.lookupParametersService.lookupRequestPost(r.getToFilter(),"hcm/payroll/queries/workstationgroupFilterQuery",Y(this.concatFieldsName),"name").pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){n?t.searchGridData=e&&Y(e.contents):t.lookupSuggestions=e&&Y(e.contents),t.totalRecords=e&&e.totalPages}))},o.prototype.getValueEvent=function(e,t){return t?e.filterData.headoffice=this.currentCompanyId:e={filterData:{headoffice:this.currentCompanyId,searchText:e}},e},o.prototype.getAutocompleteQuery=function(e,t){var o=this;this.autocompleteParametersService.getAutoCompleteQuery(e,t).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){"autocompleteDepartmentQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&(e.name=e.fields[1].value+" - "+e.fields[0].value)})):"autocompleteJobpositionQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&e.fields[1]&&(e.name=e.fields[0].value+" - "+e.fields[1].value)})):"autocompleteManager"===e&&t.map((function(e){e.manager=e.fields[0].value?e.fields[0].value:e.fields[3].value})),o.suggestionsObservable.next(t)}))},o.prototype.getAutocomplete=function(t,o,n,i,r,a,l){var p=this;void 0===r&&(r=null),void 0===a&&(a=!1),void 0===l&&(l=e.ServiceType.PAYROLL),this.autocompleteParametersService.getAutoComplete(t,B({},r,{searchValue:B({},o)}),this.searchFields,a,l).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){"workshiftGroup"===t&&e.filter((function(e){if(e.baseDate){var t=To(e.baseDate,"YYYY-MM-DD");if(t.isValid())return e.baseDate=t.format(p.dateFormat)}})),p.suggestionsObservable.next(p.getConcatFields(e,n,i))}))},o.prototype.getConcatFields=function(e,t,o){return o&&t&&e.filter((function(e){e[o]=e[t]+" - "+e[o]})),e},o.prototype.getHireDate=function(){var e=To(this.hireDate).format(this.dateFormat);return e?"'"+tt(e,this.dateFormat)+"'":"'"+nt()+"'"},o.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:ko},{type:Co}]},N([t.ViewChild("workstationgroupEl",{static:!1})],o.prototype,"workstationgroupEl",void 0),N([t.Input()],o.prototype,"currentCompanyId",void 0),N([t.Input()],o.prototype,"currentCompanyName",void 0),N([t.Input()],o.prototype,"hireDate",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onBlur",void 0),o=N([t.Component({selector:"c-workstationgroup-lookup",template:'<div [formGroup]="form">\n <s-lookup\n #workstationgroupEl\n id="workstationGroup"\n dataKey="code"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n [formControlName]="name"\n (onLookupRequest)="searchRequest($event)"\n (onSearchRequest)="searchRequest($event)"\n filterTitle="{{ \'hcm.payroll.filters\' | translate }}"\n filterLabel="{{ \'hcm.payroll.filter\' | translate }}"\n clearLabel="{{ \'hcm.payroll.lookup_generic_clean_filter_label\' | translate }}"\n cancelLabel="{{ \'hcm.payroll.cancel\' | translate }}"\n selectLabel="{{ \'hcm.payroll.lookup_btn_select_label\' | translate }}"\n [disabled]="disabled"\n [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{ \'hcm.payroll.lookup_auto_complete_empty_message\' | translate }}"\n [searchGridData]="searchGridData"\n [searchFields]="searchFields"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n [searchTotalRecords]="totalRecords"\n searchTotalRecordsLabel="{{ totalRecords }} {{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [searchGridFields]="gridFields"\n searchTitle="{{ \'hcm.payroll.employees_addition_workstation\' | translate }}"\n lookupDisplayField="name"\n ></s-lookup>\n\n</div>\n'})],o)}(),Po=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,p.CommonModule,a.TranslateModule],declarations:[Fo],exports:[Fo],providers:[ko,Co]})],e)}(),Ao=function(){function n(o,n,i,r,a){var s=this;this.confirmationService=o,this.translateService=n,this.activatedRoute=i,this.cd=r,this.formBuilder=a,this.recordByRow=1,this.showDateWhen=!1,this.isEditMode=!1,this.isViewMode=!1,this.withSideBar=!0,this.visibleChange=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.orderBy={field:"displayDateWhen",direction:e.DirectionEnumeration.DESC},this.bankAccountItemInput={},this.totalRecords=0,this.actionLabel=this.translateService.instant("hcm.payroll.entries_query_actions_total_title"),this.loading=!0,this.listData=[],this.listDataNoPage=[],this.cols=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"displayDateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account_type"),field:"accountType"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_digit"),field:"digit"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"}],this.actions=function(e,t){return void 0===e&&(e={}),[{visible:s.isEditMode,label:s.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!1},s.visible=!0}},{visible:!(s.isEditMode||!s.withSideBar),label:s.translateService.instant("hcm.payroll.edit"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!0},s.visible=!0}},{visible:!s.isEditMode,label:s.translateService.instant("hcm.payroll.delete"),command:function(){s.loading=!0,s.deleteAnnuityItem(t)}}]},this.createFormGroup()}return n.prototype.ngOnInit=function(){this.formGroup.setControl(this.fieldFormGroup,this.historicalBankAccountList)},n.prototype.createFormGroup=function(){this.historicalBankAccountList=this.formBuilder.group({historicalBankAccountList:this.formBuilder.control(null)})},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,i=t&&t.rows?t.rows:this.recordByRow,r=this.getHistoricalBankAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),r&&r.length?(this.totalRecords=r.length,this.listData=r,this.listDataNoPage=Y(r),this.listData.sort(mt(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+i)):this.listDataNoPage=[],(this.isEditMode||r&&1===r.length)&&this.refreshCssInIE11(),this.loading=!1},n.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},n.prototype.add=function(){this.bankAccountItemInput={},this.visible=!0},n.prototype.deleteAnnuityItem=function(e){var t=Y(this.getHistoricalBankAccountList());t.sort(mt(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalBankAccountList.get("historicalBankAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},n.prototype.getHistoricalBankAccountList=function(){return this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value&&this.historicalBankAccountList.get("historicalBankAccountList").value.length?this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value:[]},n.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(Je(e.customFields)&&Object.keys(e.customFields).length){var n=at(e.customFields);e.customFields=Y(n)}e.dateWhen=this.dateWhen,o.push(e)}this.historicalBankAccountList.get("historicalBankAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},n.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},n.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_bank_account_msg_limit_total_by_percentage"):null},Object.defineProperty(n.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateWhen?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dateWhen",{get:function(){return this._dateWhen},set:function(e){var t=this;this._dateWhen=e,this._dateWhen&&this.listData.filter((function(e){return e.dateWhen=t._dateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayDateWhen",{get:function(){return this._displayDateWhen},set:function(e){var t=this;this._displayDateWhen=e,this._displayDateWhen&&this.listData.filter((function(e){return e.displayDateWhen=t._displayDateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalBankAccountList.get("historicalBankAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),n.prototype.close=function(){this.visible=!1},n.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:o.FormBuilder}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],n.prototype,"customFields",void 0),N([t.Input()],n.prototype,"formGroup",void 0),N([t.Input()],n.prototype,"fieldFormGroup",void 0),N([t.Input()],n.prototype,"_dateWhen",void 0),N([t.Input()],n.prototype,"_displayDateWhen",void 0),N([t.Input()],n.prototype,"recordByRow",void 0),N([t.Input()],n.prototype,"showDateWhen",void 0),N([t.Input()],n.prototype,"msgTooltipAdd",void 0),N([t.Input()],n.prototype,"isEditMode",void 0),N([t.Input()],n.prototype,"isViewMode",void 0),N([t.Input()],n.prototype,"currency",void 0),N([t.Input()],n.prototype,"customEntity",void 0),N([t.Input()],n.prototype,"customService",void 0),N([t.Input()],n.prototype,"withSideBar",void 0),N([t.Input()],n.prototype,"dateWhen",null),N([t.Input()],n.prototype,"displayDateWhen",null),N([t.Input()],n.prototype,"addListData",null),N([t.Input()],n.prototype,"visible",null),n=N([t.Component({selector:"c-historical-bank-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_bank_account_title_form\'|translate}}">\n<bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_bank_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-s\'" *ngIf="showDateWhen">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-m\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n *ngIf="showDateWhen"\n [pSortableColumn]="\'displayDateWhen\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.historical_bank_account_label_date_when\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bank\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankBranch\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank_branch\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'accountType\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankAccount\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'digit\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_digit\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td *ngIf="showDateWhen" [pTooltip]="rowData?.displayDateWhen" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.displayDateWhen }}</span>\n </td>\n <td [pTooltip]="rowData?.bank?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bank?.name }}</span>\n </td>\n <td [pTooltip]="rowData?.bankBranch?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankBranch?.name }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.accountType?.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.accountType?.value }}</span>\n </td>\n <td [pTooltip]="rowData?.bankAccount" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankAccount }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.digit" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.digit }}</span>\n </td>\n <td [pTooltip]="rowData?.percentage" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.percentage }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(),Eo=function(){function e(e,n,i,r){this.translate=e,this.formBuilder=n,this.route=i,this.cd=r,this.withSideBar=!0,this.isEditMode=!1,this.visibleChange=new t.EventEmitter,this.bankAccountItemToList=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.initialValidatorOfBankAccount=[o.Validators.required,o.Validators.maxLength(12)],this.labelBtnAdd="hcm.payroll.employees_add",this.maxValuePercentage=100,this.visibleBtnSave=!0,this.isView=!1,this.createFormGroup(),this.registerSubjects()}return e.prototype.validateDuplicateBankAccount=function(e,t,o,n){return function(i){var r=i&&i.value,a=!1;return e.filter((function(e,i){if(i!=e.index&&r&&e.bank&&e.bank.tableId===o&&e.bankBranch&&e.bankBranch.tableId===n&&e.accountType&&e.accountType.key===t&&Number(e.bankAccount)===Number(r))return a=!0})),a?{bankAccountDuplicate:!0}:null}},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},e.prototype.registerSubjects=function(){},e.prototype.createFormGroup=function(){this.bankAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateWhen:this.formBuilder.control(null),displayDateWhen:this.formBuilder.control(null),bank:this.formBuilder.control(null,o.Validators.required),bankBranch:this.formBuilder.control(null,o.Validators.required),accountType:this.formBuilder.control(null,o.Validators.required),bankAccount:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfBankAccount))),digit:this.formBuilder.control(null,o.Validators.maxLength(3)),percentage:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),customFields:this.formBuilder.control(null)})},e.prototype.onSelectBank=function(){this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.onClearBank=function(){this.bankAccountFormGroup.get("bank").reset(),this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.cleanBankInformation=function(){ht(this.bankAccountFormGroup,["bankBranch"])},e.prototype.onClearBankBranch=function(){this.bankAccountFormGroup.get("bankBranch").reset(),this.beforeSetBankAccountValidator()},e.prototype.onClearAccountType=function(){this.bankAccountFormGroup.get("accountType").reset(),this.beforeSetBankAccountValidator()},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.bankAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(B({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index),this.isView||this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),e.prototype.convertDTOToShowWithCustomFields=function(e){var t=B({},e);return t.customFields=st(t.customFields),t},e.prototype.configEnableFields=function(e){this.visibleBtnSave=e,ct(this.bankAccountFormGroup,e,["bank","bankBranch","accountType","bankAccount","digit","percentage","customFields"],[])},e.prototype.close=function(){this.resetForm(),this.visible=!1},e.prototype.addItem=function(){this.bankAccountFormGroup.updateValueAndValidity(),lt.call(this.bankAccountFormGroup),this.bankAccountFormGroup.valid&&(this.employeeId&&this.bankAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.bankAccountItemToList.emit(this.bankAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},e.prototype.resetForm=function(){this.bankAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},e.prototype.getBankTableId=function(){return this.bankAccountFormGroup.controls.bank.value?"'"+this.bankAccountFormGroup.controls.bank.value.tableId+"'":null},Object.defineProperty(e.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsPercentage",{get:function(){return B({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),e.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(e.prototype,"getListBankAccount",{set:function(e){e?this.setValidatorsAccordingList(e):this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.setValidatorsAccordingList=function(e,t){void 0===t&&(t=null),this.bankAccountList=e&&e.length?Y(e):[];var o=[];this.bankAccountList&&this.bankAccountList.length&&this.bankAccountList.filter((function(e,n){e.percentage&&n!=t&&o.push(e.percentage)})),this.beforeSetBankAccountValidator(),this.validatePercentageValid(o)},e.prototype.beforeSetBankAccountValidator=function(){var e=this.bankAccountFormGroup.get("bankAccount"),t=this.bankAccountFormGroup.get("accountType")&&this.bankAccountFormGroup.get("accountType").value&&this.bankAccountFormGroup.get("accountType").value.key,n=this.bankAccountFormGroup.get("bank")&&this.bankAccountFormGroup.get("bank").value&&this.bankAccountFormGroup.get("bank").value.tableId,i=this.bankAccountFormGroup.get("bankBranch")&&this.bankAccountFormGroup.get("bankBranch").value&&this.bankAccountFormGroup.get("bankBranch").value.tableId;n&&i&&t&&this.bankAccountList&&this.bankAccountList.length?(e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount,[this.validateDuplicateBankAccount(this.bankAccountList,t,n,i)]))),e.updateValueAndValidity()):e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount)))},e.prototype.validatePercentageValid=function(e){var t=this.bankAccountFormGroup.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),t.setValidators(o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),t.updateValueAndValidity()},Object.defineProperty(e.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:a.TranslateService},{type:o.FormBuilder},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!0})],e.prototype,"customFields",void 0),N([t.Input()],e.prototype,"currency",void 0),N([t.Input()],e.prototype,"customEntity",void 0),N([t.Input()],e.prototype,"customService",void 0),N([t.Input()],e.prototype,"withSideBar",void 0),N([t.Input()],e.prototype,"isEditMode",void 0),N([t.Output()],e.prototype,"visibleChange",void 0),N([t.Output()],e.prototype,"bankAccountItemToList",void 0),N([t.Input()],e.prototype,"visible",null),N([t.Input()],e.prototype,"isEditAndViewValue",null),N([t.Input()],e.prototype,"getListBankAccount",null),N([t.Input()],e.prototype,"isViewMode",null),e=N([t.Component({selector:"bank-account",template:'<div id="main">\n <form [formGroup]="bankAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Banco --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank\' | translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="Bank"\n [order]="[\'BankCode\',\'BankNameI18n\']"\n [fields]="[\'BankCode\',\'BankNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankCode" keyName="BankNameI18n"\n itemSelect="bank" name="bank"\n [form]="bankAccountFormGroup"\n (onSelect)="onSelectBank()"\n (onClear)="onClearBank()"\n id="ta-bankName"></input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bank\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Agência--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank_branch\'|translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="BankBranch"\n [order]="[\'BankBranchCode\']"\n [fields]="[\'BankBranchCode\',\'BankBranchNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankBranchCode" keyName="BankBranchNameI18n"\n itemSelect="bankBranch" name="bankBranch"\n [conditions]="[{ \'fields\': [\'BankBranchBank\'], \'expression\' : \'EQUAL\', \'value\': getBankTableId() }]"\n [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-bankBranch">\n </input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankBranch\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!-- Tipo conta --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_account_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="AccountType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="accountType" [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-accountType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="bankAccountFormGroup.get(\'accountType\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Número conta--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_account_form\' |\n translate}}</label>\n <input pInputText id="ta-bankAccount" name="bankAccount" only-number\n formControlName="bankAccount"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankAccount\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n bankAccountDuplicate: \'hcm.payroll.historical_bank_account_label_bank_account_duplicate\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'12\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12">\n <label>{{\'hcm.payroll.historical_bank_account_label_digit\'|translate}}</label>\n \x3c!--Dígito--\x3e\n <input pInputText id="ta-digit" name="digit" only-number formControlName="digit"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'digit\')"\n [errorMessages]="{ maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'3\' } }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="bankAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],e)}(),xo=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Mo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,be,h.ControlErrorsModule,Ft,M.CurrencyMaskModule,vt,d.InputTextModule,_e,L.FieldsetModule,h.CustomFieldsModule,O.PanelModule],declarations:[Ao,Eo],providers:[xo,I.ConfirmationService],exports:[Ao]})],e)}(),Lo=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,i){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalJudicialPensionBankAccountDelete",{dependentId:i,dateWhen:o}):this.http.post("actions/historicalEmployeeBankAccountDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:Ne},{type:v.HttpClient}]},o=N([t.Injectable()],o)}(),Oo=y,Ro=function(){function o(e,o,n,i,r,a,s){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=i,this.router=r,this.messageService=a,this.historicalBankAccountListService=s,this.endPoint="hcm/payroll/queries/historicalEmployeeBankAccountQuery",this.keyPayload="historicalEmployeeBankAccount",this.withSidebar=!0,this.enableView=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"dateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_qtd_account"),field:"numberOfBankAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateWhen=Oo(e.dateWhen).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){var o=e&&e.dateWhen&&Oo(e.dateWhen,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?t.router.navigate(["historical-bank-account/"+o],{relativeTo:t.activatedRoute}):t.enableView.emit(o)}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateWhen):t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed")})}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var i=Oo(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalBankAccountListService.remove(n.employeeId,i,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_remove")}),n.parameters=n.parameters&&B({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-irrf-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&B({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:r.Router},{type:I.MessageService},{type:Lo}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),N([t.Input()],o.prototype,"permission",void 0),N([t.Input()],o.prototype,"employeeId",void 0),N([t.Input()],o.prototype,"dependentId",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"endPoint",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"withSidebar",void 0),N([t.Output()],o.prototype,"enableView",void 0),N([t.Input()],o.prototype,"reloadList",null),o=N([t.Component({selector:"c-historical-bank-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-irrf"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),Bo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Ce,R.ConfirmDialogModule],declarations:[Ro],providers:[Lo],exports:[Ro]})],e)}(),No=function(){function t(e){this.field=e.field,this.value=e.value,this.operation=e.operation}return Object.defineProperty(t.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operation",{get:function(){return this._operation},set:function(e){this._operation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.operation===e.Operators.CONTAINING?this.operation+"(lower("+this.field+"), lower("+this.value+"))":this.field+" "+(this.operation||"")+" "+this.value},t}(),Vo=y,jo=Vo("31/12/1900","DD/MM/YYYY"),qo=Vo("04/06/2080","DD/MM/YYYY"),Uo=function(){function t(){}return t.isValidDate=function(e,t){return function(o){var n=!t||!t.hasOwnProperty("useG5DateRange")||t.useG5DateRange,i=ft(o.value);if(e=ft(e),i&&e&&i.length===e.length&&!o.value.includes("_")){var r=Vo(i,e),a=r.isValid(),s=!n||r.isBetween(jo,qo,null,"[]");return a&&s?null:{invalidDate:!0}}return null}},t.isDateLower=function(t,o,n){void 0===n&&(n="day");var i={compareName:"lowerDate",granularity:n};return this.isValidDateCompare(t,o,e.CompareType.isBefore,i)},t.isValidDateCompare=function(e,t,o,n){var i=this;return function(r){var a=ft(r.value);if(t=ft(t),a&&t&&a.length===t.length&&!r.value.includes("_")){var s=Vo(a,t),l=Vo(e,t);return i.dateCompare(s,l,o,n)}return null}},t.getDateFormatFromLocale=function(e,t){var o=e&&e.dateFormat;if(o){var n=o.replace(/[y]/g,"YY").replace(/[^a-zA-Z]/g,"").toUpperCase();return t&&(n=n.replace("DD","")),n}return null},t.getDateTimeFormatFromLocale=function(e){if(e){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase(),t+=" HH:mm:ss"}return null},t.getDateFormatFromCalendar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase()}return null},t.dateCompare=function(t,o,n,i){var r=n===e.CompareType.isNotSame?e.CompareType.isSame:n,a=i&&i.granularity?i.granularity:"day",s=t[r](o,a);if(s=n===e.CompareType.isNotSame?!s:s){var l={};return l[i&&i.compareName?i.compareName:n]=!0,l}return null},t.getFormatDateWithBar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace("dd","DD").replace("mm","MM").replace("yy","YYYY")}return null},t}(),Yo=function(){function e(){this._processVariables={},this._workflowPayload={},this.processInstanceId=new f.BehaviorSubject(null),this.resetActions()}return e.prototype.init=function(){var e=this;this.workflowCockpit=workflowCockpit({init:function(t,o){return V(e,void 0,void 0,(function(){var e,n,i;return j(this,(function(r){switch(r.label){case 0:return this._isRequestNew=o&&o.isRequestNew(),e=this,(n=o)?[4,o.getTaskData()]:[3,2];case 1:n=r.sent(),r.label=2;case 2:return e._taskData=n,this._isRequestNew?[3,4]:[4,o.getInfoFromProcessVariables()];case 3:i=r.sent(),this.addProcessVariable("processVariablesFromWorkflow",i),r.label=4;case 4:return this.processInstanceId.next(t.processInstanceId),[4,this._onLoadWorkflow(t,o)];case 5:return[2,r.sent()]}}))}))},onSubmit:function(t,o){return V(e,void 0,void 0,(function(){var e,n;return j(this,(function(i){switch(i.label){case 0:return e=this,(n=t)?[4,t.nextAction]:[3,2];case 1:n=i.sent(),i.label=2;case 2:return e._nextAction=n,this._isFinishing=this._nextAction.finish,this._nextActionName=this._nextAction.name,[4,this._onSubmitWorkflow(t,o)];case 3:return i.sent(),[2,this._workflowPayload]}}))}))},onError:function(t,o){return V(e,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,this._onRollbackWorkflow(t,o)];case 1:return e.sent(),[2]}}))}))}})},e.prototype._onLoadWorkflow=function(e,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onLoadActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onSubmitWorkflow=function(e,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onSubmitActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onRollbackWorkflow=function(e,t){return V(this,void 0,void 0,(function(){return j(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onRollbackActions)];case 1:return[2,e.sent()]}}))}))},e.prototype.resetActions=function(){this.onLoadActions={},this.onSubmitActions={},this.onRollbackActions={}},e.prototype._runActions=function(e){return V(this,void 0,void 0,(function(){var t,o=this;return j(this,(function(n){switch(n.label){case 0:return t={},[4,Promise.all(Object.entries(e).map((function(e){var n=U(e,2),i=n[0],r=n[1];return V(o,void 0,void 0,(function(){var e,o,n;return j(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e=t,o=i,[4,r()];case 1:return e[o]=a.sent(),[2];case 2:throw n=a.sent(),Error(n);case 3:return[2]}}))}))})))];case 1:return n.sent(),[2,t]}}))}))},e.prototype.addOnLoadAction=function(e,t){this.onLoadActions[e]=t},e.prototype.addOnSubmitAction=function(e,t){this.onSubmitActions[e]=t},e.prototype.addOnRollbackAction=function(e,t){this.onRollbackActions[e]=t},e.prototype.addProcessVariable=function(e,t){try{this._processVariables[e]=t}catch(t){throw{erro:t,message:"Não foi possível adicionar a variável "+e+" às variáveis do processo."}}},e.prototype.setWorkflowPayload=function(e){this._workflowPayload=e},Object.defineProperty(e.prototype,"loadActions",{get:function(){return this.onLoadActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"submitActions",{get:function(){return this.onSubmitActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rollbackActions",{get:function(){return this.onRollbackActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRequestNew",{get:function(){return this._isRequestNew},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFinishing",{get:function(){return this._isFinishing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextActionName",{get:function(){return this._nextActionName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taskData",{get:function(){return this._taskData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processVariables",{get:function(){var e=this;return new Promise((function(t,o){e._processVariables?t(e._processVariables):o("Não foram encontradas variáveis para o processo")})).then((function(t){e._processVariables=t})).catch((function(e){throw e})),this._processVariables},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Go=function(){function e(e,t,o){this.router=e,this.activatedRoute=t,this.workflowDataService=o,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){this.registerSubscribers()},e.prototype.registerSubscribers=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow),e.routeEndpoint=t&&t.routeEndpoint,e.useWorkflow&&e.workflowDataService.setUseWorkflow(e.useWorkflow)}))},e.prototype.onSelectEmployee=function(){var e=this.employeeSelected.tableId;e&&this.navigate(e)},e.prototype.navigate=function(e){this.router.navigate(["workflow/"+e+"/"+this._routeEndpoint])},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},Object.defineProperty(e.prototype,"useWorkflow",{get:function(){return this._useWorkflow},set:function(e){this._useWorkflow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeEndpoint",{get:function(){return this._routeEndpoint},set:function(e){this._routeEndpoint=e},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:r.Router},{type:r.ActivatedRoute},{type:lo}]},e=N([t.Component({selector:"lib-employee-selector",template:'<p-panel header="{{ \'hcm.payroll.employee_selector_panel_header\' | translate }}">\n <div class="ui-g ui-fluid">\n <div class="ui-md-6 ui-g-6">\n <label for="ff-employee" id="lb-employee">{{\n "hcm.payroll.employee" | translate\n }}</label>\n <input-rest-auto-complete-employee-model\n id="ff-employee"\n [dropdown]="true"\n placeholder="{{\n \'hcm.payroll.employees_company_placeholder\' | translate\n }}"\n name="employee"\n emptyMessage="{{ \'hcm.payroll.not_suggestions\'|translate }}"\n [(model)]="employeeSelected"\n (onSelect)="onSelectEmployee()"\n >\n </input-rest-auto-complete-employee-model>\n </div>\n </div>\n</p-panel>\n',styles:[""]})],e)}(),Ho=function(){function e(){}return e=N([t.NgModule({imports:[ue,O.PanelModule,Ct],declarations:[Go],exports:[Go]})],e)}(),Ko=function(){function e(){}return N([t.Input()],e.prototype,"divergentFormData",void 0),e=N([t.Component({selector:"from-to",template:'<div id="from-to" class="ui-g ui-fluid" *ngIf="divergentFormData">\n <div class="ui-g-12">\n \x3c!-- Painel Collapsable --\x3e\n <p-panel\n class="ui-g-12 ui-fluid form-group"\n header="{{ \'hcm.payroll.disagreements\' | translate }}"\n [toggleable]="true"\n [collapsed]="false"\n >\n <section id="from-to-content" class="ui-g ui-fluid form-group">\n \x3c!-- INICIO DE SEÇÃO: DE (ANTES): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.from\' | translate }}">\n <section id="from-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-from">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-from"\n id="{{divergence.key}}-from"\n value="{{ divergence.oldValue }}"\n />\n\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: DE (ANTES): --\x3e\n\n \x3c!-- INICIO DE SEÇÃO: PARA (DEPOIS): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.to\' | translate }}">\n <section id="to-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-to">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-to"\n id="{{divergence.key}}-to"\n value="{{ divergence.newValue }}"\n />\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: PARA (DEPOIS): --\x3e\n </section>\n </p-panel>\n </div>\n</div>\n'})],e)}(),Wo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,O.PanelModule,a.TranslateModule,o.ReactiveFormsModule,d.InputTextModule],declarations:[Ko],exports:[Ko]})],e)}(),zo=function(){function e(){}return e.getFormattedCpf=function(e){return e?e.replace(/\D/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1-$2"):null},e.getFormattedCnpj=function(e){return e?e.replace(/\D/g,"").replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2"):null},e.getCpfCnpjMask=function(e){switch(e){case"CPF":return"999.999.999-99";case"CNPJ":return"99.999.999/9999-99";default:return""}},e.getFormattedTelephoneNumber=function(e){var t=e.replace(/\D/g,"");return(t=t.replace(/^0/,"")).length>10?t=t.replace(/^(\d{2})?(\d{5})?(\d{4}).*/,"($1) $2-$3"):t.length>9?t=t.replace(/^(\d{2})?(\d{4})?(\d{4}).*/,"($1) $2-$3"):t.length>5?t=t.replace(/^(\d{2})?(\d{4})?(\d{0,4}).*/,"($1) $2-$3"):t.length>1?t=t.replace(/^(\d{2})?(\d{0,5}).*/,"($1) $2"):""!==t&&(t=t.replace(/^(\d*)/,"($1")),t},e.formatTelephoneInputEvent=function(t){var o=t.target.value;(8!==t.keyCode||9!==o.length&&4!==o.length&&3!==o.length)&&(t.target.value=e.getFormattedTelephoneNumber(o))},e.getFormattedPercentage=function(e){return parseFloat(e).toFixed(2).replace(".",",")+"%"},e}(),$o=function(){function n(o,n,i,r){var a=this;this.translateService=o,this.cd=n,this.formBuilder=i,this.messageService=r,this.recordByRow=1,this.showDateChange=!1,this.isEditMode=!1,this.isViewMode=!1,this.withSideBar=!0,this.defaultCpfNumber=null,this.listDataReciever=[],this.isViewModeActive=new t.EventEmitter,this.isEditModeActive=new t.EventEmitter,this.isDeleteModeActive=new t.EventEmitter,this.listFromApp=[],this.visibleChange=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.orderBy={field:"dateChange",direction:e.DirectionEnumeration.DESC},this.pixAccountItemInput={},this.totalRecords=0,this.actionLabel=this.translateService.instant("hcm.payroll.entries_query_actions_total_title"),this.loading=!0,this.listData=[],this.listDataNoPage=[],this.cols=[{label:this.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),field:"pixKeyType"},{label:this.translateService.instant("hcm.payroll.employees_addition_pix_key"),field:"pixKey"},{label:this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),field:"percentage"}],this.actions=function(e,t){return void 0===e&&(e={}),[{visible:a.isEditMode,label:a.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){a.isAllowToViewHistorical?(e.index=t,a.pixAccountItemInput={currentItem:e,listData:a.listDataNoPage,isEditMode:!1},a.visible=!0):a.isViewModeActive.emit(!0)}},{visible:!(a.isEditMode||!a.withSideBar),label:a.translateService.instant("hcm.payroll.edit"),command:function(){a.isAllowToEditHistorical?(e.index=t,a.pixAccountItemInput={currentItem:e,listData:a.listDataNoPage,isEditMode:!0},a.visible=!0):(a.isEditModeActive.emit(!0),0==a.listFromApp.length&&(e.index=t,a.pixAccountItemInput={currentItem:e,listData:a.listDataNoPage,isEditMode:!0},a.visible=!0))}},{visible:!a.isEditMode,label:a.translateService.instant("hcm.payroll.delete"),command:function(){a.isAllowToDeleteHistorical?(a.loading=!0,a.deleteAnnuityItem(t)):(a.isDeleteModeActive.emit(!0),0==a.listFromApp.length&&(a.loading=!0,a.deleteAnnuityItem(t)))}}]},this.createFormGroup()}return n.prototype.ngOnInit=function(){this.formGroup.setControl(this.fieldFormGroup,this.historicalPixAccountList)},n.prototype.ngOnChanges=function(e){e.listDataReciever&&e.listDataReciever.currentValue&&(this.listFromApp=e.listDataReciever.currentValue)},n.prototype.createFormGroup=function(){this.historicalPixAccountList=this.formBuilder.group({historicalPixAccountList:this.formBuilder.control(null)})},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,i=t&&t.rows?t.rows:this.recordByRow,r=this.getHistoricalPixAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),r&&r.length?(this.totalRecords=r.length,this.listData=r,this.listDataNoPage=Y(r),this.listData.sort(mt(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+i)):this.listDataNoPage=[],(this.isEditMode||r&&1===r.length)&&this.refreshCssInIE11(),this.loading=!1},n.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},n.prototype.add=function(){this.pixAccountItemInput={},this.visible=!0},n.prototype.isNotAllowMessage=function(){this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},n.prototype.deleteAnnuityItem=function(e){var t=Y(this.getHistoricalPixAccountList());t.sort(mt(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalPixAccountList.get("historicalPixAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},n.prototype.getHistoricalPixAccountList=function(){return this.historicalPixAccountList.get("historicalPixAccountList")&&this.historicalPixAccountList.get("historicalPixAccountList").value&&this.historicalPixAccountList.get("historicalPixAccountList").value.length?this.historicalPixAccountList.get("historicalPixAccountList")&&this.historicalPixAccountList.get("historicalPixAccountList").value:[]},n.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalPixAccountList()?this.getHistoricalPixAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(Je(e.customFields)&&Object.keys(e.customFields).length){var n=at(e.customFields);e.customFields=Y(n)}e.dateChange=this.dateChange,o.push(e)}this.historicalPixAccountList.get("historicalPixAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},n.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},n.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalPixAccountList()?this.getHistoricalPixAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_pix_account_msg_limit_total_by_percentage"):null},Object.defineProperty(n.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateChange?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dateChange",{get:function(){return this._dateChange},set:function(e){var t=this;this._dateChange=e,this._dateChange&&this.listData.filter((function(e){return e.dateChange=t._dateChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayDateChange",{get:function(){return this._displayDateChange},set:function(e){var t=this;this._displayDateChange=e,this._displayDateChange&&this.listData.filter((function(e){return e.displayDateChange=t._displayDateChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalPixAccountList.get("historicalPixAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),n.prototype.close=function(){this.visible=!1},n.prototype.getFormattedTelephoneNumber=function(e){return zo.getFormattedTelephoneNumber(e)},n.prototype.getFormattedCpf=function(e){return zo.getFormattedCpf(e)},n.prototype.getFormattedCnpj=function(e){return zo.getFormattedCnpj(e)},n.prototype.getFormattedPercentage=function(e){return zo.getFormattedPercentage(e)},Object.defineProperty(n.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAllowToEditHistorical",{get:function(){return this.permission.editar},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAllowToViewHistorical",{get:function(){return this.permission.visualizar},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:o.FormBuilder},{type:I.MessageService}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],n.prototype,"customFields",void 0),N([t.Input()],n.prototype,"formGroup",void 0),N([t.Input()],n.prototype,"fieldFormGroup",void 0),N([t.Input()],n.prototype,"_dateChange",void 0),N([t.Input()],n.prototype,"_displayDateChange",void 0),N([t.Input()],n.prototype,"recordByRow",void 0),N([t.Input()],n.prototype,"showDateChange",void 0),N([t.Input()],n.prototype,"msgTooltipAdd",void 0),N([t.Input()],n.prototype,"isEditMode",void 0),N([t.Input()],n.prototype,"isViewMode",void 0),N([t.Input()],n.prototype,"currency",void 0),N([t.Input()],n.prototype,"customEntity",void 0),N([t.Input()],n.prototype,"customService",void 0),N([t.Input()],n.prototype,"withSideBar",void 0),N([t.Input()],n.prototype,"paramsForm",void 0),N([t.Input()],n.prototype,"defaultCpfNumber",void 0),N([t.Input()],n.prototype,"permission",void 0),N([t.Input()],n.prototype,"listDataReciever",void 0),N([t.Output()],n.prototype,"isViewModeActive",void 0),N([t.Output()],n.prototype,"isEditModeActive",void 0),N([t.Output()],n.prototype,"isDeleteModeActive",void 0),N([t.Input()],n.prototype,"dateChange",null),N([t.Input()],n.prototype,"displayDateChange",null),N([t.Input()],n.prototype,"addListData",null),N([t.Input()],n.prototype,"visible",null),n=N([t.Component({selector:"c-historical-pix-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_pix_account_title_form\'|translate}}">\n<pix-account [(visible)]="visible"\n [isEditAndViewValue]="pixAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListPixAccount]="listDataNoPage"\n [paramsForm]="paramsForm"\n (pixAccountItemToList)="addItemInList($event)"\n [defaultCpfNumber]="defaultCpfNumber"></pix-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <pix-account [(visible)]="visible"\n [isEditAndViewValue]="pixAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListPixAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n [paramsForm]="paramsForm"\n (pixAccountItemToList)="addItemInList($event)"\n [defaultCpfNumber]="defaultCpfNumber"></pix-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_pix_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'">\n <col [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n [pSortableColumn]="\'pixKeyType\'"\n [pTooltip]="\'hcm.payroll.employees_addition_pix_key_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.employees_addition_pix_key_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.employees_addition_pix_key_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'pixKey\'"\n [pTooltip]="\'hcm.payroll.employees_addition_pix_key\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.employees_addition_pix_key\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.employees_addition_pix_key\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_pix_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_pix_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_pix_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td [pTooltip]="rowData?.pixKeyType.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]="rowData?.pixKeyType.key">\n <td *ngSwitchCase="\'TELEPHONE\'"\n [pTooltip]="getFormattedTelephoneNumber(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase="\'CPF\'"\n [pTooltip]="getFormattedCpf(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase="\'CNPJ\'"\n [pTooltip]="getFormattedCnpj(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]="rowData?.pixKey" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]="getFormattedPercentage(rowData?.percentage)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(),Qo=function(){function e(){}return e.isValidCei=function(e){var t=e.value;if(!t)return null;if(11!=t.length)return null;var o=0,n=0;if(11!==t.length||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return{invalidCei:!0};for(var i=0;i<10;i++)o+=parseInt(t.substring(i,i+1),10)*parseInt("3298765432".substring(i,i+1),10);return(n=10===(n=11-o%11)||11===n?0:n)===parseInt(""+t.charAt(10),10)?null:{invalidCei:!0}},e.isValidCpf=function(e){var t=e.value;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(a=1,t.length<11)return null;for(r=0;r<t.length-1;r++)if(t.charAt(r)!==t.charAt(r+1)){a=0;break}if(a)return{cpfNotValid:!0};for(o=t.substring(0,9),n=t.substring(9),i=0,r=10;r>1;r--)i+=o.charAt(10-r)*r;if((i%11<2?0:11-i%11)!==Number(n.charAt(0)))return{cpfNotValid:!0};for(o=t.substring(0,10),i=0,r=11;r>1;r--)i+=o.charAt(11-r)*r;return(i%11<2?0:11-i%11)!==Number(n.charAt(1))?{cpfNotValid:!0}:null}return null},e.isValidCnpj=function(e){var t=e.value;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return null;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return{cnpjNotValid:!0};o=t.length-2,n=t.substring(0,o),i=t.substring(o),r=0,a=o-7;for(var s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);if((r%11<2?0:11-r%11)!==Number(i.charAt(0)))return{cnpjNotValid:!0};o+=1,n=t.substring(0,o),r=0,a=o-7;for(s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);return(r%11<2?0:11-r%11)!==Number(i.charAt(1))?{cnpjNotValid:!0}:null}return null},e.isValidPhoneNumber=function(e){var t=e.value||"";t=t.replace(/[\s()-]/g,"");return/^[1-9][\d]{1,2}\d{8,10}$/.test(t)?null:{invalidPhoneNumber:!0}},e.isValidEmail=function(e){var t=e.value;return/^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/.test(t)?null:{invalidEmail:!0}},e}(),Jo=function(){function e(e,n){this.formBuilder=e,this.cd=n,this.withSideBar=!0,this.isEditMode=!1,this.paramsForm=new o.FormGroup({}),this.defaultCpfNumber=null,this.visibleChange=new t.EventEmitter,this.pixAccountItemToList=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.labelBtnAdd="hcm.payroll.employees_add",this.maxValuePercentage=100,this.visibleBtnSave=!0,this.isView=!1,this.isShowPixKeyFieldValidatorMessage=!1,this.createFormGroup(),this.registerSubjects()}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},e.prototype.registerSubjects=function(){},e.prototype.createFormGroup=function(){this.pixAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateChange:this.formBuilder.control(null),pixKeyType:this.formBuilder.control(null,o.Validators.required),pixKey:this.formBuilder.control(null),percentage:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),externalId:this.formBuilder.control(null),customFields:this.formBuilder.control(null)})},e.prototype.onChangePixKeyType=function(e){e.key&&(this.pixKeyType=e.key,this.isShowPixKeyFieldValidatorMessage=!0,this.pixAccountFormGroup.get("pixKey").reset(),this.setPixKeyValidators(!0),"CPF"===e.key&&this.setDefaultCpfPixKey())},e.prototype.onClearPixKeyType=function(){this.isShowPixKeyFieldValidatorMessage=!1,this.pixAccountFormGroup.get("pixKey").reset()},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(B({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index,e&&e.isEditMode),this.isView?this.pixAccountFormGroup.get("pixKeyType").value&&(this.pixKeyType=this.pixAccountFormGroup.get("pixKeyType").value.key,this.formatPixKeyTelephoneNumber()):this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),e.prototype.formatPixKeyTelephoneNumber=function(){"TELEPHONE"===this.pixKeyType&&this.pixAccountFormGroup.get("pixKey").setValue(zo.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value))},e.prototype.convertDTOToShowWithCustomFields=function(e){var t=B({},e);return t.customFields=st(t.customFields),t},e.prototype.configEnableFields=function(e){this.visibleBtnSave=e,this.pixAccountFormGroup.get("pixKeyType").value&&(this.pixKeyType=this.pixAccountFormGroup.get("pixKeyType").value.key,this.setPixKeyValidators(e),this.formatPixKeyTelephoneNumber()),ct(this.pixAccountFormGroup,e,["pixKeyType","pixKey","percentage","customFields"],[])},e.prototype.close=function(){this.resetForm(),this.visible=!1},e.prototype.addItem=function(){this.pixAccountFormGroup.updateValueAndValidity(),lt.call(this.pixAccountFormGroup),this.pixAccountFormGroup.valid&&(this.employeeId&&this.pixAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},e.prototype.resetForm=function(){this.pixAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},Object.defineProperty(e.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsPercentage",{get:function(){return B({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),e.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(e.prototype,"getListPixAccount",{set:function(e){e?this.setValidatorsAccordingList(e,null,!1):this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.setValidatorsAccordingList=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=!0),this.pixAccountList=e&&e.length?Y(e):[];var n=[];this.pixAccountList&&this.pixAccountList.length&&this.pixAccountList.filter((function(e,o){e.percentage&&o!=t&&n.push(e.percentage)})),this.beforeSetPixKeyTypeValidator(),this.setPixKeyValidators(o),this.validatePercentageValid(n)},e.prototype.setPixKeyValidators=function(e){var t=this.pixAccountFormGroup.get("pixKey");if(this.pixKeyType){switch(this.pixKeyType){case"TELEPHONE":t.setValidators(o.Validators.compose([o.Validators.required,Qo.isValidPhoneNumber]));break;case"EMAIL":t.setValidators(o.Validators.compose([o.Validators.required,Qo.isValidEmail]));break;case"CPF":t.setValidators(o.Validators.compose([o.Validators.required,Qo.isValidCpf]));break;case"CNPJ":t.setValidators(o.Validators.compose([o.Validators.required,Qo.isValidCnpj]));break;case"RANDOM_KEY":t.setValidators(o.Validators.required);break;default:t.setValidators(null)}e&&t.enable(),t.updateValueAndValidity()}},e.prototype.validatePercentageValid=function(e){var t=this.pixAccountFormGroup.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),t.setValidators(o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),t.updateValueAndValidity()},Object.defineProperty(e.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.phoneMask=function(e){zo.formatTelephoneInputEvent(e)},e.prototype.setDefaultCpfPixKey=function(){if(this.defaultCpfNumber)this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);else{var e=this.paramsForm.get("sheetDocument");if(e){var t=e.get("cpfNumber").value;t&&this.pixAccountFormGroup.get("pixKey").setValue(t)}}},e.prototype.beforeSetPixKeyTypeValidator=function(){var e=this.pixAccountFormGroup.get("pixKeyType");this.pixAccountList&&this.pixAccountList.length&&e?e.setValidators(o.Validators.compose([o.Validators.required,this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList)])):e.setValidators(o.Validators.required)},e.prototype.validateDuplicatePixKeyTypeBankAccount=function(e){return function(t){var o=t&&t.value,n=!1;return e.filter((function(e){if(o&&"BANK_ACCOUNT"===e.pixKeyType.key&&o.key===e.pixKeyType.key)return n=!0})),n?{pixKeyTypeBankAccountDuplicate:!0}:null}},e.ctorParameters=function(){return[{type:o.FormBuilder},{type:t.ChangeDetectorRef}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!0})],e.prototype,"customFields",void 0),N([t.Input()],e.prototype,"currency",void 0),N([t.Input()],e.prototype,"customEntity",void 0),N([t.Input()],e.prototype,"customService",void 0),N([t.Input()],e.prototype,"withSideBar",void 0),N([t.Input()],e.prototype,"isEditMode",void 0),N([t.Input()],e.prototype,"paramsForm",void 0),N([t.Input()],e.prototype,"defaultCpfNumber",void 0),N([t.Output()],e.prototype,"visibleChange",void 0),N([t.Output()],e.prototype,"pixAccountItemToList",void 0),N([t.Input()],e.prototype,"visible",null),N([t.Input()],e.prototype,"isEditAndViewValue",null),N([t.Input()],e.prototype,"getListPixAccount",null),N([t.Input()],e.prototype,"isViewMode",null),e=N([t.Component({selector:"pix-account",template:'<div id="main">\n <form [formGroup]="pixAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Tipo de chave --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_pix_key_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="PixKeyType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="pixKeyType" [form]="pixAccountFormGroup"\n (onSelect)="onChangePixKeyType($event)"\n (onClear)="onClearPixKeyType()"\n id="ta-pixKeyType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="pixAccountFormGroup.get(\'pixKeyType\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n pixKeyTypeBankAccountDuplicate: \'hcm.payroll.historical_pix_key_type_bank_account_duplicate\' | translate\n }">\n </s-control-errors>\n </div>\n \x3c!--Chave Pix--\x3e\n <div class="ui-md-6 ui-sm-12" [ngClass]="{\'required\': pixKeyType !== \'BANK_ACCOUNT\'}">\n <label>{{\'hcm.payroll.employees_addition_pix_key\' | translate}}</label>\n <ng-container [ngSwitch]="pixKeyType">\n <input *ngSwitchCase="\'TELEPHONE\'" only-number\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"\n (keyup)="phoneMask($event)" maxlength="15"\n placeholder="(__) ____-____">\n <p-inputMask *ngSwitchCase="\'CPF\'"\n id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="___.___.___-__"\n mask="999.999.999-99" [unmask]="true"></p-inputMask>\n <p-inputMask *ngSwitchCase="\'CNPJ\'"\n id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="__.___.___/____-__"\n mask="99.999.999/9999-99" [unmask]="true"></p-inputMask>\n <input *ngSwitchCase="\'EMAIL\'"\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="{{\'hcm.payroll.employees_addition_email\'|translate}}"/>\n <input *ngSwitchCase="\'BANK_ACCOUNT\'" disabled\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"/>\n <input *ngSwitchDefault\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey" maxlength="100" />\n </ng-container>\n <s-control-errors *ngIf="isShowPixKeyFieldValidatorMessage" id="er-pix-key"\n [control]="pixAccountFormGroup.get(\'pixKey\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n invalidPhoneNumber: \'hcm.payroll.employees_addition_invalid_phone_number\' | translate: { value: pixAccountFormGroup.get(\'pixKey\').value },\n invalidEmail: \'hcm.payroll.employees_addition_email_invalid\' | translate,\n cpfNotValid: \'hcm.payroll.employees_addition_cpf_error\' | translate,\n cnpjNotValid: \'hcm.payroll.employees_addition_cnpj_error\' | translate\n }">\n </s-control-errors>\n </div>\n \x3c!--Percentual--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="pixAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],e)}(),Xo=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Zo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,be,h.ControlErrorsModule,Ft,M.CurrencyMaskModule,vt,d.InputTextModule,_e,L.FieldsetModule,h.CustomFieldsModule,O.PanelModule,u.InputMaskModule],declarations:[$o,Jo],providers:[Xo,I.ConfirmationService],exports:[$o]})],e)}(),en=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,i){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete",{dependentId:i,dateWhen:o}):this.http.post("actions/historicalEmployeePixDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:Ne},{type:v.HttpClient}]},o=N([t.Injectable()],o)}(),tn=y,on=function(){function o(e,o,n,i,r,a,s){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=i,this.router=r,this.messageService=a,this.historicalPixAccountListService=s,this.endPoint="hcm/payroll/queries/historicalEmployeePixQuery",this.keyPayload="historicalEmployeePix",this.withSidebar=!0,this.isOnlyView=new t.EventEmitter,this.enableView=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),field:"dateChange"},{label:this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),field:"numberOfPixAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateChange=tn(e.dateChange).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){if(t.isAllowToViewHistorical){var o=e&&e.dateChange&&tn(e.dateChange,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?(t.isOnlyView.emit(!0),t.router.navigate(["historical-pix-account/"+o],{relativeTo:t.activatedRoute})):t.enableView.emit(o)}else t.isNotAllowMessage()}},{label:this.translateService.instant("hcm.payroll.edit"),command:function(){if(t.isAllowToEditHistorical){var o=e&&e.dateChange&&tn(e.dateChange,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?(t.isOnlyView.emit(!1),t.router.navigate(["historical-pix-account/"+o],{relativeTo:t.activatedRoute})):t.enableView.emit(o)}else t.isNotAllowMessage()}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateChange):t.isNotAllowMessage()}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var i=tn(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalPixAccountListService.remove(n.employeeId,i,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove")}),n.parameters=n.parameters&&B({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-pix-account-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.isNotAllowMessage=function(){this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToViewHistorical",{get:function(){return this.permission.visualizar},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToEditHistorical",{get:function(){return this.permission.editar},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&B({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:r.Router},{type:I.MessageService},{type:en}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),N([t.Input()],o.prototype,"permission",void 0),N([t.Input()],o.prototype,"employeeId",void 0),N([t.Input()],o.prototype,"dependentId",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"endPoint",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"withSidebar",void 0),N([t.Output()],o.prototype,"isOnlyView",void 0),N([t.Output()],o.prototype,"enableView",void 0),N([t.Input()],o.prototype,"reloadList",null),o=N([t.Component({selector:"c-historical-pix-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-historical-pix-account-list"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),nn=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,F.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Ce,R.ConfirmDialogModule],declarations:[on],providers:[en],exports:[on]})],e)}();e.AdmissionDraftSummaryComponent=Ee,e.AdmissionDraftSummaryModule=xe,e.AdmissionDraftSummaryService=Ae,e.AutocompleteParametersService=eo,e.BlockUiComponent=le,e.BlockUiModule=pe,e.BreadcrumbComponent=ce,e.BreadcrumbSDSModule=de,e.CNPJValidator=ie,e.CPFValidator=oe,e.CompanyIndicationsService=$t,e.ControlMessagesErrorComponent=me,e.ControlMessagesErrorModule=he,e.CoreDirectives=_e,e.CustomFieldsComponent=ye,e.CustomFieldsModule=ve,e.DataListModule=go,e.DataListRestModule=Ce,e.DateValidator=Uo,e.EmployeeSelectorComponent=Go,e.EmployeeSelectorModule=Ho,e.EmployeeSummaryComponent=Fe,e.EmployeeSummaryModule=Pe,e.EmployeeSummaryService=De,e.EntityODataParameter=No,e.ErrorPageComponent=Me,e.ErrorPageModule=Le,e.FieldValidatorComponent=Oe,e.FieldValidatorModule=Re,e.FileUploadComponent=je,e.FileUploadCoreModule=qe,e.FormComparatorService=po,e.FromToComponent=Ko,e.FromToModule=Wo,e.HistoricalBankAccountComponent=Ao,e.HistoricalBankAccountListComponent=Ro,e.HistoricalBankAccountListModule=Bo,e.HistoricalBankAccountListService=Lo,e.HistoricalBankAccountModule=Mo,e.HistoricalBankAccountService=xo,e.HistoricalPixAccountComponent=$o,e.HistoricalPixAccountListComponent=on,e.HistoricalPixAccountListModule=nn,e.HistoricalPixAccountListService=en,e.HistoricalPixAccountModule=Zo,e.HistoricalPixAccountService=Xo,e.HttpClientService=Ne,e.ImageCropComponent=Ye,e.ImageCropModule=Ge,e.ImageCropService=Ue,e.InputDateComponent=ge,e.InputDateModelComponent=Ke,e.InputDateModelModule=We,e.InputDateModule=be,e.InputRestAutoCompleteComponent=bt,e.InputRestAutoCompleteEmployeeModelModule=Ct,e.InputRestAutoCompleteEmployeeModelService=kt,e.InputRestAutoCompleteEmployeeModule=_t,e.InputRestAutoCompleteEmployeeService=It,e.InputRestAutoCompleteEnumComponent=Tt,e.InputRestAutoCompleteEnumModule=Ft,e.InputRestAutoCompleteEnumService=Dt,e.InputRestAutoCompleteJobpositionComponent=Rt,e.InputRestAutoCompleteJobpositionModule=Bt,e.InputRestAutoCompleteJobpositionService=Ot,e.InputRestAutoCompleteModelEnumModule=Lt,e.InputRestAutoCompleteModelEnumService=xt,e.InputRestAutoCompleteModelModule=Et,e.InputRestAutoCompleteModelService=Pt,e.InputRestAutoCompleteModule=vt,e.InputRestAutoCompleteService=gt,e.IntegrationService=Qt,e.ListRestComponent=Vt,e.ListRestModule=jt,e.LookupModule=So,e.LookupParametersService=Xt,e.NameNotSpacesDirective=Ie,e.OnlyNumberDirective=Se,e.PermissionService=uo,e.ReportService=so,e.ServicesModule=co,e.SpinnerLoaderComponent=qt,e.SpinnerLoaderModule=Ut,e.StringMethods=ae,e.ToastComponent=mo,e.ToastModule=ho,e.ToastService=Be,e.TypeAdmissionModule=Gt,e.TypeAdmissionServices=Yt,e.WorkflowDataService=lo,e.WorkflowIntegrator=Yo,e.WorkstationgroupLookupDto=Do,e.WorkstationgroupLookupModule=Po,e._moment=rt,e.assign=function e(t){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(!o.length)return t;var i=o.shift();if($e(t)&&$e(i)){var r=function(o){var n,r,a,s;$e(i[o])?(t[o]||Object.assign(t,((n={})[o]={},n)),e(t[o],i[o])):Qe(i[o])?Object.assign(t,((r={})[o]=i[o],r)):(t[o]||Object.assign(t,((a={})[o]=[],a)),Object.assign(t,((s={})[o]=i[o].map((function(n,i){return e(t[o][i]||{},n)})),s)))};for(var a in i)r(a)}return e.apply(void 0,Y([t],o))},e.autoCompleteObjectForIdObject=function(e){return $e(e)?(e.hasOwnProperty("tableId")&&console.error("Paramentro não é um objeto Auto Complete válido, falta tableId"),Je(e.tableId)||console.error("tableId esta vazio"),{id:e.tableId}):(console.error("Paramentro não é um objeto"),!1)},e.clearValues=ht,e.cnpjValidator=re,e.compareValues=mt,e.configEnabledFields=ct,e.containsMoreThanOneConsecutiveAbbreviation=function(e){return!/(\b.\s)(.\s)(.\b)\1?/g.test(e)},e.containsMoreThanOneConsecutiveBlankSpace=function(e){return!/(\w[ ]{2,}\w)/.test(e)},e.containsMoreThanTwoRepeatedCharacters=function(e){return!/([a-zA-Z])\1{2}/g.test(e)},e.containsSpecialCharacters=function(e){return!/[[\]!@#$%&*_+=`´{}^~<>.,:;?|()\/\\-]/.test(e)},e.convertBooleanString=function(e){return"boolean"==typeof e?!0===e?"true":"false":e},e.convertStringToBoolean=function(e){return!0===e||"true"===e.toLowerCase()},e.cpfValidator=ne,e.firstNameIsValid=function(e){var t=e.split(" ");return t.length>=2&&t[1].length>=1},e.firstNameLengthIsValid=function(e){var t=e.split(" ");return!(t[0].trim().length>0)||t[0].trim().length>=2},e.formatMoney=function(e,t){switch(void 0===t&&(t="EN"),t){case"EN":return Je(e)?e.toString().replace(".","").replace(",","."):"";case"BR":return Je(e)?e.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1."):"";default:return Je(e)?e.toString().replace(".","").replace(",","."):""}},e.fullNameLengthIsValid=function(e){return e.length<=70},e.getAddWeekDaysBusiness=function(e,t){return T.addWeekDays(it(e),t).format("DD/MM/YYYY")},e.getFormat=yt,e.getFormatDate=ot,e.getMoment=it,e.getNowDate=nt,e.getObjValids=function(e){var t=Object.assign({},e),o={};return Object.keys(t).map((function(e){Je(t[e])&&(o[e]=et(e,t[e]))})),o},e.getQueryParams=function(e){e=e.split("+").join(" ");for(var t,o={},n=/[?&]?([^=]+)=([^&]*)/g;t=n.exec(e);)o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return o},e.getWeekDaysBusiness=function(e,t){var o=t?it(t):it(e).endOf("month");return T.weekDays(it(e),o)},e.getYears=function(e){return ze().diff(e,"years",!1)},e.invertFieldDate=tt,e.isBirthDayValid=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateCompare=function(e,t,o){return!(e&&e.isValid()&&t&&o)||e[o](t)},e.isDateExpirationBeforeExpeditionDate=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateField=et,e.isDateSameOrAfterCurrentDate=function(e){if(e){var t=Ht();return e.isSameOrAfter(t)}},e.isFullDate=Ze,e.isMax=function(e,t){return e.length<=t},e.isNumber=Kt,e.isObject=$e,e.isRequired=function(e){return null!=e&&e.length>0},e.isShallow=Qe,e.isValid=Je,e.isValidDate=Xe,e.isValidPIS=function(e){var t=0,o=0,n=e.replace(/[^\d]+/g,"");if(11!==n.length||"00000000000"===n||"11111111111"===n||"22222222222"===n||"33333333333"===n||"44444444444"===n||"55555555555"===n||"66666666666"===n||"77777777777"===n||"88888888888"===n||"99999999999"===n)return!1;for(var i=0;i<10;i++)t+=parseInt(n.substring(i,i+1))*parseInt("3298765432".substring(i,i+1));return(o=10===(o=11-t%11)||11===o?0:o)===parseInt(""+n.charAt(10))},e.mountCustomForSave=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null);var n=[];return t&&e.length&&t.map((function(t,i){var r=Object.keys(e[i]).toString(),a=Je(e[i][r])?e[i][r]:null,s="date"===t.type&&o&&Je(a)?ze(a,yt(o)).format("YYYY-MM-DD"):a;n.push({field:r,value:s})})),n.length?n:null},e.mountCustomForShow=function(e){var t=[];return Object.keys(e||{}).forEach((function(o){"date"===e[o].type&&e[o].value&&(e[o].value=rt(e[o].value).format("L")),t.push(e[o])})),t},e.mountCustomToSave=at,e.mountCustomToShow=st,e.mountGeneratedCustomToSave=function(e){return Object.entries(e).forEach((function(t){var o=U(t,2),n=o[0];o[1]||delete e[n]})),e},e.ngCalendarFormat=function(e,t){if(void 0===t&&(t="DD/MM/YYYY"),Xe(e))return"string"==typeof e?e:rt(e).format(t)},e.notEmpty=Wt,e.numberOrZero=zt,e.removeCharacteresSpecials=ft,e.removeEmpty=function e(t){return Object.keys(t).forEach((function(o){return t[o]&&"object"==typeof t[o]&&e(t[o])||!t[o]&&void 0!==t[o]&&delete t[o]})),t},e.removeWhiteSpaces=function(e){return e&&String(e)?String(e).replace(/\s/g,""):String(e)},e.setCustonFields=function(e){var t=this;return e.map((function(e){var n={},i=e.value||null;"boolean"==typeof i&&(i=i?"true":"false"),n[e.field]=new o.FormControl(i),t.push(new o.FormGroup(n))})),e},e.setDisableField=dt,e.setErrors=function(e,t,o){var n=this;setTimeout((function(){var i;o?((i=Object.assign({},n.get(e).errors))[t]=o,n.get(e).setErrors(i)):(i=n.get(e).errors)&&Object.keys(i).length&&(delete i[t],Object.keys(i).length||n.get(e).setErrors(null))}),0)},e.setRequired=pt,e.setRequiredFields=function(e,t,n){t?n.forEach((function(t){return pt(e,t,!0,[o.Validators.required])})):n.forEach((function(t){return pt(e,t,!1)}))},e.setValidator=ut,e.setValidatorsAndDisableFields=function(e,t){t.forEach((function(t){ut(e,t.field,t.validators),dt(e,t.disabled,t.field,t.clearValue)}))},e.setValueCustom=function(e,t){var o=t?Object.keys(t).length:0;return e.map((function(e){e.value=o>0?t[e.field]:null})),e},e.stringMethods=se,e.sun=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return zt(t)+e}),0)},e.uiid=function(){return(new D).guid().replace(/[^a-zA-Z0-9.]/g,"").toUpperCase()},e.validateBirthDate=function(e,t){if(e&&t){var o=Ht("string"==typeof e?e.replace(/[^\d]+/g,""):e,"DDMMYYYY").format("YYYY-MM-DD").toString(),n=Ht(t.replace(/[^\d]+/g,""),"DDMMYYYY").format("YYYY-MM-DD").toString();return Ht(n).isSameOrAfter(o)}},e.verifyValidationsForm=lt,e.ɵa=ue,e.ɵb=we,e.ɵc=ke,e.ɵd=Ve,e.ɵe=St,e.ɵf=wt,e.ɵg=At,e.ɵh=Mt,e.ɵi=Nt,e.ɵj=fo,e.ɵk=yo,e.ɵl=Io,e.ɵm=bo,e.ɵn=Fo,e.ɵo=ko,e.ɵp=Co,e.ɵq=Eo,e.ɵr=Jo,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("primeng/blockui"),require("primeng/progressspinner"),require("@angular/router"),require("@ngx-translate/core"),require("rxjs/operators"),require("primeng/breadcrumb"),require("@angular/common"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/shared"),require("@seniorsistemas/angular-components"),require("moment"),require("rxjs"),require("primeng/tooltip"),require("primeng/table"),require("@angular/common/http"),require("primeng/api"),require("@senior-gestao-pessoas/angular-components"),require("ng2-img-cropper"),require("primeng/button"),require("primeng/dialog"),require("primeng/fileupload"),require("chance"),require("moment-business"),require("primeng/autocomplete"),require("primeng/splitbutton"),require("primeng/components/common/messageservice"),require("@seniorsistemas/senior-platform-data"),require("primeng/toast"),require("ng2-currency-mask"),require("primeng/fieldset"),require("primeng/panel"),require("primeng/confirmdialog"),require("primeng/tabview")):"function"==typeof define&&define.amd?define("@senior-gestao-pessoas/payroll-core",["exports","@angular/core","@angular/forms","primeng/blockui","primeng/progressspinner","@angular/router","@ngx-translate/core","rxjs/operators","primeng/breadcrumb","@angular/common","primeng/dropdown","primeng/inputmask","primeng/inputtext","primeng/shared","@seniorsistemas/angular-components","moment","rxjs","primeng/tooltip","primeng/table","@angular/common/http","primeng/api","@senior-gestao-pessoas/angular-components","ng2-img-cropper","primeng/button","primeng/dialog","primeng/fileupload","chance","moment-business","primeng/autocomplete","primeng/splitbutton","primeng/components/common/messageservice","@seniorsistemas/senior-platform-data","primeng/toast","ng2-currency-mask","primeng/fieldset","primeng/panel","primeng/confirmdialog","primeng/tabview"],t):t(((e=e||self)["senior-gestao-pessoas"]=e["senior-gestao-pessoas"]||{},e["senior-gestao-pessoas"]["payroll-core"]={}),e.ng.core,e.ng.forms,e.blockui,e.progressspinner,e.ng.router,e.core$1,e.rxjs.operators,e.breadcrumb,e.ng.common,e.dropdown,e.inputmask,e.inputtext,e.shared,e.angularComponents,e.moment_,e.rxjs,e.tooltip,e.table,e.ng.common.http,e.api,e.angularComponents$1,e.ng2ImgCropper,e.button,e.dialog,e.fileupload,e.chance,e.business,e.autocomplete,e.splitbutton,e.messageservice,e.seniorPlatformData,e.toast,e.ng2CurrencyMask,e.fieldset,e.panel,e.confirmdialog,e.tabview)}(this,(function(e,t,o,n,i,r,a,s,l,p,c,u,d,m,h,y,f,g,b,v,I,_,S,w,k,C,x,D,T,P,F,E,A,M,L,O,B,R){"use strict";D=D&&D.hasOwnProperty("default")?D.default:D;
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
+ this file except in compliance with the License. You may obtain a copy of the
6
+ License at http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
+ MERCHANTABLITY OR NON-INFRINGEMENT.
12
+
13
+ See the Apache Version 2.0 License for specific language governing permissions
14
+ and limitations under the License.
15
+ ***************************************************************************** */
16
+ var N=function(e,t){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function V(e,t){function o(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var j=function(){return(j=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function q(e,t,o,n){var i,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,o,a):i(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}function U(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function G(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function Y(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}}function K(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return a}function H(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(K(arguments[t]));return e}var $,W,z,Q,J,X,Z,ee,te,oe,ne,ie,re=function(){function e(){}return e.prototype.calcChecker1=function(e){for(var t=null,o=0;o<9;++o)t+=e.toString().charAt(o)*(10-o);var n=t%11;return n<2?0:11-n},e.prototype.calcChecker2=function(e){for(var t=null,o=0;o<10;++o)t+=e.toString().charAt(o)*(11-o);var n=t%11;return n<2?0:11-n},e.prototype.checkCPF=function(e){var t=e.replace(/\.|\-|\s/g,""),o=t.substring(0,9),n=t.substring(9,11);if(11!==t.length)return!1;for(var i=0;i<10;i++)if(""+o+n===Array(12).join(i.toString()))return!1;var r=this.calcChecker1(o),a=this.calcChecker2(o+""+r);return n.toString()===r.toString()+a.toString()},e}(),ae=new re,se=function(){function e(){}return e.prototype.checkCNPJ=function(e){var t=e;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return!0;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;o=t.length-2,n=t.substring(0,o),i=t.substring(o),r=0,a=o-7;for(var s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);if((r%11<2?0:11-r%11)!==Number(i.charAt(0)))return!1;o+=1,n=t.substring(0,o),r=0,a=o-7;for(s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);return(r%11<2?0:11-r%11)===Number(i.charAt(1))}return!0},e}(),le=new se,pe=function(){function e(){this.addStringFormat()}return e.prototype.addStringFormat=function(){if(!String.prototype.hasOwnProperty("format")){var e={format:function(){for(var e=this,t=0;t<arguments.length;t++){var o=new RegExp("\\{"+t+"\\}","gi");e=e.replace(o,arguments[t])}return e}};Object.assign(String.prototype,e)}},e}(),ce=new pe,ue=function(){function e(){}return q([t.Input()],e.prototype,"blocked",void 0),q([t.Input()],e.prototype,"target",void 0),e=q([t.Component({selector:"block-ui",template:'<p-blockUI [blocked]="blocked">\n <p-progressSpinner [strokeWidth]="5"></p-progressSpinner>\n</p-blockUI>\n',styles:[".ui-widget-overlay{background:#ccc!important;opacity:.5!important}@-webkit-keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}@keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}p-progressspinner{position:absolute!important;top:50%!important;left:50%!important}"]})],e)}(),de=function(){function e(){}return e=q([t.NgModule({imports:[o.FormsModule,n.BlockUIModule,i.ProgressSpinnerModule],declarations:[ue],exports:[ue]})],e)}(),me=function(){function e(e,t,o){this.activatedRoute=e,this.router=t,this.translate=o,this.items=[]}return e.prototype.ngOnInit=function(){var e=this;this.router.events.pipe(s.filter((function(e){return e instanceof r.NavigationEnd}))).subscribe((function(){var t=e.activatedRoute.root;e.items=e.getBreadcrumbs(t,[])}))},e.prototype.getBreadcrumbs=function(e,t){var o=e.children;if(0===o.length)return t;this.generateBreadcrumb(o,t);var n=t.length&&t.length-1||0;return this.title=t[n]&&t[n].label,t},e.prototype.generateBreadcrumb=function(e,t){var o=this;e.forEach((function(e,n){e.snapshot.data.hasOwnProperty("breadcrumb")&&e.snapshot.data.breadcrumb.map((function(n){var i={label:o.translate.instant(n.name),queryParams:e.snapshot.queryParams,routerLink:o.getFormattedUrl(e,n.routerLink),url:o.getFormattedUrl(e,n.url)};n.routerLink&&(i.disabled=!0,i.routerLinkActiveOptions={exact:!0}),t.push(i)})),e.children&&e.children.length&&o.generateBreadcrumb(e.children,t)}))},e.prototype.getFormattedUrl=function(e,t){return t&&(Object.keys(e.snapshot.params).forEach((function(o){t=t.replace(":"+o,e.snapshot.params[o])})),t.includes(":")&&e.parent)?this.getFormattedUrl(e.parent,t):t},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:r.Router},{type:a.TranslateService}]},e=q([t.Component({selector:"c-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [model]="items" ></p-breadcrumb>\n'})],e)}(),he=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule],exports:[p.CommonModule,a.TranslateModule]})],e)}(),ye=function(){function e(){}return e=q([t.NgModule({imports:[o.FormsModule,l.BreadcrumbModule,he],declarations:[me],exports:[me]})],e)}(),fe=function(){function e(){}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){for(var e in this.control.errors)if(this.control.errors.hasOwnProperty(e)&&(this.control.touched||this.control.dirty))return this.errorList[e];return null},enumerable:!0,configurable:!0}),q([t.Input()],e.prototype,"control",void 0),q([t.Input()],e.prototype,"errorList",void 0),e=q([t.Component({selector:"control-messages-error",template:'<div class="error-message" *ngIf="errorMessage">\n {{ errorMessage | translate }}\n</div>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:13px}"]})],e)}(),ge=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,he,o.ReactiveFormsModule],declarations:[fe],exports:[fe]})],e)}(),be=function(){function e(){this.optionsBoolean=[{label:"Selecione",value:""},{label:"Sim",value:"true"},{label:"Não",value:"false"}]}return e.prototype.ngOnInit=function(){},q([t.Input()],e.prototype,"params",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"form",void 0),e=q([t.Component({selector:"custom-fields",template:'<div [ngSwitch]="params.type" [formGroup]="form" *ngIf="form" >\n <div *ngSwitchCase="\'date\'" >\n <input-date-calendar [form]="form" [name]="params.field" ></input-date-calendar>\n </div>\n <div *ngSwitchCase="\'boolean\'" >\n <p-dropdown [options]="optionsBoolean" [name]="params.field"\n [(ngModel)]="params.value" [formControlName]="params.field" [required]="required" [readonly]="readonly"\n [style]="{\'width\': \'100%\'}"\n ></p-dropdown>\n </div>\n <div *ngSwitchDefault >\n <input type="text" *ngIf="!params.mask" pInputText [formControlName]="params.field" />\n <p-inputMask *ngIf="params.mask" [(ngModel)]="params.value" [formControlName]="params.field" [mask]="params.mask" [required]="required" [name]="params.field" [readonly]="readonly" ></p-inputMask>\n </div>\n</div>\n',styles:[""]})],e)}(),ve=y,Ie=function(){function e(e){this.localeService=e,this.unmask=!0,this.onBlurGetMoment=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.setFormat(),e.form.get(e.name).value){var o=e.form.get(e.name).value.toString(),n=ve(o,e.format||"YYYY-MM-DD");e.form.get(e.name).setValue(n.format(e.format||"L")),e._date=n}}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.setFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(e){if(e&&e.target&&e.target.value){var t=this.form.get(this.name).value;this._date=ve(t,this.format),this.onBlurGetMoment.emit(this._date)}else this._date={},this.form.get(this.name).setValue(null),this.onBlurGetMoment.emit(null)},Object.defineProperty(e.prototype,"model",{get:function(){var e=this.form.get(this.name).value;return ve(e,this.format)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDateElement",{get:function(){return this._inputDateElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},q([t.ViewChild("inputDateElement",{static:!1})],e.prototype,"_inputDateElement",void 0),q([t.Input()],e.prototype,"form",void 0),q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"unmask",void 0),q([t.Input()],e.prototype,"inputId",void 0),q([t.Input()],e.prototype,"withoutDay",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Output()],e.prototype,"onBlurGetMoment",void 0),q([t.Input()],e.prototype,"model",null),e=q([t.Component({selector:"input-date-calendar",template:'<div [formGroup]="form" >\n <p-inputMask *ngIf="mask" [formControlName]="name"\n [mask]="mask"\n (onBlur)="onBlur($event)"\n [placeholder]="placeholder"\n [attr.disabled]="disabled"\n [unmask]="unmask"\n [inputId]="inputId"\n [readonly]="readonly"\n #inputDateElement\n ></p-inputMask>\n</div>\n'})],e)}(),_e=function(){function e(){}return e=q([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[Ie],exports:[Ie]})],e)}(),Se=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,o.ReactiveFormsModule,m.SharedModule,d.InputTextModule,_e,c.DropdownModule,u.InputMaskModule],declarations:[be],providers:[],exports:[be]})],e)}(),we=function(){function e(e){this.elementRef=e,this.el=this.elementRef.nativeElement}return e.prototype.onBlur=function(e){this.cleanVar(e)},e.prototype.cleanVar=function(e){var t=e.trim().replace(/^\s+|\s+$|\s+(?=\s)/g,"");return e!==t&&(this.el.value=t),t},e.ctorParameters=function(){return[{type:t.ElementRef}]},q([t.HostListener("blur",["$event.target.value"])],e.prototype,"onBlur",null),e=q([t.Directive({selector:"[name-not-spaces]"})],e)}(),ke=function(){function e(e){this.el=e}return e.prototype.onKeyDown=function(e){var t=e;-1!==[46,8,9,27,13,110,190].indexOf(t.keyCode)||65===t.keyCode&&(t.ctrlKey||t.metaKey)||67===t.keyCode&&(t.ctrlKey||t.metaKey)||86===t.keyCode&&(t.ctrlKey||t.metaKey)||88===t.keyCode&&(t.ctrlKey||t.metaKey)||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()},e.ctorParameters=function(){return[{type:t.ElementRef}]},q([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=q([t.Directive({selector:"[only-number]"})],e)}(),Ce=function(){function e(){}return e=q([t.NgModule({imports:[],declarations:[ke,we],exports:[ke,we],providers:[],schemas:[]})],e)}();($=e.UsingType||(e.UsingType={})).TYPE_1="TYPE_1",$.TYPE_2="TYPE_2",$.TYPE_3="TYPE_3",$.TYPE_4="TYPE_4",$.TYPE_6="TYPE_6",$.TYPE_7="TYPE_7",$.TYPE_8="TYPE_8",$.TYPE_9="TYPE_9",$.TYPE_10="TYPE_10",$.TYPE_11="TYPE_11",$.TYPE_12="TYPE_12",$.TYPE_14="TYPE_14",$.TYPE_15="TYPE_15",$.TYPE_16="TYPE_16",$.TYPE_17="TYPE_17",$.TYPE_18="TYPE_18",$.TYPE_19="TYPE_19",$.TYPE_20="TYPE_20",$.TYPE_21="TYPE_21",(W=e.CompanyIndicationType||(e.CompanyIndicationType={})).USE_DEPENDENTS="USE_DEPENDENTS",W.VACCINATION_FREQUENCY="VACCINATION_FREQUENCY",W.APPORTIONMENT_CALCULATION="APPORTIONMENT_CALCULATION",W.USE_WORKSTATION_GROUP_EMPLOYEE="USE_WORKSTATION_GROUP_EMPLOYEE",W.STRUCTURE="STRUCTURE",W.PAY_ANNUITY="PAY_ANNUITY",W.USE_HISTORICAL_BANK_ACCOUNT="USE_HISTORICAL_BANK_ACCOUNT",(e.CoreFieldType||(e.CoreFieldType={})).searchValue="searchValue",(z=e.DirectionEnumeration||(e.DirectionEnumeration={})).ASC="ASC",z.DESC="DESC",(Q=e.ModuleType||(e.ModuleType={})).MANAGEMENT_PANEL="MANAGEMENT_PANEL",Q.PERFORMANCE_MANAGEMENT="PERFORMANCE_MANAGEMENT",Q.CAREER_SUCCESSION="CAREER_SUCCESSION",Q.RECRUIT_MANAGEMENT="RECRUIT_MANAGEMENT",Q.REMUNERATION_MANAGEMENT="REMUNERATION_MANAGEMENT",Q.DEVELOPMENT_MANAGEMENT="DEVELOPMENT_MANAGEMENT",Q.PAYROLL="PAYROLL",Q.APP="APP",Q.MOODS="MOODS",(J=e.Operators||(e.Operators={})).EQUAL="eq",J.DIFFERENT="ne",J.LESS_THAN="it",J.GREATER_THAN="gt",J.LESS__EQUAL_THAN="le",J.GREATER_EQUAL_THAN="ge",J.CONTAINING="containing",J.LOWER="lower",J.AND="and",J.OR="or",(X=e.CompareType||(e.CompareType={})).isBefore="isBefore",X.isAfter="isAfter",X.isSame="isSame",X.isSameOrAfter="isSameOrAfter",X.isSameOrBefore="isSameOrBefore",X.isNotSame="isNotSame",(Z=e.ServiceType||(e.ServiceType={})).ENTRY="entry",Z.GENERAL_REGISTER="general_register",Z.ORGANIZATION_REGISTER="organization_register",Z.PAYROLL="payroll",Z.DEPENDENT="dependent",(ee=e.HttpRequestType||(e.HttpRequestType={})).POST="post",ee.GET="get",(te=e.ReportFormat||(e.ReportFormat={})).PDF="Pdf",te.CSV="Csv",te.HTML="Html",te.XLS="Xls",te.XLSX="Xlsx",te.XML="Xml",te.ODT="Odt",te.RTF="Rtf",(oe=e.ParameterType||(e.ParameterType={})).STRING="String",oe.INTEGER="Integer",oe.DOUBLE="Double",oe.BOOLEAN="Boolean",oe.DATE="Date",oe.DATETIME="DateTime",oe.TIME="Time",oe.OBJECT="Object",(ne=e.MenuType||(e.MenuType={})).DEFAULT="DEFAULT",ne.ACTION="ACTION",(ie=e.ReportStage||(e.ReportStage={})).STARTING="Starting",ie.COMPILING="Compiling",ie.FILLING="Filling",ie.EXPORTING="Exporting",ie.DONE="Done",ie.CANCELLED="Cancelled",ie.GENERATED="Generated",ie.ERROR="Error";var xe=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.post(""+e,t)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),De=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=1,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.responsive=!0,this.scrollable=!1,this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows)+1)},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?this.dataListService.getList(this.endpoint,j({page:{current:t,size:e,orderBy:this.orderBy}},this.initParameters,this._searchParameters)).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){o.listData=e[o.keyPayload],o.totalRecords=e.countResult,o.lazy&&o.lazyLoad.emit(o.listData)})):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},Object.defineProperty(o.prototype,"parameters",{set:function(e){e&&(this._searchParameters=j({},e),this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:xe}]},q([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),q([t.Input()],o.prototype,"id",void 0),q([t.Input()],o.prototype,"dataKey",void 0),q([t.Input()],o.prototype,"rows",void 0),q([t.Input()],o.prototype,"emptyMessage",void 0),q([t.Input()],o.prototype,"columns",void 0),q([t.Input()],o.prototype,"paginator",void 0),q([t.Input()],o.prototype,"first",void 0),q([t.Input()],o.prototype,"alwaysShowPaginator",void 0),q([t.Input()],o.prototype,"actions",void 0),q([t.Input()],o.prototype,"actionLabel",void 0),q([t.Input()],o.prototype,"selectionMode",void 0),q([t.Input()],o.prototype,"lazy",void 0),q([t.Input()],o.prototype,"isMultipleSelection",void 0),q([t.Input()],o.prototype,"isSortable",void 0),q([t.Input()],o.prototype,"showHeaderCheckBox",void 0),q([t.Input()],o.prototype,"sortMode",void 0),q([t.Input()],o.prototype,"endpoint",void 0),q([t.Input()],o.prototype,"totalRecords",void 0),q([t.Input()],o.prototype,"orderBy",void 0),q([t.Input()],o.prototype,"singularMessageRecords",void 0),q([t.Input()],o.prototype,"pluralMessageRecords",void 0),q([t.Input()],o.prototype,"keyPayload",void 0),q([t.Input()],o.prototype,"initParameters",void 0),q([t.Input()],o.prototype,"responsive",void 0),q([t.Input()],o.prototype,"scrollable",void 0),q([t.Output()],o.prototype,"lazyLoad",void 0),q([t.Output()],o.prototype,"loadingChange",void 0),q([t.Output()],o.prototype,"listDataChange",void 0),q([t.Output()],o.prototype,"selectedDataChange",void 0),q([t.Output()],o.prototype,"headerCheckboxToggle",void 0),q([t.Input()],o.prototype,"parameters",null),q([t.Input()],o.prototype,"loading",null),q([t.Input()],o.prototype,"listData",null),q([t.Input()],o.prototype,"selectedData",null),o=q([t.Component({selector:"c-data-list-rest",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows" [first]="first"\n (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator" (onPage)="pagination($event)"\n [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey" [sortMode]="sortMode" [responsive]="responsive" [scrollable]="scrollable"\n pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)" [selectionMode]="selectionMode">\n \x3c!-- Colgroup --\x3e\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col *ngFor="let col of columns; let i = index"\n [ngClass]="\'col-\'+i+\' col-scroll-resize\'"/>\n <col [ngClass]="\'col-\'+ (columns?.length || 0) +\' col-scroll-resize\'"/>\n </colgroup>\n </ng-template>\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.field" [pSortableColumnDisabled]="!isSortable || !!col.icon"\n [style.width]="col.width" [pTooltip]="col.tooltip || col.label" tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style" aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default" [model]="getActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label" priority="default"\n (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,providers:[xe],styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),Te=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,he,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[De],exports:[De]})],e)}(),Pe=function(){function e(e){this.http=e,this.employeeBasicInformations=new f.Subject}return e.prototype.findEmployee=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{employeeId:t})},e.prototype.findEmployeeAutoComplete=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{valueSearch:t})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setEmployeeBasicInformations=function(e){this.employeeBasicInformations.next(e)},e.prototype.getEmployeeBasicInformations=function(){return this.employeeBasicInformations.asObservable()},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),Fe=y,Ee=function(){function e(e,t){this.activatedRoute=e,this.employeeService=t,this.timetrackingLabel="Status",this.hireLabel="Admissão",this.registerNumberLabel="Matrícula",this.ageLabel="Idade",this.loadingLabel="...",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.emploayeeData={name:this.loadingLabel,jobPosition:this.loadingDescription},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.employeeId&&e.getInformation(t.employeeId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.employeeService.findEmployee("employeeContractualInformations",e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){t.employeeService.setEmployeeBasicInformations(e),t.emploayeeData=j({},e,{timeTrackingResumeType:e.timeTrackingResumeType&&e.timeTrackingResumeType.value});var o=[];if(e.city&&o.push(e.city),e.stateAbbreviation&&o.push(e.stateAbbreviation),t.emploayeeData.location=o.join(" - "),e.hireDate&&(t.emploayeeData.hireDate=t.hireDate?t.hireDate:Fe(e.hireDate).format("L")),e.idPicture){var n={fileId:e.idPicture,ttl:2,thumbnail:!1};t.employeeService.blobServiceRequestAccess("blobServiceRequestAccess",n).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.emploayeeData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:Pe}]},q([t.Input()],e.prototype,"timetrackingLabel",void 0),q([t.Input()],e.prototype,"hireDate",void 0),q([t.Input()],e.prototype,"hireLabel",void 0),q([t.Input()],e.prototype,"registerNumberLabel",void 0),q([t.Input()],e.prototype,"ageLabel",void 0),q([t.Input()],e.prototype,"loadingLabel",void 0),q([t.Input()],e.prototype,"loadingDescription",void 0),e=q([t.Component({selector:"c-employee-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="emploayeeData?.name" [description]="emploayeeData?.jobPosition" [imageSource]="emploayeeData?.photoSource"></s-object-card-main>\n <s-object-card-field [label]="emploayeeData?.employer" [description]="emploayeeData?.location"></s-object-card-field>\n <s-object-card-field [label]="timetrackingLabel" [description]="emploayeeData?.timeTrackingResumeType"></s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="emploayeeData?.hireDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="registerNumberLabel" [description]="emploayeeData?.registernumber" iconClass="fa fa-id-card"></s-object-card-field>\n <s-object-card-field [label]="ageLabel" [description]="emploayeeData?.age" iconClass="fa fa-birthday-cake"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Ae=function(){function e(){}return e=q([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Ee],exports:[Ee],providers:[Pe]})],e)}(),Me=function(){function e(e){this.http=e,this.admissionDraftBasicInformations=new f.Subject}return e.prototype.findAdmissionDraft=function(e){return this.http.post("hcm/payroll/queries/admissionDraftQuery",{id:e})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setAdmissionDraftBasicInformations=function(e){this.admissionDraftBasicInformations.next(e)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),Le=function(){function e(e,t,o){this.activatedRoute=e,this.admissionDraftSummaryService=t,this.translateService=o,this.hireLabel="Admissão",this.hireDate="...",this.badgeText="Rascunho",this.loadingLabel="...",this.documentNumberLabel="Documento",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.draftData={name:this.loadingLabel,hiringDate:this.hireDate,documentNumber:this.loadingLabel,companyName:this.loadingLabel,localeOfCompany:this.loadingLabel,originDraftType:this.loadingLabel},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.draftId&&e.getInformation(t.draftId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.admissionDraftSummaryService.findAdmissionDraft(e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){if(t.admissionDraftSummaryService.setAdmissionDraftBasicInformations(e),e.hiringDate=t.hireDate,t.draftData=j({},e),t.draftData.originDraftType=t.originType,e.attachment&&e.attachment.fileId){var o={fileId:t.draftData.attachment.fileId,ttl:2,thumbnail:!1};t.admissionDraftSummaryService.blobServiceRequestAccess("blobServiceRequestAccess",o).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.draftData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:r.ActivatedRoute},{type:Me},{type:a.TranslateService}]},q([t.Input()],e.prototype,"originType",void 0),q([t.Input()],e.prototype,"hireLabel",void 0),q([t.Input()],e.prototype,"hireDate",void 0),q([t.Input()],e.prototype,"badgeText",void 0),q([t.Input()],e.prototype,"loadingLabel",void 0),q([t.Input()],e.prototype,"documentNumberLabel",void 0),q([t.Input()],e.prototype,"loadingDescription",void 0),e=q([t.Component({selector:"c-admission-draft-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="draftData?.name"\n [imageSource]="draftData?.photoSource">\n </s-object-card-main>\n <s-object-card-field [label]="draftData.companyName" [description]="draftData.localeOfCompany"></s-object-card-field>\n <s-object-card-field [label]="draftData.originDraftType">\n <span descriptionTemplate class="sds-badge sds-semantic-orange">{{badgeText}}</span>\n </s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="draftData?.hiringDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="documentNumberLabel" [description]="draftData?.documentNumber" iconClass="fa fa-id-card"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Oe=function(){function e(){}return e=q([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Le],exports:[Le],providers:[Me]})],e)}(),Be=function(){function e(){}return e.prototype.ngOnInit=function(){},e=q([t.Component({selector:"error-page",template:'<div class="ui-g">\n <div class="ui-sm-6 error-code">\n <span>403</span>\n </div>\n <div class="col-sm-6">\n <h4 class="error-title">​{{\'hcm.payroll.permission_error_page\'|translate}}</h4>\n <h5 class="error-description">{{\'hcm.payroll.permission_error_page_description\'|translate}}</h5>\n </div>\n</div>\n',styles:["@media (max-width:767px){.error-code{text-align:center}.error-code>span{color:#697882;font-size:80px;font-weight:300}}@media (min-width:768px){.error-code>span{color:#697882;font-size:128px;font-weight:300;float:right}}.error-title{padding-top:30px}.error-description{color:#999;margin-top:10px}"]})],e)}(),Re=function(){function e(){}return e=q([t.NgModule({imports:[he],declarations:[Be],exports:[Be],providers:[]})],e)}(),Ne=function(){function e(){this.errorMessage=""}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){var t=this,o=e.inputErrors.currentValue;this.errorMessage="",o&&Object.keys(this.errorDefs).some((function(e){if(o[e])return t.errorMessage=t.errorDefs[e],!0}))},q([t.Input()],e.prototype,"inputErrors",void 0),q([t.Input()],e.prototype,"errorDefs",void 0),q([t.Input()],e.prototype,"field",void 0),q([t.Input()],e.prototype,"onlyShowAfterTouched",void 0),e=q([t.Component({selector:"field-validator",template:'<ng-content></ng-content>\n<div style="color:#a94442;font-size: 13px"\n *ngIf="(onlyShowAfterTouched&&!field.valid&&(field.dirty || field.touched)&&errorMessage) || (!onlyShowAfterTouched&&errorMessage)">\n {{errorMessage | translate}}\n</div>\n'})],e)}(),Ve=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,he,o.ReactiveFormsModule],declarations:[Ne],exports:[Ne],providers:[]})],e)}(),je=function(){function e(){this.messagesSubjectError=new f.Subject,this.messagesSubjectSuccess=new f.Subject,this.messagesSubjectWarning=new f.Subject}return e.prototype.showError=function(e,t){void 0===t&&(t=!1),this.messagesSubjectError.next({message:e,breakLine:t})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=!1),this.messagesSubjectSuccess.next({message:e,breakLine:t})},e.prototype.showWarning=function(e,t){void 0===t&&(t=!1),this.messagesSubjectWarning.next({message:e,breakLine:t})},e.prototype.loadErrorMessages=function(){return this.messagesSubjectError.asObservable()},e.prototype.loadSuccessMessages=function(){return this.messagesSubjectSuccess.asObservable()},e.prototype.loadWarningMessages=function(){return this.messagesSubjectWarning.asObservable()},e}(),qe=function(){function o(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return o.prototype.query=function(t,o,n){var i=this;void 0===n&&(n=e.ServiceType.PAYROLL);var r="hcm/"+n+"/queries/"+t;return this.http.post(r,o).pipe(s.catchError((function(e){return e&&403===e.status&&i.messageService.add({severity:"error",summary:i.translateService.instant("hcm.payroll.error"),detail:i.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.enumQuery=function(e,t,o){var n=this;void 0===o&&(o="payroll");var i="hcm/"+o+"/queries/"+e;return this.http.post(i,t).pipe(s.catchError((function(e){return e&&403===e.status&&n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.action=function(e,t){var o=this,n="hcm/payroll/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.recruitmentAction=function(e,t){var o=this,n="hcm/recruitment/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.get=function(e){var t=this,o="hcm/payroll/entities/"+e;return this.http.get(o).pipe(s.catchError((function(e){return 403===e.status&&t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.getAutoComplete=function(t,o,n){var i=this;void 0===n&&(n=e.ServiceType.PAYROLL);var r="hcm/"+n+"/entities/"+t+"?filter="+o+"&size=10&orderby=code+asc";return this.http.get(r).pipe(s.catchError((function(e){return e&&403===e.status&&i.messageService.add({severity:"error",summary:i.translateService.instant("hcm.payroll.error"),detail:i.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.patch=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.patch(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.post=function(e,t){var o=this,n="hcm/payroll/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.put=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.put(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.delete=function(e,t){var o=this,n=t?"hcm/payroll/entities/"+e+"/"+t:"hcm/payroll/entities/"+e;return this.http.delete(n).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},o=q([t.Injectable()],o)}(),Ue=function(){function e(e){this.http=e}return e.prototype.blobServiceRequestUpload=function(e){var t={fileName:e.name,thumbnail:this.isImage(e)};return this.http.action("blobServiceRequestUpload",t)},e.prototype.blobServiceRequestAccess=function(e){var t={fileId:e,tll:2,thumbnail:!1};return this.http.action("blobServiceRequestAccess",t)},e.prototype.blobServiceFileDelete=function(e){var t={fileId:e,thumbnail:!1};return this.http.action("blobServiceDelete",t)},e.prototype.isImage=function(e){return/^image\//.test(e.type)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Ge=function(){function e(e,o,n){this.service=e,this.toastService=o,this.translate=n,this.files=[],this.onUploadFile=new t.EventEmitter,this.onRemoveFile=new t.EventEmitter}return e.prototype.uploadHandler=function(e){var t=this,o=[];if(e&&e.files.length){e.files.sort(),e.files.length>10&&e.files[10]&&delete e.files[10];for(var n=this.getFilesCountAndValidate(e.files),i=0;i<n;i++){var r=this.validateFileSize(e.files[i]);i<=9&&r.isUploaded&&!r.complete&&o.push(this.saveFile(r))}f.forkJoin.apply(void 0,H(o)).subscribe((function(){t.onUploadFile.emit(t.files)}))}},e.prototype.validateFileSize=function(e){return e.isUploaded&&!e.complete&&e.size>5e7&&(e.complete=!0,e.error=this.translate.instant("hcm.payroll.attachments_max_mb"),this.toastService.showError(this.translate.instant("hcm.payroll.attachments_alert_error"))),e},e.prototype.getFilesCountAndValidate=function(e){var t=0;return e.length&&(e.length>10?(t=10,this.toastService.showError(this.translate.instant("hcm.payroll.attachments_max_length"))):t=e.length),t},e.prototype.saveFile=function(e){var t=this;return new f.Observable((function(o){return t.service.blobServiceRequestUpload(e).pipe(s.map((function(e){return e&&e.result}))).subscribe((function(n){return t.doUpload(n,e,o)}),(function(t){e.complete=!0,e.error=t.message,e.objectURL=void 0}))}))},e.prototype.doUpload=function(e,t,o){var n=new XMLHttpRequest;return t.id=e.fileId,t.objectURL=e.locationURI,t.version=e.version,t.progress=0,n.upload.addEventListener("progress",(function(e){t.progress=Math.round(100*e.loaded/e.total)}),!1),n.onreadystatechange=function(){4===n.readyState&&(t.complete=!0,n.status<200||n.status>=300?(t.objectURL=void 0,t.error=n.statusText||"Erro ao anexar arquivo"):t.error=!1,o.next(t),o.complete())},n.open("PUT",t.objectURL,!0),n.setRequestHeader("Translate","f"),n.send(t)},e.prototype.onCancelUpload=function(e){this.files.splice(e,1)},e.prototype.removeFile=function(){this.onRemoveFile.emit(this.files)},e.ctorParameters=function(){return[{type:Ue},{type:je},{type:a.TranslateService}]},q([t.Input()],e.prototype,"errorTooltip",void 0),q([t.Input()],e.prototype,"files",void 0),q([t.Output()],e.prototype,"onUploadFile",void 0),q([t.Output()],e.prototype,"onRemoveFile",void 0),e=q([t.Component({selector:"c-file-upload",template:'<s-file-upload-deprecated chooseLabel="{{\'hcm.payroll.file_upload_choose_label\'|translate}}"\n cancelLabel="{{\'hcm.payroll.file_upload_cancel_label\'|translate}}"\n removeLabel="{{\'hcm.payroll.file_upload_remove_label\'|translate}}"\n successTooltip="{{\'hcm.payroll.file_upload_success_tooltip\'|translate}}"\n [errorTooltip]="errorTooltip"\n [customUpload]="true" [accept]="\'*/*\'" [multiple]="true"\n (uploadHandler)="uploadHandler($event)" (onCancelUpload)="onCancelUpload($event)"\n (onRemoveFile)="removeFile()" [files]="files"\n></s-file-upload-deprecated>\n'})],e)}(),Ye=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,_.FileUploadModuleDeprecated,he],declarations:[Ge],providers:[Ue],exports:[Ge]})],e)}(),Ke=function(){function e(e){this.http=e}return e.prototype.saveImage=function(e,t,o){return U(this,void 0,void 0,(function(){var n,i,r;return G(this,(function(a){switch(a.label){case 0:return e?(n=null,e?n={fileName:e.name}:t&&(n={fileName:t.split("/")[1]}),n?[4,this.blobServiceRequestUpload(o,n).toPromise()]:[3,2]):[2];case 1:return i=a.sent(),(r=new XMLHttpRequest).open("PUT",i.result.locationURI,!0),r.setRequestHeader("Translate","f"),r.send(e),[2,i.result];case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],this.http.request("GET",e,{responseType:"arraybuffer"}).pipe(s.map((function(e){var n=new Blob([e],{type:o});return n.name=t,n})))},e.prototype.getImage=function(e,t,o){return U(this,void 0,void 0,(function(){return G(this,(function(n){switch(n.label){case 0:return e&&e.fileId?[4,this.blobServiceRequestAccess(t,e.fileId,o).toPromise()]:[3,2];case 1:return[2,n.sent().result.locationURI];case 2:return[2]}}))}))},e.prototype.buildUrl=function(e,t){return"hcm/"+e+"/"+t},e.prototype.query=function(e,t,o){var n="queries/"+t;return this.http.post(this.buildUrl(e,n),o)},e.prototype.blobServiceRequestUpload=function(e,t){var o={fileName:t.fileName,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestUpload"),o)},e.prototype.blobServiceRequestAccess=function(e,t,o){var n={fileId:t,tll:2,thumbnail:o};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestAccess"),n)},e.prototype.blobServiceFileDelete=function(e,t){var o={fileId:t,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceDelete"),o)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),He=function(){function e(e,o){this.imageCropService=e,this.toastService=o,this.service="payroll",this.onClickSave=new t.EventEmitter,this.defaulPerson="assets/default-person.png",this.display=!1,this.imageCrop=[],this.data={},this.cropperSettings=new S.CropperSettings,this.cropperSettings.width=100,this.cropperSettings.height=100,this.cropperSettings.keepAspect=!1,this.cropperSettings.preserveSize=!0,this.cropperSettings.canvasWidth=600,this.cropperSettings.canvasHeight=450,this.cropperSettings.rounded=!0,this.cropperSettings.minWithRelativeToResolution=!1,this.cropperSettings.noFileInput=!0,this.cropperSettings.cropperDrawSettings.strokeColor="rgba(255,255,255,1)",this.cropperSettings.cropperDrawSettings.strokeWidth=1}return Object.defineProperty(e.prototype,"image",{set:function(e){var t=this;e&&e.fileId&&!this.personPhotoLink&&this.imageCropService.blobServiceRequestAccess(this.service,e.fileId,!0).subscribe((function(e){t.personPhotoLink=e.result.locationURI}))},enumerable:!0,configurable:!0}),e.prototype.onUploadHandler=function(e){var t=this;if(this.file=e.files[0],this.file&&this.file.size>5e6)return this.file=null,this.imageCrop=[],void this.toastService.showError("O tamanho máximo permitido para a imagem é de 5MB");this.display=!1;var o=new Image,n=new FileReader;n.onloadend=function(e){o.src=e.target.result,t.cropper.setImage(o)},n.readAsDataURL(this.file),this.display=!0},e.prototype.ngOnInit=function(){this.data.image=null,this.personPhotoLink=null,this.personFirstName="",this.display=!1},e.prototype.showDialog=function(){this.display=!0},e.prototype.onHide=function(){this.display=!1},e.prototype.reset=function(){this.file=null,this.data={},this.imageCrop=[],this.cropper.reset(),this.data.image=null,this.personPhotoLink=null,this.personFirstName=""},e.prototype.saveImage=function(){return U(this,void 0,void 0,(function(){var e,t,o,n=this;return G(this,(function(i){switch(i.label){case 0:return this.file?(e=this.file.name,this.cropper&&this.cropper.image?[4,this.urltoFile(this.cropper.image.image,e)]:[3,2]):(this.onClickSave.emit(null),this.onHide(),[2]);case 1:t=i.sent(),this.personPhotoLink=this.data.image,o=null,this.file?o={fileName:this.file.name}:this.data&&(o={fileName:this.data.fileId.split("/")[1]}),o&&(this,this.imageCropService.blobServiceRequestUpload(this.service,o).subscribe((function(e){var o=new XMLHttpRequest;o.open("PUT",e.result.locationURI,!0),o.setRequestHeader("Translate","f"),o.send(t),n.onClickSave.emit(e.result),n.onHide()}))),i.label=2;case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:o})}))},e.prototype.deleteImage=function(){this.imageCropService.blobServiceFileDelete(this.service,this.data&&this.data.image&&this.data.image.fileId),this.reset()},e.ctorParameters=function(){return[{type:Ke},{type:je}]},q([t.Input()],e.prototype,"service",void 0),q([t.Output()],e.prototype,"onClickSave",void 0),q([t.ViewChild("cropper",{static:!1})],e.prototype,"cropper",void 0),q([t.Input()],e.prototype,"image",null),e=q([t.Component({selector:"image-crop",template:'<a (click)="showDialog()">\n <span class="result rounded">\n <img class="center-block" style="max-width: 100%; height: auto"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson" [alt]="personFirstName"\n width="auto" height="140">\n </span>\n</a>\n\n<p-dialog [(visible)]="display" modal="true" [minWidth]="450" (onHide)="onHide()">\n <p-header>\n {{\'hcm.payroll.employees_image_cropper_edit\' | translate}}\n </p-header>\n\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-12 img-user-modal" *ngIf="!personPhotoLink">\n <i class="fa fa-user-circle fa-5x"></i>\n <div id="txt-select-image">{{\'hcm.payroll.employees_image_cropper_viewing\' | translate}}</div>\n <div class="ui-md-4 btn-center">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\' | translate}}"></button>\n </div>\n <div class="ui-g-12 ui-md-12" *ngIf="personPhotoLink">\n <span class="result rounded">\n <img class="center-block default-image"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson"\n [alt]="personFirstName"\n width="auto"\n height="140">\n </span>\n </div>\n </div>\n <div class="ui-g" [style.display]="data.image ? \'block\' : \'none\'">\n <div class="ui-md-4 btn-left">\n <p-fileUpload chooseLabel="Selecionar foto"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\'|translate}}"></button>\n </div>\n <div class="ui-md-12">\n <img-cropper #cropper [image]="data" [settings]="cropperSettings"></img-cropper>\n </div>\n </div>\n\n <p-footer>\n <button pButton type="button" class="btn-link ui-button-link" (click)="display=false"\n label="{{\'hcm.payroll.employees_image_cropper_cancel\' | translate}}"></button>\n <button pButton type="button" (click)="saveImage()" label="{{\'hcm.payroll.employees_image_cropper_save\'|translate}}"></button>\n </p-footer>\n</p-dialog>\n',styles:[".center{float:left;position:relative;left:30%}.btn-center{float:left;position:relative;left:33%}.btn-left{float:left;position:relative}.rounded{cursor:pointer}.result.rounded>img{border-radius:50%}div.cropper{height:400px}.center-block{display:block;margin-right:auto;margin-left:auto}.ui-fileupload-choose{width:300px!important}.fa-user-circle{color:#ccc}.img-user-modal{text-align:center!important}#txt-select-image{margin:20px 0;font-weight:700;font-size:16px}"]})],e)}(),$e=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,he,k.DialogModule,w.ButtonModule,C.FileUploadModule,S.ImageCropperModule,S.ImageCropperModule,h.ThumbnailModule],declarations:[He],providers:[Ke,h.ImageCropperService],exports:[He]})],e)}(),We=y,ze=function(){function e(e){this.localeService=e,this.onBlurGetMoment=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.getFormat(),e.model){var o=e.model,n=We(o,e.format||"YYYY-MM-DD");n.isValid()?(e.model=n.format(e.format||"L"),e._date=n):e._date=null}}))},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.getFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(){var e=this.model;this._date=We(e,this.format),this.onBlurGetMoment.emit(this._date)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"withoutDay",void 0),q([t.Input()],e.prototype,"unmask",void 0),q([t.Input()],e.prototype,"style",void 0),q([t.Input()],e.prototype,"styleClass",void 0),q([t.Output()],e.prototype,"onBlurGetMoment",void 0),q([t.Output()],e.prototype,"modelChange",void 0),q([t.Input()],e.prototype,"model",null),e=q([t.Component({selector:"input-date-calendar-model",template:'<p-inputMask *ngIf="mask"\n [mask]="mask"\n (onBlur)="onBlur()"\n [unmask]="unmask"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [(ngModel)]="model"\n [style]="style"\n [styleClass]="styleClass"\n></p-inputMask>\n'})],e)}(),Qe=function(){function e(){}return e=q([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[ze],exports:[ze]})],e)}(),Je=y;function Xe(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Ze(e){return!Array.isArray(e)||!e.find((function(e){return"object"==typeof e}))}function et(e){return 0===e||"boolean"==typeof e||null!=e&&""!==e}function tt(e,t){return void 0===t&&(t=!0),!e||!ot(e,t)||(t?Je(e.replace(/[^\d]+/g,""),"DDMMYYYY").isValid():Je(e.replace(/[^\d]+/g,""),"MMYYYY").isValid())}function ot(e,t){if(void 0===t&&(t=!0),e){var o=void 0;return o=t?8:6,e.replace(/[^\d]+/g,"").length===o}return!0}function nt(e,t){return-1!==e.search("Date")?it(t):t}function it(e,t,o){if(void 0===t&&(t="DDMMYYYY"),void 0===o&&(o="YYYY-MM-DD"),et(e)){var n=rt(e,t);return Je(e.replace(/[^\d]+/g,""),n).format(o)}}function rt(e,t){return-1!==e.search("/")?"DDMMYYYY":-1!==e.search("-")?"YYYYMMDD":t}function at(e){return void 0===e&&(e="YYYY-MM-DD"),Je().format(e)}function st(e,t){void 0===t&&(t="DDMMYYYY");var o=rt(e,t);return Je(e.replace(/[^\d]+/g,""),o)}function lt(e,t){return t?Je(e,t):Je(e)}function pt(e){var t=[];return Object.entries(e).forEach((function(e){var o=K(e,2),n=o[0],i=o[1];t.push({field:n,value:i})})),t}function ct(e){var t={};return e&&e.length&&e.forEach((function(e){"date"===e.type&&e.value&&(e.value=lt(e.value).format("L")),t[e.field]=e.value})),t}function ut(){var e=this;Object.keys(this.controls).map((function(t){var n=e.get(t);n.markAsDirty(),(n instanceof o.FormGroup||n instanceof o.FormArray)&&ut.call(n)}))}function dt(e,t,n,i){n?(e.controls[t].setValidators(o.Validators.compose(i&&i.length?i:[o.Validators.required])),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function mt(e,t,o,n){t?o.forEach((function(t){return e.get(t).enable()})):(o.forEach((function(t){return e.get(t).disable()})),gt(e,n||o))}function ht(e,t,n){n&&n.length?(e.controls[t].setValidators(o.Validators.compose(n)),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function yt(e,t,o,n){void 0===n&&(n=!0),t?(e.get(o).disable(),n&&e.get(o).reset()):e.get(o).enable()}function ft(e,t){return void 0===t&&(t="ASC"),function(o,n){if(!o.hasOwnProperty(e)||!n.hasOwnProperty(e))return 0;var i="string"==typeof o[e]?o[e].toUpperCase():o[e],r="string"==typeof n[e]?n[e].toUpperCase():n[e],a=0;return i>r?a=1:i<r&&(a=-1),"DESC"===t?-1*a:a}}function gt(e,t){t.forEach((function(t){return e.get(t).reset()}))}function bt(e){if(e){var t=e.calendar.dateFormat.toString();return(t=(t=t.replace(/[y]/g,"YY")).replace(/[/]/g,"")).toUpperCase()}}function vt(e){return e?e.toString().replace(/[&\/\\#,+()$~%.'":*?<>{}-]/g,""):null}var It=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:qe}]},o=q([t.Injectable()],o)}(),_t=function(){function o(o){this.service=o,this.forceSelection=!0,this.keyName="name",this.keyToExclude=[],this.usingType=[],this.minCharactersToSearch=3,this.multiple=!1,this.serviceType=e.ServiceType.PAYROLL,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<this.minCharactersToSearch))try{if(this.isTimetrackingSituation)return this.service.query("autocompleteTimetrackingSituation",{valueSearch:n,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDismissalReason){var i={valueSearch:n};return this.referenceDate&&(i.referenceDate=this.referenceDate),this.service.query("autocompleteDismissalReason",i,e.ServiceType.GENERAL_REGISTER).subscribe((function(e){return o.formaterResponce(e.result)}))}if(this.usingType&&this.usingType.length)return this.service.query("autocompleteOtherCompanyFilterUsingType",{searchText:n,usingType:this.usingType}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDepartmentFromCompany)return this.service.query("autocompleteDepartmentQuery",{searchText:n,companyId:this.companyId,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isWagetype){i={searchText:n,companyId:this.companyId};return this.service.query("autocompleteWagetypeQuery",i,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n),this.serviceType).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log(e)}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(t.isTimetrackingSituation||t.isDismissalReason||t.usingType&&t.usingType.length){if(t.keyToExclude.includes(e.fields&&e.fields[2]&&e.fields[2].value))return;var i="";e.fields.map((function(e){n[e.name]=e.value})),i+=e.fields.filter((function(e){return"code"===e.name.toLowerCase()})).map((function(e){return e?e.value+=" - ":""}))[0],!t.usingType||!t.usingType.length||i&&"undefined"!==i||(i=""),i+=e.fields.filter((function(e){return"name"===e.name.toLowerCase()})).map((function(e){return e?e.value:""}))[0],n.name=i,o.push(n)}else{e.fields.map((function(e){n[e.name]=e.value}));var r="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){(e.includes("date")||e.includes("Birthday"))&&(n[e]=lt(n[e]).format("DD/MM/YYYY")),r+=n[e]+" - "})),r=r.slice(0,-3)):(t.keyCode&&(r+=n[t.keyCode]+" - "),t.keyName&&(r+=n[t.keyName])),n.name=r,o.push(n)}})),this.suggestions=H(o),o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e),enableEntityFilters:this.enableEntityFilters}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){(["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)||et(e.value))&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return U(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},o.prototype.onDropdownClick=function(){this.isDropdown=!0},Object.defineProperty(o.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObject},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:It}]},q([t.ViewChild("autoCompleteObject",{static:!0})],o.prototype,"_autoCompleteObject",void 0),q([t.Input()],o.prototype,"name",void 0),q([t.Input()],o.prototype,"table",void 0),q([t.Input()],o.prototype,"order",void 0),q([t.Input()],o.prototype,"enableEntityFilters",void 0),q([t.Input()],o.prototype,"fields",void 0),q([t.Input()],o.prototype,"conditionsFields",void 0),q([t.Input()],o.prototype,"conditions",void 0),q([t.Input()],o.prototype,"placeholder",void 0),q([t.Input()],o.prototype,"readonly",void 0),q([t.Input()],o.prototype,"required",void 0),q([t.Input()],o.prototype,"disabled",void 0),q([t.Input()],o.prototype,"dropdown",void 0),q([t.Input()],o.prototype,"forceSelection",void 0),q([t.Input()],o.prototype,"error",void 0),q([t.Input()],o.prototype,"emptyMessage",void 0),q([t.Input()],o.prototype,"keyCode",void 0),q([t.Input()],o.prototype,"keyName",void 0),q([t.Input()],o.prototype,"concatFieldsForName",void 0),q([t.Input()],o.prototype,"itemSelect",void 0),q([t.Input()],o.prototype,"form",void 0),q([t.Input()],o.prototype,"inputId",void 0),q([t.Input()],o.prototype,"isTimetrackingSituation",void 0),q([t.Input()],o.prototype,"isDepartmentFromCompany",void 0),q([t.Input()],o.prototype,"companyId",void 0),q([t.Input()],o.prototype,"referenceDate",void 0),q([t.Input()],o.prototype,"isDismissalReason",void 0),q([t.Input()],o.prototype,"keyToExclude",void 0),q([t.Input()],o.prototype,"usingType",void 0),q([t.Input()],o.prototype,"minCharactersToSearch",void 0),q([t.Input()],o.prototype,"isWagetype",void 0),q([t.Input()],o.prototype,"multiple",void 0),q([t.Input()],o.prototype,"serviceType",void 0),q([t.Output()],o.prototype,"onBlur",void 0),q([t.Output()],o.prototype,"onSelect",void 0),q([t.Output()],o.prototype,"onClear",void 0),o=q([t.Component({selector:"input-rest-auto-complete",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],o)}(),St=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule],declarations:[_t],providers:[It],exports:[_t]})],e)}(),wt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),kt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(st(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(st(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e,enableEntityFilters:this.enableEntityFilters};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.otherContractType&&(t.otherContractType=this.otherContractType),!1===this.filterEmployeeType&&(t.filterEmployeeType=this.filterEmployeeType),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:wt}]},q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"value",void 0),q([t.Input()],e.prototype,"company",void 0),q([t.Input()],e.prototype,"branch",void 0),q([t.Input()],e.prototype,"employeeType",void 0),q([t.Input()],e.prototype,"otherContractType",void 0),q([t.Input()],e.prototype,"filterEmployeeType",void 0),q([t.Input()],e.prototype,"enableEntityFilters",void 0),q([t.Input()],e.prototype,"placeholder",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"dropdown",void 0),q([t.Input()],e.prototype,"forceSelection",void 0),q([t.Input()],e.prototype,"error",void 0),q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"keyCode",void 0),q([t.Input()],e.prototype,"keyName",void 0),q([t.Input()],e.prototype,"itemSelect",void 0),q([t.Input()],e.prototype,"form",void 0),q([t.Input()],e.prototype,"inputId",void 0),q([t.Output()],e.prototype,"onBlur",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onClear",void 0),e=q([t.Component({selector:"input-rest-auto-complete-employee",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Ct=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule],declarations:[kt],providers:[wt],exports:[kt]})],e)}(),xt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Dt=function(){function e(e,o){this.service=e,this.activatedRoute=o,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[],this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow)}))},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(st(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(st(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.useWorkflow&&(t.timeTrackingResumeType={key:"FIRED"}),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:xt},{type:r.ActivatedRoute}]},q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"value",void 0),q([t.Input()],e.prototype,"company",void 0),q([t.Input()],e.prototype,"branch",void 0),q([t.Input()],e.prototype,"employeeType",void 0),q([t.Input()],e.prototype,"placeholder",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"dropdown",void 0),q([t.Input()],e.prototype,"forceSelection",void 0),q([t.Input()],e.prototype,"error",void 0),q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"keyCode",void 0),q([t.Input()],e.prototype,"keyName",void 0),q([t.Input()],e.prototype,"itemSelect",void 0),q([t.Input()],e.prototype,"style",void 0),q([t.Input()],e.prototype,"inputStyle",void 0),q([t.Output()],e.prototype,"onBlur",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onClear",void 0),q([t.Output()],e.prototype,"modelChange",void 0),q([t.Input()],e.prototype,"model",null),e=q([t.Component({selector:"input-rest-auto-complete-employee-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n</p-autoComplete>\n',styles:[""]})],e)}(),Tt=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,he,v.HttpClientModule,T.AutoCompleteModule,o.ReactiveFormsModule],declarations:[Dt],providers:[xt],exports:[Dt]})],e)}(),Pt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Ft=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyToExclude=[],this.keyToKeep=[],this.multiple=!1,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results[0].items}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(this.suggestions=[],!(isNaN(o)&&o.toString().length<3)){this.keyToExclude&&this.keyToExclude.length?this.payload=this.payload&&this.payload.filter((function(e){return!t.keyToExclude.includes(e.key)})):this.keyToKeep&&this.keyToKeep.length&&(this.payload=this.payload&&this.payload.filter((function(e){return t.keyToKeep.includes(e.key)})));for(var n=0;n<this.payload.length;n++){var i=this.payload[n];-1!==i.value.toLowerCase().indexOf(o.toLowerCase())&&this.suggestions.push(i)}}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.prototype.onClearItem=function(e){return U(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},Object.defineProperty(e.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObjectEl},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:Pt}]},q([t.ViewChild("autoCompleteObject",{static:!0})],e.prototype,"_autoCompleteObjectEl",void 0),q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"placeholder",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"dropdown",void 0),q([t.Input()],e.prototype,"forceSelection",void 0),q([t.Input()],e.prototype,"error",void 0),q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"itemSelect",void 0),q([t.Input()],e.prototype,"inputId",void 0),q([t.Input()],e.prototype,"keyToExclude",void 0),q([t.Input()],e.prototype,"keyToKeep",void 0),q([t.Input()],e.prototype,"server",void 0),q([t.Input()],e.prototype,"enumeration",void 0),q([t.Input()],e.prototype,"form",void 0),q([t.Input()],e.prototype,"multiple",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onBlur",void 0),q([t.Output()],e.prototype,"onClear",void 0),e=q([t.Component({selector:"input-rest-auto-complete-enum",template:'<div [formGroup]="form">\n <p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Et=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule],declarations:[Ft],providers:[Pt],exports:[Ft]})],e)}(),At=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:qe}]},o=q([t.Injectable()],o)}(),Mt=function(){function o(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.keysToExclude=[],this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<3))try{if(this.isWagetype){var i=j({searchText:n,companyId:this.companyId},this.wagetypeReferenceDates);return this.service.query("autocompleteWagetypeQuery",i,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n)).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(e.fields.map((function(e){n[e.name]=e.value})),!t.keysToExclude.includes(e&&e.tableId)){var i="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){e.includes("date")&&(n[e]=lt(n[e]).format("L")),i+=n[e]+" - "})),i=i.slice(0,-3)):(t.keyCode&&(i+=n[t.keyCode]+" - "),t.keyName&&(i+=n[t.keyName])),n.name=i,o.push(n)}})),this.suggestions=o,o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e)}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){!["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)&&et(e.value)&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){this.onClear.emit(e)},o.prototype.onBlurItem=function(e){this.onBlur.emit(e)},o.prototype.onFocusItem=function(e){this.onFocus.emit(e)},Object.defineProperty(o.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:At}]},q([t.Input()],o.prototype,"name",void 0),q([t.Input()],o.prototype,"table",void 0),q([t.Input()],o.prototype,"order",void 0),q([t.Input()],o.prototype,"fields",void 0),q([t.Input()],o.prototype,"conditionsFields",void 0),q([t.Input()],o.prototype,"conditions",void 0),q([t.Input()],o.prototype,"placeholder",void 0),q([t.Input()],o.prototype,"readonly",void 0),q([t.Input()],o.prototype,"required",void 0),q([t.Input()],o.prototype,"disabled",void 0),q([t.Input()],o.prototype,"dropdown",void 0),q([t.Input()],o.prototype,"forceSelection",void 0),q([t.Input()],o.prototype,"error",void 0),q([t.Input()],o.prototype,"emptyMessage",void 0),q([t.Input()],o.prototype,"keyCode",void 0),q([t.Input()],o.prototype,"keyName",void 0),q([t.Input()],o.prototype,"concatFieldsForName",void 0),q([t.Input()],o.prototype,"itemSelect",void 0),q([t.Input()],o.prototype,"style",void 0),q([t.Input()],o.prototype,"inputStyle",void 0),q([t.Input()],o.prototype,"keysToExclude",void 0),q([t.Input()],o.prototype,"isWagetype",void 0),q([t.Input()],o.prototype,"companyId",void 0),q([t.Input()],o.prototype,"wagetypeReferenceDates",void 0),q([t.Output()],o.prototype,"onBlur",void 0),q([t.Output()],o.prototype,"onSelect",void 0),q([t.Output()],o.prototype,"onClear",void 0),q([t.Output()],o.prototype,"onFocus",void 0),q([t.Output()],o.prototype,"modelChange",void 0),q([t.Input()],o.prototype,"model",null),o=q([t.Component({selector:"input-rest-auto-complete-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onFocus)="onFocusItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],o)}(),Lt=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule],declarations:[Mt],providers:[At],exports:[Mt]})],e)}(),Ot=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Bt=function(){function e(e){this.service=e,this.forceSelection=!0,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=e.query;if(this.suggestions=[],!(isNaN(t)&&t.toString().length<3))for(var o=0;o<this.payload[0].items.length;o++){var n=this.payload[0].items[o];-1!==n.value.toLowerCase().indexOf(t.toLowerCase())&&this.suggestions.push(n)}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:Ot}]},q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"placeholder",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"dropdown",void 0),q([t.Input()],e.prototype,"forceSelection",void 0),q([t.Input()],e.prototype,"error",void 0),q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"itemSelect",void 0),q([t.Input()],e.prototype,"style",void 0),q([t.Input()],e.prototype,"inputStyle",void 0),q([t.Input()],e.prototype,"server",void 0),q([t.Input()],e.prototype,"enumeration",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onBlur",void 0),q([t.Output()],e.prototype,"onClear",void 0),q([t.Output()],e.prototype,"modelChange",void 0),q([t.Input()],e.prototype,"model",null),e=q([t.Component({selector:"input-rest-auto-complete-model-enum",template:'<p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],e)}(),Rt=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule],declarations:[Bt],providers:[Ot],exports:[Bt]})],e)}(),Nt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Vt=function(){function e(e){this.service=e,this.forceSelection=!0,this.minCharactersToSearch=3,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<this.minCharactersToSearch))try{this.service.query("autocompleteJobpositionQuery",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponse(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponse=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,name:""};e.fields.map((function(e){o[e.name]=e.value})),o.name=o.Code+" - "+o.Name,t.push(o)})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){return{searchText:e,companyId:this.companyId?this.replace(this.companyId):null,creationDate:this.creationDate?this.replace(this.creationDate):null,expirationDate:this.expirationDate?this.replace(this.expirationDate):null,jobpositionsFilter:this.jobpositionsFilter?this.replaceArray(this.jobpositionsFilter):null,ignoredJobpositions:this.ignoredJobpositions?this.replaceArray(this.ignoredJobpositions):null,order:this.order}},e.prototype.replace=function(e){return e.replace(new RegExp("'","g"),"")},e.prototype.replaceArray=function(e){var t=this;return e.map((function(e){return t.replace(e)}))},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:Nt}]},q([t.Input()],e.prototype,"name",void 0),q([t.Input()],e.prototype,"value",void 0),q([t.Input()],e.prototype,"companyId",void 0),q([t.Input()],e.prototype,"creationDate",void 0),q([t.Input()],e.prototype,"expirationDate",void 0),q([t.Input()],e.prototype,"jobpositionsFilter",void 0),q([t.Input()],e.prototype,"ignoredJobpositions",void 0),q([t.Input()],e.prototype,"order",void 0),q([t.Input()],e.prototype,"placeholder",void 0),q([t.Input()],e.prototype,"readonly",void 0),q([t.Input()],e.prototype,"required",void 0),q([t.Input()],e.prototype,"disabled",void 0),q([t.Input()],e.prototype,"dropdown",void 0),q([t.Input()],e.prototype,"forceSelection",void 0),q([t.Input()],e.prototype,"error",void 0),q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"itemSelect",void 0),q([t.Input()],e.prototype,"form",void 0),q([t.Input()],e.prototype,"inputId",void 0),q([t.Input()],e.prototype,"minCharactersToSearch",void 0),q([t.Input()],e.prototype,"multiple",void 0),q([t.Output()],e.prototype,"onBlur",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onClear",void 0),q([t.Output()],e.prototype,"onFocus",void 0),e=q([t.Component({selector:"input-rest-auto-complete-jobposition",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),jt=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,m.SharedModule,o.ReactiveFormsModule],declarations:[Vt],providers:[Nt],exports:[Vt]})],e)}(),qt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.prototype.queryEntity=function(e,t){return this.http.get(e)},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Ut=function(){function e(e,o){this.translateService=e,this.service=o,this.arguments={page:{current:1,size:"10"}},this.alwaysShowPaginator=!1,this.onLoadPayload=new t.EventEmitter,this.loadedList=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.hasOwnProperty("arguments")&&(this.arguments=Object.assign({},e.arguments.currentValue),this.getList(1)),e.hasOwnProperty("reload")&&!0===e.reload.currentValue&&this.getList(1)},e.prototype.getList=function(e){var t=this;this.loadedList.emit(!0);try{var o=Object.assign({},this.arguments);o.page.current=e,this.isEntity?this.service.queryEntity(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o,e),t.loadedList.emit(!1)})):this.service.query(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o.result,e),t.loadedList.emit(!1)}))}catch(e){console.log("Erro ao tentar buscar lista no back")}},e.prototype.onResponseQuery=function(e,t){this.payload=this.filterValues?this.filterValues.bind(this.scope)(e[this.keyPayload]):e[this.keyPayload],this.onLoadPayload.emit({result:e[this.keyPayload],page:t}),this.totalRecords=this.isEntity?e.totalElements:e.countResult},e.prototype.onHandlePage=function(e){var t=e.first/e.rows+1;this.getList(t)},e.prototype.getRowActions=function(e){return this.getRowActionsFun.call(this.scope,e)},e.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},e.ctorParameters=function(){return[{type:a.TranslateService},{type:qt}]},q([t.Input()],e.prototype,"emptyMessage",void 0),q([t.Input()],e.prototype,"urlRest",void 0),q([t.Input()],e.prototype,"keyPayload",void 0),q([t.Input()],e.prototype,"columns",void 0),q([t.Input()],e.prototype,"arguments",void 0),q([t.Input()],e.prototype,"filterValues",void 0),q([t.Input()],e.prototype,"getRowActionsFun",void 0),q([t.Input()],e.prototype,"scope",void 0),q([t.Input()],e.prototype,"reload",void 0),q([t.Input()],e.prototype,"isEntity",void 0),q([t.Input()],e.prototype,"alwaysShowPaginator",void 0),q([t.Output()],e.prototype,"onLoadPayload",void 0),q([t.Output()],e.prototype,"loadedList",void 0),e=q([t.Component({selector:"list-rest",template:'<p-table [value]="payload" reorderableColumns="true" [rows]="10" [totalRecords]="totalRecords" [paginator]="true" [pageLinks]="8"\n [alwaysShowPaginator]="alwaysShowPaginator" [responsive]="true" [lazy]="true" (onPage)="onHandlePage($event)">\n <p-column *ngFor="let col of columns;" [field]="col[\'field\']" [header]="col[\'label\']|translate" [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <span>{{data[col[\'field\']]}}</span>\n </ng-template>\n </p-column>\n\n <p-column [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\', \'overflow\': \'inherit\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <p-splitButton *ngIf="getRowActions(data).length > 1" label="{{\'hcm.payroll.action\' | translate}} &#9660;" [model]="getRowActions(data)"\n (onClick)="handleClickActions(button)" #button></p-splitButton>\n <button *ngIf="getRowActions(data).length <= 1" type="button" class="sds-button-aux aux-secondary" (click)="getRowActions(data)[0].command()">\n {{getRowActions(data)[0].label}}\n </button>\n </ng-template>\n </p-column>\n\n <ng-template pTemplate="emptymessage">\n {{ emptyMessage }}\n </ng-template>\n</p-table>\n',styles:["tr{border:1px solid #ddd!important}"]})],e)}(),Gt=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,he,v.HttpClientModule,b.TableModule,d.InputTextModule,w.ButtonModule,P.SplitButtonModule],declarations:[Ut],providers:[qt],exports:[Ut]})],e)}(),Yt=function(){function e(){}return e=q([t.Component({selector:"spinner-loader",template:"<p-progressSpinner></p-progressSpinner>\n"})],e)}(),Kt=function(){function e(){}return e=q([t.NgModule({imports:[o.FormsModule,i.ProgressSpinnerModule],declarations:[Yt],exports:[Yt]})],e)}(),Ht=function(){function e(){this.company={},this.contractNationality={},this.contractType={}}return e.prototype.setCompany=function(e){this.company=e},e.prototype.getCompanyId=function(){return this.company.companyId},e.prototype.setContractNationality=function(e){this.contractNationality=e},e.prototype.isBrazilianAdmission=function(){return"BR"===this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isBrazilAndforeignContract=function(){return"BR"===this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isForeignAdmission=function(){return"BR"!==this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isForeignAndforeignContract=function(){return"BR"!==this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isBrazilianCompany=function(){return"BR"===this.company.abbreviation},e.prototype.isNationalContract=function(){return"National"===this.contractNationality.key},e.prototype.getCountryID=function(){return this.company.id},Object.defineProperty(e.prototype,"contractNationalityKey",{get:function(){return this.contractNationality.key},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"abbreviation",{get:function(){return this.company.abbreviation},enumerable:!0,configurable:!0}),e.prototype.getCurrency=function(){return this.company.currency},e.prototype.getStructureID=function(){return this.company.structure},e.prototype.setContractType=function(e){this.contractType=e},Object.defineProperty(e.prototype,"contractTypeKey",{get:function(){return this.contractType?this.contractType.key:this.contractType},enumerable:!0,configurable:!0}),e=q([t.Injectable()],e)}(),$t=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule],providers:[Ht]})],e)}(),Wt=y;function zt(e){return/^\d*$/.test(e)}function Qt(e){return e||!1}function Jt(e){return zt(Qt(e))?Number.parseInt(e):0}var Xt=function(){function e(e){this.http=e,this.companyUseWorkstationGroupSubject=new f.Subject}return e.prototype.getCompanyIndications=function(e,t){return this.http.query("companyIndicationQuery",{companyId:e,companyIndicationType:t}).pipe(s.map((function(e){return e.result})))},e.prototype.setCompanyUseWorkstationGroup=function(e){this.companyUseWorkstationGroupSubject.next(e)},e.prototype.setStructure=function(e){this.structure=e},e.prototype.getStructure=function(){return this.structure},e.prototype.getCompanyUseWorkstationGroup=function(){return this.companyUseWorkstationGroupSubject.asObservable()},e.prototype.setUseWorkstationGroup=function(e){this.useWorkstationGroup=e},e.prototype.getUseWorkstationGroup=function(){return this.useWorkstationGroup},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),Zt=function(){function e(e){this.http=e}return e.prototype.hasModule=function(e){return this.http.query("hasModule",{module:e})},e.ctorParameters=function(){return[{type:qe}]},e=q([t.Injectable()],e)}(),eo=y,to=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o,this._httpParams=new v.HttpParams}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.lookupRequest=function(e,t,o,n,i,r,a,s){return void 0===a&&(a=[]),void 0===s&&(s=[]),this.searchLookupFields=o,this.endpoint=t,this.parameters=s,this.concatFields=i,this.concatOtherFields=a,this.lookupDisplayField=r,this.searchFields=n,this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.searchRequest=function(e,t,o,n,i,r,a){return void 0===r&&(r=[]),void 0===a&&(a=[]),this.endpoint=t,this.parameters=a,this.concatFields=n,this.concatOtherFields=r,this.lookupDisplayField=i,this.searchFields=o,this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.getDataLookup=function(){var e=this;return this.getUrlDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(t){var o=t.contents;return e.concatFields&&e.concatFields.length&&o.map((function(t){e.convertGridFieldValue(t),t[e.lookupDisplayField]=e.generateDisplayFieldValue(j({},t))})),t})))},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(j({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=eo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(i.type,n,e):o=""+t.getParameterByType(i.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(i.type,n,e[n]):t.getParameterByType(i.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+eo(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq '"+o.id+"'";default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),e.prototype.getUrlDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,j({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient),t.ɵɵinject(F.MessageService),t.ɵɵinject(a.TranslateService))},token:e,providedIn:"root"}),e=q([t.Injectable({providedIn:"root"})],e)}(),oo=y,no=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,i){var r=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,r,i).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var i=this,r="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),r&&(p=" and "),(s=i.getParameterByType(c,a,t[a],n))&&(r+=" "+p+" "+s)})),r},o.prototype.getParameterByType=function(t,o,n,i){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+oo(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,i);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,i="";if(e){try{for(var r=Y(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=K(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";i+=i?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(i+=i?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}i=i?"("+i+")":""}return i},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:qe}]},o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o(t.ɵɵinject(qe))},token:o,providedIn:"root"}),o=q([t.Injectable({providedIn:"root"})],o)}(),io="platform/report/queries/getParameters",ro="platform/report/queries/getReportUri",ao="platform/report/queries/getReportStatus",so="platform/report/queries/findReportsByName",lo="platform/report/queries/getRunningReports",po="platform/report/actions/generateReport",co=function(){function e(e){this.http=e}return e.prototype.findReportsByName=function(e){return this.http.post(""+so,{name:e}).pipe(s.map((function(e){return e.reports?e.reports:[]})))},e.prototype.findReportByName=function(e){return e=e||"",this.findReportsByName(e).pipe(s.map((function(t){var o=t&&t.filter((function(t){return t.name&&t.name===e}));return o&&1==o.length?o[0]:null})))},e.prototype.getParameters=function(e,t){return this.http.post(""+io,{id:e,reportFileId:t}).pipe(s.map((function(e){return e||null})))},e.prototype.getReportUri=function(e){return this.http.post(""+ro,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportUri})))},e.prototype.getReportStatus=function(e){return this.http.post(""+ao,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportStatus})))},e.prototype.generateReport=function(e){return this.http.post(""+po,e).pipe(s.map((function(e){return e||null})))},e.prototype.getRunningReports=function(e,t){return this.http.post(""+lo,{offset:e,limit:t,orderByDesc:!0,filterCancelled:!0})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient))},token:e,providedIn:"root"}),e=q([t.Injectable({providedIn:"root"})],e)}(),uo=function(){function e(){this.useWorkflowValueChange=new f.Subject,this._draftJSON=new f.BehaviorSubject(null)}return e.prototype.setUseWorkflow=function(e){this.useWorkflowValueChange.next(e)},e.prototype.getUseWorkflow=function(){return this.useWorkflowValueChange.asObservable()},e.prototype.setDraftJSON=function(e){this._draftJSON.next(e)},e.prototype.getDraftJSON=function(){return this._draftJSON.asObservable()},e=q([t.Injectable()],e)}(),mo=function(){function e(){this.resetDivergentFormData()}return e.prototype.resetDivergentFormData=function(){this._divergentFormData={}},e.prototype.checkFormDisagreements=function(e){var t=this;void 0===e&&(e=!1),this.resetDivergentFormData(),this._sanitizeEmptyStrings(),e&&this._removeIdsFromFormDatas(),this._oldFormData===this._newFormData?this._throwIdenticalMessage():(Object.keys(this._oldFormData).forEach((function(e){t._oldFormData[e]!==t._newFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),Object.keys(this._newFormData).forEach((function(e){t._newFormData[e]!==t._oldFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),this._isDivergentFormDataEmpty&&this._throwIdenticalMessage())},e.prototype._removeIdsFromFormDatas=function(){[this._oldFormData,this._newFormData].forEach((function(e){delete e.id}))},e.prototype._sanitizeEmptyStrings=function(){[this._oldFormData,this._newFormData].forEach((function(e){Object.keys(e).map((function(t){""===e[t]&&(e[t]=null)}))}))},e.prototype._createDivergencePair=function(e){var t={oldValue:null,newValue:null};return t.oldValue=this._oldFormData[e],t.newValue=this._newFormData[e],t},e.prototype._throwIdenticalMessage=function(){throw new Error("The objects oldFormData and newFormData are identical")},Object.defineProperty(e.prototype,"oldFormData",{get:function(){return this._oldFormData},set:function(e){this._oldFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newFormData",{get:function(){return this._newFormData},set:function(e){this._newFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"divergentFormArray",{get:function(){var e=[];return Object.entries(this._divergentFormData).map((function(t){var o=K(t,2),n=o[0],i=o[1],r={key:null,oldValue:null,newValue:null};r.key=n,r.oldValue=i.oldValue,r.newValue=i.newValue,e.push(r)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isDivergentFormDataEmpty",{get:function(){return 0===Object.entries(this._divergentFormData).length},enumerable:!0,configurable:!0}),e=q([t.Injectable()],e)}(),ho=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule],providers:[Xt,Zt,to,no,co,uo,mo]})],e)}(),yo=function(){function e(e){var t=this;this.http=e,this.actionUrl="platform/authorization/queries/checkAccess",this.resourceAddress="res://senior.com.br/hcm/payroll/",this.defaultActions=["Visualizar","Incluir","Editar","Excluir"],this._resources=[],this._attributes=[],E.user.getAuthHeader().then((function(e){t.httpOptions={headers:new v.HttpHeaders({"Content-Type":"application/json",Accept:"application/json",Authorization:e})}})),E.service.getRestUrl().then((function(e){return t.restUrl=e}))}return e.prototype.get=function(e){var t=this;return void 0===e&&(e=""),this.permissions?this.observable=f.Observable.of(this.permissions):this.observable||(this.observable=this.getPermissions().pipe(s.map((function(e){return t.permissions=e})))),this.observable.pipe(s.map((function(t){return e?t[e]:t})))},e.prototype.getAbac=function(e,t){return this.attributes=t,this.getAbacPermission(e)},e.prototype.getAbacPermission=function(e){return this.http.post(this.actionUrl,{includeFilters:!1,permissions:[{resource:""+this.resourceAddress+e,action:"Visualizar",attributes:this._attributes.map((function(e){return{attribute:e.name,value:e.value}}))}]},this.httpOptions)},e.prototype.getPermissions=function(){var e=this,t=[];return this._resources.forEach((function(o){return e.defaultActions.forEach((function(n){return t.push({action:n,resource:""+e.resourceAddress+o})}))})),this.http.post(this.actionUrl,{includeFilters:!1,permissions:H(t)},this.httpOptions).pipe(s.map((function(t){var o=t.permissions,n={};return o.forEach((function(t){var o=t.resource.replace(e.resourceAddress,"");n[o]=n[o]||{},n[o][t.action.toLowerCase()]=t.authorized})),n})))},Object.defineProperty(e.prototype,"attributes",{set:function(e){this._attributes=e},enumerable:!0,configurable:!0}),e.prototype.setResources=function(e){this._resources=e},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),fo=function(){function e(e,t,o){this.toastService=e,this.messageService=t,this.translateService=o,this.key="TOAST",this.breakLine=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.toastService.loadErrorMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createErrorMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadSuccessMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createSuccessMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadWarningMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createWarningMessage(t&&t.message),e.breakLine=t&&t.breakLine}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.createErrorMessage=function(e,t){this.messageService.clear(),this.messageService.add({severity:"error",summary:t||this.translateService.instant("hcm.payroll.error"),detail:e,sticky:!0,key:this.key})},e.prototype.createSuccessMessage=function(e,t){this.messageService.add({severity:"success",summary:t||this.translateService.instant("hcm.payroll.success"),detail:e,key:this.key})},e.prototype.createWarningMessage=function(e,t){this.messageService.add({severity:"warn",summary:t||this.translateService.instant("hcm.payroll.warn"),detail:e,sticky:!0,key:this.key})},e.ctorParameters=function(){return[{type:je},{type:I.MessageService},{type:a.TranslateService}]},e=q([t.Component({selector:"c-toast",template:"\n <p-toast [ngClass]=\"breakLine ? 'ui-toast-break-line' : ''\" [key]=\"key\"></p-toast>\n "})],e)}(),go=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,he,A.ToastModule],declarations:[fo],providers:[je,I.MessageService],exports:[fo]})],e)}(),bo=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.get(""+e,{params:t})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=q([t.Injectable()],e)}(),vo=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=0,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.totalRecordsChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows))},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?(this.configParameters(this.initParameters),this.configHttpParamsDisplayFields(),this.configHttpParamsPagination(e.toString(),t.toString()),this.configHttpParamsOrderBy(),this.dataListService.getList(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){o.listData=e.contents,o.totalRecords=e.totalElements,o.lazy&&o.lazyLoad.emit(o.listData)}))):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},o.prototype.configHttpParamsOrderBy=function(){if(this.orderBy&&this.orderBy.length){var e="";this.orderBy.map((function(t){e+=e?","+t.field+"+"+t.direction:t.field+"+"+t.direction})),this.httpParams=this.httpParams.set("orderby",e)}},o.prototype.configHttpParamsDisplayFields=function(){this.displayFields&&this.displayFields.length&&(this.httpParams=this.httpParams.set("displayfields",this.displayFields.toString()))},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},o.prototype.configParameters=function(e){var t="";e&&(e.forEach((function(e){t?t+=" and "+e.toString():t=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",t))},Object.defineProperty(o.prototype,"parameters",{set:function(e){this.configParameters(e),e&&(this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.totalRecordsChange.emit(this.totalRecords)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:bo}]},q([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),q([t.Input()],o.prototype,"id",void 0),q([t.Input()],o.prototype,"dataKey",void 0),q([t.Input()],o.prototype,"rows",void 0),q([t.Input()],o.prototype,"emptyMessage",void 0),q([t.Input()],o.prototype,"columns",void 0),q([t.Input()],o.prototype,"paginator",void 0),q([t.Input()],o.prototype,"first",void 0),q([t.Input()],o.prototype,"alwaysShowPaginator",void 0),q([t.Input()],o.prototype,"actions",void 0),q([t.Input()],o.prototype,"actionLabel",void 0),q([t.Input()],o.prototype,"selectionMode",void 0),q([t.Input()],o.prototype,"lazy",void 0),q([t.Input()],o.prototype,"isMultipleSelection",void 0),q([t.Input()],o.prototype,"isSortable",void 0),q([t.Input()],o.prototype,"showHeaderCheckBox",void 0),q([t.Input()],o.prototype,"sortMode",void 0),q([t.Input()],o.prototype,"endpoint",void 0),q([t.Input()],o.prototype,"displayFields",void 0),q([t.Input()],o.prototype,"orderBy",void 0),q([t.Input()],o.prototype,"singularMessageRecords",void 0),q([t.Input()],o.prototype,"pluralMessageRecords",void 0),q([t.Input()],o.prototype,"initParameters",void 0),q([t.Output()],o.prototype,"lazyLoad",void 0),q([t.Output()],o.prototype,"loadingChange",void 0),q([t.Output()],o.prototype,"totalRecordsChange",void 0),q([t.Output()],o.prototype,"listDataChange",void 0),q([t.Output()],o.prototype,"selectedDataChange",void 0),q([t.Output()],o.prototype,"headerCheckboxToggle",void 0),q([t.Input()],o.prototype,"parameters",null),q([t.Input()],o.prototype,"loading",null),q([t.Input()],o.prototype,"listData",null),q([t.Input()],o.prototype,"selectedData",null),q([t.Input()],o.prototype,"totalRecords",null),o=q([t.Component({selector:"c-data-list",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows"\n [first]="first" (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator"\n (onPage)="pagination($event)" [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey"\n [sortMode]="sortMode" [responsive]="true" pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)"\n [selectionMode]="selectionMode">\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.orderBy || col.field"\n [pSortableColumnDisabled]="!isSortable || !!col.icon" [style.width]="col.width" [pTooltip]="col.tooltip || col.label"\n tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="{{id}}-col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style"\n aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="{{id}}-col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default"\n [model]="getActions(rowData, key)" [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label"\n priority="default" (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),Io=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[vo],exports:[vo],providers:[bo]})],e)}(),_o=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.getDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=q([t.Injectable()],e)}(),So=y,wo=function(){function e(e){this.lookupService=e,this.searchTotalRecordsLabel="hcm.payroll.lookup_search_total_records_label",this.filterLabel="hcm.payroll.lookup_generic_filter_label",this.clearLabel="hcm.payroll.lookup_generic_clean_filter_label",this.cancelLabel="hcm.payroll.lookup_generic_btn_cancel_label",this.selectLabel="hcm.payroll.lookup_btn_select_label",this.lookupEmptyMessage="hcm.payroll.lookup_auto_complete_empty_message",this.lookupSuggestions=[],this.searchGridFields=[],this.searchLookupFields=[],this.searchGridData=[],this.searchFields=[],this.parameters=[],this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.lookupRequest=function(e){var t=this;this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.lookupSuggestions=e&&H(e.contents)}))},e.prototype.searchRequest=function(e){var t=this;this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.searchGridData=e&&H(e.contents)}))},e.prototype.getDataLookup=function(e,t){var o=this;return this.lookupService.getDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(e){var t=e.totalElements,n=e.contents;return o.searchTotalRecords=t,o.concatFields&&o.concatFields.length&&n.map((function(e){o.convertGridFieldValue(e),e[o.lookupDisplayField]=o.generateDisplayFieldValue(j({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=So(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.searchGridFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(i.type,n,e):o=""+t.getParameterByType(i.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var i=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(i.type,n,e[n]):t.getParameterByType(i.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+So(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq "+o.id;default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:_o}]},q([t.Input()],e.prototype,"id",void 0),q([t.Input()],e.prototype,"dataKey",void 0),q([t.Input()],e.prototype,"concatFields",void 0),q([t.Input()],e.prototype,"searchTitle",void 0),q([t.Input()],e.prototype,"formGroup",void 0),q([t.Input()],e.prototype,"controlName",void 0),q([t.Input()],e.prototype,"multiple",void 0),q([t.Input()],e.prototype,"endpoint",void 0),q([t.Input()],e.prototype,"lookupDisplayField",void 0),q([t.Input()],e.prototype,"searchTotalRecordsLabel",void 0),q([t.Input()],e.prototype,"filterLabel",void 0),q([t.Input()],e.prototype,"clearLabel",void 0),q([t.Input()],e.prototype,"cancelLabel",void 0),q([t.Input()],e.prototype,"selectLabel",void 0),q([t.Input()],e.prototype,"lookupEmptyMessage",void 0),q([t.Input()],e.prototype,"searchTotalRecords",void 0),q([t.Input()],e.prototype,"lookupSuggestions",void 0),q([t.Input()],e.prototype,"searchGridFields",void 0),q([t.Input()],e.prototype,"searchLookupFields",void 0),q([t.Input()],e.prototype,"searchGridData",void 0),q([t.Input()],e.prototype,"searchFields",void 0),q([t.Input()],e.prototype,"parameters",void 0),q([t.Output()],e.prototype,"onSelect",void 0),q([t.Output()],e.prototype,"onClear",void 0),q([t.Output()],e.prototype,"modelChange",void 0),q([t.Input()],e.prototype,"model",null),e=q([t.Component({selector:"c-lookup",template:'<div *ngIf="formGroup;else noForm" [formGroup]="formGroup">\n <s-lookup [id]="id" [dataKey]="dataKey" [formControlName]="controlName" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</div>\n\n<ng-template #noForm>\n <s-lookup [id]="id" [dataKey]="dataKey" [(ngModel)]="model" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</ng-template>\n'})],e)}(),ko=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,a.TranslateModule],declarations:[wo],exports:[wo],providers:[_o]})],e)}(),Co=y,xo=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,i){var r=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,r,i).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var i=this,r="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),r&&(p=" and "),(s=i.getParameterByType(c,a,t[a],n))&&(r+=" "+p+" "+s)})),r},o.prototype.getParameterByType=function(t,o,n,i){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+Co(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,i);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,i="";if(e){try{for(var r=Y(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=K(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";i+=i?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(i+=i?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}i=i?"("+i+")":""}return i},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:qe}]},o=q([t.Injectable()],o)}(),Do=y,To=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(j({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=Do(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var i=t.convertLookupFieldValue(e[n.name],n);i&&(o?o+=" - "+i:o=i)})),o},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,j({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=q([t.Injectable()],e)}(),Po=function(){function e(e,t){var o=e.filterData;this.name=o.name||null,this.code=o.code||null,this.searchText=o.searchText||null,this.companyId=o.headoffice||null,this.companyBranchId=o.branchoffice&&o.branchoffice.id||null,this.departmentId=o.department&&o.department.tableId||null,this.costcenterId=o.costcenter&&o.costcenter.id||null,this.jobpositionIds=o.jobposition||null,this.syndicateId=o.syndicate&&o.syndicate.id||null,this.shiftId=o.workshiftScale||null,this.workshiftId=o.workshiftId&&o.workshiftId.id||null,this.workshiftGroupId=o.workshiftGroupId&&o.workshiftGroupId.id||null,this.intervalGroupId=o.intervalGroupId&&o.intervalGroupId.is||null,this.scaleTeamId=o.scaleTeamId&&o.scaleTeamId.id||null,this.scaleCategoryId=o.scaleCategoryId&&o.scaleCategoryId.id||null,this.employmentRelationshipId=o.employmentRelationshipId&&o.employmentRelationshipId.id||null,this.contractType=o.contractType||null,this.expenseNatureId=o.expenseNatureId&&o.expenseNatureId.id||null,this.allowDeficient=o.allowDeficient||null,this.disabilityIds=o.disabilityIds||null,this.listExpired=!!o.hasOwnProperty("listExpired")&&o.listExpired,this.manager=o.manager?o.manager.tableId:null,this.referenceDate=t||null,this.page={current:e.first?e.first:0,size:e.rows?e.rows:10}||null}return e.prototype.getToFilter=function(){return this.jobpositionIds=this.convertListIds(this.jobpositionIds),this.disabilityIds=this.convertListIds(this.disabilityIds),this},e.prototype.convertListIds=function(e){if(e)return e.map((function(e){return e.tableId?e.tableId:e.id}))},e}(),Fo=y,Eo=function(){function o(o,n,i,r){var a=this;this.translate=o,this.cd=n,this.autocompleteParametersService=i,this.lookupParametersService=r,this.currentCompanyId=null,this.currentCompanyName=null,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.companyBranchId=null,this.lookupSuggestions=[],this.searchGridData=[],this.suggestionsObservable=new f.BehaviorSubject([]),this.totalRecords=0,this.valueEnumShift=[{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FIRST_SHIFT"),value:"0",enum:"FIRST_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_SECOND_SHIFT"),value:"1",enum:"SECOND_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_THIRD_SHIFT"),value:"2",enum:"THIRD_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FOURTH_SHIFT"),value:"3",enum:"FOURTH_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_MIXED"),value:"4",enum:"MIXED"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_GENERAL"),value:"5",enum:"GENERAL"}],this.concatFieldsName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String}),new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String})],this.concatName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String})],this.gridFields=[new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String}),new h.FormField({name:"manager",label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),type:h.FieldType.String})],this.searchFields=H(this.concatName,[{name:"name",label:this.translate.instant("hcm.payroll.movimentation_name"),type:h.FieldType.String},{name:"headoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_company"),dataKey:"id",appendTo:"body",fullWidth:!0,suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"branchoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_branch"),dataKey:"id",appendTo:"body",fullWidth:!0,onRemove:function(){return a.companyBranchId=null},onSelect:function(e){var t=e.id;return a.companyBranchId=t},onSearch:function(e){a.getAutocomplete("company",e?{companyname:e,code:e}:null,"code","companyname",{headquarter:a.currentCompanyId?a.currentCompanyId:"not null"})},suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"manager",type:h.FieldType.Autocomplete,multiple:!1,label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteManager",{valueSearch:e||"",companyId:{tableId:a.currentCompanyId},companyBranchId:{tableId:a.companyBranchId?a.companyBranchId:""}})},suggestionsObservable:this.suggestionsObservable,displayField:"manager"},{name:"department",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.movimentation_historical_department_tab"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteDepartmentQuery",{searchText:e||"",companyId:a.currentCompanyId,referenceDate:Fo(y.now()).format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"costcenter",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_cost_center"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(t){a.getAutocomplete("costcenter",t?{name:t,code:t}:null,"code","name",a.currentCompanyId?{company:a.currentCompanyId}:null,!0,e.ServiceType.ORGANIZATION_REGISTER)},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"jobposition",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.movimentation_historical_job_position_tab"),dataKey:"tableId",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteJobpositionQuery",{searchText:e||"",companyId:a.currentCompanyId,creationDate:Fo().format("YYYY-MM-DD"),expirationDate:Fo().format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"syndicate",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_syndicate"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("syndicate",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"workshiftScale",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.SHIFT"),showClear:!0,size:{md:12},onChange:function(){a.resetDependenciesOfShift(!0)},options:this.valueEnumShift},{name:"workshiftId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshift",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftScale").value?{workshiftScale:a.valueEnumShift[a.workstationFilterForm.get("workshiftScale").value].enum}:null)},onSelect:function(){a.resetDependenciesOfShift()},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"workshiftGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_workshift-group"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshiftGroup",e?{code:e}:null,"code","baseDate",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"baseDate"},{name:"intervalGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_class_interval"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("intervalGroup",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"scaleTeamId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_team"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleTeam",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"scaleCategoryId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_category"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleCategory",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"employmentRelationshipId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_employment_relationship"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("employmentRelationship",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"contractType",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.employees_temporary_contract_temporary_contract_type"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Employee"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Manager"),value:1},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FarmWorker"),value:2},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Retired"),value:3},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Trainee"),value:4},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Apprentice"),value:5},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FixedDueDate"),value:6},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_RetiredManager"),value:7},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_PublicAgent"),value:8},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Teacher"),value:9},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_CooperativeWorker"),value:10},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_DomesticWorker"),value:11},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_TeacherFixedDueDate"),value:12}]},{name:"expenseNatureId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_expense_nature"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("expenseNature",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"allowDeficient",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.allow_deficient"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_No"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Also"),value:1},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Only"),value:2}]},{name:"disabilityIds",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.employees_addition_disability"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("disability",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"}]),this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges();var e=this.workstationFilterForm.get("headoffice");e.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e.disable()},Object.defineProperty(o.prototype,"workstationFilterForm",{get:function(){return this.workstationgroupEl&&this.workstationgroupEl.formGroupDialog},enumerable:!0,configurable:!0}),o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return U(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.resetDependenciesOfShift=function(e){void 0===e&&(e=!1),e&&this.workstationFilterForm.get("workshiftId").reset(),this.workstationFilterForm.get("workshiftGroupId").reset(),this.workstationFilterForm.get("intervalGroupId").reset()},o.prototype.searchRequest=function(e){var t=this,o=this.workstationFilterForm.get("headoffice"),n=e&&e.filterData;o.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e=j({},this.getValueEvent(e,n));var i=this.getHireDate().replace(/\'/g,""),r=new Po(e,i);this.lookupParametersService.lookupRequestPost(r.getToFilter(),"hcm/payroll/queries/workstationgroupFilterQuery",H(this.concatFieldsName),"name").pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){n?t.searchGridData=e&&H(e.contents):t.lookupSuggestions=e&&H(e.contents),t.totalRecords=e&&e.totalPages}))},o.prototype.getValueEvent=function(e,t){return t?e.filterData.headoffice=this.currentCompanyId:e={filterData:{headoffice:this.currentCompanyId,searchText:e}},e},o.prototype.getAutocompleteQuery=function(e,t){var o=this;this.autocompleteParametersService.getAutoCompleteQuery(e,t).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){"autocompleteDepartmentQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&(e.name=e.fields[1].value+" - "+e.fields[0].value)})):"autocompleteJobpositionQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&e.fields[1]&&(e.name=e.fields[0].value+" - "+e.fields[1].value)})):"autocompleteManager"===e&&t.map((function(e){e.manager=e.fields[0].value?e.fields[0].value:e.fields[3].value})),o.suggestionsObservable.next(t)}))},o.prototype.getAutocomplete=function(t,o,n,i,r,a,l){var p=this;void 0===r&&(r=null),void 0===a&&(a=!1),void 0===l&&(l=e.ServiceType.PAYROLL),this.autocompleteParametersService.getAutoComplete(t,j({},r,{searchValue:j({},o)}),this.searchFields,a,l).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){"workshiftGroup"===t&&e.filter((function(e){if(e.baseDate){var t=Fo(e.baseDate,"YYYY-MM-DD");if(t.isValid())return e.baseDate=t.format(p.dateFormat)}})),p.suggestionsObservable.next(p.getConcatFields(e,n,i))}))},o.prototype.getConcatFields=function(e,t,o){return o&&t&&e.filter((function(e){e[o]=e[t]+" - "+e[o]})),e},o.prototype.getHireDate=function(){var e=Fo(this.hireDate).format(this.dateFormat);return e?"'"+it(e,this.dateFormat)+"'":"'"+at()+"'"},o.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:xo},{type:To}]},q([t.ViewChild("workstationgroupEl",{static:!1})],o.prototype,"workstationgroupEl",void 0),q([t.Input()],o.prototype,"currentCompanyId",void 0),q([t.Input()],o.prototype,"currentCompanyName",void 0),q([t.Input()],o.prototype,"hireDate",void 0),q([t.Input()],o.prototype,"dateFormat",void 0),q([t.Input()],o.prototype,"required",void 0),q([t.Input()],o.prototype,"disabled",void 0),q([t.Input()],o.prototype,"form",void 0),q([t.Input()],o.prototype,"name",void 0),q([t.Output()],o.prototype,"onSelect",void 0),q([t.Output()],o.prototype,"onClear",void 0),q([t.Output()],o.prototype,"onBlur",void 0),o=q([t.Component({selector:"c-workstationgroup-lookup",template:'<div [formGroup]="form">\n <s-lookup\n #workstationgroupEl\n id="workstationGroup"\n dataKey="code"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n [formControlName]="name"\n (onLookupRequest)="searchRequest($event)"\n (onSearchRequest)="searchRequest($event)"\n filterTitle="{{ \'hcm.payroll.filters\' | translate }}"\n filterLabel="{{ \'hcm.payroll.filter\' | translate }}"\n clearLabel="{{ \'hcm.payroll.lookup_generic_clean_filter_label\' | translate }}"\n cancelLabel="{{ \'hcm.payroll.cancel\' | translate }}"\n selectLabel="{{ \'hcm.payroll.lookup_btn_select_label\' | translate }}"\n [disabled]="disabled"\n [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{ \'hcm.payroll.lookup_auto_complete_empty_message\' | translate }}"\n [searchGridData]="searchGridData"\n [searchFields]="searchFields"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n [searchTotalRecords]="totalRecords"\n searchTotalRecordsLabel="{{ totalRecords }} {{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [searchGridFields]="gridFields"\n searchTitle="{{ \'hcm.payroll.employees_addition_workstation\' | translate }}"\n lookupDisplayField="name"\n ></s-lookup>\n\n</div>\n'})],o)}(),Ao=function(){function e(){}return e=q([t.NgModule({imports:[o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,p.CommonModule,a.TranslateModule],declarations:[Eo],exports:[Eo],providers:[xo,To]})],e)}(),Mo=function(){function n(o,n,i,r,a){var s=this;this.confirmationService=o,this.translateService=n,this.activatedRoute=i,this.cd=r,this.formBuilder=a,this.recordByRow=1,this.showDateWhen=!1,this.isEditMode=!1,this.isViewMode=!1,this.withSideBar=!0,this.visibleChange=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.orderBy={field:"displayDateWhen",direction:e.DirectionEnumeration.DESC},this.bankAccountItemInput={},this.totalRecords=0,this.actionLabel=this.translateService.instant("hcm.payroll.entries_query_actions_total_title"),this.loading=!0,this.listData=[],this.listDataNoPage=[],this.cols=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"displayDateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account_type"),field:"accountType"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_digit"),field:"digit"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"}],this.actions=function(e,t){return void 0===e&&(e={}),[{visible:s.isEditMode,label:s.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!1},s.visible=!0}},{visible:!(s.isEditMode||!s.withSideBar),label:s.translateService.instant("hcm.payroll.edit"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!0},s.visible=!0}},{visible:!s.isEditMode,label:s.translateService.instant("hcm.payroll.delete"),command:function(){s.loading=!0,s.deleteAnnuityItem(t)}}]},this.createFormGroup()}return n.prototype.ngOnInit=function(){this.formGroup.setControl(this.fieldFormGroup,this.historicalBankAccountList)},n.prototype.createFormGroup=function(){this.historicalBankAccountList=this.formBuilder.group({historicalBankAccountList:this.formBuilder.control(null)})},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,i=t&&t.rows?t.rows:this.recordByRow,r=this.getHistoricalBankAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),r&&r.length?(this.totalRecords=r.length,this.listData=r,this.listDataNoPage=H(r),this.listData.sort(ft(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+i)):this.listDataNoPage=[],(this.isEditMode||r&&1===r.length)&&this.refreshCssInIE11(),this.loading=!1},n.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},n.prototype.add=function(){this.bankAccountItemInput={},this.visible=!0},n.prototype.deleteAnnuityItem=function(e){var t=H(this.getHistoricalBankAccountList());t.sort(ft(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalBankAccountList.get("historicalBankAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},n.prototype.getHistoricalBankAccountList=function(){return this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value&&this.historicalBankAccountList.get("historicalBankAccountList").value.length?this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value:[]},n.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(et(e.customFields)&&Object.keys(e.customFields).length){var n=pt(e.customFields);e.customFields=H(n)}e.dateWhen=this.dateWhen,o.push(e)}this.historicalBankAccountList.get("historicalBankAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},n.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},n.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_bank_account_msg_limit_total_by_percentage"):null},Object.defineProperty(n.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateWhen?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dateWhen",{get:function(){return this._dateWhen},set:function(e){var t=this;this._dateWhen=e,this._dateWhen&&this.listData.filter((function(e){return e.dateWhen=t._dateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayDateWhen",{get:function(){return this._displayDateWhen},set:function(e){var t=this;this._displayDateWhen=e,this._displayDateWhen&&this.listData.filter((function(e){return e.displayDateWhen=t._displayDateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalBankAccountList.get("historicalBankAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),n.prototype.close=function(){this.visible=!1},n.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:o.FormBuilder}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!1})],n.prototype,"customFields",void 0),q([t.Input()],n.prototype,"formGroup",void 0),q([t.Input()],n.prototype,"fieldFormGroup",void 0),q([t.Input()],n.prototype,"_dateWhen",void 0),q([t.Input()],n.prototype,"_displayDateWhen",void 0),q([t.Input()],n.prototype,"recordByRow",void 0),q([t.Input()],n.prototype,"showDateWhen",void 0),q([t.Input()],n.prototype,"msgTooltipAdd",void 0),q([t.Input()],n.prototype,"isEditMode",void 0),q([t.Input()],n.prototype,"isViewMode",void 0),q([t.Input()],n.prototype,"currency",void 0),q([t.Input()],n.prototype,"customEntity",void 0),q([t.Input()],n.prototype,"customService",void 0),q([t.Input()],n.prototype,"withSideBar",void 0),q([t.Input()],n.prototype,"dateWhen",null),q([t.Input()],n.prototype,"displayDateWhen",null),q([t.Input()],n.prototype,"addListData",null),q([t.Input()],n.prototype,"visible",null),n=q([t.Component({selector:"c-historical-bank-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_bank_account_title_form\'|translate}}">\n<bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_bank_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-s\'" *ngIf="showDateWhen">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-m\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n *ngIf="showDateWhen"\n [pSortableColumn]="\'displayDateWhen\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.historical_bank_account_label_date_when\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bank\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankBranch\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank_branch\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'accountType\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankAccount\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'digit\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_digit\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td *ngIf="showDateWhen" [pTooltip]="rowData?.displayDateWhen" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.displayDateWhen }}</span>\n </td>\n <td [pTooltip]="rowData?.bank?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bank?.name }}</span>\n </td>\n <td [pTooltip]="rowData?.bankBranch?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankBranch?.name }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.accountType?.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.accountType?.value }}</span>\n </td>\n <td [pTooltip]="rowData?.bankAccount" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankAccount }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.digit" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.digit }}</span>\n </td>\n <td [pTooltip]="rowData?.percentage" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.percentage }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(),Lo=function(){function e(e,n,i,r){this.translate=e,this.formBuilder=n,this.route=i,this.cd=r,this.withSideBar=!0,this.isEditMode=!1,this.visibleChange=new t.EventEmitter,this.bankAccountItemToList=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.initialValidatorOfBankAccount=[o.Validators.required,o.Validators.maxLength(12)],this.labelBtnAdd="hcm.payroll.employees_add",this.maxValuePercentage=100,this.visibleBtnSave=!0,this.isView=!1,this.createFormGroup(),this.registerSubjects()}return e.prototype.validateDuplicateBankAccount=function(e,t,o,n){return function(i){var r=i&&i.value,a=!1;return e.filter((function(e,i){if(i!=e.index&&r&&e.bank&&e.bank.tableId===o&&e.bankBranch&&e.bankBranch.tableId===n&&e.accountType&&e.accountType.key===t&&Number(e.bankAccount)===Number(r))return a=!0})),a?{bankAccountDuplicate:!0}:null}},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},e.prototype.registerSubjects=function(){},e.prototype.createFormGroup=function(){this.bankAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateWhen:this.formBuilder.control(null),displayDateWhen:this.formBuilder.control(null),bank:this.formBuilder.control(null,o.Validators.required),bankBranch:this.formBuilder.control(null,o.Validators.required),accountType:this.formBuilder.control(null,o.Validators.required),bankAccount:this.formBuilder.control(null,o.Validators.compose(H(this.initialValidatorOfBankAccount))),digit:this.formBuilder.control(null,o.Validators.maxLength(3)),percentage:this.formBuilder.control(null,o.Validators.compose(H(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),customFields:this.formBuilder.control(null)})},e.prototype.onSelectBank=function(){this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.onClearBank=function(){this.bankAccountFormGroup.get("bank").reset(),this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.cleanBankInformation=function(){gt(this.bankAccountFormGroup,["bankBranch"])},e.prototype.onClearBankBranch=function(){this.bankAccountFormGroup.get("bankBranch").reset(),this.beforeSetBankAccountValidator()},e.prototype.onClearAccountType=function(){this.bankAccountFormGroup.get("accountType").reset(),this.beforeSetBankAccountValidator()},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.bankAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(j({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index),this.isView||this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),e.prototype.convertDTOToShowWithCustomFields=function(e){var t=j({},e);return t.customFields=ct(t.customFields),t},e.prototype.configEnableFields=function(e){this.visibleBtnSave=e,mt(this.bankAccountFormGroup,e,["bank","bankBranch","accountType","bankAccount","digit","percentage","customFields"],[])},e.prototype.close=function(){this.resetForm(),this.visible=!1},e.prototype.addItem=function(){this.bankAccountFormGroup.updateValueAndValidity(),ut.call(this.bankAccountFormGroup),this.bankAccountFormGroup.valid&&(this.employeeId&&this.bankAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.bankAccountItemToList.emit(this.bankAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},e.prototype.resetForm=function(){this.bankAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},e.prototype.getBankTableId=function(){return this.bankAccountFormGroup.controls.bank.value?"'"+this.bankAccountFormGroup.controls.bank.value.tableId+"'":null},Object.defineProperty(e.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsPercentage",{get:function(){return j({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),e.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(e.prototype,"getListBankAccount",{set:function(e){e?this.setValidatorsAccordingList(e):this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.setValidatorsAccordingList=function(e,t){void 0===t&&(t=null),this.bankAccountList=e&&e.length?H(e):[];var o=[];this.bankAccountList&&this.bankAccountList.length&&this.bankAccountList.filter((function(e,n){e.percentage&&n!=t&&o.push(e.percentage)})),this.beforeSetBankAccountValidator(),this.validatePercentageValid(o)},e.prototype.beforeSetBankAccountValidator=function(){var e=this.bankAccountFormGroup.get("bankAccount"),t=this.bankAccountFormGroup.get("accountType")&&this.bankAccountFormGroup.get("accountType").value&&this.bankAccountFormGroup.get("accountType").value.key,n=this.bankAccountFormGroup.get("bank")&&this.bankAccountFormGroup.get("bank").value&&this.bankAccountFormGroup.get("bank").value.tableId,i=this.bankAccountFormGroup.get("bankBranch")&&this.bankAccountFormGroup.get("bankBranch").value&&this.bankAccountFormGroup.get("bankBranch").value.tableId;n&&i&&t&&this.bankAccountList&&this.bankAccountList.length?(e.setValidators(o.Validators.compose(H(this.initialValidatorOfBankAccount,[this.validateDuplicateBankAccount(this.bankAccountList,t,n,i)]))),e.updateValueAndValidity()):e.setValidators(o.Validators.compose(H(this.initialValidatorOfBankAccount)))},e.prototype.validatePercentageValid=function(e){var t=this.bankAccountFormGroup.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),t.setValidators(o.Validators.compose(H(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),t.updateValueAndValidity()},Object.defineProperty(e.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:a.TranslateService},{type:o.FormBuilder},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!0})],e.prototype,"customFields",void 0),q([t.Input()],e.prototype,"currency",void 0),q([t.Input()],e.prototype,"customEntity",void 0),q([t.Input()],e.prototype,"customService",void 0),q([t.Input()],e.prototype,"withSideBar",void 0),q([t.Input()],e.prototype,"isEditMode",void 0),q([t.Output()],e.prototype,"visibleChange",void 0),q([t.Output()],e.prototype,"bankAccountItemToList",void 0),q([t.Input()],e.prototype,"visible",null),q([t.Input()],e.prototype,"isEditAndViewValue",null),q([t.Input()],e.prototype,"getListBankAccount",null),q([t.Input()],e.prototype,"isViewMode",null),e=q([t.Component({selector:"bank-account",template:'<div id="main">\n <form [formGroup]="bankAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Banco --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank\' | translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="Bank"\n [order]="[\'BankCode\',\'BankNameI18n\']"\n [fields]="[\'BankCode\',\'BankNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankCode" keyName="BankNameI18n"\n itemSelect="bank" name="bank"\n [form]="bankAccountFormGroup"\n (onSelect)="onSelectBank()"\n (onClear)="onClearBank()"\n id="ta-bankName"></input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bank\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Agência--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank_branch\'|translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="BankBranch"\n [order]="[\'BankBranchCode\']"\n [fields]="[\'BankBranchCode\',\'BankBranchNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankBranchCode" keyName="BankBranchNameI18n"\n itemSelect="bankBranch" name="bankBranch"\n [conditions]="[{ \'fields\': [\'BankBranchBank\'], \'expression\' : \'EQUAL\', \'value\': getBankTableId() }]"\n [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-bankBranch">\n </input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankBranch\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!-- Tipo conta --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_account_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="AccountType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="accountType" [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-accountType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="bankAccountFormGroup.get(\'accountType\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Número conta--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_account_form\' |\n translate}}</label>\n <input pInputText id="ta-bankAccount" name="bankAccount" only-number\n formControlName="bankAccount"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankAccount\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n bankAccountDuplicate: \'hcm.payroll.historical_bank_account_label_bank_account_duplicate\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'12\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12">\n <label>{{\'hcm.payroll.historical_bank_account_label_digit\'|translate}}</label>\n \x3c!--Dígito--\x3e\n <input pInputText id="ta-digit" name="digit" only-number formControlName="digit"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'digit\')"\n [errorMessages]="{ maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'3\' } }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="bankAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],e)}(),Oo=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:qe}]},o=q([t.Injectable()],o)}(),Bo=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,_e,h.ControlErrorsModule,Et,M.CurrencyMaskModule,St,d.InputTextModule,Ce,L.FieldsetModule,h.CustomFieldsModule,O.PanelModule],declarations:[Mo,Lo],providers:[Oo,I.ConfirmationService],exports:[Mo]})],e)}(),Ro=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,i){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalJudicialPensionBankAccountDelete",{dependentId:i,dateWhen:o}):this.http.post("actions/historicalEmployeeBankAccountDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:qe},{type:v.HttpClient}]},o=q([t.Injectable()],o)}(),No=y,Vo=function(){function o(e,o,n,i,r,a,s){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=i,this.router=r,this.messageService=a,this.historicalBankAccountListService=s,this.endPoint="hcm/payroll/queries/historicalEmployeeBankAccountQuery",this.keyPayload="historicalEmployeeBankAccount",this.withSidebar=!0,this.enableView=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"dateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_qtd_account"),field:"numberOfBankAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateWhen=No(e.dateWhen).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){var o=e&&e.dateWhen&&No(e.dateWhen,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?t.router.navigate(["historical-bank-account/"+o],{relativeTo:t.activatedRoute}):t.enableView.emit(o)}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateWhen):t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed")})}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var i=No(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalBankAccountListService.remove(n.employeeId,i,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_remove")}),n.parameters=n.parameters&&j({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-irrf-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&j({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:r.Router},{type:I.MessageService},{type:Ro}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),q([t.Input()],o.prototype,"permission",void 0),q([t.Input()],o.prototype,"employeeId",void 0),q([t.Input()],o.prototype,"dependentId",void 0),q([t.Input()],o.prototype,"dateFormat",void 0),q([t.Input()],o.prototype,"endPoint",void 0),q([t.Input()],o.prototype,"keyPayload",void 0),q([t.Input()],o.prototype,"withSidebar",void 0),q([t.Output()],o.prototype,"enableView",void 0),q([t.Input()],o.prototype,"reloadList",null),o=q([t.Component({selector:"c-historical-bank-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-irrf"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),jo=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Te,B.ConfirmDialogModule],declarations:[Vo],providers:[Ro],exports:[Vo]})],e)}(),qo=function(){function t(e){this.field=e.field,this.value=e.value,this.operation=e.operation}return Object.defineProperty(t.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operation",{get:function(){return this._operation},set:function(e){this._operation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.operation===e.Operators.CONTAINING?this.operation+"(lower("+this.field+"), lower("+this.value+"))":this.field+" "+(this.operation||"")+" "+this.value},t}(),Uo=y,Go=Uo("31/12/1900","DD/MM/YYYY"),Yo=Uo("04/06/2080","DD/MM/YYYY"),Ko=function(){function t(){}return t.isValidDate=function(e,t){return function(o){var n=!t||!t.hasOwnProperty("useG5DateRange")||t.useG5DateRange,i=vt(o.value);if(e=vt(e),i&&e&&i.length===e.length&&!o.value.includes("_")){var r=Uo(i,e),a=r.isValid(),s=!n||r.isBetween(Go,Yo,null,"[]");return a&&s?null:{invalidDate:!0}}return null}},t.isDateLower=function(t,o,n){void 0===n&&(n="day");var i={compareName:"lowerDate",granularity:n};return this.isValidDateCompare(t,o,e.CompareType.isBefore,i)},t.isValidDateCompare=function(e,t,o,n){var i=this;return function(r){var a=vt(r.value);if(t=vt(t),a&&t&&a.length===t.length&&!r.value.includes("_")){var s=Uo(a,t),l=Uo(e,t);return i.dateCompare(s,l,o,n)}return null}},t.getDateFormatFromLocale=function(e,t){var o=e&&e.dateFormat;if(o){var n=o.replace(/[y]/g,"YY").replace(/[^a-zA-Z]/g,"").toUpperCase();return t&&(n=n.replace("DD","")),n}return null},t.getDateTimeFormatFromLocale=function(e){if(e){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase(),t+=" HH:mm:ss"}return null},t.getDateFormatFromCalendar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase()}return null},t.dateCompare=function(t,o,n,i){var r=n===e.CompareType.isNotSame?e.CompareType.isSame:n,a=i&&i.granularity?i.granularity:"day",s=t[r](o,a);if(s=n===e.CompareType.isNotSame?!s:s){var l={};return l[i&&i.compareName?i.compareName:n]=!0,l}return null},t.getFormatDateWithBar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace("dd","DD").replace("mm","MM").replace("yy","YYYY")}return null},t}(),Ho=function(){function e(){this._processVariables={},this._workflowPayload={},this.processInstanceId=new f.BehaviorSubject(null),this.resetActions()}return e.prototype.init=function(){var e=this;this.workflowCockpit=workflowCockpit({init:function(t,o){return U(e,void 0,void 0,(function(){var e,n,i;return G(this,(function(r){switch(r.label){case 0:return this._isRequestNew=o&&o.isRequestNew(),e=this,(n=o)?[4,o.getTaskData()]:[3,2];case 1:n=r.sent(),r.label=2;case 2:return e._taskData=n,this._isRequestNew?[3,4]:[4,o.getInfoFromProcessVariables()];case 3:i=r.sent(),this.addProcessVariable("processVariablesFromWorkflow",i),r.label=4;case 4:return this.processInstanceId.next(t.processInstanceId),[4,this._onLoadWorkflow(t,o)];case 5:return[2,r.sent()]}}))}))},onSubmit:function(t,o){return U(e,void 0,void 0,(function(){var e,n;return G(this,(function(i){switch(i.label){case 0:return e=this,(n=t)?[4,t.nextAction]:[3,2];case 1:n=i.sent(),i.label=2;case 2:return e._nextAction=n,this._isFinishing=this._nextAction.finish,this._nextActionName=this._nextAction.name,[4,this._onSubmitWorkflow(t,o)];case 3:return i.sent(),[2,this._workflowPayload]}}))}))},onError:function(t,o){return U(e,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this._onRollbackWorkflow(t,o)];case 1:return e.sent(),[2]}}))}))}})},e.prototype._onLoadWorkflow=function(e,t){return U(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onLoadActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onSubmitWorkflow=function(e,t){return U(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onSubmitActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onRollbackWorkflow=function(e,t){return U(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onRollbackActions)];case 1:return[2,e.sent()]}}))}))},e.prototype.resetActions=function(){this.onLoadActions={},this.onSubmitActions={},this.onRollbackActions={}},e.prototype._runActions=function(e){return U(this,void 0,void 0,(function(){var t,o=this;return G(this,(function(n){switch(n.label){case 0:return t={},[4,Promise.all(Object.entries(e).map((function(e){var n=K(e,2),i=n[0],r=n[1];return U(o,void 0,void 0,(function(){var e,o,n;return G(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e=t,o=i,[4,r()];case 1:return e[o]=a.sent(),[2];case 2:throw n=a.sent(),Error(n);case 3:return[2]}}))}))})))];case 1:return n.sent(),[2,t]}}))}))},e.prototype.addOnLoadAction=function(e,t){this.onLoadActions[e]=t},e.prototype.addOnSubmitAction=function(e,t){this.onSubmitActions[e]=t},e.prototype.addOnRollbackAction=function(e,t){this.onRollbackActions[e]=t},e.prototype.addProcessVariable=function(e,t){try{this._processVariables[e]=t}catch(t){throw{erro:t,message:"Não foi possível adicionar a variável "+e+" às variáveis do processo."}}},e.prototype.setWorkflowPayload=function(e){this._workflowPayload=e},Object.defineProperty(e.prototype,"loadActions",{get:function(){return this.onLoadActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"submitActions",{get:function(){return this.onSubmitActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rollbackActions",{get:function(){return this.onRollbackActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRequestNew",{get:function(){return this._isRequestNew},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFinishing",{get:function(){return this._isFinishing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextActionName",{get:function(){return this._nextActionName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taskData",{get:function(){return this._taskData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processVariables",{get:function(){var e=this;return new Promise((function(t,o){e._processVariables?t(e._processVariables):o("Não foram encontradas variáveis para o processo")})).then((function(t){e._processVariables=t})).catch((function(e){throw e})),this._processVariables},enumerable:!0,configurable:!0}),e=q([t.Injectable()],e)}(),$o=function(){function e(e,t,o){this.router=e,this.activatedRoute=t,this.workflowDataService=o,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){this.registerSubscribers()},e.prototype.registerSubscribers=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow),e.routeEndpoint=t&&t.routeEndpoint,e.useWorkflow&&e.workflowDataService.setUseWorkflow(e.useWorkflow)}))},e.prototype.onSelectEmployee=function(){var e=this.employeeSelected.tableId;e&&this.navigate(e)},e.prototype.navigate=function(e){this.router.navigate(["workflow/"+e+"/"+this._routeEndpoint])},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},Object.defineProperty(e.prototype,"useWorkflow",{get:function(){return this._useWorkflow},set:function(e){this._useWorkflow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeEndpoint",{get:function(){return this._routeEndpoint},set:function(e){this._routeEndpoint=e},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:r.Router},{type:r.ActivatedRoute},{type:uo}]},e=q([t.Component({selector:"lib-employee-selector",template:'<p-panel header="{{ \'hcm.payroll.employee_selector_panel_header\' | translate }}">\n <div class="ui-g ui-fluid">\n <div class="ui-md-6 ui-g-6">\n <label for="ff-employee" id="lb-employee">{{\n "hcm.payroll.employee" | translate\n }}</label>\n <input-rest-auto-complete-employee-model\n id="ff-employee"\n [dropdown]="true"\n placeholder="{{\n \'hcm.payroll.employees_company_placeholder\' | translate\n }}"\n name="employee"\n emptyMessage="{{ \'hcm.payroll.not_suggestions\'|translate }}"\n [(model)]="employeeSelected"\n (onSelect)="onSelectEmployee()"\n >\n </input-rest-auto-complete-employee-model>\n </div>\n </div>\n</p-panel>\n',styles:[""]})],e)}(),Wo=function(){function e(){}return e=q([t.NgModule({imports:[he,O.PanelModule,Tt],declarations:[$o],exports:[$o]})],e)}(),zo=function(){function e(){}return q([t.Input()],e.prototype,"divergentFormData",void 0),e=q([t.Component({selector:"from-to",template:'<div id="from-to" class="ui-g ui-fluid" *ngIf="divergentFormData">\n <div class="ui-g-12">\n \x3c!-- Painel Collapsable --\x3e\n <p-panel\n class="ui-g-12 ui-fluid form-group"\n header="{{ \'hcm.payroll.disagreements\' | translate }}"\n [toggleable]="true"\n [collapsed]="false"\n >\n <section id="from-to-content" class="ui-g ui-fluid form-group">\n \x3c!-- INICIO DE SEÇÃO: DE (ANTES): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.from\' | translate }}">\n <section id="from-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-from">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-from"\n id="{{divergence.key}}-from"\n value="{{ divergence.oldValue }}"\n />\n\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: DE (ANTES): --\x3e\n\n \x3c!-- INICIO DE SEÇÃO: PARA (DEPOIS): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.to\' | translate }}">\n <section id="to-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-to">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-to"\n id="{{divergence.key}}-to"\n value="{{ divergence.newValue }}"\n />\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: PARA (DEPOIS): --\x3e\n </section>\n </p-panel>\n </div>\n</div>\n'})],e)}(),Qo=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,O.PanelModule,a.TranslateModule,o.ReactiveFormsModule,d.InputTextModule],declarations:[zo],exports:[zo]})],e)}(),Jo=function(){function e(){}return e.getFormattedCpf=function(e){return e?e.replace(/\D/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1-$2"):null},e.getFormattedCpfEdited=function(e){return e?((e=e.replace(/\D/g,"").slice(0,11)).length>9?e=e.replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/,"$1.$2.$3-$4"):e.length>6?e=e.replace(/^(\d{3})(\d{3})(\d{0,3})$/,"$1.$2.$3"):e.length>3&&(e=e.replace(/^(\d{3})(\d{0,3})$/,"$1.$2")),e):""},e.getFormattedCnpj=function(e){return e?e.replace(/\D/g,"").replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2"):null},e.getFormattedCnpjEdited=function(e){return e?((e=e.replace(/\D/g,"").slice(0,14)).length>12?e=e.replace(/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,"$1.$2.$3/$4-$5"):e.length>8?e=e.replace(/^(\d{2})(\d{3})(\d{3})(\d{0,4})$/,"$1.$2.$3/$4"):e.length>5?e=e.replace(/^(\d{2})(\d{3})(\d{0,3})$/,"$1.$2.$3"):e.length>2&&(e=e.replace(/^(\d{2})(\d{0,3})$/,"$1.$2")),e):""},e.getCpfCnpjMask=function(e){switch(e){case"CPF":return"999.999.999-99";case"CNPJ":return"99.999.999/9999-99";default:return""}},e.getFormattedSubscriptionNumber=function(e,t){if(!e||!t)return e;switch(t){case"CNPJ":return this.getFormattedCnpjEdited(e);case"CPF":return this.getFormattedCpfEdited(e);default:return e}},e.getFormattedTelephoneNumber=function(e){var t=e.replace(/\D/g,"");return(t=t.replace(/^0/,"")).length>10?t=t.replace(/^(\d{2})?(\d{5})?(\d{4}).*/,"($1) $2-$3"):t.length>9?t=t.replace(/^(\d{2})?(\d{4})?(\d{4}).*/,"($1) $2-$3"):t.length>5?t=t.replace(/^(\d{2})?(\d{4})?(\d{0,4}).*/,"($1) $2-$3"):t.length>1?t=t.replace(/^(\d{2})?(\d{0,5}).*/,"($1) $2"):""!==t&&(t=t.replace(/^(\d*)/,"($1")),t},e.getFormattedPercentage=function(e){return parseFloat(e).toFixed(2).replace(".",",")+"%"},e.formatTelephoneInputEvent=function(t){var o=t.target.value;(8!==t.keyCode||9!==o.length&&4!==o.length&&3!==o.length)&&(t.target.value=e.getFormattedTelephoneNumber(o))},e.formatCpfInputEvent=function(t){var o=t.target.value;(8!==t.keyCode||4!==o.length&&8!==o.length&&12!==o.length)&&(t.target.value=e.getFormattedCpfEdited(o))},e.formatCnpjInputEvent=function(t){var o=t.target.value;(8!==t.keyCode||3!==o.length&&7!==o.length&&11!==o.length&&16!==o.length)&&(t.target.value=e.getFormattedCnpjEdited(o))},e}(),Xo=function(){function e(){this.hideFieldSubject=new f.BehaviorSubject(!0),this.hideField$=this.hideFieldSubject.asObservable(),this.showButtonSubject=new f.BehaviorSubject(!0),this.showButton$=this.showButtonSubject.asObservable(),this.saveButtonSubject=new f.BehaviorSubject(!0),this.saveButton$=this.saveButtonSubject.asObservable(),this.showEditMode=new f.BehaviorSubject(!0),this.showEditMode$=this.showEditMode.asObservable()}return e.prototype.setHideField=function(e){this.hideFieldSubject.next(e)},e.prototype.setShowButton=function(e){this.showButtonSubject.next(e)},e.prototype.setSaveButton=function(e){this.saveButtonSubject.next(e)},e.prototype.setShowEditMode=function(e){this.showEditMode.next(e)},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=q([t.Injectable({providedIn:"root"})],e)}(),Zo=function(){function e(){}return e.isValidCei=function(e){var t=e.value;if(!t)return null;if(11!=t.length)return null;var o=0,n=0;if(11!==t.length||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return{invalidCei:!0};for(var i=0;i<10;i++)o+=parseInt(t.substring(i,i+1),10)*parseInt("3298765432".substring(i,i+1),10);return(n=10===(n=11-o%11)||11===n?0:n)===parseInt(""+t.charAt(10),10)?null:{invalidCei:!0}},e.isValidCpf=function(e){var t=e.value;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(a=1,t.length<11)return null;for(r=0;r<t.length-1;r++)if(t.charAt(r)!==t.charAt(r+1)){a=0;break}if(a)return{cpfNotValid:!0};for(o=t.substring(0,9),n=t.substring(9),i=0,r=10;r>1;r--)i+=o.charAt(10-r)*r;if((i%11<2?0:11-i%11)!==Number(n.charAt(0)))return{cpfNotValid:!0};for(o=t.substring(0,10),i=0,r=11;r>1;r--)i+=o.charAt(11-r)*r;return(i%11<2?0:11-i%11)!==Number(n.charAt(1))?{cpfNotValid:!0}:null}return null},e.isValidCnpj=function(e){var t=e.value;if(t){var o=void 0,n=void 0,i=void 0,r=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return null;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return{cnpjNotValid:!0};o=t.length-2,n=t.substring(0,o),i=t.substring(o),r=0,a=o-7;for(var s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);if((r%11<2?0:11-r%11)!==Number(i.charAt(0)))return{cnpjNotValid:!0};o+=1,n=t.substring(0,o),r=0,a=o-7;for(s=o;s>=1;s--)r+=n.charAt(o-s)*a--,a<2&&(a=9);return(r%11<2?0:11-r%11)!==Number(i.charAt(1))?{cnpjNotValid:!0}:null}return null},e.isValidPhoneNumber=function(e){var t=e.value||"";t=t.replace(/[\s()-]/g,"");return/^[1-9][\d]{1,2}\d{8,10}$/.test(t)?null:{invalidPhoneNumber:!0}},e.isValidEmail=function(e){var t=e.value;return/^[\w-\.]+@[\w-]+(\.[\w-]{2,4}){1,2}$/.test(t)?null:{invalidEmail:!0}},e}(),en=function(){function e(e){this._paramsForm=new o.FormGroup({}),this._defaultCpfNumber=null,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.pixAccountList=[],this.maxValuePercentage=100,this.isShowPixKeyFieldValidatorMessage=!1,this.formBuilder=e,this.createFormGroupBase()}return e.prototype.phoneMask=function(e){Jo.formatTelephoneInputEvent(e)},e.prototype.cpfMask=function(e){Jo.formatCpfInputEvent(e)},e.prototype.cnpjMask=function(e){Jo.formatCnpjInputEvent(e)},e.prototype.onChangePixKeyType=function(e,t){if(e&&e.key){this.pixKeyType=e.key;var o=null!=t?t:this.pixAccountFormGroup;this.isShowPixKeyFieldValidatorMessage=!0;var n=o.get("pixKey");n&&n.reset(),this.setPixKeyValidators(!0,o),"CPF"===e.key&&this.setDefaultCpfPixKey(o)}},e.prototype.onClearPixKeyType=function(e){var t=null!=e?e:this.pixAccountFormGroup;this.isShowPixKeyFieldValidatorMessage=!1,t.get("pixKey")&&t.get("pixKey").reset()},e.prototype.setDefaultCpfPixKey=function(e){var t=null!=e?e:this.pixAccountFormGroup;if(this._defaultCpfNumber)t.get("pixKey")&&t.get("pixKey").setValue(this._defaultCpfNumber);else{var o=this._paramsForm.get("sheetDocument");if(o&&o.get("cpfNumber")){var n=o.get("cpfNumber").value;n&&t.get("pixKey")&&t.get("pixKey").setValue(n)}}},e.prototype.createFormGroupBase=function(){this.pixAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateChange:this.formBuilder.control(null),pixKeyType:this.formBuilder.control(null,o.Validators.required),pixKey:this.formBuilder.control(null),percentage:this.formBuilder.control(null,o.Validators.compose(H(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),externalId:this.formBuilder.control(null),customFields:this.formBuilder.control(null)})},e.prototype.setValidatorsAccordingList=function(e,t,o,n){void 0===t&&(t=null),void 0===o&&(o=!0);var i=null!=n?n:this.pixAccountFormGroup;this.pixAccountList=e&&e.length>0?[].concat(e):[];for(var r=[],a=0;a<this.pixAccountList.length;a++){var s=this.pixAccountList[a];s&&s.percentage&&a!==t&&r.push(s.percentage)}this.beforeSetPixKeyTypeValidator(i),this.setPixKeyValidators(o,i),this.validatePercentageValid(r,i)},e.prototype.beforeSetPixKeyTypeValidator=function(e){var t=e.get("pixKeyType");this.pixAccountList&&this.pixAccountList.length?t.setValidators(o.Validators.compose([o.Validators.required,this.validateDuplicatePixKeyTypeBankAccount(this.pixAccountList)])):t.setValidators(o.Validators.required),t.updateValueAndValidity()},e.prototype.setPixKeyValidators=function(e,t){var n=t.get("pixKey");switch(this.pixKeyType){case"TELEPHONE":n.setValidators(o.Validators.compose([o.Validators.required,Zo.isValidPhoneNumber]));break;case"EMAIL":n.setValidators(o.Validators.compose([o.Validators.required,Zo.isValidEmail]));break;case"CPF":n.setValidators(o.Validators.compose([o.Validators.required,Zo.isValidCpf]));break;case"CNPJ":n.setValidators(o.Validators.compose([o.Validators.required,Zo.isValidCnpj]));break;case"RANDOM_KEY":n.setValidators(o.Validators.required);break;default:n.clearValidators()}e&&n.enable(),n.updateValueAndValidity()},e.prototype.validatePercentageValid=function(e,t){var n=t.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),n.setValidators(o.Validators.compose(H(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),n.updateValueAndValidity()},e.prototype.validateDuplicatePixKeyTypeBankAccount=function(e){return function(t){var o=t.value;return e.some((function(e){return o&&"BANK_ACCOUNT"===e.pixKeyType.key&&"BANK_ACCOUNT"===o.key}))?{pixKeyTypeBankAccountDuplicate:!0}:null}},Object.defineProperty(e.prototype,"paramsForm",{get:function(){return this._paramsForm},set:function(e){this._paramsForm=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCpfNumber",{get:function(){return this._defaultCpfNumber},set:function(e){this._defaultCpfNumber=e},enumerable:!0,configurable:!0}),e}(),tn=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.prototype.enumQuery=function(){return this.http.query("enumQuery",{names:["PixKeyType"]},e.ServiceType.PAYROLL)},o.ctorParameters=function(){return[{type:qe}]},o=q([t.Injectable()],o)}(),on=function(n){function i(o,i,r,a,s){var l=n.call(this,r)||this;return l.translateService=o,l.cd=i,l.sharedStateService=a,l.service=s,l.recordByRow=1,l.showDateChange=!1,l.isEditMode=!1,l.isViewMode=!1,l.withSideBar=!0,l.listDataReciever=[],l.addExistentHistoricData=[],l.getListPixAccount=[],l.isEditModeForSave=!1,l.isViewModeActive=new t.EventEmitter,l.isEditModeActive=new t.EventEmitter,l.isDeleteModeActive=new t.EventEmitter,l.isValidChangeForm=new t.EventEmitter,l.listFromApp=[],l.visibleChange=new t.EventEmitter,l.ngUnsubscribe=new f.Subject,l.orderBy={field:"dateChange",direction:e.DirectionEnumeration.DESC},l.pixAccountItemInput={},l.totalRecords=0,l.actionLabel=l.translateService.instant("hcm.payroll.entries_query_actions_total_title"),l.loading=!0,l.listData=[],l.listDataNoPage=[],l.showButtonView=!0,l.showEditMode=!1,l.hasRecordsPix=!0,l.maxValuePercentage=100,l.hideFields=l.sharedStateService.hideField$,l.suggestions=[],l.formGroupByRow={},l.cols=[{label:l.translateService.instant("hcm.payroll.employees_addition_pix_key_type"),field:"pixKeyType",orderBy:"pixKeyType.key"},{label:l.translateService.instant("hcm.payroll.employees_addition_pix_key"),field:"pixKey",orderBy:"pixKey"},{label:l.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),field:"percentage",orderBy:"percentage"},{label:l.translateService.instant("hcm.payroll.movimentation_generic_action"),field:"actions",orderBy:null}],l.actions=function(e,t){return void 0===e&&(e={}),[{visible:l.isEditMode,label:l.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){l.isAllowToViewHistorical?(e.index=t,l.pixAccountItemInput={currentItem:e,listData:l.listDataNoPage,isEditMode:!1},l.visible=!0):l.isViewModeActive.emit(!0)}},{visible:!(l.isEditMode||!l.withSideBar),label:l.translateService.instant("hcm.payroll.edit"),command:function(){l.isAllowToEditHistorical?(e.index=t,l.pixAccountItemInput={currentItem:e,listData:l.listDataNoPage,isEditMode:!0},l.visible=!0):(l.isEditModeActive.emit(!0),0==l.listFromApp.length&&(e.index=t,l.pixAccountItemInput={currentItem:e,listData:l.listDataNoPage,isEditMode:!0},l.visible=!0))}},{visible:!l.isEditMode||l.showEditMode,label:l.translateService.instant("hcm.payroll.delete"),command:function(){l.isAllowToDeleteHistorical?(l.loading=!0,l.deleteAnnuityItem(t)):(l.isDeleteModeActive.emit(!0),0==l.listFromApp.length&&(l.loading=!0,l.deleteAnnuityItem(t)))}}]},l.createFormGroup(),l}return V(i,n),i.prototype.ngOnInit=function(){var e=this;this.formGroup.setControl(this.fieldFormGroup,this.historicalPixAccountList),this.sharedStateService.showButton$.subscribe((function(t){e.showButtonView=t})),this.sharedStateService.showEditMode$.subscribe((function(t){e.showEditMode=t,e.isEditModeForSave=t}))},i.prototype.ngOnChanges=function(e){if(e.listDataReciever&&e.listDataReciever.currentValue&&(this.listFromApp=e.listDataReciever.currentValue),e.addExistentHistoricData&&e.addExistentHistoricData.currentValue&&this.getHistoricalPixAccountList(),e.addExistentHistoricData&&e.addExistentHistoricData.currentValue){var t=e.addExistentHistoricData.currentValue;this.rebuildFormGroupMap(t)}},i.prototype.createFormGroup=function(){this.historicalPixAccountList=this.formBuilder.group({historicalPixAccountList:this.formBuilder.control(null)})},i.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},i.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},i.prototype.emitFormValidity=function(){var e=Object.values(this.formGroupByRow).every((function(e){return e.updateValueAndValidity(),e.valid}));this.isValidChangeForm.emit(e)},i.prototype.filterPixKeyType=function(e){var t=this,o=e.query;this.service.enumQuery().subscribe((function(e){var n=e.results.find((function(e){return"PixKeyType"===e.enumName}));t.suggestions=n?n.items.filter((function(e){return e.value.toLowerCase().includes(o.toLowerCase())})):[]}))},i.prototype.createPixRowFormGroup=function(){return this.formBuilder.group({pixKeyType:[null,o.Validators.required],pixKey:[null],percentage:[0,o.Validators.compose(H(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))]})},i.prototype.onPixKeyInput=function(e,t){var o=e.target.value.replace(/\D/g,""),n=this.formGroupByRow[t],i=n.get("pixKey");i&&(i.setValue(o,{emitEvent:!1}),i.markAsDirty(),i.updateValueAndValidity()),this.setPixKeyValidators(!0,n),this.emitFormValidity()},i.prototype.onBlurPixCpfAndCnpj=function(e){var t=this.formGroupByRow[e],o=t.get("pixKey"),n=t.get("pixKeyType");if(o&&n){var i=o.value,r=n.value.key,a=(i||"").replace(/\D/g,"");o.setValue(a,{emitEvent:!1}),o.valid&&t.patchValue({pixKeyFormatted:Jo.getFormattedSubscriptionNumber(a,r)}),this.emitFormValidity()}},i.prototype.getFormattedPixKey=function(e,t){return Jo.getFormattedSubscriptionNumber(t,e)},i.prototype.syncPixDataToParentForm=function(){if(this.isEditModeForSave){var e=Object.values(this.formGroupByRow).map((function(e){var t=e.getRawValue(),o=t.pixKeyType.key;return"CPF"===o||"CNPJ"===o?t.pixKey=(t.pixKey||"").replace(/[.\-\/]/g,""):"TELEPHONE"===o&&(t.pixKey=(t.pixKey||"").replace(/[()\s\-]/g,"")),t}));this.formGroup.get(this.fieldFormGroup).get("historicalPixAccountList").setValue(e),this.emitFormValidity()}},i.prototype.syncResetPixFormToParent=function(){this.formGroupByRow={},this.historicalPixAccountList.reset(),this.historicalPixAccountList.get("historicalPixAccountList").setValue([]),this.addExistentHistoricData.length&&this.rebuildFormGroupMap(this.addExistentHistoricData)},i.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,i=t&&t.rows?t.rows:this.recordByRow,r=this.getHistoricalPixAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),r&&r.length?(this.totalRecords=r.length,this.listData=r,this.listDataNoPage=H(r),this.listData.sort(ft(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+i)):this.listDataNoPage=[],(this.isEditMode||r&&1===r.length)&&this.refreshCssInIE11(),this.loading=!1,this.cd.detectChanges()},i.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},i.prototype.add=function(){this.pixAccountItemInput={},this.visible=!0},i.prototype.addPix=function(){var e=this.addExistentHistoricData.length;this.addExistentHistoricData=H(this.addExistentHistoricData,[{pixKeyType:{},pixKey:"",percentage:0}]),this.formGroupByRow[e]=this.createPixRowFormGroup(),this.setValidatorsAccordingList(this.addExistentHistoricData,e,!0),this.emitFormValidity()},i.prototype.deletePix=function(e){this.addExistentHistoricData=this.addExistentHistoricData.filter((function(t,o){return o!==e})),this.rebuildFormGroupMap(this.addExistentHistoricData),this.emitFormValidity()},i.prototype.rebuildFormGroupMap=function(e){var t=this;this.formGroupByRow={},e.forEach((function(o,n){var i=t.createPixRowFormGroup(),r=o.pixKeyType.key,a=o.pixKey;"CPF"!==r&&"CNPJ"!==r||(o.pixKey=Jo.getFormattedSubscriptionNumber(a,r)),"TELEPHONE"===r&&(o.pixKey=Jo.getFormattedTelephoneNumber(a)),i.patchValue(o),t.formGroupByRow[n]=i,t.setValidatorsAccordingList(e,n,t.isEditMode)})),this.emitFormValidity()},i.prototype.onPixKeyTypeChange=function(e,t){var o=this,n=this.formGroupByRow[t];this.onChangePixKeyType(e,n),this.addExistentHistoricData[t].pixKey="",setTimeout((function(){o.dataListPix.editingCell&&(o.dataListPix.editingCell=null)})),this.cd.detectChanges()},i.prototype.onPixKeyTypeClear=function(e){var t=this.formGroupByRow[e];this.onClearPixKeyType(t)},i.prototype.deleteAnnuityItem=function(e){var t=H(this.getHistoricalPixAccountList());t.sort(ft(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalPixAccountList.get("historicalPixAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},i.prototype.getHistoricalPixAccountList=function(){return this.historicalPixAccountList.get("historicalPixAccountList")&&this.historicalPixAccountList.get("historicalPixAccountList").value&&this.historicalPixAccountList.get("historicalPixAccountList").value.length?this.historicalPixAccountList.get("historicalPixAccountList")&&this.historicalPixAccountList.get("historicalPixAccountList").value:[]},i.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalPixAccountList()?this.getHistoricalPixAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(et(e.customFields)&&Object.keys(e.customFields).length){var n=pt(e.customFields);e.customFields=H(n)}e.dateChange=this.dateChange,o.push(e)}this.historicalPixAccountList.get("historicalPixAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},i.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},i.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalPixAccountList()?this.getHistoricalPixAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_pix_account_msg_limit_total_by_percentage"):null},i.prototype.onSyncValue=function(e,t){if(this.formGroupByRow&&this.formGroupByRow[t]&&this.formGroupByRow[t].get(e)){var o=this.formGroupByRow[t].get(e).value;this.addExistentHistoricData[t][e]=o}this.emitFormValidity()},Object.defineProperty(i.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateChange?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateChange",{get:function(){return this._dateChange},set:function(e){var t=this;this._dateChange=e,this._dateChange&&this.listData.filter((function(e){return e.dateChange=t._dateChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayDateChange",{get:function(){return this._displayDateChange},set:function(e){var t=this;this._displayDateChange=e,this._displayDateChange&&this.listData.filter((function(e){return e.displayDateChange=t._displayDateChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalPixAccountList.get("historicalPixAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paramsForm",{set:function(e){this._paramsForm=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultCpfNumber",{set:function(e){this._defaultCpfNumber=e},enumerable:!0,configurable:!0}),i.prototype.close=function(){this.visible=!1},i.prototype.getFormattedTelephoneNumber=function(e){return Jo.getFormattedTelephoneNumber(e)},i.prototype.getFormattedCpf=function(e){return Jo.getFormattedCpf(e)},i.prototype.getFormattedCnpj=function(e){return Jo.getFormattedCnpj(e)},i.prototype.getFormattedPercentage=function(e){return Jo.getFormattedPercentage(e)},Object.defineProperty(i.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAllowToEditHistorical",{get:function(){return this.permission.editar},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAllowToViewHistorical",{get:function(){return this.permission.visualizar},enumerable:!0,configurable:!0}),i.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:o.FormBuilder},{type:Xo},{type:tn}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!1})],i.prototype,"customFields",void 0),q([t.ViewChild("dataListPix",{static:!1})],i.prototype,"dataListPix",void 0),q([t.Input()],i.prototype,"formGroup",void 0),q([t.Input()],i.prototype,"fieldFormGroup",void 0),q([t.Input()],i.prototype,"_dateChange",void 0),q([t.Input()],i.prototype,"_displayDateChange",void 0),q([t.Input()],i.prototype,"recordByRow",void 0),q([t.Input()],i.prototype,"showDateChange",void 0),q([t.Input()],i.prototype,"msgTooltipAdd",void 0),q([t.Input()],i.prototype,"isEditMode",void 0),q([t.Input()],i.prototype,"isViewMode",void 0),q([t.Input()],i.prototype,"currency",void 0),q([t.Input()],i.prototype,"customEntity",void 0),q([t.Input()],i.prototype,"customService",void 0),q([t.Input()],i.prototype,"withSideBar",void 0),q([t.Input()],i.prototype,"permission",void 0),q([t.Input()],i.prototype,"listDataReciever",void 0),q([t.Input()],i.prototype,"addExistentHistoricData",void 0),q([t.Input()],i.prototype,"getListPixAccount",void 0),q([t.Input()],i.prototype,"isEditModeForSave",void 0),q([t.Output()],i.prototype,"isViewModeActive",void 0),q([t.Output()],i.prototype,"isEditModeActive",void 0),q([t.Output()],i.prototype,"isDeleteModeActive",void 0),q([t.Output()],i.prototype,"isValidChangeForm",void 0),q([t.Input()],i.prototype,"dateChange",null),q([t.Input()],i.prototype,"displayDateChange",null),q([t.Input()],i.prototype,"addListData",null),q([t.Input()],i.prototype,"visible",null),q([t.Input()],i.prototype,"paramsForm",null),q([t.Input()],i.prototype,"defaultCpfNumber",null),i=q([t.Component({selector:"c-historical-pix-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_pix_account_title_form\'|translate}}">\n<pix-account [(visible)]="visible"\n [isEditAndViewValue]="pixAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListPixAccount]="listDataNoPage"\n [paramsForm]="paramsForm"\n (pixAccountItemToList)="addItemInList($event)"\n [defaultCpfNumber]="defaultCpfNumber"></pix-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <pix-account [(visible)]="visible"\n [isEditAndViewValue]="pixAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListPixAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n [paramsForm]="paramsForm"\n (pixAccountItemToList)="addItemInList($event)"\n [defaultCpfNumber]="defaultCpfNumber"></pix-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_pix_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div *ngIf="!showEditMode || !(hideFields | async)" class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'">\n <col *ngIf="showButtonView" [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n [pSortableColumn]="\'pixKeyType\'"\n [pTooltip]="\'hcm.payroll.employees_addition_pix_key_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.employees_addition_pix_key_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.employees_addition_pix_key_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'pixKey\'"\n [pTooltip]="\'hcm.payroll.employees_addition_pix_key\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.employees_addition_pix_key\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.employees_addition_pix_key\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_pix_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_pix_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_pix_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th *ngIf="showButtonView" id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td [pTooltip]="rowData?.pixKeyType.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]="rowData?.pixKeyType.key">\n <td *ngSwitchCase="\'TELEPHONE\'"\n [pTooltip]="getFormattedTelephoneNumber(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase="\'CPF\'"\n [pTooltip]="getFormattedCpf(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase="\'CNPJ\'"\n [pTooltip]="getFormattedCnpj(rowData?.pixKey)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]="rowData?.pixKey" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]="getFormattedPercentage(rowData?.percentage)" tooltipPosition="top"\n showDelay="500">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length && showButtonView">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="!isViewMode && actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="!isViewMode && actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n\n\x3c!-- Template exlusivo para edição de pix via modal--\x3e\n<div *ngIf="showEditMode && (hideFields | async)" class="ui-g-12">\n \x3c!-- Botão Adicionar --\x3e\n <div class="ui-g">\n <div class="ui-g-12">\n <s-button id="btn-save" label="Adicionar" priority="primary" (onClick)="addPix()"></s-button>\n </div>\n </div>\n\n \x3c!-- Tabela --\x3e\n <p-table #dataListPix sortField="percentage"\n [columns]="cols"\n [value]="addExistentHistoricData"\n [pageLinks]="3"\n [paginator]="true"\n [responsive]="true"\n [rows]="10"\n [resetPageOnSort]="false"\n [tableStyle]="{\'margin-top\': \'2rem\'}"\n [customSort]="true">\n <ng-template pTemplate="header" let-columns>\n <tr>\n <th *ngFor="let col of cols" [pSortableColumn]="col.orderBy">\n {{ col.label }}\n <p-sortIcon *ngIf="col.orderBy" [field]="col.orderBy"></p-sortIcon>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-item let-rowIndex="rowIndex">\n <ng-container *ngIf="formGroupByRow[rowIndex]" [formGroup]="formGroupByRow[rowIndex]">\n <tr>\n \x3c!-- Tipo de Chave --\x3e\n <td class="ui-md-6 ui-sm-12 required"\n [pEditableColumn]="item.pixKeyType" pEditableColumnField="pixKeyType">\n <p-cellEditor>\n <ng-template pTemplate="input">\n <div style="width: 100%; position: relative;">\n <p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterPixKeyType($event)"\n formControlName="pixKeyType"\n [dropdown]="true"\n (onSelect)="onPixKeyTypeChange($event, rowIndex)"\n (onClear)="onPixKeyTypeClear(rowIndex)"\n (ngModelChange)="onSyncValue(\'pixKeyType\', rowIndex)"\n field="value"\n placeholder="Selecione o tipo de chave"\n appendTo="body"\n [panelStyle]="{ maxWidth: \'300px\', width: \'100%\' }"\n [inputStyle]="{ width: \'100%\' }"\n ></p-autoComplete>\n\n <s-control-errors [control]="formGroupByRow[rowIndex]?.get(\'pixKeyType\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n pixKeyTypeBankAccountDuplicate: \'hcm.payroll.historical_pix_key_type_bank_account_duplicate\' | translate\n }">\n </s-control-errors>\n </div>\n </ng-template>\n <ng-template pTemplate="output">\n {{ item.pixKeyType?.value }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n \x3c!-- Chave Pix --\x3e\n <td class="ui-md-6 ui-sm-12 required"\n [pEditableColumn]="item.pixKey" pEditableColumnField="pixKey"\n [ngClass]="{\'required\': item.pixKeyType.key !== \'BANK_ACCOUNT\',\n \'disabled\': item.pixKeyType && item.pixKeyType.key === \'BANK_ACCOUNT\'\n }">\n <p-cellEditor>\n <ng-template pTemplate="input">\n <ng-container [ngSwitch]="item.pixKeyType.key">\n <input *ngSwitchCase="\'TELEPHONE\'"\n only-number\n pInputText\n type="text"\n formControlName="pixKey"\n (keyup)="phoneMask($event)"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)"\n maxlength="15"\n placeholder="(__) ____-____" />\n\n <input *ngSwitchCase="\'CPF\'"\n type="text"\n pInputText\n formControlName="pixKey"\n maxlength="14"\n placeholder="___.___.___-__"\n (input)="onPixKeyInput($event, rowIndex)"\n (blur)="onBlurPixCpfAndCnpj(rowIndex)"\n (keyup)="cpfMask($event)"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)" />\n\n <input *ngSwitchCase="\'CNPJ\'"\n type="text"\n pInputText\n formControlName="pixKey"\n maxlength="18"\n placeholder="___.___.___/____-__"\n (input)="onPixKeyInput($event, rowIndex)"\n (blur)="onBlurPixCpfAndCnpj(rowIndex)"\n (keyup)="cnpjMask($event)"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)" />\n\n <input *ngSwitchCase="\'EMAIL\'"\n pInputText\n type="email"\n formControlName="pixKey"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)"\n placeholder="{{ \'hcm.payroll.employees_addition_email\' | translate }}" />\n\n <input *ngSwitchCase="\'BANK_ACCOUNT\'"\n pInputText\n formControlName="pixKey"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)"\n [disabled]="true" />\n\n <input *ngSwitchDefault\n pInputText\n type="text"\n formControlName="pixKey"\n (ngModelChange)="onSyncValue(\'pixKey\', rowIndex)"\n maxlength="100" />\n </ng-container>\n\n <s-control-errors *ngIf="isShowPixKeyFieldValidatorMessage"\n [control]="formGroupByRow[rowIndex]?.get(\'pixKey\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n invalidPhoneNumber: \'hcm.payroll.employees_addition_invalid_phone_number\' | translate: { value: formGroupByRow[rowIndex]?.get(\'pixKey\').value },\n invalidEmail: \'hcm.payroll.employees_addition_email_invalid\' | translate,\n cpfNotValid: \'hcm.payroll.employees_addition_cpf_error\' | translate,\n cnpjNotValid: \'hcm.payroll.employees_addition_cnpj_error\' | translate\n }">\n </s-control-errors>\n </ng-template>\n <ng-template pTemplate="output">\n {{ getFormattedPixKey(item.pixKeyType?.key, item.pixKey) }}\n </ng-template>\n </p-cellEditor>\n </td>\n\n \x3c!-- Percentual --\x3e\n <td class="ui-md-6 ui-sm-12 required"\n [pEditableColumn]="item.percentage" pEditableColumnField="percentage">\n <p-cellEditor>\n <ng-template pTemplate="input">\n <input\n pInputText type="number"\n formControlName="percentage"\n (ngModelChange)="onSyncValue(\'percentage\', rowIndex)"\n >\n <s-control-errors\n [control]="formGroupByRow[rowIndex]?.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </ng-template>\n <ng-template pTemplate="output">\n {{ item.percentage }}%\n </ng-template>\n </p-cellEditor>\n </td>\n\n \x3c!-- Botão de excluir --\x3e\n <td>\n <s-button id="btn-delete" label="Excluir" priority="default" (onClick)="deletePix(rowIndex)"></s-button>\n </td>\n </tr>\n </ng-container>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],i)}(en),nn=function(e){function n(o,n,i){var r=e.call(this,o)||this;return r.cd=n,r.sharedStateService=i,r.withSideBar=!0,r.isEditMode=!1,r.visibleChange=new t.EventEmitter,r.pixAccountItemToList=new t.EventEmitter,r.ngUnsubscribe=new f.Subject,r.labelBtnAdd="hcm.payroll.employees_add",r.visibleBtnSave=!0,r.isView=!1,r.isShowPixKeyFieldValidatorMessage=!1,r.hideFields=r.sharedStateService.hideField$,r.registerSubjects(),r}return V(n,e),n.prototype.ngOnInit=function(){},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},n.prototype.registerSubjects=function(){},Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(j({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index,e&&e.isEditMode),this.isView?this.pixAccountFormGroup.get("pixKeyType").value&&(this.pixKeyType=this.pixAccountFormGroup.get("pixKeyType").value.key,this.formatPixKeyTelephoneNumber()):this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),n.prototype.formatPixKeyTelephoneNumber=function(){if("TELEPHONE"===this.pixKeyType){var e=this.pixAccountFormGroup.get("pixKey");e.setValue(Jo.getFormattedTelephoneNumber(e.value))}},n.prototype.convertDTOToShowWithCustomFields=function(e){var t=j({},e);return t.customFields=ct(t.customFields),t},n.prototype.configEnableFields=function(e){this.visibleBtnSave=e,this.pixAccountFormGroup.get("pixKeyType").value&&(this.pixKeyType=this.pixAccountFormGroup.get("pixKeyType").value.key,this.setPixKeyValidators(e,this.pixAccountFormGroup),this.formatPixKeyTelephoneNumber()),mt(this.pixAccountFormGroup,e,["pixKeyType","pixKey","percentage","customFields"],[])},n.prototype.close=function(){this.resetForm(),this.visible=!1},n.prototype.addItem=function(){this.pixAccountFormGroup.updateValueAndValidity(),ut.call(this.pixAccountFormGroup),this.pixAccountFormGroup.valid&&(this.employeeId&&this.pixAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.pixAccountItemToList.emit(this.pixAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},n.prototype.resetForm=function(){this.pixAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},Object.defineProperty(n.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionsPercentage",{get:function(){return j({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),n.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(n.prototype,"getListPixAccount",{set:function(e){e?this.setValidatorsAccordingList(e,null,!1):this.resetForm()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paramsForm",{set:function(e){this._paramsForm=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"defaultCpfNumber",{set:function(e){this._defaultCpfNumber=e},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:o.FormBuilder},{type:t.ChangeDetectorRef},{type:Xo}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!0})],n.prototype,"customFields",void 0),q([t.Input()],n.prototype,"currency",void 0),q([t.Input()],n.prototype,"customEntity",void 0),q([t.Input()],n.prototype,"customService",void 0),q([t.Input()],n.prototype,"withSideBar",void 0),q([t.Input()],n.prototype,"isEditMode",void 0),q([t.Output()],n.prototype,"visibleChange",void 0),q([t.Output()],n.prototype,"pixAccountItemToList",void 0),q([t.Input()],n.prototype,"visible",null),q([t.Input()],n.prototype,"isEditAndViewValue",null),q([t.Input()],n.prototype,"getListPixAccount",null),q([t.Input()],n.prototype,"isViewMode",null),q([t.Input()],n.prototype,"paramsForm",null),q([t.Input()],n.prototype,"defaultCpfNumber",null),n=q([t.Component({selector:"pix-account",template:'<div id="main">\n <form *ngIf="!(hideFields | async)" [formGroup]="pixAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Tipo de chave --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_pix_key_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="PixKeyType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="pixKeyType" [form]="pixAccountFormGroup"\n (onSelect)="onChangePixKeyType($event)"\n (onClear)="onClearPixKeyType()"\n id="ta-pixKeyType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="pixAccountFormGroup.get(\'pixKeyType\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n pixKeyTypeBankAccountDuplicate: \'hcm.payroll.historical_pix_key_type_bank_account_duplicate\' | translate\n }">\n </s-control-errors>\n </div>\n \x3c!--Chave Pix--\x3e\n <div class="ui-md-6 ui-sm-12" [ngClass]="{\'required\': pixKeyType !== \'BANK_ACCOUNT\'}">\n <label>{{\'hcm.payroll.employees_addition_pix_key\' | translate}}</label>\n <ng-container [ngSwitch]="pixKeyType">\n <input *ngSwitchCase="\'TELEPHONE\'" only-number\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"\n (keyup)="phoneMask($event)" maxlength="15"\n placeholder="(__) ____-____">\n <p-inputMask *ngSwitchCase="\'CPF\'"\n id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="___.___.___-__"\n mask="999.999.999-99" [unmask]="true"></p-inputMask>\n <p-inputMask *ngSwitchCase="\'CNPJ\'"\n id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="__.___.___/____-__"\n mask="99.999.999/9999-99" [unmask]="true"></p-inputMask>\n <input *ngSwitchCase="\'EMAIL\'"\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"\n placeholder="{{\'hcm.payroll.employees_addition_email\'|translate}}"/>\n <input *ngSwitchCase="\'BANK_ACCOUNT\'" disabled\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey"/>\n <input *ngSwitchDefault\n pInputText id="ta-pixKey" name="pixKey" formControlName="pixKey" maxlength="100" />\n </ng-container>\n <s-control-errors *ngIf="isShowPixKeyFieldValidatorMessage" id="er-pix-key"\n [control]="pixAccountFormGroup.get(\'pixKey\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n invalidPhoneNumber: \'hcm.payroll.employees_addition_invalid_phone_number\' | translate: { value: pixAccountFormGroup.get(\'pixKey\').value },\n invalidEmail: \'hcm.payroll.employees_addition_email_invalid\' | translate,\n cpfNotValid: \'hcm.payroll.employees_addition_cpf_error\' | translate,\n cnpjNotValid: \'hcm.payroll.employees_addition_cnpj_error\' | translate\n }">\n </s-control-errors>\n </div>\n \x3c!--Percentual--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="pixAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(en),rn=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,_e,h.ControlErrorsModule,Et,M.CurrencyMaskModule,St,d.InputTextModule,Ce,L.FieldsetModule,h.CustomFieldsModule,O.PanelModule,u.InputMaskModule,c.DropdownModule,R.TabViewModule],declarations:[on,nn],providers:[tn,I.ConfirmationService],exports:[on]})],e)}(),an=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,i){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete",{dependentId:i,dateWhen:o}):this.http.post("actions/historicalEmployeePixDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:qe},{type:v.HttpClient}]},o=q([t.Injectable()],o)}(),sn=y,ln=function(){function o(e,o,n,i,r,a,s,l){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=i,this.router=r,this.messageService=a,this.historicalPixAccountListService=s,this.sharedStateService=l,this.endPoint="hcm/payroll/queries/historicalEmployeePixQuery",this.keyPayload="historicalEmployeePix",this.withSidebar=!0,this.isOnlyView=new t.EventEmitter,this.isOnlyEdit=new t.EventEmitter,this.enableView=new t.EventEmitter,this.isEditJudicialDependentPix=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),field:"dateChange"},{label:this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),field:"numberOfPixAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),this.unsubscribe()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateChange=sn(e.dateChange).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){if(t.isAllowToViewHistorical){t.sharedStateService.setHideField(!0),t.sharedStateService.setShowButton(!1),t.sharedStateService.setShowEditMode(!1);var o=e&&e.dateChange&&sn(e.dateChange,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?(t.isOnlyView.emit(!0),t.router.navigate(["historical-pix-account/"+o],{relativeTo:t.activatedRoute})):(t.sharedStateService.setSaveButton(!1),t.enableView.emit(o))}else t.isNotAllowMessage()}},{label:this.translateService.instant("hcm.payroll.edit"),command:function(){if(t.isAllowToEditHistorical){t.sharedStateService.setHideField(!0),t.sharedStateService.setShowButton(!1),t.sharedStateService.setShowEditMode(!0);var o=e&&e.dateChange&&sn(e.dateChange,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?t.router.navigate(["historical-pix-account/"+o],{relativeTo:t.activatedRoute}):(t.sharedStateService.setSaveButton(!0),t.enableView.emit(o))}else t.isNotAllowMessage()}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateChange):t.isNotAllowMessage()}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var i=sn(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalPixAccountListService.remove(n.employeeId,i,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove")}),n.parameters=n.parameters&&j({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-pix-account-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.isNotAllowMessage=function(){this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},o.prototype.unsubscribe=function(){this._subscription&&this._subscription.unsubscribe()},Object.defineProperty(o.prototype,"hideFieldsOnAdd$",{set:function(e){var t=this;this.unsubscribe(),e&&(this._subscription=e.subscribe((function(e){t.sharedStateService.setHideField(e)})))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToViewHistorical",{get:function(){return this.permission.visualizar},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToEditHistorical",{get:function(){return this.permission.editar},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&j({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:r.ActivatedRoute},{type:t.ChangeDetectorRef},{type:r.Router},{type:I.MessageService},{type:an},{type:Xo}]},q([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),q([t.Input()],o.prototype,"permission",void 0),q([t.Input()],o.prototype,"employeeId",void 0),q([t.Input()],o.prototype,"dependentId",void 0),q([t.Input()],o.prototype,"dateFormat",void 0),q([t.Input()],o.prototype,"endPoint",void 0),q([t.Input()],o.prototype,"keyPayload",void 0),q([t.Input()],o.prototype,"withSidebar",void 0),q([t.Input()],o.prototype,"hideField",void 0),q([t.Output()],o.prototype,"isOnlyView",void 0),q([t.Output()],o.prototype,"isOnlyEdit",void 0),q([t.Output()],o.prototype,"enableView",void 0),q([t.Output()],o.prototype,"isEditJudicialDependentPix",void 0),q([t.Input()],o.prototype,"hideFieldsOnAdd$",null),q([t.Input()],o.prototype,"reloadList",null),o=q([t.Component({selector:"c-historical-pix-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-historical-pix-account-list"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),pn=function(){function e(){}return e=q([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,T.AutoCompleteModule,he,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Te,B.ConfirmDialogModule],declarations:[ln],providers:[an],exports:[ln]})],e)}();e.AdmissionDraftSummaryComponent=Le,e.AdmissionDraftSummaryModule=Oe,e.AdmissionDraftSummaryService=Me,e.AutocompleteParametersService=no,e.BlockUiComponent=ue,e.BlockUiModule=de,e.BreadcrumbComponent=me,e.BreadcrumbSDSModule=ye,e.CNPJValidator=se,e.CPFValidator=re,e.CompanyIndicationsService=Xt,e.ControlMessagesErrorComponent=fe,e.ControlMessagesErrorModule=ge,e.CoreDirectives=Ce,e.CustomFieldsComponent=be,e.CustomFieldsModule=Se,e.DataListModule=Io,e.DataListRestModule=Te,e.DateValidator=Ko,e.EmployeeSelectorComponent=$o,e.EmployeeSelectorModule=Wo,e.EmployeeSummaryComponent=Ee,e.EmployeeSummaryModule=Ae,e.EmployeeSummaryService=Pe,e.EntityODataParameter=qo,e.ErrorPageComponent=Be,e.ErrorPageModule=Re,e.FieldValidatorComponent=Ne,e.FieldValidatorModule=Ve,e.FileUploadComponent=Ge,e.FileUploadCoreModule=Ye,e.FormComparatorService=mo,e.FromToComponent=zo,e.FromToModule=Qo,e.HistoricalBankAccountComponent=Mo,e.HistoricalBankAccountListComponent=Vo,e.HistoricalBankAccountListModule=jo,e.HistoricalBankAccountListService=Ro,e.HistoricalBankAccountModule=Bo,e.HistoricalBankAccountService=Oo,e.HistoricalPixAccountComponent=on,e.HistoricalPixAccountListComponent=ln,e.HistoricalPixAccountListModule=pn,e.HistoricalPixAccountListService=an,e.HistoricalPixAccountModule=rn,e.HistoricalPixAccountService=tn,e.HttpClientService=qe,e.ImageCropComponent=He,e.ImageCropModule=$e,e.ImageCropService=Ke,e.InputDateComponent=Ie,e.InputDateModelComponent=ze,e.InputDateModelModule=Qe,e.InputDateModule=_e,e.InputRestAutoCompleteComponent=_t,e.InputRestAutoCompleteEmployeeModelModule=Tt,e.InputRestAutoCompleteEmployeeModelService=xt,e.InputRestAutoCompleteEmployeeModule=Ct,e.InputRestAutoCompleteEmployeeService=wt,e.InputRestAutoCompleteEnumComponent=Ft,e.InputRestAutoCompleteEnumModule=Et,e.InputRestAutoCompleteEnumService=Pt,e.InputRestAutoCompleteJobpositionComponent=Vt,e.InputRestAutoCompleteJobpositionModule=jt,e.InputRestAutoCompleteJobpositionService=Nt,e.InputRestAutoCompleteModelEnumModule=Rt,e.InputRestAutoCompleteModelEnumService=Ot,e.InputRestAutoCompleteModelModule=Lt,e.InputRestAutoCompleteModelService=At,e.InputRestAutoCompleteModule=St,e.InputRestAutoCompleteService=It,e.IntegrationService=Zt,e.ListRestComponent=Ut,e.ListRestModule=Gt,e.LookupModule=ko,e.LookupParametersService=to,e.NameNotSpacesDirective=we,e.OnlyNumberDirective=ke,e.PermissionService=yo,e.ReportService=co,e.ServicesModule=ho,e.SharedStateService=Xo,e.SpinnerLoaderComponent=Yt,e.SpinnerLoaderModule=Kt,e.StringMethods=pe,e.ToastComponent=fo,e.ToastModule=go,e.ToastService=je,e.TypeAdmissionModule=$t,e.TypeAdmissionServices=Ht,e.WorkflowDataService=uo,e.WorkflowIntegrator=Ho,e.WorkstationgroupLookupDto=Po,e.WorkstationgroupLookupModule=Ao,e._moment=lt,e.assign=function e(t){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(!o.length)return t;var i=o.shift();if(Xe(t)&&Xe(i)){var r=function(o){var n,r,a,s;Xe(i[o])?(t[o]||Object.assign(t,((n={})[o]={},n)),e(t[o],i[o])):Ze(i[o])?Object.assign(t,((r={})[o]=i[o],r)):(t[o]||Object.assign(t,((a={})[o]=[],a)),Object.assign(t,((s={})[o]=i[o].map((function(n,i){return e(t[o][i]||{},n)})),s)))};for(var a in i)r(a)}return e.apply(void 0,H([t],o))},e.autoCompleteObjectForIdObject=function(e){return Xe(e)?(e.hasOwnProperty("tableId")&&console.error("Paramentro não é um objeto Auto Complete válido, falta tableId"),et(e.tableId)||console.error("tableId esta vazio"),{id:e.tableId}):(console.error("Paramentro não é um objeto"),!1)},e.clearValues=gt,e.cnpjValidator=le,e.compareValues=ft,e.configEnabledFields=mt,e.containsMoreThanOneConsecutiveAbbreviation=function(e){return!/(\b.\s)(.\s)(.\b)\1?/g.test(e)},e.containsMoreThanOneConsecutiveBlankSpace=function(e){return!/(\w[ ]{2,}\w)/.test(e)},e.containsMoreThanTwoRepeatedCharacters=function(e){return!/([a-zA-Z])\1{2}/g.test(e)},e.containsSpecialCharacters=function(e){return!/[[\]!@#$%&*_+=`´{}^~<>.,:;?|()\/\\-]/.test(e)},e.convertBooleanString=function(e){return"boolean"==typeof e?!0===e?"true":"false":e},e.convertStringToBoolean=function(e){return!0===e||"true"===e.toLowerCase()},e.cpfValidator=ae,e.firstNameIsValid=function(e){var t=e.split(" ");return t.length>=2&&t[1].length>=1},e.firstNameLengthIsValid=function(e){var t=e.split(" ");return!(t[0].trim().length>0)||t[0].trim().length>=2},e.formatMoney=function(e,t){switch(void 0===t&&(t="EN"),t){case"EN":return et(e)?e.toString().replace(".","").replace(",","."):"";case"BR":return et(e)?e.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1."):"";default:return et(e)?e.toString().replace(".","").replace(",","."):""}},e.fullNameLengthIsValid=function(e){return e.length<=70},e.getAddWeekDaysBusiness=function(e,t){return D.addWeekDays(st(e),t).format("DD/MM/YYYY")},e.getFormat=bt,e.getFormatDate=rt,e.getMoment=st,e.getNowDate=at,e.getObjValids=function(e){var t=Object.assign({},e),o={};return Object.keys(t).map((function(e){et(t[e])&&(o[e]=nt(e,t[e]))})),o},e.getQueryParams=function(e){e=e.split("+").join(" ");for(var t,o={},n=/[?&]?([^=]+)=([^&]*)/g;t=n.exec(e);)o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return o},e.getWeekDaysBusiness=function(e,t){var o=t?st(t):st(e).endOf("month");return D.weekDays(st(e),o)},e.getYears=function(e){return Je().diff(e,"years",!1)},e.invertFieldDate=it,e.isBirthDayValid=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateCompare=function(e,t,o){return!(e&&e.isValid()&&t&&o)||e[o](t)},e.isDateExpirationBeforeExpeditionDate=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateField=nt,e.isDateSameOrAfterCurrentDate=function(e){if(e){var t=Wt();return e.isSameOrAfter(t)}},e.isFullDate=ot,e.isMax=function(e,t){return e.length<=t},e.isNumber=zt,e.isObject=Xe,e.isRequired=function(e){return null!=e&&e.length>0},e.isShallow=Ze,e.isValid=et,e.isValidDate=tt,e.isValidPIS=function(e){var t=0,o=0,n=e.replace(/[^\d]+/g,"");if(11!==n.length||"00000000000"===n||"11111111111"===n||"22222222222"===n||"33333333333"===n||"44444444444"===n||"55555555555"===n||"66666666666"===n||"77777777777"===n||"88888888888"===n||"99999999999"===n)return!1;for(var i=0;i<10;i++)t+=parseInt(n.substring(i,i+1))*parseInt("3298765432".substring(i,i+1));return(o=10===(o=11-t%11)||11===o?0:o)===parseInt(""+n.charAt(10))},e.mountCustomForSave=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null);var n=[];return t&&e.length&&t.map((function(t,i){var r=Object.keys(e[i]).toString(),a=et(e[i][r])?e[i][r]:null,s="date"===t.type&&o&&et(a)?Je(a,bt(o)).format("YYYY-MM-DD"):a;n.push({field:r,value:s})})),n.length?n:null},e.mountCustomForShow=function(e){var t=[];return Object.keys(e||{}).forEach((function(o){"date"===e[o].type&&e[o].value&&(e[o].value=lt(e[o].value).format("L")),t.push(e[o])})),t},e.mountCustomToSave=pt,e.mountCustomToShow=ct,e.mountGeneratedCustomToSave=function(e){return Object.entries(e).forEach((function(t){var o=K(t,2),n=o[0];o[1]||delete e[n]})),e},e.ngCalendarFormat=function(e,t){if(void 0===t&&(t="DD/MM/YYYY"),tt(e))return"string"==typeof e?e:lt(e).format(t)},e.notEmpty=Qt,e.numberOrZero=Jt,e.removeCharacteresSpecials=vt,e.removeEmpty=function e(t){return Object.keys(t).forEach((function(o){return t[o]&&"object"==typeof t[o]&&e(t[o])||!t[o]&&void 0!==t[o]&&delete t[o]})),t},e.removeWhiteSpaces=function(e){return e&&String(e)?String(e).replace(/\s/g,""):String(e)},e.setCustonFields=function(e){var t=this;return e.map((function(e){var n={},i=e.value||null;"boolean"==typeof i&&(i=i?"true":"false"),n[e.field]=new o.FormControl(i),t.push(new o.FormGroup(n))})),e},e.setDisableField=yt,e.setErrors=function(e,t,o){var n=this;setTimeout((function(){var i;o?((i=Object.assign({},n.get(e).errors))[t]=o,n.get(e).setErrors(i)):(i=n.get(e).errors)&&Object.keys(i).length&&(delete i[t],Object.keys(i).length||n.get(e).setErrors(null))}),0)},e.setRequired=dt,e.setRequiredFields=function(e,t,n){t?n.forEach((function(t){return dt(e,t,!0,[o.Validators.required])})):n.forEach((function(t){return dt(e,t,!1)}))},e.setValidator=ht,e.setValidatorsAndDisableFields=function(e,t){t.forEach((function(t){ht(e,t.field,t.validators),yt(e,t.disabled,t.field,t.clearValue)}))},e.setValueCustom=function(e,t){var o=t?Object.keys(t).length:0;return e.map((function(e){e.value=o>0?t[e.field]:null})),e},e.stringMethods=ce,e.sun=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Jt(t)+e}),0)},e.uiid=function(){return(new x).guid().replace(/[^a-zA-Z0-9.]/g,"").toUpperCase()},e.validateBirthDate=function(e,t){if(e&&t){var o=Wt("string"==typeof e?e.replace(/[^\d]+/g,""):e,"DDMMYYYY").format("YYYY-MM-DD").toString(),n=Wt(t.replace(/[^\d]+/g,""),"DDMMYYYY").format("YYYY-MM-DD").toString();return Wt(n).isSameOrAfter(o)}},e.verifyValidationsForm=ut,e.ɵa=he,e.ɵb=De,e.ɵc=xe,e.ɵd=Ue,e.ɵe=kt,e.ɵf=Dt,e.ɵg=Mt,e.ɵh=Bt,e.ɵi=qt,e.ɵj=vo,e.ɵk=bo,e.ɵl=wo,e.ɵm=_o,e.ɵn=Eo,e.ɵo=xo,e.ɵp=To,e.ɵq=Lo,e.ɵr=en,e.ɵs=nn,Object.defineProperty(e,"__esModule",{value:!0})}));
2
17
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.umd.min.js.map