visorus-erp-core 10.1.2 → 11.0.0
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.
- package/bundles/visorus-erp-core.umd.js +4907 -5330
- package/bundles/visorus-erp-core.umd.js.map +1 -1
- package/bundles/visorus-erp-core.umd.min.js +1 -1
- package/bundles/visorus-erp-core.umd.min.js.map +1 -1
- package/esm2015/lib/app.module.js +4 -3
- package/esm2015/lib/components/acreedor/select/select-acreedor.component.js +2 -2
- package/esm2015/lib/components/acreedor/services/acreedor.service.js +11 -25
- package/esm2015/lib/components/acreedor/services/acreedorCuentaContable.js +13 -11
- package/esm2015/lib/components/agente/models/Agente.js +1 -1
- package/esm2015/lib/components/agente/services/agente.service.js +17 -25
- package/esm2015/lib/components/almacen/models/Almacen.js +1 -1
- package/esm2015/lib/components/almacen/services/almacen.service.js +13 -26
- package/esm2015/lib/components/banco/models/Banco.js +1 -1
- package/esm2015/lib/components/banco/services/banco.service.js +10 -25
- package/esm2015/lib/components/caja/session-create/session-create.component.js +2 -2
- package/esm2015/lib/components/caja/sessionCaja.service.js +11 -25
- package/esm2015/lib/components/catalogoTipo/models/CatalogoTipo.js +1 -1
- package/esm2015/lib/components/catalogoTipo/services/catalogoTipo.service.js +10 -25
- package/esm2015/lib/components/clasificadorTipo/models/ClasificadorTipo.js +1 -1
- package/esm2015/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +10 -25
- package/esm2015/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +10 -25
- package/esm2015/lib/components/claveMovimiento/models/ClaveMovimiento.js +1 -1
- package/esm2015/lib/components/claveMovimiento/services/claveMovimiento.service.js +10 -25
- package/esm2015/lib/components/cliente/models/Cliente.js +1 -1
- package/esm2015/lib/components/cliente/models/ClienteCuentaBanco.js +1 -1
- package/esm2015/lib/components/cliente/models/ClienteFlete.js +1 -1
- package/esm2015/lib/components/cliente/select/select-cliente.component.js +2 -2
- package/esm2015/lib/components/cliente/services/cliente.service.js +11 -26
- package/esm2015/lib/components/cliente/services/clienteCuentaBanco.service.js +12 -26
- package/esm2015/lib/components/cliente/services/clienteFlete.service.js +12 -26
- package/esm2015/lib/components/contacto/models/DatoContacto.js +1 -1
- package/esm2015/lib/components/contacto/services/datoContacto.service.js +10 -25
- package/esm2015/lib/components/dato-direccion/models/DatoDireccion.js +1 -1
- package/esm2015/lib/components/dato-direccion/services/datoDireccion.service.js +10 -25
- package/esm2015/lib/components/departamento/models/Departamento.js +1 -1
- package/esm2015/lib/components/departamento/services/departamento.service.js +10 -25
- package/esm2015/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js +1 -1
- package/esm2015/lib/components/empresa/models/Empresa.js +1 -1
- package/esm2015/lib/components/empresa/services/empresa.service.js +13 -26
- package/esm2015/lib/components/error404/error404.component.js +2 -2
- package/esm2015/lib/components/flete/models/Flete.js +1 -1
- package/esm2015/lib/components/flete/services/flete.service.js +11 -25
- package/esm2015/lib/components/formaPago/models/FormaPago.js +1 -1
- package/esm2015/lib/components/formaPago/services/FormaPago.service.js +10 -25
- package/esm2015/lib/components/loading/loading.component.js +3 -3
- package/esm2015/lib/components/loading/loading.service.js +2 -2
- package/esm2015/lib/components/loading-screen/loading-screen.component.js +3 -3
- package/esm2015/lib/components/loading-screen/loading-screen.service.js +2 -2
- package/esm2015/lib/components/login-modal/login-modal.component.js +3 -3
- package/esm2015/lib/components/login-modal/login-modal.service.js +2 -2
- package/esm2015/lib/components/moneda/models/Moneda.js +1 -1
- package/esm2015/lib/components/moneda/services/moneda.service.js +11 -25
- package/esm2015/lib/components/pdfModal/pdf-modal.component.js +2 -2
- package/esm2015/lib/components/pdfModal/pdf-modal.service.js +2 -2
- package/esm2015/lib/components/persona-fisica/models/EstadoCivil.js +1 -1
- package/esm2015/lib/components/persona-fisica/models/Genero.js +1 -1
- package/esm2015/lib/components/persona-fisica/models/Persona.js +1 -1
- package/esm2015/lib/components/persona-fisica/models/PersonaFisica.js +1 -1
- package/esm2015/lib/components/persona-fisica/services/personaFisica.service.js +13 -12
- package/esm2015/lib/components/proveedor/models/Proveedor.js +1 -1
- package/esm2015/lib/components/proveedor/models/ProveedorCuentaBanco.js +1 -1
- package/esm2015/lib/components/proveedor/models/ProveedorFlete.js +1 -1
- package/esm2015/lib/components/proveedor/select/select-proveedor.component.js +2 -2
- package/esm2015/lib/components/proveedor/services/proveedor.service.js +11 -25
- package/esm2015/lib/components/proveedor/services/proveedorCuentaBanco.service.js +12 -26
- package/esm2015/lib/components/proveedor/services/proveedorFlete.service.js +11 -22
- package/esm2015/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +2 -2
- package/esm2015/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +12 -26
- package/esm2015/lib/components/selecciona-articulo/selecciona-articulo.component.js +3 -3
- package/esm2015/lib/components/selecciona-articulo/stock.service.js +13 -15
- package/esm2015/lib/components/serieDocumento/models/SerieDocumento.js +1 -1
- package/esm2015/lib/components/serieDocumento/services/serieDocumento.service.js +13 -24
- package/esm2015/lib/components/tipo-contacto/models/TipoContacto.js +1 -1
- package/esm2015/lib/components/tipo-contacto/services/tipoContacto.service.js +10 -25
- package/esm2015/lib/components/ubicacion/models/Ubicacion.js +1 -1
- package/esm2015/lib/components/ubicacion/services/ubicacion.service.js +10 -25
- package/esm2015/lib/contabilidad/componentes/cclista/cclista.component.js +2 -2
- package/esm2015/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js +4 -4
- package/esm2015/lib/contabilidad/modelos/cuentaContable.model.js +1 -1
- package/esm2015/lib/contabilidad/modelos/normaInfoFinanciera.model.js +1 -1
- package/esm2015/lib/contabilidad/servicios/cuentacontable.service.js +12 -26
- package/esm2015/lib/globalPrimeNg.js +1 -1
- package/esm2015/lib/httpInterceptor/httpInterceptor.js +2 -2
- package/esm2015/lib/importComponents.js +1 -1
- package/esm2015/lib/importComponetsConta.js +1 -1
- package/esm2015/lib/models/PersonaMoral.js +1 -1
- package/esm2015/lib/models/Usuario.js +1 -1
- package/esm2015/lib/models/auth.js +1 -1
- package/esm2015/lib/services/auth.service.js +2 -2
- package/esm2015/lib/services/authenticated.service.js +2 -2
- package/esm2015/lib/services/canActivateGuard.service.ts.js +2 -2
- package/esm2015/lib/services/catalogo-adicional.service.js +11 -25
- package/esm2015/lib/services/controlAcceso.service.js +2 -2
- package/esm2015/lib/services/crud.service.js +46 -0
- package/esm2015/lib/services/file.service.js +2 -2
- package/esm2015/lib/services/global.service.js +2 -13
- package/esm2015/lib/services/init.service.js +2 -2
- package/esm2015/lib/services/message.service.js +2 -2
- package/esm2015/lib/services/paginate.service.js +2 -2
- package/esm2015/lib/services/personaMoral.service.js +10 -25
- package/esm2015/lib/services/versionCheck.service.js +2 -2
- package/esm2015/lib/utils/tipo_catalogo.ts.js +1 -1
- package/esm2015/public_api.js +3 -3
- package/esm2015/visorus-erp-core.js +1 -1
- package/fesm2015/visorus-erp-core.js +311 -783
- package/fesm2015/visorus-erp-core.js.map +1 -1
- package/lib/app.module.d.ts +1 -0
- package/lib/components/acreedor/services/acreedor.service.d.ts +5 -12
- package/lib/components/acreedor/services/acreedorCuentaContable.d.ts +6 -6
- package/lib/components/agente/services/agente.service.d.ts +8 -14
- package/lib/components/almacen/services/almacen.service.d.ts +6 -13
- package/lib/components/banco/services/banco.service.d.ts +4 -12
- package/lib/components/caja/sessionCaja.service.d.ts +5 -11
- package/lib/components/catalogoTipo/services/catalogoTipo.service.d.ts +4 -12
- package/lib/components/clasificadorTipo/services/clasificadorTipo.service.d.ts +4 -12
- package/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.d.ts +4 -11
- package/lib/components/claveMovimiento/services/claveMovimiento.service.d.ts +4 -12
- package/lib/components/cliente/services/cliente.service.d.ts +5 -13
- package/lib/components/cliente/services/clienteCuentaBanco.service.d.ts +6 -13
- package/lib/components/cliente/services/clienteFlete.service.d.ts +6 -12
- package/lib/components/contacto/services/datoContacto.service.d.ts +4 -11
- package/lib/components/dato-direccion/services/datoDireccion.service.d.ts +4 -11
- package/lib/components/departamento/services/departamento.service.d.ts +4 -11
- package/lib/components/empresa/services/empresa.service.d.ts +6 -12
- package/lib/components/flete/services/flete.service.d.ts +5 -11
- package/lib/components/formaPago/services/FormaPago.service.d.ts +4 -12
- package/lib/components/moneda/services/moneda.service.d.ts +5 -11
- package/lib/components/persona-fisica/services/personaFisica.service.d.ts +7 -8
- package/lib/components/proveedor/services/proveedor.service.d.ts +5 -11
- package/lib/components/proveedor/services/proveedorCuentaBanco.service.d.ts +6 -12
- package/lib/components/proveedor/services/proveedorFlete.service.d.ts +6 -11
- package/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.d.ts +6 -12
- package/lib/components/selecciona-articulo/stock.service.d.ts +5 -7
- package/lib/components/serieDocumento/services/serieDocumento.service.d.ts +7 -12
- package/lib/components/tipo-contacto/services/tipoContacto.service.d.ts +4 -11
- package/lib/components/ubicacion/services/ubicacion.service.d.ts +4 -11
- package/lib/contabilidad/servicios/cuentacontable.service.d.ts +6 -12
- package/lib/services/catalogo-adicional.service.d.ts +5 -11
- package/lib/services/crud.service.d.ts +20 -0
- package/lib/services/global.service.d.ts +2 -4
- package/lib/services/personaMoral.service.d.ts +4 -11
- package/package.json +2 -2
- package/public_api.d.ts +2 -2
- package/esm2015/lib/services/api.service.js +0 -80
- package/lib/services/api.service.d.ts +0 -45
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/forms"),require("primeng/inputtext"),require("primeng/treetable"),require("primeng/api"),require("@angular/common"),require("primeng/button"),require("primeng/dialog"),require("rxjs"),require("rxjs/internal/operators"),require("ngx-toastr"),require("@ngx-translate/core"),require("rxjs/operators"),require("@angular/platform-browser"),require("primeng/table"),require("primeng/paginator"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/messages"),require("primeng/message"),require("primeng/confirmdialog"),require("primeng/progressbar"),require("primeng/tristatecheckbox"),require("primeng/keyfilter"),require("primeng/inputswitch"),require("primeng/tabview"),require("primeng/calendar"),require("primeng/panel"),require("primeng/autocomplete"),require("primeng/fieldset"),require("primeng/checkbox"),require("primeng/tree"),require("primeng/radiobutton"),require("primeng/tabmenu"),require("primeng/overlaypanel"),require("primeng/tooltip"),require("primeng/card"),require("primeng/menubar"),require("primeng/splitbutton"),require("primeng/toolbar"),require("@ngx-translate/http-loader"),require("@angular/router")):"function"==typeof define&&define.amd?define("visorus-erp-core",["exports","@angular/common/http","@angular/core","@angular/forms","primeng/inputtext","primeng/treetable","primeng/api","@angular/common","primeng/button","primeng/dialog","rxjs","rxjs/internal/operators","ngx-toastr","@ngx-translate/core","rxjs/operators","@angular/platform-browser","primeng/table","primeng/paginator","primeng/dropdown","primeng/inputmask","primeng/messages","primeng/message","primeng/confirmdialog","primeng/progressbar","primeng/tristatecheckbox","primeng/keyfilter","primeng/inputswitch","primeng/tabview","primeng/calendar","primeng/panel","primeng/autocomplete","primeng/fieldset","primeng/checkbox","primeng/tree","primeng/radiobutton","primeng/tabmenu","primeng/overlaypanel","primeng/tooltip","primeng/card","primeng/menubar","primeng/splitbutton","primeng/toolbar","@ngx-translate/http-loader","@angular/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["visorus-erp-core"]={},e.ng.common.http,e.ng.core,e.ng.forms,e.i6,e.i4,e.i4$1,e.ng.common,e.i7,e.i4$2,e.rxjs,e.rxjs["internal/operators"],e.i1$1,e.i3,e.rxjs.operators,e.ng.platformBrowser,e.i8$1,e.i10,e.i23,e.i24,e.i25,e.i26,e.i28,e.i29,e.i30,e.i31,e.i32,e.i34,e.i20,e.i35,e.i17,e.i38,e.i16,e.i39,e.i15,e.i40,e.i14,e.i13,e.i12,e.i41,e.i37,e.i36,e.httpLoader,e.ng.router)}(this,(function(e,t,n,i,o,r,a,s,l,c,p,u,d,f,h,m,g,v,b,y,S,x,w,C,I,E,M,A,j,k,P,_,O,T,D,B,F,q,z,R,L,U,H,N){"use strict";var V=function(){function e(e){this.http=e}return e.prototype.setConfiguracion=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))}))},e.prototype.obtieneConfiguracion=function(){return JSON.parse(localStorage.getItem("config"))},e.prototype.getUrl=function(e){return this.obtieneConfiguracion().url+(e?"/"+e:"")},e.prototype.auth=function(e){return this.http.post(this.getUrl()+"/login",e)},e.prototype.getUsuarioActual=function(){return this.http.get(this.getUrl()+"/usuario/obtieneUsuarioActual",this.buildAuth())},e.prototype.buildAuth=function(){var e=this.getUsuario();return{headers:new t.HttpHeaders({Authorization:e.token_type+" "+e.access_token,"Content-Type":"application/json",Accept:"application/json"})}},e.prototype.validateEndPoint=function(){return this.http.get(this.getUrl()+"/validate",this.buildAuth())},e.prototype.closeEndPoint=function(){localStorage.removeItem("usuario"),this.setUsuarioInstance(null)},e.prototype.getUsuario=function(){return JSON.parse(localStorage.getItem("usuario"))},e.prototype.setUsuarioInstance=function(e){this.usuarioInstance=e},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.setModulo=function(e){return this.http.post(this.getUrl()+"/usuario/setModulo",e,this.buildAuth())},e}();V.ɵfac=function(e){return new(e||V)(n.ɵɵinject(t.HttpClient))},V.ɵprov=n.ɵɵdefineInjectable({token:V,factory:V.ɵfac,providedIn:"root"});var J=function(){function e(e,t){this.http=e,this.global=t}return e.prototype.get=function(e,n){var i=new t.HttpParams({fromObject:n}),o=Object.assign(Object.assign({},this.global.buildAuth()),{params:i}),r=this.global.getUrl(e);return this.http.get(r,o)},e.prototype.post=function(e,t){var n=this.global.getUrl(e),i=this.global.buildAuth();return this.http.post(n,t,i)},e.prototype.put=function(e,t,n){var i=this.global.buildAuth();return this.http.put('<span class="math-inline">{this.global.getUrl(endpoint)}/</span>{id}',n,i)},e.prototype.delete=function(e,t){var n=this.global.buildAuth();return this.http.delete('<span class="math-inline">{this.global.getUrl(endpoint)}/</span>{id}',n)},e.prototype.patch=function(e,t,n){var i=this.global.buildAuth();return this.http.patch('<span class="math-inline">{this.global.getUrl(endpoint)}/</span>{id}',n,i)},e}();J.ɵfac=function(e){return new(e||J)(n.ɵɵinject(t.HttpClient),n.ɵɵinject(V))},J.ɵprov=n.ɵɵdefineInjectable({token:J,factory:J.ɵfac,providedIn:"root"});function Z(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function G(e,t){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(6===s[0]&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e],i=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}Object.create;function W(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Y=function(){function e(e){this.api=e,this.endpoint="cuentaContable"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.obtieneCuentasContablesRecursivo=function(){return this.api.get(this.endpoint+"/obtieneCuentasContablesRecursivo")},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();function K(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"th",5),n.ɵɵtext(2,"Cuenta contable"),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"th",5),n.ɵɵtext(4,"Descripción"),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"th",6),n.ɵɵtext(6,"Naturaleza"),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"th",7),n.ɵɵtext(8,"Tipo"),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"th",8),n.ɵɵtext(10,"Acciones"),n.ɵɵelementEnd(),n.ɵɵelementEnd())}function Q(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"button",16),n.ɵɵlistener("click",(function(){n.ɵɵrestoreView(i);var e=n.ɵɵnextContext().rowData;return n.ɵɵnextContext().selectCuentaContable(e)})),n.ɵɵelementEnd()}}function X(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"button",16),n.ɵɵlistener("click",(function(){n.ɵɵrestoreView(i);var e=n.ɵɵnextContext().rowData;return n.ɵɵnextContext().selectCuentaContable(e)})),n.ɵɵelementEnd()}}function ee(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"td",9),n.ɵɵelement(2,"p-treeTableToggler",10),n.ɵɵtext(3),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"td",9),n.ɵɵtext(5),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"td",11),n.ɵɵtext(7),n.ɵɵelementEnd(),n.ɵɵelementStart(8,"td",12),n.ɵɵtext(9),n.ɵɵelementEnd(),n.ɵɵelementStart(10,"td",13),n.ɵɵelementStart(11,"div",14),n.ɵɵtemplate(12,Q,1,0,"button",15),n.ɵɵtemplate(13,X,1,0,"button",15),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit,o=t.rowData,r=n.ɵɵnextContext();n.ɵɵadvance(2),n.ɵɵproperty("rowNode",i),n.ɵɵadvance(1),n.ɵɵtextInterpolate1(" ",o.cuentaContable," "),n.ɵɵadvance(2),n.ɵɵtextInterpolate1(" ",o.descripcion," "),n.ɵɵadvance(2),n.ɵɵtextInterpolate1(" ",o.naturaleza," "),n.ɵɵadvance(2),n.ɵɵtextInterpolate1(" ",o.tipo," "),n.ɵɵadvance(3),n.ɵɵproperty("ngIf",1==r.typeAccount&&o.cuentaRegistro),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",2==r.typeAccount&&!o.cuentaRegistro)}}Y.ɵfac=function(e){return new(e||Y)(n.ɵɵinject(J))},Y.ɵprov=n.ɵɵdefineInjectable({token:Y,factory:Y.ɵfac,providedIn:"root"});var te=function(){return{width:"100%"}},ne=function(){function e(e){this._cuentaContableService=e,this.cuentasContables=[],this.maxH=720,this.query="",this.tempAccounts=[],this.evSelectedAccount=new n.EventEmitter}return e.prototype.ngOnInit=function(){this.maxH=window.innerHeight-320,this.obtenerCuentasContablesRecursivo()},e.prototype.obtenerCuentasContablesRecursivo=function(){var e=this;this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe((function(t){t&&(e.cuentasContables=t,e.sortAccounts())}))},e.prototype.sortAccounts=function(){var e,t;this.cuentasContables.sort((function(e,t){var n=e.data.cuentaContable.split("."),i=t.data.cuentaContable.split(".");if(n.length>0&&i.length>0){if(n.length===i.length){for(var o=0;o<n.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return 0}if(n.length<i.length){for(o=0;o<n.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return-1}if(i.length<n.length){for(o=0;o<i.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return 1}}return 0}));try{for(var n=W(this.cuentasContables),i=n.next();!i.done;i=n.next()){var o=i.value;o.children&&this.sortItem(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.tempAccounts=this.cuentasContables},e.prototype.sortItem=function(e){var t,n;e.children.sort((function(e,t){var n=e.data.cuentaContable.split("."),i=t.data.cuentaContable.split(".");if(n.length>0&&i.length>0){if(n.length===i.length){for(var o=0;o<n.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return 0}if(n.length<i.length){for(o=0;o<n.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return-1}if(i.length<n.length){for(o=0;o<i.length;o++){if(parseInt(n[o])>parseInt(i[o]))return 1;if(parseInt(n[o])<parseInt(i[o]))return-1}return 1}}return 0}));try{for(var i=W(e.children),o=i.next();!o.done;o=i.next()){var r=o.value;this.sortItem(r)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.selectCuentaContable=function(e){this.evSelectedAccount.emit(e)},e.prototype.filterAccounts=function(e){if(e)this.cuentasContables=this.browseAccount(this.tempAccounts);else{var t=this.resetAccount();this.cuentasContables=t}},e.prototype.resetAccount=function(){var e,t;this.query="";var n=[];try{for(var i=W(this.tempAccounts),o=i.next();!o.done;o=i.next()){var r=o.value;n.push(r)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},e.prototype.browseAccount=function(e){var t,n,i=[];if(""!==this.query){try{for(var o=W(e),r=o.next();!r.done;r=o.next()){var a=r.value;i=a.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase())||a.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())?i.concat({data:a.data,children:this.browseAccount(a.children)}):i.concat(this.browseAccount(a.children))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}var s=this.resetAccount();this.cuentasContables=s},e}();ne.ɵfac=function(e){return new(e||ne)(n.ɵɵdirectiveInject(Y))},ne.ɵcmp=n.ɵɵdefineComponent({type:ne,selectors:[["lib-cclista"]],inputs:{isShared:"isShared",typeAccount:"typeAccount"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:5,vars:8,consts:[["type","text","pInputText","","placeholder","Cuenta o descripción",2,"width","100%",3,"ngModel","ngModelChange","keyup"],[2,"padding","10px"],[3,"value","scrollable","scrollHeight","resizableColumns"],["pTemplate","header"],["pTemplate","body","style","width: 100%;"],[2,"width","150px"],[2,"width","90px"],[2,"width","60px"],[2,"width","200px"],[1,"ui-resizable-column",2,"width","150px"],[3,"rowNode"],[1,"ui-resizable-column",2,"width","90px"],[1,"ui-resizable-column",2,"width","60px"],[1,"ui-resizable-column",2,"width","200px"],[1,"button-row"],["pButton","","type","button","icon","pi pi-check","class","ui-button-raised ui-button-success",3,"click",4,"ngIf"],["pButton","","type","button","icon","pi pi-check",1,"ui-button-raised","ui-button-success",3,"click"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"input",0),n.ɵɵlistener("ngModelChange",(function(e){return t.query=e}))("keyup",(function(e){return t.filterAccounts(e)})),n.ɵɵelementEnd(),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"p-treeTable",2),n.ɵɵtemplate(3,K,11,0,"ng-template",3),n.ɵɵtemplate(4,ee,14,7,"ng-template",4),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵproperty("ngModel",t.query),n.ɵɵadvance(2),n.ɵɵstyleMap(n.ɵɵpureFunction0(7,te)),n.ɵɵproperty("value",t.cuentasContables?t.cuentasContables:t.tempAccounts)("scrollable",!0)("scrollHeight",t.maxH+"px")("resizableColumns",!0))},directives:[i.DefaultValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,r.TreeTable,a.PrimeTemplate,r.TreeTableToggler,s.NgIf,l.ButtonDirective],styles:[""]});var ie=["dialog"],oe=function(e){return{width:e,"min-width":"200px"}},re=function(e){return{height:e}},ae=function(){function e(){this.cuentasContables=[],this.maxH=720,this.maxW=0,this.flagModal=!0,this.size=350,this.maxH=window.innerHeight-370,this.maxW=window.innerWidth,this.size=this.maxW-50,this.evSelectedAccount=new n.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.getAccount=function(e){this.evSelectedAccount.emit(e)},e.prototype.hiddenDialog=function(e){this.evSelectedAccount.emit(null)},e}();ae.ɵfac=function(e){return new(e||ae)},ae.ɵcmp=n.ɵɵdefineComponent({type:ae,selectors:[["lib-ccseleccion-dialog"]],viewQuery:function(e,t){var i;(1&e&&n.ɵɵstaticViewQuery(ie,!0),2&e)&&(n.ɵɵqueryRefresh(i=n.ɵɵloadQuery())&&(t.dialog=i.first))},inputs:{tipoCuenta:"tipoCuenta",displayShowCuentas:"displayShowCuentas"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:3,vars:17,consts:[["header","Selecciona cuenta contable",3,"visible","modal","minY","baseZIndex","blockScroll","draggable","maximizable","visibleChange","onHide"],[1,"padding10",3,"ngStyle"],[3,"isShared","typeAccount","evSelectedAccount"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.displayShowCuentas=e}))("onHide",(function(e){return t.hiddenDialog(e)})),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"lib-cclista",2),n.ɵɵlistener("evSelectedAccount",(function(e){return t.getAccount(e)})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵstyleMap(n.ɵɵpureFunction1(13,oe,t.size+"px")),n.ɵɵproperty("visible",t.displayShowCuentas)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("draggable",!1)("blockScroll",!0)("maximizable",!0),n.ɵɵadvance(1),n.ɵɵproperty("ngStyle",n.ɵɵpureFunction1(15,re,t.maxH+200+"px")),n.ɵɵadvance(1),n.ɵɵproperty("isShared",!0)("typeAccount",t.tipoCuenta))},directives:[c.Dialog,s.NgStyle,ne],styles:[""]});var se=function(){function e(){this.modal=new n.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e}();se.ɵfac=function(e){return new(e||se)},se.ɵprov=n.ɵɵdefineInjectable({token:se,factory:se.ɵfac,providedIn:"root"});var le=function(){function e(){this._loading=!1,this.loadingStatus=new p.Subject}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingStatus.next(e)},enumerable:!1,configurable:!0}),e.prototype.startLoading=function(){this.loading=!0},e.prototype.stopLoading=function(){this.loading=!1},e}();le.ɵfac=function(e){return new(e||le)},le.ɵprov=n.ɵɵdefineInjectable({token:le,factory:le.ɵfac,providedIn:"root"});var ce=function(){function e(e,t,n){this.loginModalService=e,this.toastrService=t,this.loadingScreenService=n}return e.prototype.intercept=function(e,t){var n=this;return this.loadingScreenService.startLoading(),t.handle(e).pipe(u.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),p.throwError(e)})),u.tap((function(e){var t=e.body?e.body:null;if(0!==e.type&&4===e.type&&n.loadingScreenService.stopLoading(),t){var i=t.success?t.success:null;i&&n.toastrService.success(i,"Exito",{timeOut:3e3,closeButton:!0})}})))},e.prototype.handleError=function(e){return 401===e.status||403===e.status?(401===e.status&&this.loginModalService.showModal(),403===e.status&&this.toastrService.error("No tiene permiso sobre esta accion","Error",{timeOut:5e3}),p.of(e.message)):(401!==e.status&&403!==e.status&&409!==e.status&&this.toastrService.error("Ocurrio un error al procesar su solicitud","Error",{timeOut:5e3}),this.readError(e),p.of(e))},e.prototype.readError=function(e){if(e.error&&(e.error.error&&e.error.error.message&&this.toastrService.error(e.error.error.message,"Error",{timeOut:3e3}),e.error.message&&this.toastrService.error(e.error.message,"Error",{timeOut:3e3}),e.error._errors&&Array.isArray(e.error._errors)))for(var t=0;t<e.error._errors.length;t++)this.toastrService.error(e.error._errors[t].message,"Error",{timeOut:3e3,closeButton:!0})},e}();ce.ɵfac=function(e){return new(e||ce)(n.ɵɵinject(se),n.ɵɵinject(d.ToastrService),n.ɵɵinject(le))},ce.ɵprov=n.ɵɵdefineInjectable({token:ce,factory:ce.ɵfac});var pe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();pe.ɵfac=function(e){return new(e||pe)},pe.ɵcmp=n.ɵɵdefineComponent({type:pe,selectors:[["app-error404"]],decls:9,vars:0,consts:[[1,"col-md-12","sec_sof"],[1,"row"],[1,"col","col-center"],[1,"center"],[1,"error"],[1,"col-12"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"div",2),n.ɵɵelementStart(3,"div",3),n.ɵɵelementStart(4,"div",4),n.ɵɵtext(5," Error 404 "),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"div",5),n.ɵɵelementStart(7,"p"),n.ɵɵtext(8,"La pagina solicitada no fue encontrada"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd())},styles:[".error[_ngcontent-%COMP%]{font-size:70px}"]});var ue=function(){function e(){this.loading=new n.EventEmitter}return e.prototype.setLoading=function(e){e?this.start():this.stop()},e.prototype.start=function(){this.loading.emit(!0)},e.prototype.stop=function(){this.loading.emit(!1)},e}();ue.ɵfac=function(e){return new(e||ue)},ue.ɵprov=n.ɵɵdefineInjectable({token:ue,factory:ue.ɵfac,providedIn:"root"});var de=function(e){var t=this;this.loadingService=e,this.visible=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){e&&!t.visible?($("#modal_loading").modal("show"),t.visible=!0):(setTimeout((function(){$("#modal_loading").modal("hide")}),650),t.visible=!1)}))};de.ɵfac=function(e){return new(e||de)(n.ɵɵdirectiveInject(ue))},de.ɵcmp=n.ɵɵdefineComponent({type:de,selectors:[["loading"]],inputs:{logo_loading:"logo_loading"},decls:14,vars:4,consts:[["id","modal_loading","tabindex","-1","role","dialog","aria-labelledby","exampleModalScrollableTitle","data-backdrop","static","data-keyboard","false","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],[1,"col-lg-4","col-md-4","col-sm-10"],[1,"loader"],[1,"box"],[1,"code"],["width","200px",3,"src"],[1,"txt"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"div",2),n.ɵɵelementStart(3,"div",3),n.ɵɵelementStart(4,"div",4),n.ɵɵelementStart(5,"div",5),n.ɵɵelementStart(6,"div",6),n.ɵɵelement(7,"span",7),n.ɵɵelement(8,"span",7),n.ɵɵelementStart(9,"div",8),n.ɵɵelement(10,"img",9),n.ɵɵelementEnd(),n.ɵɵelementStart(11,"span",10),n.ɵɵtext(12),n.ɵɵpipe(13,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(10),n.ɵɵpropertyInterpolate("src",t.logo_loading,n.ɵɵsanitizeUrl),n.ɵɵadvance(2),n.ɵɵtextInterpolate1("",n.ɵɵpipeBind1(13,2,"cargando"),"..."))},pipes:[f.TranslatePipe],styles:['.loader[_ngcontent-%COMP%]{height:170px;position:relative;width:130px}.loader[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%]:before{bottom:30px;content:"";height:0;left:15px;position:absolute;transform:scale(0);transition:all .2s ease;width:0;z-index:1}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{bottom:-30px;color:#fff;font-family:Abel,sans-serif;font-size:12px;left:-7%;letter-spacing:2px;position:absolute;text-align:center;width:120%}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{-webkit-animation-duration:.8s;-webkit-animation-iteration-count:infinite;-webkit-animation-name:spaceboots;-webkit-animation-timing-function:linear;-webkit-transform-origin:50% 50%;bottom:-3px;position:absolute;z-index:99}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{color:#fff;display:block;height:140px;left:28px;overflow:hidden;position:absolute;width:100%;z-index:2}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;left:0;opacity:0;position:absolute;text-rendering:auto;top:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:before{animation:a 1.1s linear infinite;content:"\\f13b";font-size:20px}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:after{animation:b 1.3s linear infinite;content:"\\f13c"}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):before{animation:c .9s linear infinite;content:"\\f121";font-size:25px}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):after{animation:d .7s linear infinite;content:"\\f19a "}.loader.amit[_ngcontent-%COMP%]:after, .loader.amit[_ngcontent-%COMP%]:before{transform:scale(1)}@keyframes a{0%{opacity:0;transform:translate(30px) rotate(30deg)}to{opacity:1;transform:translate(30px,150px) rotate(-50deg)}}@keyframes b{0%{opacity:0;transform:translate(50px) rotate(-40deg)}to{opacity:1;transform:translate(40px,150px) rotate(80deg)}}@keyframes c{0%{opacity:0;transform:translate(70px) rotate(10deg)}to{opacity:1;transform:translate(60px,150px) rotate(70deg)}}@keyframes d{0%{opacity:0;transform:translate(30px) rotate(-50deg)}to{opacity:1;transform:translate(45px,150px) rotate(30deg)}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{background-color:hsla(0,0%,100%,0)!important;border:0!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}']});var fe=function(){function e(e,t,n,i){var o=this;this.loadingScreenService=e,this._elmRef=t,this._changeDetectorRef=n,this.loadingService=i,this.debounceTime=250,this.loading=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){o._elmRef.nativeElement.style.display=e?"block":"none"}))}return e.prototype.ngAfterViewInit=function(){var e=this;this._elmRef.nativeElement.style.display="none",this.loadingSubscription=this.loadingScreenService.loadingStatus.pipe(h.debounceTime(this.debounceTime)).subscribe((function(t){e._elmRef.nativeElement.style.display=t?"block":"none",e._changeDetectorRef.detectChanges()}))},e.prototype.ngOnDestroy=function(){this.loadingSubscription.unsubscribe()},e}();fe.ɵfac=function(e){return new(e||fe)(n.ɵɵdirectiveInject(le),n.ɵɵdirectiveInject(n.ElementRef),n.ɵɵdirectiveInject(n.ChangeDetectorRef),n.ɵɵdirectiveInject(ue))},fe.ɵcmp=n.ɵɵdefineComponent({type:fe,selectors:[["app-loading-screen"]],inputs:{logo_loading:"logo_loading"},decls:10,vars:0,consts:[[1,"loading-screen-wrapper"],[1,"loading-screen-icon"],[1,"blobs"],[1,"blob-center"],[1,"blob"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"div",2),n.ɵɵelement(3,"div",3),n.ɵɵelement(4,"div",4),n.ɵɵelement(5,"div",4),n.ɵɵelement(6,"div",4),n.ɵɵelement(7,"div",4),n.ɵɵelement(8,"div",4),n.ɵɵelement(9,"div",4),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd())},styles:[".loading-screen-wrapper[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.384);display:block;height:100%;position:fixed;width:100%;z-index:100000}.loading-screen-icon[_ngcontent-%COMP%]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{border-radius:70px;filter:url(#goo);height:300px;overflow:hidden;position:relative;transform-style:preserve-3d;width:300px}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{animation:blob-grow 3.4s linear infinite;box-shadow:0 -10px 40px -5px #475158;transform-origin:left top;transform-style:preserve-3d}.blob[_ngcontent-%COMP%], .blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{background:#475158;border-radius:50%;height:30px;left:50%;position:absolute;top:50%;transform:scale(.9) translate(-50%,-50%);width:30px}.blob[_ngcontent-%COMP%]{animation:blobs 3.4s ease-out infinite;opacity:0;transform-origin:center top}.blob[_ngcontent-%COMP%]:first-child{animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}99%{opacity:1}to{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,39%{transform:scale(0) translate(-50%,-50%)}40%,42%{transform:scaleY(.9) translate(-50%,-50%)}43%,44%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}90%,91%{transform:scaleY(.9) translate(-50%,-50%)}92%,to{transform:scale(0) translate(-50%,-50%)}}"]});var he=function(){function e(){this.visible=new n.EventEmitter,this.print=new n.EventEmitter}return e.prototype.pdf_generate=function(e){this.base_64=e,this.visible.emit(!0)},e.prototype.generate_print=function(e){this.html=e,this.print.emit(!0)},e}();he.ɵfac=function(e){return new(e||he)},he.ɵprov=n.ɵɵdefineInjectable({token:he,factory:he.ɵfac,providedIn:"root"});var me=function(){function e(e,t){this._toastrService=e,this.translate=t}return e.prototype.addFile=function(e,t){var n=this;void 0===t&&(t=!0);var i=e.target.files[0],o={id:null,nombre:"",contentType:"",orden:0,archivo:""};o.nombre=i.name,o.tipo=i.type;var r=new FileReader;return r.readAsDataURL(i),r.onload=function(){o.archivo=r.result,n.translate.get(["msgSuccess","titleFile"]).subscribe((function(e){t&&n._toastrService.success(e.msgSuccess,e.titleFile)}))},r.onerror=function(e){n.translate.get(["msgError","titleFile"]).subscribe((function(e){t&&n._toastrService.error(e.msgError,e.titleFile)}))},o},e.prototype.base64ToBlob=function(e,t){for(var n=atob(e),i=new Array(n.length),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);var r=new Uint8Array(i);return new Blob([r],{type:t})},e.prototype.blobToDowload=function(e,t,n){var i=document.createElement("a");i.download=n,i.href=window.URL.createObjectURL(e),i.dataset.downloadurl=[t,i.download,i.href].join(":"),i.click()},e.prototype.base64ToFileDowload=function(e,t,n){this.blobToDowload(this.base64ToBlob(e,t),t,n)},e}();function ge(e,t){if(1&e&&(n.ɵɵelementStart(0,"div",2),n.ɵɵelement(1,"iframe",3),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext();n.ɵɵadvance(1),n.ɵɵproperty("src",i.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+i.pdfBase64),n.ɵɵsanitizeResourceUrl)}}me.ɵfac=function(e){return new(e||me)(n.ɵɵinject(d.ToastrService),n.ɵɵinject(f.TranslateService))},me.ɵprov=n.ɵɵdefineInjectable({token:me,factory:me.ɵfac,providedIn:"root"});var ve=function(e){return{width:e,"min-width":"200px"}},be=function(){return{overflow:"visible"}},ye=function(){function e(e,t,n){var i=this;this._pdfModalService=e,this.fileService=t,this.domSanitizer=n,this.display=!1,this.pdfBase64=null,this.size=840,e.visible.subscribe((function(t){e.base_64&&(i.display=t,i.pdfBase64=e.base_64)})),e.print.subscribe((function(e){i.display=e,setTimeout((function(){document.getElementById("_modal_pdf").innerHTML="<iframe id='printf' width='100%' height='100%' ></iframe>"}),20),setTimeout((function(){i.imprimir()}),40)}))}return e.prototype.imprimir=function(){var e=window.frames.printf;e.contentWindow.head.innerHTML=' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">\n <style>\n .table-hover tbody tr:hover {\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .tr-select{\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .td-header{\n background: #f3f3f3;\n color: #0d385d;\n border-color: 1px solid #0b4b87;\n }\n .td-yellow{\n background: #fff6d3;\n }\n .td-blue{\n background: #88d1ea;\n }\n .td-green{\n background: #b9d2a0;\n }\n </style>',e.contentWindow.body.innerHTML=this._pdfModalService.html},e}();ye.ɵfac=function(e){return new(e||ye)(n.ɵɵdirectiveInject(he),n.ɵɵdirectiveInject(me),n.ɵɵdirectiveInject(m.DomSanitizer))},ye.ɵcmp=n.ɵɵdefineComponent({type:ye,selectors:[["pdf-modal"]],decls:2,vars:15,consts:[[3,"visible","modal","minY","baseZIndex","blockScroll","maximizable","breakpoint","contentStyle","visibleChange"],["style","min-height: 90vh;",4,"ngIf"],[2,"min-height","90vh"],[2,"width","100%","height","90vh",3,"src"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.display=e})),n.ɵɵtemplate(1,ge,2,1,"div",1),n.ɵɵelementEnd()),2&e&&(n.ɵɵstyleMap(n.ɵɵpureFunction1(12,ve,t.size+"px")),n.ɵɵproperty("visible",t.display)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("blockScroll",!0)("maximizable",!0)("breakpoint",840)("contentStyle",n.ɵɵpureFunction0(14,be)),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.pdfBase64))},directives:[c.Dialog,s.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]});var Se=function(){},xe=function(){},we=function(){function e(e){this.httpClient=e,this.url_host="",this.login=new n.EventEmitter,this.seleccionEmpresa=new n.EventEmitter,this.auth=new xe}return e.prototype.setlogin=function(e,t){localStorage.setItem("lang","es");var n=JSON.parse(localStorage.getItem("config"));return n&&n.url&&(this.url_host=n.url),this.httpClient.post(this.url_host+"/login"+(t?"/"+t:""),e)},e.prototype.startAuth=function(e){this.auth=e,this.login.emit(this.auth)},e.prototype.isLogin=function(){return null!==localStorage.getItem("usuario")},e.prototype.quitarUsuario=function(){localStorage.removeItem("usuario"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.verificaLogin=function(){var e=this;this.usuario=this.getUser(),this.usuario.access_token?this.getDetalsUser().subscribe((function(t){e.auth.usuarioDetalles=t,e.auth.login=!0,e.login.emit(e.auth)}),(function(t){e.quitarUsuario()})):(this.auth.usuarioDetalles=null,this.auth.login=!1,this.login.emit(this.auth))},e.prototype.loginOut=function(){this.quitarEmpresaAdministrativa().subscribe((function(e){localStorage.removeItem("usuario")}),(function(e){localStorage.removeItem("usuario")})),localStorage.setItem("lang","es"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.getUser=function(){if(this.usuario=new Se,this.isLogin()){var e=localStorage.getItem("usuario");return e&&(this.usuario=JSON.parse(e)),this.usuario}return this.usuario},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.selectEmpresa=function(e){this.seleccionEmpresa.emit(e)},e.prototype.quitarEmpresaAdministrativa=function(){var e,n="",i="";(e=JSON.parse(localStorage.getItem("usuario")))&&(n=e.token_type,i=e.access_token);var o={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:n+" "+i})},r=JSON.parse(localStorage.getItem("config"));return r&&r.url&&(this.url_host=r.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",{id:0},o)},e.prototype.setEmpresa=function(e){var n,i="",o="";(n=JSON.parse(localStorage.getItem("usuario")))&&(i=n.token_type,o=n.access_token);var r={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:i+" "+o})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",e,r)},e.prototype.setModulo=function(e){var n,i="",o="";(n=JSON.parse(localStorage.getItem("usuario")))&&(i=n.token_type,o=n.access_token);var r={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:i+" "+o})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setModulo",e,r)},e.prototype.quitarModulo=function(){var e,n="",i="";(e=JSON.parse(localStorage.getItem("usuario")))&&(n=e.token_type,i=e.access_token);var o={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:n+" "+i})},r=JSON.parse(localStorage.getItem("config"));return r&&r.url&&(this.url_host=r.url),this.httpClient.post(this.url_host+"/usuario/setModulo",{id:0},o)},e.prototype.getDetalsUser=function(){var e,n="",i="";(e=JSON.parse(localStorage.getItem("usuario")))&&(n=e.token_type,i=e.access_token);var o={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:n+" "+i})},r=JSON.parse(localStorage.getItem("config"));return r&&r.url&&(this.url_host=r.url),this.httpClient.get(this.url_host+"/usuario/obtieneUsuarioActual",o)},e}();function Ce(e,t){1&e&&(n.ɵɵelementStart(0,"label",19),n.ɵɵtext(1),n.ɵɵpipe(2,"translate"),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,"Usuario.errorLogin")))}function Ie(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"div",7),n.ɵɵelementStart(1,"div",8),n.ɵɵelementStart(2,"form",9,10),n.ɵɵlistener("ngSubmit",(function(){n.ɵɵrestoreView(i);var e=n.ɵɵreference(3);return n.ɵɵnextContext().entrar(e)})),n.ɵɵtemplate(4,Ce,3,3,"label",11),n.ɵɵelementStart(5,"div",12),n.ɵɵelementStart(6,"label",13),n.ɵɵtext(7),n.ɵɵpipe(8,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"input",14,15),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().user.username=e})),n.ɵɵpipe(11,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(12,"div",12),n.ɵɵelementStart(13,"label",16),n.ɵɵtext(14),n.ɵɵpipe(15,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(16,"input",17),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().user.password=e})),n.ɵɵpipe(17,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(18,"button",18),n.ɵɵtext(19,"entrar"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()}if(2&e){var o=n.ɵɵnextContext();n.ɵɵadvance(4),n.ɵɵproperty("ngIf",o.error),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(8,7,"Usuario.username")),n.ɵɵadvance(2),n.ɵɵpropertyInterpolate("placeholder",n.ɵɵpipeBind1(11,9,"Usuario.username")),n.ɵɵproperty("ngModel",o.user.username),n.ɵɵadvance(5),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(15,11,"Usuario.password")),n.ɵɵadvance(2),n.ɵɵpropertyInterpolate("placeholder",n.ɵɵpipeBind1(17,13,"Usuario.password")),n.ɵɵproperty("ngModel",o.user.password)}}function Ee(e,t){if(1&e&&(n.ɵɵelementStart(0,"div",22),n.ɵɵelementStart(1,"div",23),n.ɵɵelementStart(2,"div",24),n.ɵɵelementStart(3,"h5"),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(4),n.ɵɵtextInterpolate1(" ",i.nombre," ")}}function Me(e,t){if(1&e&&(n.ɵɵelementStart(0,"div",7),n.ɵɵelementStart(1,"div",20),n.ɵɵelementStart(2,"h4"),n.ɵɵtext(3,"Selecciona la empresa"),n.ɵɵelementEnd(),n.ɵɵelement(4,"hr"),n.ɵɵelementEnd(),n.ɵɵtemplate(5,Ee,5,1,"div",21),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext();n.ɵɵadvance(5),n.ɵɵproperty("ngForOf",i.empresas)}}we.ɵfac=function(e){return new(e||we)(n.ɵɵinject(t.HttpClient))},we.ɵprov=n.ɵɵdefineInjectable({token:we,factory:we.ɵfac,providedIn:"root"});var Ae=function(){function e(e,t){var n=this;this.loginModalService=e,this.authService=t,this.modal=!1,this.user={username:void 0,password:void 0},this.error=!1,this.empresas=[],this.loginModalService.modal.subscribe((function(e){$("#modalLogin").modal("show"),n.user={username:void 0,password:void 0},n.empresas=[]}))}return e.prototype.entrar=function(e){var t=this;if(e.valid){this.user.key="";var n=this.user.password.split("_");if(n.length>1){this.user.key=n[0],this.user.password="";for(var i=1;i<n.length;i++)this.user.password+=n[i]}this.authService.setlogin(this.user,this.user.key).subscribe((function(e){localStorage.setItem("usuario",JSON.stringify(e));var n=e;t.authService.getDetalsUser().subscribe((function(e){e.empresa||(t.empresas=e.empresas,1==t.empresas.length&&t.entrarEmpresa(t.empresas[0]));var i={login:!0};i.usuario=n,i.usuarioDetalles=e,t.authService.startAuth(i),t.error=!1,$("#modalLogin").modal("hide")}))}),(function(e){t.error=!0}))}},e.prototype.entrarEmpresa=function(e){this.authService.setEmpresa(e).subscribe((function(e){$("#modalLogin").modal("hide")}))},e}();Ae.ɵfac=function(e){return new(e||Ae)(n.ɵɵdirectiveInject(se),n.ɵɵdirectiveInject(we))},Ae.ɵcmp=n.ɵɵdefineComponent({type:Ae,selectors:[["app-login-modal"]],decls:8,vars:2,consts:[["id","modalLogin","tabindex","-1","role","dialog","aria-labelledby","exampleModalCenterTitle","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],["src","assets/img/logo_visorus_loading.png","alt",""],["class","row",4,"ngIf"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12"],[3,"ngSubmit"],["datoForm","ngForm"],["class","error",4,"ngIf"],[1,"form-group","mb-3"],["for","exampleInputEmail1"],["type","text","id","exampleInputEmail1","aria-describedby","emailHelp","name","username","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["username","ngModel"],["for","exampleInputPassword1"],["type","password","id","exampleInputPassword1","name","password","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["type","submit","translate","",1,"btn","btn-primary_low","btn-lg","btn-block","my-5","text-light"],[1,"error"],[1,"col-xl-12","col-lg-12","col-sm-12"],["class","col-xl-6 col-lg-6 col-sm-12 mb-2","style","cursor: pointer",4,"ngFor","ngForOf"],[1,"col-xl-6","col-lg-6","col-sm-12","mb-2",2,"cursor","pointer"],[1,"card"],[1,"card-body"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"div",2),n.ɵɵelementStart(3,"div",3),n.ɵɵelementStart(4,"div",4),n.ɵɵelement(5,"img",5),n.ɵɵelementEnd(),n.ɵɵtemplate(6,Ie,20,15,"div",6),n.ɵɵtemplate(7,Me,6,1,"div",6),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(6),n.ɵɵproperty("ngIf",0==t.empresas.length),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.empresas.length))},directives:[s.NgIf,i.ɵangular_packages_forms_forms_y,i.NgControlStatusGroup,i.NgForm,i.DefaultValueAccessor,i.RequiredValidator,i.NgControlStatus,i.NgModel,f.TranslateDirective,s.NgForOf],pipes:[f.TranslatePipe],styles:[".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-invalid[_ngcontent-%COMP%]:not(form), .ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"]});var je=function(){function e(e){this.api=e,this.endpoint="sessionCaja"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();function ke(e,t){if(1&e&&(n.ɵɵelementStart(0,"a",4),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext();n.ɵɵadvance(1),n.ɵɵtextInterpolate1("",i.labels.title,": ")}}function Pe(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"div",5),n.ɵɵelementStart(1,"div",6),n.ɵɵelementStart(2,"label",7),n.ɵɵtext(3,"Nombre de caja: "),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"input",8),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().caja.nombre=e})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"div",9),n.ɵɵelementStart(6,"label",10),n.ɵɵtext(7,"Saldo: "),n.ɵɵelementEnd(),n.ɵɵelementStart(8,"input",11),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().session.monto=e})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"div",9),n.ɵɵelementStart(10,"label",12),n.ɵɵtext(11,"Numero Z:"),n.ɵɵelementEnd(),n.ɵɵelementStart(12,"input",13),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().session.z=e})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()}if(2&e){var o=n.ɵɵnextContext();n.ɵɵadvance(4),n.ɵɵproperty("ngModel",o.caja.nombre)("disabled",!0),n.ɵɵadvance(4),n.ɵɵproperty("ngModel",o.session.monto)("disabled",o.editMode),n.ɵɵadvance(4),n.ɵɵproperty("ngModel",o.session.z)("disabled",!0)}}function _e(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"button",17),n.ɵɵlistener("click",(function(){return n.ɵɵrestoreView(i),n.ɵɵnextContext(2).save()})),n.ɵɵelementEnd()}}function Oe(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"button",18),n.ɵɵlistener("click",(function(){return n.ɵɵrestoreView(i),n.ɵɵnextContext(2).edit()})),n.ɵɵelementEnd()}}function Te(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵtemplate(0,_e,1,0,"button",14),n.ɵɵtemplate(1,Oe,1,0,"button",15),n.ɵɵelementStart(2,"button",16),n.ɵɵlistener("click",(function(){return n.ɵɵrestoreView(i),n.ɵɵnextContext().closeModal()})),n.ɵɵelementEnd()}if(2&e){var o=n.ɵɵnextContext();n.ɵɵproperty("ngIf",!o.editMode&&o.caja),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",o.editMode&&o.caja)}}je.ɵfac=function(e){return new(e||je)(n.ɵɵinject(J))},je.ɵprov=n.ɵɵdefineInjectable({token:je,factory:je.ɵfac,providedIn:"root"});var De=function(){return{width:"750px"}},Be=function(){function e(e){this.sessionCajaService=e,this.showCreateSession=!1,this.caja={},this.sessionEdit=null,this.status=new n.EventEmitter,this.success=new n.EventEmitter,this.session={inicio:(new Date).getTime(),termino:null,monedaDenominacionList:[]},this.flagModal=!0,this.labels={title:"Crear nueva session de caja"},this.resp={},this.editMode=!1}return e.prototype.ngOnInit=function(){console.log("denominacionList",this.monedaDenominacionList)},e.prototype.setSession=function(){this.sessionEdit?(this.session=this.sessionEdit,this.session.monedaDenominacionList=this.monedaDenominacionList,this.session.movimientosCaja&&(this.session.monto=this.session.movimientosCaja[0].monto),this.labels={title:"Cerrar session"},this.editMode=!0):this.caja&&(this.labels.title="Crear nueva session de caja",this.session.caja=this.caja,this.session.z=this.caja.z)},e.prototype.closeModal=function(){this.session={},this.editMode=!1,this.status.emit({status:!1})},e.prototype.save=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return e=this,[4,this.sessionCajaService.save(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp?(this.session={},this.editMode=!1,this.status.emit({status:!1,save:this.resp.data}),this.success.emit(!0)):this.success.emit(!1),[2]}}))}))},e.prototype.edit=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return console.log("EDIT",this.session),e=this,[4,this.sessionCajaService.update(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp&&(this.session={},this.editMode=!1,this.status.emit({status:!1,update:this.resp.data})),[2]}}))}))},e}();Be.ɵfac=function(e){return new(e||Be)(n.ɵɵdirectiveInject(je))},Be.ɵcmp=n.ɵɵdefineComponent({type:Be,selectors:[["session-create"]],inputs:{showCreateSession:"showCreateSession",caja:"caja",monedaDenominacionList:"monedaDenominacionList",sessionEdit:"sessionEdit"},outputs:{status:"status",success:"success"},decls:6,vars:9,consts:[[3,"visible","modal","closeOnEscape","closable","blockScroll","visibleChange","onHide","onShow"],["pTemplate","header"],["class","grid grid-fluid",4,"ngIf"],["pTemplate","footer"],[1,"text-primary"],[1,"grid","grid-fluid"],[1,"p-field","col-12"],["for","nombreCaja"],["pInputText","","type","text","id","nombreCaja",3,"ngModel","disabled","ngModelChange"],[1,"p-field","col-12","md:col-6"],["for","saldoCaja"],["pInputText","","type","number","id","saldoCaja",3,"ngModel","disabled","ngModelChange"],["for","numeroZ"],["pInputText","","type","number","id","numeroZ",3,"ngModel","disabled","ngModelChange"],["pButton","","type","button","label","Guardar","class","p-button-sm",3,"click",4,"ngIf"],["pButton","","type","button","label","Cerrar session","class","p-button-sm p-button-success",3,"click",4,"ngIf"],["pButton","","type","button","label","Cancelar",1,"p-button-sm","p-button-danger",3,"click"],["pButton","","type","button","label","Guardar",1,"p-button-sm",3,"click"],["pButton","","type","button","label","Cerrar session",1,"p-button-sm","p-button-success",3,"click"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.showCreateSession=e}))("onHide",(function(){return t.closeModal()}))("onShow",(function(){return t.setSession()})),n.ɵɵtemplate(1,ke,2,1,"ng-template",1),n.ɵɵtemplate(2,Pe,13,6,"div",2),n.ɵɵelementStart(3,"div"),n.ɵɵtext(4," Este agente no esta asignado a una caja "),n.ɵɵelementEnd(),n.ɵɵtemplate(5,Te,3,2,"ng-template",3),n.ɵɵelementEnd()),2&e&&(n.ɵɵstyleMap(n.ɵɵpureFunction0(8,De)),n.ɵɵproperty("visible",t.showCreateSession)("modal",t.flagModal)("closeOnEscape",t.flagModal)("closable",t.flagModal)("blockScroll",!0),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",t.caja))},directives:[c.Dialog,a.PrimeTemplate,s.NgIf,i.DefaultValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,i.NumberValueAccessor,l.ButtonDirective],styles:[""]});var Fe=function(){function e(e){this.api=e,this.endpoint="cliente"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e.prototype.validar_archivos_bss=function(e){return this.api.get(this.endpoint+"/validarClienteBss/"+e)},e}();Fe.ɵfac=function(e){return new(e||Fe)(n.ɵɵinject(J))},Fe.ɵprov=n.ɵɵdefineInjectable({token:Fe,factory:Fe.ɵfac,providedIn:"root"});var qe=function(){function e(e){this.translate=e}return e.prototype.getPage=function(){return{rows:25,total:void 0,offset:0,filtro:void 0,sort:void 0}},e.prototype.getParams=function(e){return[{param:"offset",value:e.offset},{param:"max",value:e.rows},{param:"filter",value:e.filtro},{param:"sort",value:e.sort}]},e.prototype.getOrden=function(e,t){t&&this.translate.setDefaultLang(t);for(var n,i=[],o=[],r=0;r<e.length;r++)i.push({label:"...",value:e[r].label}),o.push(e[r].param);return o.length>0&&this.translate.get(o).subscribe((function(e){n=e;var t=Object.values(n),o=0;i.forEach((function(e){e.label=""+t[o],o++}))}),(function(e){})),i},e}();function ze(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"th"),n.ɵɵtext(2),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"th"),n.ɵɵtext(5),n.ɵɵpipe(6,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"th"),n.ɵɵtext(8),n.ɵɵpipe(9,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(10,"th"),n.ɵɵtext(11),n.ɵɵpipe(12,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(13,"th"),n.ɵɵtext(14),n.ɵɵpipe(15,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(16,"th"),n.ɵɵtext(17),n.ɵɵpipe(18,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(2),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(3,6,"clave")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(6,8,"razonSocial")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(9,10,"tipo")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(12,12,"Cliente.limiteCredito")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(15,14,"Cliente.plazoCredito")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(18,16,"Cliente.diasPago")))}function Re(e,t){1&e&&(n.ɵɵelementStart(0,"span"),n.ɵɵtext(1),n.ɵɵpipe(2,"translate"),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,"fisico")))}function Le(e,t){1&e&&(n.ɵɵelementStart(0,"span"),n.ɵɵtext(1),n.ɵɵpipe(2,"translate"),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,"moral")))}function Ue(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr",8),n.ɵɵelementStart(1,"td"),n.ɵɵtext(2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"td"),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"td"),n.ɵɵtemplate(6,Re,3,3,"span",9),n.ɵɵtemplate(7,Le,3,3,"span",9),n.ɵɵelementEnd(),n.ɵɵelementStart(8,"td"),n.ɵɵtext(9),n.ɵɵelementEnd(),n.ɵɵelementStart(10,"td"),n.ɵɵtext(11),n.ɵɵelementEnd(),n.ɵɵelementStart(12,"td"),n.ɵɵtext(13),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵproperty("pSelectableRow",i),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.codigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.descripcionRazonSocial),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",i.personaFisica),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",i.personaMoral),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.limiteCredito),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.plazoCredito),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.diasPago)}}function He(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"td",10),n.ɵɵtext(2),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(2),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(3,1,"general.noRegistros")))}qe.ɵfac=function(e){return new(e||qe)(n.ɵɵinject(f.TranslateService))},qe.ɵprov=n.ɵɵdefineInjectable({token:qe,factory:qe.ɵfac,providedIn:"root"});var Ne=function(){function e(e,t){this.clienteService=e,this.paginate=t,this.selectMode="single",this.select=new n.EventEmitter,this.ordenar=[],this.loading=!0}return e.prototype.ngOnInit=function(){this.page=this.paginate.getPage(),this.page.rows=20,this.clientes=[],this.ordenar=this.paginate.getOrden([{param:"razonZocial",label:"razonZocial"}],"es")},e.prototype.cargarDatosClientes=function(e){var t=this;void 0===e&&(e=null),this.loading=!0,e&&(this.page.rows=e.rows,this.page.offset=e.first),this.clientes=[],this.params=this.paginate.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.page.filtro&&""!==this.page.filtro.trim()&&this.params.push({param:"filtroGeneral",value:this.page.filtro.trim()}),this.clienteService.getAll(this.params).subscribe((function(e){t.page.total=e.total,t.clientes=e.data,t.loading=!1}),(function(e){console.error("Error al cargar clientes:",e),t.loading=!1}))},e.prototype.aplicarFiltro=function(){this.page.offset=0,this.cargarDatosClientes()},e.prototype.seleccionaCliente=function(e){console.log("Fila seleccionada (evento):",e),console.log("Datos de la fila (e.data):",e.data),console.log("Cliente seleccionado ANTES de emitir:",this.clienteSeleccionado),this.select.emit(e.data),this.visible=!1,console.log("Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):",this.clienteSeleccionado)},e.prototype.cerrar=function(){this.select.emit(null),this.visible=!1},e}();Ne.ɵfac=function(e){return new(e||Ne)(n.ɵɵdirectiveInject(Fe),n.ɵɵdirectiveInject(qe))},Ne.ɵcmp=n.ɵɵdefineComponent({type:Ne,selectors:[["select-cliente"]],inputs:{clienteSeleccionado:"clienteSeleccionado",selectMode:"selectMode",visible:"visible"},outputs:{select:"select"},decls:10,vars:17,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","scrollHeight","350px",3,"value","lazy","paginator","rows","totalRecords","selection","selectionMode","scrollable","loading","onLazyLoad","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSelectableRow"],[4,"ngIf"],["colspan","6"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.visible=e}))("onHide",(function(){return t.cerrar()}))("onShow",(function(){return t.cargarDatosClientes()})),n.ɵɵpipe(1,"translate"),n.ɵɵelementStart(2,"div",1),n.ɵɵelementStart(3,"input",2),n.ɵɵlistener("ngModelChange",(function(e){return t.page.filtro=e}))("keyup",(function(){return t.aplicarFiltro()})),n.ɵɵpipe(4,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"button",3),n.ɵɵlistener("click",(function(){return t.aplicarFiltro()})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"p-table",4),n.ɵɵlistener("onLazyLoad",(function(e){return t.cargarDatosClientes(e)}))("selectionChange",(function(e){return t.clienteSeleccionado=e}))("onRowSelect",(function(e){return t.seleccionaCliente(e)})),n.ɵɵtemplate(7,ze,19,18,"ng-template",5),n.ɵɵtemplate(8,Ue,14,8,"ng-template",6),n.ɵɵtemplate(9,He,4,3,"ng-template",7),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵpropertyInterpolate("header",n.ɵɵpipeBind1(1,13,"Seleccionar cliente ")),n.ɵɵproperty("visible",t.visible),n.ɵɵadvance(3),n.ɵɵpropertyInterpolate1("placeholder","",n.ɵɵpipeBind1(4,15,"buscar"),"..."),n.ɵɵproperty("ngModel",t.page.filtro),n.ɵɵadvance(3),n.ɵɵpropertyInterpolate("selectionMode",t.selectMode),n.ɵɵproperty("value",t.clientes)("lazy",!0)("paginator",!0)("rows",t.page.rows)("totalRecords",t.page.total)("selection",t.clienteSeleccionado)("scrollable",!0)("loading",t.loading))},directives:[c.Dialog,i.DefaultValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,l.ButtonDirective,g.Table,a.PrimeTemplate,g.SelectableRow,s.NgIf],pipes:[f.TranslatePipe],encapsulation:2});var Ve=function(){},$e=function(){this.datoPersona=new Ve,this.contactos=[],this.datoDirecciones=[]},Je=function(){this.representanteLegal=new $e,this.contactos=[],this.datoDirecciones=[]},Ze=function(){},Ge=function(){this.personaMoral=new Je,this.catalogoTipo=new Ze,this.clasificadorTipo=new Ze,this.personaFisica=new $e},We=function(){function e(e){this.api=e,this.endpoint="proveedor"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();function Ye(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"th"),n.ɵɵtext(2),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"th"),n.ɵɵtext(5),n.ɵɵpipe(6,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"th"),n.ɵɵtext(8),n.ɵɵpipe(9,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(2),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(3,3,"clave")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(6,5,"razonSocial")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(9,7,"rfc")))}function Ke(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"td"),n.ɵɵtext(2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"td"),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"td"),n.ɵɵtext(6),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.rowData;n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.codigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.descripcionRazonSocial),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.descripcionRfc)}}We.ɵfac=function(e){return new(e||We)(n.ɵɵinject(J))},We.ɵprov=n.ɵɵdefineInjectable({token:We,factory:We.ɵfac,providedIn:"root"});var Qe=function(){return[10,25,50,100,500]},Xe=function(){function e(e,t,i){this.proveedorService=e,this.paginanateService=t,this.translate=i,this.params=[],this.ordenar=[],this.visible=!1,this.proveedorSeleccionado=new Ge,this.select=new n.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.proveedores=[]},e.prototype.cargarDatosProveedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.proveedorService.getAll(this.params).subscribe((function(t){e.proveedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosProveedores()},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarProveedor=function(e){this.select.emit(e.data),this.visible=!1},e}();Xe.ɵfac=function(e){return new(e||Xe)(n.ɵɵdirectiveInject(We),n.ɵɵdirectiveInject(qe),n.ɵɵdirectiveInject(f.TranslateService))},Xe.ɵcmp=n.ɵɵdefineComponent({type:Xe,selectors:[["select-proveedor"]],inputs:{visible:"visible",proveedorSeleccionado:"proveedorSeleccionado"},outputs:{select:"select"},decls:10,vars:16,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","change"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","valueChange","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.visible=e}))("onHide",(function(){return t.cerrarModal()}))("onShow",(function(){return t.cargarDatosProveedores()})),n.ɵɵpipe(1,"translate"),n.ɵɵelementStart(2,"div",1),n.ɵɵelementStart(3,"input",2),n.ɵɵlistener("ngModelChange",(function(e){return t.page.filtro=e}))("change",(function(){return t.cargarDatosProveedores()})),n.ɵɵpipe(4,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"button",3),n.ɵɵlistener("click",(function(){return t.cargarDatosProveedores()})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"p-table",4),n.ɵɵlistener("valueChange",(function(e){return t.proveedores=e}))("selectionChange",(function(e){return t.proveedorSeleccionado=e}))("onRowSelect",(function(e){return t.seleccionarProveedor(e)})),n.ɵɵtemplate(7,Ye,10,9,"ng-template",5),n.ɵɵtemplate(8,Ke,7,3,"ng-template",6),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"p-paginator",7),n.ɵɵlistener("onPageChange",(function(e){return t.pagina(e)})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵpropertyInterpolate("header",n.ɵɵpipeBind1(1,11,"ArticuloProveedor.proveedores")),n.ɵɵproperty("visible",t.visible),n.ɵɵadvance(3),n.ɵɵpropertyInterpolate1("placeholder","",n.ɵɵpipeBind1(4,13,"buscar"),"..."),n.ɵɵproperty("ngModel",t.page.filtro),n.ɵɵadvance(3),n.ɵɵproperty("value",t.proveedores)("selection",t.proveedorSeleccionado)("scrollable",!0),n.ɵɵadvance(3),n.ɵɵproperty("rows",t.page.rows)("totalRecords",t.page.total)("pageLinkSize",5)("rowsPerPageOptions",n.ɵɵpureFunction0(15,Qe)))},directives:[c.Dialog,i.DefaultValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,l.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator],pipes:[f.TranslatePipe],encapsulation:2});var et=function(){function e(e){this.api=e,this.endpoint="stock"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.obtenerExistenciasArticulosDescripcion=function(e,t){var n=this,i=this.endpoint+"/obtenerExistenciasArticulos";return new Promise((function(t,o){n.api.post(i,e).subscribe((function(e){t(e)}),(function(e){o(e)}))}))},e}();et.ɵfac=function(e){return new(e||et)(n.ɵɵinject(J))},et.ɵprov=n.ɵɵdefineInjectable({token:et,factory:et.ɵfac,providedIn:"root"});var tt=function(){function e(e){this.api=e,this.endpoint="almacen"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.obtenerAlmacenEmpresa=function(){return this.api.get(this.endpoint+"/obtenerAlmacenEmpresa")},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();tt.ɵfac=function(e){return new(e||tt)(n.ɵɵinject(J))},tt.ɵprov=n.ɵɵdefineInjectable({token:tt,factory:tt.ɵfac,providedIn:"root"});var nt=function(){function e(e){this.api=e,this.endpoint="articulo"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.obtenerExistencias=function(e){var t="/existenciasArticulo/"+e;return this.api.get(""+this.endpoint+t)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();function it(e,t){if(1&e&&n.ɵɵelement(0,"col"),2&e){var i=t.$implicit;n.ɵɵstyleProp("width",i.width)}}function ot(e,t){if(1&e&&(n.ɵɵelementStart(0,"colgroup"),n.ɵɵtemplate(1,it,1,2,"col",7),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(1),n.ɵɵproperty("ngForOf",i)}}function rt(e,t){if(1&e&&(n.ɵɵelementStart(0,"th",9),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate1(" ",i.header," ")}}function at(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵtemplate(1,rt,2,1,"th",8),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(1),n.ɵɵproperty("ngForOf",i)}}function st(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"td"),n.ɵɵtext(2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"td"),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"td"),n.ɵɵtext(6),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"td"),n.ɵɵtext(8),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"td"),n.ɵɵtext(10),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.almacenCodigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.almacenDescripcion),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.ubicacionCodigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.ubicacionDescripcion),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.existencia)}}nt.ɵfac=function(e){return new(e||nt)(n.ɵɵinject(J))},nt.ɵprov=n.ɵɵdefineInjectable({token:nt,factory:nt.ɵfac,providedIn:"root"});var lt=function(e){return{width:e,"min-width":"200px"}},ct=function(){return{width:"600px"}},pt=function(){function e(e){this.articuloInformacionService=e,this.eventSelection=new n.EventEmitter,this.flagModal=!0,this.size=640,this.params=[{param:"offset",value:0},{param:"max",value:-1},{param:"order",value:"asc"}],this.columnsData=[{field:"codigo",header:"Código Almacén",width:"90px"},{field:"descripcion",header:"Descripción Almacen",width:"140px"},{field:"codigo",header:"Código Ubicación",width:"90px"},{field:"descripcion",header:"Descripción Ubicación",width:"140px"},{field:"opciones",header:"Existencia",width:"80px"}]}return e.prototype.ngOnInit=function(){this.OnLoad()},e.prototype.hiddenDialog=function(){this.eventSelection.emit({status:!1})},e.prototype.OnResize=function(e){this.isMovil=e.target.innerWidth<=640},e.prototype.OnLoad=function(){var e=this;this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe((function(t){e.existenciasList=t.data}))},e.prototype.OnShow=function(){this.titulo="Existencias en Almacenes"},e.prototype.onSelectedUbicacion=function(e){this.eventSelection.emit({status:!1,ubicacion:e})},e}();function ut(e,t){if(1&e&&(n.ɵɵelementStart(0,"option",22),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵpropertyInterpolate("value",i.id),n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.descripcion)}}function dt(e,t){1&e&&(n.ɵɵelementStart(0,"th",31),n.ɵɵtext(1,"existenciaSecundaria"),n.ɵɵelementEnd())}function ft(e,t){1&e&&(n.ɵɵelementStart(0,"th",25),n.ɵɵtext(1,"Unidad"),n.ɵɵelementEnd())}function ht(e,t){1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1,"Precio"),n.ɵɵelementEnd())}function mt(e,t){1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1,"Precio 2"),n.ɵɵelementEnd())}function gt(e,t){1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1,"Precio 3"),n.ɵɵelementEnd())}function vt(e,t){1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1,"Precio 4"),n.ɵɵelementEnd())}function bt(e,t){1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1,"Precio 5"),n.ɵɵelementEnd())}function yt(e,t){1&e&&(n.ɵɵelementStart(0,"th",25),n.ɵɵtext(1,"Movimiento.costo"),n.ɵɵelementEnd())}function St(e,t){if(1&e&&(n.ɵɵelementStart(0,"th",23),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.descripcion)}}function xt(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"th",23),n.ɵɵtext(2,"Código Ubicacion"),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"th",24),n.ɵɵtext(4,"Existencia"),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"th",25),n.ɵɵtext(6,"Unidad"),n.ɵɵelementEnd(),n.ɵɵtemplate(7,dt,2,0,"th",26),n.ɵɵtemplate(8,ft,2,0,"th",27),n.ɵɵelementStart(9,"th",23),n.ɵɵtext(10,"Código"),n.ɵɵelementEnd(),n.ɵɵelementStart(11,"th",28),n.ɵɵtext(12,"Descripcion"),n.ɵɵelementEnd(),n.ɵɵelement(13,"th",25),n.ɵɵtemplate(14,ht,2,0,"th",29),n.ɵɵtemplate(15,mt,2,0,"th",29),n.ɵɵtemplate(16,gt,2,0,"th",29),n.ɵɵtemplate(17,vt,2,0,"th",29),n.ɵɵtemplate(18,bt,2,0,"th",29),n.ɵɵtemplate(19,yt,2,0,"th",27),n.ɵɵelementStart(20,"th",25),n.ɵɵtext(21,"Existencia por Unidad"),n.ɵɵelementEnd(),n.ɵɵtemplate(22,St,2,1,"th",30),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext();n.ɵɵadvance(7),n.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),n.ɵɵadvance(6),n.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"===i.configuracion.tipoPrecio),n.ɵɵadvance(3),n.ɵɵproperty("ngForOf",i.clasificadorList)}}function wt(e,t){1&e&&(n.ɵɵelementStart(0,"td",23),n.ɵɵtext(1,"Movimiento.NoAsignado"),n.ɵɵelementEnd())}function Ct(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.ubicacionCodigo)}}function It(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",44),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.existenciaSecundaria)}}function Et(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",36),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.unidadSecundariaCodigo)}}function Mt(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate1("",n.ɵɵpipeBind1(2,1,i.precioConImpuestos)," ")}}function At(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,i.precio2ConImpuestos))}}function jt(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,i.precio3ConImpuestos))}}function kt(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,i.precio4ConImpuestos))}}function Pt(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,i.precio5ConImpuestos))}}function _t(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",36),n.ɵɵtext(1),n.ɵɵpipe(2,"currency"),n.ɵɵelementEnd()),2&e){var i=n.ɵɵnextContext().$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,i.precio))}}function Ot(e,t){if(1&e&&(n.ɵɵelementStart(0,"div",45),n.ɵɵelementStart(1,"div",46),n.ɵɵelementStart(2,"label",47),n.ɵɵtext(3),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"div",46),n.ɵɵelementStart(5,"label",47),n.ɵɵtext(6),n.ɵɵpipe(7,"number"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(3),n.ɵɵtextInterpolate(i.unidad_codigo),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind2(7,2,i.unidad_existencia,"1.2-2"))}}function Tt(e,t){if(1&e&&(n.ɵɵelementStart(0,"td",39),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵadvance(1),n.ɵɵtextInterpolate(i.valor)}}function Dt(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"tr",32),n.ɵɵtemplate(1,wt,2,0,"td",33),n.ɵɵtemplate(2,Ct,2,1,"td",34),n.ɵɵelementStart(3,"td",35),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"td",36),n.ɵɵtext(6),n.ɵɵelementEnd(),n.ɵɵtemplate(7,It,2,1,"td",37),n.ɵɵtemplate(8,Et,2,1,"td",38),n.ɵɵelementStart(9,"td",39),n.ɵɵtext(10),n.ɵɵelementEnd(),n.ɵɵelementStart(11,"td",40),n.ɵɵtext(12),n.ɵɵelementEnd(),n.ɵɵelementStart(13,"td",36),n.ɵɵelementStart(14,"button",41),n.ɵɵlistener("click",(function(){n.ɵɵrestoreView(i);var e=t.$implicit;return n.ɵɵnextContext().onShowInformacion(e)})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵtemplate(15,Mt,3,3,"td",34),n.ɵɵtemplate(16,At,3,3,"td",34),n.ɵɵtemplate(17,jt,3,3,"td",34),n.ɵɵtemplate(18,kt,3,3,"td",34),n.ɵɵtemplate(19,Pt,3,3,"td",34),n.ɵɵtemplate(20,_t,3,3,"td",38),n.ɵɵelementStart(21,"td",36),n.ɵɵtemplate(22,Ot,8,5,"div",42),n.ɵɵelementEnd(),n.ɵɵtemplate(23,Tt,2,1,"td",43),n.ɵɵelementEnd()}if(2&e){var o=t.$implicit,r=n.ɵɵnextContext();n.ɵɵproperty("pSelectableRow",o),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",!o.ubicacionCodigo),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",o.ubicacionCodigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(o.existencia),n.ɵɵadvance(2),n.ɵɵtextInterpolate(o.unidadCodigo),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",r.manejaUnidadSecundaria),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",r.manejaUnidadSecundaria),n.ɵɵadvance(2),n.ɵɵtextInterpolate(o.articulo.codigo),n.ɵɵadvance(2),n.ɵɵtextInterpolate(o.articulo.descripcion),n.ɵɵadvance(3),n.ɵɵproperty("ngIf","costo"!==r.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==r.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==r.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==r.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"!==r.configuracion.tipoPrecio),n.ɵɵadvance(1),n.ɵɵproperty("ngIf","costo"===r.configuracion.tipoPrecio),n.ɵɵadvance(2),n.ɵɵproperty("ngForOf",o.existenciaUnidades),n.ɵɵadvance(1),n.ɵɵproperty("ngForOf",o.articuloClasificadorList)}}function Bt(e,t){if(1&e){var i=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"lib-seleccion-articulo-informacion",48),n.ɵɵlistener("eventSelection",(function(e){return n.ɵɵrestoreView(i),n.ɵɵnextContext().onEventInformacion(e)})),n.ɵɵelementEnd()}if(2&e){var o=n.ɵɵnextContext();n.ɵɵproperty("showModal",o.showModalInformacion)("articulo",o.articuloSelected)}}pt.ɵfac=function(e){return new(e||pt)(n.ɵɵdirectiveInject(nt))},pt.ɵcmp=n.ɵɵdefineComponent({type:pt,selectors:[["lib-seleccion-articulo-informacion"]],inputs:{showModal:"showModal",articulo:"articulo"},outputs:{eventSelection:"eventSelection"},decls:8,vars:20,consts:[[3,"header","visible","modal","minY","baseZIndex","draggable","blockScroll","maximizable","breakpoint","onShow","visibleChange","onHide","resize"],["scrollHeight","350px",3,"columns","value","scrollable","responsive"],["pTemplate","colgroup"],["pTemplate","header"],["pTemplate","body"],[1,"container-end"],["pButton","","type","button","icon","pi pi-replay","label","Cerrar",1,"ui-button-raised","ui-button-secondary",3,"click"],[3,"width",4,"ngFor","ngForOf"],["pResizableColumn","",4,"ngFor","ngForOf"],["pResizableColumn",""]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("onShow",(function(){return t.OnShow()}))("visibleChange",(function(e){return t.showModal=e}))("onHide",(function(){return t.hiddenDialog()}))("resize",(function(e){return t.OnResize(e)}),!1,n.ɵɵresolveWindow),n.ɵɵelementStart(1,"p-table",1),n.ɵɵtemplate(2,ot,2,1,"ng-template",2),n.ɵɵtemplate(3,at,2,1,"ng-template",3),n.ɵɵtemplate(4,st,11,5,"ng-template",4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"p-footer"),n.ɵɵelementStart(6,"div",5),n.ɵɵelementStart(7,"button",6),n.ɵɵlistener("click",(function(){return t.hiddenDialog()})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵstyleMap(n.ɵɵpureFunction1(17,lt,t.size+"px")),n.ɵɵproperty("header",t.titulo)("visible",t.showModal)("modal",t.flagModal)("minY",70)("baseZIndex",1e4)("draggable",!1)("blockScroll",!0)("maximizable",!0)("breakpoint",640),n.ɵɵadvance(1),n.ɵɵstyleMap(n.ɵɵpureFunction0(19,ct)),n.ɵɵproperty("columns",t.columnsData)("value",t.existenciasList)("scrollable",!0)("responsive",!0))},directives:[c.Dialog,g.Table,a.PrimeTemplate,a.Footer,l.ButtonDirective,s.NgForOf,g.ResizableColumn],styles:[""]});var Ft=function(e){return{width:e,"min-width":"200px"}},qt=function(){return[10,25,50,100,500]},zt=function(){function e(e,t,i){this._stockService=e,this._paginateService=t,this._almacenService=i,this.manejaUnidadSecundaria=!1,this.emitFilaSeleccionada=new n.EventEmitter,this.emitShowArticulos=new n.EventEmitter,this.articulosList=[],this.ordenar=[],this.busquedaArticulos={tipoBusqueda:""},this.showModal=!1,this.showModalInformacion=!1,this.showFirstTime=!0,this.clasificadorList=[],this.size=640}return e.prototype.ngOnInit=function(){var e=this;this.page=this._paginateService.getPage(),this.ordenar=this._paginateService.getOrden([{param:"nombre",label:"estatus"}],"es"),this.showFirstTime=!0,this._almacenService.getAll(this.configuracion.params).subscribe((function(t){e.almacenList=t.data})),this.busquedaArticulos.tipoBusqueda="CD"},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosShow=function(){this.busquedaArticulos.tipoBusqueda="CD",this.showFirstTime&&(this.obtenerExistenciaArticulos(),this.showFirstTime=!1)},e.prototype.obtenerExistenciaArticulos=function(){var e=this;this.busquedaArticulos.params=this._paginateService.getParams(this.page);var t={almacen:this.configuracion.noOcupaAlamacen?null:this.movimiento.almacen,tipoPrecio:this.configuracion.tipoPrecio,busquedaArticulos:this.busquedaArticulos,tipoArticulo:this.configuracion.tipoArticulo?this.configuracion.tipoArticulo:null,numeroPrecioDefault:this.configuracion.numeroPrecioDefault};this._stockService.obtenerExistenciasArticulosDescripcion(t,this.busquedaArticulos.params).then((function(t){e.articulosList=t.articulosDescripcion,e.page.total=t.total,t.clasificadores&&(e.clasificadorList=t.clasificadores),e.showModal||(e.showModal=!0)})).catch((function(t){e.articulosList=[]}))},e.prototype.obtenerExistenciaArticulosVal=function(){if(""!=this.busquedaArticulos.tipoBusqueda&&!this.busquedaArticulos.key)return!1;this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosKey=function(e){"Enter"===e.key&&this.obtenerExistenciaArticulos()},e.prototype.filaSeleccionada=function(e){this.emitFilaSeleccionada.emit(e)},e.prototype.emitirShowArticulos=function(){this.emitShowArticulos.emit(0)},e.prototype.seriesArticulo=function(e){console.log(e)},e.prototype.onShowInformacion=function(e){this.articuloSelected=e,this.showModalInformacion=!0},e.prototype.onEventInformacion=function(e){this.showModalInformacion=e.status},e}();zt.ɵfac=function(e){return new(e||zt)(n.ɵɵdirectiveInject(et),n.ɵɵdirectiveInject(qe),n.ɵɵdirectiveInject(tt))},zt.ɵcmp=n.ɵɵdefineComponent({type:zt,selectors:[["app-selecciona-articulo"]],inputs:{configuracion:"configuracion",showArticulos:"showArticulos",movimiento:"movimiento",manejaUnidadSecundaria:"manejaUnidadSecundaria"},outputs:{emitFilaSeleccionada:"emitFilaSeleccionada",emitShowArticulos:"emitShowArticulos"},decls:30,vars:25,consts:[[3,"header","visible","maximizable","baseZIndex","blockScroll","minY","visibleChange","onShow","onHide"],[1,"grid","grid-fluid"],[1,"col-12","md:col-6","lg:col-6"],[2,"display","flex"],[2,"width","115px"],["pInputText","",3,"ngModel","ngModelChange","change"],["value","C"],["value","D"],["value","CD"],["value","CI"],["type","text","pInputText","","id","key",2,"width","200px",3,"ngModel","ngModelChange","keypress"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],[2,"width","100px"],["for","almacen"],["pInputText","","disabled","","id","almacen",2,"width","200px",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["scrollHeight","400px","selectionMode","single",3,"value","scrollable","responsive","onRowSelect"],["dt",""],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"showModal","articulo","eventSelection",4,"ngIf"],[3,"value"],["translate","",2,"width","80px"],["translate","",2,"width","70px"],["translate","",2,"width","40px"],["style","width: 50px","translate","",4,"ngIf"],["style","width: 40px","translate","",4,"ngIf"],["translate","",2,"width","120px"],["style","width: 80px","translate","",4,"ngIf"],["style","width: 80px","translate","",4,"ngFor","ngForOf"],["translate","",2,"width","50px"],[3,"pSelectableRow"],["style","width: 80px;","translate","",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","70px"],[2,"width","40px"],["style","width: 50px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","80px"],[2,"width","120px"],["pButton","","type","button","icon","pi pi-eye",1,"ui-button-raised","ui-button-primary",3,"click"],["class","row justify-content-between",4,"ngFor","ngForOf"],["style","width: 80px;",4,"ngFor","ngForOf"],[2,"width","50px"],[1,"row","justify-content-between"],[1,"col-lg-4"],["for",""],[3,"showModal","articulo","eventSelection"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.showArticulos=e}))("onShow",(function(){return t.obtenerExistenciaArticulosShow()}))("onHide",(function(){return t.busquedaArticulos={tipoBusqueda:""},t.emitirShowArticulos()})),n.ɵɵpipe(1,"translate"),n.ɵɵelementStart(2,"div",1),n.ɵɵelementStart(3,"div",2),n.ɵɵelementStart(4,"div",3),n.ɵɵelementStart(5,"div",4),n.ɵɵelementStart(6,"select",5),n.ɵɵlistener("ngModelChange",(function(e){return t.busquedaArticulos.tipoBusqueda=e}))("change",(function(){return t.obtenerExistenciaArticulosVal()})),n.ɵɵelementStart(7,"option",6),n.ɵɵtext(8,"Codigo"),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"option",7),n.ɵɵtext(10,"Descripcion"),n.ɵɵelementEnd(),n.ɵɵelementStart(11,"option",8),n.ɵɵtext(12,"Coincidencia"),n.ɵɵelementEnd(),n.ɵɵelementStart(13,"option",9),n.ɵɵtext(14,"Igual a"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(15,"input",10),n.ɵɵlistener("ngModelChange",(function(e){return t.busquedaArticulos.key=e}))("keypress",(function(e){return t.obtenerExistenciaArticulosKey(e)})),n.ɵɵelementEnd(),n.ɵɵelementStart(16,"button",11),n.ɵɵlistener("click",(function(){return t.obtenerExistenciaArticulos()})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(17,"div",2),n.ɵɵelementStart(18,"div",3),n.ɵɵelementStart(19,"div",12),n.ɵɵelementStart(20,"label",13),n.ɵɵtext(21,"Almacen:"),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(22,"select",14),n.ɵɵlistener("ngModelChange",(function(e){return t.movimiento.almacen=e}))("change",(function(){return t.obtenerExistenciaArticulosVal()})),n.ɵɵtemplate(23,ut,2,2,"option",15),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(24,"p-table",16,17),n.ɵɵlistener("onRowSelect",(function(e){return t.filaSeleccionada(e)})),n.ɵɵtemplate(26,xt,23,9,"ng-template",18),n.ɵɵtemplate(27,Dt,24,17,"ng-template",19),n.ɵɵelementEnd(),n.ɵɵelementStart(28,"p-paginator",20),n.ɵɵlistener("onPageChange",(function(e){return t.pagina(e)})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵtemplate(29,Bt,1,2,"lib-seleccion-articulo-informacion",21)),2&e&&(n.ɵɵstyleMap(n.ɵɵpureFunction1(22,Ft,t.size+"px")),n.ɵɵpropertyInterpolate("header",n.ɵɵpipeBind1(1,20,"Articulos")),n.ɵɵproperty("visible",t.showArticulos)("maximizable",!0)("baseZIndex",1e4)("blockScroll",!0)("minY",70),n.ɵɵadvance(6),n.ɵɵproperty("ngModel",t.busquedaArticulos.tipoBusqueda),n.ɵɵadvance(9),n.ɵɵproperty("ngModel",t.busquedaArticulos.key),n.ɵɵadvance(7),n.ɵɵproperty("ngModel",t.movimiento.almacen),n.ɵɵadvance(1),n.ɵɵproperty("ngForOf",t.almacenList),n.ɵɵadvance(1),n.ɵɵproperty("value",t.articulosList)("scrollable",!0)("responsive",!0),n.ɵɵadvance(4),n.ɵɵproperty("rows",t.page.rows)("totalRecords",t.page.total)("pageLinkSize",5)("rowsPerPageOptions",n.ɵɵpureFunction0(24,qt)),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.showModalInformacion))},directives:[c.Dialog,i.SelectControlValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,i.NgSelectOption,i.ɵangular_packages_forms_forms_x,i.DefaultValueAccessor,l.ButtonDirective,s.NgForOf,g.Table,a.PrimeTemplate,v.Paginator,s.NgIf,f.TranslateDirective,g.SelectableRow,pt],pipes:[f.TranslatePipe,s.CurrencyPipe,s.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]});var Rt=function(){function e(e){this.api=e,this.endpoint="acreedor"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();function Lt(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"th"),n.ɵɵtext(2),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"th"),n.ɵɵtext(5),n.ɵɵpipe(6,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"th"),n.ɵɵtext(8),n.ɵɵpipe(9,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(10,"th"),n.ɵɵtext(11),n.ɵɵpipe(12,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(13,"th"),n.ɵɵtext(14),n.ɵɵpipe(15,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(16,"th"),n.ɵɵtext(17),n.ɵɵpipe(18,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(2),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(3,6,"razonSocial")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(6,8,"rfc")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(9,10,"tipo")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(12,12,"atrasoDiasEntrega")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(15,14,"limiteCredito")),n.ɵɵadvance(3),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(18,16,"fechaUltimaCompra")))}function Ut(e,t){1&e&&(n.ɵɵelementStart(0,"span"),n.ɵɵtext(1),n.ɵɵpipe(2,"translate"),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,"moral")))}function Ht(e,t){1&e&&(n.ɵɵelementStart(0,"span"),n.ɵɵtext(1),n.ɵɵpipe(2,"translate"),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(2,1,"fisico")))}function Nt(e,t){if(1&e&&(n.ɵɵelementStart(0,"tr",9),n.ɵɵelementStart(1,"td"),n.ɵɵtext(2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"td"),n.ɵɵtext(4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"td"),n.ɵɵtemplate(6,Ut,3,3,"span",10),n.ɵɵtemplate(7,Ht,3,3,"span",10),n.ɵɵelementEnd(),n.ɵɵelementStart(8,"td"),n.ɵɵtext(9),n.ɵɵelementEnd(),n.ɵɵelementStart(10,"td"),n.ɵɵtext(11),n.ɵɵelementEnd(),n.ɵɵelementStart(12,"td"),n.ɵɵtext(13),n.ɵɵpipe(14,"date"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e){var i=t.$implicit;n.ɵɵproperty("pSelectableRow",i),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.descripcionRazonSocial),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.descripcionRfc),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",i.personaMoral),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",i.personaFisica),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.atrasoDiasEntrega),n.ɵɵadvance(2),n.ɵɵtextInterpolate(i.limiteCredito),n.ɵɵadvance(2),n.ɵɵtextInterpolate(n.ɵɵpipeBind2(14,8,i.fechaUltimaCompra,"dd/MM/yyyy"))}}function Vt(e,t){1&e&&(n.ɵɵelementStart(0,"tr"),n.ɵɵelementStart(1,"td"),n.ɵɵtext(2),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵattribute("colspan",6),n.ɵɵadvance(1),n.ɵɵtextInterpolate(n.ɵɵpipeBind1(3,2,"general.noRegistros")))}Rt.ɵfac=function(e){return new(e||Rt)(n.ɵɵinject(J))},Rt.ɵprov=n.ɵɵdefineInjectable({token:Rt,factory:Rt.ɵfac,providedIn:"root"});var $t=function(){return[10,25,50,100,500]},Jt=function(){function e(e,t,i){this.acreedorService=e,this.paginanateService=t,this.translate=i,this.params=[],this.ordenar=[],this.visible=!1,this.acreedorSeleccionado=new Ge,this.select=new n.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.acreedores=[]},e.prototype.cargarDatosAcreedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.acreedorService.getAll(this.params).subscribe((function(t){e.acreedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosAcreedores},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarAcreedor=function(e){this.select.emit(e.data),this.visible=!1},e}();Jt.ɵfac=function(e){return new(e||Jt)(n.ɵɵdirectiveInject(Rt),n.ɵɵdirectiveInject(qe),n.ɵɵdirectiveInject(f.TranslateService))},Jt.ɵcmp=n.ɵɵdefineComponent({type:Jt,selectors:[["select-acreedor"]],inputs:{visible:"visible",acreedorSeleccionado:"acreedorSeleccionado"},outputs:{select:"select"},decls:10,vars:14,consts:[["header","Selecciona el acreedor",3,"visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","responsive","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"pSelectableRow"],[4,"ngIf"]],template:function(e,t){1&e&&(n.ɵɵelementStart(0,"p-dialog",0),n.ɵɵlistener("visibleChange",(function(e){return t.visible=e}))("onHide",(function(){return t.cerrarModal()}))("onShow",(function(){return t.cargarDatosAcreedores()})),n.ɵɵelementStart(1,"div",1),n.ɵɵelementStart(2,"input",2),n.ɵɵlistener("ngModelChange",(function(e){return t.page.filtro=e}))("keyup",(function(){return t.cargarDatosAcreedores()})),n.ɵɵpipe(3,"translate"),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"button",3),n.ɵɵlistener("click",(function(){return t.cargarDatosAcreedores()})),n.ɵɵelementEnd(),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"p-table",4),n.ɵɵlistener("selectionChange",(function(e){return t.acreedorSeleccionado=e}))("onRowSelect",(function(e){return t.seleccionarAcreedor(e)})),n.ɵɵtemplate(6,Lt,19,18,"ng-template",5),n.ɵɵtemplate(7,Nt,15,11,"ng-template",6),n.ɵɵtemplate(8,Vt,4,4,"ng-template",7),n.ɵɵelementEnd(),n.ɵɵelementStart(9,"p-paginator",8),n.ɵɵlistener("onPageChange",(function(e){return t.pagina(e)})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵproperty("visible",t.visible),n.ɵɵadvance(2),n.ɵɵpropertyInterpolate1("placeholder","",n.ɵɵpipeBind1(3,11,"buscar"),"..."),n.ɵɵproperty("ngModel",t.page.filtro),n.ɵɵadvance(3),n.ɵɵproperty("value",t.acreedores)("selection",t.acreedorSeleccionado)("scrollable",!0)("responsive",!0),n.ɵɵadvance(4),n.ɵɵproperty("rows",t.page.rows)("totalRecords",t.page.total)("pageLinkSize",5)("rowsPerPageOptions",n.ɵɵpureFunction0(13,$t)))},directives:[c.Dialog,i.DefaultValueAccessor,o.InputText,i.NgControlStatus,i.NgModel,l.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator,g.SelectableRow,s.NgIf],pipes:[f.TranslatePipe,s.DatePipe],encapsulation:2});var Zt=[z.CardModule,q.TooltipModule,F.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,r.TreeTableModule,j.CalendarModule,g.TableModule,l.ButtonModule,o.InputTextModule,b.DropdownModule,y.InputMaskModule,S.MessagesModule,x.MessageModule,v.PaginatorModule,w.ConfirmDialogModule,C.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,U.ToolbarModule,L.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,R.MenubarModule],Gt=[a.ConfirmationService];function Wt(e){return new H.TranslateHttpLoader(e,"./assets/i18n/",".json")}var Yt=function(){};Yt.ɵmod=n.ɵɵdefineNgModule({type:Yt}),Yt.ɵinj=n.ɵɵdefineInjector({factory:function(e){return new(e||Yt)},providers:[Gt,{provide:t.HTTP_INTERCEPTORS,useClass:ce,multi:!0}],imports:[[s.CommonModule,Zt,i.FormsModule,d.ToastrModule.forRoot(),f.TranslateModule.forRoot({loader:{provide:f.TranslateLoader,useFactory:Wt,deps:[t.HttpClient]}})]]}),("undefined"==typeof ngJitMode||ngJitMode)&&n.ɵɵsetNgModuleScope(Yt,{declarations:[pe,de,fe,Ae,ye,Be,Ne,Xe,zt,Jt,ne,ae,pt],imports:[s.CommonModule,z.CardModule,q.TooltipModule,F.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,r.TreeTableModule,j.CalendarModule,g.TableModule,l.ButtonModule,o.InputTextModule,b.DropdownModule,y.InputMaskModule,S.MessagesModule,x.MessageModule,v.PaginatorModule,w.ConfirmDialogModule,C.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,U.ToolbarModule,L.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,R.MenubarModule,i.FormsModule,d.ToastrModule,f.TranslateModule],exports:[de,fe,Ae,ye,Be,Ne,Xe,zt,Jt,ne,ae]});var Kt=function(){function e(e){this.authService=e,this.cambioAcciones=new n.EventEmitter,this.changeDetalleUsuario=new n.EventEmitter}return e.prototype.set=function(e){this.detallesUsuarios=e,this.changeDetalleUsuario.emit(this.detallesUsuarios)},e.prototype.canActivete=function(e){for(var t=!1,n=this.authService.getUser(),i=function(i){if(t)return{value:t};var o=n.roles.filter((function(t){return t===e[i]}));t=o.length>0},o=0;o<e.length;o++){var r=i(o);if("object"==typeof r)return r.value}return t},e}();Kt.ɵfac=function(e){return new(e||Kt)(n.ɵɵinject(we))},Kt.ɵprov=n.ɵɵdefineInjectable({token:Kt,factory:Kt.ɵfac,providedIn:"root"});var Qt=function(){function e(e,t){this.http=e,this.authService=t}return e.prototype.initConfig=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))})),this.http.get("assets/version.json").subscribe((function(e){localStorage.removeItem("version"),localStorage.setItem("version",e.hash)}))},e.prototype.cargaConfig=function(){var e=this;this.http.get("assets/config.json").subscribe((function(n){localStorage.setItem("config",JSON.stringify(n));var i=n.url;e.http.post(i+"/login",{username:"admin",password:"admin"}).subscribe((function(n){localStorage.setItem("usuario",JSON.stringify(n));var o={headers:new t.HttpHeaders({"Accept-type":"application/json",Authorization:n.token_type+" "+n.access_token})};e.http.get(i+"/usuario/obtieneUsuarioActual",o).subscribe((function(t){var n=t.empresas[0];e.authService.setEmpresa(n).subscribe()}))}))}))},e}();Qt.ɵfac=function(e){return new(e||Qt)(n.ɵɵinject(t.HttpClient),n.ɵɵinject(we))},Qt.ɵprov=n.ɵɵdefineInjectable({token:Qt,factory:Qt.ɵfac,providedIn:"root"});var Xt=function(){function e(e){this.toastr=e}return e.prototype.deployMessage=function(e,t,n){switch(void 0===e&&(e=null),e){case"success":this.toastr.success(n,t,{timeOut:3e3});break;case"info":this.toastr.info(n,t,{timeOut:3e3});break;case"warning":this.toastr.warning(n,t,{timeOut:3e3});break;case"error":this.toastr.error(n,t,{timeOut:3e3});break;case null:this.toastr.success(n,t,{timeOut:3e3})}},e.prototype.success=function(e){var t=[];return t.push({severity:"success",summary:"Exito",detail:""+e}),t},e.prototype.error=function(e){var t=[];if(e){if(e.error&&(e=e.error).error)for(var n=0;n<e.error.length;n++)t.push({severity:"error",summary:"Error",detail:""+e.error[n].message})}else e.mensaje&&t.push({severity:"error",summary:"Error",detail:""+e.mensaje});return t},e}();Xt.ɵfac=function(e){return new(e||Xt)(n.ɵɵinject(d.ToastrService))},Xt.ɵprov=n.ɵɵdefineInjectable({token:Xt,factory:Xt.ɵfac,providedIn:"root"});var en=function(){function e(e){this.api=e,this.endpoint="personaMoral"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();en.ɵfac=function(e){return new(e||en)(n.ɵɵinject(J))},en.ɵprov=n.ɵɵdefineInjectable({token:en,factory:en.ɵfac,providedIn:"root"});var tn=function(){function e(e){this.controlAccesoService=e,this.rol="",this.method=""}return e.prototype.canActivate=function(){return this.controlAccesoService.canActivete([this.rol])},e.prototype.permisos=function(e){this.rol=e},e}();tn.ɵfac=function(e){return new(e||tn)(n.ɵɵinject(Kt))},tn.ɵprov=n.ɵɵdefineInjectable({token:tn,factory:tn.ɵfac,providedIn:"root"});var nn=function(){function e(e){this.api=e,this.endpoint="catalogoAdicional"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();nn.ɵfac=function(e){return new(e||nn)(n.ɵɵinject(J))},nn.ɵprov=n.ɵɵdefineInjectable({token:nn,factory:nn.ɵfac,providedIn:"root"});var on=function(){function e(e,t,n){this.authService=e,this.controlAccesoService=t,this.router=n}return e.prototype.load=function(e){var t=this;return this.authService.getUser()?this.authService.getDetalsUser().subscribe((function(e){for(var n=e.roles,i=0;i<n.length;i++)"ROLE_CLIENTE"===n[i].authority&&t.router.navigate(["movimientos/ventaRapida/create"]);return e.empresa||t.regresaAlprincipal(void 0),t.controlAccesoService.detallesUsuarios=e,t.controlAccesoService.cambioAcciones.emit(!0),!0}),(function(e){t.regresaAlprincipal(void 0)})):this.regresaAlprincipal(void 0),!1},e.prototype.regresaAlprincipal=function(e){var t=JSON.parse(localStorage.getItem("config")),n="";t&&t.host&&(n=t.host),e&&(n+=e),window.location.href=n},e}();on.ɵfac=function(e){return new(e||on)(n.ɵɵinject(we),n.ɵɵinject(Kt),n.ɵɵinject(N.Router))},on.ɵprov=n.ɵɵdefineInjectable({token:on,factory:on.ɵfac,providedIn:"root"});var rn=function(){function e(e){this.http=e,this.currentHash="{{POST_BUILD_ENTERS_HASH_HERE}}",this.versionado=!1,this.frequency=108e5}return e.prototype.initVersionCheck=function(){var e=this;setInterval((function(){e.checkVersion()}),this.frequency)},e.prototype.checkVersion=function(){var e=this;this.http.get("assets/version.json?t="+(new Date).getTime()).subscribe((function(t){var n=t.hash;e.currentHash=localStorage.getItem("version"),e.hasHashChanged(e.currentHash,n)||e.versionado||(e.versionado=!0,confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")?(location.reload(),e.versionado=!1):e.versionado=!1)}),(function(e){console.error(e,"No se pudo obtener versión de software")}))},e.prototype.hasHashChanged=function(e,t){return!(!e||"{{POST_BUILD_ENTERS_HASH_HERE}}"===e)&&e===t},e}();rn.ɵfac=function(e){return new(e||rn)(n.ɵɵinject(t.HttpClient))},rn.ɵprov=n.ɵɵdefineInjectable({token:rn,factory:rn.ɵfac,providedIn:"root"});var an=function(){this.personaFisica=new $e},sn=function(){function e(e){this.api=e,this.endpoint="agente"}return e.prototype.saveUsuarioAgente=function(e){return this.api.post(this.endpoint+"/usuario",e)},e.prototype.getUsuarioAgente=function(e){return this.api.get(this.endpoint+"/usuario/"+e)},e.prototype.obtenerAgenteEmpresa=function(){return this.api.get(this.endpoint+"/obtenerAgenteEmpresa")},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();sn.ɵfac=function(e){return new(e||sn)(n.ɵɵinject(J))},sn.ɵprov=n.ɵɵdefineInjectable({token:sn,factory:sn.ɵfac,providedIn:"root"});var ln=function(){},cn=function(){},pn=function(){this.datoDireccion=new cn},un=function(){function e(e){this.api=e,this.endpoint="banco"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();un.ɵfac=function(e){return new(e||un)(n.ɵɵinject(J))},un.ɵprov=n.ɵɵdefineInjectable({token:un,factory:un.ɵfac,providedIn:"root"});var dn=function(){},fn=function(){function e(e){this.api=e,this.endpoint="catalogoTipo"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();fn.ɵfac=function(e){return new(e||fn)(n.ɵɵinject(J))},fn.ɵprov=n.ɵɵdefineInjectable({token:fn,factory:fn.ɵfac,providedIn:"root"});var hn=function(){function e(e){this.api=e,this.endpoint="clasificadorTipo"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();hn.ɵfac=function(e){return new(e||hn)(n.ɵɵinject(J))},hn.ɵprov=n.ɵɵdefineInjectable({token:hn,factory:hn.ɵfac,providedIn:"root"});var mn=function(){},gn=function(){function e(e){this.api=e,this.endpoint="claveMovimiento"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();gn.ɵfac=function(e){return new(e||gn)(n.ɵɵinject(J))},gn.ɵprov=n.ɵɵdefineInjectable({token:gn,factory:gn.ɵfac,providedIn:"root"});var vn=function(){this.agenteCobrador=new an,this.agenteVendedor=new an,this.personaFisica=new $e,this.personaMoral=new Je},bn=function(){this.banco=new pn,this.estatus=!0},yn=function(){},Sn=function(){this.cliente=new vn,this.flete=new yn,this.estatus=!0},xn=function(){function e(e){this.api=e,this.endpoint="clienteCuentaBanco"}return e.prototype.saveAll=function(e){var t={cuentas:e};return this.api.post(this.endpoint,t)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e}();xn.ɵfac=function(e){return new(e||xn)(n.ɵɵinject(J))},xn.ɵprov=n.ɵɵdefineInjectable({token:xn,factory:xn.ɵfac,providedIn:"root"});var wn=function(){function e(e){this.api=e,this.endpoint="clienteFlete"}return e.prototype.saveAll=function(e){var t={fletes:e};return this.api.post(this.endpoint,t)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e}();wn.ɵfac=function(e){return new(e||wn)(n.ɵɵinject(J))},wn.ɵprov=n.ɵɵdefineInjectable({token:wn,factory:wn.ɵfac,providedIn:"root"});var Cn=function(){this.estatus=!0},In=function(){this.tipoContacto=new Cn},En=function(){function e(e){this.api=e,this.endpoint="contacto"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();En.ɵfac=function(e){return new(e||En)(n.ɵɵinject(J))},En.ɵprov=n.ɵɵdefineInjectable({token:En,factory:En.ɵfac,providedIn:"root"});var Mn=function(){function e(e){this.api=e,this.endpoint="datoDireccion"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Mn.ɵfac=function(e){return new(e||Mn)(n.ɵɵinject(J))},Mn.ɵprov=n.ɵɵdefineInjectable({token:Mn,factory:Mn.ɵfac,providedIn:"root"});var An=function(){},jn=function(){function e(e){this.api=e,this.endpoint="departamento"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();jn.ɵfac=function(e){return new(e||jn)(n.ɵɵinject(J))},jn.ɵprov=n.ɵɵdefineInjectable({token:jn,factory:jn.ɵfac,providedIn:"root"});var kn=function(){},Pn=function(){this.datoDireccion=new cn,this.personaMoral=new Je,this.claveFormaPagoEfectivo=new kn},_n=function(){this.empresa=new Pn},On=function(){function e(e){this.api=e,this.endpoint="empresa"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(){return this.api.get(this.endpoint+"/configuracionEmpresaAdministrativo/configuracionUsuario")},e.prototype.getByEmpresa=function(e){return this.api.get(this.endpoint+"/configuracionEmpresaAdministrativo/configuracionUsuario/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();On.ɵfac=function(e){return new(e||On)(n.ɵɵinject(J))},On.ɵprov=n.ɵɵdefineInjectable({token:On,factory:On.ɵfac,providedIn:"root"});var Tn=function(){function e(e){this.api=e,this.endpoint="flete"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Tn.ɵfac=function(e){return new(e||Tn)(n.ɵɵinject(J))},Tn.ɵprov=n.ɵɵdefineInjectable({token:Tn,factory:Tn.ɵfac,providedIn:"root"});var Dn=function(){function e(e){this.api=e,this.endpoint="FormaDePago"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Dn.ɵfac=function(e){return new(e||Dn)(n.ɵɵinject(J))},Dn.ɵprov=n.ɵɵdefineInjectable({token:Dn,factory:Dn.ɵfac,providedIn:"root"});var Bn=function(){},Fn=function(){function e(e){this.api=e,this.endpoint="moneda"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Fn.ɵfac=function(e){return new(e||Fn)(n.ɵɵinject(J))},Fn.ɵprov=n.ɵɵdefineInjectable({token:Fn,factory:Fn.ɵfac,providedIn:"root"});var qn=function(){},zn=function(){},Rn=function(){function e(e){this.api=e,this.endpoint="PersonaFisica"}return e.prototype.getGeneros=function(){return this.api.get(this.endpoint+"/genero")},e.prototype.getEstadoCivil=function(){return this.api.get(this.endpoint+"/estadoCivil")},e}();Rn.ɵfac=function(e){return new(e||Rn)(n.ɵɵinject(J))},Rn.ɵprov=n.ɵɵdefineInjectable({token:Rn,factory:Rn.ɵfac,providedIn:"root"});var Ln=function(){this.banco=new pn,this.estatus=!0},Un=function(){this.proveedor=new Ge,this.flete=new yn,this.estatus=!0},Hn=function(){function e(e){this.api=e,this.endpoint="proveedorCuentaBanco"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.saveAll=function(e){var t={cuentas:e};return this.api.post(this.endpoint,t)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e}();Hn.ɵfac=function(e){return new(e||Hn)(n.ɵɵinject(J))},Hn.ɵprov=n.ɵɵdefineInjectable({token:Hn,factory:Hn.ɵfac,providedIn:"root"});var Nn=function(){function e(e){this.api=e,this.endpoint="proveedorFlete"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Nn.ɵfac=function(e){return new(e||Nn)(n.ɵɵinject(J))},Nn.ɵprov=n.ɵɵdefineInjectable({token:Nn,factory:Nn.ɵfac,providedIn:"root"});var Vn=function(){function e(e){this.api=e,this.endpoint="claveAumentoDisminucion"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Vn.ɵfac=function(e){return new(e||Vn)(n.ɵɵinject(J))},Vn.ɵprov=n.ɵɵdefineInjectable({token:Vn,factory:Vn.ɵfac,providedIn:"root"});var $n=function(){function e(e){this.api=e,this.endpoint="serieDocumento"}return e.prototype.getTipos=function(){return this.api.get(this.endpoint+"/tipoSerie")},e.prototype.getReporte=function(e){return this.api.get(this.endpoint+"/descargaFormatoReporte",e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();$n.ɵfac=function(e){return new(e||$n)(n.ɵɵinject(J))},$n.ɵprov=n.ɵɵdefineInjectable({token:$n,factory:$n.ɵfac,providedIn:"root"});var Jn=function(){},Zn=function(){function e(e){this.api=e,this.endpoint="tipoContacto"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Zn.ɵfac=function(e){return new(e||Zn)(n.ɵɵinject(J))},Zn.ɵprov=n.ɵɵdefineInjectable({token:Zn,factory:Zn.ɵfac,providedIn:"root"});var Gn=function(){},Wn=function(){function e(e){this.api=e,this.endpoint="ubicacion"}return e.prototype.getAll=function(e){return this.api.get(this.endpoint,e)},e.prototype.get=function(e){return this.api.get(this.endpoint+"/"+e)},e.prototype.save=function(e){return this.api.post(this.endpoint,e)},e.prototype.update=function(e){return this.api.put(this.endpoint,e.id,e)},e.prototype.delete=function(e){return this.api.delete(this.endpoint,e)},e}();Wn.ɵfac=function(e){return new(e||Wn)(n.ɵɵinject(J))},Wn.ɵprov=n.ɵɵdefineInjectable({token:Wn,factory:Wn.ɵfac,providedIn:"root"});var Yn=function(){};Yn.ARTICULO=2,Yn.USO_CFDI=11;var Kn=function(){function e(e){this.api=e,this.endpoint="acreedorCuentaContable"}return e.prototype.cuentasContables=function(){return this.api.get(this.endpoint+"/obtieneCuentasContablesRecursivo")},e}();Kn.ɵfac=function(e){return new(e||Kn)(n.ɵɵinject(J))},Kn.ɵprov=n.ɵɵdefineInjectable({token:Kn,factory:Kn.ɵfac,providedIn:"root"});var Qn=function(){},Xn=function(){};e.AcreedorCuentaContableService=Kn,e.AcreedorService=Rt,e.Agente=an,e.AgenteService=sn,e.Almacen=ln,e.AlmacenService=tt,e.ApiService=J,e.Auth=xe,e.AuthService=we,e.Authenticated=on,e.Banco=pn,e.BancoService=un,e.CanActivateGuard=tn,e.CatalogoAdicionalService=nn,e.CatalogoTipo=dn,e.CatalogoTipoService=fn,e.CclistaComponent=ne,e.CcseleccionDialogComponent=ae,e.ClasificadorTipo=Ze,e.ClasificadorTipoService=hn,e.ClaveAumentoDisminucionService=Vn,e.ClaveMovimiento=mn,e.ClaveMovimientoService=gn,e.Cliente=vn,e.ClienteCuentaBanco=bn,e.ClienteCuentaBancoService=xn,e.ClienteFlete=Sn,e.ClienteFleteService=wn,e.ClienteService=Fe,e.ConfiguracionEmpresaAdministrativa=_n,e.ControlAccesoService=Kt,e.CoreLibModule=Yt,e.CuentaContableModel=Qn,e.DatoContacto=In,e.DatoContactoService=En,e.DatoDireccion=cn,e.DatoDireccionService=Mn,e.Departamento=An,e.DepartamentoService=jn,e.Empresa=Pn,e.EmpresaService=On,e.Error404Component=pe,e.EstadoCivil=qn,e.FileService=me,e.Flete=yn,e.FleteService=Tn,e.FormaPago=kn,e.FormaPagoService=Dn,e.Genero=zn,e.GlobalService=V,e.HttpLoaderFactory=Wt,e.InitService=Qt,e.LoadingComponent=de,e.LoadingScreenComponent=fe,e.LoadingScreenService=le,e.LoadingService=ue,e.LoginModalComponent=Ae,e.LoginModalService=se,e.MessageService=Xt,e.Moneda=Bn,e.MonedaService=Fn,e.NormaInformacionFinancieraModel=Xn,e.PaginateService=qe,e.PdfModalComponent=ye,e.PdfModalService=he,e.Persona=Ve,e.PersonaFisica=$e,e.PersonaFisicaService=Rn,e.PersonaMoral=Je,e.PersonaMoralService=en,e.Proveedor=Ge,e.ProveedorCuentaBanco=Ln,e.ProveedorCuentaBancoService=Hn,e.ProveedorFlete=Un,e.ProveedorFleteService=Nn,e.ProveedorService=We,e.SeleccionaArticuloComponent=zt,e.SelectAcreedorComponent=Jt,e.SelectClienteComponent=Ne,e.SelectProveedorComponent=Xe,e.SerieDocumento=Jn,e.SerieDocumentoService=$n,e.SessionCajaService=je,e.SessionCreateComponent=Be,e.StockService=et,e.TipoCatalogo=Yn,e.TipoContacto=Cn,e.TipoContactoService=Zn,e.Ubicacion=Gn,e.UbicacionService=Wn,e.Usuario=Se,e.VersionCheckService=rn,e.httpInterceptor=ce,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("@angular/forms"),require("primeng/inputtext"),require("primeng/treetable"),require("primeng/api"),require("@angular/common"),require("primeng/button"),require("primeng/dialog"),require("rxjs"),require("rxjs/internal/operators"),require("ngx-toastr"),require("@ngx-translate/core"),require("rxjs/operators"),require("@angular/platform-browser"),require("primeng/table"),require("primeng/paginator"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/messages"),require("primeng/message"),require("primeng/confirmdialog"),require("primeng/progressbar"),require("primeng/tristatecheckbox"),require("primeng/keyfilter"),require("primeng/inputswitch"),require("primeng/tabview"),require("primeng/calendar"),require("primeng/panel"),require("primeng/autocomplete"),require("primeng/fieldset"),require("primeng/checkbox"),require("primeng/tree"),require("primeng/radiobutton"),require("primeng/tabmenu"),require("primeng/overlaypanel"),require("primeng/tooltip"),require("primeng/card"),require("primeng/menubar"),require("primeng/splitbutton"),require("primeng/toolbar"),require("@ngx-translate/http-loader"),require("@angular/router")):"function"==typeof define&&define.amd?define("visorus-erp-core",["exports","@angular/core","@angular/common/http","@angular/forms","primeng/inputtext","primeng/treetable","primeng/api","@angular/common","primeng/button","primeng/dialog","rxjs","rxjs/internal/operators","ngx-toastr","@ngx-translate/core","rxjs/operators","@angular/platform-browser","primeng/table","primeng/paginator","primeng/dropdown","primeng/inputmask","primeng/messages","primeng/message","primeng/confirmdialog","primeng/progressbar","primeng/tristatecheckbox","primeng/keyfilter","primeng/inputswitch","primeng/tabview","primeng/calendar","primeng/panel","primeng/autocomplete","primeng/fieldset","primeng/checkbox","primeng/tree","primeng/radiobutton","primeng/tabmenu","primeng/overlaypanel","primeng/tooltip","primeng/card","primeng/menubar","primeng/splitbutton","primeng/toolbar","@ngx-translate/http-loader","@angular/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["visorus-erp-core"]={},e.ng.core,e.ng.common.http,e.ng.forms,e.i6,e.i4,e.i4$1,e.ng.common,e.i7,e.i4$2,e.rxjs,e.rxjs["internal/operators"],e.i1$1,e.i3,e.rxjs.operators,e.ng.platformBrowser,e.i8$1,e.i10,e.i23,e.i24,e.i25,e.i26,e.i28,e.i29,e.i30,e.i31,e.i32,e.i34,e.i20,e.i35,e.i17,e.i38,e.i16,e.i39,e.i15,e.i40,e.i14,e.i13,e.i12,e.i41,e.i37,e.i36,e.httpLoader,e.ng.router)}(this,(function(e,t,n,o,r,i,a,l,s,c,p,u,d,f,m,g,h,v,y,b,S,C,I,x,M,w,E,D,j,A,k,P,O,_,T,H,U,B,F,z,R,q,L,N){"use strict";var V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Z(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))}function G(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,o=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(6===l[0]&&i.label<r[1]){i.label=r[1],r=l;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(l);break}r[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}Object.create;function W(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Y=function(){function e(e){this.http=e}return e.prototype.setConfiguracion=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))}))},e.prototype.obtieneConfiguracion=function(){return JSON.parse(localStorage.getItem("config"))},e.prototype.getUrl=function(e){return this.obtieneConfiguracion().url+(e?"/"+e:"")},e.prototype.auth=function(e){return this.http.post(this.getUrl()+"/login",e)},e.prototype.getUsuarioActual=function(){return this.http.get(this.getUrl()+"/usuario/obtieneUsuarioActual",this.buildAuth())},e.prototype.buildAuth=function(){var e=this.getUsuario();return{headers:new n.HttpHeaders({Authorization:e.token_type+" "+e.access_token,"Content-Type":"application/json",Accept:"application/json"})}},e.prototype.validateEndPoint=function(){return this.http.get(this.getUrl()+"/validate",this.buildAuth())},e.prototype.closeEndPoint=function(){localStorage.removeItem("usuario"),this.setUsuarioInstance(null)},e.prototype.getUsuario=function(){return JSON.parse(localStorage.getItem("usuario"))},e.prototype.setUsuarioInstance=function(e){this.usuarioInstance=e},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.setModulo=function(e){return this.http.post(this.getUrl()+"/usuario/setModulo",e,this.buildAuth())},e}(),K=function(e){function t(t,n){var o=e.call(this,t)||this;return o.httpCliente=t,o.url=n,o.urlComponente=o.url,o}return J(t,e),t.prototype.serializeParams=function(e){var t="";return e.map((function(e,n){void 0!==e.value&&(t+=(0==n?"?":"&")+e.param+"="+e.value)})),t},t.prototype.getHttp=function(){return this.httpCliente},t.prototype.geturl=function(){return this.getUrl(this.urlComponente)},t.prototype.getBaseUrl=function(){return this.getUrl("")},t.prototype.getByUrl=function(e,t){return this.httpCliente.get(this.getUrl(e)+this.serializeParams(t),this.buildAuth())},t.prototype.getAll=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+(e?this.serializeParams(e):""),this.buildAuth())},t.prototype.get=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t.prototype.save=function(e){return this.httpCliente.post(this.getUrl(this.urlComponente),e,this.buildAuth())},t.prototype.update=function(e){return this.httpCliente.put(this.getUrl(this.urlComponente)+"/"+e.id,e,this.buildAuth())},t.prototype.delete=function(e){return this.httpCliente.delete(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t}(Y),Q=function(e){function t(t){var n=e.call(this,t,"cuentaContable")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtieneCuentasContablesRecursivo=function(){return this.httpClient.get(this.getUrl("cuentaContable")+"/obtieneCuentasContablesRecursivo",this.buildAuth())},t}(K);function X(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",5),t.ɵɵtext(2,"Cuenta contable"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",5),t.ɵɵtext(4,"Descripción"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",6),t.ɵɵtext(6,"Naturaleza"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th",7),t.ɵɵtext(8,"Tipo"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"th",8),t.ɵɵtext(10,"Acciones"),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function ee(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",16),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function te(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",16),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function ne(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",9),t.ɵɵelement(2,"p-treeTableToggler",10),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"td",9),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"td",11),t.ɵɵtext(7),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td",12),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td",13),t.ɵɵelementStart(11,"div",14),t.ɵɵtemplate(12,ee,1,0,"button",15),t.ɵɵtemplate(13,te,1,0,"button",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit,r=n.rowData,i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("rowNode",o),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",r.cuentaContable," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.descripcion," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.naturaleza," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.tipo," "),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",1==i.typeAccount&&r.cuentaRegistro),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",2==i.typeAccount&&!r.cuentaRegistro)}}Q.ɵfac=function(e){return new(e||Q)(t.ɵɵinject(n.HttpClient))},Q.ɵprov=t.ɵɵdefineInjectable({token:Q,factory:Q.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Q,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var oe=function(){return{width:"100%"}},re=function(){function e(e){this._cuentaContableService=e,this.cuentasContables=[],this.maxH=720,this.query="",this.tempAccounts=[],this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.maxH=window.innerHeight-320,this.obtenerCuentasContablesRecursivo()},e.prototype.obtenerCuentasContablesRecursivo=function(){var e=this;this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe((function(t){t&&(e.cuentasContables=t,e.sortAccounts())}))},e.prototype.sortAccounts=function(){var e,t;this.cuentasContables.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var n=W(this.cuentasContables),o=n.next();!o.done;o=n.next()){var r=o.value;r.children&&this.sortItem(r)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.tempAccounts=this.cuentasContables},e.prototype.sortItem=function(e){var t,n;e.children.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var o=W(e.children),r=o.next();!r.done;r=o.next()){var i=r.value;this.sortItem(i)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.selectCuentaContable=function(e){this.evSelectedAccount.emit(e)},e.prototype.filterAccounts=function(e){if(e)this.cuentasContables=this.browseAccount(this.tempAccounts);else{var t=this.resetAccount();this.cuentasContables=t}},e.prototype.resetAccount=function(){var e,t;this.query="";var n=[];try{for(var o=W(this.tempAccounts),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e.prototype.browseAccount=function(e){var t,n,o=[];if(""!==this.query){try{for(var r=W(e),i=r.next();!i.done;i=r.next()){var a=i.value;o=a.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase())||a.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())?o.concat({data:a.data,children:this.browseAccount(a.children)}):o.concat(this.browseAccount(a.children))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o}var l=this.resetAccount();this.cuentasContables=l},e}();re.ɵfac=function(e){return new(e||re)(t.ɵɵdirectiveInject(Q))},re.ɵcmp=t.ɵɵdefineComponent({type:re,selectors:[["lib-cclista"]],inputs:{isShared:"isShared",typeAccount:"typeAccount"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:5,vars:8,consts:[["type","text","pInputText","","placeholder","Cuenta o descripción",2,"width","100%",3,"ngModel","ngModelChange","keyup"],[2,"padding","10px"],[3,"value","scrollable","scrollHeight","resizableColumns"],["pTemplate","header"],["pTemplate","body","style","width: 100%;"],[2,"width","150px"],[2,"width","90px"],[2,"width","60px"],[2,"width","200px"],[1,"ui-resizable-column",2,"width","150px"],[3,"rowNode"],[1,"ui-resizable-column",2,"width","90px"],[1,"ui-resizable-column",2,"width","60px"],[1,"ui-resizable-column",2,"width","200px"],[1,"button-row"],["pButton","","type","button","icon","pi pi-check","class","ui-button-raised ui-button-success",3,"click",4,"ngIf"],["pButton","","type","button","icon","pi pi-check",1,"ui-button-raised","ui-button-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"input",0),t.ɵɵlistener("ngModelChange",(function(e){return n.query=e}))("keyup",(function(e){return n.filterAccounts(e)})),t.ɵɵelementEnd(),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"p-treeTable",2),t.ɵɵtemplate(3,X,11,0,"ng-template",3),t.ɵɵtemplate(4,ne,14,7,"ng-template",4),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngModel",n.query),t.ɵɵadvance(2),t.ɵɵstyleMap(t.ɵɵpureFunction0(7,oe)),t.ɵɵproperty("value",n.cuentasContables?n.cuentasContables:n.tempAccounts)("scrollable",!0)("scrollHeight",n.maxH+"px")("resizableColumns",!0))},directives:[o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,i.TreeTable,a.PrimeTemplate,i.TreeTableToggler,l.NgIf,s.ButtonDirective],styles:[""]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(re,[{type:t.Component,args:[{selector:"lib-cclista",templateUrl:"./cclista.component.html",styleUrls:["./cclista.component.css"]}]}],(function(){return[{type:Q}]}),{isShared:[{type:t.Input}],typeAccount:[{type:t.Input}],evSelectedAccount:[{type:t.Output}]});var ie=["dialog"],ae=function(e){return{width:e,"min-width":"200px"}},le=function(e){return{height:e}},se=function(){function e(){this.cuentasContables=[],this.maxH=720,this.maxW=0,this.flagModal=!0,this.size=350,this.maxH=window.innerHeight-370,this.maxW=window.innerWidth,this.size=this.maxW-50,this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.getAccount=function(e){this.evSelectedAccount.emit(e)},e.prototype.hiddenDialog=function(e){this.evSelectedAccount.emit(null)},e}();se.ɵfac=function(e){return new(e||se)},se.ɵcmp=t.ɵɵdefineComponent({type:se,selectors:[["lib-ccseleccion-dialog"]],viewQuery:function(e,n){if(1&e&&t.ɵɵviewQuery(ie,3),2&e){var o;t.ɵɵqueryRefresh(o=t.ɵɵloadQuery())&&(n.dialog=o.first)}},inputs:{tipoCuenta:"tipoCuenta",displayShowCuentas:"displayShowCuentas"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:3,vars:17,consts:[["header","Selecciona cuenta contable",3,"visible","modal","minY","baseZIndex","blockScroll","draggable","maximizable","visibleChange","onHide"],[1,"padding10",3,"ngStyle"],[3,"isShared","typeAccount","evSelectedAccount"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.displayShowCuentas=e}))("onHide",(function(e){return n.hiddenDialog(e)})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"lib-cclista",2),t.ɵɵlistener("evSelectedAccount",(function(e){return n.getAccount(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(13,ae,n.size+"px")),t.ɵɵproperty("visible",n.displayShowCuentas)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("draggable",!1)("blockScroll",!0)("maximizable",!0),t.ɵɵadvance(1),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(15,le,n.maxH+200+"px")),t.ɵɵadvance(1),t.ɵɵproperty("isShared",!0)("typeAccount",n.tipoCuenta))},directives:[c.Dialog,l.NgStyle,re],styles:[""]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(se,[{type:t.Component,args:[{selector:"lib-ccseleccion-dialog",templateUrl:"./ccseleccion-dialog.component.html",styleUrls:["./ccseleccion-dialog.component.css"]}]}],(function(){return[]}),{dialog:[{type:t.ViewChild,args:["dialog",{static:!0}]}],tipoCuenta:[{type:t.Input}],displayShowCuentas:[{type:t.Input}],evSelectedAccount:[{type:t.Output}]});var ce=[re,se],pe=function(){function e(){this.modal=new t.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e}();pe.ɵfac=function(e){return new(e||pe)},pe.ɵprov=t.ɵɵdefineInjectable({token:pe,factory:pe.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(pe,[{type:t.Injectable,args:[{providedIn:"root"}]}],null,{modal:[{type:t.Output}]});var ue=function(){function e(){this._loading=!1,this.loadingStatus=new p.Subject}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingStatus.next(e)},enumerable:!1,configurable:!0}),e.prototype.startLoading=function(){this.loading=!0},e.prototype.stopLoading=function(){this.loading=!1},e}();ue.ɵfac=function(e){return new(e||ue)},ue.ɵprov=t.ɵɵdefineInjectable({token:ue,factory:ue.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ue,[{type:t.Injectable,args:[{providedIn:"root"}]}],null,null);var de=function(){function e(e,t,n){this.loginModalService=e,this.toastrService=t,this.loadingScreenService=n}return e.prototype.intercept=function(e,t){var n=this;return this.loadingScreenService.startLoading(),t.handle(e).pipe(u.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),p.throwError(e)})),u.tap((function(e){var t=e.body?e.body:null;if(0!==e.type&&4===e.type&&n.loadingScreenService.stopLoading(),t){var o=t.success?t.success:null;o&&n.toastrService.success(o,"Exito",{timeOut:3e3,closeButton:!0})}})))},e.prototype.handleError=function(e){return 401===e.status||403===e.status?(401===e.status&&this.loginModalService.showModal(),403===e.status&&this.toastrService.error("No tiene permiso sobre esta accion","Error",{timeOut:5e3}),p.of(e.message)):(401!==e.status&&403!==e.status&&409!==e.status&&this.toastrService.error("Ocurrio un error al procesar su solicitud","Error",{timeOut:5e3}),this.readError(e),p.of(e))},e.prototype.readError=function(e){if(e.error&&(e.error.error&&e.error.error.message&&this.toastrService.error(e.error.error.message,"Error",{timeOut:3e3}),e.error.message&&this.toastrService.error(e.error.message,"Error",{timeOut:3e3}),e.error._errors&&Array.isArray(e.error._errors)))for(var t=0;t<e.error._errors.length;t++)this.toastrService.error(e.error._errors[t].message,"Error",{timeOut:3e3,closeButton:!0})},e}();de.ɵfac=function(e){return new(e||de)(t.ɵɵinject(pe),t.ɵɵinject(d.ToastrService),t.ɵɵinject(ue))},de.ɵprov=t.ɵɵdefineInjectable({token:de,factory:de.ɵfac}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(de,[{type:t.Injectable}],(function(){return[{type:pe},{type:d.ToastrService},{type:ue}]}),null);var fe=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();fe.ɵfac=function(e){return new(e||fe)},fe.ɵcmp=t.ɵɵdefineComponent({type:fe,selectors:[["app-error404"]],decls:9,vars:0,consts:[[1,"col-md-12","sec_sof"],[1,"row"],[1,"col","col-center"],[1,"center"],[1,"error"],[1,"col-12"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵtext(5," Error 404 "),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"p"),t.ɵɵtext(8,"La pagina solicitada no fue encontrada"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".error[_ngcontent-%COMP%]{font-size:70px}"]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(fe,[{type:t.Component,args:[{selector:"app-error404",templateUrl:"./error404.component.html",styleUrls:["./error404.component.css"]}]}],(function(){return[]}),null);var me=function(){function e(){this.loading=new t.EventEmitter}return e.prototype.setLoading=function(e){e?this.start():this.stop()},e.prototype.start=function(){this.loading.emit(!0)},e.prototype.stop=function(){this.loading.emit(!1)},e}();me.ɵfac=function(e){return new(e||me)},me.ɵprov=t.ɵɵdefineInjectable({token:me,factory:me.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(me,[{type:t.Injectable,args:[{providedIn:"root"}]}],null,{loading:[{type:t.Output}]});var ge=function(e){var t=this;this.loadingService=e,this.visible=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){e&&!t.visible?($("#modal_loading").modal("show"),t.visible=!0):(setTimeout((function(){$("#modal_loading").modal("hide")}),650),t.visible=!1)}))};ge.ɵfac=function(e){return new(e||ge)(t.ɵɵdirectiveInject(me))},ge.ɵcmp=t.ɵɵdefineComponent({type:ge,selectors:[["loading"]],inputs:{logo_loading:"logo_loading"},decls:14,vars:4,consts:[["id","modal_loading","tabindex","-1","role","dialog","aria-labelledby","exampleModalScrollableTitle","data-backdrop","static","data-keyboard","false","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],[1,"col-lg-4","col-md-4","col-sm-10"],[1,"loader"],[1,"box"],[1,"code"],["width","200px",3,"src"],[1,"txt"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelementStart(5,"div",5),t.ɵɵelementStart(6,"div",6),t.ɵɵelement(7,"span",7),t.ɵɵelement(8,"span",7),t.ɵɵelementStart(9,"div",8),t.ɵɵelement(10,"img",9),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"span",10),t.ɵɵtext(12),t.ɵɵpipe(13,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(10),t.ɵɵpropertyInterpolate("src",n.logo_loading,t.ɵɵsanitizeUrl),t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(13,2,"cargando"),"..."))},pipes:[f.TranslatePipe],styles:['.loader[_ngcontent-%COMP%]{width:130px;height:170px;position:relative}.loader[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%]:before{content:"";width:0;height:0;position:absolute;bottom:30px;left:15px;z-index:1;transform:scale(0);transition:all .2s ease}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{width:120%;text-align:center;position:absolute;bottom:-30px;left:-7%;font-family:Abel,sans-serif;font-size:12px;letter-spacing:2px;color:#fff}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{position:absolute;z-index:99;bottom:-3px;-webkit-animation-name:spaceboots;-webkit-animation-duration:.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{width:100%;height:140px;display:block;color:#fff;position:absolute;left:28px;z-index:2;overflow:hidden}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:0;left:0;opacity:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:before{font-size:20px;content:"\\f13b";animation:a 1.1s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:after{content:"\\f13c";animation:b 1.3s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):before{content:"\\f121";font-size:25px;animation:c .9s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):after{content:"\\f19a ";animation:d .7s linear infinite}.loader.amit[_ngcontent-%COMP%]:after, .loader.amit[_ngcontent-%COMP%]:before{transform:scale(1)}@keyframes a{0%{transform:translate(30px) rotate(30deg);opacity:0}to{transform:translate(30px,150px) rotate(-50deg);opacity:1}}@keyframes b{0%{transform:translate(50px) rotate(-40deg);opacity:0}to{transform:translate(40px,150px) rotate(80deg);opacity:1}}@keyframes c{0%{transform:translate(70px) rotate(10deg);opacity:0}to{transform:translate(60px,150px) rotate(70deg);opacity:1}}@keyframes d{0%{transform:translate(30px) rotate(-50deg);opacity:0}to{transform:translate(45px,150px) rotate(30deg);opacity:1}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{border:0!important;background-color:hsla(0,0%,100%,0)!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}']}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ge,[{type:t.Component,args:[{selector:"loading",templateUrl:"./loading.component.html",styleUrls:["./loading.component.css"]}]}],(function(){return[{type:me}]}),{logo_loading:[{type:t.Input}]});var he=function(){function e(e,t,n,o){var r=this;this.loadingScreenService=e,this._elmRef=t,this._changeDetectorRef=n,this.loadingService=o,this.debounceTime=250,this.loading=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){r._elmRef.nativeElement.style.display=e?"block":"none"}))}return e.prototype.ngAfterViewInit=function(){var e=this;this._elmRef.nativeElement.style.display="none",this.loadingSubscription=this.loadingScreenService.loadingStatus.pipe(m.debounceTime(this.debounceTime)).subscribe((function(t){e._elmRef.nativeElement.style.display=t?"block":"none",e._changeDetectorRef.detectChanges()}))},e.prototype.ngOnDestroy=function(){this.loadingSubscription.unsubscribe()},e}();he.ɵfac=function(e){return new(e||he)(t.ɵɵdirectiveInject(ue),t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(me))},he.ɵcmp=t.ɵɵdefineComponent({type:he,selectors:[["app-loading-screen"]],inputs:{logo_loading:"logo_loading"},decls:10,vars:0,consts:[[1,"loading-screen-wrapper"],[1,"loading-screen-icon"],[1,"blobs"],[1,"blob-center"],[1,"blob"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelement(3,"div",3),t.ɵɵelement(4,"div",4),t.ɵɵelement(5,"div",4),t.ɵɵelement(6,"div",4),t.ɵɵelement(7,"div",4),t.ɵɵelement(8,"div",4),t.ɵɵelement(9,"div",4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".loading-screen-wrapper[_ngcontent-%COMP%]{z-index:100000;position:fixed;background-color:rgba(0,0,0,.384);width:100%;height:100%;display:block}.loading-screen-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{filter:url(#goo);width:300px;height:300px;position:relative;overflow:hidden;border-radius:70px;transform-style:preserve-3d}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{transform-style:preserve-3d;transform-origin:left top;animation:blob-grow 3.4s linear infinite;box-shadow:0 -10px 40px -5px #475158}.blob[_ngcontent-%COMP%], .blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;transform:scale(.9) translate(-50%,-50%);border-radius:50%}.blob[_ngcontent-%COMP%]{animation:blobs 3.4s ease-out infinite;transform-origin:center top;opacity:0}.blob[_ngcontent-%COMP%]:first-child{animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}99%{opacity:1}to{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,39%{transform:scale(0) translate(-50%,-50%)}40%,42%{transform:scaleY(.9) translate(-50%,-50%)}43%,44%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}90%,91%{transform:scaleY(.9) translate(-50%,-50%)}92%,to{transform:scale(0) translate(-50%,-50%)}}"]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(he,[{type:t.Component,args:[{selector:"app-loading-screen",templateUrl:"./loading-screen.component.html",styleUrls:["./loading-screen.component.scss"]}]}],(function(){return[{type:ue},{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:me}]}),{logo_loading:[{type:t.Input}]});var ve=function(){function e(){this.visible=new t.EventEmitter,this.print=new t.EventEmitter}return e.prototype.pdf_generate=function(e){this.base_64=e,this.visible.emit(!0)},e.prototype.generate_print=function(e){this.html=e,this.print.emit(!0)},e}();ve.ɵfac=function(e){return new(e||ve)},ve.ɵprov=t.ɵɵdefineInjectable({token:ve,factory:ve.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ve,[{type:t.Injectable,args:[{providedIn:"root"}]}],null,{visible:[{type:t.Output}],print:[{type:t.Output}]});var ye=function(){function e(e,t){this._toastrService=e,this.translate=t}return e.prototype.addFile=function(e,t){var n=this;void 0===t&&(t=!0);var o=e.target.files[0],r={id:null,nombre:"",contentType:"",orden:0,archivo:""};r.nombre=o.name,r.tipo=o.type;var i=new FileReader;return i.readAsDataURL(o),i.onload=function(){r.archivo=i.result,n.translate.get(["msgSuccess","titleFile"]).subscribe((function(e){t&&n._toastrService.success(e.msgSuccess,e.titleFile)}))},i.onerror=function(e){n.translate.get(["msgError","titleFile"]).subscribe((function(e){t&&n._toastrService.error(e.msgError,e.titleFile)}))},r},e.prototype.base64ToBlob=function(e,t){for(var n=atob(e),o=new Array(n.length),r=0;r<n.length;r++)o[r]=n.charCodeAt(r);var i=new Uint8Array(o);return new Blob([i],{type:t})},e.prototype.blobToDowload=function(e,t,n){var o=document.createElement("a");o.download=n,o.href=window.URL.createObjectURL(e),o.dataset.downloadurl=[t,o.download,o.href].join(":"),o.click()},e.prototype.base64ToFileDowload=function(e,t,n){this.blobToDowload(this.base64ToBlob(e,t),t,n)},e}();function be(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",2),t.ɵɵelement(1,"iframe",3),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("src",o.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+o.pdfBase64),t.ɵɵsanitizeResourceUrl)}}ye.ɵfac=function(e){return new(e||ye)(t.ɵɵinject(d.ToastrService),t.ɵɵinject(f.TranslateService))},ye.ɵprov=t.ɵɵdefineInjectable({token:ye,factory:ye.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ye,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:d.ToastrService},{type:f.TranslateService}]}),null);var Se=function(e){return{width:e,"min-width":"200px"}},Ce=function(){return{overflow:"visible"}},Ie=function(){function e(e,t,n){var o=this;this._pdfModalService=e,this.fileService=t,this.domSanitizer=n,this.display=!1,this.pdfBase64=null,this.size=840,e.visible.subscribe((function(t){e.base_64&&(o.display=t,o.pdfBase64=e.base_64)})),e.print.subscribe((function(e){o.display=e,setTimeout((function(){document.getElementById("_modal_pdf").innerHTML="<iframe id='printf' width='100%' height='100%' ></iframe>"}),20),setTimeout((function(){o.imprimir()}),40)}))}return e.prototype.imprimir=function(){var e=window.frames.printf;e.contentWindow.head.innerHTML=' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">\n <style>\n .table-hover tbody tr:hover {\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .tr-select{\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .td-header{\n background: #f3f3f3;\n color: #0d385d;\n border-color: 1px solid #0b4b87;\n }\n .td-yellow{\n background: #fff6d3;\n }\n .td-blue{\n background: #88d1ea;\n }\n .td-green{\n background: #b9d2a0;\n }\n </style>',e.contentWindow.body.innerHTML=this._pdfModalService.html},e}();Ie.ɵfac=function(e){return new(e||Ie)(t.ɵɵdirectiveInject(ve),t.ɵɵdirectiveInject(ye),t.ɵɵdirectiveInject(g.DomSanitizer))},Ie.ɵcmp=t.ɵɵdefineComponent({type:Ie,selectors:[["pdf-modal"]],decls:2,vars:15,consts:[[3,"visible","modal","minY","baseZIndex","blockScroll","maximizable","breakpoint","contentStyle","visibleChange"],["style","min-height: 90vh;",4,"ngIf"],[2,"min-height","90vh"],[2,"width","100%","height","90vh",3,"src"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.display=e})),t.ɵɵtemplate(1,be,2,1,"div",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(12,Se,n.size+"px")),t.ɵɵproperty("visible",n.display)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("blockScroll",!0)("maximizable",!0)("breakpoint",840)("contentStyle",t.ɵɵpureFunction0(14,Ce)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.pdfBase64))},directives:[c.Dialog,l.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Ie,[{type:t.Component,args:[{selector:"pdf-modal",templateUrl:"./pdf-modal.component.html",styleUrls:["./pdf-modal.component.css"]}]}],(function(){return[{type:ve},{type:ye},{type:g.DomSanitizer}]}),null);var xe=function(){},Me=function(){},we=function(){function e(e){this.httpClient=e,this.url_host="",this.login=new t.EventEmitter,this.seleccionEmpresa=new t.EventEmitter,this.auth=new Me}return e.prototype.setlogin=function(e,t){localStorage.setItem("lang","es");var n=JSON.parse(localStorage.getItem("config"));return n&&n.url&&(this.url_host=n.url),this.httpClient.post(this.url_host+"/login"+(t?"/"+t:""),e)},e.prototype.startAuth=function(e){this.auth=e,this.login.emit(this.auth)},e.prototype.isLogin=function(){return null!==localStorage.getItem("usuario")},e.prototype.quitarUsuario=function(){localStorage.removeItem("usuario"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.verificaLogin=function(){var e=this;this.usuario=this.getUser(),this.usuario.access_token?this.getDetalsUser().subscribe((function(t){e.auth.usuarioDetalles=t,e.auth.login=!0,e.login.emit(e.auth)}),(function(t){e.quitarUsuario()})):(this.auth.usuarioDetalles=null,this.auth.login=!1,this.login.emit(this.auth))},e.prototype.loginOut=function(){this.quitarEmpresaAdministrativa().subscribe((function(e){localStorage.removeItem("usuario")}),(function(e){localStorage.removeItem("usuario")})),localStorage.setItem("lang","es"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.getUser=function(){if(this.usuario=new xe,this.isLogin()){var e=localStorage.getItem("usuario");return e&&(this.usuario=JSON.parse(e)),this.usuario}return this.usuario},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.selectEmpresa=function(e){this.seleccionEmpresa.emit(e)},e.prototype.quitarEmpresaAdministrativa=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",{id:0},r)},e.prototype.setEmpresa=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",e,i)},e.prototype.setModulo=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setModulo",e,i)},e.prototype.quitarModulo=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setModulo",{id:0},r)},e.prototype.getDetalsUser=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.get(this.url_host+"/usuario/obtieneUsuarioActual",r)},e}();function Ee(e,n){1&e&&(t.ɵɵelementStart(0,"label",19),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"Usuario.errorLogin")))}function De(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",8),t.ɵɵelementStart(2,"form",9,10),t.ɵɵlistener("ngSubmit",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵreference(3);return t.ɵɵnextContext().entrar(e)})),t.ɵɵtemplate(4,Ee,3,3,"label",11),t.ɵɵelementStart(5,"div",12),t.ɵɵelementStart(6,"label",13),t.ɵɵtext(7),t.ɵɵpipe(8,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"input",14,15),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.username=e})),t.ɵɵpipe(11,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"div",12),t.ɵɵelementStart(13,"label",16),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"input",17),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.password=e})),t.ɵɵpipe(17,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(18,"button",18),t.ɵɵtext(19,"entrar"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngIf",r.error),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(8,7,"Usuario.username")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(11,9,"Usuario.username")),t.ɵɵproperty("ngModel",r.user.username),t.ɵɵadvance(5),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,11,"Usuario.password")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(17,13,"Usuario.password")),t.ɵɵproperty("ngModel",r.user.password)}}function je(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",22),t.ɵɵelementStart(1,"div",23),t.ɵɵelementStart(2,"div",24),t.ɵɵelementStart(3,"h5"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(4),t.ɵɵtextInterpolate1(" ",o.nombre," ")}}function Ae(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",20),t.ɵɵelementStart(2,"h4"),t.ɵɵtext(3,"Selecciona la empresa"),t.ɵɵelementEnd(),t.ɵɵelement(4,"hr"),t.ɵɵelementEnd(),t.ɵɵtemplate(5,je,5,1,"div",21),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(5),t.ɵɵproperty("ngForOf",o.empresas)}}we.ɵfac=function(e){return new(e||we)(t.ɵɵinject(n.HttpClient))},we.ɵprov=t.ɵɵdefineInjectable({token:we,factory:we.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(we,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),{login:[{type:t.Output}],seleccionEmpresa:[{type:t.Output}]});var ke=function(){function e(e,t){var n=this;this.loginModalService=e,this.authService=t,this.modal=!1,this.user={username:void 0,password:void 0},this.error=!1,this.empresas=[],this.loginModalService.modal.subscribe((function(e){$("#modalLogin").modal("show"),n.user={username:void 0,password:void 0},n.empresas=[]}))}return e.prototype.entrar=function(e){var t=this;if(e.valid){this.user.key="";var n=this.user.password.split("_");if(n.length>1){this.user.key=n[0],this.user.password="";for(var o=1;o<n.length;o++)this.user.password+=n[o]}this.authService.setlogin(this.user,this.user.key).subscribe((function(e){localStorage.setItem("usuario",JSON.stringify(e));var n=e;t.authService.getDetalsUser().subscribe((function(e){e.empresa||(t.empresas=e.empresas,1==t.empresas.length&&t.entrarEmpresa(t.empresas[0]));var o={login:!0};o.usuario=n,o.usuarioDetalles=e,t.authService.startAuth(o),t.error=!1,$("#modalLogin").modal("hide")}))}),(function(e){t.error=!0}))}},e.prototype.entrarEmpresa=function(e){this.authService.setEmpresa(e).subscribe((function(e){$("#modalLogin").modal("hide")}))},e}();ke.ɵfac=function(e){return new(e||ke)(t.ɵɵdirectiveInject(pe),t.ɵɵdirectiveInject(we))},ke.ɵcmp=t.ɵɵdefineComponent({type:ke,selectors:[["app-login-modal"]],decls:8,vars:2,consts:[["id","modalLogin","tabindex","-1","role","dialog","aria-labelledby","exampleModalCenterTitle","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],["src","assets/img/logo_visorus_loading.png","alt",""],["class","row",4,"ngIf"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12"],[3,"ngSubmit"],["datoForm","ngForm"],["class","error",4,"ngIf"],[1,"form-group","mb-3"],["for","exampleInputEmail1"],["type","text","id","exampleInputEmail1","aria-describedby","emailHelp","name","username","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["username","ngModel"],["for","exampleInputPassword1"],["type","password","id","exampleInputPassword1","name","password","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["type","submit","translate","",1,"btn","btn-primary_low","btn-lg","btn-block","my-5","text-light"],[1,"error"],[1,"col-xl-12","col-lg-12","col-sm-12"],["class","col-xl-6 col-lg-6 col-sm-12 mb-2","style","cursor: pointer",4,"ngFor","ngForOf"],[1,"col-xl-6","col-lg-6","col-sm-12","mb-2",2,"cursor","pointer"],[1,"card"],[1,"card-body"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelement(5,"img",5),t.ɵɵelementEnd(),t.ɵɵtemplate(6,De,20,15,"div",6),t.ɵɵtemplate(7,Ae,6,1,"div",6),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(6),t.ɵɵproperty("ngIf",0==n.empresas.length),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.empresas.length))},directives:[l.NgIf,o.ɵangular_packages_forms_forms_ba,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,f.TranslateDirective,l.NgForOf],pipes:[f.TranslatePipe],styles:[".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-invalid[_ngcontent-%COMP%]:not(form), .ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ke,[{type:t.Component,args:[{selector:"app-login-modal",templateUrl:"./login-modal.component.html",styleUrls:["./login-modal.component.css"]}]}],(function(){return[{type:pe},{type:we}]}),null);var Pe=function(e){function t(t){var n=e.call(this,t,"sessionCaja")||this;return n.httpClient=t,n}return J(t,e),t}(K);function Oe(e,n){if(1&e&&(t.ɵɵelementStart(0,"a",4),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1("",o.labels.title,": ")}}function _e(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",5),t.ɵɵelementStart(1,"div",6),t.ɵɵelementStart(2,"label",7),t.ɵɵtext(3,"Nombre de caja: "),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"input",8),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().caja.nombre=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"div",9),t.ɵɵelementStart(6,"label",10),t.ɵɵtext(7,"Saldo: "),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"input",11),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.monto=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"div",9),t.ɵɵelementStart(10,"label",12),t.ɵɵtext(11,"Numero Z:"),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"input",13),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.z=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.caja.nombre)("disabled",!0),t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.monto)("disabled",r.editMode),t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.z)("disabled",!0)}}function Te(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",17),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext(2).save()})),t.ɵɵelementEnd()}}function He(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",18),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext(2).edit()})),t.ɵɵelementEnd()}}function Ue(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵtemplate(0,Te,1,0,"button",14),t.ɵɵtemplate(1,He,1,0,"button",15),t.ɵɵelementStart(2,"button",16),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext().closeModal()})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("ngIf",!r.editMode&&r.caja),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.editMode&&r.caja)}}Pe.ɵfac=function(e){return new(e||Pe)(t.ɵɵinject(n.HttpClient))},Pe.ɵprov=t.ɵɵdefineInjectable({token:Pe,factory:Pe.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Pe,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Be=function(){return{width:"750px"}},Fe=function(){function e(e){this.sessionCajaService=e,this.showCreateSession=!1,this.caja={},this.sessionEdit=null,this.status=new t.EventEmitter,this.success=new t.EventEmitter,this.session={inicio:(new Date).getTime(),termino:null,monedaDenominacionList:[]},this.flagModal=!0,this.labels={title:"Crear nueva session de caja"},this.resp={},this.editMode=!1}return e.prototype.ngOnInit=function(){console.log("denominacionList",this.monedaDenominacionList)},e.prototype.setSession=function(){this.sessionEdit?(this.session=this.sessionEdit,this.session.monedaDenominacionList=this.monedaDenominacionList,this.session.movimientosCaja&&(this.session.monto=this.session.movimientosCaja[0].monto),this.labels={title:"Cerrar session"},this.editMode=!0):this.caja&&(this.labels.title="Crear nueva session de caja",this.session.caja=this.caja,this.session.z=this.caja.z)},e.prototype.closeModal=function(){this.session={},this.editMode=!1,this.status.emit({status:!1})},e.prototype.save=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return e=this,[4,this.sessionCajaService.save(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp?(this.session={},this.editMode=!1,this.status.emit({status:!1,save:this.resp.data}),this.success.emit(!0)):this.success.emit(!1),[2]}}))}))},e.prototype.edit=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return console.log("EDIT",this.session),e=this,[4,this.sessionCajaService.update(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp&&(this.session={},this.editMode=!1,this.status.emit({status:!1,update:this.resp.data})),[2]}}))}))},e}();Fe.ɵfac=function(e){return new(e||Fe)(t.ɵɵdirectiveInject(Pe))},Fe.ɵcmp=t.ɵɵdefineComponent({type:Fe,selectors:[["session-create"]],inputs:{showCreateSession:"showCreateSession",caja:"caja",monedaDenominacionList:"monedaDenominacionList",sessionEdit:"sessionEdit"},outputs:{status:"status",success:"success"},decls:6,vars:9,consts:[[3,"visible","modal","closeOnEscape","closable","blockScroll","visibleChange","onHide","onShow"],["pTemplate","header"],["class","grid grid-fluid",4,"ngIf"],["pTemplate","footer"],[1,"text-primary"],[1,"grid","grid-fluid"],[1,"p-field","col-12"],["for","nombreCaja"],["pInputText","","type","text","id","nombreCaja",3,"ngModel","disabled","ngModelChange"],[1,"p-field","col-12","md:col-6"],["for","saldoCaja"],["pInputText","","type","number","id","saldoCaja",3,"ngModel","disabled","ngModelChange"],["for","numeroZ"],["pInputText","","type","number","id","numeroZ",3,"ngModel","disabled","ngModelChange"],["pButton","","type","button","label","Guardar","class","p-button-sm",3,"click",4,"ngIf"],["pButton","","type","button","label","Cerrar session","class","p-button-sm p-button-success",3,"click",4,"ngIf"],["pButton","","type","button","label","Cancelar",1,"p-button-sm","p-button-danger",3,"click"],["pButton","","type","button","label","Guardar",1,"p-button-sm",3,"click"],["pButton","","type","button","label","Cerrar session",1,"p-button-sm","p-button-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showCreateSession=e}))("onHide",(function(){return n.closeModal()}))("onShow",(function(){return n.setSession()})),t.ɵɵtemplate(1,Oe,2,1,"ng-template",1),t.ɵɵtemplate(2,_e,13,6,"div",2),t.ɵɵelementStart(3,"div"),t.ɵɵtext(4," Este agente no esta asignado a una caja "),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Ue,3,2,"ng-template",3),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction0(8,Be)),t.ɵɵproperty("visible",n.showCreateSession)("modal",n.flagModal)("closeOnEscape",n.flagModal)("closable",n.flagModal)("blockScroll",!0),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",n.caja))},directives:[c.Dialog,a.PrimeTemplate,l.NgIf,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,o.NumberValueAccessor,s.ButtonDirective],styles:[""]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Fe,[{type:t.Component,args:[{selector:"session-create",templateUrl:"./session-create.component.html",styleUrls:["./session-create.component.css"]}]}],(function(){return[{type:Pe}]}),{showCreateSession:[{type:t.Input}],caja:[{type:t.Input}],monedaDenominacionList:[{type:t.Input}],sessionEdit:[{type:t.Input}],status:[{type:t.Output}],success:[{type:t.Output}]});var ze=function(e){function t(t){return e.call(this,t,"/cliente")||this}return J(t,e),t.prototype.validar_archivos_bss=function(e){return this.getHttp().get(this.getUrl("/cliente/validarClienteBss/")+e,this.buildAuth())},t}(K);ze.ɵfac=function(e){return new(e||ze)(t.ɵɵinject(n.HttpClient))},ze.ɵprov=t.ɵɵdefineInjectable({token:ze,factory:ze.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ze,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Re=function(){function e(e){this.translate=e}return e.prototype.getPage=function(){return{rows:25,total:void 0,offset:0,filtro:void 0,sort:void 0}},e.prototype.getParams=function(e){return[{param:"offset",value:e.offset},{param:"max",value:e.rows},{param:"filter",value:e.filtro},{param:"sort",value:e.sort}]},e.prototype.getOrden=function(e,t){t&&this.translate.setDefaultLang(t);for(var n,o=[],r=[],i=0;i<e.length;i++)o.push({label:"...",value:e[i].label}),r.push(e[i].param);return r.length>0&&this.translate.get(r).subscribe((function(e){n=e;var t=Object.values(n),r=0;o.forEach((function(e){e.label=""+t[r],r++}))}),(function(e){})),o},e}();function qe(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"Cliente.limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"Cliente.plazoCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"Cliente.diasPago")))}function Le(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function Ne(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function Ve(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",8),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,Le,3,3,"span",9),t.ɵɵtemplate(7,Ne,3,3,"span",9),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.plazoCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.diasPago)}}function $e(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",10),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,1,"general.noRegistros")))}Re.ɵfac=function(e){return new(e||Re)(t.ɵɵinject(f.TranslateService))},Re.ɵprov=t.ɵɵdefineInjectable({token:Re,factory:Re.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Re,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:f.TranslateService}]}),null);var Je=function(){function e(e,n){this.clienteService=e,this.paginate=n,this.selectMode="single",this.select=new t.EventEmitter,this.ordenar=[],this.loading=!0}return e.prototype.ngOnInit=function(){this.page=this.paginate.getPage(),this.page.rows=20,this.clientes=[],this.ordenar=this.paginate.getOrden([{param:"razonZocial",label:"razonZocial"}],"es")},e.prototype.cargarDatosClientes=function(e){var t=this;void 0===e&&(e=null),this.loading=!0,e&&(this.page.rows=e.rows,this.page.offset=e.first),this.clientes=[],this.params=this.paginate.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.page.filtro&&""!==this.page.filtro.trim()&&this.params.push({param:"filtroGeneral",value:this.page.filtro.trim()}),this.clienteService.getAll(this.params).subscribe((function(e){t.page.total=e.total,t.clientes=e.data,t.loading=!1}),(function(e){console.error("Error al cargar clientes:",e),t.loading=!1}))},e.prototype.aplicarFiltro=function(){this.page.offset=0,this.cargarDatosClientes()},e.prototype.seleccionaCliente=function(e){console.log("Fila seleccionada (evento):",e),console.log("Datos de la fila (e.data):",e.data),console.log("Cliente seleccionado ANTES de emitir:",this.clienteSeleccionado),this.select.emit(e.data),this.visible=!1,console.log("Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):",this.clienteSeleccionado)},e.prototype.cerrar=function(){this.select.emit(null),this.visible=!1},e}();Je.ɵfac=function(e){return new(e||Je)(t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(Re))},Je.ɵcmp=t.ɵɵdefineComponent({type:Je,selectors:[["select-cliente"]],inputs:{clienteSeleccionado:"clienteSeleccionado",selectMode:"selectMode",visible:"visible"},outputs:{select:"select"},decls:10,vars:17,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","scrollHeight","350px",3,"value","lazy","paginator","rows","totalRecords","selection","selectionMode","scrollable","loading","onLazyLoad","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSelectableRow"],[4,"ngIf"],["colspan","6"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrar()}))("onShow",(function(){return n.cargarDatosClientes()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.aplicarFiltro()})),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",3),t.ɵɵlistener("click",(function(){return n.aplicarFiltro()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"p-table",4),t.ɵɵlistener("onLazyLoad",(function(e){return n.cargarDatosClientes(e)}))("selectionChange",(function(e){return n.clienteSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionaCliente(e)})),t.ɵɵtemplate(7,qe,19,18,"ng-template",5),t.ɵɵtemplate(8,Ve,14,8,"ng-template",6),t.ɵɵtemplate(9,$e,4,3,"ng-template",7),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,13,"Seleccionar cliente ")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(4,15,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate("selectionMode",n.selectMode),t.ɵɵproperty("value",n.clientes)("lazy",!0)("paginator",!0)("rows",n.page.rows)("totalRecords",n.page.total)("selection",n.clienteSeleccionado)("scrollable",!0)("loading",n.loading))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,h.Table,a.PrimeTemplate,h.SelectableRow,l.NgIf],pipes:[f.TranslatePipe],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Je,[{type:t.Component,args:[{selector:"select-cliente",templateUrl:"./select-cliente.component.html"}]}],(function(){return[{type:ze},{type:Re}]}),{clienteSeleccionado:[{type:t.Input}],selectMode:[{type:t.Input}],visible:[{type:t.Input}],select:[{type:t.Output}]});var Ze=function(){},Ge=function(){this.datoPersona=new Ze,this.contactos=[],this.datoDirecciones=[]},We=function(){this.representanteLegal=new Ge,this.contactos=[],this.datoDirecciones=[]},Ye=function(){},Ke=function(){this.personaMoral=new We,this.catalogoTipo=new Ye,this.clasificadorTipo=new Ye,this.personaFisica=new Ge},Qe=function(e){function t(t){var n=e.call(this,t,"/proveedor")||this;return n.httpClient=t,n}return J(t,e),t}(K);function Xe(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,3,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,5,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,7,"rfc")))}function et(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.rowData;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc)}}Qe.ɵfac=function(e){return new(e||Qe)(t.ɵɵinject(n.HttpClient))},Qe.ɵprov=t.ɵɵdefineInjectable({token:Qe,factory:Qe.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Qe,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var tt=function(){return[10,25,50,100,500]},nt=function(){function e(e,n,o){this.proveedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.proveedorSeleccionado=new Ke,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.proveedores=[]},e.prototype.cargarDatosProveedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.proveedorService.getAll(this.params).subscribe((function(t){e.proveedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosProveedores()},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarProveedor=function(e){this.select.emit(e.data),this.visible=!1},e}();nt.ɵfac=function(e){return new(e||nt)(t.ɵɵdirectiveInject(Qe),t.ɵɵdirectiveInject(Re),t.ɵɵdirectiveInject(f.TranslateService))},nt.ɵcmp=t.ɵɵdefineComponent({type:nt,selectors:[["select-proveedor"]],inputs:{visible:"visible",proveedorSeleccionado:"proveedorSeleccionado"},outputs:{select:"select"},decls:10,vars:16,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","change"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","valueChange","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("change",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",3),t.ɵɵlistener("click",(function(){return n.cargarDatosProveedores()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"p-table",4),t.ɵɵlistener("valueChange",(function(e){return n.proveedores=e}))("selectionChange",(function(e){return n.proveedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarProveedor(e)})),t.ɵɵtemplate(7,Xe,10,9,"ng-template",5),t.ɵɵtemplate(8,et,7,3,"ng-template",6),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"p-paginator",7),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,11,"ArticuloProveedor.proveedores")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(4,13,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵproperty("value",n.proveedores)("selection",n.proveedorSeleccionado)("scrollable",!0),t.ɵɵadvance(3),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(15,tt)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,h.Table,a.PrimeTemplate,v.Paginator],pipes:[f.TranslatePipe],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(nt,[{type:t.Component,args:[{templateUrl:"select-proveedor.component.html",selector:"select-proveedor"}]}],(function(){return[{type:Qe},{type:Re},{type:f.TranslateService}]}),{visible:[{type:t.Input}],proveedorSeleccionado:[{type:t.Input}],select:[{type:t.Output}]});var ot=function(e){function t(t){var n=e.call(this,t,"stock")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerExistenciasArticulosDescripcion=function(e,t){var n=this,o=this.getBaseUrl()+"/stock/obtenerExistenciasArticulos";return new Promise((function(r,i){n.httpClient.post(o+n.serializeParams(t),e,n.buildAuth()).subscribe((function(e){r(e)}),(function(e){i(e)}))}))},t}(K);ot.ɵfac=function(e){return new(e||ot)(t.ɵɵinject(n.HttpClient))},ot.ɵprov=t.ɵɵdefineInjectable({token:ot,factory:ot.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ot,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var rt=function(e){function t(t){var n=e.call(this,t,"/almacen")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerAlmacenEmpresa=function(){var e=this.geturl()+"/obtenerAlmacenEmpresa";return this.getHttp().get(e,this.buildAuth())},t}(K);rt.ɵfac=function(e){return new(e||rt)(t.ɵɵinject(n.HttpClient))},rt.ɵprov=t.ɵɵdefineInjectable({token:rt,factory:rt.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(rt,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var it=function(e){function t(t){var n=e.call(this,t,"articulo")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerExistencias=function(e){var t="/existenciasArticulo/"+e;return this.httpClient.get(this.geturl()+t,this.buildAuth())},t}(K);function at(e,n){if(1&e&&t.ɵɵelement(0,"col"),2&e){var o=n.$implicit;t.ɵɵstyleProp("width",o.width)}}function lt(e,n){if(1&e&&(t.ɵɵelementStart(0,"colgroup"),t.ɵɵtemplate(1,at,1,2,"col",7),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function st(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",9),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",o.header," ")}}function ct(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵtemplate(1,st,2,1,"th",8),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"td"),t.ɵɵtext(8),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"td"),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.existencia)}}it.ɵfac=function(e){return new(e||it)(t.ɵɵinject(n.HttpClient))},it.ɵprov=t.ɵɵdefineInjectable({token:it,factory:it.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(it,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var ut=function(e){return{width:e,"min-width":"200px"}},dt=function(){return{width:"600px"}},ft=function(){function e(e){this.articuloInformacionService=e,this.eventSelection=new t.EventEmitter,this.flagModal=!0,this.size=640,this.params=[{param:"offset",value:0},{param:"max",value:-1},{param:"order",value:"asc"}],this.columnsData=[{field:"codigo",header:"Código Almacén",width:"90px"},{field:"descripcion",header:"Descripción Almacen",width:"140px"},{field:"codigo",header:"Código Ubicación",width:"90px"},{field:"descripcion",header:"Descripción Ubicación",width:"140px"},{field:"opciones",header:"Existencia",width:"80px"}]}return e.prototype.ngOnInit=function(){this.OnLoad()},e.prototype.hiddenDialog=function(){this.eventSelection.emit({status:!1})},e.prototype.OnResize=function(e){this.isMovil=e.target.innerWidth<=640},e.prototype.OnLoad=function(){var e=this;this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe((function(t){e.existenciasList=t.data}))},e.prototype.OnShow=function(){this.titulo="Existencias en Almacenes"},e.prototype.onSelectedUbicacion=function(e){this.eventSelection.emit({status:!1,ubicacion:e})},e}();function mt(e,n){if(1&e&&(t.ɵɵelementStart(0,"option",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵpropertyInterpolate("value",o.id),t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function gt(e,n){1&e&&(t.ɵɵelementStart(0,"th",31),t.ɵɵtext(1,"existenciaSecundaria"),t.ɵɵelementEnd())}function ht(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Unidad"),t.ɵɵelementEnd())}function vt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio"),t.ɵɵelementEnd())}function yt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 2"),t.ɵɵelementEnd())}function bt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 3"),t.ɵɵelementEnd())}function St(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 4"),t.ɵɵelementEnd())}function Ct(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 5"),t.ɵɵelementEnd())}function It(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Movimiento.costo"),t.ɵɵelementEnd())}function xt(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function Mt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",23),t.ɵɵtext(2,"Código Ubicacion"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",24),t.ɵɵtext(4,"Existencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",25),t.ɵɵtext(6,"Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(7,gt,2,0,"th",26),t.ɵɵtemplate(8,ht,2,0,"th",27),t.ɵɵelementStart(9,"th",23),t.ɵɵtext(10,"Código"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"th",28),t.ɵɵtext(12,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelement(13,"th",25),t.ɵɵtemplate(14,vt,2,0,"th",29),t.ɵɵtemplate(15,yt,2,0,"th",29),t.ɵɵtemplate(16,bt,2,0,"th",29),t.ɵɵtemplate(17,St,2,0,"th",29),t.ɵɵtemplate(18,Ct,2,0,"th",29),t.ɵɵtemplate(19,It,2,0,"th",27),t.ɵɵelementStart(20,"th",25),t.ɵɵtext(21,"Existencia por Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(22,xt,2,1,"th",30),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(7),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(6),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===o.configuracion.tipoPrecio),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",o.clasificadorList)}}function wt(e,n){1&e&&(t.ɵɵelementStart(0,"td",23),t.ɵɵtext(1,"Movimiento.NoAsignado"),t.ɵɵelementEnd())}function Et(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.ubicacionCodigo)}}function Dt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",44),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.existenciaSecundaria)}}function jt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",36),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.unidadSecundariaCodigo)}}function At(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(2,1,o.precioConImpuestos)," ")}}function kt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio2ConImpuestos))}}function Pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio3ConImpuestos))}}function Ot(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio4ConImpuestos))}}function _t(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio5ConImpuestos))}}function Tt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",36),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio))}}function Ht(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",45),t.ɵɵelementStart(1,"div",46),t.ɵɵelementStart(2,"label",47),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",46),t.ɵɵelementStart(5,"label",47),t.ɵɵtext(6),t.ɵɵpipe(7,"number"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(3),t.ɵɵtextInterpolate(o.unidad_codigo),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(7,2,o.unidad_existencia,"1.2-2"))}}function Ut(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.valor)}}function Bt(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"tr",32),t.ɵɵtemplate(1,wt,2,0,"td",33),t.ɵɵtemplate(2,Et,2,1,"td",34),t.ɵɵelementStart(3,"td",35),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td",36),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵtemplate(7,Dt,2,1,"td",37),t.ɵɵtemplate(8,jt,2,1,"td",38),t.ɵɵelementStart(9,"td",39),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"td",40),t.ɵɵtext(12),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"td",36),t.ɵɵelementStart(14,"button",41),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=n.$implicit;return t.ɵɵnextContext().onShowInformacion(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(15,At,3,3,"td",34),t.ɵɵtemplate(16,kt,3,3,"td",34),t.ɵɵtemplate(17,Pt,3,3,"td",34),t.ɵɵtemplate(18,Ot,3,3,"td",34),t.ɵɵtemplate(19,_t,3,3,"td",34),t.ɵɵtemplate(20,Tt,3,3,"td",38),t.ɵɵelementStart(21,"td",36),t.ɵɵtemplate(22,Ht,8,5,"div",42),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Ut,2,1,"td",43),t.ɵɵelementEnd()}if(2&e){var r=n.$implicit,i=t.ɵɵnextContext();t.ɵɵproperty("pSelectableRow",r),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!r.ubicacionCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.existencia),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.unidadCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.descripcion),t.ɵɵadvance(3),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===i.configuracion.tipoPrecio),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",r.existenciaUnidades),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",r.articuloClasificadorList)}}function Ft(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"lib-seleccion-articulo-informacion",48),t.ɵɵlistener("eventSelection",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().onEventInformacion(e)})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("showModal",r.showModalInformacion)("articulo",r.articuloSelected)}}ft.ɵfac=function(e){return new(e||ft)(t.ɵɵdirectiveInject(it))},ft.ɵcmp=t.ɵɵdefineComponent({type:ft,selectors:[["lib-seleccion-articulo-informacion"]],inputs:{showModal:"showModal",articulo:"articulo"},outputs:{eventSelection:"eventSelection"},decls:8,vars:20,consts:[[3,"header","visible","modal","minY","baseZIndex","draggable","blockScroll","maximizable","breakpoint","onShow","visibleChange","onHide","resize"],["scrollHeight","350px",3,"columns","value","scrollable","responsive"],["pTemplate","colgroup"],["pTemplate","header"],["pTemplate","body"],[1,"container-end"],["pButton","","type","button","icon","pi pi-replay","label","Cerrar",1,"ui-button-raised","ui-button-secondary",3,"click"],[3,"width",4,"ngFor","ngForOf"],["pResizableColumn","",4,"ngFor","ngForOf"],["pResizableColumn",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("onShow",(function(){return n.OnShow()}))("visibleChange",(function(e){return n.showModal=e}))("onHide",(function(){return n.hiddenDialog()}))("resize",(function(e){return n.OnResize(e)}),!1,t.ɵɵresolveWindow),t.ɵɵelementStart(1,"p-table",1),t.ɵɵtemplate(2,lt,2,1,"ng-template",2),t.ɵɵtemplate(3,ct,2,1,"ng-template",3),t.ɵɵtemplate(4,pt,11,5,"ng-template",4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"p-footer"),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"button",6),t.ɵɵlistener("click",(function(){return n.hiddenDialog()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(17,ut,n.size+"px")),t.ɵɵproperty("header",n.titulo)("visible",n.showModal)("modal",n.flagModal)("minY",70)("baseZIndex",1e4)("draggable",!1)("blockScroll",!0)("maximizable",!0)("breakpoint",640),t.ɵɵadvance(1),t.ɵɵstyleMap(t.ɵɵpureFunction0(19,dt)),t.ɵɵproperty("columns",n.columnsData)("value",n.existenciasList)("scrollable",!0)("responsive",!0))},directives:[c.Dialog,h.Table,a.PrimeTemplate,a.Footer,s.ButtonDirective,l.NgForOf,h.ResizableColumn],styles:[""]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ft,[{type:t.Component,args:[{selector:"lib-seleccion-articulo-informacion",templateUrl:"./seleccion-articulo-informacion.component.html",styleUrls:["./seleccion-articulo-informacion.component.css"]}]}],(function(){return[{type:it}]}),{showModal:[{type:t.Input}],articulo:[{type:t.Input}],eventSelection:[{type:t.Output}]});var zt=function(e){return{width:e,"min-width":"200px"}},Rt=function(){return[10,25,50,100,500]},qt=function(){function e(e,n,o){this._stockService=e,this._paginateService=n,this._almacenService=o,this.manejaUnidadSecundaria=!1,this.emitFilaSeleccionada=new t.EventEmitter,this.emitShowArticulos=new t.EventEmitter,this.articulosList=[],this.ordenar=[],this.busquedaArticulos={tipoBusqueda:""},this.showModal=!1,this.showModalInformacion=!1,this.showFirstTime=!0,this.clasificadorList=[],this.size=640}return e.prototype.ngOnInit=function(){var e=this;this.page=this._paginateService.getPage(),this.ordenar=this._paginateService.getOrden([{param:"nombre",label:"estatus"}],"es"),this.showFirstTime=!0,this._almacenService.getAll(this.configuracion.params).subscribe((function(t){e.almacenList=t.data})),this.busquedaArticulos.tipoBusqueda="CD"},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosShow=function(){this.busquedaArticulos.tipoBusqueda="CD",this.showFirstTime&&(this.obtenerExistenciaArticulos(),this.showFirstTime=!1)},e.prototype.obtenerExistenciaArticulos=function(){var e=this;this.busquedaArticulos.params=this._paginateService.getParams(this.page);var t={almacen:this.configuracion.noOcupaAlamacen?null:this.movimiento.almacen,tipoPrecio:this.configuracion.tipoPrecio,busquedaArticulos:this.busquedaArticulos,tipoArticulo:this.configuracion.tipoArticulo?this.configuracion.tipoArticulo:null,numeroPrecioDefault:this.configuracion.numeroPrecioDefault};this._stockService.obtenerExistenciasArticulosDescripcion(t,this.busquedaArticulos.params).then((function(t){e.articulosList=t.articulosDescripcion,e.page.total=t.total,t.clasificadores&&(e.clasificadorList=t.clasificadores),e.showModal||(e.showModal=!0)})).catch((function(t){e.articulosList=[]}))},e.prototype.obtenerExistenciaArticulosVal=function(){if(""!=this.busquedaArticulos.tipoBusqueda&&!this.busquedaArticulos.key)return!1;this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosKey=function(e){"Enter"===e.key&&this.obtenerExistenciaArticulos()},e.prototype.filaSeleccionada=function(e){this.emitFilaSeleccionada.emit(e)},e.prototype.emitirShowArticulos=function(){this.emitShowArticulos.emit(0)},e.prototype.seriesArticulo=function(e){console.log(e)},e.prototype.onShowInformacion=function(e){this.articuloSelected=e,this.showModalInformacion=!0},e.prototype.onEventInformacion=function(e){this.showModalInformacion=e.status},e}();qt.ɵfac=function(e){return new(e||qt)(t.ɵɵdirectiveInject(ot),t.ɵɵdirectiveInject(Re),t.ɵɵdirectiveInject(rt))},qt.ɵcmp=t.ɵɵdefineComponent({type:qt,selectors:[["app-selecciona-articulo"]],inputs:{configuracion:"configuracion",showArticulos:"showArticulos",movimiento:"movimiento",manejaUnidadSecundaria:"manejaUnidadSecundaria"},outputs:{emitFilaSeleccionada:"emitFilaSeleccionada",emitShowArticulos:"emitShowArticulos"},decls:30,vars:25,consts:[[3,"header","visible","maximizable","baseZIndex","blockScroll","minY","visibleChange","onShow","onHide"],[1,"grid","grid-fluid"],[1,"col-12","md:col-6","lg:col-6"],[2,"display","flex"],[2,"width","115px"],["pInputText","",3,"ngModel","ngModelChange","change"],["value","C"],["value","D"],["value","CD"],["value","CI"],["type","text","pInputText","","id","key",2,"width","200px",3,"ngModel","ngModelChange","keypress"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],[2,"width","100px"],["for","almacen"],["pInputText","","disabled","","id","almacen",2,"width","200px",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["scrollHeight","400px","selectionMode","single",3,"value","scrollable","responsive","onRowSelect"],["dt",""],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"showModal","articulo","eventSelection",4,"ngIf"],[3,"value"],["translate","",2,"width","80px"],["translate","",2,"width","70px"],["translate","",2,"width","40px"],["style","width: 50px","translate","",4,"ngIf"],["style","width: 40px","translate","",4,"ngIf"],["translate","",2,"width","120px"],["style","width: 80px","translate","",4,"ngIf"],["style","width: 80px","translate","",4,"ngFor","ngForOf"],["translate","",2,"width","50px"],[3,"pSelectableRow"],["style","width: 80px;","translate","",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","70px"],[2,"width","40px"],["style","width: 50px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","80px"],[2,"width","120px"],["pButton","","type","button","icon","pi pi-eye",1,"ui-button-raised","ui-button-primary",3,"click"],["class","row justify-content-between",4,"ngFor","ngForOf"],["style","width: 80px;",4,"ngFor","ngForOf"],[2,"width","50px"],[1,"row","justify-content-between"],[1,"col-lg-4"],["for",""],[3,"showModal","articulo","eventSelection"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showArticulos=e}))("onShow",(function(){return n.obtenerExistenciaArticulosShow()}))("onHide",(function(){return n.busquedaArticulos={tipoBusqueda:""},n.emitirShowArticulos()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"div",2),t.ɵɵelementStart(4,"div",3),t.ɵɵelementStart(5,"div",4),t.ɵɵelementStart(6,"select",5),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.tipoBusqueda=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵelementStart(7,"option",6),t.ɵɵtext(8,"Codigo"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"option",7),t.ɵɵtext(10,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"option",8),t.ɵɵtext(12,"Coincidencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"option",9),t.ɵɵtext(14,"Igual a"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(15,"input",10),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.key=e}))("keypress",(function(e){return n.obtenerExistenciaArticulosKey(e)})),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"button",11),t.ɵɵlistener("click",(function(){return n.obtenerExistenciaArticulos()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"div",2),t.ɵɵelementStart(18,"div",3),t.ɵɵelementStart(19,"div",12),t.ɵɵelementStart(20,"label",13),t.ɵɵtext(21,"Almacen:"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(22,"select",14),t.ɵɵlistener("ngModelChange",(function(e){return n.movimiento.almacen=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵtemplate(23,mt,2,2,"option",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(24,"p-table",16,17),t.ɵɵlistener("onRowSelect",(function(e){return n.filaSeleccionada(e)})),t.ɵɵtemplate(26,Mt,23,9,"ng-template",18),t.ɵɵtemplate(27,Bt,24,17,"ng-template",19),t.ɵɵelementEnd(),t.ɵɵelementStart(28,"p-paginator",20),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(29,Ft,1,2,"lib-seleccion-articulo-informacion",21)),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(22,zt,n.size+"px")),t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,20,"Articulos")),t.ɵɵproperty("visible",n.showArticulos)("maximizable",!0)("baseZIndex",1e4)("blockScroll",!0)("minY",70),t.ɵɵadvance(6),t.ɵɵproperty("ngModel",n.busquedaArticulos.tipoBusqueda),t.ɵɵadvance(9),t.ɵɵproperty("ngModel",n.busquedaArticulos.key),t.ɵɵadvance(7),t.ɵɵproperty("ngModel",n.movimiento.almacen),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.almacenList),t.ɵɵadvance(1),t.ɵɵproperty("value",n.articulosList)("scrollable",!0)("responsive",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(24,Rt)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.showModalInformacion))},directives:[c.Dialog,o.SelectControlValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,o.NgSelectOption,o.ɵangular_packages_forms_forms_z,o.DefaultValueAccessor,s.ButtonDirective,l.NgForOf,h.Table,a.PrimeTemplate,v.Paginator,l.NgIf,f.TranslateDirective,h.SelectableRow,ft],pipes:[f.TranslatePipe,l.CurrencyPipe,l.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(qt,[{type:t.Component,args:[{selector:"app-selecciona-articulo",templateUrl:"./selecciona-articulo.component.html",styleUrls:["./selecciona-articulo.component.css"]}]}],(function(){return[{type:ot},{type:Re},{type:rt}]}),{configuracion:[{type:t.Input}],showArticulos:[{type:t.Input}],movimiento:[{type:t.Input}],manejaUnidadSecundaria:[{type:t.Input}],emitFilaSeleccionada:[{type:t.Output}],emitShowArticulos:[{type:t.Output}]});var Lt=function(e){function t(t){var n=e.call(this,t,"acreedor")||this;return n.httpClient=t,n}return J(t,e),t}(K);function Nt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"rfc")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"atrasoDiasEntrega")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"fechaUltimaCompra")))}function Vt(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function $t(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function Jt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",9),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,Vt,3,3,"span",10),t.ɵɵtemplate(7,$t,3,3,"span",10),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵpipe(14,"date"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.atrasoDiasEntrega),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(14,8,o.fechaUltimaCompra,"dd/MM/yyyy"))}}function Zt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵattribute("colspan",6),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,2,"general.noRegistros")))}Lt.ɵfac=function(e){return new(e||Lt)(t.ɵɵinject(n.HttpClient))},Lt.ɵprov=t.ɵɵdefineInjectable({token:Lt,factory:Lt.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Lt,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Gt=function(){return[10,25,50,100,500]},Wt=function(){function e(e,n,o){this.acreedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.acreedorSeleccionado=new Ke,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.acreedores=[]},e.prototype.cargarDatosAcreedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.acreedorService.getAll(this.params).subscribe((function(t){e.acreedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosAcreedores},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarAcreedor=function(e){this.select.emit(e.data),this.visible=!1},e}();Wt.ɵfac=function(e){return new(e||Wt)(t.ɵɵdirectiveInject(Lt),t.ɵɵdirectiveInject(Re),t.ɵɵdirectiveInject(f.TranslateService))},Wt.ɵcmp=t.ɵɵdefineComponent({type:Wt,selectors:[["select-acreedor"]],inputs:{visible:"visible",acreedorSeleccionado:"acreedorSeleccionado"},outputs:{select:"select"},decls:10,vars:14,consts:[["header","Selecciona el acreedor",3,"visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","responsive","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"pSelectableRow"],[4,"ngIf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.cargarDatosAcreedores()})),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"button",3),t.ɵɵlistener("click",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"p-table",4),t.ɵɵlistener("selectionChange",(function(e){return n.acreedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarAcreedor(e)})),t.ɵɵtemplate(6,Nt,19,18,"ng-template",5),t.ɵɵtemplate(7,Jt,15,11,"ng-template",6),t.ɵɵtemplate(8,Zt,4,4,"ng-template",7),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"p-paginator",8),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(3,11,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵproperty("value",n.acreedores)("selection",n.acreedorSeleccionado)("scrollable",!0)("responsive",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(13,Gt)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,h.Table,a.PrimeTemplate,v.Paginator,h.SelectableRow,l.NgIf],pipes:[f.TranslatePipe,l.DatePipe],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Wt,[{type:t.Component,args:[{templateUrl:"select-acreedor.component.html",selector:"select-acreedor"}]}],(function(){return[{type:Lt},{type:Re},{type:f.TranslateService}]}),{visible:[{type:t.Input}],acreedorSeleccionado:[{type:t.Input}],select:[{type:t.Output}]});var Yt=[ge,he,ke,Ie,Fe,Je,nt,qt,Wt],Kt=[F.CardModule,B.TooltipModule,U.OverlayPanelModule,T.RadioButtonModule,O.CheckboxModule,k.AutoCompleteModule,h.TableModule,i.TreeTableModule,j.CalendarModule,h.TableModule,s.ButtonModule,r.InputTextModule,y.DropdownModule,b.InputMaskModule,S.MessagesModule,C.MessageModule,v.PaginatorModule,I.ConfirmDialogModule,x.ProgressBarModule,M.TriStateCheckboxModule,w.KeyFilterModule,E.InputSwitchModule,c.DialogModule,D.TabViewModule,A.PanelModule,q.ToolbarModule,R.SplitButtonModule,P.FieldsetModule,_.TreeModule,H.TabMenuModule,z.MenubarModule],Qt=[a.ConfirmationService];function Xt(e){return new L.TranslateHttpLoader(e,"./assets/i18n/",".json")}var en=function(){};en.ɵfac=function(e){return new(e||en)},en.ɵmod=t.ɵɵdefineNgModule({type:en}),en.ɵinj=t.ɵɵdefineInjector({providers:[Qt,{provide:n.HTTP_INTERCEPTORS,useClass:de,multi:!0}],imports:[[l.CommonModule,Kt,o.FormsModule,d.ToastrModule.forRoot(),f.TranslateModule.forRoot({loader:{provide:f.TranslateLoader,useFactory:Xt,deps:[n.HttpClient]}})]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(en,{declarations:[fe,ge,he,ke,Ie,Fe,Je,nt,qt,Wt,re,se,ft],imports:[l.CommonModule,F.CardModule,B.TooltipModule,U.OverlayPanelModule,T.RadioButtonModule,O.CheckboxModule,k.AutoCompleteModule,h.TableModule,i.TreeTableModule,j.CalendarModule,h.TableModule,s.ButtonModule,r.InputTextModule,y.DropdownModule,b.InputMaskModule,S.MessagesModule,C.MessageModule,v.PaginatorModule,I.ConfirmDialogModule,x.ProgressBarModule,M.TriStateCheckboxModule,w.KeyFilterModule,E.InputSwitchModule,c.DialogModule,D.TabViewModule,A.PanelModule,q.ToolbarModule,R.SplitButtonModule,P.FieldsetModule,_.TreeModule,H.TabMenuModule,z.MenubarModule,o.FormsModule,d.ToastrModule,f.TranslateModule],exports:[ge,he,ke,Ie,Fe,Je,nt,qt,Wt,re,se]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(en,[{type:t.NgModule,args:[{declarations:[fe,Yt,ce,ft],imports:[l.CommonModule,Kt,o.FormsModule,d.ToastrModule.forRoot(),f.TranslateModule.forRoot({loader:{provide:f.TranslateLoader,useFactory:Xt,deps:[n.HttpClient]}})],providers:[Qt,{provide:n.HTTP_INTERCEPTORS,useClass:de,multi:!0}],exports:[Yt,ce]}]}],null,null);var tn=function(){function e(e){this.authService=e,this.cambioAcciones=new t.EventEmitter,this.changeDetalleUsuario=new t.EventEmitter}return e.prototype.set=function(e){this.detallesUsuarios=e,this.changeDetalleUsuario.emit(this.detallesUsuarios)},e.prototype.canActivete=function(e){for(var t=!1,n=this.authService.getUser(),o=function(o){if(t)return{value:t};var r=n.roles.filter((function(t){return t===e[o]}));t=r.length>0},r=0;r<e.length;r++){var i=o(r);if("object"==typeof i)return i.value}return t},e}();tn.ɵfac=function(e){return new(e||tn)(t.ɵɵinject(we))},tn.ɵprov=t.ɵɵdefineInjectable({token:tn,factory:tn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(tn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:we}]}),{cambioAcciones:[{type:t.Output}],changeDetalleUsuario:[{type:t.Output}]});var nn=function(){function e(e,t){this.http=e,this.authService=t}return e.prototype.initConfig=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))})),this.http.get("assets/version.json").subscribe((function(e){localStorage.removeItem("version"),localStorage.setItem("version",e.hash)}))},e.prototype.cargaConfig=function(){var e=this;this.http.get("assets/config.json").subscribe((function(t){localStorage.setItem("config",JSON.stringify(t));var o=t.url;e.http.post(o+"/login",{username:"admin",password:"admin"}).subscribe((function(t){localStorage.setItem("usuario",JSON.stringify(t));var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t.token_type+" "+t.access_token})};e.http.get(o+"/usuario/obtieneUsuarioActual",r).subscribe((function(t){var n=t.empresas[0];e.authService.setEmpresa(n).subscribe()}))}))}))},e}();nn.ɵfac=function(e){return new(e||nn)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(we))},nn.ɵprov=t.ɵɵdefineInjectable({token:nn,factory:nn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(nn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient},{type:we}]}),null);var on=function(){function e(e){this.toastr=e}return e.prototype.deployMessage=function(e,t,n){switch(void 0===e&&(e=null),e){case"success":this.toastr.success(n,t,{timeOut:3e3});break;case"info":this.toastr.info(n,t,{timeOut:3e3});break;case"warning":this.toastr.warning(n,t,{timeOut:3e3});break;case"error":this.toastr.error(n,t,{timeOut:3e3});break;case null:this.toastr.success(n,t,{timeOut:3e3})}},e.prototype.success=function(e){var t=[];return t.push({severity:"success",summary:"Exito",detail:""+e}),t},e.prototype.error=function(e){var t=[];if(e){if(e.error&&(e=e.error).error)for(var n=0;n<e.error.length;n++)t.push({severity:"error",summary:"Error",detail:""+e.error[n].message})}else e.mensaje&&t.push({severity:"error",summary:"Error",detail:""+e.mensaje});return t},e}();on.ɵfac=function(e){return new(e||on)(t.ɵɵinject(d.ToastrService))},on.ɵprov=t.ɵɵdefineInjectable({token:on,factory:on.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(on,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:d.ToastrService}]}),null);var rn=function(e){function t(t){return e.call(this,t,"/personaMoral")||this}return J(t,e),t}(K);rn.ɵfac=function(e){return new(e||rn)(t.ɵɵinject(n.HttpClient))},rn.ɵprov=t.ɵɵdefineInjectable({token:rn,factory:rn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(rn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var an=function(){function e(e){this.controlAccesoService=e,this.rol="",this.method=""}return e.prototype.canActivate=function(){return this.controlAccesoService.canActivete([this.rol])},e.prototype.permisos=function(e){this.rol=e},e}();an.ɵfac=function(e){return new(e||an)(t.ɵɵinject(tn))},an.ɵprov=t.ɵɵdefineInjectable({token:an,factory:an.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(an,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:tn}]}),null);var ln=function(e){function t(t){var n=e.call(this,t,"catalogoAdicional")||this;return n.httpClient=t,n}return J(t,e),t}(K);ln.ɵfac=function(e){return new(e||ln)(t.ɵɵinject(n.HttpClient))},ln.ɵprov=t.ɵɵdefineInjectable({token:ln,factory:ln.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(ln,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var sn=function(){function e(e,t,n){this.authService=e,this.controlAccesoService=t,this.router=n}return e.prototype.load=function(e){var t=this;return this.authService.getUser()?this.authService.getDetalsUser().subscribe((function(e){for(var n=e.roles,o=0;o<n.length;o++)"ROLE_CLIENTE"===n[o].authority&&t.router.navigate(["movimientos/ventaRapida/create"]);return e.empresa||t.regresaAlprincipal(void 0),t.controlAccesoService.detallesUsuarios=e,t.controlAccesoService.cambioAcciones.emit(!0),!0}),(function(e){t.regresaAlprincipal(void 0)})):this.regresaAlprincipal(void 0),!1},e.prototype.regresaAlprincipal=function(e){var t=JSON.parse(localStorage.getItem("config")),n="";t&&t.host&&(n=t.host),e&&(n+=e),window.location.href=n},e}();sn.ɵfac=function(e){return new(e||sn)(t.ɵɵinject(we),t.ɵɵinject(tn),t.ɵɵinject(N.Router))},sn.ɵprov=t.ɵɵdefineInjectable({token:sn,factory:sn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(sn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:we},{type:tn},{type:N.Router}]}),null);var cn=function(){function e(e){this.http=e,this.currentHash="{{POST_BUILD_ENTERS_HASH_HERE}}",this.versionado=!1,this.frequency=108e5}return e.prototype.initVersionCheck=function(){var e=this;setInterval((function(){e.checkVersion()}),this.frequency)},e.prototype.checkVersion=function(){var e=this;this.http.get("assets/version.json?t="+(new Date).getTime()).subscribe((function(t){var n=t.hash;e.currentHash=localStorage.getItem("version"),e.hasHashChanged(e.currentHash,n)||e.versionado||(e.versionado=!0,confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")?(location.reload(),e.versionado=!1):e.versionado=!1)}),(function(e){console.error(e,"No se pudo obtener versión de software")}))},e.prototype.hasHashChanged=function(e,t){return!(!e||"{{POST_BUILD_ENTERS_HASH_HERE}}"===e)&&e===t},e}();cn.ɵfac=function(e){return new(e||cn)(t.ɵɵinject(n.HttpClient))},cn.ɵprov=t.ɵɵdefineInjectable({token:cn,factory:cn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(cn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var pn=function(){this.personaFisica=new Ge},un=function(e){function t(t){var n=e.call(this,t,"agente")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario";return this.getHttp().post(t,e,this.buildAuth())},t.prototype.getUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario/"+e;return this.getHttp().get(t,this.buildAuth())},t.prototype.obtenerAgenteEmpresa=function(){var e=this.geturl()+"/obtenerAgenteEmpresa";return this.getHttp().get(e,this.buildAuth())},t}(K);un.ɵfac=function(e){return new(e||un)(t.ɵɵinject(n.HttpClient))},un.ɵprov=t.ɵɵdefineInjectable({token:un,factory:un.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(un,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var dn=function(){},fn=function(){},mn=function(){this.datoDireccion=new fn},gn=function(e){function t(t){return e.call(this,t,"/banco")||this}return J(t,e),t}(K);gn.ɵfac=function(e){return new(e||gn)(t.ɵɵinject(n.HttpClient))},gn.ɵprov=t.ɵɵdefineInjectable({token:gn,factory:gn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(gn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var hn=function(){},vn=function(e){function t(t){return e.call(this,t,"/catalogoTipo")||this}return J(t,e),t}(K);vn.ɵfac=function(e){return new(e||vn)(t.ɵɵinject(n.HttpClient))},vn.ɵprov=t.ɵɵdefineInjectable({token:vn,factory:vn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(vn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var yn=function(e){function t(t){return e.call(this,t,"/clasificadorTipo")||this}return J(t,e),t}(K);yn.ɵfac=function(e){return new(e||yn)(t.ɵɵinject(n.HttpClient))},yn.ɵprov=t.ɵɵdefineInjectable({token:yn,factory:yn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(yn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var bn=function(){},Sn=function(e){function t(t){return e.call(this,t,"claveMovimiento")||this}return J(t,e),t}(K);Sn.ɵfac=function(e){return new(e||Sn)(t.ɵɵinject(n.HttpClient))},Sn.ɵprov=t.ɵɵdefineInjectable({token:Sn,factory:Sn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Sn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Cn=function(){this.agenteCobrador=new pn,this.agenteVendedor=new pn,this.personaFisica=new Ge,this.personaMoral=new We},In=function(){this.banco=new mn,this.estatus=!0},xn=function(){},Mn=function(){this.cliente=new Cn,this.flete=new xn,this.estatus=!0},wn=function(e){function t(t){var n=e.call(this,t,"/clienteCuentaBanco")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(K);wn.ɵfac=function(e){return new(e||wn)(t.ɵɵinject(n.HttpClient))},wn.ɵprov=t.ɵɵdefineInjectable({token:wn,factory:wn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(wn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var En=function(e){function t(t){var n=e.call(this,t,"/clienteFlete")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(K);En.ɵfac=function(e){return new(e||En)(t.ɵɵinject(n.HttpClient))},En.ɵprov=t.ɵɵdefineInjectable({token:En,factory:En.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(En,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Dn=function(){this.estatus=!0},jn=function(){this.tipoContacto=new Dn},An=function(e){function t(t){return e.call(this,t,"/contacto")||this}return J(t,e),t}(K);An.ɵfac=function(e){return new(e||An)(t.ɵɵinject(n.HttpClient))},An.ɵprov=t.ɵɵdefineInjectable({token:An,factory:An.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(An,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var kn=function(e){function t(t){return e.call(this,t,"/datoDireccion")||this}return J(t,e),t}(K);kn.ɵfac=function(e){return new(e||kn)(t.ɵɵinject(n.HttpClient))},kn.ɵprov=t.ɵɵdefineInjectable({token:kn,factory:kn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(kn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Pn=function(){},On=function(e){function t(t){return e.call(this,t,"/departamento")||this}return J(t,e),t}(K);On.ɵfac=function(e){return new(e||On)(t.ɵɵinject(n.HttpClient))},On.ɵprov=t.ɵɵdefineInjectable({token:On,factory:On.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(On,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var _n=function(){},Tn=function(){this.datoDireccion=new fn,this.personaMoral=new We,this.claveFormaPagoEfectivo=new _n},Hn=function(){this.empresa=new Tn},Un=function(e){function t(t){var n=e.call(this,t,"/empresa")||this;return n.httpClient=t,n}return J(t,e),t.prototype.get=function(){return this.httpClient.get(this.getBaseUrl()+"/configuracionEmpresaAdministrativo/configuracionUsuario",this.buildAuth())},t}(K);Un.ɵfac=function(e){return new(e||Un)(t.ɵɵinject(n.HttpClient))},Un.ɵprov=t.ɵɵdefineInjectable({token:Un,factory:Un.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Un,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Bn=function(e){function t(t){var n=e.call(this,t,"/flete")||this;return n.httpClient=t,n}return J(t,e),t}(K);Bn.ɵfac=function(e){return new(e||Bn)(t.ɵɵinject(n.HttpClient))},Bn.ɵprov=t.ɵɵdefineInjectable({token:Bn,factory:Bn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Bn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Fn=function(e){function t(t){return e.call(this,t,"/FormaDePago")||this}return J(t,e),t}(K);Fn.ɵfac=function(e){return new(e||Fn)(t.ɵɵinject(n.HttpClient))},Fn.ɵprov=t.ɵɵdefineInjectable({token:Fn,factory:Fn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Fn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var zn=function(){},Rn=function(e){function t(t){var n=e.call(this,t,"/moneda")||this;return n.httpClient=t,n}return J(t,e),t}(K);Rn.ɵfac=function(e){return new(e||Rn)(t.ɵɵinject(n.HttpClient))},Rn.ɵprov=t.ɵɵdefineInjectable({token:Rn,factory:Rn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Rn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var qn=function(){},Ln=function(){},Nn=function(e){function t(t){var n=e.call(this,t,"/PersonaFisica")||this;return n.httpClient=t,n}return J(t,e),t.prototype.getGeneros=function(){return this.httpClient.get(this.getBaseUrl()+"/genero",this.buildAuth())},t.prototype.getEstadoCivil=function(){return this.httpClient.get(this.getBaseUrl()+"/estadoCivil",this.buildAuth())},t}(K);Nn.ɵfac=function(e){return new(e||Nn)(t.ɵɵinject(n.HttpClient))},Nn.ɵprov=t.ɵɵdefineInjectable({token:Nn,factory:Nn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Nn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Vn=function(){this.banco=new mn,this.estatus=!0},$n=function(){this.proveedor=new Ke,this.flete=new xn,this.estatus=!0},Jn=function(e){function t(t){var n=e.call(this,t,"/proveedorCuentaBanco")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(K);Jn.ɵfac=function(e){return new(e||Jn)(t.ɵɵinject(n.HttpClient))},Jn.ɵprov=t.ɵɵdefineInjectable({token:Jn,factory:Jn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Jn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Zn=function(e){function t(t){var n=e.call(this,t,"/proveedorFlete")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(K);Zn.ɵfac=function(e){return new(e||Zn)(t.ɵɵinject(n.HttpClient))},Zn.ɵprov=t.ɵɵdefineInjectable({token:Zn,factory:Zn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Zn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Gn=function(e){function t(t){return e.call(this,t,"claveAumentoDisminucion")||this}return J(t,e),t}(K);Gn.ɵfac=function(e){return new(e||Gn)(t.ɵɵinject(n.HttpClient))},Gn.ɵprov=t.ɵɵdefineInjectable({token:Gn,factory:Gn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Gn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Wn=function(e){function t(t){var n=e.call(this,t,"serieDocumento")||this;return n.httpClient=t,n}return J(t,e),t.prototype.getTipos=function(){return this.httpClient.get(this.getUrl("serieDocumento")+"/tipoSerie",this.buildAuth())},t.prototype.getReporte=function(e){return this.httpClient.get(this.getUrl("serieDocumento")+"/descargaFormatoReporte"+this.serializeParams(e),this.buildAuth())},t}(K);Wn.ɵfac=function(e){return new(e||Wn)(t.ɵɵinject(n.HttpClient))},Wn.ɵprov=t.ɵɵdefineInjectable({token:Wn,factory:Wn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Wn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Yn=function(){},Kn=function(e){function t(t){return e.call(this,t,"/tipoContacto")||this}return J(t,e),t}(K);Kn.ɵfac=function(e){return new(e||Kn)(t.ɵɵinject(n.HttpClient))},Kn.ɵprov=t.ɵɵdefineInjectable({token:Kn,factory:Kn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Kn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var Qn=function(){},Xn=function(e){function t(t){return e.call(this,t,"ubicacion")||this}return J(t,e),t}(K);Xn.ɵfac=function(e){return new(e||Xn)(t.ɵɵinject(n.HttpClient))},Xn.ɵprov=t.ɵɵdefineInjectable({token:Xn,factory:Xn.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(Xn,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var eo=function(){};eo.ARTICULO=2,eo.USO_CFDI=11;var to=function(e){function t(t){var n=e.call(this,t,"acreedorCuentaContable")||this;return n.httpClient=t,n}return J(t,e),t.prototype.cuentasContables=function(){return this.httpClient.get(this.getUrl()+"/cuentaContable/obtieneCuentasContablesRecursivo/",this.buildAuth())},t}(K);to.ɵfac=function(e){return new(e||to)(t.ɵɵinject(n.HttpClient))},to.ɵprov=t.ɵɵdefineInjectable({token:to,factory:to.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(to,[{type:t.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:n.HttpClient}]}),null);var no=function(){},oo=function(){};e.AcreedorCuentaContableService=to,e.AcreedorService=Lt,e.Agente=pn,e.AgenteService=un,e.Almacen=dn,e.AlmacenService=rt,e.Auth=Me,e.AuthService=we,e.Authenticated=sn,e.Banco=mn,e.BancoService=gn,e.CanActivateGuard=an,e.CatalogoAdicionalService=ln,e.CatalogoTipo=hn,e.CatalogoTipoService=vn,e.CclistaComponent=re,e.CcseleccionDialogComponent=se,e.ClasificadorTipo=Ye,e.ClasificadorTipoService=yn,e.ClaveAumentoDisminucionService=Gn,e.ClaveMovimiento=bn,e.ClaveMovimientoService=Sn,e.Cliente=Cn,e.ClienteCuentaBanco=In,e.ClienteCuentaBancoService=wn,e.ClienteFlete=Mn,e.ClienteFleteService=En,e.ClienteService=ze,e.ConfiguracionEmpresaAdministrativa=Hn,e.ControlAccesoService=tn,e.CoreLibModule=en,e.CrudService=K,e.CuentaContableModel=no,e.DatoContacto=jn,e.DatoContactoService=An,e.DatoDireccion=fn,e.DatoDireccionService=kn,e.Departamento=Pn,e.DepartamentoService=On,e.Empresa=Tn,e.EmpresaService=Un,e.Error404Component=fe,e.EstadoCivil=qn,e.FileService=ye,e.Flete=xn,e.FleteService=Bn,e.FormaPago=_n,e.FormaPagoService=Fn,e.Genero=Ln,e.GlobalService=Y,e.HttpLoaderFactory=Xt,e.InitService=nn,e.LoadingComponent=ge,e.LoadingScreenComponent=he,e.LoadingScreenService=ue,e.LoadingService=me,e.LoginModalComponent=ke,e.LoginModalService=pe,e.MessageService=on,e.Moneda=zn,e.MonedaService=Rn,e.NormaInformacionFinancieraModel=oo,e.PaginateService=Re,e.PdfModalComponent=Ie,e.PdfModalService=ve,e.Persona=Ze,e.PersonaFisica=Ge,e.PersonaFisicaService=Nn,e.PersonaMoral=We,e.PersonaMoralService=rn,e.Proveedor=Ke,e.ProveedorCuentaBanco=Vn,e.ProveedorCuentaBancoService=Jn,e.ProveedorFlete=$n,e.ProveedorFleteService=Zn,e.ProveedorService=Qe,e.SeleccionaArticuloComponent=qt,e.SelectAcreedorComponent=Wt,e.SelectClienteComponent=Je,e.SelectProveedorComponent=nt,e.SerieDocumento=Yn,e.SerieDocumentoService=Wn,e.SessionCajaService=Pe,e.SessionCreateComponent=Fe,e.StockService=ot,e.TipoCatalogo=eo,e.TipoContacto=Dn,e.TipoContactoService=Kn,e.Ubicacion=Qn,e.UbicacionService=Xn,e.Usuario=xe,e.VersionCheckService=cn,e.httpInterceptor=de,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=visorus-erp-core.umd.min.js.map
|