PageSourceSearch

https://www.dimers.com/chunk-EUB3X6D2.js

js dimers.com collected 2026-09-24 18:42:04 UTC 11,909 bytes, 1 lines download raw bytes

1import{a as V}from"./chunk-NDE7YY2D.js";import{b as W}from"./chunk-VB2I2NNF.js";import{d as F}from"./chunk-L435M7MP.js";import{a as M}from"./chunk-JPCRBS77.js";import"./chunk-I6CCTIVI.js";import"./chunk-I7X5EPSI.js";import"./chunk-FAKKFPWS.js";import{g as B}from"./chunk-HCNO6M7P.js";import{a as H}from"./chunk-3DO2DTDJ.js";import{a as D}from"./chunk-HNPVONV2.js";import"./chunk-EAJDRVGJ.js";import{n as I}from"./chunk-UCCMBJTV.js";import{$b as E,Ab as P,Fc as r,Gc as c,Hc as x,Vb as f,Wb as N,Xb as u,Zb as g,ac as h,ad as v,bc as _,cc as m,cd as w,dc as i,ec as a,fc as d,ka as C,lb as n,mc as T,qc as k,ra as y,sa as L,sc as p,xa as A}from"./chunk-Z27RTGQE.js";import{a as S,b}from"./chunk-NAIKXHWT.js";function j(t,l){t&1&&(i(0,"app-card",27),d(1,"div",28),i(2,"div",29),d(3,"div",25)(4,"div",30)(5,"div",31),a()()),t&2&&m("padded",!1)}function O(t,l){if(t&1&&(i(0,"div",7)(1,"app-card",19),d(2,"div",20),i(3,"div",21),d(4,"div",22)(5,"div",23)(6,"div",24)(7,"div",25),a()(),i(8,"div",26),h(9,j,6,1,"app-card",27,E),a()()),t&2){let e=p();n(),m("padded",!1),n(8),_(e.topStorySkeleton)}}function R(t,l){if(t&1){let e=T();i(0,"div",8)(1,"div",32),r(2,"Failed to load top stories."),a(),i(3,"button",33),k("click",function(){y(e);let s=p();return L(s.retry())}),r(4," Try again "),a()()}}function $(t,l){if(t&1&&d(0,"app-article-image-container",40),t&2){let e=p(2);m("unrounded",!0)("imageSrc",e.topStoryLead.image)("imageAlt",e.topStoryLead.title)("imageWidth",900)("imageHeight",506)("showProBadge",e.topStoryLead.showProBadge)}}function z(t,l){t&1&&d(0,"div",41)}function G(t,l){if(t&1&&d(0,"app-article-image-container",44),t&2){let e=p().$implicit;m("unrounded",!0)("imageSrc",e.image)("imageAlt",e.title)("imageWidth",500)("imageHeight",281)("showProBadge",e.showProBadge)}}function U(t,l){t&1&&d(0,"div",45)}function Z(t,l){if(t&1&&(i(0,"app-card",34)(1,"a",43),u(2,G,1,6,"app-article-image-container",44)(3,U,1,0,"div",45),i(4,"div",46)(5,"h3",47),r(6),a(),i(7,"div",48)(8,"span"),r(9),a(),i(10,"span",39),r(11,"\u2022"),a(),i(12,"time"),r(13),v(14,"date"),a()()()()()),t&2){let e=l.$implicit,o=p(2);m("padded",!1),n(),m("routerLink",o.articlePath(e)),n(),g(e.image?2:3),n(4),x(" ",e.title," "),n(3),c(e.author||"Dimers"),n(3),f("datetime",e.published_at),n(),c(w(14,7,e.published_at,"MMM d, yyyy"))}}function q(t,l){if(t&1&&(i(0,"div",9)(1,"app-card",34)(2,"a",35)(3,"div",36)(4,"h3",37),r(5),a(),i(6,"div",38)(7,"span"),r(8),a(),i(9,"span",39),r(10,"\u2022"),a(),i(11,"time"),r(12),v(13,"date"),a()()(),u(14,$,1,6,"app-article-image-container",40)(15,z,1,0,"div",41),a()(),i(16,"div",42),h(17,Z,15,10,"app-card",34,N().trackArticle,!0),a()()),t&2){let e=p();n(),m("padded",!1),n(),m("routerLink",e.articlePath(e.topStoryLead)),n(3),x(" ",e.topStoryLead.title," "),n(3),c(e.topStoryLead.author||"Dimers"),n(3),f("datetime",e.topStoryLead.published_at),n(),c(w(13,7,e.topStoryLead.published_at,"MMM d, yyyy")),n(2),g(e.topStoryLead.image?14:15),n(3),_(e.topStoryGrid)}}function J(t,l){t&1&&(i(0,"div",10),r(1," No featured articles yet. "),a())}function K(t,l){t&1&&(i(0,"div",50)(1,"app-card",27),d(2,"div",28),i(3,"div",51),d(4,"div",52)(5,"div",25)(6,"div",53)(7,"div",31),a()()()),t&2&&(n(),m("padded",!1))}function Q(t,l){if(t&1&&(i(0,"div",17)(1,"div",49),h(2,K,8,1,"div",50,E),a()()),t&2){let e=p();m("options",e.allNewsCarouselOptions),n(2),_(e.allNewsSkeleton)}}function X(t,l){if(t&1){let e=T();i(0,"div",8)(1,"div",32),r(2," Failed to load latest articles. "),a(),i(3,"button",33),k("click",function(){y(e);let s=p();return L(s.retry())}),r(4," Try again "),a()()}}function Y(t,l){t&1&&(i(0,"div",10),r(1," No recent articles available. "),a())}function ee(t,l){if(t&1&&d(0,"app-article-image-container",57),t&2){let e=p().$implicit;m("unrounded",!0)("imageSrc",e.image)("imageAlt",e.title)("imageWidth",700)("imageHeight",394)("showProBadge",e.showProBadge)("draggable",!1)}}function te(t,l){t&1&&d(0,"div",45)}function ie(t,l){if(t&1&&(i(0,"div",54)(1,"app-card",55)(2,"a",43)(3,"div",56),u(4,ee,1,7,"app-article-image-container",57)(5,te,1,0,"div",45),d(6,"div",58),a(),i(7,"div",46)(8,"h4",59),r(9),a(),i(10,"div",60)(11,"span",61),r(12),a(),i(13,"time",62),r(14),v(15,"date"),a()()()()()()),t&2){let e=l.$implicit,o=p(2);n(),m("padded",!1),n(),m("routerLink",o.articlePath(e)),n(2),g(e.image?4:5),n(5),x(" ",e.title," "),n(3),c(e.author||"Dimers"),n(),f("datetime",e.published_at),n(),c(w(15,7,e.published_at,"MMM d, yyyy"))}}function ae(t,l){if(t&1&&(i(0,"div",18)(1,"div",49),h(2,ie,16,10,"div",54,N().trackArticle,!0),a()()),t&2){let e=p();m("options",e.allNewsCarouselOptions),n(2),_(e.allNews)}}var he=(()=>{class t{topStoriesTitle="Top Stories";allNewsTitle="All news";allNewsSkeleton=Array.from({length:8},(e,o)=>o);topStorySkeleton=Array.from({length:6},(e,o)=>o);allNewsCarouselOptions={align:"start",loop:!1,dragFree:!0};topStoriesLoading=!0;topStoriesError=!1;topStories=[];topStoryLead=null;topStoryGrid=[];allNewsLoading=!0;allNewsError=!1;allNews=[];newsService=C(V);destroyRef=C(A);latestArticles=[];latestArticlesLoaded=!1;topStoriesSettled=!1;ngOnInit(){this.fetchNews()}retry(){this.fetchNews()}trackArticle(e,o){return o.id??o.slug}articlePath(e){return F(e?.slug,e?.categories||[])}fetchNews(){this.topStoriesLoading=!0,this.topStoriesError=!1,this.allNewsLoading=!0,this.allNewsError=!1,this.topStories=[],this.topStoryLead=null,this.topStoryGrid=[],this.latestArticles=[],this.latestArticlesLoaded=!1,this.topStoriesSettled=!1,this.allNews=[],this.newsService.homeFeaturedArticles(7).pipe(H(this.destroyRef)).subscribe({next:e=>{let o=e.map(s=>b(S({},s),{showProBadge:this.calculateProStatus(s)}));this.topStories=o,this.topStoryLead=o[0]??null,this.topStoryGrid=o.slice(1,7),this.topStoriesLoading=!1,this.topStoriesSettled=!0,this.updateLatestNews()},error:e=>{console.error(e),this.topStoriesError=!0,this.topStoriesLoading=!1,this.topStoriesSettled=!0,this.updateLatestNews()}}),this.newsService.listArticles({page:1,skipServiceWorkerCache:!0}).pipe(H(this.destroyRef)).subscribe({next:e=>{this.latestArticles=e.items,this.latestArticlesLoaded=!0,this.updateLatestNews()},error:e=>{console.error(e),this.allNewsError=!0,this.allNewsLoading=!1}})}updateLatestNews(){if(!this.topStoriesSettled||!this.latestArticlesLoaded)return;let e=new Set(this.topStories.map(o=>o.slug));this.allNews=this.latestArticles.filter(o=>!e.has(o.slug)).slice(0,8).map(o=>b(S({},o),{showProBadge:this.calculateProStatus(o)})),this.allNewsLoading=!1}calculateProStatus(e){if(!e.paid_article)return!1;if(e.paid_until){let o=`${e.paid_until}T23:59:59.999Z`,s=new Date(o);return Date.now()<s.getTime()}return!0}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=P({type:t,selectors:[["app-home-latest-news-section"]],inputs:{topStoriesTitle:"topStoriesTitle",allNewsTitle:"allNewsTitle"},decls:24,vars:4,consts:[["aria-labelledby","home-latest-news-title",1,"bg-white","py-10","sm:py-12","lg:py-14"],[1,"mx-auto","w-full","max-w-4xl","px-5","sm:px-6","lg:px-8"],[1,"flex","flex-col","sm:flex-row","sm:items-center","sm:justify-between","gap-2"],["id","home-latest-news-title",1,"heading-xlarge-bold"],[1,"w-full","sm:w-[240px]","shrink-0","h-[46px]","overflow-hidden","sm:h-auto","sm:overflow-visible"],["google-add-preferred-source-btn",""],[1,"mt-3","sm:mt-6"],["aria-busy","true","aria-label","Loading top stories",1,"grid","grid-cols-1","gap-4","md:grid-cols-2"],[1,"rounded-2xl","border","border-red-200","bg-red-50","p-4","text-red-700"],[1,""],[1,"rounded-2xl","border","border-slate-200","bg-white","p-4","text-sm","font-medium","text-slate-600"],[1,"mt-6","sm:mt-10"],[1,"mb-3","flex","items-center","justify-between"],[1,"heading-xlarge-bold"],["routerLink","/news","aria-label","View all latest news",1,"btn-small-outline"],[1,"relative"],["aria-hidden","true",1,"pointer-events-none","absolute","top-5","-bottom-5","right-0","z-[2]","w-8","bg-gradient-to-l","from-white","to-transparent"],["emblaCarousel","","aria-busy","true","aria-label","Loading latest news",1,"-my-5","overflow-hidden","py-5","cursor-grab","active:cursor-grabbing",3,"options"],["emblaCarousel","","aria-label","Latest news articles",1,"-my-5","overflow-hidden","py-5","cursor-grab","active:cursor-grabbing",3,"options"],["customClasses","animate-pulse md:row-span-2",3,"padded"],[1,"aspect-[16/10]","bg-slate-200"],[1,"space-y-3","p-4"],[1,"h-6","w-5/6","rounded","bg-slate-200"],[1,"h-4","w-2/3","rounded","bg-slate-200"],[1,"h-4","w-full","rounded","bg-slate-200"],[1,"h-4","w-4/5","rounded","bg-slate-200"],[1,"grid","grid-cols-1","gap-4","sm:grid-cols-2","md:grid-cols-1"],["customClasses","animate-pulse",3,"padded"],[1,"aspect-[16/9]","bg-slate-200"],[1,"space-y-2.5","p-3.5"],[1,"h-4","w-3/5","rounded","bg-slate-200"],[1,"h-3","w-1/2","rounded","bg-slate-200"],[1,"text-sm","font-medium"],["type","button",1,"mt-3","rounded-full","border","border-red-200","bg-white","px-4","py-2","text-sm","font-semibold","text-red-700","transition","hover:bg-red-100",3,"click"],["tag","article","customClasses","group",3,"padded"],[1,"flex","flex-col-reverse","md:flex-row","text-gray-900","sm:gap-4",3,"routerLink"],[1,"p-4","sm:p-5","flex","flex-col","justify-center","md:basis-1/3"],[1,"m-0","font-bold","leading-6","group-hover:text-highlight-100","text-lg","sm:text-xl"],[1,"mt-3","flex","items-center","gap-2","text-xs","font-medium","text-slate-500"],["aria-hidden","true"],["sizes","(max-width: 768px) 100vw, 50vw",1,"block","w-full","md:basis-2/3","md:flex-shrink-0",3,"unrounded","imageSrc","imageAlt","imageWidth","imageHeight","showProBadge"],[1,"aspect-[16/9]","w-full","bg-slate-100","md:basis-2/3","md:flex-shrink-0"],[1,"grid","grid-cols-1","gap-4","sm:grid-cols-2","mt-4"],[1,"block","text-slate-900",3,"routerLink"],["sizes","(max-width: 640px) 100v
1w, 50vw",1,"block",3,"unrounded","imageSrc","imageAlt","imageWidth","imageHeight","showProBadge"],[1,"aspect-[16/9]","bg-slate-100"],[1,"p-3.5"],[1,"m-0","line-clamp-2","text-sm","font-bold","leading-5","group-hover:text-highlight-100","sm:text-base"],[1,"mt-2","flex","items-center","gap-2","text-sm","font-medium","text-slate-500","sm:text-xs"],[1,"embla__container","flex","gap-4"],[1,"embla__slide","min-w-0","basis-[86%]","sm:basis-[calc(50%_-_0.5rem)]","lg:basis-[calc(33.333%_-_0.6875rem)]"],[1,"space-y-3","p-3.5"],[1,"h-4","w-11/12","rounded","bg-slate-200"],[1,"h-3","w-2/5","rounded","bg-slate-200"],[1,"embla__slide"],["tag","article","customClasses","group h-full transition hover:border-slate-300",3,"padded"],[1,"relative","overflow-hidden","bg-slate-100"],["sizes","(max-width: 640px) 86vw, (max-width: 1024px) 50vw, 33vw",1,"block",3,"unrounded","imageSrc","imageAlt","imageWidth","imageHeight","showProBadge","draggable"],["aria-hidden","true",1,"pointer-events-none","absolute","inset-x-0","bottom-0","h-16","bg-gradient-to-t","from-black/25","to-transparent"],[1,"m-0","line-clamp-3","text-sm","font-bold","leading-5","group-hover:text-highlight-100","sm:text-base"],[1,"mt-3","flex","items-center","justify-between","gap-2","text-xs","font-medium","text-slate-500"],[1,"truncate"],[1,"shrink-0"]],template:function(o,s){o&1&&(i(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2",3),r(4),a(),i(5,"div",4),d(6,"div",5),a()(),i(7,"div",6),u(8,O,11,1,"div",7)(9,R,5,0,"div",8)(10,q,19,10,"div",9)(11,J,2,0,"div",10),a(),i(12,"div",11)(13,"div",12)(14,"h2",13),r(15),a(),i(16,"a",14),r(17," View all "),a()(),i(18,"div",15),d(19,"div",16),u(20,Q,4,1,"div",17)(21,X,5,0,"div",8)(22,Y,2,0,"div",10)(23,ae,4,1,"div",18),a()()()()),o&2&&(n(4),x(" ",s.topStoriesTitle," "),n(4),g(s.topStoriesLoading?8:s.topStoriesError?9:s.topStoryLead?10:11),n(7),x(" ",s.allNewsTitle," "),n(5),g(s.allNewsLoading?20:s.allNewsError?21:s.allNews.length===0?22:23))},dependencies:[B,M,W,D,I],styles:[".embla__slide[_ngcontent-%COMP%]{flex:0 0 auto;width:290px;padding:2px}"]})}return t})();export{he as HomeLatestNewsSectionComponent};

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.