PageSourceSearch

https://brand42.co.uk/_nuxt/B7DiP4Ny.js

js brand42.co.uk collected 2026-10-02 18:48:01 UTC 4,130 bytes, 1 lines download raw bytes

1import{_ as U}from"./CUC_xHHS.js";import z from"./CUCWDqGc.js";import{_ as G,f,c as v,y as J,Q,r as R,w as Y,o as r,a as l,k as N,b as c,u,F as g,i as A,j as K,q as W,G as X,d as S,C as h,H as Z,e as w,t as p,T as ee}from"./CO5oMBLy.js";import{u as te}from"./DWdGsmkb.js";const se={class:"container-fluid pb-5 pb-md-7"},ne=["src"],ae=["src","alt"],oe={class:"pos-abs text-marvin font-space text-center w-100 pt-4"},re={class:"insight text-marvin font-space text-center w-100"},ie={class:"font-space mt-2"},le={key:0,class:"me-2 text-marvin"},ce={class:"ms-2 text-marvin"},ue={class:"text-very-big"},de={__name:"ThoughtsPage",props:{blok:{type:Object,required:!0}},setup(T){const b=T,{transformImage:j}=te(),B=X(),_=f(!1),d=f("all"),i=f({}),m=f([]),x=f(!1),M=async()=>{try{const e=await $fetch("https://api.storyblok.com/v2/cdn/stories",{params:{token:B.public.storyblokAccessToken,version:B.public.storyblokVersion,starts_with:"thought-categories"}}),t={};e.stories.forEach(n=>{t[n.uuid]=n.name}),i.value=t,_.value=!0}catch{_.value=!0}},O=()=>{b.blok?.articles&&b.blok.articles.length>0&&(m.value=b.blok.articles.filter(e=>typeof e=="object"&&e.content))},k=e=>new Date(e),E=v(()=>{if(d.value==="all")return C.value;const e=I.value,t=d.value;return C.value.filter(n=>{const a=n?.content?.categories;return!Array.isArray(a)||a.length===0?!1:a.some(o=>{if(typeof o=="string"){const y=i.value[o];return o===e||y===t}return typeof o=="object"&&o?o.uuid===e||o.id===e||o.name===t||o.full_slug===`thought-categories/${t.toLowerCase().replace(/\s+/g,"-")}`:!1})})}),C=v(()=>m.value?[...m.value].sort((e,t)=>{const n=e?.content?.date?k(e.content.date):new Date(0);return(t?.content?.date?k(t.content.date):new Date(0))-n}):[]),I=v(()=>Object.keys(i.value).find(e=>d.value===i.value[e])),V=v(()=>i.value?Object.values(i.value).sort():[]),$=e=>{if(!e?.content?.modules?.[0])return"";let n=e.content.modules[0].image;return typeof n=="object"&&n.filename&&(n=n.filename),j(n,240)},q=e=>k(e).toLocaleString("default",{year:"numeric",month:"short"}),F=e=>(typeof e=="object"&&e.filename&&(e=e.filename),j(e,600)),H=e=>{if(!e?.content?.modules)return 0;const t=e.content.modules.filter(a=>a.component==="post-wysiwyg");if(t.length===0)return 0;let n="";return t.forEach(a=>{try{n+=W(a.text)}catch{n+=typeof a.text=="string"?a.text:JSON.stringify(a.text)}}),Math.round(n.split(" ").length/200)||"< 1"},D=e=>e?.content?.categories?e.content.categories.map(t=>typeof t=="object"&&t.name?t.name:typeof t=="string"&&i.value?i.value[t]:null).filter(t=>t):[];return J(async()=>{O(),m.value&&m.value.forEach(e=>{e?.content?.insight&&(e.readTime=H(e))}),await M(),await Q(),x.value=!0}),(e,t)=>{const n=U,a=z,o=Z,y=R("editable");return Y((r(),l("section",se,[N(n,{"tags-loaded":u(_),"tag-titles":u(V),"selected-tag":u(d),onTagSelected:t[0]||(t[0]=s=>d.value=s)},null,8,["tags-loaded","tag-titles","selected-tag"]),c("div",{class:K(["row px-lg-4 px-xxl-8",{invisY50:!u(x),visible:u(x)}])},[(r(!0),l(g,null,A(u(E),s=>(r(),S(ee,{key:s.name+"_transition",name:"fade",mode:"out-in"},{default:h(()=>[(r(),l("article",{key:s.name,class:"col-6 col-md-4 mt--3 pb-5 pb-md-7"},[c("img",{class:"pos-abs xy-0 invisible",src:$(s)},null,8,ne),N(o,{to:"/"+s.full_slug,alt:s.name+" page",class:"hover-image pos-rel"},{default:h(()=>[s?.content?.image?.filename?.includes("json")?(r(),S(a,{key:0,path:s.content.image.filename,class:"bg-black g-image"},null,8,["path"])):s?.content?.image?.filename?(r(),l("img",{key:1,src:F(s.content.image.filename),class:"img-fluid w-100 g-image",alt:s.name+" image"},null,8,ae)):w("",!0),s?.content?.insight?(r(),l(g,{key:2},[c("div",oe,p(s.readTime)+" min read",1),c("div",re,p(s.content.insight),1)],64)):w("",!0)]),_:2},1032,["to","alt"]),c("div",ie,[(r(!0),l(g,null,A(D(s),(P,L)=>(r(),l(g,{key:L},[u(_)?(r(),l("span",le,p(P+(L<D(s).length-1?",":"")),1)):w("",!0)],64))),128)),t[1]||(t[1]=c("span",{class:"text-marvin mx-1"},"•",-1)),c("span",ce,p(s?.content?.date?q(s.content.date):""),1),c("div",ue,p(s.name),1)])]))]),_:2},1024))),128))],2)])),[[y,T.blok]])}}},ve=G(de,[["__scopeId","data-v-dfbdc6ea"]]);export{ve as default};

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.