PageSourceSearch

https://servimax.co/2094.03aeac7c52e1a645.js

js servimax.co collected 2026-10-02 01:20:54 UTC 13,799 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkservimax_home_page=self.webpackChunkservimax_home_page||[]).push([[2094],{2094:(w,h,l)=>{l.r(h),l.d(h,{default:()=>M});var p=l(976),o=l(177),t=l(4438),C=l(5743),P=l(5001),x=l(6367),v=l(3409);const s=["scrollContainer"],_=c=>({"text-highlighted":c});function u(c,f){if(1&c&&(t.j41(0,"div",21)(1,"span",22),t.EFF(2),t.k0s()()),2&c){const e=t.XpG(2);t.R7$(2),t.JRh(e.alertMessage)}}function d(c,f){if(1&c&&(t.j41(0,"div",23)(1,"span",24),t.EFF(2),t.k0s()()),2&c){const e=t.XpG(2);t.R7$(2),t.JRh(e.LABELS.soldout)}}function a(c,f){if(1&c){const e=t.RV6();t.j41(0,"div",12)(1,"div",13)(2,"app-product-counter-component",14),t.bIt("increment",function(){const i=t.eBV(e).index,r=t.XpG();return t.Njj(r.incrementCount(i))})("decrement",function(){const i=t.eBV(e).index,r=t.XpG();return t.Njj(r.decrementCount(i))})("remove",function(){const i=t.eBV(e).index,r=t.XpG();return t.Njj(r.removeProduct(i))}),t.k0s(),t.j41(3,"div",15),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG();return t.Njj(r.onProductClick(i))}),t.nrm(4,"img",16),t.k0s(),t.DNE(5,u,3,1,"div",17)(6,d,3,1,"div",18),t.j41(7,"p",19),t.EFF(8),t.k0s(),t.j41(9,"p",20),t.EFF(10),t.k0s()()()}if(2&c){const e=f.$implicit,n=f.index,i=t.XpG();t.R7$(2),t.Y8G("count",i.counts[n]),t.R7$(2),t.Mz_("alt","Imagen del producto ",e.name,""),t.Y8G("src",e.urlFile||"https://storage.googleapis.com/attachments-servimax-isa/imagedefault.jpeg",t.B4B),t.R7$(),t.Y8G("ngIf",i.showAlert&&i.alertIndex===n),t.R7$(),t.Y8G("ngIf",e.inventoryCount<=0),t.R7$(2),t.JRh(e.name),t.R7$(2),t.SpI(" ",i.convertCurrency(i.calculatePriceWithTax(n))," ")}}let M=(()=>{class c{constructor(e,n){this.router=e,this.storageService=n,this.LABELS=p.k,this.titleClick=new t.bkB,this.titleMain="",this.productsList=[],this.departmentId=0,this.remove=new t.bkB,this.products=[],this.emptyProduct=[],this.counts=[],this.showAlert=!1,this.alertMessage="",this.alertIndex=null,this.totalItemsInCart=0,this.isScrollingRight=!1,this.isAtEnd=!1}ngOnInit(){this.products=this.productsList,this.emptyProduct=this.storageService.getCart(),this.counts=this.products.map(e=>{const n=this.emptyProduct.find(i=>i.id===e.id);return n?n.quantity:0})}incrementCount(e){const n=this.products[e],i=this.getProductQuantityInCart(n.id);i+this.counts[e]>=n.inventoryCount?this.showProductAlert(e,` ${n.inventoryCount-i} unidades disponibles en inventario.`):(this.counts[e]=(this.counts[e]||0)+1,this.addToCart(e,1,n.taxed||[]))}showProductAlert(e,n){this.alertMessage=n,this.alertIndex=e,this.showAlert=!0,setTimeout(()=>{this.closeAlert()},3e3)}closeAlert(){this.showAlert=!1,this.alertIndex=null,this.alertMessage=""}getProductQuantityInCart(e){if(!e)return 0;const n=this.emptyProduct.find(i=>i.id===e);return n?n.quantity:0}decrementCount(e){const n=this.products[e];this.getProductQuantityInCart(n.id)>0&&(this.counts[e]=this.counts[e]||0,this.counts[e]>0)&&(this.counts[e]--,0===this.counts[e]?this.removeFromCart(e):this.addToCart(e,-1,n.taxed||[]))}removeProduct(e){this.counts[e]=0,this.calculateTotalItems()}calculateTotalItems(){this.totalItemsInCart=this.counts.reduce((e,n)=>e+n,0)}addToCart(e,n,i){this.counts[e]>0?this.storageService.addToCart({id:this.products[e].id,name:this.products[e].name,price:this.products[e].price,quantity:n,urlFile:this.products[e].urlFile,idVersion:this.products[e].idVersion??this.products[e].idVersion,taxed:i,idHomologado:this.products[e].idHomologado,inventoryCount:this.products[e].inventoryCount}):console.error("Cantidad inv\xe1lida o producto no disponible en el \xedndice:",e)}removeFromCart(e){this.counts[e]>0&&(this.storageService.removeFromCart({id:this.products[e].id,name:this.products[e].name,price:this.products[e].price,quantity:1,urlFile:this.products[e].urlFile,taxed:[],inventoryCount:this.products[e].inventoryCount,idVersion:this.products[e].idVersion??this.products[e].idVersion}),this.counts[e]--,this.calculateTotalItems())}calculatePriceWithTax(e){const n=this.products[e],i=n.price;let r=0;return n.taxed&&n.taxed.forEach(g=>{"IMP_VALOR_PROD"===g.type?r+=g.value:"IMP_PORCENTAJE_PROD"===g.type&&(r+=g.value*i)}),i+r}startScrollRight(){this.isScrollingRight=!0,this.clickStartTime=(new Date).getTime()}stopScrollRight(){const e=(new Date).getTime();this.clickDuration=e-this.clickStartTime,this.scrollRight(),this.isScrollingRight=!1}scrollRight(){const e=this.scrollContainer.nativeElement,n=e.children[0].offsetWidth;e.scrollBy({left:n,behavior:"smooth"});const i=e.scrollWidth-e.offsetWidth;e.scrollLeft+e.offsetWidth>=i?this.isAtEnd=!0:e.scrollLeft+e.offsetWidth>=i-n&&(this.products.push(this.products.shift()),this.counts.push(this.counts.shift()))}startScrollLeft(){this.clickStartTime=(new Date).getTime()}stopScrollLeft(){const e=(new Date).getTime();this.clickDuration=e-this.clickStartTime,this.scrollLeft()}scrollLeft(){const e=this.scrollContainer.nativeElement,n=e.children[0].offsetWidth;e.scrollBy({left:-n,behavior:"smooth"}),e.scrollLeft<=0?this.isAtEnd=!1:e.scrollLeft<=n&&(this.products.unshift(this.products.pop()),this.counts.unshift(this.counts.pop()),e.scrollBy({left:-n}))}convertCurrency(e){return(0,C.aL)(e)}onProductClick(e){this.router.navigate(["/product-detail",e.id])}onTitleClick(){this.titleClick.emit()}static{this.\u0275fac=function(n){return new(n||c)(t.rXU(x.Ix),t.rXU(v.W))}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-product-list"]],viewQuery:function(n,i){if
1(1&n&&t.GBs(s,7),2&n){let r;t.mGM(r=t.lsd())&&(i.scrollContainer=r.first)}},inputs:{titleMain:"titleMain",productsList:"productsList",departmentId:"departmentId"},outputs:{titleClick:"titleClick",remove:"remove"},standalone:!0,features:[t.aNF],decls:14,vars:6,consts:[["scrollContainer",""],[1,"container-fluid","mx-xl-extra","mx-lg-extra","mt-5"],["href",t.wXG`https://fonts.googleapis.com/css?family=Poppins`,"rel","stylesheet"],[1,"d-flex","justify-content-between","align-items-center","text-initial"],[1,"mt-3","title-main"],[1,"d-flex","align-items-center"],[1,"text-end","mt-2","fw-bold","fs-5",3,"click","ngClass"],[1,"bi","bi-chevron-left","mx-3","scroll-buttons",2,"font-size","25px",3,"mousedown","mouseup"],[1,"bi","bi-chevron-right","scroll-buttons",2,"font-size","25px",3,"mousedown","mouseup"],[1,"d-flex","justify-content-start","align-items-center","mt-4"],[1,"row","flex-nowrap","overflow-x-auto"],["class","product-container col-6 col-md-4 col-lg-2 d-flex p-3 mx-1 flex-column align-items-center",4,"ngFor","ngForOf"],[1,"product-container","col-6","col-md-4","col-lg-2","d-flex","p-3","mx-1","flex-column","align-items-center"],[1,"text-center","position-relative"],[3,"increment","decrement","remove","count"],[2,"cursor","pointer",3,"click"],["loading","lazy",1,"img-fluid","product-img",2,"width","100%","height","auto",3,"src","alt"],["class","product-alert-overlay",4,"ngIf"],["class","overlay",4,"ngIf"],[1,"mt-3","product-title","line-clamp","text-start"],[1,"product-price","mt-3","d-flex","justify-content-start",2,"font-size","22px","font-weight","900"],[1,"product-alert-overlay"],[1,"alert-text"],[1,"overlay"],[1,"out-of-stock-text"]],template:function(n,i){if(1&n){const r=t.RV6();t.j41(0,"div",1),t.nrm(1,"link",2),t.j41(2,"div",3)(3,"h2",4),t.EFF(4),t.k0s(),t.j41(5,"div",5)(6,"a",6),t.bIt("click",function(){return t.eBV(r),t.Njj(i.onTitleClick())}),t.EFF(7),t.k0s(),t.j41(8,"i",7),t.bIt("mousedown",function(){return t.eBV(r),t.Njj(i.startScrollLeft())})("mouseup",function(){return t.eBV(r),t.Njj(i.stopScrollLeft())}),t.k0s(),t.j41(9,"i",8),t.bIt("mousedown",function(){return t.eBV(r),t.Njj(i.startScrollRight())})("mouseup",function(){return t.eBV(r),t.Njj(i.stopScrollRight())}),t.k0s()()(),t.j41(10,"div",9)(11,"div",10,0),t.DNE(13,a,11,8,"div",11),t.k0s()()()}2&n&&(t.R7$(4),t.JRh(i.titleMain),t.R7$(2),t.Y8G("ngClass",t.eq3(4,_,i.isAtEnd)),t.R7$(),t.SpI(" ",i.LABELS.seemore," "),t.R7$(6),t.Y8G("ngForOf",i.products))},dependencies:[o.MD,o.YU,o.Sq,o.bT,P.A],styles:[".container-fluid[_ngcontent-%COMP%]{font-family:Poppins,system-ui}.product-img[_ngcontent-%COMP%]{max-height:160px;width:auto}.product-container[_ngcontent-%COMP%]{width:100%;max-width:250px;max-height:380px;text-align:center;border-radius:12px;transition:transform .3s ease,box-shadow .3s ease}.product-container[_ngcontent-%COMP%]:hover{transform:scale(1.05);box-shadow:0 0 20px #0066cc8c}.product-alert-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fffc;display:flex;justify-content:center;align-items:center;z-index:10;border-radius:8px}.alert-text[_ngcontent-%COMP%]{color:#d9534f;font-weight:700;text-align:center;font-size:16px}.overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#808080b3;display:flex;justify-content:center;align-items:center;color:#fff;font-size:24px;font-weight:700;z-index:1;border-radius:1rem}.out-of-stock-text[_ngcontent-%COMP%]{text-align:center}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.line-clamp[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2}.product-title[_ngcontent-%COMP%]{font-size:18px;margin:0}.product-price[_ngcontent-%COMP%]{font-size:22px;font-weight:900;margin:0}.flex-nowrap[_ngcontent-%COMP%]{scroll-behavior:smooth}.row[_ngcontent-%COMP%]{scrollbar-width:none}.row[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.text-highlighted[_ngcontent-%COMP%]{color:#fc0;font-weight:700;transition:color .3s ease;-webkit-user-select:none;user-select:none;cursor:default}.text-highlighted[_ngcontent-%COMP%]:hover{color:#f90}a[_ngcontent-%COMP%]{color:#007bff;transition:color .3s ease;-webkit-user-select:none;user-select:none;cursor:pointer}a[_ngcontent-%COMP%]:hover{color:#0056b3}@media (max-width: 540px){.product-img[_ngcontent-%COMP%]{max-height:165px}}@media (min-width: 576px){.product-container[_ngcontent-%COMP%]{max-width:150px}}@media (min-width: 768px){.product-container[_ngcontent-%COMP%]{max-width:180px}}@media (min-width: 992px){.product-container[_ngcontent-%COMP%]{max-width:220px}.title-main[_ngcontent-%COMP%]{font-size:26px}}@media (min-width: 1005px) and (min-width: 992px){.mx-lg-extra[_ngcontent-%COMP%]{padding-left:136px!important;padding-right:139px!important}}
1@media (min-width: 1360px) and (min-width: 1200px){.mx-xl-extra[_ngcontent-%COMP%]{padding-left:340px!important;padding-right:310px!important}}@media (max-width: 768px){.scroll-buttons[_ngcontent-%COMP%]{display:none}}.title-main[_ngcontent-%COMP%]{font-size:22px;font-weight:900;color:#00000073;text-shadow:.3px .3px 0,-.3px -.3px 0,.3px -.3px 0,-.3px .3px 0}.text-highlight[_ngcontent-%COMP%]{color:#00deff}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], label[_ngcontent-%COMP%], p[_ngcontent-%COMP%], .product-title[_ngcontent-%COMP%], .card-title[_ngcontent-%COMP%], span[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;cursor:default}h1[_ngcontent-%COMP%]:focus, h2[_ngcontent-%COMP%]:focus, p[_ngcontent-%COMP%]:focus, .product-title[_ngcontent-%COMP%]:focus, .card-title[_ngcontent-%COMP%]:focus, span[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}span[_ngcontent-%COMP%]{pointer-events:none}"]})}}return c})()},5001:(w,h,l)=>{l.d(h,{A:()=>v});var p=l(177),o=l(4438);const t=s=>({"rounded-container":s});function C(s,_){if(1&s){const u=o.RV6();o.j41(0,"i",6),o.bIt("click",function(){o.eBV(u);const a=o.XpG();return o.Njj(a.onRemove())}),o.k0s()}}function P(s,_){if(1&s){const u=o.RV6();o.j41(0,"i",7),o.bIt("click",function(){o.eBV(u);const a=o.XpG();return o.Njj(a.onDecrement())}),o.k0s()}}function x(s,_){if(1&s&&(o.j41(0,"p",8),o.EFF(1),o.k0s()),2&s){const u=o.XpG();o.R7$(),o.JRh(u.count)}}let v=(()=>{class s{constructor(){this.count=0,this.increment=new o.bkB,this.decrement=new o.bkB,this.remove=new o.bkB}onIncrement(){this.increment.emit()}onDecrement(){this.count>0&&this.decrement.emit()}onRemove(){this.remove.emit()}static{this.\u0275fac=function(d){return new(d||s)}}static{this.\u0275cmp=o.VBU({type:s,selectors:[["app-product-counter-component"]],inputs:{count:"count"},outputs:{increment:"increment",decrement:"decrement",remove:"remove"},standalone:!0,features:[o.aNF],decls:6,vars:6,consts:[[1,"product-card"],[1,"count-container","d-flex","align-items-center","w-100",3,"ngClass"],["class","bi bi-trash button-add","style","font-size: 17px; cursor: pointer;",3,"click",4,"ngIf"],["class","bi bi-dash-lg button-add","style","font-size: 17px; cursor: pointer;",3,"click",4,"ngIf"],["class","product-count","style","font-size: 20px; font-weight: 700; color: #000;",4,"ngIf"],[1,"bi","bi-plus-lg","button-add",2,"font-size","17px","cursor","pointer",3,"click"],[1,"bi","bi-trash","button-add",2,"font-size","17px","cursor","pointer",3,"click"],[1,"bi","bi-dash-lg","button-add",2,"font-size","17px","cursor","pointer",3,"click"],[1,"product-count",2,"font-size","20px","font-weight","700","color","#000"]],template:function(d,a){1&d&&(o.j41(0,"div",0)(1,"div",1),o.DNE(2,C,1,0,"i",2)(3,P,1,0,"i",3)(4,x,2,1,"p",4),o.j41(5,"i",5),o.bIt("click",function(){return a.onIncrement()}),o.k0s()()()),2&d&&(o.R7$(),o.Y8G("ngClass",o.eq3(4,t,a.count>1)),o.R7$(),o.Y8G("ngIf",1===a.count),o.R7$(),o.Y8G("ngIf",a.count>1),o.R7$(),o.Y8G("ngIf",a.count>0))},dependencies:[p.MD,p.YU,p.bT],styles:[".product-card[_ngcontent-%COMP%]{width:100%;margin:10px 0}.count-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;width:100%}.product-count[_ngcontent-%COMP%]{margin:0 10px}.button-add[_ngcontent-%COMP%]{color:#03a454;border-radius:100%;margin:10px;border:1px solid #EDEDED;background-color:#fff;height:30px;width:30px;display:flex;justify-content:center;align-items:center}"]})}}return s})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.