1import{a as f,r as b,j as e,d as o,L as a,s as l,an as i}from"./index-qhnNN43I.js";import{e as j,c as N,d as y}from"./useArticles-Dvq7TUUI.js";import{L as w}from"./loader-circle-CQNTaQdr.js";import{R as v}from"./rotate-ccw-D96MI_KU.js";import{C as k}from"./circle-plus-D_uxS8HL.js";import{F as C}from"./file-text-DvhQNMlU.js";import{E as T}from"./eye-CmlSVHbS.js";import{P as A}from"./pencil-BDJND_R2.js";import{T as L}from"./trash-2-CGlGHdi4.js";import"./useQuery-q1lipnT3.js";import"./useMutation-WzPTtda1.js";import"./article-C6UtI39w.js";const S={strategy:"bg-blue-100 text-blue-800",hr:"bg-primary/10 text-primary",esg:"bg-green-100 text-green-800",si:"bg-orange-100 text-orange-800"},R={article:"ð",video:"ð¬",audio:"ð§"},q=()=>{const{data:r=[],isLoading:c}=j(),x=N(),m=y(),u=f(),[d,n]=b.useState(!1),p=async()=>{if(window.confirm("ì¤ëì ë¬´ë£ í í° ì¬ì© 기ë¡ê³¼ ë¹ë¡ê·¸ì¸ ì´ë 기ë¡ì 모ë ì´ê¸°ííìê² ìµëê¹?")){n(!0);try{const t=new Date;t.setUTCHours(0,0,0,0);const s=t.toISOString();await Promise.all([l.from("token_usage").delete().gte("used_at",s),l.from("anonymous_reads").delete().gte("read_at",s)]),i.success("ë¬´ë£ í í°ì´ ì´ê¸°íëììµëë¤")}catch{i.error("ì´ê¸°í ì¤í¨")}finally{n(!1)}}},h=(t,s)=>{window.confirm(`"${s}" ê¸ì ìì íìê² ìµëê¹?`)&&x.mutate(t)},g=(t,s)=>{m.mutate({slug:t,data:{status:s==="published"?"draft":"published"}})};return c?e.jsx("div",{className:"flex items-center justify-center py-24",children:e.jsx(w,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"ê¸ ê´ë¦¬"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["ì´ ",r.length,"ê°ì ê¸"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:p,disabled:d,className:"inline-flex items-center gap-2 border border-border text-muted-foreground px-4 py-2.5 rounded-xl text-sm font-semibold hover:bg-muted transition-colors disabled:opacity-50",children:[e.jsx(v,{className:o("w-4 h-4",d&&"animate-spin")}),"í í° ì´ê¸°í"]}),e.jsx(a,{to:"/chronicle/editor/content/import",className:"inline-flex items-center gap-2 border border-border text-foreground px-4 py-2.5 rounded-xl text-sm font-semibold hover:bg-muted transition-colors",children:"CSV ê°ì ¸ì
1¤ê¸°"}),e.jsxs(a,{to:"/chronicle/editor/content/new",className:"inline-flex items-center gap-2 bg-primary text-on-dark px-4 py-2.5 rounded-xl text-sm font-semibold hover:bg-primary/90 transition-colors shadow-sm",children:[e.jsx(k,{className:"w-4 h-4"}),"ì ê¸ì°ê¸°"]})]})]}),r.length===0?e.jsxs("div",{className:"text-center py-24 text-muted-foreground border-2 border-dashed border-border rounded-2xl",children:[e.jsx(C,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),e.jsx("p",{className:"font-medium",children:"ê¸ì´ ììµëë¤"}),e.jsx("p",{className:"text-sm mt-1",children:"ì ê¸ì°ê¸°ë¥¼ ììí´ ë³´ì¸ì"})]}):e.jsx("div",{className:"bg-surface rounded-2xl border border-border/60 overflow-hidden shadow-sm",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-border/60",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-6 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-14",children:"#"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs",children:"ì 목"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-28",children:"í í½"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-24",children:"íì"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-28",children:"ì ì"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-28",children:"ë ì§"}),e.jsx("th",{className:"text-left px-4 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-24",children:"ìí"}),e.jsx("th",{className:"text-right px-6 py-3.5 font-semibold text-muted-foreground uppercase tracking-wide text-xs w-32",children:"ì¡ì
"})]})}),e.jsx("tbody",{className:"divide-y divide-border/40",children:r.map((t,s)=>e.jsxs("tr",{className:"hover:bg-slate-50/70 transition-colors group",children:[e.jsx("td",{className:"px-6 py-4 text-muted-foreground font-mono text-xs",children:s+1}),e.jsx("td",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[t.thumbnail&&e.jsx("img",{src:t.thumbnail,alt:"",className:"w-14 h-10 rounded-lg object-cover shrink-0 border border-border/40"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-foreground line-clamp-2 leading-snug",children:t.title}),t.leadText&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:t.leadText})]})]})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("span",{className:o("px-2 py-0.5 rounded-md text-xs font-bold uppercase",S[t.topic]||"bg-slate-100 text-slate-700"),children:t.topic})}),e.jsx("td",{className:"px-4 py-4 text-muted-foreground",children:e.jsxs("span",{children:[R[t.format]," ",t.format]})}),e.jsx("td",{className:"px-4 py-4 text-muted-foreground",children:t.author}),e.jsx("td",{className:"px-4 py-4 text-muted-foreground text-xs",children:t.date}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("button",{onClick:()=>g(t.slug,t.status),className:o("px-2.5 py-1 rounded-full text-xs font-semibold transition-colors cursor-pointer",t.status==="published"?"bg-success/10 text-success hover:bg-success/20":"bg-slate-100 text-slate-600 hover:bg-slate-200"),children:t.status==="published"?"ê²ìë¨":"ì´ì"})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(a,{to:`/chronicle/p/${t.slug}`,target:"_blank",className:"p-1.5 rounded-lg hover:bg-slate-200 text-muted-foreground hover:text-foreground transition-colors",title:"미리보기",children:e.jsx(T,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>u(`/chronicle/editor/content/${t.slug}`),className:"p-1.5 rounded-lg hover:bg-blue-100 text-muted-foreground hover:text-primary transition-colors",title:"ìì ",children:e.jsx(A,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>h(t.slug,t.title),className:"p-1.5 rounded-lg hover:bg-red-100 text-muted-foreground hover:text-red-600 transition-colors",title:"ìì ",children:e.jsx(L,{className:"w-4 h-4"})})]})})]},t.slug))})]})})]})};export{q 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.