PageSourceSearch

https://d5newstv.com/assets/Radio-BhYUV5UX.js

js d5newstv.com collected 2026-10-09 21:58:02 UTC 23,908 bytes, 1 lines download raw bytes

1import{u as de,x as le,r as d,j as e,M as re,a2 as m,a3 as p}from"./index-B38q3oD-.js";import{u as ie}from"./usePageMeta-BeXnO4Ju.js";import{E as oe}from"./EmptyState-BweFEB8y.js";import{M as i}from"./MaterialIcon-DK7wVKrx.js";const ne={total:0,live:0,scheduled:0,offline:0,listeners:0},ce={total:0,totalViews:0,categories:[],withDuration:0},z={title:"",description:"",host:"",stream_url:"",status:"offline",schedule:"",cover_image:"",listeners_count:"0"},B={title:"",description:"",author:"",audio_url:"",cover_image:"",duration:"",episode_number:"1",season:"1",category:"Actualite"};function me(s){const l={live:"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400",scheduled:"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400",offline:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300"};return l[s]||l.offline}function ge(){const{t:s}=de();ie(s("adminLayout.webRadio"));const{show:l}=le(),[g,O]=d.useState(ne),[h,U]=d.useState(ce),[w,V]=d.useState([]),[C,Y]=d.useState([]),[N,q]=d.useState(""),[y,$]=d.useState(""),[R,H]=d.useState(""),[S,I]=d.useState(""),[_,P]=d.useState(!0),[E,T]=d.useState(!0),[G,x]=d.useState(!1),[J,b]=d.useState(!1),[f,F]=d.useState(null),[v,A]=d.useState(null),[o,c]=d.use
1State(z),[r,n]=d.useState(B),[j,k]=d.useState(!1),D=async()=>{try{const[a,t]=await Promise.all([m.getStats(),p.getStats()]);O(a),U(t)}catch{}},M=async()=>{P(!0);try{const a=await m.listStreams({search:N,status:y});V(a.streams)}catch(a){l(a instanceof Error?a.message:s("adminRadio.loadStreamsError"),"error")}finally{P(!1)}},L=async()=>{T(!0);try{const a=await p.list({page:1,limit:12,search:R,category:S});Y(a.podcasts)}catch(a){l(a instanceof Error?a.message:s("adminRadio.loadPodcastsError"),"error")}finally{T(!1)}};d.useEffect(()=>{D()},[]),d.useEffect(()=>{M()},[N,y]),d.useEffect(()=>{L()},[R,S]);const u=async()=>{await Promise.all([D(),M(),L()])},K=()=>{F(null),c(z),x(!0)},Q=a=>{F(a),c({title:a.title,description:a.description||"",host:a.host||"",stream_url:a.stream_url||"",status:a.status||"offline",schedule:a.schedule||"",cover_image:a.cover_image||"",listeners_count:String(a.listeners_count||0)}),x(!0)},W=async()=>{if(!o.title.trim())return l(s("adminRadio.streamTitleRequired"),"error");k(!0);try{const a={...o,title:o.title.trim(),listeners_count:Number(o.listeners_count||0)};f?(await m.updateStream(f.id,a),l(s("adminRadio.streamUpdated"),"success")):(await m.createStream(a),l(s("adminRadio.streamCreated"),"success")),x(!1),await u()}catch(a){l(a instanceof Error?a.message:s("adminRadio.saveError"),"error")}finally{k(!1)}},X=()=>{A(null),n(B),b(!0)},Z=a=>{A(a),n({title:a.title,description:a.description||"",author:a.author||"",audio_url:a.audio_url||"",cover_image:a.cover_image||"",duration:a.duration||"",episode_number:String(a.episode_number||1),season:String(a.season||1),category:a.category||"Actualite"}),b(!0)},ee=async()=>{if(!r.title.trim())return l(s("adminRadio.podcastTitleRequired"),"error");k(!0);try{const a={...r,title:r.title.trim(),episode_number:Number(r.episode_number||1),season:Number(r.season||1)};v?(await p.update(v.id,a),l(s("adminRadio.podcastUpdated"),"success")):(await p.create(a),l(s("adminRadio.podcastCreated"),"success")),b(!1),await u()}catch(a){l(a instanceof Error?a.message:s("adminRadio.saveError"),"error")}finally{k(!1)}},ae=async a=>{if(window.confirm(s("adminRadio.confirmDeleteStream",{title:a.title})))try{await m.deleteStream(a.id),l(s("adminRadio.streamDeleted"),"success"),await u()}catch(t){l(t instanceof Error?t.message:s("adminRadio.deleteError"),"error")}},se=async a=>{if(window.confirm(s("adminRadio.confirmDeletePodcast",{title:a.title})))try{await p.delete(a.id),l(s("adminRadio.podcastDeleted"),"success"),await u()}catch(t){l(t instanceof Error?t.message:s("adminRadio.deleteError"),"error")}},te=[{icon:"radio",label:s("adminRadio.cardStreamsLabel"),value:g.total,note:s("adminRadio.cardStreamsNote",{count:g.live}),tone:"bg-blue-100 dark:bg-blue-900/30 text-primary"},{icon:"equalizer",label:s("adminRadio.cardListenersLabel"),value:g.listeners,note:s("adminRadio.cardListenersNote",{count:g.scheduled}),tone:"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400"},{icon:"podcasts",label:s("adminRadio.cardPodcastsLabel"),value:h.total,note:s("adminRadio.cardPodcastsNote",{count:h.withDuration}),tone:"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400"},{icon:"visibility",label:s("adminRadio.cardViewsLabel"),value:h.totalViews,note:s("adminRadio.cardViewsNote",{category:h.categories[0]?.category||s("adminRadio.catalogueFallback")}),tone:"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400"}];return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-black tracking-tight mb-1",children:s("adminRadio.title")}),e.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:s("adminRadio.subtitle")})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6",children:te.map(a=>e.jsxs("div",{className:"bg-white dark:bg-slate-900 p-6 rounded-[3px] border border-[var(--rule)]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("div",{className:`p-2.5 rounded-[3px] ${a.tone}`,children:e.jsx(i,{name:a.icon})}),e.jsx("span",{className:"text-xs font-bold text-slate-500 dark:text-slate-400",children:a.note})]}),e.jsx("p",{className:"text-sm font-medium text-slate-500 dark:text-slate-400",children:a.label}),e.jsx("p",{className:"text-2xl font-bold mt-1",children:a.value})]},a.label))}),e.jsxs("div",{className:"border border-[var(--rule)] rounded-[3px] bg-[var(--color-paper)] dark:bg-[var(--color-bg-card)] overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-5 border-b border-[var(--rule)] flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-black",children:s("adminRadio.streamsTitle")}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:s("adminRadio.streamsSubtitle")})]}),e.jsxs("button",{onClick:K,className:"flex items-center gap-2 px-4 py-2 btn-solid rounded-[3px] text-sm font-bold","aria-label":s("common.add"),children:[e.jsx(i,{name:"add",className:"text-lg"}),s("adminRadio.newStreamBtn")]})]}),e.jsxs("div",{className:"p-4 border-b border-[var(--rule)] flex flex-col xl:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(i,{name:"search",className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 dark:text-slate-400"}),e.jsx("input",{value:N,onChange:a=>q(a.target.value),placeholder:s("adminRadio.searchStreamPlaceholder"),"aria-label":s("adminRadio.searchStreamPlaceholder"),className:"w-full pl-10 pr-4 py-2.5 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("select",{value:y,"aria-label":s("adminRadio.allStatuses"),onChange:a=>$(a.target.value),className:"px-4 py-2.5 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm",children:[e.jsx("option",{value:"",children:s("adminRadio.allStatuses")}),e.jsx("option",{value:"live",children:s("adminRadio.statusLive")}),e.jsx("option",{value:"scheduled",children:s("adminRadio.statusScheduled")}),e.jsx("option",{value:"offline",children:s("adminRadio.statusOffline")})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 p-4",children:[_?Array.from({length:4}).map((a,t)=>
1e.jsx("div",{className:"h-36 rounded-[3px] bg-slate-100 dark:bg-slate-800 animate-pulse"},t)):w.map(a=>e.jsxs("div",{className:"rounded-[3px] border border-[var(--rule)] bg-slate-50 dark:bg-slate-900 p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-black",children:a.title}),e.jsxs("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:[a.host||s("adminRadio.noHost")," ",a.schedule?`- ${a.schedule}`:""]})]}),e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider ${me(a.status)}`,children:a.status})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-500 dark:text-slate-400",children:s("adminRadio.labelListeners")})," ",e.jsx("span",{className:"font-semibold",children:a.listeners_count||0})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-500 dark:text-slate-400",children:s("adminRadio.labelCreatedAt")})," ",e.jsx("span",{className:"font-semibold",children:re(a.created_at)})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-4",children:[e.jsxs("button",{onClick:()=>Q(a),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 rounded-[3px] text-xs font-bold",children:[e.jsx(i,{name:"edit",className:"text-base"}),s("adminRadio.edit")]}),e.jsxs("button",{onClick:()=>m.updateStream(a.id,{status:a.status==="live"?"offline":"live"}).then(u).then(()=>l(s("adminRadio.streamStatusUpdated"),"success")).catch(t=>l(t instanceof Error?t.message:s("adminRadio.actionError"),"error")),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 rounded-[3px] text-xs font-bold",children:[e.jsx(i,{name:a.status==="live"?"stop_circle":"play_circle",className:"text-base"}),a.status==="live"?s("adminRadio.stopBtn"):s("adminRadio.startBtn")]}),e.jsxs("button",{onClick:()=>ae(a),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-rose-50 dark:bg-rose-900/20 text-rose-700 dark:text-rose-400 rounded-[3px] text-xs font-bold",children:[e.jsx(i,{name:"delete",className:"text-base"}),s("adminRadio.delete")]})]})]},a.id)),!_&&w.length===0&&e.jsxs("div",{className:"xl:col-span-2 p-12 text-center",children:[e.jsx(i,{name:"radio",className:"text-4xl text-slate-500 dark:text-slate-400 mb-3"}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:s("adminRadio.noStreams")})]})]})]}),e.jsxs("div",{className:"border border-[var(--rule)] rounded-[3px] bg-[var(--color-paper)] dark:bg-[var(--color-bg-card)] overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-5 border-b border-[var(--rule)] flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-black",children:s("adminRadio.podcastsTitle")}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:s("adminRadio.podcastsSubtitle")})]}),e.jsxs("button",{onClick:X,className:"flex items-center gap-2 px-4 py-2 btn-solid rounded-[3px] text-sm font-bold","aria-label":s("common.add"),children:[e.jsx(i,{name:"add",className:"text-lg"}),s("adminRadio.newEpisodeBtn")]})]}),e.jsxs("div",{className:"p-4 border-b border-[var(--rule)] flex flex-col xl:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(i,{name:"search",className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 dark:text-slate-400"}),e.jsx("input",{value:R,onChange:a=>H(a.target.value),placeholder:s("adminRadio.searchPodcastPlaceholder"),"aria-label":s("adminRadio.searchPodcastPlaceholder"),className:"w-full pl-10 pr-4 py-2.5 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsx("input",{value:S,onChange:a=>I(a.target.value),placeholder:s("adminRadio.filterCategoryPlaceholder"),"aria-label":s("adminRadio.filterCategoryPlaceholder"),className:"px-4 py-2.5 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}
1),e.jsxs("div",{className:"divide-y divide-slate-100 dark:divide-slate-800",children:[E?Array.from({length:5}).map((a,t)=>e.jsx("div",{className:"h-20 mx-4 my-3 rounded-[3px] bg-slate-100 dark:bg-slate-800 animate-pulse"},t)):C.map(a=>e.jsxs("div",{className:"p-4 flex items-center gap-4 hover:bg-slate-50 dark:hover:bg-slate-800/40 transition-colors",children:[e.jsx("div",{className:"w-12 h-12 rounded-[3px] bg-primary/10 dark:bg-primary/20 text-primary flex items-center justify-center flex-shrink-0",children:e.jsx(i,{name:"podcasts",className:"text-xl"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold",children:a.title}),e.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:["S",a.season,"E",a.episode_number," - ",a.author||s("adminRadio.unknownAuthor")," - ",a.duration||s("adminRadio.noDuration")," - ",a.category||s("adminRadio.noCategory")]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>Z(a),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-700 rounded-[3px] text-xs font-bold",children:[e.jsx(i,{name:"edit",className:"text-base"}),s("adminRadio.edit")]}),e.jsxs("button",{onClick:()=>se(a),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-rose-50 dark:bg-rose-900/20 text-rose-700 dark:text-rose-400 rounded-[3px] text-xs font-bold",children:[e.jsx(i,{name:"delete",className:"text-base"}),s("adminRadio.delete")]})]})]},a.id)),!E&&C.length===0&&e.jsx(oe,{icon:"podcasts",title:s("adminRadio.noPodcasts")})]})]}),G&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"radio-dialogue-1",className:"fixed inset-0 z-50 bg-slate-950/40 backdrop-blur-sm flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-3xl bg-white dark:bg-slate-950 rounded-[3px] border border-[var(--rule)] max-h-[90dvh] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"shrink-0 px-6 py-4 border-b border-[var(--rule)] flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-black",id:"radio-dialogue-1",children:s(f?"adminRadio.editStreamTitle":"adminRadio.newStreamTitle")}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:s("adminRadio.streamModalSubtitle")})]}),e.jsx("button",{onClick:()=>x(!1),className:"p-2 rounded-[3px] hover:bg-slate-100 dark:hover:bg-slate-800","aria-label":s("common.close"),children:e.jsx(i,{name:"close",className:"text-xl"})})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto p-6 grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f1",children:s("adminRadio.fieldTitle")}),e.jsx("input",{id:"pagesadminradio-f1",value:o.title,onChange:a=>c(t=>({...t,title:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f2",children:s("adminRadio.fieldHost")}),e.jsx("input",{id:"pagesadminradio-f2",value:o.host,onChange:a=>c(t=>({...t,host:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f3",children:s("adminRadio.fieldStatus")}),e.jsxs("select",{id:"pagesadminradio-f3",value:o.status,onChange:a=>c(t=>({...t,status:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm",children:[e.jsx("option",{value:"offline",children:s("adminRadio.statusOffline")}),e.jsx("option",{value:"scheduled",children:s("adminRadio.statusScheduled")}),e.jsx("option",{value:"live",children:s("adminRadio.statusLive")})]})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f4",children:s("adminRadio.fieldStreamUrl")}),e.jsx("input",{id:"pagesadminradio-f4",value:o.stream_url,onChange:a=>c(t=>({...t,stream_url:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f5",children:s("adminRadio.fieldSchedule")}),e.jsx("input",{id:"pagesadminradio-f5",value:o.schedule,onChange:a=>c(t=>({...t,schedule:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f6",children:s("adminRadio.fieldListeners")}),e.jsx("input",{id:"pagesadminradio-f6",type:"number",min:"0",value:o.listeners_count,onChange:a=>c(t=>({...t,listeners_count:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f7",children:s("adminRadio.fieldCover")}),e.jsx("input",{id:"pagesadminradio-f7",value:o.cover_image,onChange:a=>c(t=>({...t,cover_image:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f8",children:s("adminRadio.fieldDescription")}),e.jsx("textarea",{id:"pagesadminradio-f8",rows:5,value:o.description,onChange:a=>c(t=>({...t,description:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm resize-none"})]})]}),e.jsxs("div",{className:"shrink-0 px-6 py-4 border-t border-[var(--rule)] flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>x(!1),className:"px-4 py-2.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm font-bold",children:s("adminRadio.cancel")}),e.jsx("button",{onClick:W,disabled:j,className:"px-4 py-2.5 btn-solid rounded-[3px] text-sm font-bold disabled:opacity-60",children:s(j?"adminRadio.saving":f?"adminRadio.save":"adminRadio.createStream")})]})]})}),J&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"radio-dialogue-2",className:"fixed inset-0 z-50 bg-slate-950/40 backdrop-blur-sm flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-3xl bg-white dark:bg-slate-950 rounded-[3px] border border-[var(--rule)] max-h-[90dvh] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"shrink-0 px-6 py-4 border-b border-[var(--rule)] flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-black",i
1d:"radio-dialogue-2",children:s(v?"adminRadio.editPodcastTitle":"adminRadio.newEpisodeTitle")}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:s("adminRadio.podcastModalSubtitle")})]}),e.jsx("button",{onClick:()=>b(!1),className:"p-2 rounded-[3px] hover:bg-slate-100 dark:hover:bg-slate-800","aria-label":s("common.close"),children:e.jsx(i,{name:"close",className:"text-xl"})})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto p-6 grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f9",children:s("adminRadio.fieldTitle")}),e.jsx("input",{id:"pagesadminradio-f9",value:r.title,onChange:a=>n(t=>({...t,title:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f10",children:s("adminRadio.fieldAuthor")}),e.jsx("input",{id:"pagesadminradio-f10",value:r.author,onChange:a=>n(t=>({...t,author:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f11",children:s("adminRadio.fieldCategory")}),e.jsx("input",{id:"pagesadminradio-f11",value:r.category,onChange:a=>n(t=>({...t,category:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f12",children:s("adminRadio.fieldSeason")}),e.jsx("input",{id:"pagesadminradio-f12",type:"number",min:"1",value:r.season,onChange:a=>n(t=>({...t,season:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f13",children:s("adminRadio.fieldEpisode")}),e.jsx("input",{id:"pagesadminradio-f13",type:"number",min:"1",value:r.episode_number,onChange:a=>n(t=>({...t,episode_number:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f14",children:s("adminRadio.fieldDuration")}),e.jsx("input",{id:"pagesadminradio-f14",value:r.duration,onChange:a=>n(t=>({...t,duration:a.target.value})),placeholder:"45:00",className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f15",children:s("adminRadio.fieldAudioUrl")}),e.jsx("input",{id:"pagesadminradio-f15",value:r.audio_url,onChange:a=>n(t=>({...t,audio_url:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f16",children:s("adminRadio.fieldCover")}),e.jsx("input",{id:"pagesadminradio-f16",value:r.cover_image,onChange:a=>n(t=>({...t,cover_image:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-semibold mb-2",htmlFor:"pagesadminradio-f17",children:s("adminRadio.fieldDescription")}),e.jsx("textarea",{id:"pagesadminradio-f17",rows:5,value:r.description,onChange:a=>n(t=>({...t,description:a.target.value})),className:"w-full px-4 py-2.5 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm resize-none"})]})]}),e.jsxs("div",{className:"shrink-0 px-6 py-4 border-t border-[var(--rule)] flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>b(!1),className:"px-4 py-2.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-[3px] text-sm font-bold",children:s("adminRadio.cancel")}),e.jsx("button",{onClick:ee,disabled:j,className:"px-4 py-2.5 btn-solid rounded-[3px] text-sm font-bold disabled:opacity-60",children:s(j?"adminRadio.saving":v?"adminRadio.save":"adminRadio.createEpisode")})]})]})})]})}export{ge 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.