1function h(t){return(t?.mediaDetails?.sizes||[]).map(o=>({...o,w:Number(o.width)||0})).filter(o=>o.w>0&&o.sourceUrl).sort((o,i)=>o.w-i.w)}function P(t,o){return $(t,o)?.sourceUrl}function $(t,o){if(!t?.sourceUrl)return;const i=h(t);if(!i.length)return{sourceUrl:t.sourceUrl,width:Number(t.mediaDetails?.width)||0,height:Number(t.mediaDetails?.height)||0};const c=i.find(d=>d.w>=o)??i[i.length-1];return{sourceUrl:c.sourceUrl,width:c.w,height:Number(c.height)||0}}function T(t,o){if(!t?.sourceUrl)return{};const i=t?.mediaDetails?.width,c=new Set,d=h(t).filter(u=>!i||u.w<=i).filter(u=>c.has(u.w)?!1:(c.add(u.w),!0));return d.length<2?{}:{srcset:d.map(u=>`${u.sourceUrl} ${u.w}w`).join(", "),sizes:o}}const s=` 2 databaseId title slug uri date modified excerpt 3 author { node { name slug } } 4 categories { nodes { name slug } } 5 featuredImage { node { sourceUrl altText caption mediaDetails { width height sizes { name sourceUrl width height } } } } 6`,y=` 7 seo { 8 title 9 metaDesc 10 metaRobotsNoindex 11 opengraphTitle 12 opengraphDescription 13 opengraphPublishedTime 14 opengraphModifiedTime 15 opengraphImage { sourceUrl mediaDetails { width height } } 16 twitterTitle 17 twitterDescription 18 twitterImage { sourceUrl } 19 } 20`,U=()=>{const t=(e,r={})=>$fetch("/api/graphql",{method:"POST",body:{query:e,variables:r}});return{latest:(e=28)=>t(` 21 query LatestPosts($count: Int!) { posts(first: $count) { nodes { ${s} } } } 22 `,{count:e}),byCategory:(e,r={first:12})=>t(` 23 query CategoryPosts($slug: String!, $first: Int, $after: String, $last: Int, $before: String) { 24 posts(where: { categoryName: $slug }, first: $first, after: $after, last: $last, before: $before) { 25 nodes { ${s} } 26 pageInfo { hasNextPage hasPreviousPage startCursor endCursor } 27 } 28 } 29 `,{slug:e,...r}),byTag:async(e,r={first:12})=>{const a=g=>` 30 query TagPosts($slug: String!, $tagId: ID!, $first: Int, $after: String, $last: Int, $before: String) { 31 tagTerm: tag(id: $tagId, idType: SLUG) { 32 name 33 description 34 ${g?"seo { title metaDesc metaRobotsNoindex }":""} 35 } 36 posts(where: { tagSlugIn: [$slug] }, first: $first, after: $after, last: $last, before: $before) { 37 nodes { ${s} } 38 pageInfo { hasNextPage hasPreviousPage startCursor endCursor } 39 } 40 } 41 `,l={slug:e,tagId:e,...r},n=await t(a(!0),l).catch(()=>null);return n?.data?n:await t(a(!1),l).catch(()=>null)??{data:null}},byAuthor:async(e,r={first:12})=>{const a=g=>` 42 query AuthorPosts($slug: String!, $userId: ID!, $first: Int, $after: String, $last: Int, $before: String) { 43 author: user(id: $userId, idType: SLUG) { 44 name 45 description 46 slug 47 avatar { url } 48 ${g?"authorImage":""} 49 } 50 posts(where: { authorName: $slug }, first: $first, after: $after, last: $last, before: $before) { 51 nodes { ${s} } 52 pageInfo { hasNextPage hasPreviousPage startCursor endCursor } 53 } 54 } 55 `,l={slug:e,userId:e,...r},n=await t(a(!0),l).catch(()=>null);return n?.data?n:await t(a(!1),l).catch(()=>null)??{data:null}},authorCard:async e=>{const r=n=>` 56 query AuthorCard($userId: ID!) { 57 user(id: $userId, idType: SLUG) { 58 name 59 description 60 slug 61 ${n?"authorImage":""} 62 } 63 } 64 `,a=await t(r(!0),{userId:e}).catch(()=>null);return a?.data?a:await t(r(!1),{userId:e}).catch(()=>null)??{data:{user:null}}},bySlug:async e=>{const r=n=>` 65 query PostBySlug($slug: ID!) { 66 post(id: $slug, idType: SLUG) { 67 ${s} 68 content 69 tags(first: 100) { nodes { name slug } } 70 ${n?y:""} 71 } 72 } 73 `,a=await t(r(!0),{slug:e}).catch(()=>null);return a?.data?a:await t(r(!1),{slug:e}).catch(()=>null)??{data:{post:null}}},articleSource:async e=>(await t(` 74 query ArticleSource($slug: ID!) { 75 post(id: $slug, idType: SLUG) { articleSources { name url } } 76 } 77 `,{slug:e}).catch(()=>null))?.data?.post?.articleSources||[],latestPoll:async()=>(await t(` 78 query LatestPoll { latestPoll { pollId html } } 79 `).catch(()=>null))?.data?.latestPoll||null,search:(e,r={first:12})=>t(` 80 query SearchPosts($term: String!, $first: Int, $after: String, $last: Int, $before: String) { 81 posts(where: { search: $term, orderby: { field: DATE, order: DESC } }, first: $first, after: $after, last: $last, before: $before) { 82 nodes { ${s} } 83 pageInfo { hasNextPage hasPreviousPage startCursor endCursor } 84 } 85 } 86 `,{term:e,...r}),sidebar:()=>{const e=new Date;return e.setDate(e.getDate()-7),t(` 87 query HomeSidebar {
88 schedule: tag(id: "f1-menetrend", idType: SLUG) { 89 posts(first: 1) { nodes { ${s} } } 90 } 91 weekly: posts( 92 first: 5 93 where: { 94 dateQuery: { after: { year: ${e.getFullYear()}, month: ${e.getMonth()+1}, day: ${e.getDate()} } } 95 orderby: { field: DATE, order: DESC } 96 } 97 ) { nodes { ${s} } } 98 recommended: posts(where: { categoryName: "szerkesztok-ajanljak" }, first: 4) { 99 nodes { ${s} } 100 } 101 fanZone: posts(where: { categoryName: "fan-zone" }, first: 4) { 102 nodes { ${s} } 103 } 104 feederSeries: posts(where: { categoryName: "irany-az-f1" }, first: 4) { 105 nodes { ${s} } 106 } 107 moto: posts(where: { categoryName: "moto" }, first: 4) { 108 nodes { ${s} } 109 } 110 etrc: posts(where: { categoryName: "etrc" }, first: 4) { 111 nodes { ${s} } 112 } 113 } 114 `)},categorySidebar:async e=>{const r=new Date;r.setDate(r.getDate()-7);const a=g=>` 115 query CategorySidebar($category: String!, $categoryId: ID!) { 116 categoryTerm: category(id: $categoryId, idType: SLUG) { 117 name 118 description 119 ${g?`seo { 120 title 121 metaDesc 122 metaRobotsNoindex 123 opengraphDescription 124 opengraphImage { sourceUrl } 125 }`:""} 126 } 127 schedule: tag(id: "f1-menetrend", idType: SLUG) { 128 posts(first: 1) { nodes { ${s} } } 129 } 130 weekly: posts( 131 first: 5 132 where: { 133 categoryName: $category 134 dateQuery: { after: { year: ${r.getFullYear()}, month: ${r.getMonth()+1}, day: ${r.getDate()} } } 135 orderby: { field: DATE, order: DESC } 136 } 137 ) { nodes { ${s} } } 138 recommended: posts(where: { categoryName: "szerkesztok-ajanljak" }, first: 4) { 139 nodes { ${s} } 140 } 141 fanZone: posts(where: { categoryName: "fan-zone" }, first: 4) { 142 nodes { ${s} } 143 } 144 } 145 `,l={category:e,categoryId:e},n=await t(a(!0),l).catch(()=>null);return n?.data?n:await t(a(!1),l).catch(()=>null)??{data:null}},relatedByTag:(e,r,a=2)=>t(` 146 query RelatedByTag($tagSlugs: [String], $excludeId: [ID], $count: Int!) { 147 posts(where: { tagSlugIn: $tagSlugs, notIn: $excludeId }, first: $count) { 148 nodes { ${s} } 149 } 150 } 151 `,{tagSlugs:e,excludeId:[String(r)],count:a})}};export{$ as a,T as b,P as p,U as u};
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.