PageSourceSearch

https://outfit7.com/_nuxt/DrMGTAWl.js

js outfit7.com collected 2026-10-09 22:39:16 UTC 2,994 bytes, 2 lines download raw bytes

1import{d as S,j as T,r as P,n as b,k as N,I as $,a3 as V,a as i,e as C,c as f,w as p,f as E,t as j,q as u,b as v,h as l,v as L,N as G}from"./BgOPsrZ5.js";import{_ as M}from"./osTxkUW1.js";import{_ as R}from"./BSim4uNs.js";import{_ as z}from"./C0TWZQbG.js";import{u as A,q as F}from"./BQ2ybE4D.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new r.Error().stack;o&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[o]="95e5eaee-c98c-4a41-9f14-531baae8b424",r._sentryDebugIdIdentifier="sentry-dbid-95e5eaee-c98c-4a41-9f14-531baae8b424")}catch{}})();const H={class:"text-2xl md:text-[56px] font-medium text-white md:text-center leading-[1.2] mb-6 lg:b-12"},J={key:0,class:"flex mt-8 md:mt-16 md:justify-center"},X=S({__name:"blog-listing",props:{title:{},itemsToShow:{},collections:{},showCategories:{type:Boolean},pagination:{type:Boolean},cta:{},queryParamPage:{default:"page"},queryParamCategory:{default:"category"}},async setup(r){let o,m;const t=r,s=T(),c=P(s.query[t.queryParamPage]?Number(s.query[t.queryParamPage]):1),d=P(null),y=b(()=>s.query[t.queryParamCategory]?s.query[t.queryParamCategory]:""),_=([o,m]=N(()=>Promise.all(t.collections.map(e=>A(`${e}-listing`,()=>F(e).sort({date:-1}).only(["card","categories","date"]).find())))),o=await o,m(),o).flatMap(e=>{var a;return(a=e.data)==null?void 0:a.value}),h=k(),q=b(()=>_.filter(e=>y.value?e.categories.some(a=>a.slug===y.value):!0).sort((e,a)=>new Date(a.date).getTime()-new Date(e.date).getTime()).map(e=>e.card));$(()=>s.query[t.queryParamPage],()=>{c.value=s.query[t.queryParamPage]?Number(s.query[t.queryParamPage]):1,V(()=>{d.value&&d.value.scrollIntoView(!0)})});function k(){return t.showCategories?_.reduce((e,a)=>{if(a.categories)return a.categories.forEach(n=>{e.some(g=>g.slug===n.slug)||e.push(n)}),e},[]):[]}return(e,a)=>{var w;const n=L,g=M,B=R,D=G,I=z;return i(),C("section",{ref_key:"container",ref:d,class:"w-full py-12 overflow-x-hidden md:py-24"},[e.title?(i(),f(n,{key:0},{default:p(()=>[E("h2",H,j(e.title),1)]),_:1})):u("",!0),e.showCategories&&((w=v(h))==null?void 0:w.length)>0?(i(),f(n,{key:1},{default:p(()=>[l(g,{categories:v(h),"query-param-category":e.queryParamCategory,"query-param-page":e.queryParamPage,selected:y.value},null,8,["categories","query-param-category","query-param-page","selected"])]),_:1})):u("",!0),l(B,{class:"mt-6 lg:mt-12",cards:q.value.slice((c.value-1)*e.itemsToShow,(c.value-1)*e.itemsToShow+e.itemsToShow),"mobile-cards-as-slider":!e.pagination},null,8,["cards","mobile-cards-as-slider"]),l(n,null,{default:p(()=>[e.cta?(i(),C("div",J,[l(D,{label:e.cta.title,href:e.cta.href,type:e.cta.type},null,8,["label","href","type"])])):u("",!0),e.pagination?(i(),f(I,{key:1,class:"mt-8 md:mt-16","query-param":e.queryParamPage,"total-items":q.value.length,"items-to-show":e.itemsToShow},null,8,["query-param","total-items","items-to-show"])):u("",!0)]),_:1})],512)}}});export{X as _};
2//# sourceMappingURL=DrMGTAWl.js.map

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.