1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62912,e=>{"use strict";let t=(0,e.i(510965).default)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],62912)},436363,e=>{"use strict";var t=e.i(891069),a=e.i(286698),r=e.i(847090);e.s(["CoverCalligram",0,function(e){let l=(0,a.useCallback)(()=>(0,r.createGenerateFn)(e)(),[e]);return(0,t.jsx)(r.CalligramCanvas,{width:e.width,height:e.height,word:e.word,fontSize:e.fontSize,color:e.color||void 0,holdDuration:e.holdDuration,shadow:e.shadow??!0,generateFn:l,style:{width:"100%",height:"auto",aspectRatio:`${e.width}/${e.height}`},className:"max-w-full"})}])},822618,e=>{"use strict";let t=(0,e.i(510965).default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],822618)},77391,e=>{"use strict";let t=(0,e.i(510965).default)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);e.s(["Pause",0,t],77391)},74455,e=>{"use strict";var t=e.i(891069),a=e.i(286698),r=e.i(397211),l=e.i(721087),s=e.i(62912),o=e.i(77391),i=e.i(290768),n=e.i(934290),c=e.i(822618);let d=(0,e.i(510965).default)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var u=e.i(647163);function h(e){if(!isFinite(e)||e<0)return"0:00";let t=Math.floor(e/60),a=Math.floor(e%60);return`${t}:${a.toString().padStart(2,"0")}`}e.s(["AudioPlayer",0,function({postId:e}){let[b,p]=(0,a.useState)(null),[x,f]=(0,a.useState)("idle"),[g,y]=(0,a.useState)(!1),[k,w]=(0,a.useState)(!1),[m,v]=(0,a.useState)(0),[j,_]=(0,a.useState)(0),[P,C]=(0,a.useState)(!0),[N,S]=(0,a.useState)(!1),[A,T]=(0,a.useState)(!1),[R,M]=(0,a.useState)(!1),U=(0,a.useRef)(null),E=(0,a.useRef)(null),$=(0,a.useRef)(!1),z="true"===(0,l.useSearchParams)().get("autoplay");(0,a.useEffect)(()=>M(!0),[]),(0,a.useEffect)(()=>{let e=E.current;if(!e)return;let t=new IntersectionObserver(([e])=>{C(e.isIntersecting)},{threshold:0});return t.observe(e),()=>t.disconnect()},[x]),(0,a.useEffect)(()=>{S(!P)},[P]),(0,a.useEffect)(()=>{if(N&&!$.current){$.current=!0,T(!0);let e=setTimeout(()=>T(!1),600);return()=>clearTimeout(e)}},[N]),(0,a.useEffect)(()=>{let t=async()=>{let t=0,a=async()=>{t++;try{let r=await fetch(`/api/podcast/${e}?locale=en`),l=await r.json();if(l.exists&&l.audioUrl){p(l.audioUrl),f("ready");return}"generating"===l.status&&t<60?setTimeout(a,5e3):"failed"===l.status&&f("error")}catch{t<60?setTimeout(a,5e3):f("error")}};a()};(async()=>{try{let a=await fetch(`/api/podcast/${e}?locale=en`),r=await a.json();console.log("[AudioPlayer] Podcast API response:",r),r.exists&&r.audioUrl?(console.log("[AudioPlayer] Setting audio URL:",r.audioUrl),p(r.audioUrl),f("ready")):"generating"===r.status?(f("loading"),t()):f("idle")}catch(e){console.error("[AudioPlayer] Failed to fetch podcast status:",e),f("idle")}})()},[e]);let F=(0,a.useRef)(!1);(0,a.useEffect)(()=>{z&&!k&&("ready"===x&&b?(w(!0),F.current=!0,U.current?.play().catch(()=>{console.log("[AudioPlayer] Autoplay blocked by browser â cover player visible for tap")})):("error"===x||"disabled"===x)&&(w(!0),console.log("[AudioPlayer] Autoplay requested but no podcast available")))},[z,k,x,b]);let L=(0,a.useCallback)(()=>{F.current&&(F.current=!1,U.current?.play().catch(()=>{console.log("[AudioPlayer] Autoplay blocked by browser â cover player visible for tap")}))},[]),O=(0,a.useCallback)(async()=>{if("disabled"!==x){if(!b&&"idle"===x)return void console.log("[AudioPlayer] No podcast available for this post");if("loading"===x)return void console.log("[AudioPlayer] Podcast is still generating, please wait...");U.current?g?U.current.pause():(console.log("[AudioPlayer] Playing audio:",b,"readyState:",U.current.readyState),U.current.play().catch(e=>{console.error("[AudioPlayer] Play failed:",e)})):console.warn("[AudioPlayer] audioRef.current is null, audioUrl:",b)}},[b,x,g]),q=(0,a.useRef)(!1),B=(0,a.useCallback)(()=>{y(!0),q.current||(q.current=!0,fetch("/api/track/podcast-play",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({postId:e,locale:"en"})}).catch(()=>{}))},[e]),I=(0,a.useCallback)(()=>y(!1),[]),D=(0,a.useCallback)(()=>{y(!1),v(0)},[]),K=(0,a.useCallback)(e=>{let t=e.currentTarget;console.error("[AudioPlayer] Audio error:",{src:t.src,error:t.error?.message,code:t.error?.code,networkState:t.networkState,readyState:t.readyState}),f("error")},[]),W=(0,a.useCallback)(()=>{U.current&&v(U.current.currentTime)},[]),X=(0,a.useCallback)(()=>{U.current&&_(U.current.duration)},[]),G=(0,a.useCallback)(e=>{if(!U.current||!j)return;let t=e.currentTarget.getBoundingClientRect(),a=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));U.current.currentTime=a*j},[j]),J=(0,a.useCallback)(e=>{U.current&&j&&(U.current.currentTime=Math.max(0,Math.min(j,U.current.currentTime+e)))},[j]),H=(0,a.useCallback)(()=>{U.current?.pause(),S(!1)},[]);if("disabled"===x||"idle"===x)return null;let Q=j>0?m/j*100:0,V=e=>(0,t.jsxs)("div",{className:"relative z-10 flex items-center gap-2 pl-1.5 pr-2 py-1.5",children:[(0,t.jsxs)("button",{onClick:()=>J(-30),className:"relative flex items-center justify-center w-7 h-7 rounded-full hover:bg-black/8 dark:hover:bg-white/10 transition-colors shrink-0","aria-label":"30 Sekunden zurück",children:[(0,t.jsx)(c.RotateCcw,{className:"h-3.5 w-3.5 text-black/50 dark:text-white/70",strokeWidth:2.5}),(0,t.jsx)("span",{className:"absolute text-[6px] font-bold text-black/50 dark:text-white/70 mt-px",children:"30"})]}),(0,t.jsx)("button",{onClick:O,disabled:"loading"===x,className:"flex items-center justify-center w-8 h-8 rounded-full bg-black/80 dark:bg-white/90 hover:bg-black dark:hover:bg-white transition-colors shrink-0 disabled:opacity-50","aria-label":g?"Pause":"Play",children:"loading"===x?(0,t.jsx)(i.Loader2,{className:"h-3.5 w-3.5 animate-spin text-white dark:text-black"}):g?(0,t.jsx)(o.Pause,{className:"h-3.5 w-3.5 text-white dark:text-black fill-white dark:fill-black"}):(0,t.jsx)(s.Play,{className:"h-3.5 w-3.5 text-white dark:text-black fill-white dark:fill-black ml-0.5"})}),(0,t.jsxs)("button",{onClick:()=>J(30),className:"relative flex items-center justify-center w-7 h-7 rounded-full hover:bg-black/8 dark:hover:bg-white/10 transition-colors shrink-0","aria-label":"30 Sekunden vorspulen",children:[(0,t.jsx)(d,{className:"h-3.5 w-3.5 text-black/50 dark:text-white/70",strokeWidth:2.5}),(0,t.jsx)("span",{className:"absolute text-[6px] font-bold text-black/50 dark:text-white/70 mt-px",children:"30"})]}),(0,t.jsxs)("div",{onClick:G,className:"relative w-28 sm:w-40 h-1 bg-black/10 dark:bg-white/25 rounded-full cursor-pointer group",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 bg-black/60 dark:bg-white/70 rounded-full transition-[width] duration-150 ease-linear",style:{width:`${Q}%`}}),(0,t.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-2.5 h-2.5 bg-black dark:bg-white rounded-full opacity-0 group-hover:opacity-100 transition-opacity shadow-sm pointer-events-none",style:{left:`calc(${Q}% - 5px)`}})]}),(0,t.jsxs)("span",{className:"text-[10px] font-mono text-black/50 dark:text-white/70 tabular-nums whitespace-nowrap select-none",children:[h(m),(0,t.jsx)("span",{className:"mx-px opacity-50",children:"/"}),h(j)]}),e.showClose&&(0,t.jsx)("button",{onClick:H,className:"flex items-center justify-center w-6 h-6 rounded-full hover:bg-black/8 dark:hover:bg-white/10 transition-colors shrink-0","aria-label":"Close player",children:(0,t.jsx)(n.X,{className:"h-3 w-3 text-black/40 dark:text-white/60"})})]}),Y=e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"glass-blur absolute inset-0 rounded-full"}),(0,t.jsx)("div",{className:"glass-tint absolute inset-0 rounded-full pointer-events-none"}),(0,t.jsx)("div",{className:"glass-caustic absolute inset-0 rounded-full pointer-events-none"}),(0,t.jsx)("div",{className:"glass-chroma absolute inset-0 rounded-full pointer-events-none"}),(0,t.jsx)("div",{className:"glass-milk absolute inset-0 rounded-full pointer-events-none",style:{opacity:e,transition:"opacity 1.5s ease-out"}}),(0,t.jsx)("div",{className:"glass-specular absolute inset-x-3 top-[1px] h-[1px] rounded-full pointer-events-none"}),(0,t.jsx)("div",{className:"glass-rim absolute inset-x-6 bottom-[
11px] h-[1px] rounded-full pointer-events-none opacity-40"})]});return(0,t.jsxs)(t.Fragment,{children:[b&&(0,t.jsx)("audio",{ref:U,src:b,onPlay:B,onPause:I,onEnded:D,onCanPlay:L,onError:K,onTimeUpdate:W,onLoadedMetadata:X,preload:"auto"}),(0,t.jsx)("div",{ref:E,children:(0,t.jsxs)("div",{className:(0,u.cn)("relative rounded-full overflow-hidden","border border-white/60 dark:border-white/20","shadow-[0_2px_16px_rgba(0,0,0,0.12),0_0_0_1px_rgba(255,255,255,0.3),0_8px_32px_rgba(0,0,0,0.08)]","dark:shadow-[0_2px_16px_rgba(0,0,0,0.5),0_0_0_1px_rgba(255,255,255,0.1),0_8px_32px_rgba(0,0,0,0.3)]","ai-glow-active"),children:[Y(1),V({showClose:!1})]})}),N&&R&&(0,r.createPortal)((0,t.jsx)("div",{className:"flying-player-enter fixed top-3 left-0 right-0 flex justify-center z-50 pointer-events-none",role:"region","aria-label":"Podcast Player",children:(0,t.jsxs)("div",{className:(0,u.cn)("relative rounded-full pointer-events-auto overflow-hidden","border border-white/60 dark:border-white/20","shadow-[0_2px_16px_rgba(0,0,0,0.12),0_0_0_1px_rgba(255,255,255,0.3),0_8px_32px_rgba(0,0,0,0.08)]","dark:shadow-[0_2px_16px_rgba(0,0,0,0.5),0_0_0_1px_rgba(255,255,255,0.1),0_8px_32px_rgba(0,0,0,0.3)]","ai-glow-active"),children:[Y(+!!A),V({showClose:!0})]})}),document.body)]})}],74455)}]);
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.