visorus-erp-core 10.0.1 → 10.0.2

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.
@@ -1,2 +1,2 @@
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"),require("projects/erp-core/src/public_api")):"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","projects/erp-core/src/public_api"],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,e.public_api)}(this,(function(e,t,n,o,r,i,a,l,s,c,u,p,d,m,f,h,g,v,b,S,y,x,C,w,I,E,M,A,j,k,P,_,O,T,D,B,H,F,U,z,q,R,L,N,V){"use strict";var J=function(e,t){return(J=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 Z(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}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function G(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 W(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 Y(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 K=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}(),Q=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 Z(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}(K),X=function(e){function t(t){var n=e.call(this,t,"cuentaContable")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.obtieneCuentasContablesRecursivo=function(){return this.httpClient.get(this.getUrl("cuentaContable")+"/obtieneCuentasContablesRecursivo",this.buildAuth())},t}(Q);function ee(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 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){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 oe(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,te,1,0,"button",15),t.ɵɵtemplate(13,ne,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)}}X.ɵfac=function(e){return new(e||X)(t.ɵɵinject(n.HttpClient))},X.ɵprov=t.ɵɵdefineInjectable({token:X,factory:X.ɵfac,providedIn:"root"});var re=function(){return{width:"100%"}},ie=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=Y(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=Y(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=Y(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=Y(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}();ie.ɵfac=function(e){return new(e||ie)(t.ɵɵdirectiveInject(X))},ie.ɵcmp=t.ɵɵdefineComponent({type:ie,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,ee,11,0,"ng-template",3),t.ɵɵtemplate(4,oe,14,7,"ng-template",4),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngModel",n.query),t.ɵɵadvance(2),t.ɵɵstyleMap(t.ɵɵpureFunction0(7,re)),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:[""]});var ae=["dialog"],le=function(e){return{width:e,"min-width":"200px"}},se=function(e){return{height:e}},ce=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}();ce.ɵfac=function(e){return new(e||ce)},ce.ɵcmp=t.ɵɵdefineComponent({type:ce,selectors:[["lib-ccseleccion-dialog"]],viewQuery:function(e,n){var o;(1&e&&t.ɵɵstaticViewQuery(ae,!0),2&e)&&(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,le,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,se,n.maxH+200+"px")),t.ɵɵadvance(1),t.ɵɵproperty("isShared",!0)("typeAccount",n.tipoCuenta))},directives:[c.Dialog,l.NgStyle,ie],styles:[""]});var ue=function(){function e(){this.modal=new t.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e}();ue.ɵfac=function(e){return new(e||ue)},ue.ɵprov=t.ɵɵdefineInjectable({token:ue,factory:ue.ɵfac,providedIn:"root"});var pe=function(){function e(){this._loading=!1,this.loadingStatus=new u.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}();pe.ɵfac=function(e){return new(e||pe)},pe.ɵprov=t.ɵɵdefineInjectable({token:pe,factory:pe.ɵfac,providedIn:"root"});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(p.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),u.throwError(e)})),p.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}),u.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),u.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(ue),t.ɵɵinject(d.ToastrService),t.ɵɵinject(pe))},de.ɵprov=t.ɵɵdefineInjectable({token:de,factory:de.ɵfac});var me=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();me.ɵfac=function(e){return new(e||me)},me.ɵcmp=t.ɵɵdefineComponent({type:me,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}"]});var fe=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}();fe.ɵfac=function(e){return new(e||fe)},fe.ɵprov=t.ɵɵdefineInjectable({token:fe,factory:fe.ɵfac,providedIn:"root"});var he=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)}))};he.ɵfac=function(e){return new(e||he)(t.ɵɵdirectiveInject(fe))},he.ɵcmp=t.ɵɵdefineComponent({type:he,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:[m.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 ge=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(f.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}();ge.ɵfac=function(e){return new(e||ge)(t.ɵɵdirectiveInject(pe),t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(fe))},ge.ɵcmp=t.ɵɵdefineComponent({type:ge,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%]{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 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"});var be=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 Se(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)}}be.ɵfac=function(e){return new(e||be)(t.ɵɵinject(d.ToastrService),t.ɵɵinject(m.TranslateService))},be.ɵprov=t.ɵɵdefineInjectable({token:be,factory:be.ɵfac,providedIn:"root"});var ye=function(e){return{width:e,"min-width":"200px"}},xe=function(){return{overflow:"visible"}},Ce=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}();Ce.ɵfac=function(e){return new(e||Ce)(t.ɵɵdirectiveInject(ve),t.ɵɵdirectiveInject(be),t.ɵɵdirectiveInject(h.DomSanitizer))},Ce.ɵcmp=t.ɵɵdefineComponent({type:Ce,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,Se,2,1,"div",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(12,ye,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,xe)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.pdfBase64))},directives:[c.Dialog,l.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]});var we=function(){},Ie=function(){},Ee=function(){function e(e){this.httpClient=e,this.url_host="",this.login=new t.EventEmitter,this.seleccionEmpresa=new t.EventEmitter,this.auth=new Ie}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 we,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 Me(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 Ae(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,Me,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 ke(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)}}Ee.ɵfac=function(e){return new(e||Ee)(t.ɵɵinject(n.HttpClient))},Ee.ɵprov=t.ɵɵdefineInjectable({token:Ee,factory:Ee.ɵfac,providedIn:"root"});var Pe=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}();Pe.ɵfac=function(e){return new(e||Pe)(t.ɵɵdirectiveInject(ue),t.ɵɵdirectiveInject(Ee))},Pe.ɵcmp=t.ɵɵdefineComponent({type:Pe,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,Ae,20,15,"div",6),t.ɵɵtemplate(7,ke,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_y,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,m.TranslateDirective,l.NgForOf],pipes:[m.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 _e=function(e){function t(t){var n=e.call(this,t,"sessionCaja")||this;return n.httpClient=t,n}return Z(t,e),t}(Q);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 Te(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 De(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 Be(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 He(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵtemplate(0,De,1,0,"button",14),t.ɵɵtemplate(1,Be,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)}}_e.ɵfac=function(e){return new(e||_e)(t.ɵɵinject(n.HttpClient))},_e.ɵprov=t.ɵɵdefineInjectable({token:_e,factory:_e.ɵfac,providedIn:"root"});var Fe=function(){return{width:"750px"}},Ue=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 G(this,void 0,void 0,(function(){var e;return W(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 G(this,void 0,void 0,(function(){var e;return W(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}();Ue.ɵfac=function(e){return new(e||Ue)(t.ɵɵdirectiveInject(_e))},Ue.ɵcmp=t.ɵɵdefineComponent({type:Ue,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,Te,13,6,"div",2),t.ɵɵelementStart(3,"div"),t.ɵɵtext(4," Este agente no esta asignado a una caja "),t.ɵɵelementEnd(),t.ɵɵtemplate(5,He,3,2,"ng-template",3),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction0(8,Fe)),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:[""]});var ze=function(e){function t(t){return e.call(this,t,"/cliente")||this}return Z(t,e),t.prototype.validar_archivos_bss=function(e){return this.getHttp().get(this.getUrl("/cliente/validarClienteBss/")+e,this.buildAuth())},t}(Q);ze.ɵfac=function(e){return new(e||ze)(t.ɵɵinject(n.HttpClient))},ze.ɵprov=t.ɵɵdefineInjectable({token:ze,factory:ze.ɵ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,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 Re(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")))}qe.ɵfac=function(e){return new(e||qe)(t.ɵɵinject(m.TranslateService))},qe.ɵprov=t.ɵɵdefineInjectable({token:qe,factory:qe.ɵfac,providedIn:"root"});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(qe))},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,Re,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,g.Table,a.PrimeTemplate,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe],encapsulation:2});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 Z(t,e),t}(Q);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"});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(qe),t.ɵɵdirectiveInject(m.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,g.Table,a.PrimeTemplate,v.Paginator],pipes:[m.TranslatePipe],encapsulation:2});var ot=function(e){function t(t){var n=e.call(this,t,"stock")||this;return n.httpClient=t,n}return Z(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}(Q);ot.ɵfac=function(e){return new(e||ot)(t.ɵɵinject(n.HttpClient))},ot.ɵprov=t.ɵɵdefineInjectable({token:ot,factory:ot.ɵfac,providedIn:"root"});var rt=function(e){function t(t){var n=e.call(this,t,"/almacen")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.obtenerAlmacenEmpresa=function(){var e=this.geturl()+"/obtenerAlmacenEmpresa";return this.getHttp().get(e,this.buildAuth())},t}(Q);rt.ɵfac=function(e){return new(e||rt)(t.ɵɵinject(n.HttpClient))},rt.ɵprov=t.ɵɵdefineInjectable({token:rt,factory:rt.ɵfac,providedIn:"root"});var it=function(e){function t(t){var n=e.call(this,t,"articulo")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.obtenerExistencias=function(e){var t="/existenciasArticulo/"+e;return this.httpClient.get(this.geturl()+t,this.buildAuth())},t}(Q);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 ut(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"});var pt=function(e){return{width:e,"min-width":"200px"}},dt=function(){return{width:"600px"}},mt=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 ft(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 ht(e,n){1&e&&(t.ɵɵelementStart(0,"th",31),t.ɵɵtext(1,"existenciaSecundaria"),t.ɵɵelementEnd())}function gt(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 bt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 2"),t.ɵɵelementEnd())}function St(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 3"),t.ɵɵelementEnd())}function yt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 4"),t.ɵɵelementEnd())}function xt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 5"),t.ɵɵelementEnd())}function Ct(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Movimiento.costo"),t.ɵɵelementEnd())}function wt(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 It(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,ht,2,0,"th",26),t.ɵɵtemplate(8,gt,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,bt,2,0,"th",29),t.ɵɵtemplate(16,St,2,0,"th",29),t.ɵɵtemplate(17,yt,2,0,"th",29),t.ɵɵtemplate(18,xt,2,0,"th",29),t.ɵɵtemplate(19,Ct,2,0,"th",27),t.ɵɵelementStart(20,"th",25),t.ɵɵtext(21,"Existencia por Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(22,wt,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 Et(e,n){1&e&&(t.ɵɵelementStart(0,"td",23),t.ɵɵtext(1,"Movimiento.NoAsignado"),t.ɵɵelementEnd())}function Mt(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 At(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 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.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(2,1,o.precioConImpuestos)," ")}}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.precio2ConImpuestos))}}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.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 Tt(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 Dt(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 Bt(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 Ht(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 Ft(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"tr",32),t.ɵɵtemplate(1,Et,2,0,"td",33),t.ɵɵtemplate(2,Mt,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,At,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,kt,3,3,"td",34),t.ɵɵtemplate(16,Pt,3,3,"td",34),t.ɵɵtemplate(17,_t,3,3,"td",34),t.ɵɵtemplate(18,Ot,3,3,"td",34),t.ɵɵtemplate(19,Tt,3,3,"td",34),t.ɵɵtemplate(20,Dt,3,3,"td",38),t.ɵɵelementStart(21,"td",36),t.ɵɵtemplate(22,Bt,8,5,"div",42),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Ht,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 Ut(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)}}mt.ɵfac=function(e){return new(e||mt)(t.ɵɵdirectiveInject(it))},mt.ɵcmp=t.ɵɵdefineComponent({type:mt,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,ut,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,pt,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,g.Table,a.PrimeTemplate,a.Footer,s.ButtonDirective,l.NgForOf,g.ResizableColumn],styles:[""]});var zt=function(e){return{width:e,"min-width":"200px"}},qt=function(){return[10,25,50,100,500]},Rt=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}();Rt.ɵfac=function(e){return new(e||Rt)(t.ɵɵdirectiveInject(ot),t.ɵɵdirectiveInject(qe),t.ɵɵdirectiveInject(rt))},Rt.ɵcmp=t.ɵɵdefineComponent({type:Rt,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,ft,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,It,23,9,"ng-template",18),t.ɵɵtemplate(27,Ft,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,Ut,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,qt)),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_x,o.DefaultValueAccessor,s.ButtonDirective,l.NgForOf,g.Table,a.PrimeTemplate,v.Paginator,l.NgIf,m.TranslateDirective,g.SelectableRow,mt],pipes:[m.TranslatePipe,l.CurrencyPipe,l.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]});var Lt=function(e){function t(t){var n=e.call(this,t,"acreedor")||this;return n.httpClient=t,n}return Z(t,e),t}(Q);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"});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(qe),t.ɵɵdirectiveInject(m.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,g.Table,a.PrimeTemplate,v.Paginator,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe,l.DatePipe],encapsulation:2});var Yt=[U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule],Kt=[a.ConfirmationService];function Qt(e){return new L.TranslateHttpLoader(e,"./assets/i18n/",".json")}var Xt=function(){};Xt.ɵmod=t.ɵɵdefineNgModule({type:Xt}),Xt.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||Xt)},providers:[Kt,{provide:n.HTTP_INTERCEPTORS,useClass:de,multi:!0}],imports:[[l.CommonModule,Yt,o.FormsModule,d.ToastrModule.forRoot(),m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:Qt,deps:[n.HttpClient]}})]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Xt,{declarations:[me,he,ge,Pe,Ce,Ue,Je,nt,Rt,Wt,ie,ce,mt],imports:[l.CommonModule,U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule,o.FormsModule,d.ToastrModule,m.TranslateModule],exports:[he,ge,Pe,Ce,Ue,Je,nt,Rt,Wt,ie,ce]});var en=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}();en.ɵfac=function(e){return new(e||en)(t.ɵɵinject(Ee))},en.ɵprov=t.ɵɵdefineInjectable({token:en,factory:en.ɵfac,providedIn:"root"});var tn=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}();tn.ɵfac=function(e){return new(e||tn)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(Ee))},tn.ɵprov=t.ɵɵdefineInjectable({token:tn,factory:tn.ɵfac,providedIn:"root"});var nn=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}();nn.ɵfac=function(e){return new(e||nn)(t.ɵɵinject(d.ToastrService))},nn.ɵprov=t.ɵɵdefineInjectable({token:nn,factory:nn.ɵfac,providedIn:"root"});var on=function(e){function t(t){return e.call(this,t,"/personaMoral")||this}return Z(t,e),t}(Q);on.ɵfac=function(e){return new(e||on)(t.ɵɵinject(n.HttpClient))},on.ɵprov=t.ɵɵdefineInjectable({token:on,factory:on.ɵfac,providedIn:"root"});var rn=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}();rn.ɵfac=function(e){return new(e||rn)(t.ɵɵinject(en))},rn.ɵprov=t.ɵɵdefineInjectable({token:rn,factory:rn.ɵfac,providedIn:"root"});var an=function(e){function t(t){var n=e.call(this,t,"catalogoAdicional")||this;return n.httpClient=t,n}return Z(t,e),t}(Q);an.ɵfac=function(e){return new(e||an)(t.ɵɵinject(n.HttpClient))},an.ɵprov=t.ɵɵdefineInjectable({token:an,factory:an.ɵfac,providedIn:"root"});var ln=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}();ln.ɵfac=function(e){return new(e||ln)(t.ɵɵinject(Ee),t.ɵɵinject(en),t.ɵɵinject(N.Router))},ln.ɵprov=t.ɵɵdefineInjectable({token:ln,factory:ln.ɵfac,providedIn:"root"});var sn=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}();sn.ɵfac=function(e){return new(e||sn)(t.ɵɵinject(n.HttpClient))},sn.ɵprov=t.ɵɵdefineInjectable({token:sn,factory:sn.ɵfac,providedIn:"root"});var cn=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 Z(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}(Q);un.ɵfac=function(e){return new(e||un)(t.ɵɵinject(n.HttpClient))},un.ɵprov=t.ɵɵdefineInjectable({token:un,factory:un.ɵfac,providedIn:"root"});var pn=function(){},dn=function(){},mn=function(){this.datoDireccion=new dn},fn=function(e){function t(t){return e.call(this,t,"/banco")||this}return Z(t,e),t}(Q);fn.ɵfac=function(e){return new(e||fn)(t.ɵɵinject(n.HttpClient))},fn.ɵprov=t.ɵɵdefineInjectable({token:fn,factory:fn.ɵfac,providedIn:"root"});var hn=function(){},gn=function(e){function t(t){return e.call(this,t,"/catalogoTipo")||this}return Z(t,e),t}(V.CrudService);gn.ɵfac=function(e){return new(e||gn)(t.ɵɵinject(n.HttpClient))},gn.ɵprov=t.ɵɵdefineInjectable({token:gn,factory:gn.ɵfac,providedIn:"root"});var vn=function(e){function t(t){return e.call(this,t,"/clasificadorTipo")||this}return Z(t,e),t}(Q);vn.ɵfac=function(e){return new(e||vn)(t.ɵɵinject(n.HttpClient))},vn.ɵprov=t.ɵɵdefineInjectable({token:vn,factory:vn.ɵfac,providedIn:"root"});var bn=function(){},Sn=function(e){function t(t){return e.call(this,t,"claveMovimiento")||this}return Z(t,e),t}(Q);Sn.ɵfac=function(e){return new(e||Sn)(t.ɵɵinject(n.HttpClient))},Sn.ɵprov=t.ɵɵdefineInjectable({token:Sn,factory:Sn.ɵfac,providedIn:"root"});var yn=function(){this.agenteCobrador=new cn,this.agenteVendedor=new cn,this.personaFisica=new Ge,this.personaMoral=new We},xn=function(){this.banco=new mn,this.estatus=!0},Cn=function(){},wn=function(){this.cliente=new yn,this.flete=new Cn,this.estatus=!0},In=function(e){function t(t){var n=e.call(this,t,"/clienteCuentaBanco")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(Q);In.ɵfac=function(e){return new(e||In)(t.ɵɵinject(n.HttpClient))},In.ɵprov=t.ɵɵdefineInjectable({token:In,factory:In.ɵfac,providedIn:"root"});var En=function(e){function t(t){var n=e.call(this,t,"/clienteFlete")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(Q);En.ɵfac=function(e){return new(e||En)(t.ɵɵinject(n.HttpClient))},En.ɵprov=t.ɵɵdefineInjectable({token:En,factory:En.ɵfac,providedIn:"root"});var Mn=function(){this.estatus=!0},An=function(){this.tipoContacto=new Mn},jn=function(e){function t(t){return e.call(this,t,"/contacto")||this}return Z(t,e),t}(Q);jn.ɵfac=function(e){return new(e||jn)(t.ɵɵinject(n.HttpClient))},jn.ɵprov=t.ɵɵdefineInjectable({token:jn,factory:jn.ɵfac,providedIn:"root"});var kn=function(e){function t(t){return e.call(this,t,"/datoDireccion")||this}return Z(t,e),t}(Q);kn.ɵfac=function(e){return new(e||kn)(t.ɵɵinject(n.HttpClient))},kn.ɵprov=t.ɵɵdefineInjectable({token:kn,factory:kn.ɵfac,providedIn:"root"});var Pn=function(){},_n=function(e){function t(t){return e.call(this,t,"/departamento")||this}return Z(t,e),t}(Q);_n.ɵfac=function(e){return new(e||_n)(t.ɵɵinject(n.HttpClient))},_n.ɵprov=t.ɵɵdefineInjectable({token:_n,factory:_n.ɵfac,providedIn:"root"});var On=function(){},Tn=function(){this.datoDireccion=new dn,this.personaMoral=new We,this.claveFormaPagoEfectivo=new On},Dn=function(){this.empresa=new Tn},Bn=function(e){function t(t){var n=e.call(this,t,"/empresa")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.get=function(){return this.httpClient.get(this.getBaseUrl()+"/configuracionEmpresaAdministrativo/configuracionUsuario",this.buildAuth())},t}(Q);Bn.ɵfac=function(e){return new(e||Bn)(t.ɵɵinject(n.HttpClient))},Bn.ɵprov=t.ɵɵdefineInjectable({token:Bn,factory:Bn.ɵfac,providedIn:"root"});var Hn=function(e){function t(t){var n=e.call(this,t,"/flete")||this;return n.httpClient=t,n}return Z(t,e),t}(Q);Hn.ɵfac=function(e){return new(e||Hn)(t.ɵɵinject(n.HttpClient))},Hn.ɵprov=t.ɵɵdefineInjectable({token:Hn,factory:Hn.ɵfac,providedIn:"root"});var Fn=function(e){function t(t){return e.call(this,t,"/FormaDePago")||this}return Z(t,e),t}(Q);Fn.ɵfac=function(e){return new(e||Fn)(t.ɵɵinject(n.HttpClient))},Fn.ɵprov=t.ɵɵdefineInjectable({token:Fn,factory:Fn.ɵfac,providedIn:"root"});var Un=function(){},zn=function(e){function t(t){var n=e.call(this,t,"/moneda")||this;return n.httpClient=t,n}return Z(t,e),t}(Q);zn.ɵfac=function(e){return new(e||zn)(t.ɵɵinject(n.HttpClient))},zn.ɵprov=t.ɵɵdefineInjectable({token:zn,factory:zn.ɵfac,providedIn:"root"});var qn=function(){},Rn=function(){},Ln=function(e){function t(t){var n=e.call(this,t,"/PersonaFisica")||this;return n.httpClient=t,n}return Z(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}(Q);Ln.ɵfac=function(e){return new(e||Ln)(t.ɵɵinject(n.HttpClient))},Ln.ɵprov=t.ɵɵdefineInjectable({token:Ln,factory:Ln.ɵfac,providedIn:"root"});var Nn=function(){this.banco=new mn,this.estatus=!0},Vn=function(){this.proveedor=new Ke,this.flete=new Cn,this.estatus=!0},$n=function(e){function t(t){var n=e.call(this,t,"/proveedorCuentaBanco")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(Q);$n.ɵfac=function(e){return new(e||$n)(t.ɵɵinject(n.HttpClient))},$n.ɵprov=t.ɵɵdefineInjectable({token:$n,factory:$n.ɵfac,providedIn:"root"});var Jn=function(e){function t(t){var n=e.call(this,t,"/proveedorFlete")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(Q);Jn.ɵfac=function(e){return new(e||Jn)(t.ɵɵinject(n.HttpClient))},Jn.ɵprov=t.ɵɵdefineInjectable({token:Jn,factory:Jn.ɵfac,providedIn:"root"});var Zn=function(e){function t(t){return e.call(this,t,"claveAumentoDisminucion")||this}return Z(t,e),t}(Q);Zn.ɵfac=function(e){return new(e||Zn)(t.ɵɵinject(n.HttpClient))},Zn.ɵprov=t.ɵɵdefineInjectable({token:Zn,factory:Zn.ɵfac,providedIn:"root"});var Gn=function(e){function t(t){var n=e.call(this,t,"serieDocumento")||this;return n.httpClient=t,n}return Z(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}(Q);Gn.ɵfac=function(e){return new(e||Gn)(t.ɵɵinject(n.HttpClient))},Gn.ɵprov=t.ɵɵdefineInjectable({token:Gn,factory:Gn.ɵfac,providedIn:"root"});var Wn=function(){},Yn=function(e){function t(t){return e.call(this,t,"/tipoContacto")||this}return Z(t,e),t}(Q);Yn.ɵfac=function(e){return new(e||Yn)(t.ɵɵinject(n.HttpClient))},Yn.ɵprov=t.ɵɵdefineInjectable({token:Yn,factory:Yn.ɵfac,providedIn:"root"});var Kn=function(){},Qn=function(e){function t(t){return e.call(this,t,"ubicacion")||this}return Z(t,e),t}(Q);Qn.ɵfac=function(e){return new(e||Qn)(t.ɵɵinject(n.HttpClient))},Qn.ɵprov=t.ɵɵdefineInjectable({token:Qn,factory:Qn.ɵfac,providedIn:"root"});var Xn=function(){};Xn.ARTICULO=2,Xn.USO_CFDI=11;var eo=function(e){function t(t){var n=e.call(this,t,"acreedorCuentaContable")||this;return n.httpClient=t,n}return Z(t,e),t.prototype.cuentasContables=function(){return this.httpClient.get(this.getUrl()+"/cuentaContable/obtieneCuentasContablesRecursivo/",this.buildAuth())},t}(Q);eo.ɵfac=function(e){return new(e||eo)(t.ɵɵinject(n.HttpClient))},eo.ɵprov=t.ɵɵdefineInjectable({token:eo,factory:eo.ɵfac,providedIn:"root"});var to=function(){},no=function(){};e.AcreedorCuentaContableService=eo,e.AcreedorService=Lt,e.Agente=cn,e.AgenteService=un,e.Almacen=pn,e.AlmacenService=rt,e.Auth=Ie,e.AuthService=Ee,e.Authenticated=ln,e.Banco=mn,e.BancoService=fn,e.CanActivateGuard=rn,e.CatalogoAdicionalService=an,e.CatalogoTipo=hn,e.CatalogoTipoService=gn,e.CclistaComponent=ie,e.CcseleccionDialogComponent=ce,e.ClasificadorTipo=Ye,e.ClasificadorTipoService=vn,e.ClaveAumentoDisminucionService=Zn,e.ClaveMovimiento=bn,e.ClaveMovimientoService=Sn,e.Cliente=yn,e.ClienteCuentaBanco=xn,e.ClienteCuentaBancoService=In,e.ClienteFlete=wn,e.ClienteFleteService=En,e.ClienteService=ze,e.ConfiguracionEmpresaAdministrativa=Dn,e.ControlAccesoService=en,e.CoreLibModule=Xt,e.CrudService=Q,e.CuentaContableModel=to,e.DatoContacto=An,e.DatoContactoService=jn,e.DatoDireccion=dn,e.DatoDireccionService=kn,e.Departamento=Pn,e.DepartamentoService=_n,e.Empresa=Tn,e.EmpresaService=Bn,e.Error404Component=me,e.EstadoCivil=qn,e.FileService=be,e.Flete=Cn,e.FleteService=Hn,e.FormaPago=On,e.FormaPagoService=Fn,e.Genero=Rn,e.GlobalService=K,e.HttpLoaderFactory=Qt,e.InitService=tn,e.LoadingComponent=he,e.LoadingScreenComponent=ge,e.LoadingScreenService=pe,e.LoadingService=fe,e.LoginModalComponent=Pe,e.LoginModalService=ue,e.MessageService=nn,e.Moneda=Un,e.MonedaService=zn,e.NormaInformacionFinancieraModel=no,e.PaginateService=qe,e.PdfModalComponent=Ce,e.PdfModalService=ve,e.Persona=Ze,e.PersonaFisica=Ge,e.PersonaFisicaService=Ln,e.PersonaMoral=We,e.PersonaMoralService=on,e.Proveedor=Ke,e.ProveedorCuentaBanco=Nn,e.ProveedorCuentaBancoService=$n,e.ProveedorFlete=Vn,e.ProveedorFleteService=Jn,e.ProveedorService=Qe,e.SeleccionaArticuloComponent=Rt,e.SelectAcreedorComponent=Wt,e.SelectClienteComponent=Je,e.SelectProveedorComponent=nt,e.SerieDocumento=Wn,e.SerieDocumentoService=Gn,e.SessionCajaService=_e,e.SessionCreateComponent=Ue,e.StockService=ot,e.TipoCatalogo=Xn,e.TipoContacto=Mn,e.TipoContactoService=Yn,e.Ubicacion=Kn,e.UbicacionService=Qn,e.Usuario=we,e.VersionCheckService=sn,e.httpInterceptor=de,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,u,p,d,m,f,h,g,v,b,y,S,x,C,w,I,E,M,A,j,k,P,_,O,T,D,B,H,F,U,z,q,R,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"});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:[""]});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){var o;(1&e&&t.ɵɵstaticViewQuery(ie,!0),2&e)&&(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:[""]});var ce=function(){function e(){this.modal=new t.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e}();ce.ɵfac=function(e){return new(e||ce)},ce.ɵprov=t.ɵɵdefineInjectable({token:ce,factory:ce.ɵfac,providedIn:"root"});var ue=function(){function e(){this._loading=!1,this.loadingStatus=new u.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"});var pe=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(p.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),u.throwError(e)})),p.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}),u.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),u.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}();pe.ɵfac=function(e){return new(e||pe)(t.ɵɵinject(ce),t.ɵɵinject(d.ToastrService),t.ɵɵinject(ue))},pe.ɵprov=t.ɵɵdefineInjectable({token:pe,factory:pe.ɵfac});var de=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();de.ɵfac=function(e){return new(e||de)},de.ɵcmp=t.ɵɵdefineComponent({type:de,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}"]});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"});var fe=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)}))};fe.ɵfac=function(e){return new(e||fe)(t.ɵɵdirectiveInject(me))},fe.ɵcmp=t.ɵɵdefineComponent({type:fe,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:[m.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 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(f.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%]{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 ge=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}();ge.ɵfac=function(e){return new(e||ge)},ge.ɵprov=t.ɵɵdefineInjectable({token:ge,factory:ge.ɵfac,providedIn:"root"});var ve=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)}}ve.ɵfac=function(e){return new(e||ve)(t.ɵɵinject(d.ToastrService),t.ɵɵinject(m.TranslateService))},ve.ɵprov=t.ɵɵdefineInjectable({token:ve,factory:ve.ɵfac,providedIn:"root"});var ye=function(e){return{width:e,"min-width":"200px"}},Se=function(){return{overflow:"visible"}},xe=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}();xe.ɵfac=function(e){return new(e||xe)(t.ɵɵdirectiveInject(ge),t.ɵɵdirectiveInject(ve),t.ɵɵdirectiveInject(h.DomSanitizer))},xe.ɵcmp=t.ɵɵdefineComponent({type:xe,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,ye,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,Se)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.pdfBase64))},directives:[c.Dialog,l.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]});var Ce=function(){},we=function(){},Ie=function(){function e(e){this.httpClient=e,this.url_host="",this.login=new t.EventEmitter,this.seleccionEmpresa=new t.EventEmitter,this.auth=new we}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 Ce,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 Me(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 Ae(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 je(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,Ae,5,1,"div",21),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(5),t.ɵɵproperty("ngForOf",o.empresas)}}Ie.ɵfac=function(e){return new(e||Ie)(t.ɵɵinject(n.HttpClient))},Ie.ɵprov=t.ɵɵdefineInjectable({token:Ie,factory:Ie.ɵfac,providedIn:"root"});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(ce),t.ɵɵdirectiveInject(Ie))},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,Me,20,15,"div",6),t.ɵɵtemplate(7,je,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_y,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,m.TranslateDirective,l.NgForOf],pipes:[m.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 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 _e(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 Oe(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 De(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 Be(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵtemplate(0,Te,1,0,"button",14),t.ɵɵtemplate(1,De,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"});var He=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,_e,2,1,"ng-template",1),t.ɵɵtemplate(2,Oe,13,6,"div",2),t.ɵɵelementStart(3,"div"),t.ɵɵtext(4," Este agente no esta asignado a una caja "),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Be,3,2,"ng-template",3),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction0(8,He)),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:[""]});var Ue=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);Ue.ɵfac=function(e){return new(e||Ue)(t.ɵɵinject(n.HttpClient))},Ue.ɵprov=t.ɵɵdefineInjectable({token:Ue,factory:Ue.ɵfac,providedIn:"root"});var ze=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 Re(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 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,"moral")))}function Ne(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,Re,3,3,"span",9),t.ɵɵtemplate(7,Le,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 Ve(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")))}ze.ɵfac=function(e){return new(e||ze)(t.ɵɵinject(m.TranslateService))},ze.ɵprov=t.ɵɵdefineInjectable({token:ze,factory:ze.ɵfac,providedIn:"root"});var $e=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}();$e.ɵfac=function(e){return new(e||$e)(t.ɵɵdirectiveInject(Ue),t.ɵɵdirectiveInject(ze))},$e.ɵcmp=t.ɵɵdefineComponent({type:$e,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,Ne,14,8,"ng-template",6),t.ɵɵtemplate(9,Ve,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,g.Table,a.PrimeTemplate,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe],encapsulation:2});var Je=function(){},Ze=function(){this.datoPersona=new Je,this.contactos=[],this.datoDirecciones=[]},Ge=function(){this.representanteLegal=new Ze,this.contactos=[],this.datoDirecciones=[]},We=function(){},Ye=function(){this.personaMoral=new Ge,this.catalogoTipo=new We,this.clasificadorTipo=new We,this.personaFisica=new Ze},Ke=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 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.ɵɵ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 Xe(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)}}Ke.ɵfac=function(e){return new(e||Ke)(t.ɵɵinject(n.HttpClient))},Ke.ɵprov=t.ɵɵdefineInjectable({token:Ke,factory:Ke.ɵfac,providedIn:"root"});var et=function(){return[10,25,50,100,500]},tt=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 Ye,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}();tt.ɵfac=function(e){return new(e||tt)(t.ɵɵdirectiveInject(Ke),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(m.TranslateService))},tt.ɵcmp=t.ɵɵdefineComponent({type:tt,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,Qe,10,9,"ng-template",5),t.ɵɵtemplate(8,Xe,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,et)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator],pipes:[m.TranslatePipe],encapsulation:2});var nt=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);nt.ɵfac=function(e){return new(e||nt)(t.ɵɵinject(n.HttpClient))},nt.ɵprov=t.ɵɵdefineInjectable({token:nt,factory:nt.ɵfac,providedIn:"root"});var ot=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);ot.ɵfac=function(e){return new(e||ot)(t.ɵɵinject(n.HttpClient))},ot.ɵprov=t.ɵɵdefineInjectable({token:ot,factory:ot.ɵfac,providedIn:"root"});var rt=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 it(e,n){if(1&e&&t.ɵɵelement(0,"col"),2&e){var o=n.$implicit;t.ɵɵstyleProp("width",o.width)}}function at(e,n){if(1&e&&(t.ɵɵelementStart(0,"colgroup"),t.ɵɵtemplate(1,it,1,2,"col",7),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function lt(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 st(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵtemplate(1,lt,2,1,"th",8),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function ct(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)}}rt.ɵfac=function(e){return new(e||rt)(t.ɵɵinject(n.HttpClient))},rt.ɵprov=t.ɵɵdefineInjectable({token:rt,factory:rt.ɵfac,providedIn:"root"});var ut=function(e){return{width:e,"min-width":"200px"}},pt=function(){return{width:"600px"}},dt=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 ft(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 gt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio"),t.ɵɵelementEnd())}function vt(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 yt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 4"),t.ɵɵelementEnd())}function St(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 5"),t.ɵɵelementEnd())}function xt(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Movimiento.costo"),t.ɵɵelementEnd())}function Ct(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 wt(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,ft,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,gt,2,0,"th",29),t.ɵɵtemplate(15,vt,2,0,"th",29),t.ɵɵtemplate(16,bt,2,0,"th",29),t.ɵɵtemplate(17,yt,2,0,"th",29),t.ɵɵtemplate(18,St,2,0,"th",29),t.ɵɵtemplate(19,xt,2,0,"th",27),t.ɵɵelementStart(20,"th",25),t.ɵɵtext(21,"Existencia por Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(22,Ct,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 It(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 Mt(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 At(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 jt(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 _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.precio4ConImpuestos))}}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.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 Dt(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 Bt(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 Ht(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"tr",32),t.ɵɵtemplate(1,It,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,Mt,2,1,"td",37),t.ɵɵtemplate(8,At,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,jt,3,3,"td",34),t.ɵɵtemplate(16,kt,3,3,"td",34),t.ɵɵtemplate(17,Pt,3,3,"td",34),t.ɵɵtemplate(18,_t,3,3,"td",34),t.ɵɵtemplate(19,Ot,3,3,"td",34),t.ɵɵtemplate(20,Tt,3,3,"td",38),t.ɵɵelementStart(21,"td",36),t.ɵɵtemplate(22,Dt,8,5,"div",42),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Bt,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)}}dt.ɵfac=function(e){return new(e||dt)(t.ɵɵdirectiveInject(rt))},dt.ɵcmp=t.ɵɵdefineComponent({type:dt,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,at,2,1,"ng-template",2),t.ɵɵtemplate(3,st,2,1,"ng-template",3),t.ɵɵtemplate(4,ct,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,pt)),t.ɵɵproperty("columns",n.columnsData)("value",n.existenciasList)("scrollable",!0)("responsive",!0))},directives:[c.Dialog,g.Table,a.PrimeTemplate,a.Footer,s.ButtonDirective,l.NgForOf,g.ResizableColumn],styles:[""]});var Ut=function(e){return{width:e,"min-width":"200px"}},zt=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(nt),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(ot))},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,wt,23,9,"ng-template",18),t.ɵɵtemplate(27,Ht,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,Ut,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,zt)),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_x,o.DefaultValueAccessor,s.ButtonDirective,l.NgForOf,g.Table,a.PrimeTemplate,v.Paginator,l.NgIf,m.TranslateDirective,g.SelectableRow,dt],pipes:[m.TranslatePipe,l.CurrencyPipe,l.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]});var Rt=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 Lt(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 Nt(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 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,"fisico")))}function $t(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,Nt,3,3,"span",10),t.ɵɵtemplate(7,Vt,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 Jt(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")))}Rt.ɵfac=function(e){return new(e||Rt)(t.ɵɵinject(n.HttpClient))},Rt.ɵprov=t.ɵɵdefineInjectable({token:Rt,factory:Rt.ɵfac,providedIn:"root"});var Zt=function(){return[10,25,50,100,500]},Gt=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 Ye,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}();Gt.ɵfac=function(e){return new(e||Gt)(t.ɵɵdirectiveInject(Rt),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(m.TranslateService))},Gt.ɵcmp=t.ɵɵdefineComponent({type:Gt,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,Lt,19,18,"ng-template",5),t.ɵɵtemplate(7,$t,15,11,"ng-template",6),t.ɵɵtemplate(8,Jt,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,Zt)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe,l.DatePipe],encapsulation:2});var Wt=[U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,y.InputMaskModule,S.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule],Yt=[a.ConfirmationService];function Kt(e){return new L.TranslateHttpLoader(e,"./assets/i18n/",".json")}var Qt=function(){};Qt.ɵmod=t.ɵɵdefineNgModule({type:Qt}),Qt.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||Qt)},providers:[Yt,{provide:n.HTTP_INTERCEPTORS,useClass:pe,multi:!0}],imports:[[l.CommonModule,Wt,o.FormsModule,d.ToastrModule.forRoot(),m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:Kt,deps:[n.HttpClient]}})]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Qt,{declarations:[de,fe,he,ke,xe,Fe,$e,tt,qt,Gt,re,se,dt],imports:[l.CommonModule,U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,y.InputMaskModule,S.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule,o.FormsModule,d.ToastrModule,m.TranslateModule],exports:[fe,he,ke,xe,Fe,$e,tt,qt,Gt,re,se]});var Xt=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}();Xt.ɵfac=function(e){return new(e||Xt)(t.ɵɵinject(Ie))},Xt.ɵprov=t.ɵɵdefineInjectable({token:Xt,factory:Xt.ɵfac,providedIn:"root"});var en=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}();en.ɵfac=function(e){return new(e||en)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(Ie))},en.ɵprov=t.ɵɵdefineInjectable({token:en,factory:en.ɵfac,providedIn:"root"});var tn=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}();tn.ɵfac=function(e){return new(e||tn)(t.ɵɵinject(d.ToastrService))},tn.ɵprov=t.ɵɵdefineInjectable({token:tn,factory:tn.ɵfac,providedIn:"root"});var nn=function(e){function t(t){return e.call(this,t,"/personaMoral")||this}return J(t,e),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"});var on=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}();on.ɵfac=function(e){return new(e||on)(t.ɵɵinject(Xt))},on.ɵprov=t.ɵɵdefineInjectable({token:on,factory:on.ɵfac,providedIn:"root"});var rn=function(e){function t(t){var n=e.call(this,t,"catalogoAdicional")||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"});var an=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}();an.ɵfac=function(e){return new(e||an)(t.ɵɵinject(Ie),t.ɵɵinject(Xt),t.ɵɵinject(N.Router))},an.ɵprov=t.ɵɵdefineInjectable({token:an,factory:an.ɵfac,providedIn:"root"});var ln=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}();ln.ɵfac=function(e){return new(e||ln)(t.ɵɵinject(n.HttpClient))},ln.ɵprov=t.ɵɵdefineInjectable({token:ln,factory:ln.ɵfac,providedIn:"root"});var sn=function(){this.personaFisica=new Ze},cn=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);cn.ɵfac=function(e){return new(e||cn)(t.ɵɵinject(n.HttpClient))},cn.ɵprov=t.ɵɵdefineInjectable({token:cn,factory:cn.ɵfac,providedIn:"root"});var un=function(){},pn=function(){},dn=function(){this.datoDireccion=new pn},mn=function(e){function t(t){return e.call(this,t,"/banco")||this}return J(t,e),t}(K);mn.ɵfac=function(e){return new(e||mn)(t.ɵɵinject(n.HttpClient))},mn.ɵprov=t.ɵɵdefineInjectable({token:mn,factory:mn.ɵfac,providedIn:"root"});var fn=function(){},hn=function(e){function t(t){return e.call(this,t,"/catalogoTipo")||this}return J(t,e),t}(K);hn.ɵfac=function(e){return new(e||hn)(t.ɵɵinject(n.HttpClient))},hn.ɵprov=t.ɵɵdefineInjectable({token:hn,factory:hn.ɵfac,providedIn:"root"});var gn=function(e){function t(t){return e.call(this,t,"/clasificadorTipo")||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"});var vn=function(){},bn=function(e){function t(t){return e.call(this,t,"claveMovimiento")||this}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"});var yn=function(){this.agenteCobrador=new sn,this.agenteVendedor=new sn,this.personaFisica=new Ze,this.personaMoral=new Ge},Sn=function(){this.banco=new dn,this.estatus=!0},xn=function(){},Cn=function(){this.cliente=new yn,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"});var In=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);In.ɵfac=function(e){return new(e||In)(t.ɵɵinject(n.HttpClient))},In.ɵprov=t.ɵɵdefineInjectable({token:In,factory:In.ɵfac,providedIn:"root"});var En=function(){this.estatus=!0},Mn=function(){this.tipoContacto=new En},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"});var jn=function(e){function t(t){return e.call(this,t,"/datoDireccion")||this}return J(t,e),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"});var kn=function(){},Pn=function(e){function t(t){return e.call(this,t,"/departamento")||this}return J(t,e),t}(K);Pn.ɵfac=function(e){return new(e||Pn)(t.ɵɵinject(n.HttpClient))},Pn.ɵprov=t.ɵɵdefineInjectable({token:Pn,factory:Pn.ɵfac,providedIn:"root"});var _n=function(){},On=function(){this.datoDireccion=new pn,this.personaMoral=new Ge,this.claveFormaPagoEfectivo=new _n},Tn=function(){this.empresa=new On},Dn=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);Dn.ɵfac=function(e){return new(e||Dn)(t.ɵɵinject(n.HttpClient))},Dn.ɵprov=t.ɵɵdefineInjectable({token:Dn,factory:Dn.ɵfac,providedIn:"root"});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"});var Hn=function(e){function t(t){return e.call(this,t,"/FormaDePago")||this}return J(t,e),t}(K);Hn.ɵfac=function(e){return new(e||Hn)(t.ɵɵinject(n.HttpClient))},Hn.ɵprov=t.ɵɵdefineInjectable({token:Hn,factory:Hn.ɵfac,providedIn:"root"});var Fn=function(){},Un=function(e){function t(t){var n=e.call(this,t,"/moneda")||this;return n.httpClient=t,n}return J(t,e),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"});var zn=function(){},qn=function(){},Rn=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);Rn.ɵfac=function(e){return new(e||Rn)(t.ɵɵinject(n.HttpClient))},Rn.ɵprov=t.ɵɵdefineInjectable({token:Rn,factory:Rn.ɵfac,providedIn:"root"});var Ln=function(){this.banco=new dn,this.estatus=!0},Nn=function(){this.proveedor=new Ye,this.flete=new xn,this.estatus=!0},Vn=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);Vn.ɵfac=function(e){return new(e||Vn)(t.ɵɵinject(n.HttpClient))},Vn.ɵprov=t.ɵɵdefineInjectable({token:Vn,factory:Vn.ɵfac,providedIn:"root"});var $n=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);$n.ɵfac=function(e){return new(e||$n)(t.ɵɵinject(n.HttpClient))},$n.ɵprov=t.ɵɵdefineInjectable({token:$n,factory:$n.ɵfac,providedIn:"root"});var Jn=function(e){function t(t){return e.call(this,t,"claveAumentoDisminucion")||this}return J(t,e),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"});var Zn=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);Zn.ɵfac=function(e){return new(e||Zn)(t.ɵɵinject(n.HttpClient))},Zn.ɵprov=t.ɵɵdefineInjectable({token:Zn,factory:Zn.ɵfac,providedIn:"root"});var Gn=function(){},Wn=function(e){function t(t){return e.call(this,t,"/tipoContacto")||this}return J(t,e),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"});var Yn=function(){},Kn=function(e){function t(t){return e.call(this,t,"ubicacion")||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"});var Qn=function(){};Qn.ARTICULO=2,Qn.USO_CFDI=11;var Xn=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);Xn.ɵfac=function(e){return new(e||Xn)(t.ɵɵinject(n.HttpClient))},Xn.ɵprov=t.ɵɵdefineInjectable({token:Xn,factory:Xn.ɵfac,providedIn:"root"});var eo=function(){},to=function(){};e.AcreedorCuentaContableService=Xn,e.AcreedorService=Rt,e.Agente=sn,e.AgenteService=cn,e.Almacen=un,e.AlmacenService=ot,e.Auth=we,e.AuthService=Ie,e.Authenticated=an,e.Banco=dn,e.BancoService=mn,e.CanActivateGuard=on,e.CatalogoAdicionalService=rn,e.CatalogoTipo=fn,e.CatalogoTipoService=hn,e.CclistaComponent=re,e.CcseleccionDialogComponent=se,e.ClasificadorTipo=We,e.ClasificadorTipoService=gn,e.ClaveAumentoDisminucionService=Jn,e.ClaveMovimiento=vn,e.ClaveMovimientoService=bn,e.Cliente=yn,e.ClienteCuentaBanco=Sn,e.ClienteCuentaBancoService=wn,e.ClienteFlete=Cn,e.ClienteFleteService=In,e.ClienteService=Ue,e.ConfiguracionEmpresaAdministrativa=Tn,e.ControlAccesoService=Xt,e.CoreLibModule=Qt,e.CrudService=K,e.CuentaContableModel=eo,e.DatoContacto=Mn,e.DatoContactoService=An,e.DatoDireccion=pn,e.DatoDireccionService=jn,e.Departamento=kn,e.DepartamentoService=Pn,e.Empresa=On,e.EmpresaService=Dn,e.Error404Component=de,e.EstadoCivil=zn,e.FileService=ve,e.Flete=xn,e.FleteService=Bn,e.FormaPago=_n,e.FormaPagoService=Hn,e.Genero=qn,e.GlobalService=Y,e.HttpLoaderFactory=Kt,e.InitService=en,e.LoadingComponent=fe,e.LoadingScreenComponent=he,e.LoadingScreenService=ue,e.LoadingService=me,e.LoginModalComponent=ke,e.LoginModalService=ce,e.MessageService=tn,e.Moneda=Fn,e.MonedaService=Un,e.NormaInformacionFinancieraModel=to,e.PaginateService=ze,e.PdfModalComponent=xe,e.PdfModalService=ge,e.Persona=Je,e.PersonaFisica=Ze,e.PersonaFisicaService=Rn,e.PersonaMoral=Ge,e.PersonaMoralService=nn,e.Proveedor=Ye,e.ProveedorCuentaBanco=Ln,e.ProveedorCuentaBancoService=Vn,e.ProveedorFlete=Nn,e.ProveedorFleteService=$n,e.ProveedorService=Ke,e.SeleccionaArticuloComponent=qt,e.SelectAcreedorComponent=Gt,e.SelectClienteComponent=$e,e.SelectProveedorComponent=tt,e.SerieDocumento=Gn,e.SerieDocumentoService=Zn,e.SessionCajaService=Pe,e.SessionCreateComponent=Fe,e.StockService=nt,e.TipoCatalogo=Qn,e.TipoContacto=En,e.TipoContactoService=Wn,e.Ubicacion=Yn,e.UbicacionService=Kn,e.Usuario=Ce,e.VersionCheckService=ln,e.httpInterceptor=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=visorus-erp-core.umd.min.js.map