1import{$r as zx,An as ie,B as IS,Jr as yu,Kr as yr,Lr as x,Rr as xv,Sn as g0,St as Rw,Vr as y0,Wr as yI,Xn as p0,Zr as zF,_r as tx,br as up,h as Cp,in as aI,jr as vu,kt as TN,ln as bs,lt as Nx,mt as Pu,r as $c,w as E0,wn as gp,xn as g}from"./chunk-rWOw5BPY.js";import{m as V,q as P}from"./main-RHYBMXCR.js";var U=n=>({topics:n});var W=n=>[`/articles`,n];var q=(n,t)=>t.url;function F(n,t){if(n&1&&($c(0,`a`,4),Nx(1),gp()),n&2){let e=tx(2);Rw(`queryParams`,zx(3,U,e.topics())),vu(`aria-label`,e.contextLabel()+` Articles`),TN(),Cp(``,e.contextLabel(),` Articles`)}}function I(n,t){if(n&1&&yu(0,`div`,13),n&2){let e=tx().$implicit;aI(`background-image`,`url(`+e.imageUrl+`)`),vu(`aria-label`,e.imageAlt)}}function T(n,t){if(n&1&&yu(0,`div`,10),n&2){let e=tx().$implicit;vu(`aria-label`,e.imageAlt)}}function R(n,t){if(n&1&&($c(0,`div`,7)(1,`a`,8),p0(2,I,1,3,`div`,9)(3,T,1,1,`div`,10),$c(4,`h4`),Nx(5),gp(),$c(6,`p`,11),Nx(7,` Read More `),yu(8,`app-icon`,12),gp()()()),n&2){let e=t.$implicit;TN(),Rw(`routerLink`,zx(6,W,e.url)),vu(`aria-label`,`Read more about `+e.title),TN(),g0(e.imageUrl?2:3),TN(3),yI(e.title),TN(3),Rw(`custom`,!0)(`ariaHidden`,!0)}}function z(n,t){if(n&1&&($c(0,`section`,0)(1,`div`,1)(2,`h3`,2),Nx(3,`Learn with Zaber`),gp(),$c(4,`div`,3),p0(5,F,2,5,`a`,4),$c(6,`a`,5),Nx(7,`All Articles`),gp()()(),$c(8,`div`,6),y0(9,R,9,8,`div`,7,q),gp()()),n&2){let e=tx();TN(5),g0(e.hasContext()?5:-1),TN(4),E0(e.articles())}}var O=class n{productsApiService=g(P);curatedArticles=Pu([]);contextCategories=Pu([]);contextLabel=Pu.required();ready=Pu(!0);fetchedArticles=ie([]);curatedUrls=bs(()=>this.curatedArticles().filter(t=>t.url).map(t=>t.url));uniqueCategories=bs(()=>[...new Set(this.contextCategories().filter(Boolean))]);matchedCategories=bs(()=>{let t=this.uniqueCategories();if(t.length===0)return[];let e=new Set(this.fetchedArticles().flatMap(a=>a.categories??[]));return t.filter(a=>e.has(a))});topics=bs(()=>this.matchedCategories().join(`;`));hasContext=bs(()=>this.matchedCategories().length>0);fetchEffect=xv(t=>{if(!this.ready())return;let e=this.curatedUrls(),a=this.uniqueCategories(),E=this.productsApiService.getArticlesForContext(e,a).pipe(yr(()=>x([]))).subscribe(Z=>this.fetchedArticles.set(Z));t(()=>E.unsubscribe())});articles=bs(()=>this.fetchedArticles().map(t=>{let e=this.resolveImageUrl(t.thumbnail_url,t.image_url);return{articleId:t.article_id,title:t.h1,url:t.url,imageUrl:e,imageAlt:t.thumbnail_alt||t.h1}}));resolveImageUrl(t,e){return t&&!t.includes(`undefined`)?t:e&&!e.includes(`undefined`)?e:null}static ɵfac=function(e){return new(e||n)};static ɵcmp=up({type:n,selectors:[[`app-learn-with-zaber`]],inputs:{curatedArticles:[1,`curatedArticles`],contextCategories:[1,`contextCategories`],contextLabel:[1,`contextLabel`],ready:[1,`ready`]},decls:1,vars:1,consts:[[`aria-labelledby`,`learn-heading`,1,`learn-ctn`,`full-bleed`],[1,`learn-header`,`mb-4`],[`id`,`learn-heading`,1,`mb-0`],[1,`learn-buttons`],[`routerLink`,`/articles`,1,`btn`,`btn-other`,3,`queryParams`],[`routerLink`,`/articles`,1,`btn`,`btn-other`],[1,`row`],[1,`col-sm-6`,`col-lg-4`,`mb-4`],[1,`card-link`,3,`routerLink`],[`role`,`img`,1,`img-ctn`,3,`background-image`],[`role`,`img`,1,`img-ctn`,`img-placeholder`],[1,`read-more`],[`name`,`chevron-right`,`width`,`0.75rem`,`height`,`0.75rem`,3,`custom`,`ariaHidden`],[`role`,`img`,1,`img-ctn`]],template:function(e,a){e&1&&p0(0,z,11,1,`section`,0),e&2&&g0(a.articles().length>0?0:-1)},dependencies:[zF,IS,V],styles:[`[_nghost-%COMP%]{display:block}.learn-ctn[_ngcontent-%COMP%]{padding-block:3rem;background-color:var(--%NS%main-bg-alt)}.learn-header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem}.learn-buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem}.btn-other[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem;min-width:11.875rem}.card-link[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-decoration:none;color:var(--%NS%text-primary);border:1px solid var(--%NS%border-color);border-radius:.5rem;overflow:hidden;background-color:var(--%NS%bg-tertiary);height:100%;
1transition:box-shadow var(--%NS%transition-base)}.card-link[_ngcontent-%COMP%]:hover{box-shadow:0 0 10px var(--%NS%color-grey)}.card-link[_ngcontent-%COMP%]:hover .read-more[_ngcontent-%COMP%]{color:var(--%NS%color-link-hover);--%NS%icon-path-fill: var(--%NS%color-link-hover);text-decoration:none}.card-link[_ngcontent-%COMP%] .img-ctn[_ngcontent-%COMP%]{background-color:var(--%NS%bg-primary);background-position:center;background-repeat:no-repeat;background-size:cover;height:10rem;width:100%;border-bottom:1px solid var(--%NS%border-color)}.card-link[_ngcontent-%COMP%] .img-placeholder[_ngcontent-%COMP%]{background-color:var(--%NS%color-off-white)}.card-link[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1rem;font-weight:var(--%NS%font-weight-semibold);padding:.75rem 1rem .25rem;margin:0;min-height:5rem}.card-link[_ngcontent-%COMP%] .read-more[_ngcontent-%COMP%]{font-weight:var(--%NS%font-weight-semibold);padding:.75rem 1rem;margin:auto 0 0;color:var(--%NS%color-link);--%NS%icon-path-fill: var(--%NS%color-link);text-decoration:underline;transition:color var(--%NS%transition-fast)}@media(max-width:575.98px){.card-link[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-height:auto}}`],changeDetection:1})};export{O as t};
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.