PageSourceSearch

https://podcastluisteren.nl/assets/feed-DWrSzdSs.js

js podcastluisteren.nl collected 2026-10-01 10:31:26 UTC 5,516 bytes, 1 lines download raw bytes

1import{a4 as L,a5 as m,r as Q,a6 as $,ab as z,p as x,j as s,t as p,B as j,a7 as R,L as f,d as N,a8 as _,a9 as C,aa as I,at as M,au as P,J as w,f as S,Q as T,T as K,V as v,W as E,D as F,U as B}from"./index-DRTTVO6y.js";import{L as k}from"./ListenedButton-DswODWjL.js";const y=10;function H({limit:e=1,expandable:t=!1,showHeader:a=!1}={}){const{items:l,isSignedIn:r}=L(),o=m(n=>n.episode),u=m(n=>n.currentTime),[d,c]=Q.useState(!1),i=r&&$?l.filter(n=>!n.completed&&n.positionSeconds>=y&&n.episode).map(n=>{const g={...n.episode,slug:n.episodeSlug,podcast:n.episode?.podcast??n.podcast??void 0};return{episode:g,title:g.title||"",image:x(g.podcast),position:n.positionSeconds,duration:n.durationSeconds,state:z(n)}}):o?.slug&&u>=y?[{episode:{...o,slug:o.slug},title:o.title||"",image:x(o.podcast),position:u,duration:o.duration??null,state:null}]:[];if(!i.length)return null;const b=t&&i.length>e,h=b&&!d?i.slice(0,e):t?i:i.slice(0,e),D=h.map(n=>n.episode);return s.jsxs("section",{className:"mb-6","aria-labelledby":a?"continue-listening-heading":void 0,children:[a?s.jsxs("header",{className:"mb-4 flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1",children:[s.jsx("h2",{id:"continue-listening-heading",className:"m-0 text-xl font-bold",children:p("continue-listening.label")}),s.jsx("span",{className:"text-sm text-muted-foreground",children:p("continue-listening.count",{count:i.length})})]}):null,s.jsx("ol",{className:"m-0 list-none border-y border-border p-0",children:h.map(n=>s.jsx(O,{card:n,queue:D},n.episode.slug))}),b?s.jsx("div",{className:"mt-3 flex justify-start",children:s.jsx(j,{variant:"outline",type:"button",onClick:()=>c(n=>!n),children:d?p("continue-listening.show-less"):p("continue-listening.show-all",{count:i.length})})}):null]})}function O({card:e,queue:t}){const a=e.duration?Math.min(100,e.position/e.duration*100):null,l=m(i=>i.episode),r=m(i=>i.paused),o=m(i=>i.toggleEpisode),u=R(l,e.episode)&&!r,d=e.episode.podcast?.name||e.episode.podcast?.title,c=e.state?.completed?null:e.state?.remainingSeconds??null;return s.jsxs("li",{className:"grid grid-cols-[48px_minmax(0,1fr)_44px_40px] items-center gap-3 border-b border-border py-2.5 last:border-b-0",children:[s.jsx(f,{to:"/ep/$slug",params:{slug:e.episode.slug},tabIndex:-1,"aria-hidden":"true",className:"block",children:s.jsx("img",{className:"size-12 rounded-[10px] bg-muted object-cover",src:e.image,alt:""})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[d?s.jsx("span",{className:"block truncate text-[12.5px] font-bold tracking-[0.1em] text-muted-foreground uppercase",children:d}):null,s.jsx(f,{to:"/ep/$slug",params:{slug:e.episode.slug},className:"block truncate text-[15.5px] font-bold text-foreground hover:underline hover:underline-offset-[3px]",children:N(e.title,90)}),a!==null||c!==null?s.jsxs("span",{className:"mt-1.5 flex items-center gap-2.5",children:[a!==null?s.jsx("span",{className:"h-1 w-full max-w-[240px] rounded-full bg-border",children:s.jsx("span",{className:"block h-1 rounded-full bg-accent",style:{width:`${a}%`}})}):null,c?s.jsxs("span",{className:"text-xs font-medium whitespace-nowrap text-muted-foreground",children:["Nog ",_(c)]}):null]}):null]}),s.jsx(j,{variant:"accent",size:"icon",type:"button",className:"size-11 flex-none","aria-label":`${u?"Pauzeren":"Verder luisteren"}: ${e.title}`,onClick:()=>o(e.episode,t),children:u?s.jsx(C,{size:18}):s.jsx(I,{size:18})}),s.jsx(k,{episode:e.episode,state:e.state,className:"flex-none"})]})}function J({episode:e}){const t=e.positionSeconds&&e.duration?Math.min(100,e.positionSeconds/e.duration*100):null;return s.jsxs("div",{className:"flex items-center gap-1 rounded-xl border border-border bg-card pr-1.5 has-[a:hover]:bg-muted",children:[s.jsxs(f,{to:"/ep/$slug",params:{slug:e.slug},className:"flex min-w-0 flex-1 items-center gap-3 p-3 text-inherit hover:no-underline",children:[s.jsx("img",{className:"size-12 flex-none rounded-lg object-contain",src:x(e.podcast),alt:"",loading:"lazy"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm font-semibold",children:N(e.title,90)}),s.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[e.podcast.name,e.releaseDate?` · ${M(e.releaseDate)}`:"",e.duration?` · ${P(e.duration)}`:""]}),t!==null?s.jsx("span",{className:"mt-1.5 block h-1 rounded-full bg-border",children:s.jsx("span",{className:"block h-1 rounded-full bg-accent",style:{width:`${t}%`}})}):null]})]}),s.jsx(k,{episode:{slug:e.slug,title:e.title,duration:e.duration??void 0,podcast:e.podcast},state:null})]})}const q=e=>v({queryKey:["recommendations",e],queryFn:()=>E("/api/me/recommendations",{limit:e}),staleTime:5*6e4});function W(e=12){const{isSignedIn:t}=w(),a=S({...q(e),enabled:t});return{items:t?a.data?.items??[]:[],isLoading:a.isLoading&&t}}function A(e){const t=T(),a=q(e).queryKey;return K({mutationFn:async l=>{await B("/api/me/recommendations/dismiss",{podcastId:l.podcast.id})},onMutate:async l=>{F("recommendation_dismissed",l.reasonKind),await t.cancelQueries({queryKey:a});const r=t.getQueryData(a);return r&&t.setQueryData(a,{items:r.items.filter(o=>o.podcast.id!==l.podcast.id)}),{previous:r}},onError:(l,r,o)=>{o?.previous&&t.setQueryData(a,o.previous)}})}const U=e=>v({queryKey:["feed",e],queryFn:()=>E("/api/me/feed",{limit:e}),staleTime:6e4});function X(e=12){const{isSignedIn:t}=w(),a=S({...U(e),enabled:t});return{items:t?a.data?.items??[]:[],isLoading:a.isLoading&&t}}export{H as C,J as N,X as a,A as b,W 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.