PageSourceSearch

https://ibertronica.es/chunk-CC7IRERU.js

js ibertronica.es collected 2026-09-25 00:13:55 UTC 4,394 bytes, 1 lines download raw bytes

1import{a as G}from"./chunk-PGU6UYBF.js";import{a as q}from"./chunk-YQF6A74S.js";import{a as W}from"./chunk-RILZNMIY.js";import{a as B,b as H}from"./chunk-OEPGTP6C.js";import{a as L}from"./chunk-LZ4IYHPL.js";import{a as _}from"./chunk-AI36FUGZ.js";import{a as U}from"./chunk-ZBTEDNI7.js";import"./chunk-XJMBNIKE.js";import{a as y}from"./chunk-CJ22L3NW.js";import"./chunk-B5V7S4C6.js";import{Fa as z,Ga as A}from"./chunk-C7I55XO7.js";import{$b as p,Cb as k,Cc as g,Db as R,Ea as S,Fb as E,Gb as l,Hb as c,Hc as V,Ib as s,Ic as $,Jb as a,Kb as o,Lb as m,Sa as w,Sb as O,T as v,Ua as d,Y as i,Zb as j,ba as b,ca as x,ha as h,ib as C,nc as M,oa as f,pb as P,pc as N,qb as T,yb as D,za as F,zb as I}from"./chunk-QVGDTXHA.js";import"./chunk-IM5V7DCU.js";var u=class e{apiService=i(U);transferState=i(S);platformId=i(F);translocoService=i(B);getFeatured(){let t=this.translocoService.getActiveLang();return W(this.transferState,`featured-${t}`,z(this.platformId),A(this.platformId),()=>this.apiService.get("/featured"))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=v({token:e,factory:e.\u0275fac,providedIn:"root"})};var Z=()=>[import("./chunk-A3VGLGBZ.js").then(e=>e.ProductCard)],ee=()=>[1,2,3],te=()=>[1,2,3,4,5,6,7,8],K=(e,t)=>t.id,re=(e,t)=>"sk-prod-"+e;function ie(e,t){if(e&1&&(a(0,"a",4),m(1,"app-image",5),o()),e&2){let r=t.$implicit;s("href",r.url,w),d(),s("src",r.image)("alt",r.alt)("width",600)("height",200)("priority",!0)}}function ae(e,t){if(e&1&&l(0,ie,2,6,"a",4,K),e&2){let r,n=p();c((r=n.featured())==null?null:r.images)}}function oe(e,t){e&1&&m(0,"div",6)}function ne(e,t){e&1&&l(0,oe,1,0,"div",6,E),e&2&&c(g(0,ee))}function de(e,t){if(e&1){let r=O();a(0,"app-product-card",9),j("visibilityChanged",function(Q){b(r);let X=p(2);return x(X.onProductVisibility(Q))}),o()}if(e&2){let r=t.$implicit,n=p(2);s("product",r)("priority",n.imagePriorities[r.id])}}function le(e,t){if(e&1&&(a(0,"section",7),l(1,de,1,2,"app-product-card",8,K),o()),e&2){let r=p();d(),c(r.products())}}function ce(e,t){e&1&&(a(0,"div",11),m(1,"app-card-skeleton"),o())}function pe(e,t){e&1&&(a(0,"div",10),l(1,ce,2,0,"div",11,re),o()),e&2&&(d(),c(g(0,te)))}var J=class e{featuredService=i(u);productService=i(q);destroyRef=i(h);featured=f(null);products=f([]);imagePriorities={};ngOnInit(){this.loadData()}onProductVisibility(t){this.imagePriorities[t.id]=t.visible}loadData(){this.featuredService.getFeatured().pipe(y(this.destroyRef),_({label:"featured.getFeatured"})).subscribe(t=>{t?.body&&(this.featured.set(t.body),t.body&&t.body.products.length>0&&this.loadProducts(t.body.products))})}loadProducts(t){this.productService.filter({page:1,limit:-1,orderBy:"id",order:1},{id:"",type:"products",attributes:[],brands:[],categories:[],availability:[],products:t}).pipe(y(this.destroyRef),_({label:"featured.loadProducts"})).subscribe(r=>{this.products.set(r?.body?.products||[])})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=C({type:e,selectors:[["app-featured"]],decls:11,vars:5,consts:[[200],[1,"w-full","3xl:max-w-10/12","4xl:max-w-8/12","mx-auto","px-4","py-4","lg:py-8","min-h-24","lg:min-h-72","min-w-8/12"],[1,"block-title","h-6","lg:h-[3.5rem]","text-xs","lg:text-xl"],[1,"grid","grid-cols-1","sm:grid-cols-3","gap-4"],[1,"group","flex","justify-center","w-full","aspect-3/1","rounded-lg","bg-gray-100","dark:bg-zinc-800",3,"href"],[1,"transform","group-hover:scale-105","transition-transform","duration-300","object-cover","w-full","h-full",3,"src","alt","width","height","priority"],[1,"w-full","aspect-3/1","bg-gray-200","dark:bg-zinc-800","animate-pulse","rounded-lg"],[1,"w-full","3xl:max-w-10/12","4xl:max-w-8/12","mx-auto","px-4","py-8","grid","grid-cols-2","sm:grid-cols-4","lg:grid-cols-6","4xl:grid-cols-6","gap-4","min-h-[500px]"],[3,"product","priority"],[3,"visibilityChanged","product","priority"],[1,"w-full","3xl:max-w-10/12","4xl:max-w-8/12","mx-auto","px-4","py-8","grid","grid-cols-1","sm:grid-cols-2","lg:grid-cols-4","4xl:grid-cols-6","gap-4","min-h-[500px]"],[1,"w-full","min-h-[498px]"]],template:function(r,n){r&1&&(a(0,"section",1)(1,"div",2),M(2),V(3,"transloco"),o(),a(4,"div",3),k(5,ae,2,0)(6,ne,2,1),o()(),P(7,le,3,0)(8,pe,3,1),D(9,7,Z,null,8,null,null,0,T)),r&2&&(d(2),N(" ",$(3,3,"featured.featured-title")," "),d(3),R(n.featured()?5:6),d(4),I(n.products().length>0))},dependencies:[G,L,H],encapsulation:2})};export{J as Featured};

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.